/* APC design system, form edition. Tokens mirror templates/report/_ds. */
@font-face {
  font-family: 'Inter';
  src: url('assets/Inter.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('assets/Lora.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --green: #93b068;
  --green-600: #7c9a53;
  --green-700: #67853f;
  --green-100: #e9efdf;
  --orange: #d6935b;
  --ink: #2d2d2d;
  --slate: #646d76;
  --mid: #7a7a72;
  --line: #e8e5dd;
  --sand: #faf8f5;
  --white: #ffffff;
  --ui: 'Inter', Arial, Helvetica, sans-serif;
  --body: 'Lora', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }
body {
  background: var(--sand);
  font-family: var(--ui);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.top {
  width: 100%;
  max-width: 680px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 0;
}
.top img { height: 26px; width: auto; }
.top .tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--slate);
}

#app {
  width: 100%;
  max-width: 680px;
  padding: 12px 24px 48px;
}

.progress {
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  margin: 10px 0 18px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(20, 20, 19, 0.05);
  padding: 40px 44px 34px;
}
.card.center { text-align: center; }

@keyframes slide-right { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes slide-left { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.enter-right { animation: slide-right 0.28s ease; }
.enter-left { animation: slide-left 0.28s ease; }

.kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
}
.title {
  font-family: var(--ui);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.15;
  margin-bottom: 12px;
}
.lede {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 52ch;
  margin: 0 auto 18px;
}
.card:not(.center) .lede { margin-left: 0; }
.q-label {
  font-family: var(--ui);
  font-weight: 650;
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 6px;
  max-width: 56ch;
}
.sublabel {
  font-family: var(--body);
  font-size: 14px;
  color: var(--mid);
  margin-bottom: 6px;
}

.tiles { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.tile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  font-family: var(--ui);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 16px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.tile:hover { border-color: var(--green); }
.tile.selected { background: var(--green-100); border-color: var(--green); }
.tile-check, .tile-dot {
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--line);
  background: var(--white);
  transition: all 0.12s;
}
.tile-check { border-radius: 4px; }
.tile-dot { border-radius: 50%; }
.tile.selected .tile-check,
.tile.selected .tile-dot {
  background: var(--green);
  border-color: var(--green);
  box-shadow: inset 0 0 0 3px var(--white);
}

.input {
  width: 100%;
  font-family: var(--ui);
  font-size: 17px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 16px;
  margin-top: 14px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-100); }
.input::placeholder { color: #b8b5ad; }
.select { appearance: auto; }
.area { resize: vertical; font-family: var(--body); }

.money-wrap { position: relative; }
.money-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(calc(-50% + 7px));
  font-family: var(--ui);
  font-size: 17px;
  color: var(--mid);
}
.money { padding-left: 34px; }

.addr-row { display: flex; gap: 10px; }
.addr-row .half { flex: 2; }
.addr-row .quarter { flex: 1; }

.error {
  font-family: var(--ui);
  font-size: 13px;
  color: #c0563f;
  margin-top: 10px;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
}
.btn {
  display: inline-block;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 15.5px;
  color: #fff;
  background: var(--green);
  border: none;
  border-radius: 7px;
  padding: 13px 30px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s;
}
.btn:hover { background: var(--green-600); }
.btn-back {
  font-family: var(--ui);
  font-size: 14px;
  color: var(--slate);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
}
.btn-back:hover { color: var(--ink); }

.fine {
  font-family: var(--ui);
  font-size: 12px;
  color: var(--mid);
  margin-top: 16px;
}

.check {
  width: 58px;
  height: 58px;
  margin: 4px auto 18px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 30px;
  line-height: 58px;
}
.rule { border: none; border-top: 1px solid var(--line); margin: 22px auto; width: 70%; }

.spinner {
  width: 34px;
  height: 34px;
  margin: 10px auto 18px;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* Desktop: the one-question card earns real presence instead of floating
   small on the cream field. Mobile keeps the compact layout below. */
@media (min-width: 900px) {
  .top, #app { max-width: 860px; }
  #app { padding-top: 5vh; }
  .top img { height: 30px; }
  .top .tag { font-size: 11px; }
  .card { padding: 60px 72px 48px; border-radius: 14px; box-shadow: 0 6px 28px rgba(20, 20, 19, 0.07); }
  .title { font-size: 36px; }
  .lede { font-size: 18px; }
  .q-label { font-size: 28px; margin-bottom: 10px; }
  .sublabel { font-size: 16px; }
  .tiles { gap: 12px; margin-top: 24px; }
  .tile { font-size: 17px; padding: 16px 20px; border-radius: 10px; }
  .tile-check, .tile-dot { width: 20px; height: 20px; }
  .input { font-size: 18px; padding: 15px 18px; margin-top: 18px; }
  .money-prefix { font-size: 18px; transform: translateY(calc(-50% + 9px)); }
  .actions { margin-top: 30px; }
  .btn { font-size: 16.5px; padding: 15px 36px; border-radius: 8px; }
  .progress { margin: 14px 0 24px; }
  .fine { font-size: 13px; }
}

@media (max-width: 560px) {
  .card { padding: 26px 20px 24px; border-radius: 8px; }
  .title { font-size: 24px; }
  .q-label { font-size: 19px; }
  .addr-row { flex-wrap: wrap; }
  /* City gets its own full line; State and Zip share the next one. */
  .addr-row .half { flex: 1 1 100%; }
  .addr-row .quarter { flex: 1 1 40%; }
  .actions { flex-direction: column-reverse; gap: 10px; align-items: stretch; }
  .actions .btn { width: 100%; text-align: center; }
  .actions .btn-back { align-self: flex-start; }
}
