/* Blighted Emu. Colours are sampled from the project crest. */

@font-face { font-family: "Spectral"; font-style: normal; font-weight: 300; font-display: swap; src: url(/static/fonts/spectral-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 300; font-display: swap; src: url(/static/fonts/spectral-latin-300-italic.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/spectral-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/spectral-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/source-sans-3-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/source-sans-3-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }

:root {
  --abyss: #050409;
  --ground: #100e18;
  --stone: #241b35;
  --stone-hi: #33244c;
  --vein: #4c2a60;
  --violet: #a347be;
  /* Darker, so white button text keeps 6.3:1 on hover. */
  --violet-hi: #8f3aa8;
  /* Violet for small text on the ground: 5.2:1. */
  --violet-text: #b862d0;
  /* Form field edges: 3.5:1 on the abyss. */
  --edge: #7a5598;
  --crystal: #ed8ef2;
  --teal: #7cc3d8;
  --ink: #ece6f2;
  --ink-2: #b9aecb;
  --rule: #2c2240;
  --good: #6cc489;
  --warn: #e0b45a;
  --bad: #e2675f;
  --serif: "Spectral", Georgia, serif;
  --sans: "Source Sans 3", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: 56px;
}

* { box-sizing: border-box; }
:root { color-scheme: dark; accent-color: var(--violet); }
html { background: var(--ground); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--ground); color: var(--ink); font: 17px/1.6 var(--sans); }
main { flex: 1; }
::selection { background: var(--vein); color: var(--ink); }
.nowrap { white-space: nowrap; }
a { color: inherit; text-decoration: none; }
main a, footer p a { color: var(--teal); }
main a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--crystal); outline-offset: 3px; }
img { max-width: 100%; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--violet); color: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; }

/* Top bar */
.top { display: flex; align-items: center; gap: 34px; padding: 22px var(--gutter); font-size: 16px; color: var(--ink-2); background: var(--abyss); border-bottom: 1px solid var(--rule); }
.top .mark { display: flex; align-items: center; gap: 12px; margin-right: auto; color: var(--ink); font-family: var(--serif); font-size: 22px; }
.top .mark img { width: 34px; height: 34px; border-radius: 50%; }
.top .links { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; }
.top a:hover, .top a[aria-current="page"] { color: var(--ink); }
.top .play { color: var(--teal); }
.top .login { color: var(--violet-text); }
.member-functions { display: grid; gap: 18px; margin: 28px 0 0; padding: 0; list-style: none; }
.member-functions li { padding: 18px 22px; border: 1px solid var(--rule); border-radius: 6px; }
.member-functions a { font-size: 19px; color: var(--violet-text); }
.member-functions p { margin: 6px 0 0; }
.top .logout button { padding: 0; font: inherit; color: var(--ink-2); background: none; border: 0; cursor: pointer; }
.top .logout button:hover { color: var(--ink); }
.home .top { position: absolute; inset: 0 0 auto 0; z-index: 3; background: none; border-bottom: 0; }

/* Shared text */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; }
h1 { font-weight: 300; font-size: clamp(38px, 4vw, 56px); margin: 0 0 20px; letter-spacing: -.01em; }
h2 { font-size: 38px; margin: 0 0 14px; }
h3 { font-size: 24px; margin: 0 0 10px; }
.lede { color: var(--ink-2); font-size: 19px; max-width: 40rem; margin: 0 0 34px; }
.muted { color: var(--ink-2); }
code { font: 14px var(--mono); color: var(--crystal); }

section { padding: 96px var(--gutter); }
section.plain { min-height: 50vh; max-width: 60rem; }
.page main > section:first-child { padding-top: 64px; }

/* Buttons */
.actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 22px; border-radius: 3px; font-weight: 600; font-size: 16px; border: 0; font-family: var(--sans); cursor: pointer; }
main a.btn:hover { text-decoration: none; }
.btn.main { background: var(--violet); color: #fff; }
.btn.main:hover { background: var(--violet-hi); }
.btn.alt { border: 1px solid var(--vein); color: var(--ink); background: none; }
.btn.alt:hover { border-color: var(--violet); }

/* Bars (SVG, so no inline styles are needed under the CSP) */
.bar { display: block; width: 100%; height: 6px; clip-path: inset(0 round 3px); }
.bar-track { fill: var(--stone); }
.bar-fill { fill: var(--violet); }

/* Home: hero with the crest and its ring */
.hero { position: relative; min-height: 100vh; overflow: hidden; background: var(--abyss); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 32px; padding: 110px var(--gutter) 96px; }
.hero::before { content: ""; position: absolute; inset: -10%; background: url(/static/img/backdrop.jpg) 78% 45% / 120% auto no-repeat; opacity: .55; }
.hero > * { position: relative; }
.claim { max-width: 34rem; }
.claim h1 { font-size: clamp(40px, 4.6vw, 72px); line-height: 1.04; margin: 0 0 26px; }
.claim h1 em { color: var(--crystal); font-style: italic; }
.claim p { color: var(--ink-2); font-size: 19px; margin: 0 0 34px; max-width: 30rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; margin: 0 0 38px; font-size: 16px; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.facts .due { color: var(--crystal); }

.seal { position: relative; width: min(640px, 80%); aspect-ratio: 1; justify-self: center; }
.seal img { position: absolute; inset: 15%; width: 70%; height: 70%; border-radius: 50%; }
.seal svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.seal .seg { cursor: pointer; outline: none; }
.seal .seg path { fill: none; stroke-width: 16; }
.seal .track { stroke: var(--stone-hi); }
.seal .fill { stroke: var(--violet); transition: stroke .2s; }
.seal .seg:hover .fill, .seal .seg.on .fill, .seal .seg:focus-visible .fill { stroke: var(--crystal); }
.seal .seg:focus-visible .track { stroke: var(--vein); }
.seal text { fill: var(--ink-2); font: 18px var(--sans); }
.seal .seg.on text, .seal .seg:hover text, .seal .seg:focus-visible text { fill: var(--ink); }
.seal text .pct { fill: var(--ink); font-weight: 600; }
.readout { position: absolute; left: 50%; bottom: -56px; transform: translateX(-50%); width: 80%; margin: 0; text-align: center; color: var(--ink-2); font-size: 15px; min-height: 1.6em; }
.readout b { color: var(--ink); font-weight: 600; }

/* Dev log */
.log { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: 64px; border-top: 1px solid var(--rule); }
.log .intro p { color: var(--ink-2); margin: 0 0 22px; }
.days { margin: 0; padding: 0; list-style: none; }
.day { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.day time { font-family: var(--serif); font-size: 20px; color: var(--ink-2); }
.day ul { margin: 0; padding: 0; list-style: none; }
.day li { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 14px; padding: 4px 0; }
.day code { font: 14px/1.9 var(--mono); color: var(--violet-text); }
.day .tag { font-size: 14px; line-height: 1.9; color: var(--crystal); }
.day .area { color: var(--teal); text-transform: capitalize; }

/* Every area */
.areas { background: var(--abyss); border-top: 1px solid var(--rule); }
.areas .head { display: flex; align-items: baseline; gap: 24px; margin-bottom: 34px; }
.areas .head p { color: var(--ink-2); margin: 0; }
.rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 48px; }
.row .name { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.row .name span:last-child { font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* Progress page */
.progress-page { max-width: 72rem; }
.proofs { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 56px; color: var(--ink-2); }
.proofs dd { margin: 0; }
.proof { display: inline-block; min-width: 4.2em; text-align: center; padding: 1px 8px; border-radius: 3px; font-size: 14px; font-weight: 600; border: 1px solid currentColor; }
.proof-live { color: var(--good); }
.proof-bots { color: var(--teal); }
.proof-tests { color: var(--crystal); }
.proof-code { color: var(--ink); }
.proof-none { color: var(--ink-2); border-style: dashed; }
.area-block { margin: 0 0 56px; }
.area-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.area-pct { font-family: var(--serif); font-size: 30px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.area-block .bar { margin: 4px 0 14px; }
.feature { border-bottom: 1px solid var(--rule); }
.feature summary { display: grid; grid-template-columns: minmax(0, 1fr) 4rem 5.5rem 1rem; gap: 16px; align-items: center; padding: 12px 0; cursor: pointer; list-style: none; }
.feature summary::after { content: ""; width: 8px; height: 8px; justify-self: center; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: rotate(-45deg); transition: transform .15s; }
.feature[open] summary::after { transform: rotate(45deg); }
.feature summary::-webkit-details-marker { display: none; }
.feature summary:hover .feature-name { color: var(--crystal); }
.feature-name p { margin: 0; display: inline; }
.feature-pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.feature .checks { list-style: none; margin: 0 0 18px; padding: 0; color: var(--ink-2); }
.feature .checks li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 8px 16px; align-items: baseline; margin: 0 0 8px; overflow-wrap: anywhere; }
.feature .checks li p, .next li p, .done li p { margin: 0 0 8px; }
.feature .checks .proof { justify-self: start; }
.next, .done { margin: 0 0 56px; max-width: 60rem; }
.next li, .done li { margin: 0 0 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.next li strong, .done li strong { color: var(--ink); }

/* Server state */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; vertical-align: middle; }
.state-online { background: var(--good); }
.state-problems { background: var(--warn); }
.state-offline { background: var(--bad); }
.state-nosignal { background: none; border: 2px solid var(--ink-2); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.server { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 40px; padding: 40px var(--gutter); border-top: 1px solid var(--rule); }
.server-worlds { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 0 auto 0 0; padding: 0; list-style: none; font-size: 18px; }
.server-worlds li { display: flex; align-items: center; gap: 4px 0; flex-wrap: wrap; }
.server .sub { color: var(--ink-2); margin-left: 14px; }
.server-label { width: 100%; margin: 0; font: 600 18px/1.4 var(--sans); }
.server a { color: var(--teal); }

.status-page { max-width: 64rem; }
.login-state { margin: 0 0 48px; }
.login-state h2, .world-head h2 { margin: 0; }
.login-state p, .world-state { margin: 8px 0 0; font-size: 18px; }
.world { padding: 32px 0; border-top: 1px solid var(--rule); }
.world-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.world-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; margin: 20px 0 28px; color: var(--ink-2); }
.world-facts dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.uptime { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; height: 34px; margin: 0; padding: 0; list-style: none; }
.uptime-day { border-radius: 2px; }
.uptime-good { background: var(--good); }
.uptime-fair { background: var(--warn); }
.uptime-bad { background: var(--bad); }
.uptime-none { background: var(--stone); }
.uptime-scale { display: flex; justify-content: space-between; margin: 8px 0 0; font-size: 14px; }

/* Leaderboards */
.boards-page { max-width: 72rem; }
.picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.picker a { padding: 6px 14px; border: 1px solid var(--vein); border-radius: 3px; color: var(--ink-2); }
main .picker a:hover { color: var(--ink); border-color: var(--violet); text-decoration: none; }
.picker a[aria-current="page"] { background: var(--stone-hi); border-color: var(--violet); color: var(--ink); }
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 40px 48px; margin-top: 40px; }
.board h2 { font-size: 26px; }
.board-kicker { margin: 0 0 4px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--violet-text); }
.board-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 12px; font-size: 14px; }
.board table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 14px; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule); }
.board td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.board th:first-child, .board td:first-child { width: 3.5rem; color: var(--ink-2); }
.board th:last-child, .board td:last-child { text-align: right; padding-right: 0; }

/* Text pages */
.prose { max-width: 46rem; }
.prose h2 { font-size: 28px; margin-top: 40px; }
.prose p { margin: 0 0 16px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 0 0 8px 64px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 42px; height: 42px; border: 1px solid var(--vein); border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 22px; color: var(--crystal); }
.steps h2 { margin-top: 0; padding-top: 4px; font-size: 26px; }
.downloads { margin: 0 0 24px; padding: 0; list-style: none; }
.downloads li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 12px; }
.downloads .btn { overflow-wrap: anywhere; }

/* News */
.news-page, .news-post { max-width: 48rem; }
.news-post { padding: 64px var(--gutter) 96px; }
.news-list { margin: 0; padding: 0; list-style: none; }
.news-list li { padding: 24px 0; border-bottom: 1px solid var(--rule); }
.news-list h2 { font-size: 30px; margin: 4px 0 8px; }
main .news-list h2 a { color: var(--ink); }
.news-list p { margin: 0; color: var(--ink-2); }
.news-meta { margin: 0; color: var(--ink-2); font-size: 15px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; }
.news-post h1 { margin-top: 8px; }
.news-picture { display: block; width: 100%; height: auto; border-radius: 3px; margin: 0 0 28px; }
.news-body { font-size: 18px; }
.news-body li { margin-bottom: 6px; }
.downtime-note { padding: 12px 16px; border: 1px solid var(--warn); border-radius: 3px; }
.downtimes { margin: 0 0 48px; }
.downtimes ul { margin: 12px 0 0; padding: 0; list-style: none; }
.downtimes li { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.log-page { border-top: 0; }

/* Staff area */
.staff { max-width: 64rem; }
.staff-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.staff-head form { display: flex; align-items: center; gap: 14px; }
.staff-posts { width: 100%; border-collapse: collapse; margin-top: 24px; }
.staff-posts th { text-align: left; font-size: 14px; color: var(--ink-2); font-weight: 600; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); }
.staff-posts td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; overflow-wrap: anywhere; }
.confirm summary { cursor: pointer; color: var(--ink-2); }
.confirm form { margin-top: 8px; }
.btn.danger { background: var(--bad); color: var(--abyss); }
.post-form { display: grid; gap: 8px; max-width: 44rem; }
.post-form label { font-weight: 600; margin-top: 14px; }
.post-form fieldset { display: grid; gap: 8px; margin: 18px 0 0; padding: 16px 18px 20px; border: 1px solid var(--rule); border-radius: 3px; }
.post-form fieldset label { font-weight: 400; margin-top: 6px; }
.post-form legend { padding: 0 6px; font-weight: 600; }
.post-form input[type="text"], .post-form textarea, .post-form select, .post-form input[type="datetime-local"] { width: 100%; padding: 10px 12px; background: var(--abyss); color: var(--ink); border: 1px solid var(--edge); border-radius: 3px; font: 16px/1.5 var(--sans); }
.post-form textarea { resize: vertical; }
.post-form input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 1px solid var(--edge); border-radius: 3px; background: none; color: var(--ink); font: 600 15px var(--sans); cursor: pointer; }
.post-form button { justify-self: start; margin-top: 24px; }
.hint { margin: 0; color: var(--ink-2); font-size: 15px; }
.current-picture { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.current-picture img { border-radius: 3px; }
.form-errors { border: 1px solid var(--bad); border-radius: 3px; padding: 12px 18px; margin: 0 0 24px; }
.form-errors p { margin: 0; font-weight: 600; }

/* Footer */
footer { padding: 30px var(--gutter) 48px; color: var(--ink-2); font-size: 14px; border-top: 1px solid var(--rule); }
footer .foot-links { display: flex; gap: 10px 28px; flex-wrap: wrap; margin-bottom: 14px; font-size: 15px; }
footer .foot-links a:hover { color: var(--ink); }
footer p { margin: 0; max-width: 62rem; }

@media (max-width: 820px) {
  :root { --gutter: 16px; }
  .top { flex-wrap: wrap; gap: 12px 22px; padding-top: 16px; padding-bottom: 16px; }
  .top .mark { margin-right: 0; width: 100%; }
  .top .links { gap: 10px 22px; }
  section { padding-top: 56px; padding-bottom: 56px; }
  h2 { font-size: 30px; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 150px; padding-bottom: 110px; }
  .seal { width: min(100%, 420px); }
  .seal text { display: none; }
  .hero::before { background-position: 50% 80%; background-size: 170% auto; mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 85%, transparent); }
  .seal { margin-bottom: 40px; }
  .log { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .day { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .day li { grid-template-columns: 4.6rem minmax(0, 1fr); }
  .rows { grid-template-columns: minmax(0, 1fr); }
  .areas .head { display: block; }
  .feature summary { grid-template-columns: minmax(0, 1fr) 3rem 1rem; }
  .feature summary .proof { grid-column: 1; justify-self: start; }
  .feature .checks li { grid-template-columns: minmax(0, 1fr); }
  .staff-posts thead { display: none; }
  .staff-posts tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .staff-posts td { display: block; padding: 2px 0; border: 0; }
}
