:root {
  color-scheme: light;
  --paper: #f7faf6;
  --ink: #181b1f;
  --soft-ink: #4a525c;
  --line: #d7ded6;
  --panel: #ffffff;
  --panel-deep: #eef4ef;
  --mint: #78d9bc;
  --mint-deep: #147b68;
  --coral: #ff765f;
  --blue: #385fc7;
  --gold: #e7b73f;
  --shadow: 0 24px 70px rgba(24, 27, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(24, 27, 31, 0.05) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, #f7faf6 0%, #edf5ee 100%);
  color: var(--ink);
  font-family: "Aptos", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(320px, 1.22fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.intro {
  position: sticky;
  top: 32px;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kicker,
.section-label {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.93;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.lede,
.step-heading p {
  max-width: 58ch;
  color: var(--soft-ink);
  font-size: 1.05rem;
  line-height: 1.55;
}

.signal-panel {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 1.65;
  margin-bottom: 32px;
  border: 1px solid #1f262c;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(120, 217, 188, 0.34), transparent 34%),
    linear-gradient(160deg, #1a2025 0%, #242b31 64%, #11161b 100%);
  box-shadow: var(--shadow);
}

.signal-panel::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(247, 250, 246, 0.18);
  border-radius: 4px;
}

.dial {
  position: absolute;
  width: 62px;
  aspect-ratio: 1;
  border: 2px solid rgba(247, 250, 246, 0.35);
  border-radius: 50%;
}

.dial::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(231, 183, 63, 0.7);
}

.dial-one {
  left: 30px;
  top: 30px;
}

.dial-two {
  right: 34px;
  bottom: 30px;
}

.trace {
  position: absolute;
  height: 3px;
  border-radius: 999px;
  background: var(--mint);
  transform-origin: left center;
  animation: blink 3.6s ease-in-out infinite;
}

.trace-a {
  left: 96px;
  top: 60px;
  width: 170px;
  transform: rotate(9deg);
}

.trace-b {
  left: 48px;
  top: 144px;
  width: 230px;
  background: var(--coral);
  transform: rotate(-8deg);
  animation-delay: 0.8s;
}

.trace-c {
  right: 82px;
  bottom: 60px;
  width: 120px;
  background: #89a2ff;
  transform: rotate(20deg);
  animation-delay: 1.4s;
}

.console-grid {
  position: absolute;
  right: 34px;
  top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 16px);
  gap: 8px;
}

.console-grid span {
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(247, 250, 246, 0.22);
}

.console-grid span:nth-child(3n) {
  background: var(--mint);
}

.progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.progress-step {
  min-width: 76px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft-ink);
  background: rgba(255, 255, 255, 0.66);
  font-size: 0.9rem;
  font-weight: 750;
  text-align: center;
}

.progress-step.is-active {
  border-color: var(--mint-deep);
  color: #063f35;
  background: rgba(120, 217, 188, 0.32);
}

.workspace {
  display: grid;
  gap: 16px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 34px);
}

.step {
  display: none;
}

.step.is-current {
  display: block;
}

.step-heading {
  margin-bottom: 24px;
}

.identity-row,
.prompt-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

label span,
legend {
  display: block;
  margin-bottom: 7px;
  color: #2d343b;
  font-size: 0.94rem;
  font-weight: 750;
}

input[type="text"],
input:not([type]),
textarea {
  width: 100%;
  border: 1px solid #c7d2ca;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

input:focus,
textarea:focus,
button:focus-visible,
.slot:focus-within {
  outline: 3px solid rgba(56, 95, 199, 0.28);
  outline-offset: 2px;
}

.slot-grid {
  display: grid;
  grid-template-columns: minmax(92px, 0.9fr) repeat(5, minmax(72px, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}

.grid-corner,
.hour-head,
.day-head {
  min-height: 46px;
  display: grid;
  place-items: center;
  color: var(--soft-ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.day-head {
  justify-content: start;
  color: var(--ink);
}

.slot {
  position: relative;
  min-height: 70px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd7cf;
  border-radius: 6px;
  background: var(--panel-deep);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.slot:hover {
  transform: translateY(-1px);
  border-color: #9ab7aa;
}

.slot input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.slot span {
  width: 100%;
  margin: 0;
  padding: 12px 8px 18px;
  color: #2f383f;
  font-size: 0.78rem;
  line-height: 1.15;
  text-align: center;
}

.slot:has(input:checked) {
  border-color: var(--mint-deep);
  background: rgba(120, 217, 188, 0.32);
}

.favorite {
  position: absolute;
  right: 4px;
  bottom: 2px;
  width: 26px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #6c747c;
  font-size: 1rem;
  line-height: 1;
}

.favorite.is-picked {
  color: #9a6500;
}

.choice-block,
.mission-grid {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.choice-block {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-block legend,
.mission-grid legend {
  width: 100%;
}

.choice-block label,
.mission-grid label {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #cbd7cf;
  border-radius: 6px;
  background: var(--paper);
  padding: 12px;
}

.choice-block span,
.mission-grid span {
  margin: 0;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.actions.split {
  justify-content: space-between;
}

.primary,
.secondary {
  min-height: 44px;
  border-radius: 6px;
  padding: 0 18px;
  font-weight: 850;
}

.primary {
  border: 1px solid #0d5749;
  background: #116f5d;
  color: #fff;
}

.secondary {
  border: 1px solid #c7d2ca;
  background: #fff;
  color: var(--ink);
}

.secondary.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.9rem;
}

.status {
  min-height: 24px;
  color: #9a3f31;
  font-weight: 750;
}

.preview[hidden],
form[hidden] {
  display: none;
}

.starter-card {
  margin: 18px 0;
  border-left: 5px solid var(--coral);
  border-radius: 6px;
  background: #fff7f4;
  padding: 18px;
}

.starter-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.starter-card p {
  margin-bottom: 8px;
  color: var(--soft-ink);
  font-weight: 750;
}

.starter-card-head p {
  margin-bottom: 0;
}

blockquote {
  margin: 0;
  white-space: pre-wrap;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
}

.notice-card {
  margin-top: 18px;
  border: 1px solid #cbd7cf;
  border-radius: 8px;
  background: var(--paper);
  padding: 18px;
}

.notice-card h3 {
  margin-bottom: 12px;
}

.notice-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--soft-ink);
  line-height: 1.55;
}

.results-shell {
  width: min(1000px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0;
  display: grid;
  gap: 20px;
}

.results-shell h1 {
  max-width: none;
  font-size: clamp(2.3rem, 6vw, 4.5rem);
}

.results-list,
.response-list {
  display: grid;
  gap: 10px;
}

.result-row,
.response-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  padding: 14px;
}

.result-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
}

.result-row.best {
  border-color: var(--mint-deep);
  background: rgba(120, 217, 188, 0.25);
}

.result-row small {
  color: var(--soft-ink);
}

.response-item p {
  margin-bottom: 8px;
  color: var(--soft-ink);
}

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

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .intro {
    position: static;
    min-height: 0;
  }

  h1 {
    max-width: 13ch;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 18px 0 28px;
    gap: 18px;
  }

  .signal-panel {
    width: 100%;
    max-width: 280px;
    margin-bottom: 18px;
  }

  h1 {
    max-width: 12ch;
    margin-bottom: 12px;
    font-size: 2.65rem;
    line-height: 0.96;
  }

  .lede,
  .step-heading p {
    font-size: 1rem;
  }

  .card {
    padding: 18px;
  }

  .identity-row,
  .prompt-row,
  .mission-grid {
    grid-template-columns: 1fr;
  }

  .slot-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .grid-corner,
  .hour-head {
    display: none;
  }

  .day-head {
    min-height: auto;
    justify-content: start;
    margin-top: 8px;
    padding: 8px 0 2px;
    color: var(--blue);
    font-size: 0.78rem;
    text-transform: uppercase;
  }

  .slot {
    min-height: 54px;
    justify-items: start;
  }

  .slot span {
    padding: 12px 44px 12px 12px;
    font-size: 0.95rem;
    text-align: left;
  }

  .favorite {
    right: 8px;
    bottom: 50%;
    transform: translateY(50%);
    width: 32px;
    height: 32px;
    font-size: 1.18rem;
  }

  .choice-block {
    display: grid;
  }

  .actions,
  .actions.split {
    display: grid;
  }

  .primary,
  .secondary {
    width: 100%;
  }

  .starter-card-head {
    display: grid;
  }

  .result-row {
    grid-template-columns: 1fr;
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.42;
  }
  50% {
    opacity: 1;
  }
}
