/* stress concentration — on top of calc.css */
main.kt { max-width: 1380px; --c-t: var(--moment); --c-b: var(--clamp); --c-s: var(--ochre); }
main.kt ~ .site-foot { max-width: 1380px; }

/* case picker: line icons in the hub's style */
.kt-cases { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; }
.kt-cases button { display: grid; justify-items: center; gap: 4px; padding: 8px 8px 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; color: var(--text-2); font-size: 12px; line-height: 1.2; transition: border-color .12s, background .12s; }
.kt-cases button svg { width: 52px; height: 34px; display: block; }
.kt-cases button:hover { border-color: var(--line-2); color: var(--text); }
.kt-cases button[aria-pressed="true"] { border-color: var(--text); color: var(--text); font-weight: 500; box-shadow: 0 1px 3px rgba(20, 22, 28, .07); }
.kt-cases button .ic-hot { opacity: 0; transition: opacity .18s; }
.kt-cases button:hover .ic-hot, .kt-cases button[aria-pressed="true"] .ic-hot { opacity: 1; }
@media (max-width: 900px) { .kt-cases { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kt-cases { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; } .kt-cases button { grid-template-columns: 30px minmax(0, 1fr); justify-items: start; align-items: center; gap: 6px; padding: 5px 6px; font-size: 11.5px; text-align: left; border-radius: 8px; } .kt-cases button svg { width: 30px; height: 20px; } }

main.kt .stage-bar { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
main.kt .stage-bar .hist { margin-left: auto; }
main.kt .stage { position: relative; }
#view { display: block; width: 100%; height: auto; flex: 1; min-height: 0; user-select: none; touch-action: none; }
#view.dragging, #view.dragging * { cursor: grabbing !important; }
#view .handle { cursor: grab; }
#view .handle.v { cursor: ns-resize; }
#view .handle.h { cursor: ew-resize; }
#view .handle.d { cursor: nwse-resize; }
#view .handle .knob { fill: var(--surface); stroke: var(--sel); stroke-width: 1.8; }
#view .handle:hover .knob { fill: var(--sel); }
#view .part { fill: var(--steel-150); stroke: none; }
#view .edge { fill: none; stroke: var(--steel-700); stroke-width: 1.1; stroke-linejoin: round; }
#view .edge.thin { stroke: var(--steel-550); stroke-width: .8; }
#view .hidden-ln { fill: none; stroke: var(--steel-550); stroke-width: .8; stroke-dasharray: 5 3; }
#view .brk { fill: none; stroke: var(--steel-700); stroke-width: 1.1; }
#view .cl { stroke: var(--steel-500); stroke-width: .7; stroke-dasharray: 12 3 2 3; fill: none; }
#view .dimln { stroke: var(--steel-550); stroke-width: .8; fill: none; }
#view .extln { stroke: var(--steel-400); stroke-width: .7; fill: none; }
#view .dimhead { fill: var(--steel-550); }
#view .leader { stroke: var(--steel-550); stroke-width: .8; fill: none; }
#view .nomsec { stroke: var(--sel); stroke-width: 2.4; stroke-linecap: round; opacity: .75; }
#view .nomsec-band { fill: color-mix(in srgb, var(--sel) 8%, transparent); }
#view .peak circle { fill: var(--bad); stroke: var(--halo); stroke-width: 1.5; }
#view .arrow { stroke: var(--load); stroke-width: 2; fill: none; stroke-linecap: round; }
#view .arrowhead { fill: var(--load); }
#view .pill rect { fill: var(--surface); stroke: var(--steel-300); }
#view .pill text { font-size: 11.5px; font-weight: 500; fill: var(--text-2); font-variant-numeric: tabular-nums; }
#view .pill.editable { cursor: text; }
#view .pill.editable:hover rect { stroke: var(--sel); stroke-width: 1.4; }
#view .pill.editable:focus { outline: none; }
#view .pill.editable:focus rect { stroke: var(--sel); stroke-width: 1.6; }
#view .pill.load rect { stroke: color-mix(in srgb, var(--load) 35%, transparent); } #view .pill.load text { fill: var(--load); font-weight: 600; }
#view .pill.nom rect { stroke: color-mix(in srgb, var(--sel) 35%, transparent); } #view .pill.nom text { fill: var(--sel); }
#view .pill.peak rect { stroke: color-mix(in srgb, var(--bad) 40%, transparent); } #view .pill.peak text { fill: var(--bad); font-weight: 600; }
#view .cap { font-size: 11px; fill: var(--text-3); }
#view .capb { font-size: 11.5px; fill: var(--text-2); font-weight: 500; }
#view .fe-img { pointer-events: none; }
#view .fe-busy { font-size: 11px; fill: var(--text-3); }

.kt-tip { position: absolute; z-index: 6; pointer-events: none; transform: none !important; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 8px; font-size: 12px; color: var(--text); box-shadow: 0 4px 14px rgba(20, 22, 28, .1); white-space: nowrap; font-variant-numeric: tabular-nums; transform: translate(12px, -50%); }
.kt-tip[hidden] { display: none; }
.kt-tip span { color: var(--text-3); }

.kt-live { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; min-height: 36px; align-items: center; }
.kt-live b { font-weight: 500; color: var(--text-3); margin-right: 4px; }
.kt-live .lg { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.kt-live .lg .bands { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 14px; height: 8px; border-radius: 4px; overflow: hidden; }
.kt-live .lg .scale-t { color: var(--text-3); font-size: 11.5px; }
.kt-live .lg button { border: 0; background: none; padding: 0; color: var(--text-2); font: inherit; font-size: 11.5px; text-decoration: underline dotted; cursor: pointer; }
.kt-live .out { color: var(--warn-ink); font-weight: 500; }
.kt-live .diff { color: var(--text-3); }

/* in-place editor */
.kt-edit { position: absolute; transform: translate(-50%, -50%); z-index: 5; display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1.5px solid var(--sel); border-radius: 9px; padding: 2px 8px 2px 4px; box-shadow: 0 6px 18px rgba(20, 22, 28, .14); }
.kt-edit input { width: 92px; border: 0; outline: none; font: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; padding: 3px 2px; }
.kt-edit span { font-size: 11.5px; color: var(--text-3); }

/* examples menu */
.ex-wrap { position: relative; }
.ex-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 8; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(20, 22, 28, .12); padding: 6px; display: grid; gap: 2px; min-width: 320px; }
.ex-menu[hidden] { display: none; }
.ex-menu button { border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--text); display: grid; gap: 1px; }
.ex-menu button small { color: var(--text-3); font-size: 11.5px; }
.ex-menu button:hover, .ex-menu button:focus { background: var(--fill-1); outline: none; }

/* panel bits */
.facts { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 12.5px; color: var(--text-2); margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; text-align: right; }
.facts dd.out { color: var(--warn-ink); }
.f.segf { grid-template-columns: minmax(0, 1fr) auto; }
.f.segf .seg button { padding: 4px 9px; font-size: 12.5px; }
.f.segf.stack { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.f.segf.stack .seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; }
.ldrow { display: grid; grid-template-columns: 22px minmax(0, 1fr) 128px; gap: 8px; align-items: center; padding: 3px 0; }
.ldrow input[type=checkbox] { accent-color: var(--text); width: 15px; height: 15px; margin: 0; }
.ldrow label { font-size: 13px; color: var(--text-2); }
.ldrow.off .num input { color: var(--text-3); }
.src-tag { font-size: 11px; color: var(--text-3); }
.src-tag a { color: var(--text-3); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip.on { border-color: var(--text); color: var(--text); font-weight: 500; }

/* summary */
.kt-sum { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
.story { padding: 14px 20px; display: grid; align-content: center; gap: 6px; min-width: 0; }
.story p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text); max-width: 74ch; }
.story p.sub { font-size: 12.5px; color: var(--text-2); }
.story .mode { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.kt-mini { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); border-left: 1px solid var(--line); }
.kt-mini .stat { border-left: 0; border-top: 1px solid var(--line); }
.kt-mini .stat:nth-child(-n+2) { border-top: 0; }
.kt-mini .stat:nth-child(even) { border-left: 1px solid var(--line); }
@media (max-width: 1320px) {
  .kt-sum { grid-template-columns: minmax(0, 1fr); }
  .kt-mini { grid-template-columns: repeat(4, minmax(0, 1fr)); border-left: 0; border-top: 1px solid var(--line); }
  .kt-mini .stat { border-top: 0; border-left: 1px solid var(--line); }
  .kt-mini .stat:first-child { border-left: 0; }
}
@media (max-width: 700px) {
  .kt-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kt-mini .stat:nth-child(odd) { border-left: 0; }
  .kt-mini .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* margins */
#checks tr[data-check] { cursor: pointer; }
#checks td.note { white-space: normal; min-width: 180px; color: var(--text-3); font-size: 12px; }
#checks td.l:first-child { white-space: normal; min-width: 140px; }

/* charts */
.kt-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.kt-row.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.kt-cl { margin: -2px 0 6px; }
.kt-cl:empty { display: none; }
#chart, #prof, #qchart, #nchart { display: block; width: 100%; height: auto; touch-action: none; user-select: none; }
.ch-t { font-size: 10.5px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.ch-a { font-size: 11px; fill: var(--text-2); }
.ch-l { font-size: 11px; font-weight: 600; }
.ch-f { font-size: 11px; fill: var(--steel-550); }
.ch-msg { font-size: 12px; fill: var(--text-3); }
#chart .drag, #qchart .drag { cursor: grab; }
@media (max-width: 1040px) { .kt-row, .kt-row.even { grid-template-columns: minmax(0, 1fr); } }

.fixes { display: grid; gap: 8px; }
.fix { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.fix b { font-weight: 600; font-size: 13.5px; }
.fix p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.fix .ms { margin-left: 6px; }
.fix.done { background: var(--surface-2); }

table.fe-tab td.l { white-space: normal; }
table.fe-tab .dpos { color: var(--warn-ink); }
table.fe-tab .dok { color: var(--good); }

/* steps */
details.step.gov > summary .t::after { content: "governs"; margin-left: 10px; font-size: 11px; font-weight: 600; color: var(--bad); letter-spacing: .03em; text-transform: uppercase; }
.step .where { font-size: 12px; color: var(--text-3); margin: 6px 0 0; line-height: 1.6; }
.refs-body .md-src li { margin: 5px 0; }
.sec-tag { font-style: normal; font-size: 11px; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; margin-left: 4px; }

@media (max-width: 700px) {
  #checks th:nth-child(4), #checks td:nth-child(4) { display: none; }
  .margins td, .margins th { padding-left: 4px; padding-right: 4px; }
  .margins .ms { min-width: 54px; padding: 2px 6px; }
  .step .eq .katex { font-size: .86em; }
  #checks td.l:first-child { min-width: 0; }
  table.fe-tab th:nth-child(5), table.fe-tab td:nth-child(5) { display: none; }
  .kt-live .lg { margin-left: 0; }
}
@media (max-width: 560px) {
  .ex-menu { min-width: 270px; }
  .story { padding: 12px 14px; }
}

/* phones: the drawing and the charts shrink with the screen, the labels must not */
#view.nar .pill text { font-size: 15px; }
#view.nar .cap, #view.nar .capb { font-size: 14px; }
#view.nar .fe-busy { font-size: 13px; }
svg.nar .ch-t, svg.nar .ch-f { font-size: 12.5px; }
svg.nar .ch-a, svg.nar .ch-l { font-size: 13px; }
svg.nar .ch-msg { font-size: 13.5px; }

/* loads, magnifier, ghosts, legend */
#view .ld.far { opacity: .42; }
#view .ghost { fill: none; stroke-width: 1.6; stroke-dasharray: 6 4; }
#view .ghost.alt { stroke: var(--sel); }
#view .ghost.pin { stroke: var(--steel-550); stroke-dasharray: 3 3; }
#view .mag-frame { fill: none; stroke: var(--line-2); stroke-width: 1; }
#view .mag .part { fill: var(--steel-150); }
#view .mag-src { fill: none; stroke: color-mix(in srgb, var(--sel) 55%, transparent); stroke-width: .8; }
#view .mag-link { fill: none; stroke: var(--sel); stroke-width: .8; stroke-dasharray: 3 3; opacity: .7; }
#view .mag-peak { fill: var(--bad); stroke: var(--halo); stroke-width: 1.6; }

#view .ltick { font-size: 10px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
#view.nar .ltick { font-size: 13px; }
#view .ftsel { cursor: pointer; }
#view .pill.ftp rect { stroke: var(--line-2); } #view .pill.ftp text { fill: var(--text); }
#view .ftsel:hover .pill rect { stroke: var(--sel); }
.ft-menu { position: absolute; }
.ex-menu button[aria-current="true"] { background: var(--fill-1); font-weight: 500; }
#view .mag-foot { fill: color-mix(in srgb, var(--surface) 92%, transparent); }
#view .mag-tag { font-size: 10.5px; font-weight: 600; fill: var(--sel); }
.pinrow { grid-column: 1 / -1; padding: 9px 16px; font-size: 13px; color: var(--text-2); }
.pinrow .ms { min-width: 0; }
.linkish { border: 0; background: none; padding: 0; color: var(--sel); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; }
.fix.altc { border-color: color-mix(in srgb, var(--sel) 25%, transparent); }
.fix.altc:hover, .fix.altc:focus-within { border-color: var(--sel); background: var(--sel-bg); }
.fix.busy { color: var(--text-3); }
#gchart .drag { cursor: grab; }
.mhover { position: absolute; z-index: 20; width: 228px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 9px 6px; box-shadow: 0 8px 24px rgba(20,22,28,.12); pointer-events: none; }
.mhover[hidden] { display: none; }
.mhover svg { display: block; }
.mhover p { margin: 4px 0 0; font-size: 12px; color: var(--text-2); line-height: 1.4; }
@media (prefers-reduced-motion: no-preference) {
  .mhover.go .mh-crack { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: mh-crack .45s ease-out forwards; }
  .mhover.go .mh-yield { transform-box: fill-box; transform-origin: center; animation: mh-yield .45s ease-out both; }
}
@keyframes mh-crack { to { stroke-dashoffset: 0; } }
@keyframes mh-yield { from { transform: scale(.15); opacity: .2; } to { transform: scale(1); opacity: 1; } }
.ex-menu { max-height: 70vh; overflow: auto; }
.recent-h { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 16px 0 4px; }
.recent-h .muted { font-weight: 400; margin-left: 6px; }
table.recent tbody tr { cursor: pointer; }

/* floating menus (on <body>, fixed): compact rows, name and a one-line note */
.float-menu { position: absolute; z-index: 50; top: 0; left: 0; min-width: 260px; max-width: min(380px, calc(100vw - 16px)); overflow: visible; }
.float-menu button { padding: 6px 10px; line-height: 1.3; }
.float-menu button small { white-space: normal; display: block; }
.float-menu button:focus-visible { outline: 2px solid var(--sel); outline-offset: -2px; }
#view .ftsel:focus { outline: none; } #view .ftsel:focus .pill rect { stroke: var(--sel); stroke-width: 1.6; }
#view .pill.opt rect { stroke: var(--sel); } #view .pill.opt text { fill: var(--sel); font-weight: 600; }
#view .mag-cap { font-size: 11.5px; fill: var(--text-2); }
#view .mag-cap.mag-n { font-weight: 600; fill: var(--text); }
#view.nar .mag-cap { font-size: 14px; }
#view .edge.cut { stroke: var(--steel-550); stroke-dasharray: 7 5; }
/* the all-cases picker */
.kt-cases { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.kt-cases .all-cases { color: var(--text-2); border-style: dashed; }
.case-menu { width: min(460px, calc(100vw - 16px)); max-width: min(460px, calc(100vw - 16px)); padding: 0; }
.case-menu .cm-search { position: sticky; top: 0; background: var(--surface, #fff); padding: 8px; border-bottom: 1px solid var(--line); z-index: 1; }
.case-menu .cm-search input { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line-2, #cfd3d8); border-radius: 8px; background: var(--bg, #fff); color: var(--text); }
.case-menu .cm-g { padding: 4px 4px 6px; }
.case-menu h4 { margin: 6px 8px 2px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.case-menu button { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; text-align: left; padding: 5px 8px; border-radius: 8px; }
.case-menu button svg { width: 40px; height: 26px; }
.case-menu button b { font-weight: 500; font-size: 13.5px; color: var(--text); display: block; }
.case-menu button small { font-size: 12px; color: var(--text-3); }
.case-menu button[aria-current="true"] { background: var(--hover, rgba(20, 22, 28, .05)); }
.case-menu .cm-none { margin: 6px 12px 10px; font-size: 12px; color: var(--text-3); }
@media (max-width: 900px) { .kt-cases { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
#view .mag-cap.mag-pk { fill: var(--bad, #cf3b2c); font-weight: 600; }
/* the stage card: its 1px outline drawn as a ring (the drawing runs edge to edge inside it) */
main.kt .card.stage { border: 0; box-shadow: 0 0 0 1px var(--line); }
/* Mohr's circle */
#mohr, #mohrEl { display: block; width: 100%; height: auto; touch-action: none; user-select: none; }
#mohrEl { width: 220px; max-width: 100%; margin: 0 auto; }
#mohr .tick, #mohrEl .tick { font-size: 11px; fill: var(--text-3); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--halo); stroke-width: 3px; stroke-linejoin: round; }
#mohr .axl { font-size: 12px; fill: var(--text-2); }
#mohr .m-big { fill: color-mix(in srgb, var(--moment) 7%, transparent); stroke: var(--steel-550); stroke-width: 1.2; }
#mohr .m-cut { fill: var(--surface); stroke: var(--steel-400); stroke-width: 1; stroke-dasharray: 4 3; }
#mohr .m-plane { fill: none; stroke: var(--load); stroke-width: 1.8; }
#mohr .m-dia { stroke: var(--load); stroke-width: 1; }
#mohr .m-pr { fill: var(--text); }
#mohr .m-tau { stroke: var(--steel-550); stroke-dasharray: 2 3; }
#mohr .m-a { fill: var(--load); stroke: var(--halo); stroke-width: 2; }
#mohr .m-b { fill: var(--surface); stroke: var(--load); stroke-width: 1.6; }
#mohr .m-lab { fill: var(--load); font-weight: 600; }
#mohr .m-pt, #mohrEl [data-erot] { cursor: grab; }
#mohr .hit, #mohrEl .hit { fill: transparent; }
#mohrEl .el-sq { fill: var(--steel-100); stroke: var(--steel-700); stroke-width: 1.1; }
#mohrEl .el-n { stroke: var(--load); stroke-width: 1.6; } #mohrEl .el-n-h { fill: var(--load); }
#mohrEl .el-t { stroke: var(--moment); stroke-width: 1.4; } #mohrEl .el-t-h { fill: var(--moment); }
#mohrEl .el-p { stroke: var(--steel-550); stroke-dasharray: 4 3; }
#mohrEl .knob { fill: var(--surface); stroke: var(--sel); stroke-width: 2; }
.mohr-row { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.mohr-side { display: grid; gap: 8px; }
.mohr-tab th { font-weight: 400; color: var(--text-2); text-align: left; padding: 3px 8px 3px 0; font-size: 13px; }
.mohr-tab td { text-align: right; font-variant-numeric: tabular-nums; padding: 3px 0; font-size: 13px; }
#view .pdir line { stroke: var(--text); stroke-width: 1.6; } #view .pdir line.p2 { stroke-dasharray: 3 2; }
#view .pdir .pick { fill: none; stroke: var(--sel); stroke-width: 2; }
@media (max-width: 900px) { .mohr-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .kt-cases { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kt-cases button { padding: 5px 8px; } .kt-cases button span { white-space: nowrap; overflow: visible; } }

/* labels in full: wrap instead of an ellipsis */
main.kt .f > label span { overflow: visible; text-overflow: clip; white-space: normal; line-height: 1.25; }
main.kt .f > label { align-items: center; }
/* the input panel grows with its content (nothing hidden behind a scroll edge); the stage keeps its own height */
main.kt .work { align-items: start; }
main.kt .panel { contain: none; }
main.kt .panel-body { overflow: visible; }

@media (min-width: 820px) { .case-menu { width: min(760px, calc(100vw - 16px)); max-width: min(760px, calc(100vw - 16px)); } .case-menu .cm-list { display: grid; grid-template-columns: 1fr 1fr; align-items: start; } .case-menu .cm-list > .cm-none { grid-column: 1 / -1; } }
/* equations wrap at their relations on narrow screens instead of scrolling sideways */
main.kt .step .eq { overflow: visible; line-height: 2.1; }
main.kt .step .eq .katex { white-space: normal; }
/* example and case thumbnails */
.ex-menu .thumb { display: block; width: 96px; height: 64px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; }
.ex-menu button.thumbed { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; }
.ex-menu button.thumbed .th { width: 96px; height: 64px; display: block; }
.ex-menu button.thumbed .tx { display: grid; gap: 2px; }
#exMenu { max-width: min(560px, calc(100vw - 16px)); }
.case-menu button { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
.case-menu button svg.thumb { width: 96px; height: 64px; }
@media (max-width: 560px) {
  #exMenu, .case-menu { width: calc(100vw - 16px); max-width: calc(100vw - 16px); min-width: 0; }
  #exMenu { grid-template-columns: 1fr 1fr; }
  .ex-menu button.thumbed, .case-menu button { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 6px; align-content: start; }
  .ex-menu button.thumbed .th, .ex-menu .thumb, .case-menu button svg.thumb { width: 100%; height: auto; aspect-ratio: 3 / 2; }
  .case-menu .cm-g { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
  .case-menu .cm-g h4 { grid-column: 1 / -1; }
}

/* segmented choices in the panel wrap their text instead of running out of the panel on phones */
main.kt .segf .seg { max-width: 100%; }
main.kt .segf .seg button { white-space: normal; line-height: 1.25; }
/* the rotatable stress element: only the square and its knob take the pointer (axes, arrows and labels sit on top of it) */
#mohrEl :not([data-erot]):not([data-erot] *) { pointer-events: none; }

/* theme-auto:start · generated by scripts/theme/hexmap.py: dark values (the rule of scripts/theme/colour.py) for
   colours that are not tokens, written as var(--x-rrggbb, #rrggbb): light is the fallback, unchanged */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --x-6a4c93: #ad95d4; --x-6e7177: #85827f; --x-a3aab2: #53585e; --x-d24b33: #fc907b; --x-dcdfe3: #363431;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --x-6a4c93: #ad95d4; --x-6e7177: #85827f; --x-a3aab2: #53585e; --x-d24b33: #fc907b; --x-dcdfe3: #363431;
  }
}
/* theme-auto:end */
