/* =========================================================
   The Vantage — editorial security brief
   Palette: warm off-white, deep ink, signal-red accent
   ========================================================= */

:root {
  /* Parisian / Le Monde palette — warm cream, muted bleu-gris */
  --bg:        oklch(0.955 0.020 82);   /* newsprint cream */
  --bg-soft:   oklch(0.930 0.024 82);
  --rule:      oklch(0.78  0.020 82);
  --rule-soft: oklch(0.88  0.020 82);
  --ink:       oklch(0.23  0.025 255);  /* bleu-de-France ink */
  --ink-soft:  oklch(0.40  0.030 255);
  --muted:     oklch(0.55  0.022 255);

  /* French tricolore red — muted, not fire-engine */
  --accent:    oklch(0.52 0.17 22);
  --accent-w:  oklch(0.90 0.07 22);

  --ok:   oklch(0.55 0.13 150);
  --warn: oklch(0.68 0.15 80);
  --fail: oklch(0.55 0.20 25);

  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans:  "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gap: 28px;
  --maxw: 1100px;
}

/* accent variants */
html[data-accent="ink"]    { --accent: oklch(0.25 0.02 260); --accent-w: oklch(0.86 0.01 260); }
html[data-accent="moss"]   { --accent: oklch(0.45 0.11 150); --accent-w: oklch(0.90 0.05 150); }
html[data-accent="cobalt"] { --accent: oklch(0.45 0.15 255); --accent-w: oklch(0.90 0.06 255); }

/* dark */
html[data-theme="dark"] {
  --bg:        oklch(0.18 0.01 260);
  --bg-soft:   oklch(0.22 0.01 260);
  --rule:      oklch(0.34 0.01 260);
  --rule-soft: oklch(0.28 0.01 260);
  --ink:       oklch(0.94 0.008 85);
  --ink-soft:  oklch(0.78 0.008 85);
  --muted:     oklch(0.62 0.010 260);
}

/* density */
html[data-density="compact"] { --gap: 18px; }

/* =========================================================
   Base
   ========================================================= */
* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--ink); }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  /* subtle newsprint grain */
  background-image:
    radial-gradient(oklch(0.80 0.03 82 / 0.25) 1px, transparent 1.2px),
    radial-gradient(oklch(0.88 0.04 82 / 0.35) 1px, transparent 1.5px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }

code, pre { font-family: var(--mono); font-size: 12.5px; }

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 48px 96px;
}

/* reusable small-caps label */
.label-sc {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.muted { color: var(--muted); }

/* =========================================================
   Masthead
   ========================================================= */
.mast {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 18px;
  margin-bottom: 36px;
}
.mast-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
}
.mast-top .mast-meta span + span { margin-left: 10px; }

.mast-headline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 18px 0 10px;
}
.mast-mark {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
}
.mast-mark img {
  display: block;
  width: 72px;
  height: 72px;
  max-width: 72px;
  max-height: 72px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--bg);
  border: 1px solid var(--rule);
}

.mast-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(48px, 8vw, 92px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-align: left;
  margin: 0;
  font-style: italic;
}
.mast-title .mast-the {
  font-size: 0.42em;
  vertical-align: 0.65em;
  font-style: normal;
  letter-spacing: 0;
  font-weight: 400;
  margin-right: 0.2em;
  color: var(--ink-soft);
}
.mast-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.mast-sub-mark { color: var(--muted); font-style: normal; }
.mast-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}
.mast-nav-btn {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 6px 22px;
  color: var(--ink-soft);
  border-right: 1px solid var(--rule);
  transition: color 150ms;
}
.mast-nav-btn:first-child { border-left: 1px solid var(--rule); }
.mast-nav-btn:hover { color: var(--ink); }
.mast-nav-btn.is-active {
  color: var(--accent);
  font-weight: 600;
}

/* =========================================================
   Today
   ========================================================= */
.sample-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  margin-bottom: 22px;
  background: var(--accent-w);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.4;
}
.sample-banner .label-sc { color: var(--accent); font-style: normal; white-space: nowrap; }

.issue-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
}
.issue-head-l .issue-date,
.issue-head-r .issue-time {
  font-family: var(--serif);
  font-size: 18px;
  margin-top: 4px;
}
.issue-head-r { text-align: right; }

/* filters */
.filters {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.filter-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.filter-label {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 42px;
}
.filter-types { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  transition: all 120ms;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip-on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.filter-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 3px;
  transition: all 120ms;
}
.tag:hover { color: var(--ink); background: var(--bg-soft); }
.tag-on {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-w);
}

/* articles */
.articles { display: flex; flex-direction: column; }
.article {
  display: grid;
  grid-template-columns: 64px 1fr;
  padding: var(--gap) 0;
  border-top: 1px solid var(--rule);
  gap: 24px;
}
.article:last-child { border-bottom: 1px solid var(--rule); }

.art-rail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-top: 4px;
}
.art-n {
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  line-height: 1;
  color: var(--accent);
  font-weight: 500;
}
.art-type {
  font-family: var(--mono);
  font-size: 11px;
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  color: var(--ink);
  border-radius: 2px;
  font-weight: 700;
}

.art-body { min-width: 0; }
.art-meta {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.art-kind { color: var(--accent); font-weight: 600; }
.art-dot { opacity: 0.6; }
.art-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  text-wrap: pretty;
}
.art-title a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.art-why {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 14px;
  max-width: 58ch;
}
.art-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.art-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.art-tag::before { content: "#"; opacity: 0.5; }
.art-spacer { flex: 1; }
.art-more {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 600;
}

.issue-foot {
  text-align: center;
  padding: 40px 0 8px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: 14px;
}

.empty {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
}

/* =========================================================
   Archive
   ========================================================= */
.arch-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
  flex-wrap: wrap;
}
.arch-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  font-style: italic;
  letter-spacing: -0.01em;
  margin: 6px 0 0;
}
.arch-tools { display: flex; gap: 8px; }
.arch-search,
.arch-select {
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--bg);
  color: var(--ink);
  min-width: 160px;
}
.arch-search:focus,
.arch-select:focus { outline: none; border-color: var(--accent); }

.arch-list { display: flex; flex-direction: column; }
.arch-issue {
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
}
.arch-issue:last-child { border-bottom: 1px solid var(--rule); }
.arch-issue-head {
  position: sticky;
  top: 20px;
}
.arch-date {
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  font-weight: 500;
  margin-bottom: 4px;
}
.arch-iss-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
  line-height: 1.8;
}
.arch-dot { margin: 0 6px; opacity: 0.5; }
.arch-id { color: var(--ink-soft); }

.arch-arts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.arch-art {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: baseline;
}
.arch-art-glyph {
  font-family: var(--mono);
  font-size: 11px;
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-weight: 700;
  align-self: center;
}
.arch-art-glyph.ty-research  { color: var(--accent); }
.arch-art-glyph.ty-bugbounty { color: var(--ink); }
.arch-art-glyph.ty-tool      { color: var(--muted); }
.arch-art-title {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.3;
  font-weight: 500;
}
.arch-art-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.arch-art-src {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* =========================================================
   Admin
   ========================================================= */
.admin-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 28px;
}
.admin-title {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: 32px;
  margin: 6px 0 4px;
  letter-spacing: -0.01em;
}
.admin-sub {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-bottom: 28px;
}
.stat { background: var(--bg); padding: 18px 20px; }
.stat-label {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.stat-value {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stat-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 0.03em;
}

.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--muted);
}
.dot-ok   { background: var(--ok); }
.dot-warn { background: var(--warn); }
.dot-fail { background: var(--fail); }

.admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.admin-card {
  border: 1px solid var(--rule);
  padding: 20px 22px;
  margin-bottom: 20px;
  background: var(--bg);
}
.admin-row .admin-card { margin-bottom: 0; }
.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-soft);
}
.pill {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  color: var(--ok);
  border: 1px solid currentColor;
}

.kv {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding: 5px 0;
  align-items: baseline;
  border-bottom: 1px dashed var(--rule-soft);
}
.kv:last-child { border-bottom: none; }
.kv .k {
  font-family: var(--sans);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
}
.kv .v { color: var(--ink); }

.gates { list-style: none; margin: 0; padding: 0; }
.gates li {
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  border-bottom: 1px dashed var(--rule-soft);
}
.gates li:last-child { border-bottom: none; }
.gate-ok { color: var(--ok); font-weight: 700; }

.runtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.runtable th, .runtable td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule-soft);
}
.runtable th {
  font-family: var(--sans);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}
.runtable td code { color: var(--ink-soft); }

.code {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  padding: 14px 16px;
  border-radius: 3px;
  overflow-x: auto;
  color: var(--ink);
  margin: 0;
  line-height: 1.55;
  font-size: 12px;
  max-height: 420px;
}

.copy-btn {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink-soft);
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

.pill-ok { color: var(--ok); }

/* =========================================================
   Footer
   ========================================================= */
.site-foot {
  margin-top: 64px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  flex-wrap: wrap;
  gap: 12px;
}
.site-foot-r { display: flex; gap: 8px; align-items: center; }
.dot-sep { opacity: 0.5; }

/* =========================================================
   Tweaks panel
   ========================================================= */
.tweaks {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg);
  border: 1px solid var(--ink);
  padding: 14px 16px;
  width: 240px;
  box-shadow: 6px 6px 0 var(--ink);
  font-size: 13px;
  z-index: 1000;
}
.tweaks-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 12px;
}
.tweak { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.tweak-label {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.tweak-row { display: flex; gap: 4px; }
.tweak-swatches { display: flex; gap: 6px; }
.swatch {
  width: 20px; height: 20px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  transition: transform 120ms;
}
.swatch:hover { transform: scale(1.1); }
.swatch-on { outline: 2px solid var(--ink); outline-offset: 2px; }
.minichip {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 9px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-soft);
}
.minichip-on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 820px) {
  .page { padding: 28px 22px 60px; }
  .admin-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-row { grid-template-columns: 1fr; }
  .arch-issue { grid-template-columns: 1fr; }
  .arch-issue-head { position: static; }
  .arch-art { grid-template-columns: 20px 1fr; }
  .arch-art-src { grid-column: 2; font-size: 10px; }
  .mast-sub { font-size: 13px; padding: 0 16px; text-align: center; }
}
