  /* ══════════════ Debug Handbook Styles ══════════════ */
  :root {
    --dbh-brand: #00A896;
    --dbh-brand-dark: #008F7F;
    --dbh-brand-darker: #006B5E;
    --dbh-brand-light: #E0F7F4;
    --dbh-brand-glow: rgba(0, 168, 150, 0.15);
    --dbh-gold: #D4A843;
    --dbh-text: #2D3748;
    --dbh-text-light: #718096;
    --dbh-text-dark: #1A202C;
    --dbh-bg: #FDFCFA;
    --dbh-bg-paper: #FFFEF9;
    --dbh-bg-alt: #F7F5F0;
    --dbh-border: #E8E4DD;
    --dbh-red: #D44A4A;
    --dbh-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --dbh-shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --dbh-shadow-book: 4px 4px 20px rgba(0,0,0,0.12), 0 0 1px rgba(0,0,0,0.08);
    --dbh-radius: 8px;
    --dbh-radius-lg: 16px;
  }

  /* ── Hero ── */
  .dbh-hero {
    background: linear-gradient(160deg, #001A15 0%, #003D34 30%, #005E50 60%, var(--dbh-brand-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .dbh-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
      radial-gradient(circle at 20% 80%, rgba(0,168,150,0.12) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(212,168,67,0.08) 0%, transparent 50%),
      repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255,255,255,0.015) 40px, rgba(255,255,255,0.015) 41px),
      repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255,255,255,0.015) 40px, rgba(255,255,255,0.015) 41px);
    pointer-events: none;
  }
  .dbh-hero::after {
    content: '{ } < > // && || == != ++ -- << >> -> :: #include int main() for while if else return void vector set map sort';
    position: absolute; inset: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: rgba(255,255,255,0.03);
    word-spacing: 24px;
    line-height: 2.5;
    padding: 40px;
    overflow: hidden;
    pointer-events: none;
  }

  .dbh-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1100px;
    padding: 60px 40px;
  }

  .dbh-hero-illustration {
    flex-shrink: 0;
    width: 220px;
  }
  .dbh-hero-illustration img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
    border-radius: 16px;
  }

  .dbh-hero-text { flex: 1; }
  .dbh-hero-text .logo-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
  }
  .dbh-hero-text .logo-row img { height: 36px; }
  .dbh-hero-text .logo-row span {
    font-size: 0.85rem;
    opacity: 0.6;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .dbh-hero-text h1 {
    font-family: 'Noto Serif TC', serif !important;
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    color: white;
    border: none;
    padding: 0;
    background: none;
  }
  .dbh-hero-text h1::after { display: none; }
  .dbh-hero-text h1 .accent {
    color: var(--dbh-gold);
    display: block;
    font-size: 1.1em;
  }
  .dbh-hero-text .subtitle {
    font-size: 1.05rem;
    opacity: 0.7;
    line-height: 1.7;
    max-width: 480px;
    margin-bottom: 24px;
  }
  .dbh-hero-meta {
    display: flex;
    gap: 24px;
    font-size: 0.88rem;
    opacity: 0.6;
  }
  .dbh-hero-meta i { margin-right: 6px; }

  .dbh-hero-divider {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--dbh-gold), var(--dbh-brand), var(--dbh-gold), transparent);
  }

  /* ── Layout ── */
  .dbh-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    max-width: 1260px;
    margin: 0 auto;
    background: var(--dbh-bg-alt);
  }

  /* ── Sidebar TOC ── */
  .dbh-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 28px 0;
    background: var(--dbh-bg);
    border-right: 1px solid var(--dbh-border);
    box-shadow: 2px 0 12px rgba(0,0,0,0.03);
    scrollbar-width: thin;
    scrollbar-color: var(--dbh-border) transparent;
    z-index: 10;
  }
  .dbh-sidebar::-webkit-scrollbar { width: 4px; }
  .dbh-sidebar::-webkit-scrollbar-thumb { background: var(--dbh-border); border-radius: 2px; }

  .dbh-toc-header {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--dbh-border);
    margin-bottom: 12px;
  }
  .dbh-toc-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dbh-text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .dbh-toc-title i { color: var(--dbh-brand); }

  .dbh-toc a {
    display: block;
    padding: 5px 20px;
    color: var(--dbh-text-light);
    text-decoration: none;
    font-size: 0.84rem;
    line-height: 1.5;
    border-left: 3px solid transparent;
    transition: all 0.2s;
  }
  .dbh-toc a:hover {
    color: var(--dbh-brand);
    background: var(--dbh-brand-glow);
    border-left-color: var(--dbh-brand);
  }
  .dbh-toc a.active {
    color: var(--dbh-brand-dark);
    font-weight: 600;
    border-left-color: var(--dbh-brand);
    background: var(--dbh-brand-glow);
  }
  .dbh-toc a.toc-h1 {
    font-family: 'Noto Serif TC', serif;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--dbh-text-dark);
    padding-left: 20px;
    margin-top: 14px;
    padding-top: 8px;
  }
  .dbh-toc a.toc-h1:first-child { margin-top: 0; }
  .dbh-toc a.toc-h2 { padding-left: 32px; }
  .dbh-toc a.toc-h3 { padding-left: 44px; font-size: 0.8rem; }

  /* ── Content ── */
  .dbh-content {
    background: var(--dbh-bg-paper);
    padding: 48px 64px 100px;
    min-width: 0;
    box-shadow: var(--dbh-shadow-book);
    position: relative;
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--dbh-text);
    line-height: 1.85;
    font-size: 16px;
  }
  .dbh-content::before {
    content: '';
    position: absolute; inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(0,0,0,0.008) 28px, rgba(0,0,0,0.008) 29px);
    pointer-events: none;
  }

  /* ── Headings ── */
  .dbh-content h1 {
    font-family: 'Noto Serif TC', serif !important;
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--dbh-text-dark);
    margin: 56px 0 24px;
    padding: 20px 0 16px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    border: none;
    background: none;
  }
  .dbh-content h1::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--dbh-brand), transparent);
  }
  .dbh-content h1:first-child { margin-top: 0; }

  .dbh-content .chapter-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--dbh-brand), var(--dbh-brand-dark));
    color: white;
    border-radius: 10px;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,168,150,0.3);
  }

  .dbh-content h2 {
    font-family: 'Noto Serif TC', serif !important;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dbh-text-dark);
    margin: 40px 0 16px;
    padding: 12px 18px;
    background: linear-gradient(90deg, var(--dbh-brand-light), transparent);
    border-left: 4px solid var(--dbh-brand);
    border-radius: 0 var(--dbh-radius) var(--dbh-radius) 0;
  }

  .dbh-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dbh-brand-darker);
    margin: 28px 0 12px;
    padding-left: 12px;
    border-left: 3px solid var(--dbh-gold);
  }

  .dbh-content p { margin: 12px 0; line-height: 1.9; }

  .dbh-content ol, .dbh-content ul {
    margin: 12px 0;
    padding-left: 28px;
  }
  .dbh-content li { margin: 8px 0; line-height: 1.85; }
  .dbh-content li > ol, .dbh-content li > ul { margin: 6px 0; }

  .dbh-content a {
    color: var(--dbh-brand-dark);
    text-decoration: none;
    border-bottom: 1px dashed var(--dbh-brand);
    transition: all 0.2s;
  }
  .dbh-content a:hover {
    color: var(--dbh-brand);
    border-bottom-style: solid;
  }

  .dbh-content strong { color: var(--dbh-text-dark); }

  /* ── Inline code ── */
  .dbh-content code:not(.hljs):not([class*="language-"]) {
    background: linear-gradient(135deg, #EDF2F7, #E8EDF3);
    color: #C53030;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.86em;
    border: 1px solid #DDE3EA;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* ── Code blocks ── */
  .dbh-content .code-window {
    position: relative;
    margin: 18px 0;
  }
  .dbh-content .code-window::after {
    content: '●  ●  ●';
    position: absolute;
    top: 10px; left: 16px;
    font-size: 9px;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.15);
    z-index: 2;
  }
  .dbh-content pre {
    margin: 0;
    border-radius: var(--dbh-radius-lg);
    overflow: hidden;
    box-shadow: var(--dbh-shadow-md), inset 0 0 0 1px rgba(255,255,255,0.05);
    position: relative;
  }
  .dbh-content pre::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 36px;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent);
    pointer-events: none;
    border-radius: var(--dbh-radius-lg) var(--dbh-radius-lg) 0 0;
    z-index: 1;
  }
  .dbh-content pre .lang-badge {
    position: absolute;
    top: 8px; right: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    z-index: 2;
    padding: 2px 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
  }
  .dbh-content pre code.hljs {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    line-height: 1.65;
    padding: 32px 24px 20px;
    border-radius: var(--dbh-radius-lg);
    background: #282C34;
  }
  .dbh-content .hljs-comment,
  .dbh-content .hljs-quote {
    color: #9DA5B4;
  }

  /* ── Callout ── */
  .dbh-content .callout-danger {
    background: linear-gradient(135deg, #FFF5F5, #FFEBEB);
    border-left: 4px solid var(--dbh-red);
    padding: 16px 20px;
    border-radius: 0 var(--dbh-radius) var(--dbh-radius) 0;
    margin: 18px 0;
    color: #B83131;
    font-weight: 500;
    box-shadow: var(--dbh-shadow-sm);
    position: relative;
    overflow: hidden;
  }
  .dbh-content .callout-danger::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 16px; top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: rgba(184,49,49,0.06);
  }

  /* ── Copyright ── */
  .dbh-copyright {
    margin-top: 64px;
    padding: 32px;
    background: linear-gradient(135deg, #F7F5F0, #EDEBE6);
    border-radius: var(--dbh-radius-lg);
    border: 1px solid var(--dbh-border);
    text-align: center;
    font-size: 0.85rem;
    color: var(--dbh-text-light);
    line-height: 1.8;
  }
  .dbh-copyright strong { color: var(--dbh-text); }
  .dbh-copyright .brand-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dbh-text-dark);
  }
  .dbh-copyright .brand-line img { height: 24px; }

  /* ── Ornament ── */
  .dbh-ornament {
    text-align: center;
    margin: 48px 0 32px;
    color: var(--dbh-border);
    font-size: 1.4rem;
    letter-spacing: 12px;
  }

  /* ── Code block overflow ── */
  .dbh-content pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dbh-content pre code.hljs {
    white-space: pre;
    word-wrap: normal;
  }

  /* ── Mobile TOC toggle button ── */
  .dbh-toc-toggle {
    display: none;
    width: 100%;
    padding: 12px 20px;
    background: var(--dbh-bg);
    border: none;
    border-bottom: 1px solid var(--dbh-border);
    font-family: 'Noto Serif TC', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dbh-text-dark);
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
  }
  .dbh-toc-toggle i.toggle-icon {
    transition: transform 0.3s;
    font-size: 0.8rem;
    color: var(--dbh-brand);
  }
  .dbh-toc-toggle.open i.toggle-icon {
    transform: rotate(180deg);
  }

  /* ── Responsive ── */
  @media (max-width: 960px) {
    .dbh-wrapper { grid-template-columns: 1fr; }
    .dbh-sidebar {
      position: sticky;
      top: 68px; /* offset for sticky site header (min-height 68px) */
      height: auto;
      max-height: none;
      border-right: none;
      border-bottom: 1px solid var(--dbh-border);
      padding: 0;
      z-index: 100;
      overflow: visible;
    }
    .dbh-toc-header { display: none; }
    .dbh-toc-toggle { display: flex; min-height: 48px; /* touch target */ }
    .dbh-toc {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.35s ease;
    }
    .dbh-toc.open {
      max-height: 60vh;
      overflow-y: auto;
      border-bottom: 1px solid var(--dbh-border);
    }
    .dbh-toc a {
      min-height: 44px; /* WCAG touch target */
      display: flex;
      align-items: center;
    }
    .dbh-content {
      padding: 24px 16px 60px;
      font-size: 15px;
    }
    .dbh-content h1 {
      font-size: 1.4rem;
      margin: 36px 0 16px;
      gap: 10px;
    }
    .dbh-content .chapter-icon {
      width: 34px; height: 34px;
      font-size: 0.9rem;
      border-radius: 8px;
    }
    .dbh-content h2 {
      font-size: 1.1rem;
      margin: 28px 0 12px;
      padding: 10px 14px;
    }
    .dbh-content h3 {
      font-size: 0.95rem;
      margin: 20px 0 10px;
    }
    .dbh-content pre code.hljs {
      font-size: 0.78rem;
      padding: 28px 14px 16px;
      line-height: 1.55;
    }
    .dbh-content .code-window::after {
      top: 7px; left: 12px;
      font-size: 7px;
    }
    .dbh-content .callout-danger {
      padding: 12px 14px;
      font-size: 0.9rem;
    }
    .dbh-content .dbh-copyright {
      padding: 20px 16px;
      font-size: 0.8rem;
    }
    .dbh-hero { min-height: auto; }
    .dbh-hero-inner {
      flex-direction: column;
      text-align: center;
      gap: 20px;
      padding: 32px 20px;
    }
    .dbh-hero-text h1 { font-size: 1.8rem; }
    .dbh-hero-text h1 .accent { font-size: 1em; }
    .dbh-hero-text .subtitle { font-size: 0.9rem; margin-bottom: 16px; }
    .dbh-hero-text .logo-row { justify-content: center; }
    .dbh-hero-text .logo-row img { height: 28px; }
    .dbh-hero-meta { justify-content: center; font-size: 0.8rem; }
    .dbh-hero-illustration { width: 120px; }
  }

  /* ── Small phone ── */
  @media (max-width: 480px) {
    .dbh-sidebar { top: 60px; /* smaller header on mobile */ }
    .dbh-content { padding: 16px 12px 48px; font-size: 14px; }
    .dbh-content h1 { font-size: 1.25rem; }
    .dbh-content h2 { font-size: 1rem; }
    .dbh-content pre code.hljs { font-size: 0.72rem; padding: 24px 10px 12px; }
    .dbh-content .callout-danger { font-size: 0.85rem; padding: 10px 12px; }
    .dbh-content .callout-danger::before { display: none; /* save space on small screens */ }
    .dbh-hero-inner { padding: 24px 16px; }
    .dbh-hero-text h1 { font-size: 1.5rem; }
    .dbh-hero-illustration { width: 100px; }
    .dbh-copyright { padding: 16px 12px; font-size: 0.78rem; }
    .dbh-copyright .brand-line { flex-direction: column; gap: 4px; }
  }
