/* Bracket workbench (2026-11-03, panel D 2026-11-09). Uses the site tokens from main.css; same idiom as lab.css. */
.lab-how { max-width: var(--measure-wide); }
.lab-how h2 { font-size: 1.45rem; font-weight: 600; margin: 2rem 0 0.85rem; }
.lab-how-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.lab-how-list li { margin: 0 0 0.85rem; }
.lab-how-list a, .wb-panel a, .page-header a { color: var(--hm-cyan); text-underline-offset: 0.15em; }
.lab-how-list a:hover, .wb-panel a:hover, .page-header a:hover { color: var(--hm-yellow); }

.wb-panel { margin: 2.5rem 0; padding: 1.25rem; border: 1px solid var(--ink-border); background: var(--ink-elevated); border-radius: var(--radius); position: relative; min-width: 0; }
.wb-panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad-heatmap); }
.wb-panel h2 { font-size: 1.5rem; font-weight: 600; margin: 0.25rem 0 0.6rem; }
.wb-letter { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; margin-right: 0.4rem; border-radius: 50%; background: var(--grad-heatmap); color: #0b0a0e; font-family: var(--font-sans); font-size: 1rem; vertical-align: 0.15em; }
.wb-status-line { font-family: var(--font-sans); font-size: 0.8rem; color: var(--text-muted); line-height: 1.9; margin: 0 0 0.75rem; }
.wb-tag { display: inline-block; font-family: var(--font-sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em; padding: 0.05rem 0.45rem; border: 1px solid; border-radius: 999px; line-height: 1.5; }
.wb-tag--ver { color: var(--hm-green); border-color: rgba(61, 206, 122, 0.6); }
.wb-tag--rep { color: var(--hm-cyan); border-color: rgba(46, 196, 201, 0.6); }
.wb-tag--our { color: var(--text-faint); border-color: var(--ink-border); background: var(--ink-soft); }
.wb-tag--grant { color: var(--hm-magenta); border-color: rgba(224, 72, 168, 0.6); border-style: dashed; }
.wb-explain { max-width: var(--measure-wide); }
.wb-controls { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: flex-end; font-family: var(--font-sans); font-size: 0.9rem; margin: 1rem 0 0.5rem; }
.wb-field { display: flex; flex-direction: column; gap: 0.3rem; color: var(--text-muted); flex: 1 1 16rem; min-width: 0; }
.wb-field input, .wb-field select { font: 1rem/1.3 ui-monospace, Menlo, monospace; color: var(--text); background: var(--ink-soft); border: 1px solid #7a7290; border-radius: var(--radius); padding: 0.5rem; width: 100%; box-sizing: border-box; }
.wb-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.wb-btn { font-size: 0.85rem; padding: 0.45rem 0.85rem; }
.wb-check { display: inline-flex; gap: 0.4rem; align-items: center; color: var(--text); }
.wb-link { background: none; border: 0; padding: 0; color: var(--hm-cyan); text-decoration: underline; font: inherit; cursor: pointer; }
.wb-sliders { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.5rem 1rem; width: 100%; }
.wb-sliders label { display: grid; grid-template-columns: 5.5rem 1fr 1.2rem; align-items: center; gap: 0.4rem; color: var(--text-muted); }
.wb-sliders input { width: 100%; min-width: 0; accent-color: var(--hm-magenta); }
.wb-radios { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; }
.wb-radios legend { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); padding: 0; margin-bottom: 0.25rem; }
.wb-radios input { accent-color: var(--hm-cyan); }
.wb-fig { margin: 1rem 0; min-width: 0; }
.wb-fig figcaption { font-family: var(--font-sans); font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.wb-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--ink-border); background: var(--ink); border-radius: var(--radius); }
.wb-svg { display: block; width: 100%; height: auto; touch-action: pan-y; font-family: var(--font-sans); }
.wb-svg--fit { border: 1px solid var(--ink-border); background: var(--ink); border-radius: var(--radius); }
.wb-status, .wb-note, .wb-readout { font-family: var(--font-sans); font-size: 0.88rem; color: var(--text-muted); }
.wb-status.is-ok { color: var(--hm-green); }
.wb-status.is-bad { color: var(--hm-hot); }
.wb-readout { color: var(--text); min-height: 2.6em; }
.wb-forget { font: 1rem ui-monospace, Menlo, monospace; color: var(--hm-yellow); word-break: break-all; padding: 0.5rem; background: var(--ink-soft); }
.wb-shows { font-size: 0.95rem; border-left: 3px solid var(--hm-indigo); padding-left: 0.9rem; max-width: var(--measure-wide); }
.wb-details { font-family: var(--font-sans); font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.wb-list { padding-left: 1.2rem; }

/* SVG parts */
.wb-cell { cursor: pointer; }
.wb-cell.is-one { cursor: default; }
.wb-cell-box { fill: var(--ink-soft); stroke: #7a7290; }
.wb-cell.is-bad .wb-cell-box { stroke: var(--hm-hot); stroke-width: 2.5; }
.wb-cell-txt { fill: var(--text); font: 600 16px ui-monospace, Menlo, monospace; pointer-events: none; }
.wb-cell.is-one .wb-cell-txt { fill: var(--text-faint); }
.wb-cell:focus { outline: none; }
.wb-cell:focus-visible .wb-cell-box, .wb-node:focus-visible .wb-node-dot { stroke: var(--hm-yellow); stroke-width: 3; }
.wb-depth-txt { fill: var(--text-muted); font-size: 11px; }
.wb-arc { fill: none; stroke-width: 2.5; }
.wb-node { cursor: pointer; }
.wb-node:focus { outline: none; }
.wb-node-dot { stroke: var(--ink); stroke-width: 2; }
.wb-tri { fill: rgba(91, 79, 214, 0.25); stroke-width: 1.5; stroke-dasharray: 4 3; }
.wb-edge { stroke: #7a7290; stroke-width: 1.2; }
.wb-leaf { fill: var(--hm-yellow); }
.wb-leaf.is-one { fill: var(--text-faint); }
.wb-grid { stroke: var(--ink-border); }
.wb-axis { fill: var(--text-faint); font-size: 10px; }
.wb-boundary { stroke: var(--hm-hot); stroke-width: 2; stroke-dasharray: 5 3; }
.wb-thr { stroke: var(--hm-yellow); stroke-dasharray: 3 3; }
.wb-pnote { cursor: grab; }
.wb-pnote.is-sel, .wb-pnote:focus-visible { stroke: var(--text); stroke-width: 2; outline: none; }
rect.wb-pnote:focus { outline: none; }
.wb-playhead { stroke: var(--hm-yellow); stroke-width: 1.5; }
.wc-lobe { cursor: crosshair; }
.wc-lobe.is-hover, .wc-lobe:focus-visible { stroke: var(--text); stroke-width: 1.5; outline: none; }
.wc-edge { fill: none; stroke: var(--text); stroke-width: 1; opacity: 0.8; }
.wc-bar { stroke: var(--hm-yellow); stroke-width: 3; }
.wc-bar.is-pruned { opacity: 0.2; }

@media (max-width: 30rem) { .wb-panel { padding: 0.9rem 0.7rem; } .wb-sliders { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
.wb-panel [hidden] { display: none !important; }

/* Panel D */
.wd-char { font-family: "Noto Serif CJK JP", "Source Han Serif", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif; font-size: 1.55rem; line-height: 1; min-width: 2.75rem; min-height: 2.75rem; padding: 0.35rem 0.45rem; }
.wd-char.is-on { border-color: var(--hm-cyan); color: var(--hm-cyan); box-shadow: 0 0 0 1px var(--hm-cyan); }
.wd-bracket { font: 0.92rem/1.45 ui-monospace, Menlo, monospace; color: var(--hm-yellow); word-break: break-word; overflow-wrap: anywhere; padding: 0.55rem 0.7rem; margin: 0 0 0.5rem; background: var(--ink-soft); border: 1px solid var(--ink-border); border-radius: var(--radius); }
.wd-overlay { font-size: 0.95rem; max-width: var(--measure-wide); border: 1px dashed rgba(224, 72, 168, 0.5); border-radius: var(--radius); padding: 0.85rem 1rem; margin: 0.75rem 0 1rem; background: var(--ink-soft); }
.wd-overlay h3 { font-family: var(--font-sans); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hm-magenta); margin: 0 0 0.5rem; }
.wd-overlay p { margin: 0 0 0.7rem; }
.wd-overlay p:last-child { margin-bottom: 0; }
.wd-node { cursor: pointer; }
.wd-node.is-leaf { cursor: default; }
.wd-node:focus { outline: none; }
.wd-node:focus-visible .wd-chip { stroke: var(--hm-yellow); stroke-width: 3; }
.wd-chip { stroke: var(--ink); stroke-width: 2; }
.wd-glyph { fill: #0b0a0e; font: 700 18px "Noto Serif CJK JP", "Source Han Serif", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif; }
.wd-glyph.is-stroke { font: 600 11px ui-monospace, Menlo, monospace; fill: #0b0a0e; }
.wd-meta { fill: var(--text-muted); font: 11px var(--font-sans), sans-serif; }
.wd-floor-box { fill: rgba(46, 196, 201, 0.08); stroke: var(--hm-cyan); stroke-width: 1.2; stroke-dasharray: 4 3; }
.wd-tri-sm { pointer-events: none; }

@media (max-width: 30rem) {
  .wd-char { min-width: 2.5rem; min-height: 2.5rem; font-size: 1.35rem; }
}
