/* Suits Hub questionnaire. Paper white, navy ink, and the blue of a Greek office stamp. */
@font-face {
  font-family: "GFS Didot"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/gfs-didot-greek-400-normal.woff2") format("woff2");
  unicode-range: U+0370-03FF, U+1F00-1FFF;
}
@font-face {
  font-family: "GFS Didot"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/gfs-didot-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2010-2027, U+2030-205E, U+20AC;
}
@font-face {
  font-family: "Commissioner"; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url("fonts/commissioner-greek-wght-normal.woff2") format("woff2");
  unicode-range: U+0370-03FF, U+1F00-1FFF;
}
@font-face {
  font-family: "Commissioner"; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url("fonts/commissioner-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2010-2027, U+2030-205E, U+20AC;
}

:root {
  --paper: #F5F6FB;
  --sheet: #FFFFFF;
  --ink: #14172B;
  --ink-soft: #565B78;
  --stamp: #2438B8;
  --stamp-wash: #E3E7FA;
  --rule: #C6CBE4;
  --alert: #A3261C;
  --serif: "GFS Didot", "Didot", Georgia, serif;
  --sans: "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;
  --col: 38rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.noscript { padding: 2rem; }

.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.top, .stage, .bar-inner { width: 100%; max-width: var(--col); margin-inline: auto; }

/* ── header: the file's index tabs ───────────────────────────────────────── */
.top { padding: max(0.9rem, env(safe-area-inset-top)) 1.25rem 0; }
.tabs { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.2rem; }
.tabs li {
  flex: 1 1 0; min-width: 0; height: 1.9rem; display: grid; place-items: center;
  font-family: var(--serif); font-size: 0.95rem; line-height: 1;
  color: var(--ink-soft); border-bottom: 2px solid var(--rule);
}
.tabs li.done { color: var(--stamp); border-bottom-color: var(--stamp); }
.tabs li.now {
  color: var(--sheet); background: var(--stamp); border-bottom-color: var(--stamp);
  border-radius: 3px 3px 0 0;
}
.where { margin: 0.7rem 0 0; font-size: 0.875rem; color: var(--ink-soft); }
.where b { font-weight: 600; color: var(--ink); }

/* ── stage ───────────────────────────────────────────────────────────────── */
.stage { flex: 1 1 auto; padding: 1.75rem 1.25rem 2rem; outline: none; }
.step { animation: in 0.22s ease-out both; }
.step.back { animation-name: in-back; }
@keyframes in { from { opacity: 0; transform: translateX(14px); } }
@keyframes in-back { from { opacity: 0; transform: translateX(-14px); } }

h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 8.5vw, 3rem); line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 6.2vw, 2rem); line-height: 1.22; }
h2:focus, h1:focus { outline: none; }
.hint { margin: 0.75rem 0 0; color: var(--ink-soft); max-width: 34rem; }
.field-area { margin-top: 1.6rem; }

.lede { margin: 1.25rem 0 0; font-size: 1.125rem; max-width: 33rem; }
.terms { margin: 1.5rem 0 0; padding: 0; list-style: none; max-width: 33rem; }
.terms li { padding: 0.8rem 0; border-top: 1px solid var(--rule); }
.terms li:last-child { border-bottom: 1px solid var(--rule); }
.terms strong { font-weight: 600; }
.small { font-size: 0.875rem; color: var(--ink-soft); margin: 1.25rem 0 0; max-width: 33rem; }
.intro-actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* ── choices: the boxes of a paper form, marked with a cross ─────────────── */
.choices { display: grid; gap: 0.55rem; margin: 0; padding: 0; border: 0; }
.choice {
  display: grid; grid-template-columns: auto 1fr; column-gap: 0.85rem; align-items: start;
  padding: 0.85rem 0.95rem; min-height: 3.25rem;
  background: var(--sheet); border: 1.5px solid var(--rule); border-radius: 6px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.choice input[type="checkbox"], .choice input[type="radio"] {
  appearance: none; -webkit-appearance: none; margin: 0.12rem 0 0; flex: none;
  width: 1.3rem; height: 1.3rem; border: 1.5px solid var(--ink); background: var(--sheet);
  border-radius: 3px; display: grid; place-items: center; cursor: pointer;
}
.choice input[type="radio"] { border-radius: 50%; }
.choice input[type="checkbox"]:checked {
  border-color: var(--stamp);
  background:
    linear-gradient(45deg, transparent 44%, var(--stamp) 44% 56%, transparent 56%),
    linear-gradient(-45deg, transparent 44%, var(--stamp) 44% 56%, transparent 56%), var(--sheet);
}
.choice input[type="radio"]:checked { border-color: var(--stamp); box-shadow: inset 0 0 0 4px var(--sheet); background: var(--stamp); }
.choice:has(input:checked) { border-color: var(--stamp); background: var(--stamp-wash); }
.choice:has(input:focus-visible) { outline: 3px solid var(--stamp); outline-offset: 2px; }
.choice .label { line-height: 1.35; padding-top: 0.05rem; }
.choice .extra { grid-column: 2; margin-top: 0.6rem; }

/* ── inputs ──────────────────────────────────────────────────────────────── */
textarea, input[type="text"], input[type="number"] {
  font: inherit; color: var(--ink); width: 100%;
  background: var(--sheet); border: 1.5px solid var(--rule); border-radius: 6px;
  padding: 0.8rem 0.9rem;
}
textarea { min-height: 9.5rem; resize: vertical; line-height: 1.5; display: block; }
textarea:focus, input[type="text"]:focus, input[type="number"]:focus {
  outline: none; border-color: var(--stamp); box-shadow: 0 0 0 3px var(--stamp-wash);
}
::placeholder { color: #8B90AB; opacity: 1; }
.extra input { padding: 0.6rem 0.75rem; }
.note-label, .row label { display: block; font-weight: 500; margin-bottom: 0.4rem; }
.note { margin-top: 1.4rem; }
.rows { display: grid; gap: 1rem; }

.pct { display: grid; gap: 0.5rem; }
.pct .line {
  display: grid; grid-template-columns: 1fr 5.6rem; gap: 0.75rem; align-items: center;
  padding: 0.5rem 0; border-bottom: 1px solid var(--rule);
}
.pct .line label { line-height: 1.3; }
.pct .num { position: relative; }
.pct .num input { padding-right: 1.9rem; text-align: right; font-variant-numeric: tabular-nums; }
.pct .num::after { content: "%"; position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.pct input::-webkit-outer-spin-button, .pct input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pct input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.pct .other-name { margin-top: 0.25rem; }
.sum { margin: 0.6rem 0 0; font-size: 0.9375rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.sum.over { color: var(--alert); }

/* ── bottom bar ──────────────────────────────────────────────────────────── */
.bar {
  position: sticky; bottom: 0; background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px); border-top: 1px solid var(--rule);
  padding: 0.75rem 1.25rem max(0.75rem, env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; gap: 0.75rem;
  width: 100%; max-width: var(--col); margin-inline: auto;
}
.btn {
  font: inherit; font-weight: 600; border-radius: 6px; cursor: pointer;
  min-height: 3rem; padding: 0.7rem 1.4rem; border: 1.5px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.btn.primary { background: var(--stamp); color: #fff; min-width: 9rem; }
.btn.primary:active { background: #1B2B94; }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--stamp); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.btn:focus-visible { outline: 3px solid var(--stamp); outline-offset: 3px; }
.btn[disabled] { opacity: 0.55; cursor: default; }

/* ── last screens ────────────────────────────────────────────────────────── */
.missing { margin: 1.25rem 0 0; max-width: 33rem; }
.missing p { margin: 0; }
.missing .nums { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.missing .nums button {
  font: inherit; font-variant-numeric: tabular-nums; min-width: 2.75rem; min-height: 2.75rem;
  background: var(--sheet); border: 1.5px solid var(--rule); border-radius: 6px; color: var(--ink); cursor: pointer;
}
.missing .nums button:focus-visible { outline: 3px solid var(--stamp); outline-offset: 2px; }
.error {
  margin: 1.25rem 0 0; padding: 0.9rem 1rem; max-width: 33rem;
  border-left: 3px solid var(--alert); background: #FBECEA; color: #5E150F;
}
.error p { margin: 0; }
.error .btn { margin-top: 0.75rem; }
.send-actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.stamp {
  width: min(62vw, 15rem); height: auto; display: block; margin: 0 0 1.75rem -0.25rem;
  color: var(--stamp); transform: rotate(-9deg); transform-origin: 50% 50%;
  animation: stamp 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) 0.15s both;
}
@keyframes stamp {
  0% { opacity: 0; transform: rotate(-2deg) scale(1.9); }
  60% { opacity: 1; transform: rotate(-9deg) scale(0.96); }
  100% { opacity: 0.92; transform: rotate(-9deg) scale(1); }
}

@media (min-width: 48rem) {
  .top { padding-top: 2.5rem; }
  .stage { padding-top: 3rem; }
  .bar { border: 0; background: none; backdrop-filter: none; padding-bottom: 2.5rem; justify-content: flex-start; flex-direction: row-reverse; }
  .choice:hover { border-color: var(--stamp); }
}
@media (prefers-reduced-motion: reduce) {
  .step, .stamp { animation: none; }
  .stamp { opacity: 0.92; }
}
