:root {
  color-scheme: light;
  --rc-primary: #244961;
  --ink: #202830;
  --muted: #505b64;
  --line: #d9dfe3;
  --paper: #fff;
  --soft: #f5f6f7;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--rc-primary); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--rc-primary); outline-offset: 4px; }
.skip-link { position: absolute; left: 1rem; top: -8rem; background: white; padding: .7rem; z-index: 10; }
.skip-link:focus { top: .5rem; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 2rem; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.2rem; }
.brand span { color: var(--muted); font-size: .9rem; font-weight: 400; margin-left: 1rem; }
.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); max-width: 1440px; margin: auto; }
.sidebar { padding: 2rem 1rem; border-right: 1px solid var(--line); }
.sidebar details { position: sticky; top: 1.5rem; }
.sidebar summary { font-weight: 600; cursor: pointer; padding: .6rem; }
.sidebar-nav { list-style: none; padding: 0; margin: .5rem 0; }
.sidebar-nav a { display: block; padding: .65rem .75rem; text-decoration: none; color: var(--muted); border-left: 3px solid transparent; }
.sidebar-nav a[aria-current="page"] { color: var(--ink); background: var(--soft); border-left-color: var(--ink); font-weight: 650; }
main { min-width: 0; max-width: 1060px; width: 100%; padding: 2rem clamp(1rem, 4vw, 4rem) 4rem; }
.search-box { position: relative; max-width: 650px; margin-bottom: 2.5rem; }
.search-box label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .3rem; }
input[type="search"] { width: 100%; min-height: 44px; padding: .7rem .85rem; border: 1px solid #8c979f; border-radius: 3px; font: inherit; color: var(--ink); background: white; }
.search-results { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 5; max-height: 65vh; overflow-y: auto; background: white; border: 1px solid var(--line); box-shadow: 0 8px 20px #0002; }
.search-result-item { display: block; padding: .75rem 1rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.search-result-item:hover, .search-result-item.selected { background: var(--soft); }
.result-title { font-weight: 650; }
.result-snippet { font-size: .9rem; color: var(--muted); margin-top: .2rem; }
mark { background: #e5ebef; color: inherit; }
.eyebrow { font-size: .85rem; color: var(--muted); margin: 0 0 .6rem; }
h1 { font-size: clamp(1.8rem, 3vw, 2.65rem); line-height: 1.18; letter-spacing: -.035em; margin: 0 0 1rem; font-weight: 650; }
h2 { font-size: 1.45rem; line-height: 1.3; margin: 0 0 1rem; font-weight: 650; }
h3 { font-size: 1.15rem; }
.intro { color: var(--muted); font-size: 1.1rem; max-width: 70ch; }
p { margin: .75rem 0; }
.contents { background: var(--soft); border: 1px solid var(--line); padding: 1.15rem 1.5rem; margin: 2rem 0; }
.contents ol { columns: 2; column-gap: 2rem; padding-left: 1.4rem; margin: .65rem 0 0; }
.contents li { break-inside: avoid; margin-bottom: .45rem; padding-left: .15rem; }
section { border-top: 1px solid var(--line); padding: 2rem 0; overflow-wrap: anywhere; scroll-margin-top: 1rem; }
section > :last-child { margin-bottom: 0; }
.location { color: var(--muted); font-size: .95rem; border-left: 3px solid #909aa2; padding-left: .85rem; margin-bottom: 1.25rem; }
.table-wrapper { margin: 1rem 0; }
table { width: 100%; border-collapse: collapse; font-size: .975rem; }
th, td { text-align: left; vertical-align: top; padding: .85rem .9rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
thead th { background: var(--soft); font-size: .85rem; font-weight: 650; }
tbody th { width: 32%; font-weight: 600; }
tbody tr:last-child > * { border-bottom: 0; }
.notice { background: var(--soft); border-left: 3px solid var(--ink); padding: 1rem 1.15rem; margin: 1.5rem 0; }
.topic-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.topic-grid a { display: block; border: 1px solid var(--line); padding: 1.1rem; text-decoration: none; }
.topic-grid a:hover { border-color: var(--rc-primary); background: var(--soft); }
.topic-grid strong, .topic-grid span { display: block; }
.topic-grid span { color: var(--muted); font-size: .95rem; margin-top: .4rem; }
li { margin-bottom: .6rem; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 2rem; border-top: 1px solid var(--line); }
@media (max-width: 800px) {
  .site-header { padding: 1rem; align-items: flex-start; }
  .brand span { display: block; margin: 0; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { padding: .5rem 1rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar details { position: static; }
  .sidebar-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); font-size: .95rem; }
  main { padding-top: 1.5rem; }
  .contents ol { columns: 1; }
}
@media (max-width: 540px) {
  .topic-grid { grid-template-columns: 1fr; }
  table, tbody, tr, th, td { display: block; width: 100%; }
  thead { display: none; }
  tbody th { width: 100%; border-bottom: 0; padding: .85rem 0 .2rem; }
  tbody td { padding: 0 0 .9rem; }
  tbody tr { border-bottom: 1px solid var(--line); }
  tbody td { border-bottom: 0; }
  h2 { font-size: 1.3rem; }
}
@media print {
  .site-header, .sidebar, .search-box, .skip-link, footer { display: none; }
  .layout { display: block; }
  main { max-width: none; padding: 0; }
  body { font-size: 10pt; }
  h1 { font-size: 22pt; }
  h2 { break-after: avoid; }
  tr, .notice { break-inside: avoid; }
  a { color: inherit; }
}
