/* ==========================================================================
   The Daily Constitution — "Marginalia" print-first civic reader
   Palette DNA inherited from the domain's own early-2000s stylesheet:
   text #333333, link #999966 (olive-gold), vlink #669999 (dulled teal),
   parchment ground. Deepened here for contrast and modern rendering.
   Deliberately NOT red/white/blue: this is a nonpartisan reading resource,
   not a patriotic one.
   ========================================================================== */

:root {
  /* Ink */
  --ink:          #1d1b16;
  --ink-soft:     #46413a;
  --ink-faint:    #6f685c;

  /* Paper */
  --paper:        #faf6ec;
  --paper-alt:    #f3ecdb;
  --paper-deep:   #e9e0c9;
  --paper-dark:   #26241d;

  /* Seal — olive-gold, evolved from the original #999966 */
  --seal:         #7d6d2a;
  --seal-dark:    #574a15;
  --seal-light:   #b6a55f;
  --seal-wash:    #efe7cc;

  /* Verdigris — dulled teal, evolved from the original #669999 */
  --verdigris:      #2f6360;
  --verdigris-dark: #204744;
  --verdigris-light:#7fa8a4;

  --rule:         #d8cdae;
  --rule-strong:  #b9ab84;

  --measure:      37rem;
  --wide:         74rem;

  --serif: 'Libre Baskerville', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans:  'Commissioner', 'Helvetica Neue', Arial, sans-serif;

  --radius: 2px;
}

/* --- Safeguard: content is NEVER hidden waiting on JavaScript ------------ */
[data-aos], [data-animate], .reveal { opacity: 1 !important; transform: none !important; visibility: visible !important; }

/* --- Base ---------------------------------------------------------------- */
/* Spectre ships html{font-size:20px}, which would inflate every rem in this
   sheet by 25% (and push the reading measure past 80 characters). Restore the
   conventional root so the values below mean what they say. */
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(125,109,42,.045), transparent 55%),
    radial-gradient(circle at 84% 78%, rgba(47,99,96,.04), transparent 52%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  font-weight: 400;
  margin: 0;
}

h1, h2, h3, h4, .wordmark, .plate-caption, blockquote {
  font-family: var(--serif);
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.28; font-weight: 700; letter-spacing: -.005em; }

a { color: var(--verdigris-dark); text-decoration: none; border-bottom: 1px solid var(--verdigris-light); transition: color .15s ease, border-color .15s ease, background-color .15s ease; }
a:hover, a:focus { color: var(--seal-dark); border-bottom-color: var(--seal); background-color: rgba(182,165,95,.14); }
a:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }

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

strong { font-weight: 600; color: var(--ink); }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

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

/* --- Skip link ----------------------------------------------------------- */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 60;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border: 0;
  font-family: var(--sans); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
}
.skip:focus { left: 0; }

/* --- Shell --------------------------------------------------------------- */
.shell { max-width: var(--wide); margin: 0 auto; padding: 0 1.4rem; }

/* --- Dateline strip ------------------------------------------------------ */
.dateline {
  background: var(--paper-dark);
  color: var(--paper-deep);
  font-family: var(--sans);
  font-size: .625rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  text-align: center;
  padding: .5rem 1rem;
  font-weight: 500;
}
.dateline span { white-space: nowrap; }
.dateline .sep { color: var(--seal-light); margin: 0 .3rem; }

@media (max-width: 560px) {
  .dateline { font-size: .55rem; letter-spacing: .2em; line-height: 1.9; padding: .45rem .8rem; }
  .dateline .sep { margin: 0 .15rem; }
}

/* --- Masthead ------------------------------------------------------------ */
.masthead { padding: 2.1rem 0 0; }
.masthead-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }

.wordmark {
  display: inline-block;
  font-size: clamp(1.85rem, 5.2vw, 3.15rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
  border-bottom: 0;
  margin: 0;
}
.wordmark:hover, .wordmark:focus { background: none; color: var(--seal-dark); }
.wordmark .the { display: block; font-size: .3em; letter-spacing: .42em; text-transform: uppercase; font-family: var(--sans); font-weight: 600; color: var(--seal); margin-bottom: .55rem; }

.masthead-note {
  font-size: .74rem;
  color: var(--ink-faint);
  max-width: 22rem;
  line-height: 1.5;
  padding-bottom: .35rem;
}

.rules { margin-top: 1.15rem; }
.rules .r1 { height: 3px; background: var(--seal); }
.rules .r2 { height: 1px; background: var(--rule-strong); margin-top: 3px; }

/* --- Navigation (no JS: scrollable rail on small screens) ---------------- */
.mainnav { border-bottom: 1px solid var(--rule); background: rgba(250,246,236,.94); }
.mainnav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 0; flex-wrap: wrap;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.mainnav li { flex: 0 0 auto; }
.mainnav a {
  display: block;
  padding: .8rem .78rem;
  font-size: .705rem;
  letter-spacing: .155em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.mainnav a:hover, .mainnav a:focus { color: var(--seal-dark); background: var(--seal-wash); border-bottom-color: var(--seal-light); }
.mainnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--seal); }

@media (max-width: 640px) {
  .mainnav ul { flex-wrap: nowrap; }
  .mainnav { position: relative; }
  .mainnav::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 2rem; background: linear-gradient(to right, rgba(250,246,236,0), rgba(250,246,236,.96)); pointer-events: none; }
}

/* --- Lede: home hero (renamed off .hero to avoid Spectre collision) ---------------------------------------------------- */
.lede { position: relative; margin-top: 2.2rem; }
.lede-figure { margin: 0; }
.lede-figure img { width: 100%; object-fit: cover; max-height: 30rem; filter: saturate(.82) contrast(1.02); }
.lede-card {
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-top: 4px solid var(--seal);
  padding: 1.9rem 1.8rem 1.6rem;
  max-width: 33rem;
  box-shadow: 0 12px 34px rgba(29,27,22,.09);
}
.lede-card h1 { font-size: clamp(1.6rem, 3.7vw, 2.35rem); margin: 0 0 .8rem; }
.lede-card p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
@media (min-width: 900px) {
  .lede-card { position: relative; margin: -6.5rem 0 0 2.5rem; }
}
@media (max-width: 899px) {
  .lede-card { margin-top: -1.5rem; margin-left: .6rem; margin-right: .6rem; position: relative; }
}

/* --- Article ------------------------------------------------------------- */
main { display: block; padding-bottom: 4rem; }

.article { max-width: var(--measure); margin: 3rem auto 0; }
.article.is-home { margin-top: 2.6rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: .66rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--seal);
  font-weight: 600;
  margin: 0 0 .9rem;
}

.article h1 {
  font-size: clamp(1.75rem, 4.4vw, 2.6rem);
  margin: 0 0 1.3rem;
  letter-spacing: -.015em;
}
.article h1::after {
  content: '';
  display: block;
  width: 3.4rem;
  height: 3px;
  background: var(--seal);
  margin-top: 1.1rem;
}

.article { counter-reset: section; }
.article h2 {
  counter-increment: section;
  font-size: 1.32rem;
  margin: 2.9rem 0 .85rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  position: relative;
}
.article h2::before {
  content: counter(section, upper-roman);
  display: block;
  font-family: var(--sans);
  font-size: .62rem;
  letter-spacing: .26em;
  color: var(--seal);
  font-weight: 600;
  margin-bottom: .55rem;
}
.article h3 { font-size: 1.06rem; margin: 1.9rem 0 .55rem; color: var(--ink-soft); }

.article p { margin: 0 0 1.15rem; }

.article > p:first-of-type { font-size: 1.09rem; color: var(--ink-soft); }
.article.has-dropcap > p:first-of-type::first-letter {
  font-family: var(--serif);
  font-weight: 700;
  float: left;
  font-size: 3.5rem;
  line-height: .82;
  padding: .18rem .55rem .1rem 0;
  color: var(--seal-dark);
}

.article ul, .article ol { margin: 0 0 1.3rem; padding-left: 1.25rem; }
.article li { margin-bottom: .55rem; }
.article ul { list-style: none; padding-left: 1.2rem; }
.article ul > li { position: relative; }
.article ul > li::before {
  content: '';
  position: absolute;
  left: -1.05rem; top: .72em;
  width: .38rem; height: .38rem;
  background: var(--seal-light);
  transform: rotate(45deg);
}
.article ol { list-style: decimal; }
.article ol > li::marker { color: var(--seal); font-family: var(--sans); font-size: .9em; font-weight: 600; }

.article dl { margin: 0 0 1.5rem; }
.article dt { font-family: var(--sans); font-weight: 600; color: var(--ink); margin-top: 1.05rem; font-size: .97rem; }
.article dd { margin: .2rem 0 0; color: var(--ink-soft); padding-left: 0; border-left: 2px solid var(--paper-deep); padding-left: .85rem; }

.article blockquote {
  margin: 1.8rem 0;
  padding: .3rem 0 .3rem 1.5rem;
  border-left: 3px solid var(--seal-light);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.03rem;
}
.article blockquote p:last-child { margin-bottom: 0; }

.article table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: .93rem; }
.article th, .article td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--rule); }
.article th { font-family: var(--sans); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--seal-dark); }

/* --- Plate (interior figure) --------------------------------------------- */
.plate { margin: 2.4rem 0 2.6rem; }
.plate img { width: 100%; filter: saturate(.82) contrast(1.02); border: 1px solid var(--rule); }
.plate-caption {
  font-size: .78rem;
  font-style: italic;
  color: var(--ink-faint);
  margin-top: .65rem;
  padding-top: .55rem;
  border-top: 1px solid var(--rule);
  line-height: 1.55;
}
.plate--wide { max-width: none; }

/* --- Source note --------------------------------------------------------- */
.source-note {
  margin: 3.2rem 0 0;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--verdigris);
  padding: 1.3rem 1.4rem;
}
.source-note h2 {
  all: unset;
  display: block;
  font-family: var(--sans);
  font-size: .66rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--verdigris-dark);
  font-weight: 600;
  margin-bottom: .7rem;
}
.source-note p { margin: 0 0 .5rem; font-size: .92rem; color: var(--ink-soft); }
.source-note ul { list-style: none; margin: 0; padding: 0; }
.source-note li { margin: 0 0 .4rem; font-size: .92rem; }
.source-note li:last-child { margin-bottom: 0; }

/* --- Home: section index ------------------------------------------------- */
.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 2.8rem 0 1rem;
}
.index-grid a {
  background: var(--paper);
  padding: 1.25rem 1.3rem;
  border-bottom: 0;
  display: block;
}
.index-grid a:hover, .index-grid a:focus { background: var(--seal-wash); }
.index-grid .n {
  display: block;
  font-family: var(--sans);
  font-size: .6rem;
  letter-spacing: .26em;
  color: var(--seal);
  font-weight: 600;
  margin-bottom: .5rem;
}
.index-grid .t { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.02rem; color: var(--ink); line-height: 1.3; margin-bottom: .4rem; }
.index-grid .d { display: block; font-size: .85rem; color: var(--ink-faint); line-height: 1.5; }

/* --- Contact form -------------------------------------------------------- */
.form-block { margin: 2.4rem 0 0; background: var(--paper-alt); border: 1px solid var(--rule); padding: 1.6rem 1.5rem; }
.form-block h2 {
  counter-increment: none;
  border-top: 0;
  padding-top: 0;
  margin: 0 0 1.2rem;
  font-size: 1.15rem;
}
.form-block h2::before { content: none; }
.form-block label { display: block; font-family: var(--sans); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); margin: 0 0 .4rem; }
.form-block .field { margin-bottom: 1.15rem; }
.form-block input, .form-block textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: .98rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: .65rem .75rem;
  box-sizing: border-box;
}
.form-block input:focus, .form-block textarea:focus { outline: none; border-color: var(--seal); box-shadow: 0 0 0 3px rgba(182,165,95,.22); }
.form-block textarea { min-height: 9rem; resize: vertical; }
.btn-seal {
  display: inline-block;
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--paper);
  background: var(--verdigris-dark);
  border: 1px solid var(--verdigris-dark);
  border-radius: var(--radius);
  padding: .78rem 1.7rem;
  cursor: pointer;
}
.btn-seal:hover, .btn-seal:focus { background: var(--seal-dark); border-color: var(--seal-dark); color: var(--paper); }

/* --- 404 ----------------------------------------------------------------- */
.notfound { max-width: var(--measure); margin: 5rem auto; text-align: center; }
.notfound .errcode { font-family: var(--serif); font-size: 5rem; line-height: 1; color: var(--seal-light); margin: 0 0 1rem; }
.notfound h1 { font-size: 1.7rem; margin: 0 0 1rem; }
.notfound h1::after { margin-left: auto; margin-right: auto; }
.notfound p { color: var(--ink-soft); }
.notfound ul { list-style: none; padding: 0; margin: 1.8rem 0 0; }
.notfound li { display: inline-block; margin: 0 .6rem .6rem; }

/* --- Footer -------------------------------------------------------------- */
.sitefoot {
  background: var(--paper-dark);
  color: var(--paper-deep);
  margin-top: 3rem;
  border-top: 4px solid var(--seal);
  padding: 3rem 0 2rem;
  font-size: .88rem;
}
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 2rem; }
.sitefoot h2 {
  font-family: var(--sans);
  font-size: .64rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--seal-light);
  font-weight: 600;
  margin: 0 0 .9rem;
}
.sitefoot ul { list-style: none; margin: 0; padding: 0; }
.sitefoot li { margin-bottom: .5rem; }
.sitefoot a { color: var(--paper-deep); border-bottom-color: rgba(182,165,95,.42); }
.sitefoot a:hover, .sitefoot a:focus { color: #fff; background: rgba(182,165,95,.16); border-bottom-color: var(--seal-light); }
.sitefoot p { color: #b3ab97; line-height: 1.62; margin: 0 0 .8rem; }
.sitefoot strong { color: var(--seal-light); font-weight: 600; }
.foot-base { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(217,205,174,.2); font-size: .78rem; color: #9a927e; }
.foot-base p { color: #9a927e; margin-bottom: .5rem; }

/* --- Print --------------------------------------------------------------- */
@media print {
  .mainnav, .dateline, .sitefoot, .plate, .lede-figure { display: none; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .article { max-width: none; }
  a { color: #000; border: 0; }
}

/* --- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
