/* ─── STATA · тёмный финансовый терминал ─────────────────────────────── */
:root {
  --bg: #0a0a0d;
  --bg-2: #101015;
  --surface: #15151c;
  --surface-2: #1c1c25;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f3efe6;
  --muted: #8b8894;
  --muted-2: #5d5b66;
  --gold: #e9b949;
  --gold-2: #f6d77c;
  --gold-dim: rgba(233, 185, 73, 0.14);
  --up: #34d399;
  --up-dim: rgba(52, 211, 153, 0.14);
  --down: #ff5d6c;
  --down-dim: rgba(255, 93, 108, 0.14);
  --display: "Unbounded", "Manrope", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --body: "Manrope", system-ui, sans-serif;
  --r: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  /* мягкая золотая туманность сверху + зерно */
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(233, 185, 73, 0.10), transparent 60%),
    radial-gradient(900px 500px at 95% 10%, rgba(52, 211, 153, 0.07), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(255, 93, 108, 0.05), transparent 60%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold); color: #000; }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.up { color: var(--up); }
.down { color: var(--down); }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ─── Shell ────────────────────────────────────────────────────────────── */
.shell { max-width: 1240px; margin: 0 auto; padding: 22px 28px 120px; }

header.top {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 6px 0 22px;
  border-bottom: 1px solid var(--line);
  animation: fade-down .7s var(--ease) both;
}
.brand { display: flex; align-items: baseline; gap: 14px; }
.brand h1 {
  font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: 0.06em;
  margin: 0; line-height: 1;
}
.brand h1 i { font-style: normal; color: var(--gold); }
.brand .tag { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; }
.top-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  white-space: nowrap;
}
.chip b { color: var(--text); font-weight: 500; }
.chip.streak b { color: var(--gold); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-weight: 600; font-size: 14px; transition: .2s var(--ease);
}
.btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--gold); color: #120d02; border-color: var(--gold); }
.btn.primary:hover { background: var(--gold-2); box-shadow: 0 8px 30px rgba(233, 185, 73, 0.25); }
.btn.ghost { background: transparent; }
.btn.danger:hover { border-color: var(--down); color: var(--down); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.icon { padding: 7px; width: 34px; height: 34px; justify-content: center; }
.btn:disabled { opacity: .5; pointer-events: none; }

/* ─── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px;
  padding: 28px 0 10px; align-items: start;
  animation: fade-up .8s .1s var(--ease) both;
}
.hero-main .label { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hero-main .big {
  font-family: var(--display); font-weight: 700; font-size: clamp(48px, 7.5vw, 96px); line-height: 1; margin: 10px 0 8px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.hero-main .big .cur { font-size: .45em; vertical-align: top; margin-right: .1em; opacity: .7; font-family: var(--mono); font-weight: 500; }
.hero-main .sub { color: var(--muted); font-size: 14px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero-main .sub b { color: var(--text); font-weight: 600; }
.hero-spark { position: relative; height: 96px; margin-top: 18px; pointer-events: none; opacity: .75; animation: fade-up .8s .2s var(--ease) both; }
.hero-spark::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); }
.hero-spark canvas { width: 100%; height: 100%; display: block; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px;
  position: relative; overflow: hidden; transition: .3s var(--ease);
}
.tile:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.tile::after { content: ""; position: absolute; inset: auto -20px -30px auto; width: 90px; height: 90px; border-radius: 50%; background: var(--accent, var(--gold)); opacity: .08; filter: blur(18px); }
.tile .k { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-family: var(--mono); }
.tile .v { font-family: var(--mono); font-size: 26px; font-weight: 500; margin-top: 8px; letter-spacing: -0.02em; }
.tile .d { font-size: 12px; color: var(--muted); margin-top: 4px; }
.tile.up { --accent: var(--up); }
.tile.down { --accent: var(--down); }

/* ─── Sections ─────────────────────────────────────────────────────────── */
section { margin-top: 38px; animation: fade-up .8s var(--ease) both; }
section:nth-of-type(2) { animation-delay: .15s; }
section:nth-of-type(3) { animation-delay: .25s; }
section:nth-of-type(4) { animation-delay: .35s; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.sec-head h2 { font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.sec-head h2 small { font-family: var(--mono); font-weight: 400; color: var(--muted-2); letter-spacing: 0; text-transform: none; margin-left: 10px; }
.sec-head .actions { display: flex; gap: 8px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }

/* ─── Форма ────────────────────────────────────────────────────────────── */
.entry-form { display: grid; grid-template-columns: 160px 1fr 1fr 150px 2fr auto; gap: 10px; padding: 14px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field .in {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 42px;
  transition: .2s;
}
.field .in:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.field .in input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; height: 100%; font-family: var(--mono); font-size: 15px; }
.field .in input[type="text"] { font-family: var(--body); }
.field .in .pre { color: var(--muted); font-family: var(--mono); font-size: 13px; }
.field .in.time input { width: 34px; text-align: right; flex: 0 0 auto; }
.field .in.time .pre { padding-right: 6px; }
.field.spent .in:focus-within { border-color: var(--down); box-shadow: 0 0 0 3px var(--down-dim); }
.field.received .in:focus-within { border-color: var(--up); box-shadow: 0 0 0 3px var(--up-dim); }
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.7); }
.entry-form .btn { height: 42px; }
.form-hint { padding: 0 14px 12px; font-size: 12px; color: var(--muted-2); display: flex; justify-content: space-between; }
.form-hint kbd { font-family: var(--mono); background: var(--bg-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }

/* ─── Календарь ────────────────────────────────────────────────────────── */
.date-in input { cursor: pointer; font-family: var(--mono) !important; }
.dp {
  position: absolute; z-index: 80; width: 340px; padding: 14px; border-radius: 16px;
  background: #131319; border: 1px solid var(--line-strong); box-shadow: 0 24px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(233,185,73,.15);
  animation: fade-up .22s var(--ease) both; user-select: none;
}
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-title { font-family: var(--display); font-size: 15px; font-weight: 600; text-transform: capitalize; }
.dp-nav { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 20px; line-height: 1; }
.dp-nav:hover { border-color: var(--gold); color: var(--gold); }
.dp-dow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-family: var(--mono); font-size: 11px; color: var(--muted-2); letter-spacing: .08em; margin-bottom: 4px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.dp-day {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; border: 1px solid transparent;
  font-family: var(--mono); font-size: 15px; background: none; padding: 0; transition: .12s;
}
.dp-day:hover { background: var(--surface-2); border-color: var(--line-strong); }
.dp-day.other { color: var(--muted-2); }
.dp-day.today { color: var(--gold); border-color: rgba(233,185,73,.5); }
.dp-day.sel { background: var(--gold); color: #120d02; font-weight: 600; }
.dp-day.has { position: relative; }
.dp-day.has::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--up); }
.dp-day.has.neg::after { background: var(--down); }
.dp-day.sel::after { background: #120d02; }
.dp-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .dp { width: min(340px, calc(100vw - 20px)); } }

/* ─── Таблица ──────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 880px; }
thead th {
  text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 500; white-space: nowrap;
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background .2s; animation: row-in .5s var(--ease) both; }
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
tbody tr.editing { background: var(--gold-dim); }
td.r, th.r { text-align: right; }
td.idx { color: var(--muted-2); font-family: var(--mono); font-size: 12px; width: 40px; }
td.date { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
td.note { max-width: 320px; }
td.note .t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.note .t.empty { color: var(--muted-2); font-style: italic; }
td .pill { display: inline-block; padding: 2px 8px; border-radius: 6px; font-family: var(--mono); font-size: 12px; }
td .pill.up { background: var(--up-dim); }
td .pill.down { background: var(--down-dim); }
td .pill.zero { background: var(--surface-2); color: var(--muted); }
td.acts { white-space: nowrap; text-align: right; }
td.acts .btn { opacity: 0; transition: .2s; }
tr:hover td.acts .btn, tr.editing td.acts .btn { opacity: 1; }
tr.editing td .in { display: flex; }
td .in input { width: 100%; background: var(--bg-2); border: 1px solid var(--gold); border-radius: 8px; padding: 6px 8px; outline: 0; font-family: var(--mono); font-size: 13px; }
td .in input[type="text"] { font-family: var(--body); }
.empty-state { padding: 54px 20px; text-align: center; color: var(--muted); }
.empty-state .big { font-family: var(--display); font-size: 22px; color: var(--text); margin-bottom: 8px; }

tfoot td { padding: 16px 14px; border-top: 2px solid var(--line-strong); font-family: var(--mono); font-weight: 500; font-size: 14px; background: var(--bg-2); }
tfoot td.lbl { font-family: var(--display); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }

/* ─── Итог ─────────────────────────────────────────────────────────────── */
.result {
  margin-top: 16px; padding: 26px 28px; border-radius: var(--r); position: relative; overflow: hidden;
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(233, 185, 73, 0.14), transparent 60%),
    radial-gradient(500px 300px at 100% 100%, rgba(52, 211, 153, 0.10), transparent 60%),
    var(--surface);
  border: 1px solid var(--line-strong);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 26px;
}
.result .cell .k { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.result .cell .v { font-family: var(--mono); font-size: 24px; margin-top: 6px; letter-spacing: -0.02em; }
.result .cell .d { font-size: 12px; color: var(--muted); margin-top: 3px; }
.result .cell.main { grid-column: span 2; }
.result .cell.main .v { font-family: var(--display); font-size: 40px; font-weight: 700; }
.result .verdict { grid-column: 1 / -1; padding-top: 16px; border-top: 1px dashed var(--line-strong); font-size: 15px; }
.result .verdict b { color: var(--gold); }

/* ─── Графики ──────────────────────────────────────────────────────────── */
.charts { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.chart-card { padding: 18px 18px 12px; min-height: 280px; display: flex; flex-direction: column; }
.chart-card .ct { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.chart-card .ct h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.chart-card .ct .legend { display: flex; gap: 12px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.chart-card canvas { width: 100%; height: 240px; display: block; }
.chart-card.full { grid-column: 1 / -1; min-height: 0; }
.chart-card.full canvas { height: 140px; }
.chart-tip {
  position: fixed; z-index: 20; pointer-events: none; padding: 8px 10px; border-radius: 8px;
  background: #000; border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 12px;
  transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; display: none;
}

/* ─── Инсайты / достижения ─────────────────────────────────────────────── */
.insights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.insight { padding: 18px; display: flex; gap: 14px; align-items: flex-start; }
.insight .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: var(--gold-dim); flex: 0 0 auto; }
.insight .t { font-size: 12px; color: var(--muted); }
.insight .v { font-size: 16px; font-weight: 600; margin-top: 2px; }
.insight .v .num { font-size: 18px; }

.level { padding: 18px 20px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin-bottom: 14px; }
.level .badge { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 20px;
  background: conic-gradient(var(--gold) var(--p, 0%), var(--surface-2) 0); position: relative; color: var(--gold); }
.level .badge::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.level .badge span { position: relative; }
.level .bar { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; margin-top: 8px; }
.level .bar i { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 99px; transition: width 1.2s var(--ease); box-shadow: 0 0 16px rgba(233, 185, 73, .5); }
.level .lt { font-family: var(--display); font-size: 15px; font-weight: 600; }
.level .ls { font-size: 12px; color: var(--muted); }
.level .next { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.level .next b { display: block; color: var(--text); font-size: 15px; }

.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ach { padding: 14px; display: flex; flex-direction: column; gap: 6px; transition: .25s var(--ease); position: relative; }
.ach .e { font-size: 26px; filter: grayscale(1); opacity: .35; }
.ach .n { font-size: 13px; font-weight: 600; }
.ach .d { font-size: 11px; color: var(--muted); }
.ach.done { border-color: rgba(233, 185, 73, .5); background: linear-gradient(160deg, var(--gold-dim), var(--surface)); }
.ach.done .e { filter: none; opacity: 1; }
.ach.done::after { content: "✓"; position: absolute; top: 10px; right: 12px; font-family: var(--mono); color: var(--gold); font-size: 12px; }
.ach .pr { height: 3px; background: var(--bg-2); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.ach .pr i { display: block; height: 100%; width: var(--p, 0%); background: var(--gold); }

/* ─── Видео ────────────────────────────────────────────────────────────── */
.video-cta {
  margin-top: 38px; padding: 34px 36px; border-radius: 18px; position: relative; overflow: hidden;
  background: linear-gradient(120deg, #17130a, #0e0f14 60%, #0b1410);
  border: 1px solid rgba(233, 185, 73, .35);
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
.video-cta::before { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 70%, rgba(233, 185, 73, .18), transparent 80%); animation: spin 14s linear infinite; pointer-events: none; }
.video-cta > * { position: relative; }
.video-cta h2 { font-family: var(--display); font-size: 24px; margin: 0 0 8px; font-weight: 700; }
.video-cta p { margin: 0; color: var(--muted); max-width: 560px; }
.video-cta .btn { font-size: 16px; padding: 14px 24px; border-radius: 12px; }
.cta-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .8); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 20px; animation: fade .3s; }
.modal .box { width: min(1100px, 100%); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; }
.modal .bh { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal .bh h3 { margin: 0; font-family: var(--display); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.modal .bb { padding: 18px; }
.modal canvas.stage { width: 100%; aspect-ratio: 16/9; display: block; background: #000; border-radius: 10px; }
.modal .bf { display: flex; gap: 10px; padding: 0 18px 18px; align-items: center; flex-wrap: wrap; }
.modal .bf .status { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.modal .bf .rec { color: var(--down); }
.modal .bf .rec::before { content: "●"; margin-right: 6px; animation: blink 1s infinite; }
.modal .opts { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 0 18px 14px; font-size: 13px; color: var(--muted); }
.modal .opts label { display: flex; gap: 6px; align-items: center; }
.modal .opts select { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; outline: 0; }
.modal .opts input[type="text"] { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; outline: 0; width: 220px; }

/* ─── Settings / login ─────────────────────────────────────────────────── */
.login { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); }
.login .lb { width: min(380px, 92vw); text-align: center; animation: fade-up .7s var(--ease) both; }
.login h1 { font-family: var(--display); font-size: 40px; letter-spacing: .1em; margin: 0 0 6px; }
.login h1 i { font-style: normal; color: var(--gold); }
.login p { color: var(--muted); margin: 0 0 26px; }
.login .pin { display: flex; gap: 10px; }
.login .pin input { flex: 1; height: 52px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; text-align: center; font-family: var(--mono); font-size: 22px; letter-spacing: .4em; outline: 0; }
.login .pin input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-dim); }
.login .err { color: var(--down); font-size: 13px; margin-top: 12px; min-height: 18px; }

.settings-form { display: grid; gap: 12px; }
.settings-form .row { display: grid; grid-template-columns: 1fr 2fr; align-items: center; gap: 12px; }
.settings-form input { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; outline: 0; }
.settings-form input:focus { border-color: var(--gold); }
.settings-form .row .hint { grid-column: 2; font-size: 12px; color: var(--muted-2); margin-top: -6px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #000; border: 1px solid var(--line-strong); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: .3s var(--ease); z-index: 60; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.gold { border-color: var(--gold); }

.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }

footer { margin-top: 60px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 12px; font-family: var(--mono); display: flex; justify-content: space-between; }

/* ─── Анимации ─────────────────────────────────────────────────────────── */
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes row-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: .2; } }
.flash-up { animation: flash-up .9s var(--ease); }
@keyframes flash-up { 0% { color: var(--up); text-shadow: 0 0 24px var(--up); } 100% { } }

/* ─── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .entry-form { grid-template-columns: 1fr 1fr; }
  .entry-form .field.note { grid-column: 1 / -1; }
  .entry-form .btn { grid-column: 1 / -1; }
  .charts, .insights { grid-template-columns: 1fr; }
  .result { grid-template-columns: 1fr 1fr; }
  .video-cta { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .shell { padding: 16px 14px 90px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .result { grid-template-columns: 1fr; padding: 20px; }
  .result .cell.main { grid-column: auto; }
  .entry-form { grid-template-columns: 1fr; }
  .level { grid-template-columns: auto 1fr; }
  .level .next { grid-column: 1 / -1; text-align: left; }
}
