/*
 * The pages around the game (M1, design §16): the front page (front.html),
 * the waiting room and account page (prelaunch.html) and the legal texts
 * (terms.html, privacy.html). The game's palette over THEMIS imagery of the
 * region, as on the test world's landing page (welcome.css).
 */
:root {
  --ground: #1a1210;
  --panel: rgba(28, 20, 17, 0.8);
  --panel-solid: #22180f;
  --ink: #f2e6d9;
  --muted: #b9a594;
  --line: rgba(242, 230, 217, 0.18);
  --accent: #7fc4ff;
  --accent-ink: #0d1a26;
  --warn: #f0b35a;
  --ok: #8fd19e;
  --bad: #ff9b8a;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  color: var(--ink); font: 16px/1.5 var(--font);
}
/* the region itself, dimmed and warmed so the text stays readable */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(26, 18, 16, 0.96) 0%, rgba(26, 18, 16, 0.84) 50%, rgba(26, 18, 16, 0.5) 100%),
    url(/data/slice/surface.jpg) center / cover no-repeat;
  filter: sepia(0.35) saturate(1.2);
}
a { color: var(--accent); }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page {
  flex: 1;
  width: 100%; max-width: 620px;
  padding: max(9vh, 40px) 16px 32px;
  margin-left: max(16px, 8vw);
}
@media (max-width: 680px) { .page { margin-left: 0; padding-top: 28px; } }

/* the edition, on every page: which site this is (owner, 2026-10-20) */
.eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.eyebrow .brand { color: var(--warn); }
.edition {
  padding: 3px 9px; border: 1px solid var(--warn); border-radius: 999px;
  color: var(--ground); background: var(--warn); letter-spacing: 0.1em;
}
.edition[data-id="test"] { background: transparent; color: var(--warn); }

h1 { margin: 0 0 14px; font-size: clamp(30px, 6vw, 46px); line-height: 1.1; letter-spacing: -0.01em; text-wrap: balance; }
.lede { margin: 0 0 26px; color: var(--muted); font-size: 17px; max-width: 34em; }
.small, .note { color: var(--muted); font-size: 14px; }

/* launch: the countdown from the server's clock, and the date */
.launch { margin: 0 0 22px; }
.countdown { display: flex; gap: 10px; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.countdown div {
  min-width: 68px; padding: 8px 10px 6px; text-align: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
}
.countdown span { display: block; font-size: 28px; font-weight: 700; line-height: 1.1; }
.countdown small { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
@media (max-width: 400px) { .countdown div { min-width: 0; flex: 1; } .countdown span { font-size: 22px; } }
.launch p { margin: 0; }
.launch .when { font-weight: 600; }

/* Plutarch's voice (shared/sayings.js) */
.plutarch {
  margin: 0 0 26px; padding: 2px 0 2px 16px; border-left: 3px solid var(--warn); max-width: 34em;
}
.plutarch p { margin: 0 0 4px; font-size: 17px; font-style: italic; transition: opacity 0.4s; }
.plutarch p.fade { opacity: 0; }
.plutarch footer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--muted); font-size: 13px; }
.plutarch button { padding: 0; border: 0; background: none; color: var(--accent); cursor: pointer; font-size: 13px; text-decoration: underline; }

/* panels and forms */
.door {
  margin: 0 0 18px; padding: 20px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); backdrop-filter: blur(6px);
}
.door h2 { margin: 0 0 12px; font-size: 18px; }
.door h3 { margin: 16px 0 8px; font-size: 15px; }
.door > p { margin: 0 0 12px; }
.door > p:last-child { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; }
label { font-weight: 600; font-size: 14px; }
input[type="text"], input[type="email"], input[type="password"], input:not([type]) {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 0, 0, 0.35); font-size: 16px;
}
input::placeholder { color: rgba(242, 230, 217, 0.35); }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 18px; border: 1px solid var(--line); border-radius: 8px;
  background: transparent; cursor: pointer; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px;
}
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.danger { border-color: var(--bad); color: var(--bad); }
button:disabled { opacity: 0.6; cursor: progress; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link { padding: 0; border: 0; background: none; color: var(--accent); font-weight: 400; font-size: inherit; text-decoration: underline; cursor: pointer; }

/* the ways in: full-width buttons, the providers in their own colours (their brand rules) */
.ways { display: flex; flex-direction: column; gap: 10px; }
.ways .button { width: 100%; padding: 12px 18px; font-size: 16px; }
.ways svg { width: 20px; height: 20px; flex: none; }
.button.google { background: #fff; border-color: #dadce0; color: #1f1f1f; font-family: Roboto, var(--font); }
.button.apple { background: #000; border-color: #000; color: #fff; }
.button.email { background: rgba(0, 0, 0, 0.3); }

.msg { min-height: 1.5em; margin: 10px 0 0; font-size: 14px; color: var(--warn); }
.msg:empty { min-height: 0; margin: 0; }
.msg.ok { color: var(--ok); }
.status { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status.ok { background: rgba(143, 209, 158, 0.18); color: var(--ok); }
.status.wait { background: rgba(240, 179, 90, 0.18); color: var(--warn); }

/* the account page's list of facts */
.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; align-items: baseline; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 8px; } }
details.more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
details.more summary { cursor: pointer; font-weight: 600; }
details.more .stack { margin-top: 12px; }
#account-actions { margin-top: 16px; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
  padding: 16px; color: var(--muted); font-size: 12px;
}
.foot a { color: var(--muted); }

/* the legal texts: long, so the region stays further back */
.doc-page::before {
  background: linear-gradient(rgba(26, 18, 16, 0.94), rgba(26, 18, 16, 0.94)), url(/data/slice/surface.jpg) center / cover no-repeat;
}
.doc { max-width: 46em; }
.doc h1 { font-size: clamp(28px, 5vw, 38px); }
.doc h2 { margin: 30px 0 8px; font-size: 19px; }
.doc h3 { margin: 18px 0 6px; font-size: 16px; }
.doc p, .doc li { line-height: 1.6; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .box { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.doc .toc { columns: 2 16em; padding-left: 20px; }
