:root {
  --ink: #1c1814;
  --muted: #6f675e;
  --line: rgba(28, 24, 20, 0.1);
  --paper: #fffcf7;
  --cream: #f4eee6;
  --coral: #e85d2c;
  --coral-deep: #c94b1f;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Sora", "Avenir Next", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--sans);
  background: var(--cream);
}

body {
  background-image:
    radial-gradient(1200px 480px at 80% -8%, rgba(232, 93, 44, 0.09), transparent 55%),
    radial-gradient(900px 420px at -10% 100%, rgba(28, 24, 20, 0.05), transparent 50%);
}

.page {
  width: min(640px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 calc(48px + env(safe-area-inset-bottom));
}

.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}

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

.mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--coral);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  font-family: Georgia, serif;
}

.word {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.04em;
}

.deadline {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--coral-deep);
}

.schoolchip {
  display: inline-flex;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.7);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schoolchip b { color: var(--ink); font-weight: 600; }

.progress { margin: 0 0 28px; }
.progress-meta {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.bar {
  height: 2px;
  background: rgba(28, 24, 20, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--coral);
  border-radius: inherit;
  transition: width 0.35s ease;
}

.kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 0 12px;
}

h1 { font-size: clamp(34px, 7vw, 46px); }
h2 { font-size: clamp(28px, 5.5vw, 36px); }

.lede {
  margin: 0 0 32px;
  max-width: 36rem;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
}

.panel { display: none; animation: rise 0.35s ease; }
.panel.is-on { display: block; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.stack { display: grid; gap: 18px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

label.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
}

label.field em {
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  font: 400 16px/1.4 var(--sans);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea { min-height: 108px; resize: vertical; }

select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%231c1814' d='M1.2 1.2L6 6l4.8-4.8' stroke='%231c1814' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}

select:invalid { color: var(--muted); }
select option { color: var(--ink); }

input:focus, select:focus, textarea:focus {
  border-color: rgba(232, 93, 44, 0.55);
  box-shadow: 0 0 0 4px rgba(232, 93, 44, 0.12);
}

.ask {
  margin: 4px 0 0;
  padding: 0;
  border: 0;
}

.ask legend {
  padding: 0;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip, .pick { position: relative; }

.chip input, .pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip span, .pick span {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  font-weight: 500;
}

.chip span {
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
}

.pick span {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 78px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
}

.pick em {
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}

.chip input:focus-visible + span,
.pick input:focus-visible + span {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.chip input:checked + span,
.pick input:checked + span {
  border-color: var(--coral);
  background: #fff4ee;
  box-shadow: inset 0 0 0 1px var(--coral);
}

.domains {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.nav {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 36px;
}

.nav.is-split {
  justify-content: space-between;
}

button.btn, button.ghost {
  appearance: none;
  border: 0;
  cursor: pointer;
  min-height: 48px;
  padding: 0 22px;
  font: 600 15px/1 var(--sans);
  border-radius: 999px;
  touch-action: manipulation;
}

button.btn {
  background: var(--coral);
  color: #fff;
}

button.btn:hover { background: var(--coral-deep); }
button.btn:disabled { opacity: 0.5; cursor: wait; }

button.ghost {
  background: transparent;
  color: var(--ink);
  padding-left: 4px;
}

button.ghost:hover { color: var(--muted); }

.err {
  display: none;
  margin: 14px 0 0;
  color: #9b2c2c;
  font-size: 14px;
  font-weight: 600;
}

.err.is-on { display: block; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.fine {
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted);
}

.fine a { color: var(--ink); }

@media (max-width: 640px) {
  .page { width: calc(100% - 28px); padding-top: 20px; }
  .pair, .domains { grid-template-columns: 1fr; }
  .mast { margin-bottom: 24px; }
  .lede { margin-bottom: 24px; }
  .nav { margin-top: 28px; }
}
