html {
  scroll-padding-top: calc(var(--nav) + 16px);
  --landing-space: clamp(42px, 6vw, 84px);
  --stage-color: #25332c;
}

main > :is(section, .section):not(.hero, .section--hero),
main > .hero,
footer.closing {
  height: auto;
  min-height: 0;
  padding-block: var(--landing-space);
}

main > :is(section, .section):not(.hero, .section--hero) > .wrap,
main > .hero > .wrap,
footer.closing > .wrap { height: auto; }
main > .hero { padding-top: calc(var(--nav) + clamp(32px, 5vw, 64px)); }
.hero--centred > .wrap { display: block; }
.hero--centred .hero__c {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--s-4);
  max-width: 880px;
  margin-inline: auto;
}
.hero--centred h1 { max-width: 24ch; text-wrap: balance; }
.hero--centred .hero__lead { max-width: 52ch; color: var(--muted); line-height: 1.5; text-wrap: balance; }
.hero--centred .btn-row { justify-content: center; }
.hero--centred .pill { flex-wrap: wrap; justify-content: center; height: auto; padding: 8px 12px; }

.text-highlight {
  padding: .09em .26em;
  border-radius: .28em;
  background: #24362e;
  color: #dce9d9;
  white-space: nowrap;
}

.text-highlight--price {
  background: #3b2d1c;
  color: #f4d4a4;
}

.timer-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.timer-icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timer-preview { max-width: 880px; margin: clamp(24px, 4vw, 44px) auto 0; }
.timer-stage, .signal-card__stage {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--stage-color);
}
.timer-stage::before, .signal-card__stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -20px;
  background: linear-gradient(145deg, #8c977c, #52664c 54%, #25332c);
  filter: blur(22px);
  pointer-events: none;
}
.timer-stage {
  display: grid;
  justify-items: center;
  padding: 12px;
  border-radius: 14px;
}
.timer-preview figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.5;
  text-align: center;
}

.timer {
  width: min(100%, 420px);
  border-radius: 9px;
  background: #101113;
  color: #f2f3f5;
  font: 13px/1.4 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 18px 42px #0a0b0d66;
}

@media (any-hover: hover) and (any-pointer: fine) and (prefers-reduced-motion: no-preference) {
  .timer-stage > .timer {
    transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: transform 180ms ease-out;
  }
}

.timer__title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 41px;
  padding: 8px 14px 8px 16px;
  border-bottom: 1px solid #1e2024;
  border-radius: 9px 9px 0 0;
  background: #0a0b0d;
  color: #a9abb1;
  font-weight: 600;
}
.timer__chrome { margin-left: auto; display: flex; gap: 18px; color: #90939b; }
.timer__chrome .timer-icon { width: 14px; height: 14px; }
.timer__chrome .timer-icon:first-child { color: #eaab4e; }
.timer__face { position: relative; padding: 20px clamp(12px, 3.5vw, 24px) 24px; }
.timer__status { display: flex; align-items: center; justify-content: space-between; color: #a9abb1; }
[data-status] { display: inline-flex; align-items: center; gap: 8px; color: #f2f3f5; }
[data-status]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #eaab4e; }
[data-running="false"] [data-status]::before { background: #797b81; }
.timer__digits {
  margin-top: 8px;
  font: 300 clamp(43px, 11vw, 72px)/1.24 "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.028em;
  white-space: nowrap;
}
.timer__total { display: flex; gap: 8px; margin-top: 10px; color: #a9abb1; }
[data-total] { font-variant-numeric: tabular-nums; }
.timer__signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  row-gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #26282d;
}
.timer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
}
.timer button:not(:disabled) { cursor: pointer; }
.timer button:focus-visible { outline: 2px solid #eaab4e; outline-offset: 2px; }
.timer button:not(:disabled):hover { background: #26282d; color: #f2f3f5; }
.timer__signals button { justify-self: start; padding-inline: 6px; color: #a9abb1; }
.timer__signals button:nth-child(3n + 2) { justify-self: center; }
.timer__signals button:nth-child(3n) { justify-self: end; }
.timer__signals button:not(:disabled):is([aria-pressed="true"], [data-live]) {
  background: #2a241c;
  color: #f2f3f5;
}
.timer__signals button:is([aria-pressed="true"], [data-live]) svg { color: #eaab4e; }
.timer__actions { display: grid; grid-template-columns: 2.25fr 1fr; gap: 8px; margin-top: 20px; }
.timer__actions button { min-height: 44px; border-color: #2b2e34; font-weight: 600; }
.timer__actions button:disabled { color: #a9abb1; }
.timer button[data-toggle] { background: #1b1d21; }
[data-running="true"] [data-toggle] svg + svg,
[data-running="false"] [data-toggle] svg:first-child { display: none; }
.timer[data-running="false"] button[data-toggle] { background: #ecedef; color: #141517; }
.timer__actions [data-toggle] svg { fill: currentColor; stroke: none; }
.timer__undo {
  position: relative;
  width: fit-content;
  margin: 10px auto 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 4px 12px;
  border: 1px solid #26282d;
  border-radius: 8px;
  background: #16181c;
  color: #a9abb1;
  white-space: nowrap;
}
.timer__undo button { padding-inline: 10px; background: #26282d; color: #f2f3f5; }
.timer__undo-progress {
  position: absolute;
  inset: auto 8px 0;
  height: 2px;
  border-radius: 2px;
  background: var(--p-accent);
  transform-origin: left;
  pointer-events: none;
}
[hidden] { display: none !important; }

#instrument, #statement {
  padding: 48px var(--gut);
  border-block: 1px solid var(--line);
  background: var(--surface);
}
#instrument > .wrap, #statement > .wrap { width: min(100%, var(--container)); }
.clock-explainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px 32px;
  margin-top: 24px;
}
.clock-explainer dt { font-weight: 600; }
.clock-explainer dd { margin: 4px 0 0; color: var(--muted); max-width: 48ch; }

.signal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); }
.signal-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.signal-card > div:first-child { padding: clamp(16px, 2.5vw, 28px); }
.signal-card h3, .order-sheet h3 { font-size: 1.15rem; line-height: 1.3; }
.signal-card p, .section-intro p { margin-top: 8px; line-height: 1.55; }
.signal-card p { color: var(--muted); }
.signal-card__stage { display: grid; align-items: center; padding: 14px; }
.feature-list {
  border-radius: 10px;
  background: #16181c;
  color: #f2f3f5;
  margin: 0;
  padding: 4px 14px;
  list-style: none;
  font-size: .875rem;
  line-height: 1.45;
}
.feature-list li, .feature-list > div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
}
.feature-list > * + * { border-top: 1px solid #2b2e34; }
.feature-list dt { display: flex; align-items: center; gap: 8px; }
.feature-list :is(dd, small) { color: #a9abb1; margin: 0 0 0 auto; font-size: inherit; text-align: right; }
.reset-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
}
.reset-preview kbd { border: 1px solid #474951; border-radius: 4px; padding: 2px 6px; }
#statement p { max-width: 62ch; margin-top: 12px; line-height: 1.6; }
#statement code { overflow-wrap: anywhere; }
.order-sheet {
  align-self: start;
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.order-sheet p { color: var(--muted); }
#faq .grid { align-items: start; row-gap: 24px; }
.section-intro p { max-width: 38ch; }
footer.closing > .wrap { grid-template-rows: auto auto; }

@media (max-width: 639px) {
  .hero--centred .btn-row { width: 100%; }
  .signal-grid { grid-template-columns: minmax(0, 1fr); }
  .timer__signals button { gap: 4px; font-size: 12px; }
}

@media (min-width: 640px) {
  .timer-stage { padding: 32px; }
  .signal-card__stage { padding: 24px; }
  .signal-card {
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: 0;
  }
}

@media (min-width: 1024px) {
  #instrument, #statement { padding: 72px var(--gut); }
}
