:root {
  --bg: #f6f1e8;
  --paper: #fffdf8;
  --ink: #1f1c19;
  --muted: #6d655c;
  --line: #e4dccf;
  --gold: #a8823f;
  --red: #a3242c;
  --green: #2f5d46;
  --chip: #efe7d8;
  --shadow: 0 1px 2px rgba(31, 28, 25, .06), 0 8px 24px rgba(31, 28, 25, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161412;
    --paper: #1f1c19;
    --ink: #f1ebe0;
    --muted: #a99f92;
    --line: #34302b;
    --gold: #d2ad6b;
    --red: #e0646b;
    --green: #7fb796;
    --chip: #2a2622;
    --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 920px; margin: 0 auto; padding: 28px 18px 64px; }
a { color: var(--gold); }
img { max-width: 100%; display: block; }
.brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: .28em;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(32px, 7vw, 52px); margin: 10px 0 8px; }
h2 { font-size: clamp(24px, 5vw, 32px); margin: 44px 0 14px; }
h3 { font-size: 21px; margin: 0 0 6px; }
.lead { color: var(--muted); margin: 0 0 22px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 26px; }
.chip { background: var(--chip); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--muted); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair figure { margin: 0; background: var(--paper); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.pair img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.pair figcaption { padding: 10px 14px; font-size: 14px; color: var(--muted); }

.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tier { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.tier.hl { border: 2px solid var(--gold); }
.tier .price { font-size: 26px; font-weight: 700; margin: 6px 0 2px; white-space: nowrap; }
.tier .usd { color: var(--muted); font-size: 14px; }
.tier p { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; }

.note {
  background: var(--paper); border-left: 4px solid var(--red); border-radius: 10px;
  padding: 14px 16px; margin: 18px 0; box-shadow: var(--shadow);
}
.note.good { border-left-color: var(--green); }
.note b { display: block; margin-bottom: 4px; }

.list { padding: 0; margin: 0; list-style: none; display: grid; gap: 10px; }
.list li { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.list li .sum { float: right; font-weight: 700; margin-left: 12px; }
.list li small { display: block; color: var(--muted); margin-top: 2px; }

.tablebox { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14px; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--chip); }
td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.group td { background: var(--chip); font-weight: 600; }
tr.total td { font-weight: 700; border-bottom: 0; }

.check { padding-left: 0; list-style: none; }
.check li { padding: 6px 0 6px 30px; position: relative; }
.check li::before { content: "✓"; position: absolute; left: 6px; color: var(--green); font-weight: 700; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card div { padding: 14px 16px; }
.card p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

footer { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.src { font-size: 14px; }
.src li { margin: 4px 0; }

@media (max-width: 680px) {
  .tiers { grid-template-columns: 1fr; }
  .pair { gap: 8px; }
  .pair figcaption { font-size: 13px; padding: 8px 10px; }
}

/* презентация: слайды карточками */
.deck { display: grid; gap: 18px; margin-top: 18px; }
.slide { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px; box-shadow: var(--shadow); }
.slide .num { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--gold); text-transform: uppercase; }
.slide h2 { margin: 6px 0 8px; }
.slide .key { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.slide ul { margin: 0; padding-left: 20px; }
.slide li { margin: 5px 0; }
.slide img { width: 100%; border-radius: 12px; margin-top: 14px; aspect-ratio: 4 / 3; object-fit: cover; }
.slide .imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slide .imgs img { margin-top: 14px; }
.slide .cap { font-size: 13px; color: var(--muted); margin-top: 6px; }
.slide .todo { margin-top: 12px; font-size: 14px; color: var(--red); }
.bars { display: grid; gap: 6px; margin-top: 10px; }
.bar { display: grid; grid-template-columns: 76px 1fr 64px; align-items: center; gap: 8px; font-size: 14px; }
.bar span.fill { display: block; height: 14px; border-radius: 7px; background: var(--gold); }
.bar .v { text-align: right; font-variant-numeric: tabular-nums; }
.status { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--muted); }

/* графики и цифры (презентация v2) */
:root { --soft: #dccdb4; --blue: #3c6e8f; }
@media (prefers-color-scheme: dark) { :root { --soft: #4d453c; --blue: #8fbcd9; } }
.chart { width: 100%; max-width: 560px; display: block; margin: 14px auto 0; overflow: visible; }
.chart text { font: 10px "Inter", system-ui, sans-serif; fill: var(--muted); }
.chart .t-strong { fill: var(--ink); font-weight: 700; }
.chart .t-avg { fill: var(--red); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .avg { stroke: var(--red); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .b-rev { fill: var(--gold); }
.chart .b-came { fill: var(--soft); }
.chart .b-buy { fill: var(--green); }
.chart .gap { fill: var(--line); }
.chart .ln { fill: none; stroke-width: 2.2; stroke-linejoin: round; }
.chart .s-pes { stroke: var(--muted); }
.chart .s-std { stroke: var(--gold); }
.chart .s-opt { stroke: var(--green); }
.chart-title { font-size: 14px; font-weight: 600; margin: 18px 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin-top: 6px; justify-content: center; }
.legend i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legend i.ln { height: 3px; vertical-align: 3px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 4px; }
.kpi { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.kpi .lbl { font-size: 12px; color: var(--muted); line-height: 1.3; }
.kpi .val { font-size: 19px; font-weight: 700; margin-top: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kpi .val .was { color: var(--muted); font-weight: 600; }
.kpi .val .now { color: var(--red); }
table.kpi-table { min-width: 520px; }
.slide .tablebox { margin-top: 14px; box-shadow: none; }
.tier .row { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.tier .row span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tier .big { font-size: 30px; font-weight: 700; margin: 10px 0 0; line-height: 1.1; }
.tier .big small { font-size: 14px; font-weight: 600; color: var(--muted); }
.slide .tiers { margin-top: 14px; }
.slide .how { background: var(--bg); border-radius: 12px; padding: 12px 14px; margin-top: 14px; font-size: 14px; }
.slide .how ul { padding-left: 18px; }
.slide .imgs.tall img { aspect-ratio: 3 / 4; }
.deck > .slide { min-width: 0; }
.slide td.num { font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); }
@media (max-width: 680px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .val { font-size: 17px; }
}
