/* The look of every public page of oblivionscape.com: one stylesheet, loaded by every page's generated head
   (tools/changelog-page.py writes the head, header and footer of each page from one table).
   No inline styles and no inline scripts anywhere on the site, so nginx can send a strict Content-Security-Policy.
   The colours are OblivionScape's: the navy ground of the banner and the share card, and the gold of the crest. */

:root {
  color-scheme: dark;
  --bg: #0a1628;          /* page, and the ground inside banner.png and og.png */
  --bar: #071020;         /* header bar */
  --ink: #c8d4dd;         /* body text */
  --head: #f2ece0;        /* headings */
  --dim: #8fa3b5;         /* taglines, nav links, the group labels */
  --faint: #7d93a8;       /* small print */
  --def: #b4c2ce;         /* definitions */
  --gold: #c9a24e;        /* the brand: the mark, buttons, table heads, rules */
  --gold-hi: #e0b658;     /* links, hover, numbers */
  --on-gold: #1a1206;     /* text on a gold button */
  --line: #1d3853;        /* hairlines */
  --panel: #0d2137;       /* notes, table heads */
  --panel2: #0b1c30;      /* contents box, realm cards, tiles */
  --panel3: #08182b;      /* realm card header */
  --code: #12293f;        /* code and key caps */
  --key-line: #2a4a6b;    /* key cap border */
  --warm: #15120a;        /* gold-tinted panel: the accounts strip, the terms bar, the client pill */
  --warm-line: #6b5628;
  --ember: #e0623a;       /* a closed round */
  --on: #8fce7a; --on-line: #3d5c33; --on-bg: #10221a;        /* online */
  --off: #e08a6e; --off-line: #5c3328; --off-bg: #22141a;     /* offline, a correction */
  --corr-bg: #1c1720;
  --discord: #5865f2; --discord-hi: #4752c4;
  --w: 860px;             /* the column: header, strip, page and footer share it */
}

html { scroll-padding-top: 72px }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, "Segoe UI", Roboto, sans-serif }
a { color: var(--gold-hi) }
small { color: var(--faint) }
code { background: var(--code); padding: 2px 6px; border-radius: 4px; font-size: 14px }
.k { display: inline-block; background: var(--code); border: 1px solid var(--key-line); border-bottom-width: 2px; border-radius: 4px;
     padding: 1px 7px; font-size: 13px; line-height: 1.4; font-family: ui-monospace, Consolas, monospace; color: var(--head) }

/* ---- skip link, header, footer (the frame every page shares) ---- */
.skip { position: absolute; left: -9999px; top: 0 }
.skip:focus { left: 12px; top: 12px; z-index: 60; background: var(--gold); color: var(--on-gold); padding: 8px 12px; border-radius: 6px }
.top { border-bottom: 1px solid var(--line); background: var(--bar); position: sticky; top: 0; z-index: 5 }
.top .inner { max-width: var(--w); margin: 0 auto; padding: 14px 20px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px }
.mark { font-size: 20px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); text-decoration: none; margin-right: auto }
.top nav { display: flex; flex-wrap: wrap; gap: 6px 18px }
.top nav a { color: var(--dim); text-decoration: none; font-size: 15px }
.top nav a:hover, .top nav a[aria-current] { color: var(--head) }
.top .discord { margin-left: auto; align-self: center; display: inline-flex; align-items: center; gap: 7px; background: var(--discord); color: #fff;
                text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1; padding: 7px 11px; border-radius: 6px }
.top .discord:hover, .top .discord:focus-visible { background: var(--discord-hi) }
.top .discord svg { width: 20px; height: 16px; fill: currentColor; flex: none }
footer.foot { border-top: 1px solid var(--line); margin-top: 8px }
footer.foot .inner { max-width: var(--w); margin: 0 auto; padding: 18px 20px 40px; color: var(--faint); font-size: 14px }
footer.foot p { margin: 0 0 6px }

/* ---- the page ---- */
main { max-width: var(--w); margin: 0 auto; padding: 28px 20px 48px; display: block }
h1 { font-size: 40px; letter-spacing: .04em; margin: 0 0 8px; color: var(--head) }
h2 { margin-top: 52px; font-size: 24px; border-bottom: 1px solid var(--line); padding-bottom: 6px; color: var(--head) }
h3 { margin-top: 30px; font-size: 18px; color: var(--gold-hi) }
h4 { margin-top: 22px; margin-bottom: 6px; font-size: 16px; color: var(--head) }
.tag { color: var(--dim); margin: 0 0 28px }
ol li, ul li { margin: 8px 0 }
.note { background: var(--panel); border-left: 4px solid var(--gold); padding: 12px 16px; margin: 18px 0 }
table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 15px }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top }
th { background: var(--panel); color: var(--gold); font-weight: 600 }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }
.tablewrap { overflow-x: auto }
.toc { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; margin: 24px 0 }
.toc ul { margin: 6px 0; padding-left: 20px; columns: 2; column-gap: 28px }
.toc li { margin: 4px 0 }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }

/* ---- the front page ---- */
.banner { display: block; width: 100%; height: auto; aspect-ratio: 1720 / 600; border-radius: 10px; margin: 0 0 18px }
.front h2 { margin-top: 44px }
.lede { font-size: 17px; margin: 0 0 24px }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 6px }
.btn { display: inline-block; background: var(--gold); color: var(--on-gold); font-weight: 700; padding: 14px 26px; border-radius: 6px; text-decoration: none; font-size: 18px }
.btn:hover { background: var(--gold-hi) }
.btn2 { display: inline-block; background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 600; padding: 13px 22px; border-radius: 6px; text-decoration: none; font-size: 17px }
.btn2:hover { background: var(--code) }

/* the accounts strip: hidden until the count has been read */
.budget { background: var(--warm); border-bottom: 1px solid var(--warm-line) }
.budget[hidden] { display: none }
.budget .inner { max-width: var(--w); margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px }
.budget .n { font-size: 30px; font-weight: 700; color: var(--gold-hi); line-height: 1; margin-right: 6px; font-variant-numeric: tabular-nums }
.budget .of { color: var(--ink); font-size: 16px }
.budget .when { color: var(--dim); font-size: 15px }
.budget .when b { color: var(--head); font-variant-numeric: tabular-nums }
.budget .bar { flex-basis: 100%; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden }
.budget .bar i { display: block; height: 100%; background: var(--gold); width: 0 }
.budget.closed .n { color: var(--ember) }
.budget.closed .bar i { background: var(--ember) }

/* ---- the realm list ---- */
.status { color: var(--faint); font-size: 14px; margin: 0 0 24px; font-variant-numeric: tabular-nums }
.realm { border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); margin: 0 0 20px; overflow: hidden }
.realm header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--panel3) }
.realm .name { font-size: 22px; font-weight: 700; margin: 0 auto 0 0; letter-spacing: .02em; color: var(--head) }
.pill { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap }
.pill.on { color: var(--on); border-color: var(--on-line); background: var(--on-bg) }
.pill.off { color: var(--off); border-color: var(--off-line); background: var(--off-bg) }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line) }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.stat { background: var(--panel2); padding: 14px 16px 16px; min-width: 0 }
.stat .v { font-size: 28px; font-weight: 700; color: var(--gold-hi); line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere }
.stat .u { font-size: 15px; font-weight: 600; color: var(--gold); margin-left: 4px }
.stat .l { font-size: 14px; color: var(--ink); margin-top: 6px }
.stat .d { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums }
.offline { padding: 14px 18px; color: var(--dim) }
.empty { border: 1px dashed var(--line); border-radius: 8px; padding: 18px; color: var(--dim) }
dl { margin: 8px 0 16px }
dt { font-weight: 600; color: var(--gold-hi); margin-top: 14px }
dd { margin: 4px 0 0 0; color: var(--def) }

/* ---- the changelog (written by its generator) ---- */
h2 a { color: inherit; text-decoration: none }
h2 a:hover { color: var(--gold-hi) }
.meta { margin: 10px 0 14px; display: flex; flex-wrap: wrap; gap: 6px 8px }
.pill.server { color: var(--def); border-color: var(--key-line); background: var(--panel) }
.pill.client { color: var(--gold-hi); border-color: var(--warm-line); background: var(--warm) }
.corr { background: var(--corr-bg); border-left: 4px solid var(--off); padding: 8px 12px; list-style: none }
ul .corr { margin: 8px 0 8px -20px }
.entry h3 { margin-top: 26px }
.foot-note { margin-top: 44px }

/* ---- the terms bar (terms-prompt.js) ---- */
#tosp { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--warm); border-top: 2px solid var(--gold); box-shadow: 0 -6px 24px rgba(0, 0, 0, .5) }
#tosp .in { max-width: var(--w); margin: 0 auto; padding: 14px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; color: var(--ink); font-size: 15px; line-height: 1.5 }
#tosp p { margin: 0; flex: 1 1 420px }
#tosp button { background: var(--gold); color: var(--on-gold); font-weight: 700; border: 0; padding: 12px 22px; border-radius: 6px; font-size: 16px; cursor: pointer }
#tosp button:hover { background: var(--gold-hi) }

@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .grid .stat:last-child:nth-child(odd) { grid-column: span 2 }
}
@media (max-width: 640px) {
  h1 { font-size: 30px }
  main { padding: 20px 16px 40px }
  .top .inner, .budget .inner, footer.foot .inner { padding-left: 16px; padding-right: 16px }
  .toc ul { columns: 1 }
  .cta .btn, .cta .btn2 { width: 100%; text-align: center; box-sizing: border-box }
  .stat .v { font-size: 24px }
  #tosp .in { padding: 12px 16px }
  #tosp button { width: 100% }
}
