  :root {
    color-scheme: light;
    --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

    --paper: #faf9f6;
    --ink: #1a1714;
    --muted: #57534e;
    --rule: #e5e1d8;
    --accent: #0f766e;
    --accent-2: #115e59;
    --select: #b9f0e5;
  }
  @media (prefers-color-scheme: dark) {
    :root {
      color-scheme: dark;
      --paper: #100f0e;
      --ink: #eae6e0;
      --muted: #a09a92;
      --rule: #292623;
      --accent: #2dd4bf;
      --accent-2: #5eead4;
      --select: #115e59;
    }
  }

  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 16px/1.65 var(--sans);
    -webkit-font-smoothing: antialiased;
  }
  ::selection { background: var(--select); color: var(--ink); }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
  a { color: var(--accent); text-underline-offset: .18em; }
  a:hover { color: var(--accent-2); }

  .wrap { max-width: 72rem; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }

  .head .wrap {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem; padding-block: 1.35rem; border-bottom: 1px solid var(--rule);
  }
  .brand {
    font-family: var(--serif); font-style: italic; font-size: 1.5rem;
    letter-spacing: .005em; color: var(--ink); text-decoration: none;
  }
  .brand .dot { color: var(--accent); }
  .head-meta { font-size: .78rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

  main .wrap { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(3.5rem, 8vw, 6rem); }
  .doc { display: grid; gap: clamp(1.4rem, 3vw, 2rem); }
  @media (min-width: 960px) {
    .doc { grid-template-columns: 13rem minmax(0, 1fr); column-gap: 3rem; }
  }
  h1 {
    font-family: var(--serif); font-weight: 400;
    font-size: clamp(2.4rem, 6vw, 3.4rem); line-height: 1.05;
    letter-spacing: -.018em; margin: 0; text-wrap: balance;
  }
  .body p { color: var(--muted); max-width: 62ch; margin: 0 0 1.35rem; text-wrap: pretty; }
  .body p:last-child { margin-bottom: 0; }
  .body strong { color: var(--ink); font-weight: 600; }
  .body p.stamp {
    font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
    color: var(--accent); font-weight: 600; margin-bottom: 1.9rem;
  }
  .body p.stamp strong { color: inherit; font-weight: 600; }
  .back {
    display: inline-block; margin-top: 2.5rem; padding-top: 1.6rem;
    border-top: 1px solid var(--rule); width: 100%;
    text-decoration-color: var(--rule);
  }
  .back:hover { text-decoration-color: currentColor; }

  footer .wrap {
    border-top: 1px solid var(--rule); padding-block: 1.9rem 2.6rem;
    display: flex; flex-wrap: wrap; gap: 1.5rem;
    font-size: .84rem; color: var(--muted);
  }
  footer a { color: var(--muted); text-decoration-color: var(--rule); }
  footer a:hover { color: var(--ink); text-decoration-color: currentColor; }

  /* ---- guide pages ---------------------------------------------------- */
  .body h2, .body .eyebrow {
    font-family: var(--serif); font-weight: 400; color: var(--ink);
    font-size: clamp(1.5rem, 3.2vw, 1.95rem); line-height: 1.15;
    letter-spacing: -.015em; margin: 2.9rem 0 1rem; text-wrap: balance;
  }
  .body > h2:first-child { margin-top: 0; }
  .body h3 {
    font-weight: 600; color: var(--ink); font-size: 1.02rem;
    letter-spacing: -.005em; margin: 2rem 0 .65rem;
  }
  .body p.lede { font-size: clamp(1.05rem, 1.7vw, 1.16rem); color: var(--ink); }
  .body ul, .body ol {
    color: var(--muted); max-width: 62ch; margin: 0 0 1.35rem; padding-left: 1.2rem;
  }
  .body li { margin-bottom: .6rem; text-wrap: pretty; }
  .body li:last-child { margin-bottom: 0; }
  .body li strong { color: var(--ink); font-weight: 600; }

  /* Grid items default to min-content width, which lets a wide table stretch the
     whole page instead of scrolling inside .tbl. min-width:0 restores the clip. */
  .doc > * { min-width: 0; }
  .tbl { overflow-x: auto; max-width: 100%; margin: 0 0 1.7rem; }
  .body table {
    border-collapse: collapse; width: 100%; max-width: 48rem;
    font-size: .93rem; font-variant-numeric: tabular-nums;
  }
  .body caption {
    text-align: left; font-size: .74rem; font-weight: 600; letter-spacing: .14em;
    text-transform: uppercase; color: var(--accent); padding-bottom: .7rem;
  }
  .body th, .body td {
    text-align: left; padding: .5rem .9rem .5rem 0;
    border-bottom: 1px solid var(--rule); vertical-align: baseline;
  }
  .body thead th {
    font-size: .72rem; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: var(--ink); white-space: nowrap;
  }
  .body tbody td { color: var(--muted); }
  .body tbody tr.lead td { color: var(--ink); font-weight: 500; }
  .body .n { text-align: right; padding-right: 0; white-space: nowrap; width: 7rem; }
  .body tbody td.n { color: var(--ink); }

  .note {
    border-left: 2px solid var(--rule); padding-left: 1.15rem; margin: 0 0 1.7rem;
  }
  .note p { font-size: .93rem; margin-bottom: .75rem; }
  .note p:last-child { margin-bottom: 0; }

  .body ul.guide-list { list-style: none; padding: 0; margin: 0 0 1.35rem; max-width: 62ch; }
  .guide-list li { border-top: 1px solid var(--rule); padding: 1.1rem 0; margin: 0; }
  .guide-list li:last-child { border-bottom: 1px solid var(--rule); }
  .guide-list a {
    display: block; font-weight: 500; font-size: 1.04rem;
    letter-spacing: -.01em; margin-bottom: .3rem;
  }
  .guide-list span { display: block; color: var(--muted); font-size: .94rem; }

  .body p.cta-line {
    border-top: 1px solid var(--rule); margin-top: 2.6rem; padding-top: 1.6rem;
    color: var(--ink);
  }
  .body p.cta-line + .back { margin-top: 1.4rem; padding-top: 0; border-top: 0; }

  .body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .9em; color: var(--ink); word-break: break-word;
  }

  /* Guide pages carry long headlines: let the h1 run the full width and keep
     the body in the second column, instead of stacking the title in the rail. */
  .doc-guide h1 { font-size: clamp(2.2rem, 5vw, 3rem); }
  @media (min-width: 960px) {
    .doc-guide h1 { grid-column: 1 / -1; max-width: 26ch; margin-bottom: -.4rem; }
    .doc-guide .body { grid-column: 2 / -1; }
  }

  .body .cta {
    display: inline-block; background: var(--accent); color: #f0fdf9; text-decoration: none;
    font-weight: 600; padding: .9rem 1.4rem; border-radius: 4px; margin-top: .4rem;
  }
  .body .cta:hover { background: var(--accent-2); color: #f0fdf9; }
