#introHistory .telegraph-mux .tg-distribution{grid-template-columns:minmax(175px,1fr) 86px minmax(180px,1.2fr) 86px minmax(260px,1.5fr);gap:10px}
#introHistory .telegraph-mux .tg-stations{height:100%;grid-auto-rows:minmax(0,1fr);min-height:0;gap:5px}
#introHistory .telegraph-mux .tg-message-source{grid-template-columns:minmax(0,1fr) 25px;grid-template-rows:18px minmax(22px,1fr);padding:5px 7px;min-height:0;gap:3px 5px;background:var(--panel);border:1px solid currentColor}
#introHistory .tg-message-source>b{font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#introHistory .tg-message-source>strong{grid-row:1;grid-column:2;font-size:20px;line-height:18px}
#introHistory .tg-message-source>small{display:none}
#introHistory .tg-keyboard{display:flex;grid-column:1/-1;align-self:center;gap:4px;padding:3px 4px 5px;background:#302b27;border:1px solid #887e6f;border-radius:5px;min-width:0}
#introHistory .tg-key{flex:1;display:grid;place-items:center;height:25px;border:1px solid #a99e8d;border-radius:2px 2px 4px 4px;background:#f0eadb;color:#302b27;font:600 13px Consolas,monospace;box-shadow:0 3px 0 #8c8473}
#introHistory .tg-key:nth-child(3){margin-left:5px}
#introHistory .tg-key.pressed{background:var(--selected-bg);color:var(--selected-ink);border-color:var(--mint);transform:translateY(2px);box-shadow:0 1px 0 #236e5b}
#introHistory .tg-active-post{outline:2px solid currentColor;outline-offset:1px}
#introHistory .tg-line{gap:5px;align-content:center;min-width:0;position:relative}
#introHistory .tg-line b{font-size:19px}
#introHistory .tg-line-signal{display:block;width:100%;height:130px;overflow:visible}
#introHistory .tg-shared-wire{fill:none;stroke:currentColor;stroke-width:3;vector-effect:non-scaling-stroke;stroke-linejoin:round}
#introHistory .tg-line-reference{fill:none;stroke:var(--line);stroke-width:1;stroke-dasharray:5 5;vector-effect:non-scaling-stroke}
#introHistory .tg-wire-contact{fill:currentColor;stroke:var(--panel);stroke-width:2}
#introHistory .tg-line strong{font:30px Consolas,monospace;color:var(--text)}
#introHistory .tg-line>span{font-size:13px;white-space:nowrap}
#introHistory .tg-message-receiver>div:first-child{height:18px;min-height:18px}
#introHistory .tg-message-receiver>.tg-printer{height:auto;min-height:0;flex:1;display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:7px}
#introHistory .tg-printer-icon{width:42px;height:40px;fill:var(--control);stroke:currentColor;stroke-width:2;stroke-linejoin:round;flex-shrink:0}
#introHistory .tg-printer-paper{fill:#f7f1df;stroke:#6f6758}
#introHistory .tg-printer .tg-paper{height:100%;min-height:0;padding:3px 5px;background:#f7f1df;color:#24201b;border:1px solid #b8ae99;font:14px/18px Consolas,monospace;box-sizing:border-box}
#introHistory .tg-stations>label{flex-wrap:wrap;justify-content:space-between;padding:5px;border:1px solid currentColor;border-radius:5px}
#introHistory .tg-stations>label .tg-keyboard{width:100%}
@media(max-width:1150px){#introHistory .telegraph-mux .tg-distribution{grid-template-columns:minmax(150px,1fr) 62px minmax(150px,1.1fr) 62px minmax(235px,1.5fr);gap:7px}#introHistory .tg-message-receiver b{font-size:11px}#introHistory .tg-receivers .tg-message-receiver .tg-nrz{width:60px;min-width:60px}#introHistory .tg-message-receiver>.tg-printer{grid-template-columns:32px minmax(0,1fr);gap:4px}#introHistory .tg-printer-icon{width:31px;height:32px}#introHistory .tg-keyboard{gap:3px}#introHistory .tg-key{height:22px}#introHistory .tg-line b{font-size:17px}}
@media(max-height:760px){#introHistory .tg-message-source .tg-key{height:21px}#introHistory .tg-keyboard{padding-block:1px 4px}#introHistory .telegraph-mux .tg-message-source{padding:3px 5px;gap:1px}#introHistory .tg-printer .tg-paper{font-size:13px;line-height:16px}#introHistory .tg-line-signal{height:110px}}
#introHistory .tg-controls>b{display:none}
@media(max-height:760px){#introHistory .telegraph-messages .tg-continuous-frame{flex-basis:64px}#introHistory .telegraph-messages .tg-continuous-frame svg{height:54px}#introHistory .tg-printer-icon{height:28px}#introHistory .tg-message-source>b{font-size:12px}}
#introHistory:has(.telegraph-mux)[open]{height:calc(100dvh - 28px);display:flex;flex-direction:column;padding:12px 18px;overflow:hidden}
#introHistory:has(.telegraph-mux) #introHistoryContent{display:flex;flex-direction:column;flex:1;min-height:0;gap:7px}
#introHistory:has(.telegraph-mux) .history-wide-work{display:flex;flex-direction:column;flex:1;min-height:0;gap:7px}
#introHistory:has(.telegraph-mux) .history-context{display:flex;flex-wrap:wrap;align-items:center;gap:6px;flex-shrink:0}
#introHistory:has(.telegraph-mux) .history-context .history-body{display:none}
#introHistory:has(.telegraph-mux) .history-context button{font-size:13px;padding:5px 8px;margin:0}
#introHistory:has(.telegraph-mux) .history-visual{flex:1;min-height:0;padding:8px 10px}
#introHistory .telegraph-mux{display:flex;flex-direction:column;height:100%;min-height:0;gap:6px}
#introHistory .telegraph-mux .tg-history,#introHistory .telegraph-mux .tg-analogy{display:none}
#introHistory .telegraph-mux .tg-controls{flex-shrink:0;margin:0}
#introHistory .telegraph-mux .tg-distribution{flex:1;min-height:0}
#introHistory .telegraph-mux .tg-receivers{height:100%;grid-auto-rows:minmax(0,1fr);gap:5px}
#introHistory .telegraph-mux .tg-continuous-frame{flex:0 0 82px;margin:0;padding:4px 8px}
#introHistory .telegraph-mux .tg-continuous-frame svg{height:72px}
@media(max-height:760px){#introHistory .telegraph-mux .tg-continuous-frame{flex-basis:64px}#introHistory .telegraph-mux .tg-continuous-frame svg{height:54px}}
@media(max-height:820px){#introHistory .tg-printer-icon{height:28px;max-height:100%}}

/* Both Baudot contexts share one dialog, title, tabs and work area geometry. */
#introHistory:has(#introHistoryContent[data-kind=baudot])[open]{height:calc(100dvh - 28px)!important;max-height:calc(100dvh - 28px)!important;display:flex;flex-direction:column;padding:12px 18px 84px!important;overflow:hidden;box-sizing:border-box;zoom:1!important}
#introHistory:has(#introHistoryContent[data-kind=baudot]) #introHistoryContent{display:flex;flex:1;flex-direction:column;gap:7px;min-height:0;overflow:hidden}
#introHistoryContent[data-kind=baudot]>.eyebrow{display:none}
#introHistoryContent[data-kind=baudot]>.history-tabs{flex:none;margin:0;padding-right:35px}
#introHistoryContent[data-kind=baudot]>.history-tabs button{padding:6px 8px;font-size:13px}
#introHistoryContent[data-kind=baudot]>h2{flex:none;font-size:24px;line-height:29px;margin:1px 0}
#introHistoryContent[data-kind=baudot]>.tg-history-tabs{flex:none;margin:0}
#introHistoryContent[data-kind=baudot]>.tg-history-tabs button{font-size:14px;padding:6px 8px}
#introHistoryContent[data-kind=baudot]>.history-wide-work{display:flex;flex:1;flex-direction:column;gap:7px;min-height:0}
#introHistoryContent[data-kind=baudot] .history-context{display:flex;flex:none;align-items:center;gap:6px;height:36px;min-height:36px;flex-wrap:nowrap}
#introHistoryContent[data-kind=baudot] .history-context :is(.history-body,.baudot-variant){display:none}
#introHistoryContent[data-kind=baudot] .history-context button{font-size:13px;padding:5px 8px;margin:0}
#introHistoryContent[data-kind=baudot] .history-visual{flex:1;min-height:0;padding:8px 10px;margin:0}
#introHistoryContent[data-kind=baudot] .baudot-workbench{height:100%;min-height:0;gap:18px}
#introHistoryContent[data-kind=baudot] .baudot-workbench>section:first-child{display:grid;grid-template-rows:50px 24px 54px minmax(104px,1fr) 40px 62px 22px;gap:4px;min-height:0}
#introHistoryContent[data-kind=baudot] .baudot-workbench>section:first-child>:is(h3,.baudot-keys,.baudot-signal,.baudot-decoded,.baudot-meanings,.baudot-current-meaning){margin:0}
#introHistoryContent[data-kind=baudot] .baudot-signal{display:flex;flex-direction:column;min-height:0;padding:4px}
#introHistoryContent[data-kind=baudot] .baudot-signal h3{margin:0;font-size:15px;flex:none}
#introHistoryContent[data-kind=baudot] .baudot-wave{flex:1;min-height:0;max-height:none}
#introHistoryContent[data-kind=baudot] .baudot-workbench .baudot-keys button{height:54px}
#introHistoryContent[data-kind=baudot] .baudot-reference{min-height:0;display:flex;flex-direction:column}
#introHistoryContent[data-kind=baudot] .baudot-reference>h3{flex:none;margin:0 0 5px}
#introHistoryContent[data-kind=baudot] .baudot-code-table{flex:1;grid-template-rows:repeat(16,minmax(0,1fr));min-height:0}
#introHistoryContent[data-kind=baudot] .baudot-code-table button{min-height:0;padding:1px 4px}
#introHistoryContent[data-kind=baudot] .baudot-original{flex:none;margin:5px 0 0}
#introHistoryContent[data-kind=baudot]>.tg-history-tabs{height:36px;min-height:36px;display:flex;gap:6px}
#introHistoryContent[data-kind=baudot]>.tg-history-tabs button{height:36px;min-height:36px;box-sizing:border-box;border-width:2px;white-space:nowrap}
#introHistoryContent[data-kind=baudot] .baudot-pick{font-size:14px;line-height:18px;gap:2px;min-height:0}
#introHistoryContent[data-kind=baudot] .baudot-pick select{height:30px;min-height:30px;padding:3px 5px;box-sizing:border-box}
#introHistoryContent[data-kind=baudot] .baudot-decoded{min-height:0;height:40px;box-sizing:border-box;padding:4px 6px}
#introHistoryContent[data-kind=baudot] .baudot-decoded strong{font-size:26px;line-height:28px}
#introHistoryContent[data-kind=baudot] .baudot-meanings{min-height:0;height:62px}
#introHistoryContent[data-kind=baudot] .baudot-meanings button{min-height:0;height:62px;box-sizing:border-box;padding:4px 6px}
#introHistoryContent[data-kind=baudot] .baudot-current-meaning{font-size:14px;line-height:20px;min-height:0}

#introHistory.history-stable #introHistoryContent[data-kind=baudot] .baudot-workbench{grid-template-columns:minmax(270px,.9fr) minmax(340px,1.15fr) minmax(160px,.6fr);gap:14px}
#introHistory.history-stable #introHistoryContent[data-kind=baudot] .baudot-workbench>section:first-child{grid-template-rows:50px 24px 72px minmax(90px,1fr) 40px 62px 22px}
#introHistory.history-stable #introHistoryContent[data-kind=baudot] .baudot-keys{height:72px;min-height:72px;align-items:start;margin:0}
#introHistory.history-stable #introHistoryContent[data-kind=baudot] .baudot-keys button{height:60px;min-height:60px;padding:3px 5px;box-sizing:border-box;display:grid;grid-template-rows:14px 23px 16px;align-content:center;gap:0;overflow:hidden}
#introHistory.history-stable #introHistoryContent[data-kind=baudot] .baudot-keys button small{font-size:12px;line-height:14px}
#introHistory.history-stable #introHistoryContent[data-kind=baudot] .baudot-keys button b{font:22px/23px Consolas}
#introHistory.history-stable #introHistoryContent[data-kind=baudot] .baudot-keys button span{font:14px/16px Consolas}
.baudot-apparatus{display:flex;flex-direction:column;min-width:0;min-height:0;margin:0;gap:10px;justify-content:center;border-left:1px solid var(--line);padding-left:12px}
.baudot-apparatus>button{padding:0;border:1px solid var(--line);background:#fff;border-radius:8px;min-height:0;max-height:75%;overflow:hidden;cursor:zoom-in}
.baudot-apparatus img{display:block;width:100%;height:100%;max-height:420px;object-fit:contain}.baudot-apparatus figcaption{font-size:15px;line-height:1.35;display:flex;flex-direction:column;gap:5px}.baudot-apparatus figcaption b{font-size:17px}.baudot-apparatus figcaption a{font-size:13px}.baudot-apparatus figcaption small{font-size:11px;color:var(--muted)}
.baudot-photo-large{display:block;width:100%;max-height:70vh;object-fit:contain;background:#fff}
#introHistory .tg-historical-receiver{stroke:#bb985e;fill:#302921;stroke-width:2;overflow:visible}#introHistory .tg-historical-receiver .tg-receiver-spool{fill:#433c31;stroke:#d8be82}#introHistory .tg-historical-receiver .tg-receiver-base{fill:#55402c;stroke:#a58661}#introHistory .tg-historical-receiver .tg-receiver-type{stroke:#332a20;fill:none}#introHistory .tg-historical-receiver .tg-printer-paper{fill:#f7f1df;stroke:#9a8d72}
#introHistory .tg-historical-receiver .tg-receiver-gear{fill:#9c824d;stroke:#d8be82}:root[data-theme=light] #introHistory .tg-historical-receiver{stroke:#846335}

#introHistory.history-stable .baudot-code-table .baudot-chord{display:flex;align-items:center;height:18px;min-height:0;gap:2px;margin:0;padding:0}
#introHistory.history-stable .baudot-code-table .baudot-chord i{width:5px;height:16px;min-height:0;max-height:16px;margin:0;transform:none;box-shadow:none;border-radius:1px}
#introHistory.history-stable .baudot-code-table .baudot-chord i[data-hand-gap]{margin-left:2px}
#introHistory.history-stable .baudot-code-table button{align-items:center}
#introHistory.history-stable .baudot-code-table b.baudot-control-symbol{font-size:10px;line-height:14px;white-space:nowrap}
