/* EverAfter marketing site v2, built from the round 3 design (docs/tasks/marketing-site-v2/design.md).
   Tokens: the app's own palette (apps/mobile/lib/shared/theme.dart, EverAfterColors) and type
   (Inter 400/500/600, Fraunces 600 for the wordmark only, subset to its letters). Sizes in rem and
   breakpoints in em, so the page follows the visitor's text size. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  /* Subset to the letters of "EverAfter" (5 KB instead of 67 KB). */
  font-family: "Fraunces Wordmark";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/fraunces-wordmark.woff2") format("woff2");
}

:root {
  /* Colour: EverAfterColors, same names */
  --bg: #f7f5f2;
  --surface: #ffffff;
  --ink: #1f1b18;
  --ink2: #6b625c;
  --ink3: #857c75;
  --hair: #e6e1db;
  --fill: #efebe6;
  --accent: #8b4a3a;
  --accent-press: #6b372a;
  --on-accent: #ffffff;
  --tint: #f3e4dc;
  --tint-edge: #cfb2a2;
  --tint-press: #ead3c6;
  --trust: #4a6155;
  --trust-tint: #e4eae1;
  --lock: #d8d0c8;
  --bubble-me: #eadfd6;
  --bar: #f9f7f4;
  --danger: #b42318;
  --danger-tint: #fbece9;
  --snack-action: #f0c4b3; /* snackAction: the app's action colour on ink */
  /* Page only (round 1, back in round 3): the dark first screen's raised step and quiet text. */
  --ink-raised: #2e2824;   /* bg text on it 13.35:1 */
  --on-ink-quiet: #c9beb6; /* 7.97:1 on ink-raised, 10.2:1 on ink */

  /* Focus ring: chosen by the surface it sits on (set again below for dark and coloured surfaces). */
  --focus: var(--accent);

  /* Type: five page sizes. Fragments inside [data-ui] keep the app's own sizes. */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mark: "Fraunces Wordmark", Georgia, serif;
  --fs-display: clamp(min(2.25rem, 15vw), 1rem + 7vw, min(6rem, 15vw)); /* 15vw: "Connection" fits one line even with 200 % text */
  --fs-h2: clamp(1.875rem, 1.2rem + 2.4vw, 3rem);
  --fs-lead: clamp(1.3125rem, 1rem + 1.1vw, 1.75rem);
  --fs-body: clamp(1.125rem, 1.06rem + 0.2vw, 1.1875rem);
  --fs-small: 1.0625rem;

  /* Space */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1344px;
  --section: clamp(96px, 6rem + 6vw, 192px);
  --radius: 14px;      /* the app's button, group and field radius */
  --radius-card: 18px; /* the app's card */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a[href^="mailto:"] { overflow-wrap: anywhere; }
::selection { background: var(--tint-press); color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* Focus ring by surface. Light grounds and white app surfaces: rosewood (6.15:1 on bg, 6.69:1 on
   white). Ink and rosewood or green fields: the app's snackAction or white. */
.on-dark, .tile-mark, .skip-link { --focus: var(--snack-action); } /* 10.79:1 on ink */
.showcase { --focus: var(--on-accent); }                 /* 6.69:1 on rosewood, 6.70:1 on green */
.showcase [data-ui] { --focus: var(--accent); }          /* the white control inside the coloured field */
.faq-item[open] { --focus: var(--on-accent); }           /* on rosewood */
[data-legal-document] .skip-link { --focus: var(--accent); } /* legal pages: the skip link shows over the light bar (6.15:1) */

.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hidden above the page by its own height (not a fixed -100px), so it stays hidden when large text wraps it. */
.skip-link {
  position: absolute; left: 16px; top: 16px; z-index: 20; transform: translateY(calc(-100% - 24px));
  background: var(--snack-action); color: var(--ink); padding: 14px 22px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { transform: none; }

/* ---------- Buttons: the app's button, one shape ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 3.25rem; padding: 0.5rem 1.5rem; border-radius: var(--radius); border: 0;
  font: 600 var(--fs-small)/1.25 var(--font); text-decoration: none; cursor: pointer; text-align: center;
  transition: transform 120ms var(--ease), background-color 160ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-press); }
/* On the ink ground: the app's snackAction with an ink label (10.79:1), as in round 1. */
.on-dark .btn-primary { background: var(--snack-action); color: var(--ink); }
.on-dark .btn-primary:hover { background: var(--tint); }
.text-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 3rem;
  font-weight: 600; font-size: var(--fs-small); text-decoration: underline;
}
.text-link svg { flex-shrink: 0; transition: transform 160ms var(--ease); }
.text-link:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 5; }
/* The top bar and the first screen share the ink ground (owner, 8 Nov 2026, round 2 look). */
.on-dark { background: var(--ink); color: var(--bg); }
.on-dark .main-nav a:hover, .on-dark .mobile-nav a:hover { background: var(--ink-raised); }
.on-dark .nav-toggle { background: var(--ink-raised); }
[hidden] { display: none !important; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 5.5rem; padding-top: 8px; padding-bottom: 8px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--font-mark); font-weight: 600; font-size: min(1.75rem, 9vw); line-height: 1;
  min-height: 3rem;
}
.wordmark img, .wordmark svg { width: min(2.5rem, 12vw); height: min(2.5rem, 12vw); flex-shrink: 0; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a {
  display: inline-flex; align-items: center; min-height: 3rem; padding: 0 14px; border-radius: var(--radius);
  font-size: var(--fs-small); font-weight: 500; text-decoration: none;
}
.main-nav a:hover { background: var(--fill); }
.main-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.35em; }
.nav-toggle {
  display: none; margin-left: auto; min-width: 3rem; min-height: 3rem; padding: 0 14px;
  border-radius: var(--radius); border: 0; background: var(--fill); color: inherit;
  font: 600 var(--fs-small)/1 var(--font); cursor: pointer;
}
.mobile-nav { padding: 8px var(--gutter) 24px; }
.mobile-nav a {
  display: flex; align-items: center; min-height: 3.5rem; font-size: 1.25rem; font-weight: 500;
  text-decoration: none; border-radius: var(--radius); padding: 0 8px;
}
.mobile-nav a:hover { background: var(--fill); }
@media (max-width: 53.75em) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; }
}

/* ---------- First screen: ink ground, the promise centred, app pieces around it ---------- */
.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 46rem) minmax(0, 1fr);
  grid-template-areas:
    "a a a"
    "title title title"
    "b sub c";
  align-items: center;
  row-gap: clamp(24px, 3vw, 40px);
  column-gap: 32px;
  padding-top: clamp(16px, 3vh, 40px);
  padding-bottom: clamp(40px, 6vh, 72px);
  min-height: calc(min(100svh, 720px) - 5.5rem);
  align-content: center;
}
.hero-stage h1 {
  grid-area: title; text-align: center;
  font-size: var(--fs-display); line-height: 1.02; letter-spacing: -0.035em;
}
.hero-stage h1 span { display: block; }
.hero-sub { grid-area: sub; text-align: center; }
.hero-sub p { font-size: var(--fs-lead); line-height: 1.4; max-width: 34ch; margin: 0 auto; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 24px; margin-top: 32px; }
.chip-a { grid-area: a; justify-self: center; }
.chip-b { grid-area: b; justify-self: start; }
.chip-c { grid-area: c; justify-self: end; }

/* A chip is a piece of the app on a raised step of the ink ground (round 1's dark chips, no tilt).
   Two classes, so it wins over the [data-ui] ink text further down. */
.hero .chip {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  background: var(--ink-raised); color: var(--bg);
  border-radius: var(--radius); padding: 12px 16px;
  font-size: 0.9375rem; line-height: 1.35; /* app .t-sub, 15 */
}
.chip { max-width: 19rem; }
.chip strong { display: block; font-weight: 600; font-size: 1.0625rem; }
.chip .muted { display: block; color: var(--on-ink-quiet); }
.chip-thumb {
  position: relative; width: 3rem; height: 3rem; border-radius: 10px; flex-shrink: 0; background: var(--lock);
  overflow: hidden; --blur: 6px; /* the app's blur, scaled to a 48 px thumbnail */
}
.chip-icon {
  width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--trust-tint); color: var(--trust);
}
@media (max-width: 53.75em) {
  .hero-stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "title title" "sub sub" "a a" "b c";
    min-height: 0; align-content: start; padding-top: 24px;
  }
  .chip-a { justify-self: start; }
  .chip-b, .chip-c { justify-self: stretch; max-width: none; }
}
@media (max-width: 35em) {
  .hero-stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "sub" "a" "b" "c"; row-gap: 16px; }
  .hero-stage h1, .hero-sub { text-align: left; }
  .hero-stage h1 { margin-bottom: 8px; }
  .hero-sub { margin-bottom: 16px; }
  .hero-sub p { margin: 0; }
  .hero-actions { justify-content: flex-start; }
  .chip { max-width: none; justify-self: stretch; }
}

/* ---------- Intro: lead line over four columns ---------- */
.intro { padding: clamp(48px, 5vw, 80px) 0 clamp(56px, 6vw, 96px); }
.intro-lead { font-size: var(--fs-lead); line-height: 1.3; max-width: 46ch; }
.intro-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 32px; margin-top: 72px; }
.intro-cols p { font-size: var(--fs-small); line-height: 1.55; }
.intro-cols b { font-weight: 600; }
@media (max-width: 62.5em) { .intro-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; } }
@media (max-width: 35em) { .intro-cols { grid-template-columns: minmax(0, 1fr); row-gap: 28px; margin-top: 48px; } }

/* Four photographs, butted edge to edge: one still picture each, nothing changes by itself
   (round 1's crossfade frame is now a photo of its own). */
.photo-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: clamp(220px, 44svh, 480px); }
.photo-strip figure { margin: 0; position: relative; overflow: hidden; background: var(--fill); }
.photo-strip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 43.75em) {
  .photo-strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: auto; }
  .photo-strip figure { aspect-ratio: 1 / 1; }
}

/* ---------- How it works: a heading row, then one card in each of four fields ---------- */
.how { padding-top: var(--section); }
.how-head { padding-bottom: 40px; }
.how h2 { font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -0.02em; }
.fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field {
  min-width: 0; padding: clamp(32px, 3vw, 48px) 28px clamp(40px, 4vw, 64px);
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.field:nth-child(1) { background: var(--tint); }
.field:nth-child(2) { background: var(--trust-tint); }
.field:nth-child(3) { background: var(--bubble-me); }
.field:nth-child(4) { background: var(--lock); }
.field .card-slot { width: 100%; max-width: 18.5rem; }
.field .clause { width: 100%; max-width: 18.5rem; font-size: var(--fs-lead); line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; }
@media (max-width: 68.75em) { .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40em) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  .field { padding: 32px var(--gutter) 40px; align-items: flex-start; gap: 24px; }
  .field .clause { order: -1; max-width: none; }
}

/* ---------- Showcase: the photo rule, one control at poster size ---------- */
.showcase {
  background: var(--accent); color: var(--on-accent);
  transition: background-color 600ms var(--ease);
  overflow: hidden;
}
.showcase.is-unlocked { background: var(--trust); }
.showcase-inner {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px;
  padding-top: clamp(64px, 8vw, 120px); padding-bottom: clamp(64px, 8vw, 120px); align-items: center;
}
.showcase h2 { font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -0.02em; }
.showcase-copy p { margin-top: 24px; max-width: 34ch; }
.showcase-copy p + p { margin-top: 16px; }
@media (max-width: 56.25em) { .showcase-inner { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Features: staggered fragment cells, height from their content ---------- */
.more { padding-top: var(--section); }
.more h2, .faq h2 { font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -0.02em; }
/* Columns, not a grid: each cell is as tall as its own content, so no cell has an empty middle. */
.cells { columns: 3; column-gap: 8px; margin-top: 56px; }
.cell {
  break-inside: avoid; margin-bottom: 8px;
  min-width: 0; background: var(--fill); border-radius: var(--radius-card); overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
}
.cell-text { padding: 28px 28px 20px; }
.cell h3 { font-size: var(--fs-body); line-height: 1.35; }
.cell-text p { margin-top: 8px; font-size: var(--fs-small); line-height: 1.55; }
.cell .frag { padding: 0 0 0 28px; min-width: 0; }
.cell .frag > * { max-width: 100%; min-width: 0; }
/* Every cell opens with its heading (critique round 2, R2-I3), so a caption never pairs with the piece above it. */
@media (max-width: 62.5em) { .cells { columns: 2; } }
@media (max-width: 40em) {
  .cells { columns: 1; }
  .cell { margin-bottom: 6px; }
  .cell:nth-child(even) .frag { padding: 0 28px 0 0; }
  .cell:nth-child(even) .frag > * { margin-left: auto; border-radius: var(--radius-card) 0 0 0; }
}
@media (max-width: 22.5em) {
  .cell .frag, .cell:nth-child(even) .frag { padding: 0 0 0 16px; }
  .cell-text { padding: 24px 20px 16px; }
}

/* ---------- FAQ: accordion of filled tiles ---------- */
.faq { padding-top: var(--section); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; }
.faq-head { position: sticky; top: 32px; align-self: start; }
.faq-head p { margin-top: 20px; font-size: var(--fs-small); max-width: 26ch; }
.faq-list { display: grid; gap: 8px; min-width: 0; }
.faq-item { background: var(--fill); border-radius: var(--radius); transition: background-color 200ms var(--ease); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 4.5rem; padding: 16px 24px; font-size: 1.25rem; font-weight: 500; line-height: 1.35; border-radius: var(--radius);
}
.faq-item summary:focus-visible { outline-offset: -5px; border-radius: var(--radius); } /* ring stays on the item's own colour */
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--tint); }
.plus { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; top: 6.5px; width: 16px; height: 3px; background: currentColor; border-radius: 2px; transition: transform 200ms var(--ease); }
.plus::after { transform: rotate(90deg); }
.faq-item[open] { background: var(--accent); color: var(--on-accent); }
.faq-item[open] summary:hover { background: transparent; }
.faq-item[open] .plus::after { transform: rotate(0deg); }
.faq-item .answer { padding: 0 24px 28px; max-width: 52ch; }
.faq-item .answer p + p { margin-top: 12px; }
@media (max-width: 53.75em) {
  .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .faq-head { position: static; }
  .faq-item summary { font-size: 1.125rem; min-height: 4rem; padding: 14px 20px; }
  .faq-item .answer { padding: 0 20px 24px; }
}

/* ---------- Coming soon: last photograph, text beside, on the light filled ground ---------- */
.soon {
  margin-top: var(--section); background: var(--fill);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); overflow: hidden;
  min-height: min(84svh, 820px);
}
.soon > img { width: 100%; height: 100%; object-fit: cover; object-position: 8% 50%; }
.soon-text {
  align-self: center;
  padding: 48px var(--gutter) 48px clamp(32px, 4vw, 64px);
}
.soon h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.02em; max-width: 14ch; }
.soon p { margin-top: 20px; max-width: 36ch; }
.soon .btn { margin-top: 32px; }
@media (max-width: 53.75em) {
  .soon { min-height: 0; display: block; }
  .soon > img { height: 56svh; min-height: 280px; }
  .soon-text { padding: 40px var(--gutter) 64px; }
}

/* ---------- Footer: tiles ---------- */
.site-footer { padding: 8px; }
.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; }
.tile { min-width: 0; background: var(--fill); border-radius: var(--radius-card); padding: 28px; min-height: 13.75rem; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.tile p, .tile li { font-size: var(--fs-small); }
.tile-statement { grid-column: 1 / 5; }
.tile-statement .big { font-size: var(--fs-lead); line-height: 1.3; }
.tile-nav { grid-column: 5 / 7; justify-content: flex-start; }
.tile-legal { grid-column: 7 / 9; justify-content: flex-start; }
.tile-email { grid-column: 9 / 13; }
.tile-email a { font-size: 1.25rem; font-weight: 500; }
.tile ul a { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none; font-weight: 500; }
.tile ul a:hover, .tile ul a[aria-current="page"] { text-decoration: underline; }
.tile-label { font-weight: 600; }
.tile-mark { grid-column: 1 / 9; background: var(--ink); color: var(--bg); min-height: 20rem; align-items: center; justify-content: center; }
.tile-mark .wordmark { font-size: min(max(3rem, 9vw), 8.5rem, 12vw); gap: 0.25em; }
.tile-mark .wordmark img, .tile-mark .wordmark svg { width: 0.9em; height: 0.9em; }
.tile-go { grid-column: 9 / 13; background: var(--accent); color: var(--on-accent); min-height: 20rem; text-decoration: none; transition: background-color 160ms var(--ease); }
/* White ring drawn inside the rosewood tile (6.69:1), like the open question (critique round 2, R2-N4). */
.tile-go { --focus: var(--on-accent); }
.tile-go:focus-visible { outline-offset: -8px; border-radius: var(--radius-card); }
.tile-go:hover { background: var(--accent-press); }
.tile-go .big { font-size: var(--fs-lead); font-weight: 500; line-height: 1.25; max-width: 14ch; }
.tile-go svg { align-self: flex-end; flex-shrink: 0; max-width: 100%; transition: transform 200ms var(--ease); }
.tile-go:hover svg { transform: translateX(6px); }
.tile-credits { grid-column: 1 / 13; min-height: 0; }
.tile-credits p:last-child { color: var(--ink); }
@media (max-width: 62.5em) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .tile-mark, .tile-go, .tile-credits, .tile-statement { grid-column: 1 / -1; }
  .tile-mark { order: -2; min-height: 10rem; }
  .tile-go { order: -1; min-height: 12rem; }
  .tile-nav, .tile-legal, .tile-email { grid-column: auto; }
  .tile-email { grid-column: 1 / -1; }
}
@media (max-width: 26.25em) {
  .tile-nav, .tile-legal { grid-column: 1 / -1; min-height: 0; }
  .tile { padding: 24px 20px; }
}

/* ---------- Legal pages: text unchanged, reading set like the app ---------- */
.legal { padding: clamp(32px, 5vw, 72px) 0 var(--section); }
.legal-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; }
.legal-aside { position: sticky; top: 24px; align-self: start; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.legal-toc ol { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; list-style: decimal; padding-left: 1.4em; }
.legal-toc li { font-size: var(--fs-small); padding-left: 4px; }
.legal-toc a { display: inline-block; padding: 6px 0; text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }
.legal-body { min-width: 0; }
.legal-body h1 { font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -0.02em; }
.legal-content { max-width: 38em; margin-top: 16px; } /* about 70 characters at 19 px */
.legal-document-meta { color: var(--ink2); font-size: var(--fs-small); }
.legal-markdown h2 { font-size: var(--fs-lead); line-height: 1.25; letter-spacing: -0.01em; margin-top: 56px; scroll-margin-top: 24px; }
.legal-markdown h3 { font-size: var(--fs-body); margin-top: 32px; }
.legal-markdown p { margin-top: 16px; }
.legal-markdown h2 + p, .legal-markdown h3 + p { margin-top: 12px; }
/* minmax(0, 1fr): a grid item may shrink below its longest word, so long words wrap at 320 px with
   200 % text instead of pushing the page sideways. */
.legal-markdown ul { margin-top: 12px; padding-left: 1.4em; list-style: disc; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.legal-markdown ol { margin-top: 12px; padding-left: 1.4em; list-style: decimal; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.legal-state { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; justify-items: start; max-width: 52ch; }
.legal-error { background: var(--danger-tint); border-radius: var(--radius); padding: 24px; }
.legal-error h2 { font-size: var(--fs-lead); }
.legal-loader { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--fill); border-top-color: var(--accent); animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 53.75em) {
  .legal-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .legal-aside { position: static; }
  .legal-toc { display: none; }
}

/* ---------- Entrance motion: content is visible unless script and motion are allowed ---------- */
.motion-ok [data-enter] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 900ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.motion-ok [data-enter].is-in { opacity: 1; transform: none; }
.motion-ok [data-settle] img { transform: scale(1.06); transition: transform 2.4s var(--ease); }
.motion-ok [data-settle].is-in img { transform: none; }
/* Printing does not scroll the page, so the entrances would never run: print everything as it is. */
@media print {
  .motion-ok [data-enter] { opacity: 1; transform: none; transition: none; }
  .motion-ok [data-settle] img { transform: none; transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
}

/* =====================================================================
   App fragments ([data-ui]): the redesigned app's own components at true
   size (design-a/system.css and widgets.dart), with invented sample data.
   ===================================================================== */
[data-ui] { font-family: var(--font); color: var(--ink); line-height: 1.4; text-align: left; overflow-wrap: break-word; }
.ui-card { background: var(--surface); border-radius: var(--radius-card); overflow: hidden; }
/* A photo box: the photo fills it; the rule line sits in the flow at the foot, so with large text the
   box grows to fit (overflow: clip is not a scroll container, so aspect-ratio stays a minimum). */
.ui-photo {
  position: relative; aspect-ratio: 4 / 3; background: var(--lock); overflow: clip;
  display: grid; align-items: end; --blur: 18px; /* photo.dart _blurSigma */
}
.ui-photo > img, .reveal-art > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
/* Before reveal: the 64 px preview under the app's blur, scaled past the edges so the blur never shows a rim. */
.ui-blur { filter: blur(var(--blur)); transform: scale(1.25); }
.chip-thumb .ui-blur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The rule on a blurred photo, as the app draws it: white on an ink scrim (at least 8:1 over any photo). */
.ui-rule {
  position: relative; display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 10px 14px; background: rgba(31, 27, 24, 0.78); color: var(--on-accent); /* taste-skill-ignore: neutral scrim under text on a photo */
  font-size: 0.875rem; font-weight: 500; line-height: 1.35;
}
.ui-body { padding: 14px 16px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.ui-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.ui-name { font-size: 1.375rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.ui-sub { font-size: 0.9375rem; color: var(--ink2); line-height: 1.4; }
.ui-sub--ink { color: var(--ink); }
.ui-foot { font-size: 0.875rem; font-weight: 500; color: var(--ink2); line-height: 1.35; }
.ui-quote { font-size: 1.0625rem; line-height: 1.45; }
.ui-head { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.ui-trust { display: inline-flex; align-items: center; gap: 6px; color: var(--trust); font-size: 0.875rem; font-weight: 500; flex-shrink: 0; }
.ui-status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9375rem; font-weight: 500; color: var(--trust); }
.ui-status--quiet { color: var(--ink2); }
.ui-btn {
  display: flex; align-items: center; justify-content: center; min-height: 3rem; padding: 6px 16px; min-width: 0;
  border-radius: var(--radius); font-size: 1rem; font-weight: 600; border: 0; font-family: var(--font); text-align: center; line-height: 1.25;
}
.ui-btn--primary { background: var(--accent); color: var(--on-accent); }
.ui-btn--secondary { background: var(--tint); color: var(--ink); box-shadow: inset 0 0 0 1px var(--tint-edge); } /* taste-skill-ignore: app button edge inside [data-ui] */
.ui-btn--text { background: transparent; color: var(--ink2); }
/* Flex with wrap, not a fixed grid: at 320 px with 200 % text the buttons wrap instead of overflowing. */
.ui-btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ui-btn-row .ui-btn--primary { flex: 1 1 auto; }
.ui-group { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.ui-row { display: flex; align-items: center; gap: 12px; min-height: 3.25rem; padding: 10px 16px; }
.ui-row + .ui-row { border-top: 1px solid var(--hair); } /* taste-skill-ignore: the app's group separator inside [data-ui] */
.ui-row .grow { flex: 1; min-width: 0; }
.ui-tag { font-size: 0.875rem; font-weight: 500; background: var(--fill); border-radius: 10px; padding: 4px 10px; color: var(--ink); flex-shrink: 0; }
.ui-icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.ui-prompt { display: grid; gap: 4px; }
.ui-topbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--bar); }
.ui-topbar .ui-head { flex: 1; min-width: 0; }
.ui-safety { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 8px; font-size: 0.875rem; font-weight: 500; color: var(--ink2); background: var(--bg); }
.ui-chat { background: var(--bg); padding: 12px; display: grid; gap: 8px; }
.ui-bubble { max-width: 85%; padding: 10px 14px; border-radius: 18px; font-size: 1rem; line-height: 1.4; }
.ui-bubble--them { background: var(--surface); border-bottom-left-radius: 6px; }
.ui-bubble--me { background: var(--bubble-me); justify-self: end; border-bottom-right-radius: 6px; }
.ui-option { min-width: 0; overflow-wrap: anywhere; display: flex; align-items: center; gap: 12px; min-height: 3rem; padding: 8px 14px; border-radius: var(--radius); background: var(--surface); font-size: 1rem; box-shadow: inset 0 0 0 1px var(--hair); } /* taste-skill-ignore: app option edge inside [data-ui] */
.ui-option .radio { width: 1.25rem; height: 1.25rem; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink3); flex-shrink: 0; } /* taste-skill-ignore: radio outline inside [data-ui] */
.ui-option.is-selected { box-shadow: inset 0 0 0 2px var(--accent); } /* taste-skill-ignore: selected option inside [data-ui] */
.ui-option.is-selected .radio { box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 5px var(--surface); background: var(--accent); } /* taste-skill-ignore: radio inside [data-ui] */
.ui-menu { background: var(--surface); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(31, 27, 24, 0.16), 0 2px 6px rgba(31, 27, 24, 0.08); overflow: hidden; } /* taste-skill-ignore: an open menu floats */
.ui-menu .ui-row { min-height: 3rem; font-size: 1.0625rem; }
.ui-danger { color: var(--danger); }
.ui-post { background: var(--surface); border-radius: var(--radius-card) 0 0 0; padding: 18px 20px 6px; display: grid; gap: 10px; }
.ui-quiet { display: flex; flex-wrap: wrap; gap: 4px; margin-left: -10px; }
.ui-quiet span { display: inline-flex; align-items: center; gap: 6px; min-height: 3rem; padding: 0 10px; font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.ui-screen { background: var(--bg); border-radius: var(--radius-card) 0 0 0; padding: 22px 22px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.ui-title { font-size: 1.375rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.frag .ui-card, .frag .ui-group, .frag .ui-menu { border-radius: var(--radius-card) 0 0 0; }

/* The poster-size photo-status control */
.reveal-control {
  justify-self: end; width: min(100%, 34rem);
  background: var(--surface); color: var(--ink); border-radius: 28px; overflow: hidden;
  font-size: clamp(1rem, 0.85rem + 0.5vw, 1.25rem); /* the control scales in em */
}
.reveal-control .ui-photo { aspect-ratio: 16 / 10; align-items: stretch; --blur: 24px; }
/* Both states stacked in one cell; each is its own photo with its own alt text. */
.reveal-art { grid-area: 1 / 1; position: relative; overflow: clip; display: grid; align-items: end; transition: opacity 500ms var(--ease); }
.reveal-art .ui-rule { font-size: 0.85em; padding: 0.75em 1.1em; }
.reveal-art--open { opacity: 0; }
.reveal-control.is-unlocked .reveal-art--open { opacity: 1; }
.reveal-control.is-unlocked .reveal-art--locked { opacity: 0; }
.reveal-body { padding: 1.25em 1.4em 1.5em; display: grid; gap: 0.9em; }
.reveal-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25em 0.6em; font-size: 1.4em; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.reveal-sample { font-size: 0.64em; font-weight: 500; letter-spacing: 0; color: var(--ink); background: var(--fill); border-radius: 10px; padding: 0.2em 0.6em; }
.reveal-status { display: flex; align-items: center; gap: 0.5em; font-weight: 600; font-size: 1.1em; color: var(--accent); }
.is-unlocked .reveal-status { color: var(--trust); }
/* Label and value side by side; the output sits outside the label (a label may hold only its own control). */
.reveal-range-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25em 1em; font-size: 0.95em; font-weight: 500; color: var(--ink2); }
.reveal-range output { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
/* font: inherit, or a range input stays at 13.33 px and the em sizes never grow (critique round 2, R2-N1).
   The thumb is at least 44 px (2.75rem, which also grows with text size). */
.reveal-range input[type="range"] {
  -webkit-appearance: none; appearance: none; font: inherit; width: 100%; height: max(3.5rem, 3em); background: transparent; margin: 0.4em 0 0; cursor: pointer;
  --thumb: max(2.75rem, 2.2em);
}
.reveal-range input[type="range"]::-webkit-slider-runnable-track { height: 0.5em; border-radius: 1em; background: var(--fill); }
.reveal-range input[type="range"]::-moz-range-track { height: 0.5em; border-radius: 1em; background: var(--fill); }
.reveal-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: var(--thumb); height: var(--thumb); margin-top: calc((0.5em - var(--thumb)) / 2); border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 0.3em var(--surface); transition: transform 120ms var(--ease); /* taste-skill-ignore: slider thumb ring inside [data-ui] */
}
.reveal-range input[type="range"]::-moz-range-thumb { width: var(--thumb); height: var(--thumb); border: 0; border-radius: 50%; background: var(--accent); }
.reveal-range input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.08); }
.is-unlocked .reveal-range input[type="range"]::-webkit-slider-thumb { background: var(--trust); }
.is-unlocked .reveal-range input[type="range"]::-moz-range-thumb { background: var(--trust); }
.reveal-ticks { display: flex; justify-content: space-between; font-size: 0.8em; color: var(--ink2); font-variant-numeric: tabular-nums; padding: 0 calc(max(1.375rem, 1.375em) - 0.3em); } /* digits centred under the thumb's stops */
/* Narrow for its own text size (a phone with large text): keep only 0 and 7, so the digits never run together. */
.reveal-range { container-type: inline-size; }
@container (max-width: 11em) { .reveal-ticks span:not(:first-child):not(:last-child) { visibility: hidden; } }
