/* Физиогном Лаб — «протокол замеров»: белая бумага, один бордовый акцент, тёмные пластины с замерами на фото. */
@font-face {
  font-family: "Plex";
  src: url(fonts/plex-sub.woff2) format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --paper: #fff;
  --mist: #f2f3f5;
  --rule: #e4e5e9;
  --rule-2: #d3d5da;
  --ink: #16171b;
  --ink-2: #5e6169;
  --ink-3: #8b8e96;
  --brand: #8a1c38;
  --brand-press: #741730;
  --brand-soft: #f6e9ec;
  --plate: #141519;
  --trace: #ffc247;
  --ok: #1f7a4d;
  --bad: #b3261e;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 8px;
  --gut: 20px;
  --tab-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/24px "Plex", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
img, svg { display: block; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.num, .tnum { font-variant-numeric: tabular-nums; }

#app { max-width: 480px; margin: 0 auto; }
.screen { min-height: 100vh; padding: 8px var(--gut) calc(24px + var(--safe-b)); }
.flow { display: flex; flex-direction: column; }

/* ── типографика ── */
.display { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.015em; }
.title { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; }
.h3 { font-size: 17px; line-height: 24px; font-weight: 600; }
.lede { color: var(--ink-2); }
.sub { color: var(--ink-2); font-size: 15px; line-height: 22px; }
.caption { color: var(--ink-3); font-size: 13px; line-height: 18px; }
.muted { color: var(--ink-2); }

/* ── кнопки ── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px; padding: 0 20px; border-radius: var(--r-md);
  font-weight: 600; font-size: 16px; line-height: 20px; text-align: center;
  transition: background-color .15s, color .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:active { background: var(--brand-press); }
.btn-primary:disabled { background: var(--mist); color: var(--ink-3); cursor: default; }
.btn-secondary { background: var(--mist); color: var(--ink); }
.btn-secondary:active { background: var(--rule); }
.btn-text { height: 44px; color: var(--brand); font-weight: 600; }
.btn .star { width: 18px; height: 18px; flex: none; }
.link { color: var(--brand); font-weight: 600; font-size: 15px; line-height: 22px; }

.actions { position: sticky; bottom: 0; margin-top: auto; padding: 16px 0 calc(12px + var(--safe-b)); background: var(--paper); display: grid; gap: 8px; }
.flow .actions { margin-bottom: calc(-24px - var(--safe-b)); }

.chev { width: 8px; height: 8px; flex: none; margin-right: 3px; border-top: 1.6px solid var(--ink-3); border-right: 1.6px solid var(--ink-3); transform: rotate(45deg); }
.lock { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.spin { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── главная ── */
.brandbar { display: flex; align-items: center; gap: 10px; height: 48px; font-weight: 600; font-size: 16px; }
.mark { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 15px; line-height: 1; font-weight: 600; }
.hero { position: relative; margin-top: 8px; border-radius: var(--r-lg); background: var(--plate); overflow: hidden; aspect-ratio: 700 / 480; }
.hero svg { width: 100%; height: 100%; }
.hf-mesh { fill: none; stroke: #fff; stroke-opacity: .2; stroke-width: .9; }
.hf-node circle { fill: #fff; fill-opacity: .5; }
.hf-under line { stroke: #000; stroke-opacity: .4; stroke-width: 7; stroke-linecap: round; }
.hf-pri line { stroke: var(--trace); stroke-width: 3.2; stroke-linecap: round; }
.hf-sec line { stroke: #fff; stroke-opacity: .85; stroke-width: 2.4; stroke-linecap: round; }
.hf-dot circle { fill: var(--trace); stroke: var(--plate); stroke-width: 2; }
.hf-dot2 circle { fill: #fff; stroke: var(--plate); stroke-width: 2; }
.hf-chip rect { fill: var(--trace); }
.hf-chip text { fill: var(--ink); font: 600 23px "Plex", system-ui, sans-serif; text-anchor: middle; font-variant-numeric: tabular-nums; }
.hero-cap { position: absolute; left: 14px; right: 14px; bottom: 11px; color: rgba(255,255,255,.62); font-size: 12px; line-height: 16px; }
.home h1 { margin-top: 24px; }
.home .lede { margin-top: 10px; }
.home .btn-primary { margin-top: 24px; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.quick button { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; border-radius: var(--r-md); background: var(--mist); }
.quick button:active { background: var(--rule); }
.quick svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.quick b { display: block; font-weight: 600; font-size: 15px; line-height: 20px; }
.quick span span { display: block; color: var(--ink-2); font-size: 13px; line-height: 17px; }
.last { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 24px; padding: 12px; border: 1px solid var(--rule); border-radius: var(--r-md); }
.last img, .last .last-ph { width: 48px; height: 60px; border-radius: var(--r-sm); object-fit: cover; flex: none; background: var(--plate); }
.last-ph { overflow: hidden; }
.last-ph svg { display: block; width: 100%; height: 100%; }
.last-main { flex: 1; min-width: 0; }
.last-main .caption { display: block; }
.last-name { display: block; font-weight: 600; font-size: 17px; line-height: 24px; }
.home-note { margin-top: 20px; }

/* ── шаги ── */
.stepper { display: flex; align-items: center; gap: 12px; height: 40px; }
.stepper .caption { flex: none; }
.bars { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.bars i { height: 3px; border-radius: 2px; background: var(--rule); }
.bars i.on { background: var(--brand); }
.backlink { display: none; height: 40px; align-items: center; gap: 6px; color: var(--ink-2); font-size: 15px; }
.no-tg .backlink { display: inline-flex; }
.backlink .chev { transform: rotate(-135deg); margin: 0 0 0 3px; border-color: var(--ink-2); }
.flow .title { margin-top: 12px; }
.flow .sub { margin-top: 6px; }

.options { margin-top: 24px; display: grid; gap: 10px; }
.options button { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 16px; border: 1px solid var(--rule-2); border-radius: var(--r-md); transition: border-color .15s, background-color .15s; }
.options button[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.opt-main { flex: 1; }
.opt-main b { display: block; font-weight: 600; font-size: 17px; line-height: 24px; }
.opt-main span { display: block; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.radio { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.6px solid var(--rule-2); display: grid; place-items: center; }
[aria-checked="true"] .radio { border-color: var(--brand); }
[aria-checked="true"] .radio::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); }
.why { margin-top: 16px; }

.tips { margin-top: 14px; display: grid; gap: 6px; }
.tips li { display: flex; gap: 10px; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.tips svg { width: 18px; height: 22px; flex: none; fill: none; stroke: var(--ok); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tips-more { margin-top: 8px; align-self: flex-start; }

.frame { position: relative; margin-top: 18px; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 5; max-height: 52vh; width: 100%; cursor: pointer; background: var(--mist); }
.frame-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 20px; text-align: center; border: 1.5px dashed var(--rule-2); border-radius: var(--r-lg); }
.frame-empty svg { width: 96px; height: 116px; margin-bottom: 14px; fill: none; stroke: var(--ink-3); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.frame-empty b { font-weight: 600; }
.frame-empty span { color: var(--ink-2); font-size: 14px; line-height: 20px; }
.frame-photo { position: absolute; inset: 0; background: var(--plate); }
.frame-photo img, .frame-photo svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lines path, .lines line { fill: none; stroke: #fff; stroke-opacity: .85; stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s ease-out forwards; }
.lines .guide { stroke: var(--trace); stroke-opacity: .9; }
.lines circle { fill: var(--trace); opacity: 0; animation: pop .3s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }
.status { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); padding: 7px 12px; border-radius: 999px; background: rgba(20,21,25,.82); color: #fff; font-size: 14px; line-height: 18px; font-weight: 500; }
.status svg { width: 16px; height: 16px; flex: none; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.status.ok svg { stroke: #6fd39b; }
.status.bad svg { stroke: #ff8a80; }
.err { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md); background: #fbeceb; color: #7d1a14; font-size: 15px; line-height: 22px; }
.repick { margin-top: 10px; align-self: center; }

/* ── анализ ── */
.scan { display: flex; flex-direction: column; align-items: center; padding-top: 24px; }
.scan-stage { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--plate); }
.scan-stage img, .scan-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scan-stage::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--trace); box-shadow: 0 0 12px rgba(255,194,71,.7); animation: sweep 2.4s ease-in-out infinite; }
@keyframes sweep { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(var(--sweep, 300px)); } }
.scan-steps { width: 100%; margin-top: 24px; display: grid; gap: 12px; }
.scan-steps li { display: flex; align-items: center; gap: 12px; color: var(--ink-3); transition: color .2s; }
.scan-steps li.now { color: var(--ink); font-weight: 500; }
.scan-steps li.done { color: var(--ink-2); }
.scan-steps .dot { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.6px solid var(--rule-2); display: grid; place-items: center; }
.scan-steps .now .dot { border-color: var(--brand); border-top-color: transparent; animation: spin .9s linear infinite; }
.scan-steps .done .dot { border-color: var(--ok); background: var(--ok); }
.scan-steps .done .dot::after { content: ""; width: 9px; height: 5px; margin-top: -2px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }

/* ── разбор: шапка, страницы, нижнее меню ── */
.result { padding: 0 0 calc(var(--tab-h) + var(--safe-b)); }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; height: 52px; padding: 0 8px; background: rgba(255,255,255,.96); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--rule); }
.topbar-title { flex: 1; text-align: center; font-weight: 600; font-size: 17px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.page { padding: 4px var(--gut) 32px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 480px; margin: 0 auto; padding-bottom: var(--safe-b); background: var(--paper); border-top: 1px solid var(--rule); }
.tabbar button { position: relative; height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3); font-size: 11px; line-height: 14px; font-weight: 500; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button[aria-selected="true"] { color: var(--brand); }
.tabbar .lock { position: absolute; top: 7px; left: calc(50% + 9px); width: 12px; height: 12px; stroke: var(--ink-3); background: var(--paper); border-radius: 3px; }

/* ── блоки разбора ── */
.sec { margin-top: 32px; }
.sec > .h3 { margin-bottom: 4px; }
.sec > .h3 + .caption, .sec > .h3 + .sub { margin-bottom: 4px; }
.sec p + p { margin-top: 12px; }
.card { padding: 16px; border-radius: var(--r-md); background: var(--mist); }

.type-head { padding-top: 8px; }
.type-head .caption { display: block; }
.type-name { margin-top: 2px; }
.type-temper { margin-top: 4px; color: var(--ink-2); }
.plates { margin-top: 20px; display: grid; gap: 8px; }
.plates.two { grid-template-columns: 1fr 1fr; }
.plate { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--plate); aspect-ratio: 4 / 5; }
.plates.one .plate { aspect-ratio: 5 / 4; }
.plate > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.plate-cap { position: absolute; left: 12px; right: 12px; bottom: 10px; color: rgba(255,255,255,.7); font-size: 12px; line-height: 16px; }
.plate.empty { display: grid; place-items: center; }
.plate.empty svg { position: static; width: 64%; height: auto; opacity: .9; }
.lead { margin-top: 20px; font-size: 17px; line-height: 26px; }

.facts { margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.facts > div { padding: 12px 0; }
.facts > div + div { padding-left: 12px; border-left: 1px solid var(--rule); }
.facts b { display: block; font-size: 20px; line-height: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.facts span { display: block; color: var(--ink-2); font-size: 13px; line-height: 17px; }

.rows { border-top: 1px solid var(--rule); }
.row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.row-main { flex: 1; min-width: 0; }
.row-title { display: block; font-weight: 500; }
.row-sub { display: block; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.row-val { flex: none; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.row-tag { flex: none; padding: 3px 8px; border-radius: 6px; background: var(--mist); color: var(--ink-2); font-size: 12px; line-height: 16px; }
.row.locked .row-title { color: var(--ink-2); }

.shape { display: flex; gap: 16px; align-items: center; }
.shape svg { width: 56px; height: 68px; flex: none; fill: var(--brand-soft); stroke: var(--brand); stroke-width: 1.4; }
.shape .h3 { display: block; }
.after { margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip { padding: 5px 10px; border-radius: 8px; background: var(--mist); font-size: 14px; line-height: 20px; }

.thirds { margin-top: 14px; display: grid; gap: 8px; }
.third { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; }
.third-name { font-size: 15px; line-height: 20px; }
.third-name span { display: block; color: var(--ink-2); font-size: 13px; line-height: 18px; font-weight: 400; }
.third-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.third-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--mist); overflow: hidden; }
.third-bar i { display: block; height: 100%; border-radius: 3px; background: var(--rule-2); }
.third.on .third-bar i { background: var(--brand); }
.third.on .third-name { font-weight: 600; }

.pay { margin-top: 32px; padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--rule); }
.pay .h3 { display: block; }
.pay .sub { margin-top: 4px; }
.pay ul { margin: 14px 0 18px; display: grid; gap: 8px; }
.pay li, .paysheet li { display: flex; gap: 10px; font-size: 15px; line-height: 22px; }
.pay li svg, .paysheet li svg { width: 18px; height: 22px; flex: none; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pay .caption, .paysheet .caption { margin-top: 10px; text-align: center; }
.pay .btn + .btn { margin-top: 8px; }
.pay-price { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; }
.pay-price b { font-size: 28px; line-height: 34px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-price span { color: var(--ink-2); font-size: 14px; line-height: 20px; }
.again { margin-top: 28px; }
.disclaimer { margin-top: 24px; color: var(--ink-3); font-size: 13px; line-height: 18px; }
.note { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); background: var(--mist); color: var(--ink-2); font-size: 15px; line-height: 22px; }

/* ── метрики ── */
.seg { display: flex; gap: 6px; margin: 12px calc(-1 * var(--gut)) 0; padding: 0 var(--gut); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; height: 34px; padding: 0 14px; border-radius: 10px; background: var(--mist); color: var(--ink); font-size: 14px; font-weight: 500; }
.seg button[aria-selected="true"] { background: var(--ink); color: #fff; }
.seg button span { color: var(--ink-3); margin-left: 4px; font-variant-numeric: tabular-nums; }
.seg button[aria-selected="true"] span { color: rgba(255,255,255,.6); }
.m-intro { margin-top: 2px; }
.mgroup { margin-top: 24px; }
.mgroup > .caption { display: block; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.mrow { display: grid; grid-template-columns: 48px 1fr auto; grid-template-areas: "thumb name val" "thumb bar bar"; gap: 2px 12px; align-items: center; width: 100%; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.mthumb { grid-area: thumb; width: 48px; height: 60px; border-radius: var(--r-sm); overflow: hidden; background: var(--plate); align-self: start; }
.mthumb svg { display: block; width: 100%; height: 100%; }
.mrow.nothumb { grid-template-columns: 1fr auto; grid-template-areas: "name val" "bar bar"; }
.row .mthumb { align-self: center; }
.mname { grid-area: name; min-width: 0; }
.mname b { display: block; font-weight: 500; font-size: 15px; line-height: 20px; }
.mname span { display: block; color: var(--ink-2); font-size: 13px; line-height: 18px; }
.mval { grid-area: val; align-self: start; font-size: 17px; line-height: 22px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.mrow .ref { grid-area: bar; margin-top: 6px; }
.ref { display: block; position: relative; height: 12px; }
.ref::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; border-radius: 1px; background: var(--rule); }
.ref .band { position: absolute; top: 4px; height: 4px; border-radius: 2px; background: var(--rule-2); }
.ref .mid { position: absolute; left: 50%; top: 2px; width: 1px; height: 8px; background: var(--ink-3); }
.ref .you { position: absolute; top: 0; width: 4px; height: 12px; margin-left: -2px; border-radius: 2px; background: var(--brand); box-shadow: 0 0 0 2px var(--paper); }
.empty-list { padding: 24px 0; color: var(--ink-2); }

/* ── лист замера ── */
.md-plate { margin: 4px 0 0; border-radius: var(--r-lg); overflow: hidden; background: var(--plate); aspect-ratio: 5 / 4; position: relative; }
.md-plate > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.md-nav { display: flex; align-items: center; justify-content: space-between; height: 40px; margin-top: 4px; }
.md-nav .caption { font-variant-numeric: tabular-nums; }
.md-nav .icon-btn { width: 40px; height: 40px; }
.md-nav .icon-btn:disabled { opacity: .3; }
.md-zone { margin-top: 16px; }
.md-name { margin-top: 2px; }
.md-val { display: flex; align-items: baseline; gap: 12px; margin-top: 12px; }
.md-val b { font-size: 44px; line-height: 48px; font-weight: 300; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.md-val span { color: var(--ink-2); font-weight: 500; }
.md .ref { margin-top: 14px; height: 16px; }
.md .ref::before { top: 7px; height: 2px; }
.md .ref .band { top: 6px; height: 4px; }
.md .ref .mid { top: 3px; height: 10px; }
.md .ref .you { height: 16px; width: 4px; }
.ref-scale { display: flex; justify-content: space-between; margin-top: 6px; color: var(--ink-3); font-size: 12px; line-height: 16px; }
.md-cmp { margin-top: 14px; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.md-cmp b { color: var(--ink); font-weight: 600; }
.md-text { margin-top: 20px; font-size: 16px; line-height: 25px; }
.md-locked { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 20px; padding: 14px 16px; border-radius: var(--r-md); background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 15px; line-height: 20px; }
.md-locked .lock { stroke: var(--brand); }
.md-info { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rule); }
.md-info .h3 { font-size: 15px; line-height: 20px; }
.md-info p { margin-top: 6px; color: var(--ink-2); font-size: 15px; line-height: 22px; }
.md-info .h3 + p + .h3 { margin-top: 16px; }

/* ── зоны ── */
.zrow .row-title { font-weight: 600; }
.zrow .z-lead { display: block; margin-top: 2px; color: var(--ink); font-size: 14px; line-height: 20px; }
.zintro { margin-top: 12px; color: var(--ink-2); font-size: 15px; line-height: 22px; }
.trait { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rule); }
.trait .h3 { display: block; }
.trait p { margin-top: 6px; }
.evid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.evid button { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--mist); font-size: 13px; line-height: 18px; text-align: left; }
.evid b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── характер ── */
.axis { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.axis:first-of-type { border-top: 1px solid var(--rule); margin-top: 12px; }
.axis-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.axis-name { font-weight: 600; font-size: 17px; line-height: 24px; }
.axis-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.axis-hint { color: var(--ink-2); font-size: 14px; line-height: 20px; }
.meter { position: relative; height: 8px; margin-top: 12px; border-radius: 4px; background: var(--mist); }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--brand); }
.meter::after { content: ""; position: absolute; left: 50%; top: -3px; width: 1px; height: 14px; background: var(--ink-3); }
.meter-scale { display: flex; justify-content: space-between; margin-top: 6px; color: var(--ink-3); font-size: 12px; line-height: 16px; }
.axis-pos { margin-top: 10px; font-size: 15px; line-height: 22px; }
.list { display: grid; gap: 8px; margin-top: 10px; }
.list li { position: relative; padding-left: 18px; }
.list li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.h4 { margin-top: 18px; font-weight: 600; font-size: 15px; line-height: 20px; }
.advice { margin-top: 32px; padding: 18px; border-radius: var(--r-md); background: var(--brand-soft); }
.advice .h3 { display: block; color: var(--brand); }
.advice p { margin-top: 6px; }

/* ── нижний лист ── */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(22,23,27,.42); animation: fade .18s ease-out; }
.sheet-body { position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; padding: 22px var(--gut) calc(20px + var(--safe-b)); border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--paper); animation: rise .24s cubic-bezier(.2,.8,.2,1); }
.sheet-body::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--rule-2); }
.sheet-actions { display: grid; gap: 8px; margin-top: 24px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: .6; } }
.paysheet .title { margin-top: 8px; }
.paysheet ul { margin-top: 18px; display: grid; gap: 10px; }

.guide-art { margin: 6px 0 0; border-radius: var(--r-md); background: var(--mist); }
.guide-art svg { width: 100%; height: auto; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.guide-art .soft { stroke: var(--ink-3); stroke-dasharray: 4 4; }
.guide-art .acc { stroke: var(--brand); }
.guide-art .ok { stroke: var(--ok); stroke-width: 2.4; }
.guide-art .no { stroke: var(--bad); stroke-width: 2.4; }
.guide .caption { display: block; margin-top: 16px; }
.guide .title { margin-top: 2px; }
.guide p.sub { margin-top: 8px; }
.guide-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px; }

/* ── обучение, поддержка ── */
.page-title { margin-top: 12px; }
.page-sub { margin-top: 6px; color: var(--ink-2); }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 18px; padding: 4px; border-radius: 12px; background: var(--mist); }
.tabs2 button { height: 36px; border-radius: 9px; text-align: center; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.tabs2 button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(22,23,27,.08); }
.lessons { margin-top: 12px; }
.lessons .row { align-items: flex-start; }
.l-n { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--mist); display: grid; place-items: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lessons .chev { align-self: center; }
.lesson-art { padding-top: 12px; }
.lesson-art .title { margin-top: 4px; }
.l-lead { margin-top: 12px; font-size: 17px; line-height: 26px; }
.l-body { margin-top: 16px; }
.l-body p + p { margin-top: 14px; }
.lesson-art .btn { margin-top: 28px; }
.gzone { margin-top: 24px; }
.gzone > p { margin-top: 4px; color: var(--ink-2); font-size: 15px; line-height: 22px; }
.det { border-bottom: 1px solid var(--rule); }
.gzone .det:first-of-type, #faq .det:first-child { border-top: 1px solid var(--rule); margin-top: 10px; }
.det summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 0; list-style: none; cursor: pointer; font-weight: 500; }
.det summary::-webkit-details-marker { display: none; }
.det summary::after { content: ""; width: 8px; height: 8px; flex: none; margin-right: 4px; border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3); transform: rotate(45deg); transition: transform .15s; }
.det[open] summary::after { transform: rotate(-135deg); }
.det p { padding-bottom: 12px; color: var(--ink-2); font-size: 15px; line-height: 22px; }
.det p + p { margin-top: -4px; }
.support .btn { margin-top: 24px; }

.fail { display: flex; flex-direction: column; justify-content: center; text-align: left; }
.fail .ico { width: 48px; height: 48px; border-radius: 14px; background: #fbeceb; display: grid; place-items: center; }
.fail .ico svg { width: 24px; height: 24px; fill: none; stroke: var(--bad); stroke-width: 2; stroke-linecap: round; }
.fail .title { margin-top: 16px; }
.fail p { margin-top: 8px; color: var(--ink-2); }
.fail .btn-primary { margin-top: 28px; }
.fail .btn-secondary { margin-top: 8px; }

/* ── пластины: замеры на фото (толщина линий задаётся в единицах кадра из app.js) ── */
.pl-under { fill: none; stroke: #000; stroke-opacity: .45; stroke-linecap: round; }
.pl-pri { fill: none; stroke: var(--trace); stroke-linecap: round; }
.pl-sec { fill: none; stroke: #fff; stroke-opacity: .85; stroke-linecap: round; }
.pl-pt { fill: #fff; stroke: var(--plate); }
.pl-pt.pri { fill: var(--trace); }
.pl-wedge { fill: var(--trace); fill-opacity: .2; stroke: var(--trace); stroke-linejoin: round; }
.pl-chip rect { fill: var(--trace); }
.pl-chip text { fill: var(--ink); font-family: "Plex", system-ui, sans-serif; font-weight: 600; text-anchor: middle; font-variant-numeric: tabular-nums; }
.pl-oval { fill: none; stroke: #fff; stroke-opacity: .32; stroke-linejoin: round; }
.pl-third { fill: none; stroke: #fff; stroke-opacity: .8; }
.pl-band { fill: var(--trace); fill-opacity: .16; }
.pl-lab { fill: #fff; font-family: "Plex", system-ui, sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; }
.pl-lab.on { fill: var(--trace); }
.pl-contour { fill: none; stroke: #fff; stroke-opacity: .9; stroke-linejoin: round; stroke-linecap: round; }
.ph-ph { display: grid; place-items: center; align-content: center; gap: 6px; padding: 14px; text-align: center; background: var(--mist); color: var(--ink-2); font-size: 13px; line-height: 18px; }
.ph-ph svg { width: 40px; height: 48px; fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ph-ph b { color: var(--ink); font-weight: 600; font-size: 14px; }

@media (max-height: 700px) {
  .hero { aspect-ratio: 700 / 400; }
  .home h1 { margin-top: 18px; font-size: 26px; line-height: 32px; }
  .home .btn-primary { margin-top: 18px; }
}
@media (max-width: 350px) {
  :root { --gut: 16px; }
  .display { font-size: 26px; line-height: 32px; }
  .quick button { padding: 10px; gap: 8px; }
  .pay { padding: 16px 14px; }
  .pay .btn, .paysheet .btn { padding: 0 12px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .lines path, .lines line { stroke-dashoffset: 0; }
  .lines circle { opacity: 1; }
}

/* ── ожидание оплаты ЮKassa ── */
.wait { padding-top: 10px; text-align: center; }
.wait .ring { width: 40px; height: 40px; margin: 6px auto 0; border-radius: 50%; border: 3px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .9s linear infinite; }
.wait.ok .ring { animation: none; border-color: var(--ok); border-top-color: var(--ok); display: grid; place-items: center; }
.wait.ok .ring svg { width: 18px; height: 18px; fill: none; stroke: var(--ok); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.wait .title { margin-top: 16px; }
.wait .sub { margin-top: 8px; }
.wait .sheet-actions { text-align: left; }
.wait-err { margin-top: 12px; color: var(--bad); font-size: 14px; line-height: 20px; }
.wait-err.note { color: var(--ink-2); }
.hist { margin-top: 12px; }
.hist .row { min-height: 52px; }
