:root {
  /* Cogitator palette: green phosphor on black glass. --brass is the phosphor colour
     (faction pages override it with the faction accent). */
  --bg: #020604;
  --bg-2: #04100a;
  --panel: rgba(8, 26, 16, .72);
  --panel-2: #0a2215;
  --line: #1d5234;
  --text: #b9f7cf;
  --muted: #5fa57a;
  --brass: #3dff8a;
  --brass-2: #8dffbc;
  --crimson: #b3261e;
  --crimson-2: #ff5a4a;
  --ok: #3dff8a;
  --warn: #ffb000;
  --radius: 2px;
  --head: 'VT323', 'Share Tech Mono', ui-monospace, monospace;
  --body: 'Share Tech Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(ellipse at top, #06301a 0%, var(--bg) 65%);
  background-attachment: fixed;
  color: var(--text);
  font: 17px/1.55 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--brass-2); }
a:hover { color: #fff1cc; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; letter-spacing: .04em; line-height: 1.2; margin: 1.2em 0 .5em; color: var(--brass-2); }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-top: .3em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
code { background: var(--panel-2); padding: 0 .3em; border-radius: 3px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.hidden { display: none !important; }

/* header */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(13, 12, 10, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-head .inner { max-width: 1180px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { height: 42px; }
.brand span { font-family: var(--head); font-weight: 700; letter-spacing: .08em; font-size: 1.05rem; }
.logo-img { filter: invert(1) sepia(.5) saturate(1.4) hue-rotate(5deg) brightness(.95); mix-blend-mode: screen; }
.nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 2px; }
.nav a {
  color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: var(--radius);
  font-family: var(--head); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase;
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.active { color: var(--brass-2); background: var(--panel); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: var(--radius); padding: 6px 10px; font-size: 1.1rem; }

@media (max-width: 1060px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; font-size: .95rem; }
}

main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 16px 60px; }
main.narrow { max-width: 820px; }

.site-foot { border-top: 1px solid var(--line); padding: 24px 16px; text-align: center; color: var(--muted); font-size: .88rem; }
.site-foot a { color: var(--muted); }

/* panels & layout */
.panel {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
}
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.panel.accent { border-color: var(--brass); box-shadow: 0 0 0 1px rgba(201, 162, 90, .15), 0 8px 30px rgba(0, 0, 0, .4); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1; min-width: 160px; }
.stack > * + * { margin-top: 12px; }

.card-link {
  display: block; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  transition: border-color .15s, transform .15s;
}
.card-link:hover { border-color: var(--brass); transform: translateY(-2px); color: var(--text); }
.card-link h3 { margin: 0 0 .3em; font-size: 1.05rem; }
.card-link p { margin: 0; color: var(--muted); font-size: .95rem; }

.hero { text-align: center; padding: 20px 0 10px; }
.hero img { width: min(520px, 90%); }
.hero .tag { font-family: var(--head); letter-spacing: .25em; text-transform: uppercase; color: var(--muted); font-size: .9rem; }
.hero .dates { font-family: var(--head); color: var(--brass-2); font-size: 1.2rem; margin: .4em 0 1em; letter-spacing: .06em; }

/* forms */
label { display: block; font-weight: 600; margin-bottom: 4px; }
label .hint { font-weight: 400; color: var(--muted); font-size: .88rem; }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=url], select, textarea {
  width: 100%; background: #0f0e0b; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; font: inherit; font-size: 16px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brass); outline-offset: 0; border-color: var(--brass); }
textarea { min-height: 110px; resize: vertical; }
textarea.tall { min-height: 360px; font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
.field { margin-bottom: 14px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, var(--brass-2), var(--brass)); color: #1a1408;
  border: 0; border-radius: var(--radius); padding: 10px 18px; cursor: pointer;
  font-family: var(--head); font-weight: 700; letter-spacing: .06em; font-size: .9rem; text-transform: uppercase; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); color: #1a1408; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn.secondary:hover { border-color: var(--brass); color: var(--text); }
.btn.danger { background: var(--crimson); color: #fff; }
.btn.small { padding: 6px 10px; font-size: .75rem; }
.btn.big { padding: 14px 26px; font-size: 1.05rem; }

.code-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
.code-form input { font-size: 1.4rem; text-align: center; letter-spacing: .2em; font-family: var(--head); }

/* rating picker */
.rating { margin-bottom: 18px; }
.rating .scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 6px; }
.rating .scale button {
  background: #0f0e0b; border: 1px solid var(--line); color: var(--text); border-radius: 4px;
  padding: 10px 0; font: 700 1rem var(--body); cursor: pointer;
}
.rating .scale button:hover { border-color: var(--brass); }
.rating .scale button.on { background: var(--brass); color: #1a1408; border-color: var(--brass-2); }
.rating .ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 2px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { background: #0f0e0b; color: var(--text); border: 0; padding: 10px 18px; font: 700 .95rem var(--body); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--brass); color: #1a1408; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { background: var(--panel-2); font-family: var(--head); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; position: sticky; top: 0; }
table.data tr:hover td { background: rgba(201, 162, 90, .05); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.top3 td:first-child { color: var(--brass-2); font-weight: 700; }
table.data th.sortable { cursor: pointer; }
table.data th.sortable:hover { color: var(--text); }

/* tabs */
.tabs { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px 14px; cursor: pointer;
  font-family: var(--head); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap; flex-shrink: 0;
}
.tabs button.on { color: var(--brass-2); border-bottom-color: var(--brass); }
.tabs button:hover { color: var(--text); }

/* badges & notices */
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .75rem; font-weight: 700; letter-spacing: .03em; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.ok { color: #b9e0a5; border-color: #4f6f40; background: #1c2716; }
.badge.warn { color: #f4cf8a; border-color: #7a5a22; background: #2a200f; }
.badge.bad { color: #ffb3a8; border-color: #7a2a20; background: #2c1310; }
.badge.win { color: #b9e0a5; border-color: #4f6f40; }
.badge.loss { color: #ffb3a8; border-color: #7a2a20; }
.notice { border-left: 3px solid var(--brass); background: var(--panel); padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 16px; }
.notice.error { border-color: var(--crimson-2); }
.notice.ok { border-color: var(--ok); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--brass); padding: 12px 20px; border-radius: var(--radius); z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: calc(100% - 32px); }
.toast.error { border-color: var(--crimson-2); }

/* assignment card */
.assign { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.table-no { text-align: center; border: 2px solid var(--brass); border-radius: var(--radius); padding: 10px 18px; background: #0f0e0b; }
.table-no .lbl { font-family: var(--head); font-size: .75rem; letter-spacing: .2em; color: var(--muted); }
.table-no .n { font-family: var(--head); font-size: 3.2rem; line-height: 1; color: var(--brass-2); }
.vs { font-family: var(--head); color: var(--muted); letter-spacing: .2em; font-size: .8rem; }
@media (max-width: 520px) { .assign { grid-template-columns: 1fr; text-align: center; } .table-no { justify-self: center; } }

/* markdown */
.md h1:first-child, .md h2:first-child { margin-top: 0; }
.md ul, .md ol { padding-left: 1.4em; margin: 0 0 1em; }
.md li { margin: .2em 0; }
.md blockquote { margin: 0 0 1em; padding: 10px 16px; border-left: 3px solid var(--brass); background: var(--panel-2); border-radius: 0 var(--radius) var(--radius) 0; }
.md blockquote p:last-child { margin: 0; }
.md table { border-collapse: collapse; margin-bottom: 1em; }
.md pre { background: #0f0e0b; padding: 12px; overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); white-space: pre-wrap; }

.list-text { white-space: pre-wrap; font-family: ui-monospace, Menlo, monospace; font-size: .88rem; background: #0f0e0b; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; overflow-x: auto; }

.sponsor { display: flex; flex-direction: column; gap: 10px; }
.sponsor .logo { height: 120px; display: flex; align-items: center; justify-content: center; background: #f4efe3; border-radius: var(--radius); padding: 12px; }
.sponsor .logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sponsor .logo.none { background: var(--panel-2); font-family: var(--head); color: var(--brass-2); font-size: 1.3rem; text-align: center; }

.map { width: 100%; height: 320px; border: 1px solid var(--line); border-radius: var(--radius); filter: grayscale(.3) contrast(1.05); }

.bio dt { font-family: var(--head); color: var(--brass); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin-top: 14px; }
.bio dd { margin: 4px 0 0; white-space: pre-wrap; }

.admin-grid-table select { min-width: 150px; padding: 6px; font-size: 14px; }
.admin-grid-table input { padding: 6px; font-size: 14px; }

@media print {
  .site-head, .site-foot, .noprint { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---- factions & allegiance */
.f-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; border-radius: 50%; background: rgba(0,0,0,.35); border: 1px solid var(--line); overflow: hidden; vertical-align: middle; }
.f-icon img { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 1; }
.f-icon b { position: absolute; font-family: var(--head); font-size: .6em; color: var(--f-accent, var(--brass)); }
.f-line { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.side-chip { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border: 1px solid; }
.side-chip.loyalist { color: #f3d98a; border-color: #8a6d1f; background: #241c07; }
.side-chip.traitor { color: #ff9f8f; border-color: #8a241a; background: #2a0b08; }

body.themed { background-image: radial-gradient(ellipse at top, var(--f-bg) 0%, var(--bg) 70%); }
body.themed .panel.accent { border-color: var(--brass); }
body.side-traitor .faction-banner { box-shadow: inset 0 0 0 1px rgba(200, 40, 30, .35), 0 10px 40px rgba(120, 10, 5, .35); }
body.side-loyalist .faction-banner { box-shadow: inset 0 0 0 1px rgba(230, 190, 90, .35), 0 10px 40px rgba(120, 90, 10, .3); }
.faction-banner {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center;
  padding: 22px; border-radius: var(--radius); margin-bottom: 20px; border: 1px solid var(--brass);
  background: linear-gradient(120deg, var(--f-bg, var(--panel)) 0%, var(--bg-2) 75%);
  position: relative; overflow: hidden;
}
.faction-banner::after { content: attr(data-numeral); position: absolute; right: 16px; bottom: -28px; font-family: var(--head); font-size: 8rem; line-height: 1; color: var(--f-accent2, var(--brass)); opacity: .12; pointer-events: none; }
.faction-banner h1 { margin: 0; }
.faction-banner .sub { font-family: var(--head); letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; color: var(--muted); }
@media (max-width: 520px) { .faction-banner { grid-template-columns: 1fr; text-align: center; } .faction-banner .f-icon { justify-self: center; } }

/* awards */
.awards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-bottom: 26px; }
.award { background: linear-gradient(180deg, var(--panel-2), var(--bg-2)); border: 1px solid var(--brass); border-radius: var(--radius); padding: 16px; text-align: center; }
.award .t { font-family: var(--head); color: var(--brass-2); letter-spacing: .06em; font-size: 1rem; }
.award .b { color: var(--muted); font-size: .8rem; margin-bottom: 10px; }
.award .w { font-weight: 700; font-size: 1.1rem; }
.award.worst { border-color: var(--crimson); }
.award.worst .t { color: #ff9f8f; }

/* war tally */
.war { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; text-align: center; }
.war .n { font-family: var(--head); font-size: 2.6rem; line-height: 1; }
.war .loy .n { color: #f3d98a; }
.war .tra .n { color: #ff8a78; }
.war-bar { height: 10px; border-radius: 99px; overflow: hidden; display: flex; background: var(--panel-2); margin-top: 12px; }
.war-bar .l { background: linear-gradient(90deg, #8a6d1f, #f3d98a); }
.war-bar .t { background: linear-gradient(90deg, #ff8a78, #8a241a); }

.faction-pick { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); max-height: 380px; overflow-y: auto; padding: 4px; }
.side-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side-pick button { padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: #0f0e0b; color: var(--text); cursor: pointer; font-family: var(--head); letter-spacing: .08em; font-size: 1rem; text-transform: uppercase; }
.side-pick button .c { display: block; font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.side-pick button.on.loyalist { border-color: #c9a441; background: #241c07; color: #f3d98a; }
.side-pick button.on.traitor { border-color: #b0281f; background: #2a0b08; color: #ff9f8f; }
.side-pick button:disabled { opacity: .45; cursor: not-allowed; }

.my-scores { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.my-scores .s { background: #0f0e0b; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; text-align: center; }
.my-scores .s .v { font-family: var(--head); font-size: 1.5rem; color: var(--brass-2); }
.my-scores .s .k { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }


/* =====================================================================
   COGITATOR THEME
   ===================================================================== */
body { font-size: 16px; letter-spacing: .01em; text-shadow: 0 0 4px rgba(61, 255, 138, .18); }
::selection { background: var(--brass); color: #021008; }

/* CRT glass: scanlines, vignette, faint flicker. Purely decorative, never blocks clicks. */
body::before, body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 999; }
body::before {
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, .22) 3px, rgba(0, 0, 0, 0) 4px);
  mix-blend-mode: multiply;
}
body::after {
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .55) 100%);
  animation: cog-flicker 6s infinite steps(1);
}
@keyframes cog-flicker { 0%, 100% { opacity: 1; } 47% { opacity: .92; } 48% { opacity: 1; } 83% { opacity: .95; } }
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }

h1, h2, h3, h4 { font-family: var(--head); font-weight: 400; text-transform: uppercase; letter-spacing: .08em; color: var(--brass); text-shadow: 0 0 6px color-mix(in srgb, var(--brass) 60%, transparent), 0 0 18px color-mix(in srgb, var(--brass) 25%, transparent); }
h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.45rem; }
h1::before { content: '++ '; opacity: .55; }
h1::after { content: ' ++'; opacity: .55; }
.md h1::before, .md h1::after, .faction-banner h1::before, .faction-banner h1::after { content: none; }
.panel > h2:first-child::before, .panel > h3:first-child::before { content: '// '; opacity: .5; }
a { color: var(--brass-2); text-decoration-style: dotted; text-underline-offset: 3px; }
a:hover { color: #021008; background: var(--brass); text-decoration: none; text-shadow: none; }
.card-link:hover, .brand:hover, .nav a:hover, .btn:hover, a.badge:hover { background: inherit; }
code { background: var(--panel-2); color: var(--brass-2); }
.muted { color: var(--muted); }

/* header */
.site-head { background: rgba(2, 8, 5, .92); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(61, 255, 138, .08), 0 6px 24px rgba(0, 0, 0, .6); }
.brand span { font-family: var(--head); font-size: 1.5rem; letter-spacing: .12em; color: var(--brass); }
.brand span::after { content: '_'; margin-left: 2px; animation: cog-blink 1.1s steps(1) infinite; }
@keyframes cog-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .brand span::after { animation: none; } }
.logo-img { filter: invert(1) sepia(1) saturate(6) hue-rotate(80deg) brightness(1.1) contrast(1.4); mix-blend-mode: screen; }
.nav a { font-family: var(--head); font-size: 1.2rem; letter-spacing: .08em; color: var(--muted); border-radius: 0; padding: 6px 10px; }
.nav a:hover { color: var(--brass); background: rgba(61, 255, 138, .08); }
.nav a.active { color: #021008; background: var(--brass); text-shadow: none; }
.nav a.active::before { content: '> '; }
.nav-toggle { color: var(--brass); border-color: var(--line); border-radius: 0; font-family: var(--head); }
.nav-toggle::after { content: ' MENU'; font-size: .9rem; }

/* data-slate panels: thin frame plus bright corner brackets */
.panel, .card-link, .award, .table-wrap, .faction-banner, .notice, .sponsor .logo.none {
  --c: var(--brass);
  border-radius: 0;
}
.panel, .card-link, .award, .faction-banner {
  background:
    linear-gradient(var(--c), var(--c)) top left / 14px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 2px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 14px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 2px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 14px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 2px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 14px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 2px 14px no-repeat,
    linear-gradient(180deg, rgba(8, 30, 18, .78), rgba(3, 12, 7, .82));
  border: 1px solid var(--line);
  box-shadow: inset 0 0 40px rgba(61, 255, 138, .04), 0 0 0 1px rgba(0, 0, 0, .6);
}
.faction-banner {
  background:
    linear-gradient(var(--c), var(--c)) top left / 18px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 2px 18px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 18px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 2px 18px no-repeat,
    linear-gradient(120deg, color-mix(in srgb, var(--f-bg, #06301a) 80%, black), rgba(3, 12, 7, .9) 75%);
}
.panel.accent { border-color: color-mix(in srgb, var(--brass) 55%, transparent); box-shadow: inset 0 0 50px rgba(61, 255, 138, .06), 0 0 24px color-mix(in srgb, var(--brass) 12%, transparent); }
.card-link h3 { color: var(--brass); }
.card-link h3::before { content: '> '; opacity: .6; }
.card-link:hover { border-color: var(--brass); transform: none; box-shadow: 0 0 18px color-mix(in srgb, var(--brass) 20%, transparent); }
.card-link:hover h3::after { content: '_'; animation: cog-blink 1.1s steps(1) infinite; }

/* terminal buttons */
.btn {
  background: transparent; color: var(--brass); border: 1px solid var(--brass); border-radius: 0;
  font-family: var(--head); font-weight: 400; font-size: 1.2rem; letter-spacing: .1em; padding: 6px 14px;
  text-shadow: 0 0 6px color-mix(in srgb, var(--brass) 50%, transparent);
  box-shadow: inset 0 0 12px color-mix(in srgb, var(--brass) 12%, transparent);
}
.btn::before { content: '[ '; opacity: .7; }
.btn::after { content: ' ]'; opacity: .7; }
.btn:hover { background: var(--brass); color: #021008; filter: none; text-shadow: none; }
.btn.secondary { color: var(--muted); border-color: var(--line); background: transparent; box-shadow: none; }
.btn.secondary:hover { color: #021008; background: var(--muted); border-color: var(--muted); }
.btn.danger { color: var(--crimson-2); border-color: var(--crimson-2); background: transparent; box-shadow: inset 0 0 12px rgba(255, 90, 74, .12); text-shadow: 0 0 6px rgba(255, 90, 74, .5); }
.btn.danger:hover { background: var(--crimson-2); color: #140302; }
.btn.small { font-size: 1rem; padding: 3px 8px; }
.btn.big { font-size: 1.45rem; padding: 10px 22px; }

/* inputs */
input[type=text], input[type=number], input[type=email], input[type=password], input[type=url], select, textarea {
  background: #010402; color: var(--brass-2); border: 1px solid var(--line); border-radius: 0;
  font-family: var(--body); caret-color: var(--brass);
}
input::placeholder, textarea::placeholder { color: #2f6b47; }
input:focus, select:focus, textarea:focus { outline: 1px solid var(--brass); box-shadow: 0 0 12px color-mix(in srgb, var(--brass) 30%, transparent); }
select option, select optgroup { background: #021008; color: var(--text); }
label { font-weight: 400; color: var(--brass-2); text-transform: uppercase; letter-spacing: .06em; font-size: .92rem; }
label .hint { text-transform: none; letter-spacing: 0; }
.code-form input { font-family: var(--head); font-size: 2rem; letter-spacing: .4em; }

/* rating / segmented / side controls */
.rating .scale button, .seg button, .side-pick button { background: #010402; border-radius: 0; font-family: var(--head); font-size: 1.25rem; color: var(--muted); border-color: var(--line); }
.rating .scale button:hover, .seg button:hover { border-color: var(--brass); color: var(--brass); }
.rating .scale button.on, .seg button.on { background: var(--brass); color: #021008; border-color: var(--brass); box-shadow: 0 0 12px color-mix(in srgb, var(--brass) 50%, transparent); }
.seg { border-radius: 0; }
.side-pick button .c { font-family: var(--body); }
.side-pick button.on.loyalist { border-color: #ffb000; background: #1c1402; color: #ffcf5a; box-shadow: 0 0 16px rgba(255, 176, 0, .3); }
.side-pick button.on.traitor { border-color: #ff5a4a; background: #1c0503; color: #ff8a7a; box-shadow: 0 0 16px rgba(255, 90, 74, .3); }

/* tables */
.table-wrap { border-color: var(--line); background: rgba(1, 6, 3, .7); }
table.data th { background: #051a0e; color: var(--brass); font-family: var(--head); font-size: 1.05rem; letter-spacing: .1em; border-bottom: 1px solid var(--brass); }
table.data td { border-bottom: 1px dashed #123a24; }
table.data tr:hover td { background: rgba(61, 255, 138, .06); }
table.data tr.top3 td:first-child { color: var(--brass); }

.tabs { border-bottom-color: var(--line); }
.tabs button { font-family: var(--head); font-size: 1.2rem; letter-spacing: .1em; color: var(--muted); }
.tabs button.on { color: #021008; background: var(--brass); border-bottom-color: var(--brass); text-shadow: none; }
.tabs button:hover:not(.on) { color: var(--brass); }

/* badges, chips, notices */
.badge { border-radius: 0; font-family: var(--body); font-weight: 400; background: transparent; }
.badge.ok, .badge.win { color: var(--brass); border-color: var(--brass); background: rgba(61, 255, 138, .06); }
.badge.warn { color: #ffb000; border-color: #8a6000; background: rgba(255, 176, 0, .06); }
.badge.bad, .badge.loss { color: var(--crimson-2); border-color: #8a241a; background: rgba(255, 90, 74, .06); }
.side-chip { border-radius: 0; font-family: var(--body); font-weight: 400; }
.side-chip.loyalist { color: #ffcf5a; border-color: #8a6000; background: rgba(255, 176, 0, .08); }
.side-chip.traitor { color: #ff8a7a; border-color: #8a241a; background: rgba(255, 90, 74, .08); }
.notice { background: rgba(8, 30, 18, .7); border-left: 3px solid var(--brass); }
.notice::before { content: '++ NOTICE ++ '; color: var(--brass); }
.notice.error { border-left-color: var(--crimson-2); }
.notice.error::before { content: '!! WARNING !! '; color: var(--crimson-2); }
.notice.ok::before { content: '++ ACKNOWLEDGED ++ '; }
.toast { background: #010402; border-radius: 0; border-color: var(--brass); color: var(--brass-2); box-shadow: 0 0 24px rgba(61, 255, 138, .25); }
.toast::before { content: '>> '; }
.toast.error { border-color: var(--crimson-2); color: var(--crimson-2); }

/* assignment card */
.table-no { border-radius: 0; background: #010402; box-shadow: 0 0 20px color-mix(in srgb, var(--brass) 25%, transparent), inset 0 0 16px color-mix(in srgb, var(--brass) 15%, transparent); }
.table-no .lbl { font-family: var(--head); font-size: 1.1rem; }
.table-no .n { font-size: 4.4rem; color: var(--brass); text-shadow: 0 0 12px var(--brass); }
.vs { font-family: var(--head); font-size: 1.1rem; }

/* markdown: mission sheets read like data-slates */
.md h2 { font-size: 1.6rem; border-bottom: 1px dashed var(--line); padding-bottom: 2px; }
.md h3 { font-size: 1.35rem; }
.md blockquote { border-radius: 0; background: rgba(1, 6, 3, .8); border-left-color: var(--brass); color: var(--brass-2); }
.md strong { color: var(--brass-2); font-weight: 400; text-shadow: 0 0 6px color-mix(in srgb, var(--brass) 45%, transparent); }
.md ul { list-style: none; padding-left: 1.2em; }
.md ul li::before { content: '\25B8'; color: var(--brass); margin-left: -1.1em; margin-right: .5em; }
.list-text { background: #010402; color: var(--brass-2); border-radius: 0; }

/* awards, war tally, my scores, sponsors */
.award .t { font-family: var(--head); font-size: 1.45rem; color: var(--brass); }
.award.worst { --c: var(--crimson-2); border-color: #5a1a14; }
.award.worst .t { color: var(--crimson-2); }
.war .n { font-family: var(--head); font-size: 3.6rem; }
.war .loy .n { color: #ffcf5a; text-shadow: 0 0 10px rgba(255, 176, 0, .6); }
.war .tra .n { color: #ff8a7a; text-shadow: 0 0 10px rgba(255, 90, 74, .6); }
.war-bar { border-radius: 0; background: #010402; border: 1px solid var(--line); }
.war-bar .l { background: repeating-linear-gradient(90deg, #ffb000 0 6px, #8a6000 6px 8px); }
.war-bar .t { background: repeating-linear-gradient(90deg, #ff5a4a 0 6px, #8a241a 6px 8px); }
.my-scores .s { background: #010402; border-radius: 0; }
.my-scores .s .v { font-family: var(--head); font-size: 2rem; color: var(--brass); }
.sponsor .logo { background: #cfe9d8; border-radius: 0; filter: saturate(.7); }
.sponsor .logo.none { background: #010402; }
.bio dt { font-family: var(--head); font-size: 1.2rem; color: var(--brass); }
.f-icon { border-color: var(--line); background: rgba(0, 0, 0, .5); box-shadow: 0 0 10px color-mix(in srgb, var(--brass) 20%, transparent); }

/* maps look like auspex readouts until touched */
.map { filter: grayscale(1) sepia(1) hue-rotate(75deg) saturate(3) brightness(.75) contrast(1.1); border-radius: 0; transition: filter .3s; }
.map:hover, .map:focus { filter: none; }

/* hero */
.hero .tag { font-family: var(--head); font-size: 1.3rem; letter-spacing: .3em; color: var(--muted); }
.hero .dates { font-family: var(--head); font-size: 1.6rem; color: var(--brass-2); }
.hero .hex { font-size: .8rem; color: #2f6b47; letter-spacing: .15em; margin: 8px 0 0; overflow: hidden; white-space: nowrap; }

/* footer status bar */
.site-foot { border-top: 1px solid var(--line); background: #010402; font-size: .85rem; }
.cog-status { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; color: var(--muted); letter-spacing: .06em; margin-bottom: 8px; }
.cog-status b { color: var(--brass); font-weight: 400; }
.cog-status .ok::before { content: '\25CF '; color: var(--brass); animation: cog-blink 2s steps(1) infinite; }

/* boot sequence overlay */
.cog-boot { position: fixed; inset: 0; z-index: 1000; background: #010402; color: var(--brass); font-family: var(--body); padding: 8vh 6vw; overflow: hidden; cursor: pointer; text-shadow: 0 0 6px rgba(61, 255, 138, .6); transition: opacity .4s; }
.cog-boot pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: clamp(.8rem, 2.2vw, 1.05rem); line-height: 1.6; }
.cog-boot .skip { position: absolute; bottom: 20px; right: 24px; color: var(--muted); font-size: .8rem; }
.cog-boot.done { opacity: 0; pointer-events: none; }

@media print {
  body::before, body::after, .cog-boot { display: none !important; }
  body { text-shadow: none; }
}
@media (max-width: 520px) {
  .brand span { font-size: 1.15rem; letter-spacing: .06em; white-space: nowrap; }
  .brand img { height: 32px; }
  .nav-toggle::after { content: none; }
}
/* larger faction heraldry on player and table pages */
.faction-banner .f-icon { box-shadow: 0 0 28px color-mix(in srgb, var(--brass) 35%, transparent); }
.assign .f-line { font-size: 1.1rem; gap: 10px; }
@media (max-width: 520px) { .faction-banner .f-icon { width: 140px !important; height: 140px !important; } }
