/* The subscriber portal — AF-COM-04.
 *
 * Every text/background pair is held to WCAG AA by tools/a11y (TR-QA-07),
 * in both schemes. The dark scheme is light + overrides, so a token not
 * overridden below keeps its light value on a dark page; the audit is what
 * catches that.
 */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #111827;
  --muted: #4b5563;
  --line: #d1d5db;
  --panel: #f8fafc;
  --accent: #1d4ed8;
  --fill: #1d4ed8;
  --bad: #b91c1c;
  --good: #15803d;
  --warn: #a16207;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --fg: #e2e8f0;
    --muted: #94a3b8;
    --line: #1e293b;
    --panel: #111b2e;
    --accent: #93c5fd;
    --bad: #f87171;
    --good: #4ade80;
    --warn: #facc15;
  }
}

* { box-sizing: border-box; }

body {
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0 auto; max-width: 960px; padding: 16px;
  background: var(--bg); color: var(--fg);
}

a { color: var(--accent); }
h1 { margin: 0 0 4px; font-size: 1.6rem; }
h2 { margin: 0 0 8px; font-size: 1.15rem; }
.lede, .muted, .note { color: var(--muted); }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 14px 16px; margin: 14px 0;
}

label { display: block; margin: 6px 0; }
input, select {
  font: inherit; padding: 6px 8px; width: 100%; max-width: 420px;
  border: 1px solid var(--muted); border-radius: 6px;
  background: var(--bg); color: var(--fg);
}
button {
  font: inherit; padding: 7px 14px; margin: 6px 6px 0 0; border: 0;
  border-radius: 6px; background: var(--fill); color: #fff; cursor: pointer;
  min-height: 36px;
}
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
button[disabled] { opacity: .6; cursor: default; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { color: var(--muted); font-weight: 600; }
tbody th { font-weight: 600; }

.bad { color: var(--bad); }
.state.operational { color: var(--good); }
.state.degraded, .state.not_offered { color: var(--warn); }
.state.outage { color: var(--bad); }
.notice { border-left: 4px solid var(--warn); padding-left: 10px; margin: 8px 0; }
.notice.outage { border-color: var(--bad); }
ul.plain { list-style: none; padding: 0; margin: 0; }

pre {
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 10px; overflow: auto; max-height: 420px; font-size: 13px;
}
.secret {
  font-family: ui-monospace, Consolas, monospace; word-break: break-all;
  border: 2px solid var(--bad); border-radius: 6px; padding: 8px;
}
.status { min-height: 1.5em; }
.scroll { overflow-x: auto; }
