@import url("/fonts.css");

:root {
  --ink: #1c1914;
  --spruce: #1c3a2e;
  --spruce-deep: #12261e;
  --brass: #9a6a32;
  --brass-bright: #b07a3a;
  --paper: #f3eee4;
  --paper-2: #e8e0d2;
  --rule: #c4b8a3;
  --muted: #5c564c;
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --text: "Source Serif 4", "Source Serif Pro", "Iowan Old Style", Palatino, Georgia, serif;
  --wrap: 1120px;
  --measure: 38.5rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.65;
  font-weight: 400;
  font-optical-sizing: auto;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--spruce); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brass); }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-transform: none;
  color: var(--spruce-deep);
}
h1 {
  font-size: clamp(2.35rem, 5.4vw, 4.35rem);
  margin: 0 0 0.7rem;
  font-variation-settings: "opsz" 72, "SOFT" 0, "WONK" 1;
}
h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  margin: 2.4rem 0 0.7rem;
  font-variation-settings: "opsz" 36;
}
h3 { font-size: 1.2rem; margin: 1.5rem 0 0.4rem; }
p { margin: 0 0 1rem; }
.wrap { width: min(var(--wrap), calc(100% - 2.4rem)); margin-inline: auto; }
.measure { max-width: var(--measure); }
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--spruce); color: var(--paper); padding: 0.5rem 1rem;
}
.skip:focus { left: 0; z-index: 100; }

/* Publication masthead */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  padding: 0.85rem 0 0.95rem;
}
.header-inner {
  width: min(var(--wrap), calc(100% - 2.4rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--spruce-deep);
  flex-shrink: 0;
}
.logo:hover { color: var(--spruce-deep); }
.logo-mark { width: 48px; height: 48px; display: block; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 40, "WONK" 1;
}
.logo-sub {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 0.18rem;
  color: var(--ink);
  font-style: italic;
  letter-spacing: 0;
}
.nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.15rem 0.85rem;
  font-size: 0.92rem;
}
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--brass); }
.nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--spruce); }
.nav-cta {
  color: var(--spruce) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  margin-left: 0.3rem;
}
.menu-btn {
  display: none;
  font-family: var(--text);
  font-size: 0.95rem;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 0.15rem 0;
  cursor: pointer;
  color: var(--ink);
}
.menu-toggle { display: none; }

/* Homepage lead */
.lead { padding: 2.6rem 0 0; }
.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2rem 2.4rem;
  align-items: end;
}
.dateline {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.lead h1 { max-width: 16ch; }
.deck {
  font-size: 1.22rem;
  line-height: 1.45;
  max-width: 38rem;
  margin: 0 0 1rem;
  color: var(--ink);
}
.byline {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
  max-width: 40rem;
}
.lead-photo {
  margin: 0;
}
.lead-photo img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: 40% 55%;
}
.lead-photo figcaption,
.figure-photo figcaption,
.chart figcaption,
.diagram figcaption {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
  margin-top: 0.4rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.35rem;
}

/* Numbered sections */
.section { padding: 0.5rem 0 1.2rem; }
.section-head {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.8rem;
  align-items: baseline;
  margin: 2.6rem 0 0.9rem;
  border-top: 1px solid var(--ink);
  padding-top: 0.7rem;
}
.section-head h2 { margin: 0; }
.section-num {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  color: var(--brass);
  font-size: 1.05rem;
}

/* Almanac tables */
.data-table, .guide-index {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin: 0.4rem 0 1.1rem;
}
.data-table th, .guide-index th {
  text-align: left;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--ink);
  padding: 0.4rem 0.6rem 0.4rem 0;
}
.data-table td, .guide-index td {
  text-align: left;
  border-bottom: 1px solid var(--rule);
  padding: 0.55rem 0.6rem 0.55rem 0;
  vertical-align: top;
}
.data-table tr:last-child td, .guide-index tr:last-child td { border-bottom: 1px solid var(--ink); }
.temp-table td:nth-child(n+2) { font-variant-numeric: tabular-nums; }

/* Temperature chart */
.chart { margin: 0.4rem 0 1.4rem; }
.chart svg { width: 100%; height: auto; display: block; max-width: 44rem; background: transparent; }
.chart-scroll { overflow-x: auto; }

/* Tank diagram */
.diagram { margin: 1rem 0 1.5rem; max-width: 40rem; }
.diagram svg { width: 100%; height: auto; display: block; }

/* Story heads on interior pages */
.story-head { padding: 1.8rem 0 0.4rem; }
.story-head h1 { max-width: 22ch; }
.story-head .deck { font-size: 1.15rem; }
.story-photo {
  margin: 1.2rem 0 0.4rem;
}
.story-photo img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}
.figure-photo { margin: 1rem 0 1.3rem; max-width: 36rem; }
.figure-photo img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center;
}

.breadcrumbs {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 0.85rem 0 0;
}
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brass); }

/* Quote panel — a labeled request, not a marketing banner */
.quote-band {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 2rem 0 2.2rem;
  margin-top: 2.5rem;
  background: var(--paper-2);
}
.quote-form h2 {
  margin-top: 0;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}
.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.2rem;
  margin: 1rem 0 0;
}
.quote-form .full { grid-column: 1 / -1; }
.quote-form label { display: block; font-size: 0.92rem; margin-bottom: 0.2rem; }
.quote-form input, .quote-form select, .quote-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 0.4rem 0;
  font: inherit;
  font-size: 1rem;
  background: transparent;
  color: var(--ink);
  border-radius: 0;
}
.quote-form textarea { min-height: 5.5rem; resize: vertical; }
.quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus {
  outline: none;
  border-bottom-color: var(--brass);
}
.form-actions { margin-top: 1.1rem; }
.quote-note { font-size: 0.88rem; color: var(--muted); margin: 0.7rem 0 0; }
.quote-confirm {
  border-top: 1px solid var(--spruce);
  padding: 0.8rem 0;
  margin: 0;
  color: var(--spruce-deep);
}
.required { color: var(--brass); }

.btn {
  display: inline-block;
  font-family: var(--text);
  font-size: 1rem;
  font-weight: 600;
  color: var(--paper);
  background: var(--spruce);
  border: 1px solid var(--spruce);
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 0;
  cursor: pointer;
}
.btn:hover { background: var(--spruce-deep); color: var(--paper); border-color: var(--spruce-deep); }
.btn-text {
  display: inline;
  font: inherit;
  font-weight: 600;
  color: var(--spruce);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.inline-cta {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 0;
  margin: 1.8rem 0;
}
.inline-cta h2 { margin-top: 0; font-size: 1.35rem; }
.inline-cta p:last-child { margin-bottom: 0; }

/* FAQ */
details {
  border-top: 1px solid var(--rule);
  padding: 0.55rem 0;
}
details:last-of-type { border-bottom: 1px solid var(--ink); }
summary {
  cursor: pointer;
  font-weight: 600;
  font-family: var(--display);
  font-size: 1.05rem;
}
details p { margin: 0.4rem 0 0.3rem; }

.sources { margin-top: 2.4rem; border-top: 1px solid var(--ink); padding-top: 0.6rem; }
.sources ol { padding-left: 1.2rem; }
.sources a { overflow-wrap: anywhere; }
.credit-list { padding-left: 1.15rem; }
.credit-list li { margin-bottom: 0.7rem; }

/* Footer as colophon */
.site-footer {
  background: var(--spruce-deep);
  color: #e6e0d4;
  padding: 2.2rem 0 1.8rem;
  font-size: 0.95rem;
}
.site-footer h2 {
  color: #f3eee4;
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
}
.site-footer a { color: #f3eee4; text-decoration: none; }
.site-footer a:hover { color: #e2c08a; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 1.6rem 2rem;
}
.footer-grid p { color: #cfc6b6; }
.footer-grid nav div, .footer-areas li { margin-bottom: 0.28rem; }
.footer-areas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.1rem 0.8rem; }
.footer-meta {
  border-top: 1px solid #3a5246;
  margin: 1.6rem 0 0;
  padding-top: 0.9rem;
  font-size: 0.84rem;
  color: #b7b0a2;
}
.photo-credits { font-size: 0.84rem; color: #b7b0a2; margin: 0.45rem 0 0; }
.photo-credits a { color: #d9d0c0; }
.lookup-hint { font-size: 0.82rem; color: #b7b0a2; margin-top: 0.5rem; }

@media (max-width: 900px) {
  .lead-grid, .footer-grid { grid-template-columns: 1fr; }
  .lead-photo img, .story-photo img { height: 240px; }
  .menu-btn { display: inline-block; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1.2rem 1rem;
    gap: 0;
    z-index: 20;
  }
  .site-header { position: relative; }
  .nav a { padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
  .nav-cta { margin: 0.6rem 0 0; }
  .menu-toggle:checked ~ .nav { display: flex; }
  .logo-mark { width: 40px; height: 40px; }
  .logo-name { font-size: 1.15rem; }
}
@media (max-width: 700px) {
  .quote-grid { grid-template-columns: 1fr; }
  .footer-areas { grid-template-columns: 1fr; }
  h1 { font-size: 2.15rem; }
  .deck { font-size: 1.08rem; }
  .figure-photo img { height: 200px; }
}
