/* ---------------------------------------------------------------------------
   A Pinch of Truth — design tokens
--------------------------------------------------------------------------- */
:root {
  color-scheme: light;
  --page: #faf8f2;
  --surface: #ffffff;
  --surface-2: #f3efe4;
  --ink: #16140f;
  --text: #34302a;
  --muted: #6f6a60;
  --rule: #e4ded1;
  --rule-strong: #16140f;
  --accent: #9a1b1b;
  --accent-strong: #7d1414;
  --accent-soft: #f3e3df;
  --soft: #f1ede2;

  --shadow-sm: 0 1px 2px rgba(20, 18, 12, 0.06);
  --shadow-md: 0 14px 34px -16px rgba(20, 18, 12, 0.26);
  --shadow-lg: 0 26px 60px -22px rgba(20, 18, 12, 0.34);

  --header-bg: rgba(250, 248, 242, 0.85);
  --ticker-bg: #16140f;
  --ticker-text: #f3efe4;
  --ticker-accent: #ff6f61;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 44px);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --page: #131210;
  --surface: #1c1a16;
  --surface-2: #232019;
  --ink: #f4f0e6;
  --text: #cac4b6;
  --muted: #948e80;
  --rule: #34302a;
  --rule-strong: #f4f0e6;
  --accent: #ed8378;
  --accent-strong: #f29c92;
  --accent-soft: #2c211d;
  --soft: #211e18;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 14px 34px -16px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 26px 60px -22px rgba(0, 0, 0, 0.8);

  --header-bg: rgba(19, 18, 16, 0.88);
  --ticker-bg: #000000;
  --ticker-text: #f4f0e6;
}

/* ---------------------------------------------------------------------------
   Base
--------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  color: var(--page);
  background: var(--ink);
}

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

[id] {
  scroll-margin-top: clamp(70px, 12vh, 120px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* ---------------------------------------------------------------------------
   Reading progress
--------------------------------------------------------------------------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: width 120ms linear;
}

/* ---------------------------------------------------------------------------
   Breaking news ticker
--------------------------------------------------------------------------- */
.breaking-bar {
  background: var(--ticker-bg);
  color: var(--ticker-text);
  border-bottom: 1px solid var(--rule-strong);
}

.breaking-inner {
  display: flex;
  align-items: stretch;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.breaking-label {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 9px 16px 9px 0;
  margin-right: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ticker-accent);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ticker-accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ticker-accent) 70%, transparent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ticker-accent) 70%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.breaking-viewport {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 36px), transparent);
}

.breaking-track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  white-space: nowrap;
  animation: ticker 46s linear infinite;
  will-change: transform;
}

.breaking-bar:hover .breaking-track,
.breaking-track:focus-within {
  animation-play-state: paused;
}

.breaking-track a {
  padding: 9px 2px;
  color: var(--ticker-text);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.breaking-track a:hover,
.breaking-track a:focus-visible {
  color: var(--ticker-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tick-sep {
  padding: 0 18px;
  color: var(--ticker-accent);
  font-size: 0.6rem;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------------------------------------------------------------------
   Header
--------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--rule-strong);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.utility-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 290px;
  gap: 12px;
  align-items: center;
  width: min(var(--max), calc(100% - 32px));
  min-height: 40px;
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.date-line {
  display: flex;
  grid-column: 2;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  text-align: center;
}

.utility-actions {
  display: flex;
  grid-column: 3;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.utility-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}

.utility-actions a:hover,
.utility-actions a:focus-visible {
  background: var(--soft);
}

.utility-actions a.utility-cta {
  color: var(--page);
  background: var(--ink);
  border-color: var(--ink);
}

.utility-actions a.utility-cta:hover,
.utility-actions a.utility-cta:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  transition: background 150ms var(--ease), color 150ms var(--ease), transform 150ms var(--ease);
}

.theme-toggle:hover {
  background: var(--ink);
  color: var(--page);
}

.theme-toggle:active {
  transform: scale(0.92);
}

.theme-toggle .icon {
  width: 16px;
  height: 16px;
}

[data-theme="dark"] .icon-moon,
html:not([data-theme="dark"]) .icon-sun {
  display: none;
}

.menu-toggle {
  display: none;
  grid-column: 1;
  width: 40px;
  height: 32px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
}

.menu-toggle span {
  width: 16px;
  height: 2px;
  background: var(--ink);
  transition: transform 200ms var(--ease), opacity 150ms var(--ease);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.masthead {
  display: flex;
  width: min(var(--max), calc(100% - 32px));
  min-height: 96px;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 18px);
  margin: 0 auto;
  color: var(--ink);
  text-decoration: none;
  transition: min-height 280ms var(--ease);
}

.masthead span {
  font-family: var(--serif);
  font-size: clamp(2.7rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.015em;
  transition: font-size 280ms var(--ease);
}

.brand-mark {
  width: clamp(40px, 5vw, 60px);
  height: clamp(40px, 5vw, 60px);
  flex: 0 0 auto;
  border-radius: 50%;
  transition: width 280ms var(--ease), height 280ms var(--ease);
}

[data-theme="dark"] .brand-mark {
  filter: invert(1) hue-rotate(180deg);
}

.site-nav {
  display: flex;
  width: min(var(--max), calc(100% - 32px));
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2vw, 14px);
  margin: 0 auto;
  border-top: 1px solid var(--rule-strong);
  overflow-x: auto;
  color: var(--text);
  scrollbar-width: none;
  white-space: nowrap;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 700;
  transition: background 140ms var(--ease), color 140ms var(--ease);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--ink);
  color: var(--page);
}

/* Compact header on scroll */
.site-header.is-compact .masthead {
  min-height: 58px;
}

.site-header.is-compact .masthead span {
  font-size: clamp(1.5rem, 3.4vw, 2.15rem);
}

.site-header.is-compact .brand-mark {
  width: 32px;
  height: 32px;
}

/* ---------------------------------------------------------------------------
   Layout
--------------------------------------------------------------------------- */
main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.front-page {
  padding: 18px 0 22px;
  border-bottom: 3px double var(--rule-strong);
}

.front-label,
.section-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.front-label span:first-child {
  color: var(--accent);
  font-weight: 800;
}

.front-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(280px, 0.84fr) minmax(250px, 0.58fr);
  gap: 0;
  padding-top: 18px;
}

.lead-package,
.lead-visual,
.briefing-rail {
  min-width: 0;
  margin: 0;
  padding: 0 24px;
}

.lead-package {
  padding-left: 0;
}

.lead-visual,
.briefing-rail {
  border-left: 1px solid var(--rule);
}

/* ---------------------------------------------------------------------------
   Typography
--------------------------------------------------------------------------- */
.kicker,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 9px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.kicker::before,
.section-eyebrow::before {
  content: "";
  width: 16px;
  height: 3px;
  background: var(--accent);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  letter-spacing: -0.012em;
}

h1 {
  font-size: clamp(2.5rem, 4.7vw, 4.3rem);
  font-weight: 900;
  line-height: 0.98;
  text-wrap: balance;
}

.standfirst {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.8vw, 1.4rem);
  line-height: 1.42;
}

/* Article meta — bylines & timestamps */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
}

.article-meta .byline {
  color: var(--ink);
  font-weight: 700;
}

.article-meta time {
  font-variant-numeric: tabular-nums;
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

.article-meta--lead {
  margin-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  font-size: 0.82rem;
}

.story-links {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 16px 0 0 18px;
  border-top: 1px solid var(--rule);
  color: var(--text);
}

.story-links a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.story-links a:hover {
  color: var(--accent);
}

/* Lead visual */
.lead-visual {
  display: flex;
  flex-direction: column;
}

.lead-visual img {
  width: 100%;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--soft);
  box-shadow: var(--shadow-sm);
}

.lead-visual figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Briefing rail */
.briefing-rail h2,
.most-read h2 {
  margin-bottom: 12px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.briefing-rail article {
  padding: 13px 0;
  border-top: 1px solid var(--rule);
}

.briefing-rail article:first-of-type {
  border-top: 2px solid var(--rule-strong);
}

.briefing-rail h3,
.story-card h3,
.shelf-grid h3 {
  font-size: clamp(1.16rem, 2vw, 1.46rem);
  line-height: 1.14;
  transition: color 140ms var(--ease);
}

.briefing-rail h3 {
  font-size: clamp(1.04rem, 1.45vw, 1.2rem);
}

.briefing-rail article:hover h3 {
  color: var(--accent);
}

.briefing-rail p:not(.kicker),
.story-card p:not(.kicker),
.shelf-grid p:not(.kicker),
.method-grid p {
  margin: 9px 0 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
}

.rail-time {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------------------
   Section strip + headings
--------------------------------------------------------------------------- */
.section-strip {
  justify-content: center;
  gap: clamp(16px, 3vw, 40px);
  margin-bottom: 0;
  border-bottom: 1px solid var(--rule-strong);
  color: var(--ink);
  font-weight: 700;
}

.section-strip span {
  position: relative;
}

.section-strip span:not(:last-child)::after {
  content: "";
  position: absolute;
  right: clamp(-20px, -1.5vw, -8px);
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}

.latest-section,
.desk-section,
.section-shelves,
.sources-section {
  padding: clamp(36px, 6vw, 76px) 0;
  border-bottom: 1px solid var(--rule-strong);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(150px, 0.25fr) minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
  margin-bottom: 22px;
  border-top: 2px solid var(--rule-strong);
  padding-top: 12px;
}

.section-heading h2 {
  max-width: 840px;
  font-size: clamp(1.8rem, 3.2vw, 3.4rem);
  line-height: 1.02;
}

/* ---------------------------------------------------------------------------
   Filter bar
--------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.filter-button {
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 800;
  transition: background 150ms var(--ease), color 150ms var(--ease),
    border-color 150ms var(--ease), transform 120ms var(--ease);
}

.filter-button:hover {
  background: var(--soft);
}

.filter-button:active {
  transform: scale(0.96);
}

.filter-button.active {
  color: var(--page);
  border-color: var(--ink);
  background: var(--ink);
}

/* ---------------------------------------------------------------------------
   News columns + story cards
--------------------------------------------------------------------------- */
.news-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.78fr) minmax(220px, 0.78fr) minmax(210px, 0.58fr);
  gap: 0;
}

.news-column,
.most-read {
  min-width: 0;
  padding: 0 18px;
  border-left: 1px solid var(--rule);
}

.news-column--wide {
  padding-left: 0;
  border-left: 0;
}

.story-card,
.shelf-grid article {
  min-width: 0;
  padding: 0 0 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  transition: transform 240ms var(--ease);
}

.story-card:last-child,
.news-column .story-card:last-child {
  margin-bottom: 0;
}

.story-card[hidden],
.shelf-grid article[hidden],
.briefing-rail article[hidden],
.lead-package[hidden] {
  display: none;
}

.story-card:hover {
  transform: translateY(-3px);
}

.story-card:hover h3 {
  color: var(--accent);
}

.story-card--major h3 {
  font-size: clamp(1.6rem, 3vw, 2.55rem);
  line-height: 1.04;
}

.story-tag {
  display: inline-block;
  margin-top: 14px;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Post images */
.post-image {
  margin: 13px 0;
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--soft);
}

.post-image img {
  width: 100%;
  max-height: 240px;
  aspect-ratio: 12 / 7;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}

.story-card:hover .post-image img,
.shelf-grid article:hover .post-image img {
  transform: scale(1.045);
}

.shelf-grid .post-image img {
  max-height: 180px;
}

/* Detail list */
.detail-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 14px 0 0 16px;
  border-top: 1px solid var(--rule);
  color: var(--text);
  font-size: 0.91rem;
  line-height: 1.5;
}

.detail-list li {
  padding-left: 4px;
}

.detail-list li::marker {
  color: var(--accent);
}

.detail-list strong {
  color: var(--ink);
}

/* Most read */
.most-read {
  padding-right: 0;
}

.most-read ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: most-read;
}

.most-read li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 0;
  border-top: 1px solid var(--rule);
  counter-increment: most-read;
}

.most-read li::before {
  content: counter(most-read);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
}

.most-read a {
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  transition: color 140ms var(--ease);
}

.most-read a:hover,
.most-read a:focus-visible {
  color: var(--accent);
}

/* ---------------------------------------------------------------------------
   Method grid
--------------------------------------------------------------------------- */
.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.method-grid article {
  min-width: 0;
  min-height: 214px;
  padding: 22px 20px;
  border-left: 1px solid var(--rule);
  transition: background 160ms var(--ease);
}

.method-grid article:first-child {
  border-left: 0;
}

.method-grid article:hover {
  background: var(--soft);
}

.method-grid span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
}

.method-grid h3 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

/* ---------------------------------------------------------------------------
   Shelves + sources
--------------------------------------------------------------------------- */
.shelf-grid,
.source-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}

.shelf-grid article,
.source-list a {
  min-width: 0;
  min-height: 176px;
  padding: 20px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.shelf-grid article {
  margin-bottom: 0;
}

.shelf-grid article:hover {
  background: var(--soft);
  transform: none;
}

.shelf-grid article:hover h3 {
  color: var(--accent);
}

.shelf-grid article:nth-child(3n),
.source-list a:nth-child(3n) {
  border-right: 0;
}

.source-list a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: background 150ms var(--ease);
}

.source-list a:hover,
.source-list a:focus-visible {
  background: var(--soft);
}

.source-list span:first-child {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.source-list strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 700;
  line-height: 1.22;
}

.source-go {
  margin-top: auto;
  padding-top: 16px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  transition: color 140ms var(--ease), transform 140ms var(--ease);
}

.source-list a:hover .source-go {
  color: var(--accent);
}

/* ---------------------------------------------------------------------------
   Newsletter
--------------------------------------------------------------------------- */
.newsletter-section {
  padding: clamp(36px, 6vw, 70px) 0;
}

.newsletter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}

.newsletter-copy h2 {
  margin-top: 4px;
  font-size: clamp(1.6rem, 2.8vw, 2.7rem);
  line-height: 1.04;
}

.social-note {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.5;
}

.social-note a,
.site-footer a {
  color: var(--accent);
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.newsletter-form {
  display: grid;
  gap: 8px;
}

.newsletter-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.newsletter-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--surface);
  transition: box-shadow 140ms var(--ease);
}

.newsletter-form input::placeholder {
  color: var(--muted);
}

.newsletter-form input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
  transition: background 150ms var(--ease), transform 120ms var(--ease);
}

.button.primary {
  color: var(--page);
  background: var(--ink);
  border-color: var(--ink);
}

.button.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.primary:active {
  transform: scale(0.97);
}

.form-status {
  min-height: 20px;
  margin: 0;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.88rem;
}

/* ---------------------------------------------------------------------------
   Footer
--------------------------------------------------------------------------- */
.site-footer {
  border-top: 3px double var(--rule-strong);
  background: var(--surface-2);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 900;
}

.footer-brand .brand-mark {
  width: 34px;
  height: 34px;
}

.footer-tagline {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------------------
   Back to top
--------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: clamp(16px, 3vw, 30px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease),
    visibility 240ms var(--ease), background 150ms var(--ease), color 150ms var(--ease);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--ink);
  color: var(--page);
}

.back-to-top:active {
  transform: scale(0.92);
}

/* ---------------------------------------------------------------------------
   Reveal animation
--------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}

/* ---------------------------------------------------------------------------
   Responsive
--------------------------------------------------------------------------- */
@media (max-width: 1040px) {
  .front-grid,
  .news-columns {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  }

  .briefing-rail,
  .most-read {
    grid-column: 1 / -1;
    margin-top: 20px;
    padding: 18px 0 0;
    border-left: 0;
    border-top: 2px solid var(--rule-strong);
  }

  .lead-visual {
    padding-right: 0;
  }

  .news-column:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-grid article:nth-child(odd) {
    border-left: 0;
  }

  .method-grid article:nth-child(3),
  .method-grid article:nth-child(4) {
    border-top: 1px solid var(--rule);
  }

  .newsletter-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .utility-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: min(100% - 24px, var(--max));
  }

  .menu-toggle {
    display: inline-flex;
  }

  .date-line {
    flex-direction: column;
    gap: 0;
    font-size: 0.66rem;
    line-height: 1.35;
  }

  .utility-actions a:nth-child(2),
  .utility-actions a:nth-child(3) {
    display: none;
  }

  .breaking-inner,
  .masthead,
  .site-nav,
  main,
  .footer-inner {
    width: min(100% - 24px, var(--max));
  }

  .masthead {
    min-height: 76px;
    gap: 8px;
  }

  .masthead span {
    font-size: clamp(1.7rem, 8.2vw, 3.4rem);
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 12px;
    left: 12px;
    display: none;
    width: auto;
    max-height: calc(100vh - 120px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid var(--rule-strong);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 13px 14px;
    border-radius: 6px;
  }

  .front-grid,
  .news-columns,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .front-page {
    padding-top: 12px;
  }

  .lead-package,
  .lead-visual,
  .briefing-rail,
  .news-column,
  .news-column--wide,
  .most-read {
    padding: 0;
    border-left: 0;
  }

  .lead-visual,
  .briefing-rail,
  .news-column,
  .most-read {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--rule);
  }

  h1 {
    font-size: clamp(2.3rem, 11vw, 3.7rem);
  }

  .standfirst {
    font-size: 1.1rem;
  }

  .section-strip {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }

  .section-strip::-webkit-scrollbar {
    display: none;
  }

  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .method-grid,
  .shelf-grid,
  .source-list {
    grid-template-columns: 1fr;
  }

  .method-grid article,
  .method-grid article:nth-child(odd),
  .shelf-grid article,
  .source-list a,
  .shelf-grid article:nth-child(3n),
  .source-list a:nth-child(3n) {
    border-left: 0;
    border-right: 0;
  }

  .method-grid article {
    min-height: auto;
  }

  .newsletter-field {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 430px) {
  .utility-actions a {
    padding-inline: 9px;
  }

  .breaking-label {
    margin-right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .breaking-track {
    animation: none;
  }
}
