/* Worcester News — Heart of the Commonwealth
   Editorial broadsheet, mobile-first. */

:root {
  --paper: #fbf6ec;
  --paper-2: #f3ebd9;
  --rule: #d8cdb3;
  --rule-strong: #b9ac8d;
  --ink: #0f1b2c;
  --ink-2: #2a3344;
  --muted: #5d6573;
  --muted-2: #8a8d97;
  --crimson: #a51c30;
  --crimson-deep: #7a1322;
  --gold: #b58823;
  --forest: #2d4a2b;
  --shadow-sm: 0 1px 2px rgba(15, 27, 44, .06);
  --shadow-md: 0 6px 20px -8px rgba(15, 27, 44, .18);
  --shadow-lg: 0 24px 60px -28px rgba(15, 27, 44, .35);
  --radius: 6px;
  --radius-md: 10px;
  --max: 1240px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --t: 220ms cubic-bezier(.4, 0, .2, 1);
  --display: "DM Serif Display", "Source Serif Pro", Georgia, serif;
  --body: "Lora", Georgia, "Times New Roman", serif;
  --ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
*::selection { background: var(--crimson); color: var(--paper); }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(165, 28, 48, .04), transparent 60%),
    var(--paper);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(rgba(15,27,44,.025) 1px, transparent 1px),
    radial-gradient(rgba(15,27,44,.02) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  mix-blend-mode: multiply;
  opacity: .65;
}

img, picture, svg, video {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: var(--crimson-deep);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color var(--t);
}
a:hover { color: var(--crimson); text-decoration: underline; text-decoration-thickness: 1px; }

button { font: inherit; }

h1, h2, h3, h4, h5 {
  font-family: var(--display);
  letter-spacing: -0.012em;
  color: var(--ink);
  line-height: 1.12;
  margin: 0;
  font-weight: 400;
}

p { margin: 0 0 1rem; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

/* ---------- Top dateline strip ---------- */
.dateline {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ui);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.dateline .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: .55rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.dateline .inner > span { white-space: nowrap; }
.dateline .star { color: var(--gold); }
.dateline a { color: var(--paper); border-bottom: 1px dotted rgba(255,255,255,.45); }
.dateline a:hover { color: #fff; border-bottom-color: #fff; text-decoration: none; }

@media (max-width: 600px) {
  .dateline .inner { font-size: .68rem; gap: .35rem 1rem; }
  .dateline .hide-sm { display: none; }
}

/* ---------- Masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.masthead .inner {
  padding: clamp(1.25rem, 4vw, 2.25rem) 0 1rem;
  text-align: center;
  position: relative;
}
.masthead .crest {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--ui);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .5rem;
}
.masthead .crest::before,
.masthead .crest::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--rule-strong);
}
.masthead h1.title {
  font-family: var(--display);
  font-size: clamp(2.4rem, 9vw, 5.5rem);
  letter-spacing: -.025em;
  line-height: .95;
  color: var(--ink);
  margin: 0;
}
.masthead h1.title a { color: var(--ink); }
.masthead h1.title a:hover { color: var(--crimson-deep); text-decoration: none; }
.masthead h1.title em {
  font-style: italic;
  color: var(--crimson-deep);
}
.masthead .motto {
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(.9rem, 2vw, 1.05rem);
  color: var(--muted);
  margin-top: .65rem;
  letter-spacing: .01em;
}

/* ---------- Primary nav ---------- */
.primary-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 246, 236, .92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.primary-nav .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
}
.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.primary-nav a {
  font-family: var(--ui);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  padding: .85rem 0;
  position: relative;
  display: inline-block;
}
.primary-nav a:hover { color: var(--crimson-deep); text-decoration: none; }
.primary-nav a[aria-current="page"]::after,
.primary-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 4px;
  height: 2px;
  background: var(--crimson);
}
.primary-nav .now {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .06em;
}

.nav-toggle {
  display: none;
  appearance: none;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

@media (max-width: 760px) {
  .primary-nav .inner { min-height: 56px; }
  .nav-toggle { display: inline-flex; }
  .primary-nav ul {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
    padding: .25rem var(--gutter) 1rem;
  }
  .primary-nav ul.open { display: flex; }
  .primary-nav li { border-bottom: 1px solid var(--rule); }
  .primary-nav li:last-child { border-bottom: 0; }
  .primary-nav a { padding: .9rem 0; display: block; }
  .primary-nav a:hover::after,
  .primary-nav a[aria-current="page"]::after { display: none; }
  .primary-nav .now { display: none; }
}

/* ---------- Lede / hero ---------- */
.lede {
  margin: 2rem 0 0;
  padding-bottom: 2rem;
  border-bottom: 3px double var(--ink);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(1.25rem, 3vw, 2.25rem);
}
@media (max-width: 900px) {
  .lede { grid-template-columns: 1fr; }
}

.lede-main { display: flex; flex-direction: column; }
.lede-main .kicker { margin-bottom: .5rem; }
.lede-main h2 {
  font-size: clamp(1.9rem, 5.2vw, 3.4rem);
  line-height: 1.04;
  margin-bottom: .75rem;
}
.lede-main h2 a { color: var(--ink); }
.lede-main h2 a:hover { color: var(--crimson-deep); text-decoration: none; }
.lede-main .deck {
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink-2);
  margin-bottom: 1rem;
  max-width: 56ch;
}
.lede-main .byline {
  font-family: var(--ui);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: auto;
}
.lede-main .byline strong { color: var(--ink); font-weight: 700; }

.lede-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-left: 1px solid var(--rule);
  padding-left: clamp(1rem, 2.5vw, 2rem);
}
@media (max-width: 900px) {
  .lede-side {
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: 1.25rem;
  }
}
.lede-side .item {
  display: block;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.lede-side .item:last-child { border-bottom: 0; padding-bottom: 0; }
.lede-side h3 {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.18;
  margin-top: .35rem;
}
.lede-side h3 a { color: var(--ink); }
.lede-side h3 a:hover { color: var(--crimson-deep); text-decoration: none; }
.lede-side .item p {
  font-size: .92rem;
  color: var(--muted);
  margin: .35rem 0 .35rem;
}

/* ---------- Kickers / metadata ---------- */
.kicker {
  font-family: var(--ui);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--crimson-deep);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.kicker::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--crimson);
  display: inline-block;
}

/* ---------- Section heading ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 2.5rem 0 1.25rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--ink);
  position: relative;
}
.section-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--ink);
}
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  letter-spacing: -.01em;
  flex: 1;
}
.section-head h2 em { font-style: italic; color: var(--crimson-deep); }
.section-head .meta-link {
  font-family: var(--ui);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Story grid ---------- */
.story-grid {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.story-card {
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: .25rem .25rem 1.25rem;
  border-bottom: 1px solid var(--rule);
  transition: transform var(--t);
}
.story-card:hover { transform: translateY(-1px); }
.story-card:last-child { border-bottom: 0; }

.story-card .plate {
  position: relative;
  height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 2.25rem;
  letter-spacing: -.02em;
  color: var(--paper);
  background: linear-gradient(135deg, var(--ink) 0%, #1c2a44 100%);
  isolation: isolate;
}
.story-card .plate::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 2px, transparent 2px 8px);
  z-index: -1;
}
.story-card .plate.crimson { background: linear-gradient(135deg, var(--crimson-deep), var(--crimson)); }
.story-card .plate.forest { background: linear-gradient(135deg, var(--forest), #4f7349); }
.story-card .plate.gold { background: linear-gradient(135deg, var(--gold), #d9b057); color: #3b2a06; }
.story-card .plate.paper {
  background: linear-gradient(135deg, var(--paper-2), #ede1c5);
  color: var(--ink);
}
.story-card .plate.chess {
  background:
    linear-gradient(135deg, rgba(0,0,0,.55), rgba(0,0,0,0)),
    repeating-conic-gradient(#1a1a1a 0 25%, #f3ebd9 0 50%);
  background-size: cover, 80px 80px;
  color: var(--paper);
}

.story-card h3 {
  font-size: 1.25rem;
  font-family: var(--display);
  line-height: 1.2;
  margin-top: .2rem;
}
.story-card h3 a { color: var(--ink); }
.story-card h3 a:hover { color: var(--crimson-deep); text-decoration: none; }
.story-card p {
  font-size: .96rem;
  color: var(--ink-2);
  margin: 0;
}
.story-card .byline {
  margin-top: auto;
  font-family: var(--ui);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Two-column featured row */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin: 2rem 0;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 760px) {
  .feature-row { grid-template-columns: 1fr; }
}

/* ---------- Pull notes / colophon ---------- */
.colophon {
  margin-top: 3rem;
  padding: 1.5rem;
  border: 1px solid var(--rule-strong);
  background: var(--paper-2);
  border-radius: var(--radius);
  display: grid;
  gap: .5rem;
  font-family: var(--body);
  font-style: italic;
  color: var(--ink-2);
}
.colophon .label {
  font-family: var(--ui);
  font-style: normal;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--crimson-deep);
}

/* ---------- Article (story page) ---------- */
.story-wrap {
  margin: 2rem auto 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  max-width: 1140px;
}
@media (max-width: 1000px) {
  .story-wrap { grid-template-columns: 1fr; }
}

article.story {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
article.story header.head {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
article.story header.head .kicker { margin-bottom: 1rem; }
article.story h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: .25rem 0 1rem;
}
article.story h1 em { font-style: italic; color: var(--crimson-deep); }
article.story .deck {
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: var(--ink-2);
  line-height: 1.45;
  margin: 0 0 1rem;
  max-width: 60ch;
}
article.story .meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.25rem;
  font-family: var(--ui);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
article.story .meta strong { color: var(--ink); font-weight: 700; }

article.story h2 {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  letter-spacing: -.01em;
  margin: 2.5rem 0 .85rem;
}
article.story h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 1.85rem 0 .55rem;
}
article.story p,
article.story li {
  font-family: var(--body);
  font-size: 1.075rem;
  line-height: 1.78;
  color: var(--ink-2);
}
article.story ul, article.story ol { padding-left: 1.4rem; margin: 0 0 1.25rem; }
article.story li { margin-bottom: .35rem; }

article.story p a {
  color: var(--crimson-deep);
  border-bottom: 1px solid rgba(165, 28, 48, .35);
}
article.story p a:hover {
  color: var(--crimson);
  border-bottom-color: var(--crimson);
  text-decoration: none;
}

article.story blockquote {
  margin: 2rem 0;
  padding: .25rem 0 .25rem 1.5rem;
  border-left: 4px solid var(--crimson);
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  line-height: 1.35;
  color: var(--ink);
}

article.story .dropcap > p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 4.5rem;
  line-height: .82;
  float: left;
  padding: .35rem .55rem 0 0;
  color: var(--crimson-deep);
}

article.story figure {
  margin: 2rem 0;
  border-left: 3px solid var(--rule-strong);
  padding-left: 1.25rem;
}
article.story figcaption {
  font-family: var(--ui);
  font-size: .8rem;
  color: var(--muted);
  margin-top: .35rem;
}

article.story .pull {
  margin: 2.25rem 0;
  padding: 1.5rem 0;
  border-top: 3px double var(--ink);
  border-bottom: 3px double var(--ink);
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  line-height: 1.3;
  text-align: center;
}

article.story hr.rule {
  border: 0;
  border-top: 3px double var(--rule-strong);
  margin: 2rem auto;
  width: 80px;
}

/* ---------- Story sidebar ---------- */
.story-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  border-left: 1px solid var(--rule);
  padding-left: clamp(1rem, 2vw, 1.75rem);
}
@media (max-width: 1000px) {
  .story-sidebar {
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: 1.5rem;
    position: static;
  }
}
.story-sidebar h4 {
  font-family: var(--ui);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--crimson-deep);
  margin: 0 0 .85rem;
}
.story-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 1rem;
}
.story-sidebar li {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem;
}
.story-sidebar li:last-child { border-bottom: 0; }
.story-sidebar li a {
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--ink);
  display: block;
}
.story-sidebar li a:hover { color: var(--crimson-deep); text-decoration: none; }
.story-sidebar li .small {
  display: block;
  font-family: var(--ui);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .4rem;
}

.factbox {
  background: var(--paper-2);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.factbox .label {
  font-family: var(--ui);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--crimson-deep);
}
.factbox dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .35rem 1rem;
  margin: .65rem 0 0;
  font-size: .9rem;
  color: var(--ink-2);
}
.factbox dt {
  font-family: var(--ui);
  font-weight: 600;
  letter-spacing: .04em;
  font-size: .78rem;
  color: var(--muted);
}
.factbox dd { margin: 0; }

/* ---------- Tag row & read-next ---------- */
.tag-row {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.tag {
  display: inline-block;
  background: transparent;
  color: var(--crimson-deep);
  border: 1px solid var(--rule-strong);
  font-family: var(--ui);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  padding: .3rem .75rem;
  border-radius: 999px;
  text-transform: uppercase;
}
.tag:hover { background: var(--crimson); color: var(--paper); border-color: var(--crimson); text-decoration: none; }

.read-next {
  margin: 3rem auto 0;
  max-width: 720px;
  border-top: 3px double var(--ink);
  padding-top: 1.5rem;
}
.read-next h4 {
  font-family: var(--ui);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--crimson-deep);
  margin: 0 0 1rem;
}
.read-next-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.read-next-grid a {
  display: block;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1.25;
  transition: transform var(--t), border-color var(--t), background var(--t);
}
.read-next-grid a:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  background: var(--paper);
  color: var(--crimson-deep);
  text-decoration: none;
}
.read-next-grid .k {
  display: block;
  font-family: var(--ui);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: .4rem;
}

/* ---------- Footer ---------- */
footer.site {
  margin-top: 4rem;
  background: var(--ink);
  color: #c8cdd8;
}
footer.site .top {
  border-bottom: 1px solid #1c2a44;
}
footer.site .inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 2.5rem var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}
@media (max-width: 760px) {
  footer.site .inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  footer.site .inner { grid-template-columns: 1fr; }
}
footer.site h5 {
  font-family: var(--ui);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #8a8d97;
  margin: 0 0 .85rem;
}
footer.site .crest {
  font-family: var(--display);
  font-size: 1.85rem;
  letter-spacing: -.02em;
  color: var(--paper);
  line-height: 1;
}
footer.site .crest em { color: #d4805a; font-style: italic; }
footer.site .tag-line {
  font-family: var(--body);
  font-style: italic;
  margin: .65rem 0 0;
  color: #8a8d97;
  max-width: 32ch;
}
footer.site a { color: #c8cdd8; display: block; padding: .25rem 0; font-size: .92rem; font-family: var(--body); }
footer.site a:hover { color: var(--paper); text-decoration: none; }
footer.site .legal {
  border-top: 1px solid #1c2a44;
  padding: 1rem var(--gutter);
  font-family: var(--ui);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #6e7888;
  text-align: center;
}

/* ---------- Utilities ---------- */
.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;
}

/* Reveal animation */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(8px);
    animation: revealUp .9s cubic-bezier(.2,.6,.2,1) forwards;
  }
  .reveal.d1 { animation-delay: .08s; }
  .reveal.d2 { animation-delay: .16s; }
  .reveal.d3 { animation-delay: .24s; }
  .reveal.d4 { animation-delay: .32s; }
  .reveal.d5 { animation-delay: .4s; }
}
@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ===========================================================
   Thomas Rodrick longform — DARK CHESS-THEMED OVERRIDE PAGE
   .longform-tr is applied to <body> for the profile page.
   =========================================================== */

body.longform-tr {
  background:
    radial-gradient(900px 600px at 80% -200px, rgba(165, 28, 48, .14), transparent 60%),
    radial-gradient(900px 700px at -10% 90%, rgba(45, 74, 43, .15), transparent 60%),
    #0d1018;
  color: #d6d8df;
}
body.longform-tr::before {
  background-image:
    radial-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,.012) 1px, transparent 1px);
  mix-blend-mode: screen;
  opacity: 1;
}

body.longform-tr a { color: #e8b15c; }
body.longform-tr a:hover { color: #ffd089; }
body.longform-tr h1, body.longform-tr h2, body.longform-tr h3, body.longform-tr h4 {
  color: #f3ebd9;
}

body.longform-tr .dateline {
  background: #04060c;
  border-bottom: 1px solid #1f2535;
}
body.longform-tr .masthead {
  background: transparent;
  border-bottom: 1px solid #1f2535;
}
body.longform-tr .masthead h1.title a { color: #f3ebd9; }
body.longform-tr .masthead h1.title em { color: #e8b15c; }
body.longform-tr .masthead .crest { color: #8a8d97; }
body.longform-tr .masthead .crest::before,
body.longform-tr .masthead .crest::after { background: #2a3145; }
body.longform-tr .masthead .motto { color: #8a8d97; }
body.longform-tr .primary-nav {
  background: rgba(13, 16, 24, .92);
  border-color: #1f2535;
}
body.longform-tr .primary-nav a { color: #d6d8df; }
body.longform-tr .primary-nav a:hover { color: #e8b15c; }
body.longform-tr .primary-nav a:hover::after,
body.longform-tr .primary-nav a[aria-current="page"]::after { background: #e8b15c; }
body.longform-tr .nav-toggle { border-color: #d6d8df; color: #d6d8df; }

.longform-hero {
  position: relative;
  margin: 2.5rem 0 3rem;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 4vw, 3rem);
  border: 1px solid #2a3145;
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(13,16,24,.92), rgba(20,24,38,.7)),
    repeating-conic-gradient(#1a1d27 0 25%, #2c303d 0 50%);
  background-size: cover, 88px 88px;
}
.longform-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(700px 400px at 100% 0%, rgba(232, 177, 92, .25), transparent 60%);
  z-index: -1;
}
.longform-hero .kicker { color: #e8b15c; }
.longform-hero .kicker::before { background: #e8b15c; }
.longform-hero h1 {
  font-family: var(--display);
  color: #f3ebd9;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1;
  letter-spacing: -.02em;
  max-width: 18ch;
  margin: .75rem 0 1.25rem;
}
.longform-hero h1 em { color: #e8b15c; font-style: italic; }
.longform-hero .deck {
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: #c8cdd8;
  max-width: 64ch;
  margin: 0 0 1.5rem;
}
.longform-hero .stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  border-top: 1px solid #2a3145;
  padding-top: 1.25rem;
  margin-top: 1.5rem;
  font-family: var(--ui);
}
.longform-hero .stat .num {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: #e8b15c;
  letter-spacing: -.02em;
  line-height: 1;
}
.longform-hero .stat .lbl {
  display: block;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8a8d97;
  margin-top: .35rem;
}
.longform-hero .meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.5rem;
  font-family: var(--ui);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8a8d97;
  margin-top: 1rem;
}
.longform-hero .meta strong { color: #f3ebd9; font-weight: 700; }

body.longform-tr .story-wrap {
  margin: 0 auto 4rem;
  grid-template-columns: minmax(0, 1fr) 280px;
}
@media (max-width: 1000px) {
  body.longform-tr .story-wrap { grid-template-columns: 1fr; }
}
body.longform-tr article.story h1 { color: #f3ebd9; }
body.longform-tr article.story h2 {
  color: #e8b15c;
  border-bottom: 1px solid #2a3145;
  padding-bottom: .35rem;
}
body.longform-tr article.story h3 { color: #f3ebd9; }
body.longform-tr article.story .deck { color: #c8cdd8; }
body.longform-tr article.story .meta { color: #8a8d97; }
body.longform-tr article.story .meta strong { color: #f3ebd9; }
body.longform-tr article.story p,
body.longform-tr article.story li {
  color: #c8cdd8;
}
body.longform-tr article.story p a {
  color: #e8b15c;
  border-bottom: 1px solid rgba(232, 177, 92, .35);
}
body.longform-tr article.story p a:hover {
  color: #ffd089;
  border-bottom-color: #ffd089;
}
body.longform-tr article.story blockquote {
  border-left-color: #e8b15c;
  color: #f3ebd9;
}
body.longform-tr article.story .pull {
  border-color: #e8b15c;
  color: #f3ebd9;
}
body.longform-tr article.story .dropcap > p:first-of-type::first-letter {
  color: #e8b15c;
}
body.longform-tr article.story header.head {
  border-bottom-color: #2a3145;
}
body.longform-tr article.story figure { border-left-color: #2a3145; }
body.longform-tr article.story figcaption { color: #8a8d97; }

body.longform-tr .factbox {
  background: rgba(20, 24, 38, .55);
  border-color: #2a3145;
  color: #c8cdd8;
}
body.longform-tr .factbox .label { color: #e8b15c; }
body.longform-tr .factbox dt { color: #8a8d97; }

body.longform-tr .story-sidebar {
  border-left-color: #2a3145;
}
body.longform-tr .story-sidebar h4 { color: #e8b15c; }
body.longform-tr .story-sidebar li { border-bottom-color: #2a3145; }
body.longform-tr .story-sidebar li a { color: #f3ebd9; }
body.longform-tr .story-sidebar li a:hover { color: #e8b15c; }
body.longform-tr .story-sidebar li .small { color: #8a8d97; }

body.longform-tr .read-next {
  border-top-color: #e8b15c;
}
body.longform-tr .read-next h4 { color: #e8b15c; }
body.longform-tr .read-next-grid a {
  background: rgba(20,24,38,.6);
  border-color: #2a3145;
  color: #f3ebd9;
}
body.longform-tr .read-next-grid a:hover {
  background: rgba(232, 177, 92, .08);
  border-color: #e8b15c;
  color: #e8b15c;
}
body.longform-tr .read-next-grid .k { color: #e8b15c; }

body.longform-tr .tag {
  background: transparent;
  color: #e8b15c;
  border-color: #2a3145;
}
body.longform-tr .tag:hover { background: #e8b15c; color: #0d1018; border-color: #e8b15c; }

body.longform-tr footer.site {
  background: #04060c;
}
body.longform-tr footer.site .top { border-bottom-color: #1f2535; }
body.longform-tr footer.site .legal { border-top-color: #1f2535; }

/* Chess board mini-graphic for the longform */
.chessboard {
  --sq: clamp(18px, 3.6vw, 32px);
  width: calc(var(--sq) * 8);
  height: calc(var(--sq) * 8);
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  border: 2px solid #e8b15c;
  border-radius: 4px;
  margin: 2rem auto;
  background: #f3ebd9;
  position: relative;
  box-shadow: 0 18px 50px -22px rgba(0,0,0,.6);
}
.chessboard div {
  width: 100%; height: 100%;
}
.chessboard div.dark { background: #1a1a1a; }
.chessboard div.piece {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--sq) * .75);
  line-height: 1;
}
.chessboard div.piece.dark { color: #e8b15c; }
.chessboard div.piece.light { color: #1a1a1a; }

.elo-badge {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem 1.1rem;
  border: 1px solid #e8b15c;
  border-radius: 999px;
  background: rgba(232, 177, 92, .08);
  color: #e8b15c;
  font-family: var(--mono);
  font-size: .9rem;
  letter-spacing: .04em;
}
.elo-badge .num {
  font-family: var(--display);
  font-size: 1.4rem;
  color: #ffd089;
  line-height: 1;
}
.elo-badge .lbl {
  font-family: var(--ui);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8a8d97;
}

/* Section divider with rook */
.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0;
  color: #2a3145;
}
.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #2a3145;
}
.section-divider span {
  font-family: var(--display);
  font-size: 1.4rem;
  color: #e8b15c;
}
