/* Panel style: the approved mockup (docs/design/panel/mockup/): dark only, radial violet glow,
   glass cards, violet accent. No inline styles anywhere (CSP): sizes from data are SVG
   attributes or the generated classes at the end of this file. */
:root {
  color-scheme: dark;
  --bg: #0b0b10;
  --card: rgba(255, 255, 255, 0.045);
  --card-hover: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --border: var(--line);
  --text: #f4f4f8;
  --muted: #9a9aab;
  --accent: #8b5cf6;
  --accent-2: #4f46e5;
  --accent-soft: rgba(139, 92, 246, 0.18);
  --home: #a78bfa;
  --draw: #64748b;
  --away: #38bdf8;
  --ok: #34d399;
  --green: #34d399;
  --red: #f87171;
  --grey: #9ca3af;
  --amber: #fbbf24;
  --sky: #7c9cff;
  --radius: 22px;
  --gap: 22px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --rail: 76px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  display: flex;
  background: radial-gradient(1200px 600px at 70% -10%, #2a1d5c 0%, transparent 60%),
    radial-gradient(900px 500px at 0% 100%, #161433 0%, transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0 0 8px; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 8px 0; overflow-wrap: anywhere; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------------------------------------------------------- icon rail */
.menu {
  width: var(--rail); flex: none; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 22px 0; border-right: 1px solid var(--line); z-index: 10;
}
.brand { color: var(--accent); margin-bottom: 18px; display: flex; }
.menu-item {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 14px; color: var(--muted); border: 0;
  background: none; cursor: pointer; font: inherit; padding: 0;
}
.menu-item:hover { color: var(--text); background: var(--card-hover); }
.menu-item.active {
  color: #fff; background: rgba(139, 92, 246, 0.18);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.4);
}
.menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.logout { margin-top: auto; }

/* ---------------------------------------------------------------- content */
.page {
  flex: 1; min-width: 0;
  max-width: 1800px; margin: 0 auto; width: 100%;
  padding: clamp(18px, 2.2vw, 40px);
}
.top { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 26px; }
.search {
  display: flex; align-items: center; gap: 8px; flex: 0 1 380px; min-width: 0;
  padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--muted);
}
.search input {
  flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit;
  outline: none;
}
.today { color: var(--sky); }
.period {
  margin-left: auto; display: flex; gap: 4px; padding: 4px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
}
.period a { padding: 6px 14px; border-radius: 999px; color: var(--muted); font-size: 13px; }
.period a.active { background: var(--accent-soft); color: var(--text); }

.title { font-size: clamp(26px, 2.4vw, 38px); font-weight: 700; margin-bottom: 26px; letter-spacing: -0.02em; }
.title .lead, .title .caption {
  font-size: 15px; font-weight: 400; color: var(--muted); margin-left: 8px; letter-spacing: 0;
}

/* ---------------------------------------------------------------- cards */
.card {
  position: relative; min-width: 0;
  padding: clamp(18px, 1.6vw, 28px); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.card + .card { margin-top: var(--gap); }
.card-main {
  background: radial-gradient(500px 300px at 85% 0%, rgba(167, 139, 250, 0.45), transparent 60%),
    linear-gradient(140deg, #5b3fd6 0%, #3b2a8f 45%, #1d1747 100%);
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 25px 60px rgba(76, 52, 200, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.card-head, .head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px 12px;
  flex-wrap: wrap; margin-bottom: 10px;
}
.card-head .caption { flex: 1 1 160px; text-align: right; }
.card-title, .head h3 { font-size: 18px; font-weight: 700; margin: 0; }
.big { font-size: clamp(26px, 2.2vw, 34px); font-weight: 700; line-height: 1.1; margin-top: 18px; letter-spacing: -0.02em; }
.caption, .muted-l { color: var(--muted); font-size: 13px; font-weight: 400; }
.card-main .caption { color: rgba(255, 255, 255, 0.75); }
.of, .unit { font-size: 0.55em; font-weight: 600; color: var(--muted); }
.card-main .of, .card-main .unit { color: rgba(255, 255, 255, 0.75); }
.few { color: var(--grey); font-weight: 600; font-size: 0.6em; }
p .few, dd .few, td .few { font-size: 1em; }
.empty { margin: 28px 0 8px; font-size: 22px; }
.empty-line { color: var(--muted); margin: 24px 0; }
.link { color: #c4b5fd; }
.link:hover { text-decoration: underline; }
.sub { font-size: 15px; margin-top: 18px; }
.note { margin-top: var(--gap); color: var(--muted); text-align: center; }

.banner {
  padding: 14px 18px; border-radius: 16px; margin-bottom: var(--gap);
  background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.35);
}
.banner.off {
  background: rgba(156, 163, 175, 0.1); border-color: rgba(156, 163, 175, 0.3); color: #d1d5db;
}
.banner.warn {
  background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.4); color: #fecaca;
}
.card .banner { margin: 8px 0 0; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; border: 1px solid;
}
.badge.green { color: var(--green); background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.35); }
.badge.red { color: var(--red); background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.35); }
.badge.grey { color: var(--grey); background: rgba(156, 163, 175, 0.12); border-color: rgba(156, 163, 175, 0.3); }
.tag {
  font-size: 12px; padding: 3px 10px; border-radius: 999px; color: #c4b5fd;
  background: var(--accent-soft); border: 1px solid rgba(167, 139, 250, 0.35);
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 13px; }

.report {
  white-space: pre-wrap; overflow-wrap: anywhere; margin: 0;
  font: 13.5px/1.6 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text);
}
.report-image { display: block; max-width: 100%; height: auto; margin-top: 16px; border-radius: 14px; }

/* ---------------------------------------------------------------- svg charts */
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--text); font-size: 10px; }
.chart text.axis { fill: var(--muted); font-size: 9px; }
.chart text.value { font-weight: 700; font-size: 11px; }
.chart .strong { font-weight: 700; }
.chart .grid { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.chart .bar-model { fill: var(--accent); }
.chart .bar-market { fill: rgba(255, 255, 255, 0.28); }
.chart .bar-dim { fill: rgba(156, 163, 175, 0.22); }
.chart .bar:hover { filter: brightness(1.35); }
.chart .line { stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart .dot { fill: var(--accent); }
.chart .track { stroke: rgba(255, 255, 255, 0.06); }
.chart .ring-inner { opacity: 0.75; }
.chart circle.seg-0 { stroke: var(--home); }
.chart circle.seg-1 { stroke: var(--draw); }
.chart circle.seg-2 { stroke: var(--away); }
.chart rect.seg-0 { fill: var(--home); }
.chart rect.seg-1 { fill: var(--draw); }
.chart rect.seg-2 { fill: var(--away); }

/* probability bar (SVG): home / draw / away */
.chart.probbar { height: 10px; border-radius: 99px; overflow: hidden; margin: 16px 0; background: rgba(255, 255, 255, 0.08); }
.hero .chart.probbar rect.seg-0, .card-main .chart.probbar rect.seg-0 { fill: #fff; }
.hero .chart.probbar rect.seg-1, .card-main .chart.probbar rect.seg-1 { fill: rgba(255, 255, 255, 0.45); }
.hero .chart.probbar rect.seg-2, .card-main .chart.probbar rect.seg-2 { fill: rgba(255, 255, 255, 0.2); }

/* ---------------------------------------------------------------- home */
.row1 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--gap); margin-bottom: var(--gap); }
.row1 > .card, .kpis > .card, .row3 > .card, .acc-row > .card, .matches > .card { margin-top: 0; }
.hero {
  background: radial-gradient(500px 300px at 85% 0%, rgba(167, 139, 250, 0.45), transparent 60%),
    linear-gradient(140deg, #5b3fd6 0%, #3b2a8f 45%, #1d1747 100%);
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 25px 60px rgba(76, 52, 200, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero .muted-l { color: #d6ccff; }
.chip { background: rgba(255, 255, 255, 0.16); padding: 6px 12px; border-radius: 999px; font-size: 13px; }
.hero .teams { font-size: clamp(24px, 2.3vw, 36px); margin: 18px 0 20px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.hero .teams span { opacity: 0.6; }
.hero .teams a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.trio b { font-size: clamp(30px, 3vw, 48px); display: block; letter-spacing: -0.03em; }
.trio small { color: #d6ccff; }
.hero-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, 0.18);
}
.hero-facts small { display: block; color: #cfc6ff; font-size: 12px; }
.hero-facts b { font-size: 22px; }
.why { margin-top: 14px; color: #e7e2ff; }
.src { margin: 6px 0 0; color: #cfc6ff; font-size: 12.5px; }

.chart-col, .card.chart { display: flex; flex-direction: column; }
.bars {
  position: relative; overflow: hidden; flex: 1; min-height: 260px;
  display: flex; align-items: flex-end; gap: clamp(8px, 1.2vw, 18px); padding: 28px 4px;
}
.gl { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(255, 255, 255, 0.06); margin-bottom: 28px; }
.gl-25 { bottom: 25%; } .gl-50 { bottom: 50%; } .gl-75 { bottom: 75%; }
.col {
  flex: 1; min-width: 0; height: 100%; position: relative;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
}
.col .b {
  width: min(46px, 70%); border-radius: 12px 12px 6px 6px;
  background: linear-gradient(180deg, #b9a5ff, #5b46e0 70%, rgba(79, 70, 229, 0.35));
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.45);
}
.col .val { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.col .x { position: absolute; bottom: -24px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.col:hover .b { background: linear-gradient(180deg, #fff, #8b5cf6); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.kpi { display: flex; flex-direction: column; }
.kpi .ico {
  position: absolute; right: 18px; top: 18px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted);
}
.kpi .ico.ok { color: var(--ok); border-color: rgba(52, 211, 153, 0.4); }
.kpi .ico.bad { color: var(--red); border-color: rgba(248, 113, 113, 0.4); font-weight: 700; }
.kpi small { color: var(--muted); padding-right: 40px; }
.kpi b { display: block; font-size: clamp(22px, 2vw, 32px); margin: 18px 0 4px; letter-spacing: -0.02em; }
.kpi b.bad { color: var(--red); }
.kpi em { font-style: normal; color: var(--muted); font-size: 13px; }
a.kpi:hover, a.match:hover, a.match-card:hover, .tile:hover { border-color: rgba(139, 92, 246, 0.5); }

.row3 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.matches { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.match, .match-card { color: inherit; display: block; transition: transform 0.15s, border-color 0.15s; }
.match:hover, .match-card:hover { transform: translateY(-2px); }
.mtop { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.lg { font-size: 12px; color: var(--home); font-weight: 600; }
.mteams { font-size: 17px; font-weight: 650; margin: 10px 0 2px; overflow-wrap: anywhere; }
.match .chart.probbar, .match-card .chart.probbar { height: 8px; }
.mrow { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: -8px; }
.mfoot { margin-top: 10px; color: var(--muted); font-size: 13px; }
.mfoot b { color: var(--text); font-weight: 600; }
.mnote { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
.missing { grid-column: 1 / -1; }
.missing h3 { font-size: 15px; }
.missing ul { margin: 0; padding-left: 18px; }
.missing li { margin: 4px 0; }

.donut .dwrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; padding-top: 10px; }
.chart-ring { width: 200px; height: 200px; flex: none; }
.chart-ring .track { stroke: rgba(255, 255, 255, 0.06); stroke-width: 14; }
.chart-ring .seg { stroke-width: 14; stroke-linecap: round; }
.chart-ring text.ring-num { font-size: 22px; font-weight: 700; fill: #fff; }
.chart-ring text.ring-cap { font-size: 9px; fill: var(--muted); }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.legend li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.legend b { color: var(--text); margin-left: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.lh { background: var(--home); } .ld { background: var(--draw); } .la { background: var(--away); }

.acc-row {
  display: grid; gap: var(--gap); margin-top: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}
.accuracy .big { margin-top: 8px; }
.chart-card .chart { margin-top: 12px; }
.donut-card .chart { max-width: 420px; margin-top: 8px; }
.weeks { margin-top: 8px; font-size: 13px; }
.weeks summary { cursor: pointer; color: #c4b5fd; }

/* ---------------------------------------------------------------- matches */
.tabs {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 10px; max-width: 100%;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
}
.tabs a { padding: 8px 18px; border-radius: 999px; color: var(--muted); font-size: 14px; }
.tabs a.active { background: var(--accent-soft); color: var(--text); }
.match-cards {
  display: grid; gap: 18px; margin-top: 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.match-cards > .card + .card { margin-top: 0; }
.result { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.score { font-weight: 700; font-size: 18px; }
.probs { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.probs b { color: var(--muted); font-weight: 600; }
.league { font-size: 12px; font-weight: 700; color: var(--home); letter-spacing: 0.04em; }
.teams-title { overflow-wrap: anywhere; margin-bottom: 6px; }

/* ---------------------------------------------------------------- match */
.match-grid {
  display: grid; gap: var(--gap); margin: var(--gap) 0;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 0.8fr);
}
.match-grid > .card + .card { margin-top: 0; }
.odds { margin: 10px 0; font-size: 15px; }
.odds td { font-weight: 700; font-size: clamp(17px, 1.4vw, 22px); }
.card-main th, .card-main td { border-color: rgba(255, 255, 255, 0.18); }
.card-main th { color: rgba(255, 255, 255, 0.78); }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pair .big { margin-top: 8px; }
.scores { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.scores li { padding: 6px 12px; border-radius: 12px; background: var(--card-hover); }
.reasons, .facts { margin: 6px 0 0; padding-left: 18px; }
.reasons li, .facts li { margin: 6px 0; overflow-wrap: anywhere; }
.facts a { color: #c4b5fd; text-decoration: underline; }
.price-grid {
  display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px;
}

/* ---------------------------------------------------------------- research */
.l4 { margin-bottom: var(--gap); }
.l4-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.l4-grid .big { margin-top: 8px; font-size: clamp(24px, 2vw, 30px); }
.l4-delta { font-size: 15px; }
.l4-delta .value { font-weight: 700; font-size: 18px; }
.research-grid {
  display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}
.research-grid > .card + .card { margin-top: 0; }
.number { padding: 10px 0; border-top: 1px solid var(--line); }
.number .caption { margin: 0; }
.number .value { font-weight: 700; font-size: 20px; }
.links { margin-top: 12px; }

/* ---------------------------------------------------------------- data */
.data-grid {
  display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}
.data-grid > .card + .card { margin-top: 0; }
.facts-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; margin: 12px 0 0; }
.facts-list dt { color: var(--muted); font-size: 14px; }
.facts-list dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.error-card { max-width: 640px; }

/* ---------------------------------------------------------------- login */
.login-body { align-items: center; justify-content: center; padding: 16px; }
.login { width: 100%; max-width: 380px; }
.login-card { display: flex; flex-direction: column; gap: 12px; padding: 30px 26px; }
.login-card h1 { font-size: 26px; }
.login-card input, .login-card button {
  font: inherit; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line);
}
.login-card input { background: rgba(0, 0, 0, 0.35); color: var(--text); }
.login-card button { background: var(--text); color: #1e1b4b; font-weight: 700; cursor: pointer; }
.error { margin: 0; color: #fecaca; font-weight: 600; }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1100px) {
  .row1, .row3 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .match-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .match-grid > .card-main { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- phone */
@media (max-width: 640px) {
  body { display: block; padding-bottom: 76px; }
  .login-body { display: flex; padding-bottom: 16px; }
  .menu {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 64px;
    flex-direction: row; justify-content: space-around; gap: 0;
    padding: 0 8px env(safe-area-inset-bottom); border-right: 0; border-top: 1px solid var(--line);
    background: rgba(11, 11, 16, 0.92); backdrop-filter: blur(12px);
  }
  .brand { display: none; }
  .logout { margin-top: 0; }
  .menu-item { width: auto; min-width: 56px; height: 52px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; }
  .menu-label { position: static; width: auto; height: auto; clip: auto; font-size: 10px; }
  .page { padding: 14px 16px 24px; }
  .top { flex-wrap: wrap; gap: 12px; }
  .search { flex: 1 1 100%; }
  .period { margin-left: 0; }
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .col:nth-child(n+10) { display: none; } /* three grid lines first: at most 6 bars */
  .col .x { font-size: 9px; }
  .hero-top .muted-l { flex-basis: 100%; }
  .match-grid, .l4-grid, .price-grid { grid-template-columns: minmax(0, 1fr); }
  .match-grid > .card-main { grid-column: auto; }
  .card-head .caption { text-align: left; }
  .tabs { display: flex; }
  .tabs a { flex: 1; text-align: center; padding: 8px; }
  .chart-ring { width: 160px; height: 160px; }
}

/* ---------------------------------------------------------------- generated: bar heights
   0–100 % mapped to 0–85 % of the column: the value label above a 100 % bar stays visible. */
.bh-0 { height: 0%; }
.bh-1 { height: 0.85%; }
.bh-2 { height: 1.7%; }
.bh-3 { height: 2.55%; }
.bh-4 { height: 3.4%; }
.bh-5 { height: 4.25%; }
.bh-6 { height: 5.1%; }
.bh-7 { height: 5.95%; }
.bh-8 { height: 6.8%; }
.bh-9 { height: 7.65%; }
.bh-10 { height: 8.5%; }
.bh-11 { height: 9.35%; }
.bh-12 { height: 10.2%; }
.bh-13 { height: 11.05%; }
.bh-14 { height: 11.9%; }
.bh-15 { height: 12.75%; }
.bh-16 { height: 13.6%; }
.bh-17 { height: 14.45%; }
.bh-18 { height: 15.3%; }
.bh-19 { height: 16.15%; }
.bh-20 { height: 17%; }
.bh-21 { height: 17.85%; }
.bh-22 { height: 18.7%; }
.bh-23 { height: 19.55%; }
.bh-24 { height: 20.4%; }
.bh-25 { height: 21.25%; }
.bh-26 { height: 22.1%; }
.bh-27 { height: 22.95%; }
.bh-28 { height: 23.8%; }
.bh-29 { height: 24.65%; }
.bh-30 { height: 25.5%; }
.bh-31 { height: 26.35%; }
.bh-32 { height: 27.2%; }
.bh-33 { height: 28.05%; }
.bh-34 { height: 28.9%; }
.bh-35 { height: 29.75%; }
.bh-36 { height: 30.6%; }
.bh-37 { height: 31.45%; }
.bh-38 { height: 32.3%; }
.bh-39 { height: 33.15%; }
.bh-40 { height: 34%; }
.bh-41 { height: 34.85%; }
.bh-42 { height: 35.7%; }
.bh-43 { height: 36.55%; }
.bh-44 { height: 37.4%; }
.bh-45 { height: 38.25%; }
.bh-46 { height: 39.1%; }
.bh-47 { height: 39.95%; }
.bh-48 { height: 40.8%; }
.bh-49 { height: 41.65%; }
.bh-50 { height: 42.5%; }
.bh-51 { height: 43.35%; }
.bh-52 { height: 44.2%; }
.bh-53 { height: 45.05%; }
.bh-54 { height: 45.9%; }
.bh-55 { height: 46.75%; }
.bh-56 { height: 47.6%; }
.bh-57 { height: 48.45%; }
.bh-58 { height: 49.3%; }
.bh-59 { height: 50.15%; }
.bh-60 { height: 51%; }
.bh-61 { height: 51.85%; }
.bh-62 { height: 52.7%; }
.bh-63 { height: 53.55%; }
.bh-64 { height: 54.4%; }
.bh-65 { height: 55.25%; }
.bh-66 { height: 56.1%; }
.bh-67 { height: 56.95%; }
.bh-68 { height: 57.8%; }
.bh-69 { height: 58.65%; }
.bh-70 { height: 59.5%; }
.bh-71 { height: 60.35%; }
.bh-72 { height: 61.2%; }
.bh-73 { height: 62.05%; }
.bh-74 { height: 62.9%; }
.bh-75 { height: 63.75%; }
.bh-76 { height: 64.6%; }
.bh-77 { height: 65.45%; }
.bh-78 { height: 66.3%; }
.bh-79 { height: 67.15%; }
.bh-80 { height: 68%; }
.bh-81 { height: 68.85%; }
.bh-82 { height: 69.7%; }
.bh-83 { height: 70.55%; }
.bh-84 { height: 71.4%; }
.bh-85 { height: 72.25%; }
.bh-86 { height: 73.1%; }
.bh-87 { height: 73.95%; }
.bh-88 { height: 74.8%; }
.bh-89 { height: 75.65%; }
.bh-90 { height: 76.5%; }
.bh-91 { height: 77.35%; }
.bh-92 { height: 78.2%; }
.bh-93 { height: 79.05%; }
.bh-94 { height: 79.9%; }
.bh-95 { height: 80.75%; }
.bh-96 { height: 81.6%; }
.bh-97 { height: 82.45%; }
.bh-98 { height: 83.3%; }
.bh-99 { height: 84.15%; }
.bh-100 { height: 85%; }

/* ---------------------------------------------------------------- motion
   CSS only (CSP: no scripts). Everything is switched off for «уменьшить движение». */
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes grow-x { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes ring-in { from { opacity: 0; transform: rotate(-140deg) scale(0.82); } to { opacity: 1; transform: none; } }
@keyframes drift {
  0% { transform: translate(-12%, -8%) rotate(0deg); }
  100% { transform: translate(12%, 10%) rotate(25deg); }
}
@keyframes sheen { 0%, 70% { transform: translateX(-120%) skewX(-18deg); } 100% { transform: translateX(220%) skewX(-18deg); } }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.35); } 50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 18px rgba(139, 92, 246, 0.45); } 50% { box-shadow: 0 0 28px rgba(167, 139, 250, 0.75); } }
@keyframes bg-drift { 0% { transform: translate(0, 0); } 100% { transform: translate(-6%, 4%); } }

@media (prefers-reduced-motion: no-preference) {
  /* page: title and cards come up one after another */
  .title, .top { animation: fade 0.5s ease both; }
  .card { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .row1 > .card:nth-child(2) { animation-delay: 0.08s; }
  .kpis > .card:nth-child(1) { animation-delay: 0.12s; }
  .kpis > .card:nth-child(2) { animation-delay: 0.18s; }
  .kpis > .card:nth-child(3) { animation-delay: 0.24s; }
  .kpis > .card:nth-child(4) { animation-delay: 0.3s; }
  .matches > .card:nth-child(1), .match-cards > .card:nth-child(1), .data-grid > .card:nth-child(1) { animation-delay: 0.32s; }
  .matches > .card:nth-child(2), .match-cards > .card:nth-child(2), .data-grid > .card:nth-child(2) { animation-delay: 0.37s; }
  .matches > .card:nth-child(3), .match-cards > .card:nth-child(3), .data-grid > .card:nth-child(3) { animation-delay: 0.42s; }
  .matches > .card:nth-child(4), .match-cards > .card:nth-child(4) { animation-delay: 0.47s; }
  .matches > .card:nth-child(5), .match-cards > .card:nth-child(5) { animation-delay: 0.52s; }
  .matches > .card:nth-child(6), .match-cards > .card:nth-child(6) { animation-delay: 0.57s; }
  .matches > .card:nth-child(7), .match-cards > .card:nth-child(7) { animation-delay: 0.62s; }
  .matches > .card:nth-child(n+8), .match-cards > .card:nth-child(n+8) { animation-delay: 0.67s; }
  .row3 > .card, .acc-row > .card { animation-delay: 0.4s; }

  /* confidence bars grow from the floor, one by one, then glow softly */
  .col .b {
    transform-origin: bottom; animation: grow-y 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both, glow 3.2s ease-in-out 1.4s infinite;
  }
  .col .val { animation: fade 0.5s ease both; }
  .col:nth-child(4) .b { animation-delay: 0.25s, 1.4s; } .col:nth-child(4) .val { animation-delay: 0.85s; }
  .col:nth-child(5) .b { animation-delay: 0.31s, 1.6s; } .col:nth-child(5) .val { animation-delay: 0.91s; }
  .col:nth-child(6) .b { animation-delay: 0.37s, 1.8s; } .col:nth-child(6) .val { animation-delay: 0.97s; }
  .col:nth-child(7) .b { animation-delay: 0.43s, 2s; } .col:nth-child(7) .val { animation-delay: 1.03s; }
  .col:nth-child(8) .b { animation-delay: 0.49s, 2.2s; } .col:nth-child(8) .val { animation-delay: 1.09s; }
  .col:nth-child(9) .b { animation-delay: 0.55s, 2.4s; } .col:nth-child(9) .val { animation-delay: 1.15s; }
  .col:nth-child(10) .b { animation-delay: 0.61s, 2.6s; } .col:nth-child(10) .val { animation-delay: 1.21s; }
  .col:nth-child(11) .b { animation-delay: 0.67s, 2.8s; } .col:nth-child(11) .val { animation-delay: 1.27s; }
  .col:nth-child(12) .b { animation-delay: 0.73s, 3s; } .col:nth-child(12) .val { animation-delay: 1.33s; }
  .col:nth-child(13) .b { animation-delay: 0.79s, 3.2s; } .col:nth-child(13) .val { animation-delay: 1.39s; }
  .col:hover .b { transform: scaleY(1.03); transition: transform 0.2s; }

  /* probability strips fill from the left */
  .chart.probbar { animation: grow-x 1s cubic-bezier(0.3, 0.7, 0.2, 1) 0.35s both; }

  /* the ring turns into place */
  .chart-ring { animation: ring-in 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s both; }

  /* hero: a slow living glow and a light sheen passing every few seconds */
  .hero, .card-main { overflow: hidden; isolation: isolate; }
  .hero::before, .card-main::before {
    content: ""; position: absolute; inset: -40%; z-index: -1; pointer-events: none;
    background: radial-gradient(closest-side, rgba(196, 181, 253, 0.28), transparent 70%);
    animation: drift 14s ease-in-out infinite alternate;
  }
  .hero::after, .card-main::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 35%; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    animation: sheen 7s ease-in-out 1.5s infinite;
  }

  /* «всё в порядке» breathes */
  .kpi .ico.ok { animation: breathe 2.6s ease-in-out infinite; }

  /* cards answer the pointer */
  .card { transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
  .kpis > .card:hover, .matches > .card:hover, .match-cards > .card:hover, .data-grid > .card:hover {
    transform: translateY(-3px); border-color: rgba(167, 139, 250, 0.45);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(139, 92, 246, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  /* the background glow drifts very slowly */
  body::before {
    content: ""; position: fixed; inset: -10%; z-index: -1; pointer-events: none;
    background: radial-gradient(700px 420px at 30% 20%, rgba(124, 92, 255, 0.12), transparent 60%),
      radial-gradient(600px 380px at 80% 80%, rgba(56, 189, 248, 0.07), transparent 60%);
    animation: bg-drift 24s ease-in-out infinite alternate;
  }
  .menu-item.active { animation: glow 3.6s ease-in-out infinite; }
}
