/* ── Product Feedback Survey — industrial-design spec sheet ─────────
   Graph-paper white with light-blue grid, numbered spec cards with
   stamped part numbers, marker-orange selections, tolerance-chart
   matrix, draggable part-tag ranking, tabular grotesque type. */

:root {
  --paper: #fdfdfc;
  --grid: rgba(66, 133, 190, 0.1);
  --grid-major: rgba(66, 133, 190, 0.18);
  --ink: #22252a;
  --ink-soft: #79808a;
  --orange: #f26f21;
  --orange-soft: #fde5d6;
  --line: #dde1e6;
  --blue-note: #4285be;
  --err: #cc3b23;
  --sans: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

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

.hidden { display: none !important; }

body {
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--paper);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  min-height: 100vh;
}

.sheet { min-height: 100vh; display: flex; flex-direction: column; }

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 24px; flex: 1 0 auto; }

.mono { font-family: var(--mono); }

/* ── Header ───────────────────────────────────────────────────────── */
.head { text-align: center; padding: 58px 24px 4px; }

.doc-no {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--blue-note);
  margin-bottom: 16px;
}

.head h1 {
  font-weight: 700;
  font-size: clamp(2rem, 7.5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.head .sub { margin: 14px auto 0; max-width: 440px; color: var(--ink-soft); }

.blueprint {
  display: block;
  width: 100%;
  max-width: 320px;
  height: 110px;
  margin: 24px auto 0;
  color: var(--blue-note);
}

.dim-text {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.2em;
  fill: var(--blue-note);
}

/* ── Card ─────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px 30px 26px;
  margin-top: 28px;
  box-shadow: 0 14px 34px rgba(34, 37, 42, 0.08);
}

.progress-track {
  height: 5px;
  background: var(--orange-soft);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--orange);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.progress-text {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

/* ── Question blocks ──────────────────────────────────────────────── */
.q-block {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 20px 20px;
  margin-bottom: 18px;
}

.part-no {
  position: absolute;
  top: -9px;
  right: 14px;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--blue-note);
  background: #fff;
  padding: 0 8px;
}

.q-text { font-weight: 700; font-size: 1.08rem; line-height: 1.4; margin-bottom: 4px; }

.q-desc { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 10px; }

/* Rating (numbered chips) */
.rating-row { display: flex; gap: 8px; margin-top: 12px; }

.rate-chip {
  flex: 1;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 4px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.13s ease;
}

.rate-chip:hover { border-color: var(--orange); }

.rate-chip.is-selected {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  transform: translateY(-2px);
}

.rating-caption { font-size: 0.82rem; font-weight: 600; color: var(--orange); margin-top: 8px; min-height: 1.3em; }

/* Matrix */
.matrix { width: 100%; border-collapse: collapse; margin-top: 12px; }

.matrix th {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.66rem;
  color: var(--ink-soft);
  padding: 6px 4px;
  text-align: center;
}

.matrix td { padding: 8px 4px; border-top: 1px solid var(--line); text-align: center; }

.matrix td.row-label {
  text-align: left;
  font-weight: 600;
  font-size: 0.88rem;
  padding-right: 10px;
}

.cell-radio {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: all 0.12s ease;
  display: inline-block;
  padding: 0;
}

.cell-radio:hover { border-color: var(--orange); }
.cell-radio.is-selected { background: var(--orange); border-color: var(--orange); box-shadow: inset 0 0 0 3.5px #fff; }

/* Ranking */
.rank-list { list-style: none; margin-top: 12px; display: grid; gap: 8px; }

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 11px 14px;
}

.rank-pos {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--orange);
  min-width: 2ch;
}

.rank-label { flex: 1; font-weight: 600; font-size: 0.92rem; }

.rank-controls { display: flex; gap: 6px; }

.rank-btn {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.12s ease;
  line-height: 1;
}

.rank-btn:hover:not(:disabled) { border-color: var(--orange); color: var(--orange); }
.rank-btn:disabled { opacity: 0.3; cursor: default; }

/* Radio options */
.opt-list { display: grid; gap: 8px; margin-top: 12px; }

.opt-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  padding: 13px 15px;
  cursor: pointer;
  transition: all 0.13s ease;
}

.opt-btn:hover { border-color: var(--orange); }

.opt-btn .opt-dot {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-radius: 50%;
  transition: all 0.12s ease;
}

.opt-btn.is-selected { border-color: var(--orange); background: var(--orange-soft); }
.opt-btn.is-selected .opt-dot { background: var(--orange); border-color: var(--orange); box-shadow: inset 0 0 0 3px #fff; }

/* Text inputs */
textarea, input[type="text"], input[type="email"] {
  width: 100%;
  padding: 13px 15px;
  font-family: var(--sans);
  font-size: 0.98rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  transition: border-color 0.15s ease;
  margin-top: 10px;
}

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

textarea:focus, input:focus { outline: none; border-color: var(--orange); }
input.error, textarea.error { border-color: var(--err); }
textarea::placeholder, input::placeholder { color: #b4bac2; }

/* ── Nav ──────────────────────────────────────────────────────────── */
.nav-row { display: flex; gap: 12px; justify-content: flex-end; margin-top: 6px; }

.btn {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--orange);
  border: none;
  border-radius: 6px;
  padding: 14px 34px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
  box-shadow: 0 5px 16px rgba(242, 111, 33, 0.3);
}

.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(242, 111, 33, 0.4); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--blue-note); outline-offset: 3px; }

.btn-ghost {
  background: #fff;
  color: var(--ink-soft);
  border: 1.5px solid var(--line);
  box-shadow: none;
}

.btn-ghost:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-soft); box-shadow: none; }

.form-error { color: var(--err); font-weight: 700; text-align: center; margin-top: 14px; }

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
  margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Email step */
.email-step label { display: block; font-weight: 700; font-size: 1.08rem; margin-bottom: 4px; }

.email-note { color: var(--ink-soft); font-size: 0.85rem; }

/* ── Thanks ───────────────────────────────────────────────────────── */
.thanks { text-align: center; padding: 44px 30px; }

.stamp {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  color: var(--orange);
  border: 3px solid var(--orange);
  border-radius: 4px;
  padding: 5px 16px 5px 20px;
  transform: rotate(-5deg);
  margin-bottom: 18px;
}

.thanks h2 { font-weight: 700; font-size: 1.7rem; }

.thanks p { color: var(--ink-soft); margin-top: 10px; max-width: 400px; margin-left: auto; margin-right: auto; }

/* ── Footer ───────────────────────────────────────────────────────── */
.foot {
  text-align: center;
  padding: 34px 20px 28px;
  color: var(--ink-soft);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
}

#wbx-powered-by-slot { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .card { padding: 24px 18px; }
  .rating-row { flex-wrap: wrap; }
  .rate-chip { min-width: 52px; }
  .matrix td.row-label { font-size: 0.78rem; }
}
