/* ==========================================================================
   Ox.News — site stylesheet
   Tokens transcribed from _claude-design-handoff/02_VISUAL-SYSTEM__ox-news.md,
   which was itself extracted from the original site's ox-news-reader-mode.css.
   A quiet, dark theory-journal: serif headlines over a narrow sans reading
   column, muted-blue links, philosophy set in italic blockquotes.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&display=swap');

:root {
  --bg:            #141414;  /* near-black, not pure — reduces halation */
  --surface:       #0F0F0F;  /* masthead, nav, footer */
  --text:          #D8D8D8;
  --heading:       #F0F0F0;
  --heading-strong:#F5F5F5;
  --muted:         #707070;  /* dates, desk labels */
  --muted-bright:  #A0A0A0;  /* excerpts */
  --accent:        #7EB8DA;
  --rule:          #2A2A2A;
  --quote-rule:    #3A3A3A;
  --quote-text:    #B0B0B0;
  --code-bg:       #1E1E1E;
  --code-text:     #C8C8C8;

  --measure: 700px;          /* the heart of the feel: ~75 chars per line */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.72;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

::selection { background: #2A4A5A; color: #F0F0F0; }

/* thin scrollbar */
* { scrollbar-width: thin; scrollbar-color: #333 var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

/* ---------- links ---------- */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:focus-visible { outline: none; border-radius: 2px; box-shadow: 0 0 0 2px var(--accent); }

/* ---------- shared column ---------- */
.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.wrap--wide { max-width: 860px; }

/* ---------- masthead ---------- */
.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-block: 1.4rem 1.1rem;
}
.masthead__mark {
  width: 44px; height: 44px;
  border-radius: 4px;
  border: 1px solid var(--rule);
  flex: none;
  display: block;
}
.masthead__word {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--heading-strong);
  letter-spacing: -0.01em;
}
.masthead__word a { color: inherit; }
.masthead__word a:hover { color: var(--accent); text-decoration: none; }
.masthead__rule {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.28rem;
}

/* ---------- nav ---------- */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.nav__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.35rem;
  padding-block: 0.8rem;
}
.nav a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--muted-bright);
  white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration: none; }

/* ---------- main ---------- */
main { flex: 1 0 auto; padding-block: 2.6rem 4rem; }

/* ---------- standfirst (home) ---------- */
.standfirst {
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1.6;
  color: var(--muted-bright);
  font-style: italic;
  margin: 0 0 0.9rem;
}
.standfirst + .standfirst__sub {
  font-size: 0.94rem;
  color: var(--muted);
  margin: 0 0 2.4rem;
  line-height: 1.6;
}

/* ---------- section label ---------- */
.section-label {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.4rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule);
}

/* ---------- post cards (home / desk listings) ---------- */
.cards { list-style: none; margin: 0; padding: 0; }
.card { padding-block: 1.7rem; border-bottom: 1px solid var(--rule); }
.card:first-child { padding-top: 0.4rem; }
.card:last-child { border-bottom: none; }
.card__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.42rem;
  line-height: 1.32;
  margin: 0 0 0.5rem;
  color: var(--heading);
}
.card__title a { color: inherit; }
.card__title a:hover { color: var(--accent); text-decoration: none; }
.card__excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-bright);
  margin: 0 0 0.6rem;
}
.card__meta {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.card__meta a { color: var(--muted); }
.card__meta a:hover { color: var(--accent); }
.card__sep { opacity: 0.5; margin-inline: 0.5rem; }

/* ---------- desk chip ---------- */
.chip {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-bright);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.22em 0.6em;
  line-height: 1.5;
}
a.chip:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* ---------- article ---------- */
.article__header { margin-bottom: 2.2rem; }
.article__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.24;
  color: var(--heading-strong);
  margin: 0.9rem 0 0.7rem;
}
.article__meta {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
}
.article__byline { font-style: italic; }

.prose { font-size: 19px; line-height: 1.72; color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.5em; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  font-family: var(--serif);
  color: var(--heading);
  line-height: 1.3;
  margin: 2em 0 0.6em;
}
.prose h1 { font-size: 2rem; font-weight: 700; color: var(--heading-strong); }
.prose h2 { font-size: 1.5rem; font-weight: 600; }
.prose h3 { font-size: 1.25rem; font-weight: 600; }
.prose h4 { font-size: 1.1rem; font-weight: 600; }
.prose strong, .prose b { color: var(--heading); font-weight: 600; }
.prose em, .prose i { font-style: italic; }
.prose ul, .prose ol { margin: 0 0 1.5em; padding-left: 1.4em; }
.prose li { margin-bottom: 0.55em; }
.prose li::marker { color: var(--muted); }

.prose blockquote {
  margin: 2em 0;
  padding: 0 0 0 1.4em;
  border-left: 3px solid var(--quote-rule);
  background: transparent;
  color: var(--quote-text);
  font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose img, .figure img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  border: 1px solid var(--rule);
}
.prose hr { border: none; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.prose code {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.12em 0.36em;
  border-radius: 3px;
  font-size: 0.88em;
}
.prose pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1rem 1.15rem;
  border-radius: 4px;
  border: 1px solid var(--rule);
  overflow-x: auto;
  font-size: 0.86em;
  line-height: 1.6;
}
.prose pre code { background: none; padding: 0; }

/* figures */
.figure { margin: 2.2em 0; }
.figure figcaption {
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-top: 0.6rem;
  font-style: italic;
}

/* tables — wide content scrolls inside its own container */
.table-scroll { overflow-x: auto; margin: 2.2em 0; }
.prose table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.88rem;
  line-height: 1.55;
}
.prose th, .prose td {
  border: 1px solid var(--rule);
  padding: 0.7em 0.85em;
  text-align: left;
  vertical-align: top;
}
.prose th {
  color: var(--heading);
  font-weight: 600;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  background: #191919;
}

/* ---------- report header ---------- */
.kicker {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.report__lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted-bright);
  margin: 1.2rem 0 0;
}

/* ---------- callout / teaser link ---------- */
.callout {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 1.1rem 1.3rem;
  margin: 2.4em 0;
  background: #181818;
}
.callout p { margin: 0; font-size: 0.97rem; line-height: 1.62; }
.callout__label {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

/* ---------- desk statement ---------- */
.desk-statement {
  border-left: 3px solid var(--quote-rule);
  padding-left: 1.4em;
  margin: 0 0 2.6rem;
}
.desk-statement p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.66;
  color: var(--quote-text);
  margin: 0 0 0.8em;
}
.desk-statement p:last-child { margin-bottom: 0; }

/* ---------- roster (correspondents / about) ---------- */
.roster { list-style: none; margin: 0; padding: 0; }
.roster li { padding-block: 1.5rem; border-bottom: 1px solid var(--rule); }
.roster li:last-child { border-bottom: none; }
.roster__name {
  font-family: var(--serif);
  font-size: 1.24rem;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 0.15rem;
}
.roster__name a { color: inherit; }
.roster__name a:hover { color: var(--accent); text-decoration: none; }
.roster__thinker {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 0.55rem;
}
.roster__remit { font-size: 16px; line-height: 1.62; color: var(--muted-bright); margin: 0; }
.roster__count { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.04em; }

/* ---------- more from this desk ---------- */
.more {
  margin-top: 3.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}
.more__label {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
}
.more ul { list-style: none; margin: 0; padding: 0; }
.more li { margin-bottom: 0.85rem; }
.more a {
  font-family: var(--serif);
  font-size: 1.06rem;
  line-height: 1.4;
  color: var(--heading);
}
.more a:hover { color: var(--accent); text-decoration: none; }
.more__date { font-family: var(--sans); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em; }

/* ---------- footer ---------- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  padding-block: 2.2rem 2.6rem;
  margin-top: auto;
}
.footer__inner { font-size: 0.85rem; line-height: 1.7; color: var(--muted); }
.footer__desks { margin: 0 0 1rem; }
.footer__desks a { color: var(--muted-bright); }
.footer__note { margin: 0; max-width: 62ch; }
.footer__sep { opacity: 0.5; margin-inline: 0.45rem; }

/* ---------- utilities ---------- */
.skip-link {
  position: absolute; left: -9999px;
  background: var(--accent); color: #0F0F0F;
  padding: 0.6rem 1rem; border-radius: 0 0 4px 0; z-index: 10;
  font-size: 0.9rem; font-weight: 600;
}
.skip-link:focus { left: 0; top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .prose { font-size: 17px; }
  .wrap { padding-inline: 1rem; }
  .article__title { font-size: 1.6rem; }
  .prose h1 { font-size: 1.6rem; }
  .prose h2 { font-size: 1.32rem; }
  .prose h3 { font-size: 1.15rem; }
  .card__title { font-size: 1.24rem; }
  .masthead__word { font-size: 1.36rem; }
  .masthead__mark { width: 38px; height: 38px; }
  main { padding-block: 2rem 3rem; }
  .nav__inner { gap: 0.1rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* preformatted tables recovered verbatim from the report PDFs, where the
   column parser could not be confident enough to build real table markup */
.table-scroll pre {
  font-size: 0.74rem;
  line-height: 1.5;
  background: #181818;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1rem 1.15rem;
  color: var(--muted-bright);
  white-space: pre;
}
.prose p.cite {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 0.7em;
  word-break: break-word;
}
