@font-face {
  font-family: "Onest";
  src: url("/static/fonts/onest-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #f3f1ec;
  --surface: #fffefa;
  --surface-subtle: #f8f6f1;
  --surface-strong: #ece9e2;
  --ink: #17181a;
  --ink-soft: #3f4248;
  --muted: #62666e;
  --quiet: #81858c;
  --line: #dedbd3;
  --line-strong: #c9c5bb;
  --accent: #e7582a;
  --accent-hover: #cc4520;
  --accent-soft: #fff0e9;
  --green: #147a51;
  --green-soft: #eaf7f0;
  --amber: #9a650d;
  --amber-soft: #fff5dc;
  --red: #b9362b;
  --red-soft: #feeeeb;
  --blue: #315da8;
  --blue-soft: #edf3ff;
  --sidebar: 224px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgb(24 24 22 / 12%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); color: var(--ink); font: 400 16px/1.5 "Onest", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgb(231 88 42 / 24%); outline-offset: 2px; }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(440px, 44%) 1fr; background: var(--surface); }
.auth__panel { padding: clamp(36px, 5vw, 76px); display: flex; flex-direction: column; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; width: max-content; font-size: 18px; font-weight: 700; letter-spacing: -.025em; }
.wordmark__mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; background: var(--ink); font-size: 17px; font-weight: 800; }
.wordmark--auth { margin-bottom: auto; }
.auth__copy { max-width: 440px; margin-top: 96px; }
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.auth h1 { margin-bottom: 14px; font-size: clamp(40px, 4vw, 56px); line-height: 1.02; letter-spacing: -.05em; }
.auth__copy > p:last-child { color: var(--muted); font-size: 17px; line-height: 1.55; }
.auth__form { display: grid; gap: 18px; max-width: 440px; margin-top: 40px; }
label { display: grid; gap: 8px; color: var(--ink-soft); font-size: 14px; line-height: 20px; font-weight: 600; }
input, select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(231 88 42 / 12%); }
.button { min-height: 48px; border: 1px solid transparent; border-radius: 10px; padding: 0 18px; cursor: pointer; font-size: 15px; line-height: 20px; font-weight: 650; transition: background .15s, border-color .15s, transform .15s; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .55; cursor: wait; }
.button--primary { color: #fff; background: var(--accent); }
.button--primary:hover { background: var(--accent-hover); }
.button--secondary { border-color: var(--line-strong); background: var(--surface); }
.button--secondary:hover { background: var(--surface-subtle); }
.button--quiet { color: var(--accent-hover); background: var(--accent-soft); }
.form-error { min-height: 20px; margin: -5px 0; color: var(--red); font-size: 13px; }
.auth__note { margin: auto 0 0; color: var(--quiet); font-size: 13px; }
.auth__aside { position: relative; overflow: hidden; display: grid; place-items: center; background: var(--ink); color: #fff; }
.auth__aside::before { content: ""; position: absolute; width: 520px; height: 520px; right: -240px; top: -220px; border: 92px solid var(--accent); border-radius: 50%; opacity: .9; }
.auth__visual { position: relative; z-index: 1; width: min(560px, 78%); }
.auth__visual > p { max-width: 520px; font-size: clamp(30px, 3.2vw, 48px); font-weight: 600; line-height: 1.1; letter-spacing: -.04em; }
.auth__steps { margin-top: 52px; display: flex; align-items: center; gap: 16px; color: #c8c8c6; font-size: 12px; line-height: 16px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.auth__steps i { flex: 1; height: 1px; background: #515255; }

.shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: var(--sidebar); padding: 24px 16px 18px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface); }
.sidebar__caption { margin: 8px 0 0 47px; color: var(--muted); font-size: 12px; line-height: 16px; }
.nav { display: grid; gap: 4px; margin-top: 44px; }
.nav a { min-height: 48px; padding: 0 12px; display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: center; border-radius: 10px; color: var(--muted); font-size: 15px; line-height: 20px; }
.nav a:hover { color: var(--ink); background: var(--surface-subtle); }
.nav a.is-active { color: var(--ink); background: var(--accent-soft); font-weight: 650; }
.nav__icon { display: grid; place-items: center; width: 22px; color: currentColor; }
.nav__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sidebar__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sync { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; line-height: 16px; }
.sync i { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #22a06b; box-shadow: 0 0 0 3px rgb(34 160 107 / 13%); }
.sync.is-partial i { background: #d79820; box-shadow: 0 0 0 3px rgb(215 152 32 / 14%); }
.text-button { border: 0; min-height: 40px; padding: 0 4px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; }
.text-button:hover { color: var(--ink); }
.main { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; z-index: 10; top: 0; height: 72px; padding: 0 clamp(28px, 3vw, 48px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgb(243 241 236 / 90%); backdrop-filter: blur(18px); }
.topbar__context { display: flex; align-items: baseline; gap: 12px; }
.topbar__context strong { font-size: 15px; line-height: 20px; }
.topbar__context span { color: var(--muted); font-size: 13px; line-height: 18px; }
.topbar__right { display: flex; align-items: center; gap: 14px; }
.topbar__scope { color: var(--muted); font-size: 13px; line-height: 18px; }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: 22px; }
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-subtle); }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mobile-brand, .mobile-nav { display: none; }
.content { width: min(100%, 1480px); margin: 0 auto; padding: 42px clamp(32px, 4vw, 64px) 96px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 36px; margin-bottom: 28px; }
.page-head h1 { margin: 0; font-size: clamp(36px, 3vw, 44px); line-height: 1.02; letter-spacing: -.045em; font-weight: 650; }
.page-head__note { max-width: 520px; margin: 0 0 3px; color: var(--muted); font-size: 15px; line-height: 22px; }
.section { margin-top: 40px; }
.section-head { margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.section-head h2 { margin: 0; font-size: 20px; line-height: 28px; letter-spacing: -.025em; }
.section-head p, .section-head button { margin: 0; color: var(--muted); font-size: 14px; line-height: 20px; }
.section-head button { min-height: 40px; border: 0; padding: 0 2px; background: transparent; cursor: pointer; }
.section-head button:hover { color: var(--accent-hover); }
.surface { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

.automation-bar { margin-bottom: 14px; padding: 14px 16px; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.automation-bar__state { display: flex; align-items: center; gap: 12px; min-width: 0; }
.automation-bar__state > div { min-width: 0; }
.automation-bar__state > i { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #d79820; box-shadow: 0 0 0 4px rgb(215 152 32 / 13%); }
.automation-bar.is-ready .automation-bar__state > i { background: #22a06b; box-shadow: 0 0 0 4px rgb(34 160 107 / 12%); }
.automation-bar strong { display: block; font-size: 14px; line-height: 20px; }
.automation-bar small { display: block; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.automation-bar button { flex: 0 0 auto; min-height: 40px; border: 0; padding: 0 8px; color: var(--accent-hover); background: transparent; cursor: pointer; font-size: 14px; font-weight: 650; }

.decision-hero { padding: 24px 26px; min-height: 148px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.decision-hero--warning { border-color: #ead8ac; }
.decision-hero--positive { border-color: #afd8c2; }
.decision-hero__body { max-width: 820px; }
.decision-hero h2 { max-width: 760px; margin: 12px 0 8px; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.12; letter-spacing: -.04em; }
.decision-hero p { max-width: 760px; margin: 0; color: var(--muted); font-size: 15px; line-height: 22px; }
.decision-hero__actions { min-width: 204px; display: flex; flex-direction: column; gap: 10px; }
.badge { width: max-content; display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 4px 10px; border-radius: 999px; font-size: 12px; line-height: 18px; font-weight: 650; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--eligible { color: var(--green); background: var(--green-soft); }
.badge--watchlist, .badge--partial { color: var(--amber); background: var(--amber-soft); }
.badge--no_bet, .badge--error { color: var(--red); background: var(--red-soft); }
.badge--neutral, .badge--connected { color: var(--blue); background: var(--blue-soft); }

.metric-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric { min-height: 118px; padding: 18px 20px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.metric__label { color: var(--muted); font-size: 13px; line-height: 18px; }
.metric__value { margin: 13px 0 0; font-size: 28px; font-weight: 650; line-height: 32px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metric__hint { margin-top: auto; padding-top: 8px; color: var(--quiet); font-size: 12px; line-height: 17px; }

.decision-list, .bet-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.decision-row { width: 100%; min-height: 88px; padding: 15px 18px; display: grid; grid-template-columns: 150px minmax(210px, 1.45fr) minmax(180px, 1fr) 92px 92px 22px; gap: 16px; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.decision-row:last-child, .bet-row:last-child { border-bottom: 0; }
.decision-row:hover, .bet-row:hover { background: var(--surface-subtle); }
.decision-row__event { min-width: 0; }
.decision-row__event strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 21px; }
.decision-row__event small, .decision-row__market small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 17px; }
.decision-row__market { color: var(--ink-soft); font-size: 14px; line-height: 20px; }
.decision-row__number { text-align: right; font-size: 18px; line-height: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
.decision-row__number small { color: var(--muted); font-size: 12px; font-weight: 400; }
.row-arrow { color: var(--quiet); font-size: 22px; }

.filters { margin-bottom: 14px; display: grid; grid-template-columns: 240px 1fr; gap: 12px; }
.filters input { justify-self: end; max-width: 420px; }
.empty { padding: 54px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); text-align: center; }
.empty h2 { margin-bottom: 8px; font-size: 22px; line-height: 28px; letter-spacing: -.03em; }
.empty p { margin: 0; color: var(--muted); font-size: 15px; line-height: 22px; }

.bet-row { width: 100%; min-height: 82px; padding: 14px 18px; display: grid; grid-template-columns: minmax(260px, 1.5fr) 140px 90px 190px 22px; gap: 16px; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.bet-row__title { min-width: 0; }
.bet-row__title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 21px; }
.bet-row__title small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 17px; }
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; line-height: 18px; }
.status::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--won { color: var(--green); }
.status--lost { color: var(--red); }
.status--pending, .status--live, .status--open, .status--unsettled { color: var(--amber); }
.bet-row__odds { text-align: right; font-size: 19px; line-height: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
.bet-row__odds small { color: var(--muted); font-size: 12px; font-weight: 400; }
.bet-row__money { text-align: right; }
.bet-row__money strong { display: block; font-size: 15px; line-height: 21px; font-variant-numeric: tabular-nums; }
.bet-row__money small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 17px; }

.automation-flow { overflow: hidden; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.automation-flow article { min-height: 184px; padding: 22px; border-right: 1px solid var(--line); }
.automation-flow article:last-child { border-right: 0; }
.automation-flow article > span { display: block; margin-bottom: 32px; color: var(--accent); font-size: 12px; line-height: 16px; font-weight: 750; letter-spacing: .08em; }
.automation-flow h3 { margin: 0 0 8px; font-size: 17px; line-height: 23px; }
.automation-flow p { margin: 0; color: var(--muted); font-size: 14px; line-height: 21px; }
.automation-note { margin: 12px 0 0; padding: 15px 17px; border: 1px solid #ead8ca; border-radius: 10px; background: var(--accent-soft); color: var(--ink-soft); font-size: 14px; line-height: 21px; }
.automation-note strong { color: var(--ink); }

.learning-hero { padding: 28px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); gap: 36px; align-items: end; }
.learning-hero h2 { margin: 15px 0 10px; font-size: 28px; line-height: 34px; letter-spacing: -.035em; }
.learning-hero p { margin: 0; color: var(--muted); font-size: 15px; line-height: 23px; }
.progress__head { margin-bottom: 10px; display: flex; justify-content: space-between; gap: 18px; font-size: 13px; line-height: 18px; }
.progress__track { overflow: hidden; height: 8px; border-radius: 99px; background: var(--surface-strong); }
.progress__track i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.progress small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 17px; }
.rule-list { display: grid; gap: 10px; }
.rule { padding: 19px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.rule h3 { margin-bottom: 6px; font-size: 16px; line-height: 23px; }
.rule p { margin: 0; color: var(--muted); font-size: 14px; line-height: 21px; }
.rule__meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.source-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.source-card { min-height: 170px; padding: 20px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.source-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.source-card h3 { margin: 3px 0 0; font-size: 16px; line-height: 22px; }
.source-card p { margin: 18px 0 24px; color: var(--muted); font-size: 14px; line-height: 21px; }
.source-card footer { margin-top: auto; color: var(--quiet); font-size: 12px; line-height: 17px; }

.archive-tools { display: flex; justify-content: flex-end; }
.archive-tools input { max-width: 460px; }
.archive-meta { margin: 18px 0 12px; color: var(--muted); font-size: 13px; }
.archive { min-height: 420px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); white-space: pre-wrap; font: 400 15px/1.72 "Onest", system-ui, sans-serif; }
.archive mark { padding: 1px 3px; border-radius: 3px; background: #ffe099; }

.drawer { position: fixed; z-index: 40; inset: 0; }
.drawer__backdrop { position: absolute; inset: 0; border: 0; background: rgb(23 24 26 / 45%); backdrop-filter: blur(2px); }
.drawer__panel { position: absolute; inset: 0 0 0 auto; width: min(620px, 94vw); overflow-y: auto; background: var(--surface); box-shadow: var(--shadow); }
.drawer__head { position: sticky; z-index: 2; top: 0; padding: 24px 26px; display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; border-bottom: 1px solid var(--line); background: rgb(255 254 250 / 94%); backdrop-filter: blur(16px); }
.drawer__head h2 { margin: 0; font-size: 26px; line-height: 32px; letter-spacing: -.035em; }
.drawer__body { padding: 26px; }
.detail-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.detail-metrics > div { min-height: 94px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-subtle); }
.detail-metrics span { display: block; color: var(--muted); font-size: 12px; line-height: 17px; }
.detail-metrics strong { display: block; margin-top: 12px; font-size: 18px; line-height: 24px; font-variant-numeric: tabular-nums; }
.detail-block { margin-top: 26px; }
.detail-block h3 { margin-bottom: 8px; font-size: 16px; line-height: 22px; }
.detail-block p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 23px; }
.detail-block--warning { padding: 16px; border-radius: 10px; background: var(--amber-soft); }
.factor-list, .source-list, .leg-list { display: grid; gap: 10px; }
.factor { padding: 13px 0; display: flex; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); font-size: 14px; }
.factor span { color: var(--muted); }
.source-link { min-height: 46px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; }
.source-link:hover { border-color: var(--accent); }
.tag-list { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 6px 9px; border-radius: 7px; color: var(--ink-soft); background: var(--surface-strong); font-size: 12px; line-height: 16px; }
.leg { padding: 17px; border: 1px solid var(--line); border-radius: 11px; }
.leg h3 { margin-bottom: 6px; font-size: 16px; line-height: 22px; }
.leg__market { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 20px; }
.leg__meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 12px; line-height: 18px; }
.leg__notes { margin: 13px 0 0; color: var(--muted); font-size: 13px; line-height: 20px; }

.loading, .error-state { min-height: 55vh; display: grid; place-items: center; align-content: center; text-align: center; }
.loading i { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; }
.loading p { margin: 13px 0 0; color: var(--muted); font-size: 14px; }
.error-state h1 { margin-bottom: 8px; font-size: 30px; }
.error-state p { color: var(--muted); }
.toast { position: fixed; z-index: 60; right: 24px; bottom: 24px; max-width: 420px; padding: 14px 17px; border-radius: 10px; color: #fff; background: var(--ink); box-shadow: var(--shadow); font-size: 14px; line-height: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1240px) {
  .content { padding-inline: 28px; }
  .decision-row { grid-template-columns: 142px minmax(190px, 1.3fr) minmax(160px, 1fr) 78px 72px 18px; gap: 12px; }
  .bet-row { grid-template-columns: minmax(220px, 1fr) 130px 78px 170px 18px; gap: 12px; }
  .automation-flow { grid-template-columns: repeat(2, 1fr); }
  .automation-flow article:nth-child(2) { border-right: 0; }
  .automation-flow article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .source-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { height: 68px; padding-inline: 20px; }
  .mobile-brand { display: inline-flex; align-items: center; gap: 9px; border: 0; padding: 0; background: transparent; font-size: 17px; font-weight: 700; }
  .mobile-brand .wordmark__mark { width: 34px; height: 34px; }
  .topbar__context { display: none; }
  .content { padding: 30px 20px 108px; }
  .page-head { align-items: flex-start; }
  .page-head__note { max-width: 420px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .decision-row { grid-template-columns: 142px minmax(170px, 1.2fr) minmax(150px, 1fr) 78px 68px 18px; overflow-x: auto; }
  .mobile-nav { position: fixed; z-index: 25; inset: auto 0 0; height: 78px; padding: 8px 10px max(8px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); background: rgb(255 254 250 / 96%); backdrop-filter: blur(18px); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 12px; line-height: 16px; }
  .mobile-nav a.is-active { color: var(--accent-hover); font-weight: 650; }
  .nav-icon { height: 18px; display: grid; place-items: center; font-size: 16px; }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .topbar__scope { display: none; }
  .page-head { display: block; }
  .page-head h1 { font-size: 34px; line-height: 38px; }
  .page-head__note { margin-top: 10px; font-size: 14px; line-height: 21px; }
  .automation-bar { align-items: flex-start; }
  .automation-bar small { white-space: normal; }
  .decision-hero { grid-template-columns: 1fr; padding: 22px; }
  .decision-hero__actions { min-width: 0; display: grid; grid-template-columns: 1fr 1fr; }
  .metric-grid { gap: 8px; }
  .metric { min-height: 112px; padding: 16px; }
  .metric__value { font-size: 25px; }
  .filters { grid-template-columns: 1fr; }
  .filters input { max-width: none; }
  .decision-list, .bet-list { display: grid; gap: 10px; overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .decision-row, .bet-row { position: relative; min-height: 0; padding: 16px; display: grid; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: visible; }
  .decision-row { grid-template-columns: 1fr auto; gap: 12px 16px; }
  .decision-row .badge { grid-column: 1; }
  .decision-row__event { grid-column: 1 / -1; }
  .decision-row__event strong { white-space: normal; }
  .decision-row__market { grid-column: 1 / -1; }
  .decision-row__number { text-align: left; }
  .decision-row .row-arrow { position: absolute; right: 16px; top: 18px; }
  .bet-row { grid-template-columns: 1fr auto; gap: 12px 16px; }
  .bet-row__title { grid-column: 1 / -1; }
  .bet-row__title strong { white-space: normal; }
  .bet-row__odds, .bet-row__money { text-align: left; }
  .bet-row .row-arrow { position: absolute; right: 16px; top: 18px; }
  .automation-flow, .learning-hero, .source-grid { grid-template-columns: 1fr; }
  .automation-flow article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .automation-flow article:last-child { border-bottom: 0; }
  .automation-flow article > span { margin-bottom: 18px; }
  .learning-hero { gap: 28px; }
  .rule { grid-template-columns: 1fr; gap: 16px; }
  .detail-metrics { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .content { padding-inline: 14px; }
  .topbar { padding-inline: 14px; }
  .page-head h1 { font-size: 31px; line-height: 35px; }
  .decision-hero__actions { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric { padding: 14px; }
  .metric__value { font-size: 23px; line-height: 28px; }
  .section { margin-top: 34px; }
  .section-head h2 { font-size: 18px; }
  .automation-bar { display: block; }
  .automation-bar button { margin: 10px 0 0 20px; }
  .drawer__head, .drawer__body { padding: 20px; }
  .auth { display: block; }
  .auth__panel { min-height: 100vh; padding: 28px 22px; }
  .auth__aside { display: none; }
  .auth__copy { margin-top: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
