/* =========================================================================
   The Sim Standard — house stylesheet
   Broadsheet furniture: cream stock, near-black ink, deep navy and gold.
   Light and dark ("night edition") both keep the newspaper feel.
   ========================================================================= */

:root {
  /* Print palette */
  --cream:        #FAF7F0;
  --cream-2:      #F4F0E6;
  --ink:          #1A1A1A;
  --ink-soft:     #3B3B39;
  --ink-muted:    #6E6A62;
  --navy:         #1F3864;
  --navy-soft:    #33507F;
  --gold:         #B8860B;
  --gold-soft:    #D9A93C;
  --rule:         #D8D2C4;
  --rule-strong:  #1A1A1A;
  --red:          #8C2318;
  --green:        #1F5F3A;

  /* Semantic */
  --bg:           var(--cream);
  --bg-raise:     #FFFDF8;
  --bg-sunk:      var(--cream-2);
  --fg:           var(--ink);
  --fg-soft:      var(--ink-soft);
  --fg-muted:     var(--ink-muted);
  --accent:       var(--navy);
  --accent-2:     var(--gold);
  --link:         var(--navy);
  --selection:    #E3D9BF;

  /* Type */
  --display: 'Playfair Display', 'Times New Roman', Times, serif;
  --body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --ui: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gap: clamp(1rem, 2.2vw, 2rem);
  --radius: 3px;
  --shadow: 0 1px 2px rgba(26, 26, 26, .06), 0 8px 24px -18px rgba(26, 26, 26, .35);
}

[data-theme="dark"] {
  --cream:        #14161A;
  --cream-2:      #191C22;
  --ink:          #E9E3D6;
  --ink-soft:     #C9C3B6;
  --ink-muted:    #8D897F;
  --navy:         #93AEE0;
  --navy-soft:    #6F8CC4;
  --gold:         #D8A93D;
  --gold-soft:    #E8C36A;
  --rule:         #2C313A;
  --rule-strong:  #4A5162;
  --red:          #E0745F;
  --green:        #6FBF8F;

  --bg:           var(--cream);
  --bg-raise:     #1B1F26;
  --bg-sunk:      #101216;
  --fg:           var(--ink);
  --fg-soft:      var(--ink-soft);
  --fg-muted:     var(--ink-muted);
  --accent:       var(--navy);
  --accent-2:     var(--gold);
  --link:         #A9C1EC;
  --selection:    #2B3550;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -20px rgba(0, 0, 0, .8);
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: clamp(1.02rem, 0.4vw + 0.95rem, 1.14rem);
  line-height: 1.62;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Faint paper tooth in light mode; nothing in dark. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image: radial-gradient(rgba(26, 26, 26, .022) 1px, transparent 1px);
  background-size: 3px 3px;
}
[data-theme="dark"] body::before { opacity: 0; }

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

::selection { background: var(--selection); }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.14; margin: 0; letter-spacing: -.005em; }

p { margin: 0 0 1em; }

hr { border: 0; }

code, kbd, pre, .mono { font-family: var(--mono); font-size: .88em; }

kbd {
  border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 3px;
  padding: .05em .35em; background: var(--bg-raise); font-size: .8em;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gap); position: relative; z-index: 1; }

.visually-hidden, .skip-link:not(:focus) {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; z-index: 50; left: 1rem; top: .5rem;
  background: var(--navy); color: #fff; padding: .5rem .9rem; border-radius: var(--radius);
}

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

.muted { color: var(--fg-muted); }
.nowrap { white-space: nowrap; }
.credit { display: inline-block; margin-left: .5em; color: var(--fg-muted); font-size: .82em; font-family: var(--ui); text-transform: uppercase; letter-spacing: .08em; }

/* ============================================================== masthead */
.masthead { position: relative; background: var(--bg); }

.masthead__rules { height: 4px; background: var(--navy); }
.masthead__rules::after { content: ""; display: block; height: 1px; margin-top: 2px; background: var(--gold); }

.masthead__top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: .45rem; font-family: var(--ui); font-size: .74rem;
  text-transform: uppercase; letter-spacing: .1em; color: var(--fg-muted);
  border-bottom: 1px solid var(--rule);
}
.masthead__top-left, .masthead__top-right { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.masthead__quicklink { color: inherit; text-decoration: none; }
.masthead__quicklink:hover { color: var(--accent-2); text-decoration: underline; }
.dot { opacity: .5; }

.inline-form { display: inline; margin: 0; }
.linkish {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer; color: inherit;
  font: inherit; letter-spacing: inherit; text-transform: inherit; text-decoration: none;
}
.linkish:hover { color: var(--accent-2); text-decoration: underline; }
.linkish--danger { color: var(--red); }

.theme-toggle {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  background: none; border: 1px solid var(--rule); border-radius: 999px;
  padding: .18rem .6rem; color: inherit; font: inherit;
  text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-family: var(--ui);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle__icon {
  width: .72rem; height: .72rem; border-radius: 50%;
  background: var(--gold); box-shadow: inset -3px -1px 0 0 var(--bg);
}
[data-theme="dark"] .theme-toggle__icon { background: var(--gold-soft); box-shadow: inset 3px 1px 0 0 var(--bg); }

/* -------------------------------------------------------------- nameplate */
.nameplate { text-align: center; padding-block: clamp(1rem, 3vw, 2.1rem) .5rem; }
.nameplate__link { text-decoration: none; color: inherit; display: inline-block; }
.nameplate__title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.5rem, 9.2vw, 6.5rem);
  line-height: .92;
  letter-spacing: -.02em;
  margin: 0;
}
.nameplate__link:hover .nameplate__title { color: var(--navy); }
.nameplate__tagline {
  font-family: var(--ui); font-size: .76rem; text-transform: uppercase; letter-spacing: .28em;
  color: var(--fg-muted); margin: .55rem 0 0;
}

.dateline { display: flex; align-items: center; gap: .9rem; margin-top: .9rem; }
.dateline__rule { flex: 1; height: 1px; background: var(--rule-strong); opacity: .55; }
.dateline__text {
  display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; justify-content: center;
  font-family: var(--ui); font-size: .73rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--fg-soft);
}
.dateline__vol, .dateline__price { color: var(--fg-muted); }
.dateline__price { font-style: normal; }

/* ------------------------------------------------------------- sectionbar */
.sectionbar {
  border-top: 1px solid var(--rule-strong);
  border-bottom: 3px double var(--rule-strong);
  margin-top: .8rem;
  background: var(--bg);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(1.2) blur(6px);
}
.sectionbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sectionbar__list {
  display: flex; gap: clamp(.7rem, 1.6vw, 1.5rem); list-style: none; margin: 0; padding: 0;
  overflow-x: auto; scrollbar-width: none;
}
.sectionbar__list::-webkit-scrollbar { display: none; }
.sectionbar__list a {
  display: block; padding: .62rem 0; text-decoration: none; color: var(--fg);
  font-family: var(--ui); font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.sectionbar__list a:hover { color: var(--navy); border-bottom-color: var(--gold); }
.sectionbar__list a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--navy); }

.searchbar { display: flex; align-items: center; gap: 0; }
.searchbar input {
  width: clamp(6rem, 14vw, 12rem); border: 1px solid var(--rule); border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius); background: var(--bg-raise); color: var(--fg);
  padding: .3rem .55rem; font-family: var(--ui); font-size: .8rem;
}
.searchbar button {
  border: 1px solid var(--rule); border-left: 0; border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-sunk); color: var(--fg-soft); padding: .3rem .5rem; cursor: pointer;
  display: grid; place-items: center; height: 100%;
}
.searchbar button:hover { color: var(--navy); }

/* ================================================================ layout */
main { padding-block: clamp(1.4rem, 3vw, 2.4rem) 3rem; }

.rule { height: 1px; background: var(--rule); margin-block: clamp(1.6rem, 3vw, 2.6rem); }
.rule--thick { height: 0; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); padding-top: 2px; }

.section-heading {
  display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap;
  font-family: var(--ui); font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  padding-bottom: .5rem; margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--rule-strong);
}
.section-heading a { color: inherit; text-decoration: none; }
.section-heading a:hover { color: var(--accent-2); }
.section-heading__blurb {
  font-weight: 400; text-transform: none; letter-spacing: 0;
  font-family: var(--body); font-size: .95rem; color: var(--fg-muted); font-style: italic;
}
.section-heading__feed { margin-left: auto; font-size: .7rem; color: var(--fg-muted); }

/* ---------------------------------------------------------- front page */
.front { display: grid; grid-template-columns: minmax(0, 2.35fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.front__rail { border-left: 1px solid var(--rule); padding-left: clamp(1rem, 2vw, 1.8rem); }

.kicker {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  font-family: var(--ui); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em; margin: 0 0 .5rem;
}
.kicker__section { color: var(--navy); text-decoration: none; }
.kicker__section:hover { text-decoration: underline; }
.kicker__flag { color: var(--gold); border-left: 1px solid var(--rule); padding-left: .6rem; }

.lead__title { font-size: clamp(2rem, 5.2vw, 3.5rem); line-height: 1.04; margin-bottom: .5rem; font-weight: 900; }
.lead__title a { color: inherit; text-decoration: none; }
.lead__title a:hover { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); }
.lead__standfirst {
  font-size: clamp(1.1rem, 1.4vw, 1.32rem); line-height: 1.45; color: var(--fg-soft);
  margin-bottom: .7rem; max-width: 46ch;
}
.lead__figure { margin: 1.1rem 0 .9rem; }
.lead__figure img { width: 100%; border: 1px solid var(--rule); }
.lead__figure figcaption, .article__hero figcaption, .card__media figcaption {
  font-family: var(--ui); font-size: .76rem; color: var(--fg-muted); padding-top: .45rem;
  border-bottom: 1px solid var(--rule); padding-bottom: .5rem;
}
.readmore {
  display: inline-block; font-family: var(--ui); font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; text-decoration: none;
  border-bottom: 2px solid var(--gold); padding-bottom: .15rem; color: var(--navy);
}
.readmore:hover { background: var(--gold); color: #fff; border-color: var(--gold); }
[data-theme="dark"] .readmore:hover { color: #14161A; }

.byline { font-family: var(--ui); font-size: .78rem; color: var(--fg-muted); margin: 0 0 .6rem; display: flex; flex-wrap: wrap; gap: .45rem; align-items: baseline; }
.byline__name { color: var(--fg-soft); font-weight: 600; }
.byline__sep { opacity: .45; }
.byline__updated { font-style: italic; }
.byline--article { font-size: .82rem; }

/* rail */
.rail-block { margin-bottom: 1.8rem; }
.rail-block__title {
  font-family: var(--ui); font-size: .74rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .16em; padding-bottom: .4rem; margin-bottom: .7rem;
  border-bottom: 2px solid var(--navy);
}
.rail-block__title a { color: inherit; text-decoration: none; }
.rail-list { list-style: none; margin: 0; padding: 0; }
.rail-list li { padding-block: .6rem; border-bottom: 1px solid var(--rule); }
.rail-list li:last-child { border-bottom: 0; }
.rail-list__title { display: block; font-family: var(--display); font-size: 1.02rem; font-weight: 700; line-height: 1.25; text-decoration: none; color: var(--fg); }
a.rail-list__title:hover { color: var(--navy); }
.rail-list__meta { display: block; font-family: var(--ui); font-size: .72rem; color: var(--fg-muted); margin-top: .2rem; }
.rail-list--tracker li { display: grid; grid-template-columns: auto 1fr; gap: .5rem; align-items: start; }
.rail-list--tracker .rail-list__title { font-size: .95rem; }
.rail-list--tracker .rail-list__meta { grid-column: 2; }
.rail-block__more { font-family: var(--ui); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; text-decoration: none; }

/* front grid */
.frontgrid {
  display: grid; gap: clamp(1.2rem, 2.4vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.frontgrid > .card { border-left: 1px solid var(--rule); padding-left: clamp(.9rem, 1.6vw, 1.4rem); }
.frontgrid > .card:first-child { border-left: 0; padding-left: 0; }

/* ------------------------------------------------------------------ cards */
.card__title { font-size: 1.28rem; line-height: 1.2; margin: 0 0 .4rem; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); }
.card__standfirst { color: var(--fg-soft); font-size: .96rem; margin-bottom: .5rem; }
.card__media { display: block; margin-bottom: .7rem; }
.card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--rule); }

.card--grid .card__title { font-size: clamp(1.15rem, 1.5vw, 1.42rem); }

.latest__list { display: grid; gap: 0; }
.card--list {
  display: grid; grid-template-columns: 1fr; gap: .2rem;
  padding-block: 1.1rem; border-bottom: 1px solid var(--rule);
}
.card--list:first-child { padding-top: 0; }
.card--list .card__title { font-size: 1.35rem; }
.card--list .byline { margin-bottom: 0; }

.sectionblock__grid { display: grid; gap: clamp(1rem, 2vw, 1.8rem); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card--compact .card__title { font-size: 1.08rem; }
.card--compact .byline { font-size: .72rem; margin-bottom: 0; }

/* ---------------------------------------------------------- page headers */
.pagehead { padding-bottom: 1.2rem; margin-bottom: 1.6rem; border-bottom: 3px double var(--rule-strong); }
.pagehead--centered { text-align: center; }
.pagehead__eyebrow { font-family: var(--ui); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .2em; color: var(--gold); margin: 0 0 .4rem; }
.pagehead__title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; margin-bottom: .3rem; }
.pagehead__blurb { color: var(--fg-soft); font-size: 1.08rem; font-style: italic; max-width: 62ch; margin-inline: auto; }
.pagehead--centered .pagehead__blurb { margin-inline: auto; }
.pagehead__meta { font-family: var(--ui); font-size: .78rem; color: var(--fg-muted); margin: .5rem 0 0; }

/* ================================================================ article */
.article { max-width: 46rem; margin-inline: auto; }
.article__head { text-align: left; }
.article__title { font-size: clamp(2.1rem, 5.4vw, 3.4rem); font-weight: 900; line-height: 1.05; margin-bottom: .6rem; }
.article__standfirst {
  font-size: clamp(1.14rem, 1.6vw, 1.4rem); line-height: 1.45; color: var(--fg-soft);
  font-style: italic; margin-bottom: 1rem;
}
.article__meta {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-block: .7rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  margin-bottom: 1.6rem;
}
.article__actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.article__hero { margin: 0 0 1.6rem; }
.article__hero img { width: 100%; border: 1px solid var(--rule); }

/* ---- prose: the actual body text ---- */
.prose { font-size: 1.09rem; line-height: 1.72; }
.prose > p { margin: 0 0 1.15em; }
.prose > p:first-of-type::first-letter {
  float: left;
  font-family: var(--display);
  font-weight: 900;
  font-size: 4.05em;
  line-height: .78;
  margin: .06em .09em -.02em 0;
  color: var(--navy);
}
.prose--tight > p:first-of-type::first-letter { float: none; font-size: 1em; margin: 0; color: inherit; }

.prose h2 { font-size: 1.6rem; margin: 2rem 0 .6rem; }
.prose h3 { font-size: 1.28rem; margin: 1.6rem 0 .5rem; }
.prose h2 + p, .prose h3 + p { margin-top: 0; }
.prose a { color: var(--navy); }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.prose li { margin-bottom: .35em; }
.prose hr { height: 0; border-top: 1px solid var(--rule); margin-block: 2rem; }
.prose img { margin-block: 1.4rem; border: 1px solid var(--rule); }
.prose figcaption { font-family: var(--ui); font-size: .78rem; color: var(--fg-muted); }

.prose blockquote {
  margin: 1.5rem 0; padding: .2rem 0 .2rem 1.2rem;
  border-left: 3px solid var(--gold); color: var(--fg-soft); font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }

/* Pull-quote (>! in Markdown) */
.prose .pullquote {
  margin: 1.8rem 0; padding: 1.1rem 0;
  border-top: 2px solid var(--navy); border-bottom: 2px solid var(--navy);
  font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1.28; font-weight: 700; color: var(--navy); text-align: center;
  text-wrap: balance;
}
.prose .pullquote::before { content: "“"; color: var(--gold); margin-right: .1em; }
.prose .pullquote::after { content: "”"; color: var(--gold); margin-left: .05em; }
@media (min-width: 62rem) {
  .prose .pullquote {
    float: right; width: 15.5rem; margin: .4rem -7rem 1.2rem 1.8rem; text-align: left;
  }
}
.prose .inline-cite { font-family: var(--ui); font-size: .8em; text-transform: uppercase; letter-spacing: .08em; font-style: normal; color: var(--fg-muted); }

.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.prose th, .prose td { padding: .5rem .6rem; border-bottom: 1px solid var(--rule); text-align: left; }
.prose thead th { border-bottom: 2px solid var(--rule-strong); font-family: var(--ui); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; }
.prose tbody tr:hover { background: var(--bg-sunk); }
.prose code { background: var(--bg-sunk); padding: .1em .35em; border-radius: 2px; }
.prose pre { background: var(--bg-sunk); border: 1px solid var(--rule); padding: .9rem 1rem; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose .footnote { font-size: .9rem; color: var(--fg-soft); border-top: 1px solid var(--rule); margin-top: 2rem; }
.prose mark { background: color-mix(in srgb, var(--gold) 30%, transparent); color: inherit; }

/* ---- article footer ---- */
.article__foot { margin-top: 2.2rem; }
.taglist { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-family: var(--ui); font-size: .78rem; }
.taglist__label { color: var(--fg-muted); text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; }
.tagpill {
  display: inline-block; padding: .12rem .55rem; border: 1px solid var(--rule);
  border-radius: 999px; text-decoration: none; color: var(--fg-soft); background: var(--bg-raise);
  font-size: .76rem;
}
.tagpill:hover { border-color: var(--navy); color: var(--navy); }
.tagpill--warn { border-color: var(--gold); color: var(--gold); }

.citebox {
  margin-top: 1.8rem; padding: 1.1rem 1.2rem;
  background: var(--bg-sunk); border: 1px solid var(--rule); border-left: 3px solid var(--navy);
}
.citebox__heading { font-family: var(--ui); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; margin-bottom: .6rem; }
.citebox__citation { font-size: .94rem; line-height: 1.55; margin-bottom: .8rem; }
.citebox__actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.citebox__details { margin-top: .9rem; font-family: var(--ui); font-size: .8rem; }
.citebox__details summary { cursor: pointer; color: var(--fg-muted); }
.citebox__preview {
  white-space: pre-wrap; background: var(--bg-raise); border: 1px dashed var(--rule);
  padding: .7rem .8rem; margin: .6rem 0 .4rem; font-size: .82rem; line-height: 1.5;
}
.citebox__hint { color: var(--fg-muted); font-size: .78rem; margin: 0; }

/* ================================================================ banners */
.banner {
  border: 1px solid var(--rule); border-left: 4px solid var(--gold); background: var(--bg-sunk);
  padding: .7rem .9rem; margin-bottom: 1.4rem; font-family: var(--ui); font-size: .85rem;
}
.banner--preview { border-left-color: var(--gold); }
.banner--private { border-left-color: var(--red); }

.messages { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.messages__item {
  font-family: var(--ui); font-size: .85rem; padding: .6rem .9rem; margin-bottom: .4rem;
  border: 1px solid var(--rule); border-left: 4px solid var(--navy); background: var(--bg-raise);
}
.messages__item--success { border-left-color: var(--green); }
.messages__item--error { border-left-color: var(--red); }
.messages__item--warning { border-left-color: var(--gold); }

/* ================================================================= badges */
.badge {
  display: inline-block; font-family: var(--ui); font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em; padding: .16rem .5rem;
  border: 1px solid currentColor; border-radius: 2px; white-space: nowrap;
}
.badge--neutral  { color: var(--fg-muted); }
.badge--navy     { color: var(--navy); background: color-mix(in srgb, var(--navy) 8%, transparent); }
.badge--gold     { color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.badge--green    { color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); }
.badge--red      { color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); }
.badge--muted    { color: var(--fg-muted); border-style: dashed; }

/* status tones reused by the newsroom */
.badge--draft { color: var(--fg-muted); }
.badge--scheduled { color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.badge--private { color: var(--red); background: color-mix(in srgb, var(--red) 8%, transparent); }
.badge--published { color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); }
.badge--archived { color: var(--fg-muted); border-style: dashed; }

/* ================================================================ buttons */
.btn {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  font-family: var(--ui); font-size: .8rem; font-weight: 600; line-height: 1;
  padding: .5rem .85rem; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--bg-raise); color: var(--fg); text-decoration: none;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.btn:hover { border-color: var(--navy); color: var(--navy); }
.btn--navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-soft); border-color: var(--navy-soft); color: #fff; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn--gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: #1A1A1A; }
.btn--ghost { background: transparent; border-color: var(--rule); color: var(--fg-soft); }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn--small { font-size: .74rem; padding: .34rem .6rem; }
.btn--block { width: 100%; justify-content: center; padding-block: .65rem; }
.btn--danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn--danger:hover { filter: brightness(1.1); color: #fff; }
.btn--danger-ghost { border-color: var(--rule); color: var(--red); }
.btn--danger-ghost:hover { border-color: var(--red); color: var(--red); }
.btn[data-copied="1"] { border-color: var(--green); color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); }

/* ================================================================= tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); }
.datatable { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--bg-raise); }
.datatable thead th {
  position: sticky; top: 0; background: var(--bg-sunk); text-align: left; padding: .6rem .7rem;
  font-family: var(--ui); font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; border-bottom: 2px solid var(--rule-strong); white-space: nowrap;
}
.datatable thead th a { color: inherit; text-decoration: none; }
.datatable thead th a:hover { color: var(--navy); text-decoration: underline; }
.datatable td { padding: .65rem .7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.datatable tbody tr:hover { background: var(--bg-sunk); }
.datatable__title { display: block; font-family: var(--display); font-size: 1.04rem; font-weight: 700; line-height: 1.3; }
.datatable__title a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--gold); }
.datatable__sub { display: block; font-size: .84rem; color: var(--fg-muted); margin-top: .2rem; max-width: 46ch; }
.datatable .col-num { width: 5.5rem; color: var(--fg-muted); }
.row--overdue { background: color-mix(in srgb, var(--red) 6%, transparent); }
.row--overdue:hover { background: color-mix(in srgb, var(--red) 10%, transparent); }

.filterbar { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.2rem; }
.filterbar__sep { width: 1px; height: 1.4rem; background: var(--rule); margin-inline: .4rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--ui); font-size: .76rem; text-decoration: none; color: var(--fg-soft);
  padding: .28rem .6rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--bg-raise);
}
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip--on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip--on:hover { color: #fff; }
.chip--alt { border-style: dashed; }
.chip__count { font-size: .7rem; opacity: .7; }
.chip--on .chip__count { opacity: .85; }

.tracker-legend {
  margin-top: 1.2rem; font-family: var(--ui); font-size: .78rem; color: var(--fg-muted);
  display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; line-height: 2;
}

/* ============================================================== masthead pg */
.masthead-list { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.staffcard { display: grid; grid-template-columns: 3.4rem 1fr; gap: 1rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--rule); }
.staffcard__photo { width: 3.4rem; height: 3.4rem; border-radius: 50%; object-fit: cover; border: 1px solid var(--rule); }
.staffcard__initial {
  width: 3.4rem; height: 3.4rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-family: var(--display); font-size: 1.5rem; font-weight: 700;
}
.staffcard__role { font-family: var(--ui); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); }
.staffcard__name { font-family: var(--display); font-size: 1.28rem; font-weight: 700; margin: .15rem 0 .3rem; }
.staffcard__bio { font-size: .95rem; color: var(--fg-soft); }
.staffcard__bio p { margin-bottom: .4em; }
.staffcard__meta { font-family: var(--ui); font-size: .75rem; color: var(--fg-muted); margin: 0; }

.colophon { display: grid; gap: clamp(1.4rem, 3vw, 3rem); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.colophon__list { list-style: none; padding: 0; margin: 0 0 1rem; }
.colophon__list li { padding-block: .4rem; border-bottom: 1px solid var(--rule); font-size: .95rem; }
.colophon p { font-size: .98rem; }

/* ================================================================= search */
.searchpage { margin-bottom: 1.6rem; }
.searchpage__row { display: flex; gap: .5rem; flex-wrap: wrap; }
.searchpage__row input[type="search"], .searchpage__row select {
  padding: .55rem .7rem; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--bg-raise); color: var(--fg); font-family: var(--ui); font-size: .9rem;
}
.searchpage__row input[type="search"] { flex: 1 1 18rem; }
.searchpage__hint { font-family: var(--ui); font-size: .76rem; color: var(--fg-muted); margin: .5rem 0 0; }
.searchpage__count { font-family: var(--ui); font-size: .85rem; color: var(--fg-soft); border-bottom: 1px solid var(--rule-strong); padding-bottom: .5rem; }
.searchhit { font-size: .92rem; color: var(--fg-soft); border-left: 2px solid var(--rule); padding-left: .8rem; margin: -.4rem 0 1rem; }

/* ============================================================= pagination */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule-strong); font-family: var(--ui); font-size: .82rem; }
.pagination__link { text-decoration: none; font-weight: 600; }
.pagination__link--off { color: var(--fg-muted); opacity: .5; }
.pagination__status { color: var(--fg-muted); }

/* ============================================================ empty/errors */
.empty-state { text-align: center; padding: clamp(2rem, 6vw, 4rem) 1rem; color: var(--fg-muted); border: 1px dashed var(--rule); }
.empty-state h2 { font-size: 1.5rem; margin-bottom: .5rem; color: var(--fg); }
.errorpage { text-align: center; padding: clamp(2rem, 8vw, 4rem) 1rem 2rem; }
.errorpage__code { font-family: var(--ui); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3em; color: var(--gold); }
.errorpage__title { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 900; margin-bottom: .8rem; }
.errorpage__lede { color: var(--fg-soft); max-width: 46ch; margin-inline: auto; }
.errorpage__search { max-width: 26rem; margin: 1.4rem auto 1.2rem; }
.errorpage__search .searchbar { border: 1px solid var(--rule-strong); border-radius: 2px; padding: .1rem .2rem; }
.errorpage__search input { flex: 1; }
.errorpage__actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }

/* The "you might have wanted" half of the page. */
.errorpage-help {
  display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  border-top: 3px double var(--rule-strong); padding-top: 1.6rem; margin-bottom: 2.5rem;
}
.errorpage-help__cols { list-style: none; margin: 0; padding: 0; columns: 2; font-family: var(--ui); font-size: .9rem; }
.errorpage-help__cols li { margin-bottom: .4rem; break-inside: avoid; }
.errorpage-help__cols a { text-decoration: none; color: var(--fg-soft); }
.errorpage-help__cols a:hover { color: var(--accent-2); text-decoration: underline; }

/* ================================================================= footer */
.footer { border-top: 3px double var(--rule-strong); margin-top: 3rem; padding-block: 2rem 1.4rem; background: var(--bg-sunk); }
.footer__inner { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.footer__nameplate { font-family: var(--display); font-size: 1.5rem; font-weight: 900; margin: 0 0 .3rem; }
.footer__note { font-size: .92rem; color: var(--fg-soft); margin: 0 0 .3rem; }
.footer__note--small { font-size: .82rem; color: var(--fg-muted); }
.footer__heading { font-family: var(--ui); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--fg-muted); margin: 0 0 .5rem; }
.footer__list { list-style: none; margin: 0; padding: 0; font-family: var(--ui); font-size: .84rem; }
.footer__list li { margin-bottom: .3rem; }
.footer__list a { text-decoration: none; color: var(--fg-soft); }
.footer__list a:hover { color: var(--accent-2); text-decoration: underline; }
.footer__baseline {
  display: flex; align-items: center; gap: 1rem; margin-top: 1.8rem; padding-top: .9rem;
  border-top: 1px solid var(--rule); font-family: var(--ui); font-size: .74rem; color: var(--fg-muted);
}
.footer__rule { flex: 1; height: 1px; background: var(--rule); }

/* ============================================================= responsive */
@media (max-width: 62rem) {
  .front { grid-template-columns: 1fr; }
  .front__rail { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule-strong); padding-top: 1.4rem; }
  .frontgrid > .card { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1rem; }
  .frontgrid > .card:first-child { border-top: 0; padding-top: 0; }
}

@media (max-width: 40rem) {
  .masthead__top { font-size: .68rem; }
  .dateline__rule { display: none; }
  .sectionbar { position: static; }
  /* Only the nav's search box folds away on narrow screens. A searchbar placed
     in the page body (the 404, say) must survive — that is where it matters. */
  .sectionbar .searchbar { display: none; }
  .article__meta { flex-direction: column; align-items: flex-start; }
  .prose > p:first-of-type::first-letter { font-size: 3.2em; }
}

@media print {
  .masthead__top, .sectionbar, .footer, .article__actions, .citebox__actions, .theme-toggle, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  body::before { display: none; }
  .article { max-width: none; }
  a { text-decoration: none; color: #000; }
  .prose .pullquote { float: none; width: auto; margin-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
