/* SIMDEC v3 — оформлення за брендбуком ДонДУВС */
:root {
  --navy: #112F6D;
  --blue: #0D55A3;
  --sky: #006AB0;
  --graphite: #4D5E6B;
  --gold: #C9A227;
  --gold-soft: #F3E7BF;
  --ink: #15213B;
  --muted: #5E6B80;
  --line: #DDE3EC;
  --bg: #F2F5F9;
  --card: #FFFFFF;
  --ok: #1E7A4C;
  --ok-bg: #E6F4EC;
  --bad: #A8322A;
  --bad-bg: #FBEAE8;
  --ring-todo: #DCE3EE;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 47, 109, .06), 0 8px 24px rgba(17, 47, 109, .07);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: "Golos Text", "Segoe UI", system-ui, sans-serif;
  font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg);
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
a { color: var(--blue); }
img { max-width: 100%; }
.app { flex: 1; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 28px 16px 56px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- шапка ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, calc((100% - 1128px) / 2));
  background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10;
  border-bottom: 3px solid var(--gold);
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; min-width: 0; }
.brand img { flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-uni { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: .02em; }
.brand-name em { font-style: normal; font-weight: 500; font-size: 14px; opacity: .85; margin-left: 4px; letter-spacing: 0; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 14px; background: rgba(255,255,255,.1); padding: 6px 12px; border-radius: 99px; white-space: nowrap; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.chip-change { background: none; border: 0; color: #C9D6EE; text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; padding: 0; }
.preview-banner { background: var(--gold-soft); color: #5C4708; text-align: center; padding: 8px 16px; font-size: 14px; font-weight: 600; }

/* ---------- підвал ---------- */
.footer { background: #0C2350; color: #B9C6DE; font-size: 14px; }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 24px 16px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner div:first-child { display: flex; flex-direction: column; }
.footer strong { color: #fff; font-weight: 600; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; padding: 12px 20px; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--mc, var(--blue)); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-gold { background: var(--gold); color: #1D1A0E; }
.btn-gold:hover { background: #D6B23C; }
.btn-ghost { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--blue); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- загальні ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 700; color: var(--gold); margin-bottom: 12px; }
.eyebrow.dark { color: var(--mc, var(--blue)); }
.label { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.back { display: inline-block; font-weight: 600; text-decoration: none; margin-bottom: 18px; font-size: 15px; }
.back:hover { text-decoration: underline; }
.section-title { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--navy); padding-bottom: 10px; border-bottom: 2px solid var(--gold); margin: 0 0 16px; display: flex; align-items: center; gap: 8px; }
.count { background: var(--navy); color: #fff; border-radius: 99px; font-size: 12px; padding: 1px 9px; letter-spacing: 0; }
.page-head { max-width: 640px; margin-bottom: 26px; }
.page-head h2 { font-size: clamp(26px, 4vw, 34px); }
.form-error { color: var(--bad); font-size: 14px; margin: 8px 0 0; }

/* кільце циклу */
.cycle { display: block; }
.seg-letter { font: 700 15px "Golos Text", sans-serif; }
.ring-top { font: 800 22px "Golos Text", sans-serif; fill: var(--navy); }
.ring-bottom { font: 500 12px "Golos Text", sans-serif; fill: var(--muted); }
.seg-current { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { stroke-opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .seg-current { animation: none; } }

/* ---------- вітання ---------- */
.hero { background: linear-gradient(125deg, var(--navy) 0%, #0D3F86 55%, var(--sky) 100%); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 2px, transparent 2px 22px); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: 56px 16px 64px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; margin-bottom: 18px; }
.lead { font-size: 17px; color: #DCE6F7; max-width: 620px; }
.name-form { margin-top: 28px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); padding: 18px; max-width: 620px; }
.name-form label { display: block; font-weight: 600; margin-bottom: 8px; }
.name-row { display: flex; gap: 10px; flex-wrap: wrap; }
.name-row input { flex: 1 1 240px; min-width: 0; padding: 12px 14px; border-radius: 10px; border: 0; font: inherit; color: var(--ink); }
.privacy { font-size: 13px; color: #B7C7E3; margin: 10px 0 0; }
.name-form .form-error { color: #FFD3CE; }
.orbit { position: relative; height: 340px; }
.orbit-ring { position: absolute; background: #fff; border-radius: 50%; padding: 10px; box-shadow: 0 16px 40px rgba(0,0,0,.25); }
.orbit-0 { left: 4%; top: 6%; }
.orbit-1 { right: 4%; top: 30%; }
.orbit-2 { left: 24%; bottom: 0; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 32px; }
.how-item { display: flex; gap: 14px; background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.how-item span { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: grid; place-items: center; }
.how-item b { display: block; margin-bottom: 2px; }
.how-item div { font-size: 15px; color: var(--muted); }
.how-item div b { color: var(--ink); }

/* ---------- моделі ---------- */
.model-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.model-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: inherit; overflow: hidden; border-top: 5px solid var(--mc); transition: transform .15s, box-shadow .15s; }
.model-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(17,47,109,.14); }
.model-card-ring { padding: 22px 22px 0; }
.model-card-body { padding: 16px 22px; flex: 1; }
.model-card h3 { font-size: 21px; margin-bottom: 2px; }
.model-sub { color: var(--mc); font-weight: 600; font-size: 14px; }
.model-card-body > p:last-of-type { color: var(--muted); font-size: 15px; }
.model-stages { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.model-stages span { background: var(--bg); padding: 3px 8px; border-radius: 6px; color: var(--navy); }
.model-stages i { font-style: normal; color: var(--muted); }
.model-card-foot { display: flex; justify-content: space-between; padding: 14px 22px; border-top: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.model-card-foot .arrow { color: var(--mc); }

/* ---------- сторінка моделі ---------- */
.model-hero { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; border-left: 6px solid var(--mc); margin-bottom: 26px; }
.model-hero h2 { font-size: clamp(26px, 4vw, 36px); }
.model-hero p { max-width: 680px; color: #33405A; }
.layout-2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: start; }
.theory, .cases { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.cases { position: sticky; top: 86px; }
.stage-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 14px; }
.stage-list li { display: flex; gap: 14px; }
.stage-list p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.stage-num { flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--mc); color: #fff; display: grid; place-items: center; font-weight: 700; }
.example { background: var(--bg); border-radius: 12px; padding: 18px 20px; margin: 0 0 18px; }
.example h4 { color: var(--navy); }
.example ul { margin: 0; padding-left: 20px; }
.quote { display: flex; gap: 18px; align-items: center; margin: 22px 0 0; padding: 18px; border-radius: 12px; background: linear-gradient(90deg, var(--gold-soft), #FBF6E6); }
.quote img { width: 92px; height: 116px; object-fit: cover; border-radius: 10px; flex: none; filter: grayscale(.2); }
.quote-lead { font-size: 14px; color: #6B5A20; margin-bottom: 6px; }
.quote blockquote { margin: 0; font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.quote figcaption { margin-top: 6px; font-size: 14px; color: #6B5A20; }
.case-item { display: flex; align-items: center; gap: 14px; padding: 14px 12px; border-radius: 12px; text-decoration: none; color: inherit; border: 1.5px solid var(--line); margin-bottom: 10px; transition: border-color .15s, background .15s; }
.case-item:hover { border-color: var(--mc); background: #FAFBFD; }
.case-num { font-weight: 800; font-size: 18px; color: var(--mc); min-width: 28px; }
.case-text { flex: 1; display: flex; flex-direction: column; }
.case-text b { font-weight: 600; line-height: 1.35; }
.case-text small { color: var(--muted); font-size: 13px; margin-top: 2px; }
.case-go { color: var(--mc); font-weight: 700; }

/* ---------- проходження ---------- */
.play-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.play-bar .back { margin: 0; }
.progress { display: flex; gap: 6px; }
.progress span { width: 44px; height: 6px; border-radius: 99px; background: var(--ring-todo); }
.progress .p-now { background: var(--mc); opacity: .45; }
.progress .p-done { background: var(--mc); }
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px; align-items: start; }
.briefing { background: var(--navy); color: #E3EAF7; border-radius: var(--radius); padding: 24px; position: sticky; top: 86px; max-height: calc(100vh - 110px); overflow: auto; }
.briefing .label { color: var(--gold); }
.briefing h2 { color: #fff; font-size: 22px; }
.brief-body summary { cursor: pointer; font-weight: 700; color: #fff; text-transform: uppercase; font-size: 13px; letter-spacing: .08em; margin: 8px 0 12px; }
.brief-text p { font-size: 15.5px; }
.stage-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.stage-head { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.stage-head h3 { font-size: 24px; margin: 0; color: var(--mc); }
.stage-head h3 span { color: var(--ink); font-weight: 500; }
.question { font-size: 17px; }
.question p:last-child { font-weight: 600; }
.options { display: grid; gap: 10px; margin-top: 14px; }
.opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 14px 16px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); font: inherit; font-size: 15.5px; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover:not(:disabled) { border-color: var(--mc); background: #FAFBFD; }
.opt:disabled { cursor: default; }
.opt-key { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--navy); }
.opt-ok { border-color: var(--ok); background: var(--ok-bg); }
.opt-ok .opt-key { background: var(--ok); color: #fff; }
.opt-bad { border-color: #E7B8B3; background: var(--bad-bg); color: #6E2A25; }
.opt-bad .opt-key { background: var(--bad); color: #fff; }
.options:has(.opt-ok) .opt:not(.opt-ok):not(.opt-bad) { opacity: .55; }
.feedback { margin-top: 16px; padding: 16px 18px; border-radius: 12px; border-left: 5px solid; animation: rise .25s ease-out; }
.fb-ok { background: var(--ok-bg); border-color: var(--ok); }
.fb-bad { background: var(--bad-bg); border-color: var(--bad); }
.fb-title { font-weight: 700; margin-bottom: 6px; }
.fb-ok .fb-title { color: var(--ok); }
.fb-bad .fb-title { color: var(--bad); }
.feedback .btn { margin-top: 6px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ---------- результат ---------- */
.result { max-width: 760px; margin: 0 auto; }
.result-top { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.result-top h2 { font-size: 26px; }
.score-num { font: 800 26px "Golos Text", sans-serif; fill: var(--ink); }
.score-pct { font: 600 13px "Golos Text", sans-serif; fill: var(--muted); }
.result-steps { list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.result-steps li { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 12px; background: var(--bg); position: relative; font-size: 14px; color: var(--muted); }
.result-steps b { color: var(--ink); font-size: 15px; }
.rs-mark { position: absolute; right: 12px; top: 10px; font-weight: 800; }
.rs-ok .rs-mark { color: var(--ok); }
.rs-bad .rs-mark { color: var(--bad); }
.send-box { padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.send-box p { margin: 8px 0 0; }
.sent-ok { color: var(--ok); font-weight: 600; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- адаптивність ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 40px 16px 44px; }
  .hero-art { display: none; }
  .how { grid-template-columns: 1fr; }
  .layout-2, .play-grid { grid-template-columns: 1fr; }
  .cases, .briefing { position: static; max-height: none; }
  .model-hero { grid-template-columns: 1fr; padding: 22px; }
  .model-hero-ring { display: none; }
}
@media (max-width: 560px) {
  .brand-name em, .brand-uni { display: none; }
  .card, .theory, .cases, .stage-card, .briefing { padding: 18px; }
  .stage-head .cycle { width: 72px; height: 72px; }
  .stage-head h3 { font-size: 20px; }
  .progress span { width: 28px; }
  .quote { flex-direction: column; align-items: flex-start; }
}
