/*
  Alfred's landing page. Colours come only from tokens.css (the app's file). Type, radii, lines and motion follow the
  app's style guide (Alfred repo, docs/design/style.md): system fonts, three weights, few lines, one easing curve,
  at most one solid colour per region, shadows only on things that float.
*/
/* The wordmark and the English headline: Geist Serif 1.9.2 by Vercel with Andrés Briganti and Mark Davis,
   github.com/vercel/geist-font, SIL Open Font License 1.1 (fonts/GeistSerif-OFL.txt). One weight, no italic, no
   Chinese: never for body text, and Chinese headings stay in the system font. */
@font-face {
  font-family: "Geist Serif";
  src: url("fonts/GeistSerif-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --serif: Georgia, "Songti SC", STSong, serif;
  --display: "Geist Serif", Georgia, serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --w: 1120px;
  --gut: clamp(20px, 4vw, 40px);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, p, ul, ol, dl, dd, figure, pre { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
:focus-visible { outline: 2px solid var(--alf); outline-offset: 3px; border-radius: 6px; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: min(var(--w), 100% - 2 * var(--gut)); margin-inline: auto; }
kbd { font: .6875rem var(--mono); color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ── Controls ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise); font-size: .9375rem; font-weight: 550; white-space: nowrap; transition: border-color 160ms var(--ease), filter 160ms var(--ease), transform 160ms var(--ease); }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.98); }
.btn.solid { border-color: transparent; background: var(--alf-solid); color: var(--on-alf); }
.btn.solid:hover { filter: brightness(1.08); }
.btn.sm { height: 30px; padding: 0 12px; border-radius: 8px; font-size: .8125rem; }
.text-link { color: var(--alf); font-size: .9375rem; font-weight: 550; text-underline-offset: 4px; }
.text-link:hover { text-decoration: underline; }

/* ── Top bar: the app's, 52px ── */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in oklab, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line-soft); }
.top-in { display: flex; align-items: center; gap: 28px; height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.brand svg { display: block; overflow: visible; }
.wordmark { font: 1.375rem/1 var(--display); letter-spacing: .01em; }
.top-nav { display: flex; gap: 22px; margin-left: 8px; font-size: .875rem; color: var(--muted); }
.top-nav a:hover { color: var(--ink); }
.top-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.tool { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.tool:hover { background: var(--wash); color: var(--ink); }
.tool.icon { width: 30px; padding: 0; justify-content: center; }
.mac-nav { display: flex; align-items: center; gap: 4px; min-height: 40px; margin-left: 6px; padding: 2px 7px 2px 3px; border-radius: 9px; white-space: nowrap; }
.mac-nav:hover { background: var(--wash); }
.mac-nav img, .mac-release img { display: block; flex: none; filter: drop-shadow(0 1px 2px oklch(0 0 0 / .2)); }
.mac-nav span { display: grid; gap: 1px; line-height: 1.1; }
.mac-nav strong { font-size: .8125rem; font-weight: 600; }
.mac-nav small { color: var(--muted); font-size: .75rem; }
.scheme { display: flex; gap: 2px; padding: 2px; margin-inline: 4px; border-radius: 9px; background: var(--wash); }
.scheme button { display: grid; place-items: center; width: 28px; height: 24px; border-radius: 7px; color: var(--muted); transition: color 160ms var(--ease); }
.scheme button:hover { color: var(--ink); }
.scheme button[aria-pressed="true"] { background: var(--raise); color: var(--ink); box-shadow: 0 1px 2px oklch(0 0 0 / .08); }
.scheme svg { width: 14px; height: 14px; }

/* Hero and the interactive figure. */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: clamp(22px, 4vw, 56px); padding-block: clamp(32px, 4.5vw, 60px) clamp(20px, 2.5vw, 34px); }
h1 { font-size: clamp(2.45rem, 1.2rem + 3.5vw, 4.15rem); line-height: 1.02; font-weight: 650; letter-spacing: -.043em; text-wrap: balance; }
/* The English headline is set in the wordmark's face; it has one weight, so nothing here asks for bold. */
.hero h1:lang(en) { font-family: var(--display); font-weight: 400; font-synthesis: none; letter-spacing: -.022em; line-height: 1.04; }
.hero-lede { margin-top: 22px; max-width: 34ch; color: var(--copy); font-size: 1.1875rem; line-height: 1.55; text-wrap: pretty; }
.hero-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 32px; }
.hero-acts .text-link { text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--alf) 45%, transparent); text-underline-offset: 5px; }
.hero-acts .text-link:hover { text-decoration-color: var(--alf); }
.hero-meta { color: var(--muted); font-size: .8125rem; }
.hero-stage { display: grid; place-items: center; min-width: 0; }
.hero-fig { display: grid; justify-items: center; width: min(100%, clamp(225px, 26vw, 340px)); }
.hero-fig > svg { display: block; width: 100%; aspect-ratio: 1; overflow: visible; }
.hero-next { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; color: var(--muted); font-size: .8125rem; }
.hero-next svg { width: 14px; height: 14px; }
.hero-fig:enabled:is(:hover, :focus-visible) .hero-next { color: var(--alf); background: var(--alf-soft); }
.hero-fig:disabled { cursor: default; }
.hero-fig:disabled .hero-next { visibility: hidden; }
@media (max-width: 660px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-block: 32px 12px; }
  .hero h1:lang(en) { font-size: clamp(2.1rem, 8.9vw, 2.8rem); }
  .hero-fig { width: clamp(160px, 46vw, 215px); }
  .hero-intro { max-width: 650px; }
  .hero-lede { max-width: 55ch; margin-top: 15px; }
  .hero-acts { margin-top: 14px; }
}
/* A sample workspace, with the desktop companion in its usual corner. */
.desk { position: relative; margin-top: 16px; padding: 0 clamp(10px, 4vw, 56px); border-radius: 22px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-soft); overflow: hidden; }
.menubar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 30px; margin-inline: calc(-1 * clamp(10px, 4vw, 56px)); padding-inline: 16px; border-bottom: 1px solid var(--line-soft); color: var(--copy); font-size: .75rem; white-space: nowrap; }
.mb-left, .mb-right { display: flex; align-items: center; gap: 16px; min-width: 0; }
.mb-left b { color: var(--ink); font-weight: 650; }
.mb-right { gap: 10px; color: var(--ink); font-variant-numeric: tabular-nums; }
.mb-right svg { flex: none; }
.desk .win { max-width: 960px; margin: clamp(14px, 2.5vw, 28px) auto 0; }

.desk-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 960px; margin-inline: auto; padding: 8px 0; color: var(--muted); font-size: .75rem; }
.desk-foot svg { flex: none; padding: 3px; border-radius: 9px; background: var(--raise); box-shadow: 0 0 0 1px var(--line-soft); }

/* Select a sample workspace. */
.dayline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(16px, 3vw, 40px); margin-top: clamp(18px, 2vw, 28px); }
.dayline button { position: relative; display: grid; align-content: start; gap: 2px; padding-top: 14px; border-top: 2px solid var(--line-soft); color: var(--muted); transition: color 200ms var(--ease); }
.dayline button::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--alf); transform: scaleX(0); transform-origin: 0 50%; }
.dayline button[aria-selected="true"]::before { transform: scaleX(1); }
.dayline time { font: .75rem var(--mono); }
.dayline b { font-size: 1rem; font-weight: 600; }
.dayline button:hover { color: var(--copy); }
.dayline button[aria-selected="true"] b { color: var(--ink); }
.dayline button[aria-selected="true"] time { color: var(--alf); }

/* ── Sections ── */
.sec { padding-block-start: clamp(48px, 6vw, 80px); }
.hero + .sec { padding-block-start: clamp(16px, 2vw, 28px); }
main > .sec:last-child { padding-block-end: clamp(44px, 6vw, 72px); }
/* A mark on the line, as on the app's Today page: a few quiet words, then the line runs on. */
.mark { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.mark::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.sec-head { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: clamp(16px, 2vw, 26px); }
.sec-head h2 { max-width: 28ch; }
h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); line-height: 1.14; font-weight: 650; letter-spacing: -.02em; text-wrap: balance; }
.sec-head p { color: var(--copy); text-wrap: pretty; }
.sec-head .try { color: var(--muted); font-size: .9375rem; }
.sec-head .try::before { content: "→ "; color: var(--alf); }
:lang(zh) h1, :lang(zh) h2 { letter-spacing: 0; line-height: 1.2; }
/* Chinese headings break after punctuation, not in the middle of a phrase. */
:lang(zh) h1, :lang(zh) h2 { word-break: keep-all; overflow-wrap: anywhere; }
.hero h1:lang(zh) { font-size: clamp(1.85rem, 4vw, 3.2rem); text-wrap: wrap; }
.hero h1:lang(zh) span { display: block; word-break: normal; overflow-wrap: normal; line-break: strict; }

.win { --side: 184px; min-width: 0; border-radius: 14px; background: var(--bg); box-shadow: 0 0 0 1px var(--line), var(--shadow); overflow: hidden; font-size: .875rem; }
.win-top { display: flex; height: 44px; background: var(--paper); border-bottom: 1px solid var(--line-soft); }
.win-lead { flex: none; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; border-right: 1px solid var(--line-soft); color: var(--muted); }
.win-lead { width: var(--side); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.switch { display: flex; gap: 2px; padding: 2px; margin-left: auto; border-radius: 9px; background: var(--wash); }
.switch b { display: grid; place-items: center; width: 28px; height: 22px; border-radius: 7px; }
.switch svg { width: 14px; height: 14px; }
.win:not([data-view="code"]) [data-sw="daily"], .win[data-view="code"] [data-sw="code"] { background: var(--raise); color: var(--ink); box-shadow: 0 1px 2px oklch(0 0 0 / .08); }
.win-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; }
.win-title { min-width: 0; display: flex; align-items: center; gap: 8px; }
.win-title svg { color: var(--k-solid); }
.win-title b { font-weight: 650; white-space: nowrap; }
.win-title span { min-width: 0; color: var(--muted); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-main .gear { margin-left: auto; color: var(--muted); }

.win-body { position: relative; display: flex; min-height: 374px; }
.win-side { flex: none; width: var(--side); padding: 10px 8px; background: var(--paper); border-right: 1px solid var(--line-soft); overflow: hidden; }
.side-k { padding: 6px 10px 4px; color: var(--muted); font-size: .6875rem; }
.win-side ul + .side-k { margin-top: 10px; }
.win-side li { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; border-radius: 8px; font-size: .8125rem; white-space: nowrap; }
.win-side li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.win-side li svg { color: var(--k-solid, var(--muted)); }
.win-side li i { margin-left: auto; color: var(--muted); font: normal .6875rem var(--mono); }
.win-side .convs li { padding-left: 35px; color: var(--copy); }
.win-side li.cur { background: var(--wash); color: var(--ink); font-weight: 600; }
.win-page { flex: 1; min-width: 0; overflow: hidden; container: page / inline-size; }
.view { padding: 22px 24px 26px; animation: view-in 320ms var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }

/* Today: one sentence, one line of the day, one row of counts (the app's today.css, at the window's scale) */
.v-today { max-width: 600px; margin-inline: auto; }
.t-hello { color: var(--muted); font-size: .8125rem; }
.t-next { margin-top: 2px; color: var(--muted); font-size: 1.25rem; line-height: 1.4; letter-spacing: -.01em; }
.t-next b { color: var(--ink); font-weight: 600; }
.t-way { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding-top: 10px; }
.t-pill { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; background: var(--alf-solid); color: var(--on-alf); font-size: .8125rem; font-weight: 500; }
.t-where { color: var(--copy); font-size: .8125rem; }
.t-line { margin-top: 14px; }
.t-line .line-mark:first-child { margin-top: 0; }
.t-rest { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .8125rem; }
.t-rest b { color: var(--ink); font-weight: 600; }
.t-rest [data-k] b { color: var(--k-text); }
.side-today { color: var(--ink); }
.win-side li.side-today svg, .win-title .i-mark { width: 16px; height: 16px; flex: none; color: var(--alf); }
.line-mark { display: flex; align-items: center; gap: 10px; margin: 16px 0 2px; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.line-mark::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.line-mark.now { color: var(--now); font-weight: 600; }
.line-mark.now::after { background: color-mix(in oklch, var(--now) 45%, transparent); }
.row { display: grid; grid-template-columns: 46px 16px minmax(0, 1fr) auto; align-items: baseline; column-gap: 10px; padding: 6px 0; }
.row .when { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .when.guess { text-decoration: underline dashed var(--line); text-underline-offset: 4px; }
.row.wait .when { color: var(--k-text); font-weight: 600; }
.row .kind { align-self: start; margin-top: 3px; color: var(--k-solid); }
.tick { display: block; align-self: start; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; border: 1.6px solid var(--k-solid); }
.what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.what b { font-weight: 500; }
.what span { margin-left: 8px; color: var(--muted); font-size: .8125rem; }
.row .go { color: var(--alf); font-size: .8125rem; white-space: nowrap; }
.row button.go:hover { text-decoration: underline; text-underline-offset: 3px; }
.row.wait .go { font-weight: 550; }

/* Links: places as tiles (a folder previews what is in it), the shelf of videos, then a topic */
.v-links { padding-top: 18px; }
.lk-k { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; color: var(--muted); font-size: .75rem; }
.lk-k:first-child { margin-top: 0; }
.lk-k i { font: normal .6875rem var(--mono); }
.lk-edit { margin-left: auto; color: var(--alf); }
.topic { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.topic::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--k-solid); }
.places { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.places li { width: 64px; display: grid; justify-items: center; gap: 5px; color: var(--copy); font-size: .6875rem; text-align: center; }
.places li > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--k-fill, var(--wash)); color: var(--k-text, var(--muted)); font-size: .9375rem; font-weight: 650; box-shadow: inset 0 0 0 1px var(--line-soft); }
.places .add .tile { background: none; box-shadow: inset 0 0 0 1px var(--line); font-weight: 400; }
.minis { grid-template: repeat(2, minmax(0, 1fr)) / repeat(2, minmax(0, 1fr)); gap: 2px; padding: 6px; background: var(--wash); transition: box-shadow 160ms var(--ease); }
.minis:hover, .minis[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px var(--alf); }
.minis i { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 3px; background: var(--k-fill); color: var(--k-text); font: normal 600 .5rem var(--sans); }
.lk-folder { margin-top: 8px; padding: 10px 10px 8px; border-radius: 12px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line-soft); animation: view-in 260ms var(--ease); }
.lk-folder p { display: flex; gap: 8px; align-items: baseline; padding: 0 4px 8px; font-size: .8125rem; }
.lk-folder p span { color: var(--muted); font-size: .75rem; }
.shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.shelf li { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; gap: 2px 10px; min-width: 0; font-size: .8125rem; }
.shelf li > .cover { grid-row: span 2; aspect-ratio: 16 / 9; }
.shelf li > b { font-weight: 550; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.shelf li > span { color: var(--muted); font-size: .75rem; }
/* A cover drawn for the sample: the app shows the site's own, cached on the home node. */
.cover { position: relative; aspect-ratio: 16 / 7; border-radius: 10px; overflow: hidden; background: radial-gradient(120% 90% at 18% 20%, var(--k-fill), transparent 60%), linear-gradient(135deg, var(--k-solid), color-mix(in oklch, var(--k-solid) 40%, var(--ink))); }
.cover::before { content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-35%, -50%); border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent oklch(1 0 0 / .9); }
.cover i { position: absolute; right: 6px; bottom: 6px; padding: 0 5px; border-radius: 4px; background: oklch(0 0 0 / .55); color: oklch(1 0 0); font: normal .625rem/1.6 var(--mono); }
.lk-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lk-cards li { display: grid; gap: 2px; min-width: 0; padding: 9px 11px; border-radius: 10px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line-soft); font-size: .8125rem; }
.lk-cards b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-cards span { color: var(--muted); font-size: .75rem; }

/* A proposal: a dashed shadow where the change would land, and one card to answer it */
.cal-day { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.cal-day > b { display: inline-grid; place-items: center; height: 26px; padding: 0 10px; border-radius: 8px; background: var(--now); color: var(--raise); font-size: .8125rem; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); font-size: .75rem; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--k-solid); margin-left: 8px; }
.cal { display: grid; grid-template-columns: 44px minmax(0, 1fr); margin-top: 14px; }
.hours { display: grid; grid-auto-rows: 34px; color: var(--muted); font: .6875rem var(--mono); }
.hours span { transform: translateY(-.6em); }
.lane { position: relative; height: 192px; background: repeating-linear-gradient(to bottom, var(--line-soft) 0 1px, transparent 1px 34px); }
.ev { position: absolute; left: 6px; right: 6px; display: flex; flex-wrap: wrap; align-content: start; gap: 0 10px; padding: 5px 10px; border-radius: 8px; background: var(--k-fill); color: var(--k-text); font-size: .75rem; overflow: hidden; box-shadow: inset 3px 0 0 var(--k-solid); }
.ev b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev span { font-family: var(--mono); font-size: .6875rem; opacity: .8; }
.ev-lunch { top: 2px; height: 31px; }
.ev-write { top: 69px; height: 66px; }
.ev-gym { top: 138px; height: 31px; }
/* Alfred's: the area's colour stays, a dashed edge and a dot of Alfred's colour say who put it there. */
.ev.shadow { background: color-mix(in oklch, var(--k-fill) 45%, transparent); box-shadow: none; border: 1.5px dashed var(--k-line); transition: background-color 400ms var(--ease), border-color 400ms var(--ease); }
.ev .by { position: absolute; right: 9px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--k-solid); }
.v-prop[data-prop="yes"] .ev.shadow { background: var(--k-fill); border-style: solid; border-color: transparent; box-shadow: inset 3px 0 0 var(--k-solid); }
.prop { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line-soft); }
.prop-text { color: var(--copy); font-size: .8125rem; line-height: 1.5; }
.prop-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.slot-editor, .demo-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.slot-editor { margin-top: 10px; }
.slot-editor label { font-size: .8125rem; font-weight: 600; }
.slot-editor select { max-width: 100%; min-height: 30px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); font: .8125rem var(--mono); }
.demo-result p { flex-basis: 100%; color: var(--copy); font-size: .8125rem; }
.v-prop[data-prop="yes"] .demo-result p, .v-code[data-perm="yes"] .demo-result p { color: var(--ok); }
.desk .btn.sm { height: auto; min-height: 32px; padding-block: 5px; white-space: normal; }

/* A coding session: what you asked, what it read, and the edit waiting for your yes */
.you { justify-self: end; max-width: 88%; margin-left: auto; padding: 9px 13px; border-radius: 14px 14px 4px 14px; background: var(--wash); width: fit-content; }
.step { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--muted); font-size: .8125rem; }
.step + .step { margin-top: 6px; }
.step code { font: .75rem var(--mono); color: var(--copy); }
.step .k { font: .6875rem var(--mono); }
.step svg { color: var(--ok); }
.perm { margin-top: 12px; border-radius: 12px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line-soft); overflow: hidden; }
.perm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 14px; }
.perm-head b { font-weight: 600; }
.mode { margin-left: auto; padding: 1px 9px; border-radius: 999px; background: var(--wash); color: var(--copy); font-size: .6875rem; white-space: nowrap; }
.diff { padding: 8px 0; border-block: 1px solid var(--line-soft); font: .75rem/1.7 var(--mono); overflow-x: auto; }
.diff span { display: block; width: max-content; min-width: 100%; padding: 0 14px; }
.diff .del { background: color-mix(in oklch, var(--now) 11%, transparent); color: var(--copy); }
.diff .add { background: color-mix(in oklch, var(--ok) 14%, transparent); color: var(--ink); }
.perm-acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
.v-code[data-perm="yes"] .del, .v-code[data-perm="no"] .add { display: none; }
.v-code[data-perm="no"] .del { background: none; }
.perm .demo-result { padding: 12px 14px; }
.v-code[data-perm="yes"] .mode { visibility: hidden; }

@container page (max-width: 420px) {
  .view { padding-inline: 16px; }
  .row { grid-template-columns: 40px 16px minmax(0, 1fr); }
  span.go { display: none; }
  .row button.go { grid-column: 3; justify-self: start; }
  .what span { display: none; }
  .shelf, .lk-cards { grid-template-columns: minmax(0, 1fr); }
  .lk-cards li + li { display: none; }
}

/* Three views of the devices in a home setup. */
#setup { margin-block-start: clamp(48px, 6vw, 80px); padding-block-start: 0; }
.setup-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 32px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.setup-heading p { max-width: 50ch; color: var(--copy); text-wrap: pretty; }
.setup-devices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(20px, 2.5vw, 32px); border-block: 1px solid var(--line); background: var(--paper); }
.setup-device { padding: clamp(16px, 2vw, 28px); }
.setup-device + .setup-device { border-inline-start: 1px solid var(--line); }
.setup-device > svg { display: block; width: min(100%, 260px); height: auto; margin-inline: auto; color: var(--ink); }
.setup-device figcaption { margin-top: 16px; }
.setup-device h3 { margin: 0; font-size: 1.1875rem; line-height: 1.3; font-weight: 600; }
.setup-device p { margin-top: 6px; color: var(--copy); font-size: .9375rem; line-height: 1.5; text-wrap: pretty; }
@media (max-width: 700px) {
  .setup-devices { grid-template-columns: 1fr; }
  .setup-device { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: clamp(8px, 2vw, 16px); padding: 16px 12px 16px 4px; }
  .setup-device + .setup-device { border-inline-start: 0; border-top: 1px solid var(--line); }
  .setup-device figcaption { margin-top: 0; }
}
@media (max-width: 360px) {
  .setup-device { grid-template-columns: 1fr; padding: 16px; }
  .setup-device > svg { width: min(100%, 210px); }
}

/* ── How it's built: the diagram, and what it holds to ── */
.built { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px clamp(28px, 5vw, 72px); margin-top: clamp(24px, 4vh, 40px); align-items: center; }
.built-head p { margin-top: 14px; max-width: 38ch; color: var(--copy); text-wrap: pretty; }
.arch { display: grid; font-size: .875rem; }
.tier { padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--line); }
.tier.node { border: 0; background: var(--raise); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.tier-k { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.tier-k svg { flex: none; overflow: visible; }
.tier-k span { font-weight: 650; }
.tier-k em { margin-left: auto; color: var(--muted); font-size: .75rem; font-style: normal; }
.tier ul { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tier li { padding: 3px 10px; border-radius: 999px; background: var(--wash); color: var(--copy); font-size: .8125rem; white-space: nowrap; }
.tier dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 12px; border-radius: 10px; overflow: hidden; background: var(--line-soft); box-shadow: 0 0 0 1px var(--line-soft); }
.tier dl div { padding: 9px 12px; background: var(--raise); }
.tier dt { color: var(--alf); font-size: .8125rem; font-weight: 600; }
.tier dd { color: var(--muted); font-size: .75rem; line-height: 1.45; }
.wire { position: relative; padding: 9px 0 9px 34px; color: var(--muted); font: .6875rem var(--mono); }
.wire::before { content: ""; position: absolute; left: 20px; top: 0; bottom: 0; width: 1px; background: var(--line); }


/* ── Questions ── */
.faq { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px clamp(28px, 5vw, 72px); margin-top: clamp(24px, 4vh, 40px); align-items: start; }
.qa details { border-top: 1px solid var(--line-soft); }
.qa details:last-child { border-bottom: 1px solid var(--line-soft); }
.qa summary { position: relative; display: block; padding: 16px 36px 16px 0; font-weight: 550; cursor: pointer; list-style: none; transition: color 160ms var(--ease); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform 220ms var(--ease); }
.qa details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.qa summary:hover { color: var(--alf); }
.qa details p { max-width: 58ch; padding: 0 0 18px; color: var(--copy); line-height: 1.6; text-wrap: pretty; animation: view-in 260ms var(--ease); }

/* ── Install: the app's icon, its name, and when. A closing note, centred. ── */
.release { display: grid; justify-items: center; gap: 6px; margin-top: clamp(32px, 6vh, 56px); text-align: center; }
.release img { display: block; margin-bottom: 12px; filter: drop-shadow(0 2px 6px oklch(0 0 0 / .18)); }
.release p { color: var(--copy); font-size: 1.0625rem; }
.release .release-meta { margin-top: 10px; color: var(--muted); font-size: .8125rem; }

/* ── Foot ── */
.foot { border-top: 1px solid var(--line-soft); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding-block: 26px 34px; color: var(--muted); font-size: .8125rem; }
.foot .wordmark { color: var(--ink); font-size: 1.125rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-left: auto; }
.foot nav a:hover { color: var(--ink); }

/* ── Narrower ── */
@media (max-width: 940px) {
  .top-nav { display: none; }
  .built, .faq { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .win { --side: 0px; }
  .win-body { min-height: 0; }
  .win-side { display: none; }
  .win-lead { width: auto; }
  .side-btn, .mb-left span { display: none; }
  .dayline { gap: 8px; }
  .dayline button { padding: 10px 2px 6px; }
  .desk .btn.sm, .slot-editor select { min-height: 40px; }
}
@media (max-width: 420px) {
  .top-in { gap: 6px; }
  .top-tools .tool { padding-inline: 5px; }
  .mac-nav { gap: 2px; margin-left: 2px; padding-inline: 0; }
  .mac-nav img { width: 28px; height: 28px; }
  .win-title span { display: none; }
  .foot nav { margin-left: 0; }
  .scheme { margin-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
