:root {
  --navy: #0b2033;
  --blue: #0879bc;
  --blue-2: #2b9bd8;
  --blue-3: #dff1fb;
  --blue-4: #eef8fd;
  --bg: #f4f9fd;
  --surface: #ffffff;
  --surface-2: #f8fbfd;
  --line: #d8e7f0;
  --muted: #60788c;
  --muted-2: #88a0b2;
  --good: #14845f;
  --good-bg: #e8f7f1;
  --warn: #a36a00;
  --warn-bg: #fff5db;
  --bad: #bd302c;
  --bad-bg: #fff0ef;
  --shadow: 0 12px 36px rgba(11, 32, 51, .07);
  --radius: 22px;
  --font: Calibri, Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100dvh; color: var(--navy); background: linear-gradient(180deg, #eff8fd 0, var(--bg) 240px); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.auth-shell { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 50% -10%, #cfeafa, #f4f9fd 48%, #e9f5fc); }
.auth-card { width: min(100%, 420px); padding: 36px 30px 28px; border: 1px solid rgba(216,231,240,.95); border-radius: 28px; background: rgba(255,255,255,.94); box-shadow: 0 24px 70px rgba(11,32,51,.13); backdrop-filter: blur(22px); }
.auth-logo { display: block; width: 92px; height: auto; margin: 0 auto 28px; }
.eyebrow { margin: 0 0 9px; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.auth-card h1 { margin: 0; font-size: 28px; line-height: 1.05; letter-spacing: -.04em; }
.auth-copy { margin: 11px 0 24px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.auth-card form { display: grid; gap: 14px; }
.auth-card label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
.auth-card input { width: 100%; min-height: 50px; padding: 0 14px; color: var(--navy); border: 1px solid var(--line); border-radius: 13px; outline: none; background: #fff; }
.auth-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(8,121,188,.12); }
.primary-button { min-height: 50px; margin-top: 4px; border: 0; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--blue), #096aa3); font-weight: 700; box-shadow: 0 8px 22px rgba(8,121,188,.2); }
.primary-button:disabled { opacity: .6; cursor: wait; }
.form-message { min-height: 19px; margin: 12px 0 0; color: var(--bad); font-size: 12px; }
.privacy-note { margin: 11px 0 0; color: var(--muted-2); font-size: 11px; text-align: center; }

.shell { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 238px; display: flex; flex-direction: column; padding: 26px 18px 18px; border-right: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(18px); }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 30px; font-weight: 700; }
.side-brand img { width: 70px; height: auto; }
.side-brand span { padding-left: 10px; border-left: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.side-nav { display: grid; gap: 5px; }
.nav-button { min-height: 45px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border: 0; border-radius: 13px; color: var(--muted); background: transparent; font-size: 14px; font-weight: 600; text-align: left; }
.nav-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-button:hover { color: var(--navy); background: var(--blue-4); }
.nav-button.active { color: var(--blue); background: var(--blue-3); }
.side-footer { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 10px; margin-top: auto; padding: 13px 10px 2px; border-top: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--blue); font-weight: 700; }
.side-footer strong, .side-footer span { display: block; }
.side-footer strong { font-size: 13px; }
.side-footer div span { margin-top: 2px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; }
.mobile-source-button { display: none; }

button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid rgba(47,165,255,.42);
  outline-offset: 2px;
}
main:focus { outline: none; }

.app-column { min-height: 100dvh; margin-left: 238px; }
.topbar { position: sticky; top: 0; z-index: 8; min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px max(24px, calc((100vw - 1460px) / 2)); border-bottom: 1px solid rgba(216,231,240,.9); background: rgba(244,249,253,.88); backdrop-filter: blur(20px); }
.top-context { margin: 0 0 2px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: 23px; letter-spacing: -.035em; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.freshness { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.86); font-size: 11px; white-space: nowrap; }
.freshness i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.freshness.warn i { background: var(--warn); }
.freshness.error i { background: var(--bad); }
.refresh-button { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid #b9dceb; border-radius: 12px; color: var(--blue); background: #fff; font-weight: 700; }
.refresh-button:hover { border-color: var(--blue); background: var(--blue-4); }
.refresh-button:disabled { opacity: .65; cursor: wait; }
.refresh-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.refresh-button.loading svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

main { width: min(100%, 1220px); margin: 0 auto; padding: 30px 28px 76px; }
.view { animation: appear .2s ease; }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.hero h2 { margin: 0; font-size: clamp(27px, 4vw, 40px); letter-spacing: -.055em; }
.hero p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.scope-pill, .status-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.scope-pill.live::before, .status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.scope-pill.plan::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.status-pill.warn::before { background: var(--warn); }
.status-pill.bad::before { background: var(--bad); }
.status-pill.vision::before { background: var(--muted-2); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 22px; }
.kpi-card { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 18px rgba(11,32,51,.035); }
.kpi-card.accent { color: #fff; border-color: transparent; background: linear-gradient(145deg, #0c79ba, #075f93); box-shadow: 0 15px 32px rgba(8,121,188,.22); }
.kpi-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.kpi-card.accent .kpi-label, .kpi-card.accent .kpi-detail { color: rgba(255,255,255,.76); }
.kpi-value { margin-top: 12px; overflow: hidden; font-size: clamp(21px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.045em; text-overflow: ellipsis; white-space: nowrap; }
.kpi-detail { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.delta { color: var(--good); font-weight: 700; }
.delta.negative { color: var(--bad); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr); gap: 15px; margin-bottom: 22px; }
.grid-equal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-bottom: 22px; }
.panel { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.96); box-shadow: 0 5px 18px rgba(11,32,51,.035); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-head h3 { margin: 0; font-size: 16px; letter-spacing: -.025em; }
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.panel-link { border: 0; color: var(--blue); background: transparent; font-size: 12px; font-weight: 700; }

.mini-bars { height: 190px; display: flex; align-items: flex-end; gap: 8px; padding-top: 10px; }
.bar-column { min-width: 0; flex: 1; height: 100%; display: grid; grid-template-rows: 1fr auto; align-items: end; gap: 8px; }
.bar-track { height: 100%; display: flex; align-items: flex-end; border-radius: 9px; background: linear-gradient(180deg, transparent 0, var(--blue-4) 100%); overflow: hidden; }
.bar-fill { width: 100%; min-height: 2px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--blue-2), var(--blue)); }
.bar-fill.soft { background: #b8deef; }
.bar-label { overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 700; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.bar-value { display: none; }

.insight-list, .source-list, .invoice-list, .product-list { display: grid; gap: 9px; }
.insight { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 11px; min-height: 54px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.insight-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--blue); background: var(--blue-3); font-size: 15px; font-weight: 700; }
.insight strong { display: block; font-size: 13px; }
.insight small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.insight-value { font-size: 13px; font-weight: 700; white-space: nowrap; }

.segmented { display: inline-flex; min-height: 37px; padding: 3px; border-radius: 11px; background: #e8f3f9; }
.segmented button { min-width: 54px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; }
.segmented button.active { color: var(--navy); background: #fff; box-shadow: 0 2px 8px rgba(11,32,51,.08); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.select-control { min-height: 39px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--navy); background: #fff; font-weight: 600; }

.data-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 15px; min-height: 58px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.data-row strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.data-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.row-value { text-align: right; white-space: nowrap; }
.row-value strong { font-size: 14px; }
.invoice-row { grid-template-columns: 9px minmax(0,1fr) auto; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px var(--warn-bg); }
.dot.paid { background: var(--good); box-shadow: 0 0 0 4px var(--good-bg); }
.dot.overdue { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.invoice-row a { color: var(--blue); text-decoration: none; }
.empty { padding: 24px; border: 1px dashed var(--line); border-radius: 15px; color: var(--muted); font-size: 12px; text-align: center; }

.product-tabs { display: flex; gap: 7px; margin-bottom: 15px; padding-bottom: 3px; overflow-x: auto; scrollbar-width: none; }
.product-tabs::-webkit-scrollbar { display: none; }
.product-tab { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: #fff; font-weight: 700; white-space: nowrap; }
.product-tab.active { color: #fff; border-color: var(--blue); background: var(--blue); }
.product-hero { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; margin-bottom: 15px; padding: 21px; border-radius: var(--radius); background: linear-gradient(135deg, #e0f2fc, #f7fcff); border: 1px solid #cbe5f2; }
.product-hero h3 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.product-hero p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.product-price { text-align: right; }
.product-price strong { display: block; font-size: 24px; }
.product-price span { color: var(--muted); font-size: 10px; }
.metric-cascade { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; }
.metric-step { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.metric-step span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.metric-step strong { display: block; margin-top: 8px; font-size: 19px; letter-spacing: -.03em; }
.metric-step small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.variant-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.variant-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.variant-head h4 { margin: 0; font-size: 15px; }

.plan-table { overflow-x: auto; }
.plan-table table { width: 100%; min-width: 660px; border-collapse: collapse; }
.plan-table th, .plan-table td { padding: 11px 9px; border-bottom: 1px solid var(--line); font-size: 11px; text-align: right; white-space: nowrap; }
.plan-table th { color: var(--muted); font-weight: 700; }
.plan-table th:first-child, .plan-table td:first-child { position: sticky; left: 0; z-index: 1; text-align: left; background: #fff; }
.plan-table tr:last-child td { border-bottom: 0; }
.mobile-plan-panel { display: none; }
.year-picker { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; padding: 4px; border-radius: 13px; background: #e8f3f9; }
.year-picker button { min-height: 40px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; }
.year-picker button.active { color: #fff; background: var(--blue); box-shadow: 0 4px 12px rgba(8,121,188,.18); }
.mobile-plan-metrics { display: grid; gap: 8px; margin-top: 13px; }
.negative-number { color: var(--bad); }
.positive-number { color: var(--good); }
.fact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.fact { padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.fact span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.fact strong { display: block; margin-top: 6px; font-size: 13px; line-height: 1.35; }

.source-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.source-card h4 { margin: 0; font-size: 14px; }
.source-card p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.source-card a { color: var(--blue); text-decoration: none; font-weight: 700; }
.source-meta { text-align: right; white-space: nowrap; }
.source-meta span { display: block; color: var(--muted); font-size: 9px; }
.definition-list { display: grid; gap: 10px; }
.definition { padding: 13px 14px; border-left: 3px solid var(--blue); border-radius: 0 12px 12px 0; background: var(--blue-4); }
.definition strong { font-size: 12px; }
.definition p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }

.mobile-nav { display: none; }
.toast { position: fixed; z-index: 40; right: 22px; bottom: 22px; max-width: min(360px, calc(100vw - 32px)); padding: 12px 15px; border-radius: 13px; color: #fff; background: var(--navy); box-shadow: var(--shadow); font-size: 12px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-cascade { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  body { background: var(--bg); }
  .sidebar { display: none; }
  .app-column { margin-left: 0; }
  .topbar { min-height: 70px; padding: 10px 14px; }
  .top-context { display: none; }
  .topbar h1 { font-size: 20px; }
  .freshness { display: none; }
  .refresh-button { width: 42px; height: 42px; justify-content: center; padding: 0; }
  .refresh-button span { display: none; }
  .mobile-source-button { position: relative; width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid #b9dceb; border-radius: 12px; color: var(--blue); background: #fff; }
  .mobile-source-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-source-button i { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: var(--good); }
  .mobile-source-button.warn i { background: var(--warn); }
  .mobile-source-button.error i { background: var(--bad); }
  main { padding: 22px 13px calc(92px + env(safe-area-inset-bottom)); }
  .hero { display: block; margin-bottom: 17px; }
  .hero .scope-pill { margin-top: 11px; }
  .hero h2 { font-size: 30px; }
  .kpi-grid { gap: 9px; margin-bottom: 15px; }
  .kpi-card { padding: 15px 13px; border-radius: 18px; }
  .kpi-value { font-size: clamp(19px, 6vw, 24px); }
  .grid-2, .grid-equal { grid-template-columns: 1fr; gap: 12px; margin-bottom: 15px; }
  .panel { padding: 17px 14px; border-radius: 19px; }
  .panel-head { margin-bottom: 14px; }
  .mini-bars { height: 158px; gap: 5px; }
  .product-hero { padding: 17px; }
  .product-hero h3 { font-size: 21px; }
  .product-price strong { font-size: 20px; }
  .metric-cascade { gap: 7px; }
  .metric-step { padding: 13px; border-radius: 14px; }
  .metric-step strong { font-size: 17px; }
  .fact-grid { grid-template-columns: 1fr; }
  .source-card { grid-template-columns: 1fr; }
  .source-meta { text-align: left; }
  .mobile-nav { position: fixed; inset: auto 0 0 0; z-index: 12; min-height: calc(72px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5,1fr); padding: 6px 8px env(safe-area-inset-bottom); border-top: 1px solid rgba(216,231,240,.95); background: rgba(255,255,255,.96); box-shadow: 0 -8px 24px rgba(11,32,51,.06); backdrop-filter: blur(20px); }
  .mobile-nav .nav-button { min-width: 0; min-height: 58px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 4px; border-radius: 11px; font-size: 10px; text-align: center; }
  .mobile-nav .nav-button svg { width: 19px; height: 19px; }
  .toast { right: 16px; bottom: calc(82px + env(safe-area-inset-bottom)); }
}

@media (max-width: 620px) {
  .topbar { min-height: 64px; padding: 8px 12px; }
  .topbar h1 { font-size: 19px; }
  .top-actions { gap: 7px; }
  main { padding: 17px 12px calc(106px + env(safe-area-inset-bottom)); }

  .hero { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 10px; margin-bottom: 15px; padding: 0 2px; }
  .hero h2 { display: none; }
  .hero p { margin: 0; max-width: 31ch; font-size: 12px; line-height: 1.4; }
  .hero .scope-pill { margin: 0; align-self: start; }
  .hero .filters { grid-column: 1 / -1; width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  .hero .filters .select-control { width: 100%; min-height: 44px; }
  .hero .filters .scope-pill { min-height: 44px; justify-content: center; }
  .hero .refresh-button { width: 44px; min-height: 44px; padding: 0; }
  .hero .refresh-button span { display: none; }

  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-bottom: 13px; }
  .kpi-grid .kpi-card:first-child, .kpi-grid .kpi-card:nth-child(4) { grid-column: 1 / -1; }
  .kpi-card { min-height: 104px; padding: 15px; border-radius: 17px; }
  .kpi-card:first-child, .kpi-card:nth-child(4) { min-height: 96px; }
  .kpi-card .scope-pill { display: none; }
  .kpi-label { font-size: 10px; line-height: 1.25; }
  .kpi-value { margin-top: 9px; font-size: 24px; }
  .kpi-detail { margin-top: 5px; font-size: 10px; line-height: 1.35; }

  .grid-2, .grid-equal { gap: 11px; margin-bottom: 13px; }
  .panel { padding: 15px 13px; border-radius: 18px; }
  .panel-head { margin-bottom: 13px; }
  .panel-head h3 { font-size: 15px; }
  .panel-head p { max-width: 36ch; font-size: 10px; line-height: 1.35; }
  .mini-bars { height: 148px; gap: 5px; }
  .bar-label { font-size: 9px; }

  .insight { grid-template-columns: 38px minmax(0,1fr) auto; min-height: 60px; padding: 10px; }
  .insight-icon { width: 38px; height: 38px; }
  .insight strong { font-size: 12px; }
  .insight-value { font-size: 12px; }

  .data-row { min-height: 62px; padding: 11px; }
  .invoice-row { grid-template-columns: 10px minmax(0,1fr); align-items: start; }
  .invoice-row .dot { margin-top: 6px; }
  .invoice-row .row-value { grid-column: 2; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 2px; text-align: left; }
  .invoice-row .row-value strong { font-size: 15px; }
  .invoice-row .row-value small { margin: 0; text-align: right; }

  .product-tabs { margin-inline: -12px; padding: 0 12px 5px; scroll-padding-inline: 12px; }
  .product-tab { min-height: 44px; padding: 0 15px; }
  .product-hero { grid-template-columns: minmax(0,1fr) auto; padding: 16px 14px; border-radius: 17px; }
  .product-hero h3 { font-size: 20px; }
  .product-hero p { font-size: 10px; line-height: 1.4; }
  .metric-cascade { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .metric-step { min-height: 112px; padding: 13px; }
  .metric-step strong { font-size: 19px; }
  .metric-step small { font-size: 10px; line-height: 1.35; }
  .variant-card { padding: 14px; border-radius: 17px; }

  .mobile-plan-panel { display: block; }
  #view-plan .grid-2 > .panel:first-child { display: none; }
  .year-picker { overflow-x: auto; }
  .year-picker button { min-width: 54px; min-height: 44px; }

  .source-card { min-width: 0; padding: 14px; }
  .source-card > div, .source-card h4, .source-card p { min-width: 0; max-width: 100%; }
  .source-card h4, .source-card h4 a { overflow-wrap: anywhere; word-break: break-word; }
  .source-card p { overflow-wrap: anywhere; }
  .source-meta { white-space: normal; }
  .definition { padding: 12px; }

  .mobile-nav .nav-button svg { width: 21px; height: 21px; }
}

@media (max-width: 390px) {
  .auth-card { padding: 30px 22px 24px; }
  .kpi-value { font-size: 22px; }
  .metric-step strong { font-size: 18px; }
  .mobile-nav .nav-button { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
