:root {
  --green: #0f3b2e;
  --green-2: #16523f;
  --brass: #c8962e;
  --brass-2: #e0b04f;
  --ink: #18201d;
  --muted: #5b6763;
  --paper: #fbfaf6;
  --card: #ffffff;
  --line: #e4e1d8;
  --link: #0e6b50;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 8px 24px -12px rgb(15 59 46 / 0.25);
  --wrap: 72rem;
  --measure: 46rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7ece9;
    --muted: #9aa8a2;
    --paper: #0b1512;
    --card: #12201b;
    --line: #22342d;
    --link: #6fd3ae;
    --green: #0d2a21;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 30px -14px rgb(0 0 0 / 0.7);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font: 400 1.0625rem/1.7 var(--font);
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

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

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

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--brass);
  color: #000;
  border-radius: 8px;
}

.skip:focus {
  top: 1rem;
}

/* Header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--green) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  color: #fff;
  border-bottom: 3px solid var(--brass);
}

.head-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font: 700 1.25rem/1 var(--serif);
  letter-spacing: 0.01em;
}

.brand .dot,
.brand-foot .dot {
  color: var(--brass-2);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  color: var(--brass-2);
  --paper: var(--green);
}

.nav-btn {
  display: none;
  margin-left: auto;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.bars,
.bars::before,
.bars::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin: auto;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.bars {
  position: relative;
}

.bars::before,
.bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.bars::before {
  top: -6px;
}

.bars::after {
  top: 6px;
}

.nav-open .bars {
  background: transparent;
}

.nav-open .bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-open .bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  color: rgb(255 255 255 / 0.88);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  background: rgb(255 255 255 / 0.1);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--brass-2);
}

.search input {
  width: 12rem;
  padding: 0.5rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.site-head .search input {
  color: #fff;
  background: rgb(255 255 255 / 0.1);
  border-color: rgb(255 255 255 / 0.2);
}

.site-head .search input::placeholder {
  color: rgb(255 255 255 / 0.6);
}

@media (max-width: 1100px) {
  .nav-btn {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 4.2rem 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--green);
    border-bottom: 3px solid var(--brass);
    max-height: calc(100dvh - 4.2rem);
    overflow-y: auto;
  }

  .nav-open .site-nav {
    display: flex;
  }

  .site-nav ul {
    flex-direction: column;
  }

  .site-nav a {
    padding: 0.8rem 0.9rem;
    font-size: 1.05rem;
  }

  .search input {
    width: 100%;
  }
}

/* Breadcrumbs */
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 1.25rem auto 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--muted);
}

.crumbs li + li::before {
  content: "›";
  margin-right: 0.35rem;
  opacity: 0.6;
}

.crumbs a {
  color: var(--muted);
}

/* Hero */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(ellipse at 80% 0%, rgb(200 150 46 / 0.35), transparent 55%),
    linear-gradient(160deg, #0f3b2e 0%, #0a2a21 60%, #071d17 100%);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 18px;
  background: repeating-linear-gradient(90deg, rgb(255 255 255 / 0.12) 0 6px, transparent 6px 26px), linear-gradient(var(--brass), var(--brass)) bottom/100% 3px no-repeat;
}

.hero-in {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 8vw, 6.5rem);
}

.hero h1 {
  margin: 0.25rem 0 0.75rem;
  font: 700 clamp(2.4rem, 7vw, 4.25rem)/1.05 var(--serif);
  letter-spacing: -0.02em;
}

.hero .lead {
  max-width: 40rem;
  color: rgb(255 255 255 / 0.85);
}

.kicker {
  display: inline-block;
  margin: 0;
  color: var(--brass);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.hero .kicker {
  color: var(--brass-2);
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
}

.search-hero {
  display: flex;
  gap: 0.5rem;
  max-width: 34rem;
  margin-top: 1.5rem;
}

.search-hero input {
  flex: 1;
  width: auto;
  padding: 0.85rem 1.1rem;
  font-size: 1rem;
}

.search-hero button {
  padding: 0 1.4rem;
  font: 600 1rem var(--font);
  color: #1b1405;
  background: var(--brass-2);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.search-hero button:hover {
  background: var(--brass);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  padding: 1.1rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.15s;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--brass);
}

.card a {
  font-weight: 650;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
}

.card a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card p {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.card time {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.cards-lg .card a {
  font: 700 1.2rem/1.3 var(--serif);
}

.tiles {
  margin-top: -2rem;
  position: relative;
  z-index: 2;
}

/* Documents */
.doc {
  padding: 1.5rem 0 3rem;
}

.doc-head {
  max-width: var(--measure);
  margin-bottom: 1.75rem;
}

.doc-head h1 {
  margin: 0.35rem 0 0.6rem;
  font: 700 clamp(1.9rem, 4.5vw, 2.9rem)/1.12 var(--serif);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.prose {
  max-width: var(--measure);
  overflow-wrap: anywhere;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2,
.prose h3,
.prose h4 {
  margin: 2rem 0 0.5rem;
  font-family: var(--serif);
  line-height: 1.25;
  text-wrap: balance;
}

.prose h2 {
  font-size: 1.6rem;
}

.prose h3 {
  font-size: 1.3rem;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1.1rem;
}

.prose img {
  display: inline-block;
  margin: 0.25rem 0.25rem 0.25rem 0;
  vertical-align: middle;
  background: var(--line);
}

.prose p > img:only-child,
.prose p > a:only-child > img {
  display: block;
  margin: 1.25rem 0;
  box-shadow: var(--shadow);
}

.prose hr {
  height: 1px;
  margin: 1.75rem 0;
  border: 0;
  background: var(--line);
}

.prose blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  color: var(--muted);
  background: var(--card);
  border-left: 4px solid var(--brass);
  border-radius: 0 10px 10px 0;
}

.prose pre {
  padding: 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

/* Home news feed: each item is "image link + headline link + text" */
.news-feed p {
  padding: 1rem 0;
  margin: 0;
}

.news-feed p > a:first-child:has(img) {
  float: right;
  margin: 0 0 0.5rem 1rem;
  max-width: 40%;
}

.news-feed p > a:first-child img {
  margin: 0;
}

.news-feed p::after {
  content: "";
  display: table;
  clear: both;
}

.news-feed hr {
  margin: 0;
}

.home-news h2 {
  font: 700 2rem/1.2 var(--serif);
}

/* Forum threads */
.thread {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.post {
  padding: 1.1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.post:first-child {
  border-top: 4px solid var(--brass);
}

.post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding-bottom: 0.6rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px dashed var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}

.post-author {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.post-head time {
  margin-left: auto;
}

.post-subject {
  margin: 0 0 0.5rem !important;
  font-size: 1.05rem !important;
  font-family: var(--font) !important;
}

.post-body > :last-child {
  margin-bottom: 0;
}

.post-body img {
  max-height: 32rem;
  width: auto;
}

.provenance {
  max-width: var(--measure);
  margin-top: 2.5rem;
  padding-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-width: var(--measure);
  margin: 0 0 1.5rem;
}

.subnav a {
  padding: 0.35rem 0.8rem;
  font-size: 0.9rem;
  color: var(--link);
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.subnav a:hover,
.subnav a[aria-current="page"] {
  color: #fff;
  background: var(--green-2);
  border-color: var(--green-2);
}

.callout {
  max-width: var(--measure);
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  font-size: 0.95rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brass);
  border-radius: 0 10px 10px 0;
}

.prose .note {
  font-size: 0.9rem;
  color: var(--muted);
}

.recent-list {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.recent-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.recent-list a {
  font-weight: 600;
}

.recent-list span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Hub */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.chips a {
  padding: 0.4rem 0.9rem;
  font-size: 0.88rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.chips a[aria-current="page"] {
  color: #fff;
  background: var(--green-2);
  border-color: var(--green-2);
}

.hub-group h2 {
  margin: 2rem 0 0.25rem;
  font: 700 1.5rem var(--serif);
}

.count {
  display: inline-block;
  padding: 0 0.5rem;
  font: 600 0.8rem/1.6 var(--font);
  color: var(--muted);
  vertical-align: middle;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.related {
  padding-bottom: 3rem;
}

.related h2 {
  font: 700 1.5rem var(--serif);
}

.more {
  font-weight: 600;
}

/* Footer */
.site-foot {
  margin-top: 2rem;
  padding: 3rem 0 1.5rem;
  color: rgb(255 255 255 / 0.8);
  background: #0a2119;
  border-top: 3px solid var(--brass);
}

.site-foot a {
  color: #fff;
}

.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.foot-grid h2 {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-2);
}

.foot-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.93rem;
  line-height: 2;
}

.brand-foot {
  font-size: 1.4rem;
}

.foot-note {
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.82rem;
  color: rgb(255 255 255 / 0.55);
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

@media (max-width: 760px) {
  body {
    font-size: 1rem;
  }

  .foot-grid {
    grid-template-columns: 1fr;
  }

  .news-feed p > a:first-child:has(img) {
    float: none;
    display: block;
    max-width: 100%;
    margin: 0 0 0.5rem;
  }

  .post {
    padding: 1rem;
  }

  .post-head time {
    margin-left: 0;
    width: 100%;
  }

  .search-hero {
    flex-direction: column;
  }

  .search-hero button {
    padding: 0.8rem;
  }
}

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

@media print {
  .site-head,
  .site-foot,
  .related,
  .crumbs {
    display: none;
  }
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin: 2.5rem 0 1rem;
}

.pager a,
.pager span {
  min-width: 2.4rem;
  padding: 0.45rem 0.8rem;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.pager a {
  color: var(--ink);
  background: var(--card);
}

.pager [aria-current] {
  color: #fff;
  background: var(--green, #0f3b2e);
  border-color: transparent;
}

.pager .gap {
  border: 0;
}
