
:root {
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --border: #a2a9b1;
  --border-soft: #c8ccd1;
  --text: #202122;
  --muted: #54595d;
  --link: #3366cc;
  --link-visited: #795cb2;
  --sidebar: #f8f9fa;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c; --bg-alt: #1e2126; --border: #4a5058; --border-soft: #33383f;
    --text: #e6e8eb; --muted: #a5abb3; --link: #7aa7ff; --link-visited: #b39ddb;
    --sidebar: #1a1d21;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration: underline; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--bg); padding: 8px; z-index: 10; }

.layout { display: flex; align-items: flex-start; }
.sidebar {
  width: 230px; flex: 0 0 230px; padding: 20px 14px 60px;
  background: var(--sidebar); border-right: 1px solid var(--border-soft);
  position: sticky; top: 0; max-height: 100vh; overflow-y: auto;
}
.nav-brand a {
  display: block; font-family: Georgia, "Times New Roman", serif;
  font-size: 19px; color: var(--text); line-height: 1.25;
}
.nav-brand span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.nav-group { margin-top: 20px; }
.nav-group h3 {
  margin: 0 0 5px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); font-weight: 600;
}
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group li { margin: 0; }
.nav-group a {
  display: block; padding: 3px 6px; font-size: 13.5px; border-radius: 2px;
}
.nav-group a.active { background: rgba(51,102,204,.12); font-weight: 600; }

.search { margin-top: 16px; position: relative; }
.search input {
  width: 100%; padding: 6px 8px; font-size: 13.5px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 2px;
}
#search-results {
  list-style: none; margin: 2px 0 0; padding: 0; position: absolute;
  left: 0; right: 0; background: var(--bg); border: 1px solid var(--border);
  max-height: 320px; overflow-y: auto; z-index: 5;
}
#search-results li { border-bottom: 1px solid var(--border-soft); }
#search-results li:last-child { border-bottom: 0; }
#search-results a { display: block; padding: 6px 8px; font-size: 13px; }
#search-results .c { display: block; font-size: 11px; color: var(--muted); }
#search-results .none { padding: 8px; font-size: 13px; color: var(--muted); }

main { flex: 1 1 auto; min-width: 0; padding: 26px 34px 60px; max-width: 900px; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.page-title {
  font-family: Georgia, "Times New Roman", serif; font-weight: normal;
  font-size: 30px; line-height: 1.25; margin: 0 0 4px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.page-subtitle { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.body h2, .toc h2 {
  font-family: Georgia, "Times New Roman", serif; font-weight: normal;
  font-size: 22px; margin: 26px 0 8px; padding-bottom: 5px;
  border-bottom: 1px solid var(--border-soft);
}
.body h3 { font-size: 16px; margin: 20px 0 6px; }
.body p { margin: 0 0 12px; }
.body ul, .body ol { margin: 0 0 12px; padding-left: 24px; }
.body li { margin-bottom: 4px; }
code {
  background: var(--bg-alt); border: 1px solid var(--border-soft);
  border-radius: 2px; padding: 1px 4px; font-size: 12.5px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.table-wrap { overflow-x: auto; margin: 0 0 16px; clear: right; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td {
  border: 1px solid var(--border-soft); padding: 7px 9px;
  text-align: left; vertical-align: top;
}
thead th { background: var(--bg-alt); font-weight: 600; }

.infobox {
  float: right; width: 260px; margin: 0 0 16px 20px; background: var(--bg-alt);
  border: 1px solid var(--border-soft); font-size: 12.5px;
}
.infobox table { font-size: 12.5px; }
.infobox th, .infobox td { border: 0; border-bottom: 1px solid var(--border-soft); padding: 6px 9px; }
.infobox th { width: 40%; color: var(--muted); font-weight: 600; }
.infobox .sources-head { width: auto; color: var(--text); background: rgba(0,0,0,.03); }
.infobox ul.sources { list-style: none; margin: 0; padding: 0; }
.infobox ul.sources li { margin-bottom: 4px; word-break: break-word; font-size: 11.5px; }

.badge {
  display: inline-block; padding: 1px 7px; border-radius: 9px;
  font-size: 11px; font-weight: 600; text-transform: capitalize;
  border: 1px solid transparent;
}
.badge-accepted { background: #d5f0dd; color: #14663a; border-color: #a5d9ba; }
.badge-provisional { background: #fdf0d5; color: #7a5600; border-color: #ecd08c; }
.badge-confidential { background: #fbdcdc; color: #8b1f1f; border-color: #eda9a9; }
.badge-proposed { background: #dde6fb; color: #23448b; border-color: #adc0ea; }

.notice {
  border: 1px solid var(--border-soft); border-left-width: 4px;
  background: var(--bg-alt); padding: 10px 14px; margin: 0 0 18px; font-size: 13.5px;
}
.notice-confidential { border-left-color: #b32424; }
.notice-proposed { border-left-color: #3366cc; }
.notice-provisional { border-left-color: #d4a017; }
.notice-raw { border-left-color: #72777d; }

.toc {
  display: inline-block; min-width: 240px; background: var(--bg-alt);
  border: 1px solid var(--border-soft); padding: 8px 22px 12px 12px; margin: 0 0 20px;
}
.toc h2 { font-size: 15px; margin: 0 0 6px; border: 0; padding: 0; text-align: center; }
.toc ol { margin: 0; padding-left: 20px; font-size: 13.5px; }
.toc li { margin-bottom: 3px; }
.toc ol ol { list-style: lower-alpha; padding-left: 18px; margin-top: 3px; }

.missing {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: #8b1f1f; background: #fbdcdc;
  border: 1px solid #eda9a9; border-radius: 3px; padding: 0 4px; white-space: nowrap;
}

.intro { background: var(--bg-alt); border: 1px solid var(--border-soft); padding: 16px 20px; margin-bottom: 26px; }
.intro p { margin: 0 0 10px; }
.intro .counts { margin: 0; font-size: 12.5px; color: var(--muted); }
.cat { margin-bottom: 26px; }
.cat h2 {
  font-family: Georgia, "Times New Roman", serif; font-weight: normal; font-size: 21px;
  margin: 0 0 4px; padding-bottom: 5px; border-bottom: 1px solid var(--border-soft);
}
.cat-desc { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li { margin-bottom: 6px; font-size: 14px; }
.cat-list .dash, .cat-list .summary { color: var(--muted); font-size: 13px; }

.site-footer {
  margin-top: 44px; padding-top: 14px; border-top: 1px solid var(--border-soft);
  font-size: 12px; color: var(--muted);
}
.nav-toggle {
  display: none; position: sticky; top: 0; width: 100%; padding: 10px;
  background: var(--bg-alt); color: var(--text); border: 0;
  border-bottom: 1px solid var(--border-soft); font-size: 14px; text-align: left; cursor: pointer;
}
@media (max-width: 800px) {
  .layout { display: block; }
  .nav-toggle { display: block; z-index: 6; }
  .sidebar { width: auto; max-height: none; position: static; display: none; border-right: 0; }
  .sidebar.open { display: block; }
  main { padding: 18px 16px 50px; }
  .infobox { float: none; width: auto; margin: 0 0 18px; }
  .page-title { font-size: 25px; }
}
