@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #faf7f1;
  --panel: #ffffff;
  --panel-2: #f3eee4;
  --border: rgba(36, 26, 16, 0.12);
  --text: #241a10;
  --text-muted: rgba(36, 26, 16, 0.68);
  --text-faint: rgba(36, 26, 16, 0.48);
  --accent: #9c6a1f;
  --accent-strong: #7e5417;
  --accent-ink: #ffffff;
  --callout-bg: rgba(156, 106, 31, 0.08);
  --callout-border: rgba(156, 106, 31, 0.32);
  --shadow: 0 1px 2px rgba(36, 26, 16, 0.06);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17120c;
    --panel: #1f1811;
    --panel-2: #1a140e;
    --border: rgba(243, 232, 216, 0.1);
    --text: #f2e6d6;
    --text-muted: rgba(242, 230, 214, 0.66);
    --text-faint: rgba(242, 230, 214, 0.42);
    --accent: #e0a750;
    --accent-strong: #f0c077;
    --accent-ink: #241a0c;
    --callout-bg: rgba(224, 167, 80, 0.09);
    --callout-border: rgba(224, 167, 80, 0.3);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] {
  --bg: #17120c;
  --panel: #1f1811;
  --panel-2: #1a140e;
  --border: rgba(243, 232, 216, 0.1);
  --text: #f2e6d6;
  --text-muted: rgba(242, 230, 214, 0.66);
  --text-faint: rgba(242, 230, 214, 0.42);
  --accent: #e0a750;
  --accent-strong: #f0c077;
  --accent-ink: #241a0c;
  --callout-bg: rgba(224, 167, 80, 0.09);
  --callout-border: rgba(224, 167, 80, 0.3);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.masthead {
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 20;
}
.masthead-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.wordmark .kicker {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}
.back-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}
.back-link:hover { color: var(--accent-strong); }
.updated {
  font-size: 12.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 28px 96px;
  display: grid;
  grid-template-columns: 240px minmax(0, 720px);
  gap: 64px;
  justify-content: center;
}
.toc {
  position: sticky;
  top: 78px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.toc-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 12px;
}
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.toc a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.35;
}
.toc a:hover { background: var(--panel-2); color: var(--text); }

header.doc-head { margin-bottom: 40px; }
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 14px;
}
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  text-wrap: balance;
  color: var(--text);
}
.dek { font-size: 15.5px; line-height: 1.6; color: var(--text-muted); max-width: 62ch; margin: 0; }

.callout {
  margin: 28px 0 40px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
}
.callout strong { color: var(--accent-strong); }

section { padding-top: 40px; margin-top: 40px; border-top: 1px solid var(--border); scroll-margin-top: 88px; }
section:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.section-no {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  margin: 0 0 6px;
}
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 16px;
  text-wrap: balance;
  color: var(--text);
}
h3 { font-family: var(--sans); font-weight: 600; font-size: 14.5px; margin: 26px 0 10px; color: var(--text); }
p { margin: 0 0 14px; max-width: 68ch; }
p:last-child { margin-bottom: 0; }
ul, ol.plain { margin: 0 0 14px; padding-left: 22px; max-width: 66ch; }
li { margin-bottom: 6px; }
li:last-child { margin-bottom: 0; }
strong { font-weight: 600; }

.data-table { width: 100%; overflow-x: auto; margin: 8px 0 20px; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 480px; }
thead th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 11px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-muted); }
tbody tr:last-child td { border-bottom: none; }
td.who { color: var(--text); font-weight: 600; white-space: nowrap; }

.contact-card {
  margin-top: 10px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-width: 66ch;
}
.contact-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 13.5px; }
.contact-card dt { color: var(--text-faint); }
.contact-card dd { margin: 0; color: var(--text); }

footer.doc-foot { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-faint); }

.mobile-toc { display: none; }
@media (max-width: 880px) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 28px 20px 72px; }
  .toc { display: none; }
  .mobile-toc {
    display: block;
    position: sticky;
    top: 61px;
    z-index: 15;
    background: var(--bg);
    padding: 10px 0 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .mobile-toc select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font-family: var(--sans);
    font-size: 13.5px;
  }
  .masthead-inner { padding: 14px 20px; }
}
