:root {
  color-scheme: light;
  --paper: #f6f9f7;
  --white: #fff;
  --ink: #192d36;
  --muted: #475d66;
  --line: #d5e1df;
  --accent: #205b7e;
  --deep: #163950;
  --green: #357439;
  --amber: #ffb22d;
  --soft: #eaf2f7;
  --leaf: #edf5e9;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  font: 100%/1.55 var(--sans);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
}

main { flex: 1; }
h1, h2, h3, p { margin-top: 0; }

a {
  color: var(--accent);
  text-underline-offset: .18em;
  overflow-wrap: anywhere;
}

a:hover { text-decoration-thickness: 2px; }

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

.wrap { width: min(100% - 3rem, 69rem); margin-inline: auto; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  z-index: 2;
  inset: .5rem auto auto .5rem;
  padding: .6rem 1rem;
  background: var(--white);
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }

.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-inner { min-height: 4.5rem; }
.wordmark { display: block; flex: 0 1 13rem; min-width: 0; }
.wordmark img { display: block; width: 100%; height: auto; }
.site-nav { flex: none; color: var(--accent); font-size: .9rem; font-weight: 650; text-decoration: none; }
.site-nav:hover { text-decoration: underline; }

.hero {
  color: var(--white);
  background: linear-gradient(115deg, var(--deep) 15%, #215467 67%, #286044);
  border-bottom: 4px solid #7da9c5;
}

.hero-inner { padding-block: clamp(2.7rem, 5vw, 4.6rem); }

.hero h1::before {
  content: "";
  display: block;
  width: 2.25rem;
  height: 3px;
  margin-bottom: 1.15rem;
  background: var(--amber);
}

.hero h1 {
  margin-bottom: .7rem;
  font-size: clamp(2.35rem, 7vw, 4.65rem);
  line-height: 1.05;
  letter-spacing: -.058em;
}

.hero-copy {
  margin: 0;
  color: #e5f1f3;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
}

.archive-intro { padding-block-start: clamp(1.8rem, 4vw, 2.9rem); }

.archive-note {
  max-width: 70ch;
  padding-inline-start: 1rem;
  border-inline-start: 3px solid var(--green);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
}

.archive-note p { margin: 0; }
.archive-note p + p { margin-block-start: .8rem; }

.archive-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 18rem);
  align-items: start;
  gap: clamp(2rem, 5vw, 4.4rem);
  padding-block: 2.9rem 4.5rem;
}

.archive-content h2 { margin-bottom: 1.05rem; font-size: 1.75rem; letter-spacing: -.045em; }

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid #9db2bc;
  border-radius: .55rem;
  background: var(--white);
}

.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px #b6d4e6; }
.search-icon {
  position: absolute;
  pointer-events: none;
  width: .84rem;
  height: .84rem;
  top: 50%;
  left: 1rem;
  transform: translateY(-57%);
  border: 2px solid var(--muted);
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: .43rem;
  height: 2px;
  right: -.33rem;
  bottom: -.15rem;
  background: var(--muted);
  transform: rotate(46deg);
}

.search input {
  appearance: none;
  min-width: 0;
  width: 100%;
  min-height: 3.35rem;
  padding: .65rem .75rem .65rem 2.65rem;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.search input:focus { outline: 0; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input::-webkit-search-cancel-button { appearance: none; }

.clear-search {
  margin-right: .5rem;
  min-height: 2.3rem;
  padding: .3rem .7rem;
  background: var(--soft);
  color: var(--accent);
  border: 0;
  border-radius: .35rem;
  cursor: pointer;
  font: 600 .875rem var(--sans);
}

.result-count { margin: .8rem 0 1.6rem; color: var(--muted); font-size: .9rem; }

.post-group { scroll-margin-top: 1rem; }
.post-group + .post-group { margin-top: 2.5rem; }
.post-group h3 {
  margin-bottom: .45rem;
  color: var(--green);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.post-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.post-row {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem 1.25rem;
  padding: .9rem .15rem;
  border-bottom: 1px solid var(--line);
}

.post-row:hover, .post-row:focus-within { background: var(--soft); }
.post-row a { color: var(--ink); font-weight: 650; text-decoration: none; }
.post-row a:hover, .post-row a:focus-visible { color: var(--accent); text-decoration: underline; }
.post-row a::after { content: ""; position: absolute; inset: 0; }
.post-row time { flex: none; color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }

.archive-card { padding: 1.35rem; background: var(--leaf); border: 1px solid #d5e3d0; border-radius: .65rem; }
.archive-card h2 { margin-bottom: .55rem; font-size: 1.05rem; }
.archive-card p { margin-bottom: 1.05rem; color: var(--muted); font-size: .95rem; }
.archive-card dl { margin: 0; border-top: 1px solid #d0dfca; font-size: .875rem; }
.archive-card dl div { display: flex; justify-content: space-between; gap: .6rem; padding-top: .55rem; }
.archive-card dt { color: var(--muted); }
.archive-card dd { margin: 0; font-weight: 700; }

.archive-jumps { display: grid; margin-top: 1rem; }
.archive-jumps a {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: .6rem .2rem;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
  font-weight: 600;
}
.archive-jumps span { color: var(--muted); font-weight: 500; }

.reader { max-width: 48rem; padding-block: 2.6rem 4rem; }
.back-link { display: inline-block; margin-bottom: 1.7rem; font-weight: 650; font-size: .9rem; }

.article-header h1, .simple-page h1 {
  margin-bottom: .85rem;
  font-size: clamp(2rem, 5vw, 3.55rem);
  letter-spacing: -.055em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.published { margin-bottom: 1.6rem; color: var(--muted); font-size: .95rem; }

.article-notice {
  margin-bottom: 1.9rem;
  padding: .75rem 1rem;
  border-left: 3px solid var(--green);
  background: var(--leaf);
  color: var(--muted);
  font-size: .9rem;
}

.article-body {
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2.4vw, 1.22rem);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.article-body h2, .article-body h3, .article-body h4, .article-body h5, .article-body h6 {
  margin-block: 1.6em .5em;
  font-family: var(--sans);
  line-height: 1.3;
}

.article-body p, .article-body ol, .article-body ul, .article-body dl { margin-block: 0 1.05em; }
.article-body li { margin-block: .25em; }
.article-body pre, .article-body code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .84em; }
.article-body code { padding: .1em .25em; border-radius: .25rem; background: var(--soft); }

.article-body pre {
  max-width: 100%;
  overflow: auto;
  margin-block: 1.25rem;
  padding: 1rem;
  border-radius: .5rem;
  background: var(--deep);
  color: #eef7fa;
  line-height: 1.55;
}

.article-body pre code { padding: 0; background: transparent; font-size: 1em; }
.article-body blockquote { margin-inline: 0; padding-inline-start: 1rem; border-left: 3px solid var(--line); }
.article-body img { max-width: 100%; height: auto; }
.article-body figure { margin-inline: 0; }
.table-scroll { overflow: auto; margin-block: 1.3rem; }
.article-body table { width: 100%; border-collapse: collapse; font: .95rem/1.55 var(--sans); }
.article-body td, .article-body th { padding: .65rem .8rem; border: 1px solid var(--line); text-align: start; }
.article-body th { background: var(--soft); }

.missing-media {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .55rem;
  max-width: 100%;
  padding: .34rem .7rem;
  border: 1px dashed #bd954d;
  border-radius: .35rem;
  background: #fff5df;
  color: var(--muted);
  font: .875rem/1.5 var(--sans);
}

.media-description { color: var(--ink); }
.historical-link { font: .85rem var(--sans); color: var(--muted); }
.source-card { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.source-card h2 { margin-bottom: .4rem; font-size: 1.1rem; }
.source-card p, .source-card ul { margin: 0 0 .6rem; color: var(--muted); font-size: .9rem; }
.source-card ul { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; padding: 0; list-style: none; }
.site-footer { background: var(--white); border-top: 1px solid var(--line); }
.footer-inner { padding-block: 1.25rem; }
.footer-inner .wordmark { flex: 0 1 9.5rem; }
.footer-inner p { margin: 0; color: var(--muted); font-size: .875rem; }

@media (max-width: 48rem) {
  .archive-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: 1.8rem; }
  .archive-aside { grid-row: 1; }
  .archive-jumps { display: flex; gap: 1rem; }
  .archive-jumps a { gap: .55rem; }
}

@media (max-width: 30rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { min-height: 3.75rem; }
  .header-inner .wordmark { flex-basis: 10.5rem; }
  .hero-inner { padding-block: 2.6rem; }
  .post-row { flex-direction: column; gap: .2rem; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .footer-inner .wordmark { flex: none; width: 9.5rem; }
  .reader { padding-top: 1.65rem; }
}
