/* =========================================================
   Art to Heritage — 顧客ヒアリングフォーム
   洗練・上品・ヘリテージを意識したカラーパレット
   ========================================================= */

:root {
  /* color tokens */
  --ink:       #1A2238;   /* deep navy ink */
  --ink-soft:  #2D3552;
  --gold:      #B8935A;   /* heritage gold */
  --gold-soft: #D4B888;
  --gold-bg:   #F4ECDB;
  --cream:     #F8F4ED;   /* page bg */
  --ivory:     #FBF8F2;   /* card bg */
  --paper:     #FFFFFF;
  --line:      #E5DDD0;
  --line-soft: #EFE9DE;
  --text:      #1A2238;
  --text-mid:  #5A5F73;
  --text-mute: #8B8F9F;
  --error:     #A03F3F;
  --success:   #4A6741;

  /* typography */
  --font-serif: "Noto Serif JP", "Cormorant Garamond", "Yu Mincho", serif;
  --font-sans:  "Noto Sans JP", "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-deco:  "Cormorant Garamond", "Noto Serif JP", serif;

  /* layout */
  --max:   1180px;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --radius: 4px;
  --shadow-sm: 0 1px 2px rgba(26,34,56,.04), 0 1px 1px rgba(26,34,56,.03);
  --shadow-md: 0 6px 24px -8px rgba(26,34,56,.12), 0 2px 8px rgba(26,34,56,.04);
  --shadow-lg: 0 30px 60px -30px rgba(26,34,56,.18), 0 8px 24px rgba(26,34,56,.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: .015em;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-soft);
  transition: color .25s, border-color .25s;
}
a:hover { color: var(--gold); border-color: var(--gold); }

/* ============ HEADER ============ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.92);
}
.brand { display: flex; align-items: center; gap: .9rem; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; color: var(--gold); }


.brand-jp {
  font-family: var(--font-serif);
  font-size: .68rem;
  color: var(--text-mute);
  letter-spacing: .12em;
  margin-top: 2px;
}
.header-meta {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  font-size: .75rem;
  color: var(--text-mute);
}
.header-meta-label { letter-spacing: .15em; }
.header-meta-value {
  font-family: var(--font-deco);
  font-size: 1rem;
  font-style: italic;
  color: var(--gold);
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}
.brand-jp {
  font-size: .68rem;
  letter-spacing: .1em;
  opacity: .82;
  font-family: var(--font-sans);
  white-space: nowrap;
}

/* ============ HERO ============ */
.hero {
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(2rem, 5vw, 3rem);
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(184,147,90,.06), transparent 60%),
    var(--cream);
  border-bottom: 1px solid var(--line-soft);
}
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-eyebrow {
  font-family: var(--font-deco);
  font-style: italic;
  font-size: .95rem;
  letter-spacing: .2em;
  color: var(--gold);
  margin: 0 0 1.25rem;
  text-transform: lowercase;
}
.hero-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 4.6vw, 2.6rem);
  line-height: 1.55;
  letter-spacing: .04em;
  color: var(--ink);
  margin: 0 0 1.5rem;
}
.hero-desc {
  color: var(--text-mid);
  font-size: .94rem;
  line-height: 2;
  margin: 0 0 2.5rem;
}
.hero-divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto;
  position: relative;
}
.hero-divider::before, .hero-divider::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  background: var(--cream);
}
.hero-divider::before { left: -8px; }
.hero-divider::after  { right: -8px; }

.pc-only { display: inline; }
@media (max-width: 720px) { .pc-only { display: none; } }

/* ============ MAIN LAYOUT ============ */
.main {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) var(--gutter) clamp(3rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 960px) {
  .main { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ============ PROGRESS ============ */
.progress {
  position: sticky;
  top: calc(72px + 1.5rem);
}
.progress-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.progress-list::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 13px;
  width: 1px;
  background: var(--line);
}
.progress-step {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  padding: .5rem 0;
  position: relative;
  cursor: default;
}
.progress-num {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--cream);
  font-family: var(--font-deco);
  font-style: italic;
  font-size: .9rem;
  color: var(--text-mute);
  transition: all .35s ease;
  z-index: 1;
}
.progress-label {
  font-family: var(--font-serif);
  font-size: .85rem;
  color: var(--text-mute);
  padding-top: 2px;
  transition: color .35s ease;
  letter-spacing: .05em;
}
.progress-step.is-active .progress-num {
  background: var(--ink);
  color: var(--gold-soft);
  border-color: var(--ink);
}
.progress-step.is-active .progress-label {
  color: var(--ink);
  font-weight: 500;
}
.progress-step.is-done .progress-num {
  background: var(--gold);
  color: var(--paper);
  border-color: var(--gold);
}
.progress-step.is-done .progress-label { color: var(--text); }

@media (max-width: 960px) {
  .progress {
    position: static;
    padding: 1rem 1.25rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }
  .progress-list { display: flex; justify-content: space-between; gap: .5rem; }
  .progress-list::before { display: none; }
  .progress-step { flex-direction: column; align-items: center; text-align: center; gap: .35rem; flex: 1; }
  .progress-label { font-size: .72rem; padding-top: 0; }
}

/* ============ FORM ============ */
.form { min-width: 0; }

.section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: var(--shadow-md);
  animation: sectionIn .5s ease;
}
@keyframes sectionIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.section[hidden] { display: none; }

.section-head {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.section-head::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 48px;
  height: 1px;
  background: var(--gold);
}
.section-num {
  display: inline-block;
  font-family: var(--font-deco);
  font-style: italic;
  font-size: .85rem;
  letter-spacing: .25em;
  color: var(--gold);
  text-transform: lowercase;
  margin-bottom: .75rem;
}
.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin: 0 0 .5rem;
  letter-spacing: .04em;
  color: var(--ink);
}
.section-sub {
  font-size: .88rem;
  color: var(--text-mid);
  margin: 0;
}

/* ============ QUESTION ============ */
.q {
  border: none;
  padding: 0;
  margin: 0 0 2.5rem;
}
.q:last-of-type { margin-bottom: 1rem; }
.q-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .65rem;
  padding: 0;
  margin: 0 0 1.25rem;
}
.q-index {
  font-family: var(--font-deco);
  font-style: italic;
  font-size: .95rem;
  color: var(--gold);
  letter-spacing: .05em;
  min-width: 1.5rem;
}
.q-text {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.08rem;
  color: var(--ink);
  letter-spacing: .03em;
  flex: 1;
  min-width: 0;
}
.q-tag {
  font-size: .68rem;
  letter-spacing: .12em;
  color: var(--text-mute);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 2px;
}
.q-req {
  font-size: .68rem;
  letter-spacing: .12em;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  background: var(--gold-bg);
  padding: 2px 8px;
  border-radius: 2px;
}

.q.is-invalid .q-text { color: var(--error); }
.q-error {
  margin: .85rem 0 0;
  font-size: .8rem;
  color: var(--error);
  letter-spacing: .02em;
}

/* ============ CHOICES ============ */
.choices { display: grid; gap: .55rem; }
.choices-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.choices-row  { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.choice {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ivory);
  cursor: pointer;
  font-size: .92rem;
  color: var(--text);
  transition: all .2s ease;
  position: relative;
  line-height: 1.4;
}
.choice:hover {
  border-color: var(--gold-soft);
  background: var(--paper);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  position: relative;
  padding-left: 28px;
  flex: 1;
}
.choice span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  transition: all .2s ease;
}
/* radio = circle */
.choice input[type="radio"] + span::before { border-radius: 50%; }
/* checkbox = square */
.choice input[type="checkbox"] + span::before { border-radius: 3px; }

.choice input:checked + span::before {
  border-color: var(--gold);
  background: var(--gold);
}
.choice input[type="radio"]:checked + span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--paper);
}
.choice input[type="checkbox"]:checked + span::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 10px;
  height: 5px;
  border-left: 1.5px solid var(--paper);
  border-bottom: 1.5px solid var(--paper);
  transform: translateY(-70%) rotate(-45deg);
}
.choice input:focus-visible + span::before {
  outline: 2px solid var(--gold-soft);
  outline-offset: 2px;
}
.choice:has(input:checked) {
  border-color: var(--gold);
  background: var(--gold-bg);
}

/* other input */
.choice-other {
  flex-wrap: wrap;
  align-items: center;
}
.choice-other > span { flex: 0 0 auto; }
.other-input {
  position: static !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  flex: 1 1 100%;
  width: 100%;
  margin-top: .55rem;
  margin-left: 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-family: inherit;
  font-size: .92rem;
  padding: .4rem .25rem;
  color: var(--text);
  outline: none;
  transition: border-color .25s;
}
.other-input:focus { border-color: var(--gold); }
.other-input:disabled { opacity: .4; }


/* ============ TEXT INPUT (full-width) ============ */
.text-input {
  width: 100%;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  transition: border-color .25s, box-shadow .25s;
  box-sizing: border-box;
}
.text-input:hover { border-color: var(--gold); }
.text-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 147, 90, .15);
}
.text-input::placeholder { color: #b5b1a8; }

/* ============ GRID TABLE ============ */
.grid-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ivory);
  -webkit-overflow-scrolling: touch;
}
.grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  min-width: 580px;
}
.grid-table th, .grid-table td {
  padding: .9rem .6rem;
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
}
.grid-table th { font-weight: 500; }
.grid-table thead th {
  background: var(--paper);
  font-family: var(--font-serif);
  font-size: .82rem;
  color: var(--ink);
  letter-spacing: .02em;
  border-bottom: 1px solid var(--line);
}
.grid-table tbody th {
  text-align: left;
  font-family: var(--font-serif);
  color: var(--ink);
  background: var(--paper);
  padding-left: 1rem;
  white-space: nowrap;
}
.grid-row-head { text-align: left !important; padding-left: 1rem !important; }
.grid-table tr:last-child th, .grid-table tr:last-child td { border-bottom: none; }
.grid-table tr:hover td { background: rgba(184,147,90,.04); }

.cell {
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: .25rem;
}
.cell input { position: absolute; opacity: 0; pointer-events: none; }
.cell span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--paper);
  display: block;
  transition: all .2s ease;
}
.cell:hover span { border-color: var(--gold-soft); }
.cell input:checked + span {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: inset 0 0 0 3px var(--paper);
}
.cell input:focus-visible + span {
  outline: 2px solid var(--gold-soft);
  outline-offset: 2px;
}

/* ============ CONSENT ============ */
.q-consent .q-title { margin-bottom: 1rem; }
.consent {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: 1.25rem 1.25rem;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .25s ease;
}
.consent:hover { border-color: var(--gold-soft); }
.consent input {
  margin: 4px 0 0;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--gold);
}
.consent-text {
  flex: 1;
  font-size: .92rem;
  color: var(--text);
  line-height: 1.7;
}
.consent:has(input:checked) {
  background: var(--gold-bg);
  border-color: var(--gold);
}

/* ============ BUTTONS ============ */
.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  gap: 1rem;
}
.nav-row:has(> :only-child) { justify-content: flex-end; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  font-family: var(--font-serif);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .12em;
  padding: 1rem 2.4rem;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: all .3s ease;
  background: none;
  color: inherit;
  min-width: 160px;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(212,184,136,.3);
  pointer-events: none;
  transition: border-color .3s;
}
.btn-primary:hover {
  background: var(--ink-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover::before { border-color: rgba(212,184,136,.6); }
.btn-primary:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--ivory);
}

.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.3);
  border-top-color: var(--paper);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-loading .btn-spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: .7; }

/* ============ COMPLETE ============ */
.section-complete {
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) clamp(1.5rem, 4vw, 3rem);
}
.complete-card { max-width: 540px; margin: 0 auto; }
.complete-mark {
  width: 72px;
  height: 72px;
  color: var(--gold);
  margin-bottom: 1.5rem;
  animation: drawMark .8s ease forwards;
}
@keyframes drawMark {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}
.complete-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 3.2vw, 1.85rem);
  color: var(--ink);
  margin: 0 0 1.25rem;
  letter-spacing: .04em;
}
.complete-desc {
  color: var(--text-mid);
  line-height: 2;
  margin: 0 0 2rem;
  font-size: .94rem;
}
.complete-meta {
  font-family: var(--font-deco);
  font-style: italic;
  font-size: .9rem;
  color: var(--gold);
  letter-spacing: .15em;
  margin: 0;
}

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 2.5rem var(--gutter);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer-brand {
  font-family: var(--font-deco);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0;
  letter-spacing: .05em;
}
.footer-meta {
  font-size: .78rem;
  color: var(--text-mute);
  margin: 0;
  letter-spacing: .05em;
}
.footer-links { margin: 0; font-size: .82rem; }
.footer-links a { color: var(--text-mid); border-color: transparent; }
.footer-links a:hover { color: var(--gold); border-color: var(--gold); }

/* ============ RESPONSIVE TWEAKS ============ */

/* mobile grid cell labels (injected by JS) */
.cell-label-text { display: none; }
@media (max-width: 640px) {
  .cell-label-text {
    display: inline-block;
    margin-left: .15rem;
    font-size: .88rem;
    color: var(--text);
    line-height: 1;
  }
}

/* ============ RESPONSIVE: TABLET ============ */
@media (max-width: 960px) {
  body { font-size: 15px; }
  .hero { padding: 2.5rem 1.25rem 2rem; }
  .hero-title { font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.5; }
  .hero-desc { font-size: .92rem; }
  .container { padding: 0 1rem; }
  .site-header { padding: 1rem 1.25rem; height: 64px; }
  .brand-logo { height: 28px; }
}

/* ============ RESPONSIVE: MOBILE ============ */
@media (max-width: 640px) {
  body { font-size: 15px; }
  
  /* header */
  .site-header { padding: .75rem 1rem; height: 56px; gap: .5rem; }
  .brand { gap: .5rem; }
  .brand-logo { height: 22px; }
  .brand-jp { font-size: .58rem; }
  .header-meta-label { display: none; }
  .header-meta-value { font-size: .82rem; }
  
  /* hero */
  .hero { padding: 2rem 1rem 1.5rem; }
  .hero-title { font-size: 1.3rem; line-height: 1.55; }
  .hero-desc { font-size: .85rem; line-height: 1.7; }
  .hero-divider { margin: 1.25rem auto; }
  
  /* main layout */
  .main { padding: 1rem; gap: 1rem; }
  
  /* progress nav (horizontal on mobile, already set at 960px) */
  .progress { padding: .75rem .5rem; }
  .progress-num { width: 24px; height: 24px; font-size: .78rem; }
  .progress-label { font-size: .65rem; line-height: 1.3; }
  
  /* sections */
  .section { padding: 1.25rem 1rem; }
  .section-num { font-size: .68rem; }
  .section-title { font-size: 1.15rem; }
  .section-sub { font-size: .82rem; }
  
  /* questions */
  .q { margin-top: 1.5rem; }
  .q-title { font-size: .9rem; gap: .35rem; flex-wrap: wrap; }
  .q-index { font-size: .82rem; }
  .q-text { font-size: 1rem; }
  .q-tag, .q-req { font-size: .68rem; padding: .15rem .4rem; }
  .q-desc { font-size: .82rem; }
  
  /* choices */
  .choices { gap: .5rem; }
  .choices-grid { grid-template-columns: 1fr; }
  .choices-row { grid-template-columns: 1fr; }
  .choice {
    padding: .85rem .9rem;
    font-size: .92rem;
    min-height: 44px; /* touch target */
  }
  .choice span { padding-left: 32px; }
  .choice span::before { width: 20px; height: 20px; }
  .choice input[type="radio"]:checked + span::after { left: 7px; width: 6px; height: 6px; }
  .choice input[type="checkbox"]:checked + span::after { left: 5px; width: 10px; height: 5px; }
  
  /* text inputs */
  .text-input {
    padding: .85rem .9rem;
    font-size: 16px; /* prevent iOS zoom on focus */
  }
  .other-input { font-size: 16px; padding: .5rem .25rem; }
  
  /* grid tables: convert to card-style on mobile */
  .grid-wrap {
    overflow-x: visible;
    border: none;
    background: transparent;
  }
  .grid-table { font-size: .85rem; }
  .grid-table thead { display: none; }
  .grid-table tbody, .grid-table tr {
    display: block;
  }
  .grid-table tr {
    margin-bottom: .9rem;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
  }
  .grid-table th[scope="row"] {
    display: block;
    text-align: left;
    background: transparent;
    color: var(--text);
    font-weight: 600;
    font-size: .92rem;
    padding: 0 0 .5rem 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: .55rem;
  }
  .grid-table td {
    display: inline-block;
    padding: .25rem .15rem;
    border: none;
    width: 50%;
    box-sizing: border-box;
  }
  .grid-table .cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: .55rem .5rem;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--ivory);
    cursor: pointer;
  }
  .grid-table .cell input { position: absolute; opacity: 0; pointer-events: none; }
  .grid-table .cell span {
    position: relative;
    padding-left: 26px;
    font-size: .88rem;
    color: var(--text);
  }
  .grid-table .cell span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    background: var(--paper);
  }
  .grid-table .cell input:checked + span::before {
    border-color: var(--gold);
    background: var(--gold);
  }
  .grid-table .cell input:checked + span::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--paper);
  }
  /* Use the row's data-row to render labels on the cell columns */
  .grid-table td:nth-child(2) .cell span::after { content: ""; }
  /* Show actual value label inside the cell */
  .grid-table .cell span { font-weight: 500; }
  
  /* Inject label text via ::before on td based on header */
  /* Since dynamic header label is complex, fall back to showing input value as label */
  /* The cleanest approach: explicit value visible in cell - we add it via JS or use input value */
  /* As a quick win, show input[value] via attr() */
  
  /* navigation */
  .nav-row { flex-direction: column-reverse; align-items: stretch; gap: .6rem; }
  .btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    font-size: .95rem;
  }
  
  /* consent */
  .consent { padding: 1rem .85rem; }
  .consent-text { font-size: .85rem; }
  
  /* complete */
  .complete-title { font-size: 1.25rem; }
  .complete-msg { font-size: .92rem; }
  
  /* footer */
  .site-footer { padding: 1.25rem 1rem; }
  .footer-inner { flex-direction: column; gap: .35rem; text-align: center; }
}

/* Very small phones */
@media (max-width: 380px) {
  .progress-label { display: none; }
  .progress-num { width: 26px; height: 26px; }
  .hero-title { font-size: 1.15rem; }
}

/* ============ A11Y ============ */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
