:root {
    --bg:#f7f6f2; --bg-2:#ffffff; --bg-paper:#f1ede2; --bg-dark:#0b0b0c;
    --line:#e3e1d9; --line-2:#d8d6cf;
    --ink-0:#0b0b0c; --ink-1:#1a1a1e; --ink-2:#3d3d44; --ink-3:#8a8a92;
    --accent:#ff6a3d; --moss:#6b7d5a;
    --warn:#b8541a;
  }
  * { box-sizing: border-box; }
  html, body { margin:0; padding:0; background: var(--bg); color: var(--ink-1); }
  body { font-family:"Inter Tight", system-ui, sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.55; }
  ::selection { background: var(--accent); color: #fff; }
  a { color: inherit; text-decoration: none; }
  .container { max-width: 1200px; margin: 0 auto; padding-inline: clamp(20px, 4vw, 56px); }
  .lg { font-family:"Inter Tight", sans-serif; font-weight: 600; letter-spacing: -0.055em; line-height: 1; display: inline-flex; align-items: baseline; color: var(--ink-0); }
  .lg .acc { color: var(--accent); }
  .mono { font-family:"JetBrains Mono", monospace; }

  /* NAV */
  .nav-wrap { position: sticky; top: 0; z-index: 50; background: rgba(247,246,242,0.88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .nav { display: flex; align-items: center; gap: 32px; padding: 18px 0; }
  .nav .logo-link { font-size: 34px; }
  .nav .crumb { font-family:"JetBrains Mono", monospace; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); display: inline-flex; align-items: center; gap: 8px; padding-left: 14px; border-left: 1px solid var(--line-2); }
  .nav .crumb b { color: var(--ink-0); font-weight: 600; }
  .nav .links { display: flex; gap: 28px; margin-left: auto; align-items: center; }
  .nav .links a { font-size: 17px; font-weight: 500; color: var(--ink-1); transition: color 150ms ease; }
  .nav .links a:hover { color: var(--ink-0); }
  .nav .links a.active { color: var(--accent); font-weight: 700; }
  .nav .phone { font-family:"JetBrains Mono", monospace; font-size: 15px; color: var(--ink-0); padding: 10px 18px; border: 1.5px solid var(--ink-0); border-radius: 999px; transition: all 150ms ease; font-weight: 600; }
  .nav .phone:hover { background: var(--ink-0); color: #fff; }
  @media (max-width: 1024px) { .nav .links, .nav .crumb { display: none; } }

  .progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: transparent; z-index: 100; pointer-events: none; }
  .progress .bar { height: 100%; width: 0%; background: var(--accent); transition: width 80ms ease; }

  /* COVER */
  .guide-cover {
    padding: 56px 0 0;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(to bottom, var(--bg-paper) 0%, var(--bg) 92%);
    position: relative; overflow: hidden;
  }
  .guide-cover::before {
    content: ""; position: absolute; inset: 0; z-index: 0;
    background-image: repeating-linear-gradient(
      90deg, transparent 0, transparent calc(100%/12 - 1px),
      rgba(11,11,12,0.04) calc(100%/12 - 1px), rgba(11,11,12,0.04) calc(100%/12)
    );
    pointer-events: none;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.45), transparent 70%);
  }
  .guide-cover .container { position: relative; z-index: 1; }
  .guide-meta-strip {
    display: flex; align-items: center; gap: 24px;
    padding-bottom: 22px; margin-bottom: 28px;
    border-bottom: 1px solid var(--line); flex-wrap: wrap;
    font-family:"JetBrains Mono", monospace;
    font-size: 11px; letter-spacing: 0.16em;
    color: var(--ink-3); text-transform: uppercase;
  }
  .guide-meta-strip .pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--bg-2); border: 1px solid var(--line);
    padding: 7px 14px; border-radius: 999px;
    color: var(--ink-1); letter-spacing: 0.14em; font-weight: 600;
  }
  .guide-meta-strip .pill .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
  .guide-meta-strip .pill.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
  .guide-meta-strip .pill.accent .dot { background: #fff; }
  .guide-meta-strip span b { color: var(--ink-0); font-weight: 700; }

  .cover-grid { display: grid; grid-template-columns: 1fr 360px; gap: 72px; padding-bottom: 64px; align-items: end; }
  @media (max-width: 980px) { .cover-grid { grid-template-columns: 1fr; gap: 40px; } }
  .cover-grid .eyebrow {
    font-family:"JetBrains Mono", monospace;
    font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--accent); font-weight: 700;
    margin-bottom: 28px;
    display: flex; align-items: center; gap: 14px;
  }
  .cover-grid .eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--accent); }
  h1.guide-title {
    font-family:"Source Serif 4", Georgia, serif; font-weight: 500;
    font-size: clamp(40px, 5.4vw, 76px);
    line-height: 0.98; letter-spacing: -0.025em;
    color: var(--ink-0); margin: 0 0 28px;
    text-wrap: balance; max-width: 18ch;
  }
  h1.guide-title em { font-style: italic; color: var(--accent); font-weight: 500; }
  .guide-dek {
    font-family:"Source Serif 4", Georgia, serif;
    font-size: clamp(18px, 1.55vw, 22px); font-weight: 400; line-height: 1.55;
    color: var(--ink-2); margin: 0 0 32px; max-width: 60ch;
  }
  .guide-cover-byline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: -6px 0 28px;
  }
  .guide-cover-byline .av {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-paper);
    border: 1px solid var(--line);
    overflow: hidden;
    flex-shrink: 0;
  }
  .guide-cover-byline .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .guide-cover-byline .who { line-height: 1.3; font-size: 13.5px; color: var(--ink-2); }
  .guide-cover-byline .who b { color: var(--ink-0); font-weight: 600; }
  .guide-cover-byline .who span { color: var(--ink-3); }
  .guide-cover-byline .who .sep { margin: 0 8px; color: var(--line-2); }
  .guide-cover-byline a:hover { color: var(--accent); }
  .cover-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
  .gbtn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 24px; border-radius: 999px;
    font-family:"Inter Tight", sans-serif;
    font-size: 15px; font-weight: 600;
    transition: all 180ms ease; cursor: pointer;
  }
  .gbtn.pri { background: var(--ink-0); color: #fff; border: 1.5px solid var(--ink-0); }
  .gbtn.pri:hover { background: var(--accent); border-color: var(--accent); }
  .gbtn.sec { background: transparent; color: var(--ink-0); border: 1.5px solid var(--ink-0); }
  .gbtn.sec:hover { background: var(--ink-0); color: #fff; }
  .gbtn .ico { width: 14px; height: 14px; flex-shrink: 0; }

  .guide-book {
    position: relative; aspect-ratio: 3/4;
    background: var(--bg-2); border: 1px solid var(--line);
    border-radius: 6px; padding: 36px 30px;
    display: flex; flex-direction: column;
    box-shadow: -8px 8px 0 -1px var(--bg-paper), -8px 8px 0 0 var(--line),
      -16px 16px 0 -1px var(--bg-paper), -16px 16px 0 0 var(--line);
    overflow: hidden;
  }
  .guide-book::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0;
    width: 8px; background: var(--accent);
    border-right: 1px solid rgba(0,0,0,0.08);
  }
  .guide-book .top-tag {
    font-family:"JetBrains Mono", monospace;
    font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--ink-3); font-weight: 600;
    padding-bottom: 14px; border-bottom: 1px solid var(--line-2);
    margin-bottom: 18px;
  }
  .guide-book .top-tag b { color: var(--ink-0); }
  .guide-book .vol {
    font-family:"JetBrains Mono", monospace;
    font-size: 11px; letter-spacing: 0.18em; color: var(--accent);
    font-weight: 700; margin-bottom: 12px;
  }
  .guide-book h4 {
    font-family:"Source Serif 4", Georgia, serif;
    font-weight: 500; font-style: italic;
    font-size: 24px; line-height: 1.1; letter-spacing: -0.015em;
    margin: 0 0 14px; color: var(--ink-0);
    text-wrap: balance;
  }
  .guide-book p { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin: 0; max-width: 28ch; }
  .guide-book .glyph {
    margin-top: auto;
    font-family:"Source Serif 4", Georgia, serif;
    font-style: italic; font-size: 100px;
    color: var(--accent); opacity: 0.4;
    line-height: 0.85; align-self: flex-end;
    transform: translateY(8px);
  }
  .guide-book .foot {
    margin-top: 14px; padding-top: 14px;
    border-top: 1px solid var(--line-2);
    font-family:"JetBrains Mono", monospace;
    font-size: 10.5px; letter-spacing: 0.14em;
    color: var(--ink-3); text-transform: uppercase;
    display: flex; justify-content: space-between; gap: 12px;
  }
  .guide-book .foot b { color: var(--ink-0); }

  .glance {
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }
  .glance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
  @media (max-width: 880px) { .glance-grid { grid-template-columns: repeat(2, 1fr); } }
  .glance-cell {
    padding: 26px 28px;
    border-right: 1px solid var(--line);
  }
  .glance-cell:last-child { border-right: 0; }
  .glance-cell .l {
    font-family:"JetBrains Mono", monospace;
    font-size: 10.5px; letter-spacing: 0.18em;
    color: var(--ink-3); text-transform: uppercase;
    margin-bottom: 10px;
  }
  .glance-cell .v {
    font-family:"Source Serif 4", Georgia, serif;
    font-size: 22px; font-weight: 500;
    color: var(--ink-0); letter-spacing: -0.012em;
    line-height: 1.2;
  }
  .glance-cell .v em { font-style: italic; color: var(--accent); }
  .glance-cell .s {
    font-size: 13px; color: var(--ink-2); margin-top: 4px; line-height: 1.4;
  }
  @media (max-width: 880px) {
    .glance-cell { border-bottom: 1px solid var(--line); }
    .glance-cell:nth-child(2n) { border-right: 0; }
    .glance-cell:nth-child(3), .glance-cell:nth-child(4) { border-bottom: 0; }
  }

  /* TOC */
  .toc-section { padding: 96px 0; border-bottom: 1px solid var(--line); }
  .toc-section .head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
  .toc-section .head h2 { font-family:"Source Serif 4", Georgia, serif; font-weight: 500; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -0.018em; color: var(--ink-0); margin: 0; max-width: 18ch; }
  .toc-section .head h2 em { font-style: italic; color: var(--accent); font-weight: 500; }
  .toc-section .head .meta { font-family:"JetBrains Mono", monospace; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
  .toc-section .head .meta b { color: var(--ink-0); }
  .toc-list { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
  .toc-row {
    display: grid; grid-template-columns: 80px 1fr 100px 60px;
    gap: 32px; align-items: center; padding: 22px 0;
    border-bottom: 1px solid var(--line);
    transition: background 200ms ease, padding 200ms ease;
  }
  .toc-row:hover { background: var(--bg-paper); padding-inline: 16px; }
  @media (max-width: 800px) {
    .toc-row { grid-template-columns: 60px 1fr; gap: 16px; padding: 18px 0; }
    .toc-row .toc-tag, .toc-row .toc-arr { display: none; }
  }
  .toc-row .toc-num { font-family:"JetBrains Mono", monospace; font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: 0.06em; }
  .toc-row .toc-title { font-family:"Source Serif 4", Georgia, serif; font-weight: 500; font-size: 22px; letter-spacing: -0.012em; line-height: 1.25; color: var(--ink-0); text-wrap: balance; }
  .toc-row:hover .toc-title { color: var(--accent); }
  .toc-row .toc-title em { font-style: italic; color: var(--accent); font-weight: 500; }
  .toc-row .toc-title .sub { display: block; margin-top: 6px; font-family:"JetBrains Mono", monospace; font-style: normal; font-weight: 600; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
  .toc-row .toc-tag {
    font-family:"JetBrains Mono", monospace;
    font-size: 10px; letter-spacing: 0.14em;
    color: var(--ink-3); text-transform: uppercase;
    font-weight: 600;
    text-align: right;
  }
  .toc-row .toc-tag.added { color: var(--moss); }
  .toc-row .toc-tag.added::before { content: "+ "; }
  .toc-row .toc-arr { justify-self: end; font-family:"JetBrains Mono", monospace; font-size: 13px; color: var(--ink-3); transition: transform 200ms ease, color 200ms ease; }
  .toc-row:hover .toc-arr { color: var(--accent); transform: translateX(6px); }

  .toc-pill {
    position: fixed;
    right: clamp(20px, 3vw, 40px);
    bottom: clamp(20px, 3vw, 36px);
    z-index: 60;
    display: inline-flex; align-items: center; gap: 14px;
    padding: 12px 18px 12px 16px;
    background: var(--ink-0); color: #fff;
    border-radius: 999px;
    border: 1.5px solid var(--ink-0);
    box-shadow: 0 6px 24px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.08);
    cursor: pointer;
    font-family:"JetBrains Mono", monospace;
    font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
    font-weight: 600;
    transition: opacity 250ms ease, transform 250ms ease, background 180ms ease;
    opacity: 0; transform: translateY(12px); pointer-events: none;
  }
  .toc-pill.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .toc-pill:hover { background: var(--accent); border-color: var(--accent); }
  .toc-pill .pill-num {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px; letter-spacing: 0.08em;
    transition: background 180ms ease, color 180ms ease;
  }
  .toc-pill:hover .pill-num { background: #fff; color: var(--accent); }
  .toc-pill .pill-sep { opacity: 0.5; font-weight: 400; }
  .toc-pill .pill-title {
    font-family:"Source Serif 4", Georgia, serif;
    text-transform: none;
    letter-spacing: -0.005em;
    font-style: italic;
    font-weight: 500;
    font-size: 14px;
    max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .toc-pill .pill-up { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.7; }
  @media (max-width: 640px) {
    .toc-pill .pill-title, .toc-pill .pill-sep { display: none; }
  }

  .toc-overlay {
    position: fixed; inset: 0;
    z-index: 200;
    background: rgba(11,11,12,0.55);
    backdrop-filter: blur(6px);
    opacity: 0; pointer-events: none;
    transition: opacity 220ms ease;
    display: flex; align-items: stretch; justify-content: center;
    padding: clamp(24px, 4vh, 56px) clamp(16px, 4vw, 56px);
  }
  .toc-overlay.open { opacity: 1; pointer-events: auto; }
  .toc-overlay .toc-sheet {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 16px;
    width: 100%; max-width: 1100px;
    max-height: 100%;
    display: flex; flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.985);
    transition: transform 280ms cubic-bezier(.2,.7,.2,1);
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  }
  .toc-overlay.open .toc-sheet { transform: translateY(0) scale(1); }
  .toc-overlay .sheet-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 22px 32px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(to bottom, var(--bg-paper) 0%, var(--bg) 100%);
    flex-wrap: wrap; gap: 12px;
  }
  .toc-overlay .sheet-head .sh-lab {
    font-family:"JetBrains Mono", monospace;
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--ink-3); font-weight: 600;
  }
  .toc-overlay .sheet-head .sh-lab b { color: var(--ink-0); }
  .toc-overlay .sheet-head .sh-close {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg-2);
    display: grid; place-items: center;
    cursor: pointer; color: var(--ink-1);
    transition: all 150ms ease;
    font-family:"JetBrains Mono", monospace; font-size: 16px; line-height: 1;
  }
  .toc-overlay .sheet-head .sh-close:hover { background: var(--ink-0); color: #fff; border-color: var(--ink-0); }
  .toc-overlay .sheet-body { overflow-y: auto; padding: 28px 32px 32px; flex: 1; }
  .toc-overlay .sheet-tools {
    padding: 14px 32px;
    border-top: 1px solid var(--line);
    background: var(--bg-2);
    display: flex; gap: 22px; flex-wrap: wrap;
  }
  .toc-overlay .sheet-tools a,
  .toc-overlay .sheet-tools button {
    font-family:"JetBrains Mono", monospace;
    font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-2); font-weight: 600;
    display: inline-flex; align-items: center; gap: 8px;
    transition: color 150ms ease;
    border: 0; background: transparent; padding: 0; cursor: pointer;
  }
  .toc-overlay .sheet-tools a:hover,
  .toc-overlay .sheet-tools button:hover { color: var(--accent); }
  .toc-overlay .sheet-tools .ico { width: 12px; height: 12px; }
  .toc-overlay .toc-row.current { background: var(--bg-paper); padding-inline: 16px; }
  .toc-overlay .toc-row.current .toc-title { color: var(--accent); }
  .toc-overlay .toc-row.current .toc-arr { color: var(--accent); transform: translateX(6px); }

  /* GUIDE BODY */
  .guide-body { padding: 96px 0; border-bottom: 1px solid var(--line); }
  .guide-layout {
    display: grid;
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
    align-items: start;
  }

  .chapter-rail { display: none; position: sticky; top: 96px; }
  @media (max-width: 1100px) { .chapter-rail { position: relative; top: 0; } }
  .chapter-rail h5 { font-family:"JetBrains Mono", monospace; font-weight: 500; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .chapter-rail ol { list-style: none; padding: 0; margin: 0 0 32px; counter-reset: ch; display: flex; flex-direction: column; gap: 4px; }
  .chapter-rail ol li { counter-increment: ch; }
  .chapter-rail ol li a {
    display: grid; grid-template-columns: 30px 1fr; gap: 10px;
    padding: 8px 0; align-items: baseline;
    color: var(--ink-2); font-size: 13px; line-height: 1.35;
    transition: color 150ms ease;
  }
  .chapter-rail ol li a::before {
    content: counter(ch, decimal-leading-zero);
    font-family:"JetBrains Mono", monospace;
    font-size: 10.5px; letter-spacing: 0.06em;
    color: var(--ink-3); font-weight: 700;
  }
  .chapter-rail ol li.active a { color: var(--accent); }
  .chapter-rail ol li.active a::before { color: var(--accent); }
  .chapter-rail ol li a:hover { color: var(--ink-0); }
  .chapter-rail ol li.added a::after {
    content: "+";
    margin-left: 4px;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    color: var(--moss);
    font-weight: 700;
  }
  .rail-tools { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; border-top: 1px solid var(--line); }
  .rail-tools a {
    font-family:"JetBrains Mono", monospace;
    font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-2); font-weight: 600;
    padding: 8px 0;
    display: flex; align-items: center; gap: 8px;
    transition: color 150ms ease;
  }
  .rail-tools a:hover { color: var(--accent); }
  .rail-tools a .ico { width: 12px; height: 12px; }
  .rail-tools button {
    font-family:"JetBrains Mono", monospace;
    font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-2); font-weight: 600;
    padding: 8px 0;
    display: flex; align-items: center; gap: 8px;
    transition: color 150ms ease;
    border: 0; background: transparent; cursor: pointer; text-align: left;
  }
  .rail-tools button:hover { color: var(--accent); }
  .rail-tools button .ico { width: 12px; height: 12px; }

  .gc-body { width: 100%; max-width: 720px; margin-inline: auto; }

  /* author byline */
  .author-byline {
    padding-bottom: 28px; margin-bottom: 40px;
    border-bottom: 1px solid var(--line);
    display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  }
  .author-byline .av { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-paper); overflow: hidden; flex-shrink: 0; border: 1px solid var(--line); }
  .author-byline .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .author-byline .who { line-height: 1.35; font-size: 14px; color: var(--ink-2); }
  .author-byline .who b { color: var(--ink-0); font-weight: 600; }
  .author-byline .who span { color: var(--ink-3); font-family:"JetBrains Mono", monospace; font-size: 11.5px; letter-spacing: 0.06em; }
  .author-byline .share-row { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
  .author-byline .share-row a {
    padding: 7px 12px; border: 1.5px solid var(--line-2);
    border-radius: 999px; font-family:"JetBrains Mono", monospace;
    font-size: 11px; color: var(--ink-1);
    letter-spacing: 0.06em; transition: all 150ms ease;
  }
  .author-byline .share-row a:hover { border-color: var(--ink-0); color: var(--ink-0); }

  /* chapter header */
  .chapter-head {
    margin-bottom: 28px; padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 96px;
  }
  .chapter-head .ch-tag {
    font-family:"JetBrains Mono", monospace;
    font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--accent); font-weight: 700;
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 12px;
  }
  .chapter-head .ch-tag .bar { flex: 1; height: 1px; background: var(--line); max-width: 80px; }
  .chapter-head .ch-tag.added { color: var(--moss); }
  .chapter-head .ch-tag .added-badge {
    background: var(--moss); color: #fff;
    padding: 2px 8px; border-radius: 4px;
    font-size: 10px; letter-spacing: 0.14em;
    margin-left: 4px;
  }
  .chapter-head h2.ch-title {
    font-family:"Source Serif 4", Georgia, serif;
    font-weight: 500; font-size: clamp(32px, 3.6vw, 44px);
    letter-spacing: -0.02em; line-height: 1.08;
    color: var(--ink-0); margin: 0;
    text-wrap: balance; max-width: 22ch;
  }
  .chapter-head h2.ch-title em { font-style: italic; color: var(--accent); font-weight: 500; }

  .gc-body p {
    font-family:"Source Serif 4", Georgia, serif;
    font-size: 19px; line-height: 1.7;
    color: var(--ink-1); margin: 0 0 22px;
    font-weight: 400;
  }
  .gc-body p strong { color: var(--ink-0); font-weight: 600; }
  .gc-body p em { font-style: italic; color: var(--ink-2); }
  .gc-body p a, .gc-body li a {
    color: var(--accent);
    border-bottom: 1px solid rgba(255,106,61,0.35);
    transition: border-color 150ms ease;
  }
  .gc-body p a:hover, .gc-body li a:hover { border-bottom-color: var(--accent); }

  .gc-body h3 {
    font-family:"Source Serif 4", Georgia, serif;
    font-weight: 600; font-size: 24px;
    letter-spacing: -0.012em; line-height: 1.25;
    color: var(--ink-0);
    margin: 40px 0 14px;
    scroll-margin-top: 96px;
  }
  .gc-body h3 em { font-style: italic; color: var(--accent); font-weight: 500; }

  .gc-body ul, .gc-body ol {
    font-family:"Source Serif 4", Georgia, serif;
    font-size: 18px; line-height: 1.65;
    color: var(--ink-1); margin: 0 0 24px;
    padding-left: 0; list-style: none;
  }
  .gc-body ul li, .gc-body ol li {
    padding-left: 28px; position: relative;
    margin-bottom: 12px;
  }
  .gc-body ul li::before {
    content: ""; position: absolute;
    left: 6px; top: 14px;
    width: 8px; height: 1.5px;
    background: var(--accent);
  }
  .gc-body ol { counter-reset: ol; }
  .gc-body ol li { counter-increment: ol; }
  .gc-body ol li::before {
    content: counter(ol) ".";
    position: absolute; left: 0; top: 0;
    font-family:"JetBrains Mono", monospace;
    font-size: 13px; font-weight: 700;
    color: var(--accent);
    width: 22px;
  }
  .gc-body li strong { color: var(--ink-0); font-weight: 600; }
  .gc-body li em { font-style: italic; color: var(--ink-2); }
  .gc-body ol ol {
    margin: 12px 0 4px;
    font-size: 17px;
    counter-reset: oli;
  }
  .gc-body ol ol li { counter-increment: oli; padding-left: 28px; margin-bottom: 8px; }
  .gc-body ol ol li::before { content: counter(oli, lower-alpha) "."; }

  .step-stack {
    margin: 28px 0 32px;
    display: flex; flex-direction: column;
    border-radius: 14px; overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-2);
  }
  .step {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0;
    border-bottom: 1px solid var(--line);
  }
  .step:last-child { border-bottom: 0; }
  .step .step-num {
    background: var(--bg-paper);
    padding: 22px 18px;
    font-family:"JetBrains Mono", monospace;
    font-size: 13px; font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.06em;
    border-right: 1px solid var(--line);
    display: flex; justify-content: center; align-items: flex-start;
  }
  .step .step-body { padding: 22px 24px; }
  .step .step-body h5 {
    font-family:"Source Serif 4", Georgia, serif;
    font-weight: 600; font-size: 20px;
    margin: 0 0 6px; color: var(--ink-0);
    letter-spacing: -0.008em;
    line-height: 1.25;
  }
  .step .step-body h5 em { font-style: italic; color: var(--accent); font-weight: 500; }
  .step .step-body p {
    font-family:"Source Serif 4", Georgia, serif;
    font-size: 16.5px; line-height: 1.55;
    color: var(--ink-2); margin: 0;
  }
  .step .step-body .step-note {
    margin-top: 12px;
    font-family:"JetBrains Mono", monospace;
    font-size: 11.5px; letter-spacing: 0.06em;
    color: var(--ink-3);
    padding: 6px 10px;
    background: var(--bg);
    border: 1px dashed var(--line-2);
    border-radius: 6px;
    display: inline-block;
  }
  .step .step-body .step-note b { color: var(--ink-0); }

  .checklist {
    margin: 28px 0 32px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
  }
  .checklist .ch-head {
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-paper);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 8px;
  }
  .checklist .ch-head .lab {
    font-family:"JetBrains Mono", monospace;
    font-size: 11px; letter-spacing: 0.16em;
    color: var(--ink-3); text-transform: uppercase;
  }
  .checklist .ch-head .lab b { color: var(--ink-0); font-weight: 700; }
  .checklist .ch-head .progress-tag {
    font-family:"JetBrains Mono", monospace;
    font-size: 11px; letter-spacing: 0.12em;
    color: var(--accent); font-weight: 700;
    text-transform: uppercase;
  }
  .checklist .items { display: flex; flex-direction: column; }
  .checklist .items label {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    gap: 14px;
    padding: 14px 22px;
    border-bottom: 1px dashed var(--line-2);
    cursor: pointer;
    transition: background 150ms ease;
    align-items: center;
  }
  .checklist .items label:last-child { border-bottom: 0; }
  .checklist .items label:hover { background: var(--bg-paper); }
  .checklist .items input[type="checkbox"] {
    appearance: none;
    width: 18px; height: 18px;
    border: 1.5px solid var(--ink-3);
    border-radius: 4px;
    display: grid; place-items: center;
    margin: 0; cursor: pointer;
    transition: all 150ms ease;
  }
  .checklist .items input[type="checkbox"]:hover { border-color: var(--ink-0); }
  .checklist .items input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
  .checklist .items input[type="checkbox"]:checked::after {
    content: "✓"; color: #fff; font-size: 13px; font-weight: 700; line-height: 1;
  }
  .checklist .items .txt {
    font-family:"Source Serif 4", Georgia, serif;
    font-size: 17px; line-height: 1.4;
    color: var(--ink-1);
    transition: all 150ms ease;
  }
  .checklist .items input:checked ~ .txt {
    text-decoration: line-through;
    color: var(--ink-3);
  }
  .checklist .items .hint {
    font-family:"JetBrains Mono", monospace;
    font-size: 10.5px; letter-spacing: 0.1em;
    color: var(--ink-3); text-transform: uppercase;
  }

  /* CALLOUTS (additions to user content) */
  .gnote {
    margin: 28px 0;
    border-radius: 12px;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 14px;
    align-items: start;
    border: 1px solid var(--line);
    background: var(--bg-2);
  }
  .gnote .gn-ico {
    width: 28px; height: 28px;
    display: grid; place-items: center;
    border-radius: 50%;
    font-family:"JetBrains Mono", monospace;
    font-size: 13px; font-weight: 700;
  }
  .gnote .gn-body { padding-top: 3px; }
  .gnote .gn-body .gn-lab {
    font-family:"JetBrains Mono", monospace;
    font-size: 10.5px; letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: 700;
  }
  .gnote .gn-body p {
    font-family:"Source Serif 4", Georgia, serif;
    font-size: 17px; line-height: 1.5;
    color: var(--ink-1); margin: 0;
  }
  .gnote .gn-body p strong { color: var(--ink-0); }
  .gnote.tip { background: #fbfaf6; border-color: var(--line); }
  .gnote.tip .gn-ico { background: var(--moss); color: #fff; }
  .gnote.tip .gn-lab { color: var(--moss); }
  .gnote.warn { background: #fdf6f2; border-color: #f0d9c8; }
  .gnote.warn .gn-ico { background: var(--warn); color: #fff; }
  .gnote.warn .gn-lab { color: var(--warn); }
  .gnote.key { background: var(--ink-0); border-color: var(--ink-0); }
  .gnote.key .gn-ico { background: var(--accent); color: #fff; }
  .gnote.key .gn-lab { color: var(--accent); }
  .gnote.key .gn-body p { color: #fff; font-style: italic; font-size: 19px; line-height: 1.45; }
  .gnote.key .gn-body p strong { color: var(--accent); font-weight: 500; }

  /* KV TABLE (added) */
  .kv-grid {
    margin: 28px 0; background: var(--bg-2);
    border: 1px solid var(--line); border-radius: 14px;
    overflow: hidden;
  }
  .kv-grid .kv-head {
    padding: 14px 22px; border-bottom: 1px solid var(--line);
    background: var(--bg-paper);
    font-family:"JetBrains Mono", monospace;
    font-size: 11px; letter-spacing: 0.14em;
    color: var(--ink-3); text-transform: uppercase;
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  }
  .kv-grid .kv-head b { color: var(--ink-0); }
  .kv-grid .kv-head .added-tag { color: var(--moss); font-weight: 700; }
  .kv-grid table { width: 100%; border-collapse: collapse; }
  .kv-grid th, .kv-grid td {
    padding: 14px 22px; text-align: left;
    font-size: 15px; border-bottom: 1px dashed var(--line-2);
    vertical-align: top;
  }
  .kv-grid tr:last-child th, .kv-grid tr:last-child td { border-bottom: 0; }
  .kv-grid th {
    font-family:"JetBrains Mono", monospace;
    font-size: 11px; letter-spacing: 0.12em;
    color: var(--ink-3); text-transform: uppercase;
    font-weight: 500;
    background: var(--bg);
    width: 32%;
    vertical-align: top;
  }
  .kv-grid td {
    font-family:"Source Serif 4", Georgia, serif;
    color: var(--ink-1);
    font-size: 16px; line-height: 1.5;
  }
  .kv-grid td b { color: var(--ink-0); font-weight: 600; }
  .kv-grid td em { font-style: italic; color: var(--ink-2); }
  .kv-grid td .num { font-family:"JetBrains Mono", monospace; color: var(--accent); font-weight: 700; }

  /* chapter footer nav */
  .chapter-nav {
    margin: 56px 0 0; padding-top: 28px;
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; gap: 20px;
    flex-wrap: wrap;
  }
  .chapter-nav a {
    flex: 1 1 200px; padding: 16px 20px;
    border: 1px solid var(--line); border-radius: 10px;
    background: var(--bg-2);
    transition: all 200ms ease;
  }
  .chapter-nav a:hover { background: var(--bg-paper); border-color: var(--ink-3); }
  .chapter-nav a .lab {
    font-family:"JetBrains Mono", monospace;
    font-size: 10.5px; letter-spacing: 0.16em;
    color: var(--ink-3); text-transform: uppercase;
    margin-bottom: 6px; display: block;
  }
  .chapter-nav a .ti {
    font-family:"Source Serif 4", Georgia, serif;
    font-size: 17px; font-weight: 500;
    color: var(--ink-0); letter-spacing: -0.008em;
    line-height: 1.25;
  }
  .chapter-nav a.next { text-align: right; }
  .chapter-nav a.next .ti::after { content: " →"; color: var(--accent); }
  .chapter-nav a.prev .ti::before { content: "← "; color: var(--accent); }

  .recap {
    margin: 40px 0 8px;
    background: var(--bg-paper);
    border-radius: 14px;
    padding: 28px 32px;
    border: 1px solid var(--line);
  }
  .recap .rc-lab {
    font-family:"JetBrains Mono", monospace;
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--accent); font-weight: 700;
    margin-bottom: 12px;
  }
  .recap h6 {
    font-family:"Source Serif 4", Georgia, serif;
    font-weight: 500; font-size: 22px;
    margin: 0 0 14px; color: var(--ink-0);
    letter-spacing: -0.012em; line-height: 1.25;
  }
  .recap h6 em { font-style: italic; color: var(--accent); }
  .recap ul {
    margin: 0; padding: 0; list-style: none;
    font-family:"Source Serif 4", Georgia, serif;
    font-size: 16.5px; line-height: 1.5; color: var(--ink-1);
  }
  .recap ul li { padding-left: 24px; position: relative; margin-bottom: 6px; }
  .recap ul li::before {
    content: "→";
    position: absolute; left: 0; top: 0;
    color: var(--accent); font-weight: 700;
    font-family:"JetBrains Mono", monospace;
  }

  .ch-divider {
    margin: 80px 0 56px;
    text-align: center; position: relative;
    height: 1px; background: var(--line);
  }
  .ch-divider::before {
    content: "§";
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg);
    padding: 0 18px;
    font-family:"Source Serif 4", Georgia, serif;
    font-style: italic;
    color: var(--accent); font-size: 28px;
  }

  .resources {
    padding: 96px 0; border-bottom: 1px solid var(--line);
    background: var(--bg-paper);
  }
  .res-grid {
    display: grid; grid-template-columns: 1fr 2fr; gap: 56px;
    align-items: start;
  }
  @media (max-width: 880px) { .res-grid { grid-template-columns: 1fr; gap: 32px; } }
  .res-grid h2 {
    font-family:"Source Serif 4", Georgia, serif; font-weight: 500;
    font-size: clamp(32px, 3.4vw, 44px);
    line-height: 1.05; letter-spacing: -0.018em;
    color: var(--ink-0); margin: 0 0 12px;
    text-wrap: balance;
  }
  .res-grid h2 em { font-style: italic; color: var(--accent); font-weight: 500; }
  .res-grid .res-lede,
  .about-grid .res-lede {
    font-family:"Source Serif 4", Georgia, serif;
    font-size: 17px; line-height: 1.55;
    color: var(--ink-2); margin: 0; max-width: 38ch;
  }
  .res-list {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
    background: var(--line); border: 1px solid var(--line);
    border-radius: 14px; overflow: hidden;
  }
  @media (max-width: 700px) { .res-list { grid-template-columns: 1fr; } }
  .res-item {
    background: var(--bg-2);
    padding: 24px 26px;
    transition: background 200ms ease;
    display: flex; flex-direction: column;
    min-height: 180px;
    cursor: pointer;
  }
  .res-item:hover { background: var(--bg); }
  .res-item .type {
    font-family:"JetBrains Mono", monospace;
    font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--accent); font-weight: 700;
    margin-bottom: 14px;
  }
  .res-item h4 {
    font-family:"Source Serif 4", Georgia, serif;
    font-weight: 500; font-size: 19px;
    letter-spacing: -0.008em; line-height: 1.25;
    color: var(--ink-0); margin: 0 0 8px;
    text-wrap: balance;
  }
  .res-item h4 em { font-style: italic; color: var(--accent); font-weight: 500; }
  .res-item p { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; margin: 0 0 16px; }
  .res-item .dl {
    margin-top: auto;
    font-family:"JetBrains Mono", monospace;
    font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--ink-0); font-weight: 700;
  }
  .res-item:hover .dl { color: var(--accent); }

  .about-guide {
    padding: 80px 0; border-bottom: 1px solid var(--line);
  }
  .about-grid {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(300px, 360px);
    gap: 56px;
    align-items: start;
    justify-content: space-between;
  }
  @media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }
  .about-grid .left h2 {
    font-family:"Source Serif 4", Georgia, serif; font-weight: 500;
    font-size: 32px; line-height: 1.1; letter-spacing: -0.018em;
    margin: 0 0 12px; color: var(--ink-0);
  }
  .about-grid .left h2 em { font-style: italic; color: var(--accent); }
  .about-grid .left .lab {
    font-family:"JetBrains Mono", monospace;
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--ink-3); margin-bottom: 8px;
  }
  .about-grid .right {
    display: block;
  }
  .about-grid .right p {
    font-family:"Source Serif 4", Georgia, serif;
    font-size: 17px; line-height: 1.6; color: var(--ink-1);
    margin: 0 0 12px;
  }
  .about-grid .right p strong { color: var(--ink-0); font-weight: 600; }
  .changelog {
    margin-top: 0;
    padding-top: 18px;
    border-top: 1px dashed var(--line-2);
    font-family:"JetBrains Mono", monospace;
    font-size: 11.5px; line-height: 1.7;
    color: var(--ink-3); letter-spacing: 0.04em;
  }
  .changelog b { color: var(--ink-0); }
  .changelog span.acc { color: var(--accent); }

  /* RELATED */
  .related-wrap { padding: 80px 0; border-bottom: 1px solid var(--line); }
  .related-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
  .related-head h2 { font-family:"Source Serif 4", Georgia, serif; font-weight: 500; font-size: clamp(28px, 3.4vw, 40px); margin: 0; color: var(--ink-0); letter-spacing: -0.018em; }
  .related-head h2 em { font-style: italic; color: var(--accent); font-weight: 500; }
  .related-head a.all { font-family:"JetBrains Mono", monospace; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-1); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; font-weight: 600; }
  .related-head a.all:hover { color: var(--accent); border-color: var(--accent); }
  .rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
  @media (max-width: 980px) { .rel-grid { grid-template-columns: 1fr; } }
  .rel-card { background: var(--bg-2); padding: 28px; display: flex; flex-direction: column; gap: 12px; min-height: 220px; cursor: pointer; transition: background 200ms ease; }
  .rel-card:hover { background: var(--bg-paper); }
  .rel-card .cat-tag { font-family:"JetBrains Mono", monospace; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
  .rel-card h3 { font-family:"Source Serif 4", Georgia, serif; font-weight: 500; font-size: 22px; line-height: 1.2; letter-spacing: -0.012em; color: var(--ink-0); margin: 0; transition: color 200ms ease; }
  .rel-card:hover h3 { color: var(--accent); }
  .rel-card .foot { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-2); font-family:"JetBrains Mono", monospace; font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; }
  .rel-card .foot b { color: var(--ink-0); font-weight: 600; }

  /* FOOTER */
  footer.site { padding: 72px 0 28px; background: var(--bg); border-top: 1px solid var(--line); }
  footer.site .top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
  @media (max-width: 880px) { footer.site .top { grid-template-columns: 1fr 1fr; } }
  footer.site .brand .logo-link { font-size: 36px; display: inline-block; margin-bottom: 14px; }
  footer.site .brand p { font-size: 16px; line-height: 1.55; color: var(--ink-1); margin: 0 0 14px; max-width: 36ch; }
  footer.site .brand .addr { font-family:"JetBrains Mono", monospace; font-size: 13.5px; line-height: 1.7; color: var(--ink-3); }
  footer.site .footer-heading { font-family:"JetBrains Mono", monospace; font-weight: 500; font-size: 12.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 16px; }
  footer.site ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
  footer.site ul a { font-size: 15px; color: var(--ink-1); }
  footer.site ul a:hover { color: var(--accent); }
  footer.site .bottom { padding-top: 22px; display: flex; justify-content: space-between; font-family:"JetBrains Mono", monospace; font-size: 12.5px; letter-spacing: 0.06em; color: var(--ink-3); flex-wrap: wrap; gap: 12px; }

  @media print {
    .nav-wrap, .progress, .chapter-rail, .toc-pill, .toc-overlay, .related-wrap, footer.site, .author-byline .share-row { display: none !important; }
    .guide-body, .toc-section, .guide-cover { padding-block: 24px; }
    .guide-layout { grid-template-columns: 1fr; }
    body { background: #fff; }
  }
