@font-face {
  font-family: 'TASA Explorer';
  src: url('assets/fonts/tasa-explorer-regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --gutter: clamp(24px, 4.45vw, 88px);
  --pulse-duration: 1000ms;
  --logo-optical-x: 0px;
  --logo-optical-y: 0px;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: #000; color: #fff; font: 400 12px/1.5 'TASA Explorer', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { -webkit-tap-highlight-color: transparent; }
button { padding: 0; color: inherit; background: none; border: 0; font: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
.stepper:disabled { opacity: .35; cursor: default; }
.motion-toggle:disabled { cursor: default; }
p, h1 { margin: 0; }
.terminal {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  height: 100vh;
  height: 100dvh;
  padding: max(32px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom, 16px)) max(var(--gutter), env(safe-area-inset-left));
}
.masthead { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; font-size: 11px; letter-spacing: .1em; line-height: 1.5; }
.identity, .established { white-space: nowrap; }
.observation { min-height: 0; }
.brand { position: absolute; top: 38.2%; left: var(--gutter); right: var(--gutter); transform: translate(var(--logo-optical-x), calc(-50% + var(--logo-optical-y))); }
h1 { font-size: 0; }
#brand-logo { display: block; width: 100%; height: auto; animation: pulse var(--pulse-duration) linear infinite; will-change: opacity; }
.console, .fader { min-width: 0; }
.instrument-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.manifesto { font-size: clamp(18px, 1.75vw, 26px); line-height: 1.2; letter-spacing: .015em; }
.readout { display: flex; align-items: baseline; gap: 12px; }
#tempo-output { display: block; font-size: clamp(64px, 6.4vw, 92px); font-variant-numeric: tabular-nums; line-height: .82; letter-spacing: -.045em; }
.unit { font-size: 11px; line-height: 1; letter-spacing: .08em; }
.fader-controls { display: flex; align-items: center; gap: 25px; margin-top: 32px; }
.stepper { flex: 0 0 48px; width: 48px; height: 48px; border: 1px solid #fff; font-size: 26px; line-height: 1; }
.stepper:hover:enabled { color: #000; background: #fff; }
.range-wrap { position: relative; flex: 1; min-width: 0; }
input[type=range] { display: block; appearance: none; -webkit-appearance: none; width: 100%; height: 48px; margin: 0; background: transparent; cursor: ew-resize; touch-action: none; }
input[type=range]::-webkit-slider-runnable-track { height: 1px; background: #fff; }
input[type=range]::-moz-range-track { height: 1px; background: #fff; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 32px; margin-top: -15.5px; border: 0; border-radius: 0; background: #fff; }
input[type=range]::-moz-range-thumb { width: 10px; height: 32px; border: 0; border-radius: 0; background: #fff; }
.value-badge { position: absolute; z-index: 1; bottom: calc(100% + 16px); left: 33.33%; transform: translateX(-50%); padding: 6px 9px; background: #fff; color: #000; font-size: 11px; line-height: 1.5; letter-spacing: .03em; white-space: nowrap; opacity: 0; pointer-events: none; }
.range-wrap.active .value-badge { opacity: 1; }
.contact-row { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-top: 22px; }
.email, .motion-toggle { min-height: 44px; font-size: 11px; line-height: 1.5; letter-spacing: .025em; white-space: nowrap; }
.email { text-align: left; }
.motion-toggle { text-align: right; letter-spacing: .08em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.noscript { position: fixed; left: var(--gutter); bottom: 20px; padding: 10px; background: #000; border: 1px solid #fff; font-size: 12px; }
.pulse-stopped #brand-logo { animation: none; opacity: 1; will-change: auto; }
/* Sine-wave samples: 0.65 + 0.35*cos(2πt), one cycle per beat. */
@keyframes pulse {
  0%,100% { opacity: 1; }
  5%,95% { opacity: .98287; }
  10%,90% { opacity: .93316; }
  15%,85% { opacity: .85572; }
  20%,80% { opacity: .75816; }
  25%,75% { opacity: .65; }
  30%,70% { opacity: .54184; }
  35%,65% { opacity: .44428; }
  40%,60% { opacity: .36684; }
  45%,55% { opacity: .31713; }
  50% { opacity: .3; }
}
@media (prefers-reduced-motion: reduce) { #brand-logo { animation: none !important; opacity: 1; will-change: auto; } }
@media (max-width: 600px) {
  .terminal { padding-top: max(24px, env(safe-area-inset-top)); }
  .masthead { font-size: 9px; letter-spacing: .07em; }
  .manifesto { font-size: 18px; }
  .readout { gap: 8px; }
  #tempo-output { font-size: 64px; }
  .unit { font-size: 9px; }
  .fader-controls { gap: 14px; margin-top: 26px; }
  .stepper { flex-basis: 44px; width: 44px; }
  .contact-row { gap: 16px; margin-top: 18px; }
  .email, .motion-toggle { font-size: 10px; }
}
@media (max-height: 680px) {
  .terminal { padding-top: max(20px, env(safe-area-inset-top)); gap: 16px; }
  .brand { top: 34%; }
  .manifesto { font-size: 16px; }
  #tempo-output { font-size: 58px; }
  .fader-controls { margin-top: 22px; }
  .contact-row { margin-top: 12px; }
}
@media (max-height: 480px) and (min-width: 600px) {
  .terminal { padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); gap: 12px; }
  .masthead { font-size: 9px; }
  .brand { top: 31%; }
  .manifesto { font-size: 12px; line-height: 1.15; }
  #tempo-output { font-size: 52px; }
  .unit { font-size: 9px; }
  .fader-controls { margin-top: 16px; }
  .stepper, input[type=range] { height: 44px; }
  .stepper { flex-basis: 44px; width: 44px; }
  .contact-row { margin-top: 8px; }
  .email, .motion-toggle { font-size: 9px; }
}
@media (max-width: 350px) {
  :root { --gutter: 20px; }
  .masthead { font-size: 8px; }
  .manifesto { font-size: 16px; }
  #tempo-output { font-size: 52px; }
  .unit { font-size: 8px; }
  .readout { gap: 7px; }
  .fader-controls { gap: 12px; }
  .email, .motion-toggle { font-size: 9px; }
}
