:root {
  --ink: #17211d;
  --muted: #68736d;
  --paper: #f7f6f0;
  --surface: #fffef9;
  --line: #dedfd7;
  --accent: #176b4d;
  --accent-soft: #e6f1eb;
  --orange: #ce6b31;
  --danger: #a53d3d;
  --sidebar: 292px;
  --serif: Iowan Old Style, Palatino Linotype, Book Antiqua, Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.7; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input { font: inherit; }

.age-strip { height: 30px; display: grid; place-items: center; background: var(--ink); color: #dbe4df; font-size: 11px; letter-spacing: .05em; }
.app-shell { min-height: calc(100vh - 30px); }
.sidebar { position: fixed; top: 30px; bottom: 0; left: 0; width: var(--sidebar); background: #efeee7; border-right: 1px solid var(--line); padding: 24px 18px 18px; overflow-y: auto; z-index: 20; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 22px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; text-decoration: none; color: #fff; background: var(--accent); border-radius: 10px; font-family: var(--serif); font-weight: 800; }
.brand strong, .brand span { display: block; }
.brand strong { font-family: var(--serif); font-size: 17px; }
.brand span { color: var(--muted); font-size: 11px; margin-top: 1px; }
.search-wrap { position: relative; display: block; margin: 0 4px 16px; }
.search-wrap > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.search-wrap input { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 9px 34px 9px 11px; outline: none; font-size: 13px; }
.search-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
kbd { position: absolute; right: 9px; top: 8px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; color: var(--muted); background: var(--paper); padding: 0 5px; font-size: 10px; }
.nav-group { margin: 18px 0 0; }
.nav-group-title { display: block; padding: 0 10px 5px; color: #89918d; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: 9px; color: #44504a; text-decoration: none; padding: 7px 10px; border-radius: 7px; font-size: 13px; margin: 1px 0; }
.nav-link:hover { background: rgba(255,255,255,.65); }
.nav-link.active { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.nav-index { color: #9ca39f; width: 18px; font-size: 10px; font-variant-numeric: tabular-nums; }
.sidebar-foot { margin: 24px 9px 0; border-top: 1px solid var(--line); padding-top: 16px; color: var(--muted); font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #48a276; margin-right: 5px; }
.search-results { position: absolute; left: 18px; right: 18px; z-index: 4; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 40px rgba(20,30,25,.16); padding: 6px; max-height: 360px; overflow-y: auto; }
.search-hit { display: block; text-decoration: none; padding: 9px 10px; border-radius: 7px; color: var(--ink); }
.search-hit:hover { background: var(--accent-soft); }
.search-hit strong, .search-hit small { display: block; }
.search-hit small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-empty { padding: 14px; color: var(--muted); font-size: 13px; }

.main { margin-left: var(--sidebar); min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 10; height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid rgba(222,223,215,.8); background: rgba(247,246,240,.9); backdrop-filter: blur(12px); }
.breadcrumb { color: var(--muted); font-size: 12px; }
.quiet-button, .menu-button { border: 1px solid var(--line); border-radius: 7px; color: #44504a; background: var(--surface); padding: 6px 10px; cursor: pointer; font-size: 12px; }
.quiet-button:hover { border-color: #aeb4b0; }
.menu-button { display: none; font-size: 17px; padding: 2px 9px; }
.doc { max-width: 920px; min-height: 75vh; padding: 68px 64px 100px; margin: 0 auto; }
.doc h1 { margin: 0 0 14px; font-family: var(--serif); font-size: clamp(35px, 5vw, 54px); line-height: 1.08; letter-spacing: -.035em; }
.doc h2 { margin: 52px 0 16px; padding-top: 8px; font-family: var(--serif); font-size: 28px; line-height: 1.25; letter-spacing: -.02em; }
.doc h3 { margin: 32px 0 10px; font-size: 17px; }
.doc p { margin: 10px 0 18px; }
.doc ul, .doc ol { padding-left: 23px; }
.doc li { margin: 7px 0; }
.eyebrow { color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lead { max-width: 730px; color: #49554f; font-family: var(--serif); font-size: 20px; line-height: 1.55; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 23px 0 33px; }
.pill { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.52); color: var(--muted); padding: 4px 9px; font-size: 11px; }
.callout { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 16px 18px; margin: 26px 0; border-radius: 0 9px 9px 0; }
.callout.warning { border-color: var(--orange); background: #faeee5; }
.callout.danger { border-color: var(--danger); background: #f8e8e8; }
.callout strong { display: block; margin-bottom: 4px; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.card { display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 19px; text-decoration: none; color: var(--ink); transition: transform .16s, border-color .16s; }
.card:hover { transform: translateY(-2px); border-color: #aab5af; }
.card .num { color: var(--orange); font-family: var(--serif); font-size: 14px; }
.card strong { display: block; margin: 4px 0; font-size: 15px; }
.card p { margin: 0; color: var(--muted); font-size: 12px; }
.steps { counter-reset: step; list-style: none; padding: 0 !important; margin: 25px 0; }
.steps li { position: relative; counter-increment: step; min-height: 58px; padding: 0 0 20px 53px; margin: 0; border-left: 1px solid var(--line); margin-left: 18px; }
.steps li:last-child { border-left-color: transparent; }
.steps li::before { content: counter(step); position: absolute; left: -18px; top: -2px; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); font-family: var(--serif); font-weight: 700; }
.steps strong { display: block; }
.checklist { list-style: none; padding: 0 !important; }
.checklist li { position: relative; padding-left: 31px; }
.checklist input { position: absolute; left: 0; top: 6px; accent-color: var(--accent); width: 17px; height: 17px; }
.checklist label { cursor: pointer; }
.checklist li.done label { color: var(--muted); text-decoration: line-through; }
.table-wrap { margin: 22px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { color: #4d5953; background: #f0f1eb; font-size: 11px; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
code { color: #28513f; background: #ebeee9; border-radius: 4px; padding: 2px 5px; font-size: .9em; }
pre { overflow-x: auto; background: #1c2822; color: #dce7e0; border-radius: 11px; padding: 18px; font-size: 12px; line-height: 1.6; }
pre code { color: inherit; background: none; padding: 0; }
.source-list { padding: 0 !important; list-style: none; }
.source-list li { border-top: 1px solid var(--line); padding: 14px 0; }
.source-list strong, .source-list span { display: block; }
.source-list span { color: var(--muted); font-size: 12px; }
.source-tag { display: inline-block !important; width: fit-content; margin-bottom: 5px; border-radius: 4px; padding: 1px 6px; color: var(--accent) !important; background: var(--accent-soft); font-size: 10px !important; font-weight: 800; letter-spacing: .06em; }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 28px 0; }
.download-card { position: relative; display: block; min-height: 118px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); padding: 18px; text-decoration: none; color: var(--ink); }
.download-card:hover { border-color: var(--accent); }
.download-card > span { display: inline-block; color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 2px 6px; font-size: 9px; font-weight: 800; }
.download-card strong, .download-card small { display: block; }
.download-card strong { margin-top: 9px; }
.download-card small { color: var(--muted); margin-top: 2px; }
.snippet { position: relative; }
.snippet .copy-snippet { position: absolute; top: 10px; right: 10px; z-index: 2; border: 1px solid #4c5b53; border-radius: 6px; color: #dce7e0; background: #26372e; padding: 4px 8px; cursor: pointer; font-size: 10px; }
.glossary { display: grid; grid-template-columns: 155px 1fr; gap: 0 20px; margin-top: 25px; }
.glossary h3, .glossary p { padding: 13px 0; margin: 0; border-top: 1px solid var(--line); }
.glossary h3 { font-family: var(--serif); font-size: 16px; }
.glossary p { color: #4c5852; font-size: 14px; }
.footer { max-width: 920px; margin: 0 auto; padding: 0 64px 44px; color: var(--muted); font-size: 11px; }
.scrim { display: none; }

@media (max-width: 820px) {
  .age-strip { padding: 0 12px; text-align: center; font-size: 9px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 14px 0 40px rgba(0,0,0,.12); }
  body.menu-open .sidebar { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { padding: 0 17px; }
  .menu-button { display: inline-block; }
  .breadcrumb { margin-left: 10px; margin-right: auto; }
  .doc { padding: 46px 22px 75px; }
  .footer { padding: 0 22px 28px; }
  .card-grid { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .glossary { grid-template-columns: 1fr; }
  .glossary h3 { padding-bottom: 0; }
  .glossary p { padding-top: 3px; border-top: 0; }
  .scrim { position: fixed; inset: 30px 0 0; z-index: 15; background: rgba(18,25,22,.36); }
  body.menu-open .scrim { display: block; }
  .topbar-actions { display: none; }
}
