/* style.css: The Kurater brand system on top of css/tokens/*.css. No inline styles in markup.
   White ground, charcoal text, orange as the only accent, Montserrat, an 8px rhythm. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  display: flex; flex-direction: column; min-height: 100vh;
}
body.has-bar main { padding-bottom: 96px; }
[hidden] { display: none !important; }
a { color: var(--accent-press); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-muted); font-size: var(--text-sm); }

/* header and progress */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--surface-page); border-bottom: 1px solid var(--border-subtle); }
.header-inner { max-width: var(--container-max); margin: 0 auto; padding: var(--space-3) var(--space-4); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.brand { display: inline-flex; min-height: 44px; align-items: center; }
.brand img { height: 28px; width: auto; display: block; }
.progress ol { display: none; list-style: none; margin: 0; padding: 0; gap: var(--space-1); }
.progress-count { margin: 0; font-size: var(--text-xs); font-weight: var(--fw-semibold); letter-spacing: var(--ls-wide); color: var(--text-muted); text-align: right; }
.progress a, .step-chip { display: flex; align-items: center; gap: var(--space-2); padding: 6px var(--space-2); border-radius: var(--radius-pill); text-decoration: none; color: var(--text-muted); font-size: var(--text-xs); font-weight: var(--fw-medium); min-height: 32px; }
.progress .n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--tk-gray-100); font-size: 11px; font-weight: var(--fw-semibold); }
.progress li.done .n { background: var(--tk-orange-tint-2); color: var(--accent-press); }
.progress li.current .n { background: var(--accent); color: var(--tk-white); }
.progress li.current .step-chip { color: var(--text-strong); }
.progress a:hover { color: var(--text-strong); background: var(--surface-subtle); }
.progress-strip { height: 3px; background: var(--tk-gray-100); }
.progress-strip span { display: block; height: 100%; background: var(--tk-gradient-warm); transition: width var(--dur-base) var(--ease-standard); }

main { flex: 1; width: 100%; max-width: var(--container-max); margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-7); }
main:focus { outline: none; }

/* signature device: the orange bar left of every uppercase title */
.step-title, .block-title {
  position: relative; margin: 0 0 var(--space-4); padding-left: var(--space-4);
  text-transform: uppercase; font-weight: var(--fw-bold); color: var(--text-primary);
  letter-spacing: var(--ls-wide); line-height: var(--lh-snug);
}
.step-title { font-size: var(--text-h4); min-height: var(--accent-bar-h); display: flex; align-items: center; padding-left: calc(var(--accent-bar-w) + var(--space-3)); }
.step-title::before, .block-title::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: var(--accent-bar-w); height: var(--accent-bar-h); background: var(--accent); border-radius: var(--radius-xs); }
.block-title { font-size: var(--text-base); min-height: 28px; display: flex; align-items: center; padding-left: calc(var(--accent-bar-w) + var(--space-3)); }
.block-title::before { height: 28px; }
.step-head { margin-bottom: var(--space-5); }
.lead { color: var(--text-muted); font-size: var(--text-lg); margin: 0 0 var(--space-4); max-width: 60ch; }
.step-head .lead { margin: var(--space-3) 0 0; font-size: var(--text-base); }
.eyebrow { text-transform: uppercase; letter-spacing: var(--ls-eyebrow); font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--accent-press); margin: 0 0 var(--space-2); }

/* buttons */
.btn {
  appearance: none; border: 1px solid var(--border-default); background: var(--surface-page); color: var(--text-primary);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-pill); font: inherit; font-weight: var(--fw-medium);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  transition: background var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}
.btn:hover { border-color: var(--text-primary); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--tk-white); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); border-color: var(--accent-press); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }
.step-nav { display: flex; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-6); }

/* images: a neutral gray ground so a missing file never breaks the layout */
.ph { display: block; background: var(--tk-gray-100); aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-md); }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph img.is-missing { visibility: hidden; }
.hero-img { aspect-ratio: 16 / 9; }
.hero .ph { aspect-ratio: 16 / 9; }

/* tier page */
.hero { display: grid; gap: var(--space-5); align-items: center; padding-bottom: var(--space-6); }
.hero-title { font-size: var(--text-h2); font-weight: var(--fw-bold); line-height: var(--lh-snug); letter-spacing: var(--ls-tight); margin: 0 0 var(--space-3); color: var(--text-strong); }
.tiers { display: grid; gap: var(--space-5); }
.tier { border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-5); background: var(--surface-card); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: var(--space-4); }
.tier-name { margin: 0; font-size: var(--text-h3); font-weight: var(--fw-bold); color: var(--text-strong); }
.tier-prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-3); }
.tier .retail { color: var(--text-muted); text-decoration: line-through; font-size: var(--text-base); }
.tier .deal { font-size: 2rem; font-weight: var(--fw-bold); color: var(--text-strong); }
.save-badge { background: var(--accent); color: var(--tk-white); font-size: var(--text-xs); font-weight: var(--fw-semibold); letter-spacing: var(--ls-wide); padding: 4px var(--space-3); border-radius: var(--radius-pill); }
/* tier thumbnails: one tight grid per card, five items */
.thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.thumb { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.thumb-img { position: relative; display: block; }
.thumb .ph { border-radius: var(--radius-sm); }
.qty-badge { position: absolute; top: var(--space-1); right: var(--space-1); background: var(--tk-charcoal); color: #fff; font-size: var(--text-xs); font-weight: var(--fw-bold); padding: 0 var(--space-2); border-radius: var(--radius-pill); line-height: 1.6; }
.thumb-label { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.3; }

/* model cards */
.models { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
.model { appearance: none; text-align: left; font: inherit; color: inherit; background: var(--surface-card); border: 2px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-3); cursor: pointer; display: flex; flex-direction: column; gap: var(--space-3); box-shadow: var(--shadow-xs); transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard); }
.model:hover { border-color: var(--tk-gray-300); box-shadow: var(--shadow-sm); }
.model[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tk-orange-tint-2); }
.model-body { display: flex; flex-direction: column; gap: var(--space-1); padding: 0 var(--space-1) var(--space-1); }
.model-name { font-weight: var(--fw-bold); font-size: var(--text-lg); color: var(--text-strong); }
.model-blurb { color: var(--text-muted); font-size: var(--text-sm); }
.model-dims { color: var(--text-muted); font-size: var(--text-xs); }
.check-text .model-dims { display: block; }
.tag { align-self: flex-start; margin-top: var(--space-2); font-size: var(--text-xs); font-weight: var(--fw-semibold); letter-spacing: var(--ls-wide); color: var(--accent-press); background: var(--tk-orange-tint); padding: 2px var(--space-2); border-radius: var(--radius-sm); }

.option-block { margin-top: var(--space-6); }
.option-block > .muted { margin: calc(var(--space-2) * -1) 0 var(--space-3); }

/* colour swatches */
.swatches { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.swatch { appearance: none; font: inherit; color: inherit; background: var(--surface-card); border: 2px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-2) var(--space-4) var(--space-2) var(--space-3); cursor: pointer; display: grid; grid-template-columns: 28px auto; column-gap: var(--space-3); align-items: center; text-align: left; min-height: 56px; }
.swatch .dot { grid-row: 1 / span 2; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-default); }
.dot-oat { background: #D8CCB6; } .dot-slate { background: #6E727A; } .dot-moss { background: #6F8060; }
.dot-fabric { background: repeating-linear-gradient(45deg, #D8CCB6 0 3px, #C9BCA3 3px 6px); } .dot-leather { background: #8A5A3B; }
.dot-light { background: #D9BF98; } .dot-dark { background: #4A3A30; }
.swatch-label { font-weight: var(--fw-medium); font-size: var(--text-sm); }
.swatch-price { font-size: var(--text-xs); color: var(--text-muted); }
.swatch[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tk-orange-tint-2); }
.swatch[aria-pressed="true"] .swatch-price { color: var(--accent-press); }

/* checkbox rows and add-on cards */
.check-list { display: grid; gap: var(--space-3); }
.check-row { display: flex; align-items: center; gap: var(--space-3); cursor: pointer; padding: var(--space-3) var(--space-4); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-card); min-height: 56px; }
.check-text { display: flex; flex-direction: column; flex: 1; gap: 2px; }
.price-tag { color: var(--accent-press); font-weight: var(--fw-semibold); white-space: nowrap; }
input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border: 2px solid var(--tk-gray-400); border-radius: var(--radius-sm); background: var(--tk-white) center / 16px 16px no-repeat; cursor: pointer; }
input[type="checkbox"]:checked { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.addons { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
.addon { display: flex; flex-direction: column; gap: var(--space-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-3); background: var(--surface-card); box-shadow: var(--shadow-xs); cursor: pointer; }
.addon:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tk-orange-tint-2); }
.addon .check-row { border: 0; padding: var(--space-1); min-height: 44px; }

/* stepper */
.stepper-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) var(--space-4); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-card); }
.stepper { display: inline-flex; align-items: center; gap: var(--space-4); }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-default); background: var(--surface-card); font: inherit; font-size: var(--text-h4); line-height: 1; cursor: pointer; color: var(--text-primary); }
.stepper button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-press); }
.stepper button:disabled { opacity: 0.4; cursor: default; }
.stepper output { min-width: 2ch; text-align: center; font-weight: var(--fw-bold); font-size: var(--text-h4); }

/* sticky total bar */
.total-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface-card); box-shadow: 0 -6px 24px rgba(65, 64, 66, 0.10); border-top: 3px solid transparent; border-image: var(--tk-gradient-warm) 1; padding-bottom: env(safe-area-inset-bottom); }
.total-inner { max-width: var(--container-max); margin: 0 auto; padding: var(--space-3) var(--space-4); display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); }
.total-figures { display: flex; gap: var(--space-6); }
.total-figures .label { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--ls-eyebrow); color: var(--text-muted); }
.total-figures strong { font-size: var(--text-h4); font-weight: var(--fw-bold); color: var(--text-strong); }
.savings strong { color: var(--accent-press); }
.total-note { display: none; color: var(--text-muted); font-size: var(--text-sm); }

/* review, summary, form */
.review-grid { display: grid; gap: var(--space-4); }
.summary { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); margin-bottom: var(--space-4); box-shadow: var(--shadow-xs); }
.summary .block-title { margin-bottom: var(--space-3); }
.summary .line { display: flex; justify-content: space-between; padding: var(--space-1) 0; gap: var(--space-3); font-size: var(--text-sm); }
.summary .line.total { border-top: 1px solid var(--border-default); margin-top: var(--space-2); padding-top: var(--space-3); font-weight: var(--fw-bold); font-size: var(--text-base); }
.summary .line.save { color: var(--accent-press); font-weight: var(--fw-semibold); }
.summary .choice { align-items: baseline; border-bottom: 1px solid var(--border-subtle); padding: var(--space-2) 0; }
.summary .choice .k { flex: none; width: 96px; color: var(--text-muted); }
.summary .choice .v { flex: 1; }
form { display: grid; gap: var(--space-4); max-width: 640px; }
form label { display: grid; gap: var(--space-2); font-size: var(--text-sm); font-weight: var(--fw-medium); }
select, input:not([type="checkbox"]), textarea { font: inherit; font-weight: var(--fw-regular); padding: var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--tk-white); color: var(--text-primary); width: 100%; min-height: 44px; }
input:focus, textarea:focus { outline: 2px solid var(--focus-ring); outline-offset: 0; border-color: var(--focus-ring); }
.err, .form-error { color: var(--accent-press); font-size: var(--text-xs); min-height: 1em; margin: 0; font-weight: var(--fw-medium); }
.ref { font-size: var(--text-lg); }
.demo-note { background: var(--tk-orange-tint); border: 1px solid var(--tk-orange-tint-2); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-size: var(--text-sm); }

/* footer */
.site-footer { background: var(--surface-dark); color: var(--text-on-dark); margin-top: auto; }
.footer-inner { max-width: var(--container-max); margin: 0 auto; padding: var(--space-6) var(--space-4); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.footer-inner img { height: 26px; width: auto; }
.footer-inner p { margin: 0; font-size: var(--text-sm); }
.badge { color: var(--tk-gray-400); font-size: var(--text-xs); }

@media (min-width: 720px) {
  main { padding: var(--space-6) var(--space-5) var(--space-8); }
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: var(--text-h1); }
  .step-title { font-size: var(--text-h3); }
  .tiers { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .thumbs { grid-template-columns: repeat(5, 1fr); gap: var(--space-2); }
  .models { grid-template-columns: repeat(3, 1fr); }
  .addons { grid-template-columns: repeat(2, 1fr); }
  /* a lone last card (odd count) spans the row, image beside its content, so no dead band */
  .addons > .addon:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .addons > .addon:last-child:nth-child(odd) > .ph { flex: 0 0 50%; }
  .addons > .addon:last-child:nth-child(odd) > .addon-body { flex: 1; }
  .review-grid { grid-template-columns: 3fr 2fr; align-items: start; }
  .total-note { display: inline; }
}
@media (min-width: 1000px) {
  .header-inner { padding: var(--space-3) var(--space-5); }
  .progress ol { display: flex; }
  .progress-count { display: none; }
}
/* 44x44 CSS px minimum touch targets on narrow or touch screens (desktop mouse layout unchanged) */
@media (max-width: 719px), (pointer: coarse) {
  .swatch, .check-row { min-height: 56px; }
  .btn { min-height: 44px; }
  .progress a, .step-chip { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
