/*
Theme Name: Threadmap News
Theme URI: https://threadmapnews.com/
Author: Threadmap News
Description: Evidence-led editorial theme for connected news stories. Requires the Threadmap Importer plugin for structured articles.
Version: 0.3.4
Requires at least: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: threadmap-news
*/

@font-face {
  font-display: swap;
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  src: url('assets/fonts/montserrat-latin-variable.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Montserrat';
  font-style: italic;
  font-weight: 100 900;
  src: url('assets/fonts/montserrat-latin-variable-italic.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  --font-montserrat: 'Montserrat';
  --white-linen: #f9f2ea;
  --red-ribbon: #f41326;
  --thunder: #3b3639;
  --eerie-black: #181314;
  --pharlap: #a48885;
  --old-brick: #891f24;
  --cod-gray: #080808;
  --asphalt: #130a07;
  --bunker: #090b10;
  --paper: var(--white-linen);
  --paper-deep: #efe3da;
  --card: #fff9f4;
  --ink: var(--eerie-black);
  --muted: var(--thunder);
  --faint: #d8c9c4;
  --accent: var(--old-brick);
  --accent-hot: var(--red-ribbon);
  --accent-readable: var(--old-brick);
  --accent-soft: #f6dfdc;
  --context: #765a5a;
  --panel: var(--bunker);
  --panel-text: var(--white-linen);
  --panel-muted: #c9b8b3;
  --latest-panel: #fffaf6;
  --latest-text: var(--eerie-black);
  --latest-muted: #5d5255;
  --latest-rule: rgba(24, 19, 20, .16);
  --latest-grid: rgba(137, 31, 36, .055);
  /* Legacy aliases keep the article renderer's tone hooks stable. */
  --blue: var(--old-brick);
  --blue-pale: #f5deda;
  --amber: #7c4c4b;
  --amber-pale: #eee0dc;
  --violet: var(--red-ribbon);
  --violet-pale: #f7d9d8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: var(--cod-gray);
    --paper-deep: var(--asphalt);
    --card: var(--eerie-black);
    --ink: var(--white-linen);
    --muted: #c9b8b3;
    --faint: var(--thunder);
    --accent: var(--red-ribbon);
    --accent-readable: #f04a57;
    --accent-soft: #321317;
    --context: var(--pharlap);
    --panel: var(--bunker);
    --latest-panel: var(--bunker);
    --latest-text: var(--white-linen);
    --latest-muted: #c9b8b3;
    --latest-rule: rgba(255, 255, 255, .14);
    --latest-grid: rgba(244, 19, 38, .055);
    --blue: var(--red-ribbon);
    --blue-pale: #321317;
    --amber: #dba4a0;
    --amber-pale: #271719;
    --violet: var(--red-ribbon);
    --violet-pale: #381318;
  }
}

:root[data-theme='light'] {
  color-scheme: light;
  --paper: var(--white-linen);
  --paper-deep: #efe3da;
  --card: #fff9f4;
  --ink: var(--eerie-black);
  --muted: var(--thunder);
  --faint: #d8c9c4;
  --accent: var(--old-brick);
  --accent-readable: var(--old-brick);
  --accent-soft: #f6dfdc;
  --context: #765a5a;
  --panel: var(--bunker);
  --latest-panel: #fffaf6;
  --latest-text: var(--eerie-black);
  --latest-muted: #5d5255;
  --latest-rule: rgba(24, 19, 20, .16);
  --latest-grid: rgba(137, 31, 36, .055);
  --blue: var(--old-brick);
  --blue-pale: #f5deda;
  --amber: #7c4c4b;
  --amber-pale: #eee0dc;
  --violet: var(--red-ribbon);
  --violet-pale: #f7d9d8;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --paper: var(--cod-gray);
  --paper-deep: var(--asphalt);
  --card: var(--eerie-black);
  --ink: var(--white-linen);
  --muted: #c9b8b3;
  --faint: var(--thunder);
  --accent: var(--red-ribbon);
  --accent-readable: #f04a57;
  --accent-soft: #321317;
  --context: var(--pharlap);
  --panel: var(--bunker);
  --latest-panel: var(--bunker);
  --latest-text: var(--white-linen);
  --latest-muted: #c9b8b3;
  --latest-rule: rgba(255, 255, 255, .14);
  --latest-grid: rgba(244, 19, 38, .055);
  --blue: var(--red-ribbon);
  --blue-pale: #321317;
  --amber: #dba4a0;
  --amber-pale: #271719;
  --violet: var(--red-ribbon);
  --violet-pale: #381318;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 98px; }
body { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; background: var(--paper); color: var(--ink); font-family: var(--font-montserrat), Arial, sans-serif; margin: 0; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
a:focus-visible,
button:focus-visible { outline: 3px solid var(--accent-hot); outline-offset: 4px; }
.site-shell { min-height: 100vh; }

.masthead {
  align-items: center;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--faint);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 72px;
  padding: 0 4.5vw;
  position: sticky;
  top: 0;
  z-index: 10;
}
.masthead::before { background: var(--accent-hot); content: ''; height: 3px; inset: 0 0 auto; position: absolute; }
.masthead-reading::before { display: none; }
.reading-progress { --reading-progress: 0; background: color-mix(in srgb, var(--accent-hot) 22%, transparent); height: 3px; inset: 0 0 auto; overflow: hidden; position: absolute; }
.reading-progress > span { background: var(--accent-hot); inset: 0; position: absolute; transform: scaleX(var(--reading-progress)); transform-origin: left center; will-change: transform; }

.brand { align-items: center; display: flex; font-size: 13px; font-weight: 750; gap: 12px; letter-spacing: 0.08em; }
.brand b { color: var(--accent); font-weight: 800; }
.brand-mark { height: 25px; position: relative; width: 27px; }
.brand-mark i { background: var(--ink); border-radius: 50%; height: 6px; position: absolute; width: 6px; }
.brand-mark i:nth-child(1) { left: 1px; top: 12px; }
.brand-mark i:nth-child(2) { right: 1px; top: 2px; }
.brand-mark i:nth-child(3) { bottom: 1px; right: 3px; }
.brand-mark::before,
.brand-mark::after { background: var(--ink); content: ''; height: 1px; left: 5px; position: absolute; transform-origin: left; width: 20px; }
.brand-mark::before { top: 14px; transform: rotate(-29deg); }
.brand-mark::after { top: 15px; transform: rotate(23deg); }

.primary-nav { display: flex; font-size: 12px; font-weight: 550; position: relative; }
.primary-nav-list { align-items: stretch; display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }
.primary-nav-list > li { align-items: center; display: flex; margin: 0; padding: 0; position: relative; }
.primary-nav-list > li > a { color: var(--muted); padding: 28px 0 25px; position: relative; }
.primary-nav-list > li > a:hover,
.primary-nav-list > li > a.active,
.primary-nav-list > .current-menu-item > a,
.primary-nav-list > .current-menu-ancestor > a,
.primary-nav-list > .current_page_item > a { color: var(--ink); }
.primary-nav-list > li > a.active::after,
.primary-nav-list > .current-menu-item > a::after,
.primary-nav-list > .current-menu-ancestor > a::after,
.primary-nav-list > .current_page_item > a::after { background: var(--accent-hot); bottom: -1px; content: ''; height: 3px; left: 0; position: absolute; width: 100%; }

.submenu-toggle { align-items: center; background: transparent; border: 0; color: var(--muted); cursor: pointer; display: inline-flex; height: 40px; justify-content: center; margin-left: 3px; padding: 0; width: 40px; }
.submenu-toggle:hover,
.menu-item-has-children.is-submenu-open > .submenu-toggle { color: var(--ink); }
.submenu-toggle span { border: solid currentColor; border-width: 0 1.5px 1.5px 0; height: 7px; transform: rotate(45deg) translate(-1px, 1px); transition: transform 150ms ease; width: 7px; }
.menu-item-has-children.is-submenu-open > .submenu-toggle span { transform: rotate(-135deg) translate(-1px, 1px); }

.primary-nav .sub-menu { background: var(--card); border: 1px solid var(--faint); box-shadow: 0 18px 42px rgba(8, 8, 8, .2); display: grid; gap: 2px; left: -18px; list-style: none; margin: 0; min-width: 270px; opacity: 0; padding: 9px; pointer-events: none; position: absolute; top: calc(100% - 7px); transform: translateY(-5px); transition: opacity 140ms ease, transform 140ms ease, visibility 140ms; visibility: hidden; z-index: 30; }
.primary-nav .sub-menu::before { background: var(--accent-hot); content: ''; inset: -1px auto -1px -1px; position: absolute; width: 3px; }
.primary-nav .sub-menu li { margin: 0; min-width: 0; padding: 0; }
.primary-nav .sub-menu a { color: var(--muted); display: block; font-size: 11px; font-weight: 620; line-height: 1.4; overflow-wrap: anywhere; padding: 12px 14px; }
.primary-nav .sub-menu .menu-item-object-category > a { align-items: baseline; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) auto; }
.submenu-label { min-width: 0; }
.submenu-count { color: var(--accent-readable); font-size: 10px; font-variant-numeric: tabular-nums; font-weight: 780; letter-spacing: .08em; line-height: 1; white-space: nowrap; }
.primary-nav .sub-menu a:hover,
.primary-nav .sub-menu a:focus-visible { background: var(--paper-deep); color: var(--ink); }
.primary-nav .sub-menu .current-menu-item > a,
.primary-nav .sub-menu .current_page_item > a { background: var(--accent-soft); border-left: 2px solid var(--accent-hot); color: var(--ink); padding-left: 12px; }
.primary-nav-list > .menu-item-has-children.is-submenu-open > .sub-menu,
.primary-nav:not(.has-submenu-js) .primary-nav-list > .menu-item-has-children:focus-within > .sub-menu { opacity: 1; pointer-events: auto; transform: translateY(0); visibility: visible; }

@media (hover: hover) and (pointer: fine) {
  .primary-nav-list > .menu-item-has-children:not(.is-submenu-suppressed):hover > .sub-menu { opacity: 1; pointer-events: auto; transform: translateY(0); visibility: visible; }
}
.theme-button { align-items: center; background: transparent; border: 1px solid var(--faint); cursor: pointer; display: flex; font-size: 11px; font-weight: 650; gap: 8px; height: 44px; justify-self: end; padding: 0 14px; text-transform: uppercase; }

.article-hero { margin: 0 auto; max-width: 1440px; padding: clamp(72px, 8vw, 120px) clamp(24px, 4.5vw, 64px) 0; }
.article-kicker { align-items: center; color: var(--accent); display: flex; font-size: 11px; font-weight: 700; justify-content: space-between; letter-spacing: 0.08em; }
.article-kicker b { border: 1px solid var(--faint); color: var(--muted); font-weight: 650; padding: 8px 10px; }
.article-hero h1 { font-size: clamp(58px, 7.2vw, 104px); font-weight: 790; letter-spacing: -0.055em; line-height: 0.96; margin: 38px 0 34px; max-width: 1160px; text-wrap: balance; }
.article-dek { color: var(--muted); font-size: clamp(20px, 1.7vw, 25px); font-weight: 450; line-height: 1.5; margin: 0; max-width: 880px; }

.article-credit { border-bottom: 1px solid var(--faint); border-top: 1px solid var(--faint); display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 64px; }
.article-credit > div,
.article-credit > time { display: flex; flex-direction: column; gap: 4px; min-height: 92px; padding: 20px 24px; }
.article-credit > * + * { border-left: 1px solid var(--faint); }
.article-credit > *:first-child { padding-left: 0; }
.article-credit span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; }
.article-credit strong { font-size: 13px; letter-spacing: 0.01em; }
.article-credit small { color: var(--muted); font-size: 11px; }
.article-credit > .credit-person { align-items: center; display: grid; gap: 13px; grid-template-columns: 52px minmax(0, 1fr); }
.credit-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.credit-copy a { width: fit-content; }
.credit-copy a:hover strong { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.profile-portrait,
.profile-initials { border-radius: 50%; display: block; height: 52px; object-fit: cover; width: 52px; }
.profile-initials { align-items: center; background: var(--panel); color: var(--panel-text); display: flex; font-size: 14px; font-weight: 750; justify-content: center; letter-spacing: .04em; }
.article-credit .profile-initials { color: var(--panel-text); display: flex; font-size: 14px; }
.research-desk { border-bottom: 1px solid var(--faint); margin-top: 0; }
.research-desk > summary { align-items: center; cursor: pointer; display: flex; justify-content: space-between; min-height: 62px; padding: 8px 0; }
.research-desk > summary::-webkit-details-marker { display: none; }
.research-desk > summary span { color: var(--muted); display: flex; flex-direction: column; font-size: 11px; gap: 4px; }
.research-desk > summary b { color: var(--accent); font-size: 10px; letter-spacing: .08em; }
.research-desk > summary i { align-items: center; border: 1px solid var(--faint); border-radius: 50%; display: flex; font-size: 18px; font-style: normal; height: 36px; justify-content: center; transition: transform 150ms ease; width: 36px; }
.research-desk[open] > summary i { transform: rotate(45deg); }
.research-desk-grid { display: grid; gap: 1px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 0 28px; }
.research-profile-card { align-items: start; background: var(--paper-deep); display: grid; gap: 16px; grid-template-columns: 72px minmax(0, 1fr); min-height: 160px; padding: 22px; }
.research-profile-card .profile-portrait,
.research-profile-card .profile-initials { height: 72px; width: 72px; }
.research-profile-card h3 { font-size: 16px; letter-spacing: -.02em; margin: 2px 0 5px; }
.research-profile-card span { color: var(--accent); display: block; font-size: 10px; font-weight: 700; letter-spacing: .04em; line-height: 1.4; }
.research-profile-card .profile-initials { align-items: center; color: var(--panel-text); display: flex; font-size: 14px; justify-content: center; }
.research-profile-card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 12px 0 0; }

.thread-overview { background: var(--panel); color: var(--panel-text); margin-top: 48px; overflow: hidden; padding: 46px max(5vw, calc((100vw - 1190px) / 2)); position: relative; }
.thread-overview::before { background-image: linear-gradient(rgba(244,19,38,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(244,19,38,.055) 1px, transparent 1px); background-size: 32px 32px; content: ''; inset: 0; pointer-events: none; position: absolute; }
.thread-overview > * { position: relative; }
.thread-overview > header { align-items: end; border-bottom: 1px solid rgba(255,255,255,.14); display: flex; justify-content: space-between; padding-bottom: 28px; }
.micro-label { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.09em; }
.thread-overview .micro-label { color: var(--panel-muted); }
.thread-overview h2 { font-size: clamp(28px, 2.8vw, 40px); font-weight: 700; letter-spacing: -0.035em; margin: 8px 0 0; }
.thread-overview > header p { align-items: flex-end; display: flex; flex-direction: column; font-size: 11px; font-weight: 650; gap: 6px; margin: 0; }
.thread-overview > header p b { color: var(--panel-text); font-weight: 650; }
.thread-overview > header p span { color: var(--red-ribbon); }

.thread-chain { align-items: center; display: flex; overflow-x: auto; padding: 42px 0 34px; scrollbar-color: var(--red-ribbon) transparent; }
.chain-step { align-items: center; display: flex; flex: 1; min-width: 0; }
.chain-step:last-child { flex: 0 1 190px; }
.chain-node { background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.18); min-height: 104px; padding: 18px; position: relative; transition: background 160ms ease, transform 160ms ease; width: 190px; }
.chain-node:hover,
.chain-node:focus-visible { background: rgba(255,255,255,.1); outline: 1px solid var(--panel-text); transform: translateY(-2px); }
.chain-node::before { background: currentColor; border: 4px solid var(--panel); border-radius: 50%; content: ''; height: 13px; left: -7px; position: absolute; top: 17px; width: 13px; }
.chain-node span { color: var(--panel-muted); display: block; font-size: 10px; font-weight: 650; letter-spacing: 0.06em; margin-bottom: 20px; }
.chain-node strong { display: block; font-size: 17px; font-weight: 650; line-height: 1.2; }
.node-1 { color: var(--panel-text); }
.node-2 { color: var(--pharlap); }
.node-3 { color: var(--old-brick); }
.node-4 { color: var(--red-ribbon); }
.chain-node strong { color: var(--panel-text); }
.chain-link { border-top: 2px solid var(--panel-text); flex: 1; height: 2px; min-width: 18px; position: relative; }
.chain-link i { border: solid var(--panel-text); border-width: 0 2px 2px 0; height: 7px; position: absolute; right: 1px; top: -4px; transform: rotate(-45deg); width: 7px; }
.link-2 { border-color: var(--pharlap); border-top-style: dashed; }
.link-2 i { border-color: var(--pharlap); }
.link-3 { border-color: var(--red-ribbon); border-top-style: dotted; }
.link-3 i { border-color: var(--red-ribbon); }
.chain-warning { align-items: center; background: rgba(244,19,38,.09); border: 1px solid rgba(244,19,38,.42); display: flex; gap: 14px; margin-left: auto; padding: 16px 18px; width: min(100%, 590px); }
.chain-warning > span { align-items: center; border: 1px solid var(--red-ribbon); border-radius: 50%; color: var(--red-ribbon); display: flex; flex: 0 0 24px; font-size: 14px; font-weight: 750; height: 24px; justify-content: center; }
.chain-warning p { color: var(--panel-muted); font-size: 11px; line-height: 1.55; margin: 0; }
.chain-warning strong { color: var(--panel-text); display: block; font-weight: 600; }

.reading-layout { display: grid; gap: clamp(32px, 3.5vw, 56px); grid-template-columns: 160px minmax(0, 800px) minmax(220px, 280px); justify-content: center; margin: 0 auto; max-width: 1440px; padding: 96px clamp(24px, 4vw, 64px) 140px; }
.rail-sticky { position: sticky; top: 110px; }
.thread-rail ol { list-style: none; margin: 22px 0 34px; padding: 0; }
.thread-rail li { border-left: 1px solid var(--faint); color: var(--muted); font-size: 11px; font-weight: 550; line-height: 1.4; min-height: 52px; padding: 0 0 19px 20px; position: relative; }
.thread-rail li:last-child { min-height: 0; }
.thread-rail a { display: inline-block; }
.thread-rail li i { background: var(--paper); border: 2px solid var(--faint); border-radius: 50%; height: 9px; left: -5px; position: absolute; top: 1px; width: 9px; }
.thread-rail .rail-active { color: var(--ink); font-weight: 600; }
.thread-rail .rail-active i { border-color: var(--accent-hot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-hot) 16%, transparent); }
.rail-key { border-top: 1px solid var(--faint); display: flex; flex-direction: column; gap: 12px; padding-top: 20px; }
.rail-key span { align-items: center; color: var(--muted); display: flex; font-size: 10px; font-weight: 600; gap: 9px; }
.rail-key i { display: inline-block; width: 28px; }
.solid-key { border-top: 2px solid var(--ink); }
.dash-key { border-top: 2px dashed var(--context); }
.dot-key { border-top: 2px dotted var(--accent-hot); }

.article-body { min-width: 0; width: 100%; }
.article-body > p,
.story-section > p { color: color-mix(in srgb, var(--ink) 90%, var(--muted)); font-size: clamp(17px, 1vw, 19px); font-weight: 430; line-height: 1.74; margin: 0 0 26px; max-inline-size: 72ch; }
.article-body .standfirst { color: var(--ink); font-size: clamp(22px, 1.7vw, 27px); font-weight: 520; letter-spacing: -0.015em; line-height: 1.55; }
.story-section { border-top: 1px solid var(--faint); margin-top: 78px; padding-top: 34px; position: relative; }
.section-index { color: var(--accent); font-size: 11px; font-weight: 750; left: -40px; letter-spacing: .06em; position: absolute; top: 44px; }
.story-section h2 { font-size: clamp(38px, 3.4vw, 54px); font-weight: 720; letter-spacing: -0.045em; line-height: 1.06; margin: 0 0 34px; text-wrap: balance; }
.article-body sup { font-size: 10px; margin-left: 2px; vertical-align: super; }
.article-body sup a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.story-section blockquote { border-left: 4px solid var(--accent-hot); color: var(--ink); font-size: 22px; font-weight: 580; line-height: 1.5; margin: 44px 0 12px; padding: 6px 0 6px 28px; }
.story-section blockquote span { color: var(--accent); display: block; font-size: 10px; font-weight: 750; letter-spacing: 0.08em; margin-bottom: 12px; }
.documented-chain,
.anxiety-list { list-style: none; margin: 28px 0 32px; padding: 0; }
.documented-chain li { border-top: 1px solid var(--faint); font-size: 15px; font-weight: 500; line-height: 1.55; padding: 17px 10px 17px 42px; position: relative; }
.documented-chain li:last-child { border-bottom: 1px solid var(--faint); }
.documented-chain li::before { border: 2px solid var(--ink); border-radius: 50%; color: var(--ink); content: '✓'; font-size: 9px; font-weight: 800; height: 18px; left: 8px; line-height: 14px; position: absolute; text-align: center; top: 19px; width: 18px; }

.connection-card { background: var(--card); border: 1px solid var(--faint); border-radius: 4px; border-top: 4px solid var(--ink); box-shadow: 0 18px 55px color-mix(in srgb, var(--cod-gray) 10%, transparent); margin: 60px 0 78px; overflow: hidden; }
.connection-card > header { align-items: center; border-bottom: 1px solid var(--faint); display: flex; font-size: 10px; font-weight: 700; justify-content: space-between; letter-spacing: 0.08em; min-height: 50px; padding: 15px 24px; }
.connection-card > header b { color: var(--ink); font-weight: 750; }
.connection-route { align-items: center; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr); padding: 32px 28px; }
.connection-route strong { font-size: clamp(19px, 1.5vw, 22px); font-weight: 680; letter-spacing: -.025em; line-height: 1.2; }
.connection-route strong:last-child { text-align: right; }
.connection-route i { border-top: 2px solid var(--ink); display: block; position: relative; }
.connection-route i::after { border: solid var(--ink); border-width: 0 2px 2px 0; content: ''; height: 7px; position: absolute; right: 0; top: -4px; transform: rotate(-45deg); width: 7px; }
.connection-explanation { border-top: 1px solid var(--faint); display: grid; grid-template-columns: 1fr 1fr; }
.connection-explanation > div { padding: 26px 28px; }
.connection-explanation > div + div { background: var(--blue-pale); border-left: 1px solid var(--faint); }
.connection-explanation span,
.connection-card > footer span { color: var(--muted); display: block; font-size: 10px; font-weight: 750; letter-spacing: 0.08em; margin-bottom: 10px; }
.connection-explanation p { font-size: 14px; line-height: 1.62; margin: 0; }
.connection-card > footer { border-top: 1px dashed var(--faint); padding: 20px 28px; }
.connection-card > footer p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }
.record-sources { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.record-sources > span { color: var(--muted); display: inline-block; font-size: 9px; font-weight: 750; letter-spacing: .08em; margin: 0 4px 0 0; }
.record-sources > a { align-items: center; border: 1px solid var(--faint); color: var(--accent); display: inline-flex; font-size: 10px; font-weight: 750; height: 25px; justify-content: center; min-width: 25px; padding: 0 6px; text-decoration: underline; text-underline-offset: 2px; }
.record-sources > a:hover { background: var(--accent-soft); }
.connection-test { border-top: 1px solid var(--faint); display: grid; grid-template-columns: 1fr 1fr; }
.connection-evidence { border-top: 1px solid var(--faint); display: grid; grid-template-columns: 1fr 1fr; }
.connection-evidence > div { padding: 22px 28px; }
.connection-evidence > div + div { background: var(--violet-pale); border-left: 1px solid var(--faint); }
.connection-evidence span { color: var(--accent); display: block; font-size: 10px; font-weight: 750; letter-spacing: .08em; margin-bottom: 9px; }
.connection-evidence p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }
.connection-test > div { padding: 22px 28px; }
.connection-test > div + div { border-left: 1px solid var(--faint); }
.connection-test span { color: var(--muted); display: block; font-size: 10px; font-weight: 750; letter-spacing: 0.08em; margin-bottom: 9px; }
.connection-test > div:first-child span { color: var(--accent); }
.connection-test > div:last-child span { color: var(--accent); }
.connection-test p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }
.connection-amber { border-top-color: var(--context); border-top-style: dashed; }
.connection-amber > header b { color: var(--context); }
.connection-amber .connection-route i { border-color: var(--context); border-top-style: dashed; }
.connection-amber .connection-route i::after { border-color: var(--context); }
.connection-amber .connection-explanation > div + div { background: var(--amber-pale); }
.connection-violet { border-top-color: var(--accent-hot); border-top-style: dotted; }
.connection-violet > header b { color: var(--accent); }
.connection-violet .connection-route i { border-color: var(--accent-hot); border-top-style: dotted; }
.connection-violet .connection-route i::after { border-color: var(--accent-hot); }
.connection-violet .connection-explanation > div + div { background: var(--violet-pale); }

.missing-bridge { background: var(--panel); border-radius: 4px; color: var(--panel-text); margin: 60px 0 78px; overflow: hidden; padding: 0 28px 32px; position: relative; }
.missing-bridge::before { background-image: linear-gradient(rgba(244,19,38,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(244,19,38,.055) 1px, transparent 1px); background-size: 24px 24px; content: ''; inset: 0; pointer-events: none; position: absolute; }
.missing-bridge > * { position: relative; }
.missing-bridge > header { align-items: center; border-bottom: 1px solid rgba(255,255,255,.14); display: flex; font-size: 10px; font-weight: 700; justify-content: space-between; letter-spacing: .08em; margin: 0 -28px; padding: 16px 28px; }
.missing-bridge > header b { color: var(--red-ribbon); font-weight: 750; }
.bridge-track { display: grid; grid-template-columns: repeat(var(--bridge-count, 9), minmax(82px, 1fr)); overflow-x: auto; padding: 40px 0 30px; scrollbar-color: var(--red-ribbon) transparent; }
.bridge-track > div { min-width: 0; position: relative; text-align: center; }
.bridge-track > div::after { border-top: 2px dotted rgba(255,255,255,.34); content: ''; left: 50%; position: absolute; top: 6px; width: 100%; }
.bridge-track > div:last-child::after { display: none; }
.bridge-track i { background: var(--panel); border: 2px solid var(--red-ribbon); border-radius: 50%; display: block; height: 14px; margin: 0 auto 14px; position: relative; width: 14px; z-index: 1; }
.bridge-track i.edge-known { background: var(--red-ribbon); box-shadow: 0 0 0 4px rgba(244,19,38,.16); }
.bridge-track span { color: var(--panel-muted); display: block; font-size: 10px; font-weight: 550; line-height: 1.35; padding: 0 4px; }
.missing-bridge > p { color: var(--panel-muted); font-size: 14px; font-weight: 500; line-height: 1.6; margin: 0 auto; max-width: 590px; text-align: center; }
.missing-bridge > .record-sources { justify-content: center; }
.missing-bridge > .record-sources > span { color: var(--panel-muted); }
.missing-bridge > .record-sources > a { border-color: rgba(255,255,255,.24); color: var(--red-ribbon); }

.anxiety-list { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.anxiety-list li { background: var(--paper-deep); color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.55; min-height: 82px; padding: 20px 20px 20px 38px; position: relative; }
.anxiety-list li::before { background: var(--accent-hot); border-radius: 50%; content: ''; height: 7px; left: 18px; position: absolute; top: 27px; width: 7px; }
.anxiety-list li:last-child { grid-column: 1 / -1; min-height: auto; }
.watch-list { counter-reset: watch; list-style: none; margin: 28px 0 0; padding: 0; }
.watch-list li { align-items: baseline; border-top: 1px solid var(--faint); color: var(--muted); display: grid; font-size: 15px; font-weight: 500; gap: 20px; grid-template-columns: 28px 1fr; line-height: 1.55; padding: 18px 6px; }
.watch-list li:last-child { border-bottom: 1px solid var(--faint); }
.watch-list span { color: var(--accent); font-size: 10px; font-weight: 750; }

.verdict { background: var(--accent-soft); border-top: 5px solid var(--accent-hot); margin: 84px 0; padding: 42px; }
.verdict h2 { font-size: clamp(37px, 3.6vw, 52px); font-weight: 740; letter-spacing: -0.045em; line-height: 1.06; margin: 18px 0 30px; text-wrap: balance; }
.verdict p { color: var(--muted); font-size: 17px; font-weight: 480; line-height: 1.68; margin: 0 0 24px; }
.verdict > strong { font-size: 12px; letter-spacing: .02em; }

.sources { border-top: 1px solid var(--faint); padding-top: 28px; position: relative; }
.sources > h2 { font-size: 44px; font-weight: 720; letter-spacing: -.045em; margin: 0 0 30px; }
.sources > ol { list-style: none; margin: 0; padding: 0; }
.sources > ol > li { border-top: 1px solid var(--faint); }
.sources > ol > li:last-child { border-bottom: 1px solid var(--faint); }
.sources a { align-items: center; display: grid; gap: 16px; grid-template-columns: 32px 1fr auto; min-height: 74px; padding: 18px 4px; }
.sources a:hover strong { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sources a > span { color: var(--accent); font-size: 10px; font-weight: 750; }
.sources a > div { display: flex; flex-direction: column; gap: 5px; }
.sources a strong { font-size: 14px; font-weight: 600; line-height: 1.4; transition: color 150ms ease; }
.sources a small { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.sources a > b { color: var(--accent); font-size: 14px; }
.source-boundary { background: var(--paper-deep); border-left: 4px solid var(--accent); margin-top: 26px; padding: 20px 22px; }
.source-boundary span { color: var(--accent); display: block; font-size: 10px; font-weight: 750; letter-spacing: .08em; margin-bottom: 8px; }
.source-boundary p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }
.editorial-note { border-top: 1px solid var(--faint); margin-top: 58px; padding-top: 25px; }
.editorial-note p { color: var(--muted); font-size: 11px; line-height: 1.65; margin: 12px 0 0; }

.evidence-label { color: var(--accent); display: block; font-size: 10px; font-weight: 750; letter-spacing: .08em; margin-bottom: 13px; }
.evidence-interpreted .evidence-label { color: var(--context); }
.evidence-hypothesis .evidence-label,
.evidence-missing_evidence .evidence-label { color: var(--accent-hot); }
.article-list { color: var(--muted); font-size: 16px; line-height: 1.65; margin: 28px 0 32px; padding-left: 25px; }
.article-list li { margin: 9px 0; padding-left: 5px; }
.article-callout { border-left: 4px solid var(--accent-hot); color: var(--ink) !important; font-weight: 700 !important; padding: 18px 0 18px 25px; }
.watch-list li small { color: var(--muted); display: block; font-size: 10px; margin-top: 5px; }
.watch-list .record-sources { margin-top: 10px; }
.threadmap-preview-banner { background: var(--accent-hot); color: var(--cod-gray); display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .08em; margin-bottom: 28px; padding: 9px 12px; }
.threadmap-invalid { margin: 90px auto; max-width: 760px; padding: 0 24px; }
.threadmap-invalid h1 { font-size: clamp(38px, 6vw, 72px); letter-spacing: -.05em; }

.article-aside { align-self: start; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 110px; }
.aside-card { border-top: 3px solid var(--accent-hot); padding: 22px 0; }
.aside-card p { color: var(--muted); font-size: 14px; font-weight: 500; line-height: 1.6; margin: 15px 0; }
.aside-card ul { border-top: 1px solid var(--faint); list-style: none; margin: 17px 0 0; padding: 10px 0 0; }
.aside-card li { color: var(--muted); font-size: 11px; font-weight: 550; padding: 6px 0 6px 15px; position: relative; }
.aside-card li::before { background: var(--accent-hot); border-radius: 50%; content: ''; height: 5px; left: 0; position: absolute; top: 11px; width: 5px; }
.aside-card.quiet { border-top-color: var(--faint); }

.site-footer { align-items: center; border-top: 1px solid var(--faint); display: grid; font-size: 11px; font-weight: 550; grid-template-columns: 1fr auto 1fr; margin: 0 4.5vw; min-height: 112px; }
.site-footer > p { color: var(--muted); margin: 0; }
.site-footer > a:last-child { justify-self: end; text-transform: uppercase; }

.posts-index,
.generic-content { margin: 0 auto; max-width: 1180px; padding: clamp(70px, 9vw, 130px) clamp(24px, 5vw, 64px) 120px; }
.posts-index > header,
.generic-content > header { border-bottom: 1px solid var(--faint); margin-bottom: 48px; padding-bottom: 28px; }
.posts-index h1,
.generic-content h1 { font-size: clamp(48px, 7vw, 92px); letter-spacing: -.055em; line-height: .96; margin: 12px 0; }
.post-grid { display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-card { background: var(--card); border: 1px solid var(--faint); border-top: 4px solid var(--accent-hot); display: flex; flex-direction: column; min-height: 280px; padding: 28px; }
.post-card .micro-label { color: var(--accent); }
.post-card h2 { font-size: clamp(28px, 3vw, 42px); letter-spacing: -.04em; line-height: 1.05; margin: 26px 0 18px; }
.post-card p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.post-card > a:last-child { color: var(--accent); font-size: 12px; font-weight: 750; margin-top: auto; text-decoration: underline; text-underline-offset: 4px; }
.generic-content .entry-content { font-size: 18px; line-height: 1.75; max-width: 760px; }
.generic-content .entry-content a { color: var(--accent); text-decoration: underline; }
.pagination { display: flex; gap: 20px; justify-content: space-between; margin-top: 48px; }
.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute !important; width: 1px; word-wrap: normal !important; }
body.admin-bar .masthead { top: 32px; }

.latest-page { margin: 0 auto; max-width: 1600px; padding: clamp(18px, 2.2vw, 32px) clamp(16px, 3vw, 48px) 120px; }
.latest-feature { scroll-margin-top: 98px; }
.latest-thread { background: var(--latest-panel); border: 1px solid color-mix(in srgb, var(--latest-text) 14%, transparent); color: var(--latest-text); margin: 0; overflow: hidden; position: relative; }
.latest-thread::before { background-image: linear-gradient(var(--latest-grid) 1px, transparent 1px), linear-gradient(90deg, var(--latest-grid) 1px, transparent 1px); background-size: 32px 32px; content: ''; inset: 0; pointer-events: none; position: absolute; }
.latest-thread::after { background: var(--accent-hot); content: ''; inset: 0 auto 0 0; position: absolute; width: 5px; }
.latest-thread-inner { min-height: clamp(420px, 36vw, 520px); padding: clamp(32px, 4vw, 56px); position: relative; }
.latest-thread-meta { align-items: center; border-bottom: 1px solid var(--latest-rule); display: flex; justify-content: space-between; padding-bottom: 18px; }
.latest-thread-meta .micro-label { color: var(--accent); }
.latest-thread-meta time { color: var(--latest-muted); font-size: 10px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.latest-thread-kicker { color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .09em; line-height: 1.5; margin: clamp(30px, 3.5vw, 46px) 0 16px; overflow-wrap: anywhere; text-transform: uppercase; }
.latest-thread h1 { font-size: clamp(42px, 5vw, 76px); font-weight: 790; letter-spacing: -.05em; line-height: 1; margin: 0; max-width: 1080px; overflow-wrap: anywhere; text-wrap: balance; }
.latest-thread h1 a { text-decoration: none; }
.latest-thread h1 a:hover { color: var(--accent); }
.latest-thread-dek { color: var(--latest-muted); font-size: clamp(17px, 1.35vw, 21px); line-height: 1.5; margin: 24px 0 0; max-width: 68ch; }
.latest-thread-link { align-items: center; color: var(--latest-text); display: inline-flex; font-size: 12px; font-weight: 750; gap: 9px; margin-top: 30px; padding-bottom: 5px; text-decoration: underline; text-decoration-color: var(--red-ribbon); text-decoration-thickness: 2px; text-underline-offset: 6px; text-transform: uppercase; }
.latest-thread-link span { color: var(--red-ribbon); font-size: 18px; transition: transform 160ms ease; }
.latest-thread-link:hover span { transform: translateX(4px); }

.older-threads { margin-top: clamp(68px, 8vw, 112px); scroll-margin-top: 98px; }
.older-threads-paged { margin-top: 0; }
.older-threads-header { align-items: end; border-bottom: 1px solid var(--faint); display: flex; justify-content: space-between; margin-bottom: 32px; padding-bottom: 22px; }
.older-threads-header h1,
.older-threads-header h2 { font-size: clamp(34px, 4vw, 54px); font-weight: 720; letter-spacing: -.045em; line-height: 1; margin: 0; }
.older-thread-grid { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.thread-tile { background: var(--card); border: 1px solid var(--faint); border-top: 3px solid var(--accent-hot); display: flex; flex-direction: column; min-height: 300px; min-width: 0; padding: 24px; }
.thread-tile-meta { align-items: baseline; color: var(--muted); display: flex; flex-wrap: wrap; font-size: 9px; font-weight: 700; gap: 7px; letter-spacing: .055em; line-height: 1.5; text-transform: uppercase; }
.thread-tile-categories a { color: var(--accent); }
.thread-tile-categories a:hover { text-decoration: underline; text-underline-offset: 3px; }
.thread-tile h2,
.thread-tile h3 { font-size: clamp(21px, 1.7vw, 28px); font-weight: 720; letter-spacing: -.035em; line-height: 1.1; margin: 28px 0 16px; overflow-wrap: anywhere; text-wrap: balance; }
.thread-tile h2 a:hover,
.thread-tile h3 a:hover { color: var(--accent); }
.thread-tile > p { color: var(--muted); font-size: 13px; line-height: 1.62; margin: 0 0 26px; overflow-wrap: anywhere; }
.thread-tile-link { color: var(--accent); font-size: 10px; font-weight: 750; margin-top: auto; text-decoration: underline; text-underline-offset: 4px; text-transform: uppercase; }
.thread-tile-link span { display: inline-block; transition: transform 160ms ease; }
.thread-tile-link:hover span { transform: translateX(3px); }
.latest-page .pagination { border-top: 1px solid var(--faint); padding-top: 28px; }
.latest-empty { min-height: 58vh; padding: clamp(50px, 8vw, 110px) 0; }
.latest-empty h1 { font-size: clamp(44px, 7vw, 88px); letter-spacing: -.055em; line-height: 1; margin: 18px 0 28px; max-width: 900px; text-wrap: balance; }
.latest-empty p { color: var(--muted); font-size: 17px; line-height: 1.65; max-width: 620px; }

.thread-archive-page { margin: 0 auto; max-width: 1600px; padding: 0 clamp(20px, 4.5vw, 72px) 120px; }
.thread-archive-hero { align-items: end; border-bottom: 1px solid var(--faint); display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); padding: clamp(66px, 8vw, 118px) 0 clamp(38px, 5vw, 66px); }
.thread-archive-hero .micro-label { color: var(--accent); }
.thread-archive-hero h1 { font-size: clamp(58px, 8vw, 116px); font-weight: 790; letter-spacing: -.06em; line-height: .92; margin: 22px 0 30px; max-width: 980px; text-wrap: balance; }
.thread-archive-intro { color: var(--muted); font-size: clamp(17px, 1.45vw, 21px); line-height: 1.6; margin: 0; max-width: 720px; }
.thread-archive-intro > :first-child { margin-top: 0; }
.thread-archive-intro > :last-child { margin-bottom: 0; }
.thread-archive-summary { border-left: 3px solid var(--accent-hot); margin: 0; }
.thread-archive-summary > div { border-top: 1px solid var(--faint); padding: 16px 0 16px 22px; }
.thread-archive-summary > div:last-child { border-bottom: 1px solid var(--faint); }
.thread-archive-summary dt { color: var(--muted); font-size: 9px; font-weight: 720; letter-spacing: .08em; text-transform: uppercase; }
.thread-archive-summary dd { font-size: 19px; font-weight: 720; letter-spacing: -.025em; margin: 6px 0 0; }

.thread-archive-tools { align-items: end; border-bottom: 1px solid var(--faint); display: grid; gap: 12px; grid-template-columns: minmax(260px, 1fr) minmax(180px, 250px) minmax(160px, 210px) auto auto; padding: 24px 0; }
.thread-archive-tools > div { min-width: 0; }
.thread-archive-tools label { color: var(--muted); display: block; font-size: 9px; font-weight: 720; letter-spacing: .07em; margin: 0 0 7px; text-transform: uppercase; }
.thread-archive-tools input,
.thread-archive-tools select { appearance: none; background: var(--card); border: 1px solid var(--faint); border-radius: 0; color: var(--ink); font: inherit; font-size: 12px; height: 48px; padding: 0 14px; width: 100%; }
.thread-archive-tools select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 21px, calc(100% - 12px) 21px; background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; padding-right: 36px; }
.thread-archive-tools input::placeholder { color: var(--context); opacity: 1; }
.thread-archive-tools input:focus-visible,
.thread-archive-tools select:focus-visible { outline: 3px solid var(--accent-hot); outline-offset: 2px; }
.thread-archive-tools button { align-items: center; background: var(--accent-hot); border: 0; color: var(--cod-gray); cursor: pointer; display: inline-flex; font-size: 10px; font-weight: 780; gap: 12px; height: 48px; justify-content: center; letter-spacing: .05em; padding: 0 20px; text-transform: uppercase; }
.thread-archive-tools button span { font-size: 16px; }
.thread-archive-reset { align-items: center; color: var(--accent); display: inline-flex; font-size: 10px; font-weight: 730; height: 48px; justify-content: center; text-decoration: underline; text-underline-offset: 4px; text-transform: uppercase; }

.thread-archive-ledger { border-top: 1px solid var(--faint); margin-top: clamp(48px, 6vw, 82px); }
.thread-archive-year { border-bottom: 1px solid var(--faint); display: grid; grid-template-columns: minmax(110px, 170px) minmax(0, 1fr); }
.thread-archive-year > h2 { align-self: start; color: var(--accent); font-size: clamp(42px, 4.5vw, 70px); font-variant-numeric: tabular-nums; font-weight: 760; letter-spacing: -.055em; line-height: 1; margin: 0; padding: 30px 24px 0 0; position: sticky; top: 100px; }
.thread-archive-year > ol { border-left: 1px solid var(--faint); list-style: none; margin: 0; padding: 0; }
.thread-archive-year > ol > li + li { border-top: 1px solid var(--faint); }
.thread-archive-row { align-items: start; display: grid; gap: 24px; grid-template-columns: 64px minmax(0, 1fr) 92px 44px; min-height: 154px; padding: 28px 0 28px 30px; position: relative; }
.thread-archive-row::before { background: var(--accent-hot); content: ''; inset: 0 auto 0 -1px; opacity: 0; position: absolute; width: 3px; }
.thread-archive-row:hover::before,
.thread-archive-row:focus-within::before { opacity: 1; }
.thread-archive-date { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; gap: 4px; }
.thread-archive-date strong { font-size: 29px; font-weight: 690; letter-spacing: -.04em; line-height: 1; }
.thread-archive-date span { color: var(--muted); font-size: 9px; font-weight: 730; letter-spacing: .09em; text-transform: uppercase; }
.thread-archive-categories { color: var(--accent); font-size: 9px; font-weight: 730; letter-spacing: .07em; line-height: 1.5; text-transform: uppercase; }
.thread-archive-categories a:hover { text-decoration: underline; text-underline-offset: 3px; }
.thread-archive-story h3 { font-size: clamp(23px, 2.1vw, 32px); font-weight: 720; letter-spacing: -.04em; line-height: 1.08; margin: 10px 0 12px; max-width: 900px; overflow-wrap: anywhere; text-wrap: balance; }
.thread-archive-story h3 a:hover { color: var(--accent); }
.thread-archive-story p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0; max-width: 760px; }
.thread-archive-reference { align-items: flex-end; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; gap: 5px; padding-top: 2px; text-align: right; }
.thread-archive-reference span { color: var(--muted); font-size: 8px; font-weight: 720; letter-spacing: .08em; text-transform: uppercase; }
.thread-archive-reference strong { color: var(--accent-readable); font-size: 17px; font-weight: 760; letter-spacing: .06em; }
.thread-archive-open { align-items: center; border: 1px solid var(--faint); display: flex; font-size: 19px; height: 44px; justify-content: center; width: 44px; }
.thread-archive-open span { color: var(--accent-hot); transition: transform 150ms ease; }
.thread-archive-open:hover { background: var(--accent-hot); border-color: var(--accent-hot); }
.thread-archive-open:hover span { color: var(--cod-gray); transform: translateX(3px); }

.thread-archive-pagination { border-top: 1px solid var(--faint); margin-top: 42px; padding-top: 24px; }
.thread-archive-pagination ul.page-numbers { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.thread-archive-pagination a,
.thread-archive-pagination span { align-items: center; border: 1px solid var(--faint); display: inline-flex; font-size: 10px; font-weight: 720; min-height: 40px; padding: 0 13px; }
.thread-archive-pagination a:hover,
.thread-archive-pagination .current { background: var(--accent-hot); border-color: var(--accent-hot); color: var(--cod-gray); }
.thread-archive-empty { border-bottom: 1px solid var(--faint); min-height: 42vh; padding: clamp(58px, 8vw, 110px) 0; }
.thread-archive-empty h2 { font-size: clamp(36px, 5vw, 70px); letter-spacing: -.05em; line-height: 1; margin: 18px 0 28px; max-width: 920px; }
.thread-archive-empty a { color: var(--accent); font-size: 12px; font-weight: 730; text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 1180px) {
  .reading-layout { grid-template-columns: 145px minmax(0, 800px); max-width: 1080px; }
  .article-aside { display: none; }
  .chain-node { width: 155px; }
  .chain-step:last-child { flex-basis: 155px; }
}

@media (max-width: 1100px) {
  .older-thread-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thread-archive-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thread-archive-search { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
	  html { scroll-padding-top: 120px; }
	  .masthead { grid-template-columns: 1fr auto; grid-template-rows: 64px auto; min-height: 106px; padding: 0 20px; }
	  .masthead > .brand { grid-column: 1; grid-row: 1; }
	  .primary-nav { align-self: stretch; display: flex; font-size: 11px; grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; min-width: 0; overflow: visible; }
	  .primary-nav-list { flex-wrap: wrap; gap: 0 18px; min-width: 0; width: 100%; }
	  .primary-nav-list > li { min-height: 42px; }
	  .primary-nav-list > li > a { align-items: center; display: flex; flex: none; padding: 0 0 9px; }
	  .primary-nav-list > .menu-item-has-children { position: static; }
	  .submenu-toggle { height: 42px; margin: 0 0 8px; width: 42px; }
	  .primary-nav .sub-menu { left: 20px; max-height: min(60vh, 420px); min-width: 0; overflow-y: auto; overscroll-behavior: contain; right: 20px; top: 100%; width: auto; }
	  .theme-button { grid-column: 2; grid-row: 1; height: 44px; padding: 0; width: 44px; }
	  .theme-button span:last-child { display: none; }
	  .latest-feature,
	  .older-threads { scroll-margin-top: 120px; }
	.thread-archive-page { padding: 0 20px 90px; }
	.thread-archive-hero { gap: 32px; grid-template-columns: 1fr; padding: 52px 0 36px; }
	.thread-archive-hero h1 { font-size: clamp(50px, 14vw, 78px); margin: 18px 0 24px; }
	.thread-archive-summary { border-left: 0; border-top: 3px solid var(--accent-hot); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.thread-archive-summary > div { padding: 15px 14px 15px 0; }
	.thread-archive-summary > div + div { border-left: 1px solid var(--faint); padding-left: 14px; }
	.thread-archive-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.thread-archive-search { grid-column: 1 / -1; }
	.thread-archive-tools button { justify-self: start; }
	.thread-archive-reset { justify-self: start; }
	.thread-archive-ledger { margin-top: 52px; }
	.thread-archive-year { display: block; }
	.thread-archive-year > h2 { border-bottom: 1px solid var(--faint); padding: 22px 0 16px; position: static; }
	.thread-archive-year > ol { border-left: 0; }
	.thread-archive-row { gap: 12px 16px; grid-template-columns: 52px minmax(0, 1fr) 44px; min-height: 0; padding: 24px 0; }
	.thread-archive-date { grid-column: 1; grid-row: 1; }
	.thread-archive-story { grid-column: 2; grid-row: 1; }
	.thread-archive-reference { align-items: baseline; flex-direction: row; grid-column: 2; grid-row: 2; padding: 0; text-align: left; }
	.thread-archive-open { grid-column: 3; grid-row: 1 / span 2; }
  .article-hero { padding: 56px 22px 0; }
  .article-kicker b { display: none; }
  .article-hero h1 { font-size: clamp(49px, 15vw, 74px); margin-top: 28px; }
  .article-dek { font-size: 19px; }
  .article-credit { grid-template-columns: 1fr 1fr; margin-top: 42px; }
  .article-credit > * { border-bottom: 1px solid var(--faint); min-height: 84px !important; padding: 17px 12px !important; }
  .article-credit > * + * { border-left: 0; }
  .article-credit > *:nth-child(even) { border-left: 1px solid var(--faint); }
  .research-desk-grid { grid-template-columns: 1fr; }
  .thread-overview { margin-top: 32px; padding: 38px 22px; }
  .thread-overview > header { align-items: flex-start; display: block; }
  .thread-overview > header p { align-items: flex-start; margin-top: 18px; }
  .thread-chain { align-items: stretch; flex-direction: column; gap: 0; padding: 34px 0 24px; }
  .chain-step,
  .chain-step:last-child { align-items: stretch; display: block; flex: none; }
  .chain-node { min-height: 76px; padding: 15px 18px; width: 100%; }
  .chain-node span { margin-bottom: 11px; }
  .chain-link { border-left: 2px solid var(--panel-text); border-top: 0; height: 25px; margin-left: 25px; width: 2px; }
  .link-2 { border-left-color: var(--pharlap); border-left-style: dashed; }
  .link-3 { border-left: 2px dotted var(--red-ribbon); }
  .chain-link i { bottom: 1px; left: -4px; right: auto; top: auto; transform: rotate(45deg); }
  .reading-layout { display: block; padding: 58px 22px 90px; }
  .thread-rail { display: block; margin-bottom: 56px; overflow-x: auto; padding-bottom: 8px; scrollbar-color: var(--accent) transparent; }
  .rail-sticky { position: static; }
  .thread-rail > .rail-sticky > .micro-label { display: block; margin-bottom: 18px; }
  .thread-rail ol { display: flex; margin: 0 0 18px; min-width: max-content; }
  .thread-rail li { border-left: 0; border-top: 1px solid var(--faint); min-height: auto; min-width: 155px; padding: 17px 20px 0 0; }
  .thread-rail li i { left: 0; top: -5px; }
  .thread-rail a { padding-right: 12px; }
  .rail-key { flex-direction: row; min-width: max-content; padding-top: 16px; }
  .article-body .standfirst { font-size: 21px; }
  .article-body > p,
  .story-section > p { font-size: 17px; line-height: 1.74; }
  .section-index { display: block; left: auto; margin-bottom: 13px; position: static; }
  .story-section h2 { font-size: clamp(34px, 10vw, 44px); }
  .connection-card { margin-left: -8px; margin-right: -8px; }
  .connection-route { grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); padding: 26px 20px; }
  .connection-route strong { font-size: 17px; }
  .connection-explanation { grid-template-columns: 1fr; }
  .connection-explanation > div + div { border-left: 0; border-top: 1px solid var(--faint); }
  .connection-test { grid-template-columns: 1fr; }
  .connection-test > div + div { border-left: 0; border-top: 1px solid var(--faint); }
  .connection-evidence { grid-template-columns: 1fr; }
  .connection-evidence > div + div { border-left: 0; border-top: 1px solid var(--faint); }
  .missing-bridge { margin-left: -8px; margin-right: -8px; padding-left: 18px; padding-right: 18px; }
  .missing-bridge > header { align-items: flex-start; flex-direction: column; gap: 7px; margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
  .bridge-track { display: flex; flex-direction: column; padding: 25px 0; }
  .bridge-track > div { align-items: center; display: grid; gap: 11px; grid-template-columns: 14px 1fr; min-height: 30px; text-align: left; }
  .bridge-track > div::after { border-left: 2px dotted rgba(255,255,255,.34); border-top: 0; height: 100%; left: 6px; top: 15px; width: 2px; }
  .bridge-track i { margin: 0; }
  .bridge-track span { font-size: 10px; padding: 0; }
  .anxiety-list { grid-template-columns: 1fr; }
  .anxiety-list li:last-child { grid-column: auto; }
  .verdict { margin-left: -8px; margin-right: -8px; padding: 28px 24px; }
  .site-footer { align-items: flex-start; display: flex; flex-direction: column; gap: 20px; margin: 0 20px; padding: 30px 0; }
  .post-grid { grid-template-columns: 1fr; }
  .latest-page { padding-bottom: 90px; padding-top: 18px; }
  .latest-thread-inner { min-height: auto; padding: 30px 28px 38px; }
  .latest-thread h1 { font-size: clamp(38px, 10vw, 56px); }
  .latest-thread-kicker { margin-top: 30px; }
  .older-threads-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  body.admin-bar .masthead { top: 46px; }
}

@media (max-width: 620px) {
	.primary-nav .sub-menu { left: 12px; right: 12px; }
	.thread-archive-page { padding-left: 16px; padding-right: 16px; }
	.thread-archive-tools { grid-template-columns: 1fr; }
	.thread-archive-search { grid-column: auto; }
	.thread-archive-tools button,
	.thread-archive-reset { justify-self: stretch; width: 100%; }
	.thread-archive-story h3 { font-size: 22px; }
	.thread-archive-story p { font-size: 12px; }
  .article-credit { grid-template-columns: 1fr; }
  .article-credit > *:nth-child(even) { border-left: 0; }
  .article-credit > *:first-child { padding-left: 12px !important; }
  .research-profile-card { grid-template-columns: 60px minmax(0, 1fr); padding: 18px 14px; }
  .research-profile-card .profile-portrait,
  .research-profile-card .profile-initials { height: 60px; width: 60px; }
  .older-thread-grid { grid-template-columns: 1fr; }
  .latest-thread-inner { min-height: auto; padding: 26px 20px 34px 24px; }
  .latest-thread-meta { align-items: flex-start; flex-direction: column; gap: 8px; }
  .latest-thread h1 { font-size: clamp(36px, 10.8vw, 50px); }
  .latest-thread-dek { font-size: 17px; }
  .thread-tile { min-height: 270px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chain-node,
  .primary-nav .sub-menu,
  .submenu-toggle span,
  .thread-archive-open span,
  .sources a strong,
  .latest-thread-link span,
  .thread-tile-link span { transition: none; }
  .chain-node:hover,
  .chain-node:focus-visible { transform: none; }
  .latest-thread-link:hover span,
  .thread-tile-link:hover span { transform: none; }
}

@media (forced-colors: active) {
  .reading-progress { background: CanvasText; }
  .reading-progress > span { background: Highlight; }
  .primary-nav .sub-menu { border-color: CanvasText; box-shadow: none; }
}
