/* HERE. Flooring questionnaire. Same world as the site: warm black masthead, honey-oak field, one orange chalk line. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("assets/fonts/archivo.woff2") format("woff2"); }

:root {
  --ink: #0e0c0a; --ink-2: #17130e; --ink-3: #2a231b; --oak: #e9cfa6; --oak-2: #dcbe8f; --field: #f7eedf;
  --chalk: #ff972a; --chalk-2: #ffb25c; --cream: #f7eedf; --cream-2: #e7dac5; --muted-dark: #c8b69c;
  --text-oak: #1a130c; --muted-oak: #5c4a33; --line-dark: rgba(255, 255, 255, 0.14); --line-oak: rgba(26, 19, 12, 0.35); --line-oak-soft: rgba(26, 19, 12, 0.14);
  --error: #8f2a12; --error-soft: rgba(143, 42, 18, 0.1);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --top-h: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--oak-2) var(--oak); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--oak); }
::-webkit-scrollbar-thumb { background: var(--oak-2); border-radius: 8px; border: 2px solid var(--oak); }
body { margin: 0; min-height: 100vh; background: var(--oak); color: var(--text-oak); font-family: var(--font); font-size: 1.0625rem; line-height: 1.55; -webkit-font-smoothing: antialiased; caret-color: var(--chalk); accent-color: var(--chalk); }
::selection { background: var(--chalk); color: var(--ink); }
:focus-visible { outline: 2px solid var(--text-oak); outline-offset: 3px; border-radius: 2px; }
.top :focus-visible { outline-color: var(--chalk); }
.wrap { width: min(100% - 2rem, 44rem); margin-inline: auto; }
[hidden] { display: none !important; }

/* Masthead + rail */
.top { position: sticky; top: 0; z-index: 10; background: var(--ink); color: var(--cream); }
.rail-bar { background: var(--ink); color: var(--cream); border-bottom: 1px solid var(--line-dark); }
@media (min-width: 900px) { .rail-bar { position: sticky; top: var(--top-h); z-index: 9; } }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--top-h); }
.logo { height: 20px; width: auto; }
.where { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--cream-2); font-variant-numeric: tabular-nums; text-align: right; }
.rail { position: relative; padding: 0.35rem 0 0.9rem; }
.rail-line { position: absolute; left: 9px; right: 9px; top: calc(0.35rem + 8px); height: 3px; background: var(--ink-3); border-radius: 2px; overflow: hidden; }
.rail-fill { position: absolute; inset: 0; background: var(--chalk); transform-origin: left center; transform: scaleX(0); transition: transform 0.6s var(--ease-out); }
.rail-dots { position: relative; display: flex; justify-content: space-between; margin: 0; padding: 0; list-style: none; }
.rail-dots li { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; width: 0; overflow: visible; }
.rail-dots li .rail-label { margin-top: 12.5px; }
.rail-dots li:first-child { align-items: flex-start; } .rail-dots li:first-child .rail-label { transform: none; }
.rail-dots li:last-child { align-items: flex-end; } .rail-dots li:last-child .rail-label { transform: none; text-align: right; }
.rail-dot { width: 44px; height: 44px; margin: -12.5px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; border-radius: 50%; }
.rail-dot span { width: 19px; height: 19px; border-radius: 50%; background: var(--ink-3); border: 2px solid var(--muted-dark); transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.3s var(--ease-out); }
.rail-dot.is-done span { background: var(--chalk); border-color: var(--chalk); }
.rail-dot.is-current span { background: var(--ink); border: 3px solid var(--chalk); transform: scale(1.2); }
.rail-dot.is-done.is-current span { background: var(--chalk); }
.rail-dot:hover span { border-color: var(--chalk-2); }
.rail-label { display: none; font-size: 0.8rem; font-weight: 600; color: var(--muted-dark); white-space: nowrap; }
.rail-dot.is-current + .rail-label { color: var(--cream); }
@media (min-width: 900px) { .rail-label { display: block; } .rail { padding-bottom: 0.75rem; } }

/* Stage */
.stage { padding: clamp(2rem, 6vw, 4rem) 0 5rem; }
h1 { font-size: clamp(2.4rem, 6.5vw, 3.75rem); font-weight: 800; font-stretch: 112%; letter-spacing: -0.028em; line-height: 0.98; margin: 0 0 1rem; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.5vw, 2.75rem); font-weight: 800; font-stretch: 110%; letter-spacing: -0.02em; line-height: 1.02; margin: 0 0 0.75rem; text-wrap: balance; }
h2:focus { outline: none; }
.dot { display: inline-block; width: 0.26em; height: 0.26em; margin-left: 0.06em; border-radius: 50%; background: var(--chalk); vertical-align: baseline; }
.lede, .note { color: var(--muted-oak); max-width: 58ch; margin: 0 0 2rem; font-size: 1.1rem; }
.note { font-size: 1.0625rem; margin-bottom: 1.5rem; }

.step { animation: arrive 0.4s var(--ease-out) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.q { display: grid; gap: 0.45rem; padding: 1.15rem 0; border-top: 1px solid var(--line-oak-soft); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.row .q { border-top: 0; padding-top: 0; }
label { font-weight: 600; line-height: 1.4; }
.q label:has(.n) { display: grid; grid-template-columns: 1.9rem 1fr; }
label .n { display: inline-block; min-width: 1.9rem; font-weight: 800; font-stretch: 108%; color: var(--muted-oak); font-variant-numeric: tabular-nums; }
.hint { margin: -0.2rem 0 0; padding-left: 1.9rem; color: var(--muted-oak); font-size: 0.95rem; }
input, textarea {
  width: 100%; min-height: 50px; padding: 0.7rem 0.9rem;
  background: var(--field); color: var(--text-oak); border: 1px solid var(--line-oak); border-radius: 4px;
  font: inherit; line-height: 1.45; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { resize: none; min-height: 50px; overflow: hidden; }
input:hover, textarea:hover { border-color: var(--text-oak); }
input:focus, textarea:focus { outline: none; border-color: var(--chalk); box-shadow: 0 0 0 3px rgba(255, 151, 42, 0.35); }
.q.is-invalid input { border-color: var(--error); }
.form-error { margin: 0.75rem 0 0; padding: 0.7rem 0.9rem; border: 1px solid var(--error); border-radius: 4px; background: var(--error-soft); color: var(--error); font-size: 0.95rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-oak-soft); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 50px; padding: 0.85rem 1.5rem; border-radius: 4px; border: 1px solid transparent; background: var(--chalk); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s var(--ease-out); }
.btn:hover { background: var(--chalk-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--text-oak); border-color: var(--line-oak); }
.btn-ghost:hover { background: transparent; border-color: var(--text-oak); }
.btn-link { background: transparent; color: var(--muted-oak); text-decoration: underline; text-underline-offset: 0.18em; padding-inline: 0.5rem; }
.btn-link:hover { background: transparent; color: var(--text-oak); }
.saved { margin-left: auto; font-size: 0.95rem; font-weight: 600; color: var(--muted-oak); }
.saved::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--chalk); margin-right: 0.45rem; vertical-align: 0.1em; opacity: 0; transition: opacity 0.2s ease; }
.saved.is-on::before { opacity: 1; }

/* Review */
.review { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.review-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; min-height: 56px; padding: 0.75rem 0.25rem; border: 0; border-top: 1px solid var(--line-oak-soft); background: transparent; color: var(--text-oak); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.review-row:hover .review-name { color: var(--chalk); }
.review-row .review-name::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-oak); margin-right: 0.7rem; vertical-align: 0.1em; }
.review-row.is-done .review-name::before { background: var(--chalk); }
.review-count { font-weight: 600; color: var(--muted-oak); font-variant-numeric: tabular-nums; font-size: 0.95rem; }

/* Done */
.done { text-align: center; padding: 3rem 0 4rem; animation: arrive 0.5s var(--ease-out) both; }
.done .big { display: block; width: 18px; height: 18px; margin: 0 auto 1.25rem; }
.done p { color: var(--muted-oak); max-width: 46ch; margin: 0 auto 1.5rem; }

.toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); background: var(--ink); color: var(--cream); padding: 0.6rem 1rem; border-radius: 4px; font-weight: 600; font-size: 0.95rem; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; max-width: calc(100% - 2rem); }
.toast.show { opacity: 1; }

@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; }
  .row .q + .q { border-top: 0; }
  .where { font-size: 0.85rem; }
  .nav .btn { flex: 1 1 auto; }
  .saved { flex-basis: 100%; margin-left: 0; text-align: right; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .step, .done { animation: none; }
  .rail-fill, .rail-dot span, .btn, input, textarea, .toast, .saved::before { transition: none; }
}
