/* ==========================================================================
   Gadsden Report - shared theme
   The tokens and surfaces here are the same ones index.html ships inline;
   every page added since (article, archives, tips, admin, newsletter) reads
   them from this one file so the identity cannot drift page to page.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg-grad:
    radial-gradient(1200px 620px at 10% -8%, rgba(200,164,21,0.13), transparent 60%),
    radial-gradient(1000px 700px at 102% 2%, rgba(26,58,106,0.10), transparent 55%),
    radial-gradient(900px 900px at 50% 118%, rgba(200,164,21,0.07), transparent 60%),
    linear-gradient(180deg, #F8F5EE 0%, #EEE8DA 100%);
  --text: #1A1A1A;
  --text-dim: #5C5750;
  --text-muted: #8C867E;
  --link: #1A3A6A;
  --link-hover: #9E7E00;
  --accent: #C8A415;
  --accent-dark: #8A6E00;
  --accent-on: #1A1A1A;
  --hairline: rgba(40,34,22,0.13);
  --flash-bg: rgba(200,164,21,0.14);
  --siren-bg: rgba(192,32,32,0.78);
  --siren-border: rgba(255,120,110,0.55);
  --siren-text: #FFFFFF;
  --ok: #1E7A38;
  --warn: #A76B00;
  --bad: #B32020;

  --glass-bg: rgba(255,255,255,0.52);
  --glass-bg-strong: rgba(255,255,255,0.66);
  --glass-solid: rgba(248,245,238,0.94);
  --glass-border: rgba(255,255,255,0.7);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 14px 38px rgba(45,38,18,0.10), 0 3px 10px rgba(45,38,18,0.06);
  --glass-hi: rgba(255,255,255,0.85);
  --logo-shadow: drop-shadow(0 6px 14px rgba(30,24,10,0.32));
  --field-bg: rgba(255,255,255,0.72);
  --blur: 18px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-grad:
    radial-gradient(1200px 620px at 10% -8%, rgba(223,192,50,0.11), transparent 60%),
    radial-gradient(1000px 700px at 102% 2%, rgba(70,104,170,0.14), transparent 55%),
    radial-gradient(900px 900px at 50% 118%, rgba(223,192,50,0.05), transparent 60%),
    linear-gradient(180deg, #100F0E 0%, #16140F 100%);
  --text: #ECE8E0;
  --text-dim: #ABA59D;
  --text-muted: #6E6862;
  --link: #87B0E2;
  --link-hover: #DFC032;
  --accent: #DFC032;
  --accent-dark: #C9B24E;
  --accent-on: #131210;
  --hairline: rgba(255,255,255,0.10);
  --flash-bg: rgba(223,192,50,0.12);
  --siren-bg: rgba(196,46,40,0.50);
  --siren-border: rgba(255,120,110,0.40);
  --siren-text: #FFFFFF;
  --ok: #4FBE70;
  --warn: #D9A441;
  --bad: #E56A62;

  --glass-bg: rgba(30,29,26,0.44);
  --glass-bg-strong: rgba(34,33,29,0.60);
  --glass-solid: rgba(22,21,18,0.92);
  --glass-border: rgba(255,255,255,0.11);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 16px 42px rgba(0,0,0,0.55), 0 3px 10px rgba(0,0,0,0.4);
  --glass-hi: rgba(255,255,255,0.12);
  --logo-shadow: drop-shadow(0 7px 18px rgba(0,0,0,0.60));
  --field-bg: rgba(255,255,255,0.06);
  --blur: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg-grad:
      radial-gradient(1200px 620px at 10% -8%, rgba(223,192,50,0.11), transparent 60%),
      radial-gradient(1000px 700px at 102% 2%, rgba(70,104,170,0.14), transparent 55%),
      radial-gradient(900px 900px at 50% 118%, rgba(223,192,50,0.05), transparent 60%),
      linear-gradient(180deg, #100F0E 0%, #16140F 100%);
    --text: #ECE8E0;
    --text-dim: #ABA59D;
    --text-muted: #6E6862;
    --link: #87B0E2;
    --link-hover: #DFC032;
    --accent: #DFC032;
    --accent-dark: #C9B24E;
    --accent-on: #131210;
    --hairline: rgba(255,255,255,0.10);
    --flash-bg: rgba(223,192,50,0.12);
    --siren-bg: rgba(196,46,40,0.50);
    --siren-border: rgba(255,120,110,0.40);
    --siren-text: #FFFFFF;
    --ok: #4FBE70;
    --warn: #D9A441;
    --bad: #E56A62;

    --glass-bg: rgba(30,29,26,0.44);
    --glass-bg-strong: rgba(34,33,29,0.60);
    --glass-solid: rgba(22,21,18,0.92);
    --glass-border: rgba(255,255,255,0.11);
    --glass-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 16px 42px rgba(0,0,0,0.55), 0 3px 10px rgba(0,0,0,0.4);
    --glass-hi: rgba(255,255,255,0.12);
    --logo-shadow: drop-shadow(0 7px 18px rgba(0,0,0,0.60));
    --field-bg: rgba(255,255,255,0.06);
    --blur: 20px;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Libre Franklin', Helvetica, Arial, sans-serif;
  color: var(--text); line-height: 1.55;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: var(--bg-grad); background-attachment: fixed;
}
a { color: var(--link); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; }

.page { max-width: 1000px; margin: 0 auto; padding: 20px 16px 28px;
  display: flex; flex-direction: column; gap: 16px; }
.page.wide { max-width: 1240px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10001;
  background: var(--accent); color: var(--accent-on);
  padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Liquid glass surface ---------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(165%);
  backdrop-filter: blur(var(--blur)) saturate(165%);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow: var(--glass-shadow);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(130% 90% at 0% 0%, var(--glass-hi), transparent 52%);
  opacity: 0.55;
}
.glass > * { position: relative; }
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .glass { background: var(--glass-solid); }
}

/* ---------- Theme switch ---------- */
.theme-switch {
  position: fixed; top: 14px; right: 14px; z-index: 9998;
  display: inline-flex; gap: 2px; padding: 4px;
  border-radius: 999px;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.theme-switch button {
  width: 34px; height: 30px; border: 0; background: transparent;
  border-radius: 999px; cursor: pointer; color: var(--text-dim);
  display: inline-flex; align-items: center; justify-content: center;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}
.theme-switch button svg { width: 16px; height: 16px; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button.active {
  background: var(--accent); color: var(--accent-on);
  box-shadow: 0 2px 8px rgba(0,0,0,0.20), inset 0 1px 0 rgba(255,255,255,0.35);
}
.theme-switch button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* ---------- Masthead ---------- */
.top-banner { padding: 22px 20px; overflow: hidden; }
.masthead { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.masthead-logo { flex: 0 0 auto; line-height: 0; }
.masthead-logo img { display: block; height: 88px; width: auto; filter: var(--logo-shadow); }
.masthead-text { text-align: left; }
.masthead a { text-decoration: none; }
.site-title {
  font-family: 'Oswald', Impact, sans-serif;
  font-size: 3rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  line-height: 0.98; color: var(--text);
}
.site-title .accent-word { color: var(--accent); }
.title-rule { height: 3px; width: 100%; margin: 7px 0 6px;
  background: linear-gradient(90deg, var(--accent), transparent); border-radius: 2px; }
.site-motto {
  font-family: 'Courier Prime', monospace;
  font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-dim);
}
.site-subtitle {
  font-family: 'Courier Prime', monospace;
  font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-muted); margin-top: 2px;
}
.masthead-compact { gap: 14px; }
.masthead-compact .masthead-logo img { height: 52px; }
.masthead-compact .site-title { font-size: 1.9rem; }

/* ---------- Primary navigation ---------- */
.site-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; flex-wrap: wrap; padding: 8px 12px; border-radius: 999px;
}
.site-nav a, .site-nav button.navlink {
  font-family: 'Oswald', sans-serif; font-size: 0.76rem;
  font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim); padding: 7px 13px; border-radius: 999px;
  border: 0; background: transparent; cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.site-nav a:hover, .site-nav button.navlink:hover { color: var(--text); background: var(--flash-bg); text-decoration: none; }
.site-nav a.active { color: var(--accent-on); background: var(--accent); }
.site-nav .nav-spacer { flex: 1 1 auto; min-width: 0; }
.nav-user { display: inline-flex; align-items: center; gap: 8px; padding-left: 6px; }
.nav-user img { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--hairline); }
.nav-user .nav-name {
  font-family: 'Courier Prime', monospace; font-size: 0.7rem;
  color: var(--text-dim); max-width: 140px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- Generic card / section ---------- */
.card { padding: 22px 24px; }
.card + .card { margin-top: 0; }
.card h1, .page-title {
  font-family: 'Oswald', Impact, sans-serif; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.12;
  font-size: 1.9rem; margin-bottom: 6px;
}
.card h2, .section-title {
  font-family: 'Oswald', sans-serif; font-size: 0.78rem;
  font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--accent-dark); margin: 20px 0 12px;
  padding-bottom: 8px; border-bottom: 2px solid var(--accent);
}
.card h2:first-child, .section-title:first-child { margin-top: 0; }
.card h3 { font-family: 'Oswald', sans-serif; font-size: 1.05rem; font-weight: 600; margin: 18px 0 8px; }
.card p { margin-bottom: 12px; }
.card ul, .card ol { margin: 0 0 14px 22px; }
.card li { margin-bottom: 6px; }
.kicker {
  font-family: 'Courier Prime', monospace; font-size: 0.7rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted);
}
.lede { font-size: 1.05rem; color: var(--text-dim); line-height: 1.5; }
.muted { color: var(--text-muted); }
.center { text-align: center; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-family: 'Courier Prime', monospace; font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); padding: 10px 20px;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 7px; opacity: 0.6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Oswald', sans-serif; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 11px 20px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-on);
  transition: filter 0.15s, transform 0.06s, background 0.15s, color 0.15s;
}
.btn:hover { filter: brightness(1.07); text-decoration: none; color: var(--accent-on); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--hairline); }
.btn.ghost:hover { background: var(--flash-bg); color: var(--text); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.small { font-size: 0.7rem; padding: 7px 13px; border-radius: 9px; }
.btn[disabled], .btn.disabled { opacity: 0.5; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label, .label {
  display: block; font-family: 'Oswald', sans-serif;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px;
}
.field .hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; line-height: 1.4; }
input[type=text], input[type=email], input[type=url], input[type=search],
input[type=number], input[type=password], input[type=file], select, textarea {
  width: 100%; font-family: inherit; font-size: 0.95rem; color: var(--text);
  background: var(--field-bg); border: 1px solid var(--hairline);
  border-radius: 12px; padding: 11px 13px; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--flash-bg);
}
select { appearance: none; background-image:
  linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
  linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.check { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 9px; font-size: 0.92rem; }
.check input { width: auto; margin-top: 3px; flex: 0 0 auto; }
.check label { text-transform: none; letter-spacing: 0; font-family: inherit;
  font-size: 0.92rem; font-weight: 400; color: var(--text); margin: 0; }
fieldset { border: 1px solid var(--hairline); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
legend { font-family: 'Oswald', sans-serif; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-dark); padding: 0 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Notices ---------- */
.notice {
  padding: 12px 16px; border-radius: 14px; margin-bottom: 16px;
  border: 1px solid var(--hairline); background: var(--flash-bg);
  font-size: 0.92rem; line-height: 1.5;
  border-left: 3px solid var(--accent);
}
.notice.ok   { border-left-color: var(--ok); }
.notice.bad  { border-left-color: var(--bad); }
.notice.warn { border-left-color: var(--warn); }
.notice strong { display: block; font-family: 'Oswald', sans-serif;
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; margin-bottom: 3px; }

/* ---------- Sign-in provider buttons ---------- */
.sso-list { display: flex; flex-direction: column; gap: 11px; max-width: 380px; margin: 0 auto; }
.sso-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 18px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--hairline); background: var(--field-bg);
  color: var(--text); font-size: 0.95rem; font-weight: 600;
  transition: background 0.15s, border-color 0.15s, transform 0.06s;
}
.sso-btn:hover { background: var(--flash-bg); border-color: var(--accent); text-decoration: none; color: var(--text); }
.sso-btn:active { transform: translateY(1px); }
.sso-btn svg, .sso-btn img { width: 20px; height: 20px; flex: 0 0 auto; }
.sso-btn .sso-label { flex: 1 1 auto; text-align: left; }
.sso-disabled { opacity: 0.45; pointer-events: none; }

/* ---------- Headline lists (home + archives + related) ---------- */
.link-item { margin-bottom: 13px; line-height: 1.4; }
.link-item a { font-size: 0.88rem; font-weight: 600; }
.link-item .source {
  font-family: 'Courier Prime', monospace; font-size: 0.66rem;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.05em; margin-left: 4px;
}
.link-item.big a {
  font-family: 'Oswald', sans-serif; font-size: 1.15rem;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.01em; line-height: 1.25; color: var(--text);
}
.link-item.big a:hover { color: var(--accent); }
.link-item.flash {
  background: var(--flash-bg); padding: 7px 9px;
  margin: 0 -9px 13px; border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
}
.section-divider { border: none; border-top: 1px dashed var(--hairline); margin: 14px 0; }

/* ---------- Archive list ---------- */
.archive-toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
  padding: 16px 20px;
}
.archive-toolbar .field { margin-bottom: 0; flex: 1 1 170px; }
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-item {
  display: flex; gap: 16px; padding: 16px 0;
  border-bottom: 1px solid var(--hairline); align-items: flex-start;
}
.archive-item:last-child { border-bottom: none; }
.archive-date {
  flex: 0 0 92px; font-family: 'Courier Prime', monospace;
  font-size: 0.68rem; letter-spacing: 0.06em; color: var(--text-muted);
  text-transform: uppercase; padding-top: 4px; line-height: 1.5;
}
.archive-body { flex: 1 1 auto; min-width: 0; }
.archive-body h3 {
  font-family: 'Oswald', sans-serif; font-size: 1.1rem; font-weight: 600;
  line-height: 1.3; margin: 0 0 5px;
}
.archive-body h3 a { color: var(--text); }
.archive-body h3 a:hover { color: var(--accent); text-decoration: none; }
.archive-summary { font-size: 0.9rem; color: var(--text-dim); line-height: 1.45; }
.archive-meta {
  margin-top: 6px; font-family: 'Courier Prime', monospace;
  font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap;
}
.tag {
  display: inline-block; font-family: 'Oswald', sans-serif;
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.11em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: var(--flash-bg); color: var(--accent-dark); border: 1px solid var(--hairline);
}
.tag.hot { background: var(--siren-bg); color: var(--siren-text); border-color: var(--siren-border); }
.tag.ok { color: var(--ok); }
.tag.bad { color: var(--bad); }

.pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 18px; }
.pagination a, .pagination span {
  font-family: 'Oswald', sans-serif; font-size: 0.78rem; letter-spacing: 0.06em;
  padding: 7px 13px; border-radius: 10px; border: 1px solid var(--hairline);
  color: var(--text-dim);
}
.pagination a:hover { background: var(--flash-bg); color: var(--text); text-decoration: none; }
.pagination .current { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
.pagination .gap { border: none; }

/* ---------- Article page ---------- */
.article-head { padding: 30px 28px 24px; }
.article-head h1 {
  font-family: 'Oswald', Impact, sans-serif;
  font-size: 2.25rem; font-weight: 700; text-transform: uppercase;
  line-height: 1.1; letter-spacing: 0.01em; margin-bottom: 12px;
}
.article-meta {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  font-family: 'Courier Prime', monospace; font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted);
  padding-bottom: 14px; border-bottom: 1px solid var(--hairline); margin-bottom: 16px;
}
.article-summary { font-size: 1.06rem; color: var(--text-dim); line-height: 1.6; margin-bottom: 20px; }
/* Sits inline at the end of the excerpt, the way a wire-service "read more"
   does, so the sentence and the way out of it are one continuous thought. */
.article-summary .read-more {
  font-family: 'Oswald', sans-serif; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-dark); white-space: nowrap; margin-left: 6px;
}
:root[data-theme="dark"] .article-summary .read-more { color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .article-summary .read-more { color: var(--accent); }
}
.article-summary .read-more:hover { text-decoration: underline; }
.archive-summary .read-more {
  font-family: 'Courier Prime', monospace; font-size: 0.66rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); white-space: nowrap; margin-left: 5px;
}
.archive-summary .read-more:hover { color: var(--accent); }
.article-note {
  background: var(--flash-bg); border-left: 3px solid var(--accent);
  padding: 13px 16px; border-radius: 0 12px 12px 0; margin-bottom: 20px;
  font-size: 0.95rem; line-height: 1.55;
}
.source-cta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: 16px;
  background: var(--flash-bg); border: 1px solid var(--hairline);
}
.source-cta .source-what { flex: 1 1 260px; min-width: 0; }
.source-cta .source-what .kicker { margin-bottom: 3px; }
.source-cta .source-name {
  font-family: 'Oswald', sans-serif; font-size: 1.05rem;
  font-weight: 600; color: var(--text); word-break: break-word;
}
.article-disclosure {
  font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin-top: 14px;
}

/* ---------- Comments ---------- */
.comment-count-line {
  font-family: 'Oswald', sans-serif; font-size: 0.78rem;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--accent-dark);
}
.comment-form textarea { min-height: 110px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment {
  display: flex; gap: 13px; padding: 16px 0;
  border-top: 1px solid var(--hairline);
}
.comment:first-child { border-top: none; }
.comment.reply { margin-left: 46px; }
.comment-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  border: 1px solid var(--hairline); background: var(--flash-bg);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 0.95rem;
  color: var(--accent-dark); overflow: hidden;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-main { flex: 1 1 auto; min-width: 0; }
.comment-head { display: flex; gap: 9px; align-items: baseline; flex-wrap: wrap; margin-bottom: 5px; }
.comment-author { font-weight: 700; font-size: 0.92rem; }
.comment-time { font-family: 'Courier Prime', monospace; font-size: 0.66rem;
  color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; }
.comment-body { font-size: 0.95rem; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
.comment-body.removed { color: var(--text-muted); font-style: italic; }
.comment-actions { display: flex; gap: 12px; margin-top: 7px; align-items: center; flex-wrap: wrap; }
.comment-actions button, .comment-actions a {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  font-family: 'Courier Prime', monospace; font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted);
}
.comment-actions button:hover, .comment-actions a:hover { color: var(--accent); text-decoration: none; }
.comment-actions .vote.on { color: var(--accent); font-weight: 700; }
.comment-badge {
  font-family: 'Oswald', sans-serif; font-size: 0.58rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  background: var(--accent); color: var(--accent-on);
}
.comment-badge.mod { background: var(--link); color: #fff; }
.reply-box { margin-top: 12px; display: none; }
.reply-box.open { display: block; }
.signin-prompt {
  text-align: center; padding: 22px 18px; border-radius: 16px;
  border: 1px dashed var(--hairline); background: var(--field-bg);
}

/* ---------- Newsletter ---------- */
.freq-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
@media (max-width: 720px) { .freq-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .freq-grid { grid-template-columns: 1fr; } }
.freq-option { position: relative; }
.freq-option input { position: absolute; opacity: 0; pointer-events: none; }
.freq-option label {
  display: block; cursor: pointer; padding: 14px 15px; border-radius: 14px;
  border: 1px solid var(--hairline); background: var(--field-bg);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-transform: none; letter-spacing: 0; font-family: inherit; margin: 0;
}
.freq-option label:hover { border-color: var(--accent); }
.freq-option input:checked + label {
  border-color: var(--accent); background: var(--flash-bg);
  box-shadow: 0 0 0 2px var(--accent) inset;
}
.freq-option input:focus-visible + label { outline: 2px solid var(--link); outline-offset: 2px; }
.freq-option .freq-name {
  display: block; font-family: 'Oswald', sans-serif; font-size: 0.9rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text); margin-bottom: 3px;
}
.freq-option .freq-when { display: block; font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }
.subscribe-strip { padding: 22px 24px; }
.subscribe-strip .inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.subscribe-strip .inline-form input[type=email] { flex: 1 1 240px; }

/* ---------- Tables (admin + exports) ---------- */
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--hairline); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 640px; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--hairline); vertical-align: top; }
table.data th {
  font-family: 'Oswald', sans-serif; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--accent-dark);
  background: var(--flash-bg); white-space: nowrap; position: sticky; top: 0;
}
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--flash-bg); }
table.data td.nowrap, table.data th.nowrap { white-space: nowrap; }
table.data .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Admin shell ---------- */
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; padding: 10px 14px; }
.admin-nav a {
  font-family: 'Oswald', sans-serif; font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim);
  padding: 7px 12px; border-radius: 10px;
}
.admin-nav a:hover { background: var(--flash-bg); color: var(--text); text-decoration: none; }
.admin-nav a.active { background: var(--accent); color: var(--accent-on); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat {
  padding: 16px 18px; border-radius: 16px;
  border: 1px solid var(--hairline); background: var(--field-bg);
}
.stat .stat-num {
  font-family: 'Oswald', sans-serif; font-size: 1.9rem; font-weight: 700;
  line-height: 1; color: var(--text);
}
.stat .stat-label {
  font-family: 'Courier Prime', monospace; font-size: 0.65rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-top: 6px;
}
.stat.alert .stat-num { color: var(--bad); }
.log-box {
  font-family: 'Courier Prime', monospace; font-size: 0.76rem; line-height: 1.6;
  background: var(--field-bg); border: 1px solid var(--hairline);
  border-radius: 12px; padding: 14px; max-height: 460px; overflow: auto;
  white-space: pre-wrap; word-break: break-word;
}

/* ==========================================================================
   Front page only - the live ticker
   ========================================================================== */

.status-bar {
  padding: 9px 18px; text-align: center;
  font-family: 'Courier Prime', monospace;
  font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.05em;
  border-radius: 999px;
}
.live-dot {
  display: inline-block; width: 7px; height: 7px;
  background: #2ECC40; border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
  box-shadow: 0 0 6px rgba(46,204,64,0.7); animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.siren-bar {
  display: none; text-align: center; padding: 12px 16px;
  font-family: 'Oswald', sans-serif; font-size: 1.05rem;
  font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--siren-text) !important; cursor: pointer;
  border-radius: 16px;
  background: var(--siren-bg);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  border: 1px solid var(--siren-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 10px 30px rgba(150,20,20,0.30);
  animation: siren-flash 1.6s ease-in-out infinite;
}
.siren-bar.active { display: block; }
.siren-bar span { vertical-align: middle; }
@keyframes siren-flash { 0%,100%{opacity:1} 50%{opacity:.78} }

.content-card { overflow: hidden; }
.main-headline { padding: 28px 24px 22px; text-align: center; border-bottom: 1px solid var(--hairline); }
.main-headline h1 {
  font-family: 'Oswald', Impact, sans-serif;
  font-size: 2.3rem; font-weight: 700;
  text-transform: uppercase; line-height: 1.12;
  letter-spacing: 0.01em; margin-bottom: 8px;
}
.main-headline h1 a { color: var(--text); }
.main-headline h1 a:hover { color: var(--accent); text-decoration: none; }
.main-headline .sub-headline {
  font-size: 1.04rem; color: var(--text-dim);
  max-width: 680px; margin: 0 auto 10px; line-height: 1.45;
}
.main-headline .headline-actions {
  font-family: 'Courier Prime', monospace; font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.main-headline .headline-actions a { margin: 0 8px; }

.columns { display: grid; grid-template-columns: 1fr 1fr 1fr; border-bottom: 1px solid var(--hairline); }
.column { padding: 20px 18px; border-right: 1px solid var(--hairline); }
.column:last-child { border-right: none; }
.column-header {
  font-family: 'Oswald', sans-serif; font-size: 0.72rem;
  font-weight: 600; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--accent-dark);
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}
.column-header a { color: inherit; }
.links-strip { display: grid; grid-template-columns: 1fr 1fr; }
.links-strip .column { border-right: 1px solid var(--hairline); }
.links-strip .column:last-child { border-right: none; }

/* The story headline links to our page; this is the escape hatch to the
   publisher, kept small so it never competes with the headline itself.
   The .big selector has to be spelled out: `.link-item.big a` would otherwise
   win on specificity and render this at headline size. */
.link-item .direct,
.link-item.big .direct {
  font-family: 'Courier Prime', monospace; font-size: 0.62rem;
  font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1.4; color: var(--text-muted);
  margin-left: 6px; white-space: nowrap;
}
.link-item .direct:hover,
.link-item.big .direct:hover { color: var(--accent); }

.loading-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  transition: opacity 0.4s;
}
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .loading-overlay { background: var(--glass-solid); }
}
.loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loading-spinner {
  width: 38px; height: 38px;
  border: 3px solid var(--hairline); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-family: 'Courier Prime', monospace;
  font-size: 0.82rem; color: var(--text-dim); letter-spacing: 0.08em;
}
.loading-sub {
  font-family: 'Courier Prime', monospace;
  font-size: 0.68rem; color: var(--text-muted); margin-top: 6px;
}
.refresh-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  transform: scaleX(0); transform-origin: left; z-index: 10000;
}
.refresh-bar.active { animation: sweep 2s ease-in-out forwards; }
@keyframes sweep { 0%{transform:scaleX(0)} 80%{transform:scaleX(.85)} 100%{transform:scaleX(1)} }

@media (max-width: 780px) {
  .main-headline h1 { font-size: 1.7rem; }
  .columns { grid-template-columns: 1fr; }
  .column { border-right: none; border-bottom: 1px solid var(--hairline); }
  .columns .column:last-child { border-bottom: none; }
  .links-strip { grid-template-columns: 1fr; }
  .links-strip .column { border-right: none; border-bottom: 1px solid var(--hairline); }
  .links-strip .column:last-child { border-bottom: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center; padding: 18px 16px;
  font-family: 'Courier Prime', monospace;
  font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.05em;
}
.site-footer .footer-links { margin-bottom: 8px; }
.site-footer a { color: var(--text-muted); margin: 0 8px; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .site-title { font-size: 2.2rem; }
  .article-head h1 { font-size: 1.65rem; }
  .card h1, .page-title { font-size: 1.55rem; }
  .comment.reply { margin-left: 20px; }
  .archive-item { flex-direction: column; gap: 6px; }
  .archive-date { flex: none; padding-top: 0; }
}
@media (max-width: 560px) {
  .masthead { gap: 14px; }
  .masthead-text { text-align: center; }
  .masthead-logo img { height: 66px; }
  .site-title { font-size: 1.9rem; }
  .theme-switch { top: 10px; right: 10px; }
  .card { padding: 18px 16px; }
  .article-head { padding: 22px 18px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
@media print {
  body::before, .theme-switch, .site-nav, .comment-form, .source-cta { display: none !important; }
  .glass { background: #fff !important; box-shadow: none !important; border: 1px solid #ccc !important; }
}
