/* KRPOAPI admin, in the WMG Wavelink docs look (navy, gold, serif headings).
   Dark only, on purpose: one palette to keep at WCAG 2.1 AA. The reference
   "subtle" grey (#5e6d8a) fails AA on these backgrounds, so it is lifted to
   #8b98b3 (5.3:1 or better everywhere it is used). No external assets: the
   CSP allows only this file and copy.js. */
:root {
  color-scheme: dark;
  --bg: #07112e; --bg-elevated: #0d1b3e; --bg-overlay: #152248;
  --fg: #f0ede6; --muted: #9da8be; --subtle: #8b98b3;
  --accent: #b8973a; --accent-hover: #cfa94a; --on-accent: #0a0e1a;
  --accent-tint: rgba(184, 151, 58, .10);
  --line: rgba(184, 151, 58, .22); --line-subtle: rgba(184, 151, 58, .12);
  --ok-bg: #173a2c; --ok: #8fd6a8;
  --danger: #b4342e; --danger-hover: #c94039; --danger-fg: #f2a7a3; --danger-bg: #3a1a22;
  --sans: "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --display: Georgia, "Times New Roman", serif;
  --radius: 8px; --radius-lg: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0; font: 15px/1.6 var(--sans); color: var(--fg); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
main { max-width: 76rem; margin: 0 auto; padding: 2.5rem 1rem 5rem; }
main:focus { outline: none; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; }
code { font-family: var(--mono); font-size: .875em; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; line-height: 1.2; }
h1 { font-size: 2.25rem; margin: 0 0 1rem; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line-subtle); }
p { max-width: 70ch; }

/* Skip link: off screen until focused. */
.skip { position: absolute; left: -999px; z-index: 20; }
.skip:focus {
  left: 1rem; top: .5rem; padding: .5rem .75rem; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); font-weight: 600;
}

/* Header: sticky, translucent navy, gold wordmark, pill nav. */
.bar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(7, 17, 46, .92); border-bottom: 1px solid var(--line-subtle);
}
@supports (backdrop-filter: blur(1px)) { .bar { backdrop-filter: blur(12px); } }
.bar-inner {
  max-width: 80rem; margin: 0 auto; padding: .5rem 1rem; min-height: 3.5rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem;
}
.brand { margin: 0; display: flex; align-items: baseline; gap: .6rem; max-width: none; }
.wordmark { color: var(--accent); font-weight: 700; font-size: .875rem; letter-spacing: .12em; text-transform: uppercase; }
.brand-sub { color: var(--muted); font-size: .75rem; }
nav { display: flex; flex-wrap: wrap; gap: .25rem; }
nav a {
  color: var(--muted); text-decoration: none; font-size: .875rem;
  padding: .375rem .75rem; border-radius: 6px;
}
nav a:hover { color: var(--fg); background: var(--bg-overlay); }
nav a[aria-current="page"] { color: var(--accent); background: var(--accent-tint); }
.who { margin-left: auto; display: flex; gap: .75rem; align-items: center; color: var(--subtle); font-size: .75rem; }
.who form { margin: 0; }
.who button.link { font-size: .75rem; }

/* Sign-in hero. */
.hero { text-align: center; padding: 4rem 0 2rem; }
.hero h1 { font-size: 3rem; }
.hero p { margin-left: auto; margin-right: auto; }
.eyebrow { color: var(--subtle); font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.lead { color: var(--muted); font-size: 1.125rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 2rem 0; }

/* Buttons. A link styled as one keeps its link semantics. */
button, .button {
  display: inline-block; font: 600 .875rem/1.4 var(--sans); cursor: pointer; text-decoration: none;
  padding: .55rem 1.1rem; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent);
}
button:hover, .button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.button.big { font-size: 1rem; padding: .7rem 1.4rem; }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
button.link {
  background: none; border: none; color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; padding: 0; font-weight: 400;
}
button.link:hover { color: var(--accent-hover); }

/* Forms: elevated panels. */
input, textarea {
  font: inherit; padding: .5rem .7rem; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg); color: var(--fg);
}
input:hover, textarea:hover { border-color: var(--accent); }
input[type="checkbox"] { accent-color: var(--accent); width: 1rem; height: 1rem; vertical-align: -2px; }
label { font-size: .875rem; color: var(--fg); }
.stack {
  display: grid; gap: .5rem; max-width: 34rem; margin: .5rem 0 1.5rem; padding: 1.5rem;
  background: var(--bg-elevated); border: 1px solid var(--line-subtle); border-radius: var(--radius-lg);
}
.stack button { justify-self: start; margin-top: .5rem; }
.stack p { margin: 0; color: var(--muted); }
.stack.wide { max-width: 48rem; }
td .stack { padding: 1rem; margin: .5rem 0; background: var(--bg-overlay); }
.inline { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .4rem; }
.inline label { position: absolute; left: -999px; }
.inline input { width: 7rem; }
.inline button { padding: .4rem .8rem; }
.key { font-family: var(--mono); width: 100%; font-size: .95rem; background: var(--bg-overlay); }

/* Tables: rounded elevated panels. Separate borders so the radius shows. */
table {
  width: 100%; margin: 1rem 0; border-collapse: separate; border-spacing: 0; font-size: .875rem;
  background: var(--bg-elevated); border: 1px solid var(--line-subtle); border-radius: var(--radius-lg);
}
caption { text-align: left; color: var(--muted); padding: 0 0 .5rem; font-size: .875rem; }
th, td { text-align: left; vertical-align: top; padding: .7rem .9rem; border-bottom: 1px solid var(--line-subtle); }
thead th {
  background: var(--bg-overlay); color: var(--subtle); font-size: .75rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
thead th:first-child { border-top-left-radius: var(--radius-lg); }
thead th:last-child { border-top-right-radius: var(--radius-lg); }
tbody tr:last-child > * { border-bottom: none; }
tbody tr:hover { background: rgba(21, 34, 72, .55); }
tbody th { font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

details { margin: .25rem 0; }
summary { cursor: pointer; color: var(--accent); }
summary:hover { color: var(--accent-hover); }
.hint { color: var(--muted); }
p.hint { font-size: .875rem; }

/* Status pills. */
.tag {
  display: inline-block; font: 600 .75rem/1.6 var(--sans); padding: 0 .6rem; border-radius: 999px;
  vertical-align: middle; border: 1px solid transparent; letter-spacing: .02em;
}
.tag.on { background: var(--ok-bg); color: var(--ok); border-color: rgba(143, 214, 168, .25); }
.tag.off { background: var(--bg-overlay); color: var(--muted); border-color: var(--line-subtle); }
h1 .tag { font-size: .8rem; margin-left: .5rem; vertical-align: .4em; }

/* Callouts: tinted panel with a 4px rule on the left. */
.alert, .notice { padding: .9rem 1.1rem; border-radius: var(--radius); max-width: 70ch; }
.alert { background: var(--danger-bg); color: var(--danger-fg); border-left: 4px solid var(--danger); }
.alert strong { color: #fff; }
.notice { background: var(--bg-elevated); border-left: 4px solid var(--accent); }

dl {
  display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; max-width: 48rem;
  padding: 1.25rem 1.5rem; background: var(--bg-elevated);
  border: 1px solid var(--line-subtle); border-radius: var(--radius-lg);
}
dt { color: var(--subtle); font-size: .875rem; }
dd { margin: 0; }
.back { font-size: .875rem; margin: 0 0 .75rem; }
.changes { list-style: none; padding: 0; max-width: 60rem; }
.changes li { padding: .6rem 0 .6rem 1rem; border-left: 2px solid var(--line); margin-bottom: .25rem; }
.changes time { color: var(--subtle); font-size: .875rem; }

@media (max-width: 40rem) {
  h1, .hero h1 { font-size: 1.9rem; }
  .who { margin-left: 0; }
  th, td { padding: .55rem .6rem; }
  /* Wide tables scroll inside themselves rather than the whole page. */
  table { display: block; overflow-x: auto; }
}
