/*
 * OldStyle public site — "Iron & Ember".
 *
 * shadcn's token names and component shapes, written as plain CSS because this
 * image has no build toolchain and the CSP is style-src 'self'. The palette is
 * the launcher's (OLDS_Patcher skin): iron black, bone text, gold, blood red,
 * and a parchment light mode after the original Metin2 site.
 *
 * Theme: light tokens on :root, dark when the system asks for it, and an
 * explicit data-theme on <html> (set by theme.js from the visitor's choice)
 * wins over both. No JS still gets the system theme.
 */

@font-face { font-family: "Cinzel"; font-weight: 600; font-display: swap; src: url("/static/fonts/cinzel-latin-600-normal.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: "Cinzel"; font-weight: 600; font-display: swap; src: url("/static/fonts/cinzel-latin-ext-600-normal.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; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-400-normal.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: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-ext-400-normal.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; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-500-normal.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: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-ext-500-normal.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; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-600-normal.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: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-ext-600-normal.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; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex-mono-latin-400-normal.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: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex-mono-latin-ext-400-normal.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; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-mono-latin-500-normal.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: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-mono-latin-ext-500-normal.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; }

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --background: #efe3c8; --foreground: #2a1a12;
  --card: #f7efdc; --muted: #e6d6b4; --muted-foreground: #6b5440;
  --accent: #e6d6b4; --border: #d4c09a; --input: #b9a27a;
  --primary: #9e0f1b; --primary-hover: #b3121f; --primary-foreground: #fff6ea;
  --gold: #7a4e0e; --gold-soft: #ead8b0; --ring: #9e0f1b;
  --neg-bg: #f4d6cc; --neg-ink: #7a0f14;
  --pos-bg: #dbe8c6; --pos-ink: #2f4a12;
  --warn-bg: #f6e3b8; --warn-ink: #6b4508;
  --shadow: 0 12px 32px rgb(42 26 18 / .18);
  /* the dark bands (header, hero, footer) are dark in both modes */
  --band: #0c0b0b; --band-fg: #ece4d8; --band-muted: #b3a898; --band-border: #2b2724;
  --radius: 8px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #0c0b0b; --foreground: #ece4d8;
    --card: #161413; --muted: #1f1c1a; --muted-foreground: #b3a898;
    --accent: #221e1b; --border: #34302c; --input: #4d4640;
    --primary: #b3121f; --primary-hover: #c8162a; --primary-foreground: #fff6ea;
    --gold: #d9b36c; --gold-soft: #2a2216; --ring: #d9b36c;
    --neg-bg: #2c1716; --neg-ink: #f08a80;
    --pos-bg: #18241a; --pos-ink: #7fcf8a;
    --warn-bg: #2a2214; --warn-ink: #e3b25e;
    --shadow: 0 12px 32px rgb(0 0 0 / .45);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #0c0b0b; --foreground: #ece4d8;
  --card: #161413; --muted: #1f1c1a; --muted-foreground: #b3a898;
  --accent: #221e1b; --border: #34302c; --input: #4d4640;
  --primary: #b3121f; --primary-hover: #c8162a; --primary-foreground: #fff6ea;
  --gold: #d9b36c; --gold-soft: #2a2216; --ring: #d9b36c;
  --neg-bg: #2c1716; --neg-ink: #f08a80;
  --pos-bg: #18241a; --pos-ink: #7fcf8a;
  --warn-bg: #2a2214; --warn-ink: #e3b25e;
  --shadow: 0 12px 32px rgb(0 0 0 / .45);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Components set display (flex, grid), which would otherwise beat the hidden
   attribute: download.js and theme.js both show and hide by toggling it. */
[hidden] { display: none !important; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--background); color: var(--foreground);
  font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
h1, h2, h3 { margin: 0; color: var(--foreground); text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: .01em; }
h1 { font-size: 2.25rem; line-height: 1.15; }
h2 { font-size: 1.5rem; line-height: 1.3; }
h3 { font-size: 1.0625rem; line-height: 1.4; font-weight: 600; }
p { margin: 0; text-wrap: pretty; }
code, .mono { font-family: var(--mono); font-size: .9375em; overflow-wrap: anywhere; }
.muted { color: var(--muted-foreground); }
.small { font-size: .875rem; }
.lede { font-size: 1.125rem; color: var(--muted-foreground); max-width: 36rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--primary); color: var(--primary-foreground); padding: .5rem 1rem; border-radius: 6px; }
.skip:focus { top: 1rem; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 2rem; }
.page { padding-top: 3rem; padding-bottom: 1rem; }
.narrow { max-width: 26rem; margin: 0 auto; }
.medium { max-width: 46rem; margin: 0 auto; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; } .gap-4 { gap: 2rem; } .gap-5 { gap: 3rem; }
.between { justify-content: space-between; }
.center { text-align: center; justify-content: center; }
.page-head { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 2rem; }

/* ---------- header ---------- */
.site-header { background: var(--band); color: var(--band-fg); border-bottom: 1px solid var(--band-border); position: relative; z-index: 3; }
.site-header.overlay { position: absolute; left: 0; right: 0; top: 0; background: linear-gradient(rgb(12 11 11 / .88), rgb(12 11 11 / 0)); border-bottom: 0; }
.site-header .bar { display: flex; align-items: center; gap: 2rem; height: 4rem; }
.brand { display: block; flex: none; }
.brand img { display: block; height: 2rem; width: auto; }
.nav { display: flex; gap: .25rem; margin-right: auto; }
.nav a { color: var(--band-muted); text-decoration: none; font-size: .9375rem; padding: .5rem .75rem; border-radius: 6px; min-height: 2.5rem; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--band-fg); background: rgb(255 255 255 / .07); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-actions form { margin: 0; }
.site-header .btn-ghost { color: var(--band-fg); }
.site-header .btn-ghost:hover { background: rgb(255 255 255 / .08); }
.site-header .btn-outline { color: var(--band-fg); border-color: rgb(236 228 216 / .35); }
.site-header .btn-outline:hover { background: rgb(255 255 255 / .08); }
.theme-toggle .ico-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }

/* phone menu: a <details>, so it opens without any script */
.menu { display: none; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--band); border-bottom: 1px solid var(--band-border); padding: .5rem 1rem 1rem; display: flex; flex-direction: column; gap: 2px; }
.menu-panel a:not(.btn), .menu-panel .linklike { color: var(--band-fg); text-decoration: none; min-height: 2.75rem; display: flex; align-items: center; padding: 0 .75rem; border-radius: 6px; font-size: 1rem; }
.menu-panel a:not(.btn):hover { background: rgb(255 255 255 / .07); }
.menu-panel .row { flex-wrap: nowrap; gap: .5rem; padding-top: .75rem; }
.menu-panel .row > * { flex: 1; }
.menu-panel form { margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 2.5rem; padding: 0 1rem; border-radius: 6px; border: 1px solid transparent;
  font: 500 .9375rem/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  background: transparent; color: var(--foreground);
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: inset 0 1px 0 rgb(255 255 255 / .12); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { border-color: var(--input); }
.btn-outline:hover { background: var(--accent); }
.btn-gold { border-color: var(--gold); color: var(--gold); }
.btn-gold:hover { background: var(--gold-soft); }
.btn-ghost:hover { background: var(--accent); }
.btn-link { height: auto; padding: 0; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.btn-sm { height: 2.25rem; padding: 0 .75rem; font-size: .875rem; }
.btn-lg { height: 2.875rem; padding: 0 1.375rem; font-size: 1rem; }
.btn-icon { width: 2.5rem; padding: 0; }
.btn-block { width: 100%; }
.ico { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- card ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.card-header { padding: 1.5rem 1.5rem 0; display: flex; flex-direction: column; gap: .25rem; }
.card-header.split { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; }
.card-header h2 { font-size: 1.1875rem; }
.card-content { padding: 1.5rem; }
.card-header + .card-content { padding-top: 1rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.card-description { color: var(--muted-foreground); font-size: .9375rem; }
.card.raised { box-shadow: var(--shadow); }
.empty { padding: 3.5rem 1.5rem; text-align: center; }
.empty-title { font-family: var(--display); font-weight: 600; font-size: 1.125rem; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: .375rem; }
.label { font-size: .875rem; font-weight: 500; }
.input {
  height: 2.5rem; width: 100%; padding: 0 .75rem; border: 1px solid var(--input); border-radius: 6px;
  background: var(--card); color: var(--foreground); font: 400 .9375rem var(--sans);
}
.input:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; border-color: transparent; }
.input.code { font-family: var(--mono); letter-spacing: .15em; }
.field-desc { font-size: .8125rem; color: var(--muted-foreground); line-height: 1.5; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.inline-form { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 12rem; }
.divider-text { display: flex; align-items: center; gap: .75rem; color: var(--muted-foreground); font-size: .8125rem; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }
/* Honeypot: off-screen, never display:none, because bots skip hidden fields. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
/* Turnstile height is reserved so the form does not jump when it renders.
   The breakpoint matches turnstile.js (compact below 400px). */
.turnstile { min-height: 65px; }
@media (max-width: 399.98px) { .turnstile { min-height: 140px; } }

/* ---------- badge, alert ---------- */
.badge { display: inline-flex; align-items: center; height: 1.375rem; padding: 0 .5rem; border-radius: 999px; font: 500 .75rem/1 var(--sans); border: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.badge-ok { background: var(--pos-bg); color: var(--pos-ink); border-color: transparent; }
.badge-err { background: var(--neg-bg); color: var(--neg-ink); border-color: transparent; }
.badge-warn { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.badge-gold { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.alert { border-radius: var(--radius); padding: .875rem 1rem; font-size: .9375rem; border: 1px solid var(--border); }
.alert-error { background: var(--neg-bg); color: var(--neg-ink); border-color: transparent; }
.alert-ok { background: var(--pos-bg); color: var(--pos-ink); border-color: transparent; }
.alert-info { background: var(--muted); }
.status-dot { width: .5rem; height: .5rem; border-radius: 999px; background: #3fae5c; display: inline-block; flex: none; }
.status-dot.off { background: #8a8178; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table.fixed { table-layout: fixed; }
.table th { text-align: left; font-weight: 500; font-size: .8125rem; color: var(--muted-foreground); padding: .625rem .75rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; overflow-wrap: anywhere; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--muted); }
.table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.table .rank { width: 3.5rem; }
.table .w-sm { width: 6rem; } .table .w-md { width: 9rem; } .table .w-lg { width: 12rem; }
.rank1 { color: var(--gold); font-weight: 600; }

/* ---------- tabs, pager ---------- */
.tabs { display: inline-flex; gap: .25rem; padding: .25rem; background: var(--muted); border-radius: var(--radius); }
.tab { height: 2.25rem; padding: 0 .875rem; border-radius: 6px; color: var(--muted-foreground); font: 500 .875rem var(--sans); display: inline-flex; align-items: center; text-decoration: none; }
.tab:hover { color: var(--foreground); }
.tab[aria-current="page"] { background: var(--card); color: var(--foreground); box-shadow: 0 1px 2px rgb(0 0 0 / .15); }
.pager { display: flex; align-items: center; gap: .5rem; }

/* ---------- misc ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .875rem; color: var(--muted-foreground); list-style: none; padding: 0; margin: 0; }
.breadcrumb a { color: var(--muted-foreground); text-decoration: none; }
.breadcrumb a:hover { color: var(--foreground); }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: var(--input); }
.separator { height: 1px; background: var(--border); border: 0; margin: 0; }
.dl { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .75rem 1.5rem; margin: 0; font-size: .9375rem; }
.dl dt { color: var(--muted-foreground); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.ornament { display: block; margin: 0 auto; width: 18rem; max-width: 70%; height: auto; }
.progress { height: .5rem; background: var(--muted); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--gold); border-radius: 999px; transition: width .2s linear; }
.status-line { min-height: 1.5rem; }
.code-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.5rem; font-family: var(--mono); }
.qr { display: block; margin: 0 auto; background: #fff; padding: .5rem; border-radius: 6px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.steps li { padding: 1.5rem; display: flex; flex-direction: column; gap: .375rem; }
.steps li + li { border-left: 1px solid var(--border); }
.step-n { font-family: var(--display); font-weight: 600; color: var(--gold); }
.feature-list { display: grid; grid-template-columns: 14rem minmax(0, 1fr); border-top: 1px solid var(--border); margin: 0; }
.feature-list dt, .feature-list dd { padding: 1.25rem 0; border-bottom: 1px solid var(--border); margin: 0; }
.feature-list dt { font-weight: 600; }
.feature-list dd { color: var(--muted-foreground); }

/* news article body (sanitized HTML from the API) */
.prose { font-size: 1.0625rem; line-height: 1.7; max-width: 42rem; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-size: 1.375rem; margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose img { border-radius: var(--radius); }
.prose blockquote { margin-left: 0; padding-left: 1rem; border-left: 2px solid var(--border); color: var(--muted-foreground); }
.news-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1.5rem; padding: 1.25rem 0; border-top: 1px solid var(--border); }
.news-row:last-child { border-bottom: 1px solid var(--border); }
.news-row h2 { font-size: 1.125rem; }
.news-row h2 a { color: var(--foreground); text-decoration: none; }
.news-row h2 a:hover { color: var(--gold); }

/* ---------- hero ---------- */
.hero { position: relative; background: #0c0b0b url("/static/img/hero.webp") center 35% / cover no-repeat; color: #ece4d8; }
/* The art fades to the dark band in both themes: the hero text is light, so it
   must never end up over parchment. */
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgb(12 11 11 / .1) 40%, #0c0b0b 100%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.25rem; padding: 9rem 2rem 7rem; }
.hero-inner.compact { padding: 8rem 2rem 6rem; gap: .75rem; }
.hero h1 { color: #ece4d8; text-shadow: 0 2px 16px rgb(0 0 0 / .9); }
.hero-logo { display: block; width: 560px; max-width: 100%; height: auto; filter: drop-shadow(0 6px 24px rgb(0 0 0 / .8)); }
.tagline { font-family: var(--display); font-size: 1.625rem; color: #ece4d8; text-shadow: 0 2px 12px rgb(0 0 0 / .8); }
.hero .lede { color: #d8cdbd; text-shadow: 0 1px 8px rgb(0 0 0 / .9); }
.hero .btn-outline { color: #ece4d8; border-color: rgb(236 228 216 / .5); background: rgb(12 11 11 / .45); }
.hero .btn-outline:hover { background: rgb(12 11 11 / .7); }
.hero-note { color: #d8cdbd; text-shadow: 0 1px 6px #000; display: inline-flex; align-items: center; gap: .5rem; }
.lift { position: relative; z-index: 2; margin-top: -3.5rem; }

/* three ways in, overlapping the hero edge */
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.quick a { display: flex; gap: 1rem; align-items: center; padding: 1.25rem 1.5rem; color: var(--foreground); text-decoration: none; }
.quick a + a { border-left: 1px solid var(--border); }
.quick a:hover { background: var(--muted); }
.quick .ico { width: 1.75rem; height: 1.75rem; color: var(--gold); stroke-width: 1.5; }
.quick strong { display: block; font-family: var(--display); font-weight: 600; }
.quick span span { display: block; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 2.5rem; padding-top: 4.5rem; align-items: start; }

/* sign-up: artwork panel beside the form */
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: 3rem; max-width: 64rem; margin: 0 auto; }
.art-panel { border-radius: var(--radius); min-height: 36rem; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; background: #0c0b0b url("/static/img/hero.webp") center 30% / cover no-repeat; }
.art-panel .art-copy { padding: 2rem; background: linear-gradient(rgb(12 11 11 / 0), rgb(12 11 11 / .92) 45%); color: #ece4d8; display: flex; flex-direction: column; gap: .625rem; }
.art-panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .625rem; color: #d8cdbd; font-size: .9375rem; }
.art-panel li { display: flex; gap: .625rem; }
.art-panel .ico { color: #d9b36c; margin-top: .2rem; }

/* account: section menu + content */
.with-aside { display: flex; flex-wrap: wrap; gap: 3rem; align-items: flex-start; }
.aside-nav { flex: 1 1 11rem; max-width: 12rem; display: flex; flex-direction: column; gap: 2px; padding-top: 5rem; }
.aside-nav a { display: flex; align-items: center; min-height: 2.25rem; padding: 0 .625rem; border-radius: 6px; color: var(--foreground); text-decoration: none; font-size: .875rem; }
.aside-nav a:hover { background: var(--accent); }
.with-aside > .content { flex: 999 1 560px; min-width: 0; max-width: 46rem; display: flex; flex-direction: column; gap: 2rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--band); color: var(--band-muted); border-top: 1px solid var(--band-border); margin-top: 6rem; }
.site-footer .bar { display: flex; gap: 2rem; justify-content: space-between; align-items: center; flex-wrap: wrap; padding-top: 2rem; padding-bottom: 2rem; font-size: .875rem; }
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a { color: var(--band-muted); text-decoration: none; }
.site-footer a:hover { color: var(--band-fg); }
.site-footer img { height: 1.75rem; width: auto; opacity: .8; display: block; }

/* ---------- small screens ---------- */
@media (max-width: 899.98px) {
  .home-grid, .auth-split { grid-template-columns: minmax(0, 1fr); }
  .art-panel { min-height: 18rem; }
  .aside-nav { display: none; }
}
@media (max-width: 767.98px) {
  .container { padding: 0 1rem; }
  .site-header .bar { gap: .5rem; }
  .nav, .header-actions .wide { display: none; }
  .brand { margin-right: auto; }
  .menu { display: block; }
  h1 { font-size: 1.875rem; }
  .btn { height: 2.75rem; }
  .btn-sm { height: 2.5rem; }
  .input { height: 2.75rem; font-size: 1rem; }
  .hero-inner { padding: 6.5rem 1rem 5.5rem; }
  .hero-inner.compact { padding: 6rem 1rem 5rem; }
  .tagline { font-size: 1.25rem; }
  .hero .actions { flex-direction: column; width: 100%; }
  .hero .actions .btn { width: 100%; }
  .lift { margin-top: -2.5rem; }
  .art-panel { display: none; }
  .quick, .steps { grid-template-columns: minmax(0, 1fr); }
  .quick a + a, .steps li + li { border-left: 0; border-top: 1px solid var(--border); }
  .feature-list { grid-template-columns: minmax(0, 1fr); }
  .feature-list dt { padding-bottom: .25rem; border-bottom: 0; }
  .feature-list dd { padding-top: 0; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: .125rem; }
  .dl dd { margin-bottom: .75rem; }
  .news-row { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
  .code-list { grid-template-columns: minmax(0, 1fr); }
  .site-footer { margin-top: 4rem; }
  .site-footer .bar { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* controls that sit on the dark header band keep band colours in light mode */
.site-header .btn-gold, .menu-panel .btn-gold { color: #d9b36c; border-color: #d9b36c; }
.site-header .btn-gold:hover { background: rgb(217 179 108 / .12); }
.menu-panel .btn-outline { color: var(--band-fg); border-color: rgb(236 228 216 / .35); }
.dl.tight { grid-template-columns: 5.5rem minmax(0, 1fr); }
@media (max-width: 767.98px) { .dl.tight { grid-template-columns: 5.5rem minmax(0, 1fr); gap: .5rem 1rem; } .dl.tight dd { margin-bottom: 0; } }
.text-error { color: var(--neg-ink); }
.text-ok { color: var(--pos-ink); }
.progress-bar.indeterminate { opacity: .55; }
