  /* ============================================================
     DESIGN TOKENS — app shell
     ============================================================ */
  :root{
    --ink:        #171A1F;   /* sidebar / chrome background */
    --ink-soft:   #20242B;   /* sidebar hover/active surface */
    --ink-border: #2B2F37;   /* hairlines on dark chrome */
    --paper:      #FAFAF8;   /* content background */
    --paper-line: #E7E5E1;   /* hairlines on light content */
    --text:       #1B1D22;   /* body text on paper */
    --text-dim:   #6B7078;   /* secondary text on paper */
    --on-ink:       #E9EAEC; /* body text on ink */
    --on-ink-dim:   #9298A2; /* secondary text on ink */

    --accent:      #2496ED; /* swapped per active guide, see .guide--claude below */
    --accent-soft: rgba(36,150,237,0.14);  /* used on paper (e.g. inline code) */
    --accent-wash: rgba(36,150,237,0.16);  /* used on dark sidebar chrome */

    --radius: 5px;
    --sidebar-w: 300px;

    --font-ui:   'IBM Plex Sans', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

    --dur: 160ms;

    /* ---- fixed palette for the setup wizard (independent of guide accent) ---- */
    --wiz-blue-1: #1E4488;
    --wiz-blue-2: #0C2447;
    --wiz-blue-panel: #14305C;
    --wiz-border: rgba(230, 196, 110, 0.28);
    --gold: #E9C468;
    --cream: #EFE7D6;
    --cream-dim: #C9C0AC;
  }

  @media (prefers-reduced-motion: reduce){
    *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  }

  /* Claude Code accent takes over when that guide is active */
  body.guide--claude{
    --accent: #BD5B38;
    --accent-soft: rgba(189,91,56,0.14);
    --accent-wash: rgba(189,91,56,0.18);
  }

  /* Claude Code in Docker gets its own distinct accent — same component styles,
     different color, so it reads as a clear third option rather than a variant. */
  body.guide--claudeDocker{
    --accent: #8A5CF6;
    --accent-soft: rgba(138,92,246,0.14);
    --accent-wash: rgba(138,92,246,0.18);
  }

  *{ box-sizing: border-box; }
  html,body{ height:100%; }
  body{
    margin:0;
    font-family: var(--font-ui);
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
  }
  button{ font-family: inherit; }

  :focus-visible{
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  /* ============================================================
     APP SHELL
     ============================================================ */
  .app{
    display:flex;
    height:100vh;
    overflow:hidden;
  }

  /* ---------- Sidebar ---------- */
  .sidebar{
    width: var(--sidebar-w);
    flex-shrink:0;
    background: var(--ink);
    color: var(--on-ink);
    display:flex;
    flex-direction:column;
    border-right: 1px solid var(--ink-border);
  }

  .sidebar-head{
    padding: 18px 16px 14px;
    border-bottom: 1px solid var(--ink-border);
    flex-shrink:0;
  }

  .sidebar-head-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:14px;
  }

  .brand{
    font-weight:600;
    font-size:15px;
    letter-spacing:0.01em;
    color: var(--on-ink);
  }

  .sidebar-close{
    display:none;
    border:none;
    background:none;
    color: var(--on-ink-dim);
    font-size:18px;
    line-height:1;
    padding:4px 6px;
    cursor:pointer;
    border-radius:4px;
  }
  .sidebar-close:hover{ background: var(--ink-soft); color: var(--on-ink); }

  .guide-switch{
    display:flex;
    flex-wrap: wrap;
    background: var(--ink-soft);
    border-radius: var(--radius);
    padding: 3px;
    gap: 3px;
    margin-bottom: 14px;
  }
  .guide-tab{
    flex: 1 1 auto;
    min-width: 100px;
    border:none;
    background:transparent;
    color: var(--on-ink-dim);
    padding: 7px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor:pointer;
    text-align:center;
    transition: background var(--dur), color var(--dur);
  }
  .guide-tab:hover{ color: var(--on-ink); }
  .guide-tab.active{
    background: var(--accent);
    color: #fff;
  }

  /* ---------- Walkthroughs panel ----------
     Everything interactive (Getting Started, Session Management, any
     future step-by-step guide) lives here, visually separated from
     the plain reference tree below by both position and styling. */
  .walkthroughs-panel{
    background: var(--accent-wash);
    border: 1.5px solid var(--accent);
    border-radius: 10px;
    padding: 14px 16px 6px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15), 0 6px 20px -6px var(--accent);
  }
  .walkthroughs-head{
    display:flex;
    align-items:center;
    gap:7px;
    margin-bottom:10px;
  }
  .walkthroughs-icon{
    width:13px;
    height:13px;
    fill:#fff;
    flex-shrink:0;
  }
  .walkthroughs-title{
    font-size:14.5px;
    font-weight:700;
    color:#fff;
    letter-spacing:0.01em;
  }
  .walkthrough-row{
    padding: 10px 0 12px;
    border-top: 1px solid rgba(255,255,255,0.14);
  }
  .walkthroughs-head + .walkthrough-row{
    border-top: none;
    padding-top: 0;
  }
  .walkthrough-row-label{
    font-size:13px;
    font-weight:600;
    color:#fff;
  }
  .walkthrough-row-sublabel{
    font-size:11.5px;
    color: var(--on-ink-dim);
    margin: 2px 0 9px;
    line-height:1.5;
  }
  .walkthrough-row-buttons{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
  }
  .walkthrough-btn{
    border:none;
    background: var(--accent);
    color:#fff;
    font-size:12.5px;
    font-weight:500;
    padding:6px 12px;
    border-radius:999px;
    cursor:pointer;
    transition: filter var(--dur), box-shadow var(--dur);
  }
  .walkthrough-btn:hover{ filter: brightness(1.1); }

  /* ---------- Reference section label ---------- */
  .nav-section-label{
    font-size:11px;
    font-weight:600;
    color: var(--on-ink-dim);
    padding: 4px 8px 8px;
    margin-top: 4px;
  }

  /* ---------- Regular nav tree ---------- */
  .nav-tree{
    flex:1;
    overflow-y:auto;
    padding: 12px 10px 20px;
  }

  .nav-group{ margin-bottom: 2px; }

  .nav-group-btn{
    width:100%;
    display:flex;
    align-items:center;
    gap:8px;
    background:none;
    border:none;
    color: var(--on-ink);
    padding: 9px 8px;
    font-size: 13.5px;
    font-weight:500;
    text-align:left;
    border-radius: 4px;
    cursor:pointer;
    transition: background var(--dur);
  }
  .nav-group-btn:hover{ background: var(--ink-soft); }

  .nav-group-btn .chevron{
    width:8px; height:8px;
    border-right: 1.5px solid var(--on-ink-dim);
    border-bottom: 1.5px solid var(--on-ink-dim);
    transform: rotate(-45deg);
    transition: transform var(--dur);
    flex-shrink:0;
    margin-left:2px;
  }
  .nav-group.expanded > .nav-group-btn .chevron{
    transform: rotate(45deg);
  }

  .nav-children{
    overflow:hidden;
    max-height:0;
    transition: max-height var(--dur) ease;
  }
  .nav-group.expanded > .nav-children{
    max-height: 400px; /* generous cap; content is short */
  }

  .nav-leaf{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    width:100%;
    background:none;
    border:none;
    color: var(--on-ink-dim);
    padding: 7px 8px 7px 28px;
    font-size: 13px;
    text-align:left;
    border-radius: 4px;
    cursor:pointer;
    transition: background var(--dur), color var(--dur);
  }
  /* top-level leaves (Security Tips / Common Pitfalls) sit flush left, no indent */
  .nav-tree > .nav-leaf{
    padding-left: 8px;
    margin-bottom:2px;
  }

  .nav-leaf:hover{ background: var(--ink-soft); color: var(--on-ink); }
  .nav-leaf.active{
    background: var(--accent-soft);
    color: #fff;
    position:relative;
  }
  .nav-leaf.active::before{
    content:"";
    position:absolute;
    left:0; top:4px; bottom:4px;
    width:3px;
    background: var(--accent);
    border-radius: 2px;
  }

  /* ---------- Content pane ---------- */
  .content{
    flex:1;
    display:flex;
    flex-direction:column;
    min-width:0;
  }

  .content-header{
    display:flex;
    align-items:center;
    gap:16px;
    padding: 16px 32px;
    border-bottom: 1px solid var(--paper-line);
    flex-shrink:0;
  }

  .breadcrumb{
    font-size: 13px;
    color: var(--text-dim);
  }
  .breadcrumb .sep{ margin: 0 6px; opacity:0.5; }
  .breadcrumb .current{ color: var(--text); font-weight:500; }

  .content-body{
    flex:1;
    overflow-y:auto;
    padding: 40px 32px 80px;
  }

  .empty-state{
    max-width: 480px;
    margin: 10vh auto 0;
    text-align:center;
    color: var(--text-dim);
  }
  .empty-state h2{
    font-size:17px;
    color: var(--text);
    margin-bottom:8px;
  }
  .empty-state p{ font-size:14px; line-height:1.6; }

  /* rendered section content */
  .section-view{
    max-width: 640px;
    animation: rise var(--dur) ease;
  }
  @keyframes rise{
    from{ opacity:0; transform: translateY(6px); }
    to{ opacity:1; transform: translateY(0); }
  }

  .section-view .kicker{
    font-size:12.5px;
    color: var(--accent);
    font-weight:600;
    margin-bottom:6px;
  }
  .section-view h2{
    font-size: 24px;
    line-height:1.3;
    color: var(--text);
    margin: 0 0 18px;
  }
  .section-view h3{
    font-size: 16px;
    line-height:1.4;
    color: var(--text);
    margin: 28px 0 10px;
  }
  .section-view p{
    font-size: 15px;
    line-height:1.7;
    color: var(--text);
    margin: 0 0 14px;
  }
  .section-view code{
    font-family: var(--font-mono);
    background: var(--accent-soft);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.9em;
  }
  .section-view pre{
    background: var(--paper-line);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 0 0 16px;
    overflow-x: auto;
  }
  .section-view pre code{
    background: none;
    padding: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
    white-space: pre;
  }

  .article-loading{
    color: var(--text-dim);
    font-size: 14px;
    padding: 4px 0;
    animation: pulse 1.3s ease-in-out infinite;
  }
  @keyframes pulse{
    0%, 100%{ opacity: 0.4; }
    50%{ opacity: 1; }
  }

  .table-wrap{
    overflow-x: auto;
    margin: 0 0 20px;
  }
  .section-view table{
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }
  .section-view th{
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0 12px 8px 0;
    border-bottom: 1px solid var(--paper-line);
    white-space: nowrap;
  }
  .section-view td{
    padding: 10px 12px 10px 0;
    border-bottom: 1px solid var(--paper-line);
    color: var(--text);
    line-height: 1.6;
    vertical-align: top;
  }
  .section-view td:first-child{
    white-space: nowrap;
    font-weight: 600;
  }
  .section-view tr:last-child td{
    border-bottom: none;
  }

  /* ---------- Mobile ---------- */
  .sidebar-toggle{ display:none; }
  .sidebar-backdrop{ display:none; }

  @media (max-width: 820px){
    .sidebar{
      position: fixed;
      inset: 0 auto 0 0;
      z-index: 20;
      transform: translateX(-100%);
      transition: transform var(--dur) ease;
    }
    .sidebar.open{ transform: translateX(0); }
    .sidebar-close{ display:inline-block; }

    .sidebar-backdrop{
      display:block;
      position:fixed;
      inset:0;
      background: rgba(0,0,0,0.4);
      z-index:15;
      opacity:0;
      pointer-events:none;
      transition: opacity var(--dur);
    }
    .sidebar-backdrop.visible{
      opacity:1;
      pointer-events:auto;
    }

    .sidebar-toggle{
      display:inline-flex;
      align-items:center;
      gap:8px;
      border:1px solid var(--paper-line);
      background:#fff;
      padding:6px 10px;
      border-radius: var(--radius);
      cursor:pointer;
      font-size:13px;
    }
    .content-header{ padding: 14px 18px; }
    .content-body{ padding: 24px 18px 60px; }
  }

  /* ============================================================
     SETUP WIZARD OVERLAY
     (fixed blue/gold identity — intentionally independent of the
     active guide's accent color, since this is its own moment)
     ============================================================ */
  .scrim{
    position:fixed; inset:0;
    background: rgba(10,14,22,0.55);
    backdrop-filter: blur(2px);
    display:flex;
    align-items:center;
    justify-content:center;
    opacity:0;
    pointer-events:none;
    transition: opacity var(--dur) ease;
    z-index:60; /* above the sidebar (20) and its mobile backdrop (15) */
  }
  .scrim.visible{ opacity:1; pointer-events:auto; }

  .wiz-modal{
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    margin: 20px;
    background: linear-gradient(160deg, var(--wiz-blue-1) 0%, var(--wiz-blue-2) 100%);
    border: 1px solid var(--wiz-border);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(6,12,24,0.45);
    color: var(--cream);
    padding: 30px 34px 26px;
    transform: translateY(10px) scale(0.98);
    opacity:0;
    transition: transform var(--dur) ease, opacity var(--dur) ease;
  }
  .scrim.visible .wiz-modal{ transform: translateY(0) scale(1); opacity:1; }

  .wiz-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom: 18px;
  }
  .wiz-eyebrow{
    font-size:12px;
    font-weight:600;
    color: var(--gold);
    letter-spacing:0.02em;
  }
  .wiz-close{
    background:none;
    border:none;
    color: var(--cream-dim);
    font-size:16px;
    cursor:pointer;
    padding:4px 6px;
    border-radius:8px;
    line-height:1;
  }
  .wiz-close:hover{ color: var(--gold); background: rgba(255,255,255,0.06); }

  .wiz-body{ min-height: 210px; }
  .wiz-body h2{ font-size:22px; color: var(--gold); margin: 0 0 12px; line-height:1.3; }
  .wiz-body p{ font-size:14.5px; line-height:1.65; color: var(--cream); margin: 0 0 14px; }
  .wiz-body ul{ margin: 0 0 14px; padding-left: 20px; }
  .wiz-body li{ font-size:14px; line-height:1.7; color: var(--cream); }
  .wiz-body .note{ font-size:13px; color: var(--cream-dim); margin-top: -6px; }

  .wiz-code-wrap{
    position: relative;
    margin: 0 0 14px;
  }
  .wiz-code{
    background: var(--wiz-blue-panel);
    border: 1px solid rgba(233,196,104,0.2);
    border-radius: 10px;
    padding: 12px 88px 12px 14px; /* extra right padding so text never runs under the button */
    font-family: var(--font-mono);
    font-size: 13px;
    color: #F5F1E6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .wiz-copy-btn{
    position: absolute;
    top: 8px;
    right: 8px;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 11.5px;
    font-weight:600;
    cursor:pointer;
    border: 1px solid rgba(233,196,104,0.4);
    background: rgba(20,48,92,0.85);
    color: var(--gold);
    transition: background var(--dur), color var(--dur), transform var(--dur);
  }
  .wiz-copy-btn:hover{ background: rgba(233,196,104,0.12); }
  .wiz-copy-btn.copied{
    background: var(--gold);
    border-color: var(--gold);
    color: #17264A;
    transform: scale(1.04);
  }

  .wiz-progress-row{ display:flex; align-items:center; gap:8px; margin-bottom:20px; }
  .wiz-progress-label{ font-size:11.5px; color: var(--cream-dim); white-space:nowrap; }
  .wiz-progress-track{ flex:1; height:4px; background: rgba(255,255,255,0.12); border-radius:999px; overflow:hidden; }
  .wiz-progress-fill{ height:100%; background: var(--gold); border-radius:999px; transition: width var(--dur) ease; }

  .wiz-nav{ display:flex; align-items:center; justify-content:space-between; margin-top: 8px; }
  .wiz-btn{
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight:600;
    cursor:pointer;
    border: none;
    transition: filter var(--dur), opacity var(--dur), background var(--dur);
  }
  .wiz-btn-back{ background:transparent; border: 1px solid rgba(233,196,104,0.4); color: var(--gold); }
  .wiz-btn-back:hover{ background: rgba(233,196,104,0.08); }
  .wiz-btn-back:disabled{ opacity:0.35; cursor:default; }
  .wiz-btn-back:disabled:hover{ background:transparent; }
  .wiz-btn-next{ background: var(--gold); color: #17264A; }
  .wiz-btn-next:hover{ filter:brightness(1.06); }
