/* ============================================================
   almanac — modern almanac / old-money editorial
   Ivory paper, deep green ink, oxblood accent. Double rules,
   engraved ornaments, drop caps, small-caps masthead.
   All colors/fonts/sizing live in :root — factory overrides
   them in site.css.
   ============================================================ */

:root {
  --paper: #f6f1e5;          /* ivory */
  --ink: #20372a;            /* deep green ink */
  --muted: #68715f;          /* sage-grey for secondary text */
  --accent: #6e1b26;         /* oxblood */
  --accent2: #a8873c;        /* tarnished gold */
  --font-head: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --radius: 2px;
  --maxw: 46rem;

  --almanac-paper-deep: #efe8d8;   /* slightly darker ivory for wells */
  --almanac-rule: #cfc4ab;         /* hairline rule colour */
  --almanac-mint-bg: #e6efe2;      /* stamp tint (mint) */
  --almanac-mint-ink: #33502f;
  --almanac-lav-bg: #eae6f0;       /* stamp tint (lavender) */
  --almanac-lav-ink: #4a3f63;
  --almanac-measure-wide: 62rem;
}

/* ---------- base ---------- */

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

html { font-size: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body, Georgia, serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transition: text-decoration-color 160ms ease, color 160ms ease;
}
a:hover { text-decoration-color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-head, Georgia, serif);
  font-weight: 700;
  line-height: 1.18;
  color: var(--ink);
  margin: 0 0 0.6em;
}

::selection { background: var(--accent); color: var(--paper); }

/* ---------- masthead ---------- */

.masthead {
  max-width: var(--almanac-measure-wide);
  margin: 0 auto;
  padding: 1.6rem 1.25rem 0;
  text-align: center;
}

.masthead-topline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--almanac-rule);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead-nameplate {
  padding: 1.9rem 0 1.15rem;
  border-bottom: 3px double var(--ink);
}

.masthead-name {
  display: inline-block;
  font-family: var(--font-head, Georgia, serif);
  font-weight: 800;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  font-variant-caps: small-caps;
  color: var(--ink);
  text-decoration: none;
}
.masthead-name:hover { color: var(--accent); }

.masthead-tagline {
  margin: 0.55rem 0 0;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
}

.section-nav {
  border-bottom: 1px solid var(--ink);
  padding: 0.5rem 0;
}

.section-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.4rem;
}

.section-nav-list a {
  font-family: var(--font-head, Georgia, serif);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.section-nav-list a:hover { color: var(--accent); }

/* ---------- layout ---------- */

.page {
  max-width: var(--almanac-measure-wide);
  margin: 0 auto;
  padding: 2.2rem 1.25rem 3rem;
}

.article { max-width: var(--maxw); margin: 0 auto; }

/* ---------- rules & ornaments ---------- */

.rule-double {
  border: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  height: 3px;
  margin: 1.4rem 0 0;
}

.rule-orn {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 2.6rem auto;
  max-width: var(--maxw);
}
.rule-orn::before,
.rule-orn::after {
  content: "";
  flex: 1;
  height: 3px;
  border-top: 1px solid var(--almanac-rule);
  border-bottom: 1px solid var(--almanac-rule);
}
.rule-orn-diamond {
  width: 0.55rem;
  height: 0.55rem;
  background: var(--accent2);
  transform: rotate(45deg);
  flex: none;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--almanac-rule);
}

/* ---------- kicker / chips / stamps ---------- */

.kicker {
  margin: 0 0 0.9rem;
  text-align: center;
}

.chip {
  display: inline-block;
  font-family: var(--font-head, Georgia, serif);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.28em 0.85em 0.22em;
  background: transparent;
}

.chip-plain { font-size: 0.66rem; }

.stamp {
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  margin-left: 0.6em;
  vertical-align: baseline;
  transform: translateY(0.05em);
  border: 1px solid var(--almanac-rule);
}
.stamp-mint { background: var(--almanac-mint-bg); border-color: var(--almanac-mint-ink); }
.stamp-lav  { background: var(--almanac-lav-bg);  border-color: var(--almanac-lav-ink); }

/* ---------- article head ---------- */

.article-head { margin-bottom: 2rem; }

.article-title {
  font-size: clamp(1.9rem, 4.6vw, 2.9rem);
  text-align: center;
  margin: 0.35em 0 0.45em;
}

.standfirst {
  font-family: var(--font-body, Georgia, serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
  max-width: 38rem;
  margin: 0 auto 1.3rem;
}

.byline {
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.byline-author {
  font-variant-caps: small-caps;
  letter-spacing: 0.1em;
  color: var(--ink);
  font-weight: 600;
}

.byline-tick { margin: 0 0.55em; color: var(--accent2); }

.readtime { font-style: italic; }

/* ---------- body copy ---------- */

.article p { margin: 0 0 1.35em; }

.article h2 {
  font-size: 1.55rem;
  margin: 2.2em 0 0.55em;
  padding-top: 1.1em;
  border-top: 1px solid var(--almanac-rule);
}
.article h2::before {
  content: "§";
  color: var(--accent2);
  margin-right: 0.45em;
  font-weight: 400;
}

.article h3 { font-size: 1.2rem; margin: 1.8em 0 0.5em; }

.article ul, .article ol { margin: 0 0 1.35em; padding-left: 1.4em; }
.article li { margin-bottom: 0.4em; }

.article blockquote {
  margin: 1.8em 0;
  padding: 0.2em 0 0.2em 1.4em;
  border-left: 2px solid var(--accent2);
  font-style: italic;
  color: var(--muted);
}

.article a { text-underline-offset: 0.2em; }

/* ---------- fragment: ledegraf (answer-first, drop cap) ---------- */

.ledegraf {
  font-size: 1.16rem;
  line-height: 1.65;
  padding: 1.2rem 1.35rem;
  background: var(--almanac-paper-deep);
  border-top: 1px solid var(--ink);
  border-bottom: 3px double var(--ink);
  margin: 0 0 1.8em;
}

.ledegraf::first-letter {
  font-family: var(--font-head, Georgia, serif);
  font-weight: 800;
  font-size: 3.15em;
  line-height: 0.82;
  float: left;
  padding: 0.08em 0.14em 0 0;
  color: var(--accent);
}

/* ---------- fragment: datatable ---------- */

.datatable {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0 2em;
  font-size: 0.92rem;
  line-height: 1.5;
  border-top: 3px double var(--ink);
  border-bottom: 3px double var(--ink);
}

.datatable caption {
  caption-side: top;
  font-family: var(--font-head, Georgia, serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 0 0 0.7em;
}

.datatable th {
  font-family: var(--font-head, Georgia, serif);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 0.55em 0.9em 0.5em 0;
}

.datatable td {
  padding: 0.55em 0.9em 0.55em 0;
  border-bottom: 1px solid var(--almanac-rule);
  vertical-align: top;
}

.datatable tbody tr:nth-child(even) td { background: var(--almanac-paper-deep); }
.datatable tbody tr:last-child td { border-bottom: 0; }

/* ---------- fragment: faqblock ---------- */

.faqblock {
  margin: 2.2em 0;
  border-top: 3px double var(--ink);
  border-bottom: 1px solid var(--almanac-rule);
  padding: 0.4em 0 1em;
}

.faqblock h2 {
  border-top: 0;
  padding-top: 0.4em;
  margin-top: 0.6em;
}
.faqblock h2::before { content: none; }

.faqblock details {
  border-bottom: 1px solid var(--almanac-rule);
  padding: 0.75em 0;
}
.faqblock details:last-child { border-bottom: 0; }

.faqblock summary {
  cursor: pointer;
  font-family: var(--font-head, Georgia, serif);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
  list-style: none;
  padding-left: 1.6em;
  position: relative;
}
.faqblock summary::-webkit-details-marker { display: none; }
.faqblock summary::before {
  content: "Q.";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-variant-caps: small-caps;
}
.faqblock summary:hover { color: var(--accent); }

.faqblock details p {
  margin: 0.6em 0 0.2em;
  padding-left: 1.85em;
}

/* ---------- fragment: pullquote ---------- */

.pullquote {
  margin: 2.2em auto;
  max-width: 34rem;
  text-align: center;
  font-family: var(--font-head, Georgia, serif);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.45;
  color: var(--accent);
  padding: 1.2em 1em;
  border-top: 3px double var(--ink);
  border-bottom: 3px double var(--ink);
}
.pullquote::before {
  content: "\201C";
  display: block;
  font-size: 2.2rem;
  line-height: 0.5;
  color: var(--accent2);
  margin-bottom: 0.35em;
}

/* ---------- article footer ---------- */

.article-foot { margin-top: 2.4rem; }

.article-foot-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------- front page ---------- */

.frontpage-intro {
  max-width: var(--maxw);
  margin: 0 auto 1rem;
}

.frontpage-lede {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  text-align: center;
  margin: 0.4em 0 0.55em;
}

.frontpage-blurb {
  font-size: 1.14rem;
  font-style: italic;
  text-align: center;
  color: var(--muted);
  max-width: 40rem;
  margin: 0 auto 1.6em;
}

.frontpage-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: var(--almanac-measure-wide);
  margin: 0 auto;
}

.frontpage-section {
  border-top: 3px double var(--ink);
  padding-top: 1.1rem;
}

.frontpage-section p { font-size: 0.95rem; color: var(--muted); margin: 0; }

.frontpage-section-head {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 0.7em;
}

.frontpage-latest { max-width: var(--maxw); margin: 0 auto; }

.latest-head {
  text-align: center;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  margin: 0 0 0.4em;
}

.frontpage-mission {
  max-width: var(--maxw);
  margin: 2.8rem auto 0;
  border-top: 1px solid var(--almanac-rule);
  padding-top: 1.6rem;
}
.frontpage-mission p { color: var(--muted); }

/* ---------- story list / cards ---------- */

.storylist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.story-card {
  padding: 1.6rem 0 1.5rem;
  border-top: 1px solid var(--almanac-rule);
}
.story-card:first-child { border-top: 0; }

.card-kicker {
  margin: 0 0 0.55em;
  display: flex;
  align-items: center;
}

.card-title {
  font-size: 1.35rem;
  margin: 0 0 0.45em;
}
.card-title a {
  color: var(--ink);
  text-decoration: none;
}
.card-title a:hover { color: var(--accent); }

.card-teaser {
  margin: 0 0 0.7em;
  color: var(--muted);
  font-size: 0.98rem;
}

.card-meta {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  font-variant-caps: small-caps;
}

/* ---------- static pages ---------- */

.static-page p { max-width: none; }

.error-page { text-align: left; }

/* ---------- colophon ---------- */

.colophon {
  border-top: 3px double var(--ink);
  margin-top: 1rem;
}

.colophon-inner {
  max-width: var(--almanac-measure-wide);
  margin: 0 auto;
  padding: 2rem 1.25rem 2.6rem;
  text-align: center;
}

.colophon-name {
  font-family: var(--font-head, Georgia, serif);
  font-weight: 800;
  font-variant-caps: small-caps;
  letter-spacing: 0.06em;
  font-size: 1.25rem;
  margin: 0 0 0.2em;
}

.colophon-line {
  font-style: italic;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 1.1rem;
}

.colophon-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.3rem;
  margin-bottom: 1.1rem;
}
.colophon-nav a {
  font-family: var(--font-head, Georgia, serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.colophon-nav a:hover { color: var(--accent); }

.colophon-copy {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .frontpage-sections { grid-template-columns: 1fr; gap: 1.6rem; }
  .masthead-topline { flex-direction: column; align-items: center; gap: 0.2rem; }
  .datatable { display: block; overflow-x: auto; }
}

/* ---------- motion & print ---------- */

@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
}

@media print {
  body { background: #fff; font-size: 11pt; }
  .section-nav, .colophon-nav, .stamp { display: none; }
  .masthead-nameplate, .rule-orn::before, .rule-orn::after,
  .datatable, .pullquote, .ledegraf { border-color: #000; }
  a { color: #000; text-decoration: none; }
  .ledegraf { background: none; }
}
