/* Webhook receipts, a protocol analyzer.
   Night-shift capture screen: deep petrol black, hairline traces, one teal probe colour,
   status colours that mean exactly one thing each. IBM Plex, mono first. */
:root {
  color-scheme: dark;
  --bg: #081214; --panel: #0d1b1e; --panel-2: #112428; --well: #06100f;
  --line: #1b343a; --line-2: #2a4f56; --text: #dbe7e5; --dim: #8ea9a6; --faint: #728e8b;
  --probe: #6fd6cf; --probe-2: #2c7d78;
  --ok: #5ccf98; --ok-bg: rgba(92, 207, 152, .1); --dup: #86b6ff; --dup-bg: rgba(134, 182, 255, .1); --bad: #ff7f8e; --bad-bg: rgba(255, 127, 142, .1);
  --sans: "IBM Plex Sans", system-ui, sans-serif; --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif; --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--sans); overflow-x: hidden; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--probe); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--probe); color: var(--bg); padding: 10px 14px; z-index: 5; font-weight: 600; }
.skip:focus { top: 8px; }
.wrap { width: min(1320px, 100% - 32px); margin-inline: auto; }
code, pre, kbd { font-family: var(--mono); }
h1, h2, h3 { font-family: var(--cond); font-weight: 600; letter-spacing: -.005em; margin: 0; }
p { margin: 0; }

/* capture bar */
.cap { border-bottom: 1px solid var(--line); background: var(--well); }
.cap .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; font: 400 13px/1.3 var(--mono); }
.cap a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; color: var(--text); }
.cap a svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.cap a:hover span { text-decoration: underline; text-underline-offset: 4px; }
.cap .meters { display: flex; gap: 0; color: var(--dim); }
.cap .meters span { padding: 0 14px; border-left: 1px solid var(--line); white-space: nowrap; }
.cap .meters b { color: var(--probe); font-weight: 500; }
@media (max-width: 760px) { .cap .meters span:not(:last-child) { display: none; } .cap .meters span { border-left: 0; padding-right: 0; } }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; padding: 64px 0 56px; }
.kicker { margin: 0 0 18px; font: 500 12.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--probe); }
h1 { font-size: clamp(36px, 5vw, 70px); line-height: 1; max-width: 14ch; font-weight: 600; }
h1 em { font-style: normal; color: var(--probe); }
.lede { margin: 24px 0 0; max-width: 56ch; font-size: 18px; color: #b9cbc9; }
.hero-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: 500 14.5px/1 var(--sans); text-decoration: none; cursor: pointer; transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.btn:hover { border-color: var(--probe); color: #fff; }
.btn.solid { background: var(--probe); border-color: var(--probe); color: #062022; font-weight: 600; }
.btn.solid:hover { background: #8fe4de; }
.btn small { font: 500 12px/1 var(--mono); opacity: .75; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.story { margin: 0; min-width: 0; border: 1px solid var(--line); background: var(--panel); }
.story-h { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font: 500 12px/1.4 var(--mono); color: var(--dim); }
.story-h b { color: var(--text); font-weight: 500; }
.story .seq { max-height: none; }
.story-foot { padding: 10px 14px 12px; border-top: 1px solid var(--line); font: 400 12.5px/1.55 var(--mono); color: var(--dim); }
.story-foot b { color: var(--ok); font-weight: 500; }
.replay { min-height: 32px; padding: 0 10px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: 500 12px/1 var(--mono); cursor: pointer; }
.replay:hover { border-color: var(--probe); }

/* sequence diagram: lifelines with real messages */
.seq { position: relative; padding: 6px 0 10px; overflow-y: auto; }
.seq-heads, .frame { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seq-heads { position: sticky; top: 0; z-index: 2; padding: 8px 0 6px; background: inherit; }
.seq-heads span { justify-self: center; padding: 3px 10px; border: 1px solid var(--line-2); background: var(--panel-2); font: 600 11.5px/1.3 var(--mono); letter-spacing: .04em; color: var(--text); text-transform: uppercase; }
.seq-body { position: relative; }
.seq-body::before, .seq-body::after, .seq-body > i { content: ""; position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--line-2); }
.seq-body::before { left: 16.666%; } .seq-body > i { left: 50%; } .seq-body::after { left: 83.333%; }
.frame { min-height: 0; padding: 0; }
.msg { position: relative; grid-column: 1 / -1; height: 42px; }
.msg .ln { position: absolute; top: 25px; height: 0; border-top: 1.5px solid var(--c, var(--dim)); transform-origin: left; animation: draw .45s var(--ease) both; animation-delay: var(--d, 0s); }
.msg.back .ln { transform-origin: right; border-top-style: solid; }
.msg.dash .ln { border-top-style: dashed; }
.msg .ln::after { content: ""; position: absolute; top: -5.5px; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.msg:not(.back) .ln::after { right: -1px; border-left: 8px solid var(--c, var(--dim)); }
.msg.back .ln::after { left: -1px; border-right: 8px solid var(--c, var(--dim)); }
.msg .lb { position: absolute; top: 4px; font: 500 11.5px/1.3 var(--mono); color: var(--c, var(--dim)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: fade .3s var(--ease) both; animation-delay: var(--d, 0s); }
.msg.sr .ln, .msg.sr .lb { left: 16.666%; width: 33.333%; }
.msg.rd .ln, .msg.rd .lb { left: 50%; width: 33.333%; }
.msg.sr .lb { width: 66.666%; } .msg.rd .lb { width: 50%; }
.msg.lb-pad .lb { padding-left: 8px; }
.msg .lb { padding: 0 8px; }
.msg.stop .ln { width: 0 !important; }
.stopmark { position: absolute; left: calc(50% - 9px); top: 16px; width: 18px; height: 18px; color: var(--bad); animation: fade .3s var(--ease) both; animation-delay: var(--d, 0s); }
.stopmark::before, .stopmark::after { content: ""; position: absolute; left: 8px; top: 0; width: 2px; height: 18px; background: currentColor; transform: rotate(45deg); }
.stopmark::after { transform: rotate(-45deg); }
.msg .note { position: absolute; left: calc(50% + 14px); top: 15px; font: 500 11.5px/1.3 var(--mono); color: var(--bad); white-space: nowrap; animation: fade .3s var(--ease) both; animation-delay: var(--d, 0s); }
.msg .note.sys { left: 50%; transform: translateX(-50%); color: var(--dup); padding: 2px 10px; border: 1px dashed var(--dup); background: var(--panel); top: 10px; }
.frame-tag { position: absolute; left: 6px; top: 6px; z-index: 1; font: 400 10.5px/1 var(--mono); color: var(--faint); }
.frame + .frame { border-top: 1px solid rgba(42, 79, 86, .35); }
#wh-seq-body .frame { padding-top: 20px; }
.seq-empty { padding: 26px 16px; text-align: center; font: 400 13px/1.5 var(--mono); color: var(--dim); }
@keyframes draw { from { transform: scaleX(0); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.c-ok { --c: var(--ok); } .c-dup { --c: var(--dup); } .c-bad { --c: var(--bad); } .c-req { --c: #c9d8d6; } .c-db { --c: var(--probe); }

/* sections */
.sec { padding: 72px 0; border-top: 1px solid var(--line); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 48px; align-items: end; margin-bottom: 30px; }
.layer { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; font: 500 12px/1.4 var(--mono); color: var(--probe); letter-spacing: .06em; text-transform: uppercase; }
.layer::before { content: ""; width: 26px; height: 1px; background: var(--probe); }
h2 { font-size: clamp(28px, 3.3vw, 46px); line-height: 1.05; }
.sec-head p { max-width: 62ch; color: #b4c6c4; }

/* bench */
.bench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); border: 1px solid var(--line-2); background: var(--panel); }
.side { min-width: 0; }
.side + .side { border-left: 1px solid var(--line-2); }
.side-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; padding: 8px 16px; background: var(--panel-2); border-bottom: 1px solid var(--line); font: 600 12.5px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.side-h span:last-child { color: var(--dim); font-weight: 400; text-transform: none; letter-spacing: 0; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.presets button { min-height: 34px; padding: 4px 10px; border: 1px solid var(--line-2); background: var(--well); color: var(--text); font: 500 12.5px/1.25 var(--mono); cursor: pointer; text-align: left; transition: border-color .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease); }
.presets button:hover { border-color: var(--probe); }
.presets button[aria-pressed="true"] { background: var(--probe); color: #062022; border-color: var(--probe); }
.req { padding: 14px 16px 16px; }
.req-line { font: 600 13px/1.6 var(--mono); margin: 0 0 6px; color: #fff; }
.req-line span { color: var(--probe); }
.hdrs { margin: 0 0 12px; font: 400 12.5px/1.6 var(--mono); }
.hdrs div { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.hdrs dt { color: var(--dim); }
.hdrs dd { margin: 0; overflow-wrap: anywhere; }
.hdrs .ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.hdrs select { min-height: 32px; max-width: 100%; border: 1px solid var(--line-2); background: var(--well); color: var(--text); font: 500 12.5px/1.2 var(--mono); padding: 2px 6px; }
label.body-l { display: flex; justify-content: space-between; gap: 12px; font: 600 12.5px/1.6 var(--mono); color: var(--dim); }
label.body-l .over { color: var(--bad); }
textarea { display: block; width: 100%; min-height: 160px; margin-top: 6px; padding: 12px; border: 1px solid var(--line-2); background: var(--well); color: #e9f3f1; caret-color: var(--probe); font: 400 13.5px/1.6 var(--mono); resize: vertical; }
textarea:focus-visible { outline-offset: -1px; }
.send-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.send-row .hint { font: 400 12px/1.4 var(--mono); color: var(--faint); margin-left: auto; }
.svc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); font: 400 12.5px/1.5 var(--mono); color: var(--dim); }
.svc .btn { min-height: 40px; padding: 0 12px; font-size: 13px; }
.svc span { margin-right: auto; }
.svc b { color: var(--probe); font-weight: 500; }

.rail { list-style: none; margin: 0; padding: 16px 16px 14px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.stage { position: relative; padding: 22px 6px 0 0; font: 600 12.5px/1.3 var(--mono); color: var(--dim); }
.stage::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--line-2); }
.stage::after { content: ""; position: absolute; left: 0; top: 1px; width: 14px; height: 14px; border: 2px solid var(--line-2); background: var(--panel); transition: background-color .12s var(--ease), border-color .12s var(--ease), box-shadow .2s var(--ease); }
.stage small { display: block; margin-top: 2px; font-weight: 400; font-size: 11.5px; color: var(--faint); overflow-wrap: anywhere; }
.stage[data-state="pass"] { color: var(--text); }
.stage[data-state="pass"]::before { background: var(--ok); }
.stage[data-state="pass"]::after { background: var(--ok); border-color: var(--ok); }
.stage[data-state="stop"]::after { background: var(--bad); border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.stage[data-state="stop"] { color: var(--bad); }
.stage[data-state="stop"] small { color: var(--bad); font-weight: 600; }

.resp { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; padding: 16px; border-bottom: 1px solid var(--line); border-left: 4px solid var(--line-2); }
.resp[data-kind="ok"] { border-left-color: var(--ok); background: var(--ok-bg); }
.resp[data-kind="dup"] { border-left-color: var(--dup); background: var(--dup-bg); }
.resp[data-kind="bad"] { border-left-color: var(--bad); background: var(--bad-bg); }
.resp .status { grid-row: span 3; font: 500 46px/1 var(--mono); min-width: 2.2ch; color: var(--dim); }
.resp[data-kind="ok"] .status { color: var(--ok); }
.resp[data-kind="dup"] .status { color: var(--dup); }
.resp[data-kind="bad"] .status { color: var(--bad); }
.resp .for { font: 500 12px/1.4 var(--mono); color: var(--dim); }
.resp code { font-size: 13px; overflow-wrap: anywhere; color: #fff; }
.resp p { margin: 0; font-size: 14.5px; line-height: 1.5; color: #c4d4d2; }

.tables { display: grid; grid-template-columns: minmax(0, 1fr); }
.tbl { min-width: 0; padding: 14px 16px 6px; }
.tbl + .tbl { border-top: 1px solid var(--line); }
.tbl h3 { font: 600 12.5px/1.5 var(--mono); display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.tbl h3 span { color: var(--dim); font-weight: 400; text-transform: none; letter-spacing: 0; }
.tbl h3 b { color: var(--probe); font-weight: 600; }
.tscroll { overflow-x: auto; max-height: 216px; overflow-y: auto; }
table.st { width: 100%; border-collapse: collapse; font: 400 12.5px/1.45 var(--mono); }
table.st th { text-align: left; font-weight: 500; color: var(--dim); padding: 4px 10px 4px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; position: sticky; top: 0; background: var(--panel); }
table.st td { padding: 5px 10px 5px 0; border-bottom: 1px dashed var(--line); white-space: nowrap; }
table.st td.empty { color: var(--dim); white-space: normal; font-family: var(--sans); font-size: 13.5px; }
#wh-more { font: 400 12px/1.4 var(--mono); color: var(--dim); margin: 6px 0 4px; }

.trace { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); border: 1px solid var(--line-2); border-top: 0; background: var(--panel); }
.trace > div { min-width: 0; }
.trace > div + div { border-left: 1px solid var(--line-2); }
.trace .seq { max-height: 420px; }
.trace .seq-heads { background: var(--panel); }
#wh-journal { list-style: none; margin: 0; padding: 0 16px; max-height: 420px; overflow-y: auto; font: 400 12.5px/1.45 var(--mono); }
#wh-journal li { display: grid; grid-template-columns: 68px 36px minmax(0, 1fr); gap: 4px 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
#wh-journal li span { grid-column: 3; color: var(--dim); }
#wh-journal time { color: var(--faint); }
#wh-journal li[data-kind="ok"] b { color: var(--ok); }
#wh-journal li[data-kind="dup"] b { color: var(--dup); }
#wh-journal li[data-kind="bad"] b, #wh-journal li[data-kind="bad"] code { color: var(--bad); }
#wh-journal li[data-kind="sys"] { color: var(--dim); }
#wh-journal li[data-kind="sys"] code { color: var(--probe); }
#wh-journal code, #wh-journal span { overflow-wrap: anywhere; }
#wh-journal-empty { margin: 0; padding: 12px 16px 14px; color: var(--dim); font-size: 14px; }
.bench-note { margin: 18px 0 0; max-width: 80ch; color: #b4c6c4; font-size: 15px; }
.bench-note code { color: var(--probe); }

/* recorded run */
.log { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line-2); font-size: 14.5px; }
.log caption { text-align: left; padding: 0 0 10px; font: 400 13px/1.5 var(--mono); color: var(--dim); }
.log th, .log td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.log thead th { font: 500 12px/1.4 var(--mono); color: var(--dim); border-bottom-color: var(--line-2); white-space: nowrap; text-transform: uppercase; letter-spacing: .05em; }
.log tbody th { font-weight: 600; min-width: 170px; }
.log tbody th span { display: block; font: 400 12.5px/1.5 var(--mono); color: var(--dim); }
.log td code { font-size: 12.5px; overflow-wrap: anywhere; }
.log .n { text-align: right; font-family: var(--mono); }
.log .http { font: 600 15px/1.4 var(--mono); }
.log .http.ok { color: var(--ok); } .log .http.warn { color: var(--bad); } .log .http.bad { color: var(--bad); }
.log tr.restart > * { background: var(--dup-bg); border-top: 2px solid var(--dup); }
.log tbody tr:last-child > * { border-bottom: 0; }

/* code */
.codegrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
figure.code { margin: 0; border: 1px solid var(--line-2); background: var(--well); color: #d0dfdd; }
figure.code figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 9px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); font: 500 12.5px/1.5 var(--mono); color: var(--dim); }
figure.code figcaption span:first-child { color: var(--text); }
figure.code pre { margin: 0; padding: 16px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
figure.code .hl { color: #fff; background: rgba(111, 214, 207, .14); box-shadow: inset 3px 0 0 var(--probe); display: inline-block; min-width: 100%; }
figure.code .c { color: var(--dim); } figure.code .okk { color: var(--ok); }
.side-notes p { margin: 0 0 14px; font-size: 15px; color: #c4d4d2; }
.side-notes p b { color: #fff; }
.side-notes p:last-child { margin-bottom: 0; }

.shot { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 24px; align-items: start; }
.shot img { width: 100%; height: auto; border: 1px solid var(--line-2); background: #fff; display: block; }
.shot figcaption { font-size: 15px; color: #b4c6c4; }

.stops { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.stops ul { margin: 14px 0 0; padding: 0; list-style: none; }
.stops li { padding: 9px 0 9px 24px; border-bottom: 1px solid var(--line); position: relative; color: #c4d4d2; }
.stops li::before { content: ""; position: absolute; left: 0; top: 20px; width: 12px; height: 1.5px; background: var(--probe); }
.stops h2 { font-size: 32px; } .stops h3 { font-size: 22px; }
.stops p { margin: 12px 0 0; color: #c4d4d2; }
.foot { padding: 28px 0 40px; font-size: 14px; color: var(--dim); border-top: 1px solid var(--line); }
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.foot a { min-height: 44px; display: inline-flex; align-items: center; color: var(--text); }

@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .bench, .trace { grid-template-columns: minmax(0, 1fr); }
  .side + .side, .trace > div + div { border-left: 0; border-top: 1px solid var(--line-2); }
  .codegrid, .shot { grid-template-columns: minmax(0, 1fr); }
  .shot img { max-width: 720px; }
}
@media (max-width: 860px) {
  .hero { padding-top: 40px; }
  .sec { padding: 52px 0; }
  .sec-head { grid-template-columns: minmax(0, 1fr); }
  .stops { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 640px) {
  .lede { font-size: 17px; }
  .hdrs div { grid-template-columns: 1fr; gap: 2px; }
  .presets button { min-height: 44px; }
  .hdrs select { min-height: 44px; }
  .send-row .btn { flex: 1 1 auto; }
  .send-row .hint { display: none; }
  .svc .btn { min-height: 44px; flex: 1 1 auto; }
  .svc span { flex-basis: 100%; }
  .rail { padding: 14px 12px; }
  .stage { font-size: 11px; padding-right: 4px; }
  .stage small { display: none; }
  .side-h span + span { display: none; }
  .resp .status { font-size: 36px; }
  .msg .lb { font-size: 10.5px; padding: 0 4px; }
  .msg .note { font-size: 10.5px; left: calc(50% + 12px); }
  .seq-heads span { padding: 2px 6px; font-size: 10.5px; }
  .log, .log tbody, .log tr, .log th, .log td { display: block; }
  .log { border: 0; background: none; }
  .log caption { display: block; }
  .log thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .log tbody tr { margin-bottom: 10px; border: 1px solid var(--line-2); background: var(--panel); }
  .log tbody th { border-bottom: 1px solid var(--line); }
  .log td { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 8px 14px; border-bottom: 0; }
  .log td::before { content: attr(data-label); font: 500 12px/1.6 var(--mono); color: var(--dim); }
  .log .n { text-align: left; }
  .log tr.restart > * { border-top: 0; }
}
/* footer contacts */
.foot .foot-contact { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; border-top: 1px solid var(--line); }
.foot-contact span { margin-right: 2px; color: var(--probe); font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.foot .foot-contact a { overflow-wrap: anywhere; }

/* headings without a lone last word, notes at a readable measure */
h1, h2, h3 { text-wrap: balance; }
.lede, .sec-head p, .bench-note, .side-notes p, .shot figcaption, .stops p, .resp p { text-wrap: pretty; }
.bench-note { max-width: 68ch; }
.side-notes p { max-width: 68ch; }
.btn:active:not(:disabled), .presets button:active, .replay:active { transform: translateY(1px); }

/* touch screens: 44 pixel targets, and fields at 16 pixels so a phone does not zoom on focus */
@media (pointer: coarse) {
  .replay, .presets button, .hdrs select, .svc .btn { min-height: 44px; }
  .replay { padding: 0 14px; }
  .hdrs select, textarea { font-size: 16px; }
}
/* phones and tablets: reading copy at 16 pixels */
@media (max-width: 1023px) {
  .bench-note, .side-notes p, .shot figcaption, .foot { font-size: 16px; }
  .story-foot, #wh-sig { font-size: 15.5px; }
}
/* the signature check has the longest name, so its column is a little wider on narrow phones */
@media (max-width: 400px) {
  .rail { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 340px) {
  .wrap { width: calc(100% - 24px); }
  .rail { padding-inline: 10px; }
  .stage { font-size: 10.5px; padding-right: 2px; }
  /* message labels may take two lines here, so each message row grows and everything below the label moves down with it */
  .msg { height: 54px; }
  .msg .lb { font-size: 10px; line-height: 1.25; padding: 0 3px; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .msg .ln { top: 37px; }
  .stopmark { top: 28px; }
  .msg .note { top: 27px; }
  .msg .note.sys { top: 22px; }
  .presets, .req, .svc { padding-inline: 12px; }
  .side-h { padding-inline: 12px; }
}
@media (max-width: 640px) {
  .hdrs div { grid-template-columns: minmax(0, 1fr); }
  .hdrs select { width: 100%; }
}

/* very wide screens: the page scales up instead of floating in a narrow column */
@media (min-width: 2048px) { :root { --page-zoom: 1.15; } body { zoom: 1.15; } }
@media (min-width: 2400px) { :root { --page-zoom: 1.3; } body { zoom: 1.3; } }
@media (min-width: 2880px) { :root { --page-zoom: 1.5; } body { zoom: 1.5; } }
@media (min-width: 3300px) { :root { --page-zoom: 1.75; } body { zoom: 1.75; } }
@media (min-width: 3700px) { :root { --page-zoom: 2; } body { zoom: 2; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
