/* ============================================================
   PWA статистики — dark adaptation of Integramma Design System
   Hues, type, components preserved; surfaces inverted to dark.
   (Flagged: Integramma v1.0 has no dark mode — see review rail.)
   ============================================================ */

:root {
  /* — dark surfaces (adapted) — */
  --bg:           #131019;   /* app background — deep warm ink */
  --surface:      #1E1A28;   /* card (≈ Integramma "Card") */
  --surface-2:    #272231;   /* elevated / boxed metric */
  --surface-soft: #191522;   /* neutral / "old" side, bar-track field */
  --lavender:     #2A2440;   /* conclusion plate / accent metric (dark "Card Lavender") */
  --mint:         #16271F;   /* dark "Card Mint" */

  /* — ink & lines — */
  --ink:        #EFECF5;
  --ink-2:      #B4AFC0;
  --ink-3:      #7C7689;
  --label:      #6E6880;
  --hairline:   rgba(255,255,255,.075);
  --hairline-2: rgba(255,255,255,.13);

  /* — accents (brightened for dark legibility; same hues) — */
  --violet:        #8B7FF0;
  --violet-deep:   #5B4FCF;
  --violet-soft:   #B5ADE8;
  --violet-2:      #7A6FE0;
  --violet-3:      #6960C4;
  --violet-4:      #564E9E;
  --violet-5:      #463F80;
  --emerald:       #4FC089;
  --emerald-soft:  #6FBE96;
  --emerald-2:     #3E9E72;
  --emerald-3:     #357F5E;
  --amber:         #E0A659;
  --rose:          #E07399;

  /* — semantic — */
  --pos:   var(--emerald);
  --neg:   var(--rose);
  --warn:  var(--amber);
  --rub:   var(--violet);   /* ₽ — base / "the voice" */
  --eur:   var(--emerald);  /* € — incoming Озаригн-Глобал layer */
  --track: rgba(255,255,255,.10);

  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 18px;
  --shadow-card: 0 1px 2px rgba(0,0,0,.30), 0 10px 28px rgba(0,0,0,.30);
  --shadow-soft: 0 1px 2px rgba(0,0,0,.25);
  --gap: 16px;

  --ease-out: cubic-bezier(.2,.8,.2,1);
}

* , *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ---- review stage (outside the phone) ---- */
.stage {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 8%, rgba(91,79,207,.10) 0, transparent 36%),
    radial-gradient(circle at 6% 94%, rgba(42,139,95,.08) 0, transparent 32%),
    #0C0A12;
  font-family: var(--font-sans);
  color: var(--ink);
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 40px 80px;
}

/* ---- phone shell ---- */
.phone {
  width: 390px;
  height: 844px;
  flex: 0 0 auto;
  background: var(--bg);
  border-radius: 46px;
  padding: 12px;
  position: sticky;
  top: 48px;
  box-shadow:
    0 0 0 2px #2a2535,
    0 0 0 11px #17141f,
    0 0 0 12px #322c40,
    0 40px 90px rgba(0,0,0,.6);
}
.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ---- status bar ---- */
.statusbar {
  height: 44px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px 0 30px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
  z-index: 30;
}
.statusbar__right { display: flex; align-items: center; gap: 7px; }
.statusbar__icns { display: flex; align-items: center; gap: 5px; }

/* ---- app header (R7 refresh top-right) ---- */
.appbar {
  flex: 0 0 auto;
  padding: 6px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 20;
}
.appbar__back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--ink-2); font-family: var(--font-sans);
  font-size: 14px; font-weight: 600; padding: 6px 4px; margin-left: -4px;
}
.appbar__back:hover { color: var(--ink); }
.appbar__title {
  font-size: 19px; font-weight: 700; letter-spacing: -.01em;
  color: var(--ink); margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar__brand {
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.refresh {
  flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--hairline);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--violet); transition: background .15s, transform .15s;
}
.refresh:hover { background: var(--surface-2); }
.refresh:active { transform: scale(.94); }
.refresh.is-spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- scroll body ---- */
.scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 2px 16px 22px;
}
.scroll::-webkit-scrollbar { width: 0; }

/* ---- footer (R9 Обновлено) ---- */
.freshness {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-top: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 11.5px; color: var(--ink-3);
  font-family: var(--font-mono);
  background: var(--bg);
}
.freshness__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 3px rgba(79,192,137,.16); }
.freshness--stale { color: var(--amber); }
.freshness--stale .freshness__dot { background: var(--amber); box-shadow: 0 0 0 3px rgba(224,166,89,.16); }

/* ---- made in Integramma ---- */
.madein {
  flex: 0 0 auto;
  padding: 7px 18px 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; letter-spacing: .04em; color: var(--ink-3);
  font-family: var(--font-mono);
  background: var(--bg);
}
.madein a { color: var(--violet); text-decoration: none; font-weight: 600; }
.madein a:hover { text-decoration: underline; }

/* ---- bottom nav (DQ-1) ---- */
.tabbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
  background: rgba(19,16,25,.92);
  backdrop-filter: blur(12px);
  padding-bottom: 18px; /* home indicator zone */
}
.tab {
  background: none; border: none; cursor: pointer;
  padding: 10px 0 6px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--ink-3); font-family: var(--font-sans);
  font-size: 10.5px; font-weight: 600; letter-spacing: .01em;
  transition: color .15s;
}
.tab svg { width: 22px; height: 22px; }
.tab.is-active { color: var(--violet); }
.tab__badge {
  position: absolute; transform: translate(11px,-6px);
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--rose); color: #fff;
  font-size: 9px; font-weight: 700; line-height: 16px; text-align: center;
}
.home-indicator {
  position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%);
  width: 134px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.28); z-index: 40;
}

/* ============== shared content components ============== */
.eyebrow {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--label); font-weight: 700;
}
.eyebrow--violet  { color: var(--violet); }
.eyebrow--emerald { color: var(--emerald); }
.eyebrow--amber   { color: var(--amber); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin: 22px 2px 12px;
}
.section-head h2 { font-size: 13px; font-weight: 700; letter-spacing: .01em; margin: 0; color: var(--ink-2); }
.section-head__meta { font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); }

/* card */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 18px 18px;
  border: 1px solid var(--hairline);
  position: relative;
}
.card + .card { margin-top: 14px; }
.card--accent          { border-left: 4px solid var(--violet); }
.card--accent-emerald  { border-left: 4px solid var(--emerald); }
.card--accent-amber    { border-left: 4px solid var(--amber); }
.card--accent-rose     { border-left: 4px solid var(--rose); }
.card--soft  { background: var(--surface-soft); box-shadow: none; }
.card--lav   { background: var(--lavender); box-shadow: none; border-color: rgba(139,127,240,.22); }
.card--tap   { cursor: pointer; transition: transform .14s var(--ease-out), border-color .14s; }
.card--tap:hover { transform: translateY(-1px); border-color: var(--hairline-2); }
.card--tap:active { transform: translateY(0); }

.card__label { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--label); font-weight: 700; margin-bottom: 8px; }
.card__title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 0; line-height: 1.25; color: var(--ink); }

/* widget header row */
.wh { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.wh__name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); margin: 0; }
.wh__type {
  flex: 0 0 auto; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; color: var(--ink-3); white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--hairline);
}
.wh__period { font-size: 11.5px; color: var(--ink-3); margin: 0; }
.chev { color: var(--ink-3); flex: 0 0 auto; }

/* metric */
.metric { display: flex; flex-direction: column; gap: 4px; }
.metric__value { font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.metric__value--violet { color: var(--violet); }
.metric__value--emerald{ color: var(--emerald); }
.metric__value--amber  { color: var(--amber); }
.metric__caption { font-size: 11.5px; color: var(--ink-2); line-height: 1.35; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric--boxed { background: var(--lavender); border-radius: var(--r-md); padding: 13px 14px; }
.metric--boxed-soft { background: var(--surface-soft); border-radius: var(--r-md); padding: 13px 14px; }

/* currency stack (DQ-4: stacked rows, ₽ violet over € emerald) */
.cur-stack { display: flex; flex-direction: column; gap: 6px; }
.cur {
  display: flex; align-items: baseline; gap: 8px;
  font-variant-numeric: tabular-nums;
}
.cur__amt { font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.05; }
.cur__amt--sm { font-size: 17px; }
.cur__sym { font-size: 13px; font-weight: 700; }
.cur--rub .cur__amt, .cur--rub .cur__sym { color: var(--violet); }
.cur--eur .cur__amt, .cur--eur .cur__sym { color: var(--emerald); }
.cur__tag {
  font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 999px; align-self: center;
}
.cur--rub .cur__tag { color: var(--violet); background: rgba(139,127,240,.14); }
.cur--eur .cur__tag { color: var(--emerald); background: rgba(79,192,137,.14); }

/* delta (R17 / DQ-2 / DQ-3) */
.deltas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.delta {
  background: var(--surface-soft); border-radius: var(--r-md);
  padding: 11px 12px; display: flex; flex-direction: column; gap: 3px;
  border: 1px solid var(--hairline);
}
.delta__base { font-size: 10px; color: var(--ink-3); font-weight: 600; }
.delta__main { display: flex; align-items: baseline; gap: 6px; }
.delta__pct  { font-size: 21px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1; }
.delta__abs  { font-size: 12px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.delta--pos .delta__pct { color: var(--pos); }
.delta--neg .delta__pct { color: var(--neg); }
.delta--na  .delta__pct { color: var(--ink-3); }
.delta__badge {
  display: inline-block; margin-top: 2px;
  font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--amber); background: rgba(224,166,89,.14); padding: 2px 6px; border-radius: 999px; align-self: flex-start;
}
.delta__na-note { font-size: 10px; color: var(--ink-3); }

/* bar list (B widget year rows + ranked tints) */
.bars { display: flex; flex-direction: column; gap: 11px; }
.bar { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; }
.bar__label { font-size: 13px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.bar__track { height: 7px; background: var(--track); border-radius: 999px; overflow: hidden; }
.bar__fill  { height: 100%; border-radius: 999px; background: var(--violet); transition: width .6s var(--ease-out); }
.bar__val   { font-size: 13px; font-weight: 700; text-align: right; color: var(--violet); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar--current .bar__label { color: var(--violet); }
.bar--current { position: relative; }
.bar.is-cur-pill .bar__label::after { content: "сейчас"; }

/* data row (event list, breakdown rows, tariff rows) */
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  border-left: 3px solid var(--accent, var(--violet));
}
.row + .row { margin-top: 9px; }
.row--tap { cursor: pointer; transition: transform .14s var(--ease-out), border-color .14s; }
.row--tap:hover { transform: translateY(-1px); }
.row__main { flex: 1 1 auto; min-width: 0; }
.row__title {
  font-size: 14.5px; font-weight: 600; color: var(--ink); margin: 0 0 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;  /* DQ-5: list truncates to 1 line */
}
.row__sub { font-size: 11.5px; color: var(--ink-3); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__right { flex: 0 0 auto; text-align: right; display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.row__section { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--violet); font-weight: 700; display: block; margin-bottom: 4px; }
.row__num { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.row__num--rub { color: var(--violet); }
.row__num--eur { color: var(--emerald); }
.row__num--count { color: var(--ink); }
.row__cap { font-size: 10px; color: var(--ink-3); }

/* breakdown table block (R3 card) */
.bd { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.bd__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-bottom: 1px solid var(--hairline);
}
.bd__head .eyebrow { font-size: 10px; }
.bd__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center;
  padding: 11px 14px; border-bottom: 1px solid var(--hairline);
}
.bd__row:last-child { border-bottom: none; }
.bd__row--total { background: var(--surface-soft); }
.bd__seg { display: flex; align-items: center; gap: 9px; min-width: 0; }
.bd__seg > * { min-width: 0; }
.bd__seg__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.bd__dot { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 auto; background: var(--violet); }
.bd__name { font-size: 13.5px; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%; }
.bd__site { font-size: 10.5px; color: var(--ink-3); }
.bd__count { font-size: 13px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; min-width: 38px; }
.bd__count-cap { font-size: 9px; color: var(--ink-3); display: block; font-weight: 500; }
.bd__sum { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; min-width: 92px; }
.bd__sum--rub { color: var(--violet); }
.bd__sum--eur { color: var(--emerald); }
.bd__sum--zero { color: var(--ink-3); }
.bd__total-label { font-size: 13px; font-weight: 700; color: var(--ink); }

/* conclusion plate */
.conclusion {
  background: var(--lavender); border-radius: var(--r-md);
  padding: 13px 15px; font-size: 12.5px; color: var(--ink); line-height: 1.5;
  border-left: 3px solid var(--violet); margin-top: 14px;
}
.conclusion b { font-weight: 700; }
.conclusion--neutral { background: var(--surface-soft); border-left-color: var(--ink-3); }

/* search / filter panel (R20) */
.search-wrap { margin: 4px 2px 6px; }
.searchbar {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: 10px 12px;
}
.searchbar input {
  flex: 1 1 auto; background: none; border: none; outline: none;
  color: var(--ink); font-family: var(--font-sans); font-size: 14px;
}
.searchbar input::placeholder { color: var(--ink-3); }
.searchbar__clear { background: none; border: none; color: var(--ink-3); cursor: pointer; padding: 2px; display: flex; }
.filter-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--ink-2); font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  padding: 8px 2px 2px;
}
.filter-toggle.is-on { color: var(--violet); }
.filter-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 2px 4px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--label); font-weight: 700; }
.field input {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-sm);
  padding: 9px 10px; color: var(--ink); font-family: var(--font-mono); font-size: 13px; outline: none;
}
.field input:focus { border-color: var(--violet); }
.applied-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 2px 2px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--violet);
  background: rgba(139,127,240,.13); border: 1px solid rgba(139,127,240,.25);
  border-radius: 999px; padding: 4px 9px;
}
.chip button { background: none; border: none; color: var(--violet); cursor: pointer; padding: 0; display: flex; }

/* show more (R21 / DQ-6) */
.show-more {
  width: 100%; margin-top: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: 12px; cursor: pointer; transition: background .15s, border-color .15s;
}
.show-more:hover { background: var(--surface-2); border-color: var(--hairline-2); }
.show-more__main { font-size: 14px; font-weight: 700; color: var(--violet); }
.show-more__count { font-size: 10.5px; color: var(--ink-3); font-family: var(--font-mono); }

/* states: loading / empty / error / denied */
.skel { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border-radius: var(--r-md); }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-line { height: 11px; border-radius: 5px; }

.empty {
  text-align: center; padding: 48px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty__star { width: 88px; height: 60px; opacity: .5; }
.empty__title { font-size: 16px; font-weight: 700; color: var(--ink-2); margin: 0; }
.empty__text { font-size: 12.5px; color: var(--ink-3); margin: 0; max-width: 230px; line-height: 1.5; }

.banner {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(224,166,89,.10); border: 1px solid rgba(224,166,89,.30);
  border-radius: var(--r-md); padding: 11px 13px; margin: 6px 2px 10px;
}
.banner svg { flex: 0 0 auto; color: var(--amber); margin-top: 1px; }
.banner__txt { font-size: 12px; color: var(--ink-2); line-height: 1.45; }
.banner__txt b { color: var(--amber); font-weight: 700; }
.banner__act { display: inline-block; margin-top: 5px; color: var(--violet); font-weight: 700; font-size: 12px; cursor: pointer; }

/* toast (R7 failed refresh) */
.toast {
  position: absolute; left: 16px; right: 16px; bottom: 96px; z-index: 60;
  background: #2A2231; border: 1px solid rgba(224,115,153,.35);
  border-radius: var(--r-md); padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--ink); box-shadow: var(--shadow-card);
  animation: toast-in .25s var(--ease-out);
}
.toast svg { color: var(--rose); flex: 0 0 auto; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* access denied (R8) — full dark screen */
.denied {
  flex: 1 1 auto; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 40px 34px; gap: 18px;
}
.denied__badge {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(224,115,153,.12); border: 1px solid rgba(224,115,153,.3);
  display: flex; align-items: center; justify-content: center; color: var(--rose);
}
.denied__title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 0; color: var(--ink); }
.denied__text { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; margin: 0; max-width: 280px; }
.denied__meta { font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); margin-top: 6px; }

/* menu screen */
.menu-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 13px; padding: 15px 16px; border-bottom: 1px solid var(--hairline); color: var(--ink); text-decoration: none; }
.menu-item:last-child { border-bottom: none; }
.menu-item svg { color: var(--ink-3); }
.menu-item--link:hover { background: rgba(139,127,240,.06); }
.menu-item__txt { flex: 1 1 auto; font-size: 14.5px; font-weight: 600; }
.menu-item__val { font-size: 12.5px; color: var(--ink-3); font-family: var(--font-mono); }
.menu-profile { display: flex; align-items: center; gap: 14px; padding: 4px 2px 18px; }
.menu-avatar { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--violet-deep), var(--emerald-3)); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 19px; color: #fff; }

/* sparkle star background (dark variant) */
.wm { position: absolute; pointer-events: none; fill: none; stroke: rgba(255,255,255,.05); stroke-width: 1; }

/* ============== review rail (right column) ============== */
.rail { width: 430px; flex: 0 0 auto; display: flex; flex-direction: column; gap: 20px; padding-top: 6px; }
.rail__intro h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.rail__intro h1 em { font-style: normal; color: var(--violet); }
.rail__intro p { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; margin: 0 0 6px; }
.rail__intro a { color: var(--violet); font-weight: 700; text-decoration: none; }
.rail__intro a:hover { text-decoration: underline; }

.rail-card {
  background: rgba(30,26,40,.7); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: 18px 18px;
}
.rail-card h3 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--label); font-weight: 700; margin: 0 0 14px; }

.scen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.scen {
  text-align: left; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: 10px 11px; cursor: pointer; color: var(--ink-2);
  font-family: var(--font-sans); transition: border-color .15s, background .15s, transform .12s;
}
.scen:hover { border-color: var(--hairline-2); transform: translateY(-1px); }
.scen.is-active { border-color: var(--violet); background: rgba(139,127,240,.10); color: var(--ink); }
.scen__name { font-size: 12.5px; font-weight: 700; display: block; }
.scen__req { font-size: 9.5px; font-family: var(--font-mono); color: var(--ink-3); margin-top: 2px; display: block; }
.scen__grouplabel { grid-column: 1 / -1; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin: 8px 0 0; }

.dq { border-left: 3px solid var(--violet); padding: 2px 0 2px 13px; margin-bottom: 15px; }
.dq:last-child { margin-bottom: 0; }
.dq__q { font-size: 12px; font-weight: 700; color: var(--ink); margin: 0 0 3px; }
.dq__a { font-size: 12px; color: var(--ink-2); line-height: 1.5; margin: 0; }
.dq__a b { color: var(--violet); font-weight: 700; }
.dq--flag { border-left-color: var(--amber); }
.dq--flag .dq__a b { color: var(--amber); }

.openq { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; color: var(--ink-2); line-height: 1.5; margin-bottom: 10px; }
.openq:last-child { margin-bottom: 0; }
.openq__tag { flex: 0 0 auto; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); background: rgba(224,166,89,.14); border-radius: 999px; padding: 3px 7px; margin-top: 1px; }

@media (max-width: 920px) {
  .stage { flex-direction: column; align-items: center; padding: 24px 16px 60px; }
  .phone { position: relative; top: 0; }
  .rail { width: 100%; max-width: 430px; }
}
