:root {
  color-scheme: light;
  --blue-950: #0b2942;
  --blue-800: #164f78;
  --blue-650: #256d9b;
  --blue-100: #e8f1f6;
  --red: #d71920;
  --red-dark: #ac1117;
  --ink: #152330;
  --muted: #5c6b77;
  --line: #d7e0e6;
  --surface: #ffffff;
  --canvas: #f3f6f8;
  --success: #17765a;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; color: var(--ink); }
button, input { font: inherit; }
a { color: var(--blue-800); }

.survey-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(180deg, #edf3f7 0%, #f8fafb 100%); }
.survey-shell { width: min(900px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 44px rgba(14, 47, 70, .09); padding: clamp(30px, 6vw, 72px); }
.brand-line { width: 72px; height: 7px; background: var(--red); margin-bottom: 34px; }
.eyebrow { color: var(--blue-800); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; font-size: .78rem; margin: 0 0 14px; }
.survey-shell h1 { color: var(--blue-950); font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.08; margin: 0; max-width: 760px; }
.intro { color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.35rem); line-height: 1.55; max-width: 650px; margin: 24px 0 30px; }
.privacy-note { border-left: 4px solid var(--blue-650); background: var(--blue-100); padding: 18px 20px; margin: 0 0 32px; display: grid; gap: 6px; line-height: 1.45; }
.primary-button, .secondary-button { display: inline-flex; min-height: 68px; align-items: center; justify-content: center; border-radius: 6px; padding: 16px 28px; font-weight: 800; letter-spacing: .035em; text-decoration: none; cursor: pointer; }
.primary-button { width: 100%; color: white; background: var(--red); border: 2px solid var(--red); font-size: 1.15rem; }
.primary-button:hover, .primary-button:focus-visible { background: var(--red-dark); border-color: var(--red-dark); }
.secondary-button { color: var(--blue-950); background: white; border: 2px solid var(--blue-800); }
.duration { color: var(--muted); text-align: center; margin: 18px 0 0; font-size: .92rem; }
.progress-header { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.progress-text { color: var(--muted); margin: 0; font-weight: 700; }
.progress-track { height: 5px; background: var(--blue-100); margin: 8px 0 clamp(40px, 8vw, 78px); overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--red); }
.question-card h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); line-height: 1.22; text-align: center; margin-inline: auto; }
.answer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; margin-top: clamp(40px, 7vw, 66px); }
.answer-button { min-height: 108px; border-radius: 7px; border: 3px solid var(--blue-800); background: white; color: var(--blue-950); font-size: clamp(1.25rem, 3vw, 1.65rem); font-weight: 800; cursor: pointer; }
.answer-button:hover, .answer-button:focus-visible { background: var(--blue-950); color: white; border-color: var(--blue-950); }
.answer-unknown { border-color: #647581; color: #394a55; }
.question-help { color: var(--muted); text-align: center; margin: 24px 0 0; }
.error-message { background: #fff0f0; border-left: 4px solid var(--red); padding: 14px; margin: 24px 0 0; }
.done-shell { text-align: center; }
.done-shell h1 { margin-inline: auto; }
.done-shell > p:not(.eyebrow):not(.duration) { font-size: 1.2rem; color: var(--muted); margin: 22px 0 36px; }
.success-mark { width: 74px; height: 74px; display: grid; place-items: center; margin: 0 auto 28px; border-radius: 50%; background: #e4f4ef; color: var(--success); font-size: 2.5rem; font-weight: bold; }

.dashboard-page { min-height: 100vh; background: var(--canvas); }
.dashboard-header { background: var(--blue-950); color: white; padding: 28px max(24px, calc((100vw - 1300px) / 2)); display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.dashboard-header .eyebrow { color: #a8d2ec; }
.dashboard-header h1 { margin: 0; font-size: 2.1rem; }
.export-links { display: flex; flex-wrap: wrap; gap: 10px; }
.export-links a { color: white; text-decoration: none; border: 1px solid #7193aa; padding: 10px 13px; border-radius: 5px; font-weight: 700; }
.dashboard-main { width: min(1300px, calc(100% - 40px)); margin: 30px auto 70px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.summary-card { background: white; border: 1px solid var(--line); border-top: 4px solid var(--red); padding: 22px; display: grid; gap: 12px; }
.summary-card span { color: var(--muted); font-weight: 700; }
.summary-card strong { color: var(--blue-950); font-size: 2.4rem; }
.summary-wide { grid-column: span 2; }
.summary-wide strong { font-size: 1.15rem; }
.dashboard-section { background: white; border: 1px solid var(--line); margin-top: 20px; padding: clamp(22px, 4vw, 38px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.section-heading > span { color: var(--muted); }
.dashboard-section h2 { color: var(--blue-950); margin: 0; font-size: 1.55rem; }
.question-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); margin-top: 26px; }
.result-card { background: white; padding: 25px; }
.result-card h3 { font-size: 1rem; line-height: 1.45; min-height: 2.9em; margin: 0 0 5px; }
.sample { margin: 0 0 18px; color: var(--muted); font-size: .86rem; }
.bar-row { margin-top: 12px; }
.bar-label { display: flex; justify-content: space-between; gap: 15px; font-size: .9rem; }
.bar-track { height: 9px; background: #e8edf0; margin-top: 6px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--blue-650); }
.bar-no { background: var(--red); }
.bar-unknown { background: #7b8790; }
.split-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 50px; }
.notice-list, .metric-list { margin-top: 20px; }
.notice-list p { background: #f5f8fa; border-left: 4px solid var(--red); padding: 15px 17px; line-height: 1.5; }
.metric-list p { display: flex; justify-content: space-between; gap: 22px; padding: 15px 0; border-bottom: 1px solid var(--line); margin: 0; }
.metric-list strong { white-space: nowrap; }

button:focus-visible, a:focus-visible { outline: 4px solid #f1b51c; outline-offset: 3px; }
@media (max-width: 760px) {
  .survey-page { padding: 0; align-items: stretch; }
  .survey-shell { min-height: 100vh; border: 0; border-radius: 0; display: flex; flex-direction: column; justify-content: center; }
  .progress-header, .dashboard-header { align-items: flex-start; flex-direction: column; }
  .answer-grid { grid-template-columns: 1fr; }
  .answer-button { min-height: 88px; }
  .summary-grid, .question-results, .split-section { grid-template-columns: 1fr; }
  .summary-wide { grid-column: auto; }
  .metric-list p { align-items: flex-start; flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
