/* Isolated diagrams: crisp geometry, readable labels, no colour-only distinctions. */
.dg{--dg-blue:var(--blue,#5264d6);--dg-warm:var(--warm,#ffb478);margin:24px 0 28px;color:var(--ink,#222638);font-family:Arial,Helvetica,sans-serif;line-height:1.45;border:1px solid var(--line,#d5dae3);background:var(--surface,#fff);overflow:hidden;min-width:0}.dg *{box-sizing:border-box}.dg-heading{display:flex;flex-direction:column;gap:8px;padding:20px 22px;border-bottom:1px solid var(--line,#d5dae3)}.dg-kicker,.dg-small-label{font-size:10px;line-height:1.5;letter-spacing:.09em;text-transform:uppercase;color:var(--muted,#5b6069)}.dg-heading>strong{font-size:20px;font-weight:600;letter-spacing:-.035em;line-height:1.2}.dg figcaption{margin:0;border-top:1px solid var(--line,#d5dae3);padding:16px 22px;font-size:12px;line-height:1.65;color:var(--muted,#5b6069)}.dg figcaption strong{color:var(--ink,#222638);font-weight:600}.dg figcaption span{display:inline}.dg-svg{display:block;width:100%;height:auto;max-width:100%;overflow:visible}.dg-fill,.dg-event-bar{fill:var(--ink,#222638)}.dg-paper{fill:var(--surface,#fff)}.dg-outline,.dg-line{stroke:var(--ink,#222638);stroke-width:2;stroke-linecap:square;stroke-linejoin:miter}.dg-line{fill:none}.dg-small-label{display:block}.dg-case-current{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 22px;background:var(--soft,#f0f3f7);border-bottom:1px solid var(--line,#d5dae3)}.dg-case-current>span{font-size:11px;color:var(--muted,#5b6069)}.dg-case-current>strong{font-size:17px;letter-spacing:-.02em}.dg-case-groups{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;padding:22px}.dg-case-group{min-width:0;border:1px solid var(--line,#d5dae3);background:var(--surface,#fff)}.dg-group-header{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;background:var(--soft,#f0f3f7);border-bottom:2px solid var(--ink,#222638)}.dg-group-header span{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted,#5b6069)}.dg-group-header strong{font-size:28px;letter-spacing:-.06em;font-weight:600}.dg-role-record{display:flex;align-items:center;gap:8px;padding:14px 10px;border-bottom:1px solid var(--line,#d5dae3)}.dg-role-record:last-child{border-bottom:0}.dg-role-record.is-active{background:var(--soft,#f0f3f7);box-shadow:inset 3px 0 0 var(--dg-blue)}.dg-role-symbol{width:48px;flex:0 0 48px;max-height:48px}.dg-role-shape{fill:var(--surface,#fff);stroke:var(--ink,#222638);stroke-width:2.5}.dg-role-letter{font-size:25px;text-anchor:middle;fill:var(--ink,#222638);font-weight:700}.dg-role-record.is-active .dg-role-shape{fill:#3f4fb0;stroke:#3f4fb0}.dg-role-record.is-active .dg-role-letter{fill:#fff}.dg-role-record strong,.dg-role-record span,.dg-role-record small{display:block}.dg-role-record strong{font-size:12px;line-height:1.35;font-weight:600}.dg-role-record span{font-size:11px;margin-top:4px;color:var(--muted,#5b6069)}.dg-role-record small{font-size:9px;line-height:1.35;margin-top:9px;color:var(--muted,#5b6069)}.dg-case-groups.is-single{grid-template-columns:1fr}.dg-case-groups.is-single .dg-role-records{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.dg-case-groups.is-single .dg-role-record{flex-direction:column;align-items:flex-start;gap:4px;border-bottom:0;border-right:1px solid var(--line,#d5dae3)}.dg-case-groups.is-single .dg-role-record:last-child{border-right:0}.dg-agreement-pair{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--line,#d5dae3)}.dg-controller,.dg-target{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;padding:20px 14px;text-align:center;min-height:205px}.dg-controller{border-right:1px solid var(--line,#d5dae3);background:var(--soft,#f0f3f7)}.dg-controller-icons{height:85px;max-width:175px;margin:12px 0 3px;color:var(--dg-blue)}.dg-controller-icons .dg-fill{fill:var(--dg-blue)}.dg-controller>strong{font-size:16px;line-height:1.3}.dg-target>.dg-small-label{margin-bottom:24px}.dg-verb-form{font-size:28px;letter-spacing:-.065em;white-space:nowrap;font-weight:600}.dg-verb-suffix{display:inline-block;color:var(--dg-blue);border-bottom:3px solid currentColor;padding-bottom:3px;margin-left:3px}.dg-suffix-key{display:flex;justify-content:center;gap:14px;font-size:10px;color:var(--muted,#5b6069);margin-top:14px}.dg-suffix-key b{font-size:13px;color:var(--ink,#222638);margin-right:3px}.dg-feature-checks{padding:16px 22px 20px}.dg-check-columns,.dg-feature-check{display:grid;grid-template-columns:.8fr 1fr 18px 1fr .85fr;align-items:center;gap:6px}.dg-check-columns{font-size:9px;color:var(--muted,#5b6069);text-transform:uppercase;letter-spacing:.06em;margin-bottom:7px}.dg-feature-check{padding:12px 0;border-top:1px solid var(--line,#d5dae3);font-size:11px}.dg-feature-name{font-weight:600}.dg-feature-check>strong{font-weight:400}.dg-feature-arrow{color:var(--muted,#5b6069)}.dg-check-status{display:flex;align-items:center;justify-content:flex-end;gap:5px;font-size:9px;white-space:nowrap}.dg-check-status b{font-size:20px;font-weight:600;line-height:1}.dg-feature-check.is-match .dg-check-status b{color:var(--dg-blue)}.dg-feature-check.is-mismatch .dg-check-status b{color:#222638;background:var(--dg-warm);padding:1px 4px}.dg-time-state{display:flex;justify-content:space-between;gap:20px;padding:15px 22px;font-size:11px;line-height:1.5;color:var(--muted,#5b6069)}.dg-time-state b{color:var(--ink,#222638);font-weight:600}.dg-time-state>span:last-child{text-align:right}.dg-time-plot{padding:0 12px 16px;background:var(--soft,#f0f3f7)}.dg-time-chart{padding-top:8px}.dg-grid-line{fill:none;stroke:var(--line,#d5dae3);stroke-width:1}.dg-axis,.dg-axis-tick{fill:none;stroke:var(--ink,#222638);stroke-width:1.5}.dg-now-line{stroke:var(--ink,#222638);stroke-width:2;stroke-dasharray:4 5}.dg-event-edge{stroke:var(--ink,#222638);stroke-width:2}.dg-view-frame{fill:var(--dg-blue);fill-opacity:.12;stroke:var(--dg-blue);stroke-width:2}.dg-frame-corners{fill:none;stroke:var(--dg-blue);stroke-width:4}.dg-reference-arrow{fill:none;stroke:var(--dg-blue);stroke-width:2.5}.dg-time-axis-labels{display:grid;grid-template-columns:1fr 1fr 1fr;margin:0 5%;font-size:11px;color:var(--muted,#5b6069)}.dg-time-axis-labels strong{text-align:center;background:var(--dg-warm);color:#222638;padding:2px 9px;justify-self:center;font-size:10px;font-weight:600}.dg-time-axis-labels>span:last-child{text-align:right}.dg-time-legend{display:flex;flex-wrap:wrap;gap:10px 18px;padding:15px 22px;font-size:10px;color:var(--muted,#5b6069)}.dg-time-legend>span{display:flex;align-items:center;gap:7px}.dg-time-legend i{display:block;width:14px;height:10px}.dg-key-event{background:var(--ink,#222638)}.dg-key-frame{border:2px solid var(--dg-blue)}.dg-key-now{width:0!important;border-left:2px dashed var(--ink,#222638);margin:0 6px}.dg-sound-main{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(110px,1fr);border-bottom:1px solid var(--line,#d5dae3)}.dg-mouth-panel{padding:16px 12px 14px;border-right:1px solid var(--line,#d5dae3);background:var(--soft,#f0f3f7);min-width:0}.dg-anatomy-direction{display:flex;justify-content:space-between;font-size:9px;color:var(--muted,#5b6069);text-transform:uppercase;letter-spacing:.08em;padding:0 10px}.dg-mouth{margin:3px 0 8px}.dg-profile{fill:none;stroke:var(--muted,#5b6069);stroke-width:2;opacity:.65}.dg-anatomy{fill:none;stroke:var(--ink,#222638);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.dg-teeth{fill:var(--surface,#fff);stroke:var(--ink,#222638);stroke-width:1.5}.dg-tongue{fill:var(--dg-blue);fill-opacity:.12;stroke:var(--dg-blue);stroke-width:2.5;stroke-linejoin:round}.dg-velum{fill:none;stroke:var(--ink,#222638);stroke-width:6;stroke-linecap:round}.dg-air-path{fill:none;stroke:var(--ink,#222638);stroke-width:2;stroke-dasharray:5 4}.dg-air-arrow{fill:none;stroke:var(--ink,#222638);stroke-width:2}.dg-place-reference{fill:var(--muted,#5b6069)}.dg-contact-leader{fill:none;stroke:var(--dg-blue);stroke-width:1.5}.dg-contact-ring{fill:var(--surface,#fff);fill-opacity:.5;stroke:var(--dg-blue);stroke-width:3}.dg-contact-dot{fill:var(--dg-blue)}.dg-contact-key{font-size:10px;line-height:1.5;display:flex;align-items:center;gap:7px;justify-content:center}.dg-contact-key i{border:2px solid var(--dg-blue);width:10px;height:10px;border-radius:50%;flex:0 0 10px}.dg-sound-readout{display:flex;flex-direction:column;min-width:0}.dg-sound-symbol{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:18px 8px;border-bottom:1px solid var(--line,#d5dae3)}.dg-sound-symbol>.dg-small-label{font-size:9px;text-align:center}.dg-sound-symbol>strong{font-family:Arial,Helvetica,sans-serif;font-size:68px;font-weight:500;line-height:1.25;letter-spacing:-.06em;margin-top:10px}.dg-voice-setting{padding:14px 10px;text-align:center;background:var(--soft,#f0f3f7)}.dg-vibration{height:30px;max-width:120px;margin:0 auto 7px}.dg-voicing-wave{fill:none;stroke:var(--dg-blue);stroke-width:2;stroke-linejoin:miter}.dg-no-vibration{stroke:var(--muted,#5b6069);stroke-width:2;stroke-dasharray:4 4}.dg-voice-bars{stroke:var(--ink,#222638);stroke-width:2}.dg-voice-setting strong,.dg-voice-setting span{display:block}.dg-voice-setting strong{font-size:12px}.dg-voice-setting span{font-size:9px;color:var(--muted,#5b6069);line-height:1.5;margin-top:3px}.dg-category-map{display:grid;grid-template-columns:1fr 25px 1fr 1.6fr;align-items:center;gap:10px;padding:17px 22px}.dg-category-map>div{display:flex;flex-direction:column;gap:5px}.dg-category-map>div>span{font-size:9px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted,#5b6069)}.dg-category-map>div>strong{font-size:29px;font-weight:500;line-height:1}.dg-map-arrow{font-size:22px;color:var(--dg-blue)}.dg-category-map>p{font-size:10px;line-height:1.6;color:var(--muted,#5b6069);margin:0;padding-left:10px;border-left:1px solid var(--line,#d5dae3)}.dg-input-features{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-bottom:1px solid var(--line,#d5dae3);background:var(--soft,#f0f3f7)}.dg-input-features>span{padding:14px 18px;border-right:1px solid var(--line,#d5dae3)}.dg-input-features>span:last-child{border-right:0}.dg-input-features small,.dg-input-features b{display:block}.dg-input-features small{font-size:9px;letter-spacing:.05em;text-transform:uppercase;color:var(--muted,#5b6069)}.dg-input-features b{margin-top:5px;font-size:13px;font-weight:600}.dg-word-assembly{display:flex;justify-content:center;align-items:stretch;gap:8px;padding:26px 18px}.dg-word-token{display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1;min-width:0;min-height:114px;padding:16px 6px;border:1px solid var(--ink,#222638);background:var(--soft,#f0f3f7)}.dg-word-token.is-root{background:#3f4fb0;color:#fff;border-color:#3f4fb0}.dg-word-token.is-zero{border-style:dashed;background:transparent}.dg-word-token.is-bundle{flex:2}.dg-token-form{font-size:39px;font-weight:500;letter-spacing:-.07em;line-height:1.15;white-space:nowrap}.dg-token-meaning{font-size:10px;line-height:1.4;margin-top:13px;text-align:center}.dg-word-token.is-bundle .dg-token-meaning{font-weight:600;word-spacing:5px}.dg-join{align-self:center;font-size:21px;line-height:1;color:var(--muted,#5b6069)}.dg-word-output{padding:16px 22px;border-top:1px solid var(--line,#d5dae3);display:flex;align-items:baseline;gap:15px;justify-content:space-between}.dg-word-output>span{font-size:10px;color:var(--muted,#5b6069);text-transform:uppercase;letter-spacing:.06em}.dg-word-output>strong{font-size:30px;line-height:1.15;font-weight:600;letter-spacing:-.06em}.dg-writing-source{display:flex;flex-direction:column;align-items:center;gap:5px;padding:20px 20px 15px;background:var(--soft,#f0f3f7);text-align:center}.dg-writing-source>strong{font-size:36px;letter-spacing:-.055em;line-height:1.3;font-weight:600}.dg-writing-source>span:last-child{font-size:12px;color:var(--muted,#5b6069)}.dg-encoding-arrow{font-size:25px;text-align:center;line-height:1;margin-top:15px;color:var(--dg-blue)}.dg-glyph-run{list-style:none;display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;gap:8px;margin:0;padding:20px 16px 24px}.dg-glyph-run>li{width:65px;display:flex;flex-direction:column;align-items:center;background:var(--soft,#f0f3f7);border:1px solid var(--line,#d5dae3);padding:5px 4px 10px;min-width:0}.dg-glyph-index{display:block;align-self:flex-start;font-size:8px;color:var(--muted,#5b6069);padding:0 3px}.dg-code-glyph{display:block;width:50px;height:50px;margin:7px 0 9px;fill:none;stroke:var(--ink,#222638);stroke-width:2.5;stroke-linejoin:miter;stroke-linecap:square}.dg-glyph-run strong{font-size:11px;font-weight:600;color:var(--ink,#222638);line-height:1.3;text-align:center}.dg-writing-count{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line,#d5dae3)}.dg-writing-count>span{display:flex;align-items:baseline;justify-content:center;gap:7px;padding:12px 8px;font-size:10px;color:var(--muted,#5b6069)}.dg-writing-count>span+span{border-left:1px solid var(--line,#d5dae3)}.dg-writing-count strong{font-size:24px;color:var(--ink,#222638);font-weight:600;line-height:1.2}
@media(max-width:500px){.dg{margin:18px 0 22px}.dg-heading{padding:16px}.dg-heading>strong{font-size:18px}.dg-kicker{font-size:9px}.dg figcaption{padding:14px 16px;font-size:11px}.dg-case-current{padding:14px 16px;display:block}.dg-case-current>span{display:block;margin-bottom:7px}.dg-case-current>strong{font-size:16px}.dg-case-groups{padding:16px;gap:10px}.dg-role-record{padding:12px 8px;flex-direction:column;align-items:flex-start;gap:6px}.dg-role-record strong{font-size:11px}.dg-role-record span{font-size:10px}.dg-role-record small{font-size:9px}.dg-group-header{padding:8px}.dg-group-header span{font-size:8px}.dg-group-header strong{font-size:24px}.dg-case-groups.is-single .dg-role-record{padding:12px 7px}.dg-case-groups.is-single .dg-role-record strong{font-size:10px}.dg-case-groups.is-single .dg-role-record span{font-size:9px}.dg-case-groups.is-single .dg-role-record small{font-size:8px}.dg-controller,.dg-target{padding:15px 9px;min-height:190px}.dg-controller>.dg-small-label,.dg-target>.dg-small-label{font-size:8px}.dg-controller>strong{font-size:14px}.dg-controller-icons{height:75px;max-width:130px}.dg-verb-form{font-size:24px}.dg-suffix-key{gap:9px;font-size:9px}.dg-feature-checks{padding:14px 12px}.dg-check-columns,.dg-feature-check{grid-template-columns:.72fr .95fr 12px 1fr .65fr;gap:4px}.dg-check-columns{font-size:8px}.dg-feature-check{font-size:9px;padding:12px 0}.dg-check-status{font-size:8px;gap:3px;flex-direction:column;align-items:flex-end}.dg-check-status b{font-size:18px}.dg-time-state{padding:14px 16px;gap:14px;font-size:10px}.dg-time-plot{padding:0 7px 12px}.dg-time-legend{padding:13px 16px;gap:9px 14px;font-size:9px}.dg-time-axis-labels{font-size:10px}.dg-sound-main{grid-template-columns:minmax(0,1.65fr) minmax(90px,1fr)}.dg-mouth-panel{padding:12px 5px}.dg-anatomy-direction{font-size:8px;padding:0 7px}.dg-contact-key{padding:0 4px;font-size:9px;align-items:flex-start;gap:5px}.dg-contact-key i{margin-top:2px;flex-basis:9px;width:9px;height:9px}.dg-sound-symbol{padding:12px 5px}.dg-sound-symbol>.dg-small-label{font-size:8px}.dg-sound-symbol>strong{font-size:50px;margin-top:5px}.dg-voice-setting{padding:10px 6px}.dg-vibration{height:24px}.dg-voice-setting strong{font-size:11px}.dg-voice-setting span{font-size:8px}.dg-category-map{grid-template-columns:1fr 20px 1fr;gap:10px;padding:15px 16px}.dg-category-map>p{grid-column:1/-1;border-left:0;border-top:1px solid var(--line,#d5dae3);padding:10px 0 0;font-size:10px}.dg-category-map>div>strong{font-size:28px}.dg-input-features>span{padding:12px}.dg-input-features small{font-size:8px}.dg-input-features b{font-size:12px}.dg-word-assembly{padding:22px 12px;gap:6px}.dg-word-token{min-height:103px;padding:14px 4px}.dg-token-form{font-size:31px}.dg-token-meaning{font-size:9px;margin-top:12px}.dg-join{font-size:18px}.dg-word-output{padding:14px 16px;gap:10px}.dg-word-output>span{font-size:9px}.dg-word-output>strong{font-size:26px}.dg-writing-source{padding:18px 16px 13px}.dg-writing-source>strong{font-size:32px}.dg-glyph-run{padding:17px 12px 20px;gap:6px}.dg-glyph-run>li{width:58px}.dg-code-glyph{width:45px;height:45px}.dg-writing-count>span{font-size:9px;gap:5px}.dg-writing-count strong{font-size:22px}}
@media(max-width:360px){.dg-case-groups{padding:12px;gap:8px}.dg-group-header{flex-direction:column;align-items:flex-start;gap:2px}.dg-feature-checks{padding-left:8px;padding-right:8px}.dg-verb-form{font-size:21px}.dg-glyph-run>li{width:54px}.dg-input-features>span{padding:10px 8px}.dg-token-form{font-size:27px}.dg-token-meaning{font-size:8px}}
@media print{.dg{break-inside:avoid;background:#fff;color:#222638}.dg figcaption{font-size:10pt}.dg .dg-word-token.is-root,.dg .dg-role-record.is-active .dg-role-shape{print-color-adjust:exact;-webkit-print-color-adjust:exact}}

/* Pattern detective: keep the evidence together, with whole words at every width. */
.dg-pattern{margin-bottom:16px;container-type:inline-size}
.dg-pattern>figcaption{padding:14px 20px;border-top:0;border-bottom:1px solid var(--line,#d5dae3);font-size:15px;font-weight:600;color:var(--ink,#222638)}
.dg-pattern .dg-board-labels,.dg-pattern .dg-clue-row{display:grid;grid-template-columns:minmax(92px,.85fr) minmax(0,1.4fr);gap:20px;align-items:baseline}
.dg-pattern .dg-board-labels{padding:16px 20px 8px;font-size:11px;line-height:1.4;color:var(--muted,#5b6069)}
.dg-pattern .dg-evidence-board{margin:0;padding:0 20px 10px}
.dg-pattern .dg-clue-row{padding:15px 0;border-top:1px solid var(--line,#d5dae3)}
.dg-pattern .dg-clue-form{margin:0;min-width:0;font-size:27px;font-weight:600;line-height:1.2;letter-spacing:-.02em;color:var(--ink,#222638);white-space:nowrap}
.dg-pattern .dg-clue-meaning{margin:0;min-width:0;font-size:16px;line-height:1.5;color:var(--ink,#222638);overflow-wrap:break-word}
@container(max-width:340px){.dg-pattern .dg-board-labels,.dg-pattern .dg-clue-row{grid-template-columns:minmax(78px,.8fr) minmax(0,1.4fr);gap:14px}.dg-pattern .dg-board-labels{padding:14px 14px 8px}.dg-pattern .dg-evidence-board{padding:0 14px 8px}.dg-pattern .dg-clue-row{padding:14px 0}.dg-pattern .dg-clue-form{font-size:24px}}
@media(max-width:500px){.dg-pattern>figcaption{padding:13px 14px}.dg-pattern .dg-clue-meaning{font-size:16px}}
