/* Spellfill website. The system is the taste-skill kit in /assets/kit (system.css and friends); this
   file holds the self-hosted face, the palette block exactly as `start.mjs brand` printed it from the
   app's own colours (shared/design-tokens.json), and page CSS that sits only inside a visual. */

@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/assets/fonts/manrope-vietnamese.woff2) format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/assets/fonts/manrope-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/assets/fonts/manrope-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --p-bg: #faebd7; --p-surface: #fffdf8; --p-ink: #372301; --p-muted: #6b5a44;
  --p-accent: #5e6b2e; --p-accent-ink: #faebd7; --p-action: #5e6b2e; --p-action-ink: #faebd7;
  --p-inv-bg: #372301; --p-inv-surface: #432f0f; --p-inv-ink: #faebd7; --p-inv-muted: #b19f87;
  --p-inv-accent: #faebd7; --p-inv-accent-ink: #372301; --p-inv-action: #faebd7; --p-inv-action-ink: #372301;
  --font-display: "Manrope", system-ui, sans-serif;
  --font-text: "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 500;
  --display-tracking: -0.035em;
  --display-tracking-xl: -0.045em;
  --ly-scale: 0.97;
}

/* The app's own tile colours, used only inside the drawn UI below. */
:root {
  --sf-tile: #f8e7c3; --sf-tile-b: #f8d9ad; --sf-tile-edge: #ba8a61; --sf-slot: #fef1cf; --sf-slot-frame: #787f46;
  --sf-tray: #7c8a4c; --sf-reward: #e2a31f; --sf-blue: #3f7fd1;
}


/* a phone screen: the app's own screenshot with the device's corners */
.phone { display: block; width: var(--phone-w, 300px); max-width: none; height: auto; aspect-ratio: 1206 / 2622;
  border-radius: calc(var(--phone-w, 300px) * .11); border: 6px solid var(--p-ink); background: var(--p-ink);
  box-shadow: 0 24px 48px -24px color-mix(in oklab, var(--p-ink) 45%, transparent); }

/* hero: two screens of the app cut by the frame's right and bottom edges, one result card over them */
.hero__art .ly-piece--main { display: flex; gap: var(--s-5); align-items: flex-start; --phone-w: 330px; }
.hero__art .ly-piece--main > .phone + .phone { margin-top: var(--s-8); }
@media (max-width: 1279px) { .hero__art .ly-piece--main { --phone-w: 280px; } }
@media (max-width: 639px) { .hero__art .ly-piece--main { --phone-w: 240px; } }
.hz-card { left: var(--s-6); bottom: var(--s-6); width: 300px; padding: var(--s-5); display: grid; gap: var(--s-3);
  background: var(--p-surface); color: var(--p-ink); border-radius: var(--r-md);
  border: 1px solid color-mix(in oklab, var(--p-ink) 12%, transparent);
  box-shadow: 0 20px 40px -20px color-mix(in oklab, var(--p-ink) 40%, transparent); }
.hz-card__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.hz-card__row b { font-size: var(--t-small); font-weight: 500; color: var(--p-muted); }
.hz-chip { font-size: var(--t-label); font-weight: 500; padding: 2px 10px; border-radius: 999px;
  background: color-mix(in oklab, var(--p-accent) 16%, var(--p-surface)); color: var(--p-accent); }
.hz-word { display: flex; gap: 4px; }
.hz-word > span { flex: 1 1 0; display: grid; place-items: center; height: 34px; border-radius: 6px; font-weight: 500;
  background: var(--sf-tile); box-shadow: inset 0 -3px 0 var(--sf-tile-edge); color: var(--p-ink); }
.hz-word > span.is-new { background: color-mix(in oklab, var(--p-accent) 22%, var(--sf-tile)); }
.hz-card p { margin: 0; font-size: var(--t-small); line-height: 1.5; color: var(--p-ink); }
.hz-card p i { font-style: normal; color: var(--p-muted); }

/* the app frame: the mode list beside an open Classic puzzle, drawn as live HTML in the app's colours */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list::after { display: none; }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}
#modes .app { --fx-bg: var(--p-surface); --fx-ink: var(--p-ink); --fx-muted: var(--p-muted); --fx-accent: var(--p-accent); --ui-radius: var(--r-lg); }
.ml__head, .pz__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--u-line); font-size: var(--t-small); font-weight: 500; }
.ml__head span, .pz__head span { color: var(--u-muted); font-weight: 400; }
.ml { list-style: none; margin: 0; padding: 0; }
.ml > li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--u-line); }
.ml > li.is-on { background: var(--u-tint); }
.ml__tile { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; font-weight: 500;
  background: var(--sf-tile); box-shadow: inset 0 -3px 0 var(--sf-tile-edge); color: var(--p-ink); }
.ml b { display: block; font-weight: 500; font-size: var(--t-body); }
.ml small { display: block; color: var(--u-muted); font-size: var(--t-label); line-height: 1.4; }
.ml em { font-style: normal; font-size: var(--t-label); font-weight: 500; color: var(--u-accent-text); white-space: nowrap; }

.pz { display: grid; gap: var(--s-6); padding: var(--s-7) var(--s-7) var(--s-8); }
.pz__slots, .pz__tray { display: flex; gap: var(--s-2); justify-content: center; }
.pz__slots > span, .pz__tray > span { display: grid; place-items: center; width: 52px; height: 58px; border-radius: 8px;
  font-size: 24px; font-weight: 500; color: var(--p-ink); }
.pz__slots > span { background: var(--sf-tile); box-shadow: inset 0 -4px 0 var(--sf-tile-edge); }
.pz__slots > span.is-slot { background: var(--sf-slot); box-shadow: inset 0 0 0 2px var(--sf-slot-frame); }
.pz__slots > span.is-slot > i { font-style: normal; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 8px;
  background: color-mix(in oklab, var(--p-accent) 20%, var(--sf-tile)); box-shadow: inset 0 -4px 0 var(--sf-tile-edge); }
.pz__tray { padding: var(--s-4); border-radius: var(--r-md); background: var(--sf-tray); width: fit-content; margin-inline: auto; }
.pz__tray > span { background: var(--sf-tile); box-shadow: inset 0 -4px 0 var(--sf-tile-edge); }
.pz__card { display: grid; gap: var(--s-2); padding: var(--s-5) var(--s-6); border-radius: var(--r-md); background: var(--p-bg); }
.pz__card h4 { margin: 0; font-size: var(--t-card); font-weight: 500; }
.pz__card h4 small { font-size: var(--t-small); font-weight: 400; color: var(--u-muted); font-style: italic; margin-left: var(--s-2); }
.pz__card p { margin: 0; font-size: var(--t-body); }
.pz__ipa { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--t-small); }
.pz__ipa span b { display: inline-block; margin-right: var(--s-2); padding: 0 6px; border-radius: 4px; font-size: var(--t-label); font-weight: 500;
  background: color-mix(in oklab, var(--sf-blue) 18%, var(--p-surface)); color: #23518f; }
.pz__card p.pz__ex { color: var(--u-muted); font-style: italic; font-size: var(--t-small); }
@media (max-width: 639px) {
  .pz { padding: var(--s-5); gap: var(--s-5); }
  .pz__card .pz__ex { display: none; }
  .pz__slots, .pz__tray { gap: 4px; }
  .pz__slots > span, .pz__tray > span { width: 30px; height: 38px; font-size: 16px; }
}

/* features: each card's panel holds one screen of the app, rising out of the panel's bottom */
#learn .panel { --p-h: 336px; }
.panel .shot-rise { position: absolute; left: 50%; top: var(--s-7); bottom: calc(-1 * var(--s-7)); translate: -50% 0; width: 280px; overflow: hidden;
  border: 6px solid var(--p-ink); border-radius: 30px; background: var(--p-ink);
  box-shadow: 0 24px 48px -24px color-mix(in oklab, var(--p-ink) 45%, transparent); }
.panel .shot-rise > img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 0; }
.panel .shot-rise--low > img { object-position: 50% 100%; }
/* a short laptop screen and a phone hold the four cards in two screens with lower panels */
@media (min-width: 1024px) and (max-height: 820px) { #learn .panel { --p-h: 260px; } }
@media (max-width: 639px) { #learn .panel { --p-h: 200px; } .panel .shot-rise { width: 220px; top: var(--s-4); } }

/* the close's name, set by hand to run from the left line to the right line (Manrope is about 3 em wide), but never
   taller than the footer's one screen leaves it: the padding, the head row, the links and the gaps take about
   600px, so a wide, short window (1533x809) sets it by height instead of overlapping the links */
.close__word { line-height: 1.12;
  font-size: max(56px, min(calc((100vw - 2 * var(--gut)) / 3.08), calc((100svh - 600px) / 1.12), 416px)); }

/* Word Chain: the match beside its monthly leaderboard, cut by the frame's bottom */
#chain .frame--split > .stage > .at-corner { --ax: var(--s-8); --ay: var(--s-8); display: flex; gap: var(--s-5); align-items: flex-start; --phone-w: 260px; }
#chain .frame--split > .stage > .at-corner > .phone + .phone { margin-top: var(--s-8); }
@media (max-width: 1279px) { #chain .frame--split > .stage > .at-corner { --phone-w: 220px; } }
@media (max-width: 639px) { #chain .frame--split > .stage > .at-corner { --ax-sm: var(--s-5); --phone-w: 200px; } }
#chain [data-moment] { margin-top: var(--s-7); }
@media (min-width: 1024px) { #chain .frame--split { --ratio: 92%; } }
/* a short laptop screen (1366x657): a lower frame keeps the frame and the moving row on one screen */
@media (min-width: 1024px) and (max-height: 760px) { #chain .frame--split { --ratio: 56%; } }

/* under 360px the logo, the main button and the menu button do not fit one bar: the button waits in the sheet
   (the hero shows it on the first screen) */
@media (max-width: 359px) { .nav:not(.is-open) .nav__actions { display: none; } .nav:not(.is-open) .nav__toggle { margin-left: auto; } }

/* the language switch in the bar: a plain word, the same height as the button */
.nav__actions > .nav__link[hreflang] { white-space: nowrap; }

/* policy and support pages: a reading column in normal flow (they are long documents, not screens) */
.doc { padding: calc(var(--nav) + var(--s-8)) 0 var(--s-9); }
.doc .wrap > * { max-width: 760px; }
.doc h1 { font-size: var(--t-h2); margin: var(--s-3) 0 var(--s-5); }
.doc h2 { font-size: var(--t-h3); margin: var(--s-8) 0 var(--s-4); }
.doc h3 { font-size: var(--t-card); margin: var(--s-6) 0 var(--s-3); }
.doc p, .doc li { line-height: 1.7; }
.doc .updated { color: var(--muted); }
.doc .summary { padding: var(--s-5) var(--s-6); border-radius: var(--r-md); background: var(--p-surface); }
.doc .toc ol { padding-left: var(--s-6); }
.doc a { color: var(--action); }
.doc code { font-family: var(--font-mono); font-size: .92em; }

/* the pages the server shows for an invite or leaderboard link opened without the app (server/src/http.ts):
   one screen, the words on the left line, one app screen on the right cut by the section's foot */
.link-page .grid { align-items: start; }
.link-page h1 { font-size: var(--t-h2); }
.link-page__art { position: relative; height: calc(100svh - var(--padt) - var(--padb)); overflow: hidden;
  border-radius: var(--r-lg); background: var(--ground-bg, #d9ccb7); }
.link-page__art > .phone { --phone-w: 340px; position: absolute; left: 50%; top: var(--s-7); translate: -50% 0; }
@media (max-width: 1023px) { .link-page__art { display: none; } .link-page__text { grid-column: 1 / -1; } }
.code-tiles { display: flex; gap: var(--s-2); margin: 0; }
.code-tiles > span { display: grid; place-items: center; width: 56px; height: 64px; border-radius: 10px;
  font: 500 30px/1 var(--font-display); color: var(--p-ink); background: var(--sf-tile); box-shadow: inset 0 -4px 0 var(--sf-tile-edge); }
@media (max-width: 639px) { .code-tiles > span { width: 46px; height: 54px; font-size: 24px; } }

/* ---------------------------------------------------------------------------------------------------------
   Letter tiles: a word set in the app's tiles (the logo, guide thumbnails). Sizes by --tw, the tile's width. */
.tiles { --tw: 28px; display: inline-flex; gap: max(2px, calc(var(--tw) * .1)); vertical-align: middle; }
.tiles > i { display: grid; place-items: center; flex: none; width: var(--tw); height: calc(var(--tw) * 1.14);
  border-radius: calc(var(--tw) * .2); background: var(--sf-tile); color: var(--p-ink);
  box-shadow: inset 0 calc(var(--tw) * -.1) 0 var(--sf-tile-edge);
  font: 600 calc(var(--tw) * .58)/1 var(--font-display); font-style: normal; }
.tiles--sm { --tw: 18px; }
.tiles--md { --tw: 30px; }
.tiles--lg { --tw: 46px; }
@media (max-width: 639px) { .tiles--lg { --tw: 32px; } }

/* each tile drops into its place like a solved word, one after another */
@keyframes tile-drop { 0% { transform: translateY(-110%); opacity: 0; } 55% { transform: translateY(8%); opacity: 1; } 78% { transform: translateY(-3%); } 100% { transform: none; } }
/* a hop: up, a small bounce, still */
@keyframes tile-hop { 0% { transform: none; } 35% { transform: translateY(-30%); } 65% { transform: translateY(5%); } 100% { transform: none; } }
/* the hop repeated every 7 s: the same move in the first 9% of the cycle, still for the rest */
@keyframes tile-hop-cycle { 0%, 9%, 100% { transform: none; } 3% { transform: translateY(-30%); } 6% { transform: translateY(5%); } }
/* a blank slot that fills: the empty frame, then the tile and its letter */
@keyframes tile-fill { 0%, 60% { background: var(--sf-slot); color: transparent; box-shadow: inset 0 0 0 2px var(--sf-slot-frame); } 100% { background: var(--sf-tile); color: var(--p-ink); } }
.tiles > i:nth-child(1) { --d: 0ms; }   .tiles > i:nth-child(2) { --d: 70ms; }  .tiles > i:nth-child(3) { --d: 140ms; }
.tiles > i:nth-child(4) { --d: 210ms; } .tiles > i:nth-child(5) { --d: 280ms; } .tiles > i:nth-child(6) { --d: 350ms; }
.tiles > i:nth-child(7) { --d: 420ms; } .tiles > i:nth-child(8) { --d: 490ms; } .tiles > i:nth-child(9) { --d: 560ms; }
.tiles > i:nth-child(10) { --d: 630ms; }

/* the logo: SPELLFILL in tiles. It drops in on load, two blanks fill like a solved puzzle, then the word hops
   every 7 s; the pointer on it makes it hop at once. */
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo__tiles { --tw: 26px; }
.logo__tiles > i { animation: tile-drop .55s cubic-bezier(.3, 1.3, .5, 1) var(--d) both, tile-hop-cycle 7s ease-in-out calc(2.4s + var(--d)) infinite; }
.logo__tiles > i:nth-child(4), .logo__tiles > i:nth-child(8) {
  animation: tile-drop .55s cubic-bezier(.3, 1.3, .5, 1) var(--d) both, tile-fill .9s ease-out calc(.4s + var(--d)) both, tile-hop-cycle 7s ease-in-out calc(2.4s + var(--d)) infinite; }
.logo:hover .logo__tiles > i, .logo:focus-visible .logo__tiles > i { animation: tile-hop .5s ease-out var(--d) 1 both; }
@media (max-width: 639px) { .logo__tiles { --tw: 19px; } }
@media (max-width: 359px) { .logo__tiles { --tw: 16px; } }
/* the guide headings' tiles drop in once */
.tiles--drop > i { animation: tile-drop .55s cubic-bezier(.3, 1.3, .5, 1) calc(.15s + var(--d)) both; }
/* a guide card's tiles hop when the card is pointed at */
:is(.gcard, .gm__guide, .gcat):hover .tiles > i { animation: tile-hop .5s ease-out calc(var(--d) * .6) 1 both; }
@media (prefers-reduced-motion: reduce) { .tiles > i, .logo__tiles > i { animation: none !important; } }

/* ---------------------------------------------------------------------------------------------------------
   The music button in the bar: four bars that dance while the music plays; a soft ring while a browser waits
   for a click to carry on. */
.music { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in oklab, var(--p-ink) 18%, transparent); background: transparent; color: var(--p-ink); }
.music:hover { background: color-mix(in oklab, var(--p-ink) 6%, transparent); }
.music__icon { width: 18px; height: 18px; fill: currentColor; }
.music__icon rect { transform-box: fill-box; transform-origin: 50% 50%; transform: scaleY(.45); transition: transform .3s; }
.music.is-playing { background: var(--p-accent); border-color: var(--p-accent); color: var(--p-accent-ink); }
.music.is-playing .music__icon rect { animation: music-bar 1s ease-in-out infinite alternate; }
.music.is-playing .music__icon rect:nth-child(2) { animation-delay: -.4s; }
.music.is-playing .music__icon rect:nth-child(3) { animation-delay: -.7s; }
.music.is-playing .music__icon rect:nth-child(4) { animation-delay: -.2s; }
@keyframes music-bar { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.music.is-waiting { box-shadow: 0 0 0 3px color-mix(in oklab, var(--p-accent) 35%, transparent); }
@media (prefers-reduced-motion: reduce) { .music.is-playing .music__icon rect { animation: none; transform: none; } }
/* the bar keeps the music button at every width (the kit sends plain words to the sheet under 1024) */
.nav:not(.is-open) .nav__actions > .music.music { display: inline-grid; }
/* 1024 to 1199: four words, the language, music and the button do not fit one bar: Questions waits in the footer */
@media (min-width: 1024px) and (max-width: 1199px) { .nav:not(.is-open) .nav__links > .nav__item:nth-child(4) { display: none; } }
/* under 480: the logo, music and the menu button; the main button waits in the sheet (the hero shows it) */
@media (max-width: 479px) { .nav:not(.is-open) .nav__actions > .btn--primary { display: none; } }

/* ---------------------------------------------------------------------------------------------------------
   The guides panel under the bar's Guides word */
.gm { row-gap: var(--s-5); }
.menu-col a.gm__cat { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); padding: var(--s-2) 0 var(--s-3);
  border-bottom: 1px solid color-mix(in oklab, var(--p-ink) 10%, transparent); color: var(--p-ink); text-decoration: none; }
.gm__cat b { font-weight: 500; font-size: var(--t-card); }
.gm__cat span { color: var(--p-muted); font-size: var(--t-small); }
.menu-col a.gm__guide { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s-3); padding: var(--s-3) 0; color: var(--p-ink); text-decoration: none; }
.menu-col a.gm__guide > span:last-child { font-size: var(--t-small); line-height: 1.45; color: var(--p-ink); font-weight: 400; }
.gm__guide .tiles { --tw: 16px; gap: 2px; }
.nav__menu .gm__all { padding-top: var(--s-4); border-top: 1px solid color-mix(in oklab, var(--p-ink) 10%, transparent); font-weight: 500; color: var(--p-accent); text-decoration: none; }

/* the home page's guides: three linked cards, each with its guide's word in tiles on the lit ground */
#guides .panel { --p-h: 240px; display: grid; place-items: center; }
#guides .gcards { margin-top: var(--s-7); }
a.gcard { color: inherit; text-decoration: none; }
#guides .gcard h3 { margin-top: var(--s-2); }
@media (max-width: 1023px) { #guides .panel { --p-h: 160px; } }
/* a short laptop screen: lower tile panels keep the head and the three cards on one screen */
@media (min-width: 1024px) and (max-height: 820px) { #guides .panel { --p-h: 120px; } #guides .gcards { margin-top: var(--s-6); } }
/* a phone: the three cards stack, so the section takes two screens */
@media (max-width: 639px) { #guides { --hm: 2; } #guides .panel { --p-h: 200px; } }

/* ---------------------------------------------------------------------------------------------------------
   Guide pages (/guides/...): a reading layout in normal flow */
.guide { padding: calc(var(--nav) + var(--s-7)) 0 var(--s-9); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-6); padding: 0; list-style: none; font-size: var(--t-small); color: var(--p-muted); }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); color: color-mix(in oklab, var(--p-muted) 60%, transparent); }
.crumbs a { color: inherit; }
.guide__head { max-width: 820px; display: grid; gap: var(--s-4); margin-bottom: var(--s-8); }
.guide__head h1 { font-size: var(--t-h2); margin: var(--s-3) 0 0; }
.guide__layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: var(--s-8); align-items: start; }
.guide__toc { padding-top: var(--s-2); }
.guide__toc ol { margin: var(--s-3) 0 0; padding-left: var(--s-5); display: grid; gap: var(--s-3); font-size: var(--t-small); }
.guide__toc a { color: var(--p-ink); }
@media (max-width: 1023px) { .guide__layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); } }
.prose { max-width: 720px; font-size: 18px; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: var(--t-h3); line-height: 1.25; margin: var(--s-8) 0 var(--s-4); scroll-margin-top: calc(var(--nav) + var(--s-4)); }
.prose h3 { font-size: var(--t-card); margin: var(--s-6) 0 var(--s-3); }
.prose p, .prose li { margin: 0 0 var(--s-4); }
.prose ul, .prose ol { padding-left: var(--s-6); margin: 0 0 var(--s-5); }
.prose li { margin-bottom: var(--s-2); }
.prose a { color: var(--p-accent); }
.prose strong { font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 var(--s-6); font-size: 16px; line-height: 1.5; }
.prose th, .prose td { padding: var(--s-3) var(--s-4); text-align: left; vertical-align: top; border-bottom: 1px solid color-mix(in oklab, var(--p-ink) 12%, transparent); }
.prose th { font-weight: 500; background: color-mix(in oklab, var(--p-ink) 4%, var(--p-bg)); }
.prose .table { overflow-x: auto; margin: 0 0 var(--s-6); }
.prose .table table { margin: 0; min-width: 480px; }
.prose .tip { padding: var(--s-5) var(--s-6); margin: 0 0 var(--s-6); border-radius: var(--r-md); background: var(--p-surface);
  border-left: 4px solid var(--p-accent); }
.prose .tip > :last-child { margin-bottom: 0; }
.prose .ex { font-style: italic; color: var(--p-muted); }
.prose code, .prose .ipa { font-family: var(--font-text); background: color-mix(in oklab, var(--p-ink) 6%, transparent); padding: 1px 6px; border-radius: 4px; }

/* the app box at the end of a guide: the words, the main button, one app screen cut by the box's foot */
.appbox { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-7); margin: var(--s-9) 0 var(--s-8);
  padding: var(--s-8) var(--s-8) 0; border-radius: var(--r-lg); background: var(--ground-bg, #d9ccb7); overflow: hidden; }
.appbox__text { padding-bottom: var(--s-8); align-self: center; }
.appbox h2 { font-size: var(--t-h3); margin: 0; }
.appbox__art { position: relative; min-height: 300px; }
.appbox__art > .phone { --phone-w: 260px; position: absolute; left: 50%; top: 0; translate: -50% 0; }
@media (max-width: 767px) { .appbox { grid-template-columns: minmax(0, 1fr); padding: var(--s-6) var(--s-5) 0; } .appbox__art { min-height: 240px; } .appbox__art > .phone { --phone-w: 220px; } }

/* guide cards on the guide pages */
.gcards-page { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-5); margin: var(--s-5) 0 var(--s-6); }
a.gcard--page { display: grid; align-content: start; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-lg); background: var(--p-surface);
  border: 1px solid color-mix(in oklab, var(--p-ink) 8%, transparent); transition: transform .2s var(--ease, ease), box-shadow .2s var(--ease, ease); }
a.gcard--page:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -20px color-mix(in oklab, var(--p-ink) 45%, transparent); }
.gcard--page :is(h2, h3) { font-size: var(--t-card); line-height: 1.3; margin: var(--s-2) 0 0; }
.gcard--page p { margin: 0; color: var(--p-ink); font-size: var(--t-body); line-height: 1.55; }
.gcard__thumb { display: grid; place-items: center; aspect-ratio: 16 / 7; border-radius: var(--r-md); background: var(--ground-bg, #d9ccb7); }
.guide__cat { margin-top: var(--s-9); }
.guide__cat-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-6); align-items: baseline; }
.guide__cat-head h2 { font-size: var(--t-h3); margin: 0; }
.guide__cat-head h2 a { color: inherit; text-decoration: none; }
.guide__cat-head p { margin: 0; color: var(--p-muted); }
@media (max-width: 767px) { .guide__cat-head { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); } }
.guide__more { margin-top: var(--s-8); }
.guide__more h2 { font-size: var(--t-h3); }
.guide__cats { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-8); }
a.gcat { display: inline-flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-radius: 999px; color: var(--p-ink); text-decoration: none;
  background: var(--p-surface); border: 1px solid color-mix(in oklab, var(--p-ink) 10%, transparent); }
a.gcat b { font-weight: 500; }
a.gcat span { color: var(--p-muted); font-size: var(--t-small); }

/* the footer of every page but the home page */
.page-foot { padding: var(--s-8) 0 var(--s-8); background: var(--ground-bg, #d9ccb7); }
.page-foot .footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-7); padding-top: var(--s-5);
  border-top: 1px solid color-mix(in oklab, var(--p-ink) 12%, transparent); color: var(--p-muted); font-size: var(--t-small); }
.page-foot .footer__legal a { color: inherit; }
.page-foot .footer__col h3 { font-size: var(--t-small); color: var(--p-muted); font-weight: 500; }
.page-foot .footer__col ul { list-style: none; padding: 0; margin: var(--s-3) 0 0; display: grid; gap: var(--s-3); }
.page-foot .footer__col a { color: var(--p-ink); text-decoration: none; }
@media (max-width: 1023px) { .page-foot .footer__col { grid-column: auto / span 4; } }
@media (max-width: 639px) { .page-foot .footer__col { grid-column: auto / span 6; } }

/* ---------------------------------------------------------------------------------------------------------
   Word puzzles (guides/word-puzzles): each puzzle is the word in tiles, blanks as empty slots, then its clue;
   the answers open under each level. */
.prose .puzzles { list-style: none; counter-reset: puzzle; padding: 0; margin: 0 0 var(--s-4); display: grid; gap: var(--s-4); }
.prose .puzzle { counter-increment: puzzle; display: grid; grid-template-columns: 2.2em auto minmax(0, 1fr); align-items: center; gap: var(--s-3) var(--s-5);
  margin: 0; padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--p-surface); border: 1px solid color-mix(in oklab, var(--p-ink) 8%, transparent); }
.prose .puzzle::before { content: counter(puzzle) "."; color: var(--p-muted); font-weight: 500; }
.puzzle__tiles { --tw: 30px; }
.tiles > i.is-blank { background: var(--sf-slot); box-shadow: inset 0 0 0 2px var(--sf-slot-frame); }
.puzzle__clue { font-size: 16px; line-height: 1.5; }
.chain { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.chain > b { font-weight: 500; }
.chain > span[aria-hidden] { color: var(--p-muted); }
@media (max-width: 767px) {
  .prose .puzzle { grid-template-columns: 2em minmax(0, 1fr); }
  .puzzle__clue { grid-column: 2; }
  .puzzle__tiles { --tw: 24px; }
}
.prose details.answers { margin: 0 0 var(--s-6); }
.prose details.answers > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-5); border-radius: 999px; cursor: pointer;
  list-style: none; font-weight: 500; font-size: var(--t-small); color: var(--p-accent); border: 1px solid color-mix(in oklab, var(--p-accent) 40%, transparent); }
.prose details.answers > summary::-webkit-details-marker { display: none; }
.prose details.answers[open] > summary { background: color-mix(in oklab, var(--p-accent) 10%, transparent); }
.prose details.answers > ol { margin: var(--s-4) 0 0; columns: 2; column-gap: var(--s-7); font-weight: 500; }
@media (max-width: 639px) { .prose details.answers > ol { columns: 1; } }
