:root {
  --ink: #595a58;
  --ink-deep: #424341;
  --cream: #f5e9e9;
  --paper: #ffffff;
  --taupe: #d5b7b7;
  --clay: #77595c;
  --line: #e3d5d6;
  --white: #fff;
  --shadow: 0 18px 45px rgba(28, 43, 52, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink-deep);
  background: var(--paper);
  font-family: "DM Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; background: var(--ink); color: white; padding: .7rem 1rem; border-radius: 4px; }
.skip-link:focus { top: 1rem; }

.site-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 18px clamp(22px, 5vw, 72px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; letter-spacing: .12em; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font-family: "Playfair Display", Georgia, serif; font-size: 24px; font-style: italic; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 13px; }
.brand small { font-size: 9px; margin-top: 3px; }
.private-badge { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #626361; }
.private-badge span { color: #a16f74; margin-right: 5px; }

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  overflow: hidden;
  background: var(--cream);
}
.hero-copy { padding: clamp(68px, 9vw, 130px) clamp(26px, 8vw, 120px); align-self: center; }
.eyebrow { margin: 0 0 18px; color: var(--clay); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 600; }
h1 { margin-bottom: 26px; max-width: 780px; font-size: clamp(48px, 6.1vw, 88px); line-height: .98; letter-spacing: -.045em; }
h1 em { color: var(--clay); font-weight: 500; }
.hero-lede { max-width: 600px; margin-bottom: 32px; color: #595a58; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.65; }
.text-link { display: inline-flex; gap: 14px; align-items: center; color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding-bottom: 7px; }
.text-link span { font-size: 18px; }
.hero-visual { position: relative; min-height: 540px; background: var(--ink); overflow: hidden; }
.hero-visual::before, .hero-visual::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; }
.hero-visual::before { width: 480px; height: 480px; right: -150px; top: -110px; }
.hero-visual::after { width: 250px; height: 250px; left: -95px; bottom: -80px; }
.sample { position: absolute; width: 190px; height: 255px; background: #f7f3e9; box-shadow: 0 18px 60px rgba(0,0,0,.28); transform-origin: 50% 90%; border: 1px solid rgba(255,255,255,.35); }
.sample::before { content: ""; position: absolute; left: 22px; right: 22px; top: 22px; height: 2px; background: rgba(24,50,71,.25); }
.sample span { position: absolute; left: 22px; bottom: 24px; color: var(--ink); font-size: 10px; font-weight: 700; letter-spacing: .2em; line-height: 1.35; }
.sample-one { left: 15%; top: 19%; transform: rotate(-10deg); background: #f0eadf; }
.sample-two { left: 37%; top: 27%; transform: rotate(3deg); background: #e6e0d6; z-index: 2; }
.sample-three { left: 57%; top: 14%; transform: rotate(12deg); background: #faf9f4; }
.hero-visual > p { position: absolute; right: 7%; bottom: 7%; margin: 0; color: white; text-align: right; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.hero-visual > p small { display: block; margin-top: 6px; font-family: "Playfair Display", Georgia, serif; font-size: 17px; font-style: italic; font-weight: 500; letter-spacing: 0; opacity: .78; }

.selector-section { padding: 96px clamp(20px, 5vw, 72px) 110px; }
.section-heading { max-width: 1320px; margin: 0 auto 36px; display: flex; justify-content: space-between; align-items: end; gap: 28px; }
.section-heading h2, .method h2 { margin: 0; font-size: clamp(42px, 5vw, 66px); line-height: 1; letter-spacing: -.035em; }
.section-heading > p { max-width: 260px; margin: 0 0 7px; color: #666765; font-size: 13px; text-align: right; }
.selector-grid { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr); gap: 28px; align-items: start; }
.question-panel, .results-panel { border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
.question-panel { padding: clamp(24px, 4vw, 54px); }
.form-progress { display: flex; align-items: center; margin-bottom: 46px; color: #95a0a6; font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.form-progress span.active { color: var(--ink); }
.form-progress i { flex: 1; height: 1px; margin: 0 12px; background: var(--line); }
fieldset { margin: 0 0 42px; padding: 0; border: 0; }
legend { width: 100%; margin-bottom: 8px; font-family: "Playfair Display", Georgia, serif; font-size: clamp(21px, 2vw, 27px); line-height: 1.25; }
legend > span { display: inline-grid; width: 30px; height: 30px; margin-right: 8px; place-items: center; border-radius: 50%; background: var(--cream); color: var(--clay); font-family: "DM Sans", Arial, sans-serif; font-size: 10px; font-weight: 700; vertical-align: 4px; }
.field-help { margin: 0 0 18px 42px; max-width: 650px; color: #666765; font-size: 13px; line-height: 1.5; }
.option-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-left: 42px; }
.option-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice { position: relative; cursor: pointer; }
.choice input, .brand-choice input, .segmented input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span { min-height: 72px; display: flex; flex-direction: column; justify-content: center; padding: 15px 16px 15px 46px; border: 1px solid var(--line); background: var(--paper); transition: .18s ease; }
.choice > span::before { content: ""; position: absolute; left: 17px; top: 50%; width: 15px; height: 15px; border: 1px solid #99a1a5; border-radius: 50%; transform: translateY(-50%); }
.choice b { font-size: 13px; font-weight: 600; }
.choice small { margin-top: 4px; color: #666765; font-size: 11px; line-height: 1.3; }
.choice:hover > span { border-color: #b9888c; }
.choice input:checked + span { border-color: var(--ink); background: #f8eeee; box-shadow: inset 3px 0 0 var(--ink); }
.choice input:checked + span::before { border: 5px solid var(--ink); }
.choice input:focus-visible + span, .brand-choice input:focus-visible + span, .segmented input:focus-visible + span { outline: 3px solid rgba(161, 111, 116, .3); outline-offset: 2px; }
.compact .choice > span { min-height: 52px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-left: 42px; }
.segmented label { position: relative; cursor: pointer; }
.segmented span { display: grid; min-height: 52px; place-items: center; border: 1px solid var(--line); background: var(--paper); font-size: 12px; font-weight: 600; }
.segmented label + label span { border-left: 0; }
.segmented input:checked + span { background: var(--ink); color: white; border-color: var(--ink); }
.conditional { margin-top: 18px; }
.brand-options { display: flex; flex-wrap: wrap; gap: 10px; margin-left: 42px; }
.brand-choice { position: relative; cursor: pointer; }
.brand-choice span { display: block; padding: 12px 15px; border: 1px solid var(--line); background: var(--paper); color: #666765; font-size: 12px; font-weight: 600; }
.brand-choice input:checked + span { border-color: var(--ink); background: var(--ink); color: white; }
.primary-button { width: calc(100% - 42px); min-height: 56px; margin-left: 42px; display: flex; align-items: center; justify-content: space-between; border: 0; padding: 0 20px; background: var(--ink); color: white; cursor: pointer; font-size: 13px; font-weight: 700; letter-spacing: .05em; transition: .2s ease; }
.primary-button:hover { background: var(--ink-deep); transform: translateY(-1px); }
.primary-button span { font-size: 19px; }
.fine-print { margin: 12px 0 0 42px; color: #859097; font-size: 10px; line-height: 1.45; }
.form-error { margin: 0 0 16px 42px; padding: 11px 13px; background: #fff0ed; color: #87372e; font-size: 12px; }

.results-panel { position: sticky; top: 22px; min-height: 610px; padding: clamp(28px, 4vw, 48px); background: var(--ink); color: white; }
.result-kicker { margin-bottom: 20px; color: #e5c6c8; font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.empty-state { min-height: 510px; display: flex; flex-direction: column; justify-content: center; }
.empty-state h3 { margin-bottom: 14px; font-family: "Playfair Display", Georgia, serif; font-size: 35px; line-height: 1.05; font-weight: 600; }
.empty-state > p:last-child { max-width: 400px; color: #eee6e7; font-size: 14px; line-height: 1.65; }
.empty-art { position: relative; height: 150px; margin: 12px 0 35px; }
.empty-art span { position: absolute; bottom: 0; width: 105px; height: 140px; border: 1px solid rgba(255,255,255,.22); }
.empty-art span:nth-child(1) { left: 8%; transform: rotate(-9deg); background: #ece6da; }
.empty-art span:nth-child(2) { left: 34%; transform: rotate(2deg); background: #faf8f2; }
.empty-art span:nth-child(3) { left: 60%; transform: rotate(10deg); background: #dedbd4; }
.result-header { padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.17); }
.result-header h3 { margin-bottom: 12px; font-family: "Playfair Display", Georgia, serif; font-size: clamp(34px, 4vw, 48px); line-height: 1; }
.result-header p:last-child { margin: 0; color: #eee6e7; font-size: 13px; line-height: 1.55; }
.shortlist { display: grid; gap: 10px; margin: 24px 0; }
.paint-card { position: relative; padding: 18px 42px 18px 18px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.paint-card::after { content: attr(data-rank); position: absolute; right: 16px; top: 16px; color: #e5c6c8; font-family: "Playfair Display", Georgia, serif; font-size: 20px; font-style: italic; }
.paint-card .paint-brand { margin-bottom: 6px; color: #eee6e7; font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.paint-card h4 { margin: 0 0 7px; font-family: "Playfair Display", Georgia, serif; font-size: 21px; font-weight: 600; }
.paint-card p { margin: 0; color: #eee6e7; font-size: 11px; line-height: 1.5; }
.paint-card a { display: inline-block; margin-top: 9px; color: white; font-size: 10px; font-weight: 700; text-underline-offset: 3px; }
.test-plan { padding-top: 22px; border-top: 1px solid rgba(255,255,255,.17); }
.test-plan h4 { margin: 0 0 12px; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; }
.test-plan ol { margin: 0; padding-left: 19px; color: #eee6e7; font-size: 12px; line-height: 1.55; }
.test-plan li + li { margin-top: 7px; }
.trim-advice { margin: 18px 0 0; padding: 13px; border-left: 3px solid #d5b7b7; background: rgba(255,255,255,.07); color: #f4eeee; font-size: 11px; line-height: 1.55; }
.result-actions { display: flex; gap: 9px; margin-top: 20px; }
.result-actions button { min-height: 40px; flex: 1; border: 1px solid rgba(255,255,255,.32); background: transparent; color: white; cursor: pointer; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.result-actions button:hover { background: white; color: var(--ink); }
.source-note { margin: 16px 0 0; color: #e4d9da; font-size: 9px; line-height: 1.5; }

.method { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 8vw, 120px); padding: 100px clamp(26px, 8vw, 120px); background: #f5e9e9; }
.method ol { margin: 0; padding: 0; list-style: none; }
.method li { display: grid; grid-template-columns: 54px 1fr; gap: 18px; padding: 0 0 28px; border-bottom: 1px solid #d5b7b7; }
.method li + li { padding-top: 28px; }
.method li > span { color: var(--clay); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.method h3 { margin-bottom: 7px; font-family: "Playfair Display", Georgia, serif; font-size: 23px; }
.method li p { margin: 0; color: #626361; font-size: 13px; line-height: 1.55; }
.method-note { grid-column: 2; margin: 0; padding-top: 2px; color: var(--clay); font-family: "Playfair Display", Georgia, serif; font-size: 18px; font-style: italic; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 26px; padding: 32px clamp(22px, 5vw, 72px); background: var(--ink-deep); color: white; }
.footer-brand .brand-mark { border-color: rgba(255,255,255,.65); }
footer p { margin: 0; color: #eee6e7; font-family: "Playfair Display", Georgia, serif; font-size: 14px; font-style: italic; }
footer > a { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-decoration: none; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 430px; }
  .sample { width: 160px; height: 215px; }
  .selector-grid { grid-template-columns: 1fr; }
  .results-panel { position: static; min-height: auto; }
  .empty-state { min-height: 420px; }
  .method { grid-template-columns: 1fr; }
  .method-note { grid-column: 1; }
}

@media (max-width: 640px) {
  .site-header { min-height: 70px; padding: 14px 18px; }
  .brand-mark { width: 36px; height: 36px; font-size: 21px; }
  .private-badge { font-size: 9px; }
  .hero { min-height: auto; }
  .hero-copy { padding: 64px 22px 70px; }
  h1 { font-size: 50px; }
  .hero-visual { min-height: 350px; }
  .sample { width: 122px; height: 176px; }
  .sample-one { left: 8%; top: 20%; }
  .sample-two { left: 35%; top: 29%; }
  .sample-three { left: 61%; top: 16%; }
  .sample span { left: 15px; bottom: 16px; font-size: 8px; }
  .selector-section { padding: 70px 14px 76px; }
  .section-heading { align-items: start; flex-direction: column; margin-left: 8px; }
  .section-heading > p { text-align: left; }
  .question-panel, .results-panel { padding: 26px 18px; }
  .form-progress { font-size: 8px; }
  legend { font-size: 22px; }
  .field-help, .option-grid, .segmented, .brand-options, .primary-button, .fine-print, .form-error { margin-left: 0; }
  .field-help { margin-top: 10px; }
  .option-grid.two-col { grid-template-columns: 1fr; }
  .choice > span { min-height: 62px; }
  .primary-button { width: 100%; }
  .empty-art span { width: 90px; }
  .method { padding: 72px 22px; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media print {
  .site-header, .hero, .question-panel, .method, footer, .result-actions { display: none !important; }
  .selector-section { padding: 0; }
  .section-heading { display: none; }
  .selector-grid { display: block; }
  .results-panel { position: static; min-height: 0; border: 0; box-shadow: none; background: white; color: #111; }
  .result-header p:last-child, .paint-card p, .test-plan ol, .trim-advice, .source-note { color: #333; }
  .paint-card { border-color: #bbb; background: white; break-inside: avoid; }
  .paint-card .paint-brand, .paint-card::after { color: #555; }
  .paint-card a { color: #111; }
  .test-plan { border-color: #aaa; }
  .trim-advice { background: #f4f4f4; color: #222; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* A working surface: readable questions first, with the existing SBS palette. */
[hidden] { display: none !important; }
.intro { max-width: 1320px; margin: 0 auto; padding: 36px clamp(20px, 5vw, 72px) 0; }
.intro h1 { font-size: clamp(32px, 4vw, 52px); line-height: 1.12; margin-bottom: 14px; }
.intro > p:last-child { max-width: 680px; font-size: 16px; line-height: 1.6; }
.selector-section { padding-top: 26px; }
.section-heading h2 { font-size: 30px; }
.brand strong, .brand small, .private-badge, .eyebrow, .result-kicker { font-size: 12px; }
.form-progress { font-size: 14px; margin-bottom: 24px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.choice b, .segmented span, .brand-choice span, .primary-button, .field-help, .choice small, .form-error { font-size: 14px; }
.choice small { color: #626361; }
.field-help { color: #626361; }
.fine-print, .source-note { font-size: 12px; }
.fine-print { color: #626361; }
.paint-card p, .paint-card a, .test-plan ol, .trim-advice, .result-header p:last-child, .result-actions button { font-size: 14px; }
.paint-card .paint-brand { font-size: 12px; }
.paint-card .maker-note { margin-top: 10px; color: #e4d9da; }
.results-panel { position: static; }
.empty-state { min-height: 230px; }
.results-panel:focus-visible { outline: 3px solid var(--clay); }
.room-read { margin-top: 20px; padding: 16px; background: rgba(255,255,255,.08); }
.room-read h4 { margin: 0 0 8px; font-size: 16px; }
.room-read p { margin: 0; font-size: 14px; line-height: 1.6; color: #f4eeee; }
.stale-notice { margin-top: 20px; padding: 14px; background: #fff0d0; color: #3f3015; font-size: 14px; line-height: 1.5; }
button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 640px) {
  .intro { padding: 26px 22px 0; }
  .selector-section { padding-top: 20px; }
  .section-heading { gap: 12px; margin-bottom: 20px; }
  .private-badge { letter-spacing: 0; }
  .question-panel, .results-panel { padding: 24px 18px; }
  fieldset { margin-bottom: 28px; }
}
@media print {
  .intro, .stale-notice { display: none !important; }
  .room-read p, .paint-card .maker-note { color: #333; }
}

.sampling-note { padding: 16px; margin: 0 0 20px; border-left: 3px solid var(--clay); background: var(--cream); color: var(--ink-deep); font-size: 14px; line-height: 1.6; }
.sampling-note strong { display: block; margin-bottom: 5px; }
.result-note { margin-top: 20px; background: #f5e9e9; color: #424341; }
@media print { .result-note { border-color: #555; background: #f4f4f4; color: #111; break-inside: avoid; } }

/* SBS Designs branding from the supplied logo. */
.brand-mark { display: block; width: 72px; height: 90px; object-fit: contain; border: 0; border-radius: 0; background: white; flex: 0 0 auto; }
.site-header { border-bottom: 3px solid #d5b7b7; }
.footer-brand .brand-mark { border: 0; }
.primary-button { border-bottom: 4px solid #d5b7b7; }
.choice input:checked + span { border-color: #a16f74; box-shadow: inset 3px 0 0 #a16f74; }
.result-kicker { color: #e5c6c8; }
@media (max-width: 640px) { .brand-mark { width: 56px; height: 70px; } .brand { gap: 10px; } }
