/* Личный финансовый план — оформление.
   Палитра: графит + бронза. Мобильный первый, ширина до 480 px. */

:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --ink: #1c2026;
  --ink-2: #3b434c;
  --muted: #6d7379;
  --line: #e6e2d9;
  --line-strong: #d8d3c7;
  --accent: #a06a22;
  --accent-ink: #ffffff;
  --accent-soft: #f4ead9;
  --good: #256b4c;
  --good-soft: #e4f0e9;
  --warn: #94601b;
  --warn-soft: #f7ecd9;
  --bad: #a03b36;
  --bad-soft: #f8e8e6;
  --r-card: 18px;
  --r-btn: 14px;
  --shadow: 0 1px 2px rgba(28, 32, 38, .04), 0 12px 28px -22px rgba(28, 32, 38, .35);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: 66px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15.5px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
}
.app--plain { padding-bottom: calc(24px + var(--safe-b)); }

.pad { padding: 0 16px; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }

/* ───────── шапка ───────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 10px;
  background: rgba(246, 245, 242, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar--line { border-bottom-color: var(--line); }
.topbar__title { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.topbar__sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.topbar__spacer { flex: 1; }

.iconbtn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  color: var(--ink-2);
  padding: 0;
}
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn:active { background: var(--surface-2); }

/* ───────── типографика ───────── */

.h1 { font-size: 26px; line-height: 1.16; font-weight: 680; letter-spacing: -.03em; }
.h2 { font-size: 19px; line-height: 1.25; font-weight: 650; letter-spacing: -.02em; }
.h3 { font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.lead { color: var(--muted); font-size: 14.5px; }
.small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.tiny { font-size: 11.5px; color: var(--muted); }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.num { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ───────── карточки ───────── */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card--flat { box-shadow: none; }
.card--accent { background: var(--accent-soft); border-color: #e7d6b8; }
.card--ink { background: #23282f; border-color: #23282f; color: #f4f2ee; }
.card--ink .muted, .card--ink .small { color: #b9bdc4; }
.card__head { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.card__title { font-size: 15px; font-weight: 650; }
.card + .card { margin-top: 12px; }

.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 22px 4px 10px;
  font-size: 13px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted);
}
.section-title a { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 13px; }

/* ───────── кнопки ───────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 18px;
  border-radius: var(--r-btn);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px; font-weight: 600;
  letter-spacing: -.01em;
  transition: transform .06s ease, background .15s ease;
}
.btn:active { transform: scale(.985); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:active { background: #8d5d1d; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--accent); min-height: 44px; }
.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 40px; font-size: 14px; padding: 0 14px; border-radius: 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }

/* ───────── поля ───────── */

.field { display: block; }
.field + .field { margin-top: 12px; }
.field__label { display: block; font-size: 12.5px; font-weight: 560; color: var(--muted); margin-bottom: 6px; }
.input, .select {
  display: block; width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  font-size: 16px;
  outline: none;
  appearance: none;
}
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(160, 106, 34, .12); }
.select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236d7379' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.input--num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.input-row { display: flex; gap: 10px; align-items: flex-end; }
.input-row .grow { flex: 1; min-width: 0; }
.input-row .w120 { width: 118px; flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 14px; font-weight: 500;
  color: var(--ink-2);
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip--accent[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.35; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }

/* ───────── строки списков ───────── */

.list { margin: 0; }
.list__row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}
.list__row:first-child { border-top: none; }
.list__main { flex: 1; min-width: 0; }
.list__name { font-size: 15px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list__meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.list__val { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list__del {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border: none; background: transparent; color: var(--muted);
  border-radius: 9px; font-size: 18px; line-height: 1;
}
.list__del:active { background: var(--bad-soft); color: var(--bad); }

.row-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14.5px; }
.row-line + .row-line { border-top: 1px solid var(--line); }
.row-line dt { color: var(--muted); }
.row-line dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.row-line--total { font-size: 16px; padding-top: 10px; }
.row-line--total dt { color: var(--ink); font-weight: 600; }

/* ───────── главный показатель ───────── */

.hero {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 16px;
}
.score-ring { width: 118px; height: 118px; flex: none; position: relative; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring__val {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
}
.score-ring__num { font-size: 34px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.score-ring__of { font-size: 11px; color: var(--muted); margin-top: 3px; }
.hero__text { min-width: 0; }
.hero__label { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.hero__title { font-size: 21px; font-weight: 680; letter-spacing: -.02em; margin-top: 4px; }
.hero__note { font-size: 13.5px; color: var(--muted); margin-top: 5px; line-height: 1.35; }

/* ───────── метрики ───────── */

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 13px 14px;
}
.kpi__label { font-size: 11.5px; color: var(--muted); line-height: 1.25; min-height: 29px; }
.kpi__value { font-size: 21px; font-weight: 690; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi__hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.kpi--bad .kpi__value { color: var(--bad); }
.kpi--warn .kpi__value { color: var(--warn); }
.kpi--good .kpi__value { color: var(--good); }

.bar { height: 7px; border-radius: 99px; background: #ece8df; overflow: hidden; margin-top: 10px; }
.bar__fill { height: 100%; background: var(--accent); border-radius: 99px; }
.bar__fill--ok { background: var(--good); }
.bar__fill--bad { background: var(--bad); }

/* ───────── шаги / действия ───────── */

.steps { counter-reset: step; }
.step { display: flex; gap: 12px; padding: 12px 0; }
.step + .step { border-top: 1px solid var(--line); }
.step__num {
  counter-increment: step;
  flex: none; width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  margin-top: 1px;
}
.step__num::before { content: counter(step); }
.step__title { font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.step__detail { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }

.action-first {
  border: 1px solid #e7d6b8;
  background: linear-gradient(180deg, #fdf8ef, #f7efdf);
  border-radius: var(--r-card);
  padding: 16px;
}
.action-first__label { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.action-first__title { font-size: 18px; font-weight: 670; letter-spacing: -.02em; margin-top: 6px; line-height: 1.25; }
.action-first__text { font-size: 13px; color: var(--ink-2); margin-top: 6px; }

/* ───────── проблемы ───────── */

.problem { display: flex; gap: 12px; padding: 13px 0; }
.problem + .problem { border-top: 1px solid var(--line); }
.problem__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-top: 7px; flex: none; }
.problem__dot--warn { background: var(--warn); }
.problem__title { font-size: 14.5px; font-weight: 620; }
.problem__text { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }

/* ───────── факторы скоринга ───────── */

.factor { padding: 13px 0; }
.factor + .factor { border-top: 1px solid var(--line); }
.factor__top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.factor__title { font-size: 14px; font-weight: 550; line-height: 1.3; }
.factor__pts { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.factor__meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 5px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.badge--ok { background: var(--good-soft); color: var(--good); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--bad { background: var(--bad-soft); color: var(--bad); }

/* ───────── прогноз ───────── */

.forecast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.forecast__item { text-align: center; padding: 12px 6px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.forecast__h { font-size: 11.5px; color: var(--muted); }
.forecast__v { font-size: 16px; font-weight: 680; letter-spacing: -.02em; margin-top: 5px; font-variant-numeric: tabular-nums; }
.forecast__d { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* ───────── нижняя навигация ───────── */

.nav {
  position: fixed;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: min(480px, 100%);
  z-index: 30;
  display: flex;
  padding: 6px 4px calc(6px + var(--safe-b));
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.nav__item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px;
  background: none; border: none;
  color: var(--muted);
  font-size: 10.5px; font-weight: 550; letter-spacing: .01em;
  border-radius: 10px;
}
.nav__item svg { width: 22px; height: 22px; }
.nav__item[aria-current="page"] { color: var(--accent); }
.nav__item:active { background: var(--surface-2); }

/* ───────── онбординг ───────── */

.ob { padding-bottom: 8px; display: flex; flex-direction: column; min-height: 100dvh; }
.ob__top { padding: 10px 16px 4px; display: flex; align-items: center; gap: 12px; }
.ob__back {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink-2);
  padding: 0;
}
.ob__back svg { width: 18px; height: 18px; }
.ob__step { font-size: 12px; color: var(--muted); font-weight: 550; }
.ob__title { font-size: 22px; font-weight: 680; letter-spacing: -.03em; line-height: 1.18; margin-top: 2px; }
.ob__hint { font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.progress { height: 4px; background: #e9e4d9; border-radius: 99px; margin: 12px 16px 0; overflow: hidden; }
.progress__fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width .25s ease; }
.ob__body { padding: 16px; flex: 1; }
.ob__foot {
  position: sticky; bottom: 0;
  padding: 12px 16px calc(14px + var(--safe-b));
  background: linear-gradient(180deg, rgba(246,245,242,0), rgba(246,245,242,.96) 26%);
}

/* ───────── приветствие ───────── */

.welcome { padding: 28px 20px 24px; display: flex; flex-direction: column; min-height: 100dvh; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--ink); color: #f4f2ee;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 650; letter-spacing: .04em;
}
.brand__name { font-size: 13.5px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); }
.welcome__hero { padding: 34px 0 22px; }
.welcome__h { font-size: 30px; line-height: 1.13; font-weight: 690; letter-spacing: -.04em; }
.welcome__p { font-size: 15px; color: var(--muted); margin-top: 12px; line-height: 1.45; }
.welcome__list { margin-top: 22px; display: grid; gap: 12px; }
.welcome__item { display: flex; gap: 12px; align-items: flex-start; }
.welcome__ico {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--accent);
}
.welcome__ico svg { width: 18px; height: 18px; }
.welcome__t { font-size: 14.5px; font-weight: 600; }
.welcome__d { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.welcome__foot { margin-top: auto; padding-top: 26px; }
.disclaimer {
  font-size: 11.5px; line-height: 1.45; color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
}
.disclaimer b { color: var(--ink-2); font-weight: 600; }

/* ───────── прочее ───────── */

.empty { padding: 22px 4px; text-align: center; color: var(--muted); font-size: 13.5px; }
.pill { display: inline-flex; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.linkbtn { background: none; border: none; padding: 0; color: var(--accent); font-size: 13.5px; font-weight: 550; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 14px);
  transform: translateX(-50%) translateY(8px);
  width: max-content; max-width: min(440px, calc(100% - 32px));
  background: #23282f; color: #f4f2ee;
  padding: 11px 15px; border-radius: 12px;
  font-size: 13.5px; z-index: 60;
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (min-width: 520px) {
  body { background: #efece6; }
  .app { box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 20px 60px -30px rgba(0,0,0,.25); }
}

@media (prefers-color-scheme: dark) {
  /* сознательно не включаем тёмную тему в MVP: PDF и скриншоты должны совпадать */
}

/* ───────── напоминания и бейдж ───────── */

.remind {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 12px; cursor: pointer;
  background: var(--warn-soft); border-color: #e8d3b0;
}
.remind__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.remind__title { font-size: 14px; font-weight: 600; }
.remind__text { font-size: 12px; color: var(--warn); margin-top: 2px; }
.remind__arrow { margin-left: auto; color: var(--warn); font-size: 20px; line-height: 1; }

.nav__ico { position: relative; display: inline-flex; }
.nav__badge {
  position: absolute; top: -4px; right: -8px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: var(--bad); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}

/* ───────── налоговый календарь ───────── */

.cal__month {
  padding: 12px 16px 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.cal__month:first-child { border-top: none; }
.cal__row { display: flex; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); align-items: flex-start; }
.cal__row--paid { opacity: .55; }
.cal__day {
  width: 40px; flex: none; text-align: center;
  font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.cal__day span { display: block; font-size: 10px; font-weight: 500; color: var(--muted); text-transform: uppercase; }
.cal__main { flex: 1; min-width: 0; }
.cal__title { font-size: 14px; font-weight: 550; line-height: 1.3; }
.cal__meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.cal__status { margin-top: 5px; }
.cal__right { text-align: right; flex: none; }
.cal__sum { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal__mark {
  margin-top: 6px; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: var(--surface);
  color: var(--muted); font-size: 14px; line-height: 1; padding: 0;
}
.cal__mark--on { background: var(--good-soft); border-color: var(--good); color: var(--good); }

/* ───────── сравнение режимов ───────── */

.regime { padding: 12px 0; }
.regime + .regime { border-top: 1px solid var(--line); }
.regime--current { background: var(--accent-soft); margin: 0 -16px; padding: 12px 16px; border-radius: 12px; }
.regime__head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.regime__title { font-size: 14.5px; font-weight: 650; }
.regime__rows { margin-top: 6px; display: grid; gap: 3px; }
.regime__rows > div { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.regime__rows b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.regime__total { border-top: 1px dashed var(--line-strong); padding-top: 4px; margin-top: 2px; }
.regime__total span { color: var(--ink); font-weight: 600; }
.regime__total b { font-size: 15px; }

/* ───────── кредиты ───────── */

.strategy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.strategy { padding: 13px; }
.strategy--best { border-color: #b9d8c8; background: linear-gradient(180deg, #fbfefc, #f1f8f4); }
.strategy__title { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.strategy__sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.strategy__num { font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.strategy__meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.options { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.options__title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--warn); }
.option { padding: 8px 0; border-top: 1px solid var(--line); }
.option:first-of-type { border-top: none; }
.option b { display: block; font-size: 13px; }
.option span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

.source { padding: 10px 0; border-top: 1px solid var(--line); }
.source:first-of-type { border-top: none; }
.source a { font-size: 12.5px; line-height: 1.45; }

/* ───────── план и печать ───────── */

.plan-page {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  margin: 0 16px 14px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
}
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.plan-brand { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.plan-title { font-size: 21px; font-weight: 700; letter-spacing: -.03em; margin: 4px 0 0; }
.plan-date { font-size: 11px; color: var(--muted); white-space: nowrap; }
.plan-hero { display: flex; align-items: center; gap: 14px; margin: 14px 0 12px; }
.plan-score {
  width: 62px; height: 62px; border-radius: 50%; flex: none;
  border: 3px solid var(--accent); display: grid; place-content: center; text-align: center;
}
.plan-score__num { font-size: 22px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.plan-score__lbl { font-size: 9px; color: var(--muted); margin-top: 2px; }
.plan-h2 { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.plan-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.plan-h3 { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.plan-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.plan-kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.plan-kpi span { display: block; font-size: 9.5px; color: var(--muted); line-height: 1.2; }
.plan-kpi b { display: block; font-size: 13px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.plan-problem { padding: 7px 0; border-top: 1px solid var(--line); }
.plan-problem:first-of-type { border-top: none; }
.plan-problem b { display: block; font-size: 12.5px; }
.plan-problem span { display: block; font-size: 11px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.plan-action { margin-top: 12px; border: 1px solid #e7d6b8; background: #fdf8ef; border-radius: 12px; padding: 12px; }
.plan-action__lbl { font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.plan-action__title { font-size: 15px; font-weight: 700; margin-top: 4px; letter-spacing: -.01em; }
.plan-action__text { font-size: 11px; color: var(--ink-2); margin-top: 4px; line-height: 1.4; }
.plan-foot { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.plan-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.plan-table th { text-align: left; font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 4px 0; border-bottom: 1px solid var(--line-strong); font-weight: 600; }
.plan-table td { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; vertical-align: top; }
.plan-table td:first-child { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; width: 68px; }
.plan-table .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.plan-td-sub { font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.plan-table tfoot td { font-weight: 700; border-bottom: none; padding-top: 8px; font-size: 12px; }
.plan-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.plan-month { border-top: 1px solid var(--line); padding: 7px 0; }
.plan-month__head { display: flex; justify-content: space-between; font-size: 11.5px; }
.plan-month__row { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.plan-month__row b { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-note { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 9px; line-height: 1.45; color: var(--muted); }

@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; }
  .app { max-width: none !important; padding: 0 !important; box-shadow: none !important; min-height: 0 !important; }
  .nav, .topbar, .toast, .no-print, .btn { display: none !important; }
  .plan-page {
    margin: 0 !important; padding: 0 !important;
    border: none !important; border-radius: 0 !important; box-shadow: none !important;
    break-after: page; page-break-after: always;
  }
  .plan-page--2 { break-after: auto; page-break-after: auto; }
  .plan { background: #fff; }
  .plan-table td, .plan-table th { font-size: 10.5px; }
  .plan-note { color: #444; }
  a { color: inherit; text-decoration: none; }
}

@media (max-width: 360px) {
  .plan-grid4 { grid-template-columns: repeat(2, 1fr); }
  .strategy-grid { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}