@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3-400.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3-500.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3-600.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3-700.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-500.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-600.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-700.woff2") format("woff2");
}

:root {
  --paper: #f3efe6;
  --surface: #fffcf8;
  --ink: #1c1916;
  --muted: #3f3a33;
  --line: #e2d8c8;
  --accent: #143f34;
  --accent-hover: #0e2e26;
  --gold: #7a5b24;
  --header: #fffcf8;
  --footer: #1c1916;
  --footer-text: #f3ecdf;
  --shadow: 0 14px 36px rgba(48, 36, 18, 0.07);
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --max: 1100px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  border-top: 4px solid var(--accent);
}

body, button, input, textarea, select { font-family: inherit; }

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

a { color: var(--accent); }

a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--surface);
  padding: 0.6rem 0.9rem;
  z-index: 50;
  border-radius: 8px;
}

.skip:focus { top: 0.6rem; color: var(--surface); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header);
  border-bottom: 1px solid var(--line);
}

.header-layout {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.site-nav { display: block; }

.menu,
.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
}

.menu a[aria-current="page"] { color: var(--accent); }

.nav-missing {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.15rem 0.55rem;
  color: var(--muted);
  font-weight: 500;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.subtoggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 8px;
}

.chev {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.subtoggle[aria-expanded="true"] .chev {
  transform: rotate(225deg) translateY(-1px);
}

.page {
  padding-bottom: 3rem;
}

.page-head { padding: 1.7rem 0 0.3rem; }

h1, h2, h3, h4, summary { scroll-margin-top: 88px; }

h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.4rem;
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.crumbs a { color: var(--muted); text-underline-offset: 3px; }

.crumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

.prose > p,
.prose > ul,
.prose > ol,
.prose > h2,
.prose > h3,
.prose > h4,
.fold-body p,
.fold-body ul,
.fold-body ol {
  max-width: 70ch;
}

.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}

.prose h2 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); margin: 2.2rem 0 0.55rem; }
.prose h3 { font-size: 1.28rem; margin: 1.5rem 0 0.4rem; }
.prose h4 { font-size: 1.08rem; margin: 1.25rem 0 0.35rem; }

.prose p { margin: 0.75rem 0; }

.prose ul,
.prose ol { margin: 0.6rem 0 1rem; padding-left: 1.25rem; }

.prose li { margin: 0.28rem 0; }

.prose a { text-underline-offset: 3px; }

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(160px, 0.72fr);
  gap: 1.1rem 1.6rem;
  align-items: center;
  margin: 0.85rem 0;
}

.cols.feature,
.cols.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1rem, 2vw, 1.5rem);
}

.cols.feature {
  box-shadow: var(--shadow);
  margin: 0.4rem 0 1.2rem;
}

.cols.feature h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  margin-top: 0;
  max-width: 22ch;
}

.cols.card h2 { font-size: 1.32rem; margin: 0 0 0.35rem; max-width: none; }
.cols.card p { margin-top: 0.35rem; }
.cols p,
.cols ul,
.cols h2,
.cols h3 { max-width: none; }

.cols img,
.prose figure img {
  display: block;
  width: 100%;
  max-height: 230px;
  object-fit: contain;
  background: #f7f3eb;
  border-radius: 12px;
}

.cols.feature img { max-height: 320px; }

img.is-placeholder {
  width: 84px;
  height: 84px;
  max-height: 84px;
  margin-inline: auto;
  object-fit: cover;
  background: #ece7dc;
}

.prose figure { margin: 1rem 0; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 1.1rem;
  max-width: none;
}

.actions a,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: var(--accent);
  color: #f6f3ec;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 1.2;
  text-align: left;
}

.actions a:hover,
.btn:hover { background: var(--accent-hover); color: #fff; }

.btn.disabled,
.actions .disabled {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  background: transparent;
  color: var(--muted);
  border: 1px dashed #b7ad9d;
  border-radius: 14px;
  cursor: not-allowed;
}

.gap-inline {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
}

.gap {
  max-width: 70ch;
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: #f8f1e0;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  color: #2e281c;
}

ul.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 1rem;
  max-width: none;
}

ul.social a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.2rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.fold {
  border-top: 1px solid var(--line);
  max-width: 70ch;
}

.fold:last-of-type { border-bottom: 1px solid var(--line); }

.fold summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.85rem 0;
  list-style: none;
}

.fold summary::-webkit-details-marker { display: none; }

.fold summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 600;
}

.fold[open] summary::after { content: "–"; }

.fold-body { padding: 0 0 0.9rem; }

pre {
  white-space: pre-wrap;
  background: #1c1916;
  color: #f6f1e7;
  padding: 1.15rem 1.2rem;
  border-radius: 14px;
  overflow: auto;
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 100%;
}

code { font-size: 0.92em; }

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

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  margin: 1rem 0;
  font-size: 0.98rem;
}

th, td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

th { background: #f6f1e6; }

iframe {
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.type-directory .prose h2 {
  display: inline-block;
  min-width: 2.2rem;
  margin: 1.1rem 0.8rem 0.2rem 0;
  padding-bottom: 0.1rem;
  border-bottom: 2px solid var(--accent);
  font-size: 1.28rem;
  max-width: none;
}

.site-footer {
  margin-top: 3.5rem;
  background: var(--footer);
  color: var(--footer-text);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 2rem;
  padding: 2.4rem 0 1.4rem;
}

.site-footer a { color: var(--footer-text); text-underline-offset: 3px; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
}

.address { margin: 0.8rem 0 0; color: #ddd4c6; }

.policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.policy-links a { font-size: 0.95rem; }

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.footer-social a {
  text-decoration: none;
  border: 1px solid rgba(243, 236, 223, 0.35);
  border-radius: 999px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.8rem;
  font-weight: 600;
}

.legal {
  border-top: 1px solid rgba(243, 236, 223, 0.16);
  padding: 0.9rem 0 1.3rem;
  color: #ddd4c6;
  font-size: 0.92rem;
}

.mobile-overview { display: none; }

@media (max-width: 979px) {
  .header-layout { display: block; }
  .menu-toggle { display: inline-flex; }
  html.nav-collapsed .site-nav { display: none; }
  html.nav-open .site-nav { display: block; }
  .site-nav {
    width: 100%;
    border-top: 1px solid var(--line);
    background: var(--surface);
    max-height: calc(100dvh - var(--header-h) - 4px);
    overflow: auto;
    padding: 0.15rem 0 0.8rem;
  }
  .menu > li { border-bottom: 1px solid var(--line); }
  .menu .row { width: 100%; }
  .menu .row > a,
  .menu .row > .nav-missing { flex: 1; min-height: 48px; padding: 0.35rem 0; }
  .menu a { display: flex; align-items: center; min-height: 44px; padding: 0.2rem 0; }
  .subtoggle { flex: 0 0 48px; }
  .menu ul { display: none; padding: 0 0 0.35rem 0.9rem; }
  .menu li.is-open > ul { display: block; }
  .menu ul a { font-weight: 500; }
  .mobile-overview { display: block; }
  .mobile-overview a { font-weight: 600; }
  .bar { width: 100%; min-height: 64px; }
}

@media (min-width: 980px) {
  .bar { width: auto; min-height: 0; }
  .menu-toggle { display: none; }
  .site-nav { margin-left: auto; }
  .menu { display: flex; align-items: center; gap: 0.15rem; }
  .menu > li { position: relative; }
  .menu > li > .row > a { display: flex; align-items: center; min-height: 44px; padding: 0.2rem 0.55rem; border-radius: 8px; }
  .menu > li > .row > a:hover { background: #f3eee4; }
  .subtoggle { width: 28px; height: 44px; }
  .menu ul .subtoggle { display: none; }
  .menu ul {
    display: none;
    position: absolute;
    top: calc(100% - 4px);
    left: 0;
    min-width: 280px;
    max-height: 72vh;
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.4rem;
    box-shadow: var(--shadow);
  }
  .menu > li:hover > ul,
  .menu > li:focus-within > ul,
  .menu > li.is-open > ul { display: block; }
  .menu ul ul {
    position: static;
    display: block;
    min-width: 0;
    max-height: none;
    overflow: visible;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0.15rem 0.85rem;
  }
  .menu ul a {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0.15rem 0.55rem;
    border-radius: 8px;
    font-weight: 600;
  }
  .menu ul ul a { font-weight: 500; }
  .menu ul a:hover { background: #f3eee4; }
}

@media (max-width: 720px) {
  .cols,
  .cols.feature,
  .cols.card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .cols.feature h2 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .site-header, .site-footer, .menu-toggle, .subtoggle, .skip { display: none !important; }
  body { border: 0; background: #fff; }
  .cols.feature, .cols.card { box-shadow: none; }
}
