/* ============================================================
   Steady Scale — shared site stylesheet
   Design system + chrome (nav/footer) + reusable page components.
   Linked by the content pages (how-it-works, science, guide,
   about, news). The original pages (index, support, privacy,
   terms, licenses) still self-contain their CSS; migrating them
   here is optional follow-up.
   ============================================================ */

:root {
  --bg: #FFFFFF;
  --surface: #F5F5F5;
  --surface-tint: #EBF4FF;
  --celebration-border: rgba(39, 129, 219, 0.18);
  --border: #E0E0E0;
  --border-soft: #ECECEC;
  --text: #2C2C2C;
  --secondary: #555555;
  --muted: #999999;
  --blue: #2781DB;
  --blue-deep: #1D65C4;
  --shadow-md: 0 1px 3px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06);
  --radius-card: 12px;
  --nav-h: 56px;
  --maxw: 1080px;
  --maxw-prose: 680px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  padding-top: var(--nav-h);
}
a { color: inherit; }

/* One consistent gap before the footer on every content page.
   (index.html overrides this to 0 — it ends in full-bleed sections.) */
main { padding-bottom: 96px; }
main > .callout:last-child { margin-bottom: 0; }

.skip { position: absolute; top: -40px; left: 8px; background: var(--text); color: #FFF; padding: 8px 14px; border-radius: 6px; font-size: 13px; z-index: 100; transition: top 0.15s; }
.skip:focus { top: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Sticky nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); background: rgba(255,255,255,0.85); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid rgba(0,0,0,0.06); z-index: 50; }
.nav-inner { max-width: var(--maxw); margin: 0 auto; height: 100%; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.nav-brand:hover { text-decoration: none; }
.nav-brand svg { width: 22px; height: 22px; }
.nav-wm { font-size: 17px; letter-spacing: -0.4px; text-transform: lowercase; }
.nav-wm .w-steady { font-weight: 700; color: var(--blue); }
.nav-wm .w-scale  { font-weight: 400; color: var(--text); margin-left: 0.15em; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--secondary); text-decoration: none; transition: color 0.15s; white-space: nowrap; }
.nav-links a:hover { color: var(--blue); }
.nav-links a.is-active { color: var(--blue); }

/* ---------- Layout helpers ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 24px; }
.section-tint { background: var(--surface-tint); }
.section-surface { background: var(--surface); }
.section-inner { max-width: var(--maxw); margin: 0 auto; }
.prose-inner { max-width: var(--maxw-prose); margin: 0 auto; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { max-width: var(--maxw-prose); margin: 0 auto; padding: 20px 24px 0; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { color: var(--muted); margin: 0 6px; }

/* ---------- Page hero ---------- */
.page-hero { padding: 88px 24px 48px; text-align: left; }
.page-hero-inner { max-width: var(--maxw-prose); margin: 0 auto; }
.page-hero h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.8px; line-height: 1.1; margin-bottom: 18px; color: var(--text); }
.page-hero .lead { font-size: 19px; color: var(--secondary); line-height: 1.62; max-width: 620px; }
.page-hero .lead + .lead { margin-top: 16px; }
.header-rule { max-width: var(--maxw-prose); margin: 36px auto 0; border: 0; border-top: 1px solid var(--border-soft); }

/* ---------- Prose (articles, evidence, how-it-works, about) ---------- */
.prose { max-width: var(--maxw-prose); margin: 0 auto; padding: 0 24px; }
.prose > * + * { margin-top: 22px; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.22; margin-top: 56px; color: var(--text); }
.prose h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.2px; line-height: 1.3; margin-top: 36px; color: var(--text); }
.prose p { font-size: 17px; color: var(--secondary); line-height: 1.75; }
.prose .lead { font-size: 19px; color: var(--text); line-height: 1.6; }
.prose ul, .prose ol { padding-left: 26px; color: var(--secondary); font-size: 17px; line-height: 1.75; }
.prose li { padding-left: 6px; }
.prose li + li { margin-top: 10px; }
.prose li::marker { color: var(--blue); }
.prose a { color: var(--blue); text-decoration: none; border-bottom: 1px solid var(--celebration-border); }
.prose a:hover { border-bottom-color: var(--blue); }
.prose strong { color: var(--text); font-weight: 600; }
.prose blockquote { border-left: 3px solid var(--celebration-border); padding: 4px 0 4px 20px; color: var(--secondary); font-style: normal; }
.prose figure { margin: 28px 0; }
.prose figure img { width: 100%; max-width: 100%; height: auto; border-radius: var(--radius-card); display: block; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }

/* ---------- Byline ---------- */
.byline { max-width: var(--maxw-prose); margin: 22px auto 0; padding: 0 24px 34px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; color: var(--secondary); }
.byline .by { color: var(--muted); margin-right: 2px; }
.byline .who { font-weight: 600; color: var(--text); }
.byline .cred { color: var(--muted); }
.byline .dot { color: var(--muted); margin: 0 2px; }

/* ---------- Callout / note ---------- */
.callout { max-width: var(--maxw-prose); margin: 40px auto; padding: 22px 26px; background: var(--surface-tint); border: 1px solid var(--celebration-border); border-radius: var(--radius-card); font-size: 15px; color: var(--secondary); line-height: 1.65; }
.callout .callout-title { display: block; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.callout .callout-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }
.callout h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.2px; color: var(--text); margin-bottom: 8px; }
.callout p { font-size: 15px; color: var(--secondary); line-height: 1.65; }
.callout a { color: var(--blue); text-decoration: none; border-bottom: 1px solid var(--celebration-border); font-weight: 500; }
.callout a:hover { border-bottom-color: var(--blue); }

/* ---------- Citations ---------- */
.citations { max-width: var(--maxw-prose); margin: 48px auto 0; padding: 28px 24px 0; border-top: 1px solid var(--border-soft); }
.citations h2 { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.citations ol { padding-left: 20px; }
.citations li { font-size: 14px; color: var(--secondary); line-height: 1.6; margin-bottom: 10px; }
.citations a { color: var(--blue); text-decoration: none; }
.citations a:hover { text-decoration: underline; }
/* Inline citation superscripts (in prose) */
.prose sup.ref { font-size: 0.68em; line-height: 0; }
.prose sup.ref a { color: var(--blue); border-bottom: none; font-weight: 600; padding: 0 1px; }
.prose sup.ref a:hover { border-bottom: none; text-decoration: underline; }

/* ---------- Card grid (resources hub, learn index, news list) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 8px; }
.card { display: flex; flex-direction: column; padding: 24px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-card); text-decoration: none; color: inherit; transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s; }
a.card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }
.card-title { font-size: 19px; font-weight: 700; letter-spacing: -0.2px; line-height: 1.25; color: var(--text); margin-bottom: 8px; }
.card-desc { font-size: 15px; color: var(--secondary); line-height: 1.55; flex: 1; }
.card-meta { font-size: 13px; color: var(--muted); margin-top: 14px; }
.card-arrow { font-size: 14px; font-weight: 600; color: var(--blue); margin-top: 14px; }
.card.is-soon { opacity: 0.72; }
.card.is-soon:hover { transform: none; box-shadow: none; border-color: var(--border); }

/* ---------- Quick guide ---------- */
.guide-group { max-width: var(--maxw-prose); margin: 0 auto; padding: 0 24px; }
.guide-group + .guide-group { margin-top: 56px; }
.guide-group-title { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.guide-item { border-bottom: 1px solid var(--border-soft); }
.guide-item summary { list-style: none; cursor: pointer; padding: 20px 0; font-size: 17px; font-weight: 600; color: var(--text); line-height: 1.4; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.guide-item summary::-webkit-details-marker { display: none; }
.guide-item summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--muted); line-height: 1; flex: none; transition: transform 0.15s; }
.guide-item[open] summary::after { content: '\2212'; }
.guide-item .guide-body { padding: 2px 0 24px; font-size: 16px; color: var(--secondary); line-height: 1.72; }
.guide-item .guide-body > * + * { margin-top: 12px; }
.guide-item .guide-body ul, .guide-item .guide-body ol { padding-left: 24px; }
.guide-item .guide-body li { padding-left: 6px; line-height: 1.65; }
.guide-item .guide-body li + li { margin-top: 7px; }
.guide-item .guide-body li::marker { color: var(--blue); }
.guide-item .guide-body a { color: var(--blue); text-decoration: none; }
.guide-item .guide-body a:hover { text-decoration: underline; }
.guide-item .guide-body .guide-note strong { color: var(--text); }

/* ---------- As featured in (home strip) ---------- */
.as-featured { padding: 26px 24px; border-bottom: 1px solid var(--border-soft); }
.as-featured-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 24px; }
.as-featured .label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.as-featured .outlets { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; }
.as-featured .outlets a { font-size: 15px; font-weight: 600; color: var(--secondary); text-decoration: none; transition: color 0.15s; }
.as-featured .outlets a:hover { color: var(--blue); }

/* ---------- CTA block ---------- */
.cta-block { text-align: center; padding: 64px 24px; }
.cta-block h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.4px; margin-bottom: 12px; }
.cta-block p { font-size: 17px; color: var(--secondary); margin-bottom: 24px; }

/* ---------- App Store badge (shared) ---------- */
.appstore-badge { display: inline-flex; align-items: center; gap: 9px; background: #000; color: #FFF; border-radius: 9px; padding: 8px 15px; text-decoration: none; line-height: 1; transition: transform 0.1s ease, box-shadow 0.15s ease; }
.appstore-badge:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }
.appstore-badge:active { transform: translateY(0); }
.appstore-badge:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.appstore-badge svg { width: 18px; height: 24px; flex: 0 0 auto; }
.appstore-badge .as-text { display: flex; flex-direction: column; align-items: flex-start; }
.appstore-badge .as-sub { font-size: 10px; font-weight: 400; letter-spacing: 0.01em; }
.appstore-badge .as-name { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin-top: 1px; }

/* ---------- Footer ---------- */
.footer { padding: 56px 24px 40px; text-align: center; border-top: 1px solid var(--border-soft); border-image: linear-gradient(to right, transparent, var(--border) 25%, var(--border) 75%, transparent) 1; }
.footer-nav { display: flex; justify-content: center; gap: 6px 22px; flex-wrap: wrap; margin-bottom: 20px; }
.footer-nav a { font-size: 13px; color: var(--secondary); text-decoration: none; transition: color 0.15s; }
.footer-nav a:hover { color: var(--blue); }
.footer-meta { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-inner { gap: 10px; }
  .nav-links { gap: 14px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { font-size: 12px; }
}
@media (max-width: 640px) {
  .section { padding: 48px 20px; }
  .page-hero { padding: 44px 20px 4px; }
  .page-hero h1 { font-size: 32px; }
  .page-hero .lead { font-size: 16px; }
  .prose { padding: 28px 20px 4px; }
  .prose h2 { font-size: 24px; }
  .footer-nav { gap: 6px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a.card:hover { transform: none; }
}

/* ---------- Footer download badge ---------- */
.footer .appstore-badge { margin: 0 auto 26px; }

/* ---------- Bios (About) — stacked rows, photo left ---------- */
/* About intro: align text with the hero title (not inset like default .prose), plus breathing room above the bios */
.prose.about-intro { max-width: calc(var(--maxw-prose) + 48px); margin-bottom: 36px; }
.bio-list { max-width: var(--maxw-prose); margin: 0 auto; padding: 0 24px; }
.bio-card { display: flex; gap: 30px; align-items: flex-start; padding-top: 48px; border-top: 1px solid var(--border-soft); border-image: linear-gradient(to right, transparent, var(--border) 25%, var(--border) 75%, transparent) 1; }
.bio-card + .bio-card { margin-top: 48px; }
.bio-avatar { flex: 0 0 128px; width: 128px; height: 128px; border-radius: 50%; object-fit: cover; background: var(--surface-tint); border: 1px solid var(--celebration-border); display: flex; align-items: center; justify-content: center; color: var(--blue); font-size: 32px; font-weight: 700; }
.bio-content { flex: 1; min-width: 0; }
.bio-name { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; color: var(--text); }
.bio-role { font-size: 12px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--blue); margin: 5px 0 14px; }
.bio-text { font-size: 15.5px; color: var(--secondary); line-height: 1.7; }
.bio-text p + p { margin-top: 12px; }
.bio-link { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--blue); text-decoration: none; }
.bio-link + .bio-link { margin-left: 18px; }
.bio-link:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .bio-card { flex-direction: column; gap: 18px; padding-top: 40px; }
  .bio-card + .bio-card { margin-top: 40px; }
  .bio-avatar { flex-basis: 104px; width: 104px; height: 104px; }
}

/* ---------- News (featured press + timeline) ---------- */
.news-feature { max-width: var(--maxw-prose); margin: 0 auto; padding: 0 24px; }
.news-feature-card { display: block; background: var(--surface-tint); border: 1px solid var(--celebration-border); border-radius: var(--radius-card); padding: 32px 34px; text-decoration: none; color: inherit; transition: box-shadow 0.15s, transform 0.1s; }
a.news-feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); text-decoration: none; }
.news-feature-masthead { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.news-feature-logo { display: block; height: 58px; width: 58px; border-radius: 50%; flex: none; }
.news-feature-mh-name { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.1px; }
.news-feature-mh-meta { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); margin-top: 3px; }
.news-feature-headline { font-size: 23px; font-weight: 700; line-height: 1.32; letter-spacing: -0.3px; color: var(--text); margin-bottom: 18px; }
.news-feature-quote { margin: 0; padding-left: 20px; border-left: 3px solid rgba(39, 129, 219, 0.4); }
.news-feature-quote p { font-size: 16px; color: var(--secondary); line-height: 1.62; margin-bottom: 10px; }
.news-feature-byline { font-size: 14px; color: var(--muted); }
.news-feature-cta { margin-top: 18px; font-size: 15px; font-weight: 600; color: var(--blue); }
a.news-feature-card:hover .news-feature-cta { color: var(--blue-deep); }
.news-list { max-width: var(--maxw-prose); margin: 44px auto 0; padding: 0 24px; }
.news-item { display: flex; gap: 22px; padding: 22px 0; border-top: 1px solid var(--border-soft); align-items: center; }
.news-item:first-child { border-top: none; }
.news-list .news-item:last-child { padding-bottom: 0; }
.news-date { flex: 0 0 140px; font-size: 13px; color: var(--muted); text-align: center; line-height: 27px; }
.news-body { flex: 1; min-width: 0; }
.news-body .news-title { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.news-body .news-title a { color: inherit; text-decoration: none; }
.news-body .news-title a:hover { color: var(--blue); }
.news-body .news-desc { font-size: 15px; color: var(--secondary); line-height: 1.55; }
.news-body .news-link { font-size: 14px; font-weight: 600; color: var(--blue); text-decoration: none; display: inline-block; margin-top: 8px; }
.news-body .news-link:hover { text-decoration: underline; }
.news-badge { margin-top: 12px; line-height: 0; }
.news-badge img { width: 128px; height: auto; margin: 0 auto; }
.news-badge-placeholder { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--muted); border: 1px dashed var(--border); border-radius: 8px; padding: 8px 14px; }
@media (max-width: 640px) { .news-item { flex-direction: column; gap: 6px; align-items: flex-start; } .news-date { text-align: left; line-height: 1.6; } .news-badge img { margin: 0; } .news-feature-headline { font-size: 20px; } }
