.baudot-tool { margin-block: 40px; padding-block: 28px; border-block: 1px solid var(--line); }
.baudot-tool h2 { font-size: 30px; }
.baudot-tool label { display: block; margin-block: 18px 8px; font-weight: 650; }
.baudot-tool select, .baudot-tool textarea { display: block; width: 100%; min-width: 0; max-width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); }
.baudot-tool select { min-height: 48px; }
.baudot-tool textarea { resize: vertical; }
.baudot-tool select:focus-visible, .baudot-tool textarea:focus-visible, .baudot-tool summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.article .table-scroll:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.baudot-tool p, .baudot-example p { overflow-wrap: anywhere; }
.baudot-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }
.baudot-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 20px; }
.baudot-tool details { margin-block: 24px; }
.baudot-tool summary { cursor: pointer; padding-block: 12px; min-height: 44px; }
.baudot-bits { font-family: ui-monospace, monospace; letter-spacing: .08em; }
.baudot-trace { min-width: 560px; }
.baudot-tape { display: inline-flex; gap: 4px; padding: 7px; background: var(--tile); border: 1px solid var(--line); border-radius: 8px; }
.baudot-position { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--ter); font: 12px ui-monospace, monospace; }
.baudot-position.hole { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }
.baudot-shift { font-weight: 700; background: var(--tile); }
.baudot-tool [data-baudot-status] { min-height: 1.55em; }
.baudot-tool button:disabled, .baudot-tool select:disabled { opacity: .65; cursor: default; }
.baudot-example { margin-block: 24px; }
/* Constrain the nested grid/flex items so the Morse digit sequence wraps in WebKit. */
.signal[data-event-prefix="baudot_bits"] { grid-template-columns: minmax(0, 1fr); }
.signal[data-event-prefix="baudot_bits"] .row { min-width: 0; width: 100%; }
.signal[data-event-prefix="baudot_bits"] .cap,
.signal[data-event-prefix="baudot_bits"] .seq { min-width: 0; max-width: 100%; }
@media (max-width: 520px) { .baudot-options { grid-template-columns: 1fr; } }
@media (max-width: 390px) { .baudot-actions .btn { width: 100%; } }
