/* SongScript - a dark studio bench: one instrument panel, and the piano roll is
   the sheet you write on. The palette and the two display faces are the
   Joshtified set, so the tool sits on joshtified.com/songscript without looking
   like a page from somewhere else. */

@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: block;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Titan One";
  src: url("fonts/titan-one-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Silkscreen";
  src: url("fonts/silkscreen-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Silkscreen";
  src: url("fonts/silkscreen-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

:root {
  --night: #100b1c;
  --night-2: #171027;
  --night-3: #201635;
  --chalk: #f4f1f9;
  --chalk-soft: rgba(244, 241, 249, 0.68);
  --chalk-faint: rgba(244, 241, 249, 0.44);
  --rule: rgba(244, 241, 249, 0.1);
  --rule-hard: rgba(244, 241, 249, 0.2);
  --violet: #7c3aed;
  --violet-light: #a78bfa;
  --violet-soft: rgba(124, 58, 237, 0.16);
  --ember: #f04a2a;
  --display: "Bricolage", "Segoe UI", system-ui, sans-serif;
  --shout: "Titan One", "Bricolage", "Segoe UI", system-ui, sans-serif;
  --pixel: "Silkscreen", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --rail: 340px;
  --r: 5px;
}

* {
  box-sizing: border-box;
}

/* Author `display` rules beat the browser's own [hidden] rule, so every panel
   that hides itself needs this to actually stay hidden. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--night);
  background-image:
    radial-gradient(90% 60% at 22% -12%, rgba(124, 58, 237, 0.28), transparent 62%),
    radial-gradient(70% 50% at 92% 0%, rgba(240, 74, 42, 0.12), transparent 60%);
  background-repeat: no-repeat;
  color: var(--chalk);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
output {
  font: inherit;
  color: inherit;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--violet-light);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--violet-light);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--violet);
  color: var(--chalk);
  padding: 10px 14px;
  z-index: 90;
}
.skip:focus {
  left: 8px;
  top: 8px;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.kicker {
  margin: 0;
  font-family: var(--pixel);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-light);
}

/* ---------------------------------------------------------------- masthead */

.masthead {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 66px;
  padding: 0 22px;
  border-bottom: 1px solid var(--rule-hard);
  background: rgba(16, 11, 28, 0.82);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--chalk);
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: block;
}

.brand-word {
  font-family: var(--shout);
  font-size: 21px;
  line-height: 1;
  letter-spacing: 0.005em;
  padding-top: 3px;
}

.brand-word em {
  font-style: normal;
  color: var(--violet-light);
}

.masthead-line {
  margin: 0;
  font-family: var(--pixel);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--chalk-faint);
}

.head-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.head-link {
  font-size: 13px;
  text-decoration: none;
  color: var(--chalk-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.head-link:hover {
  color: var(--chalk);
  border-color: var(--violet-light);
}

.head-link.home {
  font-family: var(--pixel);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--chalk-faint);
}

.head-link.home:hover {
  color: var(--violet-light);
  border-color: transparent;
}

/* ------------------------------------------------------------------- bench */

.bench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail);
  flex: 1 1 auto;
  min-height: min(76vh, 720px);
  border-bottom: 1px solid var(--rule-hard);
}

.stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stage-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--rule);
}

.file-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.file-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 46ch;
}

.file-detail {
  font-size: 12px;
  color: var(--chalk-faint);
}

.transport {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--rule-hard);
  background: var(--night-2);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--violet-light);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.icon-btn.is-playing {
  background: var(--violet);
  color: var(--chalk);
  border-color: var(--violet);
}

.i-play {
  fill: currentColor;
  stroke: none;
}

.clock {
  font-family: var(--mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--chalk-soft);
  min-width: 9ch;
}

.mode {
  display: flex;
  border: 1px solid var(--rule-hard);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--night-2);
}

.mode-opt {
  border: 0;
  background: transparent;
  padding: 6px 11px;
  font-size: 11.5px;
  letter-spacing: 0.01em;
  color: var(--chalk-soft);
  cursor: pointer;
}

.mode-opt.is-on {
  background: var(--violet-soft);
  color: var(--chalk);
  box-shadow: inset 0 -2px 0 var(--violet-light);
}

/* the roll */

.roll-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 350px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(124, 58, 237, 0.13), transparent 58%),
    var(--night-2);
}

#roll {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 34px clamp(22px, 5vw, 60px);
  max-width: 660px;
  background: linear-gradient(100deg, var(--night-2) 46%, rgba(23, 16, 39, 0.55));
  clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
}

.empty[hidden] {
  display: none;
}

.empty-lead {
  margin: 2px 0 0;
  font-family: var(--shout);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.9vw, 3.1rem);
  line-height: 0.92;
  letter-spacing: 0.005em;
  color: var(--chalk);
}

.empty-sub {
  margin: 0;
  max-width: 44ch;
  font-size: 14px;
  color: var(--chalk-soft);
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.pick {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--ember);
  border-radius: var(--r);
  background: var(--ember);
  color: #fff6f3;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.12s ease, border-color 0.15s ease,
    color 0.15s ease, background 0.15s ease;
}

.pick:hover {
  filter: brightness(1.1);
}

.pick:active {
  transform: translateY(1px);
}

.pick.ghost {
  background: transparent;
  border-color: var(--rule-hard);
  color: var(--chalk-soft);
  font-weight: 500;
}

.pick.ghost:hover {
  border-color: var(--violet-light);
  color: var(--chalk);
  filter: none;
}

.pick svg {
  width: 16px;
  height: 16px;
}

.formats {
  margin: 0;
  font-family: var(--pixel);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--chalk-faint);
}

.working {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(340px, 78%);
  text-align: center;
  background: rgba(23, 16, 39, 0.94);
  padding: 22px;
  border: 1px solid var(--rule-hard);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.working[hidden] {
  display: none;
}

.working-bar {
  height: 2px;
  background: var(--rule);
  overflow: hidden;
  position: relative;
}

.working-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  background: var(--violet-light);
  animation: sweep 1.15s cubic-bezier(0.5, 0, 0.4, 1) infinite;
}

@keyframes sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(300%);
  }
}

.working p {
  margin: 0;
  font-family: var(--pixel);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--chalk-soft);
}

/* readout */

.readout {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 14px 22px;
  border-top: 1px solid var(--rule);
  background: var(--night);
}

.readout-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 64px;
}

.readout-cell.grow {
  flex: 1 1 auto;
}

.readout-cell .k {
  font-family: var(--pixel);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chalk-faint);
}

.readout-cell .v {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--chalk);
}

.readout-cell .v.mono {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--chalk-soft);
  padding-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.readout-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid var(--violet);
  background: var(--violet);
  color: var(--chalk);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r);
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    background 0.15s ease;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.14);
}

.btn.ghost {
  background: transparent;
  color: var(--chalk-soft);
  border-color: var(--rule-hard);
  font-weight: 500;
}

.btn.ghost:hover:not(:disabled) {
  border-color: var(--chalk-soft);
  color: var(--chalk);
  filter: none;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn.big {
  align-self: flex-start;
  margin-top: 6px;
  padding: 12px 18px;
  font-size: 14px;
  border-color: var(--ember);
  background: var(--ember);
  color: #fff6f3;
}

/* -------------------------------------------------------------------- rail */

.rail {
  border-left: 1px solid var(--rule-hard);
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: linear-gradient(180deg, var(--night-2), rgba(23, 16, 39, 0.6));
}

.rail-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.rail-head h2 {
  margin: 0;
  font-family: var(--pixel);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chalk-soft);
  font-weight: 700;
}

.reset {
  margin-left: auto;
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
  color: var(--chalk-faint);
  cursor: pointer;
  border-bottom: 1px solid var(--rule-hard);
}

.reset:hover {
  color: var(--violet-light);
  border-color: var(--violet-light);
}

.field {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.field legend {
  padding: 0;
  font-family: var(--pixel);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chalk-faint);
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 600;
}

.label-row output {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--violet-light);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  border: 1px solid var(--rule-hard);
  background: var(--night-3);
  border-radius: 3px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--chalk-soft);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.chip:hover {
  border-color: var(--chalk-faint);
  color: var(--chalk);
}

.chip.is-on {
  background: var(--violet-soft);
  color: var(--chalk);
  border-color: var(--violet-light);
}

.hint {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--chalk-faint);
}

/* range */

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: var(--rule-hard);
  border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--violet-light);
  border: 2px solid var(--night-2);
}

input[type="range"]:focus-visible::-webkit-slider-thumb {
  background: var(--chalk);
}

input[type="range"]::-moz-range-track {
  height: 3px;
  background: var(--rule-hard);
  border-radius: 2px;
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--violet-light);
  border: 2px solid var(--night-2);
}

/* tempo and switches */

.tempo-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

input[type="number"] {
  width: 78px;
  padding: 6px 8px;
  border: 1px solid var(--rule-hard);
  border-radius: 3px;
  background: var(--night-3);
  font-family: var(--mono);
  font-size: 12.5px;
  -moz-appearance: textfield;
}

input[type="number"]:disabled {
  opacity: 0.4;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.unit {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--chalk-faint);
}

.switches {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--chalk-soft);
  cursor: pointer;
  position: relative;
}

.switch-row input,
.tempo-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 34px;
  height: 19px;
  margin: 0;
  cursor: pointer;
}

.switch {
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: var(--rule-hard);
  position: relative;
  flex: 0 0 auto;
  transition: background 0.16s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--chalk);
  transition: transform 0.16s cubic-bezier(0.3, 0.9, 0.3, 1);
}

.switch-row input:checked ~ .switch,
.tempo-row input[type="checkbox"]:checked + .switch {
  background: var(--violet);
}

.switch-row input:checked ~ .switch::after,
.tempo-row input[type="checkbox"]:checked + .switch::after {
  transform: translateX(15px);
}

.switch-row input:focus-visible ~ .switch {
  outline: 2px solid var(--violet-light);
  outline-offset: 2px;
}

.rail-foot {
  margin: auto 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--chalk-faint);
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}

/* -------------------------------------------------------------------- exe */

.exe {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  padding: clamp(42px, 6vw, 74px) 22px;
  border-bottom: 1px solid var(--rule);
}

.exe-copy h2 {
  margin: 8px 0 10px;
  font-family: var(--shout);
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1;
}

.exe-lead {
  margin: 0 0 8px;
  max-width: 46ch;
  color: var(--chalk-soft);
  font-size: 14.5px;
}

.exe-meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--chalk-faint);
}

.exe-meta a {
  color: var(--violet-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(167, 139, 250, 0.4);
}

.exe-meta a:hover {
  border-color: var(--violet-light);
}

.snippet {
  margin: 0;
  padding: 20px 22px;
  border: 1px solid var(--rule-hard);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--night-2), rgba(16, 11, 28, 0.5));
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.85;
  color: var(--chalk);
  overflow-x: auto;
}

.snippet .c {
  color: var(--chalk-faint);
}

/* ------------------------------------------------------------------- notes */

.notes {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(46px, 7vw, 82px) 22px 24px;
}

.notes h2 {
  margin: 0 0 28px;
  font-family: var(--shout);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.05;
}

.notes dl {
  margin: 0;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0 28px;
}

.notes dt {
  font-family: var(--pixel);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet-light);
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}

.notes dd {
  margin: 0;
  padding: 16px 0;
  font-size: 14.5px;
  color: var(--chalk-soft);
  border-top: 1px solid var(--rule);
  max-width: 64ch;
}

.fineprint {
  margin: 30px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--chalk-faint);
  max-width: 80ch;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 18px 22px 30px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--chalk-faint);
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  border-top: 1px solid var(--rule);
}

.footer .dot {
  opacity: 0.45;
}

.footer a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule-hard);
}

.footer a:hover {
  color: var(--violet-light);
  border-color: var(--violet-light);
}

/* ---------------------------------------------------------------- dropveil */

.dropveil {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(16, 11, 28, 0.86);
  backdrop-filter: blur(4px);
  box-shadow: inset 0 0 0 3px var(--violet-light);
}

.dropveil[hidden] {
  display: none;
}

.dropveil span {
  font-family: var(--shout);
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  color: var(--chalk);
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 980px) {
  .bench {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .rail {
    border-left: 0;
    border-top: 1px solid var(--rule-hard);
    flex-direction: row;
    flex-wrap: wrap;
    gap: 22px 28px;
  }

  .rail > .field,
  .rail > fieldset {
    flex: 1 1 190px;
  }

  .rail .switches {
    flex: 1 1 240px;
  }

  .rail-foot {
    flex: 1 1 100%;
    margin: 0;
  }

  .roll-wrap {
    min-height: 320px;
  }

  .empty {
    clip-path: none;
    max-width: none;
    background: linear-gradient(180deg, var(--night-2) 64%, rgba(23, 16, 39, 0.86));
  }

  .readout {
    flex-wrap: wrap;
    gap: 14px 22px;
  }

  .readout-actions {
    margin-left: 0;
    width: 100%;
  }

  .readout-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .exe {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }
}

@media (max-width: 640px) {
  .masthead {
    height: 60px;
    padding: 0 15px;
  }

  .masthead-line,
  .head-link.home {
    display: none;
  }

  .head-nav {
    gap: 14px;
  }

  .stage-bar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 15px;
  }

  .transport {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }

  .readout {
    padding: 12px 15px;
  }

  .rail {
    padding: 18px 15px 22px;
  }

  .empty {
    padding: 24px 18px;
  }

  .empty-lead {
    font-size: 1.85rem;
  }

  .notes dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .notes dt {
    padding: 16px 0 0;
  }

  .notes dd {
    padding-top: 6px;
    border-top: 0;
  }

  .exe,
  .notes,
  .footer {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
