:root {
  --ink: #122220;
  --ink-soft: #3d4a47;
  --muted: #6b7874;
  --line: #d5e0db;
  --bg: #eef3f0;
  --surface: #ffffff;
  --surface-2: #f6faf8;
  --brand: #0f5c56;
  --brand-2: #147a71;
  --accent: #c45c26;
  --good: #1f7a4d;
  --warn: #b7791f;
  --bad: #b42318;
  --shadow: 0 12px 32px rgba(18, 34, 32, 0.08);
  --radius: 18px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(20,122,113,.13), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(196,92,38,.07), transparent 48%),
    linear-gradient(180deg, #f5f9f7, var(--bg) 42%, #e8efeb);
}

.hidden { display: none !important; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 48px; }
.shell.narrow { width: min(780px, calc(100% - 32px)); }
.shell.wide { width: min(1240px, calc(100% - 28px)); }

.brand { font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; }
.brand span { color: var(--brand-2); }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.topbar.app {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 14px;
  position: sticky; top: 10px; z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar .left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
}
.topbar .right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex: 0 0 auto;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-link {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 650;
  padding: 8px 11px; border-radius: 999px; cursor: pointer;
}
.nav-link.active, .nav-link:hover { background: #e7f2ef; color: var(--brand); }

.pill {
  font-size: .8rem; font-weight: 700; padding: 6px 11px; border-radius: 999px;
  background: #e7f2ef; color: var(--brand);
}
.pill.success { background: #e5f6ec; color: var(--good); }

.progress-track { display: flex; gap: 6px; margin-bottom: 16px; }
.progress-track .seg {
  flex: 1; height: 6px; border-radius: 99px; background: #cfdad5;
}
.progress-track .seg.on { background: var(--brand-2); }

.hero-card, .panel, .ai-summary, .solved-banner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-card { padding: 28px; }
.hero-card.flat { box-shadow: none; margin-bottom: 14px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; font-weight: 700;
  color: var(--brand-2); margin: 0 0 8px;
}
h1 {
  font-family: var(--display); font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.15; margin: 0 0 10px; letter-spacing: -.02em;
}
.lede { color: var(--ink-soft); font-size: 1rem; line-height: 1.5; margin: 0 0 20px; }

.problem-solved-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px;
}
.solve-card {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
}
.solve-tag {
  display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--brand); margin-bottom: 8px;
}
.solve-card h3 { margin: 0 0 6px; font-size: .95rem; }
.solve-card p { margin: 0; color: var(--muted); font-size: .88rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  border: 1px solid transparent; border-radius: 12px; padding: 12px 16px;
  font: inherit; font-weight: 700; cursor: pointer;
}
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink-soft); }
.btn.tiny { padding: 7px 10px; font-size: .8rem; background: #e7f2ef; color: var(--brand); }
.text-link {
  border: 0; background: none; color: var(--brand-2); font: inherit; font-weight: 700;
  text-decoration: underline; cursor: pointer; padding: 0;
}

.sync-list { display: grid; gap: 8px; margin-bottom: 12px; }
.sync-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
}
.sync-item.done { border-color: #b9d4cf; background: #eef7f4; }
.sync-item.active { border-color: #b9d4cf; box-shadow: inset 3px 0 0 var(--brand-2); }
.sync-item .left strong { display: block; }
.sync-item .left span { color: var(--muted); font-size: .82rem; }
.sync-item .state { font-size: .8rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.sync-item.done .state { color: var(--good); }
.sync-item.active .state { color: var(--brand-2); }

.sync-meter {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 12px;
}
.sync-meter-top {
  display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px;
}
.sync-meter-top strong { font-size: .9rem; }
.sync-meter-top span { font-weight: 800; color: var(--brand); }
.sync-bar {
  height: 8px; border-radius: 99px; background: #d7e3df; overflow: hidden;
}
.sync-bar i {
  display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width .35s ease;
}
.sync-log {
  background: #123532; color: #d7efe9; border-radius: 12px; padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem; line-height: 1.45; margin-bottom: 16px; max-height: 140px; overflow: auto;
}
.sync-log div { opacity: .92; margin-bottom: 4px; }
.sync-log div:last-child { opacity: 1; font-weight: 700; color: #fff; }

.global-cogs {
  margin: 12px 0 14px; padding: 14px; box-shadow: none; background: var(--surface-2);
}
.flat-inner { box-shadow: none; }
.global-cogs-label {
  display: block; font-size: .86rem; font-weight: 650; margin-bottom: 8px; color: var(--ink-soft);
}
.global-cogs-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.global-cogs-row input {
  width: 90px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit;
}
.global-cogs-row .suffix { color: var(--muted); font-size: .86rem; font-weight: 600; }
.global-cogs-note { margin: 0; color: var(--muted); font-size: .82rem; font-weight: 600; }

.confidence-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: #fff8ee; border: 1px solid #f0d3b0; border-radius: 16px; padding: 14px 16px;
  box-shadow: var(--shadow);
}
.confidence-main { display: flex; align-items: center; gap: 12px; }
.confidence-score {
  width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center;
  background: #fff; border: 1px solid #f0d3b0; font-family: var(--display);
  font-size: 1.15rem; font-weight: 700; color: #8a5a12;
}
.confidence-main strong { display: block; margin-bottom: 2px; }
.confidence-main p { margin: 0; color: var(--ink-soft); font-size: .86rem; line-height: 1.4; }
.confidence-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.tip {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; margin-left: 5px; border-radius: 50%;
  background: #e7f2ef; color: var(--brand); font-size: .68rem; font-weight: 800;
  cursor: help; vertical-align: middle; border: 1px solid #c6ddd7;
}
.tip:hover::after, .tip:focus::after, .tip:hover::before, .tip:focus::before {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.tip::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
  width: min(240px, 70vw); background: #123532; color: #fff; padding: 8px 10px;
  border-radius: 10px; font-size: .74rem; font-weight: 600; line-height: 1.35;
  opacity: 0; visibility: hidden; transition: .15s ease; z-index: 40; text-align: left;
  box-shadow: var(--shadow);
}
.tip::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 2px);
  transform: translateX(-50%); border: 6px solid transparent; border-top-color: #123532;
  opacity: 0; visibility: hidden; transition: .15s ease; z-index: 40;
}

.cogs-table { display: grid; gap: 8px; margin-bottom: 12px; }
.cogs-row {
  display: grid; grid-template-columns: 1.5fr .8fr .8fr; gap: 10px; align-items: center;
  padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2);
}
.cogs-row input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit;
}
.cogs-row .sku-name { font-weight: 700; }
.cogs-row .meta { color: var(--muted); font-size: .8rem; }
.notice {
  background: #fff7ed; border: 1px solid #f0d3b0; color: #7a4a16;
  border-radius: 12px; padding: 11px 13px; margin-bottom: 16px; font-size: .9rem;
}

.trust-compare {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-bottom: 16px;
}
.compare-box {
  border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--surface-2);
}
.compare-box span { display: block; color: var(--muted); font-size: .8rem; font-weight: 650; margin-bottom: 6px; }
.compare-box strong { font-family: var(--display); font-size: 1.5rem; }
.compare-box p { margin: 6px 0 0; color: var(--muted); font-size: .86rem; }
.compare-box.desk { background: #123532; color: #fff; border-color: #123532; }
.compare-box.desk span, .compare-box.desk p { color: rgba(255,255,255,.72); }
.compare-arrow { font-size: 1.4rem; color: var(--brand-2); font-weight: 700; text-align: center; }
.trust-bullets { margin: 0 0 18px; padding-left: 18px; color: var(--ink-soft); }
.trust-bullets li { margin-bottom: 8px; }

.dash, .bridge, .sku-page, .insights-page { display: grid; gap: 14px; }

.solved-banner {
  padding: 14px 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center;
  background: linear-gradient(90deg, #e8f6f1, #fff); border-color: #b9d4cf;
}
.solved-banner strong { display: block; }
.solved-banner span { color: var(--muted); font-size: .86rem; }
.solved-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.solved-checks span {
  background: #e7f2ef; color: var(--brand); font-size: .75rem; font-weight: 700;
  padding: 5px 9px; border-radius: 999px;
}

.ai-summary {
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(15,92,86,.08), transparent 46%), var(--surface);
  border-color: #b9d4cf;
}
.ai-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.ai-badge {
  display: inline-flex; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand); background: #e7f2ef; border-radius: 999px; padding: 5px 10px; margin-bottom: 0;
}
.health-pill {
  font-size: .78rem; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  background: #e5f6ec; color: var(--good);
}
.health-pill.warn-pill { background: #fff4df; color: #8a5a12; }
.ai-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }
.ai-summary h2 { font-family: var(--display); font-size: 1.28rem; margin: 0 0 8px; }
.ai-status { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--ink-soft); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(31,122,77,.15); }
.status-dot.warn { background: var(--warn); box-shadow: 0 0 0 4px rgba(183,121,31,.18); }
.ai-facts {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px;
}
@media (min-width: 1100px) {
  .ai-facts { grid-template-columns: repeat(4, 1fr); }
}
.ai-facts div {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}
.ai-facts b { display: block; font-family: var(--display); font-size: 1.05rem; margin-bottom: 2px; }
.ai-facts span { color: var(--muted); font-size: .78rem; }
.ai-crux { display: grid; gap: 8px; }
.crux-item {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px;
}
.crux-item.alert {
  background: #fff5f4; border-color: #f0c4bf;
}
.crux-label {
  display: block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--brand); margin-bottom: 4px;
}
.crux-item.alert .crux-label { color: var(--bad); }
.crux-item p { margin: 0; color: var(--ink-soft); font-size: .9rem; line-height: 1.45; }
.ai-rec {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
.ai-rec h3 { margin: 0 0 6px; font-size: .95rem; }
.rec-lead { margin: 0 0 10px; color: var(--ink-soft); font-weight: 650; font-size: .9rem; }
.ai-rec ol { margin: 0 0 12px; padding-left: 18px; color: var(--ink-soft); }
.ai-rec li { margin-bottom: 8px; line-height: 1.4; }
.rec-impact {
  background: #e8f6f1; border: 1px solid #b9d4cf; border-radius: 10px;
  padding: 9px 10px; font-size: .8rem; font-weight: 700; color: var(--brand); margin-bottom: 12px;
}

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi-row.secondary-kpis { margin-top: -4px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; box-shadow: var(--shadow);
}
.kpi.issue { border-color: #f0c4bf; background: #fffaf9; }
.kpi .label { color: var(--muted); font-size: .78rem; font-weight: 700; margin-bottom: 5px; }
.kpi .value { font-family: var(--display); font-size: 1.35rem; font-weight: 650; margin-bottom: 4px; }
.kpi .desc { color: var(--ink-soft); font-size: .84rem; font-weight: 600; }
.kpi .delta { font-size: .76rem; font-weight: 700; margin-top: 8px; }
.kpi .delta.up { color: var(--good); }
.kpi .delta.down { color: var(--bad); }

.alerts-panel { padding: 15px 16px; }
.alerts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.alert-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: var(--surface-2);
}
.alert-card.critical { background: #fff5f4; border-color: #f0c4bf; }
.alert-card.warning { background: #fff8ee; border-color: #f0d3b0; }
.alert-card.watch { background: #f4f8ff; border-color: #c9d7f0; }
.alert-card .sev {
  display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 7px;
}
.alert-card.critical .sev { color: var(--bad); }
.alert-card.warning .sev { color: #8a5a12; }
.alert-card.watch .sev { color: #35598f; }
.alert-card h4 { margin: 0 0 5px; font-size: .95rem; }
.alert-card .metric { font-family: var(--display); font-size: 1.15rem; font-weight: 650; margin-bottom: 4px; }
.alert-card p { margin: 0 0 8px; color: var(--muted); font-size: .82rem; font-weight: 600; line-height: 1.35; }
.alert-card .fix { font-size: .8rem; font-weight: 700; color: var(--brand); }

.charts-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 12px;
  align-items: stretch;
}
.charts-row.secondary { grid-template-columns: 1fr 1fr; }
.panel { padding: 14px 15px; }
.chart-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.panel-head h3 { margin: 0 0 2px; font-size: .95rem; }
.hint { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 600; }
.chart-box {
  position: relative;
  width: 100%;
  height: 168px;
  flex: 0 0 auto;
}
.chart-box.donut { height: 188px; }
.chart-box canvas {
  width: 100% !important;
  height: 100% !important;
}
.chip {
  font-size: .72rem; font-weight: 700; color: var(--brand); background: #e7f2ef;
  border-radius: 999px; padding: 5px 9px; white-space: nowrap;
}
.chip.warn { background: #fff4df; color: #8a5a12; }

.insight-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.insight-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px; box-shadow: var(--shadow);
}
.insight-card .tag {
  display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 7px; color: var(--brand);
}
.insight-card.risk .tag { color: var(--bad); }
.insight-card.good .tag { color: var(--good); }
.insight-card.warn .tag { color: #8a5a12; }
.insight-card.risk { border-color: #f0c4bf; background: #fffaf9; }
.insight-card.warn { border-color: #f0d3b0; background: #fffaf3; }
.insight-card h4 { margin: 0 0 4px; font-size: .92rem; }
.insight-card .metric { font-family: var(--display); font-size: 1.05rem; margin-bottom: 3px; }
.insight-card p { margin: 0; color: var(--muted); font-size: .82rem; font-weight: 600; }

.pl-table { display: grid; }
.pl-row {
  display: grid; grid-template-columns: 1.3fr .7fr 1fr; gap: 10px;
  padding: 11px 8px; border-bottom: 1px solid var(--line); align-items: center;
}
.pl-row:last-child { border-bottom: 0; }
.pl-row.total {
  background: #eef7f4; border: 1px solid #c6ddd7; border-radius: 12px; margin-top: 6px; font-weight: 700;
}
.pl-row .name { font-weight: 700; }
.pl-row .amt { font-variant-numeric: tabular-nums; }
.pl-row .note { color: var(--muted); font-size: .84rem; font-weight: 600; }
.pl-row.negative .amt { color: var(--bad); }

.glossary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.glossary article {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
.glossary strong { display: block; margin-bottom: 4px; }
.glossary span { color: var(--muted); font-size: .84rem; font-weight: 600; }

.bridge-visual { display: grid; grid-template-columns: 1.35fr .9fr; gap: 16px; }
.bridge-steps { display: grid; gap: 7px; }
.bridge-step {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 11px 13px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
}
.bridge-step.start { background: #e7f2ef; border-color: #b9d4cf; }
.bridge-step.end { background: #123532; color: #fff; border-color: #123532; }
.bridge-step .label { font-weight: 700; }
.bridge-step .sub { opacity: .75; font-size: .8rem; margin-top: 2px; font-weight: 600; }
.bridge-step .amt { font-family: var(--display); font-size: 1.1rem; font-weight: 650; }
.bridge-note {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; align-self: start;
}
.bridge-note h3 { margin: 0 0 8px; }
.bridge-note > p { color: var(--ink-soft); line-height: 1.45; margin: 0 0 12px; }
.mini-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.mini-kpis div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.mini-kpis b { display: block; font-family: var(--display); font-size: 1.2rem; }
.mini-kpis span { color: var(--muted); font-size: .78rem; font-weight: 600; }

.reason-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.reason {
  border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: var(--surface-2);
}
.reason h4 { margin: 0 0 4px; }
.reason p { margin: 0; color: var(--muted); font-size: .86rem; font-weight: 600; }

.sku-table { overflow-x: auto; }
.sku-grid { width: 100%; border-collapse: collapse; font-size: .9rem; }
.sku-grid th, .sku-grid td {
  text-align: left; padding: 11px 9px; border-bottom: 1px solid var(--line); vertical-align: top;
}
.sku-grid th {
  color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
}
.sku-grid .bad { color: var(--bad); font-weight: 700; }
.sku-grid .good { color: var(--good); font-weight: 700; }
.focus-sku { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; }
.focus-copy h3 { margin: 0 0 8px; font-family: var(--display); }
.focus-copy p { color: var(--ink-soft); line-height: 1.5; margin: 0 0 12px; }
.metric-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.metric-mini div {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px;
}
.metric-mini strong { display: block; font-size: 1.05rem; margin-bottom: 3px; }
.metric-mini span { color: var(--muted); font-size: .8rem; font-weight: 600; }

.action-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.action-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; box-shadow: var(--shadow);
}
.action-card .prio {
  display: inline-block; font-size: .7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 8px; color: var(--accent);
}
.action-card h3 { margin: 0 0 6px; font-size: 1rem; }
.action-card p { margin: 0 0 12px; color: var(--ink-soft); font-size: .9rem; line-height: 1.4; }
.action-card .impact {
  font-size: .8rem; font-weight: 700; color: var(--good); margin-bottom: 12px;
}

.period {
  display: flex; flex-direction: column; gap: 3px; font-size: .7rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
}
.period select {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; background: #fff;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #123532; color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .78rem;
}

.toast {
  position: fixed; bottom: 18px; right: 18px; background: #123532; color: #fff;
  padding: 11px 14px; border-radius: 12px; box-shadow: var(--shadow); z-index: 60;
}

@media (max-width: 980px) {
  .problem-solved-grid, .kpi-row, .charts-row, .charts-row.secondary, .insight-strip,
  .ai-grid, .bridge-visual, .reason-grid, .focus-sku, .action-board, .glossary, .trust-compare, .alerts-grid {
    grid-template-columns: 1fr;
  }
  .compare-arrow { transform: rotate(90deg); }
  .cogs-row { grid-template-columns: 1fr; }
  .pl-row { grid-template-columns: 1fr; gap: 3px; }
  .solved-banner { flex-direction: column; align-items: flex-start; }
  .confidence-bar { flex-direction: column; align-items: flex-start; }
  .topbar.app { flex-wrap: wrap; }
  .topbar .left { flex-wrap: wrap; width: 100%; }
  .topbar .right { width: 100%; margin-left: 0; justify-content: flex-start; }
  .chart-box { height: 160px; }
  .chart-box.donut { height: 180px; }
}
