/* EM Field Guide site: the one stylesheet (step 10, the mockup). Every value is a token from tokens.css; the only
   literals are the font-face declarations, the 1px hairline alias and a few ch measures that are content decisions.
   Direction A (Field notes) with B's section tint and C's figure captions; identity option 2 (provisional). */

@font-face { font-family: "Geist"; src: url("/assets/fonts/geist-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/source-serif-4-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---- base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--space-xl); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: var(--step-0); line-height: var(--leading-body); font-synthesis: none; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.16em; transition: color var(--dur-1) var(--ease-out); }
a:hover { color: var(--accent-hover); text-decoration-thickness: 0.12em; }
a:active { color: var(--accent-active); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: var(--radius-xs); }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 600; letter-spacing: var(--tracking-heading); line-height: var(--leading-tight); }
h1 { font-size: var(--step-5); letter-spacing: var(--tracking-display); line-height: var(--leading-display); max-width: var(--measure-h1); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
p { margin: 0; max-width: var(--measure); }
p + p { margin-top: var(--space-s); }
ul, ol { margin: 0; padding-left: 1.2em; max-width: var(--measure); }
li + li { margin-top: var(--space-2xs); }
strong { font-weight: 600; }
small { font-size: var(--step--1); }
.skip { position: absolute; left: var(--gutter); top: -5rem; z-index: 2; padding: var(--space-2xs) var(--space-xs); background: var(--skip-bg); color: var(--skip-ink); border-radius: var(--radius-s); }
.skip:focus { top: var(--gutter); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-text { max-width: var(--wrap-text); margin: 0 auto; padding: 0 var(--gutter); }
.label { font-size: var(--step--1); font-weight: 500; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lede { font-size: var(--step-1); color: var(--ink-2); line-height: 1.45; max-width: var(--measure-lede); text-wrap: pretty; }
.read { font-family: var(--font-serif); line-height: var(--leading-read); text-wrap: pretty; }
.cap { font-family: var(--font-figure); font-size: var(--step--1); color: var(--ink-2); font-variant-numeric: tabular-nums; max-width: 40ch; text-wrap: pretty; }
.cap b { font-weight: 500; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-3); font-size: var(--step--2); display: block; margin-bottom: var(--space-3xs); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--target-primary); padding: 0 var(--space-m); border-radius: var(--radius-s); font: inherit; font-weight: 500; text-decoration: none; background: var(--accent); color: var(--on-accent); transition: background-color var(--dur-1) var(--ease-out); }
.btn:hover, .btn:active { color: var(--on-accent); }
.btn:hover { background: var(--accent-hover); }
.btn:active { background: var(--accent-active); }

/* ---- header */
.site-head { border-bottom: var(--rule) solid var(--line); background: var(--bg); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; gap: var(--space-s); }
.logo { display: block; flex: none; }
.logo img { height: 1.75rem; width: auto; }
.nav { display: flex; gap: var(--space-m); align-items: center; }
.nav a:not(.btn) { display: none; color: var(--ink-2); text-decoration: none; font-weight: 500; min-height: var(--target); align-items: center; }
.nav a:not(.btn):hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav .btn { padding: 0 var(--space-s); min-height: 2.5rem; }
@media (min-width: 48em) {
  .site-head { position: sticky; top: 0; z-index: 1; }
  .nav a:not(.btn) { display: inline-flex; }
  .nav .btn { padding: 0 var(--space-m); }
}

/* ---- footer */
.site-foot { border-top: var(--rule) solid var(--line); padding: var(--space-xl) 0; font-size: var(--step--1); color: var(--ink-2); }
.site-foot .wrap { display: grid; gap: var(--space-m); }
@media (min-width: 48em) { .site-foot .wrap { grid-template-columns: 1fr auto; align-items: start; } .site-foot .legal { text-align: right; } }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-s) var(--space-m); align-items: center; max-width: none; }
.site-foot li + li { margin: 0; }
.site-foot a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: var(--target); }
.site-foot a img { height: 0.8rem; width: auto; }
.site-foot .legal p { max-width: none; }
.site-foot .legal p + p { margin-top: var(--space-3xs); }

/* ---- sections */
section { padding: var(--space-3xl) 0; }
section + section { border-top: var(--rule) solid var(--line); }
section.tint { background: var(--bg-tint); }
section.short { padding: var(--space-2xl) 0; }
section > .wrap > h2, .short h2 { margin-bottom: var(--space-m); }

/* ---- the device frame: ONE component. Apple's bezels drop in by replacing the padding and background here;
        every screen on the site goes through it. --device-w sets the width per context. */
.device { --device-w: 17rem; width: var(--device-w); max-width: 100%; padding: var(--space-2xs); background: var(--frame); border-radius: var(--radius-phone); box-shadow: var(--shadow-2); }
.device img { width: 100%; border-radius: var(--radius-screen); background: var(--bg-panel); }

/* ---- 1 hero */
.hero { padding: var(--space-2xl) 0 var(--space-3xl); }
.hero .wrap { display: grid; gap: var(--space-xl); align-items: center; }
@media (min-width: 64em) { .hero { padding: var(--space-4xl) 0; } .hero .wrap { grid-template-columns: 1fr 1.25fr; gap: var(--space-2xl); } }
.hero .lede { margin-top: var(--space-m); }
.cta { margin-top: var(--space-l); display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-s); align-items: center; }
.cta small { color: var(--ink-3); }
.excerpt { margin-top: var(--space-xl); padding-left: var(--space-s); border-left: var(--rule-accent) solid var(--line-strong); display: grid; gap: var(--space-2xs); }
.excerpt .read { max-width: 48ch; }
.excerpt .label { max-width: 48ch; }
/* the stage: a figure plate (C's figure treatment on B's tint) holding the real screen and the real exchange */
.stage { margin: 0; background: var(--bg-tint); border: var(--rule) solid var(--line); border-radius: var(--radius-l); padding: var(--space-l) var(--space-m); display: grid; gap: var(--space-m); justify-items: center; }
.stage > .label { justify-self: start; max-width: none; }
.stage .device { --device-w: 15rem; }
.stage .cap { justify-self: start; max-width: none; }
@media (min-width: 64em) { .stage .device { --device-w: 13rem; } }
@media (min-width: 72em) {
  .stage { grid-template-columns: auto 1fr; align-items: center; gap: var(--space-m) var(--space-l); padding: var(--space-l); }
  .stage .device { --device-w: 15rem; }
  .stage > .label, .stage .cap { grid-column: 1 / -1; }
}
@media (max-width: 71.99em) { .stage .exchange { order: -1; } .stage > .label { order: -2; } }
.exchange { width: 100%; max-width: 30rem; display: grid; gap: var(--space-xs); }
.turn { display: grid; gap: var(--space-3xs); }
.turn .label { font-size: var(--step--2); }
.turn .read { font-size: var(--step--1); padding: var(--space-xs) var(--space-s); max-width: 36ch; }
.turn.me { justify-items: end; }
.turn.me .read { background: var(--accent); color: var(--on-accent); font-family: var(--font-sans); border-radius: var(--radius-l) var(--radius-l) var(--radius-xs) var(--radius-l); max-width: 30ch; }
.turn.them .read { background: var(--bg); border: var(--rule) solid var(--line); border-radius: var(--radius-l) var(--radius-l) var(--radius-l) var(--radius-xs); }
.turn.thought .read { color: var(--inner-ink); background: var(--inner-soft); border-radius: var(--radius-l); }
.turn.thought .label { color: var(--inner); }

/* ---- 2 how it works: alternating rows, never three equal cards */
.step { display: grid; gap: var(--space-m); align-items: center; padding: var(--space-xl) 0; }
.step + .step { border-top: var(--rule) solid var(--line); }
.step:last-child { padding-bottom: 0; }
@media (min-width: 48em) { .step { grid-template-columns: 1fr 1fr; gap: var(--space-2xl); } .step:nth-child(even) .step-text { order: 2; } }
.step h3 { font-size: var(--step-2); margin-bottom: var(--space-xs); }
.step .label { display: block; margin-bottom: var(--space-2xs); }
.step p { max-width: 50ch; }
.step figure { margin: 0; display: grid; gap: var(--space-s); justify-items: center; }
.step .device { --device-w: 15rem; }
.step figcaption { max-width: 34ch; }

/* ---- 3 culture */
.culture .wrap { display: grid; gap: var(--space-l); align-items: center; }
@media (min-width: 48em) { .culture .wrap { grid-template-columns: 1.3fr 1fr; gap: var(--space-2xl); } .culture figure { justify-self: center; } }
.culture figure { margin: 0; display: grid; gap: var(--space-s); justify-items: center; }
.culture .device { --device-w: 14rem; }
.quote { margin: var(--space-m) 0 0; padding-left: var(--space-s); border-left: var(--rule-accent) solid var(--line-strong); }
.quote .read { font-size: var(--step-1); max-width: 40ch; }
.quote + .cap { margin-top: var(--space-s); }

/* ---- 4 what to know, 5 privacy */
.short p, .short li { max-width: 56ch; }
.plain { list-style: none; padding: 0; }
.plain li { padding: var(--space-xs) 0; border-top: var(--rule) solid var(--line); margin: 0; }
.plain li:last-child { border-bottom: var(--rule) solid var(--line); }
.after { margin-top: var(--space-m); }

/* ---- 6 questions */
.qa { display: grid; gap: var(--space-m); }
@media (min-width: 48em) { .qa { grid-template-columns: 1fr 1fr; gap: var(--space-l) var(--space-2xl); } }
.qa h3 { margin-bottom: var(--space-2xs); }
.qa p { max-width: 48ch; color: var(--ink-2); }

/* ---- 7 close */
.close { text-align: center; }
.close .wrap { display: grid; justify-items: center; gap: var(--space-s); }
.close h2 { font-size: var(--step-4); margin: 0; }
.close p { color: var(--ink-2); }
.close small { color: var(--ink-3); }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-xs); margin-top: var(--space-xs); }
/* store badges: PLACEHOLDERS at the official proportions (App Store 120x40, Google Play 646x250 at 44 px tall).
   Step 11 replaces each with the official, unmodified artwork once the listings exist. */
.badge { display: inline-grid; align-content: center; justify-items: start; min-height: var(--target-primary); padding: 0 var(--space-xs); border-radius: var(--radius-xs); background: var(--badge-bg); color: var(--badge-ink); text-align: left; line-height: 1.1; font-size: var(--step--2); outline: var(--rule) dashed var(--badge-line); outline-offset: 2px; }
.badge { min-height: 3.25rem; }
.badge.app-store { width: 9.75rem; }
.badge.google-play { width: 8.4rem; }
.badge strong { display: block; font-size: var(--step--1); font-weight: 600; letter-spacing: -0.01em; }
.badges + small { margin-top: var(--space-xs); }

/* ---- text pages (privacy, terms, support, case) */
.page-head { padding: var(--space-2xl) 0 var(--space-m); }
.page-head h1 { font-size: var(--step-4); max-width: 20ch; }
.page-head .lede { margin-top: var(--space-s); }
.draft-banner { display: inline-flex; align-items: center; gap: var(--space-2xs); font-size: var(--step--1); color: var(--ink-2); background: var(--bg-panel); border: var(--rule) solid var(--line-strong); border-radius: var(--radius-pill); padding: var(--space-3xs) var(--space-xs); margin-bottom: var(--space-s); }
.updated { font-size: var(--step--1); color: var(--ink-3); margin-top: var(--space-s); }
.toc { font-size: var(--step--1); display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-s); list-style: none; padding: var(--space-s) 0 0; margin: var(--space-m) 0 0; max-width: none; border-top: var(--rule) solid var(--line); }
.toc li { margin: 0; }
.toc a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: var(--target); }
.text { padding: var(--space-m) 0 var(--space-3xl); }
.text h2 { font-size: var(--step-2); margin: var(--space-xl) 0 var(--space-xs); scroll-margin-top: var(--space-xl); }
.text h2:first-child, .text h2.first { margin-top: 0; }
.text h3 { font-size: var(--step-1); margin: var(--space-l) 0 var(--space-2xs); scroll-margin-top: var(--space-xl); }
.text ul { margin-top: var(--space-xs); }
.text p + ul, .text p + .table-wrap { margin-top: var(--space-s); }
.contact { margin-top: var(--space-xl); padding: var(--space-m); background: var(--bg-tint); border: var(--rule) solid var(--line); border-radius: var(--radius-l); max-width: var(--measure); }
.contact p { max-width: none; }
.contact h2 { margin-top: 0; }
.table-wrap { overflow-x: auto; margin-top: var(--space-s); border: var(--rule) solid var(--line); border-radius: var(--radius-s); }
table { border-collapse: collapse; width: 100%; font-size: var(--step--1); line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: var(--space-xs); border-top: var(--rule) solid var(--line); }
thead th { border-top: 0; background: var(--bg-tint); font-weight: 500; color: var(--ink-2); font-size: var(--step--2); letter-spacing: var(--tracking-label); text-transform: uppercase; }
tbody th { font-weight: 600; white-space: nowrap; }
td { color: var(--ink-2); min-width: 14rem; }
.case .wrap-text { display: grid; gap: var(--space-l); align-items: start; }
@media (min-width: 48em) { .case .wrap-text { grid-template-columns: 1fr auto; max-width: var(--wrap); gap: var(--space-2xl); } }
.case .device { --device-w: 13rem; }
.case figure { margin: 0; display: grid; gap: var(--space-s); justify-items: center; }
.case .badges { justify-content: start; margin: var(--space-m) 0 var(--space-s); }
.case h2 { font-size: var(--step-2); margin: var(--space-l) 0 var(--space-xs); }
.notfound { padding: var(--space-4xl) 0; min-height: 50vh; }
.notfound h1 { font-size: var(--step-4); }
.notfound p { margin-top: var(--space-m); font-size: var(--step-1); }

/* ---- case guides (R5) and /about/ (R7): the text-page pattern (.page-head + .text) with an answer-first summary, the paste-in prompt and link lists. Tokens only. */
.page-head .label { display: block; margin-bottom: var(--space-xs); max-width: none; }
.page-head .label a { color: inherit; }
.guide .page-head h1 { font-size: var(--step-4); max-width: 22ch; }
.answer { margin-top: var(--space-m); padding-left: var(--space-s); border-left: var(--rule-accent) solid var(--accent); color: var(--ink); max-width: 52ch; }
.advice { margin-top: var(--space-s); color: var(--ink-2); }
.advice small { display: block; max-width: var(--measure); }
.text ol { margin-top: var(--space-xs); }
.text .quote { margin-top: var(--space-xs); }
.text .quote + p { margin-top: var(--space-s); }
pre.prompt { margin: var(--space-xs) 0 0; padding: var(--space-s); max-width: var(--measure); white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-serif); font-size: var(--step--1); line-height: var(--leading-read); color: var(--ink); background: var(--bg-panel); border: var(--rule) dashed var(--line-strong); border-radius: var(--radius-s); user-select: all; }
.text .after { margin-top: var(--space-s); }
.guide-list { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.guide-list li { display: grid; gap: var(--space-3xs); margin: 0; padding: var(--space-xs) 0; border-top: var(--rule) solid var(--line); }
.guide-list li:last-child { border-bottom: var(--rule) solid var(--line); }
.guide-list a { font-size: var(--step-1); font-weight: 500; }
.guide-list span { font-size: var(--step--1); color: var(--ink-2); }
.sources li, .related li { color: var(--ink-2); font-size: var(--step--1); }
.related a { display: inline-flex; align-items: center; min-height: var(--target); }

/* ---- motion and print */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } html { scroll-behavior: auto; } }
@media print {
  .skip, .nav, .badges, .device, .site-head .btn { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
  section { padding: var(--space-l) 0; }
}
