/* echoed.gg — the site stylesheet.
   The approved game-client design (tauri-app/redesign/gameclient/SPEC.md), as the
   homepage preview (redesign/src/home.src.html) first built it for the web:
   - no glows, no shadows, no borders: a thing is separate because it is one
     step lighter than what it sits on (rail → stage → panel → plate → plate-hi)
   - red means "something wants you" — the primary action, a live state — and
     is never a decoration or a heading colour
   - Geologica for reading, Unbounded for titles only
   - rounded squares, never circles, for anything that stands for a person or a place
   Page-only rules live in each page's $pageStyles; the homepage adds home.css. */

@font-face { font-family: Geologica; src: url(/fonts/geologica-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Geologica; src: url(/fonts/geologica-cyrillic-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Unbounded; src: url(/fonts/unbounded-latin-wght-normal.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }

:root {
  --rail: #0b0c0f; --stage: #0f1114; --panel: #13151a; --plate: #1a1d23; --plate-hi: #21252c; --float: #1f232a;
  --hover: rgba(255, 255, 255, .04); --press: rgba(255, 255, 255, .08); --edge: rgba(255, 255, 255, .07);
  --t-hi: #e4e6eb; --t: #c6c9d0; --t-mut: #959ba6; --t-faint: #7e848f; --t-faint-plate: #8a909b;
  --accent: #dc4a50; --accent-hi: #e65e63; --accent-lo: #c43d43; --accent-ink: #fff; --accent-text: #f08a8c;
  --accent-tint: rgba(220, 74, 80, .07); --accent-tint-hi: rgba(220, 74, 80, .14);
  --info: #8ab9e6; --info-tint: rgba(110, 160, 220, .13);
  --online: #3cc47f; --idle: #e0ad45; --dnd: #e2666a; --offline: #5a606b;
  --font: "Geologica", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Unbounded", "Geologica", "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --w-body: 350; --w-row: 460; --w-name: 560; --w-strong: 640;
  --r-plate: 12px; --r-ctl: 8px;
  --wrap: 1200px; --gut: 32px;
  /* Names older page markup still uses in inline styles (developers.php). */
  --text-primary: var(--t-hi); --text-secondary: var(--t); --text-muted: var(--t-mut); --gold: var(--accent-text);
  color-scheme: dark;
}
@media (max-width: 520px) { :root { --gut: 20px; } }
/* Neither brand face has CJK glyphs: Chinese pages fall through to the system's own. */
:root:lang(zh-CN) { --font: "Geologica", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", system-ui, sans-serif; --display: "Unbounded", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--rail); color: var(--t); font: var(--w-body) 17px/27px var(--font); letter-spacing: -.004em; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
.i { width: 18px; height: 18px; flex: none; fill: currentColor; display: block; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gut)); margin-inline: auto; }
.label { font: 600 12px/16px var(--font); letter-spacing: .085em; text-transform: uppercase; color: var(--t-mut); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* ── Controls (app .btn, .chip) ────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: var(--r-ctl); font: 600 14px/18px var(--font); color: var(--t-hi); background: var(--plate-hi); white-space: nowrap; cursor: pointer; transition: background-color .12s, transform .1s; }
.btn:hover { background: #2a2e36; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hi); }
.btn.primary:active { background: var(--accent-lo); }
.btn.lg { height: 48px; padding: 0 20px; font-size: 15px; border-radius: 10px; }
.btn .i { width: 18px; height: 18px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font: 500 12px/22px var(--font); color: var(--t); background: var(--plate-hi); white-space: nowrap; }
.chip.live { height: 18px; padding: 0 7px; font: 700 11px/18px var(--font); letter-spacing: .07em; color: var(--accent-ink); background: var(--accent); }
.chip.live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip.bot { height: 18px; padding: 0 6px; font: 700 11px/18px var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--info); background: var(--info-tint); }
.chip.bot .i { width: 10px; height: 10px; }
.chip.yours { color: var(--accent-text); background: var(--accent-tint-hi); font-weight: 600; }
.more { display: inline-flex; align-items: center; gap: 6px; margin-top: 24px; font: 600 15px/20px var(--font); color: var(--t-hi); }
.more .i { width: 14px; height: 14px; transition: transform .12s; }
.more:hover .i { transform: translateX(3px); }
/* A link inside running text: the text's own colour, underlined, never red. */
.u, .prose a:not(.btn):not(.more) { color: var(--t-hi); text-decoration: underline; text-decoration-color: var(--t-faint); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color .12s; }
.u:hover, .prose a:not(.btn):not(.more):hover { text-decoration-color: var(--t-hi); }

/* ── Header ─────────────────────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 20; background: var(--rail); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 68px; }
/* The logotype (redesign/logotype.mjs): letters take the text colour, the o stays red. */
.brand { display: inline-flex; align-items: center; flex: none; color: var(--t-hi); }
.brand .logo { display: block; height: 26px; width: auto; aspect-ratio: 652 / 150; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { height: 36px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: var(--r-ctl); font: var(--w-row) 15px/20px var(--font); color: var(--t-mut); transition: background-color .1s, color .1s; }
.nav-links a:hover { background: var(--hover); color: var(--t-hi); }
.nav-links a[aria-current="page"] { color: var(--t-hi); background: var(--plate); }
.nav-end { margin-left: auto; display: flex; gap: 8px; }
.nav-menu { display: none; width: 40px; padding: 0; }
.nav-sheet { display: none; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-menu { display: inline-flex; }
  .nav-sheet:not([hidden]) { display: grid; gap: 2px; padding: 4px 0 16px; }
  .nav-sheet a { display: flex; align-items: center; height: 44px; padding: 0 12px; border-radius: 10px; font: var(--w-row) 16px/20px var(--font); color: var(--t); }
  .nav-sheet a:hover { background: var(--hover); color: var(--t-hi); }
  .nav-sheet a[aria-current="page"] { background: var(--plate); color: var(--t-hi); }
}
@media (max-width: 520px) { .nav-end .signin { display: none; } .nav-in { gap: 12px; } }

/* ── Inner pages: a heading, then the page ─────────────────────────────── */
.page-head { padding: clamp(56px, 8vw, 104px) 0 clamp(40px, 5vw, 64px); }
.page-head .label { display: block; margin-bottom: 18px; }
.page-head h1 { max-width: 18ch; font: 600 clamp(38px, 5.4vw, 68px)/1.04 var(--display); letter-spacing: -.045em; color: var(--t-hi); text-wrap: balance; }
.page-head h1 em { font-style: normal; color: var(--accent-text); }
.page-head .lead { margin-top: 22px; max-width: 54ch; font: var(--w-body) clamp(17px, 1.5vw, 19px)/1.6 var(--font); color: var(--t-mut); }
.page-head .lead b { color: var(--t); font-weight: 500; }
.page-head .meta { margin-top: 18px; font: 400 14px/20px var(--font); color: var(--t-faint); }
.page-head .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.page-body { padding-bottom: clamp(72px, 9vw, 120px); }

/* A page of reading: a narrow column, sections separated by space, not rules. */
.prose { max-width: 720px; }
.prose > * + *, .prose section > * + * { margin-top: 18px; }
.prose section + section, .prose .sec-gap { margin-top: clamp(56px, 7vw, 80px); }
.prose h2 { font: 600 clamp(24px, 2.6vw, 30px)/1.15 var(--display); letter-spacing: -.035em; color: var(--t-hi); }
.prose h2 + * { margin-top: 20px; }
.prose h3 { margin-top: 36px; font: var(--w-strong) 18px/24px var(--font); letter-spacing: -.01em; color: var(--t-hi); }
.prose h3 + * { margin-top: 10px; }
.prose p, .prose li { color: var(--t); }
.prose strong, .prose b { color: var(--t-hi); font-weight: 600; }
.prose ul, .prose ol { padding: 0; list-style: none; display: grid; gap: 10px; }
.prose ul > li { position: relative; padding-left: 20px; }
.prose ul > li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 6px; height: 6px; border-radius: 2px; background: var(--t-faint); }
.prose ol { counter-reset: n; }
.prose ol > li { position: relative; padding-left: 36px; counter-increment: n; }
.prose ol > li::before { content: counter(n); position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--plate); font: 600 12px/1 var(--font); color: var(--t-mut); font-variant-numeric: tabular-nums; }
.prose address { font-style: normal; color: var(--t); }
.prose blockquote { padding: 22px 24px; border-radius: 16px; background: var(--plate); font: 400 clamp(18px, 1.7vw, 21px)/1.5 var(--font); color: var(--t-hi); letter-spacing: -.01em; }
.prose code, .code { font: 500 .88em/1 var(--mono); padding: 3px 6px; border-radius: 5px; background: var(--plate-hi); color: var(--t-hi); }

/* Plates: a thing set apart is one step lighter, never outlined. */
.plate { border-radius: 16px; background: var(--plate); padding: clamp(18px, 2.4vw, 28px); }
.plate > * + * { margin-top: 12px; }
.plate h2, .plate h3 { font: var(--w-strong) 18px/24px var(--font); letter-spacing: -.01em; color: var(--t-hi); }
.plate p { color: var(--t); }

/* A statement worth stopping on: our promise, "the short version". */
.callout { position: relative; padding: 18px 20px 18px 23px; border-radius: 14px; background: var(--plate); color: var(--t-hi); }
.callout::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--t-faint); }
.callout.urgent { background: var(--accent-tint-hi); }
.callout.urgent::before { background: var(--accent); }
.callout > * + * { margin-top: 8px; }
.callout h2 { font: var(--w-strong) 17px/24px var(--font); color: var(--t-hi); letter-spacing: -.01em; }
.callout p { color: var(--t); }

/* Key/value facts: company details, a registration. */
.kv { display: grid; grid-template-columns: minmax(140px, max-content) minmax(0, 1fr); gap: 14px 28px; }
.kv dt { font: 600 12px/24px var(--font); letter-spacing: .085em; text-transform: uppercase; color: var(--t-mut); }
.kv dd { margin: 0; color: var(--t); }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd + dt { margin-top: 14px; } }
/* In a narrow card the label sits over its value. */
.plate .kv { grid-template-columns: 1fr; gap: 2px; }
.plate .kv dd + dt { margin-top: 12px; }

/* A timeline: when, then what. */
.timeline { display: grid; gap: 8px; }
.timeline li { display: grid !important; grid-template-columns: 140px minmax(0, 1fr); gap: 20px; padding: 14px 16px !important; border-radius: 12px; background: var(--plate); }
.timeline li::before { display: none !important; }
.timeline time, .timeline .when { font: 600 12px/24px var(--font); letter-spacing: .085em; text-transform: uppercase; color: var(--t-mut); }
.timeline li.now { background: var(--plate-hi); }
.timeline li.now .when { color: var(--accent-text); }
@media (max-width: 520px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }

/* Tables: rows on plates, the header a label. */
.table-wrap { overflow-x: auto; border-radius: 14px; background: var(--plate); }
.table { width: 100%; border-collapse: collapse; font: var(--w-body) 15px/22px var(--font); }
.table th { padding: 14px 16px 10px; text-align: left; font: 600 12px/16px var(--font); letter-spacing: .085em; text-transform: uppercase; color: var(--t-mut); white-space: nowrap; }
.table td { padding: 12px 16px; vertical-align: top; color: var(--t); border-top: 1px solid var(--edge); }
.table td strong { color: var(--t-hi); font-weight: 600; }

/* Forms: the app's field — a panel well with an inset ring that thickens on focus. */
.field { display: grid; gap: 8px; }
.field label { font: 600 12px/16px var(--font); letter-spacing: .085em; text-transform: uppercase; color: var(--t-mut); }
.input { width: 100%; height: 46px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--edge); font: 400 16px/22px var(--font); color: var(--t-hi); transition: box-shadow .12s; }
textarea.input { height: auto; min-height: 160px; padding: 12px 14px; resize: vertical; }
.input::placeholder { color: var(--t-faint); }
.input:hover { box-shadow: inset 0 0 0 1px var(--t-faint); }
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent-text); }

/* Outcome of an action, in words as well as colour. */
.alert { position: relative; padding: 14px 16px 14px 19px; border-radius: 12px; background: var(--plate); color: var(--t-hi); font: 500 15px/22px var(--font); }
.alert::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; }
.alert.ok::before { background: var(--online); }
.alert.err::before { background: var(--accent); }
.alert ul { margin: 6px 0 0; padding-left: 18px; font-weight: 400; color: var(--t); }

/* ── Closing band (every page ends by inviting people in) ──────────────── */
.close { position: relative; isolation: isolate; margin-top: clamp(96px, 12vw, 160px); min-height: 640px; display: flex; align-items: flex-end; overflow: hidden; }
.close > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 60%; }
.close::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--rail) 0%, rgba(11, 12, 15, 0) 26%, rgba(11, 12, 15, 0) 52%, rgba(11, 12, 15, .7) 78%, var(--rail) 100%); }
.close-in { padding-bottom: 72px; }
.close h2 { margin: 0; max-width: 14ch; font: 600 clamp(38px, 6vw, 76px)/1.04 var(--display); letter-spacing: -.045em; color: #fff; }
.close p { margin: 18px 0 0; font-size: 18px; color: var(--t); }
.close .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.close.short { min-height: 480px; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.foot { padding: 48px 0 56px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 28px 56px; align-items: flex-start; }
.foot-col { display: grid; gap: 8px; align-content: start; }
.foot-col .label { margin-bottom: 4px; }
.foot-col a { font: var(--w-body) 15px/22px var(--font); color: var(--t-mut); }
.foot-col a:hover { color: var(--t-hi); }
.foot-end { margin-left: auto; font: 400 14px/20px var(--font); color: var(--t-faint); max-width: 34ch; }
.foot-end .brand { margin-bottom: 14px; }
.foot-end .brand .logo { height: 30px; }
.foot-social { display: flex; gap: 6px; margin-top: 14px; }
.foot-social a { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--plate); color: var(--t-mut); transition: background-color .12s, color .12s; }
.foot-social a:hover { background: var(--plate-hi); color: var(--t-hi); }
.foot-social .i { width: 16px; height: 16px; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 40px; padding-top: 20px; font: 400 13px/18px var(--font); color: var(--t-faint); box-shadow: inset 0 1px 0 var(--edge); }
.foot-legal address { font-style: normal; }
@media (max-width: 760px) { .foot-end { margin-left: 0; } }
