@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: Fraunces;
  src: url("assets/fraunces-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: Fraunces;
  src: url("assets/fraunces-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fff9f2;
  --surface: #fffefd;
  --ink: #17392e;
  --muted: #4d6258;
  --line: #e8d7cf;
  --accent: #b92042;
  --accent-dark: #8f1634;
  --accent-wash: #ffe8ed;
  --mint: #e7f6eb;
  --mint-line: #cbe6d4;
  --evergreen: #1b5747;
  --warm: #9a2c52;
  --canvas: var(--paper);
  --quiet: #f6eee8;
  --purple: var(--accent);
  --purple-dark: var(--accent-dark);
  --lavender: var(--accent-wash);
  --lime: var(--mint);
  --font-display: Fraunces, Georgia, Cambria, serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --display: var(--font-display);
  --gutter: clamp(20px, 5.55vw, 84px);
  --header-height: 74px;
  --sticky-top: 0px;
  font-family: var(--font-body);
  font-synthesis: none;
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
svg { display: block; width: 1.25em; height: 1.25em; flex: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--warm); outline-offset: 4px; }

.shell { width: min(1280px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px; min-height: var(--header-height); }
.brand-lockup { display: flex; align-items: center; gap: 19px; }
.brand-caption { padding-inline-start: 18px; border-inline-start: 1px solid var(--line); color: var(--evergreen); font-size: .875rem; font-weight: 680; white-space: nowrap; }
.wordmark {
  display: inline-flex;
  align-items: baseline;
  padding-block: 4px 8px;
  font-family: var(--font-display);
  font-size: 2.45rem;
  font-weight: 620;
  line-height: 1;
  letter-spacing: -.085em;
}
.wordmark-period { color: var(--warm); }
.header-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
.header-nav a, .header-quiz-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .9375rem;
  font-weight: 650;
}
.header-quiz-link { text-decoration: underline; text-decoration-color: #c77588; text-underline-offset: 5px; }
.header-nav a:hover, .header-quiz-link:hover { color: var(--warm); }

.skip-link {
  position: absolute;
  z-index: 10;
  inset-block-start: 10px;
  inset-inline-start: var(--gutter);
  padding: 12px 16px;
  transform: translateY(-150%);
  color: var(--surface);
  background: var(--accent-dark);
}
.skip-link:focus { transform: none; }

.button-primary, .button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  text-align: center;
  font-size: .9375rem;
  font-weight: 690;
  line-height: 1.25;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.button-primary { color: #fffdf7; background: var(--accent); }
.button-secondary { color: var(--accent-dark); background: var(--surface); border-color: var(--line); }
.button-primary:disabled { color: var(--muted); background: var(--quiet); border-color: var(--line); }
.button-secondary:disabled { opacity: .65; }
@media (hover: hover) and (pointer: fine) {
  .button-primary:hover:not(:disabled) { background: var(--accent-dark); transform: translateY(-1px); }
  .button-secondary:hover:not(:disabled) { background: var(--accent-wash); border-color: var(--accent); transform: translateY(-1px); }
}
.button-primary:active:not(:disabled), .button-secondary:active:not(:disabled) { transform: translateY(1px); }

.home-hero { background: linear-gradient(110deg, #fff0f1 2%, var(--paper) 55%, #edf8ee 100%); }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .94fr);
  align-items: center;
  gap: clamp(28px, 5.5vw, 88px);
  padding-block: clamp(32px, 5vw, 68px);
}
.hero-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 5.95vw, 6rem);
  font-weight: 540;
  letter-spacing: -.053em;
  line-height: .98;
}
.hero-copy h1 em { color: var(--accent); font-size: .94em; font-weight: 490; }
.hero-copy > p {
  max-width: 39ch;
  margin: clamp(18px, 2.3vw, 26px) 0 17px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.58;
  text-wrap: pretty;
}
.hero-research {
  max-width: 50ch;
  margin: 0 0 22px;
  padding-inline-start: 14px;
  border-inline-start: 2px solid #bd6b7e;
}
.hero-research h2 {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.4;
}
.hero-research p {
  margin: 0;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.5;
  text-wrap: pretty;
}
.hero-research strong { color: var(--ink); }
.hero-action { min-height: 54px; padding-inline: 24px; font-size: 1rem; }

.hero-example {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 42px -31px #5e383a60;
}
.hero-example-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px clamp(16px, 2.15vw, 27px);
}
.hero-example-kicker, .hero-example-occasion, .hero-example-list-label {
  margin: 0;
  font-size: .875rem;
  font-weight: 680;
  letter-spacing: -.012em;
}
.hero-example-tag {
  padding: 6px 10px;
  border: 1px solid var(--mint-line);
  border-radius: 4px;
  background: var(--mint);
  color: var(--evergreen);
  font-size: .875rem;
  font-weight: 690;
  white-space: nowrap;
}
.hero-example-person {
  display: grid;
  grid-template-columns: minmax(0, .91fr) minmax(0, 1fr);
  background: var(--accent-wash);
}
.hero-example-person img { display: block; width: 100%; height: 100%; min-height: 0; max-height: 190px; object-fit: cover; object-position: center; }
.hero-example-note { padding: clamp(14px, 1.7vw, 24px); align-self: center; }
.hero-example-occasion { color: var(--accent-dark); }
.hero-example-note h2 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 2.15rem);
  line-height: 1.04;
  letter-spacing: -.046em;
  font-weight: 540;
  text-wrap: balance;
}
.hero-example-note > :last-child { margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.44; }
.hero-example-results { padding: 14px clamp(16px, 2.15vw, 27px) 5px; }
.hero-example-list-label { display: flex; justify-content: space-between; gap: 12px; }
.hero-example-list-label span { color: var(--muted); font-weight: 520; }
.hero-example-results ul { margin: 10px 0 0; padding: 0; list-style: none; }
.hero-example-results li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding-block: 8px;
  border-top: 1px solid var(--line);
  font-size: .9375rem;
}
.hero-example-results li:last-child { border-bottom: 1px solid var(--line); }
.hero-example-results strong { font-weight: 730; font-variant-numeric: tabular-nums; }
.text-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 680;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 4px;
}
.text-action:hover { color: var(--warm); }
.hero-example-results .text-action { font-size: .875rem; }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy, .hero-example { animation: hero-appear 500ms ease-out both; }
  .hero-example { animation-delay: 100ms; }
}
@keyframes hero-appear {
  from { transform: translateY(10px); }
  to { transform: translateY(0); }
}

.finder-section { padding-block: clamp(32px, 4vw, 56px) clamp(48px, 7vw, 96px); border-top: 1px solid var(--line); background: var(--surface); }
.finder-section:focus { outline: none; }
.workspace-heading { margin-bottom: clamp(18px, 3vw, 30px); }
.workspace-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.6vw, 4.7rem);
  font-weight: 530;
  line-height: 1;
  letter-spacing: -.055em;
}
.mode-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
.mode-tab {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 4px;
  min-height: 70px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 7px 7px 0 0;
  color: var(--muted);
  background: transparent;
  text-align: left;
}
.mode-tab-label { color: var(--ink); font-weight: 700; line-height: 1.2; }
.mode-tab-description { font-size: .875rem; line-height: 1.3; }
.mode-tab:hover { background: var(--paper); }
.mode-tab[aria-selected="true"] { border-bottom-color: var(--accent); background: var(--accent-wash); color: var(--accent-dark); }
.mode-tab:focus-visible { outline-offset: -3px; }
.experience { margin-top: clamp(24px, 4vw, 44px); scroll-margin-block: 18px; }
.experience-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.experience-head h2, .flow-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -.04em;
  font-weight: 550;
}
.experience-head p, .flow-helper { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.experience-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.selection-count { color: var(--muted); font-size: .875rem; font-weight: 620; white-space: nowrap; }
.home-footer {
  margin-top: 0;
  color: var(--ink);
  background: var(--mint);
  border-top: 1px solid var(--mint-line);
  padding-block: 22px;
}
.home-footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; }
.home-footer .wordmark { font-size: 2rem; }
.home-footer p { margin: 0 auto 0 0; color: var(--evergreen); font-size: .9375rem; }
.home-footer .text-action { font-size: .9375rem; }

.flow-wrap { width: min(100%, 760px); padding: clamp(17px, 3.2vw, 30px); border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.flow-head { margin-bottom: 20px; }
.flow-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 20px; }
.flow-actions > :only-child { margin-inline-start: auto; }
.chat-wrap .flow-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.chat-wrap .flow-head > button { flex: none; }
.disto-app .chat-wrap { border-radius: 8px; }
.quiz-progress { display: grid; gap: 8px; margin-bottom: 19px; color: var(--purple-dark); font-size: .875rem; font-weight: 680; }
.quiz-progress-track { position: relative; overflow: hidden; width: 100%; height: 7px; border: 0; border-radius: 8px; background: var(--lavender); accent-color: var(--purple); }
.quiz-progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--purple); }
progress.quiz-progress-track::-webkit-progress-bar { border-radius: 8px; background: var(--lavender); }
progress.quiz-progress-track::-webkit-progress-value { border-radius: 8px; background: var(--purple); }
.quiz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.quiz-option { display: grid; gap: 4px; align-content: center; min-height: 54px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); text-align: left; }
.quiz-option:hover { border-color: var(--accent); background: var(--surface); }
.quiz-option[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-wash); }
.quiz-option-label { font-weight: 690; }
.quiz-option-detail { color: var(--muted); font-size: .875rem; line-height: 1.35; }
.disto-app .quiz-progress-track { height: 5px; background: var(--quiet); }
.disto-app .quiz-option { border-radius: 7px; background: var(--paper); }
.disto-app .quiz-option:hover { border-color: var(--accent); background: var(--canvas); }
.disto-app .quiz-option[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-wash); }

.chat-log { display: grid; gap: 12px; overflow-y: auto; max-height: 220px; min-height: 72px; padding: 14px 0; border-block: 1px solid var(--line); }
.chat-turn { display: flex; align-items: flex-start; gap: 8px; }
.chat-turn.is-user { justify-content: flex-end; }
.chat-avatar { flex: 0 0 29px; display: grid; place-items: center; height: 29px; border-radius: 6px; color: var(--accent); background: var(--accent-wash); font-size: .75rem; font-weight: 740; }
.chat-message { max-width: 87%; margin: 0; padding: 9px 12px; border-radius: 3px 9px 9px 9px; background: var(--quiet); line-height: 1.43; overflow-wrap: anywhere; }
.is-user .chat-message { border-radius: 9px 3px 9px 9px; background: var(--accent-wash); color: var(--accent-dark); }
.chat-latest { margin-top: 14px; }
.chat-options-label { margin: 15px 0 0; color: var(--muted); font-size: .875rem; font-weight: 660; }
.chat-options { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.chat-chip { min-height: 39px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--accent-dark); background: var(--paper); font-size: .875rem; font-weight: 650; }
.chat-chip:hover { background: var(--accent-wash); border-color: var(--accent); }
.chat-chip--skip { color: var(--muted); border-style: dashed; }
.chat-form { display: flex; gap: 8px; margin-top: 13px; }
.chat-input { min-width: 0; flex: 1; min-height: 45px; border: 1px solid var(--line); border-radius: 7px; padding: 8px 11px; color: var(--ink); background: var(--paper); }
.chat-input::placeholder { color: var(--muted); }
.chat-send { min-width: 69px; }
.chat-form--multi { display: grid; gap: 10px; }
.chat-form--multi .chat-options-label, .chat-options--multi { margin: 0; }
.chat-options--multi { gap: 8px; }
.chat-choice { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--accent-dark); font-size: .875rem; font-weight: 650; cursor: pointer; }
.chat-choice:hover { border-color: var(--accent); background: var(--canvas); }
.chat-choice:has(:checked) { border-color: var(--accent); background: var(--accent-wash); }
.chat-choice-input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.chat-choice:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-choice-input:focus-visible { outline: 0; }
.chat-multi-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-height: 45px; }
.chat-selection-count { margin-inline-end: auto; color: var(--muted); font-size: .875rem; font-weight: 650; }
.chat-multi-actions .chat-send { margin-inline-start: auto; }

.results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.3vw, 27px); }
.result-card { min-width: 0; border-bottom: 1px solid var(--line); padding: 0 0 15px; }
.result-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 8px; color: var(--muted); font-size: .875rem; font-weight: 620; }
.result-price { color: var(--accent-dark); font-weight: 750; font-variant-numeric: tabular-nums; }
.result-card h3 { margin: 10px 0 6px; font-size: 1.1rem; line-height: 1.27; letter-spacing: -.025em; }
.result-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.result-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px; border-radius: 7px; color: var(--accent); background: var(--accent-wash); }
.result-image { display: block; width: 100%; height: clamp(110px, 19vw, 190px); margin-bottom: 13px; border-radius: 4px; object-fit: cover; object-position: center 43%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 1050px) {
  .hero-inner { gap: clamp(24px, 5vw, 50px); }
  .hero-copy h1 { font-size: clamp(3.25rem, 7.1vw, 5rem); }
}

@media (max-width: 780px) {
  :root { --header-height: 65px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; align-content: center; padding-block: 32px; }
  .hero-copy h1 { font-size: clamp(3.5rem, 9vw, 5.2rem); }
  .hero-copy > p { margin-block: 16px 20px; }
  .hero-example { max-width: 590px; }
  .hero-example-note h2 { font-size: clamp(1.4rem, 3.9vw, 2.15rem); }
}

@media (max-width: 540px) {
  :root { --header-height: 58px; }
  .wordmark { font-size: 2rem; }
  .brand-caption { display: none; }
  .header-nav a { font-size: .875rem; }
  .hero-inner { gap: 22px; padding-block: 26px; }
  .hero-copy h1 { font-size: clamp(2.85rem, 10.9vw, 3.85rem); }
  .hero-action { min-height: 48px; }
  .hero-example-top { padding-block: 10px; }
  .hero-example-person { grid-template-columns: minmax(0, .8fr) minmax(0, 1.1fr); }
  .hero-example-person img { max-height: 160px; }
  .hero-example-note { padding: 13px; }
  .hero-example-note > :last-child { font-size: .875rem; }
  .hero-example-results { padding-top: 13px; }
  .hero-example-results li { padding-block: 8px; font-size: .875rem; }
  .mode-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 3px; }
  .mode-tab { padding-inline: 10px; min-height: 62px; }
  .experience-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .experience-actions { width: 100%; justify-content: space-between; gap: 8px; }
  .results-grid, .quiz-options { grid-template-columns: 1fr; }
  .home-footer-inner { column-gap: 18px; }
  .home-footer p { order: 1; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
