/* GNOSVIA — Concept 01: The Modern Institution
   Design system from Prism's approved mockups.
   Red (#e5322d) marks judgment ONLY: ticker dot, kickers,
   status pills, tier labels. Never on nav, links, or body text. */

:root {
  --bg: #0b0b0d;
  --bg-raised: #141417;
  --bg-card: #17171b;
  --text: #f5f5f5;
  --muted: #9a9a9e;
  --red: #e5322d;
  --line: #26262b;
  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Live desk ticker ---------- */
.ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #000;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  padding: 8px 16px;
  white-space: nowrap;
  overflow: hidden;
}
.ticker .live {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 11px;
  flex-shrink: 0;
}
.ticker .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.ticker .scroll {
  overflow: hidden;
  flex: 1;
  color: var(--muted);
}
.ticker .scroll span {
  display: inline-block;
  padding-right: 48px;
  animation: tick 40s linear infinite;
}
@keyframes tick {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker .time { color: var(--muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ---------- Header / masthead ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(11, 11, 13, 0.96);
  backdrop-filter: blur(6px);
  z-index: 50;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.header-left, .header-right { display: flex; align-items: center; gap: 22px; flex: 1; }
.header-right { justify-content: flex-end; }
.burger {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 28px; height: 28px; position: relative;
}
.burger span, .burger span::before, .burger span::after {
  display: block; height: 2px; background: var(--text); width: 100%; position: relative;
}
.burger span::before, .burger span::after { content: ''; position: absolute; left: 0; }
.burger span::before { top: -7px; }
.burger span::after { top: 7px; }
.main-nav { display: flex; gap: 26px; }
.main-nav a {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.15s;
}
.main-nav a:hover { color: var(--text); }
.main-nav a.active { color: var(--text); }
.masthead { text-align: center; flex: 0 0 auto; }
.masthead .wordmark {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
}
.masthead .descriptor {
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
}
.header-actions { display: flex; align-items: center; gap: 18px; }
.icon-btn { background: none; border: 0; color: var(--text); cursor: pointer; font-size: 18px; }
.corrections-link { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.corrections-link:hover { color: var(--text); }
.corrections-link .flag { width: 8px; height: 8px; background: var(--red); border-radius: 2px; display: inline-block; }
.mobile-submit { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(229, 50, 45, 0.08), transparent 60%),
    linear-gradient(180deg, #101014 0%, var(--bg) 100%);
}
.hero-inner { padding: 72px 24px 56px; max-width: 1200px; margin: 0 auto; }
.kicker {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.08;
  font-weight: 700;
  max-width: 16ch;
  margin-bottom: 18px;
}
.dek { color: var(--muted); font-size: 17px; max-width: 56ch; margin-bottom: 20px; }
.byline { font-size: 13px; color: var(--muted); }
.byline strong { color: var(--text); font-weight: 600; }

/* ---------- Story grid ---------- */
.section { padding: 48px 0; }
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: #3a3a40; transform: translateY(-2px); }
.card .thumb {
  height: 150px;
  background: linear-gradient(135deg, #1c1c22 0%, #26262e 55%, #1a1a20 100%);
  position: relative;
  overflow: hidden;
}
.card .thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(220px 120px at 30% 20%, rgba(229, 50, 45, 0.10), transparent 70%);
}
.card .body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .kicker { margin: 0; font-size: 11px; }
.card h3 { font-family: var(--serif); font-size: 20px; line-height: 1.25; font-weight: 700; }
.card p { color: var(--muted); font-size: 14px; }
.card .meta { margin-top: auto; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.access-badge {
  font-size: 10px; letter-spacing: 0.12em; font-weight: 700;
  border: 1px solid var(--line); color: var(--muted);
  padding: 3px 8px; border-radius: 3px; text-transform: uppercase;
}
.access-badge.locked { color: var(--red); border-color: rgba(229, 50, 45, 0.5); }

/* ---------- Tier labels ---------- */
.tier {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid rgba(229, 50, 45, 0.45);
  padding: 3px 10px;
  border-radius: 3px;
}
.tier.confirmed { color: var(--text); border-color: var(--line); }
.tier.reported { color: var(--muted); border-color: var(--line); }
.tier.our-read { background: rgba(229, 50, 45, 0.12); }

/* ---------- Latest stories ---------- */
.latest { border-top: 1px solid var(--line); }
.latest-row {
  display: flex;
  gap: 20px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.latest-row time { color: var(--muted); font-size: 13px; min-width: 74px; font-variant-numeric: tabular-nums; }
.latest-row a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  background: #000;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 13px;
}
.footer-brand { font-family: var(--serif); font-weight: 700; letter-spacing: 0.14em; }
.footer-disclosure { color: var(--muted); text-align: center; }
.footer-copy { color: var(--muted); white-space: nowrap; }

/* Proximate disclosure badge (Atlas Tier 2 — for NWS/Haert Beaters/New Ways Tech touchpoints) */
.disclosure-badge {
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--muted);
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 4px;
  margin: 18px 0;
}

/* ---------- Stories feed ---------- */
.feed-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-card);
  padding: 26px;
  margin-bottom: 18px;
}
.feed-item .kicker { margin-bottom: 10px; }
.feed-item h2 { font-family: var(--serif); font-size: 30px; line-height: 1.2; margin-bottom: 10px; }
.feed-item .dek { margin-bottom: 14px; }
.feed-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.unknown-box {
  margin-top: 14px;
  border-left: 3px solid var(--red);
  padding: 10px 14px;
  background: rgba(229, 50, 45, 0.06);
  font-size: 14px;
  color: var(--muted);
}
.unknown-box strong { color: var(--text); }

/* ---------- TESSERA desk ---------- */
.desk-hero { padding: 56px 0 8px; }
.desk-hero .eyebrow {
  font-size: 12px; letter-spacing: 0.28em; color: var(--muted);
  text-transform: uppercase; margin-bottom: 12px;
}
.desk-hero h1 {
  font-family: var(--serif); font-size: clamp(40px, 5vw, 60px);
  letter-spacing: 0.1em; margin-bottom: 10px;
}
.desk-hero .sub { color: var(--muted); font-size: 17px; margin-bottom: 8px; }
.desk-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  padding: 32px 0 56px;
  align-items: start;
}
.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 20px;
}
.panel h2 { font-family: var(--serif); font-size: 22px; margin-bottom: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.field textarea, .field input[type="text"], .field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  padding: 12px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field textarea:focus, .field input:focus, .field select:focus {
  outline: none; border-color: #4a4a52;
}
.char-count { text-align: right; font-size: 12px; color: var(--muted); margin-top: 6px; }
.attach-note { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin: 14px 0; }
.btn-red {
  background: #f5f5f5;
  color: #0b0b0d;
  border: 0;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-red:hover { filter: brightness(0.92); }
.form-note { font-size: 13px; color: var(--muted); margin-top: 12px; display: none; }
.form-note.show { display: block; }

/* Pipeline table */
.pipeline { overflow-x: auto; }
table.pipeline-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pipeline-table th {
  text-align: left; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.pipeline-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pipeline-table tr:last-child td { border-bottom: 0; }
.story-cell { display: flex; gap: 12px; align-items: center; }
.story-cell .mini {
  width: 44px; height: 44px; border-radius: 4px; flex-shrink: 0;
  background: linear-gradient(135deg, #22222a, #2e2e38);
}
.pill {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px; white-space: nowrap;
}
.pill.submitted { color: var(--muted); border: 1px solid var(--line); }
.pill.in-review { color: #7ab8ff; border: 1px solid rgba(122, 184, 255, 0.4); }
.pill.approved { color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.4); }
.pill.published { color: var(--red); border: 1px solid rgba(229, 50, 45, 0.5); }

/* Filters sidebar */
.filters .field { margin-bottom: 14px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.stat {
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
  padding: 12px; text-align: center;
}
.stat .num { font-family: var(--serif); font-size: 26px; }
.stat .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- About / Corrections ---------- */
.prose { max-width: 720px; padding: 56px 0; }
.prose h1 { font-family: var(--serif); font-size: clamp(36px, 4.6vw, 54px); margin-bottom: 20px; }
.prose h2 { font-family: var(--serif); font-size: 26px; margin: 36px 0 14px; }
.prose p { color: var(--muted); margin-bottom: 16px; font-size: 16px; }
.prose p strong { color: var(--text); }
.prose .tagline {
  font-family: var(--serif); font-size: 24px; color: var(--text);
  border-left: 3px solid var(--red); padding-left: 18px; margin: 28px 0;
}
.empty-state {
  border: 1px dashed var(--line); border-radius: 6px;
  padding: 40px; text-align: center; color: var(--muted); margin-top: 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .desk-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #000; border-bottom: 1px solid var(--line);
    padding: 16px 24px; gap: 16px;
  }
  .burger { display: block; }
  .site-header { position: sticky; top: 0; }
  .header-row { padding: 12px 16px; }
  .masthead .wordmark { font-size: 30px; }
  .masthead .descriptor { font-size: 8px; letter-spacing: 0.24em; }
  .corrections-link span.txt { display: none; }
  .mobile-submit {
    display: inline-flex;
    background: #f5f5f5; color: #0b0b0d; border: 0; border-radius: 4px;
    font-weight: 700; font-size: 13px; padding: 9px 14px; cursor: pointer;
    align-items: center; gap: 6px;
  }
  .grid-4 { grid-template-columns: 1fr; }
  .hero-inner { padding: 48px 20px 40px; }
  .wrap { padding: 0 16px; }
  .footer-row { flex-direction: column; text-align: center; gap: 10px; }
  .feed-item h2 { font-size: 24px; }
  .ticker .scroll { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker .scroll span { animation: none; }
  .ticker .dot { animation: none; }
}
