.ds-page {overflow-anchor: none;}
.ds-nav a[aria-current="page"] {color: var(--color-accent-text); text-decoration: underline; text-underline-offset: 4px;}
.ds-logo {display: block; width: var(--u); height: var(--u); flex-shrink: 0;}
.ds-section-head .ds-kicker a {color: var(--color-accent-text); text-decoration: none;}
.ds-section-head .ds-kicker a:hover {text-decoration: underline; text-underline-offset: 3px;}
.ds-prose {border: 0; box-shadow: none; background-color: transparent; padding: 0 0 calc(0.5 * var(--u)) 0;}
.ds-hero {grid-template-columns: 1fr;}
.ds-hero.wd-hero {grid-template-columns: 1fr; gap: calc(1.5 * var(--u)); padding: calc(2.5 * var(--u)) 0 calc(2 * var(--u)) 0;}
.wd-hero-top {max-width: none;}
.wd-hero-top h1 {font-size: clamp(24px, 3.1vw, 40px); line-height: 1.08; letter-spacing: 0.02em; margin-bottom: calc(0.75 * var(--u));}
.wd-hero-lead {font-size: var(--font-size-md); line-height: 1.55; color: var(--color-text-secondary); max-width: calc(40 * var(--u)); margin: 0;}
.wd-hero-lead strong {color: var(--color-text-primary);}
.wd-mode-intro {margin-bottom: var(--u);}
.wd-mode-intro .ds-prose {max-width: none; padding: 0;}
.wd-mode-intro .ds-prose p:last-child {margin-bottom: 0;}
.wd-spec-list {margin: 0; padding: calc(0.5 * var(--u)) calc(0.75 * var(--u)); list-style: none; background-color: var(--color-surface-1); border-top: 1px solid var(--color-border-default); border-left: 1px solid var(--color-border-default); box-shadow: 1px 0 0 0 var(--color-border-default), 0 1px 0 0 var(--color-border-default), 1px 1px 0 0 var(--color-border-default); display: flex; flex-direction: column; gap: calc(0.35 * var(--u)); font-size: var(--font-size-sm); color: var(--color-text-secondary);}
.wd-spec-list li {margin: 0; line-height: 1.45;}
.wd-spec-list strong {color: var(--color-text-primary);}
.ds-panel.ds-editor-src {display: flex; flex-direction: column; justify-content: space-between;}
.ds-panel.ds-editor-out {display: flex; flex-direction: column; justify-content: center; align-items: center; background-color: var(--color-diagram-paper);}
.ds-panel.ds-editor-out.ds-diagram-reg, .ds-diagram-reg .ds-diagram-body, .ds-panel.ds-editor-out.ds-diagram-assign, .ds-diagram-assign .ds-diagram-body {background-color: var(--color-diagram-paper);}
.ds-panel.ds-editor-out .ds-diagram-body {width: 100%;}
.wd-ed-foot {display: flex; align-items: center; justify-content: space-between; gap: calc(0.5 * var(--u)); min-height: var(--u); padding: 2px calc(0.5 * var(--u)); background-color: var(--color-surface-1);}
.wd-ed-foot .wd-status {border: 0; padding: 0; background-color: transparent; font-family: var(--font-family-mono); font-size: 11px; color: var(--color-text-muted);}
.wd-ed-foot .wd-status .ds-readout-v {color: inherit; font-weight: 400;}
.wd-ed-foot .wd-status.is-error {color: var(--color-status-error);}
.wd-open-link {font-family: var(--font-family-mono); font-size: var(--font-size-xs); text-transform: uppercase; letter-spacing: var(--font-tracking-caps); color: var(--color-accent-text); text-decoration: none; white-space: nowrap;}
.wd-open-link:hover {text-decoration: underline;}
.wd-lazy-cm {position: relative; flex: 1 1 auto; cursor: text; min-height: 3em;}
.ds-cm .CodeMirror {min-height: 3em;}
.wd-code-preview {margin: 0; padding: calc(0.5 * var(--u)); font-family: var(--font-family-mono); font-size: var(--font-size-sm); line-height: 1.5; color: var(--color-text-primary); background-color: var(--color-surface-1); overflow-x: auto; white-space: pre;}
.wd-stack {display: flex; flex-direction: column; gap: var(--u);}
.wd-mode-sub {margin: 0 0 calc(0.5 * var(--u)) 0; font-family: var(--font-family-display); font-size: var(--font-size-lg); text-transform: uppercase;}
.wd-break-steps {display: block; margin: 0 calc(-1 * var(--sheet-pad)); border-top: 1px solid var(--color-border-strong);}
.wd-break-step {height: calc(0.5 * var(--u));}
.wd-break-step-1 {background-color: oklch(0.84 0.01 88);}
.wd-break-step-2 {background-color: oklch(0.62 0.008 88);}
.wd-break-step-3 {background-color: oklch(0.40 0.004 88);}
.wd-break-step-4 {background-color: oklch(0.28 0 0);}
.wd-live-views {--color-surface-0: oklch(0.24 0 0); --color-surface-1: oklch(0.28 0 0); --color-surface-2: oklch(0.18 0 0); --color-surface-3: oklch(0.34 0 0); --color-surface-4: oklch(0.972 0.008 88); --color-text-primary: oklch(0.93 0.012 88); --color-text-secondary: oklch(0.8 0.012 88); --color-text-muted: oklch(0.69 0.012 88); --color-text-inverse: oklch(0.212 0.004 95); --color-border-subtle: oklch(0.44 0.01 80); --color-border-default: oklch(0.58 0.01 80); --color-border-strong: oklch(0.84 0.012 88); --color-status-ok: #7acf7e; --color-status-warn: #f0ba59; --color-status-error: #fc7a73; --color-status-info: #7cbbf0; --color-accent-fill: #4fb8d9; --color-accent-text: #4fb8d9; --color-diagram-paper: oklch(0.24 0 0); --color-grid: oklch(0.29 0.016 250); --skin: dark; background-color: var(--color-surface-0); color: var(--color-text-primary); background-image: linear-gradient(to right, oklch(0.29 0.016 250) 1px, transparent 1px), linear-gradient(to bottom, oklch(0.29 0.016 250) 1px, transparent 1px); background-size: var(--u) var(--u);}
.wd-live-views .ds-prose {max-width: calc(38 * var(--u)); margin-bottom: calc(0.5 * var(--u));}
.ds-cards.wd-verify-grid {grid-template-columns: 1fr;}
@media (min-width: 768px) {.ds-cards.wd-verify-grid {grid-template-columns: calc(13 * var(--u)) 1fr;}}
@media (min-width: 1024px) {.ds-cards.wd-verify-grid {grid-template-columns: calc(18 * var(--u)) 1fr;}}
@media (min-width: 1280px) {.ds-cards.wd-verify-grid {grid-template-columns: calc(24 * var(--u)) 1fr;}}
.wd-live-views .ds-card {display: flex; flex-direction: column;}
.wd-live-views .ds-card-body {display: flex; flex-direction: column; flex: 1 1 auto;}
.ds-shot .wd-shot-img {display: block; width: 100%; height: calc(13 * var(--u)); object-fit: cover; object-position: left top;}
.wd-tool-head {display: flex; align-items: center; gap: calc(0.5 * var(--u)); margin-bottom: calc(0.25 * var(--u));}
.wd-tool-logo {display: block; width: calc(2 * var(--u)); height: calc(2 * var(--u)); flex-shrink: 0; border: 1px solid var(--color-border-default); image-rendering: crisp-edges;}
.wd-tool-title {display: flex; flex-direction: column; gap: 4px; min-width: 0;}
.wd-tool-title h3 {margin: 0;}
.wd-card-code {margin: calc(0.25 * var(--u)) 0; padding: calc(0.35 * var(--u)) calc(0.5 * var(--u)); background-color: var(--color-surface-2); border: 1px solid var(--color-border-subtle); font-family: var(--font-family-mono); font-size: var(--font-size-xs); line-height: 1.5; color: var(--color-text-primary); overflow-x: auto; white-space: pre;}
.wd-card-links {display: flex; flex-wrap: wrap; align-items: center; gap: calc(0.5 * var(--u)); margin-top: auto; padding-top: calc(0.5 * var(--u));}
.wd-eco-controls {display: flex; flex-wrap: wrap; align-items: center; gap: calc(0.5 * var(--u)); margin-bottom: var(--u);}
.wd-eco-search {min-width: 220px; flex: 1 1 220px;}
.wd-eco-count {font-family: var(--font-family-mono); font-size: var(--font-size-xs); text-transform: uppercase; letter-spacing: var(--font-tracking-caps); color: var(--color-text-muted); margin-left: auto;}
.wd-eco-row[hidden] {display: none;}
.wd-consent {position: sticky; bottom: 0; z-index: 40; margin: 0 calc(-1 * var(--sheet-pad)); padding: calc(0.5 * var(--u)) var(--sheet-pad); background-color: var(--color-surface-1); border-top: 1px solid var(--color-border-strong); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: calc(0.5 * var(--u));}
.wd-consent[hidden] {display: none;}
.wd-consent-text {margin: 0; font-size: var(--font-size-sm); color: var(--color-text-secondary);}
.wd-consent-actions {display: inline-flex; gap: calc(0.5 * var(--u));}
body.wd-editor-body .wd-consent {position: fixed; left: 0; right: 64px; bottom: 0; margin: 0; z-index: 80;}
body.wd-editor-body {padding: 0; margin: 0; width: 100vw; height: 100vh; overflow: hidden; background-color: var(--color-surface-0); color: var(--color-text-primary);}
#content.wd-ed-workspace {position: relative; display: flex; width: 100%; height: 100%; overflow: hidden;}
#content.wd-ed-workspace[data-rot="0"] {flex-direction: column;}
#content.wd-ed-workspace[data-rot="1"] {flex-direction: row-reverse;}
#content.wd-ed-workspace[data-rot="2"] {flex-direction: column-reverse;}
#content.wd-ed-workspace[data-rot="3"] {flex-direction: row;}
#SVG.wd-ed-svg {box-sizing: border-box; min-width: 0; min-height: 0; background-color: var(--color-diagram-paper); overflow: hidden;}
#SVGScroll {width: 100%; height: 100%; overflow: auto; padding: 12px; box-sizing: border-box;}
#WaveDrom_Display_0 [id^="waves_"] > rect:first-of-type {fill: var(--color-diagram-paper) !important;}
#WaveDrom_Display_0 [id^="waves_"] path[style*="stroke:#000"], #WaveDrom_Display_0 [id^="wavegaps_"] line[style*="stroke:#000"], #WaveDrom_Display_0 [id^="wavegaps_"] path[style*="stroke:#000"] {stroke: var(--color-signal) !important;}
#WaveDrom_Display_0 [id^="wavegaps_"] rect[style*="fill:#ffffffcc"] {fill: var(--color-diagram-paper) !important; fill-opacity: 0.85;}
#TXT.wd-ed-txt {box-sizing: border-box; min-width: 0; min-height: 0; background-color: var(--color-surface-1); overflow: hidden;}
#TXT.wd-ed-txt .CodeMirror {height: 100%; font-family: var(--font-family-mono); font-size: 14px; line-height: 1.5; background-color: var(--color-surface-1); color: var(--color-text-primary);}
#TXT.wd-ed-txt .CodeMirror-gutters {background-color: var(--color-surface-1); border-right-color: var(--color-border-subtle);}
.wd-ed-divider {position: relative; box-sizing: border-box; flex: 0 0 8px; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; background-color: var(--color-surface-2); touch-action: none; user-select: none; z-index: 20;}
#content[data-rot="0"] .wd-ed-divider, #content[data-rot="2"] .wd-ed-divider {cursor: ns-resize; border-top: 1px solid var(--color-border-subtle); border-bottom: 1px solid var(--color-border-subtle);}
#content[data-rot="1"] .wd-ed-divider, #content[data-rot="3"] .wd-ed-divider {cursor: ew-resize; border-left: 1px solid var(--color-border-subtle); border-right: 1px solid var(--color-border-subtle);}
.wd-ed-divider:hover, .wd-ed-divider.is-dragging {background-color: var(--color-accent-text);}
.wd-ed-rot-grip {position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1px solid var(--color-border-default); background-color: var(--color-surface-0); cursor: pointer; z-index: 21;}
.wd-ed-rot-grip:hover {border-color: var(--color-accent-text);}
.wd-ed-yinyang {display: block; width: 24px; height: 24px; pointer-events: none;}
#content[data-rot="1"] .wd-ed-yinyang {transform: rotate(90deg);}
#content[data-rot="2"] .wd-ed-yinyang {transform: rotate(180deg);}
#content[data-rot="3"] .wd-ed-yinyang {transform: rotate(270deg);}
.wd-ed-menu-btn {position: fixed; right: 16px; bottom: 16px; z-index: 90; width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--color-border-strong); background-color: var(--color-surface-1); color: var(--color-text-primary); font-family: var(--font-family-mono); font-size: 20px; line-height: 1; cursor: pointer;}
.wd-ed-menu-btn:hover {border-color: var(--color-accent-text); color: var(--color-accent-text);}
.wd-ed-menu {position: fixed; right: 16px; bottom: 56px; z-index: 95; min-width: 200px; border: 1px solid var(--color-border-strong); background-color: var(--color-surface-1); color: var(--color-text-primary);}
.wd-ed-menu[hidden] {display: none;}
.wd-ed-menu-ver {padding: 6px 12px; text-align: right; font-family: var(--font-family-mono); font-size: 11px; color: var(--color-text-muted); border-bottom: 1px solid var(--color-border-subtle);}
.wd-ed-menu-list {list-style: none; margin: 0; padding: 4px 0; border-bottom: 1px solid var(--color-border-subtle);}
.wd-ed-menu-list:last-child {border-bottom: 0;}
.wd-ed-menu-list button, .wd-ed-menu-list a {display: block; width: 100%; box-sizing: border-box; text-align: left; padding: 6px 12px; border: 0; background-color: transparent; color: var(--color-text-primary); font-family: var(--font-family-mono); font-size: 12px; text-decoration: none; cursor: pointer;}
.wd-ed-menu-list button:hover, .wd-ed-menu-list a:hover {background-color: var(--color-surface-2); color: var(--color-accent-text);}