/* Tripsy quiz presentation. Scoring and behavior live in the unchanged engine. */
:root {
  --bg: #f8f5ef;
  --card: #ffffff;
  --text: #17212b;
  --muted: #616e79;
  --border: #dde3e7;
  --accent: #24608a;
  --accent-dark: #173e5c;
  --accent-light: #eaf3f8;
  --sand: #f5f0e7;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.65; }
button, a { font: inherit; }
a { color: var(--accent); }
button { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.hidden { display: none !important; }
.page { width: min(760px, calc(100% - 32px)); margin-inline: auto; padding-bottom: 36px; }
.quiz-header { display: flex; align-items: center; padding-block: 26px 30px; }
.logo { display: inline-block; color: var(--text); font-size: 2.3rem; font-weight: 900; letter-spacing: -.075em; line-height: 1; text-decoration: none; transform: rotate(-3deg); }
.hero { margin-bottom: 28px; }
.hero-badge { color: var(--accent); font-size: .76rem; font-weight: 650; letter-spacing: .015em; margin-bottom: 16px; }
.hero h1 { font-size: clamp(2rem, 7vw, 3.1rem); font-weight: 800; line-height: 1.12; letter-spacing: -.045em; margin: 0; }
.hero p { max-width: 580px; margin: 17px 0 0; font-size: .94rem; color: var(--muted); }
.quiz-card { background: var(--card); border: 1px solid var(--border); border-radius: 19px; padding: 22px 18px; box-shadow: 0 8px 28px #173e5c05; }
.progress-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; color: var(--muted); font-size: .75rem; font-weight: 600; margin-bottom: 10px; }
#progressPercent { color: var(--accent); font-variant-numeric: tabular-nums; }
.progress-track { height: 5px; background: #edf1f4; border-radius: 99px; overflow: hidden; }
.progress-bar { width: 12.5%; height: 100%; background: var(--accent); border-radius: inherit; transition: width .2s ease; }
.quiz-toolbar { min-height: 48px; margin: 8px 0 10px; }
.back-button { min-height: 44px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); padding: 8px 4px; font-size: .85rem; cursor: pointer; }
.back-button:hover { color: var(--accent-dark); }
.question-category { color: var(--accent); font-size: .71rem; font-weight: 750; letter-spacing: .065em; text-transform: uppercase; margin-bottom: 9px; }
.question-title { margin: 0 0 12px; font-size: clamp(1.5rem, 5.6vw, 2rem); line-height: 1.23; letter-spacing: -.035em; }
.question-helper { color: var(--muted); font-size: .88rem; margin: 0 0 25px; }
.answers { display: grid; gap: 11px; }
.answer { display: flex; align-items: center; gap: 13px; width: 100%; min-width: 0; min-height: 76px; padding: 14px 12px; appearance: none; text-align: left; color: var(--text); background: white; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.answer.selected { background: var(--accent-light); border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.answer:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.answer-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; background: #f4f5f5; border-radius: 10px; font-size: 1.4rem; line-height: 1; }
.answer.selected .answer-icon { background: #dbeaf4; }
.answer-copy { min-width: 0; }
.answer strong { display: block; font-size: .96rem; font-weight: 700; line-height: 1.4; margin-bottom: 4px; }
.answer small { display: block; font-size: .8rem; line-height: 1.5; color: var(--muted); }
.result-heading { margin-bottom: 27px; }
.result-heading .eyebrow { color: var(--accent); font-size: .72rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.result-heading h2 { margin: 10px 0 14px; font-size: clamp(1.8rem, 6vw, 2.6rem); line-height: 1.15; letter-spacing: -.04em; }
.result-heading p { margin: 0; color: var(--muted); font-size: .92rem; }
.winner { padding: 22px 17px; border: 1px solid #c4d9e7; border-top: 4px solid var(--accent); border-radius: 14px; background: linear-gradient(150deg, var(--accent-light), #fff 75%); }
.winner-top { display: flex; flex-direction: column; gap: 22px; }
.winner-main { min-width: 0; }
.island-emoji { font-size: 2.5rem; line-height: 1; margin-bottom: 16px; }
.match-quality { color: var(--accent-dark); font-size: .75rem; font-weight: 750; margin-bottom: 7px; }
.winner h3 { font-size: clamp(2rem, 7vw, 2.6rem); line-height: 1.15; letter-spacing: -.04em; margin: 0 0 14px; }
.winner-description { margin: 0; color: var(--muted); font-size: .92rem; }
.match-badge { align-self: flex-start; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; background: white; border: 1px solid #ccdeea; border-radius: 10px; padding: 12px 14px; }
.match-number { color: var(--accent-dark); font-size: 1.8rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.match-label { color: var(--muted); font-size: .73rem; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 23px; }
.tag { border: 1px solid #d4e1e9; border-radius: 99px; padding: 5px 10px; background: #ffffffb3; font-size: .74rem; color: var(--accent-dark); }
.result-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid #d5e2eb; }
.result-section h4 { font-size: 1rem; margin: 0 0 13px; }
.reason-list { display: grid; gap: 9px; list-style: none; padding: 0; margin: 0; }
.reason-item { padding: 11px 12px; background: #ffffffb8; border-radius: 8px; font-size: .88rem; }
.reason-check { color: var(--accent); font-weight: 800; margin-right: 4px; }
.close-match, .tradeoff { margin-top: 16px; padding: 14px; border-radius: 8px; font-size: .84rem; line-height: 1.7; }
.close-match { background: #e8f0f6; color: var(--accent-dark); }
.tradeoff { background: var(--sand); color: #64594a; border-left: 2px solid #bba78c; }
.runner-title { margin: 29px 0 13px; font-size: .96rem; font-weight: 750; }
.runner-grid { display: grid; gap: 12px; }
.runner { min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: #fcfcfb; }
.runner-position { font-size: .69rem; color: var(--muted); font-weight: 650; }
.runner-name { margin-top: 7px; font-size: 1.16rem; font-weight: 750; }
.runner-score { color: var(--accent); font-size: .83rem; font-weight: 650; margin-top: 7px; }
.mini-bar { height: 4px; margin-top: 12px; background: #e8edf0; overflow: hidden; border-radius: 99px; }
.mini-bar > div { height: 100%; background: #6c95b2; border-radius: inherit; }
.guide-button { display: block; margin-top: 25px; min-height: 52px; padding: 15px 18px; border-radius: 11px; background: var(--accent); color: white; text-align: center; font-weight: 700; font-size: .91rem; text-decoration: none; }
.guide-button:hover { background: var(--accent-dark); }
.restart { display: block; min-height: 44px; margin: 15px auto 0; padding: 10px; border: 0; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; font-size: .84rem; cursor: pointer; }
@media (hover: hover) {
  .answer:hover { background: var(--accent-light); border-color: var(--accent); }
}
@media (min-width: 640px) {
  .page { width: min(760px, calc(100% - 64px)); padding-bottom: 48px; }
  .quiz-header { padding-block: 32px 38px; }
  .hero { margin-bottom: 34px; }
  .hero p { font-size: 1rem; }
  .quiz-card { padding: 34px; border-radius: 22px; }
  .answer { padding: 17px 18px; gap: 16px; }
  .answer-icon { flex-basis: 46px; height: 46px; }
  .winner { padding: 28px; }
  .winner-top { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .match-badge { display: block; flex: 0 0 auto; text-align: center; }
  .match-label { margin-top: 5px; }
  .runner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .answer, .progress-bar { transition: none; }
}

/* Quiz-scoped Autumn palette; Greek Islands and global branding stay unchanged. */
.autumn-quiz { --accent: #536443; --accent-dark: #35452e; --accent-light: #edf1e7; }
.autumn-quiz .winner { background: var(--accent-light); border-color: #cdd5c2; border-top-color: var(--accent); }
.autumn-quiz .match-badge, .autumn-quiz .tag, .autumn-quiz .result-section { border-color: #cdd5c2; }
.autumn-quiz .close-match, .autumn-quiz .answer.selected .answer-icon { background: #e2e9d9; }
.autumn-quiz .mini-bar > div { background: var(--accent); }
.autumn-quiz .answer:focus-visible { outline-color: var(--accent); }
@media (hover: hover) { .autumn-quiz .answer:hover { border-color: var(--accent); } }

/* Category-wide Peloponnese palette; existing quiz themes are unchanged. */
.peloponnese-quiz { --accent: #9b4934; --accent-dark: #713322; --accent-light: #f7eee7; }
.peloponnese-quiz .winner { background: var(--accent-light); border-color: #dfc4b8; border-top-color: var(--accent); }
.peloponnese-quiz .match-badge, .peloponnese-quiz .tag, .peloponnese-quiz .result-section { border-color: #dfc4b8; }
.peloponnese-quiz .close-match, .peloponnese-quiz .answer.selected .answer-icon { background: #efddd1; }
.peloponnese-quiz .mini-bar > div { background: var(--accent); }
.peloponnese-quiz .answer:focus-visible { outline-color: var(--accent); }
@media (hover: hover) { .peloponnese-quiz .answer:hover { border-color: var(--accent); } }
