/* ============================================================
   SITE STYLES — front page and article pages
   Everything you'd normally want to change lives in the
   :root block directly below. You shouldn't need to touch
   anything further down to adjust colors or outlets.
   ============================================================ */

:root {
  /* --- Surfaces and text --- */
  --bg:          #131316;   /* page background */
  --panel:       #17171b;   /* sidebar background */
  --line:        #2a2a2e;   /* all divider lines */
  --ink:         #f4f1e8;   /* headlines */
  --ink-body:    #b4b0a7;   /* body copy */
  --ink-quiet:   #7d7a72;   /* labels, timestamps */
  --ink-faint:   #5c5952;   /* footer */

  /* --- Meaning colors, used by the status list --- */
  --ok:          #5aab7d;
  --warn:        #e0a13a;
  --bad:         #c4564a;

  /* --- Outlet accents ---
     Add a new outlet by adding a color here and a matching
     .outlet-X rule in the OUTLET ACCENTS section below. */
  --outlet-a:    #4a9ed6;
  --outlet-b:    #d4a03c;
  --outlet-c:    #c4564a;
  --outlet-d:    #5aab7d;

  /* --- Ad accent ---
     Used for the ad's rule, label and headline. Override per ad
     with style="--ad-accent:#hex" on the <aside class="ad"> tag. */
  --ad-accent:   #c0186a;
  --ad-ghost:    #0fb5c4;   /* second color in the glitch offset */

  /* --- Type --- */
  --font-head:   "IBM Plex Serif", Georgia, serif;
  --font-body:   "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:   "IBM Plex Mono", ui-monospace, Menlo, monospace;

  /* --- Spacing --- */
  --pad:         1.25rem;
}

/* ============================================================
   RESET
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--warn);
  outline-offset: 2px;
}

h1, h2, h3 { margin: 0; font-weight: 600; }

/* ============================================================
   MASTHEAD
   ============================================================ */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding: 1rem var(--pad) 0.9rem;
  border-bottom: 1px solid var(--line);
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 0.2rem;
}

.masthead-right {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--ink-quiet);
  text-align: right;
  white-space: nowrap;
}

.status-warn { color: var(--warn); }

/* ============================================================
   OUTLET BAR
   ============================================================ */

.outlet-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  padding: 0.55rem var(--pad);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--ink-quiet);
}

.outlet-bar .current { color: var(--ink); }

/* ============================================================
   LAYOUT
   ============================================================ */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
}

.column-main { border-right: 1px solid var(--line); }

.column-side {
  background: var(--panel);
  padding: 0.9rem 1rem;
}

/* ============================================================
   ARTICLES
   ============================================================ */

.column-main > article,
.column-main > .pair {
  padding: 1rem var(--pad);
}

.column-main > * + * { border-top: 1px solid var(--line); }

.tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.swatch {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent, var(--ink-quiet));
  flex: none;
}

.outlet-name { color: var(--accent, var(--ink-quiet)); }
.timestamp   { color: var(--ink-quiet); }

.lead h1 {
  font-family: var(--font-head);
  font-size: 1.7rem;
  line-height: 1.22;
  color: var(--ink);
  margin-bottom: 0.5rem;
  max-width: 32ch;
}

.column-main h2 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  line-height: 1.28;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.column-main p { margin: 0; max-width: 68ch; }

.lead p { font-size: 0.95rem; }

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.pair p, .single p { font-size: 0.88rem; line-height: 1.65; }

/* ============================================================
   OUTLET ACCENTS
   ============================================================ */

.outlet-a { --accent: var(--outlet-a); }
.outlet-b { --accent: var(--outlet-b); }
.outlet-c { --accent: var(--outlet-c); }
.outlet-d { --accent: var(--outlet-d); }

/* ============================================================
   AD SLOT
   ============================================================ */

.ad {
  padding: 0.7rem var(--pad);
  background: var(--panel);
  border-left: 3px solid var(--ad-accent);
}

.ad-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ad-accent);
}

.ad-headline {
  font-size: 0.98rem;
  line-height: 1.25;
  margin: 0.1rem 0 0.15rem;
  color: var(--ink);
  /* Static chromatic split — no animation, always present. */
  text-shadow:
     0.5px 0 0 rgba(192, 24, 106, 0.55),
    -0.5px 0 0 rgba(15, 181, 196, 0.45);
}

.ad p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  max-width: 56ch;
  color: var(--ink-quiet);
}

/* Occasional 1px slip. Runs slowly and is off most of the time. */
@media (prefers-reduced-motion: no-preference) {
  .ad-headline { animation: slip 9s steps(1) infinite; }
}

@keyframes slip {
  0%, 96%  { transform: none; }
  97%      { transform: translateX(1px); }
  98%      { transform: translateX(-1px); }
  99%, 100% { transform: none; }
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.side-block + .side-block { margin-top: 1.4rem; }

.side-block h3 {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  margin-bottom: 0.55rem;
}

.status-list {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.status-list > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  line-height: 2;
}

.status-list dt { color: var(--ink-body); }
.status-list dd { margin: 0; color: var(--ink-quiet); }

.tone-ok   { color: var(--ok)   !important; }
.tone-warn { color: var(--warn) !important; }
.tone-bad  { color: var(--bad)  !important; }

.archive-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  line-height: 1.45;
}

.archive-list li + li { margin-top: 0.55rem; }
.archive-list a { color: var(--ink-body); }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */

.story { padding: 1.1rem var(--pad) 1.5rem; }

.story h1 {
  font-family: var(--font-head);
  font-size: 1.75rem;
  line-height: 1.22;
  color: var(--ink);
  margin-bottom: 0.9rem;
  max-width: 30ch;
}

.story-body p {
  margin: 0 0 0.95rem;
  max-width: 66ch;
  font-size: 1rem;
  line-height: 1.75;
}

.story-body p:last-child { margin-bottom: 0; }

.back-link {
  margin: 1.6rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ink-quiet);
}

.wordmark a { color: inherit; }
.wordmark a:hover { text-decoration: none; }

/* ============================================================
   OUTLET PAGE
   ============================================================ */

.outlet-header {
  padding: 1.1rem var(--pad) 1.2rem;
  border-bottom: 1px solid var(--line);
}

.outlet-header h1 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.outlet-header p {
  margin: 0;
  max-width: 60ch;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-quiet);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.7rem var(--pad);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.footer-links a + a { margin-left: 1rem; }

/* ============================================================
   SMALL SCREENS
   ============================================================ */

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .column-main { border-right: 0; }
  .column-side { border-top: 1px solid var(--line); }
  .pair { grid-template-columns: 1fr; gap: 1rem; }
  .lead h1 { font-size: 1.45rem; }
  .masthead { flex-direction: column; align-items: flex-start; }
  .masthead-right { text-align: left; }
}
