/* Forever In The Stars: the public website (docs/WEBSITE.md "Visual identity"). The game's own palette: deep navy,
   imperial gold, electric cyan. Hard edges, no rounded toy look. System fonts only: nothing is fetched from elsewhere. */
:root {
  --ink: #eaf2ff; --dim: #93a7c2; --faint: #5d7190;
  --bg: #050b18; --bg2: #08122a; --panel: #0b1830; --line: rgba(148, 209, 255, 0.16);
  --gold: #ffd34a; --gold2: #c98a00; --cyan: #6fd3ff; --green: #7cf0b0; --red: #ff6b5a; --violet: #b494ff;
  --wrap: 1180px; --gut: clamp(16px, 4vw, 32px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(1200px 600px at 70% -10%, rgba(111, 211, 255, 0.10), transparent 60%), radial-gradient(900px 500px at 0% 20%, rgba(255, 211, 74, 0.06), transparent 60%), var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3 { line-height: 1.15; letter-spacing: 0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(30px, 5vw, 54px); font-weight: 900; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; margin-top: 1.6em; }
h3 { font-size: 18px; font-weight: 800; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--gold); color: #000; padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.small { font-size: 13px; color: var(--dim); }
.lead { font-size: clamp(17px, 2vw, 20px); color: #cfe0f5; max-width: 70ch; }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px var(--gut); background: rgba(5, 11, 24, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; font-size: 14px; white-space: nowrap; }
.brand img { width: 52px; height: auto; }
.top nav { display: flex; gap: 4px; flex: 1; }
.top nav a { color: #cfe0f5; text-decoration: none; padding: 8px 10px; font-weight: 700; font-size: 14px; letter-spacing: 0.04em; border-bottom: 2px solid transparent; }
.top nav a:hover, .top nav a[aria-current] { color: #fff; border-bottom-color: var(--gold); }
.menu { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--ink); padding: 8px 12px; font: inherit; font-weight: 800; cursor: pointer; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px; font: inherit; font-weight: 900; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; cursor: pointer; border: 1px solid transparent; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.btn.play { background: linear-gradient(180deg, #ffd34a, #c98a00); color: #1a1002; }
.btn.play:hover { background: linear-gradient(180deg, #ffe17d, #e0a31a); color: #000; }
.btn.ghost { background: rgba(11, 24, 48, 0.7); color: var(--ink); border-color: var(--line); clip-path: none; }
.btn.ghost:hover, .btn.ghost.on { border-color: var(--gold); color: #fff; }
.btn.big { min-height: 52px; padding: 12px 26px; font-size: 15px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 10px; }

/* hero */
.hero { position: relative; padding: clamp(48px, 9vw, 110px) 0 clamp(36px, 6vw, 70px); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero.has-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 11, 24, 0.97) 0%, rgba(5, 11, 24, 0.82) 48%, rgba(5, 11, 24, 0.35) 100%), var(--art) center 20% / cover no-repeat; }
.hero.home { min-height: min(86vh, 760px); display: flex; align-items: center; }
.hero-logo { width: min(320px, 70vw); height: auto; display: block; margin-bottom: 18px; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.6)); }
.hero h1 { max-width: 20ch; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: -1px; padding: 0; }
.stats div { background: var(--bg2); padding: 18px 20px; display: grid; }
.stats b { font-size: 30px; color: var(--gold); font-variant-numeric: tabular-nums; }
.stats span { color: var(--dim); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }

/* grids and cards */
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.card { display: grid; grid-template-rows: auto 1fr; background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.card:hover { border-color: rgba(255, 211, 74, 0.6); transform: translateY(-2px); color: var(--ink); }
.card-art { aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.card-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.card-body { padding: 16px 18px 18px; }
.card-body h3 { color: #fff; margin: 6px 0; }
.card-body p { margin: 0; color: var(--dim); font-size: 14px; }
.col { background: var(--panel); border: 1px solid var(--line); padding: 14px 16px; }
.col ol { margin: 8px 0 0; padding-left: 20px; color: #cfe0f5; }

/* tags and notes */
.tag { display: inline-block; font-size: 11px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--line); color: var(--dim); vertical-align: middle; }
.tag.live { color: var(--green); border-color: rgba(124, 240, 176, 0.45); }
.tag.planned { color: var(--violet); border-color: rgba(180, 148, 255, 0.5); }
.tag.partial { color: var(--gold); border-color: rgba(255, 211, 74, 0.45); }
.tag.history { color: #e8b97a; border-color: rgba(232, 185, 122, 0.45); }
.note { border-left: 3px solid var(--gold); background: rgba(255, 211, 74, 0.07); padding: 12px 16px; margin: 16px 0; }
.note.history { border-color: #e8b97a; background: rgba(232, 185, 122, 0.08); }

/* the Great Powers */
.powers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.power { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 14px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.power img { grid-row: span 2; }
.power b { color: #fff; } .power span { color: var(--dim); font-size: 13px; font-style: italic; }
.power:hover { border-color: var(--gold); }
.split { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; padding-block: 32px; }
.sigil { width: 100%; max-width: 340px; height: auto; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6)); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 16px 0; }
.facts dt { color: var(--dim); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; padding-top: 2px; }
.facts dd { margin: 0; }

/* text pages */
.prose { padding-block: 24px 8px; max-width: calc(76ch + 2 * var(--gut)); margin-inline: auto; }
.prose p, .prose li { color: #d6e3f5; }
.prose img, .prose iframe, .prose video { max-width: 100%; }
.prose figure { margin: 18px 0; }
.prose table { width: 100%; }
.embed { position: relative; aspect-ratio: 16 / 9; } .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post h1 { font-size: clamp(28px, 4vw, 44px); }
.byline { color: var(--dim); font-size: 14px; }
.lead-img { display: block; margin: 12px 0 20px; }
.crumbs { max-width: var(--wrap); margin: 0 auto; padding: 14px var(--gut) 0; font-size: 13px; color: var(--dim); }
.crumbs a { color: var(--dim); }
.cols { columns: 2 240px; padding-left: 20px; }
.chronicle { list-style: none; padding: 0; border-left: 2px solid var(--line); }
.chronicle li { padding: 4px 0 4px 16px; position: relative; } .chronicle li::before { content: ""; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; background: var(--gold); }
.chronicle time { color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; margin-right: 8px; }

/* tables and boards */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; background: var(--bg2); }
tr[hidden] { display: none; }
.board { list-style: none; padding: 0; margin: 0; counter-reset: r; }
.board li { counter-increment: r; display: grid; grid-template-columns: 2.2em 1fr auto; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.board li::before { content: counter(r); color: var(--gold); font-weight: 900; }
.board b { color: var(--gold); font-variant-numeric: tabular-nums; }
.filters, .tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tabs a { padding: 8px 14px; border: 1px solid var(--line); text-decoration: none; color: #cfe0f5; font-weight: 800; font-size: 14px; }
.tabs a[aria-current] { border-color: var(--gold); color: #fff; }

/* status */
.status-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-block: 22px; color: var(--dim); }
.status-card { display: flex; gap: 16px; align-items: center; padding: 20px; background: var(--panel); border: 1px solid var(--line); margin: 24px 0; }
.status-card b { font-size: 22px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--faint); flex: none; }
[data-state="up"] .dot { background: var(--green); box-shadow: 0 0 12px var(--green); }
[data-state="down"] .dot { background: var(--red); box-shadow: 0 0 12px var(--red); }

/* share */
.share { max-width: var(--wrap); margin: 30px auto 0; padding: 16px var(--gut); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.share span { color: var(--dim); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; }

/* footer */
.foot { margin-top: 60px; border-top: 1px solid var(--line); background: var(--bg2); padding: 36px var(--gut) calc(24px + env(safe-area-inset-bottom, 0px)); }
.foot-cols { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 24px; }
.foot-cols div { display: grid; align-content: start; gap: 6px; }
.foot-cols strong { color: #fff; text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; }
.foot-cols p { color: var(--dim); font-size: 14px; margin: 0; }
.foot-cols a { color: #cfe0f5; text-decoration: none; font-size: 14px; } .foot-cols a:hover { color: var(--gold); }
.fine { max-width: var(--wrap); margin: 24px auto 0; color: var(--faint); font-size: 12px; }

/* narrow screens */
@media (max-width: 980px) {
  .menu { display: block; }
  .top { flex-wrap: wrap; }
  .top nav { display: none; order: 9; flex-basis: 100%; flex-direction: column; }
  .top nav.open { display: flex; }
  .top nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .top .play { padding: 8px 12px; min-height: 38px; font-size: 13px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-cols div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .brand span { display: none; }
  .split { grid-template-columns: 1fr; }
  .sigil { max-width: 200px; }
  .facts { grid-template-columns: 1fr; gap: 0; } .facts dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }
