:root {
  --brand: #f51f32;
  --brand-dark: #c91425;
  --ink: #141722;
  --muted: #667085;
  --line: #e6e8ef;
  --soft: #f7f8fb;
  --success: #11845b;
  --warning: #b54708;
  --danger: #b42318;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(20, 23, 34, 0.10);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 31, 50, 0.09), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #fafbff 42%, #f4f6fb 100%);
  min-height: 100vh;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(230,232,239,0.9);
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo-img { height: 46px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-title { font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-subtitle { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(245, 31, 50, 0.24);
  background: #fff5f6;
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 24px rgba(245,31,50,0.10);
  white-space: nowrap;
}
.timer-pill.danger { color: var(--white); background: var(--danger); border-color: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.02); } }
.shell { max-width: 1180px; margin: 0 auto; padding: 28px 22px 44px; }
.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}
.hero-card, .panel, .question-card, .result-card {
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(230,232,239,0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-card { padding: 34px; position: relative; overflow: hidden; }
.hero-card:after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  height: 230px;
  width: 230px;
  border-radius: 50%;
  background: rgba(245,31,50,0.10);
}
.eyebrow { color: var(--brand); font-weight: 900; text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; margin-bottom: 14px; }
h1 { font-size: clamp(34px, 5vw, 58px); letter-spacing: -0.06em; line-height: 0.98; margin: 0 0 18px; }
.lead { color: #4b5565; font-size: 17px; line-height: 1.65; max-width: 780px; margin: 0; }
.hero-side { padding: 24px; display: grid; gap: 14px; }
.meta-card { border: 1px solid var(--line); border-radius: 18px; padding: 15px 16px; background: #fff; }
.meta-card strong { display: block; font-size: 14px; margin-bottom: 6px; }
.meta-card span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.progress-wrap { margin: 0 0 18px; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.progress-bar { height: 10px; background: #eceff6; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), #ff6875); border-radius: inherit; transition: width .25s ease; }
.assessment-card { overflow: hidden; }
.step { padding: 26px; }
.section-intro { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.section-intro h2 { margin: 0 0 8px; letter-spacing: -0.035em; font-size: 28px; }
.section-intro p { margin: 0; color: var(--muted); line-height: 1.55; max-width: 760px; }
.section-badge { flex: 0 0 auto; border-radius: 999px; background: #fff2f3; color: var(--brand-dark); border: 1px solid rgba(245,31,50,0.20); padding: 8px 12px; font-weight: 800; font-size: 12px; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { margin-bottom: 16px; }
.field label, .field-label { display: block; font-weight: 800; margin-bottom: 8px; font-size: 13px; }
input, select, textarea {
  width: 100%;
  border: 1px solid #d6dae5;
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  outline: none;
  background: #fff;
  transition: .15s border, .15s box-shadow;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(245,31,50,0.11); }
.question-card { padding: 22px; margin: 16px 0; box-shadow: 0 10px 28px rgba(20,23,34,0.07); }
.question-kicker { color: var(--brand); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 9px; }
.question-card h3 { margin: 0 0 10px; font-size: 19px; line-height: 1.35; }
.scenario-body { color: #4b5565; line-height: 1.58; margin: 0 0 14px; }
.options { display: grid; gap: 10px; }
.option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 14px 14px;
  cursor: pointer;
  transition: .14s ease;
  line-height: 1.45;
}
.option:hover { border-color: rgba(245,31,50,.45); transform: translateY(-1px); }
.option input { width: auto; margin-top: 4px; accent-color: var(--brand); }
.option:has(input:checked) { border-color: var(--brand); background: #fff6f7; box-shadow: 0 0 0 3px rgba(245,31,50,0.08); }
.scale-head, .scale-row { display: grid; grid-template-columns: minmax(260px, 1.4fr) repeat(5, minmax(70px, 1fr)); gap: 8px; align-items: center; }
.scale-head { color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; margin: 12px 0 6px; }
.scale-row { border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 12px; margin: 10px 0; }
.scale-question { font-weight: 700; line-height: 1.45; }
.scale-choice { display: flex; justify-content: center; }
.scale-choice input { width: auto; accent-color: var(--brand); }
.instruction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.time-card { border: 1px solid var(--line); border-radius: 18px; padding: 15px; background: linear-gradient(180deg, #fff, #fafbff); }
.time-card strong { display: block; margin-bottom: 5px; }
.time-card span { color: var(--muted); font-size: 13px; }
.instruction-list { color: #4b5565; line-height: 1.65; margin: 10px 0 0 20px; padding: 0; }
.start-row, .nav-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 22px; }
.nav-row { border-top: 1px solid var(--line); padding: 18px 26px 26px; }
button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
  transition: .14s ease;
  font: inherit;
}
a.btn-primary, a.btn-secondary, a.btn-ghost { display: inline-block; text-decoration: none; }
.btn-primary { background: var(--brand); color: white; box-shadow: 0 14px 26px rgba(245,31,50,.24); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 900;
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--brand-dark); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.validation { color: var(--danger); font-weight: 800; margin-top: 12px; }
.warning-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(520px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(20,23,34,.24);
  z-index: 100;
}
.warning-dialog::backdrop { background: rgba(20,23,34,.48); }
.warning-dialog-inner { padding: 28px; }
.warning-dialog h2 { margin: 0 0 10px; letter-spacing: -.035em; }
.warning-dialog p { color: var(--muted); line-height: 1.55; margin: 0; }
.warning-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.score-hero { display: grid; grid-template-columns: 300px 1fr; gap: 20px; margin-bottom: 20px; }
.big-score { display: grid; place-items: center; min-height: 260px; background: linear-gradient(135deg, #667085, #98a2b3); border-radius: var(--radius); color: #fff; box-shadow: var(--shadow); transition: background .3s ease; }
.big-score.good { background: linear-gradient(135deg, #0b7a4b, #17a56b); }
.big-score.warn { background: linear-gradient(135deg, #b45309, #e8930c); }
.big-score.bad { background: linear-gradient(135deg, #9f1d16, var(--brand)); }
.big-score-inner { text-align: center; padding: 12px; }
.big-score-number { font-size: clamp(44px, 6vw, 68px); font-weight: 950; letter-spacing: -0.04em; }
.big-score-label { font-weight: 800; opacity: .9; }
.result-card { padding: 22px; margin-bottom: 18px; box-shadow: 0 12px 32px rgba(20,23,34,.08); }
.result-card h2, .result-card h3 { margin: 0 0 10px; letter-spacing: -.03em; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 900; margin: 4px 6px 4px 0; }
.pill.good { color: var(--success); background: #ecfdf3; border: 1px solid #abefc6; }
.pill.warn { color: var(--warning); background: #fffaeb; border: 1px solid #fedf89; }
.pill.bad { color: var(--danger); background: #fef3f2; border: 1px solid #fecdca; }
.pill.neutral { color: var(--muted); background: #f2f4f8; border: 1px solid var(--line); }
.score-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.score-card { border: 1px solid var(--line); border-radius: 18px; padding: 15px; background: #fff; }
.score-card strong { display: block; margin-bottom: 8px; min-height: 38px; }
.score-card .pill { margin: 8px 0 0; }
.score-value { font-size: 28px; font-weight: 950; letter-spacing: -.05em; }
.mini-bar { height: 8px; background: #eef1f7; border-radius: 999px; overflow: hidden; margin: 9px 0; }
.mini-fill { height: 100%; background: var(--brand); border-radius: inherit; }
.label { color: var(--muted); font-size: 12px; font-weight: 800; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.benchmark-box { border: 1px solid rgba(245,31,50,.22); background: #fff7f8; border-radius: 18px; padding: 16px; margin-top: 12px; }
.benchmark-status { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.review-section { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin: 12px 0; background: #fff; }
.review-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; border-radius: 0; background: #fff; color: var(--ink); padding: 16px 18px; border-bottom: 1px solid var(--line); }
.review-body { display: none; padding: 16px; }
.review-body.open { display: block; }
.review-item { border: 1px solid var(--line); border-radius: 14px; padding: 13px; margin-bottom: 10px; background: #fafbff; }
.review-item strong { display: block; margin-bottom: 6px; }
.review-meta { color: var(--muted); font-size: 13px; line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.print-only { display: none; }
@media (max-width: 900px) {
  .hero, .score-hero, .two-col { grid-template-columns: 1fr; }
  .grid, .instruction-grid, .score-grid { grid-template-columns: 1fr; }
  .scale-head { display: none; }
  .scale-row { grid-template-columns: 1fr; }
  .scale-choice { justify-content: flex-start; }
  .section-intro { flex-direction: column; }
  .topbar-inner { flex-wrap: wrap; }
  .timer-pill { width: 100%; justify-content: center; }
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 14px; border-radius: 16px; border: 1px solid var(--line); }
.criteria-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.criteria-table th, .criteria-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 13px; }
.criteria-table th { background: #fff5f6; color: var(--brand-dark); font-weight: 800; }
.criteria-table tr:last-child td { border-bottom: 0; }
.criteria-score { font-weight: 900; font-size: 18px; color: var(--ink); white-space: nowrap; }
.decision-note { border-left: 4px solid var(--brand); background: #fff7f8; padding: 13px 15px; border-radius: 14px; margin-top: 12px; color: var(--muted); }

@media print {
  .topbar, .nav-row, .actions, .review-toggle, .hero, .progress-wrap { display: none !important; }
  body { background: #fff; }
  .shell { padding: 0; }
  .print-only, .review-body { display: block !important; }
  .result-card, .big-score { box-shadow: none; page-break-inside: avoid; }
}
