/* QR Tiles — newstuff.app shared styles. Base layer; per-section styles append below the marker at EOF. */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
/* --accent is a GROUND-DEPENDENT foreground and the ground is what decides.
   WORDS on --wash or --wash-deep take the derived --accent-ink: those two
   grounds are the harshest, and --accent-ink is solved against --wash-deep, so
   clearing there clears --wash too. Every GLYPH keeps --accent wherever it
   sits, because a graphical object answers to 1.4.11's 3:1 while a word answers
   to 1.4.3's 4.5:1 — which is why a rule handing its word --accent-ink must
   restate --accent on its own .ic, or the glyph inherits the derived value and
   goes quietly dull. Four rules were swept onto --accent-ink this way, and
   every word-on-wash pairing now clears 4.5:1 in all twelve accent-by-appearance
   states, lowest 4.52.
   NOT settled, and deliberately left: accent WORDS on --paper and --card, which
   this sweep measured and did not touch. They fail 4.5:1 in up to eight of the
   twelve — the hero's own second line among them, at 2.86 in honey light — and
   they are a different question from this one, needing their own call rather
   than a quiet extension of this rule. Do not read the presence of --accent on
   a paper-ground rule as evidence it was checked and passed. */
a { color: var(--accent); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--wash-deep); }

/* ---------- type ---------- */

.h-display { font-size: clamp(38px, 7.2vw, 68px); line-height: 1.04; letter-spacing: -0.022em; font-weight: 700; }
.h-sec { font-size: clamp(28px, 4.6vw, 44px); line-height: 1.08; letter-spacing: -0.018em; font-weight: 700; }
.h-sub { font-size: clamp(19px, 2.6vw, 24px); line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; }
.lede { font-size: clamp(17px, 2.2vw, 21px); line-height: 1.5; color: var(--dim); }
.meta { font-size: 14px; line-height: 1.45; color: var(--dim); }
.mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace; }
.em-accent { color: var(--accent-ink-surface-lg); font-style: normal; }

/* ---------- layout ---------- */

.sec { padding: clamp(72px, 12vw, 140px) 24px; position: relative; }
.sec-inner { max-width: 1080px; margin: 0 auto; }
.sec-head { max-width: 640px; margin-bottom: clamp(36px, 6vw, 64px); }
.sec-head .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 14px;
}
.sec-head .kicker .ic { width: 15px; height: 15px; color: var(--accent); }
.sec-head p.lede { margin-top: 14px; }
.sec-alt { background: var(--wash); }

/* two-column: device beside copy */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.duo > .duo-copy { max-width: 480px; }
@media (max-width: 820px) {
  .duo { grid-template-columns: 1fr; }
  .duo > .duo-device { order: -1; margin: 0 auto; }
}

/* help-point rows (the app's ? sheet language) */
.points { display: grid; gap: 20px; }
.point { display: flex; gap: 14px; align-items: flex-start; }
.point .ic { width: 22px; height: 22px; color: var(--accent); flex: none; margin-top: 2px; }
.point b { display: block; font-size: 16px; font-weight: 600; margin-bottom: 3px; }
.point p { font-size: 14.5px; line-height: 1.5; color: var(--dim); }

/* ---------- icons ---------- */

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic-fill { fill: currentColor; stroke: none; }

/* ---------- reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* accent-change soft cross-fade (html.re-theme applied for ~450ms on switch).
   Scoped to 3 cheap properties and skips the QR-mosaic cells — old hardware. */
html.re-theme body *:not(.qr i) { transition: background-color 0.4s ease, color 0.4s ease, fill 0.4s ease; }

/* offscreen animation pause (shared observer in site.js) */
.anim-off, .anim-off * { animation-play-state: paused; }

/* ---------- brand mark (the finder pattern) ---------- */

.mark { display: grid; place-items: center; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; width: 44px; height: 44px; }
.mark .o { width: 24px; height: 24px; background: var(--accent); display: grid; place-items: center; }
.mark .m { width: 14px; height: 14px; background: var(--paper); display: grid; place-items: center; }
.mark .i { width: 6px; height: 6px; background: var(--accent); }
.mark-sm { width: 34px; height: 34px; border-radius: 8px; }
.mark-sm .o { width: 18px; height: 18px; }
.mark-sm .m { width: 10.5px; height: 10.5px; }
.mark-sm .i { width: 4.5px; height: 4.5px; }

/* ---------- swatches (gate, header, personalize, footer) ---------- */

.sw {
  position: relative; width: 40px; height: 40px; border-radius: 9px;
  background: var(--paper); border: 1px solid var(--rule);
  display: grid; place-items: center;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.sw:hover { transform: translateY(-2px); }
.sw:active { transform: scale(0.94); }
.sw .sw-o { width: 22.5px; height: 22.5px; background: var(--sw); display: grid; place-items: center; }
.sw .sw-m { width: 13.75px; height: 13.75px; background: var(--paper); display: grid; place-items: center; }
.sw .sw-i { width: 6.25px; height: 6.25px; background: var(--sw); }
.sw[aria-pressed="true"] { border: 2px solid var(--sw); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sw) 18%, transparent); }
.sw-row { display: flex; gap: 12px; }
.sw-lg .sw { width: 56px; height: 56px; border-radius: 13px; }
.sw-lg .sw .sw-o { width: 31.5px; height: 31.5px; }
.sw-lg .sw .sw-m { width: 19.25px; height: 19.25px; }
.sw-lg .sw .sw-i { width: 8.75px; height: 8.75px; }
.sw-sm .sw { width: 30px; height: 30px; border-radius: 7px; }
.sw-sm .sw .sw-o { width: 17px; height: 17px; }
.sw-sm .sw .sw-m { width: 10.4px; height: 10.4px; }
.sw-sm .sw .sw-i { width: 4.7px; height: 4.7px; }

/* ---------- skip link ---------- */

.skip-link {
  position: fixed; top: 12px; left: 16px; z-index: 200;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 18px; border-radius: 999px; font-weight: 600; text-decoration: none;
  transform: translateY(-72px); transition: transform 0.2s ease;
}
.skip-link:focus { transform: none; }

/* ---------- header ---------- */

.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  padding: 10px clamp(16px, 3vw, 28px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent);
  opacity: 0; transform: translateY(-100%); visibility: hidden;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}
.hdr.on { opacity: 1; transform: none; visibility: visible; }
/* subpages pin the header permanently */
.hdr.hdr-static { position: sticky; opacity: 1 !important; transform: none !important; visibility: visible !important; }
.hdr .hdr-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 650; font-size: 16px; }
.hdr .spacer { flex: 1; }
.hdr-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent); color: var(--on-accent);
  font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px; text-decoration: none;
}
.hdr-cta .ic { width: 14px; height: 14px; }

/* discreet color edit: a dot that expands into the row */
.hdr-pick { position: relative; }
.hdr-dot {
  width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--rule);
  background: var(--paper); display: grid; place-items: center;
}
.hdr-dot .d { width: 13px; height: 13px; border-radius: 3px; background: var(--accent); }
.hdr-pop {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px;
  padding: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  opacity: 0; pointer-events: none; visibility: hidden; transform: translateY(-6px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.hdr-pick.open .hdr-pop { opacity: 1; pointer-events: auto; visibility: visible; transform: none; }

/* ---------- the color gate (first visit only) ---------- */

#gate { display: none; }
html.gate-on #gate {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 100;
  background: var(--paper); text-align: center; padding: 24px;
}
html.gate-on { overflow: hidden; }
#gate .gate-inner { display: grid; justify-items: center; gap: 0; max-width: 480px; }
#gate .mark { margin-bottom: 26px; }
#gate .gate-h { font-size: clamp(30px, 6vw, 44px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 12px; }
#gate .gate-sub { font-size: 17px; color: var(--dim); margin-bottom: 34px; }
#gate .sw-row { justify-content: center; flex-wrap: wrap; }
#gate .gate-note { margin-top: 30px; font-size: 13px; color: var(--dim); opacity: 0.85; }
#gate .gate-skip { margin-top: 10px; font-size: 13px; color: var(--dim); text-decoration: underline; text-underline-offset: 3px; }

/* leaving: the gate breathes out while the page breathes in */
#gate { transition: opacity 0.65s ease 0.15s, transform 0.65s cubic-bezier(0.3, 0, 0.2, 1) 0.15s; }
html.gate-leaving #gate { opacity: 0; transform: scale(1.04); pointer-events: none; }
html.gate-on .page { opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.995); }
html.gate-leaving .page, html:not(.gate-on) .page { opacity: 1; visibility: visible; transform: none; transition: opacity 0.9s ease 0.35s, transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) 0.35s, visibility 0s; }
#gate .sw.picked { animation: sw-pop 0.5s cubic-bezier(0.3, 0, 0.2, 1); }
@keyframes sw-pop { 40% { transform: scale(1.22); } }
@media (prefers-reduced-motion: reduce) {
  #gate, html.gate-on .page, html.gate-leaving .page, html:not(.gate-on) .page { transition: none; animation: none; }
  #gate .sw.picked { animation: none; }
}

/* ---------- device frame ---------- */

.device {
  width: min(300px, 78vw); aspect-ratio: 300 / 634;
  background: var(--bezel); border-radius: 46px; padding: 9px;
  box-shadow: 0 24px 70px -18px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
  position: relative; flex: none;
}
.device .screen {
  position: absolute; inset: 9px; border-radius: 38px; background: var(--paper);
  overflow: hidden; display: flex; flex-direction: column;
}
.device .island {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 78px; height: 20px; border-radius: 12px; background: var(--bezel); z-index: 5;
}
.dvc-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 22px 4px; font-size: 11.5px; font-weight: 600; flex: none;
}
.dvc-status .sig { display: flex; gap: 4px; align-items: center; }
.dvc-status .sig i { display: block; background: var(--ink); border-radius: 1px; }

/* in-device iOS chrome */
.dvc-nav {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px; flex: none;
  position: relative;
}
.dvc-nav .dvc-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.dvc-nav .dvc-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.dvc-nav .dvc-pill .ic { width: 10px; height: 10px; color: var(--dim); }
.dvc-nav .dvc-back { display: inline-flex; align-items: center; gap: 2px; color: var(--accent-ink-surface); font-size: 13px; }
.dvc-nav .dvc-back .ic { color: var(--accent); }
.dvc-nav .dvc-actions { margin-left: auto; display: inline-flex; gap: 12px; color: var(--accent); }
.dvc-nav .ic { width: 16.5px; height: 16.5px; }
.dvc-body { flex: 1; overflow: hidden; padding: 6px 12px 12px; display: flex; flex-direction: column; gap: 10px; }

.dvc-sec-h { font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--dim); padding: 8px 12px 0; }
.dvc-card { background: var(--card); border-radius: 10px; overflow: hidden; flex: none; }
.dvc-row { display: flex; align-items: center; gap: 10px; padding: 9.5px 12px; font-size: 12.5px; position: relative; }
.dvc-row + .dvc-row::before { content: ""; position: absolute; top: 0; left: 38px; right: 0; height: 1px; background: var(--rule); }
.dvc-row .ic { width: 15px; height: 15px; color: var(--accent); flex: none; }
.dvc-row .chev { margin-left: auto; color: var(--dim); width: 11px; height: 11px; }
.dvc-row .val { margin-left: auto; color: var(--dim); font-size: 11.5px; }
.dvc-row .dvc-i { margin-left: auto; width: 12px; height: 12px; color: var(--dim); }
.dvc-row .dvc-i + .chev { margin-left: 0; }

/* a foldable Home section shown collapsed: header only, Show on the right */
.dvc-fold {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px 0;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--dim);
}
.dvc-fold .ic { width: 12px; height: 12px; color: var(--accent); flex: none; }
.dvc-fold .dvc-fi { width: 11px; height: 11px; color: var(--dim); }
.dvc-fold .dvc-show { margin-left: auto; color: var(--accent-ink-surface); }

.dvc-search {
  display: flex; align-items: center; gap: 7px; background: var(--cell);
  border-radius: 9px; padding: 7.5px 10px; font-size: 12.5px; color: var(--dim);
}
.dvc-search .ic { width: 13px; height: 13px; }

.dvc-chips { display: flex; gap: 6px; }
.chip {
  font-size: 11px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: var(--cell); color: var(--dim); flex: none;
}
.chip.on { background: var(--accent); color: var(--on-accent); }

/* photo-grid thumbs: abstract, kitchen-warm — never fake photos */
.thumb { border-radius: 8px; background: linear-gradient(135deg, var(--wash-deep), var(--cell)); position: relative; overflow: hidden; }
.thumb::after { content: ""; position: absolute; inset: 0; background: radial-gradient(90% 70% at 20% 15%, color-mix(in srgb, var(--card) 55%, transparent), transparent 60%); }
.thumb .t-label {
  position: absolute; left: 5px; bottom: 5px; right: 5px;
  font-size: 8.5px; font-weight: 600; line-height: 1.25; color: var(--ink);
  background: color-mix(in srgb, var(--card) 88%, transparent); border-radius: 5px; padding: 3px 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumb .t-code { position: absolute; top: 5px; right: 5px; font-size: 7px; font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--dim); background: color-mix(in srgb, var(--card) 80%, transparent); border-radius: 4px; padding: 2px 4px; }

/* mini QR pattern (illustrative, not scannable) */
.qr { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6%; aspect-ratio: 1; }
.qr i { background: currentColor; border-radius: 12%; }
.qr i.off { background: transparent; }

/* ---------- big CTA ---------- */

.cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: var(--on-accent); text-decoration: none;
  font-weight: 600; font-size: 17px; padding: 15px 28px; border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 24px -8px color-mix(in srgb, var(--accent) 55%, transparent);
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 60%, transparent); }
.cta:active { transform: scale(0.98); }
.cta-note { display: block; margin-top: 12px; font-size: 13px; color: var(--dim); }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--rule); padding: 44px 24px 56px; }
.foot-inner { max-width: 1080px; margin: 0 auto; display: grid; gap: 26px; }
.foot-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.foot-top .foot-name { font-weight: 650; }
.foot-top .sw-row { margin-left: auto; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.foot-links a { color: var(--dim); text-decoration: none; }
.foot-links a:hover { color: var(--accent); }
.foot-fine { font-size: 13px; color: var(--dim); }
@media (max-width: 640px) { .foot-top .sw-row { margin-left: 0; } }

/* ---------- prose shell (subpages) ---------- */

.prose { max-width: 680px; margin: 0 auto; padding: 120px 24px 80px; }
.prose h1 { font-size: clamp(30px, 5vw, 40px); letter-spacing: -0.018em; margin-bottom: 10px; }
.prose .prose-date { font-size: 14px; color: var(--dim); margin-bottom: 36px; }
.prose h2 { font-size: 21px; letter-spacing: -0.01em; margin: 36px 0 10px; }
.prose h3 { font-size: 17px; margin: 26px 0 8px; }
.prose p, .prose li { font-size: 16px; line-height: 1.65; color: color-mix(in srgb, var(--ink) 88%, var(--dim)); }
.prose p { margin-bottom: 14px; }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 14px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; background: var(--cell); border-radius: 5px; padding: 1.5px 5px; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 16px; color: var(--dim); margin-bottom: 14px; }

/* ================= section styles append below ================= */


/* ===== hero ===== */

/* hero- : opening section + faithful Home screen in the device */
#hero { padding-top: clamp(84px, 13vh, 150px); padding-bottom: clamp(56px, 9vw, 110px); }
#hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.9;
  background: radial-gradient(640px 640px at 74% 32%, var(--wash-deep), transparent 70%);
}
#hero .sec-inner { position: relative; z-index: 1; }
#hero .hero-l2 { display: block; }
#hero .lede { margin-top: 18px; }
#hero .hero-cta { margin-top: 32px; }
#hero .cta .ic { width: 18px; height: 18px; }
#hero .duo-device { display: flex; justify-content: center; }
#hero .device { width: min(300px, 88vw); }

/* slow float — transform only; the reveal lives on the wrapper so both play */
#hero .hero-float { will-change: transform; animation: hero-float 7.5s ease-in-out 1.6s infinite; }
@keyframes hero-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) { #hero .hero-float { animation: none; } }

/* in-device Home: tightened so the full screen fits the 616px viewport */
:is(#hero, #appearance) .dvc-body { gap: 7px; padding: 4px 12px 10px; }
:is(#hero, #appearance) .dvc-row { padding: 8px 12px; }
#hero .dvc-sec-h { padding: 5px 12px 0; }
:is(#hero, #appearance) .hero-schard { padding: 9px; display: flex; flex-direction: column; gap: 7px; }
:is(#hero, #appearance) .hero-stat { display: flex; align-items: center; font-size: 10.5px; color: var(--dim); padding-left: 2px; }
:is(#hero, #appearance) .hero-stat-i { margin-left: auto; width: 11px; height: 11px; color: var(--dim); flex: none; }
:is(#hero, #appearance) .dvc-fold { padding: 3px 12px 0; }
:is(#hero, #appearance) .hero-pills { display: flex; gap: 7px; }
/* the pill's word answers to 4.5:1 and its glyph to 3:1, so they part here:
   the word takes the derived --accent-ink, the glyph keeps the accent itself */
:is(#hero, #appearance) .hero-pill {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  background: var(--wash-deep); color: var(--accent-ink);
  font-size: 11.5px; font-weight: 600; padding: 7px 0; border-radius: 8px;
}
:is(#hero, #appearance) .hero-pill .ic { width: 12.5px; height: 12.5px; color: var(--accent); }

/* the six-tile icon strip — each tile keeps its own fixed color (like the app);
   the visitor's current accent wears the ring */
:is(#hero, #appearance) .hero-foot { display: grid; justify-items: center; gap: 7px; margin-top: 2px; }
:is(#hero, #appearance) .hero-strip { display: flex; gap: 9px; }
:is(#hero, #appearance) .hero-it {
  width: 26px; height: 26px; border-radius: 6px; background: var(--paper);
  border: 1px solid var(--rule); display: grid; place-items: center;
}
:is(#hero, #appearance) .hero-it .hero-io { width: 14px; height: 14px; background: var(--hit); display: grid; place-items: center; }
:is(#hero, #appearance) .hero-it .hero-im { width: 8.5px; height: 8.5px; background: var(--paper); display: grid; place-items: center; }
:is(#hero, #appearance) .hero-it .hero-ii { width: 3.6px; height: 3.6px; background: var(--hit); }
:is(#hero, #appearance) .hero-it.cur {
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
}
:is(#hero, #appearance) .hero-lang { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--dim); }
:is(#hero, #appearance) .hero-lang .ic { width: 11px; height: 11px; color: var(--accent); flex: none; }
:is(#hero, #appearance) .hero-lang .hero-lang-cv { width: 9px; height: 9px; color: var(--dim); }
:is(#hero, #appearance) .hero-ver { font-size: 9.5px; color: var(--dim); }
:is(#hero, #appearance) .hero-it[data-c="clay"]  { --hit: light-dark(#B8563A, #CC6B47); }
:is(#hero, #appearance) .hero-it[data-c="ink"]   { --hit: light-dark(#262320, #E8E4DF); }
:is(#hero, #appearance) .hero-it[data-c="ocean"] { --hit: light-dark(#3E6E8E, #5E8FAF); }
:is(#hero, #appearance) .hero-it[data-c="sage"]  { --hit: light-dark(#5F7A5A, #7E9A78); }
:is(#hero, #appearance) .hero-it[data-c="honey"] { --hit: light-dark(#C9862D, #D9A04A); }
:is(#hero, #appearance) .hero-it[data-c="plum"]  { --hit: light-dark(#6E4A78, #8E6A98); }

/* mobile: copy leads, device follows (overrides the shared device-first order) */
@media (max-width: 820px) {
  #hero { padding-top: clamp(92px, 15vh, 136px); }
  #hero::before { background: radial-gradient(480px 480px at 50% 74%, var(--wash-deep), transparent 70%); }
  #hero .duo > .duo-device { order: 0; }
}
@media (max-width: 400px) {
  :is(#hero, #appearance) .dvc-body { gap: 6px; }
  :is(#hero, #appearance) .dvc-row { padding: 7px 12px; }
}


/* ===== how ===== */

/* How it works — three connected steps */
.how-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  position: relative;
}
.how-steps::before {
  content: "";
  position: absolute;
  top: 16.5px;
  left: 8px;
  right: 8px;
  height: 1px;
  background: color-mix(in srgb, var(--accent) 30%, var(--rule));
  -webkit-mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.how-step { display: flex; flex-direction: column; }
.how-num {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  /* 15px/700 is under the 18.66px large-text bar, so the numeral answers to
     4.5:1 like any other word. aria-hidden does not excuse it: that hides it
     from a screen reader, and the reader who needs the contrast is the sighted
     one with low vision. The ring stays on --accent — it is a decorative
     border, not text, and nothing has to be read out of it. */
  background: var(--wash-deep); color: var(--accent-ink);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: 15px; font-weight: 700;
  position: relative; z-index: 1;
  margin-bottom: 16px;
}
.how-card {
  flex: 1;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 44px -28px rgba(0, 0, 0, 0.28);
}
.how-viz {
  flex: none;
  height: 176px;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 6%, var(--card));
  border-bottom: 1px solid var(--rule);
}
.how-copy { padding: 20px 22px 24px; }
.how-copy h3 { font-size: 17.5px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 7px; }
.how-copy p { font-size: 14.5px; line-height: 1.55; color: var(--dim); }

/* step 1 — sticker sheet */
.how-sheet { position: relative; }
.how-sheet::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--card);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  transform: rotate(3deg) translate(7px, 4px);
  opacity: 0.6;
}
.how-sheet-grid {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 26px -16px rgba(0, 0, 0, 0.32);
}
.how-stk {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 10px 7px;
  border-right: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
}
.how-stk:nth-child(4n) { border-right: 0; }
.how-stk:nth-child(n+5) { border-bottom: 0; }
.how-stk .qr { width: 22px; color: var(--ink); }
.how-code {
  font-size: 6.5px; letter-spacing: 0.05em; font-weight: 500;
  color: var(--dim); text-transform: uppercase; white-space: nowrap;
}

/* step 2 — claim moment */
.how-scan { display: flex; flex-direction: column; align-items: center; gap: 13px; }
.how-vf { position: relative; width: 106px; height: 106px; display: grid; place-items: center; }
.how-vf > i { position: absolute; width: 22px; height: 22px; border: 0 solid var(--accent); }
.how-vf > i:nth-child(1) { top: 0; left: 0; border-top-width: 2.5px; border-left-width: 2.5px; border-top-left-radius: 9px; }
.how-vf > i:nth-child(2) { top: 0; right: 0; border-top-width: 2.5px; border-right-width: 2.5px; border-top-right-radius: 9px; }
.how-vf > i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 2.5px; border-left-width: 2.5px; border-bottom-left-radius: 9px; }
.how-vf > i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 2.5px; border-right-width: 2.5px; border-bottom-right-radius: 9px; }
.how-lab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--card);
  border: 1px solid var(--rule-strong);
  border-radius: 7px;
  padding: 8px 9px 5px;
  box-shadow: 0 8px 18px -12px rgba(0, 0, 0, 0.35);
}
.how-lab .qr { width: 40px; color: var(--ink); }
.how-lab .how-code { font-size: 7.5px; }
.how-beam {
  position: absolute; left: 11px; right: 11px; top: 13px; height: 2px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--accent) 55%, transparent);
  animation: how-sweep 2.4s ease-in-out infinite alternate;
}
@keyframes how-sweep { to { transform: translateY(78px); } }
.how-chips { display: flex; gap: 6px; }
.how-chips .chip { display: inline-flex; align-items: center; gap: 5px; }
.how-chips .chip .ic { width: 11px; height: 11px; }

/* step 3 — ask exchange */
.how-askv { width: 100%; padding: 0 24px; display: flex; flex-direction: column; justify-content: center; gap: 9px; }
.how-q {
  align-self: flex-end; max-width: 78%;
  background: var(--accent); color: var(--on-accent);
  font-size: 12.5px; font-weight: 500; line-height: 1.4;
  padding: 7px 12px; border-radius: 15px 15px 4px 15px;
  box-shadow: 0 6px 16px -10px color-mix(in srgb, var(--accent) 60%, transparent);
}
.how-a {
  align-self: flex-start; max-width: 90%;
  background: var(--card); border: 1px solid var(--rule);
  font-size: 12.5px; line-height: 1.45; color: var(--ink);
  padding: 9px 12px 8px; border-radius: 15px 15px 15px 4px;
}
.how-a b { font-weight: 650; }
.how-fine { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--dim); opacity: 0.85; }

/* callout + fine print */
.how-note { margin-top: clamp(30px, 5vw, 46px); display: flex; justify-content: center; }
.how-note-pill {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--card); border: 1px solid var(--rule);
  border-radius: 999px; padding: 10px 20px 10px 12px;
  box-shadow: 0 10px 28px -20px rgba(0, 0, 0, 0.25);
}
.how-note-ic {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wash-deep); color: var(--accent);
}
.how-note-ic .ic { width: 14px; height: 14px; }
.how-note-pill p { font-size: 14px; line-height: 1.5; color: var(--dim); }
.how-note-pill b { color: var(--ink); font-weight: 600; }

@media (max-width: 860px) {
  .how-steps { grid-template-columns: 1fr; gap: 30px; max-width: 480px; margin-inline: auto; }
  .how-steps::before { display: none; }
  .how-note { margin-inline: auto; max-width: 480px; }
  .how-note-pill { border-radius: 20px; padding: 12px 18px 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .how-beam { animation: none; opacity: 0; }
}


/* ===== scan ===== */

/* scan- : scanner sheet recreation. The camera field is intentionally
   theme-fixed (a live camera feed is dark either way); the sticker is
   printed paper, so it stays white with near-black ink. */
#scan .scan-cam {
  flex: 1; min-height: 0; border-radius: 10px; position: relative; overflow: hidden;
  background:
    radial-gradient(150px 150px at 50% 40%, rgba(255, 255, 255, 0.075), transparent 68%),
    linear-gradient(170deg, #292420 0%, #161310 56%, #0C0A08 100%);
}
#scan .scan-scene {
  position: absolute; left: 9%; right: 9%; top: 13%; bottom: 21%;
  border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px;
}
#scan .scan-scene::before {
  content: ""; position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 46px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.09);
}
#scan .scan-focus { position: absolute; left: 50%; top: 43%; transform: translate(-50%, -50%); }
#scan .scan-sticker {
  position: relative; width: 86px; background: #FFFFFF; border-radius: 9px;
  padding: 9px 9px 6px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}
#scan .scan-sticker .qr { color: #14110F; }
#scan .scan-code {
  margin-top: 4px; text-align: center; font-size: 7.5px; font-weight: 600;
  letter-spacing: 0.14em; color: #14110F;
}
#scan .scan-ring {
  position: absolute; left: 50%; top: 50%; width: 132px; height: 132px;
  transform: translate(-50%, -50%); color: var(--accent);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.22));
  animation: scan-seek 5.6s ease-in-out infinite;
}
#scan .scan-caught {
  position: absolute; left: 0; right: 0; bottom: 12px;
  display: flex; justify-content: center; pointer-events: none;
}
#scan .scan-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent); color: var(--on-accent);
  border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px;
  padding: 6.5px 13px; font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
  animation: scan-catch 5.6s ease-in-out infinite;
}
#scan .scan-pill .ic { width: 12px; height: 12px; stroke-width: 2.4; }
#scan .scan-entry { display: flex; gap: 8px; align-items: center; flex: none; }
#scan .scan-field {
  flex: 1; display: flex; align-items: center; gap: 4px;
  background: var(--card); border-radius: 9px; padding: 8.5px 10px;
  font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden;
}
#scan .scan-go { font-size: 12.5px; font-weight: 600; color: var(--accent-ink-surface); padding: 0 2px; }
#scan .scan-x { color: var(--dim); }
#scan .scan-d4 { transition-delay: 0.32s; }

@keyframes scan-seek {
  0%, 100% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.85; }
  22%      { transform: translate(-50%, -50%) scale(0.99); opacity: 0.95; }
  40%      { transform: translate(-50%, -50%) scale(1.04); opacity: 0.85; }
  52%, 88% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes scan-catch {
  0%, 51%  { opacity: 0; transform: translateY(9px) scale(0.92); }
  57%      { opacity: 1; transform: translateY(0) scale(1.03); }
  61%, 86% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: translateY(-5px) scale(0.97); }
}
#scan .scan-cam.scan-off .scan-ring, #scan .scan-cam.scan-off .scan-pill { animation-play-state: paused; }
#scan .scan-cam.scan-still .scan-ring, #scan .scan-cam.scan-still .scan-pill { animation: none; }
@media (prefers-reduced-motion: reduce) {
  #scan .scan-ring, #scan .scan-pill { animation: none; }
}


/* ===== tiles ===== */

/* ============ TILES / browse — sticky scroll-scrub stage ============ */

/* progress plumbing: JS writes --tls-p (0..1) inline on #tiles; every
   window below is a pure clamped function of it, so scrubbing is fully
   reversible. Without JS everything resolves to the composed 2-column
   grid state. */
#tiles {
  --tp: var(--tls-p, 0);
  --tls-wA: clamp(0, calc((var(--tp) - 0.16) / 0.12), 1);  /* 2 -> 3 columns */
  --tls-wB: clamp(0, calc((var(--tp) - 0.42) / 0.12), 1);  /* 3 -> 4 columns */
  --tls-wL: clamp(0, calc((var(--tp) - 0.64) / 0.10), 1);  /* grid -> list  */
  --tls-wX: clamp(0, calc((var(--tp) - 0.84) / 0.10), 1);  /* list -> labels*/
  --tls-gp: clamp(0, calc(var(--tp) / 0.56), 1);           /* pinch travel  */
  --tls-din: clamp(0, calc((var(--tp) - 0.03) / 0.05), 1);
  --tls-dout: clamp(0, calc((var(--tp) - 0.56) / 0.06), 1);
}

#tiles .tls-runway { position: relative; }
#tiles .tls-frame {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 6vw, 80px); align-items: center; width: 100%;
}
#tiles .tls-copy { max-width: 470px; }
#tiles .tls-copy .sec-head { margin-bottom: 26px; }
#tiles .tls-devwrap { position: relative; }

/* ---- live scrub (JS opts in with .tls-live only when >=821px wide
       and motion is allowed; everything else keeps the static flow) ---- */
#tiles.tls-live .tls-runway { height: 260vh; }
#tiles.tls-live .tls-stage {
  position: sticky; top: 0; height: 100vh;
  display: grid; place-items: center;
}
#tiles.tls-live .tls-pane, #tiles.tls-live .tls-dot { will-change: transform, opacity; }
@media (min-width: 821px) and (max-height: 740px) {
  #tiles.tls-live .device { transform: scale(0.87); }
}

@media (max-width: 820px) {
  #tiles .tls-frame { grid-template-columns: 1fr; }
  #tiles .tls-devwrap { order: -1; margin: 0 auto; }
}

/* ---- in-device chrome ---- */
#tiles .dvc-body { gap: 8px; }
#tiles .tls-srow { display: flex; align-items: center; gap: 6px; flex: none; }
#tiles .tls-search { flex: 1; font-size: 10.5px; padding: 6px 9px; }
#tiles .tls-search .ic { width: 12px; height: 12px; }
#tiles .tls-srow .chip { font-size: 9.5px; padding: 4px 9px; }
#tiles .tls-filter { width: 18px; height: 18px; color: var(--accent); flex: none; }
#tiles .tls-chips { flex: none; }
#tiles .tls-chips .chip {
  font-size: 9.5px; padding: 4px 10px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
#tiles[data-tstage="0"] .tls-c-grid,
#tiles[data-tstage="1"] .tls-c-grid,
#tiles[data-tstage="2"] .tls-c-grid,
#tiles[data-tstage="3"] .tls-c-list,
#tiles[data-tstage="4"] .tls-c-labels { background: var(--accent); color: var(--on-accent); }
#tiles .tls-count { position: relative; height: 12px; flex: none; font-size: 9px; color: var(--dim); }
#tiles .tls-count span { position: absolute; left: 2px; top: 0; }
#tiles .tls-count-tiles { opacity: calc(1 - var(--tls-wX)); }
#tiles .tls-count-labels { opacity: var(--tls-wX); }

/* ---- the crossfading panes ---- */
#tiles .tls-panes { position: relative; flex: 1; min-height: 0; }
#tiles .tls-panes::before {
  /* photo mode sits on the app's graph paper; it leaves with the grid */
  content: ""; position: absolute; inset: -4px -12px -12px;
  opacity: calc(0.75 * (1 - var(--tls-wL)));
  background-image:
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--rule) 50%, transparent) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--rule) 50%, transparent) 0 1px, transparent 1px 26px);
}
#tiles .tls-pane { position: absolute; inset: 0; transform-origin: 50% 0; }
#tiles .tls-g { display: grid; gap: 2px; align-content: start; overflow: hidden; }
#tiles .tls-g .thumb { aspect-ratio: 1; border-radius: 4px; }
#tiles .tls-pane-g2 {
  grid-template-columns: repeat(2, 1fr);
  opacity: calc(1 - var(--tls-wA));
  transform: scale(calc(1 - var(--tls-wA) * 0.338));
}
#tiles .tls-pane-g3 {
  grid-template-columns: repeat(3, 1fr);
  opacity: calc(var(--tls-wA) * (1 - var(--tls-wB)));
  transform: scale(calc(1.511 - var(--tls-wA) * 0.511 - var(--tls-wB) * 0.256));
}
#tiles .tls-pane-g3 .thumb .t-label { font-size: 7.5px; padding: 2px 4px; }
#tiles .tls-pane-g3 .thumb .t-code { display: none; }
#tiles .tls-pane-g4 {
  grid-template-columns: repeat(4, 1fr);
  opacity: calc(var(--tls-wB) * (1 - var(--tls-wL)));
  transform: scale(calc(1.344 - var(--tls-wB) * 0.344));
}

/* pinch affordance: two fingertips converging, tied to scroll */
#tiles .tls-pinch {
  position: absolute; left: 50%; top: 27%; width: 0; height: 0;
  opacity: calc(var(--tls-din) * (1 - var(--tls-dout)) * 0.62);
  pointer-events: none;
}
#tiles .tls-dot {
  position: absolute; width: 21px; height: 21px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 46%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--paper) 85%, transparent);
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.2);
}
#tiles .tls-dot-a { transform: translate(calc(-50% - 15px - 34px * (1 - var(--tls-gp))), calc(-50% - 11px - 26px * (1 - var(--tls-gp)))); }
#tiles .tls-dot-b { transform: translate(calc(-50% + 15px + 34px * (1 - var(--tls-gp))), calc(-50% + 11px + 26px * (1 - var(--tls-gp)))); }

/* list view */
#tiles .tls-pane-list {
  opacity: calc(var(--tls-wL) * (1 - var(--tls-wX)));
  transform: translateY(calc((1 - var(--tls-wL)) * 12px));
}
#tiles .tls-pane-lab {
  opacity: var(--tls-wX);
  transform: translateY(calc((1 - var(--tls-wX)) * 12px));
}
#tiles .tls-card { border: 1px solid var(--rule); }
#tiles .tls-lrow { display: flex; align-items: center; gap: 8px; padding: 6.5px 9px; position: relative; }
#tiles .tls-lrow + .tls-lrow::before {
  content: ""; position: absolute; top: 0; left: 46px; right: 0; height: 1px; background: var(--rule);
}
#tiles .tls-lthumb { width: 30px; height: 30px; border-radius: 6px; flex: none; }
#tiles .tls-ltxt { min-width: 0; display: grid; gap: 1px; }
#tiles .tls-ltxt b { font-size: 10px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tiles .tls-lmeta, #tiles .tls-llbl { font-size: 8px; color: var(--dim); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tiles .tls-lmeta i { display: inline-block; width: 1px; height: 7px; background: var(--rule-strong); margin: 0 5px; vertical-align: -1px; }
#tiles .tls-lchev { width: 9px; height: 9px; color: var(--dim); margin-left: auto; flex: none; opacity: 0.7; }

/* labels view: label chips, tile by tile */
#tiles .tls-brow { display: flex; align-items: center; gap: 8px; padding: 6px 9px; position: relative; }
#tiles .tls-brow + .tls-brow::before {
  content: ""; position: absolute; top: 0; left: 40px; right: 0; height: 1px; background: var(--rule);
}
#tiles .tls-bthumb { width: 24px; height: 24px; border-radius: 5px; flex: none; }
#tiles .tls-btxt { min-width: 0; display: grid; gap: 3px; }
#tiles .tls-btxt b { font-size: 9px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tiles .tls-btags { display: flex; gap: 3px; flex-wrap: wrap; }
#tiles .tls-btags i {
  font-style: normal; font-size: 7.5px; font-weight: 600; line-height: 1;
  padding: 2.5px 6px; border-radius: 999px;
  background: var(--wash-deep); color: var(--ink);
}

/* thumbs get quiet per-tile variety (still abstract, token-only) */
#tiles .tls-g .thumb:nth-child(3n+2),
#tiles .tls-lrow:nth-child(3n+2) .thumb,
#tiles .tls-brow:nth-child(3n+2) .thumb { background: linear-gradient(150deg, var(--cell), var(--wash-deep) 88%); }
#tiles .tls-g .thumb:nth-child(4n+3),
#tiles .tls-lrow:nth-child(4n+3) .thumb,
#tiles .tls-brow:nth-child(4n+3) .thumb { background: linear-gradient(115deg, var(--wash-deep) 8%, var(--cell) 64%, var(--wash)); }

/* ---- static autoplay: the device cycles the pinch, List, and Labels ---- */
#tiles.tls-auto .tls-pane, #tiles.tls-auto .tls-dot,
#tiles.tls-auto .tls-count span, #tiles.tls-auto .tls-panes::before {
  transition: opacity 0.55s ease, transform 0.55s ease;
}


/* ===== ask ===== */

/* ask — plain-words answers, staged as the Tiles page in its Ask view: the
   page's one search bar IS the question box, and the answer is the content */
#ask .ask-field { display: flex; align-items: center; gap: 8px; border: 1px solid var(--rule-strong); padding: 9px 12px; font-size: 12.5px; line-height: 1.4; color: var(--ink); }
#ask .ask-fic { width: 14px; height: 14px; color: var(--accent); flex: none; }
#ask .ask-hi { width: 12px; height: 12px; color: var(--dim); flex: none; }
#ask .dvc-sec-h .ask-hi { margin-left: 4px; vertical-align: -1px; }
#ask .ask-txt { position: relative; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
#ask .ask-ph { position: absolute; left: 0; top: 0; color: var(--dim); opacity: 0; pointer-events: none; }
#ask .ask-typed { display: inline-block; min-height: 1.4em; }
#ask .ask-spin { width: 13px; height: 13px; flex: none; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#ask .ask-ans { border: 1px solid var(--rule-strong); padding: 10px 12px; }
#ask .ask-ans p { font-size: 12.5px; line-height: 1.45; color: var(--ink); }
#ask .ask-thinking { display: none; align-items: center; gap: 8px; color: var(--dim); }
/* Ask's own settings, the deleted config page's rows, under the response */
#ask .ask-sw { margin-left: auto; width: 26px; height: 16px; border-radius: 999px; background: var(--cell); border: 1px solid var(--rule); position: relative; flex: none; }
#ask .ask-sw::after { content: ""; position: absolute; top: 1px; left: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); }
#ask .ask-sw-on { background: var(--accent); border-color: var(--accent); }
#ask .ask-sw-on::after { left: auto; right: 1px; background: var(--on-accent); }
#ask .ask-foot { font-size: 9.5px; line-height: 1.4; color: var(--dim); padding: 0 12px; }
#ask .ask-note { margin-top: 22px; border-top: 1px solid var(--rule); padding-top: 14px; max-width: 44ch; }

/* animated exchange — states set by JS on .ask-stage; at rest the answer shows */
#ask .ask-anim .ask-ch { opacity: 0; position: relative; }
#ask .ask-anim .ask-ch.on { opacity: 1; }
#ask .ask-anim .ask-ch.cur::after { content: ""; position: absolute; right: -1.5px; top: 8%; height: 84%; width: 1.5px; border-radius: 1px; background: var(--accent); animation: ask-blink 1.05s linear infinite; }
#ask .ask-anim .ask-ph { transition: opacity 0.3s ease; }
#ask .ask-anim.ask-empty .ask-ph { opacity: 1; }
#ask .ask-anim .ask-ans { opacity: 0; transform: translateY(8px); transition: opacity 0.5s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1); }
/* thinking and the answer share one slot, the way the app's response section does */
#ask .ask-anim.ask-think .ask-ans, #ask .ask-anim.ask-has-ans .ask-ans { opacity: 1; transform: none; }
#ask .ask-anim.ask-think .ask-thinking { display: flex; }
#ask .ask-anim.ask-think .ask-said { display: none; }
#ask .ask-anim.ask-think .ask-spin { animation: ask-rot 0.8s linear infinite; }
#ask .ask-cut .ask-ans, #ask .ask-cut .ask-ph { transition: none !important; }
@keyframes ask-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes ask-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  #ask .ask-spin, #ask .ask-anim .ask-ch.cur::after { animation: none; }
}


/* ===== print ===== */

/* ---- print: two paper moments (sheet + drawer label) ---- */
#print .print-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 30px); align-items: stretch;
  margin-bottom: clamp(32px, 5vw, 52px);
}
.print-card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 18px;
  padding: 16px 18px 16px; display: flex; flex-direction: column;
  box-shadow: 0 16px 44px -30px rgba(0, 0, 0, 0.28);
}
.print-tagbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.print-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--dim); }
.print-tagmeta { font-size: 10.5px; color: var(--dim); display: inline-flex; align-items: center; gap: 6px; }
.print-tagmeta .ic { width: 14px; height: 14px; }

/* the minted sheet: a neat grid of die-cut labels, cropped gracefully */
.print-sheetwrap {
  max-height: 302px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 58%, rgba(0, 0, 0, 0.45) 82%, transparent 99%);
  mask-image: linear-gradient(180deg, #000 58%, rgba(0, 0, 0, 0.45) 82%, transparent 99%);
}
.print-sheet { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.print-cell {
  border: 1px solid var(--rule); border-radius: 7px; background: var(--card);
  padding: 7px 7px 6px; display: grid; justify-items: center; gap: 5px;
}
.print-cell .qr { width: 72%; color: var(--ink); }
.print-code { font-size: 9.5px; letter-spacing: 0.04em; color: var(--ink); opacity: 0.72; }
.print-hot { border-color: var(--accent); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 30%, transparent); }
.print-hot .print-code { color: var(--accent-ink-surface); opacity: 1; font-weight: 700; }

/* the drawer label: bordered box, like the printed page */
.print-label {
  border: 1.5px solid var(--ink); border-radius: 10px; background: var(--card);
  padding: 12px 14px; display: flex; gap: 14px; min-height: 152px;
}
.print-l-qr { flex: none; width: clamp(58px, 24%, 84px); color: var(--ink); align-self: flex-start; }
.print-l-body { flex: 1; min-width: 0; }
.print-l-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.print-l-code { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.07em; margin-top: 3px; }
.print-l-meta { font-size: 10px; color: var(--dim); margin-top: 3px; }
.print-l-rules { margin-top: 9px; }
.print-l-rule {
  font-size: 10.5px; color: var(--ink); min-height: 18px; padding: 3px 0 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
}
.print-l-photos { flex: none; width: 56px; display: grid; gap: 8px; align-content: start; }
.print-l-photos .thumb { aspect-ratio: 1; }

/* section toggles hide their region, like the app's live preview */
.print-label.print-off-title .print-l-title { display: none; }
.print-label.print-off-qr .print-l-qr, .print-label.print-off-qr .print-l-code { display: none; }
.print-label.print-off-meta .print-l-meta { display: none; }
.print-label.print-off-labels .print-l-rules { display: none; }
.print-label.print-off-photos .print-l-photos { display: none; }

/* the designer's knobs, echoing TilePrintView */
.print-knobs { margin-top: 12px; display: grid; gap: 9px; }
.print-krow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.print-klab { font-size: 11px; font-weight: 600; color: var(--dim); }
.print-seg { display: inline-flex; background: var(--cell); border-radius: 8px; padding: 2px; gap: 2px; }
.print-seg span { font-size: 11px; font-weight: 600; padding: 3px 12px; border-radius: 6px; color: var(--dim); }
.print-seg .print-seg-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16); }
.print-knob { cursor: pointer; }
.print-knob:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* museum-placard captions inside each card */
.print-plaque { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); display: grid; gap: 7px; }
.print-plaque p { font-size: 13.5px; line-height: 1.5; color: var(--dim); }
.print-plaque b { color: var(--ink); font-weight: 600; }

/* help points: three across */
.print-points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 28px); }

@media (max-width: 860px) {
  #print .print-stage { grid-template-columns: minmax(0, 1fr); }
  .print-points { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .print-card { padding: 14px; }
  .print-sheet { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .print-l-photos { width: 48px; }
}


/* ===== organize ===== */

/* ORGANIZE — Groups & Zones beside the filter drawer */
.org-stage { display: flex; align-items: center; justify-content: center; }

.org-stage .org-panel {
  width: 208px; flex: none; position: relative; z-index: 2; top: 18px; margin-left: -56px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 16px;
  padding: 12px 10px; box-shadow: -12px 20px 48px -16px rgba(0, 0, 0, 0.3);
}
.org-phead { display: flex; align-items: baseline; justify-content: space-between; padding: 2px 4px 6px; }
.org-ptitle { font-size: 13.5px; font-weight: 650; }
.org-clear { font-size: 11.5px; font-weight: 600; color: var(--accent-ink-surface); }
.org-slab {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 4px 6px; font-size: 9px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--dim);
}
.org-cv { width: 9px; height: 9px; transform: rotate(-90deg); color: var(--dim); }
.org-fcard { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.org-frow { display: flex; align-items: center; gap: 9px; padding: 9px 11px; font-size: 11.5px; position: relative; }
.org-frow + .org-frow::before { content: ""; position: absolute; top: 0; left: 35px; right: 0; height: 1px; background: var(--rule); }
.org-fnum { margin-left: auto; font-size: 10px; color: var(--dim); }
.org-ck {
  width: 15px; height: 15px; border-radius: 4.5px; border: 1.2px solid var(--rule-strong);
  flex: none; display: grid; place-items: center;
}
.org-ck-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.org-ck .ic { width: 9px; height: 9px; stroke-width: 2.6; }
.org-frow-on .org-fname { font-weight: 600; }
.org-off .org-fname, .org-off .org-fnum { color: color-mix(in srgb, var(--dim) 55%, transparent); }
.org-off .org-ck { border-color: var(--rule); }

.org-note { margin-top: 18px; max-width: 46ch; }

@media (max-width: 560px) {
  .org-stage { flex-direction: column; }
  .org-stage .org-panel { top: 0; margin: -185px -12px 0 0; align-self: flex-end; }
}
@media (max-width: 360px) {
  .org-stage .org-panel { margin-top: -150px; }
}

@media (prefers-reduced-motion: no-preference) {
  .org-panel.reveal { transform: translateX(30px); }
  .org-panel.reveal.in { transform: none; }
  .org-panel.reveal.in .org-ck-on .ic { animation: org-pop 0.4s cubic-bezier(0.3, 0, 0.2, 1) 0.7s both; }
  @keyframes org-pop { from { opacity: 0; transform: scale(0.3); } }
}


/* ===== data ===== */

/* data — backup & restore */
.data-flow-cap { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); margin-bottom: 16px; }
.data-flow { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; }
.data-zipwrap { grid-column: 1; grid-row: 1; display: grid; justify-items: center; gap: 9px; margin-right: 6px; }
.data-zipglyph { width: 64px; height: 64px; border-radius: 16px; background: var(--card); border: 1px solid var(--rule); display: grid; place-items: center; color: var(--accent); }
.data-zipglyph svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.data-zipname { font-size: 10.5px; line-height: 1.5; color: var(--dim); text-align: center; max-width: 118px; }
.data-fan { grid-column: 2; grid-row: 1; width: 44px; height: 182px; }
.data-fan.reveal { transform: none; }
.data-fan circle { fill: var(--accent); }
.data-fan path { fill: none; stroke: color-mix(in srgb, var(--accent) 45%, var(--rule-strong)); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.95s cubic-bezier(0.2, 0.6, 0.2, 1) 0.3s; }
.data-fan.in path { stroke-dashoffset: 0; }
.data-files { grid-column: 3; grid-row: 1; list-style: none; display: grid; grid-auto-rows: 38px; gap: 10px; }
.data-file { display: flex; align-items: center; gap: 8px; width: max-content; max-width: 100%; min-width: 0; padding: 0 12px; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--ink); }
.data-file .ic { width: 14px; height: 14px; color: var(--accent); flex: none; }
.data-file .data-fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-more { grid-column: 3; grid-row: 2; margin-top: 12px; font-size: 11.5px; line-height: 1.5; color: var(--dim); }
.data-fd1 { transition-delay: 0.12s; }
.data-fd2 { transition-delay: 0.2s; }
.data-fd3 { transition-delay: 0.28s; }
.data-fd4 { transition-delay: 0.36s; }
.data-fd5 { transition-delay: 0.46s; }
.data-points { margin-top: clamp(34px, 5vw, 52px); }

/* in-device: the Backup page — the site's name is its section header, so it
   keeps its own capitalisation rather than the uppercase list-header idiom */
#data .dvc-sec-h { text-transform: none; letter-spacing: 0.01em; font-size: 11px; }
.data-grp { display: grid; gap: 5px; }
.data-note { font-size: 9.5px; line-height: 1.38; color: var(--dim); padding: 0 12px; }

@media (max-width: 430px) {
  .data-zipglyph { width: 52px; height: 52px; border-radius: 13px; }
  .data-zipglyph svg { width: 27px; height: 27px; }
  .data-zipname { font-size: 9.5px; max-width: 92px; }
  .data-fan { width: 26px; }
  .data-file { font-size: 11px; padding: 0 9px; gap: 6px; }
}
@media (max-width: 352px) {
  .data-note { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .data-fan path { stroke-dashoffset: 0; transition: none; }
  .data-fd1, .data-fd2, .data-fd3, .data-fd4, .data-fd5 { transition-delay: 0s; }
}


/* ===== share ===== */

/* Share — a short breather: two mirrored phones, one household */
.share-sec { padding: clamp(48px, 7vw, 84px) 24px; }
.share-duo {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.share-copy { max-width: 460px; }
.share-copy .sec-head { margin-bottom: 24px; }
.share-copy .sec-head p.lede { font-size: clamp(16px, 2vw, 18px); }

/* stage: You | arc | Your household */
.share-stage {
  --shs: 0.72;
  --shg: clamp(30px, 4vw, 56px);
  --shph: calc(634px * var(--shs));
  --shpw: calc(300px * var(--shs));
  position: relative; display: flex; justify-content: center; align-items: flex-start;
  gap: var(--shg); padding-top: 14px;
}
.share-col { position: relative; z-index: 1; display: grid; justify-items: center; }
.share-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px;
  border-radius: 999px; font-size: 12px; font-weight: 600; margin-bottom: 12px; white-space: nowrap;
}
.share-tag .ic { width: 13px; height: 13px; }
.share-tag-you { background: var(--accent); color: var(--on-accent); }
.share-tag-house { background: var(--wash-deep); color: var(--accent-ink); }
.share-tag-house .ic { color: var(--accent); }

/* the miniature device: true 0.72 scale of the shared 300x634 frame */
.share-ph { width: calc(300px * var(--shs)); height: var(--shph); position: relative; }
.share-ph .device {
  width: 300px; position: absolute; top: 0; left: 0;
  transform: scale(var(--shs)); transform-origin: top left;
}
/* the Sites list open over Home — the one surface where the app states
   shared-ness: the person glyph plus the participant count, on the site's
   own card, beside the counts every phone in the house sees the same */
.share-ph .dvc-pill .sd-cv { transform: rotate(180deg); }
/* the dropdown's own scrim. `--bezel` rather than `--ink`: a scrim dims in
   BOTH schemes, and --ink inverts, so in dark it would wash the page pale */
.share-ph .dvc-body.sd-body { padding: 8px 10px 12px; background: color-mix(in srgb, var(--bezel) 26%, transparent); }
.sd-panel { background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 14px; overflow: hidden; flex: none; }
.sd-card {
  display: flex; align-items: center; gap: 6px; margin: 8px; padding: 8px;
  background: var(--card); border: 1.5px solid var(--accent); border-radius: 12px;
  overflow: hidden;
}
.sd-main { flex: 1; min-width: 0; display: grid; gap: 7px; }
.sd-name { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; color: var(--ink); }
.sd-tick { width: 11px; height: 11px; color: var(--accent); flex: none; }
.sd-share { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 500; color: var(--dim); }
.sd-share .ic { width: 11px; height: 11px; }
.sd-counts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; column-gap: 9px; row-gap: 5px; }
.sd-cell { display: inline-flex; align-items: center; gap: 3px; font-size: 9.5px; color: var(--ink); white-space: nowrap; }
.sd-cell .ic { width: 10px; height: 10px; color: var(--accent); flex: none; }
.sd-acts { display: flex; align-items: center; gap: 7px; flex: none; }
.sd-acts .ic { width: 15px; height: 15px; color: var(--accent); }
.sd-foot { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--rule); }
.sd-foot .ic { width: 14px; height: 14px; color: var(--accent); }
.sd-gap { flex: 1; }

/* the connecting arc: springs from behind the "You" chip, lands behind "Your household" */
.share-arc {
  position: absolute; top: 2px; height: 36px;
  left: calc(50% - (var(--shpw) + var(--shg)) / 2);
  width: calc(var(--shpw) + var(--shg));
  color: var(--accent); overflow: visible; z-index: 0;
}
.share-arc path {
  fill: none; stroke: currentColor; stroke-linecap: round; vector-effect: non-scaling-stroke;
}
.share-arc-base { stroke-width: 2; stroke-dasharray: 0.5 7; opacity: 0.5; }
.share-arc-pulse { stroke-width: 2.5; stroke-dasharray: 26 426; stroke-dashoffset: 226; opacity: 0; }
.share-stage.in .share-arc-pulse { animation: share-pulse 4.6s ease-in-out 1s infinite; }
@keyframes share-pulse {
  0%   { stroke-dashoffset: 226;  opacity: 0; }
  8%   { opacity: 0.95; }
  40%  { opacity: 0.95; }
  50%  { stroke-dashoffset: -226; opacity: 0; }
  100% { stroke-dashoffset: -226; opacity: 0; }
}
.share-sync {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: -6px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--rule);
  display: grid; place-items: center; z-index: 2;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.share-sync .ic { width: 13px; height: 13px; color: var(--accent); transform: rotate(90deg); }

@media (max-width: 1120px) { .share-stage { --shs: 0.62; } }
@media (max-width: 900px) {
  .share-duo { grid-template-columns: 1fr; gap: 36px; }
  .share-stage { order: -1; }
  .share-copy { max-width: 560px; }
}
@media (max-width: 540px) { .share-stage { --shs: 0.5; } }
@media (max-width: 420px) {
  .share-stage { --shs: 0.4; --shg: 22px; }
  .share-tag { font-size: 11px; padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .share-stage.in .share-arc-pulse { animation: none; }
}


/* ===== close ===== */

/* close — personalize · privacy · get */

/* personal */
#personal .sec-head { margin-left: auto; margin-right: auto; text-align: center; }
.close-demo { display: grid; justify-items: center; gap: 26px; }
.close-appicon { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.3); }
.close-appicon .o { width: 35px; height: 35px; }
.close-appicon .m { width: 20px; height: 20px; }
.close-appicon .i { width: 9px; height: 9px; }
#personal .sw-row { justify-content: center; flex-wrap: wrap; margin: 0 auto; }
.close-wink { margin-top: 26px; text-align: center; font-size: 15px; line-height: 1.5; color: var(--dim); }
.close-wink [data-accent-name] { color: var(--accent-ink-surface); font-weight: 600; }
@media (max-width: 470px) {
  #personal .sw-row { max-width: 232px; }
}
/* appearance — the same Home in both schemes, side by side */
/* Each frame forces its own color-scheme, and that is the whole reason
   tokens.css authors every value with light-dark(): a media query evaluates
   once per DOCUMENT, so the media-query form flipped the UA surfaces under a
   frame and left every token exactly where it was. The accent is deliberately
   NOT forced — it stays the visitor's in both frames, and it could not be
   varied per frame anyway, because --wash-deep substitutes var(--accent) where
   it is DECLARED, on :root, while light-dark() resolves where it is USED. */
.ap-stage {
  --aps: 0.72;
  --apg: clamp(30px, 4vw, 56px);
  display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-start;
  gap: var(--apg);
}
.ap-col { display: grid; justify-items: center; min-width: 0; }
.ap-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px;
  border-radius: 999px; font-size: 12px; font-weight: 600; margin-bottom: 12px;
  white-space: nowrap; background: var(--wash-deep); color: var(--accent-ink);
}

/* the miniature device: a true scale of the shared 300x634 frame, the same way
   .share-ph does it, so the two sections read as one page */
.ap-ph { width: calc(300px * var(--aps)); height: calc(634px * var(--aps)); position: relative; }
/* body sets `color: var(--ink)` and every surface inside the frame inherits it.
   Inheritance carries a value that was already RESOLVED out on <body>, in the
   visitor's scheme — so without this line a forced-light frame renders light
   paper under dark text whenever the visitor is in dark. Restating body's own
   declaration at the frame boundary re-resolves it inside the forced scheme;
   `background` needs no such line because it is not inherited. */
.ap-ph { color: var(--ink); }
.ap-ph .device {
  width: 300px; position: absolute; top: 0; left: 0;
  transform: scale(var(--aps)); transform-origin: top left;
}
.ap-ph[data-scheme="light"] { color-scheme: light; }
.ap-ph[data-scheme="dark"]  { color-scheme: dark; }

/* narrow: the pair SHRINKS. It never wraps and never stacks — one phone above
   the other is no longer a comparison, and the comparison is the section */
@media (max-width: 1120px) { .ap-stage { --aps: 0.62; } }
@media (max-width: 820px)  { .ap-stage { --aps: 0.54; } }
@media (max-width: 620px)  { .ap-stage { --aps: 0.44; --apg: clamp(16px, 4vw, 30px); } }
@media (max-width: 420px)  {
  .ap-stage { --aps: 0.38; --apg: 14px; }
  .ap-tag { font-size: 11px; padding: 0 10px; }
}


/* privacy */
.close-pp { max-width: 560px; }
#privacy .points { gap: 18px; }
.close-priv-link {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 28px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  /* #privacy is .sec-alt, so this link inherits the global a{--accent} onto a
     --wash ground and is the one body link on the page that does. */
  color: var(--accent-ink);
}
.close-priv-link .ic { width: 15px; height: 15px; color: var(--accent); transition: transform 0.18s ease; }
.close-priv-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.close-priv-link:hover .ic { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  .close-priv-link .ic { transition: none; }
  .close-priv-link:hover .ic { transform: none; }
}

/* get */
.close-get { display: grid; justify-items: center; text-align: center; }
.close-getmark { margin-bottom: 26px; }
.close-get-h { font-size: clamp(32px, 6vw, 56px); line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; }
.close-get-lede { margin-top: 14px; }
.close-get-cta { margin-top: 32px; }
#get .cta .ic { width: 18px; height: 18px; }
.close-get-meta { margin-top: 22px; }
