/* 313th Banshee Company, war room (round r38): tokens, type and components on every page.
   docs/WARROOM-SPEC.md 4. One idea carries the site (the command table and its hologram, wr-shell/wr-stage);
   everything here is plain type in the dark: no boxes for grouping, no glow, no upper-case labels. */
@layer wr.base, wr.shell, wr.frames, wr.stage, wr.page;

@font-face { font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%; src: url("../fonts/archivo-latin-wdth-normal.de2f1fe81758.woff2") format("woff2"); }
@font-face { font-family: "Martian Mono"; font-style: normal; font-display: swap; font-weight: 100 800; font-stretch: 75% 112.5%; src: url("../fonts/martian-mono-latin-wdth-normal.53a4a47c6334.woff2") format("woff2"); }

@layer wr.base {
:root {
  --wr-bg: #05040a; --wr-wall: #0c0a14; --wr-surface: #0e0c17; --wr-surface-2: #15121f;
  --wr-rule: #2a2540; --wr-rule-strong: #3b3459;
  --wr-ink: #d6d0e6; --wr-ink-strong: #f1edff; --wr-ink-2: #a995f5; --wr-ink-3: #9f98b6; --wr-ink-4: #8a84a6;
  --wr-violet: #570bf1; --wr-violet-hover: #6a24ff; --wr-link-rule: #8f76e6; --wr-focus: #c9b8ff;
  --wr-pool: rgba(122, 77, 255, .5);
  --wr-busy: #f0c36a; --wr-bad: #ff8b8b; --wr-danger-fill: #8e1f2f;
  --site-font: "Archivo", system-ui, sans-serif; --wr-mono: "Martian Mono", ui-monospace, monospace;
  --wr-gutter: clamp(16px, 5vw, 96px);
  color-scheme: dark;
  font-family: var(--site-font);
  font-size: clamp(16px, calc(0.3vw + 11.7px), 19px);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  background: var(--wr-bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--wr-bg); color: var(--wr-ink); font: 400 1rem/1.5 var(--site-font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--wr-ink-strong); font-weight: 600; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 2.25rem; font-weight: 700; font-stretch: 108%; line-height: 1.1; }
h2 { font-size: 1.5rem; font-weight: 650; font-stretch: 104%; }
h3 { font-size: 1.125rem; }
h4, h5, h6 { font-size: 1rem; }
p, figure, blockquote, dl, dd, fieldset { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
fieldset { min-width: 0; padding: 0; border: 0; }
legend { padding: 0; color: var(--wr-ink); font-size: .875rem; }
img, svg, video { max-width: 100%; }
img { height: auto; }
hr { height: 1px; margin: 32px 0; border: 0; background: var(--wr-rule); }
small { font-size: .875rem; }
strong, b { font-weight: 650; }
time, .tabular { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
::selection { background: #4a2fa8; color: #fff; }

/* links: lit type with a lavender rule under it */
a { color: var(--wr-ink-strong); text-decoration: underline 1px var(--wr-link-rule); text-underline-offset: 3px; transition: color .12s, text-decoration-color .12s; }
a:hover { color: #fff; text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--wr-focus); outline-offset: 3px; }

/* code and output wells */
code, kbd, samp, pre { font-family: var(--wr-mono); font-size: .875rem; font-stretch: 100%; }
kbd { padding: 1px 5px; border: 1px solid var(--wr-rule-strong); border-radius: 3px; color: var(--wr-ink-strong); font-size: .8125rem; }
pre, .output-well { max-width: 100%; margin: 0; padding: 12px 16px; overflow: auto; border: 1px solid var(--wr-rule); border-radius: 3px; background: var(--wr-surface); color: var(--wr-ink); font: 400 13px/1.55 var(--wr-mono); white-space: pre-wrap; overflow-wrap: anywhere; }

/* buttons: one filled primary per area; everything else is a lit text action */
:where(.button, button, input[type="submit"], input[type="button"], input[type="reset"]) {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: .5em; min-height: 32px; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: none; color: var(--wr-ink-strong); font: inherit; font-weight: 600; line-height: 1.25;
  text-align: left; text-decoration: underline 1px var(--wr-link-rule); text-underline-offset: 3px; cursor: pointer;
  transition: color .12s, background-color .12s, text-decoration-color .12s;
}
:where(.button, button, input[type="submit"], input[type="button"]):hover { color: #fff; text-decoration-color: currentColor; }
:where(.button, button) img, :where(.button, button) svg { flex: none; }
.button-primary, :where(.button, button).button-primary, input[type="submit"].button-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px;
  border: 0; border-radius: 3px; background: var(--wr-violet); color: #f1edff; font-weight: 650; text-decoration: none; white-space: nowrap;
}
.button-primary:hover { background: var(--wr-violet-hover); color: #fff; text-decoration: none; }
.button-primary:focus-visible { outline-offset: 3px; }
.button-danger, .server-danger-button, .operations-cancel, .danger, .button.danger, button.danger { color: var(--wr-bad); text-decoration-color: currentColor; }
.button-danger:hover, .server-danger-button:hover, .operations-cancel:hover { color: #ffb3b3; }
.button-primary.button-danger, .button-primary.danger, .button-primary.server-danger-button, .button-danger-fill { background: var(--wr-danger-fill); color: #fff; text-decoration: none; }
.button-primary.button-danger:hover, .button-primary.danger:hover, .button-primary.server-danger-button:hover, .button-danger-fill:hover { background: #a3283a; color: #fff; }
:disabled, [aria-disabled="true"], .is-disabled { opacity: .45; cursor: default; }
@media (pointer: coarse) {
  :where(.button, button, input[type="submit"], input[type="button"]) { min-height: 44px; }
  .button-primary { min-height: 48px; }
}
/* copy buttons stay hidden until site-ui.js can copy */
button[data-copy], .kit-copy-button, .holo-copy { min-height: 32px; color: var(--wr-ink-2); font-size: .875rem; font-weight: 600; text-decoration: none; }
button[data-copy]:hover, .holo-copy:hover { color: var(--wr-ink-strong); text-decoration: underline 1px var(--wr-link-rule); }
button[data-copy].is-copied, .holo-copy.is-copied { color: var(--wr-ink-strong); }

/* fields: label above, 44 px field on the surface */
label { color: var(--wr-ink); font-size: .875rem; }
:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"], [type="file"], [type="submit"], [type="button"], [type="reset"], [type="image"], [type="color"]), select, textarea) {
  width: 100%; max-width: 100%; min-height: 44px; margin: 0; padding: 9px 12px; border: 1px solid var(--wr-rule-strong); border-radius: 3px;
  background: var(--wr-surface); color: var(--wr-ink-strong); font: inherit; font-size: max(1rem, 16px); line-height: 1.4;
}
select { padding-right: 28px; }
textarea { min-height: 7.5em; resize: vertical; }
::placeholder { color: var(--wr-ink-4); opacity: 1; }
:where(input, select, textarea):focus-visible { border-color: var(--wr-focus); outline: 2px solid var(--wr-focus); outline-offset: 1px; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--wr-violet); vertical-align: -3px; }
input[type="range"] { accent-color: var(--wr-violet); }
input[type="file"] { max-width: 100%; color: var(--wr-ink); font: inherit; font-size: .9375rem; }
input[type="file"]::file-selector-button { margin-right: 14px; padding: 9px 14px; border: 1px solid var(--wr-rule-strong); border-radius: 3px; background: var(--wr-surface-2); color: var(--wr-ink-strong); font: inherit; font-weight: 600; cursor: pointer; }
.form-field { display: grid; gap: 6px; min-width: 0; margin: 0 0 22px; }
.form-field > label, .form-field > legend { font-size: .875rem; }
.form-field:has(> input[type="checkbox"]), .form-field:has(> input[type="radio"]) { grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; }
.form-field:has(> input[type="checkbox"]) > :not(input, label) { grid-column: 1 / -1; }
.form-field:has(> input[type="checkbox"]) > input { grid-row: 1; }
.form-field ul:not(.errorlist) { display: grid; gap: 8px; }
.form-field ul:not(.errorlist) label { display: inline-flex; align-items: center; gap: 10px; color: var(--wr-ink-strong); font-size: 1rem; }
.help-text, .helptext { color: var(--wr-ink-3); font-size: .875rem; }
.errorlist { margin: 4px 0 0; padding: 0; list-style: none; color: var(--wr-bad); font-size: .875rem; }
[role="alert"]:not(.flash) .errorlist, [role="alert"] > .errorlist { margin: 0; }

/* tables: rules between rows, no boxes, no stripes */
table { width: 100%; border-collapse: collapse; border-spacing: 0; font-variant-numeric: tabular-nums; }
caption { padding: 0 0 10px; color: var(--wr-ink-3); font-size: .875rem; text-align: left; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--wr-rule); text-align: left; vertical-align: top; }
th { color: var(--wr-ink-2); font-size: .875rem; font-weight: 500; }
thead th { border-bottom-color: var(--wr-rule-strong); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
td.numeric, th.numeric, td.num, th.num { text-align: right; }
tbody tr:has(> td a[href]):hover { background: var(--wr-surface-2); }
.table-scroll, .table-wrap { max-width: 100%; overflow-x: auto; }
@media (max-width: 700px) {
  .table-scroll > table.mobile-table, .table-wrap > table.mobile-table, table.mobile-table { display: block; width: 100%; min-width: 0; }
  .mobile-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .mobile-table tbody { display: block; }
  .mobile-table tbody tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--wr-rule); }
  .mobile-table tbody tr:hover { background: none; }
  .mobile-table td { display: grid; grid-template-columns: minmax(96px, 34%) minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 4px 0; border: 0; overflow-wrap: anywhere; }
  .mobile-table td::before { content: attr(data-label); color: var(--wr-ink-2); font-size: .875rem; }
  .mobile-table .mobile-cell-value { display: block; min-width: 0; }
  .mobile-table td:first-child, .mobile-table td.mobile-empty-cell { display: block; }
  .mobile-table td:first-child { padding-bottom: 6px; color: var(--wr-ink-strong); font-weight: 600; }
  .mobile-table td:first-child::before, .mobile-table .mobile-empty-cell::before { content: none; }
  .mobile-table .mobile-duplicate-link { display: none; }
  .mobile-table td:first-child a, .mobile-table .mobile-cell-value > a { display: inline-flex; align-items: center; min-height: 44px; }
}
.mobile-cell-value { display: contents; }

/* tab rows: a wrapping row of lit words, the current one underlined in lavender */
:where(.section-tabs, .server-panel-nav, .operations-periods, .kit-jump, .staff-menu, .server-source-nav, .tab-row) {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: 0; padding: 0; border: 0; background: none;
}
:where(.section-tabs, .server-panel-nav, .operations-periods, .kit-jump, .staff-menu, .server-source-nav, .tab-row) a {
  display: inline-flex; align-items: center; min-height: 36px; color: var(--wr-ink-3); font-size: .9375rem; font-weight: 500;
  text-decoration: none; text-underline-offset: 6px;
}
:where(.section-tabs, .server-panel-nav, .operations-periods, .kit-jump, .staff-menu, .server-source-nav, .tab-row) a:hover { color: var(--wr-ink-strong); }
:where(.section-tabs, .server-panel-nav, .operations-periods, .kit-jump, .staff-menu, .server-source-nav, .tab-row) :is(a[aria-current], a.is-active, a.is-current) {
  color: var(--wr-ink-strong); text-decoration: underline 2px var(--wr-ink-2); text-underline-offset: 6px;
}
@media (pointer: coarse) { :where(.section-tabs, .server-panel-nav, .operations-periods, .kit-jump, .staff-menu, .server-source-nav) a { min-height: 44px; } }

/* status words: coloured type, no pill and no dot */
.status-label, .operations-attendance-status, .staff-chip, .badge { padding: 0; border: 0; border-radius: 0; background: none; color: var(--wr-ink-strong); font-size: inherit; font-weight: 600; }
.status-label:is(.loa, .e_loa, .roa), .operations-attendance-status--excused { color: var(--wr-busy); }
.status-label:is(.retired, .discharged, .guest), .operations-attendance-status--absent { color: var(--wr-ink-3); }
[data-state] > :is(strong, [data-status-word]) { color: var(--wr-ink-strong); }
[data-state="starting"] > :is(strong, [data-status-word]), [data-state="restarting"] > :is(strong, [data-status-word]),
[data-state="stopping"] > :is(strong, [data-status-word]), [data-state="busy"] > :is(strong, [data-status-word]) { color: var(--wr-busy); }
[data-state="unhealthy"] > :is(strong, [data-status-word]), [data-state="stopped"] > :is(strong, [data-status-word]),
[data-state="offline"] > :is(strong, [data-status-word]), [data-state="error"] > :is(strong, [data-status-word]) { color: var(--wr-bad); }
[data-state="unknown"] > :is(strong, [data-status-word]), [data-state="unavailable"] > :is(strong, [data-status-word]),
[data-state="not_configured"] > :is(strong, [data-status-word]) { color: var(--wr-ink-3); }

/* details: no marker; the summary is a lit control with "+" that turns into "−" */
summary { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: var(--wr-ink-strong); font-weight: 600; list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
details:not(.nav-server-menu, .mods-row-menu, .rcon-row-menu, [data-no-sign]) > summary::after { content: "+"; color: var(--wr-ink-2); font-weight: 500; }
details[open]:not(.nav-server-menu, .mods-row-menu, .rcon-row-menu, [data-no-sign]) > summary::after { content: "\2212"; }
@media (pointer: coarse) { summary { min-height: 44px; } }

/* page head and sections: an h1 line with its actions; sections are space and one hairline, never boxes */
.page-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; margin: 0 0 28px; }
.page-heading > div:first-child:not(:only-child) { min-width: 0; }
.page-heading p { margin-top: 8px; color: var(--wr-ink-3); }
.panel, .panel-body { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.panel + .panel, .panel ~ .panel { margin-top: 48px; }
.panel-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin: 0 0 16px; padding-top: 16px; border-top: 1px solid var(--wr-rule); }
.panel-heading > span, .panel-heading > p { color: var(--wr-ink-3); font-size: .875rem; }
.panel-heading h2 { font-size: 1.5rem; }
.meta, .muted, .holo-meta { color: var(--wr-ink-3); font-size: .875rem; }
.empty-state h2, .empty-state h3 { font-size: 1.25rem; }
.empty-state p, .empty-state { color: var(--wr-ink-3); }

/* pagination: "Previous · Page 2 of 5 · Next" */
.pagination, nav[aria-label$="pages"], .operations-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin-top: 28px; color: var(--wr-ink-3); font-size: .9375rem; }
:is(.pagination, .operations-pagination) > * + *::before { content: "\00b7"; margin: 0 12px; color: var(--wr-ink-4); }

/* people */
.avatar, .account-avatar { display: inline-grid; place-items: center; flex: none; overflow: hidden; border-radius: 50%; }
.avatar img, img.account-avatar { border-radius: 50%; object-fit: cover; }
.avatar:not(:has(img)), .account-avatar--placeholder { box-shadow: inset 0 0 0 1px var(--wr-rule-strong); color: var(--wr-ink-2); font-size: .75em; font-weight: 600; }

/* helpers */
.sr-only, .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }
.is-current { color: var(--wr-ink-strong); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-delay: 0s !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .button-primary, :where(.button, button) { border: 1px solid ButtonText; padding-inline: 12px; }
  :focus-visible { outline-color: Highlight; }
  .status-label, [data-status-word] { forced-color-adjust: auto; }
}
@media print {
  :root, body { background: #fff !important; color: #000 !important; }
  * { color: #000 !important; text-shadow: none !important; box-shadow: none !important; }
  a { text-decoration-color: #000; }
}
}
