:root {
    --bg: #E8EBE4; --bg-2: #DFE2DA; --card: #FFFFFF;
    --border: #D2D6CB; --divider: #E0E3DB;
    --ink: #1F2A20; --ink-2: #4D5A4F; --ink-3: #5E695F;
    --sage: #3C6943; --sage-2: #2E5B37; --sage-bg: #E4F0DD; --sage-border: #C5D9B8;
    --amber: #9A6B1F; --amber-2: #7A5518; --amber-bg: #FBF0D9; --amber-border: #E8D4A0;
    --dark: #3B4A3C;
    --r: 20px; --r-sm: 12px; --maxw: 1060px;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink); background: var(--bg);
    -webkit-font-smoothing: antialiased; line-height: 1.68; font-size: 16.5px;
  }
  .display {
    font-family: 'Fraunces', Georgia, serif; font-optical-sizing: auto;
    font-weight: 500; letter-spacing: -0.02em; line-height: 1.15;
  }
  a { color: var(--sage-2); }
  :focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; border-radius: 4px; }
  .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

  /* Nav */
  nav.top {
    position: sticky; top: 0; z-index: 50;
    background: rgba(232,235,228,0.92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--divider);
  }
  .nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px; max-width: var(--maxw); margin: 0 auto; gap: 16px;
  }
  .logo {
    font-family: 'Fraunces', serif; font-weight: 600; font-size: 21px;
    color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
  }
  .logo span { color: var(--sage); }
  .beta-tag {
    font-family: 'Manrope', sans-serif; font-style: normal;
    font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--sage-2); background: var(--sage-bg); border: 1px solid var(--sage-border);
    border-radius: 999px; padding: 2px 8px; margin-left: 9px; vertical-align: 3px;
  }
  .nav-links { display: flex; gap: 22px; align-items: center; }
  .nav-links a { text-decoration: none; color: var(--ink-2); font-size: 15px; font-weight: 600; }
  .nav-links a:hover { color: var(--ink); }
  .nav-links a[aria-current="page"] { color: var(--ink); }
  .btn {
    display: inline-block; background: var(--sage); color: #fff;
    font-weight: 700; font-size: 14px; padding: 9px 20px;
    border-radius: 999px; text-decoration: none; transition: background 0.15s ease;
  }
  .btn:hover { background: var(--sage-2); }
  .nav-links a.btn, .nav-links a.btn:hover { color: #fff; }

  /* Header */
  header.page {
    padding: 58px 0 32px;
    background: radial-gradient(900px 380px at 80% -20%, rgba(60,105,67,0.08), transparent 60%), var(--bg);
    border-bottom: 1px solid var(--divider);
  }
  .eyebrow {
    font-size: 12.5px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--sage-2); margin-bottom: 14px;
  }
  header.page h1 { font-size: clamp(34px, 5vw, 46px); margin-bottom: 18px; }
  .verline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .chip {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13.5px; font-weight: 700; color: var(--ink-2);
    background: var(--card); border: 1px solid var(--border);
    border-radius: 999px; padding: 5px 14px;
  }
  .chip.live { color: var(--sage-2); background: var(--sage-bg); border-color: var(--sage-border); }
  .chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
  .chip.soft { color: var(--ink-3); font-weight: 600; }

  /* Layout */
  .doc { display: grid; grid-template-columns: 224px 1fr; gap: 56px; padding: 46px 0 88px; align-items: start; }
  .toc { position: sticky; top: 84px; }
  .toc-lab {
    font-size: 11.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-3); margin-bottom: 12px;
  }
  .toc ol { list-style: none; }
  .toc li { display: flex; gap: 8px; }
  .toc .n {
    font-size: 11.5px; font-weight: 800; color: var(--ink-3);
    font-variant-numeric: tabular-nums; padding: 7px 0 0 8px; min-width: 20px;
  }
  .toc a {
    display: block; flex: 1; text-decoration: none; color: var(--ink-2);
    font-size: 13.5px; font-weight: 600; line-height: 1.4;
    padding: 6px 8px; border-radius: 8px;
  }
  .toc a:hover { background: var(--card); color: var(--ink); }

  /* Content */
  .content { max-width: 43em; min-width: 0; }
  .content section { scroll-margin-top: 88px; margin-bottom: 40px; }
  .content h2 {
    font-family: 'Fraunces', serif; font-weight: 600; letter-spacing: -0.015em;
    font-size: 23px; line-height: 1.25; margin-bottom: 14px;
    display: flex; gap: 12px; align-items: flex-start;
  }
  .content h2 .num {
    font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 800;
    color: var(--sage-2); background: var(--sage-bg); border: 1px solid var(--sage-border);
    border-radius: 999px; min-width: 26px; height: 26px;
    display: inline-grid; place-items: center; flex-shrink: 0; margin-top: 3px;
  }
  .content h3 {
    font-size: 15.5px; font-weight: 800; color: var(--ink);
    margin: 22px 0 8px; letter-spacing: 0.01em;
  }
  .content p { color: var(--ink-2); margin-bottom: 12px; }
  .content p:last-child { margin-bottom: 0; }
  .content strong { color: var(--ink); font-weight: 800; }
  .content em { font-style: italic; }

  .content ul, .content ol.plain { list-style: none; margin: 6px 0 14px; }
  .content li { color: var(--ink-2); padding: 5px 0 5px 24px; position: relative; }
  .content ul li::before {
    content: ""; position: absolute; left: 6px; top: 15px;
    width: 5px; height: 5px; border-radius: 50%; background: var(--sage-border);
  }
  .content ul.negative li::before { background: var(--amber-border); }
  .content ol.plain { counter-reset: ol; }
  .content ol.plain li { counter-increment: ol; }
  .content ol.plain li::before {
    content: counter(ol) "."; position: absolute; left: 4px; top: 5px;
    font-weight: 800; font-size: 13px; color: var(--ink-3);
  }

  /* In short */
  .inshort {
    background: var(--card); border: 1px solid var(--border);
    border-left: 3px solid var(--sage); border-radius: var(--r);
    padding: 26px 28px; margin-bottom: 40px;
  }
  .inshort .lab {
    font-size: 11.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--sage-2); margin-bottom: 12px;
  }
  .inshort p, .inshort li { color: var(--ink-2); }

  /* Tables */
  .tablewrap { overflow-x: auto; margin: 14px 0 16px; }
  table {
    width: 100%; border-collapse: collapse; font-size: 14.5px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r-sm);
    overflow: hidden;
  }
  th {
    text-align: left; font-size: 11.5px; font-weight: 800;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
    padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--border);
    vertical-align: bottom;
  }
  td {
    padding: 13px 16px; color: var(--ink-2);
    border-bottom: 1px solid var(--divider); vertical-align: top; line-height: 1.55;
  }
  tr:last-child td { border-bottom: none; }
  td strong { color: var(--ink); }
  table.kv td:first-child {
    font-weight: 800; color: var(--ink); width: 30%; white-space: nowrap;
  }

  /* Callout */
  .callout {
    background: var(--card); border: 1px solid var(--border);
    border-left: 3px solid var(--amber); border-radius: var(--r-sm);
    padding: 17px 20px; margin: 16px 0;
  }
  .callout p { color: var(--ink); font-weight: 600; margin-bottom: 6px; }
  .callout p:last-child { margin-bottom: 0; }

  .contact-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r); padding: 22px 26px;
  }
  .contact-card p { color: var(--ink-2); margin-bottom: 2px; }
  .contact-card .org { color: var(--ink); font-weight: 800; }

  .versionfoot {
    margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--divider);
    font-size: 13px; color: var(--ink-3);
  }
  .backhome { margin-top: 14px; font-size: 15px; }
  .backhome a { font-weight: 700; text-decoration: none; }
  .backhome a:hover { text-decoration: underline; }

  /* Footer */
  footer { background: var(--dark); color: #AAB3A6; padding: 54px 0 40px; font-size: 14px; }
  footer .logo { color: #fff; margin-bottom: 16px; display: inline-block; }
  .footer-links { display: flex; gap: 24px; margin-top: 6px; flex-wrap: wrap; }
  .footer-links a { color: #C9CFC4; text-decoration: none; }
  .footer-links a:hover { color: #fff; }
  .footer-org { margin-top: 20px; color: #C9CFC4; font-size: 13.5px; font-weight: 600; }
  .disclaimer {
    max-width: 62em; line-height: 1.7; color: #C0C7BC;
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 26px; padding-top: 22px; font-size: 13px;
  }

  @media (max-width: 900px) {
    .doc { grid-template-columns: 1fr; gap: 0; padding: 30px 0 64px; }
    .toc {
      position: static; margin-bottom: 32px;
      background: var(--card); border: 1px solid var(--border);
      border-radius: var(--r); padding: 16px 14px;
    }
    header.page { padding: 38px 0 26px; }
    .nav-links a:not(.btn) { display: none; }
    .content h2 { font-size: 20.5px; }
    .inshort { padding: 22px 20px; }
    td, th { padding: 11px 13px; }
    table { font-size: 14px; }
    table.kv td:first-child { white-space: normal; }
  }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
