/* Тест цінностей. Дизайн-код v1: білий і світло-сірий, майже чорний текст, один акцент точково.
   Джерело: outputs/brand-system-2026-10-28/design-code.html */
:root {
  --bg: #FFFFFF; --surface: #F4F3F0; --surface-2: #EAE8E3; --line: #E4E1DB;
  --ink: #0E0E0F; --ink-2: #55534F; --muted: #8E8A83;
  --accent: #FF4A1C;
  --display: 'Inter Tight', system-ui, sans-serif; --text: 'Inter', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --r-s: 10px; --r-m: 18px; --r-l: 28px;
  --gut: 16px; --max: 680px;
}
@media (min-width: 640px) { :root { --gut: 32px; } }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16.5px/1.5 var(--text); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.035em; margin: 0; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.hl { color: var(--accent); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 24px var(--gut) 160px; }
.eyebrow { font: 500 12px/1.3 var(--mono); letter-spacing: .02em; color: var(--muted); margin: 0; }
.fade { animation: fade .22s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.top-in { max-width: var(--max); margin: 0 auto; padding: 12px var(--gut); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 16px/1 var(--display); letter-spacing: -0.03em; }
.mark b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; letter-spacing: 0; }
.step { font: 500 12px/1 var(--mono); color: var(--muted); }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 24px; border-radius: 999px; font: 600 15.5px/1 var(--display); letter-spacing: -0.01em; text-decoration: none; border: 1px solid transparent; background: var(--surface); color: var(--ink); cursor: pointer; transition: background .2s, opacity .2s; white-space: nowrap; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.small { height: 40px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .35; cursor: default; }
@media (hover: hover) {
  .btn:not([disabled]):hover { background: var(--surface-2); }
  .btn.primary:not([disabled]):hover { background: #2A2A2C; }
  .btn.ghost:not([disabled]):hover { background: var(--surface); }
}
.icon-btn { width: 52px; padding: 0; flex: none; font-size: 18px; }
.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink-2); font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- нижня панель ---------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255, 255, 255, .95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 12px var(--gut) calc(12px + env(safe-area-inset-bottom)); }
.bar[hidden] { display: none; }
.bar-in { max-width: calc(var(--max) - var(--gut) * 2); margin: 0 auto; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-note { font-size: 14px; line-height: 1.35; color: var(--ink-2); min-height: 38px; margin-bottom: 10px; }
.bar-note b { color: var(--ink); font-weight: 600; }
.count { flex: 1; min-width: 0; }
.count b { display: block; font: 700 20px/1 var(--display); letter-spacing: -0.03em; margin-bottom: 7px; }
.count small { font: 500 12px/1 var(--mono); color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.meter { display: block; height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--ink); transition: width .25s ease; }

/* ---------- старт ---------- */
.intro { padding-top: clamp(24px, 7vw, 64px); }
.intro h1 { font-size: clamp(44px, 10vw, 68px); line-height: 1; letter-spacing: -0.045em; margin-top: 16px; }
.intro .lead { font-size: clamp(17px, 2.2vw, 19px); color: var(--ink-2); margin-top: 18px; }
.plan { list-style: none; padding: 8px 20px; margin: 28px 0 0; background: var(--surface); border-radius: var(--r-l); }
.plan li { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.plan li:first-child { border-top: 0; }
.plan span { font: 500 12px/1 var(--mono); color: var(--muted); flex: none; }
.plan b { font: 600 17px/1.25 var(--display); letter-spacing: -0.02em; flex: 1; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 24px; }
.actions .btn.primary { min-width: 200px; }
.fine { font-size: 14px; color: var(--muted); margin-top: 18px; }

/* ---------- заголовки кроків ---------- */
.title { font-size: clamp(30px, 6vw, 40px); line-height: 1.06; }
.sub { color: var(--ink-2); margin-top: 10px; }

/* ---------- крок 1: вибір ---------- */
.group { margin-top: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 0; background: var(--surface); font: 500 15px/1.25 var(--text); text-align: left; cursor: pointer; transition: background .15s, color .15s, opacity .15s; overflow-wrap: anywhere; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip.off { opacity: .42; }
@media (hover: hover) { .chip[aria-pressed="false"]:hover { background: var(--surface-2); } }
.own { display: flex; gap: 8px; margin-top: 10px; }
.own input { flex: 1; min-width: 0; height: 44px; border-radius: 999px; border: 1px solid var(--line); padding: 0 16px; font: 400 16px var(--text); background: #fff; color: var(--ink); }
.own input::placeholder { color: var(--muted); }
.own input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.own .btn { height: 44px; }

/* ---------- крок 2: порядок ---------- */
.rows { display: grid; gap: 8px; margin-top: 22px; }
.row { display: flex; align-items: stretch; background: var(--surface); border-radius: var(--r-m); overflow: hidden; }
.row.done { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-height: 64px; border: 0; background: none; text-align: left; cursor: pointer; }
.row-main[disabled] { cursor: default; }
.num { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px dashed var(--muted); font: 700 14px/1 var(--display); }
.row.done .num { background: var(--ink); border: 0; color: #fff; }
.row-text { min-width: 0; }
.row-text b { display: block; font: 600 16.5px/1.25 var(--display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.row-text span { display: block; font-size: 13.5px; line-height: 1.35; color: var(--ink-2); margin-top: 2px; }
.row-text span::first-letter { text-transform: uppercase; }
.arrows { flex: none; display: flex; align-items: center; gap: 2px; padding-right: 8px; }
.arrows button { width: 40px; height: 44px; border: 0; border-radius: var(--r-s); background: none; font-size: 18px; cursor: pointer; }
.arrows button[disabled] { opacity: .2; cursor: default; }
@media (hover: hover) { .arrows button:not([disabled]):hover { background: var(--surface); } }
.after-rows { margin-top: 16px; }

/* ---------- крок 3: пари ---------- */
.duel { max-width: 860px; margin: 0 auto; padding: 8px var(--gut) 88px; min-height: calc(100vh - 56px); min-height: calc(100dvh - 56px); display: flex; flex-direction: column; }
.duel-q { font-size: clamp(30px, 6vw, 40px); line-height: 1.06; margin-top: 18px; }
.duel-tip { min-height: 22px; font-size: 14.5px; color: var(--ink-2); margin-top: 6px; }
.pair { flex: 1; display: grid; grid-template-rows: minmax(120px, 1fr) auto minmax(120px, 1fr); gap: 8px; margin-top: 16px; max-height: 560px; }
.opt { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 20px 22px; border: 0; border-radius: var(--r-l); background: var(--surface); text-align: left; cursor: pointer; transition: background .12s, color .12s, transform .12s; }
.opt b { font: 700 clamp(26px, 6.4vw, 36px)/1.05 var(--display); letter-spacing: -0.035em; overflow-wrap: anywhere; }
.opt span { font-size: 15px; line-height: 1.4; color: var(--ink-2); transition: color .12s; }
.opt span::first-letter { text-transform: uppercase; }
.opt.was { box-shadow: inset 0 0 0 2px var(--ink); }
.opt.picked { background: var(--ink); color: #fff; transform: scale(.985); }
.opt.picked span { color: #C9C7C2; }
@media (hover: hover) { .opt:not(.picked):hover { background: var(--surface-2); } }
.or { justify-self: center; font: 500 12px/1 var(--mono); color: var(--muted); padding: 2px 0; }
@media (min-width: 720px) {
  .pair { grid-template-rows: none; grid-template-columns: 1fr auto 1fr; align-items: stretch; max-height: 380px; }
  .or { align-self: center; padding: 0 6px; }
  .opt { padding: 28px; }
}

/* ---------- результат ---------- */
.res-label { font: 500 12px/1.4 var(--mono); color: var(--muted); margin: 8px 0 0; }
.res-top { font-size: clamp(46px, 12vw, 80px); line-height: .98; letter-spacing: -0.05em; margin-top: 8px; color: var(--accent); overflow-wrap: anywhere; }
.res-say { font-size: clamp(17px, 2.2vw, 19px); color: var(--ink-2); margin-top: 16px; }
.res-say b { color: var(--ink); font-weight: 600; }
.board { list-style: none; padding: 0; margin: 28px 0 0; }
.board li { display: grid; grid-template-columns: 26px 1fr 40px; align-items: center; column-gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.board .pos { font: 500 13px/1 var(--mono); color: var(--muted); }
.board b { display: block; font: 600 16.5px/1.25 var(--display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.track { display: block; height: 6px; border-radius: 99px; background: var(--surface); margin-top: 7px; overflow: hidden; }
.track i { display: block; height: 100%; min-width: 6px; border-radius: 99px; background: var(--muted); }
.board .move { font: 500 13px/1 var(--mono); color: var(--muted); text-align: right; }
.board .move.up { color: var(--ink); }
.board li.lead-row b { font-size: clamp(21px, 4.4vw, 26px); font-weight: 700; letter-spacing: -0.03em; }
.board li.lead-row .pos { color: var(--ink); }
.board li.lead-row .track i { background: var(--ink); }
.legend { font-size: 13.5px; line-height: 1.45; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.facts { display: grid; gap: 8px; margin-top: 24px; }
@media (min-width: 560px) { .facts.two { grid-template-columns: 1fr 1fr; } }
.fact { background: var(--surface); border-radius: var(--r-m); padding: 18px 20px; }
.fact small { display: block; font: 500 12px/1.3 var(--mono); color: var(--muted); }
.fact b { display: block; font: 700 21px/1.15 var(--display); letter-spacing: -0.03em; margin: 8px 0 4px; overflow-wrap: anywhere; }
.fact span { font-size: 14.5px; color: var(--ink-2); }
.fact p { font-size: 15.5px; color: var(--ink-2); margin-top: 8px; }
.share { margin-top: 40px; scroll-margin-top: 72px; }
.share h2 { font-size: clamp(26px, 5vw, 32px); line-height: 1.1; }
.share .sub { font-size: 15.5px; }
.share-grid { display: grid; gap: 16px; margin-top: 18px; }
@media (min-width: 560px) { .share-grid { grid-template-columns: 240px 1fr; align-items: start; } }
.card-img { width: min(240px, 66vw); aspect-ratio: 9 / 16; border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); overflow: hidden; }
.card-img img { display: block; width: 100%; height: 100%; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.saved-note { font-size: 14px; color: var(--muted); margin-top: 12px; }
.res-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }
.res-foot a { font-size: 14.5px; color: var(--ink-2); text-underline-offset: 3px; }

/* ---------- повідомлення ---------- */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 40; transform: translate(-50%, 8px); width: max-content; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; line-height: 1.3; text-align: center; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
