:root {
  color-scheme: light;
  --bg: #f7f9f6;
  --surface: #ffffff;
  --line: #dce5dc;
  --text: #243b30;
  --body-text: #41544a;
  --muted: #627469;
  --green: #176b46;
  --soft-green: #e7f1e8;
  --header-height: calc(72px + env(safe-area-inset-top, 0px));
  --anchor-offset: calc(var(--header-height) + 28px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* The document canvas stays fixed. Touch scrolling belongs to this inner viewport. */
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg); overscroll-behavior-y: none; }
body { margin: 0; color: var(--text); font: 16px/1.8 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-text-size-adjust: 100%; }
::selection { color: #15452e; background: #cfe8d5; }
.legal-scroll { position: fixed; inset: 0; overflow-y: auto; background: var(--bg); overscroll-behavior-y: none; scroll-behavior: smooth; scroll-padding-top: var(--anchor-offset); scrollbar-color: #bacbbd transparent; scrollbar-width: thin; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 4px; }
:where(a, summary, [tabindex]):focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 4px; }
.legal-scroll:focus-visible { outline-offset: -2px; }
a, summary { -webkit-tap-highlight-color: #176b4614; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 20; padding: 10px 16px; background: var(--green); color: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }
header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { max-width: 1120px; min-height: var(--header-height); margin: auto; padding: calc(12px + env(safe-area-inset-top, 0px)) max(28px, env(safe-area-inset-right, 0px)) 12px max(28px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { min-height: 44px; display: inline-flex; align-items: center; font-size: 21px; font-weight: 750; letter-spacing: -.8px; text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 4px; }
.header-actions a { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 12px; color: var(--muted); font-size: 14px; font-weight: 550; text-decoration: none; transition: background-color .15s, color .15s; }
.header-actions a[aria-current="page"] { color: var(--green); background: var(--soft-green); }
.reading-progress { position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: var(--green); transform: scaleX(0); transform-origin: left; pointer-events: none; }
main { max-width: 1120px; margin: auto; padding: 64px max(28px, env(safe-area-inset-right, 0px)) 72px max(28px, env(safe-area-inset-left, 0px)); }
.eyebrow { font: 600 11px/1.5 ui-monospace, monospace; letter-spacing: 1.8px; color: var(--green); }
h1 { max-width: 800px; font-size: clamp(34px, 5vw, 52px); line-height: 1.15; letter-spacing: -1.8px; margin: 18px 0 20px; font-weight: 720; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--muted); }
.document-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 48px; }
.toc { position: sticky; top: calc(var(--header-height) + 24px); min-width: 0; border-top: 1px solid var(--line); }
.toc summary { min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; list-style: none; font-size: 14px; font-weight: 650; }
.toc summary::-webkit-details-marker { display: none; }
.toc-count { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.toc-chevron { width: 16px; height: 16px; flex-shrink: 0; transition: transform .18s ease; }
.toc[open] .toc-chevron { transform: rotate(180deg); }
.toc nav { max-height: calc(100dvh - var(--header-height) - 120px); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; padding-bottom: 8px; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: section; }
.toc li { counter-increment: section; }
.toc a { min-height: 44px; display: flex; align-items: baseline; gap: 10px; padding: 10px 8px; border-radius: 8px; color: var(--body-text); font-size: 13px; line-height: 1.5; text-decoration: none; }
.toc a::before { content: counter(section, decimal-leading-zero); font: 11px/1.8 ui-monospace, monospace; color: var(--muted); flex-shrink: 0; }
article { min-width: 0; max-width: 72ch; font-size: 17px; }
article section { margin-top: 40px; padding-top: 36px; border-top: 1px solid var(--line); }
article section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
article a { overflow-wrap: anywhere; }
article :where(p, ul) { margin: 0 0 20px; color: var(--body-text); }
article p:last-child { margin-bottom: 0; }
article ul { padding-left: 24px; }
article li { padding-left: 3px; margin: 10px 0; }
article strong { color: var(--text); font-weight: 650; }
h2 { font-size: 23px; font-weight: 680; margin: 0 0 20px; line-height: 1.4; letter-spacing: -.4px; text-wrap: pretty; }
h3 { margin: 30px 0 14px; font-size: 18px; line-height: 1.5; font-weight: 650; }
.table-scroll { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.7; }
th, td { padding: 16px 18px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--soft-green); color: var(--text); font-weight: 650; }
td { color: var(--body-text); min-width: 180px; }
tbody tr:last-child td { border-bottom: 0; }
footer { border-top: 1px solid var(--line); padding: 24px max(28px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(28px, env(safe-area-inset-left, 0px)); color: var(--muted); font-size: 12px; }
.footer-inner { max-width: 1064px; margin: auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 28px; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.back-to-top { gap: 6px; }
@media (hover: hover) {
  .header-actions a:hover, .toc a:hover { background: var(--soft-green); color: var(--green); }
  article a:hover, footer a:hover { text-decoration: underline; }
}
@media (max-width: 760px) {
  :root { --header-height: calc(64px + env(safe-area-inset-top, 0px)); --anchor-offset: calc(var(--header-height) + 84px); }
  .header-inner { padding: calc(10px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 10px max(20px, env(safe-area-inset-left, 0px)); gap: 8px; }
  .header-actions a { padding-inline: 12px; font-size: 13px; }
  main { padding: 36px max(22px, env(safe-area-inset-right, 0px)) 48px max(22px, env(safe-area-inset-left, 0px)); }
  h1 { font-size: 36px; letter-spacing: -1.1px; }
  .meta { flex-direction: column; gap: 4px; font-size: 12px; }
  .document-layout { display: block; margin-top: 28px; }
  .toc { z-index: 5; top: calc(var(--header-height) + 8px); margin-bottom: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 4px 16px #203a3006; }
  .toc summary { min-height: 52px; padding: 10px 16px; }
  .toc nav { max-height: min(52dvh, 420px); padding: 0 8px 8px; }
  .toc a { min-height: 48px; font-size: 14px; padding: 12px 10px; }
  article { font-size: 16px; line-height: 1.85; }
  article section { margin-top: 32px; padding-top: 28px; }
  h2 { font-size: 22px; }
  h3 { font-size: 17px; }
  .table-scroll { margin-inline: -2px; }
  th, td { padding: 14px; min-width: 160px; }
  footer { padding-inline: max(22px, env(safe-area-inset-left, 0px)); }
  .footer-inner { display: block; }
  footer nav { margin-top: 12px; gap: 2px 20px; }
}
@media (max-width: 359px) {
  .header-inner { padding-inline: 16px; }
  main { padding-inline: 18px; }
  .header-actions a { padding-inline: 10px; }
  h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .legal-scroll { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  html, body { height: auto; overflow: visible; background: white; color: #111; }
  .legal-scroll { position: static; overflow: visible; background: white; }
  header, .toc, footer, .skip-link { display: none; }
  main { max-width: none; padding: 0; }
  .document-layout { display: block; margin-top: 32px; }
  article { max-width: none; font-size: 11pt; }
  h1, h2, h3, article p, article li, article strong, article a, td, th, .meta { color: #111; }
  .table-scroll { overflow: visible; }
  th, td { min-width: 0; }
  h2, h3 { break-after: avoid; }
}
