:root {
  color-scheme: light;
  --page: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --ink: #111827;
  --ink-2: #4b5563;
  --muted: #6b7280;
  --line: #e3e6eb;
  --line-strong: #cfd4dc;
  --brand: #14243a;
  --accent: #1f5fbf;
  --accent-ink: #ffffff;
  --focus: #2a78d6;
  --ok: #0a7d32;
  --ok-bg: #e8f5ec;
  --info: #1f5fbf;
  --info-bg: #eaf1fc;
  --warn: #8a5a00;
  --warn-bg: #fdf4e1;
  --bad: #b42323;
  --bad-bg: #fcebeb;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --grid: #e7e8ea;
  --axis: #c3c2b7;
  --gap: rgba(107, 114, 128, 0.09);
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
  --radius: 12px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --page: #0f1115;
    --surface: #171a20;
    --surface-2: #1f232b;
    --ink: #f3f4f6;
    --ink-2: #c5cad3;
    --muted: #9aa1ad;
    --line: #2a2f38;
    --line-strong: #3a404b;
    --accent: #5b9bf0;
    --accent-ink: #0b1220;
    --ok: #4cc977;
    --ok-bg: #12271a;
    --info: #7fb0f5;
    --info-bg: #14223a;
    --warn: #f0b64a;
    --warn-bg: #2b2210;
    --bad: #f07a7a;
    --bad-bg: #321717;
    --series-1: #3987e5;
    --series-2: #d95926;
    --grid: #2c2c2a;
    --axis: #383835;
    --gap: rgba(154, 161, 173, 0.1);
    --shadow: none;
  }
}
* {
  box-sizing: border-box;
}
html {
  background: var(--page);
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 16px;
  line-height: 1.4;
}
h3 {
  font-size: 15px;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  inset-inline-start: 8px;
  top: -60px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 50;
}
.skip:focus {
  top: 8px;
}
.muted {
  color: var(--muted);
}
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Buttons */
button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-weight: 600;
  font-size: 14px;
}
button:hover {
  background: var(--surface-2);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
button.primary:hover {
  filter: brightness(1.07);
}
button.danger {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}
button.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
button.ghost:hover {
  background: var(--surface-2);
}
button.ghost.danger {
  color: var(--bad);
  background: transparent;
}
button.small {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 13px;
}
button.block {
  width: 100%;
}
button.link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.icon-button {
  min-height: 36px;
  width: 36px;
  padding: 0;
  border: 0;
  background: transparent;
}
button[aria-busy='true'] {
  opacity: 0.7;
}

/* Forms */
form {
  display: grid;
  gap: 14px;
}
label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
}
input,
select {
  min-height: 44px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  font-weight: 400;
}
input[type='checkbox'],
input[type='radio'] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}
.hint {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}
.error {
  color: var(--bad);
  font-size: 14px;
}
.error:empty {
  display: none;
}
.password-wrap {
  position: relative;
  display: block;
}
.password-wrap input {
  padding-inline-end: 72px;
}
.password-wrap button {
  position: absolute;
  inset-inline-end: 4px;
  top: 5px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
legend {
  font-weight: 700;
  margin-bottom: 8px;
  display: grid;
}
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 400;
}
.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--info-bg);
}
.choice.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.choice span {
  display: grid;
}
.choice small {
  color: var(--muted);
}

/* Auth & onboarding */
.auth-page,
.onboard,
.loading-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  align-content: center;
  gap: 16px;
}
.auth-card,
.onboard-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px;
  display: grid;
  gap: 14px;
  box-shadow: var(--shadow);
}
.onboard-card.wide {
  width: min(760px, 100%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
}
.brand b {
  font-weight: 500;
  color: var(--muted);
}
.auth-foot {
  text-align: center;
  font-size: 14px;
}
.fine {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}
.step {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.signout {
  font-size: 14px;
}

/* Shell */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.biz,
.biz-name {
  max-width: 260px;
}
.biz select {
  min-height: 38px;
  font-weight: 600;
}
.biz-name {
  font-weight: 600;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 16px;
}
.nav {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
}
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.nav a:hover {
  background: var(--surface-2);
}
.nav a.active {
  background: var(--info-bg);
  color: var(--accent);
}
.dot {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--bad);
  color: #fff;
  font-size: 11px;
  display: inline-grid;
  place-items: center;
}
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px 64px;
  display: grid;
  gap: 18px;
  transition: opacity 0.15s;
}
.page.refetch {
  opacity: 0.6;
}
.page:focus {
  outline: none;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
label.inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink-2);
}
label.inline select {
  width: auto;
  min-height: 38px;
}
.loading-line {
  color: var(--muted);
  padding: 40px 0;
  text-align: center;
}

/* Range bar */
.rangebar {
  display: flex;
  align-items: center;
  gap: 12px 16px;
  flex-wrap: wrap;
}
.segmented {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
}
.segmented button {
  min-height: 32px;
  padding: 4px 12px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  border-radius: 7px;
  font-variant-numeric: tabular-nums;
}
.segmented button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.dates {
  font-weight: 600;
}
.fresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13.5px;
  margin-inline-start: auto;
}

/* Notices & badges */
.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--info-bg);
  color: var(--ink);
  font-size: 14px;
}
.notice .icon {
  color: var(--info);
  margin-top: 1px;
}
.notice.warn {
  background: var(--warn-bg);
}
.notice.warn .icon {
  color: var(--warn);
}
.notice.ok {
  background: var(--ok-bg);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  height: fit-content;
}
.badge .icon {
  width: 14px;
  height: 14px;
}
.badge.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.badge.info {
  background: var(--info-bg);
  color: var(--info);
}
.badge.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.badge.bad {
  background: var(--bad-bg);
  color: var(--bad);
}

/* KPIs */
.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: grid;
  gap: 4px;
  align-content: start;
  box-shadow: var(--shadow);
}
.kpi h3 {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.kpi-value {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
  min-height: 34px;
}
.kpi.empty .kpi-value {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
}
.kpi-wait {
  color: var(--muted);
}
.kpi-note {
  font-size: 12.5px;
  color: var(--muted);
}
.info {
  min-height: 24px;
  width: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.info .icon {
  width: 15px;
  height: 15px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: grid;
  gap: 12px;
  align-content: start;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-head a {
  font-size: 14px;
  font-weight: 600;
}
.card-empty {
  color: var(--muted);
  padding: 20px 0;
}
.two {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 18px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 6px 0;
  width: 100%;
}
.defs summary {
  cursor: pointer;
  list-style-position: inside;
}
.defs summary h2 {
  display: inline;
}
.defs dl {
  margin: 4px 0 0;
  display: grid;
  gap: 4px 20px;
  grid-template-columns: max-content 1fr;
  font-size: 14px;
}
.defs dt {
  font-weight: 600;
}
.defs dd {
  margin: 0;
  color: var(--ink-2);
}

/* Chart */
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--ink-2);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.key {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
}
.chart-box {
  position: relative;
}
.chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.chart .grid {
  stroke: var(--grid);
  stroke-width: 1;
}
.chart .baseline {
  stroke: var(--axis);
  stroke-width: 1;
}
.chart .tick {
  fill: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.chart .line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart .line.s1 {
  stroke: var(--series-1);
}
.chart .line.s2 {
  stroke: var(--series-2);
}
.chart .end.s1,
.key.s1 {
  fill: var(--series-1);
  background: var(--series-1);
}
.chart .end.s2,
.key.s2 {
  fill: var(--series-2);
  background: var(--series-2);
}
.chart .end {
  stroke: var(--surface);
  stroke-width: 2;
}
.chart .gap {
  fill: var(--gap);
}
.chart .gap-label {
  fill: var(--muted);
  font-size: 11.5px;
}
.chart .crosshair {
  stroke: var(--line-strong);
  stroke-width: 1;
  display: none;
}
.chart .crosshair.on {
  display: inline;
}
.chart .hit {
  fill: transparent;
  cursor: crosshair;
}
.chart .hit:focus-visible {
  outline: none;
  stroke: var(--focus);
  stroke-width: 2;
}
.tooltip {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  font-size: 13px;
  pointer-events: none;
  min-width: 150px;
}
.tip-head {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.tip-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tip-row span {
  color: var(--ink-2);
}
.table-view summary {
  cursor: pointer;
  font-size: 13.5px;
  color: var(--accent);
  font-weight: 600;
}
.table-view .table-wrap {
  max-height: 320px;
  margin-top: 8px;
}

/* Lists */
.toplist,
.sources,
ul.plain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.toplist li,
.sources li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.toplist li:first-child,
.sources li:first-child {
  border-top: 0;
}
.tl-name,
.sources li > span:first-of-type {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.tl-name span,
.sources li > span:nth-child(2) {
  display: grid;
  min-width: 0;
}
.sources li > span:nth-child(2) {
  margin-inline-end: auto;
}
.tl-name strong,
.sources strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
}
.tl-name small,
.sources small {
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-value {
  display: grid;
  text-align: end;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tl-value small {
  color: var(--muted);
  font-weight: 400;
}
.sources .value {
  font-weight: 600;
}
ul.plain {
  gap: 6px;
  padding-inline-start: 18px;
  list-style: disc;
}

/* Logos */
.logo {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12.5px;
  color: #fff;
  background: #6b7280;
}
.logo-meta {
  background: #1877f2;
}
.logo-google {
  background: #34a853;
}
.logo-openai_ads,
.logo-openai_usage {
  background: #111827;
}
.logo-shopify {
  background: #5e8e3e;
}
.logo-highlevel {
  background: #155eef;
}
.logo-clickfunnels {
  background: #d4351c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .logo-openai_ads,
  :root:not([data-theme='light']) .logo-openai_usage {
    background: #3a404b;
  }
}

/* Connections */
.section-title {
  font-size: 18px;
  margin: 6px 0 12px;
}
.stack {
  display: grid;
  gap: 12px;
}
.conn {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: grid;
  gap: 10px;
  box-shadow: var(--shadow);
}
.conn-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.conn-main > div {
  flex: 1;
  min-width: 0;
}
.conn-account {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.conn-text {
  color: var(--ink-2);
  font-size: 14px;
}
.conn-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.support summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--muted);
}
.support code {
  font-size: 12.5px;
  overflow-wrap: anywhere;
}
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.provider {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: grid;
  gap: 12px;
  grid-template-rows: auto 1fr auto;
  box-shadow: var(--shadow);
}
.provider-top {
  display: flex;
  gap: 12px;
}
.provider-top p {
  font-size: 13.5px;
  color: var(--ink-2);
}
.limited {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  color: var(--warn);
  background: var(--warn-bg);
  padding: 8px 10px;
  border-radius: 8px;
  align-self: start;
}
.limited .icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
}
.provider-foot {
  display: flex;
  justify-content: flex-end;
}
.more {
  margin-top: 14px;
}
.more summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 12px;
}
.footnote {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}
.welcome {
  display: grid;
  gap: 14px;
  padding: 12px 0;
}
.operator summary {
  cursor: pointer;
}
.operator summary h2 {
  display: inline;
}

/* Tables */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  padding: 10px 12px;
  text-align: start;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 600;
  z-index: 1;
}
tbody tr:last-child > * {
  border-bottom: 0;
}
.num {
  text-align: end;
  font-variant-numeric: tabular-nums;
}
th.name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  white-space: normal;
  min-width: 240px;
}
th.name span {
  display: grid;
}
th.name small {
  color: var(--muted);
}
sup {
  color: var(--muted);
}

/* Settings */
.settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  align-items: start;
}
.settings .card:first-child {
  grid-row: span 2;
}

/* Dialog */
dialog {
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
dialog.wide {
  width: min(640px, calc(100vw - 24px));
}
dialog::backdrop {
  background: rgba(15, 17, 21, 0.45);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px 22px;
}
.dialog-body {
  padding: 4px 22px 22px;
  display: grid;
  gap: 14px;
}
.accounts {
  display: grid;
  gap: 8px;
  max-height: 46vh;
  overflow: auto;
}
.account {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 400;
}
.account input {
  margin-top: 3px;
}
.account:has(input:checked) {
  border-color: var(--accent);
  background: var(--info-bg);
}
.acc-main {
  display: grid;
  min-width: 0;
}
.acc-main small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.acc-main em {
  font-style: normal;
  font-size: 12.5px;
  color: var(--ink-2);
}
.acc-main em.warn {
  color: var(--warn);
}
.search input {
  min-height: 40px;
}

/* Toast */
.toast {
  position: fixed;
  inset-inline: 16px;
  bottom: 20px;
  margin: 0 auto;
  width: fit-content;
  max-width: 560px;
  background: var(--ink);
  color: var(--page);
  padding: 12px 16px;
  border-radius: 10px;
  z-index: 60;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 900px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .topbar {
    padding: 10px 16px;
  }
  .brand span {
    display: none;
  }
  .biz-name {
    border: 0;
    padding: 0;
  }
  .nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    margin: 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    z-index: 20;
  }
  .nav a {
    flex-direction: column;
    gap: 2px;
    font-size: 11.5px;
    padding: 6px 8px;
    flex: 1;
  }
  .nav .dot {
    position: absolute;
    top: 2px;
    inset-inline-end: 18%;
  }
  .page {
    padding: 16px 16px 96px;
    gap: 14px;
  }
  h1 {
    font-size: 22px;
  }
  .kpi {
    padding: 12px 14px;
  }
  .kpi-value {
    font-size: 22px;
  }
  .fresh {
    margin-inline-start: 0;
  }
  .segmented {
    width: 100%;
  }
  .segmented button {
    flex: 1;
    padding: 4px 6px;
  }
  .defs dl {
    grid-template-columns: 1fr;
  }
  .defs dd {
    margin-bottom: 8px;
  }
  .auth-card,
  .onboard-card {
    padding: 24px 18px;
  }
  .toast {
    bottom: 84px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.about {
  width: min(440px, 100%);
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  display: grid;
  gap: 8px;
}
.legal-links {
  font-size: 13px;
  color: var(--muted);
}

button.google {
  background: var(--surface);
  border-color: var(--line-strong);
  gap: 10px;
  min-height: 44px;
}
.icon.g {
  width: 18px;
  height: 18px;
}
.or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.or::before,
.or::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}
#google-error:empty {
  display: none;
}
