/* =========================================================================
   THE CASCADIA POST — broadsheet visual system
   A free-press variant of the Republic of Cascadia civic design language.
   Same constitutional palette and system typefaces as cascadia.css; a
   distinct newspaper layout. No webfonts, no frameworks, no build step.
   ========================================================================= */

:root {
  /* Constitutional palette (from cascadia.css) */
  --green:  #0F3D2E;
  --navy:   #101A2B;
  --white:  #F3F0E8;
  --blue:   #1F5E89;
  --gold:   #B89A4B;
  --rain:   #6E7473;
  --basalt: #20242A;
  --paper:  #FAF8F1;
  --paper2: #FFFEF7;
  --line:   #D9D4C5;
  --line-d: #2A3447;
  --ink:    #16181C;
  --outage: #8C2A1F;

  /* Type — system only */
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace;

  /* Layout */
  --wide:   1180px;
  --measure: 34em;
  --gutter: clamp(16px, 3.2vw, 34px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* guard against incidental horizontal overflow; safe for sticky nav */
}

/* long proper nouns and headlines must never force a wider page */
.hed, .dek, .briefs h4, .teaser h3, .desk-head h2,
.desk-item .hed-3, .status-board .what { overflow-wrap: break-word; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 61, 46, 0.28);
  transition: border-color 120ms ease, color 120ms ease;
}
a:hover { border-bottom-color: var(--green); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

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

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px; top: 0;
  background: var(--navy); color: var(--white);
  padding: 8px 14px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em;
  z-index: 100; border-bottom: 2px solid var(--gold);
}
.skip-link:focus, .skip-link:focus-visible {
  left: 0; width: auto; height: auto;
  outline: 2px solid var(--gold); outline-offset: 2px;
}

/* =========================================================================
   NAMEPLATE
   ========================================================================= */

.np {
  border-top: 3px solid var(--navy);
  padding-top: 14px;
}
.np-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding-bottom: 12px;
}
.np .ear {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rain);
  line-height: 1.5;
}
.np .ear.left  { text-align: left; }
.np .ear.right { text-align: right; }
.np .ear strong { color: var(--green); font-weight: 700; }
.np .center { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.np .device { width: 30px; height: 30px; border: 0; }
.np h1 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  font-size: clamp(38px, 8.2vw, 92px);
  line-height: 0.92;
  letter-spacing: 0.005em;
  margin: 0;
  text-align: center;
}
.np h1 a { color: inherit; border: 0; }
.np .standing {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(13px, 1.5vw, 16px);
  color: var(--rain);
  text-align: center;
}

/* ---------- folio bar ---------- */
.folio {
  border-top: 1px solid var(--navy);
  border-bottom: 1px solid var(--navy);
  padding: 7px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--basalt);
}
.folio .sep { color: var(--gold); }
.folio .specimen { color: var(--gold); }

/* ---------- desk navigation ---------- */
.desk-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white);
  border-bottom: 2px solid var(--navy);
}
.desk-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px 26px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}
.desk-nav .desk-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px 26px;
  flex-wrap: wrap;
}
.desk-nav a {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 0;
  padding: 4px 0;
}
.desk-nav a:hover,
.desk-nav a[aria-current="page"] {
  color: var(--green);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--navy);
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

/* =========================================================================
   HEADLINE SCALE
   ========================================================================= */

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
}
.hed {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.04;
  letter-spacing: 0.004em;
  margin: 0 0 8px;
}
.hed-lead { font-size: clamp(34px, 5.6vw, 62px); }
.hed-2    { font-size: clamp(24px, 3vw, 34px); }
.hed-3    { font-size: clamp(20px, 2.2vw, 25px); }
.hed a { color: inherit; border: 0; }
.hed a:hover { color: var(--green); }

.dek {
  font-family: var(--serif);
  font-style: italic;
  color: var(--basalt);
  font-size: clamp(16px, 1.9vw, 20px);
  line-height: 1.4;
  margin: 0 0 12px;
  max-width: 46ch;
}
.byline {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--rain);
  text-transform: uppercase;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
  margin: 0 0 14px;
}
.byline .dateline { color: var(--green); font-weight: 700; }

/* =========================================================================
   FRONT PAGE GRID
   ========================================================================= */

.front { padding: clamp(20px, 3vw, 34px) 0 0; }

.front-main {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(240px, 1fr);
  gap: 0;
}
.front-lead {
  padding-right: clamp(20px, 3vw, 40px);
  border-right: 1px solid var(--line);
}
.front-rail { padding-left: clamp(20px, 3vw, 34px); }

/* lead story body in columns */
.lead-body {
  columns: 2;
  column-gap: 34px;
  column-rule: 1px solid var(--line);
  margin-top: 14px;
}
.lead-body p { margin: 0 0 12px; }
.lead-body > p:first-child::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 3.4em;
  line-height: 0.82;
  font-weight: 600;
  color: var(--green);
  padding: 4px 10px 0 0;
}
.lead-body p:last-child { margin-bottom: 0; }

.read-on {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  border-bottom: 1px solid var(--gold);
}

/* secondary story under the lead */
.front-second {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 2px solid var(--navy);
}
.front-second .two-col { columns: 2; column-gap: 34px; column-rule: 1px solid var(--line); margin-top: 10px; }
.front-second .two-col p { margin: 0 0 12px; }

/* ---------- right rail ---------- */
.rail-head {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--basalt);
  border-bottom: 2px solid var(--navy);
  padding-bottom: 6px;
  margin: 0 0 12px;
}
.rail-head + .rail-head { margin-top: 30px; }

.briefs { list-style: none; margin: 0 0 8px; padding: 0; }
.briefs li {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.briefs li:first-child { padding-top: 0; }
.briefs .b-kicker {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 3px;
}
.briefs h4 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 3px;
}
.briefs h4 a { color: inherit; border: 0; }
.briefs h4 a:hover { color: var(--green); }
.briefs p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--basalt);
}

/* ---------- status of the backbone (sidebar) ---------- */
.status-board {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: var(--paper2);
}
.status-board .sb-head {
  background: var(--navy);
  color: var(--white);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 7px 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.status-board .sb-head .specimen { color: var(--gold); }
.status-board .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
.status-board .row:last-child { border-bottom: 0; }
.status-board .row .what {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--navy);
  min-width: 0;
  flex: 1 1 auto;
}
.status-board .row .where {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--rain);
  text-transform: uppercase;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.pill.ok       { color: var(--blue); }
.pill.degraded { color: var(--gold); }
.pill.outage   { color: var(--outage); }
.pill.drill    { color: var(--rain); }

/* =========================================================================
   BELOW THE FOLD — desk teasers
   ========================================================================= */

.fold-rule {
  border: 0;
  border-top: 3px double var(--navy);
  margin: 30px 0 0;
}
.teasers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--line);
  margin-top: 0;
}
.teaser {
  padding: 20px 18px 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--line);
}
.teaser:hover { background: var(--paper); }
.teaser .t-desk {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.teaser h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.12;
  color: var(--navy);
  margin: 0;
}
.teaser p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--basalt); }

/* =========================================================================
   DESK (section) PAGES
   ========================================================================= */

.desk-head {
  padding: clamp(22px, 3.4vw, 40px) 0 18px;
  border-bottom: 2px solid var(--navy);
  text-align: center;
}
.desk-head .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.desk-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.02;
  margin: 8px 0 6px;
}
.desk-head p {
  font-family: var(--serif);
  font-style: italic;
  color: var(--rain);
  font-size: clamp(15px, 1.8vw, 19px);
  margin: 0 auto;
  max-width: 60ch;
}

.desk-list { padding: clamp(20px, 3vw, 34px) 0 0; }
.desk-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px 34px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.desk-item:first-child { padding-top: 0; }
.desk-item .meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rain);
  text-align: right;
}
.desk-item .meta .dateline { display: block; color: var(--green); font-weight: 700; }
.desk-item .dek { margin-bottom: 0; }
@media (max-width: 760px) {
  .desk-item { grid-template-columns: 1fr; gap: 8px; }
  .desk-item .meta { text-align: left; }
}

/* =========================================================================
   ARTICLE PAGES
   ========================================================================= */

.article { padding: clamp(26px, 4vw, 52px) 0 0; }
.article-head { max-width: 56ch; margin: 0 auto; text-align: center; }
.article-head .hed { margin-bottom: 12px; }
.article-head .dek { margin-left: auto; margin-right: auto; max-width: 52ch; }
.article-head .byline { text-align: center; display: inline-block; padding-left: 18px; padding-right: 18px; }

.story {
  max-width: 40em;
  margin: 22px auto 0;
  columns: 2;
  column-gap: 38px;
  column-rule: 1px solid var(--line);
}
.story p { margin: 0 0 13px; }
.story > p:first-of-type::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 3.5em;
  line-height: 0.8;
  font-weight: 600;
  color: var(--green);
  padding: 4px 10px 0 0;
}
.story h3 {
  font-family: var(--serif);
  color: var(--green);
  font-size: 20px;
  margin: 6px 0 8px;
  break-after: avoid;
}
.story .pull {
  break-inside: avoid;
  font-family: var(--serif);
  font-style: italic;
  color: var(--navy);
  font-size: 21px;
  line-height: 1.32;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  padding: 12px 0;
  margin: 6px 0 14px;
}
.story .pull cite {
  display: block;
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rain);
  margin-top: 8px;
}
@media (max-width: 720px) {
  .story { columns: 1; max-width: var(--measure); }
}

/* a single-column intro stays full width above the columned body */
.article-intro {
  max-width: 40em;
  margin: 22px auto 0;
}

.continued {
  max-width: 40em;
  margin: 18px auto 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rain);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: space-between;
}
.continued a { color: var(--green); border: 0; }

/* editorial note / oversight tag used on the opinion column */
.oversight-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--outage);
  border: 1px solid var(--outage);
  padding: 3px 9px;
  margin-bottom: 10px;
}

/* fact box / source note */
.factbox {
  break-inside: avoid;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  padding: 14px 16px;
  margin: 4px 0 14px;
  font-family: var(--sans);
}
.factbox .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}
.factbox p { font-size: 14px; line-height: 1.45; margin: 0 0 6px; }
.factbox p:last-child { margin-bottom: 0; }

/* =========================================================================
   COLOPHON / FOOTER
   ========================================================================= */

.colophon {
  margin-top: clamp(40px, 6vw, 72px);
  border-top: 3px solid var(--navy);
  background: var(--green);
  color: var(--white);
  padding: 34px 0 30px;
}
.colophon a { color: #E8E2C7; border-bottom-color: rgba(232, 226, 199, 0.35); }
.colophon .row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 40px;
  align-items: flex-start;
  justify-content: space-between;
}
.colophon .mark { display: flex; align-items: center; gap: 12px; }
.colophon .mark .device { width: 40px; height: 40px; }
.colophon .mark .name {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--white);
}
.colophon .mark .name small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #C9D8CF;
}
.colophon .links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.colophon .notice {
  width: 100%;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(232, 226, 199, 0.25);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.6;
  color: #E8E2C7;
  max-width: 70ch;
}
.colophon .independence {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #C9D8CF;
  margin-top: 8px;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 880px) {
  .front-main { grid-template-columns: 1fr; }
  .front-lead { border-right: 0; padding-right: 0; }
  .front-rail {
    padding-left: 0;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 2px solid var(--navy);
  }
  .teasers { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .lead-body, .front-second .two-col { columns: 1; column-rule: 0; }
  .np-inner { grid-template-columns: 1fr; }
  .np .ear { text-align: center; }
  .np .ear.left, .np .ear.right { text-align: center; }
  .desk-nav .wrap { justify-content: flex-start; }
  .nav-toggle { display: inline-block; margin-left: auto; }
  .desk-nav .desk-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 6px;
    padding: 6px 0 10px;
  }
  .desk-nav .desk-links.is-open { display: flex; }
}

@media (max-width: 540px) {
  .teasers { grid-template-columns: 1fr; }
}

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

/* =========================================================================
   PRINT — render like a broadsheet
   ========================================================================= */

@media print {
  .desk-nav, .nav-toggle, .skip-link, .read-on, .continued { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; border: 0; }
  .np { border-top: 3px solid #000; }
  .np h1 { color: #000; }
  .folio { border-color: #000; color: #000; }
  .folio .sep, .folio .specimen { color: #000; }
  .hed, .desk-head h2, .teaser h3, .briefs h4 { color: #000; }
  .lead-body, .story, .front-second .two-col { columns: 2; }
  .colophon { background: #fff; color: #000; border-top: 3px solid #000; }
  .colophon a, .colophon .mark .name, .colophon .notice, .colophon .independence { color: #000; }
  .pill { border-color: #000 !important; color: #000 !important; }
  .status-board .sb-head { background: #fff; color: #000; border-bottom: 1px solid #000; }
  .teaser, .desk-item, .briefs li { break-inside: avoid; }
}
