/* Campaign console. Served from 'self' — the CSP forbids inline styles and
   external origins, so everything visual lives here. System fonts only: no
   font host to allow, nothing to download, and it renders instantly. */

:root {
  --ground: #f1f2f1; --surface: #fff; --surface-2: #e8eae9; --surface-3: #dde0df;
  --line: #c9cfcd; --line-2: #aeb6b4;
  --ink: #1b211f; --ink-2: #4a5250; --muted: #78827f;
  --accent: #0e6b4e; --accent-wash: #deebe5;
  --stop: #8e2c2a; --stop-wash: #f4e3e2;
  --warn: #8a5a1c; --warn-wash: #f4ebdd;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0f1413; --surface: #171d1b; --surface-2: #1f2624; --surface-3: #2a3230;
    --line: #2e3735; --line-2: #465250;
    --ink: #e5e9e7; --ink-2: #b6bebc; --muted: #8a9491;
    --accent: #48c395; --accent-wash: #17332a;
    --stop: #de7570; --stop-wash: #2e1b1a;
    --warn: #d2954e; --warn-wash: #2c2317;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- chrome */

header.top {
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center;
  padding: .7rem 1.15rem;
  background: var(--surface); border-bottom: 1px solid var(--line-2);
}
header.top .brand { font-weight: 600; letter-spacing: -.01em; }
header.top .spacer { flex: 1 1 auto; }
header.top .who { font-family: var(--mono); font-size: .76rem; color: var(--muted); }

nav.tabs { display: flex; flex-wrap: wrap; gap: .25rem; padding: .6rem 1.15rem 0; }
nav.tabs a {
  font-size: .84rem; padding: .38rem .8rem; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
nav.tabs a[aria-current="page"] {
  background: var(--surface-3); color: var(--ink);
  border-color: var(--line-2); font-weight: 600;
}
nav.tabs a.disabled { opacity: .45; pointer-events: none; }

main { max-width: 1100px; margin: 0 auto; padding: 1.4rem 1.15rem 4rem; }
main.narrow { max-width: 26rem; padding-top: 3.5rem; }

h1 { font-size: 1.5rem; font-weight: 650; margin: 0 0 .2rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; font-weight: 600; margin: 0; }
p.purpose { color: var(--muted); font-size: .88rem; margin: 0 0 1.2rem; }

/* ---------------------------------------------------------------- panels */

.panel { border: 1px solid var(--line); background: var(--surface); margin-bottom: 1.1rem; }
.panel > header {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center;
  padding: .6rem .9rem; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.panel > header h2 { flex: 1 1 auto; font-size: .9rem; }
.panel .body { padding: .9rem; }

.stub {
  border: 1px dashed var(--line-2); color: var(--muted);
  font-family: var(--mono); font-size: .76rem; padding: .8rem;
}

/* .stub is a BLOCK placeholder - dashed box, .8rem of padding - and belongs
   around a paragraph or an empty-state message. Used for short secondary text
   in a table cell it drew a dashed rectangle around a word or two, which reads
   as a rendering fault rather than as styling.
   .hint is the inline equivalent: same muted voice, no box, wraps normally.
   .tight adds nowrap, for the short fixed labels that should never break
   mid-phrase ("that is you"). Longer content - an error message, a note -
   takes plain .hint so it can still wrap. */
.hint { color: var(--muted); font-size: .78rem; }
.hint.tight { white-space: nowrap; }

/* ---------------------------------------------------------------- forms */

label { display: block; font-family: var(--mono); font-size: .72rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  margin-bottom: .28rem; }
input[type=text], input[type=password], input[type=number] {
  width: 100%; font: inherit; font-size: .9rem; padding: .42rem .55rem;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
}
.field { margin-bottom: .9rem; }

button, .btn {
  font: inherit; font-size: .84rem; padding: .4rem .85rem;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  cursor: pointer;
}
button.primary { background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 600; }
button.link { border: 0; background: none; color: var(--accent);
  padding: 0; text-decoration: underline; }

.alert { border: 1px solid var(--stop); background: var(--stop-wash);
  color: var(--ink); padding: .55rem .75rem; font-size: .86rem;
  margin-bottom: .9rem; }
.notice { border: 1px solid var(--warn); background: var(--warn-wash);
  color: var(--ink); padding: .55rem .75rem; font-size: .86rem;
  margin-bottom: .9rem; }

/* ---------------------------------------------------------------- tables */

.tw { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .85rem; }
th, td { text-align: left; padding: .45rem .8rem; border-bottom: 1px solid var(--line); }
thead th { font-family: var(--mono); font-size: .64rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
  background: var(--surface-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.mono { font-family: var(--mono); font-size: .79rem; font-variant-numeric: tabular-nums; }

.pill { font-family: var(--mono); font-size: .66rem; letter-spacing: .05em;
  text-transform: uppercase; padding: .14rem .42rem;
  border: 1px solid var(--line-2); white-space: nowrap; }
.pill.mgr { color: var(--accent); border-color: var(--accent); }

footer.foot { max-width: 1100px; margin: 0 auto; padding: 0 1.15rem 3rem;
  color: var(--muted); font-size: .78rem; }
