/* CheatSheetsDMV: dark look shared with Kohle Studios (black page, white Inter text, outlined rounded boxes,
   coloured labels are coloured text with no fill). Site-specific rules are at the end of this file. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-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;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #000000;
  --surface-2: #141414;
  --border: #3a3a3a;
  --text: #FFFFFF;
  --green: #22DD33;
  --amber: #FBBF24;
  --magenta: #FF5A9A;
  --radius: 4px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--text); }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }

/* Snowflakes: fixed canvas behind everything; boxes are solid so flakes pass behind them. */
.snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.topbar, main, .footer { position: relative; z-index: 1; }

/* Top bar: just the name on the left, like Ouralia. */
.topbar {
  position: sticky; top: 0; display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--bg);
}
.brand { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.spacer { flex: 1; }

/* Buttons: outlined pills. .solid = white with black words; .white = white outline. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg); color: var(--text); font: inherit; font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--text); }
.btn.sm { padding: 7px 14px; font-size: 14px; }
.btn.white { border-color: var(--text); }
.btn.solid { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn.solid:hover { opacity: .88; }
.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }

.hero { padding: 16vh 0 12vh; text-align: center; }
.eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { font-size: clamp(44px, 9vw, 96px); font-weight: 800; line-height: 1.02; }
.lede { margin: 18px auto 0; max-width: 560px; font-size: clamp(17px, 2.4vw, 21px); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

.section { padding: 28px 0 40px; scroll-margin-top: 80px; }
.section h2 { font-size: 26px; margin-bottom: 18px; }

.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.game { overflow: hidden; }
.game-art {
  aspect-ratio: 16 / 9; display: grid; place-items: center; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.game-art span { font-size: 56px; font-weight: 800; opacity: .5; }
.game-body { padding: 18px 20px 20px; }
.game-body h3 { font-size: 20px; margin: 6px 0 4px; }
.game-body p { margin: 0; }

/* Coloured labels: coloured text, no background fill. */
.label { font-size: 13px; font-weight: 700; }
.label.amber { color: var(--amber); }
.label.green { color: var(--green); }
.label.magenta { color: var(--magenta); }

.about { padding: 20px 22px; font-size: 17px; }
.about p { margin: 0; }

.footer {
  border-top: 1px solid var(--border); background: var(--bg);
  padding: 22px 20px; text-align: center; font-size: 14px;
}

@media (max-width: 600px) {
  .topbar { padding: 10px 14px; }
  .brand { font-size: 19px; }
  main { padding: 0 16px; }
  .hero { padding: 12vh 0 8vh; }
  .grid { grid-template-columns: 1fr; }
}

/* Discord */
.btn svg { flex: none; }
.community { display: flex; align-items: center; gap: 16px; padding: 18px 20px; text-decoration: none; }
.community:hover { border-color: var(--text); }
.community-icon { width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; flex: none; }
.community .grow { flex: 1; min-width: 0; }
.community strong { display: block; font-size: 17px; }
.community small { display: block; font-size: 14px; margin-top: 2px; }
.footer { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.footer-link:hover { text-decoration: underline; }
@media (max-width: 600px) { .community .btn { display: none; } }

/* Logo: the "\<" mark (no background); the name is text in Space Grotesk (SIL OFL, fonts/space-grotesk-OFL.txt). */
/* Titles: Public Sans (SIL Open Font License, /fonts/public-sans-OFL.txt), self-hosted. */
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/fonts/public-sans-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; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/fonts/public-sans-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: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/fonts/space-grotesk-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; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/fonts/space-grotesk-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Vietnamese letters for Space Grotesk */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/fonts/space-grotesk-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; }
/* Titles everywhere use Public Sans; body text stays Inter. Languages it doesn't cover (Cyrillic, Arabic, CJK, Thai, Hindi) fall back to Inter / system fonts. */
h1, h2, h3, h4, .crop-title, .pmenu-name { font-family: "Public Sans", "Inter", system-ui, sans-serif; letter-spacing: -0.01em; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { height: 24px; width: auto; display: block; }
.brand-word, .hero-word {
  font-family: "Public Sans", "Inter", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap;
}
.brand-word { font-size: 20px; line-height: 1; }
.hero-mark { height: 110px; width: auto; display: block; margin: 0 auto 28px; }
.hero h1.hero-word { font-size: 80px; line-height: 1; font-weight: 700; letter-spacing: -0.01em; }
@media (max-width: 760px) { .hero h1.hero-word { font-size: 60px; } }
@media (max-width: 600px) {
  .brand-mark { height: 21px; }
  .hero-mark { height: 84px; }
  .hero h1.hero-word { font-size: 40px; }
}
@media (max-width: 340px) { .brand-word { font-size: 16px; } }

/* Discord */
.btn svg { flex: none; }
.community { display: flex; align-items: center; gap: 16px; padding: 18px 20px; text-decoration: none; }
.community:hover { border-color: var(--text); }
.community-icon { width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; flex: none; }
.community .grow { flex: 1; min-width: 0; }
.community strong { display: block; font-size: 17px; }
.community small { display: block; font-size: 14px; margin-top: 2px; }
.footer { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.footer-link:hover { text-decoration: underline; }
@media (max-width: 600px) { .community .btn { display: none; } }

/* Top bar "Log in": solid white with black words, like Ouralia's Sign in. */
.btn.signin { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn.signin:hover { opacity: .88; }
.topbar .btn + .btn { margin-left: 2px; }
[hidden] { display: none !important; }

/* Narrow pages: login, account, privacy. */
main.narrow { max-width: 720px; }

/* /login: same layout as Ouralia's "Log in or sign up". */
.auth-page { max-width: 380px; margin: 12vh auto 60px; }
.auth-title { text-align: center; font-size: 1.75rem; margin: 0 0 24px; }
.btn.auth-social { width: 100%; justify-content: flex-start; gap: 12px; padding: 12px 18px; }
.btn.auth-social .grow { flex: 1; text-align: center; padding-right: 18px; }
.btn.auth-social.disabled { cursor: not-allowed; opacity: .5; }
.btn.auth-social.disabled:hover { border-color: var(--border); }
.auth-error { color: var(--bad); border: 1px solid var(--bad); border-radius: 4px; padding: 10px 14px; margin: 0 0 16px; font-size: 14px; background: var(--bg); }
.auth-note { text-align: center; font-size: 14px; color: var(--amber); margin: 12px 0 0; }
.auth-fine { text-align: center; font-size: 13px; margin: 26px 0 0; }

/* /account */
.account { margin: 8vh 0 60px; }
.account h1 { font-size: 1.75rem; margin-bottom: 18px; }
.rows .row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.rows .row:last-child { border-bottom: 0; }
.rows .k { font-weight: 600; }
.rows .v { text-align: right; overflow-wrap: anywhere; }
.account form { margin-top: 18px; }

/* /privacy */
.legal { margin: 6vh 0 60px; background: var(--bg); }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.15rem; margin: 26px 0 6px; }
.legal p { margin: 8px 0; }
.muted-date { font-size: 14px; }
/* Phones: the top bar's Discord button is icon-only so everything fits. */
@media (max-width: 600px) {
  .topbar .btn-label { display: none; }
  .topbar .btn.white.sm[aria-label="Discord"] { padding: 7px 10px; }
  .topbar { gap: 8px; }
}

/* /login email form: rounded pill fields like Ouralia, solid so the snowflakes pass behind. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 12px; font-weight: 700; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: block; }
.field input {
  display: block; width: 100%; padding: 12px 18px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 15px;
}
.field input::placeholder { color: var(--text); opacity: .6; }
.field input:focus { outline: none; border-color: var(--text); }
.field-hint { margin: -4px 0 0 18px; font-size: 13px; }
.auth-text { margin: 0; font-size: 14px; text-align: center; }
.btn.lg { width: 100%; padding: 12px 20px; }
.btn:disabled { opacity: .6; cursor: default; }
.auth-chip { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--border); border-radius: 4px; padding: 10px 18px; background: var(--bg); overflow-wrap: anywhere; }
.link { background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.link.center { align-self: center; margin-top: 2px; }
.link:disabled { opacity: .6; cursor: default; }
.auth-ok { color: var(--green); border: 1px solid var(--green); border-radius: 4px; padding: 10px 14px; margin: 0 0 16px; font-size: 14px; background: var(--bg); }
.good { color: var(--green); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }
.rows .v .link { margin-left: 8px; }

/* Display name editing on /account */
.name-edit { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.name-edit input { padding: 7px 14px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text); font: inherit; font-size: 15px; width: 220px; max-width: 100%; }
.name-edit input:focus { outline: none; border-color: var(--text); }
.name-edit small { flex-basis: 100%; text-align: right; font-size: 13px; }
.field-hint.good, .field-hint.bad { font-weight: 600; }

/* /admin */
main.narrow:has(.admin) { max-width: 1200px; }
.admin { margin: 6vh 0 60px; }
.admin h1 { font-size: 1.6rem; margin-bottom: 18px; }
.admin .count { font-size: 1rem; font-weight: 500; }
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-wrap th, .table-wrap td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap th { font-weight: 700; }

/* Admin "Email" tab in the top bar, with an unread count (red text, no fill). */
.mail-tab .mail-count { color: var(--bad); font-weight: 800; }
.mail-tab.on { border-color: var(--text); background: var(--surface-2); }

/* /admin/email */
main.wide { max-width: 1400px; }
.mail { display: grid; grid-template-columns: 180px minmax(260px, 380px) 1fr; gap: 14px; margin: 24px 0 40px; min-height: 70vh; }
.mail-side { display: flex; flex-direction: column; gap: 14px; }
.mail-folders { display: flex; flex-direction: column; gap: 4px; }
.mail-folders button { display: flex; justify-content: space-between; text-align: left; padding: 9px 14px; border: 1px solid transparent; border-radius: 4px; background: var(--bg); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.mail-folders button:hover { border-color: var(--border); }
.mail-folders button.on { border-color: var(--text); font-weight: 700; }
.mail-folders .n { color: var(--bad); font-weight: 800; }
.mail-side .back { margin-top: auto; align-self: flex-start; padding-left: 14px; }
.mail-list { overflow-y: auto; max-height: 78vh; }
.mail-row { display: block; width: 100%; text-align: left; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; cursor: pointer; }
.mail-row:hover, .mail-row.on { background: var(--surface-2); }
.mail-row:last-child { border-bottom: 0; }
.mail-row-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.mail-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row .when { flex: none; font-size: 12px; }
.mail-row .subj, .mail-row .snip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.mail-row .snip { font-size: 13px; opacity: .75; }
.mail-row.unread .who, .mail-row.unread .subj { font-weight: 800; }
.mail-view, .mail-compose { padding: 22px 26px; overflow-y: auto; max-height: 78vh; }
.mail-empty { padding: 20px; text-align: center; }
.mail-subj { font-size: 1.35rem; margin-bottom: 12px; overflow-wrap: anywhere; }
.mail-meta p { margin: 2px 0; font-size: 14px; overflow-wrap: anywhere; }
.mail-meta .checks { display: flex; gap: 12px; margin-top: 8px; }
.mlabel { font-size: 12px; font-weight: 700; }
.mlabel.good { color: var(--green); } .mlabel.bad { color: var(--bad); } .mlabel.neutral { color: var(--text); }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 20px 0; padding-top: 18px; border-top: 1px solid var(--border); font-size: 15px; line-height: 1.6; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.mail-compose { display: flex; flex-direction: column; gap: 10px; }
.mail-compose h2 { font-size: 1.2rem; }
.mrow { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.mrow input, .mail-compose textarea { width: 100%; padding: 9px 14px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text); font: inherit; font-size: 15px; font-weight: 400; }
.mrow .from { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.mrow .from input { width: 160px; }
.mail-compose textarea { resize: vertical; min-height: 240px; line-height: 1.5; }
.mrow input:focus, .mail-compose textarea:focus { outline: none; border-color: var(--text); }
.mail-compose { grid-column: 3; }
@media (max-width: 1000px) {
  .mail { grid-template-columns: 1fr; }
  .mail-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .mail-folders { flex-direction: row; flex-wrap: wrap; }
  .mail-side .back { margin-top: 0; }
  .mail-list { max-height: 40vh; }
  .mail-compose { grid-column: auto; }
}

/* ===================================================================== Studio layout (2026-11-23)
   Big-studio structure: sticky menu, full-width hero, featured game, news cards, about, contact, footer.
   Own brand: black, white Inter text, Space Grotesk titles, ember orange (#FF781E) as the accent. */
:root { --ember: #FF781E; }
.topbar { z-index: 20; }
.mainnav { display: flex; gap: 4px; margin-left: 18px; }
.mainnav a { padding: 7px 12px; border-radius: 4px; font-size: 14px; font-weight: 600; text-decoration: none; text-transform: uppercase; letter-spacing: .06em; }
.mainnav a:hover { color: var(--ember); }
@media (max-width: 860px) { .mainnav { display: none; } }

main.home { max-width: none; padding: 0; }
.home .hero { position: relative; min-height: calc(100vh - 63px); display: grid; place-items: center; padding: 60px 20px 90px; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-glow { position: absolute; inset: auto 0 -30% 0; height: 80%; background: radial-gradient(ellipse at 50% 100%, rgba(255, 120, 30, .28), rgba(255, 60, 15, .08) 45%, transparent 70%); pointer-events: none; }
.hero-inner { position: relative; text-align: center; }
.home .hero-mark { height: 120px; margin-bottom: 32px; }
.home .lede { font-size: clamp(17px, 2.2vw, 21px); }
.scroll-cue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--text); border-radius: 4px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; background: var(--text); border-radius: 2px; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue span { animation: none; } }

.band { max-width: 1180px; margin: 0 auto; padding: 90px 20px 20px; scroll-margin-top: 50px; }
.band-head { margin-bottom: 26px; }
.band .eyebrow { color: var(--ember); margin-bottom: 6px; }
.pixel-h { font-family: "Public Sans", "Inter", sans-serif; font-weight: 700; font-size: 40px; line-height: 1.05; letter-spacing: -0.01em; text-transform: uppercase; }
.label.ember, .tag { color: var(--ember); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

.feature { display: grid; grid-template-columns: 1.4fr 1fr; overflow: hidden; }
.feature-art { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 70%, rgba(255, 120, 30, .22), transparent 65%), var(--surface-2); border-right: 1px solid var(--border); }
.feature-art img { width: 24%; max-width: 190px; height: auto; opacity: .9; }
.art-note { position: absolute; bottom: 14px; left: 18px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.feature-body { padding: 34px 34px 36px; display: flex; flex-direction: column; justify-content: center; }
.feature-body h3 { font-size: 30px; margin: 8px 0 10px; }
.feature-body p { margin: 0; }
.actions.left { justify-content: flex-start; margin-top: 24px; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.news { overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s; }
.news:hover { border-color: var(--text); }
.news-art { aspect-ratio: 6 / 5; max-height: 220px; width: 100%; display: grid; place-items: center; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.news-art img { height: 72px; width: auto; display: block; }
.news-art.discord { color: var(--text); }
.news-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.news-body time { color: var(--ember); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.news-body h3 { font-size: 20px; }
.news-body p { margin: 0; flex: 1; }
.more { margin-top: 8px; font-weight: 700; text-decoration: none; }
.more::after { content: " →"; }
.more:hover { color: var(--ember); }

.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: start; }
.about-lead { font-size: clamp(22px, 3vw, 32px); font-weight: 700; line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
.about-note { margin: 6px 0 0; font-size: 17px; border-left: 2px solid var(--ember); padding-left: 16px; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding-bottom: 70px; }
.contact { padding: 20px 22px; }
.contact h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ember); margin-bottom: 6px; }
.contact p { margin: 0; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.contact a { text-decoration: none; }
.contact a:hover { text-decoration: underline; }

/* Footer: brand + links + social, then the legal row. */
.footer { display: block; text-align: left; padding: 0; }
.foot-top { max-width: 1180px; margin: 0 auto; padding: 28px 20px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.foot-brand img { height: 20px; }
.foot-nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.foot-nav a { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; }
.foot-nav a:hover, .foot-social:hover { color: var(--ember); }
.foot-social { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 50%; }
.foot-legal { border-top: 1px solid var(--border); max-width: none; padding: 16px 20px; text-align: center; font-size: 13px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.foot-legal .dot { opacity: .5; }

@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; }
  .feature-art { border-right: 0; border-bottom: 1px solid var(--border); }
  .feature-body { padding: 24px; }
  .about-grid { grid-template-columns: 1fr; }
  .band { padding-top: 64px; }
  .pixel-h { font-size: 40px; }
  .home .hero-mark { height: 88px; }
  .foot-top { justify-content: center; text-align: center; }
  .foot-nav { flex: none; justify-content: center; }
}
/* Grid children may shrink below their content width (stops the feature text running off on phones). */
.feature > *, .news-grid > *, .about-grid > *, .contact-grid > * { min-width: 0; }
@media (max-width: 760px) { .feature { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 400px) { .news-grid { grid-template-columns: minmax(0, 1fr); } }

/* Account dropdown in the top bar (signed in). */
.pmenu-wrap { position: relative; }
.pmenu-btn { gap: 8px; padding-left: 6px; }
.pmenu-avatar { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--text); font-size: 12px; font-weight: 800; }
.pmenu-caret { font-size: 11px; opacity: .8; }
.pmenu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; z-index: 60; display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); }
.pmenu[hidden] { display: none; }
.pmenu-head { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.pmenu-name { font-weight: 800; font-size: 15px; }
.pmenu-email { font-size: 13px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.pmenu-role { font-size: 12px; font-weight: 800; color: var(--bad); margin-top: 2px; }
.pmenu-item { display: flex; align-items: center; width: 100%; padding: 11px 14px; border-radius: 4px; color: var(--text); font: inherit; font-weight: 600; font-size: 15px;
  text-align: left; background: transparent; border: 0; cursor: pointer; text-decoration: none; }
.pmenu-item:hover { background: var(--surface-2); text-decoration: none; }
.pmenu-item.active { box-shadow: inset 0 0 0 1px var(--text); }
.pmenu-item.pmenu-admin { color: var(--bad); }
.pmenu-sep { border-top: 1px solid var(--border); margin: 4px 0; }
.pmenu form { margin: 0; }
.pmenu-out { color: var(--bad); border-top: 1px solid var(--border); border-radius: 0 0 4px 4px; margin-top: 4px; }
@media (max-width: 600px) { .pmenu-btn .btn-label { display: none; } .pmenu-btn { padding-right: 10px; } }

/* Admin is white (not red) everywhere; unread email count sits on the dropdown's Email item. */
.pmenu-role, .pmenu-item.pmenu-admin, .role-admin { color: var(--text); }
.pmenu-role { font-weight: 800; }
.pmenu-item.pmenu-admin { justify-content: space-between; }
.pmenu-count { min-width: 22px; padding: 1px 7px; border: 1px solid var(--text); border-radius: 4px; font-size: 12px; font-weight: 800; text-align: center; }
.role-admin { font-weight: 700; }

/* Languages: hide the page until it's translated (max 1.5s), globe button + list in the top bar. */
html.i18n-loading body { visibility: hidden; }
.lang-btn { gap: 6px; padding-left: 10px; padding-right: 12px; }
.lang-code { font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.lang-menu { min-width: 220px; max-height: min(70vh, 520px); overflow-y: auto; }
.lang-menu .pmenu-item { justify-content: space-between; font-weight: 500; }
.lang-menu .pmenu-item.active { font-weight: 800; }
.lang-note { margin: 24px 0 -8px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px; }
.topbar .spacer + .lang-wrap { margin-right: 2px; }
.topbar { gap: 8px; }

/* Icons in the account dropdown. */
.pmenu-item { gap: 12px; justify-content: flex-start; }
.pmenu-item.pmenu-admin { justify-content: flex-start; }
.pmenu-ico { display: inline-grid; place-items: center; width: 20px; flex: none; }
.pmenu-count { margin-left: auto; }

/* Right-to-left (Arabic). */
[dir="rtl"] .pmenu { right: auto; left: 0; }
[dir="rtl"] .pmenu-item { text-align: right; }
[dir="rtl"] .mainnav { margin-left: 0; margin-right: 18px; }
[dir="rtl"] .about-note { border-left: 0; padding-left: 0; border-right: 2px solid var(--ember); padding-right: 16px; }
[dir="rtl"] .more::after { content: " ←"; }
[dir="rtl"] .pmenu-count { margin-left: 0; margin-right: auto; }

/* Administration: tabs on the left (pills along the top on phones), like Ouralia. */
.admin-page { margin: 28px 0 50px; }
.admin-h1 { font-size: 1.9rem; margin-bottom: 18px; }
.admin-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; align-items: start; }
.side-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 80px; }
.side-nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 4px; border: 1px solid transparent; color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; }
.side-nav a:hover { background: var(--surface-2); }
.side-nav a.on { border-color: var(--text); font-weight: 800; }
.tab-count { font-size: 12px; font-weight: 700; opacity: .7; }
.tab-count.unread { opacity: 1; min-width: 22px; padding: 1px 7px; border: 1px solid var(--text); border-radius: 4px; text-align: center; }
.admin-body { min-width: 0; }
.admin-head h2 { font-size: 1.3rem; }
.admin-head .count { font-weight: 500; opacity: .7; }
.admin-sub { margin: 4px 0 14px; font-size: 14px; opacity: .8; }
.admin-body .mail { margin: 0; grid-template-columns: 170px minmax(240px, 340px) minmax(0, 1fr); }
.role-select { padding: 6px 30px 6px 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.role-select:focus { outline: none; border-color: var(--text); }
.role-select:disabled { opacity: .5; }
.role-saved { margin-left: 8px; font-size: 12px; font-weight: 700; }
.role-fixed { font-weight: 700; }
@media (max-width: 1000px) {
  .admin-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .side-nav { position: static; flex-direction: row; overflow-x: auto; gap: 8px; scrollbar-width: none; }
  .side-nav a { flex: none; border-color: var(--border); border-radius: 4px; padding: 8px 16px; }
  .side-nav a.on { border-color: var(--text); }
  .admin-body .mail { grid-template-columns: minmax(0, 1fr); }
}
.role-fixed { margin-right: 10px; }
.support-email { font-weight: 700; }

/* /admin/server */
.tab-dot { font-size: 11px; font-weight: 800; color: var(--bad); }
.server-body { display: flex; flex-direction: column; gap: 16px; }
.server-body .admin-head { margin-bottom: -6px; }
.switch-card { padding: 20px 22px; }
.switch-main { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.switch-card h3 { font-size: 1.25rem; }
.switch-state { margin: 4px 0 6px; font-size: 15px; }
.state { font-weight: 800; }
.state.good { color: var(--green); } .state.bad { color: var(--bad); }
.switch-detail { font-size: 13px; opacity: .8; }
.switch-note { margin: 0; font-size: 13px; opacity: .8; max-width: 560px; }
.switch-own { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 4px; }
.tl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.tv { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.td { font-size: 12px; opacity: .75; font-variant-numeric: tabular-nums; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.chart-card { margin: 0; padding: 14px 16px 10px; min-width: 0; }
.chart-card.wide-chart { grid-column: 1 / -1; }
.chart-card figcaption { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.chart-card figcaption span { font-weight: 500; font-size: 13px; opacity: .7; }
.legend { display: flex; gap: 16px; font-size: 13px; margin-bottom: 4px; }
.legend i, .tip-r i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; border-radius: 1px; }
.chart { position: relative; min-height: 150px; }
.chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart .grid { stroke: #2a2a2a; stroke-width: 1; }
.chart .axis { fill: #9a9a9a; font-size: 11px; font-family: inherit; }
.chart .hair { stroke: #8a8a8a; stroke-width: 1; }
.chart-wait { padding: 50px 0; text-align: center; font-size: 13px; opacity: .7; }
.tip { position: absolute; top: 4px; transform: translateX(-50%); padding: 8px 10px; background: #0c0c0c; border: 1px solid var(--border); border-radius: 4px;
  font-size: 12px; pointer-events: none; white-space: nowrap; z-index: 2; }
.tip-t { opacity: .7; margin-bottom: 2px; }
.tip-r b { font-variant-numeric: tabular-nums; }
.services { padding: 16px 20px; }
.services h3 { font-size: 15px; margin-bottom: 6px; }
.services ul { list-style: none; padding: 0; margin: 0; }
.services li { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.services li:first-child { border-top: 0; }
@media (max-width: 760px) { .charts { grid-template-columns: minmax(0, 1fr); } }
.legend .k-in { background: #3987e5; } .legend .k-out { background: #d95926; }

/* Accounts → Roles: Admin / Developer / Moderator toggles (outlined; filled white when on). */
.role-toggles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 260px; }
.role-chip { padding: 5px 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.role-chip:hover { border-color: var(--text); }
.role-chip.on { border-color: var(--text); background: var(--text); color: var(--bg); font-weight: 800; }
.role-chip:disabled { cursor: not-allowed; opacity: .75; }
.role-default { font-size: 13px; opacity: .7; }

/* Accounts → Roles dropdown (tick Admin / Developer / Moderator). */
.role-dd { position: relative; display: inline-block; }
.role-dd-btn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 14px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.role-dd-btn:hover, .role-dd-btn[aria-expanded="true"] { border-color: var(--text); }
.role-dd-menu { position: fixed; right: auto; min-width: 190px; z-index: 80; }
.role-dd-item { gap: 10px; }
.role-check { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--text); border-radius: 5px; font-size: 12px; font-weight: 800; flex: none; }
.role-dd-item.on .role-check { background: var(--text); color: var(--bg); }
.role-dd-item:disabled { cursor: not-allowed; opacity: .6; }

/* /admin/traffic and /admin/logs */
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.range { display: flex; flex-wrap: wrap; gap: 6px; }
.range button { padding: 6px 14px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.range button:hover { border-color: var(--text); }
.range button.on { border-color: var(--text); font-weight: 800; }
.chart .bar { shape-rendering: geometricPrecision; }
.lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.list-card { padding: 14px 16px; min-width: 0; }
.list-card h3 { font-size: 15px; margin-bottom: 8px; }
.list-card ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.list-card li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; font-size: 14px; border-radius: 4px; overflow: hidden; }
.list-card .lbar { position: absolute; inset: 0 auto 0 0; background: rgba(57, 135, 229, .18); border-radius: 4px; }
.list-card .lk, .list-card .lv { position: relative; }
.list-card .lk { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-card .lv { font-weight: 700; font-variant-numeric: tabular-nums; }
.list-card li.empty, td.empty { font-size: 13px; opacity: .7; }
.log-what { font-weight: 700; }
.log-detail { white-space: normal !important; min-width: 220px; overflow-wrap: anywhere; }
#lg-more { align-self: flex-start; }

/* Profile pictures */
.pmenu-avatar, .pmenu-head-avatar, .list-avatar, .acc-avatar-img { display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--text); overflow: hidden; flex: none; font-weight: 800; }
.pmenu-avatar.has-img, .pmenu-head-avatar.has-img, .list-avatar.has-img, .acc-avatar-img.has-img { border-color: var(--border); }
.pmenu-avatar img, .pmenu-head-avatar img, .list-avatar img, .acc-avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pmenu-head-avatar { width: 40px; height: 40px; font-size: 16px; }
.pmenu-head-top { display: flex; align-items: center; gap: 12px; }
.pmenu-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.list-avatar { width: 36px; height: 36px; font-size: 14px; }
.acc-avatar-img { width: 56px; height: 56px; font-size: 22px; }
.acc-cell { display: flex; align-items: center; gap: 10px; }
.acc-cell-text { display: flex; flex-direction: column; gap: 2px; }
.acc-cell-name { font-weight: 600; }
.acc-cell-acts { display: flex; gap: 10px; }
.link.small { font-size: 12px; }
.avatar-v { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.avatar-acts { display: inline-flex; gap: 14px; }

/* Profile picture crop window */
.crop-dlg { border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text); padding: 20px; max-width: calc(100vw - 32px); }
.crop-dlg[open] { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.crop-dlg::backdrop { background: rgba(0, 0, 0, .75); }
.crop-title { font-size: 18px; align-self: flex-start; margin: 0; }
.crop-view { position: relative; width: min(280px, calc(100vw - 74px)); aspect-ratio: 1; border-radius: 4px; overflow: hidden; touch-action: none; cursor: grab; background: #111; }
.crop-view.dragging { cursor: grabbing; }
.crop-view:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.crop-view canvas { width: 100%; height: 100%; display: block; }
.crop-view::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .6); outline: 2px solid #fff; outline-offset: -2px; pointer-events: none; }
.crop-zoom { width: min(280px, calc(100vw - 74px)); accent-color: #fff; }
.crop-actions { display: flex; gap: 10px; align-self: flex-end; }

/* ---- Phones */
@media (max-width: 1000px) {
  .side-nav { flex-wrap: wrap; overflow: visible; gap: 6px; }
  .side-nav a { padding: 7px 13px; font-size: 14px; }
}
@media (max-width: 600px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { padding: 12px 14px; min-width: 0; }
  .tile .tv { font-size: 24px; }
  .tile .td { overflow-wrap: anywhere; }
  .row-head { align-items: flex-start; }
  /* tables → one card per row */
  .table-wrap { overflow: visible; }
  .table-wrap thead { display: none; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr { display: block; width: 100%; }
  .table-wrap tr { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .table-wrap tr:last-child { border-bottom: 0; }
  .table-wrap td { display: block; border: 0 !important; padding: 3px 0; white-space: normal; overflow-wrap: anywhere; }
  .table-wrap td:first-child { padding-bottom: 8px; }
  .table-wrap td[data-label] { display: flex; justify-content: space-between; align-items: center; gap: 14px; text-align: right; font-size: 13px; }
  .table-wrap td[data-label]::before { content: attr(data-label); font-weight: 700; text-align: left; flex: none; opacity: .65; }
  .table-wrap td.log-detail { min-width: 0; }
  .table-wrap td.log-what { font-size: 13px; }
}
@media (max-width: 359px) {
  .lang-btn .lang-code { display: none; }
  .lang-btn { padding-left: 10px; padding-right: 10px; }
  .brand { gap: 8px; }
  .brand-mark { height: 18px; }
}
@media (max-width: 600px) { .news-art { aspect-ratio: 16 / 9; } }

/* ===================================================================== CheatSheetsDMV */
:root { --ember: #22DD33; --accent: #22DD33; --muted: #FFFFFF; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 8px 14px; border-radius: 4px; background: var(--text); color: var(--bg); font-weight: 700; }
.skip:focus { left: 12px; }
.brand .logo, .foot-brand .logo { flex: none; display: block; }
.brand-word { text-transform: none; letter-spacing: -0.01em; }
.brand-word b { color: var(--accent); font-weight: 700; }
.muted { opacity: .75; }
.small { font-size: 14px; }
.good { color: var(--green); }
.bad { color: var(--bad); }

/* Home */
.page-home .home .hero { min-height: 0; display: block; text-align: center; padding: 72px 20px 70px; }
.page-home .hero h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 800; line-height: 1.02; }
.page-home .hero .eyebrow { color: var(--accent); }
.picker { display: grid; grid-template-columns: 1.2fr 1.2fr auto; gap: 12px; align-items: end; max-width: 760px; margin: 36px auto 0; padding: 16px; text-align: left; }
.pick { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.pick select, .field select {
  appearance: none; width: 100%; padding: 12px 38px 12px 14px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--text); font: inherit; font-size: 16px; font-weight: 500; text-transform: none; letter-spacing: 0;
}
.pick select:focus { outline: none; border-color: var(--text); }
.picker .btn { padding: 13px 24px; }
.pick-note { grid-column: 1 / -1; margin: 0; color: var(--amber); font-size: 14px; }
.band-note { max-width: 720px; margin: -10px 0 22px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { padding: 24px; }
.steps h3 { font-size: 19px; margin: 12px 0 8px; }
.steps p { margin: 0; }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-weight: 800; }
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.product { display: flex; flex-direction: column; gap: 10px; padding: 26px; }
.product.best { border-color: var(--amber); }
.product h3 { font-size: 22px; }
.product p { margin: 0; }
.product .btn { margin-top: auto; align-self: flex-start; }
.price { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.price small { font-size: 14px; font-weight: 500; letter-spacing: 0; }
.ticks { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.state-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.state { display: flex; flex-direction: column; padding: 12px 14px; text-decoration: none; font-weight: 600; height: 100%; }
.state.ready { border-color: var(--green); }
.state.ready::after { content: "Ready"; color: var(--green); font-size: 12px; font-weight: 700; }
.state.ready:hover { border-color: var(--text); }
.state.soon { opacity: .6; }
.state small { font-size: 12px; font-weight: 500; }
.faq { display: grid; gap: 10px; max-width: 820px; padding-bottom: 60px; }
.faq details { padding: 0; }
.faq summary { padding: 16px 20px; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 20px 18px; }

/* Inner pages */
main.narrow.wide-ish { max-width: 960px; }
.crumbs { margin: 26px 0 18px; font-size: 14px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { opacity: .5; margin: 0 4px; }
.page-h1 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; line-height: 1.1; }
.sub-h2 { font-size: 22px; margin: 36px 0 14px; }
.lede.left { margin: 14px 0 0; max-width: 680px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 28px 0 14px; }
.fact { padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.fv { font-size: 30px; font-weight: 800; color: var(--accent); }
.fk { font-size: 14px; }
.page-state .products { margin-top: 18px; }
.topic-grid { list-style: none; margin: 0 0 60px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.topic-grid li { padding: 14px; font-weight: 600; }
.acc-h2 { font-size: 20px; margin: 30px 0 12px; }
.foot-disclaimer { max-width: 1180px; margin: 0 auto; padding: 0 20px 22px; font-size: 13px; opacity: .75; }
.foot-nav a:hover { color: var(--accent); }

/* Practice test */
main.narrow.quiz-main { max-width: 760px; padding-bottom: 50px; }
.quiz-card { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.quiz-card p { margin: 0; }
.quiz-opts { display: flex; flex-wrap: wrap; gap: 14px; }
.check { display: inline-flex; gap: 10px; align-items: center; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.quiz-card .btn.lg, .buy .btn.lg { align-self: flex-start; }
.quiz-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 600; margin-bottom: 10px; }
.progress { height: 6px; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 16px; }
.progress span { display: block; height: 100%; width: 0; background: var(--green); transition: width .25s; }
.q-topic { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.q-sign { display: flex; justify-content: center; padding: 10px; border: 1px solid var(--border); border-radius: 4px; background: #1a1a1a; }
.q-text { font-size: 21px; line-height: 1.35; font-weight: 700; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.choice:hover:not(:disabled) { border-color: var(--text); }
.choice:disabled { cursor: default; }
.choice-key { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 50%; font-size: 13px; font-weight: 700; }
.choice.right { border-color: var(--green); color: var(--green); }
.choice.right .choice-key { border-color: var(--green); }
.choice.wrong { border-color: var(--bad); color: var(--bad); }
.choice.wrong .choice-key { border-color: var(--bad); }
.choice.picked { border-color: var(--text); }
.explain { padding: 14px 16px; border: 1px solid var(--border); border-radius: 4px; }
.explain.ok { border-color: var(--green); }
.explain.no { border-color: var(--bad); }
.quiz-nav { display: flex; justify-content: flex-end; }
.end-score { font-size: 56px; font-weight: 800; line-height: 1; }
.end-score small { font-size: 22px; font-weight: 600; }
.missed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.missed li { padding: 16px 18px; display: grid; gap: 6px; }
.missed p { margin: 0; }
.missed .mq { font-weight: 700; }
.disclaimer { margin-top: 24px; }

/* Cheat sheet */
main.narrow.sheet-main { max-width: 1100px; padding-bottom: 60px; }
.sell { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; }
.sell-text { display: flex; flex-direction: column; gap: 12px; }
.sell-text p { margin: 0; }
.buy { padding: 22px; display: flex; flex-direction: column; gap: 10px; border-color: var(--amber); }
.sell-preview { position: relative; padding: 22px; overflow: hidden; }
.pv-h { margin: 0 0 12px; font-weight: 800; font-size: 18px; }
.pv-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.pv-row b { color: var(--accent); }
.pv-row.blur { filter: blur(4px); user-select: none; }
.pv-fade { position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, var(--bg)); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.sheet-intro { max-width: 760px; }
.sheet-grid { columns: 2 380px; column-gap: 16px; }
.sheet-sec { break-inside: avoid; padding: 18px 20px; margin: 0 0 16px; }
.sheet-sec h2 { font-size: 17px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: minmax(120px, 42%) 1fr; margin: 0; }
.kv dt, .kv dd { margin: 0; padding: 7px 0; border-top: 1px solid var(--border); }
.kv dt { font-weight: 700; padding-right: 12px; }
.kv dt:first-of-type, .kv dt:first-of-type + dd { border-top: 0; }
.sign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sign-card { margin: 0; display: flex; gap: 12px; align-items: center; }
.sign-pic { flex: none; padding: 6px; border-radius: 4px; background: #1a1a1a; }
.sign-card figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px 16px; }
.color-row { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.swatch { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border); }
.sw-red { background: #C8102E; } .sw-yellow { background: #FFCC00; } .sw-orange { background: #FF7A00; } .sw-fluorescent-yellow-green { background: #C4E600; }
.sw-green { background: #00843D; } .sw-blue { background: #0057B8; } .sw-brown { background: #7A4A1E; } .sw-white { background: #fff; }
.answers ol { margin: 0; padding-left: 22px; columns: 2 420px; column-gap: 28px; }
.answers li { break-inside: avoid; margin-bottom: 8px; font-size: 14px; }
.answers .aq { display: block; }
.answers .aa { color: var(--green); }

@media (max-width: 860px) {
  .picker { grid-template-columns: 1fr; }
  .picker .btn { width: 100%; }
  .steps, .products, .sell { grid-template-columns: 1fr; }
  .facts, .topic-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .facts, .topic-grid { grid-template-columns: 1fr; }
  .quiz-card { padding: 20px; }
  .q-text { font-size: 19px; }
  .kv { grid-template-columns: 1fr; }
  .kv dd { border-top: 0; padding-top: 0; }
}

/* Print: the cheat sheet on white paper, black text. */
@media print {
  :root { --bg: #fff; --text: #000; --border: #bbb; --accent: #000; --green: #000; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .topbar, .footer, .no-print, .skip { display: none !important; }
  main { max-width: none; padding: 0; }
  .card { border-color: #bbb; }
  .sheet-sec h2 { color: #000; }
  .sign-pic { background: #fff; }
  .answers .aa { color: #000; text-decoration: underline; }
  a { color: #000; }
}

/* Background art: night mountains + highway with vehicles behind the home hero; a mountain ridge above every footer. */
.page-home .home .hero {
  padding-bottom: clamp(220px, 30vw, 360px);
  background: url("/img/scene.svg?v=2") center bottom / max(1600px, 100%) auto no-repeat;
}
.page-home .hero .lede { text-shadow: none; }
.ridge { height: 110px; margin-top: 50px; background: url("/img/ridge.svg?v=2") left bottom / 800px 110px repeat-x; position: relative; z-index: 0; }
.ridge + .footer { border-top: 0; }
@media (max-width: 600px) {
  .page-home .home .hero { padding-bottom: 200px; background-size: 1100px auto; }
  .ridge { height: 80px; background-size: 580px 80px; }
}
@media print { .ridge { display: none; } }

/* ===================================================================== Light theme (user palette, 2026-11-24)
   Page #F5F7FA; nav, cards and question boxes #FFFFFF; text #111827 / #64748B; primary #2563EB (hover #1D4ED8);
   borders #E2E8F0; selected #EFF6FF; correct #F0FDF4 / #15803D; incorrect #FEF2F2 / #DC2626. */
:root {
  color-scheme: light;
  --page: #F5F7FA;
  --bg: #FFFFFF;              /* surfaces: nav, cards, question boxes, inputs, menus */
  --surface-2: #F5F7FA;
  --text: #111827;
  --muted: #64748B;
  --border: #E2E8F0;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --ember: #2563EB;
  --selected: #EFF6FF;
  --green: #15803D;
  --good-bg: #F0FDF4;
  --bad: #DC2626;
  --bad-bg: #FEF2F2;
  --amber: #B45309;
}
body { background: var(--page); color: var(--text); }
.muted { opacity: 1; color: var(--muted); }
.foot-disclaimer, .crumbs, .state small, .fk, .price small, .sheet-head .muted, .q-topic + .q-sign { color: var(--muted); }
.foot-disclaimer { opacity: 1; }
.crumbs span { opacity: 1; }
.topbar, .footer { background: var(--bg); }
.topbar { border-bottom: 1px solid var(--border); }
.ridge + .footer { border-top: 1px solid var(--border); }
.brand-word b { color: var(--accent); }
.foot-nav a:hover, .mainnav a:hover { color: var(--accent); }

/* Buttons */
.btn { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.solid, .btn.signin { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.btn.solid:hover, .btn.signin:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #FFFFFF; }
.btn.white { border-color: var(--accent); color: var(--accent); }
.btn.white:hover { background: var(--selected); }
.btn:disabled, .btn.solid:disabled { background: var(--border); border-color: var(--border); color: var(--muted); cursor: not-allowed; }
.btn:focus-visible, .choice:focus-visible, .pick select:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }
.pmenu-btn.btn.white { color: var(--text); border-color: var(--border); }

/* Cards and fields */
.card { background: var(--bg); }
.pick select, .field select, .field input, .name-edit input { background-color: var(--bg); border-color: var(--border); color: var(--text); }
.pick select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111827' stroke-width='2'/%3E%3C/svg%3E"); }
.pick select:focus, .field input:focus { border-color: var(--accent); }
.pmenu { box-shadow: 0 12px 32px rgba(17, 24, 39, .12); }
.pmenu-item:hover { background: var(--selected); }
.auth-error { background: var(--bad-bg); }
.auth-ok { background: var(--good-bg); }

/* Labels and highlights */
.label.green { color: var(--green); }
.label.amber { color: var(--amber); }
.page-home .hero .eyebrow, .band .eyebrow, .q-topic, .sheet-sec h2, .fv, .pv-row b, .step-n { color: var(--accent); }
.step-n { border-color: var(--accent); background: var(--selected); }
.product.best, .buy { border-color: var(--accent); box-shadow: 0 0 0 3px var(--selected); }
.state.ready { border-color: var(--green); }
.state.ready::after { color: var(--green); }
.ticks li::before { color: var(--green); }

/* Practice test */
.progress { background: var(--border); border-color: var(--border); }
.progress span { background: var(--accent); }
.choice { background: var(--bg); color: var(--text); border-color: var(--border); }
.choice:hover:not(:disabled) { border-color: var(--accent); background: var(--selected); }
.choice.picked { border-color: var(--accent); background: var(--selected); }
.choice-key { border-color: var(--border); color: var(--muted); }
.choice.right { background: var(--good-bg); border-color: var(--green); color: var(--green); }
.choice.right .choice-key { border-color: var(--green); color: var(--green); }
.choice.wrong { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.choice.wrong .choice-key { border-color: var(--bad); color: var(--bad); }
.explain.ok { background: var(--good-bg); border-color: var(--green); }
.explain.no { background: var(--bad-bg); border-color: var(--bad); }
.missed .good { color: var(--green); } .missed .bad { color: var(--bad); }
.q-sign, .sign-pic { background: var(--page); }

/* Cheat sheet */
.pv-fade { background: linear-gradient(rgba(255, 255, 255, 0), var(--bg)); }
.answers .aa { color: var(--green); }

/* Admin charts and tooltips */
.chart .grid { stroke: var(--border); }
.chart .axis { fill: var(--muted); }
.chart .hair { stroke: var(--muted); }
.tip { background: var(--bg); box-shadow: 0 8px 24px rgba(17, 24, 39, .12); }
.crop-dlg::backdrop { background: rgba(17, 24, 39, .55); }

/* Home hero: real photo (Yosemite Valley from Tunnel View, CC0 by EF5 via Wikimedia Commons) with the drawn highway on top. */
.page-home .home .hero {
  position: relative;
  padding-bottom: clamp(200px, 22vw, 290px);
  background:
    url("/img/road.svg?v=1") center bottom / max(1600px, 100%) auto no-repeat,
    linear-gradient(to bottom, #F5F7FA 0%, rgba(245, 247, 250, .88) 16%, rgba(245, 247, 250, .45) 34%, rgba(245, 247, 250, 0) 50%),
    url("/img/yosemite-1920.webp?v=1") center 30% / cover no-repeat;
  border-bottom: 0;
}
.photo-credit { margin: 0; padding: 0 20px 10px; text-align: right; font-size: 12px; color: var(--muted); }
.photo-credit a { color: var(--muted); }
@media (max-width: 900px) {
  .page-home .home .hero {
    padding-bottom: 230px;
    background:
      url("/img/road.svg?v=1") center bottom / 1100px auto no-repeat,
      linear-gradient(to bottom, #F5F7FA 0%, rgba(245, 247, 250, .9) 30%, rgba(245, 247, 250, .35) 48%, rgba(245, 247, 250, 0) 62%),
      url("/img/yosemite-1080.webp?v=1") 42% 40% / cover no-repeat;
  }
}

.page-home .hero .lede { text-shadow: 0 0 12px #F5F7FA, 0 0 24px #F5F7FA; }
/* Sections have no label/title/description above them: tighter spacing between them. */
.page-home .band { padding-top: 56px; }
.page-state .topic-grid { margin-top: 28px; }

/* Home hero (2026-11-24): snowy Lassen Peak photo (NPS, public domain) with falling snow; plain straight edge, no road. */
.page-home .home .hero {
  position: relative; overflow: hidden;
  padding: 90px 20px clamp(220px, 26vw, 360px);
  background:
    linear-gradient(to bottom, #F5F7FA 0%, rgba(245, 247, 250, .85) 14%, rgba(245, 247, 250, .35) 32%, rgba(245, 247, 250, 0) 46%),
    url("/img/lassen-1920.webp?v=1") center 35% / cover no-repeat;
  border-bottom: 0;
}
.page-home .hero > *:not(.hero-snow) { position: relative; z-index: 1; }
.hero-snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.photo-credit { padding-top: 8px; }
.page-home .band:first-of-type { padding-top: 48px; }
@media (max-width: 900px) {
  .page-home .home .hero {
    padding: 64px 20px 230px;
    background:
      linear-gradient(to bottom, #F5F7FA 0%, rgba(245, 247, 250, .88) 24%, rgba(245, 247, 250, .3) 42%, rgba(245, 247, 250, 0) 56%),
      url("/img/lassen-1080.webp?v=1") 45% 40% / cover no-repeat;
  }
}
/* Readable text over the photo: frosted panel behind the intro line. */
.page-home .hero .lede {
  display: inline-block; max-width: 600px; margin-top: 20px; padding: 12px 20px; border-radius: 4px;
  background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  text-shadow: none; box-shadow: 0 6px 24px rgba(17, 24, 39, .10);
}
/* Snowfall over every page (site/js/snow.js): fixed, above content, never takes clicks. */
/* Snow layer: above page backgrounds and the home photo, below all text, buttons and cards. */
.snow { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1; }
body:has(> .snow) main { z-index: auto; }
body:has(> .snow) main > *:not(.hero), body.page-home:has(> .snow) .hero > *:not(.hero-snow), body:has(> .snow) .footer { position: relative; z-index: 2; }
@media print { .snow { display: none; } }
/* "Start practice test" button under the hero intro. */
.page-home .hero .hero-cta { margin: 22px 0 0; }
.page-home .hero .hero-cta .btn { padding: 14px 30px; font-size: 17px; box-shadow: 0 8px 24px rgba(37, 99, 235, .30); }

/* ===================================================================== Dark theme (default since 2026-11-24)
   Same blue-slate family as the light palette. Applies unless the visitor switched to light (html[data-theme=light]). */
html:not([data-theme="light"]) {
  color-scheme: dark;
  --page: #0B1220;
  --bg: #111827;              /* nav, cards, question boxes, inputs, menus */
  --surface-2: #0F172A;
  --text: #F1F5F9;
  --muted: #94A3B8;
  --border: #263244;
  --accent: #3B82F6;
  --accent-hover: #2563EB;
  --ember: #3B82F6;
  --selected: #172554;
  --green: #4ADE80;
  --good-bg: #052E16;
  --bad: #F87171;
  --bad-bg: #3B1219;
  --amber: #FBBF24;
}
html:not([data-theme="light"]) .ridge { background-image: url("/img/ridge-dark.svg?v=1"); }
html:not([data-theme="light"]) .pick select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23F1F5F9' stroke-width='2'/%3E%3C/svg%3E"); }
html:not([data-theme="light"]) .pv-fade { background: linear-gradient(rgba(17, 24, 39, 0), var(--bg)); }
html:not([data-theme="light"]) .pmenu, html:not([data-theme="light"]) .tip { box-shadow: 0 12px 32px rgba(0, 0, 0, .5); }
html:not([data-theme="light"]) .page-home .home .hero {
  background:
    linear-gradient(to bottom, #0B1220 0%, rgba(11, 18, 32, .85) 14%, rgba(11, 18, 32, .4) 32%, rgba(11, 18, 32, .05) 46%),
    url("/img/lassen-1920.webp?v=1") center 35% / cover no-repeat;
}
@media (max-width: 900px) {
  html:not([data-theme="light"]) .page-home .home .hero {
    background:
      linear-gradient(to bottom, #0B1220 0%, rgba(11, 18, 32, .88) 24%, rgba(11, 18, 32, .35) 42%, rgba(11, 18, 32, .05) 56%),
      url("/img/lassen-1080.webp?v=1") 45% 40% / cover no-repeat;
  }
}
html:not([data-theme="light"]) .page-home .hero h1 { text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
html:not([data-theme="light"]) .page-home .hero .lede { background: #111827; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }

/* Light/dark switch in the top bar. */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-right: 6px;
  border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:focus-visible { outline: 3px solid rgba(59, 130, 246, .4); outline-offset: 2px; }
.theme-toggle .i-moon { display: none; }
html[data-theme="light"] .theme-toggle .i-sun { display: none; }
html[data-theme="light"] .theme-toggle .i-moon { display: block; }

/* Logo (user's "California DMV Test" artwork, white version for the dark site). */
.brand-logo { display: block; height: 52px; width: auto; }
.foot-brand .brand-logo { height: 64px; }
@media (max-width: 640px) { .brand-logo { height: 44px; } }

/* Settings (gear) menu in the top bar: language switch. */
.settings-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-right: 6px;
  border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text); cursor: pointer;
}
.settings-btn:hover, .settings-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.settings-btn:focus-visible { outline: 3px solid rgba(59, 130, 246, .4); outline-offset: 2px; }
.settings-menu { min-width: 250px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 14px 10px; }
.settings-k { font-weight: 600; color: var(--muted); }
/* Language button in the top bar (replaced the settings gear). */
.lang-switch { margin-right: 6px; min-width: 88px; justify-content: center; }

/* Public Sans titles: slightly tighter, bold. */
h1, h2, h3, h4 { font-family: "Public Sans", "Inter", system-ui, sans-serif; letter-spacing: -0.02em; }

/* ===================================================================== Phones (2026-11-24)
   Menu links move to a compact second row of the top bar; footer links wrap; tighter spacing. */
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; padding: 10px 14px 8px; }
  .mainnav { display: flex; order: 3; flex: 1 1 100%; margin: 0; justify-content: space-between; gap: 2px;
    border-top: 1px solid var(--border); padding-top: 6px; }
  .mainnav a { flex: 1 1 0; text-align: center; padding: 6px 4px; font-size: 12px; letter-spacing: .04em; white-space: nowrap; }
  .foot-nav { flex: 1 1 100%; justify-content: center; column-gap: 18px; row-gap: 10px; }
  .foot-nav a { white-space: nowrap; }
}
@media (max-width: 600px) {
  .page-home .home .hero { padding: 44px 18px 120px; }
  .page-home .hero h1 { font-size: clamp(34px, 10vw, 44px); line-height: 1.08; }
  .page-home .hero .lede { margin-top: 16px; padding: 12px 16px; font-size: 16px; }
  .page-home .hero .hero-cta .btn { padding: 13px 26px; font-size: 16px; }
  .photo-credit { text-align: center; padding: 8px 16px 4px; font-size: 11px; }
  .page-home .band, .page-home .band:first-of-type { padding-top: 32px; }
  .ridge { height: 70px; margin-top: 32px; background-size: 520px 70px; }
  .foot-top { padding: 22px 16px; gap: 16px; }
  .foot-disclaimer { padding-left: 16px; padding-right: 16px; }
  /* bottom line: one item per row, no separator dots */
  .foot-legal { flex-direction: column; align-items: center; gap: 6px; padding: 14px 16px 18px; }
  .foot-legal .dot { display: none; }
}
@media (max-width: 380px) {
  .topbar .btn.sm { padding: 6px 12px; font-size: 13px; }
  .lang-switch { min-width: 0; }
  .brand-logo { height: 40px; }
  .mainnav a { font-size: 11px; letter-spacing: .02em; }
}
@media (max-width: 860px) {
  /* long labels (Spanish) wrap onto two lines instead of pushing the page wider */
  .mainnav a { min-width: 0; white-space: normal; line-height: 1.2; display: flex; align-items: center; justify-content: center; }
}

/* Cookie banner (js/consent.js): bottom-left card on desktop, full-width bottom sheet on phones. */
.consent {
  position: fixed; left: 20px; bottom: 20px; z-index: 90; width: min(440px, calc(100vw - 40px));
  padding: 20px 22px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.consent-h { margin: 0 0 6px; font-size: 18px; }
.consent-text { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.consent-text a { color: var(--text); }
.consent-actions { display: flex; gap: 10px; }
.consent-actions .btn { flex: 1 1 0; justify-content: center; }
@media (max-width: 600px) {
  .consent { left: 0; right: 0; bottom: 0; width: auto; border-radius: 4px 4px 0 0; border-bottom: 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
}
@media print { .consent { display: none; } }

/* Home page login popup (js/login-popup.js). */
.login-pop {
  width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 28px 26px 18px;
  border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.login-pop::backdrop { background: rgba(3, 7, 18, .65); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.lp-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 4px; background: none;
  color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.lp-close:hover { color: var(--text); background: var(--surface-2); }
.lp-title { margin: 0 30px 8px 0; font-size: 24px; }
.lp-text { margin: 0 0 20px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.lp-google { width: 100%; justify-content: center; gap: 10px; background: #FFFFFF; color: #111827; border-color: #FFFFFF; }
.lp-google:hover { background: #E5E7EB; border-color: #E5E7EB; color: #111827; }
.lp-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.lp-or::before, .lp-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.lp-form { display: flex; flex-direction: column; gap: 10px; }
.lp-label { font-size: 14px; font-weight: 600; }
.lp-form input { width: 100%; padding: 13px 14px; border: 1px solid var(--border); border-radius: 4px; background: var(--page); color: var(--text); font: inherit; }
.lp-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, .3); }
.lp-err { margin: 0; color: var(--bad); font-size: 14px; }
.lp-go { width: 100%; justify-content: center; margin-top: 4px; }
.lp-later { display: block; margin: 12px auto 0; padding: 8px 12px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.lp-later:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 600px) { .login-pop { padding: 24px 20px 14px; } .lp-title { font-size: 22px; } }

/* Stripe / Cash App Pay button under the PayPal one (Cash App green). */
.cashapp-btn { width: 100%; justify-content: center; margin-top: 10px; background: #00D64F; border-color: #00D64F; color: #04140A; font-weight: 700; }
.cashapp-btn:hover { background: #00B843; border-color: #00B843; color: #04140A; }
.cashapp-btn:disabled { opacity: .6; }
.sell #buy-btn { width: 100%; justify-content: center; }

/* Payment buttons with brand logos (cheat sheet page). White buttons so every logo shows in its own colors. */
.pay-buttons { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 6px; }
.pay-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 10px 18px;
  border: 1px solid #FFFFFF; border-radius: 4px; background: #FFFFFF; color: #111827; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.pay-btn:hover:not(:disabled) { background: #F1F5F9; box-shadow: 0 0 0 3px rgba(59, 130, 246, .35); }
.pay-btn:focus-visible { outline: 3px solid rgba(59, 130, 246, .6); outline-offset: 2px; }
.pay-btn:disabled { opacity: .55; cursor: default; }
.pay-btn.busy { opacity: 1; box-shadow: 0 0 0 3px rgba(59, 130, 246, .6); }
.pay-btn[hidden] { display: none; }
.pay-paypal img { height: 24px; width: auto; }
.pay-cashapp img { height: 26px; width: 26px; border-radius: 6px; }
.pay-card { justify-content: space-between; }
.pay-cards { display: inline-flex; align-items: center; gap: 8px; }
.pay-cards img { height: 18px; width: auto; }
.pay-cards img[src*="amex"] { height: 22px; }
.pay-off { margin: 0; text-align: center; }
@media (max-width: 380px) { .pay-card { flex-direction: column; gap: 6px; } }
.pay-card > span:first-child { white-space: nowrap; }
@media (max-width: 420px) { .pay-btn { font-size: 15px; padding: 10px 16px; } .pay-cards { gap: 6px; } .pay-cards img { height: 15px; } .pay-cards img[src*="amex"] { height: 19px; } }

/* /faq: questions on the left, assistant on the right (stacked on phones). */
.faq-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 28px; align-items: start; }
.faq-col .faq { max-width: none; padding-bottom: 0; }
.faq-h { font-size: clamp(28px, 4vw, 40px); margin: 0 0 18px; }
.ai { position: sticky; top: 96px; display: flex; flex-direction: column; height: min(640px, calc(100vh - 120px)); padding: 0; overflow: hidden; }
.ai-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border, #263244); }
.ai-dot { width: 12px; height: 12px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); flex: none; }
.ai-title { font-size: 17px; margin: 0; }
.ai-sub { margin: 2px 0 0; font-size: 13px; color: var(--muted, #94A3B8); }
.ai-new { margin-left: auto; background: none; border: 1px solid var(--border, #263244); color: inherit; border-radius: 4px; width: 34px; height: 34px; cursor: pointer; font-size: 16px; flex: none; }
.ai-new:hover { border-color: #3B82F6; }
.ai-log { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 88%; padding: 10px 14px; border-radius: 4px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.ai-msg p { margin: 0 0 8px; } .ai-msg p:last-child, .ai-msg ul:last-child { margin-bottom: 0; }
.ai-msg ul { margin: 0 0 8px; padding-left: 20px; } .ai-msg li { margin: 2px 0; }
.ai-msg a { color: #93C5FD; }
.ai-msg.bot { align-self: flex-start; background: #1B2638; border-bottom-left-radius: 2px; }
.ai-msg.me { align-self: flex-end; background: #2563EB; color: #fff; border-bottom-right-radius: 2px; white-space: pre-wrap; }
.ai-msg.wait { color: var(--muted, #94A3B8); font-style: italic; }
.ai-msg.err { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .4); color: #FCA5A5; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.ai-chips[hidden] { display: none; }
.ai-chip { background: none; border: 1px solid var(--border, #263244); color: #93C5FD; border-radius: 4px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.ai-chip:hover { border-color: #3B82F6; }
.ai-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--border, #263244); }
.ai-form textarea { flex: 1; min-width: 0; resize: none; max-height: 140px; padding: 10px 14px; border-radius: 4px; border: 1px solid var(--border, #263244); background: #0B1220; color: inherit; font: inherit; font-size: 15px; line-height: 1.4; }
.ai-form textarea:focus { outline: none; border-color: #3B82F6; }
.ai-send { flex: none; }
.ai-note { margin: 0; padding: 0 16px 12px; font-size: 12px; color: var(--muted, #94A3B8); text-align: center; }
@media (max-width: 900px) {
  .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .ai { position: static; height: 560px; }
}
/* Wide screens: page spans the full width; assistant sticks to the right edge of the window, full height under the top bar. */
@media (min-width: 1100px) {
  .page-faq main, .page-faq .faq-page { max-width: none; width: 100%; margin: 0; padding-left: 0; padding-right: 0; }
  .page-faq .faq-layout { grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; padding: 0 20px 24px 32px; }
  .page-faq .faq-col { width: 100%; max-width: 820px; justify-self: center; padding-top: 40px; }
  .page-faq .faq-page { padding-top: 16px; }
  .page-faq .faq-col { padding-top: 24px; }
  .page-faq .ai { position: sticky; top: 86px; height: calc(100vh - 106px); margin-top: 0; }
}

/* Bot trap fields: invisible to people, filled in by spam bots. */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.sheet-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sheet-actions [hidden] { display: none; }
.sheet-actions .btn { display: inline-flex; align-items: center; gap: 8px; }

/* Print / PDF: black on white (overrides the dark theme), headings in dark blue, color swatches kept. */
@media print {
  @page { margin: 0.5in; }
  html, html:not([data-theme="light"]) { --bg: #fff; --surface: #fff; --text: #111; --muted: #444; --border: #bbb; --accent: #1D4ED8; background: #fff !important; color: #111 !important; }
  html body, html main, html .sheet, html .card, html .sheet-sec, html .sheet table, html .sheet td, html .sheet th { background: #fff !important; color: #111 !important; box-shadow: none !important; }
  html .card { border: 1px solid #bbb !important; }
  html .sheet h1, html .sheet h2, html .sheet h3 { color: #1D4ED8 !important; }
  html .sheet .muted, html .sheet-intro, html #sheet-updated { color: #444 !important; }
  html .sheet tr, html .sheet td { border-color: #ddd !important; }
  .sheet-sec, .card, tr { break-inside: avoid; }
  .snow, .ridge, .consent, .login-pop, .ai { display: none !important; }
  [class*="swatch"], .sign-pic, .sign-pic * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Admin link in the top bar (admin IP only) and the Orders page. */
.admin-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.admin-link[hidden] { display: none; }
.grant-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; margin-bottom: 14px; }
.grant-form strong { flex: 1 1 100%; }
.grant-form input { flex: 1 1 200px; min-width: 0; padding: 9px 12px; border: 1px solid var(--border); border-radius: 4px; background: #0B1220; color: inherit; font: inherit; }

/* Checkout: buyer name + email above the payment buttons; "email me my link". */
.buyer { display: grid; gap: 10px; margin: 6px 0 4px; }
.buyer-field { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
.buyer-field input, .relink-form input { width: 100%; min-width: 0; padding: 11px 13px; border: 1px solid var(--border); border-radius: 4px; background: #0B1220; color: inherit; font: inherit; font-weight: 400; font-size: 16px; }
.buyer-field input:focus, .relink-form input:focus { outline: none; border-color: #3B82F6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .25); }
.buyer-field input[aria-invalid="true"] { border-color: #EF4444; }
.buyer-help { margin: 0; }
.buyer-err { margin: 0; color: #FCA5A5; font-size: 14px; }
.pay-title { margin: 12px 0 6px; font-weight: 700; font-size: 14px; }
.relink { margin-top: 14px; }
.relink summary { padding: 12px 16px; cursor: pointer; font-weight: 600; font-size: 14px; }
.relink-form { display: flex; gap: 8px; padding: 0 16px 12px; }
.relink-form .btn { flex: none; }
.relink #relink-msg { padding: 0 16px 14px; margin: 0; }

/* Reviews: summary (like "4.8 Overall Satisfaction Rating · Based on N Ratings" + 5→1 bars), comments, rating form. */
.stars { --pct: 0%; position: relative; display: inline-block; font-size: 18px; line-height: 1; letter-spacing: 2px; color: #334155; }
.stars::before { content: "★★★★★"; }
.stars::after { content: "★★★★★"; position: absolute; left: 0; top: 0; width: var(--pct); overflow: hidden; color: #FBBF24; white-space: nowrap; }
.reviews { margin: 34px 0 10px; }
.rv-h { margin: 0 0 14px; font-size: clamp(22px, 3vw, 28px); }
.rv-top { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: 28px; align-items: center; padding: 22px 24px; }
.rv-avg { margin: 0; display: flex; align-items: center; gap: 12px; }
.rv-avg #rv-avg { font-size: 52px; font-weight: 800; line-height: 1; font-family: "Public Sans", sans-serif; }
.rv-avg .stars { font-size: 22px; }
.rv-label { margin: 8px 0 2px; font-weight: 700; }
.rv-bars { display: grid; gap: 8px; }
.rv-bar { display: grid; grid-template-columns: 34px minmax(0, 1fr) 56px 64px; gap: 10px; align-items: center; font-size: 14px; }
.rv-k { font-weight: 700; white-space: nowrap; }
.rv-track { height: 10px; background: #1E293B; border-radius: 2px; overflow: hidden; }
.rv-fill { display: block; height: 100%; background: #FBBF24; }
.rv-n { text-align: right; font-variant-numeric: tabular-nums; }
.rv-pct { color: var(--muted, #94A3B8); font-variant-numeric: tabular-nums; }
.rv-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.rv-item { padding: 14px 16px; }
.rv-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rv-item-head .stars { font-size: 15px; }
.rv-badge { font-size: 12px; color: #4ADE80; border: 1px solid rgba(74, 222, 128, .4); padding: 1px 6px; border-radius: 4px; }
.rv-body { margin: 8px 0 6px; white-space: pre-wrap; }
.rate { margin: 28px 0 0; padding: 20px 22px; display: grid; gap: 12px; max-width: 640px; }
.rate-h { margin: 0; font-size: 20px; }
.rate #rate-sub { margin: -6px 0 0; }
.rate textarea { width: 100%; min-width: 0; padding: 11px 13px; border: 1px solid var(--border); border-radius: 4px; background: #0B1220; color: inherit; font: inherit; font-weight: 400; font-size: 16px; resize: vertical; }
.rate-stars { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rate-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-stars label { cursor: pointer; font-size: 34px; line-height: 1; color: #334155; }
.rate-stars label::before { content: "★"; }
.rate-stars input:checked ~ label, .rate-stars label:hover, .rate-stars label:hover ~ label { color: #FBBF24; }
.rate-stars input:focus-visible + label { outline: 2px solid #3B82F6; outline-offset: 2px; }
.rate .btn { justify-self: start; }
@media (max-width: 640px) {
  .rv-top { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .rv-bar { grid-template-columns: 30px minmax(0, 1fr) 44px 58px; gap: 8px; font-size: 13px; }
}
/* Narrow phones: the card button's label may wrap (long in Spanish) instead of widening the page. */
.sell-text, .buy { min-width: 0; }
@media (max-width: 420px) { .pay-card > span:first-child { white-space: normal; text-align: left; } .pay-card { gap: 8px; } }
/* Apple Pay: Safari draws Apple's official black button. */
.pay-apple { background: #000; border-color: #000; -webkit-appearance: -apple-pay-button; appearance: -apple-pay-button; -apple-pay-button-type: plain; -apple-pay-button-style: black; }
.pay-apple:hover:not(:disabled) { background: #000; }

/* Top bar: "Cheat sheet" in the same orange as the "Paid" label. */
.mainnav a.nav-paid { color: #FBBF24; }
.mainnav a.nav-paid:hover { color: #FCD34D; }

/* Footer: accepted payment logos (white tiles, like card badges), above the logo. */
.foot-pay { max-width: 1180px; margin: 0 auto; padding: 26px 20px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pay-chip { display: inline-flex; align-items: center; justify-content: center; width: 78px; height: 44px; background: #fff; border-radius: 4px; }
.pay-chip img { max-width: 64px; max-height: 24px; width: auto; height: auto; }
.foot-top { justify-content: center; }
@media (max-width: 420px) { .pay-chip { width: 60px; height: 38px; } .pay-chip img { max-width: 50px; max-height: 20px; } }
.pay-chip img.sq { max-height: 32px; max-width: 32px; }
@media (max-width: 420px) { .pay-chip img.sq { max-height: 28px; max-width: 28px; } }
.pay-chip img.ap { max-height: 30px; max-width: 46px; }
@media (max-width: 420px) { .pay-chip img.ap { max-height: 26px; max-width: 40px; } }

/* Footer bottom row: logo (left) · payment logos (middle) · © + policies + email (right). */
.footer .foot-disclaimer { padding-top: 26px; text-align: center; }
.foot-bar { max-width: 1280px; margin: 0 auto; padding: 20px 24px 22px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 24px; }
.foot-bar .foot-brand { justify-self: start; }
.foot-bar .foot-pay { max-width: none; margin: 0; padding: 0; align-self: center; }
.foot-bar .foot-legal { justify-self: end; border-top: 0; padding: 0; justify-content: flex-end; text-align: right; max-width: 380px; }
@media (max-width: 1100px) {
  .foot-bar { grid-template-columns: 1fr auto; }
  .foot-bar .foot-pay { grid-column: 1 / -1; grid-row: 1; }
}
@media (max-width: 640px) {
  .foot-bar { grid-template-columns: 1fr; justify-items: center; gap: 18px; }
  .foot-bar .foot-brand, .foot-bar .foot-legal { justify-self: center; justify-content: center; text-align: center; }
}
/* Right column: one item per line, no dots. */
.foot-bar .foot-legal { flex-direction: column; align-items: flex-end; gap: 4px; }
.foot-bar .foot-legal .dot { display: none; }
@media (max-width: 640px) { .foot-bar .foot-legal { align-items: center; } }

/* Top bar language switch: plain white underlined text, no box. */
.topbar .lang-switch, .topbar .lang-switch:hover, .topbar .lang-switch:focus { background: none; border: 0; box-shadow: none; color: #fff; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; padding: 6px 4px; min-width: 0; font-weight: 600; }
.topbar .lang-switch:hover { text-decoration-thickness: 2px; }
.topbar .lang-switch:focus-visible { outline: 2px solid #3B82F6; outline-offset: 2px; }

/* Top bar "Log in": plain white text, no box (2026-11-24) */
.topbar .btn.signin, .topbar .btn.signin:hover, .topbar .btn.signin:focus { background: none; border: 0; box-shadow: none; color: #FFFFFF; padding: 6px 4px; font-weight: 600; opacity: 1; }
.topbar .btn.signin:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* admin > Stats */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22C55E; margin-right: 7px; vertical-align: 1px; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: live-pulse 2s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.live-tile .tv { color: #4ADE80; }
.tile .ts { font-size: 12.5px; opacity: .7; }
.page-stats .admin-body > .card { margin-top: 14px; }
.live-card h3, .page-stats .list-card h3 { margin: 0 0 8px; }
.legend { display: flex; gap: 16px; font-size: 12.5px; opacity: .8; margin-top: 6px; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.sw-a { background: #3B4A63; } .sw-b { background: #3987e5; }

/* Top bar "Cheat sheet" link: soft amber glow that pulses (2026-11-24) */
.mainnav a.nav-paid { text-shadow: 0 0 6px rgba(251, 191, 36, .55), 0 0 14px rgba(251, 191, 36, .35); animation: nav-glow 2.4s ease-in-out infinite; }
.mainnav a.nav-paid:hover { animation-play-state: paused; text-shadow: 0 0 8px rgba(252, 211, 77, .9), 0 0 20px rgba(251, 191, 36, .6); }
@keyframes nav-glow {
  0%, 100% { text-shadow: 0 0 4px rgba(251, 191, 36, .35), 0 0 10px rgba(251, 191, 36, .2); }
  50% { text-shadow: 0 0 8px rgba(251, 191, 36, .85), 0 0 18px rgba(251, 191, 36, .55), 0 0 30px rgba(251, 191, 36, .3); }
}
@media (prefers-reduced-motion: reduce) { .mainnav a.nav-paid { animation: none; } }
