:root {
  --page: #edf2f7;
  --panel: #fff;
  --text: #14213a;
  --muted: #68768b;
  --line: #dbe4ee;
  --blue: #1477d4;
  --blue-dark: #0f315b;
  --cyan: #14b9eb;
  --green: #16865c;
  --amber: #a46706;
  --red: #b6473c;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; color: var(--text); background: var(--page); font-family: Arial, Helvetica, sans-serif; }
button, a { font: inherit; }
button { letter-spacing: 0; }

.app-bar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(18px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: linear-gradient(135deg,var(--cyan),var(--blue)); font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.demo-label { padding: 7px 9px; border: 1px solid #cfe1f3; border-radius: 7px; color: #315376; background: #f1f7fd; font-size: 12px; font-weight: 900; }
.bar-actions { display:flex; align-items:center; gap:8px; }
.bar-actions a { min-height:36px; display:inline-flex; align-items:center; padding:7px 10px; border:1px solid var(--line); border-radius:7px; color:#244463; background:#fff; text-decoration:none; font-size:12px; font-weight:900; }

.trainer-shell { width: min(1180px, calc(100% - 28px)); margin: 24px auto 48px; }
.intro-panel { min-height: 190px; display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 28px; align-items: center; padding: 30px; border-radius: 8px; color: #fff; background: linear-gradient(125deg,#102b53 0%,#1d66c6 62%,#12addd 100%); }
.eyebrow { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.intro-panel h1 { margin: 0 0 10px; font-size: clamp(30px,4vw,48px); line-height: 1.06; }
.intro-panel p { max-width: 720px; margin: 0; color: rgba(255,255,255,.82); font-size: 17px; line-height: 1.55; }
.case-badge { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 24px; border: 1px solid rgba(255,255,255,.24); border-radius: 8px; background: rgba(255,255,255,.12); }
.case-badge span { margin-bottom: 8px; color: rgba(255,255,255,.72); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.case-badge strong { font-size: 25px; line-height: 1.15; }

.workspace { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 18px; margin-top: 18px; }
.status-panel, .decision-panel, .result-panel { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 16px 36px rgba(21,42,72,.07); }
.status-panel { align-self: start; padding: 18px; }
.stage-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 13px; }
.stage-card span { color: var(--muted); font-size: 13px; font-weight: 800; }
.stage-card strong { font-size: 19px; }
.progress-track, .meter { height: 7px; overflow: hidden; border-radius: 8px; background: #e8eef5; }
.progress-track > span, .meter > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--blue),var(--cyan)); transition: width .3s ease; }
.score-list { display: grid; gap: 17px; margin-top: 26px; }
.score-item > div:first-child { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.score-item span { color: #40516a; font-size: 13px; font-weight: 800; }
.score-item strong { font-size: 13px; }
.tip-box { margin-top: 26px; padding: 13px; border-left: 4px solid var(--cyan); border-radius: 5px; background: #f0f8fd; }
.tip-box strong { font-size: 13px; }
.tip-box p { margin: 5px 0 0; color: #5d6c81; font-size: 12px; line-height: 1.5; }

.decision-panel { min-height: 570px; padding: 26px; }
.scene-head { display: flex; align-items: center; gap: 15px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.scene-number { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--blue-dark); font-size: 18px; font-weight: 900; }
.scene-head p { margin: 0 0 3px; color: var(--blue); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.scene-head h2 { margin: 0; font-size: 24px; line-height: 1.2; }
.scene-text { margin: 20px 0; padding: 18px; border: 1px solid #dce7f2; border-radius: 7px; background: #f7fafc; color: #384a63; font-size: 16px; line-height: 1.65; }
.legal-note { margin:-7px 0 18px; border:1px solid #dce7f2; border-radius:7px; background:#fff; }
.legal-note summary { padding:11px 13px; color:#315376; font-size:13px; font-weight:900; cursor:pointer; }
.legal-note p { margin:0; padding:0 13px 8px; color:#5c6c82; font-size:13px; line-height:1.5; }
.legal-source-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 13px 13px; padding-top:9px; border-top:1px solid #e7eef6; }
.legal-source-meta span { color:#6c7c90; font-size:12px; line-height:1.4; }
.legal-note a { display:inline-flex; flex:0 0 auto; margin:0; color:var(--blue); font-size:12px; font-weight:900; text-decoration:none; }
.legal-note a::after { content:' ↗'; }
@media (max-width:640px) {
  .legal-source-meta { align-items:flex-start; flex-direction:column; }
}
.decision-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 24px 0 11px; }
.decision-title span { font-weight: 900; }
.decision-title small { color: var(--muted); }
.options { display: grid; gap: 9px; }
.option-btn { width: 100%; min-height: 54px; display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 11px; align-items: center; padding: 10px 13px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text); text-align: left; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.option-btn:hover { border-color: #8fc4ef; background: #f4f9fe; transform: translateY(-1px); }
.option-btn.selected { border-color: var(--blue); background: #eaf5ff; }
.option-btn:disabled { cursor: default; transform: none; }
.option-letter { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 7px; background: #eef3f8; font-weight: 900; }
.option-btn.selected .option-letter { color: #fff; background: var(--blue); }
.option-copy { font-weight: 750; line-height: 1.4; }
.feedback { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; align-items: start; margin-top: 15px; padding: 14px; border-radius: 7px; background: #eef8f3; color: #225b43; }
.feedback.caution { background: #fff7e9; color: #745015; }
.feedback.risk { background: #fff0ee; color: #803d36; }
.feedback-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.72); font-weight: 900; }
.feedback strong { display: block; margin-bottom: 4px; }
.feedback p { margin: 0; font-size: 14px; line-height: 1.5; }
.decision-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.primary-btn, .text-btn { min-height: 44px; border: 0; border-radius: 7px; padding: 10px 16px; font-weight: 900; cursor: pointer; }
.primary-btn { color: #fff; background: var(--blue); }
.primary-btn:disabled { color: #8895a6; background: #e8edf3; cursor: not-allowed; }
.text-btn { color: #40516a; background: #eef3f8; }

.result-panel { grid-template-columns: 240px minmax(0,1fr); gap: 30px; align-items: center; margin-top: 18px; padding: 32px; }
.result-panel:not([hidden]) { display: grid; }
.score-ring { width: 190px; height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: conic-gradient(var(--blue) var(--score-angle),#e6edf5 0); position: relative; }
.score-ring::after { content:""; position: absolute; inset: 14px; border-radius: 50%; background: #fff; }
.score-ring strong, .score-ring span { position: relative; z-index: 1; }
.score-ring strong { font-size: 48px; }
.score-ring span { color: var(--muted); font-size: 13px; }
.result-copy h2 { margin: 0 0 9px; font-size: 31px; }
.result-copy > p { margin: 0; color: var(--muted); line-height: 1.6; }
.result-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 17px 0; }
.result-tags span { padding: 7px 9px; border-radius: 6px; background: #edf5fd; color: #285b91; font-size: 12px; font-weight: 900; }

.catalog-shell { max-width:1080px; }
.catalog-hero { padding:32px; border-radius:8px; color:#fff; background:linear-gradient(125deg,#102b53,#1d66c6 65%,#12addd); }
.catalog-hero h1 { margin:0 0 10px; font-size:clamp(32px,5vw,52px); line-height:1.05; }
.catalog-hero > p { max-width:720px; margin:0; color:rgba(255,255,255,.82); font-size:16px; line-height:1.55; }
.catalog-stats { display:flex; flex-wrap:wrap; gap:10px; margin-top:22px; }
.catalog-stats span { padding:9px 11px; border:1px solid rgba(255,255,255,.22); border-radius:7px; background:rgba(255,255,255,.10); font-size:13px; }
.catalog-stats strong { margin-right:4px; font-size:18px; }
.catalog-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:18px; }
.trainer-card { display:flex; flex-direction:column; min-height:390px; padding:22px; border:1px solid var(--line); border-top:4px solid var(--blue); border-radius:8px; background:#fff; box-shadow:0 16px 36px rgba(21,42,72,.07); }
.trainer-card.privacy-card { border-top-color:#16865c; }
.trainer-card-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.trainer-card-top span { width:38px; height:38px; display:grid; place-items:center; border-radius:7px; color:#fff; background:var(--blue-dark); font-weight:900; }
.trainer-card-top b { color:var(--muted); font-size:12px; text-transform:uppercase; }
.trainer-card h2 { margin:22px 0 9px; font-size:25px; line-height:1.18; }
.trainer-card > p { margin:0; color:var(--muted); line-height:1.55; }
.trainer-tags { display:flex; flex-wrap:wrap; gap:7px; margin:17px 0; }
.trainer-tags span { padding:6px 8px; border-radius:6px; background:#eef5fc; color:#315376; font-size:11px; font-weight:900; }
.trainer-law { display:grid; gap:3px; margin-top:auto; padding:12px; border-left:4px solid #bed7ed; background:#f7fafc; }
.trainer-law small { color:var(--muted); }
.trainer-law strong { font-size:13px; }
.card-action { min-height:44px; display:flex; align-items:center; justify-content:center; margin-top:15px; border-radius:7px; color:#fff; background:var(--blue); text-decoration:none; font-weight:900; }
.privacy-card .card-action { background:#16865c; }
.trainer-card.safety-card { border-top-color:#a46706; }
.safety-card .card-action { background:#9a6408; }
.trainer-card.conflict-card { border-top-color:#6f4ab2; }
.conflict-card .card-action { background:#6f4ab2; }
.trainer-card.discipline-card { border-top-color:#b24c3f; }
.discipline-card .card-action { background:#a84539; }
.trainer-card.council-card { border-top-color:#0d7d86; }
.council-card .card-action { background:#0d7d86; }
.trainer-card.load-card { border-top-color:#416a35; }
.load-card .card-action { background:#416a35; }
.trainer-card.reputation-card { border-top-color:#315fa8; }
.reputation-card .card-action { background:#315fa8; }
.trainer-card.quality-card { border-top-color:#187769; }
.quality-card .card-action { background:#187769; }
.trainer-card.emergency-card { border-top-color:#b14a3d; }
.emergency-card .card-action { background:#b14a3d; }
.trainer-card.parent-card { border-top-color:#76539b; }
.parent-card .card-action { background:#76539b; }
.trainer-card.lateness-card { border-top-color:#a65b26; }
.lateness-card .card-action { background:#a65b26; }
.trainer-card.accident-card { border-top-color:#bf3848; }
.accident-card .card-action { background:#bf3848; }
.trainer-card.assessment-card { border-top-color:#2962a8; }
.assessment-card .card-action { background:#2962a8; }
.trainer-card.funds-card { border-top-color:#19795c; }
.funds-card .card-action { background:#19795c; }
.catalog-note { margin-top:18px; padding:18px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.catalog-note p { margin:6px 0 0; color:var(--muted); line-height:1.55; }
.section-heading { display:flex; align-items:end; justify-content:space-between; gap:24px; margin:30px 2px 12px; }
.section-heading h2 { margin:0; font-size:28px; }
.section-heading .eyebrow { color:var(--blue); }
.section-heading > p { max-width:520px; margin:0; color:var(--muted); line-height:1.55; }
.planned-section { margin-top:32px; padding:24px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.planned-section .section-heading { margin:0 0 17px; }
.planned-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.planned-grid article { min-height:128px; padding:16px; border:1px solid #dfe8f1; border-radius:7px; background:#f8fafc; }
.planned-grid article > span { display:inline-flex; padding:5px 7px; border-radius:5px; color:#68788d; background:#e9eef4; font-size:10px; font-weight:900; text-transform:uppercase; }
.planned-grid h3 { margin:11px 0 5px; font-size:17px; line-height:1.25; }
.planned-grid p { margin:0; color:var(--muted); font-size:13px; line-height:1.45; }

@media (max-width: 820px) {
  .intro-panel { grid-template-columns: 1fr; padding: 22px; }
  .case-badge { min-height: 105px; }
  .workspace { grid-template-columns: 1fr; }
  .status-panel { display: grid; grid-template-columns: auto minmax(120px,1fr); gap: 13px; align-items: center; }
  .score-list { grid-column: 1 / -1; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 4px; }
  .tip-box { display: none; }
  .result-panel { grid-template-columns: 1fr; text-align: center; }
  .result-score { display: flex; justify-content: center; }
  .result-tags { justify-content: center; }
  .catalog-grid { grid-template-columns:1fr; }
  .section-heading { align-items:flex-start; flex-direction:column; gap:7px; }
  .planned-grid { grid-template-columns:1fr; }
}

@media (max-width: 560px) {
  .trainer-shell { width: calc(100% - 18px); margin-top: 10px; }
  .app-bar { min-height: 62px; padding: 9px; }
  .brand-mark { width: 38px; height: 38px; }
  .intro-panel { min-height: 0; padding: 19px 16px; gap: 16px; }
  .intro-panel p { font-size: 14px; }
  .case-badge { min-height: 0; padding: 14px; }
  .status-panel { padding: 13px; }
  .score-list { grid-template-columns: 1fr; gap: 10px; }
  .decision-panel { min-height: 0; padding: 15px; }
  .scene-head { align-items: flex-start; }
  .scene-head h2 { font-size: 20px; }
  .scene-text { margin: 14px 0; padding: 14px; font-size: 14px; }
  .decision-title { align-items: flex-start; flex-direction: column; gap: 3px; }
  .option-btn { grid-template-columns: 32px minmax(0,1fr); padding: 9px; }
  .decision-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .primary-btn, .text-btn { width: 100%; padding: 9px 10px; }
  .feedback { grid-template-columns: 1fr; }
  .feedback-icon { width: 34px; height: 34px; }
  .result-panel { padding: 22px 15px; }
  .score-ring { width: 160px; height: 160px; }
  .catalog-hero { padding:22px 17px; }
  .trainer-card { min-height:0; padding:18px; }
  .bar-actions a { display:none; }
  .demo-label { font-size:10px; }
  .planned-section { padding:17px; }
}
