/* Beyond Fluency website. "Moss & Linen": the same tokens as the app
   (apps/mobile/lib/design/tokens.dart). No external requests, no cookies.
   Motion only runs with prefers-reduced-motion: no-preference, and nothing is
   hidden unless the browser can animate it back in. */

@font-face {
  font-family: "Young Serif";
  src: url("fonts/YoungSerif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/AtkinsonHyperlegibleNext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/Newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f2efe4;
  --surface: #fbfaf4;
  --raised: #e8e4d5;
  --stroke: rgb(32 38 26 / .09);
  --stroke-strong: rgb(32 38 26 / .2);
  --ink: #242a1e;
  --muted: #4c5443;
  --subtle: #575e4c;
  --primary: #556c41;
  --on-primary: #fff;
  --link: #4a6037;
  --moss: #4e6b37;
  --moss-fill: #dce5c6;
  --clay: #8c4d2c;
  --clay-fill: #f2d9c8;
  --heather: #7a4769;
  --heather-fill: #ebd8e3;
  --honey: #7a5a12;
  --honey-fill: #f1e2b8;
  --ink-fixed: #20261a;
  --paper-fixed: #f7f4ec;
  --lichen: #d3de9e;
  --hero-1: #4f6a3b;
  --hero-2: #3d5430;
  --hero-3: #283a20;
  --glass: rgb(242 239 228 / .8);
  --shadow: 0 1px 2px rgb(32 38 26 / .06), 0 18px 40px -18px rgb(32 38 26 / .28);
  --brand-1: var(--primary);
  --brand-2: #ddb3cf;
  --brand-3: #e2c98f;

  /* Feeling families: fill and outline, matching lib/design/feelings.dart. */
  --settled-fill: #dce5c6; --settled-line: #4e6b37;
  --close-fill: #f1e2b8;   --close-line: #7a5a12;
  --open-fill: #e9dcf0;    --open-line: #6a4682;
  --charged-fill: #f2d9c8; --charged-line: #8c4d2c;
  --exposed-fill: #f7dde3; --exposed-line: #94404f;
  --heavy-fill: #dde3ea;   --heavy-line: #46566b;
  --flat-fill: #e3e0d6;    --flat-line: #5c584d;
  --own-fill: #ffffff;     --own-line: #20261a;

  --display: "Young Serif", "Iowan Old Style", Georgia, serif;
  --text: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --radius: 28px;
  --radius-sm: 18px;
  --gutter: clamp(16px, 4vw, 32px);
  /* A soft spring: about 3% overshoot, settling in 500 ms. */
  --spring: linear(0, .009, .035 2.1%, .141, .281 6.7%, .723 12.9%, .938 16.7%, 1.017, 1.077 22.8%, 1.093, 1.096 27.5%, 1.083 30.6%, 1.022 40.2%, 1.003 45.9%, .995 53.4%, 1 100%);
  --ease: cubic-bezier(.22, .8, .24, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151912;
    --surface: #1d2219;
    --raised: #262c21;
    --stroke: rgb(255 255 255 / .09);
    --stroke-strong: rgb(255 255 255 / .2);
    --ink: #f2efe4;
    --muted: #bdc1ae;
    --subtle: #a4a994;
    --primary: #c2d18e;
    --on-primary: #151912;
    --link: #c9d69a;
    --moss: #bccb92;
    --moss-fill: #bccb92;
    --clay: #e7b394;
    --clay-fill: #e7b394;
    --heather: #ddb3cf;
    --heather-fill: #ddb3cf;
    --honey: #e2c98f;
    --honey-fill: #e2c98f;
    --glass: rgb(21 25 18 / .78);
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 24px 50px -20px rgb(0 0 0 / .7);
    --brand-1: var(--paper-fixed);
    --dot: #556c41;

    --settled-fill: #b7c98e; --settled-line: var(--ink);
    --close-fill: #e2c98f;   --close-line: var(--ink);
    --open-fill: #cdb0da;    --open-line: var(--ink);
    --charged-fill: #e3a584; --charged-line: var(--ink);
    --exposed-fill: #eba6b6; --exposed-line: var(--ink);
    --heavy-fill: #a9b8cc;   --heavy-line: var(--ink);
    --flat-fill: #a7a396;    --flat-line: var(--ink);
    --own-fill: #f2efe4;     --own-line: var(--ink);
  }
}

@media (prefers-contrast: more) {
  :root { --muted: var(--ink); --subtle: var(--ink); --stroke: var(--stroke-strong); }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  text-wrap: balance;
}
h3 { font-family: var(--text); font-weight: 700; font-size: 1.2rem; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; }
.wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px;
}
.skip:focus { top: 12px; }
.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
mark.todo { background: var(--honey-fill); color: var(--ink-fixed); padding: 0 .3em; border-radius: 6px; }
section { padding-block: clamp(64px, 10vw, 128px); }
.section-head { max-width: 720px; display: grid; gap: 16px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head .eyebrow { margin-bottom: 0; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.3) blur(16px);
  backdrop-filter: saturate(1.3) blur(16px);
  border-bottom: 1px solid var(--stroke);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-size: 1.3rem; letter-spacing: -.01em; line-height: 1;
}
/* Only the header's mark carries across pages; the footer has one too. */
.site-header .brand { view-transition-name: brand; }
.brandmark { width: 36px; height: 36px; flex: none; overflow: visible; }
.brandmark .p0 { fill: var(--brand-1); }
.brandmark .p1 { fill: var(--brand-2); }
.brandmark .p2 { fill: var(--brand-3); }
.brand:hover .brandmark .p2 { transform: rotate(8deg); }
.brandmark path { transform-box: fill-box; transform-origin: center; }
.site-nav { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem;
  padding: 10px 14px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center;
}
.site-nav a:hover { background: var(--raised); }
.site-nav a[aria-current="page"] { background: var(--moss-fill); color: var(--ink-fixed); }
@media (max-width: 760px) {
  .site-nav .wide { display: none; }
  .site-nav a { padding: 10px; }
  .brand .word { display: none; }
}

/* Buttons and badges */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 24px; border-radius: 999px;
  font: 700 1rem/1.2 var(--text); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
}
.button .icon { width: 20px; height: 20px; }
.button.primary { background: var(--primary); color: var(--on-primary); }
.button.ghost { border-color: var(--stroke-strong); color: var(--ink); background: transparent; }
.button.ghost:hover { background: var(--raised); }
.button.light { background: var(--paper-fixed); color: var(--ink-fixed); }
.button:disabled { background: var(--raised); color: var(--subtle); cursor: default; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px;
  padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 700;
}
.badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--lichen)); }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tags li {
  border: 1.5px solid var(--stroke-strong); border-radius: 999px;
  padding: 6px 14px; font-size: .9rem; font-weight: 600; color: var(--muted);
}

/* Phones */
.phone {
  position: relative; border-radius: 42px; padding: 9px;
  background: #1c2017; box-shadow: var(--shadow);
  width: min(300px, 78vw);
}
.phone img, .phone picture { border-radius: 33px; overflow: hidden; }
.phone::before {
  content: ""; position: absolute; top: 18px; left: 50%; translate: -50% 0;
  width: 30%; height: 22px; border-radius: 99px; background: #0b0d09; z-index: 1;
}

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 104px); position: relative; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(32px, 5vw, 64px); }
.hero-copy { container-type: inline-size; }
.hero h1 { font-family: var(--display); line-height: 1; margin-bottom: 26px; }
.lettering {
  display: block; font-size: min(14.6cqi, 6.8rem); letter-spacing: -.035em; line-height: .98;
  white-space: nowrap;
}
.sss { color: var(--moss); display: inline-flex; }
.sss span { display: inline-block; }
.hero-line {
  display: block; font-size: min(7.6cqi, 3.2rem); letter-spacing: -.02em; line-height: 1.1;
  margin-top: .12em;
}
.hero .lead { max-width: 34em; margin-bottom: 30px; }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 560px; }
.field { position: absolute; inset: -6% -12% -4% -14%; width: 126%; height: 110%; overflow: visible; }
.field g path { stroke-width: 2.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.field .outline path { fill: none; stroke: var(--moss); opacity: .55; }
.field .solid path { fill: var(--moss-fill); stroke: var(--moss); opacity: .9; }
@media (prefers-color-scheme: dark) {
  .field .solid path { fill: rgb(188 203 146 / .16); }
}
.hero .phone.tilt { rotate: 3deg; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 0; padding-block: 24px; }
  .hero .phone.tilt { width: min(270px, 72vw); }
}

/* Vows: what it won't do */
.vows-section { padding-block: clamp(48px, 7vw, 96px); border-block: 1px solid var(--stroke); }
.vows { list-style: none; padding: 0; display: grid; gap: 0; }
.vows li {
  font-family: var(--display); font-size: clamp(1.45rem, 3.4vw, 2.6rem); line-height: 1.18;
  letter-spacing: -.01em; padding-block: clamp(18px, 2.4vw, 28px);
  border-top: 1px solid var(--stroke); color: var(--muted); text-wrap: balance;
}
.vows li:first-child { border-top: 0; }
.vows strong { font-weight: 400; color: var(--moss); }

/* Try it */
.try { background: var(--surface); border-block: 1px solid var(--stroke); }
.try-card {
  display: grid; grid-template-columns: minmax(260px, .8fr) 1.2fr; gap: clamp(24px, 4vw, 48px);
  align-items: start;
  background: var(--bg); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: clamp(20px, 3.4vw, 40px);
}
.try-stage { display: grid; justify-items: center; gap: 16px; text-align: center; position: sticky; top: 96px; }
html:not(.js) .try-stage { display: none; }
html:not(.js) .try-card { grid-template-columns: 1fr; }
.mark.stage { width: min(220px, 56vw); height: auto; aspect-ratio: 1; }
.try-label { font-family: var(--display); font-size: 1.5rem; line-height: 1.2; min-height: 1.2em; }
.try-status { color: var(--moss); font-weight: 700; min-height: 1.6em; }
.shelf { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.shelf li svg { width: 44px; height: 44px; }
.try-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.feel {
  display: grid; justify-items: center; gap: 4px; padding: 12px 6px 10px;
  background: transparent; border: 1.5px solid transparent; border-radius: 20px;
  color: var(--ink); font: 600 .95rem/1.2 var(--text); cursor: pointer; min-height: 44px;
}
.feel:disabled { cursor: default; }
.feel:not(:disabled):hover { background: var(--raised); }
.feel[aria-pressed="true"], .feel[aria-pressed="true"]:hover { background: var(--surface); border-color: var(--primary); }
.feel .mark { width: 56px; height: 56px; }
.try-note { text-align: center; color: var(--muted); margin-top: 20px; font-size: .95rem; }
@media (max-width: 820px) {
  .try-card { grid-template-columns: 1fr; }
  .try-stage { position: static; }
  .try-chips { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

/* Feeling marks: a single feeling is printed with its outline offset;
   unchosen marks are a quiet tint and outline. */
.mark { overflow: visible; }
.mark .fill { fill: var(--fill); }
.mark .line { fill: none; stroke: var(--line); stroke-width: 2.2; stroke-linejoin: round; }
.mark .cut { fill: none; stroke: var(--bg); stroke-width: 7; stroke-linejoin: round; }
.mark.mixed .line { stroke-width: 1.8; }
.family .mark .cut { stroke: var(--surface); }
.f-settled { --fill: var(--settled-fill); --line: var(--settled-line); }
.f-close { --fill: var(--close-fill); --line: var(--close-line); }
.f-open { --fill: var(--open-fill); --line: var(--open-line); }
.f-charged { --fill: var(--charged-fill); --line: var(--charged-line); }
.f-exposed { --fill: var(--exposed-fill); --line: var(--exposed-line); }
.f-heavy { --fill: var(--heavy-fill); --line: var(--heavy-line); }
.f-flat { --fill: var(--flat-fill); --line: var(--flat-line); }
.f-own { --fill: var(--own-fill); --line: var(--own-line); }
.mark.unsure circle { fill: color-mix(in srgb, var(--ink) 8%, transparent); stroke: var(--ink); stroke-opacity: .7; stroke-width: 2.4; stroke-dasharray: 6.8 5.2; }
.mark.empty circle { fill: none; stroke: var(--stroke-strong); stroke-width: 2.4; stroke-dasharray: 6.8 5.2; }
@media (prefers-color-scheme: dark) {
  .mark.mixed .line { stroke: none; }
}
/* In the chips, an unchosen feeling sits back; a chosen one is printed. */
.feel .mark .fill { transform: translate(-2.66px, -2.28px); fill-opacity: .5; }
.feel[aria-pressed="true"] .mark .fill { transform: none; fill-opacity: 1; }
.feel .mark .line { transform: translate(2.66px, 2.28px); }
.feel[aria-pressed="true"] .mark .line { transform: none; }
@media (prefers-color-scheme: dark) {
  .feel .mark .fill { fill-opacity: .14; }
  .feel .mark .line { stroke: var(--fill); }
  .feel[aria-pressed="true"] .mark .line { stroke: var(--ink); }
}

/* How it works: a story. Each step shows its own phone, unless the browser
   can tie a single sticky phone to the scroll (see Motion below). */
.story-steps { display: grid; gap: clamp(56px, 8vw, 96px); }
.step { display: grid; grid-template-columns: 1fr auto; gap: clamp(28px, 5vw, 72px); align-items: center; }
.step-copy { max-width: 520px; display: grid; gap: 12px; }
.step-copy h2 { margin-bottom: 4px; }
.num { font-family: var(--display); font-size: 1.1rem; color: var(--moss); }
.story-phone { display: none; }
@media (max-width: 760px) {
  .step { grid-template-columns: 1fr; justify-items: center; }
  .step-copy { justify-self: start; }
}

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 28px; display: grid; gap: 12px; align-content: start;
}
.card p { color: var(--muted); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.icon-chip { width: 64px; height: 64px; display: grid; place-items: center; position: relative; color: var(--ink-fixed); }
.icon-chip::before {
  content: ""; position: absolute; inset: 0; background: var(--chip, var(--moss-fill));
  /* The "own words" note shape, as a soft frame for feature icons. */
  border-radius: 46% 54% 44% 56% / 52% 46% 54% 48%;
  rotate: -6deg;
}
.icon-chip.moss { --chip: var(--moss-fill); }
.icon-chip.heather { --chip: var(--heather-fill); }
.icon-chip.honey { --chip: var(--honey-fill); }
.icon-chip .icon { width: 30px; height: 30px; position: relative; }

/* Privacy band */
.band {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(150deg, var(--hero-1), var(--hero-2) 55%, var(--hero-3));
  color: var(--paper-fixed);
  padding: clamp(28px, 5vw, 64px);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 56px); align-items: center;
}
.band .eyebrow { color: #dde6ad; } /* lichen, lifted to 4.6:1 on the lightest moss */
.band h2 { margin-bottom: 18px; }
.band p { color: #e4e9d6; margin-bottom: 26px; }
.ticks { list-style: none; padding: 0; display: grid; gap: 18px; }
.ticks li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; color: #e4e9d6; }
.ticks strong { color: var(--paper-fixed); }
.ticks .icon { width: 26px; height: 26px; color: var(--lichen); margin-top: 2px; }
@media (max-width: 900px) { .band { grid-template-columns: 1fr; } }

/* Research and about */
.statement-wrap { max-width: 900px; text-align: center; display: grid; justify-items: center; gap: 16px; }
.statement-wrap .brandmark { width: 64px; height: 64px; margin-bottom: 8px; }
.statement { font-size: clamp(1.9rem, 4.4vw, 3.3rem); line-height: 1.12; }
.statement em { font-style: normal; color: var(--moss); }
.about-why { max-width: 720px; margin: clamp(40px, 6vw, 64px) auto 0; display: grid; gap: 14px; }
.about-why p { color: var(--muted); }
.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: clamp(36px, 5vw, 56px); }
.person {
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 28px; display: grid; gap: 8px; align-content: start;
}
.person .icon-chip { margin-bottom: 8px; }
.person .role { color: var(--moss); font-weight: 600; font-size: .92rem; letter-spacing: .02em; }
.person p:last-child { color: var(--muted); }
.paper {
  margin-top: 16px; background: var(--raised); border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px); display: grid; gap: 12px;
}
.paper .eyebrow { margin-bottom: 0; }
.paper cite { font-style: normal; }
.paper p { max-width: 72ch; }
.supporter {
  margin-top: 16px; border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px); display: grid; gap: 12px; justify-items: start;
}
.supporter .eyebrow { margin-bottom: 0; }
.supporter p { max-width: 72ch; color: var(--muted); }
/* The logo keeps its own colours on a light chip, in both themes. */
.supporter-logo {
  display: inline-block; background: #f7f4ec; border-radius: var(--radius-sm);
  padding: 14px 18px; line-height: 0;
}
.supporter-logo img { height: 32px; width: auto; }
@media (max-width: 760px) { .people { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--stroke); padding-block: 48px 56px; background: var(--surface); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.footer-top .brand .word { display: inline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { color: var(--ink); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.footer-small { display: grid; gap: 10px; max-width: 760px; color: var(--muted); font-size: .92rem; }

/* Document pages: privacy, support, brand */
.doc-hero { padding-block: clamp(48px, 7vw, 88px) 24px; }
.doc-hero h1 { font-family: var(--display); font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.05; letter-spacing: -.02em; margin-bottom: 18px; }
.doc-hero .lead { max-width: 40em; }
.doc { padding-block: 24px 96px; }
.doc .wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.toc { position: sticky; top: 92px; display: grid; gap: 2px; font-size: .95rem; }
.toc a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 12px; border-left: 2px solid var(--stroke); }
.toc a:hover { color: var(--ink); background: var(--raised); }
@media (max-width: 860px) {
  .doc .wrap { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .toc a { border: 1px solid var(--stroke); border-radius: 999px; }
}
.prose { max-width: 720px; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-top: 1.9em; scroll-margin-top: 96px; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose code { font-size: .92em; background: var(--raised); padding: .1em .4em; border-radius: 6px; }
.summary {
  background: var(--moss-fill); color: var(--ink-fixed); border-radius: var(--radius-sm);
  padding: 22px 24px;
}
.summary a { color: var(--ink-fixed); }
.help {
  background: var(--clay-fill); color: var(--ink-fixed); border-radius: var(--radius-sm); padding: 22px 24px;
}
.help a { color: var(--ink-fixed); }
.faq-list { display: grid; gap: 10px; margin-top: 1.2em; }
.faq { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius-sm); }
.faq summary {
  cursor: pointer; padding: 18px 52px 18px 22px; font-weight: 700; list-style: none; position: relative;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  translate: 0 -70%; rotate: 45deg;
}
.faq[open] summary::after { rotate: 225deg; translate: 0 -30%; }
.faq .answer { padding: 0 22px 20px; color: var(--muted); }
.faq .answer > * + * { margin-top: .8em; }

/* Brand page */
.marks-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mark-tile {
  border-radius: var(--radius-sm); padding: 24px; display: grid; justify-items: center; gap: 14px;
  border: 1px solid var(--stroke); text-align: center;
}
.mark-tile img { width: 120px; border-radius: 27px; }
.mark-tile.paper { background: #f2efe4; color: #242a1e; --brand-1: #556c41; }
.mark-tile.night { background: #151912; color: #f2efe4; --brand-1: #f7f4ec; }
.mark-tile .small { color: inherit; opacity: .8; }
.brand-lg { font-size: 1.7rem; color: inherit; }
.brand-lg .brandmark { width: 48px; height: 48px; }
@media (max-width: 700px) { .marks-row { grid-template-columns: 1fr; } }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.swatch { border: 1px solid var(--stroke); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.swatch .chip { height: 72px; }
.swatch .meta { padding: 12px 14px; display: grid; gap: 2px; font-size: .92rem; }
.swatch code { background: none; padding: 0; }
.sw-moss { background: #556c41; }
.sw-lichen { background: #c2d18e; }
.sw-hero { background: linear-gradient(150deg, #4f6a3b, #283a20); }
.sw-linen { background: #f2efe4; }
.sw-forest { background: #151912; }
.sw-ink { background: #242a1e; }
.sw-heather { background: #ddb3cf; }
.sw-honey { background: #e2c98f; }
.sw-clay { background: #e3a584; }
.type-specimens { display: grid; gap: 12px; }
.specimen {
  display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center;
  border: 1px solid var(--stroke); border-radius: var(--radius-sm); padding: 20px 22px; background: var(--surface);
}
.specimen .sample { font-size: 1.9rem; line-height: 1.2; }
.t-young { font-family: var(--display); }
.t-atkinson { font-family: var(--text); font-weight: 600; }
.t-newsreader { font-family: var(--serif); }
@media (max-width: 700px) { .specimen { grid-template-columns: 1fr; } }
.families { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; }
.family {
  display: grid; justify-items: center; text-align: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius-sm); padding: 18px 10px;
}
.family .mark { width: 72px; height: 72px; margin-bottom: 6px; }
.family span { color: var(--muted); font-size: .9rem; }
.do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.do-dont .card { padding: 22px; }
.do-dont h3 { display: flex; align-items: center; gap: 10px; margin: 0; }
.do-dont .icon { width: 22px; height: 22px; color: var(--moss); }
.do-dont ul { padding-left: 1.2em; color: var(--muted); }
@media (max-width: 700px) { .do-dont { grid-template-columns: 1fr; } }
.boiler {
  white-space: pre-wrap; font-family: var(--text); font-size: 1rem; line-height: 1.6;
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius-sm); padding: 18px 20px;
}
.downloads { display: flex; flex-wrap: wrap; gap: 10px; }

/* Motion. Everything below is extra: the page reads the same without it. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }

  .button, .feel, .card, .site-nav a { transition: background-color .2s, border-color .2s, transform .5s var(--spring); }
  .button:hover, .card:hover { transform: translateY(-2px); }
  .button:active, .feel:active { transform: scale(.98); transition-duration: .1s; }
  .brandmark path { transition: transform .6s var(--spring); }

  /* The three opening letters settle in once, a beat apart. Never a loop,
     never a shake. */
  .sss span { animation: settle .9s var(--ease) both; }
  .sss span:nth-child(2) { animation-delay: .09s; }
  .sss span:nth-child(3) { animation-delay: .18s; }
  @keyframes settle { from { opacity: 0; translate: 0 -.28em; } }

  .hero-copy > :not(h1) { animation: rise .8s var(--ease) both; animation-delay: .25s; }
  .hero-line { animation: rise .8s var(--ease) both; animation-delay: .12s; }
  @keyframes rise { from { opacity: 0; translate: 0 14px; } }

  /* Feeling outlines are set down one after another, like pebbles. */
  .field g path { animation: set-down 1.1s var(--ease) both; }
  .field g:nth-child(2) path { animation-delay: .08s; }
  .field g:nth-child(3) path { animation-delay: .16s; }
  .field g:nth-child(4) path { animation-delay: .24s; }
  .field g:nth-child(5) path { animation-delay: .32s; }
  .field g:nth-child(6) path { animation-delay: .4s; }
  .field g:nth-child(7) path { animation-delay: .48s; }
  .field g:nth-child(8) path { animation-delay: .56s; }
  @keyframes set-down { from { opacity: 0; translate: 0 -18px; } }
  .hero .phone.tilt { animation: phone-in 1.1s var(--ease) both; animation-delay: .2s; }
  @keyframes phone-in { from { opacity: 0; translate: 0 28px; rotate: 6deg; } }

  /* Try it: the chosen mark settles into place. */
  .feel .mark path { transition: transform .45s var(--spring), fill-opacity .3s; }
  .mark.stage.settle { animation: stamp .5s var(--spring); }
  @keyframes stamp { from { scale: .94; } }
  .shelf li { animation: rise .5s var(--ease) both; }

  /* Scroll-linked reveals and drift, where the browser supports them. */
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 24%;
    }
    .vows li.reveal { animation-range: entry 10% cover 30%; }
    .hero .field {
      animation: drift linear both;
      animation-timeline: scroll(root);
      animation-range: 0 90vh;
    }
    @keyframes drift { to { translate: 0 -40px; } }
  }

  /* One phone stays in place while its screen changes with each step. */
  @supports (timeline-scope: --a) and (animation-timeline: view()) {
    @media (min-width: 980px) {
      .story { display: grid; grid-template-columns: 1fr auto; gap: 72px; timeline-scope: --step1, --step2, --step3; }
      .story-steps { gap: 0; }
      .story .step { grid-template-columns: 1fr; min-height: 78vh; align-content: center; }
      .story .step-phone { display: none; }
      .story .s1 { view-timeline-name: --step1; }
      .story .s2 { view-timeline-name: --step2; }
      .story .s3 { view-timeline-name: --step3; }
      .story-phone { display: block; position: sticky; top: calc(50vh - 300px); height: fit-content; }
      .story-phone .phone { display: grid; }
      .story-phone .scr { grid-area: 1 / 1; }
      /* Each screen fades in over the last as its step reaches the middle. */
      .scr2 { animation: scr-in linear both; animation-timeline: --step2; animation-range: cover 28% cover 42%; }
      .scr3 { animation: scr-in linear both; animation-timeline: --step3; animation-range: cover 28% cover 42%; }
      @keyframes scr-in { from { opacity: 0; scale: .98; } }
    }
  }
}

@media print {
  .site-header, .site-footer, .field, .phone, .try { display: none; }
  body { background: #fff; color: #000; }
}
