
  body { padding-bottom: 0; }

  /* ===== Document hero ===== */
  .doc-hero {
    max-width: 1440px; margin: 0 auto;
    padding: 64px 32px 32px;
    border-bottom: 1px solid var(--line-100);
  }
  .doc-hero .label {
    display: inline-block;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 18px;
  }
  .doc-hero h1 {
    font-size: clamp(48px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.030em;
    font-weight: 500;
    margin: 0 0 18px;
    max-width: 18ch;
  }
  .doc-hero .lede {
    color: var(--text-200);
    font-size: 18px;
    line-height: 1.55;
    max-width: 66ch;
    margin: 0;
  }
  .doc-meta {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--line-100);
    border-bottom: 1px solid var(--line-100);
    margin-top: 40px;
  }
  .doc-meta .cell { padding: 16px 0; border-right: 1px solid var(--line-100); padding-left: 20px; }
  .doc-meta .cell:first-child { padding-left: 0; }
  .doc-meta .cell:last-child  { border-right: 0; }
  .doc-meta .k { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-400); text-transform: uppercase; letter-spacing: 0.12em; }
  .doc-meta .v { margin-top: 6px; font-family: var(--font-mono); font-size: 14px; color: var(--text-100); letter-spacing: -0.005em; }

  /* ===== Layout ===== */
  .doc-body {
    max-width: 1440px; margin: 0 auto;
    padding: 56px 32px 96px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }

  /* ===== TOC ===== */
  .toc {
    position: sticky; top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 8px;
  }
  .toc-title {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-400);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 16px;
  }
  .toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; counter-reset: toc; }
  .toc li {
    counter-increment: toc;
    border-left: 1px solid var(--line-100);
    position: relative;
  }
  .toc li a {
    display: block;
    padding: 7px 0 7px 18px;
    font-size: 13px;
    color: var(--text-300);
    transition: 80ms;
    line-height: 1.35;
  }
  .toc li a::before {
    content: counter(toc, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-500);
    margin-right: 10px;
    letter-spacing: 0.06em;
  }
  .toc li a:hover { color: var(--text-100); }
  .toc li.active { border-left-color: var(--accent); }
  .toc li.active a { color: var(--accent); }
  .toc li.active a::before { color: var(--accent); }

  /* ===== Sections ===== */
  .doc-content { max-width: 760px; }

  section.ms {
    scroll-margin-top: 100px;
    padding-bottom: 64px;
    border-bottom: 1px solid var(--line-100);
    margin-bottom: 64px;
  }
  section.ms:last-of-type { border-bottom: 0; }

  section.ms > .h-row {
    display: flex; align-items: baseline; gap: 14px;
    margin-bottom: 20px;
  }
  section.ms > .h-row .num {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 0.08em;
  }
  section.ms > .h-row h2 {
    font-size: 32px;
    line-height: 1.06;
    letter-spacing: -0.022em;
    font-weight: 500;
    margin: 0;
    flex: 1;
  }

  section.ms p {
    color: var(--text-200);
    font-size: 16px;
    line-height: 1.65;
    margin: 0 0 16px;
    max-width: 68ch;
  }
  section.ms p strong { color: var(--text-100); font-weight: 500; }
  section.ms p em.note { color: var(--text-400); font-style: italic; font-size: 14px; }

  /* heading 3 */
  section.ms h3 {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.012em;
    margin: 32px 0 12px;
    color: var(--text-100);
  }

  /* inline footnote */
  .fn {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 11px;
    vertical-align: super;
    line-height: 0;
    margin-left: 2px;
    cursor: pointer;
  }

  /* lists */
  section.ms ul, section.ms ol.body-list {
    color: var(--text-200);
    font-size: 16px;
    line-height: 1.65;
    margin: 0 0 16px;
    padding-left: 0;
    list-style: none;
    max-width: 68ch;
  }
  section.ms ul li, section.ms ol.body-list li {
    padding: 4px 0 4px 24px;
    position: relative;
  }
  section.ms ul li::before {
    content: "—";
    position: absolute; left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
  }
  section.ms ol.body-list { counter-reset: bl; }
  section.ms ol.body-list li { counter-increment: bl; }
  section.ms ol.body-list li::before {
    content: counter(bl, decimal-leading-zero);
    position: absolute; left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 12px;
    top: 7px;
  }

  /* pullquote / framework callout */
  .callout {
    background: var(--bg-200);
    border-left: 2px solid var(--accent);
    padding: 20px 24px;
    border-radius: 0 var(--r-6) var(--r-6) 0;
    margin: 24px 0;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--text-100);
    max-width: 68ch;
  }
  .callout .lbl {
    font-family: var(--font-mono); font-size: 10.5px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 8px;
  }

  /* framework table - categories */
  .framework {
    margin: 24px 0;
    border-top: 1px solid var(--line-200);
  }
  .fw-row {
    display: grid;
    grid-template-columns: 60px 1fr 90px;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line-100);
    align-items: start;
  }
  .fw-row .sw {
    width: 14px; height: 14px; border-radius: 3px;
    margin-top: 4px;
  }
  .fw-row .body h4 {
    font-size: 17px; font-weight: 500;
    letter-spacing: -0.010em;
    margin: 0 0 6px;
  }
  .fw-row .body p {
    margin: 0;
    font-size: 14px;
    color: var(--text-300);
    line-height: 1.55;
  }
  .fw-row .pts {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 24px;
    color: var(--text-100);
    letter-spacing: -0.018em;
    font-weight: 500;
  }
  .fw-row .pts .of { color: var(--text-400); font-size: 14px; }

  /* sub-criteria detail card */
  .crit-card {
    background: var(--bg-200);
    border-radius: var(--r-12);
    box-shadow: inset 0 0 0 1px var(--line-100);
    margin: 24px 0;
    overflow: hidden;
  }
  .crit-head {
    padding: 18px 24px;
    border-bottom: 1px solid var(--line-100);
    display: flex; justify-content: space-between; align-items: center;
  }
  .crit-head h4 { font-size: 16px; margin: 0; font-weight: 500; letter-spacing: -0.008em; }
  .crit-head .totals {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
  }
  .crit-row {
    display: grid; grid-template-columns: 1fr 100px 60px;
    gap: 20px;
    padding: 16px 24px;
    border-top: 1px solid var(--line-100);
    align-items: center;
  }
  .crit-row:first-of-type { border-top: 0; }
  .crit-row .name { font-size: 14px; color: var(--text-100); font-weight: 500; letter-spacing: -0.005em; }
  .crit-row .ev { font-family: var(--font-mono); font-size: 11px; color: var(--text-400); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.06em; }
  .crit-row .mini-track { height: 4px; background: var(--bg-400); border-radius: 3px; overflow: hidden; }
  .crit-row .mini-fill { height: 100%; background: linear-gradient(90deg, var(--accent-lo), var(--accent)); border-radius: 3px; }
  .crit-row .pts { text-align: right; font-family: var(--font-mono); color: var(--text-100); font-size: 13.5px; }
  .crit-row .pts .of { color: var(--text-400); }

  /* Tier table */
  .tier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0; }
  .tier-card {
    background: var(--bg-200);
    border-radius: var(--r-12);
    box-shadow: inset 0 0 0 1px var(--line-100);
    padding: 22px 20px;
    display: grid; gap: 14px;
    position: relative;
  }
  .tier-card .badge-area { display: flex; justify-content: space-between; align-items: center; }
  .tier-card .range {
    font-family: var(--font-mono); font-size: 22px;
    letter-spacing: -0.018em;
    color: var(--text-100);
    font-weight: 500;
  }
  .tier-card .range .small { color: var(--text-400); font-size: 13px; }
  .tier-card .nm { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); }
  .tier-card .nm.cert    { color: #FFD980; }
  .tier-card .nm.veri    { color: #C7CDD8; }
  .tier-card .nm.list    { color: #E0A06F; }
  .tier-card .nm.prov    { color: var(--text-300); }
  .tier-card p { margin: 0; font-size: 13px; color: var(--text-300); line-height: 1.5; }
  .tier-card .reqs {
    border-top: 1px solid var(--line-100);
    padding-top: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-400);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .tier-card .reqs b { color: var(--text-100); font-weight: 500; }

  /* schedule table */
  .sched-tbl {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
  }
  .sched-tbl th {
    text-align: left;
    font-family: var(--font-mono); font-size: 10.5px; color: var(--text-400);
    text-transform: uppercase; letter-spacing: 0.10em;
    font-weight: 500;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-200);
  }
  .sched-tbl td {
    padding: 16px;
    border-bottom: 1px solid var(--line-100);
    font-size: 14px;
    color: var(--text-200);
  }
  .sched-tbl td.mono { font-family: var(--font-mono); color: var(--text-100); }

  /* editorial team */
  .team-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 24px 0;
  }
  .ed-card-2 {
    background: var(--bg-200);
    border-radius: var(--r-12);
    box-shadow: inset 0 0 0 1px var(--line-100);
    padding: 22px;
    display: grid; gap: 12px;
  }
  .ed-card-2 .av {
    width: 48px; height: 48px; border-radius: 50%;
    display: grid; place-items: center;
    font-family: var(--font-mono); font-weight: 500; color: #fff; font-size: 16px;
  }
  .ed-card-2 .nm { font-size: 16px; font-weight: 500; letter-spacing: -0.008em; }
  .ed-card-2 .rl { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.10em; margin-top: 3px; }
  .ed-card-2 .bio { font-size: 13px; line-height: 1.55; color: var(--text-300); }
  .ed-card-2 .links {
    border-top: 1px solid var(--line-100);
    padding-top: 12px;
    display: flex; gap: 8px;
    font-family: var(--font-mono); font-size: 11px;
  }
  .ed-card-2 .links a { color: var(--text-300); }
  .ed-card-2 .links a:hover { color: var(--accent); }

  /* version diff */
  .ver-card {
    background: var(--bg-200);
    border-radius: var(--r-12);
    box-shadow: inset 0 0 0 1px var(--line-100);
    margin: 16px 0;
    overflow: hidden;
  }
  .ver-head {
    padding: 16px 22px;
    border-bottom: 1px solid var(--line-100);
    display: flex; justify-content: space-between; align-items: center;
  }
  .ver-head .tag {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-100);
    font-weight: 500;
  }
  .ver-head .date { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-400); }
  .ver-body { padding: 8px 22px 22px; }
  .diff-row {
    display: grid; grid-template-columns: 24px 1fr;
    gap: 12px;
    padding: 8px 0;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
  }
  .diff-row .marker {
    font-family: var(--font-mono);
    font-weight: 600;
    text-align: center;
  }
  .diff-row.added { background: rgba(92,227,161,0.04); border-radius: 4px; padding: 8px 12px; margin: 2px -12px; }
  .diff-row.added .marker { color: var(--pos); }
  .diff-row.added .text   { color: var(--text-200); }
  .diff-row.removed { background: rgba(255,93,93,0.04); border-radius: 4px; padding: 8px 12px; margin: 2px -12px; }
  .diff-row.removed .marker { color: var(--neg); }
  .diff-row.removed .text   { color: var(--text-300); text-decoration: line-through; text-decoration-color: var(--neg); }
  .diff-row.changed { padding: 8px 0; }
  .diff-row.changed .marker { color: var(--warn); }

  /* footnotes */
  .footnotes {
    border-top: 1px solid var(--line-200);
    padding-top: 32px;
    margin-top: 64px;
  }
  .footnotes h3 {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-400);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin: 0 0 16px;
    font-weight: 500;
  }
  .footnotes ol { list-style: none; padding: 0; counter-reset: fn; }
  .footnotes li {
    counter-increment: fn;
    padding: 8px 0 8px 32px;
    font-size: 13px;
    color: var(--text-300);
    line-height: 1.55;
    position: relative;
    border-top: 1px solid var(--line-100);
  }
  .footnotes li:first-child { border-top: 0; }
  .footnotes li::before {
    content: counter(fn);
    position: absolute; left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 11px;
    top: 10px;
  }
  .footnotes li a { color: var(--accent); }

  /* sign-off */
  .signoff {
    padding: 28px;
    margin: 56px 0 0;
    background: var(--bg-200);
    border-radius: var(--r-12);
    box-shadow: inset 0 0 0 1px var(--line-100);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-300);
    line-height: 1.6;
  }
  .signoff .sig {
    color: var(--text-100);
    font-size: 14px;
    letter-spacing: -0.005em;
    margin-top: 12px;
  }

  /* responsive */
  @media (max-width: 1100px) {
    .doc-body { grid-template-columns: 1fr; gap: 24px; }
    /* TOC becomes a horizontal chip rail instead of a tall list */
    .toc { position: relative; top: 0; max-height: none; }
    .toc ol {
      display: flex; gap: 6px;
      overflow-x: auto; -webkit-overflow-scrolling: touch;
      padding-bottom: 8px;
      margin: 0;
    }
    .toc li { flex: none; list-style: none; }
    .toc li a {
      display: block;
      padding: 8px 13px;
      border-radius: var(--r-full);
      box-shadow: inset 0 0 0 1px var(--line-100);
      font-size: 12.5px;
      white-space: nowrap;
      color: var(--text-300);
    }
    .toc li.active a {
      color: var(--text-100);
      background: var(--bg-200);
      box-shadow: inset 0 0 0 1px var(--line-300);
    }
    .doc-meta { grid-template-columns: 1fr 1fr; }
    .doc-meta .cell { border-bottom: 1px solid var(--line-100); padding-left: 0 !important; padding-right: 0 !important; }
    .tier-grid { grid-template-columns: 1fr 1fr; }
    .team-row { grid-template-columns: 1fr; }
    .crit-row { grid-template-columns: 1fr; gap: 10px; }
  }

  @media (max-width: 720px) {
    .doc-hero { padding-left: 20px; padding-right: 20px; padding-top: 44px; }
    .doc-hero h1 { font-size: 31px; }
    .doc-hero .lede { font-size: 15px; }
    .doc-body { padding-left: 20px; padding-right: 20px; }
    section.ms { padding-bottom: 44px; }
    section.ms .h-row h2 { font-size: 22px; }
    .tier-grid { grid-template-columns: 1fr; }
    /* wide tables swipe instead of crushing */
    .doc-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .doc-content table th, .doc-content table td { white-space: nowrap; }
  }
