/* durian-hypermedia styles: every rule is scoped under .dh-doc. Theme tokens: THEME.md. */
/* ---- theme.css (scoped) ---- */
.dh-doc {
  color-scheme: light;

  
  --bg: #E6E8F2;            
  --bg-glow-1: rgba(85, 95, 255, .13);   
  --bg-glow-2: rgba(249, 25, 116, .07);  
  --surface: #FFFFFF;       
  --surface-2: #F2F4F9;     
  --surface-3: #E3E7F0;     
  --line: #D0D6E3;          
  --line-2: #B6BFD3;        

  
  --ink: #00081C;           
  --ink-2: #273143;         
  --muted: #3A4560;         
  --faint: #56627C;         

  
  --acc: #555FFF;           
  --acc-ink: #2E36C5;       
  
  --c1-dot: var(--c1); --c2-dot: var(--c2); --c3-dot: var(--c3); --c4-dot: var(--c4); --c5-dot: var(--c5); --c6-dot: var(--c6); --c7-dot: var(--c7); --c8-dot: var(--c8); --acc-dot: var(--acc);
  --c1-dot-new: color-mix(in oklab, var(--c1) 70%, #000); --c2-dot-new: color-mix(in oklab, var(--c2) 70%, #000); --c3-dot-new: color-mix(in oklab, var(--c3) 70%, #000); --c4-dot-new: color-mix(in oklab, var(--c4) 70%, #000); --c5-dot-new: color-mix(in oklab, var(--c5) 70%, #000); --c6-dot-new: color-mix(in oklab, var(--c6) 70%, #000); --c7-dot-new: color-mix(in oklab, var(--c7) 70%, #000); --c8-dot-new: color-mix(in oklab, var(--c8) 70%, #000); --acc-dot-new: color-mix(in oklab, var(--acc) 70%, #000);
  --acc-2: #7F87FF;
  --acc-soft: #DEE0FF;
  --acc-softer: #EEEFFF;
  --hot: #F91974;           
  --hot-ink: #980344;
  --hot-soft: #FDD9E8;

  
  --good: #1CAA53;   --good-ink: #075829;  --good-soft: #DCF1E3;
  --warn: #FF760D;   --warn-ink: #7F3705;  --warn-soft: #FFE3CE;
  --bad: #F91974;    --bad-ink: #980344;   --bad-soft: #FDD9E8;
  
  --c1: #4D42FB; --c1-soft: #BAD3FE; --c1-ink: #2955A6;
  --c2: #324F44; --c2-soft: #91E9D4; --c2-ink: #006A5A;
  --c3: #7E7361; --c3-soft: #FCDC77; --c3-ink: #755E00;
  --c4: #6919A3; --c4-soft: #DCACFC; --c4-ink: #5B348C;
  --c5: #821E00; --c5-soft: #FFCEBC; --c5-ink: #A03F13;
  --c6: #016C9F; --c6-soft: #DCF5FF; --c6-ink: #007694;
  --c7: #A61972; --c7-soft: #FFA4BC; --c7-ink: #852456;
  --c8: #007716; --c8-soft: #85D28B; --c8-ink: #12561F;
  
  --meter: #0A0000; --meter-track: #D5DAE6;
  --info: #555FFF;   --info-ink: #3039C8;  --info-soft: #EEEFFF;
  --untested: #56627C; --untested-ink: #3A4560; --untested-soft: #E3E7F0;

  
  --mark-bg: #FFF0A8;       
  --mark-ink: #00081C;
  --strike-ink: #4E5873;    
  --new-bg: #555FFF;        
  --new-ink: #FFFFFF;
  --on-acc: #FFFFFF;        
  --comment-mark: rgba(249, 25, 116, .20);  
  --ul-line: rgba(85, 95, 255, .55);        
  --ul-line-soft: rgba(85, 95, 255, .25);   

  
  --term: #0F1424;  --term-2: #171D30;  --term-line: #232B44;
  --term-ink: #D3D9E6; --term-faint: #95A2BC;
  --ch-1: #8D9AB5;        --ch-2: #FFB27A;  
  --ch-3: #9AD8FF;     --ch-4: #D3D9E6;  
  --ch-5: #FF8DBA;       --ch-6: #8FE3B0;  
  --ch-7: #B9BEFF;        --ch-8: #A8E6C0;  
  --ch-9: #FF6B8E;        --ch-10: #0F1424;
  --ch-11: rgba(249, 25, 116, .22);   
  --ch-12: rgba(28, 170, 83, .22);    
  --ch-13: rgba(255, 118, 13, .22);   
  --ch-14: #D3D9E6; --ch-15: #95A2BC; --ch-16: #0F1424; 
  --ch-17: rgba(85, 95, 255, .20);    
  --ch-18: rgba(85, 95, 255, .14);    --ch-19: #95A2BC;
  --ch-20: rgba(127, 135, 255, .35);  --ch-21: #555FFF;
  --ch-22: #0A0E1B;    --ch-23: #232B44; 
  --ch-24: #56627C;  --ch-25: #232B44; --ch-26: #171D30;

  
  --series-1: #555FFF; --series-2: #F91974; --series-3: #0E9FB8;
  --series-4: #F2690B; --series-5: #1CAA53;
  --grid: #E3E7F0;     --axis: #B6BFD3;

  
  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --w-thin: 300;            
  --w-body: 300;
  --w-medium: 500;
  --w-strong: 600;          
  --w-head: 600;
  --fs-xs: .8125rem;        
  --fs-s: .9375rem;         
  --fs-m: 1.0625rem;        
  --fs-l: 1.25rem;          
  --fs-xl: clamp(1.375rem, 3.6vw, 1.75rem);   
  --fs-2xl: clamp(1.75rem, 5.4vw, 2.75rem);   
  --fs-3xl: clamp(2.25rem, 8vw, 4.25rem);     
  --fs-num: clamp(2.125rem, 8.5vw, 4.5rem);   
  --lh-body: 1.62;
  --lh-tight: 1.25;
  --lh-head: 1.06;
  --ls-head: -.03em;
  --ls-kicker: .18em;

  
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --gutter: clamp(16px, 4.5vw, 48px);         
  --band-gap: clamp(44px, 7vw, 80px);         
  --measure: 38rem;                            
  --page-max: 72rem;

  
  --r-s: 8px; --r-m: 14px; --r-l: 20px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(0, 8, 28, .06), 0 2px 6px rgba(0, 8, 28, .05);
  --shadow-md: 0 6px 16px rgba(0, 8, 28, .10), 0 1px 3px rgba(0, 8, 28, .06);
  --shadow-lg: 0 18px 44px rgba(0, 8, 28, .18), 0 4px 12px rgba(0, 8, 28, .08);
  --ring: 0 0 0 4px rgba(85, 95, 255, .16);
  --ring-hot: 0 0 0 4px rgba(249, 25, 116, .13);

  
  --ease: cubic-bezier(.2, .75, .25, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --dur-fast: 160ms;
  --dur: 320ms;
  --dur-slow: 560ms;
  --stagger: 90ms;
  
  --c0-fill: var(--surface); --c0: #596172; --c0-soft: var(--c0-fill); --c0-plane: var(--c0-soft); --c0-ink: var(--muted);
  
  --c1-plane: #BAD3FE; --c2-plane: #91E9D4; --c3-plane: #FCDC77; --c4-plane: #DCACFC; --c5-plane: #FFCEBC; --c6-plane: #DCF5FF;
  --c7-plane: #FFA4BC; --c8-plane: #85D28B;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #070B16; --bg-glow-1: rgba(108, 116, 255, .16); --bg-glow-2: rgba(240, 48, 126, .08);
    --surface: #0F1424; --surface-2: #151B2E; --surface-3: #1D2439;
    --line: #232B44; --line-2: #36415F;
    --ink: #F4F6FB; --ink-2: #DCE1EC; --muted: #B4BDD1; --faint: #98A3BC;
    --acc: #8D94FF; --acc-ink: #B9BEFF; --acc-2: #6C74FF; --acc-soft: #272D5C; --acc-softer: #1A1F42;
    --hot: #FF4F96; --hot-ink: #FE9FC3; --hot-soft: #3B1529;
    --good: #34C76E; --good-ink: #7BE3A4; --good-soft: #11301F;
    --warn: #FF8F3A; --warn-ink: #FFB984; --warn-soft: #3A2410;
    --bad: #FF4F96; --bad-ink: #FE9FC3; --bad-soft: #3B1529;
    --c1: #8A92FF; --c1-soft: #29295E; --c1-ink: #B6BFFE;
    --c2: #9DFAF1; --c2-soft: #12534A; --c2-ink: #19E1D5;
    --c3: #E5B104; --c3-soft: #644402; --c3-ink: #EBBE4A;
    --c4: #E7A5FE; --c4-soft: #553F75; --c4-ink: #E8A8FE;
    --c5: #FA6E21; --c5-soft: #3E1600; --c5-ink: #FEAE8C;
    --c6: #25A6BE; --c6-soft: #012930; --c6-ink: #20DBFB;
    --c7: #FA61AC; --c7-soft: #4D3339; --c7-ink: #FEA5CB;
    --c8: #AAEB6E; --c8-soft: #283C00; --c8-ink: #A2D774;
    --meter: #8E8E94; --meter-track: #36415F;
    --info: #8D94FF; --info-ink: #B9BEFF; --info-soft: #1A1F42;
    --untested: #98A3BC; --untested-ink: #C5CDDD; --untested-soft: #1D2439;
    --mark-bg: #5B4A00; --mark-ink: #FFF6CC;
    --strike-ink: #A3ADC4; --new-bg: #8D94FF; --new-ink: #070B16; --on-acc: #070B16;
    --comment-mark: rgba(255, 79, 150, .30);
    --ul-line: rgba(141, 148, 255, .70); --ul-line-soft: rgba(141, 148, 255, .32);
    --term: #060914; --term-2: #0D1120; --term-line: #232B44; --ch-16: #060914; --ch-22: #03050D; --ch-26: #0D1120;
    --series-1: #6C74FF; --series-2: #F0307E; --series-3: #1496AC; --series-4: #E2620C; --series-5: #1E9C4F;
    --grid: #1D2439; --axis: #36415F;
    --heat-lo: #1A2040; --heat-hi: #8D94FF; --heat-mid: #1B2238; --heat-neg: #2DD4BF;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .40);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .30);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, .55), 0 4px 12px rgba(0, 0, 0, .35);
    --ring: 0 0 0 4px rgba(141, 148, 255, .22);
    --ring-hot: 0 0 0 4px rgba(255, 79, 150, .18);
    --c0-fill: #232A3B; --c0: #95A3C6; 
    --c1-dot: var(--c1); --c2-dot: var(--c2); --c3-dot: var(--c3); --c4-dot: var(--c4); --c5-dot: var(--c5); --c6-dot: var(--c6); --c7-dot: var(--c7); --c8-dot: var(--c8); --acc-dot: var(--acc); 
    --c1-dot-new: var(--c1-ink); --c2-dot-new: var(--c2-ink); --c3-dot-new: var(--c3-ink); --c4-dot-new: var(--c4-ink); --c5-dot-new: var(--c5-ink); --c6-dot-new: var(--c6-ink); --c7-dot-new: var(--c7-ink); --c8-dot-new: var(--c8-ink); --acc-dot-new: var(--acc-ink); 
    
    --c1-plane: #29295E; --c2-plane: #12534A; --c3-plane: #644402; --c4-plane: #553F75; --c5-plane: #3E1600; --c6-plane: #012930;
    --c7-plane: #4D3339; --c8-plane: #283C00; --scn-edge: #95A3C6; --scn-frame-edge: #98A3C2; --scn-band-edge: #95A3C6; --scn-good-edge: #34C76E;
    --scn-warn-edge: #FF8F3A; --scn-hot-edge: #FF75A6; --scn-acc-edge: #929AFF; --scn-muted-edge: #98A3C2; --scn-faint-edge: #8D98B6;
}
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070B16; --bg-glow-1: rgba(108, 116, 255, .16); --bg-glow-2: rgba(240, 48, 126, .08);
  --surface: #0F1424; --surface-2: #151B2E; --surface-3: #1D2439;
  --line: #232B44; --line-2: #36415F;
  --ink: #F4F6FB; --ink-2: #DCE1EC; --muted: #B4BDD1; --faint: #98A3BC;
  --acc: #8D94FF; --acc-ink: #B9BEFF; --acc-2: #6C74FF; --acc-soft: #272D5C; --acc-softer: #1A1F42;
  --hot: #FF4F96; --hot-ink: #FE9FC3; --hot-soft: #3B1529;
  --good: #34C76E; --good-ink: #7BE3A4; --good-soft: #11301F;
  --warn: #FF8F3A; --warn-ink: #FFB984; --warn-soft: #3A2410;
  --bad: #FF4F96; --bad-ink: #FE9FC3; --bad-soft: #3B1529;
  --c1: #8A92FF; --c1-soft: #29295E; --c1-ink: #B6BFFE;
  --c2: #9DFAF1; --c2-soft: #12534A; --c2-ink: #19E1D5;
  --c3: #E5B104; --c3-soft: #644402; --c3-ink: #EBBE4A;
  --c4: #E7A5FE; --c4-soft: #553F75; --c4-ink: #E8A8FE;
  --c5: #FA6E21; --c5-soft: #3E1600; --c5-ink: #FEAE8C;
  --c6: #25A6BE; --c6-soft: #012930; --c6-ink: #20DBFB;
  --c7: #FA61AC; --c7-soft: #4D3339; --c7-ink: #FEA5CB;
  --c8: #AAEB6E; --c8-soft: #283C00; --c8-ink: #A2D774;
  --meter: #8E8E94; --meter-track: #36415F;
  --info: #8D94FF; --info-ink: #B9BEFF; --info-soft: #1A1F42;
  --untested: #98A3BC; --untested-ink: #C5CDDD; --untested-soft: #1D2439;
  --mark-bg: #5B4A00; --mark-ink: #FFF6CC;
  --strike-ink: #A3ADC4; --new-bg: #8D94FF; --new-ink: #070B16; --on-acc: #070B16;
  --comment-mark: rgba(255, 79, 150, .30);
  --ul-line: rgba(141, 148, 255, .70); --ul-line-soft: rgba(141, 148, 255, .32);
  --term: #060914; --term-2: #0D1120; --term-line: #232B44; --ch-16: #060914; --ch-22: #03050D; --ch-26: #0D1120;
  --series-1: #6C74FF; --series-2: #F0307E; --series-3: #1496AC; --series-4: #E2620C; --series-5: #1E9C4F;
  --grid: #1D2439; --axis: #36415F;
  --heat-lo: #1A2040; --heat-hi: #8D94FF; --heat-mid: #1B2238; --heat-neg: #2DD4BF;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .40);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .30);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, .55), 0 4px 12px rgba(0, 0, 0, .35);
  --ring: 0 0 0 4px rgba(141, 148, 255, .22);
  --ring-hot: 0 0 0 4px rgba(255, 79, 150, .18);
  --c0-fill: #232A3B; --c0: #95A3C6; 
  --c1-dot: var(--c1); --c2-dot: var(--c2); --c3-dot: var(--c3); --c4-dot: var(--c4); --c5-dot: var(--c5); --c6-dot: var(--c6); --c7-dot: var(--c7); --c8-dot: var(--c8); --acc-dot: var(--acc); 
  --c1-dot-new: var(--c1-ink); --c2-dot-new: var(--c2-ink); --c3-dot-new: var(--c3-ink); --c4-dot-new: var(--c4-ink); --c5-dot-new: var(--c5-ink); --c6-dot-new: var(--c6-ink); --c7-dot-new: var(--c7-ink); --c8-dot-new: var(--c8-ink); --acc-dot-new: var(--acc-ink); 
  
  --c1-plane: #29295E; --c2-plane: #12534A; --c3-plane: #644402; --c4-plane: #553F75; --c5-plane: #3E1600; --c6-plane: #012930;
  --c7-plane: #4D3339; --c8-plane: #283C00; --scn-edge: #95A3C6; --scn-frame-edge: #98A3C2; --scn-band-edge: #95A3C6; --scn-good-edge: #34C76E;
  --scn-warn-edge: #FF8F3A; --scn-hot-edge: #FF75A6; --scn-acc-edge: #929AFF; --scn-muted-edge: #98A3C2; --scn-faint-edge: #8D98B6;
}
.dh-doc {
  --heat-lo: #EEF0FA; --heat-hi: #555FFF; --heat-mid: #F7F8FC; --heat-neg: #0E9F9A;
  --chart-ann-line-w: 1.5px; --chart-ann-marker: 10px;
  --pc-seg-h: 36px; --pc-seg-on: var(--acc); --pc-seg-on-ink: var(--on-acc);
  --pc-key-h: 32px;
  --pc-input-h: 40px; --pc-input-bg: var(--surface);
  --pc-result-bg: var(--acc-softer); --pc-result-border: var(--acc); --pc-result-ink: var(--acc-ink); --pc-result-fs: var(--fs-xl);
  --pc-tile: 14px;
}
.dh-doc {
  --scn-edge: #596172; --scn-frame-edge: #5B616C; --scn-band-edge: #596172;
  --scn-good-edge: #007031; --scn-warn-edge: #A04600; --scn-hot-edge: #C00056; --scn-acc-edge: #4648E8; --scn-muted-edge: #5B616C;
  
  --scn-faint-edge: #616672;
}

/* ---- base.css (scoped) ---- */
.dh-doc {
  --tone-neutral: #56627C; --tone-neutral-soft: #ECEEF4;
  --tone-cli: #555FFF; --tone-cli-soft: #E4E6FF;
  --tone-coordinator: #0E8FA6; --tone-coordinator-soft: #D6F1F6;
  --tone-container: #7A4FE0; --tone-container-soft: #ECE4FF;
  --tone-answer: #18964A; --tone-answer-soft: #DCF1E3;
  --tone-question: #E0186A; --tone-question-soft: #FDDDEA;
  --tone-warn: #B54500; --tone-warn-soft: #FFE3CE;
  --col: 46rem;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) {
    --tone-neutral: #98A3BC; --tone-neutral-soft: #1D2439;
    --tone-cli: #8D94FF; --tone-cli-soft: #23285A;
    --tone-coordinator: #3CC3DA; --tone-coordinator-soft: #0E2E36;
    --tone-container: #B39BFF; --tone-container-soft: #2A1F4D;
    --tone-answer: #34C76E; --tone-answer-soft: #11301F;
    --tone-question: #FF5C9E; --tone-question-soft: #3B1529;
    --tone-warn: #FFB984; --tone-warn-soft: #3A2410;
  }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] {
  --tone-neutral: #98A3BC; --tone-neutral-soft: #1D2439;
  --tone-cli: #8D94FF; --tone-cli-soft: #23285A;
  --tone-coordinator: #3CC3DA; --tone-coordinator-soft: #0E2E36;
  --tone-container: #B39BFF; --tone-container-soft: #2A1F4D;
  --tone-answer: #34C76E; --tone-answer-soft: #11301F;
  --tone-question: #FF5C9E; --tone-question-soft: #3B1529;
  --tone-warn: #FFB984; --tone-warn-soft: #3A2410;
}
.dh-doc *,
.dh-doc *::before,
.dh-doc *::after { box-sizing: border-box; }
.dh-doc a { color: var(--acc-ink); text-underline-offset: 3px; }
.dh-doc a:hover { color: var(--acc); }
.dh-doc :focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }
.dh-doc strong,
.dh-doc b { font-weight: var(--w-strong); color: var(--ink); }
.dh-doc code { font-family: var(--font-mono); font-size: .86em; background: var(--surface-2); border: 1px solid var(--line); padding: .05em .35em; border-radius: 5px; color: var(--ink); overflow-wrap: anywhere; }
.dh-doc kbd { font: 500 .8em var(--font-mono); padding: .1em .5em; border: 1px solid var(--line-2); border-bottom-width: 3px; border-radius: 6px; background: var(--surface); color: var(--ink); white-space: nowrap; }
.dh-doc .dh-mouse { white-space: nowrap; }
.dh-doc .nav-wrap { position: relative; flex: 1; min-width: 0; display: flex; }
.dh-doc .nav-wrap::before,
.dh-doc .nav-wrap::after { position: absolute; top: 0; bottom: 0; width: 14px; display: none; place-items: center; color: var(--muted); font-size: var(--fs-s); line-height: 1; pointer-events: none; }
.dh-doc .nav-wrap::before { content: "‹"; left: 0; }
.dh-doc .nav-wrap::after { content: "›"; right: 0; }
.dh-doc .nav-wrap[data-more="left"]::before,
.dh-doc .nav-wrap[data-more="both"]::before,
.dh-doc .nav-wrap[data-more="right"]::after,
.dh-doc .nav-wrap[data-more="both"]::after { display: grid; }
@media (min-width: 1240px) {
.dh-doc .has-side .toc-block.toc-page { display: none; }
}
.dh-doc .toc-title { font-weight: 600; color: var(--ink); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; margin-bottom: 8px; }
.dh-doc h2,
.dh-doc h3 { color: var(--ink); font-family: var(--font-display); position: relative; }
.dh-doc h2 { font-size: var(--fs-2xl); line-height: 1.12; letter-spacing: -.02em; margin: 56px 0 16px; font-weight: 600; }
.dh-doc h3 { font-size: var(--fs-xl); line-height: 1.25; margin: 36px 0 12px; font-weight: 600; }
.dh-doc .h-anchor { position: absolute; left: -1.1em; opacity: 0; text-decoration: none; color: var(--faint); font-weight: 400; }
.dh-doc h2:hover .h-anchor,
.dh-doc h3:hover .h-anchor { opacity: 1; }
.dh-doc p,
.dh-doc ul,
.dh-doc ol { margin: 0 0 16px; }
.dh-doc li { margin: 4px 0; }
.dh-doc .chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-xs); color: var(--muted); font-weight: 500; text-decoration: none; }
.dh-doc .chip-link { color: var(--acc-ink); }
.dh-doc .chip-btn { cursor: pointer; font-family: inherit; }
.dh-doc .xref { border-bottom: 1px dotted var(--line-2); }
.dh-doc .coderef { border-bottom: 1px dashed var(--acc-2); cursor: help; }
.dh-doc .coderef code { background: var(--acc-softer); border-color: var(--acc-soft); }
.dh-doc .table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.dh-doc table { border-collapse: collapse; width: 100%; font-size: var(--fs-s); }
.dh-doc th,
.dh-doc td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dh-doc th { font-weight: 600; color: var(--ink); background: var(--surface-2); }
.dh-doc tbody tr:last-child td,
.dh-doc tbody tr:last-child th { border-bottom: 0; }
.dh-doc td code,
.dh-doc th code { overflow-wrap: break-word; }
.dh-doc .table-more { position: absolute; margin: 0; white-space: nowrap; font: 500 12px/18px var(--font-sans); color: var(--muted); }
.dh-doc .table-wrap[data-more="r"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.dh-doc .table-wrap[data-more="l"] { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.dh-doc .table-wrap[data-more="lr"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
.dh-doc .callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-m); margin: 0 0 20px; border: 1px solid var(--line); background: var(--surface); }
.dh-doc .callout p:last-child { margin-bottom: 0; }
.dh-doc .callout-icon { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--font-sans); color: var(--on-acc); background: var(--info); margin-top: 2px; }
.dh-doc .callout-note { border-color: var(--acc-soft); background: var(--info-soft); }
.dh-doc .callout-tip { border-color: var(--good-soft); background: var(--good-soft); }
.dh-doc .callout-tip .callout-icon { background: var(--good); }
.dh-doc .callout-warn { border-color: var(--warn); background: var(--warn-soft); }
.dh-doc .callout-warn .callout-icon { background: var(--warn); }
.dh-doc blockquote { margin: 0 0 20px; padding: 4px 16px; border-left: 3px solid var(--line-2); color: var(--muted); }
.dh-doc .code-block { position: relative; margin: 0 0 20px; }
.dh-doc .code-lang { position: absolute; right: 10px; top: 6px; font: 500 11px var(--font-mono); color: var(--term-faint); text-transform: uppercase; letter-spacing: .08em; z-index: 1; }
.dh-doc .ch-pre { margin: 0; background: var(--term); color: var(--term-ink); border-radius: var(--r-m); padding: 14px 0; overflow-x: auto; font: 400 13px/1.6 var(--font-mono); border: 1px solid var(--term-line); }
.dh-doc .ch-pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.dh-doc .ch-row { display: flex; padding-right: 16px; min-width: max-content; }
.dh-doc .ch-ln { flex: none; width: 3.4em; padding-right: 1em; text-align: right; color: var(--ch-24); user-select: none; }
.dh-doc .ch-row > div { flex: 1; }
.dh-doc .ch-focus { background: var(--ch-17); box-shadow: inset 3px 0 var(--acc); }
.dh-doc .ch-unfocus { opacity: .45; }
.dh-doc .ch-add { background: var(--ch-12); }
.dh-doc .ch-add::before { content: "+"; color: var(--good); position: absolute; margin-left: -1em; }
.dh-doc .ch-del { background: var(--ch-11); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.35); }
.dh-doc .ch-del::before { content: "−"; color: var(--hot); position: absolute; margin-left: -1em; }
.dh-doc .part { margin: 28px 0; }
.dh-doc figure.part { margin-inline: 0; }
.dh-doc .part-intro { color: var(--muted); font-size: var(--fs-s); }
.dh-doc .part-intro p { margin-bottom: 10px; }
.dh-doc .stage-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; box-shadow: var(--shadow-sm); }
.dh-doc .stage-head { font-weight: 600; color: var(--ink); margin-bottom: 12px; font-size: var(--fs-s); }
.dh-doc .st-stage,
.dh-doc .st-caps,
.dh-doc .tab-panels { display: grid; }
.dh-doc .st-stage > .st-panel,
.dh-doc .st-caps > .st-cap,
.dh-doc .tab-panels > .tab-panel { grid-area: 1 / 1; visibility: hidden; min-width: 0; }
.dh-doc .st-stage > .st-panel.is-active,
.dh-doc .st-caps > .st-cap.is-active,
.dh-doc .tab-panels > .tab-panel.is-active { visibility: visible; }
.dh-doc .st-panel.is-active.is-fresh { animation: fade-in var(--dur) var(--ease); }
@keyframes fade-in { from { opacity: .35; transform: translateY(4px); } }
.dh-doc .st-num { display: inline-block; font: 600 11px var(--font-sans); text-transform: uppercase; letter-spacing: .1em; color: var(--acc-ink); background: var(--acc-softer); border-radius: var(--r-pill); padding: 2px 8px; margin-right: 6px; vertical-align: 2px; white-space: nowrap; }
.dh-doc .st-step-title { font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.dh-doc .st-text p { margin-bottom: 10px; }
.dh-doc .st-state { font-size: var(--fs-s); }
.dh-doc .st-state th { width: 38%; background: var(--surface-2); }
.dh-doc .st-state tr.is-changed td { background: var(--mark-bg); color: var(--mark-ink); }
.dh-doc .st-state tr.is-changed code { background: transparent; border-color: transparent; color: inherit; }
.dh-doc .chg { margin-left: 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.dh-doc .st-controls { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.dh-doc .st-mid { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; }
.dh-doc .st-dots { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.dh-doc .st-dot { width: 22px; height: 22px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.dh-doc .st-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); transition: transform var(--dur-fast), background var(--dur-fast); }
.dh-doc .st-dot.is-active::after { background: var(--acc); transform: scale(1.35); }
.dh-doc .st-count { font: 500 var(--fs-xs) var(--font-mono); color: var(--faint); font-variant-numeric: tabular-nums; min-width: 4.5ch; text-align: center; white-space: nowrap; }
.dh-doc .btn { font: 500 var(--fs-s) var(--font-sans); padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; min-height: 40px; }
.dh-doc .btn:hover:not(:disabled) { border-color: var(--acc); color: var(--acc-ink); }
.dh-doc .btn:disabled { opacity: .4; cursor: default; }
.dh-doc .btn-go { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.dh-doc .btn-go:hover:not(:disabled) { color: var(--on-acc); filter: brightness(1.08); }
.dh-doc .btn[data-play] { min-width: 7.5em; }
@media (max-width: 520px) {
.dh-doc .st-dots { display: none; }
.dh-doc .btn { padding: 8px 12px; }
.dh-doc .stage-box { padding: 12px; }
}
.dh-doc .cw-note { margin-bottom: 12px; }
.dh-doc .cw-note p { display: inline; }
.dh-doc .cw-file { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font: 400 12px var(--font-mono); color: var(--term-faint); background: var(--ch-22); padding: 8px 14px; border: 1px solid var(--term-line); border-bottom: 0; border-radius: var(--r-m) var(--r-m) 0 0; }
.dh-doc .cw-file b { color: var(--term-ink); font-weight: 500; }
.dh-doc .cw-path { overflow-wrap: anywhere; }
.dh-doc .cw-code .ch-pre { border-radius: 0 0 var(--r-m) var(--r-m); }
.dh-doc .cw-error { padding: 14px; background: var(--bad-soft); color: var(--bad-ink); border-radius: 0 0 var(--r-m) var(--r-m); }
.dh-doc .ed-win { border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--term-line); }
.dh-doc .ed-tabs { display: flex; background: var(--ch-22); overflow-x: auto; }
.dh-doc .ed-tab { font: 400 12px var(--font-mono); color: var(--term-faint); padding: 8px 14px; border-right: 1px solid var(--term-line); white-space: nowrap; }
.dh-doc .ed-tab.is-on { background: var(--term); color: var(--term-ink); box-shadow: inset 0 -2px var(--acc); }
.dh-doc .ed-win .ch-pre { border: 0; border-radius: 0; }
.dh-doc .ed-sub { font-weight: 400; color: var(--muted); }
.dh-doc .t-line { white-space: pre; }
.dh-doc .t-pr { color: var(--ch-6); margin-right: .6ch; }
.dh-doc .t-q { color: var(--ch-5); margin-right: .6ch; }
.dh-doc .t-out { color: var(--term-faint); }
.dh-doc .st-panel.is-fresh .t-new { animation: type .55s steps(28, end) both; animation-delay: calc(var(--i) * .35s); }
@keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.dh-doc .chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; }
.dh-doc .chart-title { font-weight: 600; color: var(--ink); margin-bottom: 8px; font-size: var(--fs-s); }
.dh-doc .chart-plot { position: relative; }
.dh-doc .chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.dh-doc .chart .grid { stroke: var(--grid); }
.dh-doc .chart .axis { stroke: var(--axis); stroke-width: 1.5; }
.dh-doc .chart .tick { font: 400 12px var(--font-sans); fill: var(--faint); }
.dh-doc .chart .cat { font: 500 13px var(--font-sans); fill: var(--ink-2); }
.dh-doc .chart .val { font: 500 12px var(--font-mono); fill: var(--muted); }
.dh-doc .chart .axis-label { font: 500 12px var(--font-sans); fill: var(--muted); }
.dh-doc .chart .bar.s1,
.dh-doc .chart .dot.s1 { fill: var(--series-1); }
.dh-doc .chart .bar.s2,
.dh-doc .chart .dot.s2 { fill: var(--series-2); }
.dh-doc .chart .line { fill: none; stroke-width: 2; }
.dh-doc .chart .line.s1 { stroke: var(--series-1); }
.dh-doc .chart .line.s2 { stroke: var(--series-2); }
.dh-doc .chart .dot { stroke: var(--surface); stroke-width: 2; }
.dh-doc .chart .hit { fill: transparent; cursor: pointer; }
.dh-doc .chart .bar { cursor: pointer; }
.dh-doc .chart .bar:hover,
.dh-doc .chart .bar:focus { filter: brightness(1.1); }
.dh-doc .chart-tip { position: absolute; transform: translate(-50%, -100%); background: var(--ink); color: var(--surface); font: 500 12px var(--font-sans); padding: 5px 9px; border-radius: 6px; pointer-events: none; white-space: nowrap; }
.dh-doc .legend { display: flex; gap: 14px; font-size: var(--fs-xs); margin-bottom: 6px; }
.dh-doc .legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.dh-doc .legend .sw.s1 { background: var(--series-1); }
.dh-doc .legend .sw.s2 { background: var(--series-2); }
.dh-doc .chart-table { margin-top: 8px; font-size: var(--fs-xs); }
.dh-doc .chart-table summary { cursor: pointer; color: var(--muted); }
.dh-doc .chart-table .table-wrap { margin: 8px 0 0; }
.dh-doc .ftree { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 12px 16px; font-size: var(--fs-s); }
.dh-doc .ftree ul { list-style: none; margin: 0; padding-left: 0; }
.dh-doc .ftree ul ul { padding-left: 18px; border-left: 1px dashed var(--line-2); margin-left: 6px; }
.dh-doc .ft-file,
.dh-doc .ft-dir > .ft-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 4px 0; }
.dh-doc .ft-name { font-family: var(--font-mono); font-size: 13px; color: var(--ink); }
.dh-doc .ft-ico { color: var(--faint); margin-right: 6px; }
.dh-doc .ft-mark { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: .05em; }
.dh-doc .ft-mark b { margin-right: 4px; color: inherit; }
.dh-doc .mk-good { background: var(--good-soft); color: var(--good-ink); }
.dh-doc .mk-info { background: var(--info-soft); color: var(--info-ink); }
.dh-doc .mk-bad { background: var(--bad-soft); color: var(--bad-ink); }
.dh-doc .mk-warn { background: var(--warn-soft); color: var(--warn-ink); }
.dh-doc .mk-untested { background: var(--untested-soft); color: var(--untested-ink); }
.dh-doc .ft-note { color: var(--muted); font-size: var(--fs-xs); flex-basis: 100%; padding-left: 22px; }
.dh-doc .tab-bar { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.dh-doc .tab-bar [role="tab"] { font: 500 var(--fs-s) var(--font-sans); background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; color: var(--muted); cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.dh-doc .tab-bar [aria-selected="true"] { color: var(--acc-ink); border-bottom-color: var(--acc); }
.dh-doc .tab-panel > .part:first-child { margin-top: 0; }
.dh-doc .acc-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); margin-bottom: 8px; }
@media print {
.dh-doc .tab-bar { display: none; }
.dh-doc .tab-panel[hidden] { display: block !important; }
.dh-doc .tab-panel::before { content: attr(data-title); display: block; margin: 0 0 8px; font: 600 var(--fs-m) var(--font-sans); color: var(--ink); }
.dh-doc .tab-panel + .tab-panel { margin-top: 18px; }
.dh-doc .acc-item::details-content { content-visibility: visible; }
}
.dh-doc .acc-item summary { cursor: pointer; padding: 12px 16px; font-weight: 500; color: var(--ink); }
.dh-doc .acc-body { padding: 0 16px 6px; }
.dh-doc .human { margin: 32px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--acc-soft); }
.dh-doc .human-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--fs-xs); color: var(--faint); margin-bottom: 10px; font-weight: 400; }
.dh-doc .human-chip { background: var(--acc-soft); color: var(--acc-ink); font-weight: 600; border-radius: var(--r-pill); padding: 2px 10px; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
@media (max-width: 520px) {
.dh-doc .human { padding-left: 12px; }
}
.dh-doc .llm-peek { margin-top: 10px; font-size: var(--fs-s); }
.dh-doc .llm-peek summary { cursor: pointer; color: var(--muted); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.dh-doc .llm-peek summary::before { content: "LLM"; font: 600 10px var(--font-mono); background: var(--ink); color: var(--surface); padding: 2px 6px; border-radius: 4px; }
.dh-doc .llm-text { margin-top: 8px; padding: 12px 14px; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: var(--r-m); }
.dh-doc .llm-text p:last-child { margin-bottom: 0; }
.dh-doc .llm-whole { margin-top: 48px; }
.dh-doc .part-name { font: 600 var(--fs-l) var(--font-display); color: var(--ink); }
.dh-doc .pane { margin-top: 14px; }
.dh-doc .pane-llm { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 13px/1.6 var(--font-mono); background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: var(--r-m); padding: 12px 14px; margin: 0; color: var(--ink-2); }
.dh-doc .tree-file pre { margin-top: 8px; max-height: 28rem; overflow: auto; }
.dh-doc a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) {
.dh-doc *,
.dh-doc *::before,
.dh-doc *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 420px) {
.dh-doc .st-controls { gap: 6px; }
.dh-doc .btn { padding: 8px 10px; font-size: var(--fs-xs); }
.dh-doc .btn[data-play] { min-width: 5.6em; }
.dh-doc .st-count { min-width: 0; }
}
.dh-doc .chart svg.hbar { max-width: 520px; }
@media print {
.dh-doc .table-wrap[data-more] { -webkit-mask-image: none; mask-image: none; }
.dh-doc .table-more { display: none; }
}

/* ---- charts11.css (scoped) ---- */
.dh-doc .chart { position: relative; }
.dh-doc .chart-steps { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dh-doc .step-cap { margin: 10px 0 0; font-size: var(--fs-s); color: var(--ink-2); font-weight: 400; min-height: 1.5em; }
.dh-doc .part-hint { margin: 8px 0 0; font-size: var(--fs-xs); color: var(--faint); }
.dh-doc .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dh-doc .chart-anns ul { margin: 8px 0 0; padding-left: 20px; font-size: var(--fs-s); }
.dh-doc .chart-canvas .ann { position: absolute; z-index: 2; height: 24px; min-width: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; color: var(--acc); }
.dh-doc .ann i { display: block; pointer-events: none; }
.dh-doc .ann-event i { width: var(--chart-ann-marker); height: var(--chart-ann-marker); background: currentColor; clip-path: polygon(50% 0, 100% 100%, 0 100%); margin-bottom: 3px; }
.dh-doc .ann-range i { width: 100%; height: 6px; border-radius: 3px; background: currentColor; opacity: .8; margin-bottom: 3px; }
.dh-doc .ann-threshold { height: 24px; width: auto; padding: 0 8px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid currentColor; font: 500 var(--fs-xs)/1 var(--font-sans); align-items: center; box-shadow: var(--shadow-sm); }
.dh-doc .ann-threshold span { color: var(--ink); }
.dh-doc .ann.tone-acc,
.dh-doc .ann.tone-accent { color: var(--acc); }
.dh-doc .ann.tone-good { color: var(--good); }
.dh-doc .ann.tone-warn { color: var(--warn); }
.dh-doc .ann.tone-bad { color: var(--bad); }
.dh-doc .ann.tone-muted { color: var(--faint); }
.dh-doc .ann.tone-c1,
.dh-doc .ann.tone-1 { color: var(--c1); }
.dh-doc .ann.tone-c2,
.dh-doc .ann.tone-2 { color: var(--c2); }
.dh-doc .ann.tone-c3,
.dh-doc .ann.tone-3 { color: var(--c3); }
.dh-doc .ann.tone-c4,
.dh-doc .ann.tone-4 { color: var(--c4); }
.dh-doc .ann.tone-c5,
.dh-doc .ann.tone-5 { color: var(--c5); }
.dh-doc .ann.tone-c6,
.dh-doc .ann.tone-6 { color: var(--c6); }
.dh-doc .ann.tone-c7,
.dh-doc .ann.tone-7 { color: var(--c7); }
.dh-doc .ann.tone-c8,
.dh-doc .ann.tone-8 { color: var(--c8); }
.dh-doc .ann:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); border-radius: 4px; }
.dh-doc .ann[aria-expanded="true"] { filter: drop-shadow(0 0 0 currentColor) brightness(1.1); }
.dh-doc .heat-key { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: var(--fs-xs); color: var(--muted); }
.dh-doc .heat-bar { flex: 0 1 180px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--heat-lo), var(--heat-hi)); background: linear-gradient(90deg in oklab, var(--heat-lo), var(--heat-hi)); border: 1px solid var(--line); }
.dh-doc .heat-bar.is-diverge { background: linear-gradient(90deg in oklab, var(--heat-neg), var(--heat-mid), var(--heat-hi)); }
.dh-doc .heat-bar.tone-1,
.dh-doc .heat-bar.tone-c1 { --heat-hi: var(--c1); }
.dh-doc .heat-bar.tone-2,
.dh-doc .heat-bar.tone-c2 { --heat-hi: var(--c2); }
.dh-doc .heat-bar.tone-3,
.dh-doc .heat-bar.tone-c3 { --heat-hi: var(--c3); }
.dh-doc .heat-bar.tone-4,
.dh-doc .heat-bar.tone-c4 { --heat-hi: var(--c4); }
.dh-doc .heat-bar.tone-5,
.dh-doc .heat-bar.tone-c5 { --heat-hi: var(--c5); }
.dh-doc .heat-bar.tone-6,
.dh-doc .heat-bar.tone-c6 { --heat-hi: var(--c6); }
.dh-doc .heat-bar.tone-7,
.dh-doc .heat-bar.tone-c7 { --heat-hi: var(--c7); }
.dh-doc .heat-bar.tone-8,
.dh-doc .heat-bar.tone-c8 { --heat-hi: var(--c8); }
.dh-doc .heat-bar.tone-good { --heat-hi: var(--good); }
.dh-doc .heat-bar.tone-warn { --heat-hi: var(--warn); }
.dh-doc .heat-bar.tone-bad { --heat-hi: var(--bad); }
.dh-doc .heat-bar.tone-accent,
.dh-doc .heat-bar.tone-acc { --heat-hi: var(--acc); }
.dh-doc .heat-bar.tone-muted { --heat-hi: var(--faint); }
@media (max-width: 600px) {
.dh-doc .ann-event,
.dh-doc .ann-range { height: 24px; }
}
.dh-doc .chart .ctl-range { min-height: 24px; }

/* ---- codewalk.css (scoped) ---- */
.dh-doc .cw-still .ch-pre { animation: cw-in .16s ease-out; }
@keyframes cw-in { from { opacity: .35; } to { opacity: 1; } }
.dh-doc .ch-fold-row { align-items: center; padding: 2px 0; }
.dh-doc .cw-fold { all: unset; box-sizing: border-box; cursor: pointer; margin: 2px 0; padding: 1px 10px; border-radius: 999px; font: 500 12px/1.6 var(--font-mono); color: var(--term-faint); border: 1px dashed color-mix(in srgb, var(--term-faint) 55%, var(--term-line)); background: transparent; transition: color .15s, border-color .15s, background .15s; }
.dh-doc .cw-fold:hover { color: var(--term-ink); border-color: var(--term-faint); }
.dh-doc .cw-fold:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.dh-doc .cw-fold-range { opacity: .85; }
.dh-doc .ch-pre:has(.ch-focus) .ch-row.ch-fold-row:not(:has(.ch-focus)) { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
.dh-doc .cw-still .ch-pre { animation: none; }
.dh-doc .cw-fold { transition: none; }
}

/* ---- diagrams.css (scoped) ---- */
.dh-doc .scn { --scn-paper: var(--surface-2); }
.dh-doc .scn-conn .scn-end { stroke: var(--muted); stroke-width: var(--dg-edge-w, 1.6px); stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: none; fill: none; }
.dh-doc .scn-conn .scn-end.is-ink { fill: var(--muted); }
.dh-doc .scn-conn .scn-end.is-paper { fill: var(--scn-paper); }
.dh-doc .scn-conn.cc .scn-end { stroke: var(--k); }
.dh-doc .scn-conn.cc .scn-end.is-ink { fill: var(--k); }
.dh-doc .scn-end-t { fill: var(--ink); font-weight: 500; stroke: var(--scn-paper); stroke-width: 3px; stroke-linejoin: round; paint-order: stroke; }
.dh-doc .scn3-wire.is-end { border: 0; padding: 0 3px; color: var(--ink); background: var(--scn-paper); }
.dh-doc .scn .scn-rec { fill: var(--dg-node-bg, var(--surface)); stroke: none; }
.dh-doc .scn-rec-head { fill: var(--class-head-bg, var(--surface-3)); }
.dh-doc [data-record="entity"] .scn-rec-head { fill: var(--er-head-bg, var(--surface-3)); }
.dh-doc .scn-rec-edge { fill: none; stroke: var(--dg-node-border, var(--line-2)); stroke-width: 1.25; pointer-events: none; }
.dh-doc .scn-ent.cc .scn-rec-head { fill: var(--k-soft); }
.dh-doc .scn-ent.cc .scn-rec-edge { stroke: var(--k); }
.dh-doc .is-hl .scn-rec-edge,
.dh-doc .scn-ent.k-record:hover .scn-rec-edge { stroke: var(--acc); stroke-width: 2; }
.dh-doc .scn-rec-name { fill: var(--ink); font-family: var(--font-mono); font-weight: 600; pointer-events: none; }
.dh-doc .scn-rec-name.is-i,
.dh-doc .scn-field-t.is-i { font-style: italic; }
.dh-doc .scn-rec-chip { fill: var(--surface); stroke: var(--line-2); }
.dh-doc .scn-rec-st { fill: var(--muted); font-family: var(--font-mono); font-size: 11px; font-weight: 500; }
.dh-doc .scn-rec-rule { stroke: var(--dg-node-border, var(--line-2)); stroke-width: 1; }
.dh-doc .scn-field { fill: transparent; stroke: none; }
.dh-doc .k-field:hover .scn-field { fill: var(--surface-2); }
.dh-doc .k-field.is-hl .scn-field { fill: var(--acc-soft); }
.dh-doc .k-field.hl-good .scn-field { fill: var(--good-soft); }
.dh-doc .k-field.hl-warn .scn-field { fill: var(--warn-soft); }
.dh-doc .k-field.hl-hot .scn-field { fill: var(--hot-soft); }
.dh-doc .scn-field-t { font-family: var(--font-mono); font-weight: 500; fill: var(--class-member, var(--ink)); pointer-events: none; }
.dh-doc .scn-field-t.is-sign,
.dh-doc .scn-field-t.is-type { fill: var(--muted); }
.dh-doc .scn-field-t.is-u { text-decoration: underline; text-underline-offset: 2px; fill: var(--class-static, var(--ink)); }
.dh-doc .scn-key { fill: color-mix(in srgb, var(--er-key-ink, var(--acc-ink)) 12%, transparent); }
.dh-doc .scn-key-t { fill: var(--er-key-ink, var(--acc-ink)); font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.dh-doc .scn .scn3-l.k-field,
.dh-doc .scn .scn3-l.k-record { font-family: var(--font-mono); }
.dh-doc .scn-ttl { font-size: var(--fs-s); font-weight: var(--w-strong); color: var(--ink); align-self: center; }
.dh-doc .k-initial .scn-dot-fill { fill: var(--state-dot, var(--ink)); stroke: none; }
.dh-doc .k-final .scn-ring-out { fill: none; stroke: var(--state-dot, var(--ink)); stroke-width: 1.75; }
.dh-doc .k-final .scn-dot-fill { fill: var(--state-dot, var(--ink)); stroke: none; }
.dh-doc [data-dh-part="state"] .k-box .scn-shape { fill: var(--state-bg, var(--surface)); stroke: var(--state-border, var(--line-2)); rx: 14px; }
.dh-doc [data-dh-part="state"] .k-box.cc .scn-shape { fill: var(--k-soft); stroke: var(--k); }
.dh-doc [data-dh-part="state"] .tone-acc .scn-shape { fill: var(--acc-soft); stroke: var(--state-current, var(--acc)); stroke-width: 2.2; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--state-current, var(--acc)) 55%, transparent)) !important; }
.dh-doc [data-dh-part="state"] .scn-conn-t { fill: var(--state-event, var(--ink)); }
.dh-doc [data-dh-part="state"] .scn-conn path,
.dh-doc [data-dh-part="class"] .scn-conn path,
.dh-doc [data-dh-part="er"] .scn-conn path { stroke-width: var(--dg-edge-w, 1.6px); }
.dh-doc .scn .scn-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--acc); }
.dh-doc .scn-conn.is-dashed .scn-ends * { stroke-dasharray: none; }
.dh-doc .part-plain { margin: 8px 0 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-s, 8px); background: var(--surface-2); color: var(--ink); font-family: var(--font-mono); font-size: var(--fs-s); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }

/* ---- inline-marks.css (scoped) ---- */
.dh-doc .scn .scn-code { font-family: var(--font-mono); font-size: max(11px, .9em); font-weight: 500; line-height: 1.35; background: var(--code-bg, var(--surface-2)); color: var(--ink); border: 0; border-radius: 4px; padding: .05em .3em; overflow-wrap: anywhere; white-space: break-spaces; }
.dh-doc .scn .scn-cap strong,
.dh-doc .scn .scn-note strong,
.dh-doc .scn .scn-steps strong { font-weight: var(--w-strong); }
.dh-doc .scn-code-bg { fill: var(--code-bg, var(--surface-2)); }
.dh-doc .scn-say-t.is-code { font-family: var(--font-mono); font-weight: 500; fill: var(--ink); }
.dh-doc .scn-say-t.is-b { font-weight: 700; }
.dh-doc .scn-say-t.is-i { font-style: italic; }

/* ---- pagecharts.css (scoped) ---- */
.dh-doc .pc-scale { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: var(--fs-s); color: var(--muted); }
.dh-doc .pc-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-pill); overflow: hidden; background: var(--surface-2); }
.dh-doc .pc-seg-b { min-height: var(--pc-seg-h); min-width: 64px; padding: 0 14px; border: 0; background: transparent; color: var(--ink); font: 500 var(--fs-s) var(--font-sans); cursor: pointer; }
.dh-doc .pc-seg-b + .pc-seg-b { border-left: 1px solid var(--line-2); }
.dh-doc .pc-seg-b[aria-pressed="true"] { background: var(--pc-seg-on); color: var(--pc-seg-on-ink); }
.dh-doc .pc-seg-b:focus-visible,
.dh-doc .pc-key-b:focus-visible,
.dh-doc .pc-range:focus-visible,
.dh-doc .pc-num:focus-visible,
.dh-doc .pc-select:focus-visible,
.dh-doc .pc-check input:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); }
.dh-doc .pc-key { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-s); }
.dh-doc .pc-key-b { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 6px; border: 0; border-radius: var(--r-s); background: transparent; color: var(--ink-2); font: 400 var(--fs-s) var(--font-sans); }
.dh-doc button.pc-key-b { cursor: pointer; min-height: var(--pc-key-h); }
.dh-doc button.pc-key-b[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.dh-doc .pc-glyph { flex: none; overflow: visible; }
.dh-doc .chart[data-dh-layout="calculator"] { container-type: inline-size; }
.dh-doc .pc-calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4) var(--s-5); align-items: start; }
@container (max-width: 640px) {
.dh-doc .pc-calc { grid-template-columns: minmax(0, 1fr); }
}
.dh-doc .pc-h { margin: 0 0 10px; font: 600 var(--fs-xs) var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dh-doc .pc-in,
.dh-doc .pc-out { min-width: 0; }
.dh-doc .pc-fields { display: grid; gap: 14px; }
.dh-doc .pc-field { display: grid; gap: 6px; }
.dh-doc .pc-lab { font: 500 var(--fs-s) var(--font-sans); color: var(--ink); }
.dh-doc .pc-ctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dh-doc .pc-range { flex: 1 1 140px; min-width: 120px; min-height: 28px; accent-color: var(--acc); }
.dh-doc .pc-box { display: inline-flex; align-items: center; gap: 6px; }
.dh-doc .pc-num { width: 8ch; min-width: 72px; min-height: var(--pc-input-h); padding: 0 8px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--pc-input-bg); color: var(--ink); font: 500 var(--fs-s) var(--font-mono); text-align: right; }
.dh-doc .pc-select { min-height: var(--pc-input-h); padding: 0 8px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--pc-input-bg); color: var(--ink); font: 500 var(--fs-s) var(--font-sans); }
.dh-doc .pc-unit { font-size: var(--fs-s); color: var(--muted); white-space: nowrap; }
.dh-doc .pc-check { display: inline-flex; align-items: center; gap: 8px; min-height: var(--pc-input-h); font: 500 var(--fs-s) var(--font-sans); cursor: pointer; }
.dh-doc .pc-check input { width: 20px; height: 20px; accent-color: var(--acc); }
.dh-doc .pc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dh-doc .pc-in-static { margin: 0; display: grid; gap: 8px; }
.dh-doc .pc-in-row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.dh-doc .pc-in-row dt { color: var(--ink-2); font-size: var(--fs-s); }
.dh-doc .pc-in-row dd { margin: 0; font: 600 var(--fs-s) var(--font-mono); color: var(--ink); text-align: right; }
.dh-doc .pc-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.dh-doc .pc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "f f"; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.dh-doc .pc-row-label { grid-area: l; font: 500 var(--fs-s) var(--font-sans); color: var(--ink); }
.dh-doc .pc-row-value { grid-area: v; font: 600 var(--fs-s) var(--font-mono); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.dh-doc .pc-row-formula,
.dh-doc .pc-result-formula { grid-area: f; font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.dh-doc .pc-result { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "f f"; gap: 4px 12px; align-items: baseline; padding: 14px 16px; border-radius: var(--r-m); background: var(--pc-result-bg); border: 1px solid var(--pc-result-border); }
.dh-doc .pc-result-label { grid-area: l; font: 600 var(--fs-s) var(--font-sans); color: var(--ink); }
.dh-doc .pc-result-value { grid-area: v; font: 700 var(--pc-result-fs) var(--font-mono); color: var(--pc-result-ink); font-variant-numeric: tabular-nums; text-align: right; }
.dh-doc .chart[data-dh-layout="calculator"] .chart-canvas { margin-top: var(--s-4); }
@media print {
.dh-doc .pc-scale,
.dh-doc .pc-actions { display: none; }
.dh-doc .pc-calc { break-inside: avoid; }
}
.dh-doc .chart .pc-glyph { width: 30px; height: 14px; max-width: none; display: block; }
.dh-doc .pc-num { width: 10ch; min-width: 92px; }
.dh-doc .pc-rows { display: grid; gap: 0; }
.dh-doc .pc-rows > .pc-result { margin: 12px 0; }
.dh-doc .pc-verdict { margin: 4px 0 8px; padding: 8px 12px; border-radius: var(--r-s); border-left: 4px solid var(--pc-tone); background: color-mix(in oklab, var(--pc-tone) 10%, var(--surface)); font-size: var(--fs-s); color: var(--ink); }
.dh-doc .pc-verdict-label { color: var(--muted); }
.dh-doc .pc-units-row { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.dh-doc .pc-tiles { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.dh-doc .pc-tile { display: inline-block; width: var(--pc-tile); height: var(--pc-tile); border-radius: 3px; box-sizing: border-box; background: var(--pc-tone); border: 2px solid var(--pc-tone); }
.dh-doc .pc-tile-1 { background: transparent; }
.dh-doc .pc-tile-2 { background: repeating-linear-gradient(135deg, var(--pc-tone) 0 2px, transparent 2px 4px); }
.dh-doc .pc-more { font-size: var(--fs-xs); color: var(--muted); padding-left: 6px; }
.dh-doc .pc-units-key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--fs-s); }
.dh-doc .pc-units-key li { display: inline-flex; align-items: center; gap: 6px; }
.dh-doc .pc-calc .tone-acc { --pc-tone: var(--acc); }
.dh-doc .pc-calc .tone-good { --pc-tone: var(--good); }
.dh-doc .pc-calc .tone-warn { --pc-tone: var(--warn); }
.dh-doc .pc-calc .tone-bad { --pc-tone: var(--bad); }
.dh-doc .pc-calc .tone-muted { --pc-tone: var(--faint); }
.dh-doc .pc-calc .tone-c1 { --pc-tone: var(--c1); }
.dh-doc .pc-calc .tone-c2 { --pc-tone: var(--c2); }
.dh-doc .pc-calc .tone-c3 { --pc-tone: var(--c3); }
.dh-doc .pc-calc .tone-c4 { --pc-tone: var(--c4); }
.dh-doc .pc-calc .tone-c5 { --pc-tone: var(--c5); }
.dh-doc .pc-calc .tone-c6 { --pc-tone: var(--c6); }
.dh-doc .pc-calc .tone-c7 { --pc-tone: var(--c7); }
.dh-doc .pc-calc .tone-c8 { --pc-tone: var(--c8); }
.dh-doc .pc-presets { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
@container (max-width: 640px) {
.dh-doc .pc-presets { grid-column: auto; }
}
.dh-doc .pc-calc[data-inputs="label"],
.dh-doc .pc-calc[data-formulas="worked"] { grid-template-columns: minmax(0, 1fr); width: 100%; }
.dh-doc .pc-calc[data-inputs="label"] .pc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px var(--s-5); }
@container (max-width: 640px) {
.dh-doc .pc-calc[data-inputs="label"] .pc-fields { grid-template-columns: minmax(0, 1fr); }
}
.dh-doc .pc-lab-v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dh-doc .pc-panel { border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 10px 14px; display: grid; gap: 4px; margin: 6px 0; }
.dh-doc .pc-line { margin: 0; font: 400 var(--fs-s) var(--font-mono); color: var(--ink); overflow-wrap: anywhere; }
.dh-doc .pc-line-label { color: var(--muted); }
.dh-doc .pc-units-row { gap: 4px; }
.dh-doc .pc-units-label { font-size: var(--fs-xs); color: var(--muted); }
.dh-doc .pc-units { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.dh-doc .pc-units .pc-tiles { flex: 0 1 auto; min-width: 0; }
.dh-doc .pc-tile-empty { background: color-mix(in oklab, var(--ink) 6%, transparent); border-color: color-mix(in oklab, var(--ink) 14%, transparent); }
.dh-doc .pc-rows { grid-template-columns: minmax(0, 1fr); }
.dh-doc .pc-rows > * { min-width: 0; }
.dh-doc .pc-panel,
.dh-doc .pc-line,
.dh-doc .pc-verdict,
.dh-doc .pc-units-row,
.dh-doc .pc-units { min-width: 0; max-width: 100%; }
.dh-doc .pc-tiles[data-per-row] { display: flex; flex-wrap: wrap; max-width: calc(var(--pc-per-row) * (var(--pc-tile) + 3px)); }
.dh-doc .chart[data-dh-layout="calculator"] { width: 100%; max-width: none; box-sizing: border-box; }
@container (min-width: 900px) {
.dh-doc .pc-calc[data-inputs="label"],
.dh-doc .pc-calc[data-formulas="worked"] { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.dh-doc .pc-calc[data-inputs="label"] .pc-fields { grid-template-columns: minmax(0, 1fr); }
.dh-doc .pc-calc .pc-presets { grid-column: 1 / -1; }
.dh-doc .pc-units { flex-wrap: nowrap; align-items: flex-start; }
.dh-doc .pc-units .pc-tiles { flex: 1 1 auto; }
.dh-doc .pc-units-key { flex: 0 0 auto; flex-direction: column; flex-wrap: nowrap; gap: 4px; }
}
.dh-doc figure:has(> .chart[data-dh-layout="calculator"]),
.dh-doc figure:has(.chart[data-dh-layout="calculator"]) { max-width: none; width: var(--pc-fig-w, auto); margin-left: var(--pc-fig-ml, 0); position: relative; z-index: 2; }
@media print {
.dh-doc figure:has(.chart[data-dh-layout="calculator"]) { width: auto; margin-left: 0; }
}

/* ---- parts.css (scoped) ---- */
.dh-doc { --tone-good: #18964A; --tone-good-soft: #DCF1E3; --stage-bg: var(--surface); }
.dh-doc .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dh-doc .part { margin: 28px 0; min-width: 0; }
.dh-doc .part-intro { color: var(--muted); font-size: var(--fs-s); margin-bottom: 10px; }
.dh-doc .part-intro p { margin-bottom: 8px; }
.dh-doc .island { min-width: 0; }
.dh-doc .ctl { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.dh-doc .ctl-mid { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.dh-doc .ctl-range { flex: 1; min-width: 40px; accent-color: var(--acc); height: 22px; cursor: pointer; }
.dh-doc .ctl-count { font: 500 12px var(--font-mono); color: var(--muted); white-space: nowrap; min-width: 3.6em; text-align: right; }
.dh-doc .ctl-one { justify-content: flex-end; }
.dh-doc .btn { font: 500 var(--fs-xs) var(--font-sans); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); padding: 7px 14px; border-radius: var(--r-pill); cursor: pointer; white-space: nowrap; }
.dh-doc .btn:hover:not(:disabled) { border-color: var(--acc); color: var(--acc-ink); }
.dh-doc .btn:disabled { opacity: .4; cursor: default; }
.dh-doc .btn-go { background: var(--acc); color: var(--on-acc); border-color: var(--acc); }
.dh-doc .btn-go:hover:not(:disabled) { color: var(--on-acc); filter: brightness(1.08); }
.dh-doc .btn-play { min-width: 6.4em; }
.dh-doc .btn-s { padding: 5px 12px; }
.dh-doc .btn-quiet { border-style: dashed; color: var(--muted); }
.dh-doc .btn-choice { background: var(--acc-soft); color: var(--acc-ink); border-color: var(--acc-soft); }
.dh-doc .cw-num { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--acc); color: var(--on-acc); font: 600 12px var(--font-mono); margin-right: 8px; flex: none; }
.dh-doc .stack { display: grid; }
.dh-doc .stack > * { grid-area: 1 / 1; }
.dh-doc .stack > :not(.is-active) { visibility: hidden; }
.dh-doc .win-dots { display: inline-flex; gap: 6px; flex: none; }
.dh-doc .win-dots i { width: 10px; height: 10px; border-radius: 50%; background: #FF5F57; }
.dh-doc .win-dots i:nth-child(2) { background: #FEBC2E; }
.dh-doc .win-dots i:nth-child(3) { background: #28C840; }
.dh-doc .ch-pre { margin: 0; background: var(--term); color: var(--term-ink); padding: 12px 0; overflow: auto; font: 400 13px/1.6 var(--font-mono); border: 0; border-radius: 0; }
.dh-doc .code-block { position: relative; margin: 0 0 20px; border: 1px solid var(--term-line); border-radius: var(--r-m); overflow: hidden; }
.dh-doc .code-block .ch-pre { padding: 14px 16px; }
.dh-doc .code-lang { position: absolute; right: 10px; top: 6px; font: 500 11px var(--font-mono); color: var(--term-faint); text-transform: uppercase; letter-spacing: .08em; z-index: 1; }
.dh-doc .ch-row { display: flex; min-width: max-content; padding-right: 16px; }
.dh-doc .ch-ln { flex: none; width: 3.6em; padding-right: 1.1em; text-align: right; color: var(--ch-24); user-select: none; }
.dh-doc .ch-code { flex: 1; }
.dh-doc .ch-line { transition: opacity .3s, background-color .3s; }
.dh-doc .ch-focus { background: var(--ch-17); box-shadow: inset 3px 0 var(--acc); }
.dh-doc .ch-mark { background: rgba(255, 177, 122, .16); box-shadow: inset 3px 0 #FFB27A; }
.dh-doc .ch-add { background: var(--ch-12); box-shadow: inset 3px 0 var(--good); }
.dh-doc .ch-del { background: var(--ch-11); box-shadow: inset 3px 0 var(--hot); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.35); }
.dh-doc .cw-error { padding: 14px 16px; color: var(--hot); font: 400 13px var(--font-mono); background: var(--term); }
.dh-doc .cw { border: 1px solid var(--term-line); border-radius: var(--r-l); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.dh-doc .cw:focus-visible { outline: 2px solid var(--acc); }
.dh-doc .cw-file { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font: 400 12px var(--font-mono); color: var(--term-faint); background: var(--ch-22); padding: 9px 14px; }
.dh-doc .cw-path { color: var(--term-ink); overflow-wrap: anywhere; }
.dh-doc .cw-repo { color: var(--term-faint); }
.dh-doc .cw-code .ch-pre { height: calc(var(--rows) * 1.6 * 13px + 24px); }
.dh-doc .cw-notes { display: grid; padding: 14px 16px 10px; background: var(--surface); }
.dh-doc .cw-note { grid-area: 1 / 1; display: flex; align-items: flex-start; font-size: var(--fs-s); line-height: 1.5; color: var(--ink-2); opacity: 0; transition: opacity .25s; }
.dh-doc .cw-note.is-active { opacity: 1; }
.dh-doc .cw-nt { flex: 1 1 0; min-width: 0; }
.dh-doc .cw-note[aria-hidden="true"] { visibility: hidden; }
.dh-doc .ide { border: 1px solid var(--term-line); border-radius: var(--r-l); overflow: hidden; background: var(--term); box-shadow: var(--shadow-sm); color: var(--term-ink); }
.dh-doc .ide-chrome,
.dh-doc .term-chrome { display: flex; align-items: center; gap: 12px; background: var(--ch-22); padding: 9px 12px; border-bottom: 1px solid var(--term-line); }
.dh-doc .ide-title,
.dh-doc .term-title { font: 500 12px var(--font-mono); color: var(--term-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-doc .ide-body { display: grid; grid-template-columns: minmax(150px, 30%) minmax(0, 1fr); height: calc(var(--rows) * 1.6 * 13px + 96px); }
.dh-doc .ide-side { border-right: 1px solid var(--term-line); overflow: auto; background: var(--term-2); padding-bottom: 8px; }
.dh-doc .ide-side-head { font: 600 11px var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--term-faint); padding: 10px 12px 6px; }
.dh-doc .ide-side ul,
.dh-doc .fx-list { list-style: none; margin: 0; padding: 0; }
.dh-doc .ide-row { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; color: var(--term-ink); font: 400 12.5px var(--font-mono); padding: 4px 10px 4px calc(10px + var(--d) * 14px); cursor: pointer; text-align: left; white-space: nowrap; }
.dh-doc .ide-row:hover { background: rgba(127,135,255,.12); }
.dh-doc .ide-row.is-cur { background: rgba(127,135,255,.26); }
.dh-doc .ide-name { overflow: hidden; text-overflow: ellipsis; }
.dh-doc .ide-badge { margin-left: auto; }
.dh-doc .ide-main { display: flex; flex-direction: column; min-width: 0; }
.dh-doc .ide-tabs { display: flex; overflow-x: auto; background: var(--ch-22); border-bottom: 1px solid var(--term-line); scrollbar-width: thin; }
.dh-doc .ide-tab { display: inline-flex; align-items: center; border-right: 1px solid var(--term-line); }
.dh-doc .ide-tab button { border: 0; background: none; color: var(--term-faint); font: 400 12.5px var(--font-mono); padding: 8px 10px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.dh-doc .ide-tab.is-cur { background: var(--term); box-shadow: inset 0 2px var(--acc); }
.dh-doc .ide-tab.is-cur button { color: var(--term-ink); }
.dh-doc .ide-x { padding: 4px 8px !important; }
.dh-doc .ide-crumbs { font: 400 11.5px var(--font-mono); color: var(--term-faint); padding: 6px 14px; border-bottom: 1px solid var(--term-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dh-doc .ide-code { flex: 1; min-height: 0; }
.dh-doc .ide-code .ch-pre { height: 100%; }
.dh-doc .ide-steps { background: var(--surface); color: var(--ink-2); border-top: 1px solid var(--term-line); }
.dh-doc .ide-step-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px 0; font-size: var(--fs-s); color: var(--ink); min-height: 40px; }
.dh-doc .seg { margin-left: auto; display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-pill); overflow: hidden; }
.dh-doc .seg button { border: 0; background: var(--surface); color: var(--muted); font: 500 12px var(--font-sans); padding: 5px 12px; cursor: pointer; }
.dh-doc .seg button[aria-pressed="true"] { background: var(--acc-soft); color: var(--acc-ink); }
.dh-doc .ide-drawer { display: none; }
@media (max-width: 640px) {
.dh-doc .ide-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: auto; }
.dh-doc .ide-side { max-height: 144px; border-right: 0; border-bottom: 1px solid var(--term-line); }
.dh-doc .ide-side.is-shut { display: none; }
.dh-doc .ide-side-head { display: none; }
.dh-doc .ide-row { min-height: 36px; font-size: 14px; }
.dh-doc .ide-code .ch-pre { font-size: 14px; line-height: 1.6; height: calc(max(var(--rows), 8) * 1.6 * 14px + 24px); max-height: 70vh; }
.dh-doc .ide-code .ch-ln { width: 2.6em; padding-right: .8em; }
.dh-doc .ide-crumbs { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 4px 10px; min-height: 36px; }
.dh-doc .ide-crumbs > span { overflow: hidden; text-overflow: ellipsis; }
.dh-doc .ide-drawer { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 28px; padding: 3px 10px; border: 1px solid var(--term-line); border-radius: var(--r-pill); background: var(--term-2); color: var(--term-ink); font: 500 12px var(--font-sans); cursor: pointer; }
.dh-doc .ide-drawer .chev { transform: rotate(0deg); }
.dh-doc .ide-drawer .chev.is-open { transform: rotate(90deg); }
}
.dh-doc .fi { flex: none; display: inline-grid; place-items: center; width: 16px; height: 14px; border-radius: 3px; font: 700 8px var(--font-mono); text-transform: uppercase; color: #fff; background: #6B7896; }
.dh-doc .fi-dir { background: none; width: 16px; height: 13px; position: relative; }
.dh-doc .fi-dir::before { content: ""; position: absolute; inset: 2px 0 0 0; border-radius: 2px 3px 3px 3px; background: #E8B04A; }
.dh-doc .fi-dir::after { content: ""; position: absolute; left: 0; top: 0; width: 7px; height: 4px; border-radius: 2px 2px 0 0; background: #E8B04A; }
.dh-doc .fi-dir.is-open::before { background: #F2C462; }
.dh-doc .fi[data-ext="ts"],
.dh-doc .fi[data-ext="tsx"] { background: #3178C6; }
.dh-doc .fi[data-ext="js"] { background: #C9A400; }
.dh-doc .fi[data-ext="json"] { background: #8A6D00; }
.dh-doc .fi[data-ext="md"] { background: #4B6BFB; }
.dh-doc .fi[data-ext="yaml"],
.dh-doc .fi[data-ext="yml"] { background: #CB2E6A; }
.dh-doc .fi[data-ext="go"] { background: #00A7D0; }
.dh-doc .fi[data-ext="rs"] { background: #B7410E; }
.dh-doc .fi[data-ext="py"] { background: #3A75A8; }
.dh-doc .fi[data-ext="cs"] { background: #6A3FB5; }
.dh-doc .fi[data-ext="txt"] { background: #6B7896; }
.dh-doc .chev { flex: none; width: 10px; height: 10px; position: relative; transition: transform .15s; }
.dh-doc .chev::before { content: ""; position: absolute; left: 2px; top: 1px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; width: 5px; height: 5px; transform: rotate(-45deg); opacity: .7; }
.dh-doc .chev.is-open { transform: rotate(90deg); }
.dh-doc .chev-none::before { display: none; }
.dh-doc .fx { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
.dh-doc .fx-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.dh-doc .fx-title { font: 600 11px var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dh-doc .fx-step { font-size: var(--fs-s); color: var(--ink); font-weight: 500; }
.dh-doc .fx-list { padding: 6px 0; min-height: calc(var(--rows) * 30px + 12px); }
.dh-doc .fx-row { display: flex; flex-wrap: wrap; align-items: center; padding-left: calc(8px + var(--d) * 18px); }
.dh-doc .fx-line { display: flex; align-items: center; gap: 6px; border: 0; background: none; font: 400 13px var(--font-mono); color: var(--ink); padding: 5px 8px; cursor: default; text-align: left; border-radius: 6px; min-height: 28px; }
.dh-doc button.fx-line { cursor: pointer; }
.dh-doc button.fx-line:hover { background: var(--surface-2); }
.dh-doc .fx-name { overflow-wrap: anywhere; }
.dh-doc .fx-badge { display: inline-flex; align-items: center; gap: 4px; font: 600 11px var(--font-sans); text-transform: uppercase; letter-spacing: .04em; padding: 1px 7px; border-radius: var(--r-pill); margin-left: 4px; }
.dh-doc .fx-badge b { font: 700 11px var(--font-mono); color: inherit; }
.dh-doc .b-new { background: var(--good-soft); color: var(--good-ink); }
.dh-doc .b-changed { background: var(--warn-soft); color: var(--warn-ink); }
.dh-doc .b-removed { background: var(--bad-soft); color: var(--bad-ink); }
.dh-doc .b-generated { background: var(--info-soft); color: var(--info-ink); }
.dh-doc .b-conflict { background: var(--hot-soft); color: var(--hot); }
.dh-doc .fx-row.is-removed { background: color-mix(in srgb, var(--bad-soft) 55%, transparent); }
.dh-doc .fx-row.is-removed .fx-name { text-decoration: line-through; color: var(--muted); }
.dh-doc .fx-note { color: var(--muted); font-size: var(--fs-xs); padding: 0 8px 4px 46px; flex-basis: 100%; }
.dh-doc .fx-gap { color: var(--faint); font-style: italic; font-size: var(--fs-xs); gap: 8px; padding-top: 2px; padding-bottom: 4px; }
.dh-doc .fx-dots { font-style: normal; color: var(--muted); margin-left: 24px; letter-spacing: .1em; }
.dh-doc .fx-row.is-new { animation: fx-in .5s var(--ease) both; background: color-mix(in srgb, var(--good-soft) 55%, transparent); }
@keyframes fx-in { from { opacity: 0; transform: translateX(-8px); } }
.dh-doc .term { border: 1px solid var(--term-line); border-radius: var(--r-l); overflow: hidden; background: var(--term); box-shadow: var(--shadow-sm); }
.dh-doc .term-body { font: 400 13.5px/1.65 var(--font-mono); color: var(--term-ink); padding: 12px 16px; height: calc(var(--rows) * 1.65 * 13.5px + 24px); overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.dh-doc .t-pr { color: #8FE3B0; margin-right: 1ch; font-weight: 600; }
.dh-doc .t-q { color: #FF8DBA; margin-right: 1ch; font-weight: 600; }
.dh-doc .t-ask { color: var(--term-ink); font-weight: 500; }
.dh-doc .t-ans { color: #9AD8FF; }
.dh-doc .t-out { color: var(--term-faint); }
.dh-doc .t-note,
.dh-doc .t-step { color: #8D9AB5; font-style: italic; }
.dh-doc .t-cur { display: inline-block; width: .6em; height: 1.15em; vertical-align: -.2em; background: var(--term-ink); margin-left: 1px; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.dh-doc .term .ctl,
.dh-doc .cw .ctl,
.dh-doc .stp .ctl,
.dh-doc .fx .ctl,
.dh-doc .ide-steps .ctl { border-top: 1px solid var(--line); }
.dh-doc .stp { border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.dh-doc .stp-head { font-weight: 600; color: var(--ink); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.dh-doc .stp-panel { padding: 14px 16px 4px; }
.dh-doc .stp-title { display: flex; align-items: center; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.dh-doc .stp-text { font-size: var(--fs-s); }
.dh-doc .stp-state tr.is-changed td { background: var(--good-soft); }
.dh-doc .chg { margin-left: 8px; font: 600 10px var(--font-sans); text-transform: uppercase; color: var(--good-ink); }
.dh-doc .chart { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.dh-doc .chart-title { font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.dh-doc .chart-canvas { position: relative; height: 280px; }
.dh-doc .chart-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dh-doc .cc { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--muted); }
.dh-doc .cc-label { font-weight: 500; color: var(--ink); }
.dh-doc .cc-slider { flex: 1 1 240px; }
.dh-doc .cc-slider input { flex: 1; accent-color: var(--acc); min-width: 80px; }
.dh-doc .cc-val { font: 600 13px var(--font-mono); color: var(--acc-ink); min-width: 2.4em; text-align: right; }
.dh-doc .cc select { font: 500 13px var(--font-sans); border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 8px; background: var(--surface); color: var(--ink); }
.dh-doc .dh-keys { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; vertical-align: baseline; }
.dh-doc .dh-chord { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.dh-doc .dh-plus { color: var(--faint); font-size: .8em; }
.dh-doc .dh-then { color: var(--muted); font-size: .78em; font-style: italic; }
.dh-doc .dh-mouse { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.dh-doc .callout-important { border-color: var(--acc); background: var(--acc-softer, var(--info-soft)); }
.dh-doc .callout-important .callout-icon { background: var(--acc); }
.dh-doc .callout-security { border-color: var(--bad, #c0392b); background: var(--bad-soft); }
.dh-doc .callout-security .callout-icon { background: transparent; font-size: 16px; }
.dh-doc .toc-block { margin: 20px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 16px; }
.dh-doc .toc-block ol { list-style: none; margin: 6px 0 0; padding: 0; }
.dh-doc .toc-block li a { display: block; padding: 3px 10px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; font-size: var(--fs-s); }
.dh-doc .toc-block li a:hover { color: var(--acc-ink); border-left-color: var(--acc); }
.dh-doc .toc-block li.toc-3 a { padding-left: 22px; }
.dh-doc .toc-block li.toc-4 a { padding-left: 34px; }
.dh-doc .toc-section { border-style: dashed; }
.dh-doc .llm-note { font-size: var(--fs-xs); color: var(--faint); margin: 8px 0 4px; }
.dh-doc .pane-llm { max-height: 24rem; overflow: auto; }
.dh-doc .three-h { margin-top: 0; font-size: var(--fs-xl); }
.dh-doc .pane-src .ch-pre { padding: 12px 14px; border-radius: var(--r-m); max-height: 24rem; }
.dh-doc .pane-src { border: 1px solid var(--term-line); border-radius: var(--r-m); overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
.dh-doc .t-cur { animation: none; }
.dh-doc .s2-actor,
.dh-doc .ch-line,
.dh-doc .cw-note,
.dh-doc .s2 .ptr { transition: none !important; }
}
@media (max-width: 520px) {
.dh-doc .ctl { gap: 6px; padding: 8px; }
.dh-doc .btn { padding: 7px 10px; }
.dh-doc .btn-play { min-width: 5.4em; }
.dh-doc .ctl-count { min-width: 0; }
.dh-doc .chart-canvas { height: 240px; }
}
.dh-doc .ch-pre:has(.ch-focus) .ch-row:not(:has(.ch-focus)) { opacity: .6; transition: opacity .3s; }
.dh-doc .ch-focus { background: var(--ch-17); box-shadow: inset 4px 0 var(--acc); }
.dh-doc .ch-row:has(.ch-focus) .ch-ln { color: var(--term-ink); font-weight: 600; }
.dh-doc .dh-mouse { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; }
.dh-doc .dh-mouse-act { font-weight: 600; color: var(--acc-ink); }
.dh-doc .dh-mouse-icon { flex: none; width: auto; height: 2.6em; margin: -.3em 0; vertical-align: middle; overflow: visible; }
.dh-doc .dh-mouse-icon .mb { fill: none; stroke: var(--ink-2); stroke-width: 1.5; }
.dh-doc .dh-mouse-icon .ml { stroke: var(--ink-2); stroke-width: 1.2; }
.dh-doc .dh-mouse-icon .mo { fill: var(--surface); }
.dh-doc .dh-mouse-icon .mp { fill: var(--acc); }
.dh-doc .dh-mouse-icon .mw { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.1; }
.dh-doc .dh-mouse-icon .mw.mp { fill: var(--acc); stroke: var(--acc); }
.dh-doc .dh-mouse-icon .mbadge { fill: var(--hot); }
.dh-doc .dh-mouse-icon .mbadge-t { fill: var(--on-acc); font: 700 10px var(--font-sans); }
.dh-doc .dh-mouse-icon .ma { stroke: var(--acc); fill: var(--acc); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dh-doc .dh-mouse-icon path.ma[fill="none"] { fill: none; }
.dh-doc .callout-icon svg { width: 14px; height: 14px; display: block; }
.dh-doc .callout-security { border-color: var(--bad); background: var(--bad-soft); }
.dh-doc .callout-security .callout-icon { background: var(--bad); }
.dh-doc .callout-label { font-weight: 600; }
.dh-doc .ide-crumbs { display: flex; align-items: center; gap: 8px; }
.dh-doc .ide-step-t { flex: 1; }
.dh-doc .anim-cap { display: flex; align-items: flex-start; padding: 12px 16px 6px; font-size: var(--fs-s); color: var(--ink); min-height: calc(2 * 1.5em + 18px); line-height: 1.5; border-top: 1px solid var(--line); }
.dh-doc .ctl-count { white-space: nowrap; flex: none; }
@media (max-width: 480px) {
.dh-doc .ctl { flex-wrap: wrap; row-gap: 8px; }
.dh-doc .ctl .ctl-mid { order: -1; flex: 1 0 100%; }
.dh-doc .ctl > .btn:last-child { margin-left: auto; }
}
.dh-doc .scn { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
.dh-doc .scn:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.dh-doc .scn-stage { position: relative; width: 100%; aspect-ratio: var(--ar); min-height: 260px; max-height: 70vh; background: var(--surface-2); background-image: radial-gradient(circle, color-mix(in srgb, var(--line-2) 45%, transparent) 1px, transparent 1.2px); background-size: 22px 22px; overflow: hidden; }
.dh-doc .scn-svg { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; font-family: var(--font-sans); user-select: none; -webkit-user-select: none; }
.dh-doc .scn-svg:active { cursor: grabbing; }
.dh-doc .scn-ent { cursor: pointer; }
.dh-doc .scn-shape { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.25; }
.dh-doc .scn-line { fill: none; stroke: var(--line-2); stroke-width: 1.2; }
.dh-doc .scn-label { fill: var(--ink); font-size: 13px; font-weight: 500; pointer-events: none; letter-spacing: -.005em; }
.dh-doc .scn-text { font-weight: 400; fill: var(--ink-2); }
.dh-doc .scn-frame { fill: color-mix(in srgb, var(--surface) 82%, var(--surface-2)); stroke: var(--line); stroke-width: 1; }
.dh-doc .scn-frame.d-1 { fill: var(--surface-2); }
.dh-doc .scn-open { fill: none; stroke-width: 2; }
.dh-doc .scn-head { fill: var(--ink); font-size: 12px; font-weight: 600; letter-spacing: .01em; pointer-events: none; }
.dh-doc .scn-th { fill: var(--muted); font-size: 12px; font-weight: 600; }
.dh-doc .scn-row { stroke-width: 1; }
.dh-doc .scn-bucket { fill: var(--surface); }
.dh-doc .scn-idx-cell { fill: var(--surface-3); stroke: var(--line-2); stroke-width: 1.2; }
.dh-doc .scn-idx { fill: var(--faint); font: 500 11px var(--font-mono); pointer-events: none; }
.dh-doc .scn-dot { fill: var(--acc); stroke: none; }
.dh-doc .tone-acc .scn-shape,
.dh-doc .tone-acc .scn-frame { fill: var(--acc-soft); stroke: var(--acc); }
.dh-doc .tone-good .scn-shape,
.dh-doc .tone-good .scn-frame { fill: var(--good-soft); stroke: var(--good); }
.dh-doc .tone-warn .scn-shape,
.dh-doc .tone-warn .scn-frame { fill: var(--warn-soft); stroke: var(--warn); }
.dh-doc .tone-hot .scn-shape,
.dh-doc .tone-hot .scn-frame { fill: var(--hot-soft); stroke: var(--hot); }
.dh-doc .tone-muted .scn-shape,
.dh-doc .tone-muted .scn-frame { fill: var(--surface-3); stroke: var(--line); }
.dh-doc .tone-muted .scn-label { fill: var(--faint); }
.dh-doc .is-dim { filter: saturate(.3); }
.dh-doc .is-dim > * { opacity: .45; }
.dh-doc .is-down > *:not(.scn-x) { opacity: .42; }
.dh-doc .scn-x { stroke: var(--bad); stroke-width: 2.6; stroke-linecap: round; fill: none; }
.dh-doc .scn-ring { fill: none; stroke: var(--acc); stroke-width: 2; opacity: .9; }
.dh-doc .hl-good .scn-ring { stroke: var(--good); }
.dh-doc .hl-warn .scn-ring { stroke: var(--warn); }
.dh-doc .hl-hot .scn-ring { stroke: var(--hot); }
.dh-doc .hl-muted .scn-ring { stroke: var(--line-2); }
.dh-doc .is-hl .scn-shape,
.dh-doc .is-hl .scn-frame { stroke-width: 2.4; }
.dh-doc .is-sel .scn-ring { stroke-dasharray: 5 4; }
.dh-doc .is-framed .scn-ring { stroke: color-mix(in srgb, var(--faint) 50%, var(--line-2)); stroke-width: 1.5; opacity: 1; }
.dh-doc .scn-ent:hover .scn-shape,
.dh-doc .scn-ent:hover .scn-frame { stroke: var(--acc); }
.dh-doc .scn-conn path { stroke: var(--muted); stroke-width: 1.6; fill: none; }
.dh-doc .scn-conn.is-dashed path { stroke-dasharray: 6 5; }
.dh-doc .scn-conn.is-implicit path { stroke: var(--line-2); }
.dh-doc .scn-mk path { fill: var(--muted); }
.dh-doc .scn-conn-l rect { fill: var(--surface); stroke: var(--line); }
.dh-doc .scn-conn-t { fill: var(--muted); font-size: 11px; font-weight: 500; }
.dh-doc .scn-chip { fill: var(--surface); stroke: color-mix(in srgb, var(--acc) 55%, var(--line)); stroke-width: 1; }
.dh-doc .scn-chip-dot { fill: var(--acc); }
.dh-doc .scn-chip-t { fill: var(--acc-ink); font-size: 11px; font-weight: 600; pointer-events: none; }
.dh-doc .scn-ptr { stroke: var(--hot); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dh-doc .scn-ptr-t { fill: var(--hot-ink); font: 600 11px var(--font-mono); }
.dh-doc .scn-send { pointer-events: none; }
.dh-doc .scn-send-dot { fill: var(--hot); }
.dh-doc .scn-send-halo { fill: color-mix(in srgb, var(--hot) 22%, transparent); }
.dh-doc .scn-send-chip rect { fill: var(--surface); stroke: color-mix(in srgb, var(--hot) 60%, var(--line)); stroke-width: 1; }
.dh-doc .scn-send-chip text { fill: var(--hot-ink); font-size: 11px; font-weight: 600; }
.dh-doc .scn-arrow { fill: none; stroke: var(--acc); stroke-width: 2.2; stroke-linecap: round; }
.dh-doc .scn-arrow-head { fill: var(--acc); }
.dh-doc .scn-arrow-l rect { fill: var(--acc-softer); stroke: color-mix(in srgb, var(--acc) 45%, var(--line)); stroke-width: 1; }
.dh-doc .scn-arrow-t { fill: var(--acc-ink); font-size: 11px; font-weight: 600; }
.dh-doc .scn-say path { fill: var(--surface); stroke: var(--acc); stroke-width: 1.2; }
.dh-doc .scn-say-t { fill: var(--acc-ink); font-size: 11.5px; font-weight: 600; }
.dh-doc .scn-person .scn-shape { fill: color-mix(in srgb, var(--surface) 70%, var(--line)); }
.dh-doc .tone-acc .scn-person .scn-shape { fill: var(--acc-soft); }
.dh-doc .tone-good .scn-person .scn-shape { fill: var(--good-soft); }
.dh-doc .tone-warn .scn-person .scn-shape { fill: var(--warn-soft); }
.dh-doc .tone-hot .scn-person .scn-shape { fill: var(--hot-soft); }
.dh-doc .cc-1 { --k: var(--c1); --k-soft: var(--c1-soft); --k-ink: var(--c1-ink); }
.dh-doc .cc-2 { --k: var(--c2); --k-soft: var(--c2-soft); --k-ink: var(--c2-ink); }
.dh-doc .cc-3 { --k: var(--c3); --k-soft: var(--c3-soft); --k-ink: var(--c3-ink); }
.dh-doc .cc-4 { --k: var(--c4); --k-soft: var(--c4-soft); --k-ink: var(--c4-ink); }
.dh-doc .cc-5 { --k: var(--c5); --k-soft: var(--c5-soft); --k-ink: var(--c5-ink); }
.dh-doc .cc-6 { --k: var(--c6); --k-soft: var(--c6-soft); --k-ink: var(--c6-ink); }
.dh-doc .cc-7 { --k: var(--c7); --k-soft: var(--c7-soft); --k-ink: var(--c7-ink); }
.dh-doc .cc-8 { --k: var(--c8); --k-soft: var(--c8-soft); --k-ink: var(--c8-ink); }
.dh-doc .scn-ent.cc .scn-shape { fill: var(--k-soft); stroke: var(--k); stroke-width: 1.5; }
.dh-doc .scn-ent.cc .scn-line { stroke: var(--k); }
.dh-doc .scn-ent.cc .scn-frame { fill: var(--k-soft); stroke: var(--k); stroke-width: 1.5; }
.dh-doc .scn-ent.cc.fill-none .scn-shape,
.dh-doc .scn-ent.cc.is-same .scn-shape,
.dh-doc .scn-ent.cc.fill-none .scn-frame,
.dh-doc .scn-ent.cc.is-same .scn-frame { fill: var(--surface); }
.dh-doc .scn-ent.cc .scn-person .scn-shape { fill: var(--k-soft); }
.dh-doc .scn-ent.cc.fill-none .scn-person .scn-shape { fill: var(--surface); }
.dh-doc .scn-ent.cc .scn-chip { stroke: var(--k); }
.dh-doc .scn-ent.cc .scn-chip-dot { fill: var(--k); }
.dh-doc .scn-ent.cc .scn-chip-t { fill: var(--k-ink); }
.dh-doc .scn-ent.k-token.tone-hot .scn-chip { stroke: var(--hot); fill: var(--hot-soft); }
.dh-doc .scn-ent.k-token.tone-hot .scn-chip-dot { fill: var(--hot); }
.dh-doc .scn-ent.k-token.tone-hot .scn-chip-t { fill: var(--hot-ink); }
.dh-doc .scn-ent.cc .scn-ptr { stroke: var(--k); }
.dh-doc .scn-ent.cc .scn-ptr-t { fill: var(--k-ink); }
.dh-doc .scn-conn.cc path { stroke: var(--k); stroke-width: 1.8; }
.dh-doc .scn-conn.cc .scn-conn-t { fill: var(--k-ink); }
.dh-doc .scn-mk.cc path { fill: var(--k); }
.dh-doc .scn-conn.cc .scn-conn-l rect { stroke: color-mix(in srgb, var(--k) 45%, transparent); }
.dh-doc .scn-send.cc .scn-arrow { stroke: var(--k); }
.dh-doc .scn-send.cc .scn-arrow-head,
.dh-doc .scn-send.cc .scn-send-dot { fill: var(--k); }
.dh-doc .scn-send.cc .scn-send-halo { fill: color-mix(in srgb, var(--k) 22%, transparent); }
.dh-doc .scn-send.cc .scn-send-chip rect { stroke: var(--k); }
.dh-doc .scn-send.cc .scn-send-chip text { fill: var(--k-ink); }
.dh-doc .scn-send.cc .scn-arrow-l rect { fill: var(--k-soft); stroke: var(--k); }
.dh-doc .scn-send.cc .scn-arrow-t { fill: var(--k-ink); }
.dh-doc .scn-legend { display: flex; flex-wrap: wrap; gap: 3px 12px; margin: 0; padding: 0; list-style: none; min-width: 0; flex: 1 1 auto; }
.dh-doc .scn-key { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--ink-2); }
.dh-doc .scn-key::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--k-soft); border: 1.5px solid var(--k); }
.dh-doc .scn3-l.k-token.cc { color: var(--k-ink); border-color: var(--k); }
.dh-doc .scn3-send.cc { color: var(--k-ink); border-color: var(--k); }
.dh-doc .scn3-arrow.cc { color: var(--k-ink); background: var(--k-soft); border-color: var(--k); }
.dh-doc .scn-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 42px; padding: 5px 8px 5px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.dh-doc .scn-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.dh-doc .scn-tools button { font: 600 15px var(--font-sans); min-width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.dh-doc .scn-tools button:hover { border-color: var(--acc); color: var(--acc-ink); }
.dh-doc .scn-fit svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dh-doc .scn-tools .scn-back { padding: 0 10px; font-size: 12.5px; background: var(--acc); color: var(--on-acc); border-color: var(--acc); white-space: nowrap; }
.dh-doc .scn-tools .scn-back:hover { color: var(--on-acc); filter: brightness(1.08); }
.dh-doc .scn-info { position: absolute; left: 10px; bottom: 10px; max-width: min(320px, calc(100% - 70px)); display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); font-size: 13px; color: var(--ink-2); }
.dh-doc .scn-info b { color: var(--ink); }
.dh-doc .scn-kind { font: 500 11px var(--font-mono); color: var(--faint); }
.dh-doc .scn-nonote { color: var(--faint); font-style: italic; }
.dh-doc .scn-hint { margin: 0; padding: 3px 6px 3px 14px; border-top: 1px solid var(--line); font-size: 11.5px; line-height: 1.45; color: var(--faint); background: var(--surface); display: flex; align-items: center; gap: 8px; }
.dh-doc .scn-hint-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dh-doc .scn-how { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 600 12px/1 inherit; cursor: pointer; padding: 0; }
.dh-doc .scn-how[aria-expanded="true"] { border-color: var(--acc); color: var(--ink); }
.dh-doc .scn-how-full { margin: 0; padding: 6px 14px 8px; font-size: 12px; line-height: 1.5; color: var(--muted); background: var(--surface); border-top: 1px dashed var(--line); }
.dh-doc .scn.is-active .scn-hint { color: var(--muted); }
.dh-doc .scn-stage:focus { outline: none; }
.dh-doc .scn.is-active .scn-stage { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--acc) 55%, transparent); }
.dh-doc .scn.is-active .scn-svg,
.dh-doc .scn.is-active .scn3 { touch-action: none; }
.dh-doc .scn-tools .scn-reset svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dh-doc .scn-tools button:disabled { opacity: .4; cursor: default; }
@media (max-width: 560px) {
.dh-doc .scn-stage { min-height: min(62svh, 360px); max-height: min(680px, 82svh); }
.dh-doc .scn-legend { order: 2; flex-basis: 100%; }
.dh-doc .scn-tools { margin-left: auto; }
}
@media (max-width: 560px) {
.dh-doc .scn { display: flex; flex-direction: column; width: var(--page-w, 100vw); max-width: var(--page-w, 100vw); margin-left: calc(-1 * var(--bleed-l, calc(50vw - 50% + var(--col-skew, 0px)))); margin-right: 0; border-radius: 0; border-inline: 0; box-shadow: none; }
.dh-doc .human { --col-skew: 10.5px; }
.dh-doc .scn > .scn-stage { order: -1; }
.dh-doc .scn-bar { border-bottom: 0; border-top: 1px solid var(--line); padding: 6px 8px 6px 14px; }
.dh-doc .scn-tools { gap: 6px; }
.dh-doc .scn-tools button { min-width: 40px; height: 40px; border-radius: 10px; }
.dh-doc .scn-tools .scn-back { padding: 0 12px; font-size: 13px; }
.dh-doc .scn-hint { font-size: 12px; }
.dh-doc .scn-how { width: 40px; height: 40px; }
.dh-doc .scn .scn3-l.is-cont.sz-s { font-size: 11px; }
}
@media (max-width: 520px) {
.dh-doc .human { --col-skew: 7.5px; }
}
.dh-doc .scn-more { position: absolute; inset: 0; pointer-events: none; }
.dh-doc .scn-more span { position: absolute; display: grid; place-items: center; color: var(--muted); }
.dh-doc .scn-more-l,
.dh-doc .scn-more-r { top: 0; bottom: 0; width: 24px; }
.dh-doc .scn-more-t,
.dh-doc .scn-more-b { left: 0; right: 0; height: 24px; }
.dh-doc .scn-more-l { left: 0; background: linear-gradient(to right, color-mix(in srgb, var(--ink) 12%, transparent), transparent); }
.dh-doc .scn-more-r { right: 0; background: linear-gradient(to left, color-mix(in srgb, var(--ink) 12%, transparent), transparent); }
.dh-doc .scn-more-t { top: 0; background: linear-gradient(to bottom, color-mix(in srgb, var(--ink) 12%, transparent), transparent); }
.dh-doc .scn-more-b { bottom: 0; background: linear-gradient(to top, color-mix(in srgb, var(--ink) 12%, transparent), transparent); }
.dh-doc .scn-more span::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 2px 2px 0 0; }
.dh-doc .scn-more-r::after { rotate: 45deg; margin-right: 3px; }
.dh-doc .scn-more-l::after { rotate: -135deg; margin-left: 3px; }
.dh-doc .scn-more-t::after { rotate: -45deg; margin-top: 3px; }
.dh-doc .scn-more-b::after { rotate: 135deg; margin-bottom: 3px; }
.dh-doc .scn-caps { display: grid; border-top: 1px solid var(--line); }
.dh-doc .scn-cap { grid-area: 1 / 1; display: flex; align-items: flex-start; padding: 12px 16px 6px; font-size: var(--fs-s); color: var(--ink); line-height: 1.5; opacity: 0; transition: opacity .25s; }
.dh-doc .scn-cap.is-active { opacity: 1; }
.dh-doc .scn-cap[aria-hidden="true"] { visibility: hidden; }
.dh-doc .scn-steps { border-top: 1px solid var(--line); font-size: var(--fs-s); }
.dh-doc .scn-steps summary { padding: 8px 16px; cursor: pointer; color: var(--muted); font-weight: 500; }
.dh-doc .scn-steps ol { margin: 0; padding: 0 16px 12px 40px; }
.dh-doc .scn-steps button { all: unset; display: block; text-align: left; cursor: pointer; color: var(--ink-2); line-height: 1.45; padding: 2px 0; }
.dh-doc .scn-steps button:hover { color: var(--acc-ink); text-decoration: underline; }
.dh-doc .scn-steps button.is-cur { color: var(--acc-ink); font-weight: 600; }
.dh-doc .scn-steps .scn-sub { border-left: 2px solid var(--acc-soft); margin: 2px 0 4px; }
.dh-doc .scn-steps .scn-sub ol { padding: 0 0 0 30px; }
.dh-doc .scn-where { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 9px; background: var(--acc-softer); color: var(--acc-ink); font-size: 12px; font-weight: 600; line-height: 18px; vertical-align: 1px; }
.dh-doc .scn-where-k { font-weight: 500; }
.dh-doc .ctl-mid { position: relative; }
.dh-doc .ctl-bands { position: absolute; left: 0; right: calc(3.6em + 10px); bottom: -3px; height: 3px; pointer-events: none; }
.dh-doc .ctl-band { position: absolute; top: 0; height: 3px; border-radius: 2px; background: var(--acc); opacity: .55; }
.dh-doc .ctl-band.d-2 { top: 4px; }
@media (max-width: 480px) {
.dh-doc .ctl-bands { right: calc(3.6em + 10px); }
}
.dh-doc .t-pr.t-root { color: var(--ch-5); }
.dh-doc .scn-band { fill: color-mix(in srgb, var(--surface-3) 45%, transparent); stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 4 4; }
.dh-doc .scn-band-t { fill: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; pointer-events: none; }
.dh-doc .k-layer:hover .scn-band { stroke: var(--acc); }
.dh-doc .scn-tools .scn-mode { font: 700 12px var(--font-sans); letter-spacing: .03em; background: var(--acc-softer); color: var(--acc-ink); border-color: color-mix(in srgb, var(--acc) 45%, var(--line-2)); }
.dh-doc .scn-tools .scn-mode[aria-pressed="true"] { background: var(--acc); color: var(--on-acc); border-color: var(--acc); }
.dh-doc .scn3 { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.dh-doc .scn3:active { cursor: grabbing; }
.dh-doc .scn3-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dh-doc .scn3-labels { position: absolute; inset: 0; z-index: 1; pointer-events: none; font-family: var(--font-sans); overflow: hidden; }
.dh-doc .scn-stage > .scn-info { z-index: 2; }
.dh-doc .scn3-labels > div { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; }
.dh-doc .scn3-l { translate: -50% -50%; font-size: 13px; line-height: 1.3; font-weight: 500; color: var(--ink); padding: 0 4px; text-shadow: 0 0 2px var(--surface), 0 0 4px var(--surface), 0 0 6px var(--surface); }
.dh-doc .scn3-labels > .scn3-l:not(.is-cont) { white-space: normal; width: max-content; text-align: center; }
.dh-doc .scn3-l.sz-s { font-size: 11px; }
.dh-doc .scn3-l.sz-l { font-size: 15px; }
.dh-doc .scn3-l.is-cont.sz-s { font-size: 11px; }
.dh-doc .scn3-l.is-cont.sz-l { font-size: 12.5px; }
.dh-doc .scn3-l.is-cont { translate: 0 -100%; background: none; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; padding: 0; text-shadow: 0 0 3px var(--surface), 0 0 3px var(--surface); }
.dh-doc .scn3-l.k-text { background: none; color: var(--ink-2); font-weight: 400; }
.dh-doc .scn3-l.k-token { translate: -50% -130%; background: var(--surface); color: var(--acc-ink); border: 1px solid color-mix(in srgb, var(--acc) 55%, var(--line)); font-weight: 600; font-size: 11px; padding: 0 7px; border-radius: 99px; text-shadow: none; }
.dh-doc .scn3-l.k-pointer { color: var(--hot-ink); font: 600 12px var(--font-mono); background: none; translate: -50% -110%; }
.dh-doc .scn3-l.tone-acc { color: var(--acc-ink); }
.dh-doc .scn3-l.tone-good { color: var(--good-ink); }
.dh-doc .scn3-l.tone-warn { color: var(--warn-ink); }
.dh-doc .scn3-l.tone-hot { color: var(--hot-ink); }
.dh-doc .scn3-l.tone-muted { color: var(--faint); }
.dh-doc .scn3-l.is-down { text-decoration: line-through; text-decoration-color: var(--bad); }
.dh-doc .scn3-l.is-hl,
.dh-doc .scn3-l.is-sel { color: var(--acc-ink); font-weight: 600; text-decoration: underline 2px color-mix(in srgb, var(--acc) 60%, transparent); text-underline-offset: 3px; }
.dh-doc .scn3-layer { translate: -100% -50%; font-size: 12px; font-weight: 600; color: var(--acc-ink); padding: 2px 9px; border-radius: 99px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--acc) 35%, var(--line)); }
.dh-doc .scn3-layer.is-on { background: var(--acc); color: var(--on-acc); border-color: var(--acc); }
.dh-doc .scn3-layer[data-off="b"],
.dh-doc .scn3-layer[data-off="t"] { border-style: dashed; }
.dh-doc .scn3-layer[data-off="b"]::before { content: "\2193\00a0"; }
.dh-doc .scn3-layer[data-off="t"]::before { content: "\2191\00a0"; }
.dh-doc .scn3-wire { translate: -50% -50%; font-size: 11px; font-weight: 500; color: var(--muted); padding: 1px 7px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); }
.dh-doc .scn3-send { translate: -50% -125%; font-size: 11px; font-weight: 600; color: var(--hot-ink); background: var(--surface); border: 1px solid color-mix(in srgb, var(--hot) 60%, var(--line)); padding: 0 7px; border-radius: 99px; }
.dh-doc .scn3-arrow { translate: -50% -100%; font-size: 11px; font-weight: 600; color: var(--acc-ink); background: var(--acc-softer); border: 1px solid color-mix(in srgb, var(--acc) 45%, var(--line)); padding: 1px 7px; border-radius: 9px; white-space: normal !important; width: max-content; max-width: 150px; text-align: center; }
.dh-doc .scn3-say { translate: -50% -100%; font-size: 11.5px; font-weight: 600; max-width: 210px; white-space: normal !important; width: max-content; text-align: center; color: var(--acc-ink); background: var(--surface); border: 1.4px solid var(--acc); padding: 3px 10px; border-radius: 9px; }
.dh-doc .scn3-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: var(--fs-s); }
.dh-doc .scn-meter-track { fill: var(--meter-track); stroke: var(--meter); stroke-width: 1; stroke-opacity: 0.55; }
.dh-doc .scn-meter-fill { fill: var(--meter); transition: none; }
.dh-doc .scn-stream-track { fill: none; stroke: color-mix(in srgb, var(--hot) 30%, transparent); stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; }
.dh-doc .scn-send.cc .scn-stream-track { stroke: color-mix(in srgb, var(--k) 40%, transparent); }
.dh-doc .scn-only3d { position: absolute; inset: 0; overflow: auto; padding: 14px 16px; font-size: 14px; line-height: 1.45; color: var(--ink); }
.dh-doc .scn-only3d p { margin: 0 0 8px; color: var(--muted); }
.dh-doc .scn-only3d ol { margin: 0; padding-left: 22px; }
.dh-doc .scn-only3d li + li { margin-top: 4px; }
.dh-doc .scn-only3d li.is-cur { font-weight: 600; color: var(--acc); }
.dh-doc .candle-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.dh-doc .candle-key .ck-item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.dh-doc .candle-key .ck { flex: none; display: inline-block; width: 10px; height: 16px; border-radius: 2px; border: 2px solid var(--good); background: var(--good-soft); }
.dh-doc .candle-key .ck-down { border-color: var(--bad); background: var(--bad); }
.dh-doc .fx-badge.b-own { background: var(--t-soft); color: var(--t-ink); box-shadow: inset 0 0 0 1px var(--t); }
.dh-doc .fx-key { list-style: none; margin: 0; padding: 8px 14px 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--muted); }
.dh-doc .fx-key li { display: inline-flex; align-items: center; gap: 6px; }
.dh-doc .t-pr.t-own { color: var(--t); }
.dh-doc .t-key { list-style: none; margin: 0; padding: 8px 14px; border-top: 1px solid var(--term-line); display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12px; color: var(--term-faint); }
.dh-doc .t-key li { display: inline-flex; align-items: baseline; gap: 6px; }
.dh-doc .t-key .t-pr { margin-right: 0; }
.dh-doc .t-key b { color: var(--term-ink); font-weight: 600; }
@media (max-width: 560px) {
.dh-doc .js .scn:not([data-live]) .scn-svg { visibility: hidden; }
}
.dh-doc .scn.is-whole .scn-stage,
.dh-doc .scn.is-still .scn-stage { min-height: 0; max-height: none; }
.dh-doc .scn-more-say { position: absolute; left: 50%; translate: -50% 0; bottom: 6px; max-width: calc(100% - 64px); padding: 2px 9px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-2); color: var(--ink); font: normal 11.5px/1.35 var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dh-doc .scn-more-say[data-side="t"] { bottom: auto; top: 6px; }
.dh-doc .scn-more-say[data-at="l"] { left: 30px; translate: none; }
.dh-doc .scn-more-say[data-at="r"] { left: auto; right: 30px; translate: none; }
.dh-doc .scn.is-swipe .scn-stage { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
.dh-doc .scn.is-swipe .scn-svg { width: var(--swipe-w); max-width: none; }
.dh-doc .scn.is-swipe .scn-stage[data-more="r"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.dh-doc .scn.is-swipe .scn-stage[data-more="l"] { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.dh-doc .scn.is-swipe .scn-stage[data-more="lr"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
.dh-doc .scn-swipe-more { margin: 4px 14px 8px; color: var(--muted); font-size: var(--fs-xs); }
.dh-doc .scn > .dh-static-steps details > summary { display: list-item; }
.dh-doc .scn.is-static .scn-stage { max-height: none; min-height: 0; }
.dh-doc .scn.is-static .scn-svg { touch-action: auto; cursor: default; }
.dh-doc .scn.is-fixed .scn-svg,
.dh-doc .scn.is-steady .scn-svg { touch-action: auto; cursor: default; }
.dh-doc .scn > .dh-static-steps { margin: 0; padding: 8px 14px 10px; border-top: 1px solid var(--line); background: var(--surface); }
@media print {
.dh-doc .scn .scn-stage { max-height: 85vh; min-height: 0; break-inside: avoid; }
.dh-doc .js .scn:not([data-live]) .scn-svg { visibility: visible; }
.dh-doc .scn.is-static .scn-stage.scn-stage { max-height: calc(100vh - 300px); }
}
.dh-doc .scn-chip-t { transition: opacity .25s var(--ease); }
.dh-doc .scn-chip-t.is-mute { opacity: 0 !important; }
.dh-doc .scn-cap .scn-zoomed { display: block; margin-top: 2px; font-style: normal; font-size: var(--fs-xs); color: var(--muted); }
.dh-doc .scn[data-wq] { container-type: inline-size; }
@media screen {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh240, var(--wh)); }
@container (min-width: 240px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh240, var(--wh)); }
}
@container (min-width: 256px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh256, var(--wh)); }
}
@container (min-width: 272px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh272, var(--wh)); }
}
@container (min-width: 288px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh288, var(--wh)); }
}
@container (min-width: 304px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh304, var(--wh)); }
}
@container (min-width: 320px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh320, var(--wh)); }
}
@container (min-width: 336px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh336, var(--wh)); }
}
@container (min-width: 352px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh352, var(--wh)); }
}
@container (min-width: 368px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh368, var(--wh)); }
}
@container (min-width: 384px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh384, var(--wh)); }
}
@container (min-width: 400px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh400, var(--wh)); }
}
@container (min-width: 416px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh416, var(--wh)); }
}
@container (min-width: 432px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh432, var(--wh)); }
}
@container (min-width: 448px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh448, var(--wh)); }
}
@container (min-width: 464px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh464, var(--wh)); }
}
@container (min-width: 480px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh480, var(--wh)); }
}
@container (min-width: 496px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh496, var(--wh)); }
}
@container (min-width: 512px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh512, var(--wh)); }
}
@container (min-width: 528px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh528, var(--wh)); }
}
@container (min-width: 544px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh544, var(--wh)); }
}
@container (min-width: 560px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh560, var(--wh)); }
}
@container (min-width: 576px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh576, var(--wh)); }
}
@container (min-width: 592px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh592, var(--wh)); }
}
@container (min-width: 608px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh608, var(--wh)); }
}
@container (min-width: 624px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh624, var(--wh)); }
}
@container (min-width: 640px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh640, var(--wh)); }
}
@container (min-width: 656px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh656, var(--wh)); }
}
@container (min-width: 672px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh672, var(--wh)); }
}
@container (min-width: 688px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh688, var(--wh)); }
}
@container (min-width: 704px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh704, var(--wh)); }
}
@container (min-width: 720px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh720, var(--wh)); }
}
@container (min-width: 736px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh736, var(--wh)); }
}
@container (min-width: 752px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh752, var(--wh)); }
}
@container (min-width: 768px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh768, var(--wh)); }
}
@container (min-width: 784px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh784, var(--wh)); }
}
@container (min-width: 800px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh800, var(--wh)); }
}
@container (min-width: 816px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh816, var(--wh)); }
}
@container (min-width: 832px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh832, var(--wh)); }
}
@container (min-width: 848px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh848, var(--wh)); }
}
@container (min-width: 864px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh864, var(--wh)); }
}
@container (min-width: 880px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh880, var(--wh)); }
}
@container (min-width: 896px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh896, var(--wh)); }
}
@container (min-width: 912px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh912, var(--wh)); }
}
@container (min-width: 928px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh928, var(--wh)); }
}
@container (min-width: 944px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh944, var(--wh)); }
}
@container (min-width: 960px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh960, var(--wh)); }
}
@container (min-width: 976px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh976, var(--wh)); }
}
@container (min-width: 992px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh992, var(--wh)); }
}
@container (min-width: 1008px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh1008, var(--wh)); }
}
@container (min-width: 1024px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh1024, var(--wh)); }
}
@container (min-width: 1040px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh1040, var(--wh)); }
}
@container (min-width: 1056px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh1056, var(--wh)); }
}
@container (min-width: 1072px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh1072, var(--wh)); }
}
@container (min-width: 1088px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh1088, var(--wh)); }
}
@container (min-width: 1104px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh1104, var(--wh)); }
}
@container (min-width: 1120px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh1120, var(--wh)); }
}
@container (min-width: 1136px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh1136, var(--wh)); }
}
@container (min-width: 1152px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh1152, var(--wh)); }
}
@container (min-width: 1168px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh1168, var(--wh)); }
}
@container (min-width: 1184px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh1184, var(--wh)); }
}
@container (min-width: 1200px) {
.dh-doc .scn[data-wq]:not(.is-swipe):not(.is-tall) > .scn-stage { height: var(--wh1200, var(--wh)); }
}
}
@media print {
.dh-doc .term .ctl,
.dh-doc .fx .ctl,
.dh-doc .ide .ctl,
.dh-doc .cw .ctl,
.dh-doc .term .btn-play { display: none !important; }
.dh-doc .term-body,
.dh-doc .ide-code .ch-pre,
.dh-doc .cw-code { height: auto !important; max-height: none !important; overflow: visible !important; }
.dh-doc .term,
.dh-doc .fx,
.dh-doc .ide,
.dh-doc .cw,
.dh-doc .dh-print-copy { break-inside: avoid; }
}
.dh-doc .scn[data-wa] { container-type: inline-size; }
@media screen {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar240, var(--ar)); }
@container (min-width: 240px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar240, var(--ar)); }
}
@container (min-width: 256px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar256, var(--ar)); }
}
@container (min-width: 272px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar272, var(--ar)); }
}
@container (min-width: 288px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar288, var(--ar)); }
}
@container (min-width: 304px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar304, var(--ar)); }
}
@container (min-width: 320px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar320, var(--ar)); }
}
@container (min-width: 336px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar336, var(--ar)); }
}
@container (min-width: 352px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar352, var(--ar)); }
}
@container (min-width: 368px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar368, var(--ar)); }
}
@container (min-width: 384px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar384, var(--ar)); }
}
@container (min-width: 400px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar400, var(--ar)); }
}
@container (min-width: 416px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar416, var(--ar)); }
}
@container (min-width: 432px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar432, var(--ar)); }
}
@container (min-width: 448px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar448, var(--ar)); }
}
@container (min-width: 464px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar464, var(--ar)); }
}
@container (min-width: 480px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar480, var(--ar)); }
}
@container (min-width: 496px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar496, var(--ar)); }
}
@container (min-width: 512px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar512, var(--ar)); }
}
@container (min-width: 528px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar528, var(--ar)); }
}
@container (min-width: 544px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar544, var(--ar)); }
}
@container (min-width: 560px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar560, var(--ar)); }
}
@container (min-width: 576px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar576, var(--ar)); }
}
@container (min-width: 592px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar592, var(--ar)); }
}
@container (min-width: 608px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar608, var(--ar)); }
}
@container (min-width: 624px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar624, var(--ar)); }
}
@container (min-width: 640px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar640, var(--ar)); }
}
@container (min-width: 656px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar656, var(--ar)); }
}
@container (min-width: 672px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar672, var(--ar)); }
}
@container (min-width: 688px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar688, var(--ar)); }
}
@container (min-width: 704px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar704, var(--ar)); }
}
@container (min-width: 720px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar720, var(--ar)); }
}
@container (min-width: 736px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar736, var(--ar)); }
}
@container (min-width: 752px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar752, var(--ar)); }
}
@container (min-width: 768px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar768, var(--ar)); }
}
@container (min-width: 784px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar784, var(--ar)); }
}
@container (min-width: 800px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar800, var(--ar)); }
}
@container (min-width: 816px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar816, var(--ar)); }
}
@container (min-width: 832px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar832, var(--ar)); }
}
@container (min-width: 848px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar848, var(--ar)); }
}
@container (min-width: 864px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar864, var(--ar)); }
}
@container (min-width: 880px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar880, var(--ar)); }
}
@container (min-width: 896px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar896, var(--ar)); }
}
@container (min-width: 912px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar912, var(--ar)); }
}
@container (min-width: 928px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar928, var(--ar)); }
}
@container (min-width: 944px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar944, var(--ar)); }
}
@container (min-width: 960px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar960, var(--ar)); }
}
@container (min-width: 976px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar976, var(--ar)); }
}
@container (min-width: 992px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar992, var(--ar)); }
}
@container (min-width: 1008px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar1008, var(--ar)); }
}
@container (min-width: 1024px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar1024, var(--ar)); }
}
@container (min-width: 1040px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar1040, var(--ar)); }
}
@container (min-width: 1056px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar1056, var(--ar)); }
}
@container (min-width: 1072px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar1072, var(--ar)); }
}
@container (min-width: 1088px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar1088, var(--ar)); }
}
@container (min-width: 1104px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar1104, var(--ar)); }
}
@container (min-width: 1120px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar1120, var(--ar)); }
}
@container (min-width: 1136px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar1136, var(--ar)); }
}
@container (min-width: 1152px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar1152, var(--ar)); }
}
@container (min-width: 1168px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar1168, var(--ar)); }
}
@container (min-width: 1184px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar1184, var(--ar)); }
}
@container (min-width: 1200px) {
.dh-doc .scn[data-wa] > .scn-stage { aspect-ratio: var(--ar1200, var(--ar)); }
}
}

/* ---- refs.css (scoped) ---- */
.dh-doc {
  --ref-chip-bg: var(--surface-2);
  --ref-chip-ink: var(--ink-2);
  --ref-chip-border: var(--line);
  --ref-type-ink: var(--muted);
  --ref-pending-bg: var(--info-soft);
  --ref-pending-ink: var(--info-ink);
  --ref-pending-border: var(--info);
  --ref-failed-bg: var(--warn-soft);
  --ref-failed-ink: var(--warn-ink);
  --ref-failed-border: var(--warn);
  --ref-refused-bg: var(--bad-soft);
  --ref-refused-ink: var(--bad-ink);
  --ref-refused-border: var(--bad);
  --ref-radius: var(--r-pill);
  --ref-card-radius: var(--r-s);
  --ref-card-pad: var(--s-3);
  --svg-max-h: 80vh;
  --ix-frame-border: var(--line);
  --ix-frame-radius: var(--r-m);
  --ix-off-chip: var(--surface-2);
  --ix-off-ink: var(--muted);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) {
    --ref-chip-bg: var(--surface-3);
    --ref-chip-border: var(--line-2);
    --ix-off-chip: var(--surface-3);
  }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] {
  --ref-chip-bg: var(--surface-3);
  --ref-chip-border: var(--line-2);
  --ix-off-chip: var(--surface-3);
}
.dh-doc .dh-xref {
  display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%;
  padding: 1px 9px; border: 1px solid var(--ref-chip-border); border-radius: var(--ref-radius);
  background: var(--ref-chip-bg); color: var(--ref-chip-ink); font-size: .92em; line-height: 1.5; vertical-align: baseline;
}
.dh-doc .dh-xref-type { font: 600 11px/1.2 var(--font-mono); color: var(--ref-type-ink); letter-spacing: .02em; }
.dh-doc .dh-xref-label { overflow-wrap: anywhere; min-width: 0; }
.dh-doc .dh-xref-state { font-size: 12px; font-weight: 600; }
.dh-doc .dh-xref[data-state="pending"] { border-style: dashed; border-color: var(--ref-pending-border); background: var(--ref-pending-bg); color: var(--ref-pending-ink); }
.dh-doc .dh-xref[data-state="failed"] { border-color: var(--ref-failed-border); background: var(--ref-failed-bg); color: var(--ref-failed-ink); }
.dh-doc .dh-xref[data-state="refused"] { border-color: var(--ref-refused-border); background: var(--ref-refused-bg); color: var(--ref-refused-ink); }
.dh-doc .dh-xref[data-state="pending"] .dh-xref-type,
.dh-doc .dh-xref[data-state="failed"] .dh-xref-type,
.dh-doc .dh-xref[data-state="refused"] .dh-xref-type { color: inherit; opacity: .8; }
.dh-doc .dh-xref-line { margin: var(--s-3) 0; }
.dh-doc .dh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dh-doc .dh-xref-card {
  display: flex; gap: var(--s-3); align-items: flex-start; margin: var(--s-4) 0; padding: var(--ref-card-pad);
  border: 1px solid var(--ref-pending-border); border-radius: var(--ref-card-radius);
  background: var(--ref-pending-bg); color: var(--ref-pending-ink); font-size: var(--fs-s); line-height: 1.45;
}
.dh-doc .dh-xref-card[data-state="pending"] { border-style: dashed; }
.dh-doc .dh-xref-card[data-state="failed"] { border-color: var(--ref-failed-border); background: var(--ref-failed-bg); color: var(--ref-failed-ink); }
.dh-doc .dh-xref-card .dh-xref-type { color: inherit; opacity: .8; }
.dh-doc .dh-xref-card .dh-xref-label { color: var(--ink); font-weight: var(--w-strong); }
.dh-doc .dh-xref-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dh-doc .dh-xref-note { overflow-wrap: anywhere; }
.dh-doc .dh-xref-mark { flex: none; width: 10px; height: 10px; margin-top: .4em; border-radius: 50%; background: currentColor; }
.dh-doc .dh-xref-card[data-state="pending"] .dh-xref-mark { animation: dh-ref-pulse 1.2s ease-in-out infinite; }
.dh-doc .dh-xref-card[data-state="failed"] .dh-xref-mark { border-radius: 2px; }
@keyframes dh-ref-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) {
.dh-doc .dh-xref-card[data-state="pending"] .dh-xref-mark { animation: none; }
}
.dh-doc .dh-svg { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); }
.dh-doc .dh-svg-img { display: block; max-width: 100%; height: auto; max-height: var(--svg-max-h); }
.dh-doc .dh-svg-title { font-size: var(--fs-xs); color: var(--muted); }
.dh-doc .dh-ix { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3); border: 1px solid var(--ix-frame-border); border-radius: var(--ix-frame-radius); min-width: 0; }
.dh-doc .dh-ix-title { font-weight: var(--w-strong); color: var(--ink); }
.dh-doc .dh-ix-frame { display: block; width: 100%; border: 0; background: transparent; }
.dh-doc .dh-ix-fallback > :first-child { margin-top: 0; }
.dh-doc .dh-ix-fallback > :last-child { margin-bottom: 0; }
.dh-doc .dh-ix-chip { align-self: flex-start; display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: var(--ix-off-chip); border: 1px solid var(--line); color: var(--ix-off-ink); font-size: 12px; }

/* ---- stage.css (scoped) ---- */
.dh-doc {
  --stg-bg: var(--surface); --stg-bar-bg: var(--surface-2); --stg-edge: var(--line); --stg-radius: 14px;
  --stg-line-w: 1.6px; --stg-line-hot-w: 2.2px; --stg-dim: .38; --stg-off-line: .92; --stg-thick: 2.4px; --stg-hot-w: 3.2px; --stg-halo: rgba(15, 23, 42, .28);
  --stg-dash: 6 4; --stg-fade: .25s; --stg-flow: 1.6s; --stg-gap: 10px; --stg-unknown: var(--muted);
  --stg-struck-fade: 1; --stg-struck-line: var(--bad); --stg-struck-w: 1.6px; --stg-cross-w: 2.6px; --stg-cross-fade: .6; --stg-corner-w: 3.6px;   
  --stg-note-line: var(--line); --stg-note-w: 1px; 
  --stg-max: 1180px; --stg-btn-bg: var(--surface); --stg-btn-edge: var(--line-2); --stg-step-on: var(--acc); --stg-step-on-bg: var(--acc-softer, var(--acc-soft));
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --stg-off-line: .92; --stg-dim: .45; --stg-halo: rgba(0, 0, 0, .6); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --stg-off-line: .92; --stg-dim: .45; --stg-halo: rgba(0, 0, 0, .6); }
.dh-doc { --stg-cell-line: #848EA6; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --stg-cell-line: #636F8E; }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --stg-cell-line: #636F8E; }
.dh-doc figure.part-animation:has(.stg) { --stg-want: min(var(--stg-max), 100vw - 32px); max-width: none; width: var(--stg-fig-w, max(100%, var(--stg-want))); margin-left: var(--stg-fig-ml, min(0px, 50% - var(--stg-want) / 2)); position: relative; z-index: 2; }
@media (min-width: 1240px) {
.dh-doc .page.has-side figure.part-animation:has(.stg) { margin-left: var(--stg-fig-ml, min(0px, 50% - var(--stg-want) / 2 - (15rem + 48px) / 2)); }
}
@media print {
.dh-doc figure.part-animation:has(.stg) { width: auto; margin-left: 0; }
}
.dh-doc .stg { background: var(--stg-bg); border: 1px solid var(--stg-edge); border-radius: var(--stg-radius); padding: var(--stg-gap) 0 calc(var(--stg-gap) + 2px); outline: none; }
.dh-doc .stg:focus-visible { box-shadow: 0 0 0 3px var(--acc-soft); border-color: var(--acc); }
.dh-doc .stg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 0 14px 6px; }
.dh-doc .stg-title { margin-right: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.dh-doc .stg-title b { font-weight: 600; font-size: 15px; color: var(--ink); }
.dh-doc .stg-note { font: 12px var(--font-mono); color: var(--ink-2); background: none; padding: 0; border: 0; }
.dh-doc .stg-ctl { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.dh-doc .stg-btn { min-width: 36px; min-height: 32px; border: 1px solid var(--stg-btn-edge); background: var(--stg-btn-bg); color: var(--ink); border-radius: 8px; padding: 2px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.dh-doc .stg-play { display: inline-grid; place-items: center; }
.dh-doc .stg-play > span { grid-area: 1 / 1; }
.dh-doc .stg-play > [aria-hidden="true"] { visibility: hidden; }
.dh-doc .stg-btn:disabled { opacity: .45; cursor: default; }
.dh-doc .stg-btn:focus-visible,
.dh-doc .stg-stepbtn:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.dh-doc .stg-count { font: 12px var(--font-mono); color: var(--muted); min-width: 3.5em; text-align: right; }
.dh-doc .stg-box-wrap { width: 100%; container: stgbox / inline-size; }
.dh-doc .stg-plan { width: 100%; }
.dh-doc .stg-svg { display: block; width: 100%; height: auto; overflow: visible; }
.dh-doc .stg-plan-ssr { display: none; }
@media not print {
.dh-doc .stg-plan-ssr[data-print] { display: none !important; }
}
@media print {
.dh-doc .stg-plan-ssr:not([data-print]) { display: none !important; }
.dh-doc .stg-plan-ssr[data-print] { display: block !important; }
}
.dh-doc .stg-plan-ssr[data-w="286"] { display: block; }
@container stgbox (min-width: 312px) {
.dh-doc .stg-plan-ssr[data-w="286"] { display: none; }
.dh-doc .stg-plan-ssr[data-w="312"] { display: block; }
}
@container stgbox (min-width: 326px) {
.dh-doc .stg-plan-ssr[data-w="312"] { display: none; }
.dh-doc .stg-plan-ssr[data-w="326"] { display: block; }
}
@container stgbox (min-width: 341px) {
.dh-doc .stg-plan-ssr[data-w="326"] { display: none; }
.dh-doc .stg-plan-ssr[data-w="341"] { display: block; }
}
@container stgbox (min-width: 356px) {
.dh-doc .stg-plan-ssr[data-w="341"] { display: none; }
.dh-doc .stg-plan-ssr[data-w="356"] { display: block; }
}
@container stgbox (min-width: 380px) {
.dh-doc .stg-plan-ssr[data-w="356"] { display: none; }
.dh-doc .stg-plan-ssr[data-w="380"] { display: block; }
}
@container stgbox (min-width: 415px) {
.dh-doc .stg-plan-ssr[data-w="380"] { display: none; }
.dh-doc .stg-plan-ssr[data-w="458"] { display: block; }
}
@container stgbox (min-width: 500px) {
.dh-doc .stg-plan-ssr[data-w="458"] { display: none; }
.dh-doc .stg-plan-ssr[data-w="551"] { display: block; }
}
@container stgbox (min-width: 602px) {
.dh-doc .stg-plan-ssr[data-w="551"] { display: none; }
.dh-doc .stg-plan-ssr[data-w="664"] { display: block; }
}
@container stgbox (min-width: 726px) {
.dh-doc .stg-plan-ssr[data-w="664"] { display: none; }
.dh-doc .stg-plan-ssr[data-w="800"] { display: block; }
}
@container stgbox (min-width: 877px) {
.dh-doc .stg-plan-ssr[data-w="800"] { display: none; }
.dh-doc .stg-plan-ssr[data-w="971"] { display: block; }
}
@container stgbox (min-width: 1065px) {
.dh-doc .stg-plan-ssr[data-w="971"] { display: none; }
.dh-doc .stg-plan-ssr[data-w="1178"] { display: block; }
}
@media (max-width: 720px) {
.dh-doc .stg-stepname { display: none; }
}
.dh-doc .stg-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 8px 14px 0; padding: 0; }
.dh-doc .stg-stepbtn { border: 1px solid var(--stg-btn-edge); background: var(--stg-btn-bg); color: var(--ink-2); border-radius: 999px; padding: 4px 11px; min-height: 30px; font: inherit; font-size: 12.5px; cursor: pointer; }
@media (max-width: 720px) {
.dh-doc .stg-stepbtn { min-height: 32px; justify-content: center; }
}
.dh-doc .stg-stepbtn[aria-current="step"] { border-color: var(--stg-step-on); background: var(--stg-step-on-bg); color: var(--ink); }
.dh-doc .stg-num { color: var(--acc-ink); font-weight: 600; }
.dh-doc .stg-cap { margin: 8px 14px 0; font-size: 15px; color: var(--ink-2); min-height: 1.5em; }
.dh-doc .stg-capbox { display: grid; }
.dh-doc .stg-capbox > .stg-cap { grid-area: 1 / 1; }
.dh-doc .stg-cap-room { visibility: hidden; }
@media screen and (max-width: 560px) {
.dh-doc .stg-foot { position: sticky; bottom: 0; z-index: 3; background: var(--stg-bg); box-shadow: 0 -1px 0 var(--stg-edge); }
}
.dh-doc .stg-over-msg { margin: 8px 14px 0; font-size: 14px; color: var(--ink-2); }
.dh-doc .stg-still { margin: 8px 14px 0; padding-left: 1.4em; font-size: 15px; color: var(--ink-2); }
.dh-doc .stg-still li + li { margin-top: 4px; }
.dh-doc .stg .dh-static-steps { margin: 8px 14px 0; }
.dh-doc .stg-i { transition: opacity var(--stg-fade); }
.dh-doc .stg-off { opacity: 0; visibility: hidden; }
.dh-doc .stg-dim { opacity: var(--stg-dim); }
.dh-doc .stg-glow { filter: drop-shadow(0 0 5px var(--acc)); }
.dh-doc .stg-glow-s { filter: drop-shadow(0 0 1.5px var(--acc)); }
.dh-doc .stg-box { stroke-width: 1.3px; }
.dh-doc .stg-box.stg-thick { stroke-width: var(--stg-thick); }
.dh-doc .stg-time-cell.stg-thick:not(.stg-hot) { stroke-width: 1.3px; }
.dh-doc .stg-box.stg-note-strip { stroke-width: var(--stg-note-w); }
.dh-doc .stg-t.stg-struck { opacity: var(--stg-struck-fade); }
.dh-doc .stg-struck-line { stroke: var(--stg-struck-line); stroke-width: var(--stg-struck-w); stroke-linecap: round; fill: none; }
.dh-doc .stg-corner-line { stroke: var(--stg-struck-line); stroke-width: var(--stg-corner-w); stroke-linecap: round; fill: none; }
.dh-doc .stg-cross-line { stroke: var(--stg-struck-line); stroke-width: var(--stg-cross-w); stroke-linecap: round; opacity: var(--stg-cross-fade); fill: none; }
.dh-doc .stg-box.stg-dash { stroke-dasharray: 4 4; }
.dh-doc .stg-box.stg-hot { stroke-width: var(--stg-hot-w); filter: drop-shadow(0 1px 5px var(--stg-halo)); }
.dh-doc .stg { --stg-font: var(--font-sans); --stg-title-weight: 500; --stg-fs-title: 13.5px; --stg-fs-body: 12.5px; --stg-fs-sub: 12px;
  --stg-fs-lane: 12.5px; --stg-fs-chip: 11.5px; --stg-fs-big: 21px; --stg-fs-mono: 12px; --stg-fs-small-b: 11.5px; }
.dh-doc .stg-t { font-family: var(--stg-font); }
.dh-doc .stg-f-title { font-size: var(--stg-fs-title); font-weight: var(--stg-title-weight); }
.dh-doc .stg-f-body { font-size: var(--stg-fs-body); }
.dh-doc .stg-f-sub { font-size: var(--stg-fs-sub); }
.dh-doc .stg-f-lane { font-size: var(--stg-fs-lane); font-weight: var(--stg-title-weight); }
.dh-doc .stg-t.stg-halo { paint-order: stroke; stroke: var(--stg-bg); stroke-width: 5px; stroke-linejoin: round; }
.dh-doc .stg-f-chip { font-size: var(--stg-fs-chip); font-weight: 500; }
.dh-doc .stg-f-big { font-size: var(--stg-fs-big); font-weight: 600; }
.dh-doc .stg-f-mono { font: var(--stg-fs-mono) var(--font-mono); text-rendering: geometricPrecision; }
.dh-doc .stg-f-small-b { font-size: var(--stg-fs-small-b); font-weight: 600; }
.dh-doc .stg { --stg-phone-title: 12.5px; --stg-phone-body: 11.5px; --stg-phone-sub: 11px; --stg-phone-chip: 11px; }
.dh-doc .stg-phone .stg-f-title { font-size: var(--stg-phone-title); }
.dh-doc .stg-phone .stg-f-body { font-size: var(--stg-phone-body); }
.dh-doc .stg-phone .stg-f-sub { font-size: var(--stg-phone-sub); }
.dh-doc .stg-phone .stg-f-chip { font-size: var(--stg-phone-chip); }
.dh-doc .stg-badge-t { fill: var(--surface); }
.dh-doc .stg-strike { stroke-width: 1.2px; }
.dh-doc .stg-line { fill: none; stroke-width: var(--stg-line-w); }
.dh-doc .stg-conn .stg-line,
.dh-doc .stg-conn .stg-head { opacity: var(--stg-off-line); }
.dh-doc .stg-edge.stg-hot .stg-line { opacity: 1; stroke-width: var(--stg-line-hot-w); }
.dh-doc .stg-edge.stg-hot .stg-head { opacity: 1; }
.dh-doc .stg-edge.stg-dash .stg-line { stroke-dasharray: var(--stg-dash); }
.dh-doc .stg-dot { opacity: 0; animation: stg-go var(--stg-flow) ease-in-out 2 both; }
@keyframes stg-go { 0% { offset-distance: 0%; opacity: 0; } 15%, 85% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
.dh-doc .stg-dot { display: none; }
.dh-doc .stg-i { transition: none; }
}
.dh-doc .stg-static .stg-dot { display: none; }
@media print {
.dh-doc .stg-dot { display: none; }
.dh-doc .stg-i { transition: none; }
.dh-doc .stg { break-inside: avoid; max-width: var(--stg-max); margin-inline: auto; }
.dh-doc .stg-box-wrap { break-inside: avoid; break-before: avoid; }
.dh-doc .stg-bar { break-after: avoid; }
}
@media (max-width: 560px) {
.dh-doc .stg { padding: 6px 0 8px; }
.dh-doc .stg-bar { padding: 0 8px 4px; gap: 4px 8px; }
.dh-doc .stg-ctl { gap: 4px; }
.dh-doc .stg-btn { min-height: 32px; min-width: 34px; padding: 2px 8px; }
.dh-doc .stg-pause-symbol { display: none; }
.dh-doc .stg-steps { gap: 4px; margin: 4px 8px 0; }
.dh-doc .stg-cap { margin: 6px 8px 0; font-size: 14px; line-height: 1.4; }
.dh-doc .stg .dh-static-steps { margin: 6px 8px 0; }
.dh-doc .stg .stg-bar .stg-title b { font-size: 14px; }
.dh-doc .stg .stg-bar code.stg-note { font-size: 12px; line-height: 1.35; }
}
@media print {
.dh-doc .stg { display: flex; flex-direction: column; max-height: max(calc(100vh - 130px), var(--stg-need, 0px)); }
.dh-doc .stg .dh-static-steps { margin-top: 2px; line-height: 1.2; font-size: 11.5px; }
.dh-doc .stg-title b { font-size: 13px; }
.dh-doc .stg .dh-static-steps ol { margin-top: 2px; }
.dh-doc .stg-bar { padding-bottom: 0; }
.dh-doc .stg { padding-block: 4px 4px; }
.dh-doc .stg .sr-only { margin: 0; }
.dh-doc .stg .dh-static-steps details > summary { min-height: 0; }
.dh-doc .stg > * { flex: 0 0 auto; }
.dh-doc .stg > .stg-box-wrap { flex: 0 1 auto; min-height: var(--stg-boxmin, 0px); position: relative; }
.dh-doc .stg > .stg-box-wrap.stg-ratio > .stg-plan { position: absolute; inset: 0; }
.dh-doc .stg > .stg-box-wrap.stg-ratio .stg-svg { height: 100%; }
.dh-doc .stg > .stg-box-wrap.stg-ratio-print { aspect-ratio: var(--stg-ar); }
.dh-doc .stg > .stg-box-wrap.stg-ratio-print > .stg-plan-ssr[data-print] { position: absolute; inset: 0; }
.dh-doc .stg > .stg-box-wrap.stg-ratio-print > .stg-plan-ssr[data-print] .stg-svg { height: 100%; }
}
@media print and (orientation: landscape) {
.dh-doc .stg { --stg-z: max(1, min(calc(100vw / 720px), calc((100vh - 120px) / var(--stg-hint, 700px)))); zoom: var(--stg-z); width: 685px; max-height: max(calc((100vh - 120px) / var(--stg-z)), var(--stg-need, 0px)); }
}
.dh-doc .stg-svg[data-fills~="c0"] { --c0-soft: var(--stg-f0-l); --c0-plane: var(--stg-f0-l); }
.dh-doc .stg-svg[data-fills~="c1"] { --c1-soft: var(--stg-f1-l); --c1-plane: var(--stg-f1-l); }
.dh-doc .stg-svg[data-fills~="c2"] { --c2-soft: var(--stg-f2-l); --c2-plane: var(--stg-f2-l); }
.dh-doc .stg-svg[data-fills~="c3"] { --c3-soft: var(--stg-f3-l); --c3-plane: var(--stg-f3-l); }
.dh-doc .stg-svg[data-fills~="c4"] { --c4-soft: var(--stg-f4-l); --c4-plane: var(--stg-f4-l); }
.dh-doc .stg-svg[data-fills~="c5"] { --c5-soft: var(--stg-f5-l); --c5-plane: var(--stg-f5-l); }
.dh-doc .stg-svg[data-fills~="c6"] { --c6-soft: var(--stg-f6-l); --c6-plane: var(--stg-f6-l); }
.dh-doc .stg-svg[data-fills~="c7"] { --c7-soft: var(--stg-f7-l); --c7-plane: var(--stg-f7-l); }
.dh-doc .stg-svg[data-fills~="c8"] { --c8-soft: var(--stg-f8-l); --c8-plane: var(--stg-f8-l); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c0"] { --c0-soft: var(--stg-f0-d); --c0-plane: var(--stg-f0-d); }
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c1"] { --c1-soft: var(--stg-f1-d); --c1-plane: var(--stg-f1-d); }
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c2"] { --c2-soft: var(--stg-f2-d); --c2-plane: var(--stg-f2-d); }
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c3"] { --c3-soft: var(--stg-f3-d); --c3-plane: var(--stg-f3-d); }
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c4"] { --c4-soft: var(--stg-f4-d); --c4-plane: var(--stg-f4-d); }
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c5"] { --c5-soft: var(--stg-f5-d); --c5-plane: var(--stg-f5-d); }
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c6"] { --c6-soft: var(--stg-f6-d); --c6-plane: var(--stg-f6-d); }
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c7"] { --c7-soft: var(--stg-f7-d); --c7-plane: var(--stg-f7-d); }
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c8"] { --c8-soft: var(--stg-f8-d); --c8-plane: var(--stg-f8-d); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c0"],
.dh-doc[data-theme="dark"] .stg-svg[data-fills~="c0"] { --c0-soft: var(--stg-f0-d); --c0-plane: var(--stg-f0-d); }
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c1"],
.dh-doc[data-theme="dark"] .stg-svg[data-fills~="c1"] { --c1-soft: var(--stg-f1-d); --c1-plane: var(--stg-f1-d); }
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c2"],
.dh-doc[data-theme="dark"] .stg-svg[data-fills~="c2"] { --c2-soft: var(--stg-f2-d); --c2-plane: var(--stg-f2-d); }
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c3"],
.dh-doc[data-theme="dark"] .stg-svg[data-fills~="c3"] { --c3-soft: var(--stg-f3-d); --c3-plane: var(--stg-f3-d); }
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c4"],
.dh-doc[data-theme="dark"] .stg-svg[data-fills~="c4"] { --c4-soft: var(--stg-f4-d); --c4-plane: var(--stg-f4-d); }
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c5"],
.dh-doc[data-theme="dark"] .stg-svg[data-fills~="c5"] { --c5-soft: var(--stg-f5-d); --c5-plane: var(--stg-f5-d); }
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c6"],
.dh-doc[data-theme="dark"] .stg-svg[data-fills~="c6"] { --c6-soft: var(--stg-f6-d); --c6-plane: var(--stg-f6-d); }
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c7"],
.dh-doc[data-theme="dark"] .stg-svg[data-fills~="c7"] { --c7-soft: var(--stg-f7-d); --c7-plane: var(--stg-f7-d); }
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]) .stg-svg[data-fills~="c8"],
.dh-doc[data-theme="dark"] .stg-svg[data-fills~="c8"] { --c8-soft: var(--stg-f8-d); --c8-plane: var(--stg-f8-d); }

/* ---- tiers.css (scoped) ---- */
.dh-doc .tone-c1 { --t: var(--c1); --t-soft: var(--c1-soft); --t-ink: var(--c1-ink); }
.dh-doc .tone-c2 { --t: var(--c2); --t-soft: var(--c2-soft); --t-ink: var(--c2-ink); }
.dh-doc .tone-c3 { --t: var(--c3); --t-soft: var(--c3-soft); --t-ink: var(--c3-ink); }
.dh-doc .tone-c4 { --t: var(--c4); --t-soft: var(--c4-soft); --t-ink: var(--c4-ink); }
.dh-doc .tone-c5 { --t: var(--c5); --t-soft: var(--c5-soft); --t-ink: var(--c5-ink); }
.dh-doc .tone-c6 { --t: var(--c6); --t-soft: var(--c6-soft); --t-ink: var(--c6-ink); }
.dh-doc .tone-c7 { --t: var(--c7); --t-soft: var(--c7-soft); --t-ink: var(--c7-ink); }
.dh-doc .tone-c8 { --t: var(--c8); --t-soft: var(--c8-soft); --t-ink: var(--c8-ink); }
.dh-doc .tone-good { --t: var(--good); --t-soft: var(--good-soft); --t-ink: var(--good-ink); }
.dh-doc .tone-warn { --t: var(--warn); --t-soft: var(--warn-soft); --t-ink: var(--warn-ink); }
.dh-doc .tone-bad { --t: var(--bad); --t-soft: var(--bad-soft); --t-ink: var(--bad-ink); }
.dh-doc .dh-chip { position: relative; display: inline-block; max-width: 100%; padding: 4px 10px; border: 1.5px solid var(--t); border-radius: 14px; background: var(--surface); color: var(--ink); font: 500 var(--fs-xs)/1.3 var(--font-sans); overflow-wrap: anywhere; text-align: left; }
.dh-doc button.dh-chip { cursor: pointer; }
.dh-doc button.dh-chip:hover,
.dh-doc .dh-chip.is-on { background: var(--t-soft); }
.dh-doc button.dh-chip:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.dh-doc .dh-chip.has-note::after { content: ""; position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--t); border: 1.5px solid var(--surface); }
.dh-doc .dh-note { margin-top: 10px; min-height: 2.7em; padding: 8px 12px; border-radius: var(--r-s); background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.45; }
.dh-doc .dh-note b { color: var(--ink); font-weight: 600; }
.dh-doc .dh-note-hint { color: var(--muted); }
.dh-doc .tl,
.dh-doc .al { --t: var(--c1); --t-soft: var(--c1-soft); --t-ink: var(--c1-ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px; }
.dh-doc .tl-title,
.dh-doc .al-title { font-weight: 600; color: var(--ink); font-size: var(--fs-s); margin-bottom: 10px; }
.dh-doc .tl-row { display: grid; grid-template-columns: max(64px, min(calc(var(--lw) * 1.2 + 28px), 40%)) minmax(0, 1fr); margin-bottom: 6px; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.dh-doc .tl-row:last-of-type { margin-bottom: 0; }
.dh-doc .tl-label { display: flex; align-items: center; justify-content: center; padding: 8px 6px; border-right: 5px solid var(--t); background: var(--t-soft); color: var(--t-ink); font-weight: 600; font-size: var(--fs-m); line-height: 1.2; text-align: center; overflow-wrap: break-word; }
.dh-doc .tl-items { display: flex; flex-wrap: wrap; align-content: center; gap: 6px; min-height: 54px; padding: 8px 10px; background: var(--surface); }
.dh-doc .al-scroll { overflow-x: auto; padding: 12px 3px 3px; margin: -12px -3px -3px; }
.dh-doc .al-grid { display: grid; grid-template-columns: 84px repeat(var(--nx), minmax(0, 1fr)); gap: 4px; position: relative; }
.dh-doc .al-arrows .al-grid { grid-template-columns: 84px 14px repeat(var(--nx), minmax(0, 1fr)); }
.dh-doc .al-col { align-self: end; padding: 0 2px 2px; text-align: center; color: var(--ink-2); font-weight: 600; font-size: var(--fs-xs); line-height: 1.25; overflow-wrap: anywhere; }
.dh-doc .al-row { display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; text-align: right; color: var(--ink-2); font-weight: 600; font-size: var(--fs-xs); line-height: 1.25; overflow-wrap: anywhere; }
.dh-doc .al-cell { display: flex; flex-direction: column; gap: 6px; min-height: 84px; padding: 5px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-2); }
.dh-doc .al-more { margin: 6px 0 0; font: 500 12px var(--font-sans); color: var(--muted); }
.dh-doc .al-cell .dh-chip { padding-left: 8px; padding-right: 8px; }
.dh-doc .al-cell-label { color: var(--muted); font: 600 11px/1.25 var(--font-sans); letter-spacing: .04em; text-transform: uppercase; overflow-wrap: anywhere; }
.dh-doc .al-items { display: flex; flex-wrap: wrap; gap: 5px; }
.dh-doc .al-has-points .al-cell { min-height: calc(330px / var(--ny)); }
.dh-doc .al-plane { position: relative; margin: 14px; pointer-events: none; z-index: 2; }
.dh-doc .al-cell.al-tint { position: relative; z-index: 1; background: var(--t-soft); border-color: var(--t); }
.dh-doc .al-cell.al-tint .al-cell-label { color: var(--t-ink); }
.dh-doc .al-cell.in-region { background: transparent; border-color: transparent; z-index: 1; }
.dh-doc .al-cell.rg-top { padding-top: 15px; }
.dh-doc .al-region { position: relative; margin: -2px; border: 1.5px dashed var(--t); border-radius: var(--r-s); background: color-mix(in srgb, var(--t-soft) 70%, transparent); pointer-events: none; }
.dh-doc .al-region-label { z-index: 2; position: absolute; left: 10px; top: -10px; padding: 0 7px; border-radius: 9px; background: var(--t-soft); border: 1px solid var(--t); color: var(--t-ink); font: 600 12px/18px var(--font-sans); max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-doc .al-ax { position: relative; pointer-events: none; }
.dh-doc .al-ax-x { height: 16px; margin: 0 6px; }
.dh-doc .al-ax-x::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 2px; background: var(--faint); }
.dh-doc .al-ax-x::after { content: ""; position: absolute; right: -2px; top: -1px; border: 5px solid transparent; border-left: 8px solid var(--faint); border-right: 0; }
.dh-doc .al-ax-y { justify-self: center; width: 2px; background: var(--faint); margin: 6px 0; }
.dh-doc .al-ax-y::after { content: ""; position: absolute; bottom: -2px; left: -4px; border: 5px solid transparent; border-top: 8px solid var(--faint); border-bottom: 0; }
.dh-doc .al-pt { position: absolute; width: 0; height: 0; }
.dh-doc .al-dot { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--t); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--t); }
.dh-doc .al-link { display: none; position: absolute; left: 0; top: 0; height: 1.5px; margin-top: -.75px; background: var(--t); opacity: .55; transform-origin: 0 50%; }
.dh-doc .al-lab { position: absolute; left: 10px; top: 0; transform: translateY(-50%); width: max-content; max-width: min(170px, 46vw); pointer-events: auto; }
.dh-doc .al-flip .al-lab { left: auto; right: 10px; }
.dh-doc .al-lab .dh-chip { display: block; box-shadow: var(--shadow-sm); }
@media (max-width: 520px) {
.dh-doc .tl,
.dh-doc .al { padding: 10px; }
.dh-doc .tl-row { grid-template-columns: max(48px, min(calc(var(--lw) * 1.1 + 20px), 40%)) minmax(0, 1fr); }
.dh-doc .tl-label { font-size: var(--fs-s); padding: 6px 4px; border-right-width: 4px; }
.dh-doc .tl-items { padding: 7px 8px; gap: 5px; }
.dh-doc .dh-chip { font-size: 12px; padding: 4px 9px; }
.dh-doc .al-grid { grid-template-columns: 30px repeat(var(--nx), minmax(var(--colmin, 78px), 1fr)); gap: 3px; }
.dh-doc .al-col { font-size: 12px; }
.dh-doc .al-row { padding-right: 2px; font-size: 12px; justify-content: center; }
.dh-doc .al-row span { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; max-height: 100%; }
.dh-doc .al-cell { min-height: 72px; padding: 5px; gap: 4px; }
.dh-doc .al-cell { min-height: 84px; }
.dh-doc .dh-chip,
.dh-doc .al-cell .dh-chip { padding: 3px 7px; }
.dh-doc .al-has-points .al-cell { min-height: calc(400px / var(--ny)); }
.dh-doc .al-grid { min-width: calc(30px + var(--nx) * var(--colmin, 78px)); }
.dh-doc .al-arrows .al-grid { grid-template-columns: 30px 12px repeat(var(--nx), minmax(var(--colmin, 78px), 1fr)); min-width: calc(42px + var(--nx) * var(--colmin, 78px)); }
.dh-doc .al-ax-y { grid-column: 2; }
.dh-doc .al-plane { margin: 12px; }
.dh-doc .al-lab { max-width: min(150px, 44vw); }
}

/* ---- colours.css (scoped) ---- */
.dh-doc .cc-1 { --k-plane: var(--c1-plane); }
.dh-doc .cc-2 { --k-plane: var(--c2-plane); }
.dh-doc .cc-3 { --k-plane: var(--c3-plane); }
.dh-doc .cc-4 { --k-plane: var(--c4-plane); }
.dh-doc .cc-0 { --k: var(--c0); --k-soft: var(--c0-soft); --k-ink: var(--c0-ink); --k-plane: var(--c0-plane); }
.dh-doc .cc-5 { --k-plane: var(--c5-plane); }
.dh-doc .cc-6 { --k-plane: var(--c6-plane); }
.dh-doc .cc-7 { --k-plane: var(--c7-plane); }
.dh-doc .cc-8 { --k-plane: var(--c8-plane); }
.dh-doc .scn-ent.cc .scn-frame { fill: var(--k-soft); }
.dh-doc .scn-shape { stroke: var(--scn-edge); }
.dh-doc .scn-frame { stroke: var(--scn-frame-edge); }
.dh-doc .scn-band { stroke: var(--scn-band-edge); }
.dh-doc .tone-acc .scn-shape,
.dh-doc .tone-acc .scn-frame { stroke: var(--scn-acc-edge); }
.dh-doc .tone-good .scn-shape,
.dh-doc .tone-good .scn-frame { stroke: var(--scn-good-edge); }
.dh-doc .tone-warn .scn-shape,
.dh-doc .tone-warn .scn-frame { stroke: var(--scn-warn-edge); }
.dh-doc .tone-hot .scn-shape,
.dh-doc .tone-hot .scn-frame { stroke: var(--scn-hot-edge); }
.dh-doc .tone-muted .scn-shape,
.dh-doc .tone-muted .scn-frame { stroke: var(--scn-muted-edge); }
.dh-doc .scn-idx-cell { stroke: var(--scn-edge); }
.dh-doc { --state-border: var(--scn-edge); }
.dh-doc .scn-rec-edge,
.dh-doc .scn-rec-rule { stroke: var(--dg-node-border, var(--scn-edge)); }
.dh-doc .scn-rec-chip { stroke: var(--scn-edge); }
.dh-doc .scn-svg { --faint: var(--muted); --er-key-ink: var(--ink); }
.dh-doc .scn-ent.cc { --er-key-ink: var(--k-ink); }

/* ---- parts/kit/kit.css (scoped) ---- */
.dh-doc .dh-part-stage { container-type: inline-size; min-width: 0; }
.dh-doc .dh-dg { border: 1px solid var(--part-border, var(--line)); border-radius: var(--part-radius, var(--r-l)); background: var(--part-bg, var(--surface)); overflow: hidden; }
.dh-doc .dh-dg:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); }
.dh-doc .dh-box { overflow-x: auto; padding: 10px 8px 4px; }
.dh-doc .dh-inner { width: 100%; margin: 0 auto; }
.dh-doc .dh-svg { display: block; width: 100%; height: auto; font-family: var(--font-sans); font-size: 12px; fill: var(--ink); overflow: visible; }
.dh-doc .dh-svg text { fill: var(--ink); }
.dh-doc .dh-cap { padding-top: 6px; }
.dh-doc .dh-step-title { display: grid; flex: 1; min-width: 0; }
.dh-doc .dh-step-title > span { grid-area: 1 / 1; }
.dh-doc .dh-step-hidden { visibility: hidden; }
.dh-doc .dh-dg .ctl { border-top: 0; }
.dh-doc .dh-dg [tabindex]:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: 1px; }
@keyframes dh-fade { from { opacity: 0; } to { opacity: 1; } }
.dh-doc .dh-pop-host { position: relative; }
.dh-doc .dh-pop { position: absolute; z-index: 20; background: var(--pop-bg, var(--surface)); color: var(--pop-ink, var(--ink)); border: 1px solid var(--pop-border, var(--line-2)); border-radius: var(--pop-radius, var(--r-m)); box-shadow: var(--pop-shadow, var(--shadow-md)); padding: 10px 12px; font-size: var(--fs-s); line-height: 1.4; pointer-events: auto; }
.dh-doc .dh-pop-title { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.dh-doc .dh-pop-meta { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.dh-doc .dh-pop-text { margin-top: 6px; color: var(--ink-2); font-weight: 400; overflow-wrap: anywhere; }
.dh-doc .dh-pop-actions { display: flex; gap: 8px; margin-top: 8px; }
.dh-doc .dh-pop-act { min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font: 500 var(--fs-xs) var(--font-sans); cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.dh-doc .dh-pop-act:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: 2px; }
.dh-doc .dh-pop-sheet { left: 8px; right: 8px; bottom: 8px; top: auto; width: auto; }
.dh-doc .dh-pop-sheet .dh-pop-act { min-height: 40px; }
.dh-doc [data-dh-static] *,
.dh-doc [data-dh-static] *::before,
.dh-doc [data-dh-static] *::after { animation: none !important; transition: none !important; }
.dh-doc [data-dh-static] .ctl,
.dh-doc [data-dh-static] .btn-play { display: none !important; }
.dh-doc .dh-static-steps { margin: 8px 14px 10px; font-size: var(--fs-s); color: var(--muted); }
.dh-doc .dh-static-cap { margin: 0 0 4px; color: var(--ink); }
.dh-doc .dh-static-cap .cw-num { margin-right: 6px; }
.dh-doc .dh-static-steps details > summary { cursor: pointer; min-height: 24px; display: inline-flex; align-items: center; }
.dh-doc .dh-static-steps details > summary:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }
.dh-doc .dh-static-steps ol { margin: 4px 0 0; padding-left: 1.5em; }
.dh-doc .dh-static-steps li[aria-current] { color: var(--ink); font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
.dh-doc .dh-dg * { animation: none !important; transition: none !important; }
}
.dh-doc [data-dh-motion="off"] .dh-dg * { animation: none !important; transition: none !important; }
@media print {
.dh-doc .dh-dg .ctl,
.dh-doc .dh-dg .btn-play { display: none !important; }
.dh-doc .dh-box .dh-inner { min-width: 0 !important; }
.dh-doc .dh-static-steps details > summary { list-style: none; }
}

/* ---- parts/audio/style.css (scoped) ---- */
.dh-doc {
  --audio-bg: var(--surface);
  --audio-ink: var(--ink);
  --audio-wave: var(--line-2);
  --audio-played: var(--acc);
  --audio-played-2: var(--c4);
  --audio-playhead: var(--acc);
  --audio-buffer: var(--line);
  --audio-chapter-gap: 3px;
  --audio-marker: var(--bad);
  --audio-radius: var(--r-l);
  --audio-bar-w: 3px;
  --audio-bar-gap: 2px;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --audio-wave: color-mix(in oklab, var(--muted) 45%, var(--surface)); --audio-buffer: color-mix(in oklab, var(--muted) 25%, var(--surface)); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --audio-wave: color-mix(in oklab, var(--muted) 45%, var(--surface)); --audio-buffer: color-mix(in oklab, var(--muted) 25%, var(--surface)); }
.dh-doc .am { padding: var(--part-pad, var(--s-4)); border: 1px solid var(--part-border, var(--line)); border-radius: var(--audio-radius); background: var(--audio-bg); box-shadow: var(--part-shadow, var(--shadow-sm)); display: flex; flex-direction: column; gap: var(--part-gap, var(--s-3)); }
.dh-doc .am-top { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "play title" "play wave"; column-gap: var(--s-4); row-gap: 2px; align-items: center; }
.dh-doc .am-top .m-play { grid-area: play; }
.dh-doc .am-title { grid-area: title; display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.dh-doc .am-title b { font-weight: var(--w-strong); font-size: var(--fs-s); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-doc .am-sub { font-size: 13px; color: var(--muted); min-height: 1.25em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-doc .am-wavebox { grid-area: wave; position: relative; min-width: 0; }
.dh-doc .am-wave { position: relative; height: var(--audio-wave-h, 96px); cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; border-radius: var(--r-s); }
.dh-doc .am-wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dh-doc .am-time { display: flex; gap: 5px; margin-top: 2px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dh-doc .am-flag { position: absolute; top: -2px; transform: translateX(-4px); width: 24px; height: 28px; padding: 0; border: 0; background: none; color: var(--audio-marker); cursor: pointer; display: grid; place-items: center; z-index: 2; }
.dh-doc .am-flag.tone-acc { color: var(--acc); }
.dh-doc .am-flag.tone-good { color: var(--good); }
.dh-doc .am-flag.tone-warn { color: var(--warn); }
.dh-doc .am-flag.tone-bad { color: var(--bad); }
.dh-doc .am-flag.tone-muted { color: var(--muted); }
.dh-doc .am-flag.tone-c1 { color: var(--c1); }
.dh-doc .am-flag.tone-c2 { color: var(--c2); }
.dh-doc .am-flag.tone-c3 { color: var(--c3); }
.dh-doc .am-flag.tone-c4 { color: var(--c4); }
.dh-doc .am-flag.tone-c5 { color: var(--c5); }
.dh-doc .am-flag.tone-c6 { color: var(--c6); }
.dh-doc .am-flag.tone-c7 { color: var(--c7); }
.dh-doc .am-flag.tone-c8 { color: var(--c8); }
.dh-doc .am-flag svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.dh-doc .am-flag-tip { position: absolute; bottom: calc(100% + 2px); left: 0; z-index: 5; padding: 3px 9px; border-radius: var(--r-s); background: var(--ink); color: var(--surface); font-size: 12px; width: max-content; max-width: 12em; white-space: normal; opacity: 0; pointer-events: none; transform: translateY(3px); transition: opacity var(--dur-fast), transform var(--dur-fast); }
.dh-doc .am-flag.is-right .am-flag-tip { left: auto; right: -4px; }
.dh-doc .am-flag:hover .am-flag-tip,
.dh-doc .am-flag:focus-visible .am-flag-tip { opacity: 1; transform: none; }
.dh-doc .am-chapters { display: flex; flex-wrap: wrap; gap: 6px; }
.dh-doc .am-transcript { border-top: 1px solid var(--line); padding-top: var(--s-3); display: flex; flex-direction: column; gap: var(--s-2); }
.dh-doc .am-search { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }
.dh-doc .am-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink); height: 34px; outline: none; }
.dh-doc .am-search:focus-within { border-color: var(--acc); box-shadow: var(--ring); }
.dh-doc .am-count { font-size: 12.5px; white-space: nowrap; }
.dh-doc .am-lines { max-height: 236px; overflow: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; overscroll-behavior: contain; position: relative; }
.dh-doc .am-cue { flex: none; display: grid; grid-template-columns: 3.4em minmax(2.6em, auto) 1fr; gap: 8px; align-items: baseline; text-align: left; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-left: 3px solid transparent; border-radius: var(--r-s); background: none; cursor: pointer; font-size: 14.5px; line-height: 1.45; transition: background var(--dur-fast); }
.dh-doc .am-cue:hover { background: var(--surface-2); }
.dh-doc .am-cue.is-active { background: var(--acc-softer); border-left-color: var(--acc); }
.dh-doc .am-cue-t { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.dh-doc .am-cue-sp { font-weight: var(--w-strong); color: var(--acc-ink); }
.dh-doc .am-cue:not(:has(.am-cue-sp)) { grid-template-columns: 3.4em 1fr; }
.dh-doc .am-cue-x { color: var(--ink-2); }
.dh-doc .am-cue mark { background: var(--mark-bg); color: var(--mark-ink); border-radius: 3px; padding: 0 1px; }
.dh-doc .am-none { margin: 8px; color: var(--muted); font-size: 14px; }
.dh-doc .am.is-compact .am-top { grid-template-areas: "play wave"; }
.dh-doc .am.is-compact .am-wavebox { display: flex; align-items: center; gap: 10px; }
.dh-doc .am.is-compact .am-wave { flex: 1; min-width: 0; }
.dh-doc .am.is-compact .am-time { margin: 0; white-space: nowrap; }
.dh-doc .am.is-compact > .m-row { display: none; }
.dh-doc .am.is-compact { padding: var(--s-3); }
.dh-doc .am.is-compact .m-play { width: 44px; height: 44px; }
.dh-doc .am[data-tone="c1"] { --audio-played: var(--c1); --audio-played-2: var(--c1-ink); --audio-playhead: var(--c1); }
.dh-doc .am[data-tone="c2"] { --audio-played: var(--c2); --audio-played-2: var(--c2-ink); --audio-playhead: var(--c2); }
.dh-doc .am[data-tone="c3"] { --audio-played: var(--c3); --audio-played-2: var(--c3-ink); --audio-playhead: var(--c3); }
.dh-doc .am[data-tone="c4"] { --audio-played: var(--c4); --audio-played-2: var(--c4-ink); --audio-playhead: var(--c4); }
.dh-doc .am[data-tone="c5"] { --audio-played: var(--c5); --audio-played-2: var(--c5-ink); --audio-playhead: var(--c5); }
.dh-doc .am[data-tone="c6"] { --audio-played: var(--c6); --audio-played-2: var(--c6-ink); --audio-playhead: var(--c6); }
.dh-doc .am[data-tone="c7"] { --audio-played: var(--c7); --audio-played-2: var(--c7-ink); --audio-playhead: var(--c7); }
.dh-doc .am[data-tone="c8"] { --audio-played: var(--c8); --audio-played-2: var(--c8-ink); --audio-playhead: var(--c8); }
.dh-doc .am[data-tone="good"] { --audio-played: var(--good); --audio-played-2: var(--good-ink); --audio-playhead: var(--good); }
.dh-doc .am[data-tone="warn"] { --audio-played: var(--warn); --audio-played-2: var(--warn-ink); --audio-playhead: var(--warn); }
.dh-doc .am[data-tone="bad"] { --audio-played: var(--bad); --audio-played-2: var(--bad-ink); --audio-playhead: var(--bad); }
.dh-doc .am[data-tone="muted"] { --audio-played: var(--muted); --audio-played-2: var(--faint); --audio-playhead: var(--muted); }
.dh-doc .am[data-tone]:not([data-tone="acc"]) .m-play { background: linear-gradient(135deg, var(--audio-played), var(--audio-played-2)); box-shadow: 0 6px 18px color-mix(in oklab, var(--audio-played) 45%, transparent), inset 0 1px 0 rgba(255,255,255,.35); }
@media (max-width: 640px) {
.dh-doc .am { padding: var(--s-3); }
.dh-doc .am-top { column-gap: var(--s-3); }
.dh-doc .am-lines { max-height: 200px; }
.dh-doc .am-cue { grid-template-columns: 3.2em 1fr; }
.dh-doc .am-cue-sp { grid-column: 2; }
.dh-doc .am-cue .am-cue-x { grid-column: 2; }
}

/* ---- parts/calendar/style.css (scoped) ---- */
.dh-doc { --calendar-event-radius:6px; --calendar-hour-h:48px; --calendar-grid:var(--line); --calendar-weekend:var(--surface-2); --calendar-now:var(--hot); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) {--calendar-grid:var(--line);}
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] {--calendar-grid:var(--line);}
.dh-doc .pl-c1 { --calendar-colour: var(--c1); --calendar-colour-soft: var(--c1-soft); --calendar-colour-ink: var(--c1-ink); }
.dh-doc .pl-c2 { --calendar-colour: var(--c2); --calendar-colour-soft: var(--c2-soft); --calendar-colour-ink: var(--c2-ink); }
.dh-doc .pl-c3 { --calendar-colour: var(--c3); --calendar-colour-soft: var(--c3-soft); --calendar-colour-ink: var(--c3-ink); }
.dh-doc .pl-c4 { --calendar-colour: var(--c4); --calendar-colour-soft: var(--c4-soft); --calendar-colour-ink: var(--c4-ink); }
.dh-doc .pl-c5 { --calendar-colour: var(--c5); --calendar-colour-soft: var(--c5-soft); --calendar-colour-ink: var(--c5-ink); }
.dh-doc .pl-c6 { --calendar-colour: var(--c6); --calendar-colour-soft: var(--c6-soft); --calendar-colour-ink: var(--c6-ink); }
.dh-doc .pl-c7 { --calendar-colour: var(--c7); --calendar-colour-soft: var(--c7-soft); --calendar-colour-ink: var(--c7-ink); }
.dh-doc .pl-c8 { --calendar-colour: var(--c8); --calendar-colour-soft: var(--c8-soft); --calendar-colour-ink: var(--c8-ink); }
.dh-doc .pl-acc { --calendar-colour: var(--acc); --calendar-colour-soft: var(--acc-soft); --calendar-colour-ink: var(--acc-ink); }
.dh-doc .pl-good { --calendar-colour: var(--good); --calendar-colour-soft: var(--good-soft); --calendar-colour-ink: var(--good-ink); }
.dh-doc .pl-warn { --calendar-colour: var(--warn); --calendar-colour-soft: var(--warn-soft); --calendar-colour-ink: var(--warn-ink); }
.dh-doc .pl-bad { --calendar-colour: var(--bad); --calendar-colour-soft: var(--bad-soft); --calendar-colour-ink: var(--bad-ink); }
.dh-doc .pl-muted { --calendar-colour: var(--muted); --calendar-colour-soft: var(--surface-3); --calendar-colour-ink: var(--ink-2); }
.dh-doc .cal { position: relative; border: 1px solid var(--part-border, var(--line)); border-radius: var(--part-radius, var(--r-l)); background: var(--part-bg, var(--surface)); box-shadow: var(--part-shadow, var(--shadow-sm)); overflow: hidden; font-family: var(--font-sans); color: var(--ink); }
.dh-doc .cal:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: -3px; }
.dh-doc .cal-title-line { padding: 12px 16px 0; font-weight: 600; font-size: 15px; }
.dh-doc .cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; }
.dh-doc .cal-nav,
.dh-doc .cal-views { display: flex; gap: 6px; }
.dh-doc .cal-btn { min-height: var(--ctl-h, 40px); min-width: var(--ctl-h, 40px); padding: 0 14px; border-radius: var(--ctl-radius, var(--r-pill)); border: 1px solid var(--line-2); background: var(--ctl-bg, var(--surface)); color: var(--ctl-ink, var(--ink)); font: 500 14px var(--font-sans); cursor: pointer; }
.dh-doc .cal-btn:hover { border-color: var(--acc); color: var(--acc-ink); }
.dh-doc .cal-btn[aria-pressed="true"] { background: var(--acc-soft); color: var(--acc-ink); border-color: var(--acc); }
.dh-doc .cal-pick { position: relative; flex: 1 1 160px; min-width: 0; display: flex; align-items: center; min-height: var(--ctl-h, 40px); }
.dh-doc .cal-title { font: 600 17px/1.3 var(--font-sans); }
.dh-doc .cal-pick input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dh-doc .cal-pick input[type="date"]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.dh-doc .cal-pick:focus-within { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: 2px; border-radius: 6px; }
.dh-doc .cal-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 0 12px 8px; }
.dh-doc .cal-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.dh-doc .cal-chipbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--chip-radius, var(--r-pill)); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 500 13px var(--font-sans); cursor: pointer; }
.dh-doc .cal-chipbtn i { width: 10px; height: 10px; border-radius: 50%; background: var(--calendar-colour); }
.dh-doc .cal-chipbtn[aria-pressed="false"] { opacity: .55; text-decoration: line-through; }
.dh-doc .cal-chipbtn[aria-pressed="false"] i { background: transparent; border: 2px solid var(--calendar-colour); box-sizing: border-box; }
.dh-doc .cal-tz { font: 400 13px var(--font-sans); color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.dh-doc .cal-tz select { min-height: 32px; border-radius: var(--r-s); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 400 13px var(--font-sans); }
.dh-doc .cal-hint { margin: 0; padding: 6px 14px; font: 400 12px/1.4 var(--font-sans); color: var(--muted); border-top: 1px solid var(--line); }
.dh-doc .cal-tg { border-top: 1px solid var(--line); touch-action: pan-y; }
.dh-doc .cal-head,
.dh-doc .cal-band { display: grid; border-bottom: 1px solid var(--calendar-grid, var(--line)); }
.dh-doc .cal-dh { display: flex; flex-direction: column; align-items: center; padding: 6px 0 4px; min-width: 0; border-left: 1px solid var(--calendar-grid, var(--line)); }
.dh-doc .cal-dh.is-weekend { background: var(--calendar-weekend, var(--surface-2)); }
.dh-doc .cal-dow { font: 500 12px var(--font-sans); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dh-doc .cal-dnum { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font: 500 18px var(--font-sans); }
.dh-doc .cal-dh.is-today .cal-dnum,
.dh-doc .cal-cn.is-today { background: var(--acc); color: var(--on-acc); }
.dh-doc .cal-bl { font: 400 11px var(--font-sans); color: var(--muted); align-self: center; text-align: right; padding-right: 6px; }
.dh-doc .cal-bc { padding: 2px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--calendar-grid, var(--line)); min-width: 0; }
.dh-doc .cal-allday,
.dh-doc .cal-chip { display: block; width: 100%; box-sizing: border-box; border: 0; border-left: 3px solid var(--calendar-colour); background: var(--calendar-colour-soft); color: var(--ink); border-radius: var(--calendar-event-radius, 6px); padding: 2px 6px; text-align: left; font: 500 12px/1.3 var(--font-sans); min-height: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.dh-doc .cal-allday b,
.dh-doc .cal-chip b { font-weight: 500; }
.dh-doc .cal-allday.is-on,
.dh-doc .cal-chip.is-on,
.dh-doc .cal-ev.is-on { box-shadow: 0 0 0 2px var(--calendar-colour); }
.dh-doc .cal-scroll { height: min(var(--calendar-view-h, 420px), calc(24 * var(--calendar-hour-h, 48px))); overflow-y: auto; position: relative; overscroll-behavior: contain; }
.dh-doc .cal-body { display: grid; position: relative; }
.dh-doc .cal-hours { position: relative; }
.dh-doc .cal-hours .hour { position: absolute; right: 6px; transform: translateY(-50%); font: 400 11px var(--font-mono); color: var(--muted); }
.dh-doc .cal-col { position: relative; border-left: 1px solid var(--calendar-grid, var(--line)); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--calendar-hour-h, 48px) - 1px), var(--calendar-grid, var(--line)) calc(var(--calendar-hour-h, 48px) - 1px), var(--calendar-grid, var(--line)) var(--calendar-hour-h, 48px)); min-width: 0; }
.dh-doc .cal-col.is-weekend { background-color: var(--calendar-weekend, var(--surface-2)); }
.dh-doc .cal-ev { position: absolute; box-sizing: border-box; border: 0; border-left: 3px solid var(--calendar-colour); background: var(--calendar-colour-soft); color: var(--ink); border-radius: var(--calendar-event-radius, 6px); padding: 2px 5px; text-align: left; font: 400 12px/1.25 var(--font-sans); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; gap: 0; }
.dh-doc .cal-ev b,
.dh-doc .cal-ev span { flex: none; max-width: 100%; }
.dh-doc .cal-ev.is-short { flex-direction: row; align-items: baseline; gap: 6px; padding-top: 1px; padding-bottom: 1px; }
.dh-doc .cal-ev.is-short b { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; flex: 0 1 auto; min-width: 0; }
.dh-doc .cal-ev.is-narrow b { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.dh-doc .cal-ev.is-narrow span { display: none; }
.dh-doc .cal-ev b { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.dh-doc .cal-ev span { color: var(--ink-2); font-size: 11px; }
.dh-doc .cal-now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--calendar-now, var(--hot)); pointer-events: none; }
.dh-doc .cal-month { border-top: 1px solid var(--line); touch-action: pan-y; }
.dh-doc .cal-mh,
.dh-doc .cal-mg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dh-doc .cal-mh span { text-align: center; padding: 6px 0; font: 500 12px var(--font-sans); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dh-doc .cal-cell { min-height: 100px; min-width: 0; padding: 2px 3px 4px; border-top: 1px solid var(--calendar-grid, var(--line)); border-left: 1px solid var(--calendar-grid, var(--line)); }
.dh-doc .cal-cell:nth-child(7n + 1) { border-left: 0; }
.dh-doc .cal-cell.is-weekend { background: var(--calendar-weekend, var(--surface-2)); }
.dh-doc .cal-cell.is-out .cal-cn,
.dh-doc .cal-cell.is-out .cal-chip { opacity: .5; }
.dh-doc .cal-cell.is-cursor { background: var(--acc-softer); }
.dh-doc .cal-cn { width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; color: var(--ink); font: 500 13px var(--font-sans); cursor: pointer; padding: 0; }
.dh-doc .cal-chips { display: flex; flex-direction: column; gap: 2px; }
.dh-doc .cal-chip em { font-style: normal; color: var(--ink-2); font-size: 11px; }
.dh-doc .cal-more { border: 0; background: none; color: var(--acc-ink); font: 500 12px var(--font-sans); text-align: left; padding: 2px 4px; min-height: 24px; cursor: pointer; }
.dh-doc .cal-dots { display: flex; flex-wrap: wrap; gap: 3px; padding: 2px 4px; min-height: 10px; }
.dh-doc .cal-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--calendar-colour); }
.dh-doc .cal-daylist,
.dh-doc .cal-list { border-top: 1px solid var(--line); }
.dh-doc .cal-dl-h,
.dh-doc .cal-lh { margin: 0; padding: 10px 12px 4px; font: 600 14px var(--font-sans); }
.dh-doc .cal-lh.is-today { color: var(--acc-ink); }
.dh-doc .cal-row { display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 6px 12px; min-height: 44px; text-align: left; font: 400 14px var(--font-sans); color: var(--ink); cursor: pointer; }
.dh-doc .cal-row.is-on { background: var(--calendar-colour-soft); }
.dh-doc .cal-rbar { width: 4px; align-self: stretch; background: var(--calendar-colour); border-radius: 2px; flex: none; }
.dh-doc .cal-rt { flex: none; width: 7.2em; font: 400 12px var(--font-mono); color: var(--muted); }
.dh-doc .cal-rc { margin-left: auto; color: var(--muted); font-size: 12px; text-align: right; }
.dh-doc .cal-none { margin: 0; padding: 14px 12px; color: var(--muted); font-size: 14px; }
@container (max-width: 640px) {
.dh-doc .cal-bar { gap: 8px; }
.dh-doc .cal-pick { flex-basis: 100%; order: -1; }
.dh-doc .cal-views { flex: 1; }
.dh-doc .cal-views .cal-btn { flex: 1; padding: 0 6px; min-width: 0; }
.dh-doc .cal-cell { min-height: 56px; }
.dh-doc .cal-rt { width: 5.4em; }
.dh-doc .cal-rc { display: none; }
}
.dh-doc .cal :focus-visible {outline:var(--focus-ring,2px solid var(--acc));outline-offset:2px;}
.dh-doc .cal-static-list {list-style:none;margin:0;padding:0;display:grid;gap:12px}
.dh-doc .cal-static-list li {border-left:3px solid var(--calendar-colour);background:var(--calendar-colour-soft);padding:12px;display:grid;gap:4px;overflow-wrap:anywhere}
.dh-doc .cal-static-list strong {color:var(--calendar-colour)}
.dh-doc .cal-static-list p {margin:0}
.dh-doc .cal-static .cal-zone {font-size:12px;color:var(--muted)}
.dh-doc .cal-static {padding:12px}
.dh-doc .cal-static h3 {margin:0;font:600 15px/1.4 var(--font-sans)}
.dh-doc .cal-static-list {font:400 13px/1.5 var(--font-sans)}

/* ---- parts/chart-kinds/style.css (scoped) ---- */
.dh-doc {
  --chart-kinds-bar-radius: 4px; --chart-kinds-grid: var(--grid, var(--line)); --chart-kinds-axis: var(--axis, var(--line-2)); --chart-kinds-mark: var(--ink-2);
  --chart-kinds-box-fill: 22%; --chart-kinds-violin-fill: 30%; --chart-kinds-tile-gap: 2px; --chart-kinds-bar-fade: .52;
  --chart-kinds-cell-radius: 6px; --chart-kinds-empty: var(--surface-2); --chart-kinds-heat-lo: var(--surface-2);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --chart-kinds-box-fill: 30%; --chart-kinds-violin-fill: 38%; --chart-kinds-bar-fade: .62; }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --chart-kinds-box-fill: 30%; --chart-kinds-violin-fill: 38%; --chart-kinds-bar-fade: .62; }
.dh-doc .ck-t-c1 { --chart-kinds-tone: var(--c1); }
.dh-doc .ck-t-c2 { --chart-kinds-tone: var(--c2); }
.dh-doc .ck-t-c3 { --chart-kinds-tone: var(--c3); }
.dh-doc .ck-t-c4 { --chart-kinds-tone: var(--c4); }
.dh-doc .ck-t-c5 { --chart-kinds-tone: var(--c5); }
.dh-doc .ck-t-c6 { --chart-kinds-tone: var(--c6); }
.dh-doc .ck-t-c7 { --chart-kinds-tone: var(--c7); }
.dh-doc .ck-t-c8 { --chart-kinds-tone: var(--c8); }
.dh-doc .ck-t-acc { --chart-kinds-tone: var(--acc); }
.dh-doc .ck-t-good { --chart-kinds-tone: var(--good); }
.dh-doc .ck-t-warn { --chart-kinds-tone: var(--warn); }
.dh-doc .ck-t-bad { --chart-kinds-tone: var(--bad); }
.dh-doc .ck-t-muted { --chart-kinds-tone: var(--faint); }
.dh-doc .ck { padding: 4px 0; }
.dh-doc .ck-title { font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.dh-doc .ck-box { position: relative; max-width: 100%; overflow-x: auto; }
.dh-doc .ck .chart-table > summary { padding: 4px 0; min-height: 24px; cursor: pointer; }
.dh-doc .ck .ctl { margin-top: 8px; }
.dh-doc .ck .anim-cap { border-top: 0; padding-left: 0; padding-right: 0; }
.dh-doc .ck:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: 2px; }
.dh-doc .ck-hint { margin: 8px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.dh-doc .ck-svg { display: block; max-width: none; overflow: visible; font-family: var(--font-sans); }
.dh-doc .ck-svg:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: 4px; border-radius: 6px; }
.dh-doc .ck-grid { stroke: var(--chart-kinds-grid); stroke-width: 1; }
.dh-doc .ck-base { stroke: var(--chart-kinds-axis); stroke-width: 1.5; }
.dh-doc .ck-tick { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.dh-doc .ck-axis-title { fill: var(--ink-2); font-size: 12px; font-weight: 500; }
.dh-doc .ck-hit { fill: transparent; cursor: pointer; }
.dh-doc .ck-hit:hover { fill: color-mix(in oklab, var(--acc) 5%, transparent); }
.dh-doc .ck-pick { fill: transparent; pointer-events: none; }
.dh-doc .ck-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 6px 58px; font-size: var(--fs-xs); color: var(--ink-2); }
.dh-doc .ck-key { display: inline-flex; align-items: center; gap: 6px; }
.dh-doc .ck-key i { width: 12px; height: 12px; border-radius: 4px; background: var(--chart-kinds-tone); }
.dh-doc .ck-stop-a { stop-color: var(--chart-kinds-tone); stop-opacity: 1; }
.dh-doc .ck-stop-b { stop-color: var(--chart-kinds-tone); stop-opacity: var(--chart-kinds-bar-fade); }
.dh-doc .ck-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: ck-grow var(--dur-slow, 640ms) var(--ease, ease-out) both; }
@keyframes ck-grow { from { transform: scaleY(0); opacity: 0; } }
.dh-doc .ck-mark { cursor: pointer; outline: none; }
.dh-doc .ck-mark line { stroke: var(--chart-kinds-mark); stroke-width: 1.6; stroke-dasharray: 5 4; }
.dh-doc .ck-mark-hit { fill: transparent; }
.dh-doc .ck-chip { fill: var(--surface); stroke: var(--chart-kinds-mark); stroke-width: 1.2; }
.dh-doc .ck-chip-t { fill: var(--ink); font-size: 12px; font-weight: 600; }
.dh-doc .ck-mark:focus-visible .ck-chip,
.dh-doc .ck-mark:hover .ck-chip { fill: var(--acc-softer); stroke: var(--acc); }
.dh-doc .ck-mark:focus-visible line,
.dh-doc .ck-mark:hover line { stroke: var(--acc); }
.dh-doc .ck-bx,
.dh-doc .ck-viol { animation: ck-fade var(--dur-slow, 640ms) var(--ease, ease-out) both; }
@keyframes ck-fade { from { opacity: 0; transform: translateY(6px); } }
.dh-doc .ck-whisker,
.dh-doc .ck-cap { stroke: var(--chart-kinds-tone); stroke-width: 1.8; stroke-linecap: round; }
.dh-doc .ck-boxr { fill: color-mix(in oklab, var(--chart-kinds-tone) var(--chart-kinds-box-fill), var(--surface)); stroke: var(--chart-kinds-tone); stroke-width: 2; }
.dh-doc .ck-median { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.dh-doc .ck-mean { fill: var(--surface); stroke: var(--chart-kinds-tone); stroke-width: 1.6; }
.dh-doc .ck-out { fill: var(--surface); stroke: var(--chart-kinds-tone); stroke-width: 1.6; }
.dh-doc .ck-violin { fill: color-mix(in oklab, var(--chart-kinds-tone) var(--chart-kinds-violin-fill), var(--surface)); stroke: var(--chart-kinds-tone); stroke-width: 2; stroke-linejoin: round; }
.dh-doc .ck-ibox { fill: var(--chart-kinds-tone); }
.dh-doc .ck-median-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 1.4; }
.dh-doc .ck-stage { animation: ck-fade var(--dur-slow, 640ms) var(--ease, ease-out) both; }
.dh-doc .ck-fun { fill: color-mix(in oklab, var(--chart-kinds-tone) var(--chart-kinds-ramp, 100%), var(--surface)); stroke: color-mix(in oklab, var(--chart-kinds-tone) 60%, var(--surface)); stroke-width: 1; stroke-linejoin: round; }
.dh-doc .ck-st-name { fill: var(--ink); font-size: 14px; font-weight: 500; }
.dh-doc .ck-st-val { fill: var(--ink); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dh-doc .ck-fun-pct { fill: var(--ink); font-size: 13px; font-weight: 700; paint-order: stroke; stroke: color-mix(in oklab, var(--surface) 65%, transparent); stroke-width: 3px; stroke-linejoin: round; }
.dh-doc .ck-drop rect { fill: var(--bad-soft); }
.dh-doc .ck-drop text { fill: var(--bad-ink); font-size: 12px; font-weight: 600; }
.dh-doc .ck-wf { animation: ck-fade var(--dur-slow, 640ms) var(--ease, ease-out) both; }
.dh-doc .ck-wfbar { fill: color-mix(in oklab, var(--chart-kinds-tone) 86%, var(--surface)); stroke: var(--chart-kinds-tone); stroke-width: 1; }
.dh-doc .ck-conn { stroke: var(--faint); stroke-width: 1.2; stroke-dasharray: 3 3; }
.dh-doc .ck-wf-val { fill: var(--ink); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dh-doc .ck-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 8px; font-size: var(--fs-s); color: var(--muted); min-height: 28px; }
.dh-doc .ck-crumb { min-height: 28px; padding: 0 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); border-radius: var(--r-pill); font: 500 var(--fs-xs) var(--font-sans); cursor: pointer; }
.dh-doc .ck-crumb:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: 2px; }
.dh-doc .ck-crumb-now { font-weight: 600; color: var(--ink); }
.dh-doc .ck-tm { position: relative; max-width: 100%; border-radius: var(--r-m); overflow: hidden; background: var(--surface-2); }
.dh-doc .ck-tile { position: absolute; box-sizing: border-box; margin: 0; padding: 4px 7px; border: var(--chart-kinds-tile-gap) solid var(--surface); text-align: left; cursor: pointer; overflow: hidden; font: 500 12px/1.25 var(--font-sans); color: var(--ink);
  background: color-mix(in oklab, var(--chart-kinds-tone) calc(14% + var(--chart-kinds-lvl, 1) * 9%), var(--surface)); border-radius: 6px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; justify-content: flex-start; animation: ck-fade var(--dur-slow, 640ms) var(--ease, ease-out) both; }
.dh-doc .ck-tile.has-head { background: color-mix(in oklab, var(--chart-kinds-tone) 26%, var(--surface)); }
.dh-doc .ck-tile.has-head .ck-tn { font-weight: 700; }
.dh-doc .ck-tile:hover { background: color-mix(in oklab, var(--chart-kinds-tone) calc(26% + var(--chart-kinds-lvl, 1) * 9%), var(--surface)); }
.dh-doc .ck-tile:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: -3px; z-index: 30 !important; }
.dh-doc .ck-tile-tiny { cursor: default; padding: 0; }
.dh-doc .ck-tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; font-weight: 600; }
.dh-doc .ck-tv { color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 400; }
.dh-doc .ck-head { display: flex; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; align-items: baseline; }
.dh-doc .ck-head .ck-tn { flex: 0 1 auto; min-width: 0; }
.dh-doc .ck-tv-head { flex: none; }
.dh-doc .ck-sb { display: flex; justify-content: center; }
.dh-doc .ck-arc { fill: color-mix(in oklab, var(--chart-kinds-tone) calc(86% - var(--chart-kinds-lvl, 1) * 15%), var(--surface)); stroke: var(--surface); stroke-width: 1; transition: filter .15s; animation: ck-fade var(--dur-slow, 640ms) var(--ease, ease-out) both; }
.dh-doc g[data-arc] { cursor: pointer; outline: none; }
.dh-doc g[data-arc]:hover .ck-arc { filter: brightness(1.1) saturate(1.1); }
.dh-doc g[data-arc]:focus-visible .ck-arc { stroke: var(--ink); stroke-width: 3; }
.dh-doc .ck-arc-t { fill: var(--ink); font-size: 12px; font-weight: 600; pointer-events: none; paint-order: stroke; stroke: color-mix(in oklab, var(--surface) 70%, transparent); stroke-width: 3px; stroke-linejoin: round; }
.dh-doc .ck-core circle { fill: var(--surface-2); stroke: var(--line-2); }
.dh-doc .ck-core[role="button"] { cursor: pointer; }
.dh-doc .ck-core[role="button"]:hover circle { fill: var(--acc-softer); }
.dh-doc .ck-core:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: 2px; }
.dh-doc .ck-core-n { fill: var(--ink); font-size: 13px; font-weight: 700; }
.dh-doc .ck-core-v { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.dh-doc .ck-cal { display: flex; align-items: flex-start; gap: 6px; }
.dh-doc .ck-cal-wd { position: relative; flex: 0 0 34px; font-size: 12px; color: var(--muted); }
.dh-doc .ck-cal-wd span { position: absolute; left: 0; display: flex; align-items: center; }
.dh-doc .ck-cal-scroll { flex: 1; min-width: 0; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.dh-doc .ck-cal-in { position: relative; }
.dh-doc .ck-cal-m { position: absolute; top: 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.dh-doc .ck-day { position: absolute; padding: 0; border: 1px solid color-mix(in oklab, var(--chart-kinds-tone) 18%, var(--line)); border-radius: var(--chart-kinds-cell-radius); cursor: pointer; background: var(--chart-kinds-empty); }
.dh-doc .ck-day.is-empty { border-style: dashed; border-color: var(--line-2); }
.dh-doc .ck-day:hover { box-shadow: 0 0 0 2px var(--chart-kinds-tone); }
.dh-doc .ck-day:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: 1px; z-index: 2; }
.dh-doc .ck-cal-key { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: var(--fs-xs); color: var(--muted); }
.dh-doc .ck-cal-ramp { width: 120px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--chart-kinds-heat-lo), var(--chart-kinds-tone)); border: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) {
.dh-doc .ck-bar,
.dh-doc .ck-bx,
.dh-doc .ck-viol,
.dh-doc .ck-stage,
.dh-doc .ck-wf,
.dh-doc .ck-tile,
.dh-doc .ck-arc { animation: none !important; }
}
.dh-doc [data-dh-motion="off"] .ck-bar,
.dh-doc [data-dh-motion="off"] .ck-bx,
.dh-doc [data-dh-motion="off"] .ck-viol,
.dh-doc [data-dh-motion="off"] .ck-stage,
.dh-doc [data-dh-motion="off"] .ck-wf,
.dh-doc [data-dh-motion="off"] .ck-tile,
.dh-doc [data-dh-motion="off"] .ck-arc { animation: none !important; }
.dh-doc .ck[data-dh-static] * { transition: none !important; animation: none !important; }
@container (max-width: 480px) {
.dh-doc .ck-legend { margin-left: 0; }
}

/* ---- parts/compare/style.css (scoped) ---- */
.dh-doc {
  --compare-head-bg: var(--surface-2); --compare-best-bg: color-mix(in oklab, var(--good) 11%, var(--surface)); --compare-pick-bg: color-mix(in oklab, var(--acc) 7%, var(--surface));
  --compare-pick-border: var(--acc); --compare-yes: var(--good-ink); --compare-no: var(--bad-ink); --compare-partial: var(--warn-ink); --compare-bar: var(--acc); --compare-col-min: 128px;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --compare-best-bg: color-mix(in oklab, var(--good) 17%, var(--surface)); --compare-pick-bg: color-mix(in oklab, var(--acc) 12%, var(--surface)); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --compare-best-bg: color-mix(in oklab, var(--good) 17%, var(--surface)); --compare-pick-bg: color-mix(in oklab, var(--acc) 12%, var(--surface)); }
.dh-doc .cmp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dh-doc .cmp { position: relative; container-type: inline-size; }
.dh-doc .cmp-title { font: 600 var(--fs-m) var(--font-display); margin: 0 0 var(--s-3); }
.dh-doc .cmp-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); position: relative; }
.dh-doc .cmp-scroll:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); }
.dh-doc .cmp-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: var(--fs-s); }
.dh-doc .cmp-table th,
.dh-doc .cmp-table td { padding: 0; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); background: var(--surface); }
.dh-doc .cmp-table tbody tr:last-child > * { border-bottom: 0; }
.dh-doc .cmp-table thead th { background: var(--compare-head-bg); border-bottom: 1px solid var(--line-2); padding: 12px 14px 10px; vertical-align: bottom; min-width: var(--compare-col-min); max-width: 220px; border-top: 3px solid var(--compare-opt, var(--line-2)); position: relative; }
.dh-doc .cmp-table thead th.cmp-corner { min-width: 0; border-top-color: transparent; }
.dh-doc .cmp-opt-name { display: block; font: 600 var(--fs-s) var(--font-display); color: var(--ink); overflow-wrap: anywhere; }
.dh-doc .cmp-wins { display: inline-flex; margin-top: 4px; font: 500 var(--fs-xs) var(--font-sans); color: var(--good-ink); background: var(--good-soft); border-radius: var(--r-pill); padding: 1px 8px; }
.dh-doc .cmp-opt[data-most] .cmp-wins { background: var(--good); color: var(--on-acc); }
.dh-doc .cmp-flag { display: inline-block; margin-bottom: 6px; font: 600 11px/1 var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--on-acc); background: var(--compare-pick-border); border-radius: var(--r-pill); padding: 4px 9px; }
.dh-doc .cmp-table th.cmp-crit { font-weight: 500; color: var(--ink); padding: 12px 14px; min-width: 120px; position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--line); overflow-wrap: anywhere; }
.dh-doc .cmp-corner { position: sticky; left: 0; z-index: 3; box-shadow: 1px 0 0 var(--line); }
.dh-doc .cmp-lower { display: block; font: 400 var(--fs-xs) var(--font-sans); color: var(--muted); }
.dh-doc .cmp-table td { min-width: var(--compare-col-min); }
.dh-doc .cmp-table td[data-pick],
.dh-doc .cmp-table th.cmp-opt[data-pick] { background: var(--compare-pick-bg); }
.dh-doc .cmp-table thead th[data-pick] { border-top-color: var(--compare-pick-border); }
.dh-doc .cmp-table td[data-best] { background: var(--compare-best-bg); }
.dh-doc .cmp-cell,
.dh-doc .cmp-note { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 8px 14px; box-sizing: border-box; position: relative; }
.dh-doc .cmp-note { all: unset; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 8px 14px; box-sizing: border-box; cursor: pointer; position: relative; }
.dh-doc .cmp-note:hover { background: color-mix(in oklab, var(--acc) 8%, transparent); }
.dh-doc .cmp-note:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: -2px; }
.dh-doc .cmp-note[aria-expanded="true"] { background: var(--acc-soft); }
.dh-doc .cmp-i { margin-left: auto; flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font: italic 600 11px/1 var(--font-display); color: var(--muted); border: 1px solid var(--line-2); }
.dh-doc .cmp-v { display: inline-flex; align-items: center; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
.dh-doc .cmp-v:not(.cmp-word) { white-space: nowrap; }
.dh-doc .cmp-word { max-width: 22ch; }
.dh-doc .cmp-ico { width: 20px; height: 20px; flex: none; }
.dh-doc .cmp-bool[data-v="yes"] .cmp-ico { color: var(--compare-yes); }
.dh-doc .cmp-bool[data-v="no"] .cmp-ico { color: var(--compare-no); }
.dh-doc .cmp-bool[data-v="partial"] .cmp-ico { color: var(--compare-partial); }
.dh-doc .cmp-bool[data-v="no"] { color: var(--ink-2); }
.dh-doc .cmp-chip { display: inline-flex; align-items: center; min-height: var(--chip-h, 24px); padding: 0 10px; border-radius: var(--chip-radius, var(--r-pill)); font: 500 var(--chip-fs, var(--fs-xs)) var(--font-sans); }
.dh-doc .cmp-tone[data-v="good"] .cmp-chip { background: var(--good-soft); color: var(--good-ink); }
.dh-doc .cmp-tone[data-v="warn"] .cmp-chip { background: var(--warn-soft); color: var(--warn-ink); }
.dh-doc .cmp-tone[data-v="bad"] .cmp-chip { background: var(--bad-soft); color: var(--bad-ink); }
.dh-doc .cmp-score { gap: 10px; flex: 1; }
.dh-doc .cmp-num { font: 600 var(--fs-s) var(--font-mono); font-variant-numeric: tabular-nums; min-width: 2.2ch; }
.dh-doc .cmp-bar { flex: 1; min-width: 36px; max-width: 120px; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.dh-doc .cmp-bar i { display: block; height: 100%; border-radius: 4px; background: var(--compare-bar); }
.dh-doc .cmp-none { color: var(--faint); }
.dh-doc .cmp-star { flex: none; display: inline-flex; width: 16px; height: 16px; color: var(--good); }
.dh-doc .cmp-star svg { width: 100%; height: 100%; }
.dh-doc .cmp-switch,
.dh-doc .cmp-tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-3); }
.dh-doc .cmp-switch button,
.dh-doc .cmp-tabs button { min-height: 40px; padding: 0 16px; border-radius: var(--ctl-radius, var(--r-pill)); border: 1px solid var(--line-2); background: var(--ctl-bg, var(--surface-2)); color: var(--ctl-ink, var(--ink)); font: 500 var(--fs-s) var(--font-sans); cursor: pointer; }
.dh-doc .cmp-switch button[aria-pressed="true"],
.dh-doc .cmp-tabs button[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.dh-doc .cmp-tabs button[aria-pressed="true"][data-c] { background: var(--compare-opt); border-color: var(--compare-opt); }
.dh-doc .cmp-switch button:focus-visible,
.dh-doc .cmp-tabs button:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); }
.dh-doc .cmp-hint { margin-top: 8px; font: 400 var(--fs-xs) var(--font-sans); color: var(--muted); text-align: center; }
.dh-doc .cmp-wrap { position: relative; }
.dh-doc .cmp-wrap::after { content: ""; position: absolute; top: 1px; bottom: 1px; right: 1px; width: 28px; border-radius: 0 var(--r-m) var(--r-m) 0; pointer-events: none; opacity: 0; transition: opacity var(--dur, .2s); background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--ink) 16%, transparent)); }
.dh-doc .cmp[data-edge="start"] .cmp-wrap::after,
.dh-doc .cmp[data-edge="mid"] .cmp-wrap::after { opacity: 1; }
.dh-doc .cmp[data-narrow] .cmp-table thead th,
.dh-doc .cmp[data-narrow] .cmp-table td { min-width: 112px; }
.dh-doc .cmp[data-view="single"] .cmp-table thead th,
.dh-doc .cmp[data-view="single"] .cmp-table td { min-width: 0; width: 60%; }
@container (max-width: 560px) {
.dh-doc .cmp-table th.cmp-crit { padding: 10px; }
.dh-doc .cmp-cell,
.dh-doc .cmp-note { padding: 8px 10px; }
.dh-doc .cmp-table thead th { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
.dh-doc .cmp-wrap::after { transition: none; }
}
.dh-doc [data-dh-motion="off"] .cmp-wrap::after { transition: none; }

/* ---- parts/compare-image/style.css (scoped) ---- */
.dh-doc {
  --compare-image-handle: var(--on-acc); --compare-image-bar: white; --compare-image-bar-w: 3px; --compare-image-grip: 44px;
  --compare-image-label-bg: color-mix(in oklab, black 72%, transparent); --compare-image-label-ink: white; --compare-image-shadow: color-mix(in oklab, black 32%, transparent);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --compare-image-label-bg: color-mix(in oklab, black 80%, transparent); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --compare-image-label-bg: color-mix(in oklab, black 80%, transparent); }
.dh-doc .cmpi-title { font: 600 var(--fs-m) var(--font-display); margin: 0 0 var(--s-3); }
.dh-doc .cmpi-stage { position: relative; overflow: hidden; border-radius: var(--r-m); border: 1px solid var(--line-2); background: var(--surface-2); user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: ew-resize; display: grid; max-width: 100%; }
.dh-doc .cmpi[data-dir="v"] .cmpi-stage { touch-action: pan-x; cursor: ns-resize; }
.dh-doc .cmpi-img { grid-area: 1 / 1; width: 100%; height: auto; display: block; -webkit-user-drag: none; pointer-events: none; }
.dh-doc .cmpi-before { clip-path: inset(0 calc(100% - var(--compare-image-p, 50%)) 0 0); }
.dh-doc .cmpi[data-dir="v"] .cmpi-before { clip-path: inset(0 0 calc(100% - var(--compare-image-p, 50%)) 0); }
.dh-doc .cmpi[data-fixed] .cmpi-stage { display: block; }
.dh-doc .cmpi[data-fixed] .cmpi-img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.dh-doc .cmpi[data-fixed][data-fit="contain"] .cmpi-img { object-fit: contain; }
.dh-doc .cmpi-bar { position: absolute; background: var(--compare-image-bar); box-shadow: 0 0 0 1px var(--compare-image-shadow), 0 2px 10px var(--compare-image-shadow); pointer-events: none; }
.dh-doc .cmpi[data-dir="h"] .cmpi-bar { top: 0; bottom: 0; left: var(--compare-image-p, 50%); width: var(--compare-image-bar-w); transform: translateX(-50%); }
.dh-doc .cmpi[data-dir="v"] .cmpi-bar { left: 0; right: 0; top: var(--compare-image-p, 50%); height: var(--compare-image-bar-w); transform: translateY(-50%); }
.dh-doc .cmpi-grip { position: absolute; width: var(--compare-image-grip); height: var(--compare-image-grip); border-radius: 50%; background: var(--acc); color: var(--compare-image-handle); display: grid; place-items: center; box-shadow: 0 2px 12px var(--compare-image-shadow), 0 0 0 3px var(--compare-image-bar); cursor: grab; touch-action: none; }
.dh-doc .cmpi[data-dir="h"] .cmpi-grip { left: var(--compare-image-p, 50%); top: 50%; transform: translate(-50%, -50%); }
.dh-doc .cmpi[data-dir="v"] .cmpi-grip { top: var(--compare-image-p, 50%); left: 50%; transform: translate(-50%, -50%) rotate(90deg); }
.dh-doc .cmpi-grip svg { width: 22px; height: 22px; }
.dh-doc .cmpi-grip:focus-visible { outline: 3px solid var(--compare-image-bar); outline-offset: 3px; box-shadow: 0 0 0 6px var(--acc); }
.dh-doc .cmpi-lab { position: absolute; z-index: 2; top: 10px; min-height: 32px; min-width: 40px; padding: 0 12px; border-radius: var(--r-pill); border: 0; background: var(--compare-image-label-bg); color: var(--compare-image-label-ink); font: 600 var(--fs-xs) var(--font-sans); cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dh-doc .cmpi-lab-before { left: 10px; }
.dh-doc .cmpi-lab-after { right: 10px; }
.dh-doc .cmpi[data-dir="v"] .cmpi-lab-after { top: auto; bottom: 10px; }
.dh-doc .cmpi-lab[aria-pressed="true"] { background: var(--acc); color: var(--on-acc); }
.dh-doc .cmpi-lab:focus-visible { outline: 2px solid var(--compare-image-bar); outline-offset: 2px; box-shadow: 0 0 0 4px var(--acc); }
.dh-doc .cmpi-help { margin-top: 8px; font: 400 var(--fs-xs) var(--font-sans); color: var(--muted); text-align: center; }

/* ---- parts/diff/style.css (scoped) ---- */
.dh-doc {
  --diff-add: color-mix(in oklab, var(--good) 13%, var(--surface));
  --diff-del: color-mix(in oklab, var(--bad) 12%, var(--surface));
  --diff-word-add: color-mix(in oklab, var(--good) 38%, var(--surface));
  --diff-word-del: color-mix(in oklab, var(--bad) 34%, var(--surface));
  --diff-num-add: color-mix(in oklab, var(--good) 22%, var(--surface));
  --diff-num-del: color-mix(in oklab, var(--bad) 20%, var(--surface));
  --diff-head-bg: var(--surface-2); --diff-hunk-bg: var(--acc-softer); --diff-num-w: 48px; --diff-sign-w: 28px;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --diff-add: color-mix(in oklab, var(--good) 13%, var(--surface)); --diff-del: color-mix(in oklab, var(--bad) 12%, var(--surface)); --diff-word-add: color-mix(in oklab, var(--good) 38%, var(--surface)); --diff-word-del: color-mix(in oklab, var(--bad) 34%, var(--surface)); --diff-num-add: color-mix(in oklab, var(--good) 22%, var(--surface)); --diff-num-del: color-mix(in oklab, var(--bad) 20%, var(--surface)); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --diff-add: color-mix(in oklab, var(--good) 13%, var(--surface)); --diff-del: color-mix(in oklab, var(--bad) 12%, var(--surface)); --diff-word-add: color-mix(in oklab, var(--good) 38%, var(--surface)); --diff-word-del: color-mix(in oklab, var(--bad) 34%, var(--surface)); --diff-num-add: color-mix(in oklab, var(--good) 22%, var(--surface)); --diff-num-del: color-mix(in oklab, var(--bad) 20%, var(--surface)); }
.dh-doc .diff { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; container-type: inline-size; font: 400 13px/1.55 var(--font-mono); min-width: 0; }
.dh-doc .diff-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; font-family: var(--font-sans); }
.dh-doc .diff-title { font: 600 var(--fs-s) var(--font-display); color: var(--ink); margin-right: auto; overflow-wrap: anywhere; }
.dh-doc .diff-stat { display: inline-flex; align-items: center; gap: 8px; font: 600 12px var(--font-mono); }
.dh-doc .diff-adds { color: var(--good-ink); }
.dh-doc .diff-dels { color: var(--bad-ink); }
.dh-doc .diff-sq { display: inline-flex; gap: 2px; }
.dh-doc .diff-sq i { width: 9px; height: 9px; border-radius: 2px; background: var(--surface-3); }
.dh-doc .diff-sq i.a { background: var(--good); }
.dh-doc .diff-sq i.d { background: var(--bad); }
.dh-doc .diff-seg { margin-left: 0; }
.dh-doc .diff-seg button { min-height: 28px; }
.dh-doc .diff-seg button:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.dh-doc .diff-file { border-top: 1px solid var(--line); }
.dh-doc .diff-file:first-of-type { border-top: 0; }
.dh-doc .diff-fh { margin: 0; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 4px; background: var(--diff-head-bg); border-bottom: 1px solid var(--line); font: 500 13px var(--font-mono); min-height: 40px; flex-wrap: wrap; }
.dh-doc .diff-fb { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; min-height: 40px; color: var(--ink); min-width: 0; flex: 1 1 auto; }
.dh-doc button.diff-fb { cursor: pointer; }
.dh-doc button.diff-fb:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.dh-doc .diff-name { overflow-wrap: anywhere; font-weight: 500; }
.dh-doc .diff-to { color: var(--muted); }
.dh-doc .diff-note { font: 500 12px var(--font-sans); color: var(--muted); background: var(--surface-3); border-radius: var(--r-pill); padding: 1px 9px; }
.dh-doc .diff-file.is-shut .diff-fh { border-bottom: 0; }
.dh-doc .diff-fh .chev { transform: rotate(90deg); }
.dh-doc .diff-file.is-shut .chev { transform: none; }
.dh-doc .diff-body { overflow-x: auto; }
.dh-doc .diff table { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: auto; }
.dh-doc .diff td { padding: 0 8px; vertical-align: top; }
.dh-doc .diff .diff-t { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); width: 100%; }
.dh-doc .diff .diff-n { box-sizing: border-box; width: var(--diff-num-w); min-width: var(--diff-num-w); text-align: right; color: var(--faint); user-select: none; font-size: 12px; padding-right: 10px; background: var(--diff-head-bg); border-right: 1px solid var(--line); white-space: nowrap; }
.dh-doc .diff .diff-s { box-sizing: border-box; width: var(--diff-sign-w); min-width: var(--diff-sign-w); text-align: center; user-select: none; color: var(--muted); font-weight: 600; background: var(--surface); }
.dh-doc .diff tr.is-add td,
.dh-doc .diff td.is-add { background-color: var(--diff-add); }
.dh-doc .diff tr.is-del td,
.dh-doc .diff td.is-del { background-color: var(--diff-del); }
.dh-doc .diff tr.is-add .diff-n,
.dh-doc .diff td.is-add.diff-n { background-color: var(--diff-num-add); }
.dh-doc .diff tr.is-del .diff-n,
.dh-doc .diff td.is-del.diff-n { background-color: var(--diff-num-del); }
.dh-doc .diff tr.is-add .diff-s,
.dh-doc .diff td.is-add.diff-s { color: var(--good-ink); }
.dh-doc .diff tr.is-del .diff-s,
.dh-doc .diff td.is-del.diff-s { color: var(--bad-ink); }
.dh-doc .diff td.is-empty { background-color: var(--surface-2); background-image: repeating-linear-gradient(135deg, transparent 0 6px, var(--line) 6px 7px); }
.dh-doc .diff-w { border-radius: 3px; padding: 0 1px; margin: 0 -1px; }
.dh-doc .diff tr.is-add .diff-w,
.dh-doc .diff td.is-add .diff-w { background: var(--diff-word-add); }
.dh-doc .diff tr.is-del .diff-w,
.dh-doc .diff td.is-del .diff-w { background: var(--diff-word-del); }
.dh-doc .diff-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dh-doc .diff-hunk td { background: var(--diff-hunk-bg); color: var(--acc-ink); font-size: 12px; padding: 4px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dh-doc .diff-gap td { background: var(--surface-2); text-align: center; color: var(--muted); font: 500 12px var(--font-sans); padding: 0; }
.dh-doc .diff-fold { all: unset; display: block; width: 100%; box-sizing: border-box; padding: 6px; cursor: pointer; color: var(--acc-ink); min-height: 28px; }
.dh-doc .diff-fold:hover { background: var(--acc-softer); }
.dh-doc .diff-fold:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.dh-doc .diff-gapt { display: block; padding: 6px; }
.dh-doc .diff-mid { border-left: 1px solid var(--line); }
.dh-doc .diff-src { margin: 0; padding: 12px 14px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.dh-doc .diff-plain .cw-error { margin-bottom: 8px; }
.dh-doc .diff[data-view="auto"] .diff-sp { display: none; }
@container (min-width: 760px) {
.dh-doc .diff[data-view="auto"] .diff-u { display: none; }
.dh-doc .diff[data-view="auto"] .diff-sp { display: table; }
}
.dh-doc .diff-sp td.diff-t { width: 50%; }
@container (max-width: 640px) {
.dh-doc .diff .diff-t { white-space: pre; overflow-wrap: normal; width: auto; }
.dh-doc .diff table { width: max-content; min-width: 100%; }
.dh-doc .diff-u .diff-n:nth-child(1) { position: sticky; left: 0; z-index: 1; }
.dh-doc .diff-u .diff-n:nth-child(2) { position: sticky; left: var(--diff-num-w); z-index: 1; }
.dh-doc .diff-u .diff-s { position: sticky; left: calc(2 * var(--diff-num-w)); z-index: 1; box-shadow: 1px 0 0 var(--line); }
.dh-doc .diff-sp .diff-n:nth-child(1) { position: sticky; left: 0; z-index: 1; }
.dh-doc .diff-sp .diff-s:nth-child(2) { position: sticky; left: var(--diff-num-w); z-index: 1; box-shadow: 1px 0 0 var(--line); }
.dh-doc .diff-hunk td,
.dh-doc .diff-gap td { text-align: left; }
.dh-doc .diff-stick,
.dh-doc .diff-fold,
.dh-doc .diff-gapt { position: sticky; left: 0; display: block; box-sizing: border-box; width: 100cqw; max-width: 100cqw; white-space: normal; overflow-wrap: anywhere; }
.dh-doc .diff-fold,
.dh-doc .diff-gapt { text-align: center; }
}

/* ---- parts/downloads/style.css (scoped) ---- */
.dh-doc {
  --downloads-icon-bg: var(--acc-soft);
  --downloads-card-bg: var(--surface);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --downloads-card-bg: var(--surface); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --downloads-card-bg: var(--surface); }
.dh-doc .dh-media { font-family: var(--font-sans); color: var(--ink); }
.dh-doc .dh-media *,
.dh-doc .dh-media *::before,
.dh-doc .dh-media *::after { box-sizing: border-box; }
.dh-doc :where(.dh-media) button { font: inherit; color: inherit; }
.dh-doc .m-grow { flex: 1 1 auto; }
.dh-doc .m-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.dh-doc .m-ctl { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: var(--ctl-h, 40px); height: var(--ctl-h, 40px); padding: 0 10px; border: 0; border-radius: var(--ctl-radius, var(--r-pill)); background: var(--ctl-bg, var(--surface-2)); color: var(--ctl-ink, var(--ink)); cursor: pointer; text-decoration: none; font-size: 13px; font-weight: 500; transition: background var(--dur-fast), transform var(--dur-fast); -webkit-tap-highlight-color: transparent; }
.dh-doc .m-ctl:hover:not(:disabled) { background: var(--surface-3); }
.dh-doc .m-ctl:active:not(:disabled) { transform: scale(.96); }
.dh-doc .m-ctl:disabled { opacity: .4; cursor: default; }
.dh-doc .m-ctl.has-text { padding: 0 14px 0 10px; }
.dh-doc .m-ctl[aria-pressed="true"],
.dh-doc .m-ctl[aria-expanded="true"] { background: var(--acc-soft); color: var(--acc-ink); }
.dh-doc .m-ctl-n { position: absolute; font-size: 11px; font-weight: 600; line-height: 1; top: 50%; left: 50%; transform: translate(-50%, -38%); pointer-events: none; }
.dh-doc .m-ctl svg { flex: none; }
.dh-doc .dh-media :is(button, a, input, [role="slider"], [tabindex="0"], [tabindex="-1"]):focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); }
.dh-doc .m-play { flex: none; width: 56px; height: 56px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--on-acc); background: linear-gradient(135deg, var(--acc), var(--c4)); box-shadow: 0 6px 18px color-mix(in oklab, var(--acc) 45%, transparent), inset 0 1px 0 rgba(255,255,255,.35); transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast); -webkit-tap-highlight-color: transparent; }
.dh-doc .m-play:hover:not(:disabled) { transform: scale(1.06); }
.dh-doc .m-play:active:not(:disabled) { transform: scale(.95); }
.dh-doc .m-play:disabled { opacity: .45; cursor: default; }
.dh-doc .m-play-s { width: var(--ctl-h, 40px); height: var(--ctl-h, 40px); }
.dh-doc .m-play svg { margin-left: 2px; }
.dh-doc .is-playing > .am-top .m-play svg,
.dh-doc .m-play[aria-label^="Pause"] svg { margin-left: 0; }
.dh-doc .m-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 12px; border: 1px solid var(--line); border-radius: var(--chip-radius, var(--r-pill)); background: var(--surface-2); font-size: 13px; cursor: pointer; transition: background var(--dur-fast), border-color var(--dur-fast); }
.dh-doc .m-chip:hover { background: var(--surface-3); }
.dh-doc .m-chip[aria-current="true"] { background: var(--acc-soft); border-color: var(--acc); color: var(--acc-ink); }
.dh-doc .m-chip-t { font-family: var(--font-mono); font-size: 12px; opacity: .8; }
.dh-doc .m-err { margin: 8px 0 0; padding: 8px 12px; border-radius: var(--r-s); background: var(--bad-soft); color: var(--bad-ink); font-size: 13px; }
.dh-doc .m-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.dh-doc .mu { position: relative; }
.dh-doc .mu-btn .mu-val { min-width: 2.4ch; text-align: center; font-variant-numeric: tabular-nums; }
.dh-doc .mu-list { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 20; min-width: 110px; padding: 4px; border: 1px solid var(--pop-border, var(--line-2)); border-radius: var(--pop-radius, var(--r-m)); background: var(--pop-bg, var(--surface)); color: var(--pop-ink, var(--ink)); box-shadow: var(--pop-shadow, var(--shadow-md)); display: flex; flex-direction: column; }
.dh-doc .mu-item { min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-s); background: none; text-align: left; font-size: 13.5px; cursor: pointer; }
.dh-doc .mu-item:hover { background: var(--surface-2); }
.dh-doc .mu-item[aria-checked="true"] { background: var(--acc-soft); color: var(--acc-ink); font-weight: 600; }
.dh-doc .m-vol { display: inline-flex; align-items: center; gap: 4px; }
.dh-doc .m-vol input[type="range"],
.dh-doc .lt-range { -webkit-appearance: none; appearance: none; height: 24px; background: none; cursor: pointer; }
.dh-doc .m-vol input[type="range"] { width: 84px; }
.dh-doc .m-vol input[type="range"]::-webkit-slider-runnable-track,
.dh-doc .lt-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--surface-3); }
.dh-doc .m-vol input[type="range"]::-webkit-slider-thumb,
.dh-doc .lt-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%; background: var(--acc); border: 2px solid var(--surface); box-shadow: var(--shadow-sm); }
.dh-doc .m-vol input[type="range"]::-moz-range-track,
.dh-doc .lt-range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--surface-3); }
.dh-doc .m-vol input[type="range"]::-moz-range-thumb,
.dh-doc .lt-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--acc); border: 2px solid var(--surface); }
.dh-doc .vm .m-vol input[type="range"]::-webkit-slider-runnable-track { background: rgba(255,255,255,.3); }
.dh-doc .dl { display: flex; flex-direction: column; gap: var(--s-2); }
.dh-doc .dl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.dh-doc .dl-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-3) var(--s-4); padding: var(--s-3) var(--s-4); border: 1px solid var(--part-border, var(--line)); border-radius: var(--r-m); background: var(--downloads-card-bg); box-shadow: var(--shadow-sm); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.dh-doc .dl-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); }
.dh-doc .dl-icon { width: 52px; height: 52px; border-radius: var(--r-m); display: grid; place-items: center; background: var(--downloads-icon-bg); color: var(--acc-ink); }
.dh-doc .dl-card[data-icon="document"] .dl-icon { --downloads-icon-bg: var(--c1-soft); color: var(--c1-ink); }
.dh-doc .dl-card[data-icon="sheet"] .dl-icon { --downloads-icon-bg: var(--c8-soft); color: var(--c8-ink); }
.dh-doc .dl-card[data-icon="archive"] .dl-icon { --downloads-icon-bg: var(--c3-soft); color: var(--c3-ink); }
.dh-doc .dl-card[data-icon="image"] .dl-icon { --downloads-icon-bg: var(--c7-soft); color: var(--c7-ink); }
.dh-doc .dl-card[data-icon="audio"] .dl-icon { --downloads-icon-bg: var(--c4-soft); color: var(--c4-ink); }
.dh-doc .dl-card[data-icon="video"] .dl-icon { --downloads-icon-bg: var(--c5-soft); color: var(--c5-ink); }
.dh-doc .dl-card[data-icon="code"] .dl-icon { --downloads-icon-bg: var(--c6-soft); color: var(--c6-ink); }
.dh-doc .dl-card[data-icon="text"] .dl-icon { --downloads-icon-bg: var(--c2-soft); color: var(--c2-ink); }
.dh-doc .dl-card[data-icon="other"] .dl-icon { --downloads-icon-bg: var(--surface-3); color: var(--muted); }
.dh-doc .dl-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dh-doc .dl-label { font-size: var(--fs-s); font-weight: var(--w-strong); line-height: 1.3; }
.dh-doc .dl-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.dh-doc .dl-name { font-family: var(--font-mono); font-size: 12.5px; overflow-wrap: anywhere; }
.dh-doc .dl-size { font-variant-numeric: tabular-nums; }
.dh-doc .dl-size::before { content: ""; display: inline-block; width: 3px; height: 3px; margin-right: 10px; border-radius: 50%; background: currentColor; vertical-align: middle; opacity: .6; }
.dh-doc .dl-note { font-size: 13.5px; color: var(--ink-2); }
.dh-doc .dl-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; }
.dh-doc .dl-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 2px 10px; border: 1px solid var(--line-2); border-radius: var(--chip-radius, var(--r-pill)); background: var(--surface-2); color: var(--ink-2); cursor: pointer; font-size: 12.5px; }
.dh-doc .dl-chip:hover { background: var(--surface-3); }
.dh-doc .dl-chip code { font-family: var(--font-mono); font-size: 12.5px; }
.dh-doc .dl-algo { font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .04em; color: var(--muted); }
.dh-doc .dl-how { font-size: 12.5px; color: var(--muted); }
.dh-doc .dl-how code { font-family: var(--font-mono); font-size: 12px; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.dh-doc .dl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--ctl-h, 40px); padding: 0 18px 0 14px; border-radius: var(--r-pill); background: var(--acc); color: var(--on-acc); font-size: 14px; font-weight: 600; text-decoration: none; box-shadow: 0 4px 14px color-mix(in oklab, var(--acc) 38%, transparent); transition: transform var(--dur-fast) var(--ease); }
.dh-doc .dl-btn:hover { transform: translateY(-1px); }
.dh-doc .dl-btn:active { transform: none; }
.dh-doc .dl-off { background: var(--surface-3); color: var(--muted); box-shadow: none; font-weight: 500; font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
.dh-doc .dh-media *,
.dh-doc .dh-media *::before,
.dh-doc .dh-media *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media (max-width: 640px) {
.dh-doc .dl-card { grid-template-columns: auto minmax(0, 1fr); }
.dh-doc .dl-btn { grid-column: 1 / -1; }
.dh-doc .m-play { width: 52px; height: 52px; }
.dh-doc .m-vol input[type="range"] { display: none; }
}

/* ---- parts/explore/style.css (scoped) ---- */
.dh-doc { --explore-key: color-mix(in oklab, var(--c2) 75%, var(--ink)); --explore-string: color-mix(in oklab, var(--good) 75%, var(--ink)); --explore-number: color-mix(in oklab, var(--c5) 75%, var(--ink)); --explore-bool: color-mix(in oklab, var(--c4) 70%, var(--ink)); --explore-null: var(--faint); --explore-guide: var(--line); --explore-hit: color-mix(in oklab, var(--warn) 30%, var(--surface)); --explore-indent: 18px; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --explore-guide: var(--line); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --explore-guide: var(--line); }
.dh-doc .dx { border: 1px solid var(--part-border, var(--line)); border-radius: var(--part-radius, var(--r-m, 12px)); background: var(--part-bg, var(--surface)); padding: var(--part-pad, 14px); display: flex; flex-direction: column; gap: 10px; min-width: 0; font-size: 14px; }
.dh-doc .dx button { font: inherit; color: inherit; cursor: pointer; }
.dh-doc .dx button:focus-visible,
.dh-doc .dx input:focus-visible,
.dh-doc .dx-table-wrap:focus-visible,
.dh-doc .dx summary:focus-visible {
  outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); }
.dh-doc .dx-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dh-doc .dx-title { font-weight: 600; margin-right: auto; }
.dh-doc .dx .chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: var(--r-pill, 999px); background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.dh-doc .dx-input { flex: 1; min-width: 0; min-height: 40px; padding: 4px 12px; border: 1px solid var(--line-2); border-radius: var(--r-s, 8px); background: var(--surface); color: var(--ink); font: 14px/1.4 var(--font-mono); }
.dh-doc .dx-q,
.dh-doc .dx-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dh-doc .dx-lab { font: 600 12px var(--font-mono); color: var(--muted); }
.dh-doc .dx-btn,
.dh-doc .dx-chip,
.dh-doc .dx-more { min-height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-pill, 999px); background: var(--surface-2); }
.dh-doc .dx-btn:hover,
.dh-doc .dx-chip:hover { background: var(--acc-soft); }
.dh-doc .dx-btn[aria-pressed="true"] { background: var(--acc-soft); border-color: var(--acc); }
.dh-doc .dx-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dh-doc .dx-chip { min-height: 32px; font: 12px var(--font-mono); padding: 0 10px; }
.dh-doc .dx-status { font-size: 12px; color: var(--muted); min-height: 18px; }
.dh-doc .dx-err { color: var(--bad); font-weight: 500; }
.dh-doc .dx-search { max-width: 280px; }
.dh-doc .dx-count-hits { font-size: 12px; color: var(--muted); }
.dh-doc .dx-body { overflow-x: auto; max-width: 100%; }
.dh-doc .dx-ul { list-style: none; margin: 0; padding: 0 0 0 var(--explore-indent, 18px); }
.dh-doc .dx-tree { padding-left: 0; font: 13px/1.5 var(--font-mono); }
.dh-doc .dx-ul .dx-ul { border-left: 1px solid var(--explore-guide); margin-left: 10px; padding-left: 12px; }
.dh-doc .dx-row { display: flex; align-items: center; gap: 4px; min-height: 28px; flex-wrap: wrap; }
.dh-doc .dx-tog { width: 28px; height: 28px; flex: none; border: 0; background: transparent; padding: 0; border-radius: var(--r-s, 6px); }
.dh-doc .dx-tog:hover { background: var(--surface-2); }
.dh-doc .dx-leaf { cursor: default; }
.dh-doc .dx-k { color: var(--explore-key); font-weight: 500; }
.dh-doc .dx-colon { color: var(--faint); margin-right: 2px; }
.dh-doc .dx-sum,
.dh-doc .dx-count { color: var(--muted); }
.dh-doc .dx-string { color: var(--explore-string); }
.dh-doc .dx-number { color: var(--explore-number); }
.dh-doc .dx-bool { color: var(--explore-bool); }
.dh-doc .dx-null { color: var(--explore-null); font-style: italic; }
.dh-doc .dx-v { overflow-wrap: anywhere; }
.dh-doc .dx .is-hit { background: var(--explore-hit); border-radius: 3px; }
.dh-doc .dx-copy { margin-left: auto; border: 0; background: transparent; color: var(--faint); padding: 0 6px; min-height: 28px; font: 12px var(--font-mono); border-radius: var(--r-s, 6px); display: inline-flex; gap: 6px; align-items: center; max-width: 100%; }
.dh-doc .dx-copy:hover,
.dh-doc .dx-copy:focus-visible { color: var(--acc); background: var(--surface-2); }
.dh-doc .dx-copy-t { display: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; }
.dh-doc .dx-row:hover .dx-copy-t,
.dh-doc .dx-copy:focus-visible .dx-copy-t { display: inline; }
.dh-doc .dx-more { font-size: 12px; margin: 4px 0; }
.dh-doc .dx-copied { font-size: 12px; color: var(--good); min-height: 16px; }
.dh-doc .dx-note { color: var(--muted); font-size: 13px; margin: 4px 0; }
.dh-doc .dx-table-wrap { overflow: auto; max-height: 420px; border: 1px solid var(--line); border-radius: var(--r-s, 8px); }
.dh-doc .dx-table { border-collapse: collapse; font: 12px/1.4 var(--font-mono); min-width: 100%; }
.dh-doc .dx-table th { position: sticky; top: 0; background: var(--surface-2); text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line-2); }
.dh-doc .dx-table td { padding: 5px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 36ch; overflow: hidden; text-overflow: ellipsis; }
.dh-doc .dx-subset { font-size: 12px; color: var(--muted); }
.dh-doc .dx-subset summary { cursor: pointer; min-height: 24px; }
.dh-doc .dx-subset p { margin: 4px 0; }
@container (max-width:600px) {
.dh-doc .dx { padding:10px; }
.dh-doc .dx-ul { --explore-indent:12px; }
.dh-doc .dx-ul .dx-ul { padding-left:8px; margin-left:6px; }
.dh-doc .dx-copy-t { display:none !important; }
}
.dh-doc .dx-copy-i { flex:none; }
.dh-doc .dx[data-dh-static] .dx-q,
.dh-doc .dx[data-dh-static] .dx-chips,
.dh-doc .dx[data-dh-static] .dx-tools,
.dh-doc .dx[data-dh-static] .dx-copy { display:none; }
@media print {
.dh-doc .dx-q,
.dh-doc .dx-chips,
.dh-doc .dx-tools,
.dh-doc .dx-copy { display:none !important; }
}
.dh-doc .dx-title,
.dh-doc .dx-chip { min-width:0; max-width:100%; overflow-wrap:anywhere; }

/* ---- parts/fishbone/style.css (scoped) ---- */
.dh-doc {
  --fishbone-spine: var(--ink-2); --fishbone-head-bg: var(--bad-soft); --fishbone-head-border: var(--bad); --fishbone-spine-w: 2.5px;
  --fishbone-sub: var(--muted);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --fishbone-head-bg: var(--bad-soft); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --fishbone-head-bg: var(--bad-soft); }
.dh-doc .fish-narrow { display: none; }
@container (max-width: 600px) {
.dh-doc .fish-wide { display: none; }
.dh-doc .fish-narrow { display: block; }
}
.dh-doc .fish-spine { stroke: var(--fishbone-spine); stroke-width: var(--fishbone-spine-w); }
.dh-doc .fish-head rect { fill: var(--fishbone-head-bg); stroke: var(--fishbone-head-border); }
.dh-doc .fish-head text { font-weight: 600; }
.dh-doc .fish-line { stroke: var(--fc, var(--ink-2)); stroke-width: 1.8; }
.dh-doc .fish-bone.is-lit .fish-line { stroke-width: 3.6; }
.dh-doc .fish-bone.is-lit .fish-cat rect { stroke-width: 2.5; }
.dh-doc .fish-cat-text { font-weight: 600; font-size: 13px; }
.dh-doc .fish-tick { stroke: var(--fc, var(--ink-2)); stroke-width: 1.2; }
.dh-doc .dh-svg text.fish-sub { fill: var(--fishbone-sub); }
.dh-doc .fish-sub,
.dh-doc .fish-cause text { font-size: 13px; }
.dh-doc .fish-bone.is-new,
.dh-doc .fish-cause.is-new { animation: none; }

/* ---- parts/flame/style.css (scoped) ---- */
.dh-doc { --flame-h: 24px; --flame-gap: 1px; --flame-frame: var(--acc-softer); --flame-heat-lo: var(--acc-softer); --flame-heat-hi: var(--acc); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --flame-frame: var(--acc-softer); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --flame-frame: var(--acc-softer); }
.dh-doc .flame { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); padding: 14px 16px; position: relative; min-width: 0; }
.dh-doc .flame svg { display: block; max-width: none; }
.dh-doc .flame .chart-title { font-weight: 600; margin-bottom: 8px; }
.dh-doc .flame-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dh-doc .flame-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--muted); }
.dh-doc .flame-crumb { min-height: 28px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 500 var(--fs-xs) var(--font-sans); cursor: pointer; }
.dh-doc .flame-crumb[aria-current="true"] { background: var(--acc-soft); border-color: var(--acc); color: var(--acc-ink); }
.dh-doc .flame-search input { min-height: 32px; width: min(240px, 100%); padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 400 var(--fs-s) var(--font-sans); }
.dh-doc .flame-found { margin: 0 0 8px; font-size: var(--fs-xs); color: var(--muted); }
.dh-doc .flame-box { overflow-x: auto; border-radius: var(--r-s); }
.dh-doc .fl-frame { cursor: pointer; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); outline: none; }
.dh-doc .fl-rect { transition: width var(--dur) var(--ease); }
.dh-doc .fl-frame.is-dim { opacity: .38; }
.dh-doc .fl-frame.is-hit { opacity: 1; }
.dh-doc .fl-frame:hover .fl-rect { filter: brightness(1.06); stroke: var(--ink); }
.dh-doc .fl-label { font: 400 12px var(--font-mono); fill: var(--ink); pointer-events: none; }
.dh-doc .flame-crumb { max-width: 100%; overflow-wrap: anywhere; }
.dh-doc .flame-search { min-width: 0; }
.dh-doc .flame input:focus-visible,
.dh-doc .flame button:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.dh-doc .fl-frame:focus-visible .fl-rect { stroke: var(--acc); stroke-width: 2.5px; }
.dh-doc .flame .chart-table { margin-top: 8px; font-size: 12px; }
.dh-doc .flame .table-wrap { overflow-x: auto; }
.dh-doc .flame .chart-table th,
.dh-doc .flame .chart-table td { padding: 4px 8px; overflow-wrap: anywhere; }
@container (max-width: 600px) {
.dh-doc .flame { padding: 12px; }
.dh-doc .flame-crumb { min-height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
.dh-doc .fl-frame,
.dh-doc .fl-rect { transition: none; }
}
.dh-doc [data-dh-motion="off"] .fl-frame,
.dh-doc [data-dh-motion="off"] .fl-rect,
.dh-doc .flame[data-dh-static] * { transition: none; animation: none; }
@media print {
.dh-doc .flame-bar,
.dh-doc .flame .part-hint { display: none; }
.dh-doc .fl-frame,
.dh-doc .fl-rect { transition: none; }
}

/* ---- parts/gallery/style.css (scoped) ---- */
.dh-doc {
  --gallery-radius: var(--r-m);
  --gallery-gap: var(--s-3);
  --gallery-caption: var(--muted);
  --gallery-lightbox-bg: rgba(0, 0, 0, .92);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --gallery-lightbox-bg: rgba(0, 0, 0, .94); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --gallery-lightbox-bg: rgba(0, 0, 0, .94); }
.dh-doc .gl { display: flex; flex-direction: column; gap: var(--s-2); }
.dh-doc .gl-title,
.dh-doc .lt-title,
.dh-doc .dl-title { margin: 0; font-weight: var(--w-strong); font-size: var(--fs-s); color: var(--ink); }
.dh-doc .gl-img { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--gallery-radius); overflow: hidden; background: var(--surface-2); cursor: zoom-in; position: relative; }
.dh-doc .gl-img img,
.dh-doc .gl-slide img { display: block; width: 100%; height: auto; object-fit: cover; transition: transform var(--dur) var(--ease); }
.dh-doc .gl-img:hover img { transform: scale(1.035); }
.dh-doc .gl-img::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); pointer-events: none; }
.dh-doc .gl figure { margin: 0; }
.dh-doc .gl figcaption { margin-top: 6px; font-size: 13.5px; line-height: 1.4; color: var(--gallery-caption); display: flex; flex-direction: column; gap: 1px; }
.dh-doc .gl figcaption b { color: var(--ink); font-weight: 600; }
.dh-doc .gl figcaption.is-alt span { font-size: 13px; }
.dh-doc .gl-grid { display: grid; grid-template-columns: repeat(var(--gallery-cols, 3), minmax(0, 1fr)); gap: var(--gallery-gap); align-items: start; }
.dh-doc .gl-one { max-width: 100%; }
.dh-doc .gl-car { position: relative; }
.dh-doc .gl-view { overflow: hidden; border-radius: var(--gallery-radius); touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.dh-doc .gl-view:active { cursor: grabbing; }
.dh-doc .gl-track { display: flex; transition: transform var(--dur-slow) var(--ease); will-change: transform; }
.dh-doc .gl-track.is-drag { transition: none; }
.dh-doc .gl-slide { flex: 0 0 100%; min-width: 0; }
.dh-doc .gl-slide img { border-radius: var(--gallery-radius); }
.dh-doc .gl-nav { position: absolute; top: calc(50% - 40px); width: 44px; height: 44px; padding: 0; background: rgb(255 255 255 / .82); color: rgb(10 17 36); box-shadow: var(--shadow-md); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dh-doc .gl-nav:hover:not(:disabled) { background: rgb(255 255 255); }
.dh-doc .gl-prev { left: 10px; }
.dh-doc .gl-next { right: 10px; }
.dh-doc .gl-dots { display: flex; justify-content: center; gap: 0; margin-top: 6px; }
.dh-doc .gl-dot { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dh-doc .gl-dot i { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); transition: width var(--dur) var(--ease), background var(--dur-fast); }
.dh-doc .gl-dot[aria-current="true"] i { width: 22px; border-radius: 4px; background: var(--acc); }
.dh-doc .lb { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--gallery-lightbox-bg); color: rgb(255 255 255); animation: lb-in var(--dur) var(--ease) both; }
@keyframes lb-in { from { opacity: 0; } }
.dh-doc .lb-top { display: flex; align-items: center; gap: 6px; padding: 10px 12px; }
.dh-doc .lb-count { font-size: 14px; font-variant-numeric: tabular-nums; opacity: .85; padding-left: 6px; }
.dh-doc .lb .m-ctl { background: rgba(255,255,255,.12); color: rgb(255 255 255); }
.dh-doc .lb .m-ctl:hover:not(:disabled) { background: rgba(255,255,255,.24); }
.dh-doc .lb-stage { position: relative; display: grid; place-items: center; overflow: hidden; touch-action: none; min-height: 0; }
.dh-doc .lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; transform-origin: 50% 50%; will-change: transform; }
.dh-doc .lb-nav { position: absolute; top: calc(50% - 22px); width: 48px; height: 48px; padding: 0; }
.dh-doc .lb-prev { left: 12px; }
.dh-doc .lb-next { right: 12px; }
.dh-doc .lb-cap { margin: 0; padding: 10px 16px 18px; text-align: center; font-size: 14.5px; line-height: 1.45; display: flex; flex-direction: column; gap: 2px; }
.dh-doc .lb-cap b { font-weight: 600; }
.dh-doc .lb-cap span { opacity: .8; }
@media (max-width: 640px) {
.dh-doc .gl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dh-doc .gl-nav { display: none; }
.dh-doc .lb-nav { width: 44px; height: 44px; }
}

/* ---- parts/gantt/style.css (scoped) ---- */
.dh-doc {
  --gantt-today: var(--hot); --gantt-grid: var(--line); --gantt-weekend: var(--surface-2); --gantt-edge: var(--ink-2);
  --gantt-progress: .55; --gantt-done: .45;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --gantt-today: var(--hot); --gantt-grid: var(--line); --gantt-weekend: var(--surface-2); --gantt-edge: var(--ink-2); --gantt-progress: .55; --gantt-done: .45; }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --gantt-today: var(--hot); --gantt-grid: var(--line); --gantt-weekend: var(--surface-2); --gantt-edge: var(--ink-2); --gantt-progress: .55; --gantt-done: .45; }
.dh-doc .gantt { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.dh-doc .gantt:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); }
.dh-doc .gantt-title { font: 600 var(--fs-s) var(--font-sans); color: var(--ink); margin: 0 0 8px; }
.dh-doc .gantt svg { display: block; max-width: none; }
.dh-doc .gantt .ctl { margin-top: 8px; }
.dh-doc .gantt .anim-cap { border-top: 0; padding-left: 0; padding-right: 0; }
.dh-doc .gantt-hint { margin: 8px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.dh-doc .gantt-bar { display: flex; gap: 6px; margin-bottom: 8px; }
.dh-doc .gantt-bar .btn { min-height: 28px; min-width: 24px; }
.dh-doc .gantt-bar .btn[aria-pressed="true"] { background: var(--acc); color: var(--on-acc); border-color: var(--acc); }
.dh-doc .gantt-body { display: flex; align-items: flex-start; min-width: 0; }
.dh-doc .gantt-names { flex: none; }
.dh-doc .gn-section { display: flex; align-items: center; font: 600 var(--fs-xs) var(--font-sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.dh-doc .gn-task { display: flex; align-items: center; font: 400 var(--fs-s) var(--font-sans); color: var(--ink); padding-right: 8px; }
.dh-doc .gn-task span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-doc .gantt-scroll { overflow-x: auto; min-width: 0; flex: 1; }
.dh-doc .gantt.is-phone .gantt-scroll { border-top: 1px solid var(--line); }
.dh-doc .gt-tick { font: 400 12px var(--font-sans); fill: var(--muted); }
.dh-doc .gt-grid { stroke: var(--gantt-grid); stroke-width: 1; }
.dh-doc .gt-weekend { fill: var(--gantt-weekend); opacity: .7; }
.dh-doc .gt-sec-bg { fill: var(--surface-2); }
.dh-doc .gt-sec-text { font: 600 12px var(--font-sans); fill: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.dh-doc .gt-today line { stroke: var(--gantt-today); stroke-width: 1.5; stroke-dasharray: 4 3; }
.dh-doc .gt-today-label { font: 600 12px var(--font-sans); fill: var(--hot-ink); }
.dh-doc .gt-dep { fill: none; stroke: var(--gantt-edge); stroke-width: 1.2; opacity: .75; }
.dh-doc .gt-arrowhead { fill: var(--gantt-edge); }
.dh-doc .gt-task { cursor: pointer; transition: transform var(--dur-slow) var(--ease); outline: none; }
.dh-doc .gt-barrect { transition: width var(--dur-slow) var(--ease), opacity var(--dur) var(--ease); }
.dh-doc .gt-prog { opacity: var(--gantt-progress); transition: width var(--dur-slow) var(--ease); pointer-events: none; }
.dh-doc .gt-task.is-done .gt-barrect { opacity: var(--gantt-done); }
.dh-doc .gt-task.is-done .gt-prog { opacity: 0; }
.dh-doc .gt-tick-done { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dh-doc .gt-task.is-critical .gt-barrect,
.dh-doc .gt-task.is-critical .gt-diamond { stroke: var(--ink); stroke-width: 2px; }
.dh-doc .gt-name { font: 500 12px var(--font-sans); fill: var(--ink); }
.dh-doc .gt-inbar { font: 600 12px var(--font-sans); fill: var(--on-acc); pointer-events: none; }
.dh-doc .gt-task:hover .gt-barrect,
.dh-doc .gt-task:focus-visible .gt-barrect { filter: brightness(1.08); }
.dh-doc .gt-task:focus-visible .gt-barrect,
.dh-doc .gt-task:focus-visible .gt-diamond { stroke: var(--ink); stroke-width: 2px; }
@media (prefers-reduced-motion: reduce) {
.dh-doc .gt-task,
.dh-doc .gt-barrect,
.dh-doc .gt-prog { transition: none; }
}
.dh-doc .gantt[data-dh-motion="off"] .gt-task,
.dh-doc .gantt[data-dh-motion="off"] .gt-barrect,
.dh-doc .gantt[data-dh-motion="off"] .gt-prog { transition: none; }
.dh-doc .gantt[data-dh-static] * { transition: none !important; animation: none !important; }
@container (max-width: 600px) {
.dh-doc .gantt { padding: 12px; }
}

/* ---- parts/glossary/style.css (scoped) ---- */
.dh-doc { --glossary-underline: var(--acc); --glossary-ink: inherit; --glossary-hover-bg: var(--acc-softer); --glossary-item-bg: var(--surface-2); --glossary-card-w: 320px; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --glossary-underline: var(--acc); --glossary-ink: inherit; --glossary-hover-bg: var(--acc-softer); --glossary-item-bg: var(--surface-2); --glossary-card-w: 320px; }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --glossary-underline: var(--acc); --glossary-ink: inherit; --glossary-hover-bg: var(--acc-softer); --glossary-item-bg: var(--surface-2); --glossary-card-w: 320px; }
.dh-doc .glossary-title { font: 600 var(--fs-m) var(--font-display); margin: 0 0 var(--s-3); display: flex; align-items: center; gap: 10px; }
.dh-doc .glossary-count { font: 500 var(--fs-xs) var(--font-sans); color: var(--muted); background: var(--surface-3); border-radius: var(--r-pill); padding: 1px 9px; }
.dh-doc .glossary-list { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--s-3); }
.dh-doc .glossary-item { background: var(--glossary-item-bg); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; scroll-margin-top: 80px; }
.dh-doc .glossary-item:target { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.dh-doc .glossary-item dt { font: 600 var(--fs-s) var(--font-display); color: var(--ink); }
.dh-doc .glossary-also { font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }
.dh-doc .glossary-item dd { margin: 4px 0 0; color: var(--ink-2); font-size: var(--fs-s); line-height: 1.5; }
.dh-doc .glossary-item dd a,
.dh-doc .glossary-def a { color: var(--acc-ink); }
.dh-doc .glossary-empty { color: var(--muted); font-size: var(--fs-s); margin: 0; }
.dh-doc .glossary-term { all: unset; position: relative; cursor: help; box-sizing: border-box; color: var(--glossary-ink); border-bottom: 1.5px dotted var(--glossary-underline); padding: 0 1px; border-radius: 3px; display: inline; }
.dh-doc .glossary-term:hover,
.dh-doc .glossary-term[aria-expanded="true"] { background: var(--glossary-hover-bg); }
.dh-doc .glossary-term:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); }
.dh-doc .glossary-term::after { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: max(24px, 100%); transform: translateY(-50%); }
@media (pointer: coarse) {
.dh-doc .glossary-term::after { height: max(40px, 100%); }
}
.dh-doc .glossary-card { box-sizing: border-box; }
.dh-doc .glossary-card:not(.dh-pop-sheet) { width: min(var(--glossary-card-w), calc(100vw - 16px)); }
.dh-doc .glossary-card .glossary-def { margin: 6px 0 0; }
.dh-doc .glossary-card .dh-pop-act { min-height: 32px; }

/* ---- parts/graph/style.css (scoped) ---- */
.dh-doc {
  --graph-h-s: 340px; --graph-h-m: 480px; --graph-h-l: 640px;   
  --graph-label-fs: var(--dg-label-fs, 13px);                    
  --graph-node-border: var(--dg-node-border, var(--line-2));     
  --graph-edge: var(--dg-edge, var(--muted));
  --graph-edge-w: var(--dg-edge-w, 1.5px);
  --graph-edge-alpha: .5;                                        
  --graph-group-alpha: .8;                                       
  --graph-fade: .13;                                             
  --graph-out: var(--acc);                                       
  --graph-in: var(--c5);                                         
  --graph-found: var(--warn);                                    
  --graph-ring: var(--acc);                                      
  --graph-stage-bg: var(--surface);
  --graph-dot: color-mix(in srgb, var(--line) 80%, transparent); 
  --graph-dur: var(--dur);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --graph-edge-alpha: .62; --graph-group-alpha: .85; --graph-fade: .17; --graph-stage-bg: var(--bg); --graph-dot: color-mix(in srgb, var(--line-2) 70%, transparent); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --graph-edge-alpha: .62; --graph-group-alpha: .85; --graph-fade: .17; --graph-stage-bg: var(--bg); --graph-dot: color-mix(in srgb, var(--line-2) 70%, transparent); }
.dh-doc .gr { container-type: inline-size; --graph-t: var(--muted); --graph-t-soft: var(--surface-2); --graph-t-ink: var(--ink); background: var(--part-bg, var(--surface)); border: 1px solid var(--part-border, var(--line)); border-radius: var(--part-radius, var(--r-l)); padding: var(--s-3); box-shadow: var(--part-shadow, var(--shadow-sm)); }
.dh-doc .gr .tone-acc { --graph-t: var(--acc); --graph-t-soft: var(--acc-soft); --graph-t-ink: var(--acc-ink); }
.dh-doc .gr .tone-muted,
.dh-doc .gr .tone-none { --graph-t: var(--line-2); --graph-t-soft: var(--surface-2); --graph-t-ink: var(--ink); }
.dh-doc .gr-title { font: 600 var(--fs-s)/1.3 var(--font-sans); color: var(--ink); margin: 2px 4px 10px; }
.dh-doc .gr-failed .gr-error { margin: 0; padding: 10px 12px; border-radius: var(--r-s); background: var(--bad-soft); color: var(--bad-ink); font-size: var(--fs-s); }
.dh-doc .gr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.dh-doc .gr-find { position: relative; flex: 1 1 220px; min-width: 0; }
.dh-doc .gr-find-icon { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.dh-doc .gr-find-input { width: 100%; height: var(--ctl-h, 40px); padding: 0 12px 0 36px; border: 1px solid var(--line); border-radius: var(--ctl-radius, var(--r-pill)); background: var(--ctl-bg, var(--surface-2)); color: var(--ctl-ink, var(--ink)); font: 400 var(--fs-s) var(--font-sans); }
.dh-doc .gr-find-input::placeholder { color: var(--faint); }
.dh-doc .gr-find-input:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); }
.dh-doc .gr-hits { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 4px; list-style: none; background: var(--pop-bg, var(--surface)); color: var(--pop-ink, var(--ink)); border: 1px solid var(--pop-border, var(--line-2)); border-radius: var(--pop-radius, var(--r-m)); box-shadow: var(--pop-shadow, var(--shadow-md)); max-height: 320px; overflow: auto; }
.dh-doc .gr-hits-none { padding: 10px 12px; font-size: var(--fs-s); color: var(--muted); }
.dh-doc .gr-hits button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 6px 10px; border: 0; border-radius: var(--r-s); background: transparent; color: inherit; font: 400 var(--fs-s) var(--font-sans); text-align: left; cursor: pointer; }
.dh-doc .gr-hits button.is-on,
.dh-doc .gr-hits button:hover { background: var(--acc-softer); }
.dh-doc .gr-hits code { font: 400 var(--fs-xs) var(--font-mono); color: var(--muted); }
.dh-doc .gr-hit-l { font-weight: 500; overflow-wrap: anywhere; }
.dh-doc .gr-hit-w { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.dh-doc .gr-seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--ctl-radius, var(--r-pill)); background: var(--ctl-bg, var(--surface-2)); border: 1px solid var(--line); }
.dh-doc .gr-seg-l { padding: 0 6px 0 10px; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }
.dh-doc .gr-seg button,
.dh-doc .gr-btn { height: calc(var(--ctl-h, 40px) - 8px); min-width: 40px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ctl-ink, var(--ink)); font: 500 var(--fs-xs) var(--font-sans); cursor: pointer; white-space: nowrap; }
.dh-doc .gr-seg button[aria-pressed="true"] { background: var(--surface); color: var(--acc-ink); box-shadow: var(--shadow-sm); }
.dh-doc .gr-btn { height: var(--ctl-h, 40px); padding: 0 14px; border: 1px solid var(--line); background: var(--ctl-bg, var(--surface-2)); }
.dh-doc .gr-btn:hover,
.dh-doc .gr-seg button:hover { color: var(--acc-ink); }
.dh-doc .gr-btn-s { height: 32px; min-width: 52px; padding: 0 10px; }
.dh-doc .gr button:disabled,
.dh-doc .gr input:disabled { opacity: .55; cursor: default; }
.dh-doc .gr button:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); }
.dh-doc .gr-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
@container (min-width: 700px) {
.dh-doc .gr-body { grid-template-columns: minmax(0, 1fr) 248px; }
.dh-doc .gr-side { max-height: var(--graph-h); overflow: auto; }
}
.dh-doc .gr { --graph-h: var(--graph-h-m); }
.dh-doc .gr.size-s { --graph-h: var(--graph-h-s); }
.dh-doc .gr.size-l { --graph-h: var(--graph-h-l); }
.dh-doc .gr-stage { position: relative; height: min(var(--graph-h), 68vh); min-height: 260px; border-radius: var(--r-m); border: 1px solid var(--line); background-color: var(--graph-stage-bg); background-image: radial-gradient(circle, var(--graph-dot) 1px, transparent 1.3px); background-size: 22px 22px; overflow: hidden; touch-action: none; }
.dh-doc .gr-cy { position: absolute; inset: 0; z-index: 1; }
.dh-doc .gr-hulls { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.dh-doc .gr-hull-names { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.dh-doc .gr-hull { opacity: var(--graph-group-alpha); transition: opacity var(--dur) var(--ease); }
.dh-doc .gr-hull-fill { fill: var(--graph-t-soft); stroke: var(--graph-t-soft); stroke-linejoin: round; }
.dh-doc .gr-hull-edge { fill: none; stroke: var(--graph-t); stroke-linejoin: round; stroke-opacity: .45; }
.dh-doc .gr-hull.is-faded { opacity: calc(var(--graph-group-alpha) * .35); }
.dh-doc .gr-hull.is-sel .gr-hull-edge { stroke: var(--acc); stroke-opacity: 1; }
.dh-doc .gr-hull.is-kb .gr-hull-edge { stroke: var(--graph-ring); stroke-opacity: 1; stroke-dasharray: 6 4; }
.dh-doc .gr-hull-l { font: 600 13px var(--font-sans); fill: var(--graph-t-ink); paint-order: stroke; stroke: var(--graph-stage-bg); stroke-width: 4px; stroke-linejoin: round; }
.dh-doc .gr-hull-l.is-faded { opacity: .4; }
.dh-doc .gr-lods { position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; }
.dh-doc .gr-lod { position: absolute; left: 0; top: 0; box-sizing: border-box; height: 22px; padding: 0 9px; border: 1.5px solid var(--graph-t); border-radius: 11px; background: var(--graph-t-soft); color: var(--graph-t-ink); font: 500 12px/19px var(--font-sans); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: var(--shadow-sm); }
.dh-doc .gr-lod.is-folded { border: 3px double var(--graph-t); font-weight: 600; }
.dh-doc .gr-lod[hidden] { display: none; }
.dh-doc .gr-still { position: absolute; inset: 0; z-index: 2; overflow: auto; display: flex; flex-direction: column; align-items: center; padding: 12px; background: color-mix(in srgb, var(--graph-stage-bg) 88%, transparent); }
.dh-doc .gr-still-svg { display: block; width: auto; height: auto; max-width: 100%; margin: auto auto 0; flex: none; }
.dh-doc .gr-still-note { margin: 10px 0 auto; font-size: var(--fs-xs); color: var(--muted); text-align: center; }
.dh-doc .gr-still-item rect { fill: var(--graph-t-soft); stroke: var(--graph-t); stroke-width: 1.5; }
.dh-doc .gr-still-item.is-group rect { stroke-width: 2.5; }
.dh-doc .gr-still-item text { font: 500 13px var(--font-sans); fill: var(--graph-t-ink); }
.dh-doc .gr-still-item .gr-still-n { font-weight: 600; font-size: 13px; fill: var(--graph-t-ink); }
.dh-doc .gr-still-edge path { fill: none; stroke: var(--graph-edge); opacity: .75; }
.dh-doc .gr-still-head { fill: var(--graph-edge); }
.dh-doc .gr-still-count { font: 600 13px var(--font-sans); fill: var(--ink-2); text-anchor: middle; paint-order: stroke; stroke: var(--graph-stage-bg); stroke-width: 4px; }
.dh-doc .gr-tag { position: absolute; left: 0; top: 0; z-index: 5; display: flex; flex-direction: row; align-items: baseline; gap: 6px; max-width: min(300px, 80%); padding: 4px 10px; border-radius: var(--r-s); background: var(--pop-bg, var(--surface)); color: var(--pop-ink, var(--ink)); border: 1.5px solid var(--graph-t); box-shadow: var(--pop-shadow, var(--shadow-md)); pointer-events: none; transition: transform var(--dur-fast) var(--ease); }
.dh-doc .gr-tag b { font: 600 var(--fs-s)/1.25 var(--font-sans); color: var(--graph-t-ink); overflow-wrap: anywhere; }
.dh-doc .gr-tag-m { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dh-doc .gr-tag.is-kb { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
.dh-doc .gr-tag { transition: none; }
}
.dh-doc .gr-kb-list { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.dh-doc .gr-kb-list button { position: absolute; left: 0; top: 0; margin: 0; padding: 0; border: 0; border-radius: var(--r-pill); background: transparent; pointer-events: none; }
.dh-doc .gr-kb-list button:not(:focus) { width: 1px !important; height: 1px !important; clip-path: inset(50%); overflow: hidden; }
.dh-doc .gr-kb-list button:focus-visible { outline: 3px solid var(--graph-ring); outline-offset: 2px; }
.dh-doc .gr-zoom { position: absolute; right: 8px; bottom: 8px; z-index: 6; display: flex; flex-direction: column; gap: 2px; padding: 3px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.dh-doc .gr-zoom button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; }
.dh-doc .gr-zoom button:hover { background: var(--surface-2); color: var(--acc-ink); }
.dh-doc .gr-zoom svg { width: 16px; height: 16px; }
.dh-doc .gr-hint { margin: 8px 4px 0; font-size: var(--fs-xs); color: var(--muted); }
.dh-doc .gr-side { font-size: var(--fs-s); color: var(--ink-2); min-width: 0; }
.dh-doc .gr-sum { margin: 2px 0 10px; color: var(--muted); }
.dh-doc .gr-sum b { color: var(--ink); font-weight: 600; }
.dh-doc .gr-tip { margin: 10px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.dh-doc .gr-list { margin-top: 10px; }
.dh-doc .gr-list-h { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; font: 600 var(--fs-xs) var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.dh-doc .gr-list-h span { font-weight: 500; letter-spacing: 0; color: var(--faint); }
.dh-doc .gr-list ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.dh-doc .gr-list li { margin: 0; }
.dh-doc .gr-list li > button:not(.gr-btn) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; width: 100%; min-height: 36px; padding: 6px 8px; border: 0; border-radius: var(--r-s); background: transparent; color: var(--ink); font: 400 var(--fs-s)/1.3 var(--font-sans); text-align: left; cursor: pointer; }
.dh-doc .gr-list li > button:not(.gr-btn):hover { background: var(--surface-2); }
.dh-doc .gr-list.is-out .gr-arrow { color: var(--graph-out); }
.dh-doc .gr-list.is-in .gr-arrow { color: var(--graph-in); }
.dh-doc .gr-arrow { font-weight: 600; }
.dh-doc .gr-l { overflow-wrap: anywhere; }
.dh-doc .gr-n { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.dh-doc .gr-e { flex-basis: 100%; padding-left: 30px; font-size: 12px; color: var(--muted); }
.dh-doc .gr-none,
.dh-doc .gr-more { margin: 2px 8px; font-size: var(--fs-xs); color: var(--faint); }
.dh-doc .gr-grow { display: flex; align-items: center; gap: 4px; }
.dh-doc .gr-grow-l { flex: 1; min-width: 0; }
.dh-doc .gr-dot { flex: none; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--graph-t-soft); border: 2px solid var(--graph-t); }
.dh-doc .gr-info-head { display: flex; align-items: flex-start; gap: 8px; }
.dh-doc .gr-info-head .gr-dot { margin-top: 6px; }
.dh-doc .gr-info-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dh-doc .gr-info-t b { font: 600 var(--fs-m)/1.3 var(--font-sans); color: var(--ink); overflow-wrap: anywhere; }
.dh-doc .gr-info-t code { align-self: flex-start; max-width: 100%; padding: 0; border: 0; background: none; font: 400 var(--fs-xs) var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
.dh-doc .gr-x { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin: -6px -6px 0 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.dh-doc .gr-x:hover { background: var(--surface-2); color: var(--ink); }
.dh-doc .gr-x svg { width: 14px; height: 14px; }
.dh-doc .gr-info-g { margin-top: 6px; font-size: var(--fs-xs); color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dh-doc .gr-chip { min-height: var(--chip-h, 28px); padding: 2px 10px; border: 1.5px solid var(--graph-t); border-radius: var(--chip-radius, var(--r-pill)); background: var(--graph-t-soft); color: var(--graph-t-ink); font: 500 var(--chip-fs, var(--fs-xs)) var(--font-sans); cursor: pointer; }
.dh-doc .gr-note { margin: 8px 0 0; padding: 8px 10px; border-radius: var(--r-s); background: var(--surface-2); font-size: var(--fs-xs); line-height: 1.45; color: var(--ink-2); }
.dh-doc .gr-info-fold { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 6px 6px 6px 10px; border-radius: var(--r-m); background: var(--graph-t-soft); color: var(--graph-t-ink); font-size: var(--fs-xs); font-weight: 500; }
.dh-doc .gr-info-fold .gr-btn { height: 32px; background: var(--surface); }
.dh-doc .gr-still-static { position: static; inset: auto; z-index: auto; display: block; padding: 4px 0 0; background: none; overflow-x: auto; }
.dh-doc .gr-still-static .gr-still-svg { width: auto; margin: 0 auto; }
.dh-doc .gr-still-static .gr-still-note { margin: 8px 0 0; }

/* ---- parts/http/style.css (scoped) ---- */
.dh-doc {
  --http-method-get: var(--c2); --http-method-post: var(--c1); --http-method-put: var(--c3); --http-method-patch: var(--c4); --http-method-delete: var(--c7);
  --http-status-2xx: var(--good); --http-status-3xx: var(--acc); --http-status-4xx: var(--warn); --http-status-5xx: var(--bad);
  --http-body-bg: var(--term); --http-body-ink: var(--term-ink); --http-body-max: 420px;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --http-body-bg: var(--term); --http-status-2xx: var(--good); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --http-body-bg: var(--term); --http-status-2xx: var(--good); }
.dh-doc .http { display: grid; gap: 10px; min-width: 0; }
.dh-doc .http-title { font: 600 var(--fs-s) var(--font-display); color: var(--ink); }
.dh-doc .http-msg { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; border-left: 4px solid var(--line-2); min-width: 0; }
.dh-doc .http-req { border-left-color: var(--c1); }
.dh-doc .http-res { border-left-color: var(--line-2); }
.dh-doc .http-line { display: flex; align-items: center; gap: 10px; padding: 12px 14px; flex-wrap: wrap; }
.dh-doc .http-method { font: 700 12.5px var(--font-mono); letter-spacing: .04em; padding: 4px 11px; border-radius: var(--r-pill); color: var(--on-acc); background: var(--c1); }
.dh-doc .http-method.tone-c2 { background: var(--http-method-get); }
.dh-doc .http-method.tone-c1 { background: var(--http-method-post); }
.dh-doc .http-method.tone-c3 { background: var(--http-method-put); }
.dh-doc .http-method.tone-c4 { background: var(--http-method-patch); }
.dh-doc .http-method.tone-c7 { background: var(--http-method-delete); }
.dh-doc .http-method.tone-c6 { background: var(--c6); }
.dh-doc .http-url { font: 500 14px var(--font-mono); color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.dh-doc .http-host { color: var(--muted); font-weight: 400; }
.dh-doc .http-path { color: var(--ink); }
.dh-doc .http-q { color: var(--muted); }
.dh-doc .http-q b { color: var(--acc-ink); font-weight: 500; }
.dh-doc .http-q em { font-style: normal; color: var(--c8-ink); }
.dh-doc .http-q i { font-style: normal; color: var(--faint); }
.dh-doc .http-ver { font: 400 12px var(--font-mono); color: var(--faint); }
.dh-doc .http-copy { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); border-radius: var(--r-pill); padding: 0 12px; min-height: 36px; font: 500 12.5px var(--font-sans); cursor: pointer; }
.dh-doc .http-copy:hover { border-color: var(--acc); color: var(--acc-ink); }
.dh-doc .http-copy:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.dh-doc .http-status { display: inline-flex; align-items: center; gap: 8px; font: 500 14px var(--font-sans); padding: 4px 14px 4px 5px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink); }
.dh-doc .http-status b { font: 700 13px var(--font-mono); padding: 2px 10px; border-radius: var(--r-pill); color: var(--on-acc); }
.dh-doc .http-status.tone-good b { background: var(--http-status-2xx); }
.dh-doc .http-status.tone-acc b { background: var(--http-status-3xx); }
.dh-doc .http-status.tone-warn b { background: var(--http-status-4xx); }
.dh-doc .http-status.tone-bad b { background: var(--http-status-5xx); }
.dh-doc .http-status.tone-muted b { background: var(--muted); }
.dh-doc .http-heads { border-top: 1px solid var(--line); background: var(--surface-2); padding: 8px 14px; }
.dh-doc .http-heads dl { margin: 0; display: grid; gap: 2px; }
.dh-doc .http-heads dl > div { display: grid; grid-template-columns: minmax(8em, max-content) 1fr; gap: 12px; font: 400 13px/1.5 var(--font-mono); }
.dh-doc .http-heads dt { color: var(--acc-ink); font-weight: 500; overflow-wrap: anywhere; }
.dh-doc .http-heads dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.dh-doc .http-more { all: unset; cursor: pointer; margin-top: 6px; color: var(--acc-ink); font: 500 12.5px var(--font-sans); min-height: 28px; display: inline-flex; align-items: center; }
.dh-doc .http-more:hover { text-decoration: underline; }
.dh-doc .http-more:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }
.dh-doc .http-body { border-top: 1px solid var(--line); background: var(--http-body-bg); color: var(--http-body-ink); padding: 12px 14px; overflow-x: auto; font: 400 13px/1.6 var(--font-mono); max-height: var(--http-body-max); overflow-y: auto; }
.dh-doc .http-body:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.dh-doc .http-body pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.dh-doc .http-arrow { display: flex; justify-content: center; color: var(--faint); margin: -2px 0; }
.dh-doc .http-src { margin: 0; padding: 12px 14px; background: var(--http-body-bg); color: var(--http-body-ink); border-radius: var(--r-m); overflow-x: auto; font: 400 13px/1.6 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.dh-doc .http-plain .cw-error { border-radius: var(--r-m); margin-bottom: 8px; }
.dh-doc .j-node,
.dh-doc .j-kids { display: block; }
.dh-doc .j-kids { padding-left: 1.4em; border-left: 1px dashed var(--term-line); margin-left: .45em; }
.dh-doc .j-row { display: flex; flex-wrap: wrap; align-items: baseline; white-space: pre-wrap; min-height: 1.6em; overflow-wrap: anywhere; }
.dh-doc .j-fold { all: unset; cursor: pointer; width: 28px; height: 28px; margin: -3px 0 -3px -7px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; flex: none; align-self: center; }
.dh-doc .j-fold:hover { background: var(--acc-softer); }
.dh-doc .j-fold:focus-visible { outline: 2px solid var(--acc-2); outline-offset: 1px; }
.dh-doc .j-fold .chev { color: var(--term-faint); }
.dh-doc .j-row > .j-key:first-child,
.dh-doc .j-row > .j-p:first-child { margin-left: 21px; }
.dh-doc [data-dh-static] .j-row > .j-key:first-child,
.dh-doc [data-dh-static] .j-row > .j-p:first-child { margin-left: 0; }
.dh-doc .j-key { color: var(--ch-3); }
.dh-doc .j-str { color: var(--ch-8); }
.dh-doc .j-num { color: var(--ch-2); }
.dh-doc .j-bool,
.dh-doc .j-null { color: var(--ch-5); }
.dh-doc .j-p { color: var(--term-faint); }
.dh-doc .j-sum { color: var(--term-faint); font-style: italic; }
@container (max-width: 520px) {
.dh-doc .http-heads dl > div { grid-template-columns: 1fr; gap: 0; margin-bottom: 4px; }
.dh-doc .http-copy { margin-left: 0; }
}

/* ---- parts/log/style.css (scoped) ---- */
.dh-doc { --log-debug: var(--faint); --log-info: color-mix(in oklab, var(--c6) 75%, var(--ink)); --log-warn: color-mix(in oklab, var(--warn) 80%, var(--ink)); --log-error: var(--bad); --log-time: var(--muted); --log-highlight: var(--warn); --log-level: var(--ink); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --log-time: var(--muted); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --log-time: var(--muted); }
.dh-doc .lg { border: 1px solid var(--part-border, var(--line)); border-radius: var(--part-radius, var(--r-m, 12px)); background: var(--part-bg, var(--surface)); padding: var(--part-pad, 14px); display: flex; flex-direction: column; gap: 10px; min-width: 0; font-size: 14px; }
.dh-doc .lg button { font: inherit; color: inherit; cursor: pointer; }
.dh-doc .lg button:focus-visible,
.dh-doc .lg input:focus-visible,
.dh-doc .lg-line:focus-visible,
.dh-doc .lg summary:focus-visible {
  outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); }
.dh-doc .lg-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dh-doc .lg-title { font-weight: 600; margin-right: auto; }
.dh-doc .lg .chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: var(--r-pill, 999px); background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.dh-doc .lg-input { flex: 1; min-width: 0; min-height: 40px; padding: 4px 12px; border: 1px solid var(--line-2); border-radius: var(--r-s, 8px); background: var(--surface); color: var(--ink); font: 14px/1.4 var(--font-mono); }
.dh-doc .lg-bar,
.dh-doc .lg-bar2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dh-doc .lg-lab { font: 600 12px var(--font-mono); color: var(--muted); }
.dh-doc .lg-btn { min-height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-pill, 999px); background: var(--surface-2); }
.dh-doc .lg-btn:hover { background: var(--acc-soft); }
.dh-doc .lg-btn[aria-pressed="true"] { background: var(--acc-soft); border-color: var(--acc); }
.dh-doc .lg-status { font-size: 12px; color: var(--muted); min-height: 18px; }
.dh-doc .lg-err { color: var(--bad); font-weight: 500; }
.dh-doc .lg-label { font: 12px var(--font-mono); }
.dh-doc .lg-hls { border: 1px solid var(--line); border-radius: var(--r-s, 8px); padding: 8px 10px; background: var(--surface-2); }
.dh-doc .lg-hls-h { font: 600 12px var(--font-sans); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.dh-doc .lg-hl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dh-doc .lg-hl,
.dh-doc .lg-why { --log-highlight: var(--warn); text-align: left; min-height: 32px; padding: 4px 12px; border: 1px solid color-mix(in oklab, var(--log-highlight) 55%, var(--line)); border-left-width: 4px; border-radius: var(--r-s, 8px); background: color-mix(in oklab, var(--log-highlight) 12%, var(--surface)); }
.dh-doc .lg-hl[aria-pressed="true"] { background: color-mix(in oklab, var(--log-highlight) 24%, var(--surface)); }
.dh-doc .lg-note { margin-top: 8px; font-size: 13px; padding: 6px 10px; border-radius: var(--r-s, 8px); background: var(--surface); border: 1px solid var(--line); }
.dh-doc .lg-note code { font: 12px var(--font-mono); }
.dh-doc .lg .tone-c1 { --log-highlight: var(--c1); }
.dh-doc .lg .tone-c2 { --log-highlight: var(--c2); }
.dh-doc .lg .tone-c3 { --log-highlight: var(--c3); }
.dh-doc .lg .tone-c4 { --log-highlight: var(--c4); }
.dh-doc .lg .tone-c5 { --log-highlight: var(--c5); }
.dh-doc .lg .tone-c6 { --log-highlight: var(--c6); }
.dh-doc .lg .tone-c7 { --log-highlight: var(--c7); }
.dh-doc .lg .tone-c8 { --log-highlight: var(--c8); }
.dh-doc .lg .tone-acc { --log-highlight: var(--acc); }
.dh-doc .lg .tone-good { --log-highlight: var(--good); }
.dh-doc .lg .tone-warn { --log-highlight: var(--warn); }
.dh-doc .lg .tone-bad { --log-highlight: var(--bad); }
.dh-doc .lg .tone-muted { --log-highlight: var(--muted); }
.dh-doc .lg-levels { display: flex; gap: 6px; flex-wrap: wrap; }
.dh-doc .lg-lvbtn { min-height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-pill, 999px); background: var(--surface-2); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.dh-doc .lg-lvbtn[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.dh-doc .lg-n { font-weight: 400; color: var(--muted); }
.dh-doc .lg .lv-debug { --log-level: var(--log-debug); }
.dh-doc .lg .lv-info { --log-level: var(--log-info); }
.dh-doc .lg .lv-warn { --log-level: var(--log-warn); }
.dh-doc .lg .lv-error { --log-level: var(--log-error); }
.dh-doc .lg-lvbtn[aria-pressed="true"] { color: var(--log-level); border-color: color-mix(in oklab, var(--log-level) 55%, var(--line)); }
.dh-doc .lg-lines { list-style: none; margin: 0; padding: 0; font: 13px/1.5 var(--font-mono); border: 1px solid var(--line); border-radius: var(--r-s, 8px); max-height: 460px; overflow: auto; }
.dh-doc .lg-line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 3px 10px 3px 8px; border-left: 4px solid transparent; border-bottom: 1px solid var(--line); }
.dh-doc .lg-line:last-child { border-bottom: 0; }
.dh-doc .lg-line.is-lit { border-left-color: var(--log-highlight, var(--warn)); background: color-mix(in oklab, var(--log-highlight, var(--warn)) 9%, var(--surface)); }
.dh-doc .lg-no { color: var(--faint); min-width: 3ch; text-align: right; user-select: none; }
.dh-doc .lg-time { color: var(--log-time); }
.dh-doc .lg-t-short { display: none; }
.dh-doc .lg-msg { flex: 1 1 24ch; min-width: 0; overflow-wrap: anywhere; }
.dh-doc .lg-lv { color: var(--log-level, var(--ink)); font-weight: 600; text-transform: uppercase; }
.dh-doc .lg-m { background: color-mix(in oklab, var(--log-highlight, var(--acc)) 30%, transparent); border-radius: 3px; box-shadow: 0 0 0 1px color-mix(in oklab, var(--log-highlight, var(--acc)) 50%, transparent); }
.dh-doc .lg-rep { font-size: 12px; }
.dh-doc .lg-why { font: 12px var(--font-sans); min-height: 24px; padding: 0 8px; }
.dh-doc .lg-subset { font-size:12px; color:var(--muted); }
.dh-doc .lg-subset summary { min-height:24px; cursor:pointer; }
.dh-doc .lg-trace-link { display:none; min-height:24px; color:var(--acc); background:var(--surface); border:1px solid var(--line); border-radius:var(--r-s); }
.dh-doc .lg-line[data-trace-linked="1"] .lg-trace-link { display:inline-flex; }
.dh-doc .lg-line[data-linked="1"] { outline:2px solid var(--acc); background:var(--acc-soft); }
@container (max-width:600px) {
.dh-doc .lg { padding:10px; }
.dh-doc .lg-t-full { display:none; }
.dh-doc .lg-t-short { display:inline; }
.dh-doc .lg-msg { flex-basis:100%; }
}
.dh-doc .lg[data-dh-static] .lg-bar,
.dh-doc .lg[data-dh-static] .lg-bar2 { display:none; }
@media print {
.dh-doc .lg-bar,
.dh-doc .lg-bar2,
.dh-doc .lg-trace-link { display:none !important; }
}
.dh-doc .lg-title,
.dh-doc .lg-hl,
.dh-doc .lg-why,
.dh-doc .lg-note { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.dh-doc .lg .lg-label { min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere; }

/* ---- parts/lottie/style.css (scoped) ---- */
.dh-doc {
  --lottie-bg: var(--surface);
  --lottie-radius: var(--r-l);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --lottie-bg: var(--surface); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --lottie-bg: var(--surface); }
.dh-doc .lt { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--part-pad, var(--s-4)); border: 1px solid var(--part-border, var(--line)); border-radius: var(--lottie-radius); background: var(--lottie-bg); box-shadow: var(--part-shadow, var(--shadow-sm)); }
.dh-doc .lt-stage { position: relative; display: grid; place-items: center; border-radius: var(--r-m); background: radial-gradient(120% 120% at 50% 0%, var(--acc-softer), var(--surface-2)); overflow: hidden; }
.dh-doc .lt-holder { position: absolute; inset: 0; }
.dh-doc .lt-holder svg { width: 100% !important; height: 100% !important; display: block; }
.dh-doc .lt-load { position: absolute; font-size: 13px; color: var(--muted); }
.dh-doc .lt-stage .m-err { position: absolute; left: 12px; right: 12px; }
.dh-doc .lt-row .lt-range { flex: 1 1 120px; min-width: 100px; }
.dh-doc .lt-frame { font-family: var(--font-mono); font-size: 12px; color: var(--muted); min-width: 9.5ch; text-align: right; font-variant-numeric: tabular-nums; }
.dh-doc .lt-alt { margin: 0; font-size: 13.5px; color: var(--muted); }
@media (max-width: 640px) {
.dh-doc .lt-frame { display: none; }
}

/* ---- parts/map/style.css (scoped) ---- */
.dh-doc { --map-heat-lo:var(--c1-soft); --map-heat-mid:var(--c2-soft); --map-heat-hi:var(--c2); --map-heat-neg:var(--c1); --map-pin:var(--c1-soft); --map-pin-ink:var(--c1-ink); --map-route-w:4px; --map-route-casing:var(--surface); --map-h:420px; --map-ocean:var(--surface-2); --map-land:var(--surface); --map-border:var(--line-2); --map-graticule:var(--line); --map-region-line:var(--line-2); --map-region-hover:var(--acc); --map-arc-opacity:.7; --map-globe-h:520px; --map-halo:color-mix(in srgb,var(--acc) 20%,transparent); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) {--map-arc-opacity:.8;}
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] {--map-arc-opacity:.8;}
.dh-doc .pl-c1 { --map-colour: var(--c1); --map-colour-soft: var(--c1-soft); --map-colour-ink: var(--c1-ink); }
.dh-doc .pl-c2 { --map-colour: var(--c2); --map-colour-soft: var(--c2-soft); --map-colour-ink: var(--c2-ink); }
.dh-doc .pl-c3 { --map-colour: var(--c3); --map-colour-soft: var(--c3-soft); --map-colour-ink: var(--c3-ink); }
.dh-doc .pl-c4 { --map-colour: var(--c4); --map-colour-soft: var(--c4-soft); --map-colour-ink: var(--c4-ink); }
.dh-doc .pl-c5 { --map-colour: var(--c5); --map-colour-soft: var(--c5-soft); --map-colour-ink: var(--c5-ink); }
.dh-doc .pl-c6 { --map-colour: var(--c6); --map-colour-soft: var(--c6-soft); --map-colour-ink: var(--c6-ink); }
.dh-doc .pl-c7 { --map-colour: var(--c7); --map-colour-soft: var(--c7-soft); --map-colour-ink: var(--c7-ink); }
.dh-doc .pl-c8 { --map-colour: var(--c8); --map-colour-soft: var(--c8-soft); --map-colour-ink: var(--c8-ink); }
.dh-doc .pl-acc { --map-colour: var(--acc); --map-colour-soft: var(--acc-soft); --map-colour-ink: var(--acc-ink); }
.dh-doc .pl-good { --map-colour: var(--good); --map-colour-soft: var(--good-soft); --map-colour-ink: var(--good-ink); }
.dh-doc .pl-warn { --map-colour: var(--warn); --map-colour-soft: var(--warn-soft); --map-colour-ink: var(--warn-ink); }
.dh-doc .pl-bad { --map-colour: var(--bad); --map-colour-soft: var(--bad-soft); --map-colour-ink: var(--bad-ink); }
.dh-doc .pl-muted { --map-colour: var(--muted); --map-colour-soft: var(--surface-3); --map-colour-ink: var(--ink-2); }
.dh-doc .map { border: 1px solid var(--part-border, var(--line)); border-radius: var(--part-radius, var(--r-l)); background: var(--part-bg, var(--surface)); box-shadow: var(--part-shadow, var(--shadow-sm)); overflow: hidden; font-family: var(--font-sans); }
.dh-doc .map-title { padding: 12px 16px 8px; font-weight: 600; font-size: 15px; color: var(--ink); }
.dh-doc .map-stage { position: relative; height: var(--map-h, 420px); background: var(--surface-2); overflow: hidden; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.dh-doc .map-stage:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: -3px; }
.dh-doc .map-base { position: absolute; inset: 0; z-index: 0; }
.dh-doc .map-base.leaflet-container { background: var(--surface-2); font: inherit; }
.dh-doc .map-svg { position: absolute; inset: 0; z-index: 1; pointer-events: none; display: block; }
.dh-doc .map-field { fill: var(--surface-2); }
.dh-doc .map-grid line { stroke: var(--line); stroke-width: 1; opacity: .8; }
.dh-doc .map-area { fill: var(--map-area-fill, color-mix(in srgb, var(--map-colour) 20%, transparent)); stroke: var(--map-colour); stroke-width: 2; stroke-linejoin: round; animation: map-fade var(--dur-slow, 560ms) var(--ease-out, ease-out) both; }
.dh-doc .map-route .map-casing,
.dh-doc .map-route .map-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dh-doc .map-route .map-casing { stroke: var(--map-route-casing, var(--surface)); stroke-width: calc(var(--map-route-w, 4px) + 3px); opacity: .9; }
.dh-doc .map-route .map-line { stroke: var(--map-colour); stroke-width: var(--map-route-w, 4px); }
.dh-doc .map-route.is-dashed .map-line { stroke-dasharray: 9 8; animation: map-fade var(--dur-slow, 560ms) both; }
.dh-doc .map-route.is-dashed .map-casing { stroke-dasharray: 9 8; opacity: .0; }
.dh-doc .map-route.is-solid .map-casing,
.dh-doc .map-route.is-solid .map-line { stroke-dasharray: 1; animation: map-draw var(--dur-slow, 560ms) var(--ease-out, ease-out) both; }
@keyframes map-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes map-fade { from { opacity: 0; } to { opacity: 1; } }
.dh-doc .map-pins { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.dh-doc .map-pin-anchor { position: absolute; inset: 0; }
.dh-doc .map-pin-anchor > .map-pin { left: 0; top: 0; }
.dh-doc .map-pin { position: absolute; transform: translate(-50%, -50%); width: 40px; height: 40px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; display: grid; place-items: center; color: var(--ink); font-family: inherit; }
.dh-doc .map-dot { box-sizing: border-box; width: 26px; height: 26px; border-radius: 50%; background: var(--map-colour-soft, var(--map-pin, var(--c1-soft))); color: var(--map-pin-ink, var(--on-acc)); border: 2px solid var(--map-colour,var(--c1)); box-shadow: var(--shadow-sm); display: inline-grid; place-items: center; font: 600 12px/1 var(--font-sans); }
.dh-doc .pl-c3 .map-dot,
.dh-doc .pl-warn .map-dot,
.dh-doc .pl-good .map-dot { color:var(--map-colour-ink); }
.dh-doc .map-pin.is-on .map-dot,
.dh-doc .map-pin:hover .map-dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--map-colour) 30%, transparent), var(--shadow-sm); }
.dh-doc .map-pin-label { position: absolute; left: calc(50% + 16px); top: 50%; transform: translateY(-50%); font: 500 12px/1.3 var(--font-sans); color: var(--ink); background: color-mix(in srgb, var(--surface) 88%, transparent); padding: 1px 6px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.dh-doc .map-ctl { position: absolute; top: 8px; right: 8px; z-index: 4; display: flex; flex-direction: column; gap: 6px; }
.dh-doc .map-btn { width: var(--ctl-h, 40px); height: var(--ctl-h, 40px); border-radius: var(--ctl-radius, var(--r-pill)); border: 1px solid var(--line-2); background: var(--ctl-bg, var(--surface)); color: var(--ctl-ink, var(--ink)); font: 500 20px/1 var(--font-sans); cursor: pointer; box-shadow: var(--shadow-sm); padding: 0; }
.dh-doc .map-btn svg { display: block; margin: auto; }
.dh-doc .map-btn:hover { border-color: var(--acc); color: var(--acc-ink); }
.dh-doc .map-scale { position: absolute; left: 10px; bottom: 8px; z-index: 4; display: flex; flex-direction: column; gap: 2px; font: 500 11px/1.2 var(--font-mono); color: var(--ink-2); background: color-mix(in srgb, var(--surface) 82%, transparent); padding: 3px 6px; border-radius: 6px; pointer-events: none; }
.dh-doc .map-scale span { display: block; height: 5px; border: 2px solid var(--ink-2); border-top: 0; box-sizing: border-box; }
.dh-doc .map-attr { position: absolute; right: 0; bottom: 0; z-index: 4; font: 400 11px/1.3 var(--font-sans); background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 2px 6px; border-top-left-radius: 6px; }
.dh-doc .map-attr a { color: var(--ink-2); }
.dh-doc .map-hint { margin: 0; padding: 6px 14px; font: 400 12px/1.4 var(--font-sans); color: var(--muted); border-top: 1px solid var(--line); }
.dh-doc .map-note { margin: 0; padding: 6px 14px; font: 500 12px/1.4 var(--font-sans); color: var(--warn-ink); background: var(--warn-soft); }
.dh-doc .map-cap { margin: 0; padding: 8px 14px 0; font: 500 14px/1.4 var(--font-sans); color: var(--ink); border-top: 1px solid var(--line); }
.dh-doc .map .ctl { border-top: 0; }
.dh-doc .map-legend,
.dh-doc .map-places { list-style: none; margin: 0; padding: 4px 14px 8px; font: 400 13px/1.45 var(--font-sans); color: var(--ink-2); }
.dh-doc .map-legend { border-top: 1px solid var(--line); }
.dh-doc .map-legend li { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; }
.dh-doc .map-sw { flex: none; width: 22px; height: 0; border-top: 4px solid var(--map-colour); align-self: center; border-radius: 2px; }
.dh-doc .map-sw.is-dashed { border-top-style: dashed; height: 0; }
.dh-doc .map-sw.is-area { height: 12px; border: 2px solid var(--map-colour); background: color-mix(in srgb, var(--map-colour) 20%, transparent); }
.dh-doc .map-places { border-top: 1px solid var(--line); padding-top: 6px; }
.dh-doc .map-place-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.dh-doc .map-place-row:last-child { border-bottom: 0; }
.dh-doc .map-place-row .map-dot { box-shadow: none; }
.dh-doc .map-place-text { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.dh-doc .map-place-text code { font: 400 12px var(--font-mono); color: var(--muted); }
.dh-doc .map-place-note { flex-basis: 100%; color: var(--muted); }
.dh-doc .map-place-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dh-doc .map-place-acts .btn { text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]) .map-base .leaflet-tile-pane,
.dh-doc[data-theme="dark"] .map-base .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.8); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) .map-base .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.8); }
}
@container (max-width: 640px) {
.dh-doc .map-stage { height: min(60vh, var(--map-h, 420px)); }
.dh-doc .map-place-row { grid-template-columns: auto 1fr; }
.dh-doc .map-place-acts { grid-column: 1 / -1; justify-content: flex-start; }
.dh-doc .map-pin-label { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
.dh-doc .map-area,
.dh-doc .map-route .map-line,
.dh-doc .map-route .map-casing { animation: none !important; }
}
.dh-doc [data-dh-motion="off"] .map-area,
.dh-doc [data-dh-motion="off"] .map-route .map-line,
.dh-doc [data-dh-motion="off"] .map-route .map-casing { animation: none !important; }
.dh-doc .map-attr a { display: inline-block; padding: 4px 2px; min-height: 24px; box-sizing: border-box; }
.dh-doc .map .ctl-range { height: 32px; }
.dh-doc .map-isvg { z-index: 1; pointer-events: none; }
.dh-doc .map-region { vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.dh-doc .map-region.is-nodata { fill: var(--map-land); stroke: var(--map-border); stroke-width: .7px; }
.dh-doc .map[data-based="leaflet"] .map-region.is-nodata,
.dh-doc .map[data-based="maplibre"] .map-region.is-nodata,
.dh-doc .map[data-based="google"] .map-region.is-nodata { display: none; }
.dh-doc .map-region.is-filled { stroke: var(--map-region-line); stroke-width: 1px; pointer-events: all; cursor: pointer; transition: stroke-width var(--dur, 160ms), filter var(--dur, 160ms); outline: none; }
.dh-doc .map[data-based="leaflet"] .map-region.is-filled,
.dh-doc .map[data-based="maplibre"] .map-region.is-filled { fill-opacity: .78; }
.dh-doc .map-region.is-filled:hover,
.dh-doc .map-region.is-filled.is-on { stroke: var(--map-region-hover); stroke-width: 2.2px; filter: brightness(1.04) saturate(1.1); }
.dh-doc .map-region.is-filled:focus-visible { stroke: var(--acc); stroke-width: 3px; outline: none; }
.dh-doc .map-geo { animation: map-fade var(--dur-slow, 560ms) var(--ease-out, ease-out) both; }
.dh-doc .map-arc { color: var(--map-colour, var(--acc)); }
.dh-doc .map-arc-casing { fill: none; stroke: var(--surface); stroke-linecap: round; opacity: .55; }
.dh-doc .map-arc-line { fill: none; stroke: var(--map-colour, var(--acc)); stroke-linecap: round; opacity: var(--map-arc-opacity, .7); transition: opacity var(--dur, 160ms); animation: map-fade var(--dur-slow, 560ms) var(--ease-out, ease-out) both; }
.dh-doc .map-arc-flow { fill: none; stroke: color-mix(in oklab, var(--surface) 70%, var(--map-colour, var(--acc))); stroke-linecap: round; stroke-dasharray: .1 18; opacity: .9; animation: map-flow 1.8s linear infinite; pointer-events: none; }
@keyframes map-flow { to { stroke-dashoffset: -18.1; } }
.dh-doc .map-arc-end { fill: var(--map-colour, var(--acc)); stroke: var(--surface); stroke-width: 2px; pointer-events: none; }
.dh-doc .map-arc-start { fill: var(--surface); stroke: var(--map-colour, var(--acc)); stroke-width: 2px; pointer-events: none; }
.dh-doc .map-arc-hit { fill: none; stroke: transparent; stroke-linecap: round; pointer-events: stroke; cursor: pointer; outline: none; }
.dh-doc .map-arc:hover .map-arc-line,
.dh-doc .map-arc.is-on .map-arc-line,
.dh-doc .map-arc:focus-within .map-arc-line { opacity: 1; }
.dh-doc .map-arc-hit:focus-visible { stroke: color-mix(in oklab, var(--acc) 35%, transparent); }
.dh-doc .map-scale-legend { padding: 10px 14px 6px; border-top: 1px solid var(--line); display: grid; gap: 4px; font: 500 12px/1.3 var(--font-sans); color: var(--ink-2); }
.dh-doc .map-ramp { height: 12px; border-radius: 6px; border: 1px solid var(--line-2); max-width: 420px; width: 100%; }
.dh-doc .map-ramp-ticks { display: flex; justify-content: space-between; max-width: 420px; font: 500 12px/1.2 var(--font-mono); color: var(--ink-2); }
.dh-doc .map-bands { display: flex; max-width: 520px; width: 100%; border-radius: 6px; overflow: hidden; border: 1px solid var(--line-2); }
.dh-doc .map-band { flex: 1 1 0; min-width: 0; padding: 14px 4px 3px; text-align: left; position: relative; }
.dh-doc .map-band i { font: 500 12px/1.2 var(--font-mono); font-style: normal; color: var(--ink); background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 0 3px; border-radius: 3px; white-space: nowrap; }
.dh-doc .map-scale-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.dh-doc .map-unit { font-weight: 600; color: var(--ink); }
.dh-doc .map-none { display: inline-flex; align-items: center; gap: 6px; }
.dh-doc .map-none-sw { width: 16px; height: 12px; border-radius: 3px; background: var(--map-land); border: 1px solid var(--map-border); display: inline-block; }
.dh-doc .map-values { border-top: 1px solid var(--line); padding: 2px 14px 8px; font: 400 13px/1.45 var(--font-sans); color: var(--ink-2); }
.dh-doc .map-values > summary { cursor: pointer; padding: 8px 0; font-weight: 600; color: var(--ink); min-height: 24px; }
.dh-doc .map-values > summary:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: 2px; }
.dh-doc .map-values ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 340px; overflow: auto; }
.dh-doc .map-vrow { width: 100%; display: grid; grid-template-columns: minmax(90px, 200px) 1fr auto; align-items: center; gap: 12px; padding: 5px 8px; min-height: 32px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.dh-doc .map-vrow:hover,
.dh-doc .map-vrow.is-on { background: var(--acc-softer, var(--surface-2)); }
.dh-doc .map-vrow:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: -2px; }
.dh-doc .map-vname { min-width:0;overflow-wrap:anywhere;white-space:normal; }
.dh-doc .map-vbar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.dh-doc .map-vbar i { display: block; height: 100%; background: var(--map-heat-hi); border-radius: 4px; }
.dh-doc .map-vval { font: 500 12px/1 var(--font-mono); color: var(--ink); min-width: 4ch; text-align: right; }
.dh-doc .map-globe-wrap { position: relative; }
.dh-doc .map-stage.is-globe { height: var(--map-globe-h, 520px); cursor: grab; background: radial-gradient(ellipse at 50% 50%, color-mix(in oklab, var(--acc) 5%, var(--surface-2)), var(--surface-2) 70%); }
.dh-doc .map-stage.is-globe.is-loading { display: grid; place-items: center; color: var(--muted); font: 500 13px var(--font-sans); }
.dh-doc .map-halo { position: absolute; border-radius: 50%; z-index: 0; background: radial-gradient(circle, transparent 62%, var(--map-halo) 72%, transparent 74%); filter: blur(5px); pointer-events: none; }
.dh-doc .map-gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; }
.dh-doc .map-gsvg { z-index: 2; }
.dh-doc .map-gl-wait { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; color: var(--muted); font: 500 13px var(--font-sans); pointer-events: none; }
.dh-doc .map-outline { fill: none; stroke: var(--map-region-hover); stroke-width: 2.4px; stroke-linejoin: round; stroke-linecap: round; }
.dh-doc .map-globe-wrap .map-pins { z-index: 3; }
.dh-doc .map-globe-wrap .map-isvg { z-index: 3; }
.dh-doc .map-ctl-l { position: absolute; top: 8px; left: 8px; z-index: 4; }
.dh-doc .map-mode { width: auto; padding: 0 14px; font: 600 13px/1 var(--font-sans); min-width: 72px; }
.dh-doc .map-spin svg { margin: auto; }
.dh-doc .map-stage.is-geo { --map-h: 460px; }
@container (max-width: 640px) {
.dh-doc .map-stage.is-globe { height: min(110cqw, var(--map-globe-h, 520px)); }
.dh-doc .map-stage.is-geo { height: min(78cqw, 460px); }
.dh-doc .map-vrow { grid-template-columns: minmax(70px, 1fr) minmax(40px, 90px) auto; gap: 8px; }
.dh-doc .map-values { padding-left: 10px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
.dh-doc .map-arc-flow,
.dh-doc .map-geo,
.dh-doc .map-arc-line { animation: none !important; }
.dh-doc .map-arc-flow { display: none; }
}
.dh-doc [data-dh-motion="off"] .map-arc-flow,
.dh-doc [data-dh-motion="off"] .map-geo,
.dh-doc [data-dh-motion="off"] .map-arc-line { animation: none !important; }
.dh-doc [data-dh-motion="off"] .map-arc-flow { display: none; }
.dh-doc .map-dot {color:var(--map-colour-ink,var(--map-pin-ink));}
.dh-doc .map :focus-visible {outline:var(--focus-ring,2px solid var(--acc));outline-offset:2px;}
.dh-doc .map[data-dh-static] .map-ctl,
.dh-doc .map[data-dh-static] .map-ctl-l {display:none;}
.dh-doc .map[data-dh-static] * {animation:none!important;transition:none!important;}
.dh-doc .map[data-dh-static] .map-values ul {max-height:none;overflow:visible}
.dh-doc .map[data-dh-static] .map-vname {white-space:normal;overflow:visible;text-overflow:clip}
.dh-doc .map[data-dh-static] .map-vrow:disabled {opacity:1;cursor:default}
.dh-doc .map[data-dh-static] .map-place-acts button {display:none}
.dh-doc .map-pin.is-left .map-pin-label {left:auto;right:calc(50% + 16px)}
.dh-doc .map-pin-label {width:max-content;max-width:min(200px,calc(100cqw - 64px));white-space:normal;overflow-wrap:anywhere}

/* ---- parts/math/style.css (scoped) ---- */
.dh-doc {
  --math-ink: var(--ink);
  --math-font: KaTeX_Main, "STIX Two Math", "Cambria Math", "Latin Modern Math", "Noto Serif", Georgia, "Times New Roman", serif, math;
  --math-block-bg: var(--surface);
  --math-block-border: var(--line);
  --math-fail-ink: var(--bad-ink);
  --math-fail-bg: var(--bad-soft);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) {
  --math-ink: var(--ink);
  --math-font: KaTeX_Main, "STIX Two Math", "Cambria Math", "Latin Modern Math", "Noto Serif", Georgia, "Times New Roman", serif, math;
  --math-block-bg: var(--surface);
  --math-block-border: var(--line);
  --math-fail-ink: var(--bad-ink);
  --math-fail-bg: var(--bad-soft);
  }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] {
  --math-ink: var(--ink);
  --math-font: KaTeX_Main, "STIX Two Math", "Cambria Math", "Latin Modern Math", "Noto Serif", Georgia, "Times New Roman", serif, math;
  --math-block-bg: var(--surface);
  --math-block-border: var(--line);
  --math-fail-ink: var(--bad-ink);
  --math-fail-bg: var(--bad-soft);
}
.dh-doc .math { color: var(--math-ink); font-family: var(--math-font); }
.dh-doc .math math { font-family: var(--math-font); font-size: 1.12em; }
.dh-doc .math mi,
.dh-doc .math mn,
.dh-doc .math mo,
.dh-doc .math mtext { text-transform: none; }
.dh-doc .math mi.math-it { font-style: italic; }
.dh-doc .math .math-bf { font-weight: 700; }
.dh-doc .math mi:not(.math-it) { font-style: normal; }
.dh-doc .math-inline { display: inline-block; vertical-align: baseline; max-width: 100%; }
.dh-doc .math-block { display: block; margin: 18px 0; padding: 14px 16px; text-align: center; overflow-x: auto; background: var(--math-block-bg); border: 1px solid var(--math-block-border); border-radius: var(--r-m); max-width: 100%; }
.dh-doc .math-block math { font-size: 1.3em; }
.dh-doc .math-block math[display="block"] { margin: 0 auto; }
.dh-doc .math-fail { color: var(--math-fail-ink); }
.dh-doc .math-fail code { font: 400 .9em var(--font-mono); background: var(--math-fail-bg); border-radius: 6px; padding: 1px 6px; white-space: pre-wrap; }

/* ---- parts/pdf/style.css (scoped) ---- */
.dh-doc {
  --pdf-bg: var(--surface);
  --pdf-radius: var(--r-l);
  --pdf-page-bg: white;
  --pdf-gap: var(--s-3);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --pdf-page-bg: white; }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --pdf-page-bg: white; }
.dh-doc .pv { border: 1px solid var(--part-border, var(--line)); border-radius: var(--pdf-radius); background: var(--pdf-bg); overflow: hidden; box-shadow: var(--part-shadow, var(--shadow-sm)); position: relative; }
.dh-doc .pv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.dh-doc .pv-bar .m-ctl { background: transparent; }
.dh-doc .pv-bar .m-ctl:hover:not(:disabled) { background: var(--surface-3); }
.dh-doc .pv-bar .m-ctl[aria-pressed="true"],
.dh-doc .pv-bar .m-ctl[aria-expanded="true"] { background: var(--acc-soft); }
.dh-doc .pv-pn { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dh-doc .pv-pn input { width: 52px; height: 32px; text-align: center; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; -moz-appearance: textfield; appearance: textfield; }
.dh-doc .pv-pn input::-webkit-outer-spin-button,
.dh-doc .pv-pn input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dh-doc .pv-zoom { min-width: 4ch; text-align: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dh-doc .pv-find { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.dh-doc .pv-find input { flex: 1 1 160px; min-width: 120px; height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 14px; }
.dh-doc .pv-count { font-size: 12.5px; color: var(--muted); min-width: 6ch; }
.dh-doc .pv-body { position: relative; display: flex; min-height: 200px; }
.dh-doc .pv-outline { flex: none; width: 230px; overflow: auto; padding: 6px; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 1px; }
.dh-doc .pv-outline button { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; min-height: 32px; padding: 4px 8px; border: 0; border-radius: var(--r-s); background: none; text-align: left; font-size: 13.5px; cursor: pointer; line-height: 1.3; }
.dh-doc .pv-outline button:hover { background: var(--surface-2); }
.dh-doc .pv-outline button[aria-current="true"] { background: var(--acc-soft); color: var(--acc-ink); font-weight: 600; }
.dh-doc .pv-outline i { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dh-doc .pv-pages { flex: 1; min-width: 0; overflow: auto; padding: var(--pdf-gap); background: var(--surface-3); display: flex; flex-direction: column; align-items: safe center; gap: var(--pdf-gap); touch-action: pan-y; overscroll-behavior: contain; }
.dh-doc .pv[data-wide="1"] .pv-pages { touch-action: auto; }
.dh-doc .pv-load { margin: auto; font-size: 14px; color: var(--muted); }
.dh-doc .pv-page { position: relative; flex: none; background: var(--pdf-page-bg); box-shadow: 0 2px 14px rgba(0,8,28,.22); color-scheme: only light; }
.dh-doc .pv-page canvas { display: block; }
.dh-doc .textLayer { position: absolute; left: 0; top: 0; overflow: clip; opacity: 1; line-height: 1; text-align: initial; letter-spacing: normal; word-spacing: normal; transform-origin: 0 0; forced-color-adjust: none; z-index: 0; }
.dh-doc .textLayer :is(span, br) { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0 0; }
.dh-doc .textLayer > :not(.markedContent),
.dh-doc .textLayer .markedContent span:not(.markedContent) { z-index: 1; font-size: calc(var(--total-scale-factor, 1) * var(--font-height, 0)); transform: rotate(var(--rotate, 0deg)) scaleX(var(--scale-x, 1)); }
.dh-doc .textLayer .markedContent { display: contents; }
.dh-doc .textLayer ::selection { background: rgba(0, 90, 255, .3); }
.dh-doc .textLayer span.is-hit { background: rgba(255, 214, 0, .5); border-radius: 2px; }
.dh-doc .textLayer span.is-cur { background: rgba(255, 120, 0, .6); outline: 2px solid rgba(255, 120, 0, .9); }
@media (max-width: 640px) {
.dh-doc .pv-outline { position: absolute; z-index: 5; left: 0; top: 0; bottom: 0; width: min(82%, 300px); box-shadow: var(--shadow-lg); }
.dh-doc .pv-bar { gap: 2px; padding: 4px; }
.dh-doc .pv-bar .m-ctl { padding: 0 6px; }
}

/* ---- parts/references/style.css (scoped) ---- */
.dh-doc {
  --references-mark-ink: var(--acc-ink, var(--acc));
  --references-mark-bg: var(--acc-softer);
  --references-item-bg: var(--surface-2);
  --references-uses-ink: var(--muted);
  --references-card-w: 340px;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) {
  --references-mark-ink: var(--acc-ink, var(--acc));
  --references-mark-bg: var(--acc-softer);
  --references-item-bg: var(--surface-2);
  --references-uses-ink: var(--muted);
  --references-card-w: 340px;
  }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] {
  --references-mark-ink: var(--acc-ink, var(--acc));
  --references-mark-bg: var(--acc-softer);
  --references-item-bg: var(--surface-2);
  --references-uses-ink: var(--muted);
  --references-card-w: 340px;
}
.dh-doc .cite-mark { font: inherit; color: var(--references-mark-ink); background: none; border: 0; padding: 0 1px; cursor: pointer; border-radius: 4px; text-decoration: underline dotted; text-underline-offset: 3px; min-height: 24px; }
.dh-doc .cite-mark:hover,
.dh-doc .cite-mark[aria-expanded="true"] { background: var(--references-mark-bg); }
.dh-doc .cite-mark:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.dh-doc .cite-card { width: min(var(--references-card-w), calc(100vw - 16px)); }
.dh-doc .cite-entry { margin: 4px 0 8px; font-size: var(--fs-s); overflow-wrap: anywhere; }
.dh-doc .refs-title { font: 600 var(--fs-m) var(--font-display); margin: 0 0 var(--s-3); display: flex; align-items: center; gap: 10px; }
.dh-doc .refs-count { font: 500 var(--fs-xs) var(--font-sans); color: var(--muted); background: var(--surface-3); border-radius: var(--r-pill); padding: 1px 9px; }
.dh-doc .refs-list { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); }
.dh-doc .refs-item { background: var(--references-item-bg); border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 14px; scroll-margin-top: 80px; display: grid; gap: 4px; overflow-wrap: anywhere; }
.dh-doc .refs-num { font-weight: 600; }
.dh-doc .refs-text a { overflow-wrap: anywhere; }
.dh-doc .refs-uses { font-size: var(--fs-xs); color: var(--references-uses-ink); }
.dh-doc .refs-uses a { margin-left: 6px; display: inline-block; min-width: 24px; min-height: 24px; text-align: center; line-height: 24px; }

/* ---- parts/sankey/style.css (scoped) ---- */
.dh-doc { --sankey-band-opacity: .35; --sankey-band-lit: .6; --sankey-band-dim: .08; --sankey-node-dim: .35; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --sankey-band-opacity: .42; --sankey-band-lit: .7; }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --sankey-band-opacity: .42; --sankey-band-lit: .7; }
.dh-doc .sankey { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.dh-doc .sankey:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); }
.dh-doc .sankey-title { font: 600 var(--fs-s) var(--font-sans); color: var(--ink); margin: 0 0 8px; }
.dh-doc .sankey-box { overflow-x: auto; }
.dh-doc .sankey svg { display: block; max-width: none; }
.dh-doc .sankey .ctl { margin-top: 8px; }
.dh-doc .sankey .anim-cap { border-top: 0; padding-left: 0; padding-right: 0; }
.dh-doc .sankey-hint { margin: 8px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.dh-doc .sk-flow { cursor: pointer; outline: none; }
.dh-doc .sk-band { opacity: var(--sankey-band-opacity); transition: opacity var(--dur) var(--ease), stroke-dashoffset var(--dur-slow) var(--ease); stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.dh-doc .sk-flow:hover .sk-band,
.dh-doc .sk-flow.is-lit .sk-band { opacity: var(--sankey-band-lit); }
.dh-doc .sk-flow.is-dim .sk-band { opacity: var(--sankey-band-dim); }
.dh-doc .sk-flow.is-hidden { pointer-events: none; }
.dh-doc .sk-flow.is-hidden .sk-band { stroke-dashoffset: 1; opacity: 0; }
.dh-doc .sk-node { cursor: pointer; transition: opacity var(--dur) var(--ease); outline: none; }
.dh-doc .sk-node.is-hidden { opacity: 0; pointer-events: none; }
.dh-doc .sk-node.is-dim { opacity: var(--sankey-node-dim); }
.dh-doc .sk-label { font: 500 12px var(--font-sans); fill: var(--ink); pointer-events: none; }
.dh-doc .sk-plate { fill: var(--surface); stroke: none; pointer-events: none; }
.dh-doc .sk-flow:focus-visible .sk-band,
.dh-doc .sk-node:focus-visible .sk-rect { stroke: var(--ink); stroke-width: 2px; }
@media (prefers-reduced-motion: reduce) {
.dh-doc .sk-band,
.dh-doc .sk-node { transition: none; }
}
.dh-doc [data-dh-motion="off"] .sk-band,
.dh-doc [data-dh-motion="off"] .sk-node { transition: none; }
.dh-doc .sankey[data-dh-static] .sk-band,
.dh-doc .sankey[data-dh-static] .sk-node { transition: none; }
@container (max-width: 600px) {
.dh-doc .sankey { padding: 12px; }
}

/* ---- parts/sequence/style.css (scoped) ---- */
.dh-doc {
  --sequence-head-bg: var(--surface-2); --sequence-life: var(--line-2); --sequence-block-bg: var(--acc-softer);
  --sequence-block-tab: var(--acc-ink); --sequence-note-bg: var(--warn-soft); --sequence-act: var(--acc-soft);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --sequence-head-bg: var(--surface-2); --sequence-life: var(--line-2); --sequence-block-bg: var(--acc-softer); --sequence-block-tab: var(--acc-ink); --sequence-note-bg: var(--warn-soft); --sequence-act: var(--acc-soft); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --sequence-head-bg: var(--surface-2); --sequence-life: var(--line-2); --sequence-block-bg: var(--acc-softer); --sequence-block-tab: var(--acc-ink); --sequence-note-bg: var(--warn-soft); --sequence-act: var(--acc-soft); }
.dh-doc .seq-scroll { overflow: auto; max-height: 78vh; }
.dh-doc .seq-heads { position: sticky; top: 0; z-index: 2; background: var(--part-bg, var(--surface)); }
.dh-doc .dh-seq .seq-head rect { fill: var(--sequence-head-bg); stroke: var(--line-2); }
.dh-doc .seq-icon { fill: none; stroke: var(--ink-2); stroke-width: 1.3; }
.dh-doc .seq-life { stroke: var(--sequence-life); stroke-width: 1; stroke-dasharray: 4 4; }
.dh-doc .seq-line { stroke: var(--dg-edge, var(--ink-2)); stroke-width: var(--dg-edge-w, 1.5px); fill: none; }
.dh-doc .seq-line.is-dash { stroke-dasharray: 5 4; }
.dh-doc .seq-arrow-fill { fill: var(--dg-edge, var(--ink-2)); }
.dh-doc .seq-arrow-open { fill: none; stroke: var(--dg-edge, var(--ink-2)); stroke-width: 1.5; }
.dh-doc .seq-x { stroke: var(--bad); stroke-width: 2; fill: none; }
.dh-doc .dh-svg text.seq-text { fill: var(--ink); }
.dh-doc .seq-act { fill: var(--sequence-act); stroke: var(--dg-edge, var(--ink-2)); stroke-width: 1; }
.dh-doc .seq-block rect { fill: var(--sequence-block-bg); stroke: var(--line-2); opacity: .75; }
.dh-doc .dh-svg .seq-block text.seq-tab { fill: var(--sequence-block-tab); font-weight: 600; }
.dh-doc .seq-else { stroke: var(--line-2); stroke-dasharray: 4 3; }
.dh-doc .seq-note rect { fill: var(--sequence-note-bg); stroke: var(--warn); stroke-width: .8; }
.dh-doc .seq-msg.is-old,
.dh-doc .seq-note.is-old,
.dh-doc .seq-block.is-old { opacity: .5; }
.dh-doc .seq-msg.is-new .seq-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: sequence-draw var(--dur-slow, 640ms) var(--ease-out, ease-out) both; }
.dh-doc .seq-msg.is-new .seq-line.is-dash { stroke-dasharray: 5 4; animation: dh-fade var(--dur-slow, 640ms) both; }
@keyframes sequence-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.dh-doc .seq-hint { margin: 0; padding: 2px 14px 8px; font: 500 12px var(--font-sans); color: var(--muted); display: none; }
@container (max-width: 600px) {
.dh-doc .seq-hint { display: block; }
}

/* ---- parts/spark/style.css (scoped) ---- */
.dh-doc { --spark-w: 4.2em; --spark-ink: var(--acc); --spark-card-w: 260px; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --spark-w: 4.2em; --spark-ink: var(--acc); --spark-card-w: 260px; }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --spark-w: 4.2em; --spark-ink: var(--acc); --spark-card-w: 260px; }
.dh-doc .spark { position: relative; display: inline-block; vertical-align: -0.2em; line-height: 0; width: var(--spark-w); height: 1.1em; margin: 0 .15em; border-radius: 4px; cursor: help; }
.dh-doc .spark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.dh-doc .spark:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: 2px; }
.dh-doc .spark::before { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: max(24px, 100%); transform: translateY(-50%); }
@media (pointer: coarse) {
.dh-doc .spark::before { height: max(40px, 100%); }
}
.dh-doc .spark:hover::after,
.dh-doc .spark:focus::after { content: attr(data-vals); position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; max-width: min(var(--spark-card-w), 70vw); width: max-content; padding: 6px 10px; border-radius: var(--pop-radius, var(--r-m)); background: var(--pop-bg, var(--surface)); color: var(--pop-ink, var(--ink)); border: 1px solid var(--pop-border, var(--line-2)); box-shadow: var(--pop-shadow, var(--shadow-md)); font: 500 var(--fs-xs)/1.4 var(--font-sans); white-space: normal; overflow-wrap: anywhere; }
.dh-doc .spark[data-side="right"]:hover::after,
.dh-doc .spark[data-side="right"]:focus::after { left: auto; right: 0; }

/* ---- parts/stacktrace/style.css (scoped) ---- */
.dh-doc { --stacktrace-error: var(--bad); --stacktrace-app: var(--acc); --stacktrace-lib: var(--muted); --stacktrace-fold-bg: var(--surface-2); --stacktrace-code: var(--good); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --stacktrace-error: var(--bad); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --stacktrace-error: var(--bad); }
.dh-doc .st { border: 1px solid var(--part-border, var(--line)); border-radius: var(--part-radius, var(--r-m, 12px)); background: var(--part-bg, var(--surface)); padding: var(--part-pad, 14px); display: flex; flex-direction: column; gap: 10px; min-width: 0; font-size: 14px; }
.dh-doc .st button { font: inherit; color: inherit; cursor: pointer; }
.dh-doc .st button:focus-visible,
.dh-doc .st .coderef:focus-visible,
.dh-doc .st summary:focus-visible {
  outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); }
.dh-doc .st-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dh-doc .st-title { font-weight: 600; margin-right: auto; }
.dh-doc .st .chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: var(--r-pill, 999px); background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.dh-doc .st { font-family: var(--font-mono); }
.dh-doc .st-block { display: flex; flex-direction: column; gap: 4px; }
.dh-doc .st-head { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.dh-doc .st-errline { color: var(--stacktrace-error); font-size: 17px; }
.dh-doc .st-lab { display: block; font: 600 12px var(--font-sans); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dh-doc .st-causeline { color: var(--ink); }
.dh-doc .st-block.st-cause,
.dh-doc .st-block.st-suppressed { border-left: 3px solid var(--line-2); padding-left: 12px; }
.dh-doc .st-thread > summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.dh-doc .st-list { list-style: none; margin: 0; padding: 0; }
.dh-doc .st-frame { border-left: 3px solid transparent; }
.dh-doc .st-frame.is-app { border-left-color: var(--stacktrace-app); background: color-mix(in oklab, var(--stacktrace-app) 7%, transparent); }
.dh-doc .st-fbtn { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; width: 100%; text-align: left; border: 0; background: transparent; padding: 5px 8px; min-height: 32px; }
.dh-doc .st-fbtn:hover { background: var(--surface-2); }
.dh-doc .st-fn { font-weight: 500; overflow-wrap: anywhere; flex: 1 1 100%; }
.dh-doc .st-file { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; flex: 1 1 100%; }
.dh-doc .st-frame.is-lib .st-fn,
.dh-doc .st-frame.is-lib .st-file { color: var(--stacktrace-lib); }
.dh-doc .st-app { background: color-mix(in oklab, var(--stacktrace-app) 14%, var(--surface)) !important; border-color: var(--stacktrace-app) !important; color: var(--ink) !important; }
.dh-doc .st-foldrow { margin: 2px 0; }
.dh-doc .st-fold { width: 100%; text-align: left; min-height: 32px; padding: 0 10px; border: 1px dashed var(--line-2); border-radius: var(--r-s, 8px); background: var(--stacktrace-fold-bg); color: var(--muted); font-size: 12px; }
.dh-doc .st-gap,
.dh-doc .st-omit { color: var(--faint); font-size: 12px; padding: 4px 12px; font-style: italic; }
.dh-doc .st-detail { padding: 6px 12px 10px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.dh-doc .st-raw { color: var(--ink-2); }
.dh-doc .st-code { color: var(--stacktrace-code); background: var(--surface-2); padding: 3px 8px; border-radius: var(--r-s, 6px); }
.dh-doc .st-link .coderef { border-bottom: 1px dotted var(--acc); color: var(--acc); }
.dh-doc .st-err { color: var(--bad); }
.dh-doc .st-link-note { margin: 0; color: var(--muted); font: italic 12px var(--font-sans); }
@container (max-width: 600px) {
.dh-doc .st { padding: 10px; }
}

/* ---- parts/stats/style.css (scoped) ---- */
.dh-doc {
  --stats-spark: var(--acc); --stats-value-fs: var(--fs-2xl); --stats-gap: 14px; --stats-min: 190px;
  --stats-tile-bg: var(--surface); --stats-tile-border: var(--line); --stats-name: var(--muted);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --stats-spark: var(--acc); --stats-tile-bg: var(--surface); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --stats-spark: var(--acc); --stats-tile-bg: var(--surface); }
.dh-doc .stats { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--stats-gap); grid-template-columns: repeat(auto-fit, minmax(var(--stats-min), 1fr)); }
.dh-doc .stats-tile { --stats-tone: var(--stats-spark); position: relative; border: 1px solid var(--stats-tile-border); border-radius: var(--r-l); background: var(--stats-tile-bg); box-shadow: var(--shadow-sm); padding: 16px 18px 14px; overflow: hidden; display: grid; gap: 2px; align-content: start; min-width: 0; }
.dh-doc .stats-tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--stats-tone); }
.dh-doc .stats-tile.tone-good { --stats-tone: var(--good); }
.dh-doc .stats-tile.tone-bad { --stats-tone: var(--bad); }
.dh-doc .stats-tile.tone-warn { --stats-tone: var(--warn); }
.dh-doc .stats-tile.tone-muted { --stats-tone: var(--muted); }
.dh-doc .stats-tile.tone-acc { --stats-tone: var(--acc); }
.dh-doc .stats-tile.tone-c1 { --stats-tone: var(--c1); }
.dh-doc .stats-tile.tone-c2 { --stats-tone: var(--c2); }
.dh-doc .stats-tile.tone-c3 { --stats-tone: var(--c3); }
.dh-doc .stats-tile.tone-c4 { --stats-tone: var(--c4); }
.dh-doc .stats-tile.tone-c5 { --stats-tone: var(--c5); }
.dh-doc .stats-tile.tone-c6 { --stats-tone: var(--c6); }
.dh-doc .stats-tile.tone-c7 { --stats-tone: var(--c7); }
.dh-doc .stats-tile.tone-c8 { --stats-tone: var(--c8); }
.dh-doc .stats-glyph { font-size: 18px; line-height: 1; color: var(--stats-tone); }
.dh-doc .stats-name { font: 500 var(--fs-xs) var(--font-sans); color: var(--stats-name); letter-spacing: .02em; overflow-wrap: anywhere; }
.dh-doc .stats-value { font: 600 var(--stats-value-fs)/1.1 var(--font-display); letter-spacing: var(--ls-head); color: var(--ink); font-variant-numeric: tabular-nums; margin: 2px 0 4px; overflow-wrap: anywhere; }
.dh-doc .stats-sub { font: 400 var(--fs-xs) var(--font-sans); color: var(--ink-2); overflow-wrap: anywhere; }
.dh-doc .stats-trend { font: 500 12px var(--font-sans); color: var(--muted); }
.dh-doc .stats-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 26px; }
.dh-doc .stats-change { display: inline-flex; align-items: center; gap: 5px; font: 600 12.5px var(--font-mono); padding: 3px 10px 3px 8px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); }
.dh-doc .stats-change svg { fill: currentColor; }
.dh-doc .stats-change.is-good { background: var(--good-soft); color: var(--good-ink); }
.dh-doc .stats-change.is-bad { background: var(--bad-soft); color: var(--bad-ink); }
.dh-doc .stats-change.is-warn { background: var(--warn-soft); color: var(--warn-ink); }
.dh-doc .stats-change.is-acc { background: var(--acc-soft); color: var(--acc-ink); }
.dh-doc .stats-note { font: 400 var(--fs-xs) var(--font-sans); color: var(--muted); overflow-wrap: anywhere; }
.dh-doc .stats-spark { width: 100%; height: 40px; margin-top: 8px; overflow: visible; }
.dh-doc .stats-spark .ln { stroke: var(--stats-tone); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dh-doc .stats-spark .area { fill: var(--stats-tone); opacity: .12; }
.dh-doc .stats-spark circle { fill: var(--stats-tone); stroke: var(--surface); stroke-width: 2; }
@container (max-width: 640px) {
.dh-doc .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dh-doc .stats-tile { padding: 14px 12px 12px 16px; }
.dh-doc .stats-value { font-size: 1.5rem; }
}

/* ---- parts/timeline/style.css (scoped) ---- */
.dh-doc { --timeline-line: var(--line-2); --timeline-card-bg: var(--surface); --timeline-dot: var(--acc); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --timeline-line: var(--line-2); --timeline-card-bg: var(--surface); --timeline-dot: var(--acc); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --timeline-line: var(--line-2); --timeline-card-bg: var(--surface); --timeline-dot: var(--acc); }
.dh-doc .timeline-list { list-style: none; margin: 0; padding: 14px 14px 6px 18px; position: relative; }
.dh-doc .timeline-item { display: grid; grid-template-columns: 6.2em 1fr; gap: 0 14px; position: relative; padding-bottom: 14px; }
.dh-doc .timeline-item::before { content: ""; position: absolute; left: calc(6.2em + 7px); top: 6px; bottom: -2px; width: 2px; background: var(--timeline-line); }
.dh-doc .timeline-item:last-child::before { display: none; }
.dh-doc .timeline-item::after { content: ""; position: absolute; left: calc(6.2em + 1px); top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--tc, var(--timeline-dot)); border: 3px solid var(--surface); box-sizing: border-box; }
.dh-doc .timeline-date { font: 600 13px var(--font-mono); color: var(--muted); padding-top: 4px; text-align: right; }
.dh-doc .timeline-card { margin-left: 22px; padding: 8px 12px; background: var(--timeline-card-bg); border: 1px solid var(--line); border-left: 4px solid var(--tc, var(--acc)); border-radius: var(--r-m); font: 400 14px/1.45 var(--font-sans); }
.dh-doc .timeline-title { display: block; }
.dh-doc .timeline-note { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.dh-doc .timeline-card ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); }
.dh-doc .timeline-item.is-new .timeline-card { animation: dh-fade var(--dur-slow, 640ms) both; }
.dh-doc .is-across .timeline-list { display: flex; gap: 14px; overflow-x: auto; padding: 14px 14px 10px; }
.dh-doc .is-across .timeline-item { display: block; flex: 0 0 220px; padding: 22px 0 0; border-top: 2px solid var(--timeline-line); }
.dh-doc .is-across .timeline-item::before { display: none; }
.dh-doc .is-across .timeline-item::after { left: 0; top: -8px; }
.dh-doc .is-across .timeline-date { display: block; text-align: left; padding: 0 0 6px 0; }
.dh-doc .is-across .timeline-card { margin-left: 0; }
@container (max-width: 600px) {
.dh-doc .is-across .timeline-list { display: block; overflow-x: visible; }
.dh-doc .is-across .timeline-item { display: grid; flex: none; padding: 0 0 14px; border-top: 0; }
.dh-doc .is-across .timeline-item::before { display: block; }
.dh-doc .is-across .timeline-item:last-child::before { display: none; }
.dh-doc .is-across .timeline-item::after { left: calc(6.2em + 1px); top: 6px; }
.dh-doc .is-across .timeline-date { text-align: right; padding: 4px 0 0; }
.dh-doc .is-across .timeline-card { margin-left: 22px; }
}

/* ---- parts/trace/style.css (scoped) ---- */
.dh-doc {
 --trace-bar-h: 18px; --trace-critical: var(--ink); --trace-error: var(--bad); --trace-grid: var(--line); --trace-stripe: color-mix(in oklab, var(--surface-2) 60%, var(--surface));
 --trace-minimap-h: 44px; --trace-brush: color-mix(in oklab, var(--acc) 18%, transparent);
 --trace-log-debug: var(--faint); --trace-log-info: var(--c6); --trace-log-warn: var(--warn); --trace-log-error: var(--bad);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --trace-error: var(--bad); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --trace-error: var(--bad); }
.dh-doc .trace { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); padding: 14px 16px; box-shadow: var(--shadow-sm); position: relative; }
.dh-doc .trace svg { display: block; max-width: none; }
.dh-doc .trace-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.dh-doc .trace-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-pill); overflow: hidden; background: var(--surface-2); }
.dh-doc .trace-seg button { min-height: 32px; padding: 0 14px; border: 0; background: transparent; color: var(--ink-2); font: 500 var(--fs-xs) var(--font-sans); cursor: pointer; }
.dh-doc .trace-seg button[aria-pressed="true"] { background: var(--acc-soft); color: var(--acc-ink); }
.dh-doc .trace-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.dh-doc .trace-btn { min-height: 32px; min-width: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font: 500 var(--fs-xs) var(--font-sans); cursor: pointer; }
.dh-doc .trace-btn[aria-pressed="true"] { background: var(--acc-soft); border-color: var(--acc); color: var(--acc-ink); }
.dh-doc .trace-btn:disabled { opacity: .45; cursor: default; }
.dh-doc .trace button:focus-visible,
.dh-doc .trace input:focus-visible,
.dh-doc .trace-mini:focus-visible,
.dh-doc .tr-row:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: var(--focus-offset, 2px); }
.dh-doc .tr-row:focus-visible { outline: none; }
.dh-doc .tr-row:focus-visible .tr-stripe { fill: var(--acc-softer); stroke: var(--acc); stroke-width: 2; }
.dh-doc .trace-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dh-doc .trace-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: var(--chip-radius, var(--r-pill)); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 500 var(--fs-xs) var(--font-sans); cursor: pointer; }
.dh-doc .trace-chip[aria-pressed="true"] { background: var(--trace-svc-soft); border-color: var(--trace-svc); color: var(--trace-svc-ink); }
.dh-doc .trace-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--trace-svc); flex: none; }
.dh-doc .trace-n { color: var(--faint); font-weight: 400; }
.dh-doc .trace-mini { width: 100%; height: var(--trace-minimap-h); margin: 2px 0 8px; touch-action: none; cursor: crosshair; border-radius: 6px; }
.dh-doc .tr-mini-bg { fill: var(--surface-2); stroke: var(--line); }
.dh-doc .tr-mini-brush { fill: var(--trace-brush); stroke: var(--acc); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.dh-doc .tr-mini-grip { fill: var(--acc); }
.dh-doc .trace-box { overflow-x: auto; border-radius: var(--r-s); overscroll-behavior-x: contain; }
.dh-doc .tr-stripe { fill: transparent; }
.dh-doc .tr-row:nth-of-type(even) .tr-stripe { fill: var(--trace-stripe); }
.dh-doc .tr-row { cursor: pointer; outline: none; transition: opacity var(--dur) var(--ease); }
.dh-doc .tr-row:hover .tr-stripe { fill: var(--acc-softer); }
.dh-doc .tr-row.is-sel .tr-stripe { fill: var(--acc-soft); }
.dh-doc .tr-row.is-dim { opacity: .3; }
.dh-doc .tr-row.is-hit .tr-stripe { fill: var(--warn-soft); }
.dh-doc .tr-grid { stroke: var(--trace-grid); stroke-width: 1; }
.dh-doc .tr-tick { font: 400 12px var(--font-mono); fill: var(--muted); }
.dh-doc .tr-unit { fill: var(--faint); }
.dh-doc .tr-name { font: 400 12px var(--font-mono); fill: var(--ink); pointer-events: none; }
.dh-doc .tr-row.is-error .tr-name { fill: var(--bad-ink); }
.dh-doc .tr-chip-t { font: 500 12px var(--font-mono); pointer-events: none; }
.dh-doc .tr-more { font: 500 12px var(--font-sans); fill: var(--muted); pointer-events: none; }
.dh-doc .tr-len { font: 400 12px var(--font-mono); fill: var(--ink-2); pointer-events: none; }
.dh-doc .tr-arrow { fill: var(--muted); transition: transform var(--dur) var(--ease); }
.dh-doc .tr-arrow.is-open { transform: rotate(90deg); }
.dh-doc .tr-chev { cursor: pointer; }
.dh-doc .tr-chev:hover .tr-arrow { fill: var(--ink); }
.dh-doc .tr-err circle { fill: var(--trace-error); }
.dh-doc .tr-err text { font: 700 12px var(--font-sans); fill: var(--on-acc); }
.dh-doc .tr-crit { fill: none; stroke: var(--trace-critical); stroke-width: 1.5; }
.dh-doc .tr-bar { transition: filter var(--dur) var(--ease); }
.dh-doc .tr-row:hover .tr-bar { filter: brightness(1.06); }
.dh-doc .tr-log { stroke: var(--surface); stroke-width: 1; }
.dh-doc .tr-detail { font-size: var(--fs-xs); }
.dh-doc .tr-detail p { margin: 0 0 4px; }
.dh-doc .tr-d-err { color: var(--bad-ink); }
.dh-doc .tr-d-line { color: var(--muted); }
.dh-doc .tr-d-attrs { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 4px 0; }
.dh-doc .tr-d-attrs dt { color: var(--muted); font-family: var(--font-mono); }
.dh-doc .tr-d-attrs dd { margin: 0; overflow-wrap: anywhere; }
.dh-doc .tr-d-logs { list-style: none; margin: 4px 0 0; padding: 0; }
.dh-doc .tr-d-logs li { margin: 2px 0; overflow-wrap: anywhere; }
.dh-doc .tr-lv { font-weight: 600; }
.dh-doc .tr-d-t { color: var(--faint); font-family: var(--font-mono); }
@media (prefers-reduced-motion: reduce) {
.dh-doc .tr-row,
.dh-doc .tr-arrow,
.dh-doc .tr-bar { transition: none; }
}
.dh-doc [data-dh-motion="off"] .tr-row,
.dh-doc [data-dh-motion="off"] .tr-arrow,
.dh-doc [data-dh-motion="off"] .tr-bar { transition: none; }
@container (max-width: 600px) {
.dh-doc .trace { padding: 12px; }
.dh-doc .trace-bar .flame-search { flex: 1 1 100%; }
.dh-doc .trace-bar .flame-search input { width: 100%; }
.dh-doc .trace-tools { margin-left: 0; }
.dh-doc .trace-btn,
.dh-doc .trace-seg button { min-height: 40px; }
.dh-doc .trace-chip { min-height: 40px; }
}
.dh-doc .trace { min-width: 0; }
.dh-doc .trace .chart-title { font-weight: 600; margin-bottom: 8px; }
.dh-doc .trace .chart-table { font-size: 12px; margin-top: 8px; }
.dh-doc .trace .chart-table th,
.dh-doc .trace .chart-table td { padding: 4px 8px; overflow-wrap: anywhere; }
.dh-doc .trace .table-wrap { overflow-x: auto; }
.dh-doc .trace[data-dh-static] * { animation: none; transition: none; }
@media print {
.dh-doc .trace-bar,
.dh-doc .trace-legend,
.dh-doc .trace-mini,
.dh-doc .trace .part-hint { display: none; }
.dh-doc .tr-row,
.dh-doc .tr-arrow,
.dh-doc .tr-bar { transition: none; }
}
.dh-doc .trace-chip { max-width: 100%; min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.dh-doc .trace .chart-title { overflow-wrap: anywhere; }

/* ---- parts/venn/style.css (scoped) ---- */
.dh-doc { --venn-fill-opacity: .25; --venn-dim-opacity: .08; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --venn-fill-opacity: .34; }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --venn-fill-opacity: .34; }
.dh-doc .venn-set { fill-opacity: var(--venn-fill-opacity); stroke-width: 2; transition: opacity .2s, fill-opacity .2s; }
.dh-doc .venn-set.is-dim { fill-opacity: var(--venn-dim-opacity); opacity: .5; }
.dh-doc .venn-set.is-in { stroke-width: 3.5; }
.dh-doc .venn-set-label { font-size: 15px; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.dh-doc .venn-region { cursor: pointer; outline: none; }
.dh-doc .venn-hit { fill: transparent; }
.dh-doc .venn-region:focus-visible .venn-hit,
.dh-doc .venn-region.is-hot .venn-hit { stroke: var(--acc); stroke-width: 2; fill: var(--acc-softer); fill-opacity: .6; }
.dh-doc .venn-item { font-size: 15px; font-weight: 500; }
.dh-doc .venn-count { font-size: 22px; font-weight: 600; }
.dh-doc .venn-more { font-size: 15px; font-weight: 600; text-decoration: underline; }
.dh-doc .dh-svg text.venn-more { fill: var(--acc-ink); }
.dh-doc .venn-set.is-new,
.dh-doc .venn-region.is-new { animation: dh-fade var(--dur-slow, 640ms) both; }
.dh-doc .venn-legend { list-style: none; margin: 0; padding: 4px 14px 10px; font: 400 14px/1.45 var(--font-sans); position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@container (max-width: 600px) {
.dh-doc .venn-legend { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
.dh-doc .venn-legend li { margin: 3px 0; }
}
@media (prefers-reduced-motion: reduce) {
.dh-doc .venn-set { transition: none; }
}
.dh-doc [data-dh-motion="off"] .venn-set { transition: none; }

/* ---- parts/video/style.css (scoped) ---- */
.dh-doc {
  --video-bg: var(--surface);
  --video-played: var(--acc);
  --video-played-2: var(--c4);
  --video-chapter-gap: 3px;
  --video-radius: var(--r-l);
  --video-cue-bg: rgba(0, 0, 0, .75);
  --video-cue-ink: white;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --video-cue-bg: rgba(0, 0, 0, .8); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --video-cue-bg: rgba(0, 0, 0, .8); }
.dh-doc .vm { position: relative; border-radius: var(--video-radius); overflow: hidden; background: rgb(5 7 15); border: 1px solid var(--part-border, var(--line)); box-shadow: var(--part-shadow, var(--shadow-sm)); }
.dh-doc .vm[data-h="s"] { max-width: 560px; margin-inline: auto; }
.dh-doc .vm-stage { position: relative; aspect-ratio: 16 / 9; background: black; outline-offset: -3px; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.dh-doc .vm-stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: black; }
.dh-doc .vm-bigplay { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; transform: translate(-50%, -50%); border: 1px solid rgba(255,255,255,.45); border-radius: 50%; display: grid; place-items: center; color: white; cursor: pointer; background: rgba(20, 24, 44, .42); -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4); box-shadow: 0 10px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.4); transition: transform var(--dur) var(--ease), background var(--dur-fast); }
.dh-doc .vm-bigplay svg { margin-left: 4px; }
.dh-doc .vm-bigplay:hover { transform: translate(-50%, -50%) scale(1.08); background: color-mix(in oklab, var(--acc) 55%, rgba(20,24,44,.4)); }
.dh-doc .vm-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 12px 6px; background: linear-gradient(to top, rgba(2,4,14,.82), rgba(2,4,14,.5) 55%, transparent); color: white; transition: opacity var(--dur) var(--ease); }
.dh-doc .vm.no-ctl .vm-bar { opacity: 0; pointer-events: none; }
.dh-doc .vm.no-ctl .vm-stage { cursor: none; }
.dh-doc .vm-bar .m-ctl { background: transparent; color: white; }
.dh-doc .vm-bar .m-ctl:hover:not(:disabled) { background: rgba(255,255,255,.18); }
.dh-doc .vm-bar .m-ctl[aria-expanded="true"],
.dh-doc .vm-bar .m-ctl[aria-pressed="true"] { background: rgba(255,255,255,.22); color: white; }
.dh-doc .vm-bar .m-row { gap: 2px; }
.dh-doc .vm-seek { position: relative; height: 28px; display: flex; align-items: center; cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.dh-doc .vm-track { position: relative; flex: 1; display: flex; gap: var(--video-chapter-gap); height: 5px; transition: height var(--dur-fast); }
.dh-doc .vm-seek:hover .vm-track,
.dh-doc .vm-seek:focus-visible .vm-track { height: 8px; }
.dh-doc .vm-seg { position: relative; min-width: 2px; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,.28); }
.dh-doc .vm-seg i { position: absolute; left: 0; top: 0; bottom: 0; display: block; }
.dh-doc .vm-buf { background: rgba(255,255,255,.34); }
.dh-doc .vm-played { background: linear-gradient(90deg, var(--video-played), var(--video-played-2)); }
.dh-doc .vm-knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: white; box-shadow: 0 1px 6px rgba(0,0,0,.5); transform: scale(0); transition: transform var(--dur-fast); pointer-events: none; }
.dh-doc .vm-seek:hover .vm-knob,
.dh-doc .vm-seek:focus-visible .vm-knob,
.dh-doc .vm.is-playing .vm-knob { transform: scale(1); }
.dh-doc .vm-tip { position: absolute; bottom: 30px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 9px; border-radius: var(--r-s); background: rgba(8,10,24,.92); color: white; font-size: 12.5px; pointer-events: none; white-space: nowrap; max-width: 220px; }
.dh-doc .vm-tip b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.dh-doc .vm-thumb { display: block; border-radius: 4px; background-repeat: no-repeat; }
.dh-doc .vm-time { font-family: var(--font-mono); font-size: 13px; padding: 0 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dh-doc .vm-cc { position: absolute; left: 6%; right: 6%; bottom: 70px; text-align: center; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: bottom var(--dur) var(--ease); }
.dh-doc .vm.no-ctl .vm-cc { bottom: 22px; }
.dh-doc .vm-cc span { display: inline-block; padding: 2px 12px; border-radius: 6px; background: var(--video-cue-bg); color: var(--video-cue-ink); font-size: clamp(14px, 2.3vw, 22px); line-height: 1.4; font-weight: 500; }
.dh-doc .vm-flash { position: absolute; top: 50%; width: 22%; aspect-ratio: 1; margin-top: -11%; border-radius: 50%; background: rgba(255,255,255,.22); color: white; display: grid; place-items: center; font-weight: 700; font-size: 18px; pointer-events: none; animation: vm-flash .7s var(--ease) both; }
.dh-doc .vm-flash-l { left: 6%; }
.dh-doc .vm-flash-r { right: 6%; }
@keyframes vm-flash { 0% { opacity: 0; transform: scale(.7); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.1); } }
.dh-doc .vm .m-err { position: absolute; left: 12px; right: 12px; top: 12px; margin: 0; }
.dh-doc .vm > .am-transcript { padding: var(--s-3) var(--s-4) var(--s-4); background: var(--video-bg); color: var(--ink); }
.dh-doc .vm:fullscreen,
.dh-doc .vm.is-full { border-radius: 0; border: 0; }
.dh-doc .vm:fullscreen .vm-stage { aspect-ratio: auto; height: 100vh; }
.dh-doc .vm-clip .vm-clipbtn { position: absolute; right: 10px; bottom: 10px; background: rgba(8,10,24,.6); color: white; min-width: 36px; height: 36px; }
.dh-doc .vm-cliphint { position: absolute; left: 10px; bottom: 12px; padding: 2px 8px; border-radius: 6px; background: rgba(8,10,24,.6); color: white; font-size: 12px; }
@media (max-width: 640px) {
.dh-doc .vm-bigplay { width: 60px; height: 60px; top: 34%; z-index: 4; }
.dh-doc .vm-skip,
.dh-doc .vm-vol,
.dh-doc .vm [data-dh-slot="pip"] { display: none; }
.dh-doc .vm-time { padding: 0 4px; font-size: 12px; }
.dh-doc .vm-bar { padding: 28px 6px 4px; }
.dh-doc .vm-bar .m-ctl { padding: 0 4px; min-width: 36px; }
.dh-doc .vm .mu-btn.has-text > svg { display: none; }
.dh-doc .vm .m-row { flex-wrap: nowrap; gap: 2px; }
}

/* ---- parts/wardley/style.css (scoped) ---- */
.dh-doc { --wardley-evolve: var(--acc); --wardley-band: var(--surface-2); --wardley-note-bg: var(--warn-soft); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --wardley-evolve: var(--acc); --wardley-band: var(--surface-2); --wardley-note-bg: var(--warn-soft); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --wardley-evolve: var(--acc); --wardley-band: var(--surface-2); --wardley-note-bg: var(--warn-soft); }
.dh-doc .wardley-hint { margin: 0; padding: 2px 14px 8px; font: 500 12px var(--font-sans); color: var(--muted); display: none; }
@container (max-width: 600px) {
.dh-doc .wardley-hint { display: block; }
}
.dh-doc .wm-band { fill: var(--wardley-band); opacity: .5; }
.dh-doc .wm-band.is-alt { opacity: .9; }
.dh-doc .wm-axis { font-size: 12px; fill: var(--muted); }
.dh-doc .dh-svg text.wm-axis { fill: var(--muted); }
.dh-doc .wm-axis-line { stroke: var(--line-2); }
.dh-doc .wm-need { stroke: var(--ink-2); stroke-width: 1.3; }
.dh-doc .wm-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.dh-doc .is-anchor .wm-dot { fill: var(--ink); }
.dh-doc .wm-label { font-size: 13px; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.dh-doc .is-anchor .wm-label { font-weight: 700; }
.dh-doc .wm-ghost { fill: none; stroke: var(--muted); stroke-dasharray: 3 3; }
.dh-doc .wm-evolve { stroke: var(--wardley-evolve); stroke-width: 1.8; stroke-dasharray: 5 4; }
.dh-doc .wm-evolve-head { fill: var(--wardley-evolve); }
.dh-doc .wm-ring { fill: none; stroke: var(--acc); stroke-width: 2.5; }
.dh-doc .wm-inertia { stroke: var(--ink); stroke-width: 4; }
.dh-doc .wm-pipeline { fill: var(--acc-softer); stroke: var(--acc); }
.dh-doc .wm-group rect { fill: var(--acc-soft); opacity: .45; stroke: var(--acc); stroke-dasharray: 4 3; }
.dh-doc .dh-svg text.wm-group-label { font-size: 12px; fill: var(--acc-ink); font-weight: 600; }
.dh-doc .wm-note rect { fill: var(--wardley-note-bg); stroke: var(--warn); stroke-width: .8; }
.dh-doc .wm-note text { font-size: 12px; }
.dh-doc .wm-comp.is-new,
.dh-doc .wm-need.is-new { animation: dh-fade var(--dur-slow, 640ms) both; }

/* ---- parts/weather/style.css (scoped) ---- */
.dh-doc { --weather-hot: var(--c5); --weather-cold: var(--c6); --weather-rain: var(--c6); --weather-sun: var(--c3); --weather-moon: var(--c4); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dh-doc:not([data-theme="light"]) { --weather-hot: var(--c5); --weather-cold: var(--c6); --weather-rain: var(--c6); --weather-sun: var(--c3); --weather-moon: var(--c4); }
}
:root[data-theme="dark"] .dh-doc:not([data-theme="light"]),
.dh-doc[data-theme="dark"] { --weather-hot: var(--c5); --weather-cold: var(--c6); --weather-rain: var(--c6); --weather-sun: var(--c3); --weather-moon: var(--c4); }
.dh-doc .wx { font-family: var(--font-sans); color: var(--ink); }
.dh-doc .wx-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; padding: 12px 14px 8px; }
.dh-doc .wx-place { font-size: 16px; }
.dh-doc .wx-place span { color: var(--muted); font-size: 14px; }
.dh-doc .wx-units { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.dh-doc .wx-ug { display: flex; flex-direction: column; gap: 3px; }
.dh-doc .wx-ul { font: 500 11px var(--font-sans); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.dh-doc .wx-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-pill); overflow: hidden; background: var(--surface); }
.dh-doc .wx-seg button { min-height: 32px; min-width: 40px; padding: 0 10px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink-2); font: 500 13px var(--font-sans); cursor: pointer; }
.dh-doc .wx-seg button:last-child { border-right: 0; }
.dh-doc .wx-seg button:hover { color: var(--acc-ink); }
.dh-doc .wx-seg button[aria-pressed="true"] { background: var(--acc); color: var(--on-acc); }
.dh-doc .wx-seg button:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: -3px; }
.dh-doc .wx-scroll { overflow-x: auto; padding: 4px 8px 8px; border-top: 1px solid var(--line); background: linear-gradient(to right, var(--surface), var(--surface)) left center / 20px 100% local no-repeat, linear-gradient(to left, var(--surface), var(--surface)) right center / 20px 100% local no-repeat, linear-gradient(to right, color-mix(in srgb, var(--ink) 20%, transparent), transparent) left center / 14px 100% scroll no-repeat, linear-gradient(to left, color-mix(in srgb, var(--ink) 20%, transparent), transparent) right center / 14px 100% scroll no-repeat; }
.dh-doc .wx-days { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(108px, 1fr); gap: 8px; }
.dh-doc .wx-day { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; border-radius: var(--r-m); background: var(--surface-2); min-width: 0; text-align: center; }
.dh-doc .wx-dl { font: 600 13px var(--font-sans); }
.dh-doc .wx-sky { font: 400 12px var(--font-sans); color: var(--muted); }
.dh-doc .wx-hl { display: flex; gap: 6px; align-items: baseline; font-size: 16px; }
.dh-doc .wx-hl b { font-weight: 600; color: var(--ink); }
.dh-doc .wx-hl span { color: var(--muted); font-size: 14px; }
.dh-doc .wx-band { position: relative; width: 8px; height: 56px; border-radius: 4px; background: var(--surface-3); margin: 4px 0; }
.dh-doc .wx-band i { position: absolute; left: 0; right: 0; border-radius: 4px; background: linear-gradient(to top, var(--weather-cold), var(--weather-hot)); }
.dh-doc .wx-rain { position: relative; width: 28px; height: 34px; border-radius: 4px; background: var(--surface-3); overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.dh-doc .wx-rain i { position: absolute; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--weather-rain) 70%, transparent); }
.dh-doc .wx-rain em { position: relative; font: 500 11px/1 var(--font-sans); font-style: normal; color: var(--ink); padding-bottom: 2px; }
.dh-doc .wx-m { font: 400 12px var(--font-sans); color: var(--ink-2); white-space: nowrap; }
.dh-doc .wx-note { margin-top: 2px; font: 500 11px/1.3 var(--font-sans); color: var(--warn-ink); background: var(--warn-soft); border-radius: 6px; padding: 2px 6px; }
.dh-doc .wx-hours { position: relative; }
.dh-doc .wx-hrow { list-style: none; margin: 0; padding: 0; display: grid; }
.dh-doc .wx-hrow li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; }
.dh-doc .wx-plot { display: block; }
.dh-doc .wx-plot polyline { fill: none; stroke: var(--weather-hot); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.dh-doc .wx-plot circle { fill: var(--surface); stroke: var(--weather-hot); stroke-width: 2.5; }
.dh-doc .wx-plot text { font: 600 12px var(--font-sans); fill: var(--ink); }
.dh-doc .wx-hbars li { gap: 4px; }
.dh-doc .wx-hint { margin: 0; padding: 4px 14px 0; font: 400 12px/1.4 var(--font-sans); color: var(--muted); }
.dh-doc .wx-foot { margin: 0; padding: 6px 14px; font: 400 12px/1.4 var(--font-sans); color: var(--muted); border-top: 1px solid var(--line); }
.dh-doc .wx-scroll:focus-visible { outline: var(--focus-ring, 2px solid var(--acc)); outline-offset: -2px; }
.dh-doc .wx-icon { flex: none; overflow: visible; }
.dh-doc .wx-icon .wx-cloud { fill: color-mix(in srgb, var(--ink-2) 28%, var(--surface)); stroke: color-mix(in srgb, var(--ink-2) 60%, var(--surface)); stroke-width: 1.2; }
.dh-doc .wx-icon .wx-cloud.is-dark { fill: color-mix(in srgb, var(--ink-2) 48%, var(--surface)); }
.dh-doc .wx-icon .wx-cloud.is-pale { fill: color-mix(in srgb, var(--ink-2) 16%, var(--surface)); }
.dh-doc .wx-icon .wx-disc { fill: var(--weather-sun); }
.dh-doc .wx-icon .wx-rays line { stroke: var(--weather-sun); stroke-width: 2.4; stroke-linecap: round; }
.dh-doc .wx-icon .wx-moon,
.dh-doc .wx-icon .wx-star { fill: var(--weather-moon); }
.dh-doc .wx-icon .wx-drops line { stroke: var(--weather-rain); stroke-width: 2.6; stroke-linecap: round; animation: wx-fall 1.6s ease-in infinite; }
.dh-doc .wx-icon .wx-drops.is-light line { stroke-width: 1.8; }
.dh-doc .wx-icon .wx-flakes circle { fill: var(--surface); stroke: var(--weather-rain); stroke-width: 1.6; animation: wx-fall 2.4s ease-in-out infinite; }
.dh-doc .wx-icon .wx-hail circle { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.4; animation: wx-fall 1.2s ease-in infinite; }
.dh-doc .wx-icon .wx-bolt { fill: var(--weather-sun); animation: wx-flash 3s ease-in-out infinite; }
.dh-doc .wx-icon .wx-fog line { stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; opacity: .8; }
.dh-doc .wx-icon .wx-wind path { fill: none; stroke: var(--weather-rain); stroke-width: 2.6; stroke-linecap: round; animation: wx-sway 3.2s ease-in-out infinite alternate; }
.dh-doc .wx-icon .wx-rays { animation: wx-spin 40s linear infinite; }
.dh-doc .wx-icon.wx-s-cloud,
.dh-doc .wx-icon.wx-s-partly .wx-cloud { animation: wx-drift 5s ease-in-out infinite alternate; }
@keyframes wx-spin { to { transform: rotate(360deg); } }
@keyframes wx-fall { 0% { transform: translateY(-2px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(3px); opacity: 0; } }
@keyframes wx-flash { 0%, 80%, 100% { opacity: 1; } 88% { opacity: .35; } }
@keyframes wx-sway { to { transform: translateX(2px); } }
@keyframes wx-drift { to { transform: translateX(2px); } }
@media (prefers-reduced-motion: reduce) {
.dh-doc .wx-icon *,
.dh-doc .wx-icon { animation: none !important; }
}
.dh-doc [data-dh-motion="off"] .wx-icon *,
.dh-doc [data-dh-motion="off"] .wx-icon { animation: none !important; }
@container (max-width: 640px) {
.dh-doc .wx-days { grid-auto-columns: 112px; }
.dh-doc .wx-seg button { min-height: 36px; }
}

/* ---- dh.css (the package's own rules) ---- */
/* The package's own rules: the document root, the safe-render pieces, the two shipped variants, motion and phones.
   Everything reads theme tokens (THEME.md); nothing here names a colour. */

.dh-doc {
  color: var(--ink-2);
  font: var(--w-body) var(--fs-m)/var(--lh-body) var(--font-sans);
  overflow-wrap: break-word;
  max-width: 100%;
  min-width: 0;
}
.dh-doc img { max-width: 100%; height: auto; }
.dh-doc pre { max-width: 100%; }
.dh-doc li.task { list-style: none; margin-left: -1.3em; }
.dh-doc li.task > input { margin: 0 .5em 0 0; vertical-align: -2px; accent-color: var(--acc); }
.dh-doc .dh-link-off { text-decoration: underline dotted var(--faint); text-underline-offset: 3px; }
.dh-doc .dh-img-off { display: inline-block; padding: 0 6px; border: 1px dashed var(--line-2); border-radius: var(--r-s); color: var(--faint); font-size: var(--fs-s); }

/* what parse() refused, and raw HTML shown as text */
.dh-doc .dh-error {
  margin: var(--s-4) 0; padding: var(--s-3) var(--s-4);
  border: 1px solid var(--bad); border-left-width: 4px; border-radius: var(--r-s);
  background: var(--bad-soft); color: var(--ink); font-size: var(--fs-s); line-height: 1.45;
}
.dh-doc .dh-error b { color: var(--bad-ink); font-weight: var(--w-strong); }
.dh-doc .dh-error-line { color: var(--muted); }
.dh-doc .dh-raw, .dh-doc .dh-fallback {
  margin: var(--s-3) 0; padding: var(--s-3); overflow-x: auto;
  border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-2);
  color: var(--ink-2); font: 400 var(--fs-s)/1.5 var(--font-mono); white-space: pre-wrap;
}
.dh-doc .dh-fallback::before { content: attr(data-dh-missing); display: block; margin-bottom: 4px; color: var(--faint); font: 600 11px/1.3 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; }

/* the loading spinner (the 3D stage); a slot can replace it */
.dh-doc .dh-spinner { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) 0; color: var(--muted); font-size: var(--fs-s); }
.dh-doc .dh-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--acc); animation: dh-spin .8s linear infinite; }
@keyframes dh-spin { to { transform: rotate(360deg); } }

/* "What an LLM reads here", when the host asks for it */
.dh-doc .llm-peek .pane-llm { white-space: pre-wrap; overflow-x: auto; max-height: 24rem; }

/* ---- motion: the reader's setting, or a host style that turns motion off ---- */
.dh-doc[data-dh-motion="off"] *, .dh-doc[data-dh-motion="off"] *::before, .dh-doc[data-dh-motion="off"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) {
  .dh-doc *, .dh-doc *::before, .dh-doc *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- phones: nothing pushes the page sideways ---- */
.dh-doc .table-wrap, .dh-doc .code-block, .dh-doc .ch-pre { max-width: 100%; overflow-x: auto; }
/* a table wider than the text column (0.7.0-rc.3): a table of the document's own (not one inside a list, a quote or a
   part) leaves the column on a wide screen, as wide as its columns need and at most the page less 16 px each side,
   centred on the column, so a wide screen shows every column. A table that fits keeps the column's width; one wider than
   the page still scrolls, its hidden side fading (table-more.ts). CSS only: the page paints at its final width, nothing
   moves on load. --dh-table-max caps it (a host whose column is not centred on the page sets it, 100% turns it off). */
.dh-doc > .table-wrap { width: fit-content; min-width: 100%; max-width: var(--dh-table-max, calc(var(--page-w, 100vw) - 32px)); position: relative; left: 50%; translate: -50% 0; }
@media print { .dh-doc > .table-wrap { width: auto; min-width: 0; max-width: 100%; left: auto; translate: none; } }
.dh-doc figure.part { min-width: 0; max-width: 100%; }
/* the hydration queue's marker: no height, at the top of a part (hydrateDocument) */
.dh-doc .dh-turn { display: block; height: 0; overflow: hidden; }
@media (max-width: 520px) {
  .dh-doc { font-size: max(15px, var(--fs-s)); }
}

/* =====================================================================================================
   Variants: <DhDocument variant="flat"> or variant="bold" sets data-dh-variant on the root.
   A host style may write its own the same way: override the shape and motion tokens, then any selector.
   ===================================================================================================== */

/* flat: hairlines, small corners, no shadows, quicker motion */
.dh-doc[data-dh-variant="flat"] {
  --r-s: 3px; --r-m: 4px; --r-l: 6px;
  --shadow-sm: none; --shadow-md: none; --shadow-lg: none;
  --dur-fast: 100ms; --dur: 160ms; --dur-slow: 240ms;
}
.dh-doc[data-dh-variant="flat"] :is(.term, .cw, .ide, .fx, .chart, .scn, .dg, .tl, .al, .code-block, .callout, .acc-item, .tabs) { box-shadow: none; }

/* bold: square corners, thick ink borders, hard offset shadows, monospace headings and buttons, no motion */
.dh-doc[data-dh-variant="bold"] {
  --r-s: 0; --r-m: 0; --r-l: 0; --r-pill: 0;
  --shadow-sm: 3px 3px 0 var(--ink); --shadow-md: 4px 4px 0 var(--ink); --shadow-lg: 6px 6px 0 var(--ink);
  --font-display: var(--font-mono);
  --dur-fast: 0ms; --dur: 0ms; --dur-slow: 0ms; --stagger: 0ms;
}
.dh-doc[data-dh-variant="bold"] :is(.term, .cw, .ide, .fx, .chart, .scn, .dg, .tl, .al, .code-block, .table-wrap) { border: 2px solid var(--ink); box-shadow: var(--shadow-md); }
.dh-doc[data-dh-variant="bold"] :is(.callout) { border: 2px solid var(--ink); box-shadow: var(--shadow-sm); }
.dh-doc[data-dh-variant="bold"] :is(h1, h2, h3, h4) { font-family: var(--font-mono); letter-spacing: 0; text-transform: uppercase; }
.dh-doc[data-dh-variant="bold"] .btn { border: 2px solid var(--ink); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .04em; box-shadow: var(--shadow-sm); }
.dh-doc[data-dh-variant="bold"] .btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.dh-doc[data-dh-variant="bold"] .tab-bar [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--surface); }
.dh-doc[data-dh-variant="bold"] .dh-spin { border-radius: 0; border-width: 3px; }
.dh-doc[data-dh-variant="bold"] *, .dh-doc[data-dh-variant="bold"] *::before, .dh-doc[data-dh-variant="bold"] *::after { transition: none !important; animation-duration: 0s !important; }

/* The example site's own page (not part of the package): a header and a column. Colours come from the package's tokens. */
/* The faces the package measures its words with (the composed stage's widths are Poppins's), self-hosted from
   assets/fonts (SIL OFL 1.1, licences there). The package itself loads no font (ADOPT.md): a host maps --font-sans.
   The regular faces are preloaded, and the page column is held hidden until they load, 1 s at most (example/font-hold.ts
   ends the hold early), so text does not move when its face swaps in. */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/poppins-300-latin.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/poppins-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/poppins-500-latin.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/poppins-600-latin.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibmplexmono-400-latin.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibmplexmono-500-latin.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibmplexmono-600-latin.woff2") format("woff2"); }
@keyframes ex-font-hold { from, to { visibility: hidden; } }
html:not(.fonts-ready) .ex-main { animation: ex-font-hold 1s step-end; }
@media print { html .ex-main { animation: none; } }
html, body { margin: 0; }
body { background: #E6E8F2; color: #273143; font: 16px/1.5 system-ui, sans-serif; }
:root[data-theme="dark"] body { background: #0B1020; color: #D3D9E6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background: #0B1020; color: #D3D9E6; } }
.ex-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border-bottom: 1px solid rgba(127,127,127,.3); }
.ex-brand { font-weight: 600; color: inherit; text-decoration: none; }
.ex-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ex-tools button { font: inherit; font-size: 14px; padding: 4px 10px; border: 1px solid rgba(127,127,127,.5); border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
.ex-tools button[aria-pressed="true"] { background: #555FFF; border-color: #555FFF; color: #fff; }
.ex-label { font-size: 13px; opacity: .8; }
.ex-main { max-width: 52rem; margin: 0 auto; padding: 16px; box-sizing: border-box; }
.ex-crumb { font-size: 13px; opacity: .85; overflow-wrap: anywhere; }
.ex-crumb a, .ex-list a { color: inherit; }
.ex-list { padding-left: 1.2em; }
.ex-list li { margin: 4px 0; overflow-wrap: anywhere; }
.ex-list code, .ex-crumb code { font-size: 12px; opacity: .75; }
.ex-problems { margin: 8px 0 16px; font-size: 14px; }
/* a fixture's source and LLM view (build.tsx), closed until asked for; a long line scrolls inside its box */
.ex-views { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 8px 0 16px; }
.ex-view { min-width: 0; border: 1px solid rgba(127,127,127,.35); border-radius: 8px; }
.ex-view > summary { cursor: pointer; padding: 8px 12px; font-size: 14px; font-weight: 600; }
.ex-view-pre { margin: 0; padding: 12px; border-top: 1px solid rgba(127,127,127,.35); overflow-x: auto; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.ex-view-none { margin: 0; padding: 10px 12px; border-top: 1px solid rgba(127,127,127,.35); font-size: 14px; }
/* the example host block */
.fy-task { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--acc); border-radius: var(--r-s); background: var(--surface); color: var(--ink); }
.fy-task-id { font: 600 13px/1 var(--font-mono); color: var(--acc-ink); }
.fy-task-title { flex: 1; min-width: 8rem; }
.fy-task-state { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.fy-task[data-state="done"] { border-left-color: var(--good); }
.fy-task[data-state="doing"] { border-left-color: var(--warn); }
.fy-ref { font: 500 .92em/1 var(--font-mono); padding: 1px 6px; border-radius: 6px; background: var(--acc-softer); color: var(--acc-ink); text-decoration: none; }
.fy-ref-task { border: 1px solid var(--acc-soft); }

/* Source and LLM panels keep long lines inside the example's column. */
.ex-views .ex-view-pre { min-width: 0; max-width: 100%; box-sizing: border-box; white-space: pre-wrap; overflow-wrap: anywhere; }
.ex-views .ex-view-pre code { white-space: inherit; overflow-wrap: inherit; }
