:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7f4;
  color: #1d211c;
  font-synthesis: none;
  --ink: #1d211c;
  --paper: #f5f7f4;
  --orange: #ef6a35;
  --green: #0d8b72;
  --line: #c4cbc5;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  width: min(100%, 1440px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 48px 36px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
  text-transform: uppercase;
}

.wordmark-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 16px 0 0 var(--green);
  margin-right: 16px;
}

.current-time {
  min-width: 9ch;
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 650;
  text-align: right;
}

.status-stage {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(420px, 1.25fr);
  align-items: center;
  gap: clamp(48px, 8vw, 132px);
  padding: 48px 3vw;
}

.time-visual {
  display: grid;
  place-items: center;
}

.dial {
  position: relative;
  width: min(31vw, 390px);
  min-width: 260px;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #dfe9e4;
  box-shadow: 12px 12px 0 var(--green);
}

.tick {
  --angle: 0deg;
  position: absolute;
  inset: 9px 50% auto;
  width: 3px;
  height: 14px;
  background: var(--ink);
  transform-origin: 50% calc((min(31vw, 390px) - 21px) / 2);
  transform: translateX(-50%) rotate(var(--angle));
}

.tick-1 { --angle: 30deg; }
.tick-2 { --angle: 60deg; }
.tick-3 { --angle: 90deg; }
.tick-4 { --angle: 120deg; }
.tick-5 { --angle: 150deg; }
.tick-6 { --angle: 180deg; }
.tick-7 { --angle: 210deg; }
.tick-8 { --angle: 240deg; }
.tick-9 { --angle: 270deg; }
.tick-10 { --angle: 300deg; }
.tick-11 { --angle: 330deg; }

.dial-hand {
  position: absolute;
  left: calc(50% - 3px);
  bottom: 50%;
  width: 6px;
  height: 35%;
  border-radius: 4px;
  background: var(--orange);
  transform-origin: 50% 100%;
  transform: rotate(0deg);
  transition: transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dial-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 5px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.status-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  max-width: 11ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(56px, 7vw, 108px);
  font-weight: 500;
  line-height: 0.94;
}

.countdown {
  min-height: 1.4em;
  margin: 28px 0 0;
  color: #59635d;
  font-size: clamp(17px, 1.5vw, 22px);
  font-variant-numeric: tabular-nums;
}

.controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.target-control {
  display: flex;
  align-items: center;
  gap: 16px;
}

.target-control label {
  font-size: 14px;
  font-weight: 700;
}

input[type="time"] {
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  outline: none;
  background: #ffffff;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

input[type="time"]:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.quick-times {
  display: flex;
  gap: 8px;
}

button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

button:hover {
  border-color: var(--ink);
  background: #ffffff;
}

@media (max-width: 800px) {
  .app-shell {
    padding: 20px 22px 24px;
  }

  .status-stage {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 36px 0 42px;
  }

  .time-visual {
    justify-content: start;
  }

  .dial {
    width: min(58vw, 300px);
    min-width: 220px;
    box-shadow: 8px 8px 0 var(--green);
  }

  .tick {
    transform-origin: 50% calc((min(58vw, 300px) - 21px) / 2);
  }

  h1 {
    font-size: clamp(52px, 16vw, 82px);
  }

  .controls,
  .target-control {
    align-items: stretch;
    flex-direction: column;
  }

  .target-control {
    gap: 9px;
  }

  .quick-times {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 420px) {
  .quick-times {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dial-hand {
    transition: none;
  }
}
