/* GrowViking design system: "Northern lights".
   A deep night canvas lit by a slow aurora (cobalt, violet, cyan: the colours
   of the Pods logo). Glass cards float above it; the GV Brain is the brightest
   thing on screen. Numbers are set in a mono face so money lines up.
   Dark is the default; [data-theme="light"] gives a bright pearl version.
   Every colour is a token. */
:root {
  --font-display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* brand light */
  --c1: #3446f2;          /* cobalt */
  --c2: #8b5cf6;          /* violet */
  --c3: #22d3ee;          /* cyan */
  --aurora: linear-gradient(120deg, #3446f2 0%, #8b5cf6 52%, #22d3ee 100%);
  --aurora-soft: linear-gradient(120deg, rgba(52, 70, 242, .22), rgba(139, 92, 246, .18) 52%, rgba(34, 211, 238, .16));

  /* night (default) */
  --bg: #05070d;
  --bg-glow-1: rgba(52, 70, 242, .30);
  --bg-glow-2: rgba(139, 92, 246, .22);
  --bg-glow-3: rgba(34, 211, 238, .14);
  --grid-line: rgba(255, 255, 255, .035);
  --surface: rgba(17, 21, 33, .66);
  --surface-solid: #0f131d;
  --surface-2: rgba(255, 255, 255, .035);
  --field: rgba(5, 7, 13, .55);
  --line: rgba(255, 255, 255, .075);
  --line-strong: rgba(255, 255, 255, .13);
  --highlight: rgba(255, 255, 255, .06);   /* top edge light on glass */
  --text: #f2f4fa;
  --text-2: #a9b2c6;
  --text-3: #707b92;
  --value: linear-gradient(180deg, #ffffff 30%, #b9c2ff);

  --accent: #7c8bff;
  --accent-strong: #a3adff;
  --accent-soft: rgba(124, 139, 255, .14);
  --on-accent: #ffffff;

  --good: #3ee0a1; --good-soft: rgba(62, 224, 161, .12);
  --warn: #fbbf4a; --warn-soft: rgba(251, 191, 74, .12);
  --bad: #ff7a8a;  --bad-soft: rgba(255, 122, 138, .12);
  --info: #6cc8ff; --info-soft: rgba(108, 200, 255, .12);

  --ink: #070912;         /* sidebar and GV Brain ground, both themes */
  --ink-2: rgba(255, 255, 255, .045);
  --ink-line: rgba(255, 255, 255, .08);
  --ink-text: #eef1f8;
  --ink-text-2: #8e98ad;

  --chart-a: #7c8bff;
  --chart-b: rgba(255, 255, 255, .14);
  --chart-c: #22d3ee;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: inset 0 1px 0 var(--highlight), 0 1px 0 rgba(0, 0, 0, .4), 0 24px 48px -32px rgba(0, 0, 0, .9);
  --shadow-lg: inset 0 1px 0 var(--highlight), 0 30px 80px -30px rgba(0, 0, 0, .95);
  --glow: 0 0 0 1px rgba(124, 139, 255, .35), 0 10px 40px -10px rgba(99, 102, 241, .65);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f5fb;
  --bg-glow-1: rgba(52, 70, 242, .16);
  --bg-glow-2: rgba(139, 92, 246, .13);
  --bg-glow-3: rgba(34, 211, 238, .12);
  --grid-line: rgba(20, 30, 80, .045);
  --surface: rgba(255, 255, 255, .58);
  --surface-solid: #ffffff;
  --surface-2: rgba(20, 30, 80, .035);
  --field: rgba(255, 255, 255, .9);
  --line: rgba(255, 255, 255, .75);
  --line-strong: rgba(20, 30, 80, .16);
  --highlight: rgba(255, 255, 255, .9);
  --text: #0c1030;
  --text-2: #464d7a;
  --text-3: #6b7198;
  --value: linear-gradient(180deg, #0c1030 45%, #3446f2);
  --accent: #3446f2; --accent-strong: #2433c9; --accent-soft: rgba(52, 70, 242, .09); --on-accent: #ffffff;
  --good: #0a875c; --good-soft: rgba(10, 135, 92, .1);
  --warn: #b25a07; --warn-soft: rgba(178, 90, 7, .1);
  --bad: #d0334a; --bad-soft: rgba(208, 51, 74, .09);
  --info: #2563c9; --info-soft: rgba(37, 99, 201, .09);
  --chart-a: #3446f2; --chart-b: rgba(20, 30, 80, .12); --chart-c: #ec4899;
  --shadow: inset 0 1px 0 var(--highlight), 0 30px 60px -32px rgba(48, 30, 140, .45);
  --shadow-lg: inset 0 1px 0 var(--highlight), 0 40px 90px -36px rgba(48, 30, 140, .55);
  --glow: 0 0 0 1px rgba(52, 70, 242, .25), 0 10px 30px -10px rgba(52, 70, 242, .45);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { background: var(--bg); }
body { font: 15px/1.55 var(--font-body); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; position: relative; min-height: 100vh; }
/* The night sky: slow aurora light, a faint grid, and grain. Fixed behind everything. */
body::before { content: ""; position: fixed; inset: -20vmax; z-index: -2; pointer-events: none; background:
  radial-gradient(38vmax 30vmax at 18% 8%, var(--bg-glow-1), transparent 70%),
  radial-gradient(34vmax 28vmax at 88% 12%, var(--bg-glow-2), transparent 70%),
  radial-gradient(40vmax 30vmax at 70% 100%, var(--bg-glow-3), transparent 70%);
  filter: blur(30px); animation: sky 28s ease-in-out infinite alternate; }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%); }
@keyframes sky { 50% { transform: translate(3%, 2%) rotate(3deg); } 100% { transform: translate(-3%, 4%) rotate(-2deg) scale(1.06); } }
::selection { background: rgba(124, 139, 255, .35); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
h1 { font-size: 2.1rem; font-weight: 700; line-height: 1.1; }
h2 { font-size: 1.12rem; font-weight: 650; }
h3 { font-size: .98rem; font-weight: 600; }
p { margin: 0; }
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--aurora); }
.gradient-text, h1 em { font-style: normal; background: var(--aurora); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none; background: linear-gradient(180deg, rgba(7, 9, 18, .82), rgba(7, 9, 18, .92)); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); border-right: 1px solid var(--ink-line); color: var(--ink-text); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; }
.sidebar::after { content: ""; position: absolute; top: 0; right: -1px; width: 1px; height: 40%; background: linear-gradient(180deg, transparent, rgba(124, 139, 255, .6), transparent); pointer-events: none; }
.sidebar > * { flex-shrink: 0; } /* a tall menu scrolls the sidebar; nothing in it gets squashed */
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px; color: var(--ink-text); font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.03em; }
.brand:hover { color: #fff; }
.brand-mark { position: relative; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--aurora); color: #fff; font-size: 1rem; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15) inset, 0 0 28px -4px rgba(124, 139, 255, .9); }
img.brand-mark { background: none; box-shadow: none; object-fit: contain; }
.brand-logo { height: 34px; width: auto; max-width: 190px; display: block; }
/* White-text logo on dark grounds (default theme, sidebar); dark-text logo on the light theme's pages. */
.brand-logo.for-light { display: none; }
:root[data-theme="light"] .brand-logo.for-dark { display: none; }
:root[data-theme="light"] .brand-logo.for-light { display: block; }
.switcher { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 14px; background: var(--ink-2); border: 1px solid var(--ink-line); color: var(--ink-text); font: inherit; text-align: left; transition: border-color .2s ease, background .2s ease; }
.switcher select { flex: 1; min-width: 0; background: transparent; border: 0; color: inherit; font: inherit; font-weight: 600; padding: 0; margin: 0; appearance: none; cursor: pointer; }
.switcher select option { color: #12151a; }
.avatar-sq { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(52, 70, 242, .5), rgba(139, 92, 246, .45)); font-size: .74rem; font-weight: 700; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.switcher .meta { display: block; font-size: .75rem; color: var(--ink-text-2); font-weight: 400; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: #5d6780; padding: 14px 12px 6px; font-weight: 600; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 11px; color: #a7b0c3; font-size: .92rem; font-weight: 500; transition: background .18s ease, color .18s ease; }
.nav a svg { flex: none; opacity: .8; transition: opacity .18s ease, filter .18s ease; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav a:hover svg { opacity: 1; }
.nav a[aria-current="page"] { background: linear-gradient(90deg, rgba(99, 112, 255, .26), rgba(139, 92, 246, .08) 70%, transparent); color: #fff; box-shadow: inset 0 0 0 1px rgba(124, 139, 255, .22); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--aurora); box-shadow: 0 0 14px 2px rgba(124, 139, 255, .8); }
.nav a[aria-current="page"] svg { opacity: 1; color: #c3caff; filter: drop-shadow(0 0 6px rgba(124, 139, 255, .9)); }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #f59e0b; color: #1a1204; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.nav .soon { margin-left: auto; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: #6b7487; border: 1px solid var(--ink-line); padding: 1px 6px; border-radius: 6px; }
.governor { position: relative; margin-top: auto; background: linear-gradient(160deg, rgba(62, 224, 161, .08), rgba(255, 255, 255, .02)); border: 1px solid var(--ink-line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; font-size: .78rem; color: var(--ink-text-2); overflow: hidden; }
.governor strong { color: var(--ink-text); font-size: .85rem; }
.governor .bar { background: var(--ink-line); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-top: 1px solid var(--ink-line); padding-top: 14px; font-size: .85rem; }
.side-user .who { flex: 1; min-width: 0; }
.side-user .who span { display: block; color: var(--ink-text-2); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user button, .side-user a.icon-btn { background: transparent; border: 1px solid var(--ink-line); color: var(--ink-text-2); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; padding: 0; margin: 0; box-shadow: none; }
.side-user button:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.side-user button::after { display: none; }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--aurora); color: #fff; font-weight: 700; font-size: .85rem; box-shadow: 0 0 0 2px rgba(7, 9, 18, 1), 0 0 0 3px rgba(124, 139, 255, .45); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 36px; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px); border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1 1 280px; max-width: 460px; }
.search input { width: 100%; height: 42px; padding: 0 64px 0 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); color: var(--text); font: inherit; font-size: .9rem; margin: 0; }
.search svg { position: absolute; left: 13px; top: 12px; color: var(--text-3); }
.search kbd { position: absolute; right: 10px; top: 10px; font: 600 .72rem var(--font-mono); color: var(--text-3); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; background: var(--surface-2); }
.spacer { flex: 1; }
.topbar .menu-btn { display: none; }
.content { padding: 28px 36px 64px; display: flex; flex-direction: column; gap: 24px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 4px; }
.page-head .sub { color: var(--text-2); margin-top: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Entrance: page sections rise in, one after another */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.content > *, .public-main > *, .kpis > .kpi, .grid-2 > .col > *, .grid-even > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.content > :nth-child(2), .kpis > .kpi:nth-child(2), .grid-2 > .col > :nth-child(2) { animation-delay: .06s; }
.content > :nth-child(3), .kpis > .kpi:nth-child(3), .grid-2 > .col > :nth-child(3) { animation-delay: .12s; }
.content > :nth-child(4), .kpis > .kpi:nth-child(4), .grid-2 > .col > :nth-child(4) { animation-delay: .18s; }
.content > :nth-child(n+5), .kpis > .kpi:nth-child(n+5) { animation-delay: .24s; }

/* ---------- Buttons, chips, badges ---------- */
.btn, button, a.button { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; background: linear-gradient(135deg, #4152ff, #7b4dff); color: var(--on-accent); font: 600 .9rem var(--font-body); cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, filter .2s ease, background .2s ease; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 24px -10px rgba(91, 80, 255, .8); }
.btn::after, button::after, a.button::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent); transform: skewX(-20deg); transition: left .6s ease; pointer-events: none; }
.btn:hover::after, button:hover::after, a.button:hover::after { left: 130%; }
.btn:hover, button:hover, a.button:hover { color: var(--on-accent); filter: brightness(1.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 12px 32px -10px rgba(110, 90, 255, .95); }
.btn:active, button:active { transform: translateY(1px) scale(.99); }
.btn.secondary, button.secondary, a.button.secondary { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); box-shadow: inset 0 1px 0 var(--highlight); backdrop-filter: blur(8px); }
.btn.secondary:hover, button.secondary:hover, a.button.secondary:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); color: var(--text); filter: none; box-shadow: inset 0 1px 0 var(--highlight), 0 0 24px -8px rgba(124, 139, 255, .6); }
.btn.ghost, button.ghost { background: transparent; color: var(--text-2); box-shadow: none; }
.btn.ghost:hover, button.ghost:hover { background: var(--surface-2); color: var(--text); box-shadow: none; filter: none; }
.btn.secondary::after, button.secondary::after, .btn.ghost::after, button.ghost::after, button.link::after, .icon-btn::after { display: none; }
button.link { background: none; border: 0; color: var(--accent); padding: 0; min-height: 0; font-weight: 500; box-shadow: none; overflow: visible; }
button.link:hover { box-shadow: none; color: var(--accent-strong); }
button.danger, .btn.danger { background: linear-gradient(135deg, #f43f5e, #e11d48); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 24px -10px rgba(244, 63, 94, .8); }
.btn.glow { background: linear-gradient(110deg, #3446f2, #8b5cf6 45%, #22d3ee 90%, #3446f2); background-size: 220% 100%; color: #fff; border: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(124, 139, 255, .4), 0 10px 30px -8px rgba(124, 92, 255, .9); animation: flow 6s linear infinite; }
.btn.glow:hover { color: #fff; filter: brightness(1.12); }
@keyframes flow { to { background-position: -220% 0; } }
.btn.sm, button.sm { min-height: 32px; padding: 0 12px; font-size: .82rem; border-radius: 9px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font: 500 .85rem var(--font-body); cursor: pointer; box-shadow: none; }
.chip:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); box-shadow: 0 0 20px -6px rgba(124, 139, 255, .7); filter: none; }
.chip::after { display: none; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .73rem; font-weight: 650; white-space: nowrap; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge.plain::before { display: none; }
.badge.good { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 22%, transparent); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 22%, transparent); }
.badge.info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 22%, transparent); }
.badge.accent { background: var(--accent-soft); color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.sample { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: .75rem; font-weight: 650; }

/* ---------- Cards and grids ---------- */
/* Glass cards. A soft light follows the pointer (mm.js sets --mx/--my). */
.card, .kpi, .feature, .tile { --mx: 50%; --my: -100px; }
.card { position: relative; background: var(--surface); backdrop-filter: blur(18px) saturate(1.25); -webkit-backdrop-filter: blur(18px) saturate(1.25); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); min-width: 0; transition: border-color .25s ease, box-shadow .25s ease; }
.card::before, .kpi::before, .feature::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(124, 139, 255, .10), transparent 45%); opacity: 0; transition: opacity .3s ease; }
.card:hover::before, .kpi:hover::before, .feature:hover::before { opacity: 1; }
.card:hover { border-color: var(--line-strong); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card.flush .card-head { padding: 20px 24px 0; }
.card-head p { color: var(--text-2); font-size: .85rem; margin-top: 3px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.grid-even { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

/* KPI tiles: big glowing numbers */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { position: relative; background: var(--surface); backdrop-filter: blur(18px) saturate(1.25); -webkit-backdrop-filter: blur(18px) saturate(1.25); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; overflow: hidden; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.kpi::after { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(124, 139, 255, .7), transparent); opacity: .7; }
.kpi:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.kpi .label { font-size: .8rem; color: var(--text-2); font-weight: 500; display: flex; justify-content: space-between; gap: 8px; letter-spacing: .01em; }
.kpi .value { font: 600 1.85rem/1.1 var(--font-mono); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; background: var(--value); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi .value.error { background: none; color: var(--bad); }
.kpi .value.small { font-size: 1.15rem; letter-spacing: -0.01em; }
.kpi .value small { font: 500 .8rem var(--font-body); color: var(--text-3); -webkit-text-fill-color: var(--text-3); letter-spacing: 0; margin-left: 4px; }
.kpi .delta { font-size: .78rem; font-weight: 600; }
.kpi .delta.up { color: var(--good); } .kpi .delta.down { color: var(--bad); } .kpi .delta.flat { color: var(--text-3); }
.kpi svg.spark { width: 100%; height: 38px; display: block; margin-top: 2px; overflow: visible; }
.kpi.hero { background: radial-gradient(120% 140% at 0% 0%, rgba(52, 70, 242, .38), transparent 55%), radial-gradient(120% 120% at 100% 100%, rgba(34, 211, 238, .16), transparent 55%), var(--surface); border-color: rgba(124, 139, 255, .4); box-shadow: var(--shadow), 0 0 40px -14px rgba(99, 102, 241, .8); }
.kpi.hero::after { left: 0; right: 0; height: 2px; background: var(--aurora); opacity: 1; }
:root[data-theme="light"] .kpi.hero { background: radial-gradient(120% 140% at 0% 0%, rgba(52, 70, 242, .14), transparent 55%), radial-gradient(120% 120% at 100% 100%, rgba(34, 211, 238, .1), transparent 55%), var(--surface); }

/* progress */
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--aurora); box-shadow: 0 0 12px rgba(124, 139, 255, .8); }

/* objective strip */
.objective { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.objective .body { flex: 1 1 380px; display: flex; flex-direction: column; gap: 10px; }
.objective .goal { font: 650 1.2rem var(--font-display); letter-spacing: -0.02em; }
.ring { --p: 12; width: 88px; height: 88px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--c1), var(--c2) calc(var(--p) * .5%), var(--c3) calc(var(--p) * 1%), var(--surface-2) 0); box-shadow: 0 0 30px -8px rgba(124, 139, 255, .8); }
.ring span { width: 70px; height: 70px; border-radius: 50%; background: var(--surface-solid); display: grid; place-items: center; font: 650 1rem var(--font-mono); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data, table.audit { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th, table.audit th { text-align: left; font-size: .7rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.data td, table.audit td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; transition: background .15s ease; }
table.data tbody tr:hover td, table.audit tbody tr:hover td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
table.data tr:last-child td, table.audit tr:last-child td { border-bottom: 0; }
table.data td.r, table.data th.r { text-align: right; }
table.data .num { white-space: nowrap; }
table.numbers td, table.numbers th { white-space: nowrap; }
.card table.data:first-child th:first-child, .card.flush table.data th:first-child, .card.flush table.data td:first-child { padding-left: 24px; }
.card.flush table.data th:last-child, .card.flush table.data td:last-child { padding-right: 24px; }
.pos { color: var(--good); } .neg { color: var(--bad); }
.cell-title { font-weight: 600; display: block; }
.cell-sub { font-size: .78rem; color: var(--text-3); }
.minibar { display: inline-block; width: 70px; height: 6px; border-radius: 3px; background: var(--surface-2); vertical-align: middle; margin-left: 8px; overflow: hidden; border: 1px solid var(--line); }
.minibar span { display: block; height: 100%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.minibar.neg span { background: var(--bad); box-shadow: 0 0 8px var(--bad); }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--text-3); font: 11px var(--font-mono); }
.chart .grid line { stroke: var(--line); stroke-dasharray: 2 4; }
.chart rect.bar-v { transition: opacity .2s ease, filter .2s ease; transform-box: fill-box; transform-origin: bottom; animation: grow .9s cubic-bezier(.2, .7, .2, 1) both; }
.chart rect.bar-v:hover { filter: brightness(1.25) drop-shadow(0 0 10px rgba(124, 139, 255, .9)); }
.chart polyline.line-draw { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.6s .3s ease-out forwards; }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.legend { display: flex; gap: 16px; font-size: .8rem; color: var(--text-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; box-shadow: 0 0 8px currentColor; }

/* ---------- GV Brain: the brightest place ---------- */
.pod-card { position: relative; overflow: hidden; border-radius: 22px; padding: 24px; background: linear-gradient(160deg, #0b0e1d, #070912); color: var(--ink-text); border: 1px solid rgba(124, 139, 255, .3); isolation: isolate; box-shadow: 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 30px 80px -30px rgba(76, 70, 240, .7); }
.pod-card::before { content: ""; position: absolute; inset: -40%; z-index: -1; background:
  radial-gradient(40% 35% at 20% 15%, rgba(52, 70, 242, .65), transparent 70%),
  radial-gradient(35% 30% at 85% 20%, rgba(139, 92, 246, .55), transparent 70%),
  radial-gradient(40% 35% at 70% 95%, rgba(34, 211, 238, .4), transparent 70%);
  filter: blur(14px); animation: aurora 16s ease-in-out infinite alternate; }
.pod-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--spin, 0deg), transparent 0 70%, rgba(124, 139, 255, .9) 80%, rgba(34, 211, 238, .9) 88%, transparent 96%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 6s linear infinite; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }
@keyframes aurora { to { transform: translate(6%, -4%) rotate(8deg) scale(1.08); } }
.pod-card h2, .pod-card h3 { color: #fff; }
.pod-card p { color: #d6dcea; line-height: 1.65; }
.pod-card .meta { color: var(--ink-text-2); font-size: .78rem; }
.pod-card .btn.secondary { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .18); }
.pod-card .btn.secondary:hover { background: rgba(255, 255, 255, .16); }
.pod-card .btn.light { background: #fff; color: #0b0e1d; box-shadow: 0 8px 28px -8px rgba(255, 255, 255, .6); }
.pod-card .btn.light::after { background: linear-gradient(100deg, transparent, rgba(124, 139, 255, .35), transparent); }
.pod-orb { position: relative; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--aurora); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 0 26px -2px rgba(124, 139, 255, .9); animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 0 40px 2px rgba(124, 139, 255, .9); } }

/* The Pods visual (logo idea): a glowing GV Brain floating on stacked pods. */
.pods-visual { position: relative; width: 250px; height: 228px; flex: none; }
.pods-visual svg { width: 100%; height: 100%; overflow: visible; }
.pods-visual .pv-top { animation: float 5s ease-in-out infinite; transform-origin: center; }
.pods-visual .pv-halo { animation: halo 5s ease-in-out infinite; transform-origin: 110px 70px; }
.pods-visual .pv-spark { animation: twinkle 3s ease-in-out infinite; }
.pods-visual .pv-spark:nth-of-type(2) { animation-delay: 1s; } .pods-visual .pv-spark:nth-of-type(3) { animation-delay: 2s; }
@keyframes float { 50% { transform: translateY(-7px); } }
@keyframes halo { 50% { opacity: .6; transform: scale(1.12); } }
@keyframes twinkle { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }

/* Hero banner at the top of the overview and GV Brain pages */
.hero-banner { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 30px 34px; border-radius: 26px; border: 1px solid rgba(124, 139, 255, .28); background: linear-gradient(135deg, rgba(14, 18, 38, .9), rgba(8, 10, 20, .85)); box-shadow: var(--shadow-lg), 0 0 80px -40px rgba(99, 102, 241, .9); color: var(--ink-text); }
.hero-banner::before { content: ""; position: absolute; inset: -50%; z-index: -1; background:
  radial-gradient(30% 40% at 78% 40%, rgba(139, 92, 246, .45), transparent 70%),
  radial-gradient(30% 40% at 90% 70%, rgba(34, 211, 238, .3), transparent 70%),
  radial-gradient(35% 45% at 15% 0%, rgba(52, 70, 242, .45), transparent 70%); filter: blur(20px); animation: aurora 18s ease-in-out infinite alternate; }
.hero-banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000); mask-image: linear-gradient(90deg, transparent 30%, #000); }
.hero-banner h1 { color: #fff; font-size: clamp(2rem, 3.4vw, 2.9rem); letter-spacing: -0.04em; margin-top: 10px; }
.hero-banner .sub { color: #aeb7cc; margin-top: 10px; max-width: 560px; }
.hero-banner .eyebrow { color: #9aa6ff; }
.hero-banner .actions { margin-top: 20px; }
.hero-banner .btn.secondary { background: rgba(255, 255, 255, .07); color: #fff; border-color: rgba(255, 255, 255, .16); }
.hero-banner .btn.secondary:hover { background: rgba(255, 255, 255, .13); }
.hero-banner select { background: rgba(255, 255, 255, .07); color: #fff; border-color: rgba(255, 255, 255, .16); }
.hero-banner select option { color: #12151a; }
.hero-banner .pods-visual { margin: -16px 0 -24px; }
.hero-text { flex: 1 1 360px; min-width: 0; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; color: #9fe9cb; font-weight: 600; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3ee0a1; box-shadow: 0 0 0 0 rgba(62, 224, 161, .7); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(62, 224, 161, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 224, 161, 0); } }

/* Decision list */
.decision { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.decision:first-child { border-top: 0; padding-top: 0; }
.sev { width: 4px; align-self: stretch; border-radius: 4px; background: var(--warn); flex: none; box-shadow: 0 0 10px var(--warn); }
.sev.high { background: var(--bad); box-shadow: 0 0 10px var(--bad); } .sev.low { background: var(--good); box-shadow: 0 0 10px var(--good); }
.decision .what { flex: 1; min-width: 0; }
.decision .what strong { display: block; font-weight: 600; font-size: .92rem; }
.decision .what span { font-size: .8rem; color: var(--text-2); }

/* Health list */
.health { display: flex; align-items: center; gap: 12px; font-size: .88rem; padding: 8px 0; }
.health + .health { border-top: 1px solid var(--line); }
.health .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.health .dot.ok { background: var(--good-soft); color: var(--good); box-shadow: 0 0 14px -2px color-mix(in srgb, var(--good) 60%, transparent); }
.health .dot.warn { background: var(--warn-soft); color: var(--warn); }
.health .name { flex: 1; }
.health .val { color: var(--text-3); font-size: .8rem; }

/* Chat */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.chat { display: flex; flex-direction: column; gap: 22px; }
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg.me { justify-content: flex-end; }
.bubble { max-width: 560px; padding: 12px 16px; border-radius: 18px; line-height: 1.55; }
.msg.me .bubble { background: linear-gradient(135deg, #4152ff, #7b4dff); color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 10px 30px -12px rgba(91, 80, 255, .8); }
.msg.pod .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.stamp { font-size: .74rem; color: var(--text-3); }
.step { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: .88rem; }
.step .tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--good-soft); color: var(--good); }
.step .tick.wait { background: var(--warn-soft); color: var(--warn); }
.step .tick.run { background: var(--accent-soft); color: var(--accent); }
.step b { font-weight: 600; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--warn-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.callout svg { color: var(--warn); flex: none; margin-top: 2px; }
.callout.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.callout.info svg { color: var(--info); }
.composer { display: flex; align-items: flex-end; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); backdrop-filter: blur(16px); }
.composer:focus-within { border-color: rgba(124, 139, 255, .6); box-shadow: var(--shadow-lg), 0 0 0 4px var(--accent-soft), 0 0 40px -10px rgba(124, 139, 255, .7); }
.composer textarea { flex: 1; border: 0; resize: none; background: transparent; color: var(--text); font: inherit; padding: 8px 0; margin: 0; min-height: 44px; outline: none; box-shadow: none; }
.composer textarea:focus { box-shadow: none; }
.icon-btn { width: 40px; height: 40px; padding: 0; border-radius: 12px; display: grid; place-items: center; flex: none; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* key/value rows */
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv > * { min-width: 0; overflow-wrap: anywhere; } /* long links and names wrap inside the card */
/* Safety net for every page: a word too long for its box (a German or Swedish compound, a link) breaks instead of
   running out of it. Words that fit are never broken. */
body { overflow-wrap: break-word; }
.kpi { hyphens: auto; } /* Swedish and German compounds in the coloured tiles break with a hyphen */
.kv span:first-child { color: var(--text-2); }

/* Waterfall breakdown */
.wf-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 110px; align-items: center; gap: 12px; font-size: .86rem; padding: 6px 0; }
.wf-track { position: relative; height: 22px; }
.wf-track span { position: absolute; top: 0; height: 100%; border-radius: 6px; animation: grow-x .9s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left; }
@keyframes grow-x { from { transform: scaleX(0); } }
.wf-row .r { text-align: right; }

/* Dropzone & mapping (orders import) */
.drop { border: 1.5px dashed var(--line-strong); border-radius: 18px; padding: 30px; text-align: center; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; gap: 10px; transition: border-color .2s ease, background .2s ease; }
.drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop .ico { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--aurora); color: #fff; box-shadow: 0 0 30px -6px rgba(124, 139, 255, .8); }
.map-row { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 90px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }

/* ---------- Forms ---------- */
label { display: block; margin: 12px 0 0; font-weight: 550; font-size: .88rem; }
label.check { display: inline-flex; gap: 8px; align-items: center; margin-right: 16px; font-weight: 400; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--text); font: inherit; font-size: .92rem; transition: border-color .2s ease, box-shadow .2s ease; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line-strong)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 24px -8px rgba(124, 139, 255, .7); }
select option { background: var(--surface-solid); color: var(--text); }
input[type=checkbox], input[type=radio] { display: inline; width: auto; margin: 0; accent-color: var(--accent); box-shadow: none; }
input[type=file] { padding: 8px; background: var(--surface-2); }
input[type=file]::file-selector-button { margin-right: 12px; border: 0; border-radius: 9px; padding: 8px 14px; background: var(--accent-soft); color: var(--accent-strong); font: 600 .85rem var(--font-body); cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }

/* ---------- Auth & landing ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(16px, 6vw, 88px); gap: 26px; max-width: 560px; width: 100%; margin: 0 auto; animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.auth-form h1 { font-size: 2.4rem; letter-spacing: -0.04em; }
.auth-art { position: relative; overflow: hidden; background: #060812; color: var(--ink-text); padding: 48px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 26px; isolation: isolate; border-left: 1px solid var(--ink-line); }
.auth-art::before { content: ""; position: absolute; inset: -30%; z-index: -1; background:
  radial-gradient(35% 30% at 25% 25%, rgba(52, 70, 242, .7), transparent 70%),
  radial-gradient(30% 30% at 80% 35%, rgba(139, 92, 246, .55), transparent 70%),
  radial-gradient(35% 30% at 60% 90%, rgba(34, 211, 238, .4), transparent 70%); filter: blur(16px); animation: aurora 20s ease-in-out infinite alternate; }
.auth-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); }
.auth-art blockquote { margin: 0; font: 650 clamp(1.6rem, 2.6vw, 2.3rem)/1.15 var(--font-display); letter-spacing: -0.035em; max-width: 540px; color: #fff; }
.auth-art .pods-visual { width: 260px; height: 230px; align-self: center; }
.auth-art .pod-card { background: rgba(10, 13, 26, .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

.site-nav { position: relative; z-index: 2; display: flex; align-items: center; gap: 24px; padding: 18px clamp(16px, 5vw, 64px); }
.site-nav .links { display: flex; gap: 26px; font-size: .9rem; }
.site-nav .links a { color: var(--text-2); }
.site-nav .links a:hover { color: var(--text); }
.landing-hero { position: relative; padding: 84px clamp(16px, 5vw, 64px) 0; text-align: center; isolation: isolate; }
.landing-hero::before { content: ""; position: absolute; left: 50%; top: -240px; width: 1300px; height: 820px; transform: translateX(-50%); z-index: -1; background:
  radial-gradient(40% 40% at 35% 50%, rgba(52, 70, 242, .55), transparent 70%),
  radial-gradient(35% 40% at 65% 45%, rgba(139, 92, 246, .45), transparent 70%),
  radial-gradient(30% 30% at 50% 80%, rgba(34, 211, 238, .3), transparent 70%); filter: blur(30px); animation: aurora 20s ease-in-out infinite alternate; }
:root[data-theme="light"] .landing-hero::before { opacity: .5; }
.landing-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); line-height: .98; letter-spacing: -0.055em; max-width: 1000px; margin: 22px auto 0; }
.landing-hero h1 em { background: linear-gradient(100deg, #6d7cff, #a78bfa 45%, #22d3ee 90%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; animation: flow 8s linear infinite; }
.landing-hero .lead { font-size: 1.2rem; color: var(--text-2); max-width: 660px; margin: 22px auto 0; }
.landing-hero .cta { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.landing-hero .btn { min-height: 52px; padding: 0 26px; font-size: 1rem; border-radius: 14px; }
.landing-hero .pods-visual { margin: 28px auto -10px; }
.shot { position: relative; margin: 40px auto 0; max-width: 1160px; border-radius: 22px 22px 0 0; border: 1px solid rgba(124, 139, 255, .3); border-bottom: 0; background: rgba(12, 15, 28, .7); backdrop-filter: blur(10px); box-shadow: 0 -20px 120px -40px rgba(99, 102, 241, .9), 0 50px 100px -40px rgba(0, 0, 0, .9); padding: 14px 14px 0; overflow: hidden; perspective: 1200px; }
:root[data-theme="light"] .shot { background: rgba(255, 255, 255, .7); }
.shot::before { content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, transparent, rgba(160, 170, 255, .9), transparent); }
.shot-inner { border-radius: 12px 12px 0 0; overflow: hidden; border: 1px solid var(--line); border-bottom: 0; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; padding: 80px clamp(16px, 5vw, 64px); max-width: 1240px; margin: 0 auto; }
.feature { position: relative; padding: 26px; border-radius: 20px; background: var(--surface); backdrop-filter: blur(16px); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); transition: transform .25s ease, border-color .25s ease; }
.feature:hover { transform: translateY(-4px); border-color: rgba(124, 139, 255, .4); }
.feature .ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--aurora); color: #fff; box-shadow: 0 0 28px -6px rgba(124, 139, 255, .9); }
.feature p { color: var(--text-2); font-size: .93rem; }
.site-foot { padding: 26px clamp(16px, 5vw, 64px); display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; color: var(--text-3); font-size: .85rem; border-top: 1px solid var(--line); }
.site-foot a { color: var(--text-2); }

/* Messages */
.flash { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; font-weight: 500; font-size: .9rem; }
.flash.error, p.error { background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 25%, transparent); }
.flash.ok, p.ok { background: var(--good-soft); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 25%, transparent); }
p.error, p.ok { padding: 11px 15px; border-radius: 12px; }
.error { color: var(--bad); } .ok { color: var(--good); }

/* Empty state */
.empty { text-align: center; padding: 44px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-2); }
.empty .ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--aurora); color: #fff; box-shadow: 0 0 34px -6px rgba(124, 139, 255, .9); }

/* ---------- App extras ---------- */
.soon-item { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 11px; color: #5f6880; font-size: .92rem; font-weight: 500; cursor: default; }
.soon-item svg { flex: none; opacity: .55; }
.soon-item .soon, .governor .soon { margin-left: auto; font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: #8b93ff; border: 1px solid rgba(124, 139, 255, .25); background: rgba(124, 139, 255, .08); padding: 1px 6px; border-radius: 6px; }
a.switcher { text-decoration: none; }
a.switcher:hover { border-color: rgba(124, 139, 255, .4); background: rgba(124, 139, 255, .08); color: var(--ink-text); }
.switcher .who { flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user form { margin: 0; }
.crumb { font-weight: 600; color: var(--text-2); font-size: .9rem; display: inline-flex; align-items: center; gap: 10px; }
.crumb::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }
.public { min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
.public .site-nav .brand { color: var(--text); }
.public-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 8px 16px 48px; display: flex; flex-direction: column; gap: 20px; position: relative; isolation: isolate; }
.landing-main { max-width: none; padding: 0; }

/* ---------- Compatibility with the existing pages ---------- */
.content > .card > h1:first-child, .public-main > .card > h1:first-child { font-size: 1.6rem; margin-bottom: 6px; }
.card > h2 { margin: 20px 0 10px; } .card > h2:first-child { margin-top: 0; }
.card > p + p, .card > p + ul, .card > ul + p, .card > form + p, .card > p + form, .card > p + table, .card > p + .scroll, .card > div + p { margin-top: 10px; }
.card ul { padding-left: 20px; margin: 10px 0; }
.card ul li { margin: 3px 0; }
.narrow { width: 100%; max-width: 440px; margin: 48px auto; padding: 30px; box-shadow: var(--shadow-lg), 0 0 80px -40px rgba(99, 102, 241, .9); }
.narrow h1 { margin-bottom: 8px; }
form button, form .button { margin-top: 16px; }
form.inline, .inline { display: inline; }
form.inline button, .actions button, .topbar button, .side-user button, button.chip, .presets button { margin-top: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row h1, .row h2 { margin: 0; }
.row select { width: auto; max-width: 100%; margin: 0; }
.row > form { max-width: 100%; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0 4px; }
.stats > div { position: relative; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 15px 17px; font-size: .82rem; color: var(--text-2); display: flex; flex-direction: column; gap: 2px; }
.stats > div::after { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(124, 139, 255, .6), transparent); }
.stats .num { display: block; font: 600 1.5rem/1.15 var(--font-mono); letter-spacing: -0.035em; color: var(--text); }
.stats .num.error { color: var(--bad); }
.scroll { overflow-x: auto; }
.card > .scroll, .card > table.audit { margin-top: 14px; }
.card > .scroll > table.audit, .card > table.audit { border: 1px solid var(--line); border-radius: 14px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
table.audit .details { color: var(--text-3); word-break: break-word; font-size: .82rem; }
table.audit td strong { font-family: var(--font-mono); font-weight: 600; }
table.numbers td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .84rem; }
table.numbers td:first-child { font-family: var(--font-body); }
.pager { display: flex; gap: 16px; margin-top: 12px; }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .73rem; font-weight: 650; white-space: nowrap; }
.tag-high { background: var(--good-soft); color: var(--good); }
.tag-medium { background: var(--warn-soft); color: var(--warn); }
.tag-low { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
pre.copy { white-space: pre-wrap; word-break: break-all; background: var(--field); border: 1px solid var(--line); padding: 12px; border-radius: 12px; user-select: all; font: .82rem var(--font-mono); }
code { font: .86em var(--font-mono); background: var(--surface-2); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 600; color: var(--accent); }
ul.problems { color: var(--bad); font-size: .88rem; }
.hp { position: absolute; left: -9999px; }
.check a { display: inline; }
label.check { margin-top: 14px; }
.auth-form label.check { align-items: flex-start; line-height: 1.45; }
.auth-form label.check input { margin-top: 3px; flex: none; }
.lead { font-size: 1.1rem; color: var(--text-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-2, .chat-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 30; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .25s ease; background: #070912; }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55); }
  .topbar .menu-btn { display: grid; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px 16px 40px; }
  .search kbd { display: none; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .site-nav .links { display: none; }
  h1 { font-size: 1.6rem; }
  .wf-row { grid-template-columns: 110px minmax(0, 1fr) 90px; }
  .hero-banner { padding: 24px 20px; }
  .hero-banner .pods-visual { display: none; }
}
@media (max-width: 600px) {
  .topbar .hide-sm, .topbar .search { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kpi { padding: 14px 14px 12px; }
  .kpi .value { font-size: 1.3rem; }
  .objective .ring { display: none; }
  table.audit:not(.numbers) thead { display: none; }
  table.audit:not(.numbers) td { display: block; border: 0; padding: 2px 14px; }
  table.audit:not(.numbers) tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .landing-hero .pods-visual { width: 170px; height: 155px; }
  /* Wide number tables scroll inside their card instead of pushing the page sideways. */
  fieldset { min-width: 0; }
  table.numbers, .card > table:not(.audit), fieldset table { display: block; overflow-x: auto; max-width: 100%; }
  code { word-break: break-all; }
  .btn, a.button { white-space: normal; text-align: center; min-height: 40px; height: auto; padding-top: 8px; padding-bottom: 8px; }
  form.inline { flex-wrap: wrap; }
  .card label, .card input, .card select, .card textarea { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Landing page product shot (a small drawn copy of the app) */
.mini { display: grid; grid-template-columns: 56px minmax(0, 1fr); background: var(--bg); text-align: left; min-height: 380px; }
.mini-side { background: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 14px 0; border-right: 1px solid var(--ink-line); }
.mini-side i { width: 22px; height: 6px; border-radius: 3px; background: #1d2333; }
.mini-side i.on { background: var(--aurora); box-shadow: 0 0 10px rgba(124, 139, 255, .9); }
.mini-main { padding: 18px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 860px) { .mini { grid-template-columns: minmax(0, 1fr); } .mini-side { display: none; } .mini .grid-2 { grid-template-columns: minmax(0, 1fr); } }
button.wide, .btn.wide { width: 100%; min-height: 48px; font-size: .95rem; }
.auth-form .brand { color: var(--text); padding: 0; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease; }
.tile::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(300px circle at var(--mx) var(--my), rgba(124, 139, 255, .16), transparent 50%); opacity: 0; transition: opacity .3s ease; }
.tile:hover { border-color: rgba(124, 139, 255, .45); color: var(--text); transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(99, 102, 241, .9); }
.tile:hover::before { opacity: 1; }
.tile .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); transition: background .25s ease, color .25s ease, box-shadow .25s ease; }
.tile:hover .ico { background: var(--aurora); color: #fff; box-shadow: 0 0 24px -4px rgba(124, 139, 255, .9); }
.tile b { margin-top: 6px; }
.tile span:last-child { font-size: .84rem; color: var(--text-2); }
.health a.val { font-weight: 600; }
.pod-card textarea::placeholder { color: #8a94a6; }
.health .dot.todo { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--line); }
.chart-box { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.chart-box .legend { justify-content: flex-end; }
@media (max-width: 600px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

/* Forms in existing pages: each submit button on its own line, sections breathe */
fieldset > button, form > button { display: flex; }
form.inline > button { display: inline-flex; }
form.inline + form.inline { margin-left: 8px; }
.card h3 { margin: 22px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.card .card-head h3, .card > h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.card form > fieldset > p, .card form > p { margin-top: 12px; }

/* GV Brain page */
a.governor { text-decoration: none; transition: border-color .2s ease; }
a.governor:hover { border-color: rgba(62, 224, 161, .35); }
.governor .badge.good { background: rgba(62, 224, 161, .14); color: #7fe9c3; }
.tag-act { background: var(--bad-soft); color: var(--bad); }
.stats .delta { font-size: .78rem; font-weight: 650; margin-left: 4px; }
.delta { font-size: .78rem; font-weight: 600; }
ul.flags .badge { margin-right: 6px; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
ul.flags { list-style: none; padding: 0; }
ul.flags li { padding: 12px 0; border-bottom: 1px solid var(--line); }
ul.flags li:last-child { border-bottom: 0; }
ol.todo { padding-left: 0; list-style: none; counter-reset: todo; }
ol.todo li { counter-increment: todo; position: relative; padding: 10px 0 10px 40px; border-bottom: 1px solid var(--line); }
ol.todo li:last-child { border-bottom: 0; }
ol.todo li::before { content: counter(todo); position: absolute; left: 0; top: 9px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--aurora); color: #fff; font: 700 .78rem var(--font-mono); box-shadow: 0 0 16px -4px rgba(124, 139, 255, .9); }
.meter { height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.meter span { position: relative; display: block; height: 100%; border-radius: inherit; background: var(--aurora); box-shadow: 0 0 16px rgba(124, 139, 255, .8); animation: grow-x 1.2s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left; overflow: hidden; }
.meter span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-100%); animation: shimmer 2.6s 1.2s ease-in-out infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.meter span.over { background: var(--bad); box-shadow: 0 0 16px var(--bad); }
.answer { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; }
.prose { white-space: pre-wrap; line-height: 1.65; }

/* Approvals */
.proposal { border-top: 1px solid var(--line); padding: 18px 0; }
.proposal:first-of-type { border-top: 0; padding-top: 4px; }
.proposal h3 { margin: 0; padding: 0; border: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.proposal .effect { font: 600 .9rem var(--font-mono); color: var(--good); white-space: nowrap; text-shadow: 0 0 18px color-mix(in srgb, var(--good) 50%, transparent); }
.proposal .actions { display: flex; gap: 8px; margin-top: 12px; }
dl.facts { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 16px; margin: 10px 0; font-size: .88rem; }
dl.facts dt { color: var(--text-3); } dl.facts dd { margin: 0; }
.proposal .effect.muted { color: var(--text-3); text-shadow: none; }
.proposal.blocked h3, .proposal.blocked > p { opacity: .7; }
.veto { background: var(--bad-soft); color: var(--text); border-radius: 12px; padding: 11px 15px; margin: 8px 0; font-size: .9rem; border: 1px solid color-mix(in srgb, var(--bad) 22%, transparent); }
.veto strong { color: var(--bad); } .veto ul { margin: 6px 0; padding-left: 18px; }
.rehearsal { margin-top: 6px; font-size: .85rem; } .rehearsal details { margin-top: 4px; } .rehearsal pre { white-space: pre-wrap; word-break: break-all; }

/* Reports */
.report .lead-in { font-size: 1.04rem; line-height: 1.65; margin: 0 0 14px; }
.kpis.compact { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 8px; }
.kpis.compact .kpi { box-shadow: none; padding: 12px 14px; }
.kpis.compact .kpi .value { font-size: 1.25rem; }
.report ul { padding-left: 20px; } .report li { margin-bottom: 6px; }
ul.report-list { list-style: none; padding: 0; margin: 0; }
ul.report-list li { padding: 7px 0; border-bottom: 1px solid var(--line); }
ul.report-list li[aria-current] a { font-weight: 650; }
ul.report-list a { text-decoration: none; color: var(--text); display: flex; gap: 8px; align-items: center; }
@media (max-width: 600px) {
  .crumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .crumb::before { display: none; }
  .topbar .btn.glow { min-height: 36px; padding: 0 12px; font-size: .82rem; }
  .hero-banner h1 { font-size: 2rem; }
}

/* Products & brand */
.know-list { list-style: none; padding: 0; margin: 6px 0 14px; display: flex; flex-direction: column; gap: 6px; }
.know-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2, rgba(127, 127, 127, .08)); }
.know-list li > span:first-child { flex: 1 1 260px; }
.know-list .src { font-size: .8rem; }
.know-list li.know-forbidden_claim { border-left: 3px solid var(--bad); }
.know-list li.know-approved_claim { border-left: 3px solid var(--good); }

/* Creatives */
.creative { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line, rgba(127, 127, 127, .2)); margin: 10px 0 10px calc(var(--depth, 0) * 28px); }
.creative.variant { border-left: 3px solid var(--accent, #7c8bff); }
.creative h3 { margin: 0; font-size: 1.02rem; }
.creative .meta { font-size: .85rem; margin: 4px 0 8px; }
.creative .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.creative .actions select { margin: 0; width: auto; }
@media (max-width: 640px) { .creative { margin-left: calc(var(--depth, 0) * 10px); } }
.creative .actions form.inline { display: flex; gap: 8px; align-items: center; margin: 0; }

/* Watchdog */
.freeze-banner { display: block; margin-bottom: 16px; padding: 12px 16px; border-radius: 12px; background: var(--bad-soft); border: 1px solid var(--bad); color: var(--text); text-decoration: none; }
.freeze-banner strong { color: var(--bad); }
.freeze-banner.warn { background: var(--warn-soft, rgba(217, 119, 6, .12)); border-color: var(--warn); }
.freeze-banner.warn strong { color: var(--warn); }
.card.frozen { border-color: var(--bad); }

/* ---------- Meta setup ---------- */
.fb-btn { background: linear-gradient(135deg, #1877f2, #0b5fd8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 30px -10px rgba(24, 119, 242, .9); }
.fb-btn:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 36px -10px rgba(24, 119, 242, 1); }
.meta-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; overflow: hidden; }
.meta-hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(24, 119, 242, .28), transparent 65%); pointer-events: none; }
.meta-hero-text { display: flex; flex-direction: column; gap: 14px; }
.meta-hero-text h2 { font-size: 1.7rem; }
.meta-scopes { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.meta-scopes code.val { font-size: .72rem; }
.meta-who { display: flex; align-items: center; gap: 14px; }
.meta-who .avatar { width: 44px; height: 44px; font-size: 1.05rem; background: linear-gradient(135deg, #1877f2, #8b5cf6); }
.meta-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 4px 0 14px; }
.meta-tiles .tile .num { display: block; font: 700 2rem/1.1 var(--font-display); background: var(--value); -webkit-background-clip: text; background-clip: text; color: transparent; }
.meta-tiles .tile { color: var(--text-2); font-size: .85rem; }
.col > a.btn { align-self: flex-start; }
.pick-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.pick-list label.check { margin: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); align-items: flex-start; }
.pick-list label.check:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }
.health .dot.bad { background: var(--bad-soft); color: var(--bad); box-shadow: 0 0 14px -2px color-mix(in srgb, var(--bad) 60%, transparent); }
.health .fix { color: var(--accent-strong); }
.health { align-items: flex-start; }
@media (max-width: 900px) { .meta-hero { grid-template-columns: minmax(0, 1fr); } .meta-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Calendar & timing */
.bars { display: grid; gap: 8px; margin-top: 8px; }
.bar-row { display: grid; grid-template-columns: 52px 1fr 60px; white-space: nowrap; align-items: center; gap: 10px; }
.bar-row .meter { margin-top: 0; }
.weather-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.weather-day { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; background: var(--surface-2, rgba(127,127,127,.08)); }
.weather-day b { font-size: 1.4rem; }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 160px; margin-top: 12px; }
.hour { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.hour span { display: block; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--aurora); }
.hour i { font-style: normal; font-size: 11px; color: var(--text-3); text-align: center; height: 14px; }

/* =====================================================================
   "Bold Bento" (the default, light look). Apple-style: a calm off-white
   canvas, huge black headlines, white cards, and big tiles in strong solid
   colours (cobalt, violet, cyan, sunset, ink). The 3D Pods logo is the hero.
   [data-theme="dark"] keeps the night version above.
   ===================================================================== */
:root[data-theme="light"] { --radius: 30px; --bg: #f4f4f7; --surface: #ffffff; --surface-2: #f4f4f7; --field: #ffffff;
  --line: #e9e9ef; --line-strong: #d9d9e3; --text: #0a0a0f; --text-2: #5c5c70; --text-3: #8a8aa0;
  --value: linear-gradient(180deg, #0a0a0f, #0a0a0f); --accent: #3446f2; --accent-strong: #2433c9; --accent-soft: rgba(52, 70, 242, .08);
  --ink-text: #0a0a0f; --ink-text-2: #6a6a80; --ink-line: #ececf2; --ink-2: #f4f4f7;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 20px 50px -34px rgba(0, 0, 0, .35); --shadow-lg: 0 30px 70px -36px rgba(0, 0, 0, .45);
  --t-blue: radial-gradient(120% 120% at 100% 0%, #6d7cff, #3446f2 50%, #1e2bb8);
  --t-violet: radial-gradient(120% 120% at 0% 0%, #b794ff, #8b5cf6 45%, #4c1d95);
  --t-cyan: radial-gradient(120% 120% at 100% 100%, #a5f3fc, #22d3ee 40%, #0e7490);
  --t-sun: radial-gradient(120% 120% at 0% 100%, #ffd28a, #ff8a4c 45%, #e8395f);
  --t-ink: radial-gradient(120% 120% at 100% 0%, #2a2a3a, #0a0a0f 60%); }
:root[data-theme="light"] body { background: var(--bg); }
:root[data-theme="light"] body::before, :root[data-theme="light"] body::after { display: none; }

/* shell: a clean white sidebar, black active pill */
:root[data-theme="light"] .app { grid-template-columns: 264px minmax(0, 1fr); }
:root[data-theme="light"] .sidebar { background: #fff; border-right: 1px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--text); }
:root[data-theme="light"] .sidebar::after { display: none; }
:root[data-theme="light"] .brand, :root[data-theme="light"] .brand:hover { color: var(--text); }
:root[data-theme="light"] .switcher { background: var(--bg); border-color: var(--line); color: var(--text); }
:root[data-theme="light"] a.switcher:hover { background: #ececf2; color: var(--text); border-color: var(--line); }
:root[data-theme="light"] .avatar-sq { background: var(--t-blue); }
:root[data-theme="light"] .nav-label { color: #a0a0b4; }
:root[data-theme="light"] .nav a { color: #44445a; border-radius: 14px; }
:root[data-theme="light"] .nav a:hover { background: var(--bg); color: var(--text); }
:root[data-theme="light"] .nav a[aria-current="page"] { background: #0a0a0f; color: #fff; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .7); }
:root[data-theme="light"] .nav a[aria-current="page"]::before { display: none; }
:root[data-theme="light"] .nav a[aria-current="page"] svg { color: #fff; filter: none; }
:root[data-theme="light"] .soon-item { color: #a0a0b4; }
:root[data-theme="light"] .soon-item .soon { color: #6d4bd8; border-color: rgba(139, 92, 246, .2); background: rgba(139, 92, 246, .08); }
:root[data-theme="light"] .governor { background: var(--bg); border-color: var(--line); }
:root[data-theme="light"] .governor .badge.good { background: #d1fae5; color: #047857; }
:root[data-theme="light"] .side-user { border-top-color: var(--line); }
:root[data-theme="light"] .side-user button, :root[data-theme="light"] .side-user a.icon-btn { border-color: var(--line); color: #5c5c70; background: #fff; }
:root[data-theme="light"] .side-user button:hover { color: var(--text); background: var(--bg); }
:root[data-theme="light"] .avatar { background: var(--t-sun); box-shadow: none; }
:root[data-theme="light"] .topbar { background: color-mix(in srgb, var(--bg) 80%, transparent); border-bottom-color: transparent; padding: 16px 40px; }
:root[data-theme="light"] .content { padding: 20px 40px 70px; gap: 18px; }
:root[data-theme="light"] .crumb { color: var(--text-3); }

/* white cards, big radius */
:root[data-theme="light"] .card, :root[data-theme="light"] .kpi, :root[data-theme="light"] .feature { background: #fff; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
:root[data-theme="light"] .card::before, :root[data-theme="light"] .kpi::before, :root[data-theme="light"] .feature::before { display: none; }
:root[data-theme="light"] .card:hover { border-color: transparent; }
:root[data-theme="light"] .card h2, :root[data-theme="light"] .card-head h2 { font-size: 1.45rem; letter-spacing: -0.04em; }
:root[data-theme="light"] .kpis { gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* colour tiles: KPI rows become a bento of strong colours */
:root[data-theme="light"] .kpi { color: #fff; border: 0; padding: 22px 24px 20px; min-height: 150px; box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .55); }
:root[data-theme="light"] .kpi:hover { transform: translateY(-4px); }
:root[data-theme="light"] .kpi::after { display: none; }
:root[data-theme="light"] .kpis > .kpi:nth-child(5n+1) { background: var(--t-blue); }
:root[data-theme="light"] .kpis > .kpi:nth-child(5n+2) { background: var(--t-violet); }
:root[data-theme="light"] .kpis > .kpi:nth-child(5n+3) { background: var(--t-cyan); }
:root[data-theme="light"] .kpis > .kpi:nth-child(5n+4) { background: var(--t-ink); }
:root[data-theme="light"] .kpis > .kpi:nth-child(5n+5) { background: var(--t-sun); }
:root[data-theme="light"] .kpi .label { color: rgba(255, 255, 255, .85); font-weight: 600; }
:root[data-theme="light"] .kpi .value { font-size: clamp(1.5rem, 2.3vw, 2.8rem); white-space: nowrap; letter-spacing: -0.05em; background: none; color: #fff; -webkit-text-fill-color: #fff; }
:root[data-theme="light"] .kpi .value.error { color: #fff; }
:root[data-theme="light"] .kpi .value small { color: rgba(255, 255, 255, .7); -webkit-text-fill-color: rgba(255, 255, 255, .7); }
:root[data-theme="light"] .kpi .delta, :root[data-theme="light"] .kpi .delta.up, :root[data-theme="light"] .kpi .delta.down, :root[data-theme="light"] .kpi .delta.flat { align-self: flex-start; color: #fff; background: rgba(255, 255, 255, .2); padding: 3px 11px; border-radius: 999px; }
:root[data-theme="light"] .kpi svg.spark polyline { stroke: #fff; }
:root[data-theme="light"] .kpis.compact .kpi { min-height: 0; }
:root[data-theme="light"] .kpis.compact .kpi .value { font-size: 1.5rem; }
:root[data-theme="light"] .stats > div { background: var(--bg); border-color: transparent; }
:root[data-theme="light"] .stats > div::after { display: none; }
:root[data-theme="light"] .tile { background: var(--bg); border-color: transparent; }
:root[data-theme="light"] .tile:hover { background: #fff; border-color: var(--line); box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .45); }
:root[data-theme="light"] .tile .ico { background: #0a0a0f; color: #fff; border: 0; }
:root[data-theme="light"] .tile:nth-child(4n+1) .ico { background: var(--t-blue); } :root[data-theme="light"] .tile:nth-child(4n+2) .ico { background: var(--t-violet); }
:root[data-theme="light"] .tile:nth-child(4n+3) .ico { background: var(--t-cyan); } :root[data-theme="light"] .tile:nth-child(4n+4) .ico { background: var(--t-sun); }
:root[data-theme="light"] .tile:hover .ico { box-shadow: none; }
:root[data-theme="light"] table.data th, :root[data-theme="light"] table.audit th { background: var(--bg); border-bottom: 0; }
:root[data-theme="light"] table.data tbody tr:hover td, :root[data-theme="light"] table.audit tbody tr:hover td { background: #f8f8fb; }
:root[data-theme="light"] .card > .scroll > table.audit, :root[data-theme="light"] .card > table.audit, :root[data-theme="light"] .chart-box { border-color: var(--line); background: #fff; }
:root[data-theme="light"] .health .dot.ok { box-shadow: none; }

/* buttons: black pills, and one colourful button */
:root[data-theme="light"] .btn, :root[data-theme="light"] button, :root[data-theme="light"] a.button { background: #0a0a0f; box-shadow: 0 12px 26px -14px rgba(0, 0, 0, .8); border-radius: 999px; padding: 0 20px; }
:root[data-theme="light"] .btn:hover, :root[data-theme="light"] button:hover, :root[data-theme="light"] a.button:hover { background: #26263a; filter: none; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .9); }
:root[data-theme="light"] .btn.secondary, :root[data-theme="light"] button.secondary, :root[data-theme="light"] a.button.secondary { background: #fff; color: var(--text); border-color: var(--line-strong); box-shadow: none; }
:root[data-theme="light"] .btn.secondary:hover, :root[data-theme="light"] button.secondary:hover { background: var(--bg); border-color: var(--line-strong); box-shadow: none; }
:root[data-theme="light"] .btn.ghost, :root[data-theme="light"] button.ghost, :root[data-theme="light"] button.link { background: transparent; box-shadow: none; }
:root[data-theme="light"] button.link { color: var(--accent); padding: 0; }
:root[data-theme="light"] button.danger, :root[data-theme="light"] .btn.danger { background: linear-gradient(135deg, #f43f5e, #e11d48); }
:root[data-theme="light"] .btn.glow { background: linear-gradient(110deg, #3446f2, #8b5cf6 50%, #3446f2); background-size: 220% 100%; box-shadow: 0 14px 30px -12px rgba(76, 60, 240, .8); }
:root[data-theme="light"] .btn.sm, :root[data-theme="light"] button.sm { border-radius: 999px; }
:root[data-theme="light"] .chip { background: #fff; border-color: var(--line-strong); }

/* hero: huge black type, grey second line, the 3D Pods */
:root[data-theme="light"] .hero-banner { background: transparent; border: 0; box-shadow: none; padding: 8px 0 0; color: var(--text); overflow: visible; }
:root[data-theme="light"] .hero-banner::before, :root[data-theme="light"] .hero-banner::after { display: none; }
:root[data-theme="light"] .hero-banner h1 { color: var(--text); font-size: clamp(3rem, 6.4vw, 6rem); line-height: .92; letter-spacing: -0.06em; font-weight: 800; }
:root[data-theme="light"] .hero-banner .gradient-text { background: none; color: #b4b4c4; -webkit-text-fill-color: #b4b4c4; }
:root[data-theme="light"] .hero-banner .sub { color: var(--text-2); font-size: 1.1rem; }
:root[data-theme="light"] .hero-banner .eyebrow { color: var(--text-2); }
:root[data-theme="light"] .hero-banner .eyebrow::before { background: #0a0a0f; }
:root[data-theme="light"] .hero-banner .btn.secondary, :root[data-theme="light"] .hero-banner select { background: #fff; color: var(--text); border-color: var(--line-strong); }
:root[data-theme="light"] .hero-banner .btn { min-height: 50px; padding: 0 26px; font-size: 1rem; }
:root[data-theme="light"] .live-dot { color: #047857; }
:root[data-theme="light"] h1 em, :root[data-theme="light"] .gradient-text { background: none; color: #b4b4c4; -webkit-text-fill-color: #b4b4c4; }
:root[data-theme="light"] .page-head h1 { font-size: 2.6rem; letter-spacing: -0.05em; font-weight: 800; }

/* GV Brain: the big violet tile */
:root[data-theme="light"] .pod-card { border-radius: 32px; padding: 30px; background: var(--t-violet); border: 0; box-shadow: 0 30px 60px -32px rgba(76, 29, 149, .8); color: #fff; }
:root[data-theme="light"] .pod-card::before, :root[data-theme="light"] .pod-card::after { display: none; }
:root[data-theme="light"] .pod-card h2 { font-size: 1.7rem; }
:root[data-theme="light"] .pod-card p { color: rgba(255, 255, 255, .92); }
:root[data-theme="light"] .pod-card .btn.light { background: #fff; color: #4c1d95; box-shadow: none; }
:root[data-theme="light"] .pod-card .btn.secondary { background: rgba(255, 255, 255, .2); color: #fff; border-color: rgba(255, 255, 255, .28); }
:root[data-theme="light"] .pod-card .live-dot { color: #d1fae5; }
:root[data-theme="light"] .pod-orb { background: rgba(255, 255, 255, .2); box-shadow: none; animation: none; }
:root[data-theme="light"] .meter { background: var(--bg); border-color: transparent; height: 12px; }
:root[data-theme="light"] .meter span, :root[data-theme="light"] .bar > span { background: var(--t-blue); box-shadow: none; }
:root[data-theme="light"] ol.todo li::before { background: #0a0a0f; box-shadow: none; }
:root[data-theme="light"] .badge::before { box-shadow: none; }

/* public pages */
:root[data-theme="light"] .landing-hero::before { display: none; }
:root[data-theme="light"] .landing-hero h1 { font-weight: 800; letter-spacing: -0.06em; }
:root[data-theme="light"] .landing-hero h1 em { background: var(--t-blue); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
:root[data-theme="light"] .shot { background: #fff; border-color: var(--line); box-shadow: 0 50px 100px -50px rgba(0, 0, 0, .5); backdrop-filter: none; }
:root[data-theme="light"] .mini { background: var(--bg); }
:root[data-theme="light"] .feature .ico { background: var(--t-blue); box-shadow: none; }
:root[data-theme="light"] .feature:nth-child(2) .ico { background: var(--t-violet); } :root[data-theme="light"] .feature:nth-child(3) .ico { background: var(--t-cyan); } :root[data-theme="light"] .feature:nth-child(4) .ico { background: var(--t-sun); }
:root[data-theme="light"] .auth-art { background: var(--t-violet); border-left: 0; }
:root[data-theme="light"] .auth-art::after { display: none; }
:root[data-theme="light"] .auth-form .brand-logo.for-light { display: block; }
:root[data-theme="light"] .auth-form h1 { font-weight: 800; letter-spacing: -0.05em; }

/* the 3D Pods (pods3d.js draws the cubes) */
.pods3d { flex: none; pointer-events: none; }
.hero-banner .pods3d { margin: 36px 20px -30px 0; }
.auth-art .pods3d { align-self: center; }
.landing-hero .pods3d { margin: 34px auto 0; }

@media (max-width: 860px) {
  :root[data-theme="light"] .app { grid-template-columns: minmax(0, 1fr); }
  :root[data-theme="light"] .topbar { padding: 12px 16px; }
  :root[data-theme="light"] .content { padding: 12px 16px 40px; }
  :root[data-theme="light"] .kpi .value { font-size: 1.6rem; }
  .hero-banner .pods3d { display: none; }
}
/* Business switcher and demo business */
.switcher-menu { position: relative; }
.switcher-menu > summary { list-style: none; cursor: pointer; }
.switcher-menu > summary::-webkit-details-marker { display: none; }
.switcher-menu[open] > summary svg { transform: rotate(180deg); }
.switcher-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); display: grid; gap: 2px; padding: 6px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6); }
.switcher-list form { display: block; margin: 0; }
button.switch-item, a.switch-item { box-sizing: border-box; min-height: 0; white-space: normal; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 9px 10px; border-radius: 10px; background: transparent; border: 0; color: var(--text); font: inherit; font-size: .9rem; text-align: left; text-decoration: none; cursor: pointer; box-shadow: none; }
button.switch-item:hover, a.switch-item:hover, .switch-item[aria-current] { transform: none; box-shadow: none; filter: none; background: var(--surface-2); }
button.switch-item.accent { color: var(--accent-strong); font-weight: 600; }
.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent); }
.demo-banner form { margin: 0; }

:root[data-theme="light"] .switcher-list { background: #ffffff; border-color: var(--line); box-shadow: var(--shadow-lg); }
:root[data-theme="light"] .demo-banner { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
:root[data-theme="light"] button.switch-item { padding: 9px 10px; background: transparent; color: var(--text); border: 0; border-radius: 12px; min-height: 0; box-shadow: none; font-weight: 500; }
:root[data-theme="light"] button.switch-item:hover, :root[data-theme="light"] .switch-item[aria-current] { background: var(--bg); }
:root[data-theme="light"] button.switch-item.accent { color: var(--accent); font-weight: 600; }
.bar-row.wide { grid-template-columns: 110px 1fr 60px; }

/* ---------- Ad images ---------- */
.ad-strip { display: flex; gap: 14px; align-items: flex-end; margin: 14px 0 6px; overflow-x: auto; padding-bottom: 4px; }
.ad-strip figure { margin: 0; flex: 0 0 auto; }
.ad-strip img { display: block; height: 260px; width: auto; border-radius: 16px; box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .45); }
.ad-strip .ad-story img { height: 340px; }
.ad-strip figcaption { font-size: .8rem; margin-top: 8px; line-height: 1.4; }
.make-images { margin-top: 10px; padding: 12px 16px; border-radius: 18px; background: var(--surface-2); }
.make-images summary { cursor: pointer; font-weight: 650; }
.choice-row { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.choice-row legend { font-weight: 550; font-size: .88rem; margin-bottom: 6px; }
label.choice { display: inline-flex; gap: 8px; align-items: center; margin: 0; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; cursor: pointer; }
label.choice:has(input:checked) { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
label.choice.photo { padding: 4px 10px 4px 4px; border-radius: 14px; }
label.choice.photo img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.photo-grid { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 14px; }
.photo-grid figure { margin: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.photo-grid img { width: 140px; height: 140px; object-fit: cover; border-radius: 18px; }
.look-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; align-items: start; }
.look-logo { height: 160px; border-radius: 22px; background: var(--surface-2); display: grid; place-items: center; padding: 16px; text-align: center; }
.look-logo img { max-width: 100%; max-height: 100%; }
.swatch-input { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.swatch-input input[type=color] { width: 54px; height: 40px; padding: 2px; border-radius: 12px; }
@media (max-width: 700px) {
  .look-row { grid-template-columns: 1fr; }
  .ad-strip img { height: 200px; }
  .ad-strip .ad-story img { height: 260px; }
}
.ad-strip form.inline { display: inline; margin: 0 0 0 10px; }
button.linklike { all: unset; cursor: pointer; color: var(--accent); font: inherit; }
button.linklike:hover { text-decoration: underline; }
.canva-bar .row { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* small one-field forms inside table rows */
.inline-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.inline-form input { width: 6.5em; margin: 0; padding: 4px 8px; }
.inline-form button { padding: 4px 10px; margin: 0; }

/* ad click to order funnel */
.funnel { display: grid; gap: 8px; margin: 10px 0 14px; }
.funnel-row { display: grid; grid-template-columns: minmax(120px, 160px) 1fr minmax(150px, 220px); gap: 12px; align-items: center; }
.funnel-bar { height: 14px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.funnel-bar > span { display: block; height: 100%; background: var(--t-blue, var(--accent)); border-radius: inherit; }
@media (max-width: 640px) { .funnel-row { grid-template-columns: 1fr; gap: 4px; } }
.ideas { display: grid; gap: 12px; }
.idea { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.idea p { margin: 6px 0 0; }
.idea-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- What makes money (winning creatives) ---------- */
.win-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 6px; }
.win { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 10px 14px 10px 10px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.win.is-winner { border-color: color-mix(in srgb, var(--good, #16a34a) 45%, transparent); background: color-mix(in srgb, var(--good, #16a34a) 6%, var(--surface)); }
.win.is-loser { opacity: .85; }
.win-thumb { position: relative; width: 84px; height: 84px; border-radius: 14px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-size: .78rem; font-weight: 600; }
.win-thumb img { width: 100%; height: 100%; object-fit: cover; }
.win-crown { position: absolute; left: 6px; top: 6px; font-style: normal; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--t-sun, #ffc83d); color: #1d1d1f; }
.win-body p { margin: 4px 0 0; }
.win-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.win-nums { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 2px; }
.win-profit { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.win-traits { margin: 6px 0 12px; padding-left: 18px; }
.win-traits li { margin: 6px 0; }
.win-make { margin-top: 8px; }
@media (max-width: 700px) {
  .win { grid-template-columns: 64px minmax(0, 1fr); }
  .win-thumb { width: 64px; height: 64px; }
  .win-nums { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 8px; text-align: left; }
}

/* Product thumbnails in lists (pictures from the shop or uploaded) */
.with-thumb { white-space: nowrap; }
.thumb { display: inline-block; width: 36px; height: 36px; margin-right: 10px; vertical-align: middle; border-radius: 9px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Which shop an order came from */
.shop-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--accent-soft); color: var(--text); border: 1px solid var(--line); white-space: nowrap; }

/* Approvals: the owner's switch for live changes in Meta stands out while it is off. */
.live-switch.off { border: 2px solid var(--accent); }
.live-switch.off form button[value="1"] { width: 100%; }
.live-switch p.warn { font-weight: 500; color: var(--warn); }
.bad-text { color: var(--bad); }
.good-text { color: var(--good); }

/* Own creatives (uploads) and the launch page */
textarea[name^="primary_text_"] { min-height: 22em; field-sizing: content; max-height: 40em; }
.dropzone { display: block; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 26px 20px; text-align: center; background: var(--surface-2); cursor: pointer; transition: border-color .2s ease, background .2s ease; margin: 0; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.dropzone input[type=file] { margin: 14px auto 0; max-width: 100%; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.media-tile { position: relative; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.media-tile .frame { aspect-ratio: 1 / 1; background: #0b0d18; display: grid; place-items: center; overflow: hidden; }
.media-tile .frame img, .media-tile .frame video { width: 100%; height: 100%; object-fit: contain; display: block; }
.media-tile .body { padding: 9px 11px 11px; font-size: .8rem; display: flex; flex-direction: column; gap: 5px; }
.media-tile .body .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-tile .body .note { color: var(--warn); font-size: .75rem; }
.media-tile .kind { position: absolute; top: 8px; left: 8px; z-index: 2; }
label.media-tile { margin: 0; cursor: pointer; font-weight: 400; }
label.media-tile input { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; z-index: 2; }
label.media-tile:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.step-head { display: flex; align-items: center; gap: 12px; }
.step-no { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; font: 700 .95rem var(--font-mono); background: var(--accent-soft); color: var(--accent-strong); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.country-pick { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--surface); cursor: pointer; margin: 0; font-weight: 400; min-width: 180px; flex: 1 1 200px; }
.country-pick:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.country-pick .top { display: flex; gap: 8px; align-items: center; font-weight: 650; }
.country-pick .why { font-size: .76rem; color: var(--text-2); }
.text-block { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px 16px; margin-top: 12px; background: var(--surface-2); }
.plan-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: .88rem; }
.plan-list li { padding-left: 14px; border-left: 2px solid var(--accent); }
.plan-list li b { display: block; font-size: .78rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.plan-list li.warn-line { border-left-color: var(--bad); }
.plan-list li.warn-line b { color: var(--bad); }
.ad-preview { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); max-width: 340px; font-size: .85rem; }
.ad-preview .msg { padding: 10px 12px; white-space: pre-wrap; }
.ad-preview .frame { background: #0b0d18; }
.ad-preview .frame img, .ad-preview .frame video { width: 100%; display: block; max-height: 340px; object-fit: contain; }
.ad-preview .foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2); }
.ad-preview .foot b { display: block; }
.step-log { list-style: none; margin: 0; padding: 0; font-size: .85rem; display: flex; flex-direction: column; gap: 6px; }

/* =====================================================================
   Shell v2 (2026-10-05): a grouped menu with page search (Ctrl K), a
   phone tab bar, a page title in the top bar, tidy notices, tables that
   scroll inside their card, and busy buttons. Works in both themes.
   ===================================================================== */
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-3) 45%, transparent) transparent; }

/* Sidebar: search, groups that fold, the Approvals count */
:root .app button.nav-search { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 40px; margin: 0; padding: 0 10px 0 12px; border-radius: 12px; background: var(--ink-2); color: var(--ink-text-2); border: 1px solid var(--ink-line); box-shadow: none; font: 500 .88rem var(--font-body); }
:root .app button.nav-search:hover { color: var(--ink-text); border-color: color-mix(in srgb, var(--accent) 45%, var(--ink-line)); background: var(--ink-2); filter: none; box-shadow: none; }
.app button.nav-search::after, .app button.top-search::after, .tabbar button::after { display: none; }
.nav-search span { flex: 1; text-align: left; }
.app kbd { font: 600 .66rem var(--font-mono); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--ink-line); background: transparent; color: var(--text-3); letter-spacing: .02em; }
.nav { gap: 1px; }
.nav-group { margin: 6px 0 0; }
.nav-group > summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 0 12px; border-radius: 12px; color: var(--ink-text-2); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; user-select: none; transition: background .18s ease, color .18s ease; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { color: var(--ink-text); background: color-mix(in srgb, var(--ink-text) 5%, transparent); }
.nav-group > summary svg { flex: none; opacity: .75; }
.nav-group > summary .nav-text { flex: 1; }
.nav-group > summary .nav-n { font: 600 .68rem var(--font-mono); letter-spacing: 0; color: var(--ink-text-2); opacity: .8; }
.nav-group > summary .chev { transition: transform .22s ease; opacity: .6; }
.nav-group[open] > summary .chev { transform: rotate(180deg); }
.nav-group[data-here] > summary { color: var(--ink-text); }
.nav-items { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 21px; padding-left: 10px; border-left: 1px solid var(--ink-line); }
.nav-group[open] .nav-items { animation: navopen .25s ease both; }
@keyframes navopen { from { opacity: 0; transform: translateY(-4px); } }
.nav-items a { min-height: 36px; font-size: .9rem; }
.nav-items a[aria-current="page"]::before { display: none; }
.nav a .nav-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .count { background: var(--t-sun, #f59e0b); color: #fff; box-shadow: 0 6px 14px -6px rgba(232, 57, 95, .8); }
.nav a[aria-current="page"] .count { background: #fff; color: #0a0a0f; box-shadow: none; }
.nav-items .soon-item { min-height: 36px; font-size: .9rem; }
:root[data-theme="light"] .nav-group > summary:hover { background: var(--bg); }
:root[data-theme="light"] .app button.nav-search { background: var(--bg); border-color: transparent; color: var(--text-3); }
:root[data-theme="light"] .app button.nav-search:hover { border-color: var(--line-strong); color: var(--text); }

/* Top bar: where you are, search, light/dark */
.crumb { min-width: 0; gap: 8px; white-space: nowrap; overflow: hidden; }
.crumb .crumb-org { overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.crumb .crumb-sep { color: var(--text-3); opacity: .6; font-weight: 400; }
.crumb .crumb-group { color: var(--text-3); font-weight: 500; }
.crumb strong { color: var(--text); font-weight: 650; }
:root .app button.top-search { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; margin: 0; padding: 0 8px 0 14px; border-radius: 999px; background: var(--surface); color: var(--text-3); border: 1px solid var(--line-strong); box-shadow: none; font: 500 .88rem var(--font-body); min-width: 220px; justify-content: flex-start; }
:root .app button.top-search span { flex: 1; text-align: left; }
:root .app button.top-search:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); background: var(--surface); filter: none; box-shadow: none; }
.app .top-search kbd { border-color: var(--line-strong); }
:root .app .topbar .icon-btn.top-theme { width: 40px; height: 40px; min-height: 40px; padding: 0; margin: 0; border-radius: 999px; background: var(--surface); color: var(--text-2); border: 1px solid var(--line-strong); box-shadow: none; }
:root .app .topbar .icon-btn.top-theme:hover { color: var(--text); filter: none; }
.topbar { min-height: 68px; }

/* Demo note: one slim line */
.demo-banner { margin-bottom: 0; padding: 8px 8px 8px 14px; border-radius: 16px; font-size: .88rem; }
.demo-banner > span { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; flex: 1; }
.demo-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.demo-more { color: var(--text-2); }

/* Notices: a clear icon and colour, never a wall of text */
p.ok, p.error { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 16px; font-weight: 500; line-height: 1.45; }
p.ok::before, p.error::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: currentColor; -webkit-mask: var(--ico) center / 13px no-repeat, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: var(--ico) center / 13px no-repeat exclude, linear-gradient(#000 0 0); }
p.ok { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
p.error { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M12 6v7M12 17.5v.5'/%3E%3C/svg%3E"); }
.content > p.ok, .content > p.error { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both, notice-in .9s ease both; }
@keyframes notice-in { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 35%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }

/* Page titles: every page opens the same way */
.content > .card > h1:first-child, .content > .card > .row:first-child h1, .content > .card > .card-head:first-child h1 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); letter-spacing: -0.045em; font-weight: 800; line-height: 1.05; }
.page-head h1 { font-size: clamp(2rem, 3.4vw, 2.7rem); line-height: 1.02; }
.page-head .sub { max-width: 820px; }
.card > p.muted:first-of-type { max-width: 900px; }

/* Cards: softer depth, a gentle lift on hover for clickable ones */
:root[data-theme="light"] .card { box-shadow: 0 1px 2px rgba(10, 10, 20, .04), 0 24px 60px -40px rgba(10, 10, 20, .35); }
a.tile, a.card { transition: transform .22s ease, box-shadow .22s ease; }
a.card:hover { transform: translateY(-2px); }

/* Tables: scroll inside their card with a soft edge shadow, sticky header */
.tbl-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch;
  background: linear-gradient(90deg, var(--surface) 30%, transparent) left / 40px 100% no-repeat local,
              linear-gradient(270deg, var(--surface) 30%, transparent) right / 40px 100% no-repeat local,
              radial-gradient(farthest-side at 0 50%, rgba(10, 10, 30, .14), transparent) left / 14px 100% no-repeat scroll,
              radial-gradient(farthest-side at 100% 50%, rgba(10, 10, 30, .14), transparent) right / 14px 100% no-repeat scroll; }
.tbl-scroll > table { min-width: 100%; }
table.data th, table.audit th { position: sticky; top: 0; z-index: 1; }
table.data td.num, table.data td .num, table.numbers td { font-variant-numeric: tabular-nums; }
:root[data-theme="light"] table.data th:first-child, :root[data-theme="light"] table.audit th:first-child { border-top-left-radius: 14px; border-bottom-left-radius: 14px; }
:root[data-theme="light"] table.data th:last-child, :root[data-theme="light"] table.audit th:last-child { border-top-right-radius: 14px; border-bottom-right-radius: 14px; }
:root[data-theme="light"] table.data tbody tr:hover td, :root[data-theme="light"] table.audit tbody tr:hover td { background: #f6f6fa; }

/* Forms: bigger touch targets, clear focus */
:root[data-theme="light"] input:not([type=checkbox]):not([type=radio]):not([type=file]), :root[data-theme="light"] select, :root[data-theme="light"] textarea { border-radius: 14px; background: #fff; border-color: var(--line-strong); }
:root[data-theme="light"] input:focus, :root[data-theme="light"] select:focus, :root[data-theme="light"] textarea:focus { border-color: #0a0a0f; box-shadow: 0 0 0 4px rgba(10, 10, 15, .08); }
select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8aa0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
select[multiple] { background-image: none; padding-right: 13px; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; flex: none; }
details > summary { border-radius: 8px; }
details > summary:hover { color: var(--accent-strong); }

/* Busy buttons: a spinner while the page works, so nobody clicks twice */
.is-busy { pointer-events: none; opacity: .75; }
button.is-busy::before, .btn.is-busy::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin-r .7s linear infinite; flex: none; }
@keyframes spin-r { to { transform: rotate(360deg); } }

/* Page search (Ctrl K) */
.palette { padding: 0; border: 0; background: transparent; width: min(640px, calc(100vw - 24px)); max-width: none; margin: 12vh auto auto; color: var(--text); overflow: visible; }
.palette::backdrop { background: rgba(10, 10, 20, .38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.palette[open] .palette-box { animation: pal-in .22s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pal-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.palette-box { background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 24px; box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .6); overflow: hidden; }
:root[data-theme="light"] .palette-box { background: #fff; border-color: var(--line); }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 6px 16px 6px 20px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.palette-input input { flex: 1; border: 0 !important; box-shadow: none !important; background: transparent !important; font-size: 1.08rem; padding: 16px 0; margin: 0; outline: none; }
.palette-input input::-webkit-search-cancel-button { display: none; }
.palette kbd { font: 600 .66rem var(--font-mono); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--text-3); margin-right: 4px; }
.palette-list { list-style: none; margin: 0; padding: 8px; max-height: min(420px, 55vh); overflow-y: auto; }
.palette-list li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--text); font-weight: 500; }
.palette-list li a .pi { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.palette-list li a .pg { margin-left: auto; font-size: .75rem; color: var(--text-3); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.palette-list li[aria-selected="true"] a { background: #0a0a0f; color: #fff; }
.palette-list li[aria-selected="true"] a .pi { background: var(--t-blue, var(--accent)); color: #fff; }
.palette-list li[aria-selected="true"] a .pg { color: rgba(255, 255, 255, .6); }
:root[data-theme="dark"] .palette-list li[aria-selected="true"] a { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px rgba(124, 139, 255, .35); }
.palette-list .empty-row { padding: 22px; text-align: center; color: var(--text-3); }
.palette-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: .76rem; color: var(--text-3); }

/* Phone tab bar */
.tabbar { display: none; }
@media (max-width: 860px) {
  .tabbar { position: fixed; z-index: 25; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 6px; border-radius: 24px; background: color-mix(in srgb, var(--surface-solid) 82%, transparent); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); border: 1px solid var(--line-strong); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .55); }
  :root[data-theme="light"] .tabbar { background: rgba(255, 255, 255, .86); border-color: rgba(0, 0, 0, .06); }
  .tabbar a, :root .app .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; margin: 0; padding: 4px 2px; border-radius: 18px; border: 0; background: transparent; box-shadow: none; color: var(--text-3); font: 600 .68rem/1.1 var(--font-body); white-space: normal; text-align: center; overflow: visible; }
  :root .app .tabbar button:hover { background: transparent; color: var(--text); box-shadow: none; }
  .tabbar a[aria-current="page"] { color: var(--text); }
  .tabbar .tab-ico { position: relative; display: grid; place-items: center; width: 44px; height: 28px; border-radius: 999px; transition: background .2s ease; }
  .tabbar a[aria-current="page"] .tab-ico { background: #0a0a0f; color: #fff; }
  :root[data-theme="dark"] .tabbar a[aria-current="page"] .tab-ico { background: var(--accent); }
  .tabbar .dot-count { position: absolute; top: -5px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; background: #e8395f; color: #fff; font-size: .64rem; font-weight: 700; border: 2px solid var(--surface-solid); }
  .content, :root[data-theme="light"] .content { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .top-search span, .top-search kbd, .crumb .crumb-org, .crumb .crumb-sep:first-of-type { display: none; }
  :root .app button.top-search { min-width: 0; width: 40px; padding: 0; justify-content: center; }
  .crumb strong { font-size: 1rem; }
  .crumb .crumb-group { display: none; }
  .crumb .crumb-sep { display: none; }
  .topbar { min-height: 60px; gap: 8px; }
  .hide-xs { display: none; }
  .topbar .btn.glow { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 999px; }
  .sidebar, :root[data-theme="light"] .sidebar { width: min(320px, 86vw); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  :root[data-theme="light"] .sidebar { background: #fff; }
  .app.nav-open .sidebar { box-shadow: 0 0 0 100vmax rgba(10, 10, 20, .45); }
  .demo-more { display: none; }
  .palette { margin-top: 8vh; }
}
@media (max-width: 600px) {
  .page-head h1, :root[data-theme="light"] .page-head h1 { font-size: 2rem; }
  .content > .card > h1:first-child { font-size: 1.6rem; }
  .card, :root[data-theme="light"] .card { padding: 18px 16px; border-radius: 24px; }
  .card.flush, :root[data-theme="light"] .card.flush { padding: 0; }
  .card.flush .card-head { padding: 18px 16px 0; }
  :root[data-theme="light"] .kpi { padding: 16px; min-height: 118px; border-radius: 24px; }
  :root[data-theme="light"] .kpi .value { font-size: 1.45rem; }
  /* Any table not already scrolling scrolls inside its own box (mm.js wraps them). */
  table.numbers, .card > table:not(.audit), fieldset table { display: table; overflow: visible; }
  .tbl-scroll { margin-left: -4px; margin-right: -4px; }
  .actions .btn, .actions button { flex: 1 1 auto; }
}

/* Overview: last 7 days as a bento, the first tile twice as wide */
a.kpi { color: inherit; text-decoration: none; }
a.kpi:hover { color: inherit; }
.kpi .label > span { font-weight: 500; opacity: .75; }
.kpis.glance { grid-template-columns: minmax(0, 1.7fr) repeat(4, minmax(0, 1fr)); }
.kpis.glance > .kpi:first-child .value { font-size: clamp(2rem, 3.4vw, 3.6rem); }
:root[data-theme="light"] .kpis.glance > .kpi:first-child { background: var(--t-ink); }
:root[data-theme="light"] .kpis.glance > .kpi:nth-child(4) { background: var(--t-sun); }
:root[data-theme="light"] .kpis.glance > .kpi:nth-child(5) { background: var(--t-blue); }
.kpis.glance .kpi { justify-content: space-between; }
@media (max-width: 1180px) { .kpis.glance { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis.glance > .kpi:first-child { grid-column: 1 / -1; } }
.tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles-4 .tile { padding: 16px; }
@media (max-width: 1280px) { .tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tiles-4 .tile span:last-child { display: none; } .tiles-4 .tile { padding: 14px; } }
.focus-card .goal-line { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.focus-card ol.todo { margin: 0; }
.break { overflow-wrap: anywhere; }
/* Icon buttons keep room for their icon (the light theme's pill padding squeezed the log-out icon to nothing). */
:root .app .side-user button, :root .app button.icon-btn { padding: 0; }
.icon-btn svg, .side-user button svg { flex: none; }
.kpis.glance > .kpi:first-child .value { font-size: clamp(1.9rem, 2.5vw, 3rem); }
.kpi .value { max-width: 100%; overflow: hidden; }
.glance-note { margin-top: -6px; }

/* GV Brain: the pods as a bento of small tiles, coloured by how urgent they are */
.pods-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.pod-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 16px 20px; border-radius: 20px; background: var(--surface-2); color: inherit; text-decoration: none; border: 1px solid var(--line); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.pod-tile::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--text-3); opacity: .5; }
.pod-tile.lvl-bad::before { background: var(--bad); opacity: 1; } .pod-tile.lvl-warn::before { background: var(--warn); opacity: 1; } .pod-tile.lvl-good::before { background: var(--good); opacity: 1; }
.pod-tile:hover { color: inherit; transform: translateY(-3px); box-shadow: 0 22px 44px -26px rgba(0, 0, 0, .45); }
:root[data-theme="light"] .pod-tile { background: var(--bg); border-color: transparent; }
:root[data-theme="light"] .pod-tile:hover { background: #fff; border-color: var(--line); }
.pod-tile-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pod-tile-head b { font-family: var(--font-display); font-size: 1.02rem; letter-spacing: -0.02em; }
.pod-tile-line { font-size: .88rem; font-weight: 500; }
.pod-grid > .col > .card, .pod-grid > .col > section { margin: 0; }
/* Ask the GV Brain: a big, friendly question box */
.ask-card { border: 1px solid color-mix(in srgb, var(--c2) 30%, transparent) !important; }
:root[data-theme="light"] .ask-card { background: radial-gradient(120% 90% at 100% 0%, rgba(139, 92, 246, .14), transparent 55%), #fff; }
.ask-card textarea { min-height: 96px; font-size: 1rem; border-radius: 18px !important; }
.ask-card form button { width: 100%; min-height: 46px; }
.ask-card .answer { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
/* Answers stay short: the newest is clamped with "Read the whole answer", earlier ones fold into rows. */
.qa-latest { margin-top: 18px; padding: 16px 18px; border-radius: 22px; background: var(--surface-2); }
:root[data-theme="light"] .qa-latest { background: var(--bg); }
.qa-label { margin: 0 0 6px; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.qa-label .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.qa-latest .qa-q { margin: 0 0 6px; font-weight: 700; }
.qa-latest .prose { margin-top: 8px; }
[data-clamp].is-clamped { max-height: 11.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
button.clamp-toggle, :root[data-theme] button.clamp-toggle { margin-top: 8px; border-radius: 0; padding: 0; min-height: 0; border: 0; background: none; box-shadow: none; color: var(--accent-strong); font: 600 .88rem var(--font-body); cursor: pointer; }
button.clamp-toggle:hover, :root[data-theme] button.clamp-toggle:hover { color: var(--accent-strong); text-decoration: underline; filter: none; box-shadow: none; background: none; }
.qa-earlier { margin-top: 18px; }
.qa-earlier-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.qa-earlier-head a { text-transform: none; letter-spacing: 0; font-size: .88rem; }
details.qa-row { margin: 0; border-top: 1px solid var(--line); }
details.qa-row:first-of-type { border-top: 0; }
.qa-all details.qa-row:first-of-type { border-top: 0; }
details.qa-row > summary { color: var(--text); display: flex; align-items: center; gap: 12px; padding: 11px 0; cursor: pointer; list-style: none; }
details.qa-row > summary::-webkit-details-marker { display: none; }
details.qa-row > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .5; transition: transform .2s; }
details.qa-row[open] > summary::after { transform: rotate(-135deg); }
details.qa-row .qa-q { flex: 1; min-width: 0; font-weight: 600; font-size: .94rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.qa-row[open] .qa-q { white-space: normal; }
.qa-when { flex: none; font-size: .8rem; color: var(--text-3); }
.qa-body { padding: 0 0 14px; }
.qa-body .muted.small { margin: 0 0 6px; }
.qa-all { padding-top: 10px; padding-bottom: 10px; }
.qa-pages { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0 6px; border-top: 1px solid var(--line); }
ul.flags { list-style: none; padding: 0 !important; margin: 8px 0 0 !important; display: flex; flex-direction: column; gap: 2px; }
ul.flags li { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0 !important; }
ul.flags li:last-child { border-bottom: 0; }

/* Approvals: each proposal is its own tile with the money effect up front */
.waiting-card .proposal, .waiting-card .proposal:first-of-type { position: relative; border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px; margin-top: 12px; background: var(--surface-2); }
:root[data-theme="light"] .waiting-card .proposal { background: var(--bg); border-color: transparent; }
.waiting-card .proposal:first-of-type { margin-top: 0; }
.proposal-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.proposal-top .effect { margin-left: auto; padding: 4px 12px; border-radius: 999px; background: var(--good-soft); font-size: .84rem; text-shadow: none; }
.proposal-top .effect.muted { background: var(--surface-2); }
:root[data-theme="light"] .proposal-top .effect.muted { background: #fff; }
.waiting-card .proposal h3 { margin: 10px 0 6px; font-size: 1.15rem; letter-spacing: -0.025em; }
.waiting-card .proposal > p { color: var(--text-2); font-size: .92rem; }
.waiting-card .proposal details { margin-top: 10px; }
.waiting-card .proposal .actions button { min-width: 120px; }
.waiting-card .proposal.blocked { border-style: dashed; }
.approvals-pair { align-items: stretch; }
.approvals-pair > .card { margin: 0; }
@media (max-width: 600px) { .proposal-top .effect { margin-left: 0; width: 100%; max-width: 100%; text-align: center; white-space: normal; } .waiting-card .proposal { padding: 16px; } .waiting-card .proposal .actions button { flex: 1; } }
@media (max-width: 600px) {
  button, :root[data-theme="light"] button { white-space: normal; height: auto; min-height: 40px; padding-top: 8px; padding-bottom: 8px; text-align: center; line-height: 1.25; }
  :root .app button.icon-btn, :root .app .side-user button, .tabbar button { padding-top: 0; padding-bottom: 0; }
}

/* File pickers look like drop zones (files can be dropped straight on them) */
input[type=file] { padding: 22px 18px; border: 1.5px dashed var(--line-strong) !important; border-radius: 18px !important; background: var(--surface-2) !important; cursor: pointer; font-size: .9rem; color: var(--text-2); transition: border-color .2s ease, background .2s ease; }
input[type=file]:hover, input[type=file].drag { border-color: var(--accent) !important; background: var(--accent-soft) !important; }
input[type=file]::file-selector-button { padding: 10px 18px; border-radius: 999px; background: #0a0a0f; color: #fff; margin-right: 14px; }
:root[data-theme="dark"] input[type=file]::file-selector-button { background: var(--accent); }
.drop input[type=file] { background: var(--surface) !important; }

/* "On this page" chips for long pages (mm.js builds them from the section titles) */
.onpage { position: sticky; top: var(--top-h, 68px); z-index: 4; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px; margin: 0 -8px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 95%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); animation: none !important; }
.onpage::-webkit-scrollbar { display: none; }
.onpage.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
.onpage a { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text-2); font-size: .82rem; font-weight: 600; white-space: nowrap; transition: background .2s ease, color .2s ease; }
.onpage a:hover { color: var(--text); border-color: var(--text-3); }
.onpage a.on { background: #0a0a0f; border-color: #0a0a0f; color: #fff; }
:root[data-theme="dark"] .onpage a.on { background: var(--accent); border-color: var(--accent); }
@media (max-width: 860px) { .onpage { top: var(--top-h, 60px); margin: 0 -16px; padding: 8px 16px; border-radius: 0; } }
/* Small stat boxes sit two to a row on phones */
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .stats > div { padding: 12px 13px; } .stats .num { font-size: 1.2rem; } }
.win-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.page-head form { margin: 0; }
.page-head select { width: auto; min-width: 170px; margin: 0; border-radius: 999px !important; font-weight: 600; }
.page-head > .btn, .page-head > form, .page-head > a { flex: none; }
@media (max-width: 600px) { .page-head > .btn, .page-head > form, .page-head select { width: 100%; } }

/* Phone: rows of simple tables become small cards, each value with its column name */
@media (max-width: 600px) {
  table.audit:not(.numbers) tr { padding: 10px 0; }
  table.audit:not(.numbers) td[data-label] { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 3px 14px; text-align: right; }
  table.audit:not(.numbers) td[data-label]::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; font-size: .7rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
  table.audit:not(.numbers) td[data-label=""]::before { display: none; }
  table.audit:not(.numbers) td[data-label]:first-child { font-weight: 650; }
  table.audit:not(.numbers) td > * { max-width: 100%; }
  table.audit:not(.numbers) td form.inline { display: inline-flex; }
  .public .site-nav { gap: 6px; }
  .public .site-nav .btn, .public .site-nav button { padding: 0 12px; min-height: 36px; font-size: .82rem; white-space: nowrap; }
}

/* Five tiles never leave one alone on a row: 2 + 3 on tablets, 1 + 2 + 2 on phones */
@media (min-width: 601px) and (max-width: 1180px) {
  .kpis:has(> .kpi:nth-child(5):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kpis:has(> .kpi:nth-child(5):last-child) > .kpi { grid-column: span 2; }
  .kpis:has(> .kpi:nth-child(5):last-child) > .kpi:nth-child(-n+2) { grid-column: span 3; }
}
@media (max-width: 600px) {
  .kpis:has(> .kpi:nth-child(5):last-child) > .kpi:first-child, .kpis:has(> .kpi:nth-child(3):last-child) > .kpi:first-child { grid-column: 1 / -1; }
}
@media (min-width: 601px) and (max-width: 860px) { .tabbar { left: 50%; right: auto; width: min(560px, calc(100vw - 20px)); transform: translateX(-50%); } }

/* Launch: the shop on top and the product picker */
.shop-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-bottom: 18px; }
.shop-bar p { margin: 0; flex: 1 1 320px; }
.shop-pick { display: flex; align-items: center; gap: 12px; }
.shop-pick label { margin: 0; font: 700 .78rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.shop-pick select { min-width: 240px; font-weight: 650; font-size: 1rem; }
.shop-pick .one-shop { font-size: 1.05rem; }
.multi-select { position: relative; margin-top: 6px; }
.multi-select > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); cursor: pointer; font-weight: 600; }
.multi-select > summary::-webkit-details-marker { display: none; }
.multi-select > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg) translateY(-3px); flex: none; transition: transform .15s ease; }
.multi-select[open] > summary::after { transform: rotate(225deg) translateY(-2px); }
.multi-select[open] > summary { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.multi-select .ms-count { margin-left: auto; font-weight: 450; font-size: .82rem; }
.ms-panel { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); padding: 10px; }
.ms-search { width: 100%; margin: 0 0 8px; }
.ms-list { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.ms-item { display: grid; grid-template-columns: 20px 40px 1fr auto; align-items: center; gap: 10px; margin: 0; padding: 6px 8px; border-radius: 10px; cursor: pointer; font-weight: 500; }
.ms-item:hover { background: var(--surface-2); }
.ms-item:has(input:checked) { background: var(--accent-soft); }
.ms-item img, .ms-item .ph, .chosen img, .chosen .ph { width: 40px; height: 40px; object-fit: cover; border-radius: 9px; background: var(--surface-2); display: block; }
.ms-item .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-item .pr { font: 600 .8rem var(--font-mono); color: var(--text-2); white-space: nowrap; }
.chosen-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; margin-top: 12px; }
.chosen { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 14px; background: var(--accent-soft); }
.chosen img, .chosen .ph { width: 52px; height: 52px; flex: none; }
.chosen .tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; font-size: .85rem; }
.chosen .tx b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chosen .tx span { font-family: var(--font-mono); font-size: .78rem; color: var(--text-2); }
.chosen .tx .badge { font-family: inherit; align-self: flex-start; }
.chosen button.x, .chosen button.x:hover { flex: none; min-height: 0; transform: none; width: 28px; height: 28px; padding: 0; border-radius: 50%; background: transparent; color: var(--text-2); border: 1px solid var(--line-strong); box-shadow: none; font-size: 1rem; line-height: 1; }
.chosen button.x:hover { color: var(--bad); border-color: var(--bad); }
@media (max-width: 640px) { .shop-pick { width: 100%; } .shop-pick select { flex: 1; min-width: 0; } .ms-panel { position: static; margin-top: 6px; } }
.card:has(.multi-select[open]) { z-index: 25; }

/* What GrowViking read on the shop's website */
.study-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; margin-top: 8px; }
.study-grid h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin: 14px 0 4px; }
.study-grid .lead-line { font-size: 1.02rem; font-weight: 550; margin: 0; }
.study-grid ul.ticks { margin: 0; padding-left: 18px; font-size: .88rem; }
.study-grid ul.ticks li { margin: 2px 0; }
@media (max-width: 760px) { .study-grid { grid-template-columns: 1fr; } }

/* The same ad in several sizes */
.media-tile .frames { display: flex; gap: 6px; background: #0b0d18; padding: 6px; align-items: flex-end; justify-content: center; min-height: 0; }
.media-tile:not(.variant-set) .frames { padding: 0; }
.media-tile:not(.variant-set) .frames .frame { width: 100%; }
.media-tile.variant-set .frames { align-items: center; padding: 8px; }
.media-tile.variant-set .frames .frame { position: relative; flex: var(--r, 1) 1 0; min-width: 0; aspect-ratio: var(--ar, 1); border-radius: 6px; }
.media-tile.variant-set .frames .frame img, .media-tile.variant-set .frames .frame video { width: 100%; height: 100%; object-fit: cover; }
.media-tile .shape-tag { position: absolute; bottom: 4px; left: 4px; font: 700 .66rem var(--font-mono); padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #fff; }
.media-tile .sizes { position: absolute; top: 8px; left: 78px; z-index: 2; background: var(--surface); }
.link-btn, .link-btn:hover, .media-tile button.link-btn, .media-tile button.link-btn:hover, .drop-zone button.link-btn, .drop-zone button.link-btn:hover, .ig-box button.link-btn, .ig-box button.link-btn:hover { background: none; border: 0; box-shadow: none; padding: 0; min-height: 0; color: var(--accent-strong); font: inherit; text-decoration: underline; cursor: pointer; transform: none; }

/* Launch: the names the campaign, ad sets and ads get in Meta */
.meta-names { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: var(--surface); }
.meta-names p { margin: 0 0 6px; }
.meta-names ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.meta-names li .muted { display: inline-block; min-width: 64px; font-family: var(--font-sans, inherit); }

/* Launch: upload without leaving the page */
.drop-zone { border: 1.5px dashed var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: .88rem; }
.drop-zone.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.drop-zone p { margin: 0; }
.upload-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.upload-list:empty { display: none; }
.upload-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(90px, 160px) minmax(70px, auto); gap: 10px; align-items: center; font-size: .82rem; }
.upload-list .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.upload-list progress { width: 100%; height: 8px; accent-color: var(--accent); }
.upload-list li.ok .p { color: var(--good); }
.upload-list li.bad .p { color: var(--bad); }
@media (max-width: 640px) { .upload-list li { grid-template-columns: minmax(0, 1fr) auto; } .upload-list progress { grid-column: 1 / -1; } }

/* Meta setup: Instagram for ads */
.ig-box { margin-top: 18px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line, #e5e7eb); background: var(--surface-2, rgba(127,127,127,.06)); }
.ig-box h3 { margin: 0 0 8px; font-size: 1rem; }
.ig-box.ig-ready { border-color: rgba(22,163,74,.35); }
.ig-box.ig-allow, .ig-box.ig-missing { border-color: rgba(217,119,6,.45); }
.ig-box .row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.ig-box .ig-steps { margin: 8px 0 0; padding-left: 18px; }
.ig-box .ig-steps li { margin: 4px 0; }
.ig-line { display: inline-flex; align-items: center; gap: 6px; }
.ad-identity { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin: 8px 0 0; }
p.small.ad-identity { display: block; }
.ig-box form.ig-allow { display: block; margin: 12px 0 8px; }

/* Launch: one compact card per ad; a set of sizes looks like a small stack and opens a pop-up */
.set-summary { margin: 4px 0 10px; color: var(--text-2); }
.media-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.media-tile.variant-set { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
div.media-tile.variant-set { grid-column: span 2; }
@media (max-width: 640px) { div.media-tile.variant-set { grid-column: 1 / -1; } }
label.media-tile.variant-set { overflow: visible; margin-top: 6px; isolation: isolate; }
label.media-tile.variant-set::before, label.media-tile.variant-set::after { content: ""; position: absolute; left: 8px; right: 8px; top: -5px; height: 12px; border-radius: 12px 12px 0 0; border: 1px solid var(--line); border-bottom: 0; background: var(--surface-2); z-index: -1; }
label.media-tile.variant-set::after { left: 16px; right: 16px; top: -9px; opacity: .6; }
.media-tile.variant-set > .frame { border-radius: 13px 13px 0 0; }
.media-tile .shape-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.shape-chip { display: inline-flex; align-items: center; gap: 4px; font: 600 .68rem var(--font-mono); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--text-2); }
.shape-chip.used { color: var(--text); border-color: var(--line-strong); }
.shape-chip i { display: inline-block; height: 10px; width: calc(10px * var(--r, 1)); max-width: 20px; border: 1.5px solid currentColor; border-radius: 2px; }
.media-tile .tile-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.media-tile .tile-foot .link-btn { margin-left: auto; font-size: .75rem; }
dialog.sizes-pop { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface-solid); color: var(--text); padding: 18px 20px; }
dialog.sizes-pop::backdrop { background: rgba(5, 7, 14, .6); backdrop-filter: blur(3px); }
.sizes-pop .pop-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sizes-pop .pop-head h3 { margin: 0; font-size: 1.05rem; }
.sizes-pop .pop-sizes { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin: 12px 0; }
.sizes-pop .pop-size { margin: 0; flex: 1 1 200px; max-width: 280px; display: flex; flex-direction: column; gap: 8px; }
.sizes-pop .pop-size.unused { opacity: .6; }
.sizes-pop .pop-frame { aspect-ratio: var(--r, 1); max-height: 300px; background: #0b0d18; border-radius: 10px; overflow: hidden; display: grid; place-items: center; }
.sizes-pop .pop-frame img, .sizes-pop .pop-frame video { width: 100%; height: 100%; object-fit: contain; }
.sizes-pop figcaption { display: flex; flex-direction: column; gap: 3px; }
.sizes-pop .note { color: var(--warn); }

/* Launch: the test structure (ABO / CBO, ad sets) */
.test-plan { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.test-plan h3 { margin: 0 0 10px; font-size: 1rem; }
.budget-mode { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
label.mode-card, label.interest-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; margin: 0; font-weight: 400; background: var(--surface); }
label.mode-card input, label.interest-card input { margin-top: 3px; flex: none; }
.mode-card.picked, .mode-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.test-plan .reasons { margin: 10px 0 0; padding-left: 18px; color: var(--text-2); }
.structure-box { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.structure-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.structure-list li { display: grid; grid-template-columns: minmax(150px, 210px) 1fr auto; gap: 10px; align-items: center; }
.structure-list .thumbs { display: flex; gap: 4px; flex-wrap: wrap; }
.structure-list .thumbs img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; background: #0b0d18; }
@media (max-width: 640px) { .structure-list li { grid-template-columns: 1fr; } }
.interest-switch { display: block; margin: 12px 0 6px; }
.interest-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 8px 0; }
.interest-card:has(input:checked) { border-color: var(--accent); }

/* =====================================================================
   Setup & modules (/setup-center) and the "module is off" page
   ===================================================================== */
.setup-hero .hero-text { flex: 1 1 520px; min-width: 0; }
.setup-ring { flex: 0 0 auto; display: flex; align-items: center; gap: 22px; padding: 22px 26px; border-radius: 28px; background: var(--t-violet, linear-gradient(135deg, #8b5cf6, #4c1d95)); color: #fff; box-shadow: 0 30px 60px -32px rgba(76, 29, 149, .8); }
.setup-ring-inner { --size: 132px; position: relative; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .18) 0); }
.setup-ring-inner::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #3b1a86; box-shadow: inset 0 0 30px rgba(0, 0, 0, .25); }
.setup-ring-inner > * { position: relative; }
.setup-ring-inner b { font: 800 2.4rem/1 var(--font-display); letter-spacing: -0.04em; }
.setup-ring-inner b small { font-size: .5em; margin-left: 2px; opacity: .8; }
.setup-ring-inner span { font-size: .78rem; opacity: .8; margin-top: 4px; }
.setup-ring-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .9rem; color: rgba(255, 255, 255, .82); }
.setup-ring-facts b { font: 700 1.15rem var(--font-display); color: #fff; margin-right: 6px; }
.setup-notice { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--good-soft); font-weight: 600; margin: 18px 0 0; }

.setup-h { font: 800 1.7rem/1.1 var(--font-display); letter-spacing: -0.04em; margin: 0 0 6px; }
.setup-section { margin-top: 44px; scroll-margin-top: 24px; }
.setup-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.setup-section-head p { max-width: 760px; margin: 0; }

.setup-next { margin-top: 32px; }
.setup-next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.setup-next-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--text); box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease; }
.setup-next-item:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--text); }
.setup-next-item > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 2px; }
.setup-next-item svg { color: var(--text-3); flex: none; }
.setup-num { flex: none; width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; font: 800 1rem var(--font-display); color: #fff; background: var(--t-sun, #ff8a4c); }

.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.module-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease; scroll-margin-top: 24px; }
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.module-card.is-on { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }
.module-card:not(.is-on) .module-ico { filter: grayscale(.85); opacity: .7; }
.module-card.is-coming { background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 14px, var(--surface-2) 14px, var(--surface-2) 28px); }
.module-card header { display: flex; gap: 14px; align-items: center; }
.module-ico { flex: none; width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--aurora); box-shadow: 0 14px 28px -16px rgba(52, 70, 242, .9); }
.g-blue { background: var(--t-blue, var(--aurora)); } .g-violet { background: var(--t-violet, var(--aurora)); } .g-cyan { background: var(--t-cyan, var(--aurora)); }
.g-sun { background: var(--t-sun, var(--aurora)); } .g-ink { background: var(--t-ink, #12151a); }
.module-title { min-width: 0; }
.module-title h3 { margin: 0 0 6px; font: 750 1.15rem/1.15 var(--font-display); letter-spacing: -0.02em; }
.module-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.module-tagline { margin: 0; color: var(--text-2); font-size: .92rem; }
.module-ready-row { display: flex; justify-content: space-between; font-size: .8rem; color: var(--text-2); margin-bottom: 6px; }
.module-ready-row b { color: var(--text); }
.module-meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.module-meter span { display: block; height: 100%; border-radius: inherit; background: var(--t-blue, var(--aurora)); transition: width .6s ease; }
.module-steps, .module-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.module-steps li { display: flex; gap: 10px; align-items: flex-start; }
.module-steps a { display: grid; gap: 1px; color: var(--text); font-size: .9rem; }
.module-steps a:hover b { text-decoration: underline; }
.module-steps li.done a b { color: var(--text-2); font-weight: 600; }
.step-dot { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong); color: #fff; }
.module-steps li.done .step-dot { background: var(--good); border-color: var(--good); }
.module-steps li.todo:not(.optional) .step-dot { border-color: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.module-features li { position: relative; padding-left: 18px; font-size: .88rem; color: var(--text-2); }
.module-features li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.module-plugs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.plug-label { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-right: 2px; }
.plug-label:not(:first-child) { margin-left: 8px; }
.plug { font-size: .74rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-2); background: var(--surface-2); }
.plug.out { border-color: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent-strong); background: var(--accent-soft); }
.module-card footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.module-card footer form { margin: 0; }

.switch-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 0; height: 36px; padding: 0 14px 0 4px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text-2); font: 650 .85rem var(--font-body); cursor: pointer; box-shadow: none; transition: background .25s ease, color .25s ease; }
.switch-btn::after { display: none; }
.switch-btn .knob { width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .25s ease; }
.switch-btn.on { flex-direction: row-reverse; padding: 0 4px 0 14px; background: var(--good); border-color: var(--good); color: #fff; }
.switch-btn:hover:not(:disabled) { filter: brightness(1.05); background: var(--accent-soft); color: var(--text); }
.switch-btn.on:hover:not(:disabled) { background: var(--good); color: #fff; }
.switch-btn:disabled { opacity: .55; cursor: not-allowed; }

.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.country-card { padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.country-card header { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.country-card h3 { margin: 0; font: 750 1.15rem var(--font-display); letter-spacing: -0.02em; }
.flag { font-size: 1.9rem; line-height: 1; }
.country-card dl { margin: 0; display: grid; gap: 10px; }
.country-card dl > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; font-size: .88rem; }
.country-card dt { color: var(--text-3); font-weight: 600; }
.country-card dd { margin: 0; display: grid; gap: 2px; }

.calendar-form { padding: 24px; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.group-tile { position: relative; display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 16px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--surface-2); cursor: pointer; font-weight: 400; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.group-tile:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.group-tile input { position: absolute; opacity: 0; pointer-events: none; }
.group-tile:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.group-check { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-strong); display: grid; place-items: center; color: transparent; background: var(--surface); transition: all .2s ease; }
.group-tile.is-on { border-color: var(--accent); background: var(--accent-soft); }
.group-tile.is-on .group-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.group-body { display: grid; gap: 4px; min-width: 0; }
.group-body b { font-size: .98rem; }
.group-next { display: inline-flex; align-items: flex-start; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--text); margin-top: 4px; }
.group-next svg { color: var(--accent); flex: none; margin-top: 2px; }
.group-body .badge { justify-self: start; margin-top: 4px; }
.calendar-sub { margin: 28px 0 4px; font: 750 1.1rem var(--font-display); }
.payday-rows { display: grid; gap: 10px; margin-top: 12px; }
.payday-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.payday-country { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; flex: 0 0 230px; min-width: 0; }
.payday-country .flag { font-size: 1.4rem; }
.payday-row select { margin: 0; width: auto; min-width: 260px; flex: 1 1 260px; max-width: 420px; }
.payday-day { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.payday-day input { width: 80px; margin: 0; }
.payday-day[hidden] { display: none; }

.own-days-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.own-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.own-days li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.own-days li:last-child { border-bottom: 0; }
.own-date { flex: none; width: 52px; height: 56px; border-radius: 14px; display: grid; place-content: center; text-align: center; background: var(--t-ink, #12151a); color: #fff; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.own-date b { font: 800 1.35rem/1 var(--font-display); letter-spacing: -0.02em; }
.own-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.own-days form { margin: 0; }
.small-btn { min-height: 32px; padding: 0 12px; font-size: .8rem; }
.own-day-form h3 { margin: 0 0 8px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.empty-mini { display: flex; gap: 14px; align-items: center; color: var(--text-3); }
.empty-mini p { margin: 0; }

.module-off { max-width: 640px; margin: 60px auto; text-align: center; display: grid; justify-items: center; gap: 10px; }
.module-off-icon { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; color: #fff; background: var(--t-ink, #12151a); box-shadow: var(--shadow-lg); margin-bottom: 8px; }
.module-off h1 { margin: 0; font: 800 clamp(2rem, 4vw, 3rem)/1 var(--font-display); letter-spacing: -0.05em; }
.module-off .sub { font-size: 1.08rem; color: var(--text-2); margin: 0; }
.module-off .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

@media (max-width: 860px) {
  .setup-ring { width: 100%; justify-content: center; }
  .own-days-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .setup-ring { flex-direction: column; text-align: center; }
  .setup-ring-facts { grid-template-columns: repeat(3, auto); gap: 14px; justify-content: center; }
  .setup-ring-facts li { display: grid; }
  .module-grid, .country-grid, .group-grid { grid-template-columns: minmax(0, 1fr); }
  .payday-row select { min-width: 0; max-width: none; }
  .country-card dl > div { grid-template-columns: 96px minmax(0, 1fr); }
  .setup-h { font-size: 1.45rem; }
}
:root[data-theme="light"] .switch-btn { background: #ececf2; color: var(--text-2); border: 1px solid var(--line-strong); box-shadow: none; }
:root[data-theme="light"] .switch-btn.on { background: #10b981; border-color: #10b981; color: #fff; box-shadow: 0 10px 22px -12px rgba(16, 185, 129, .9); }
:root[data-theme="light"] .switch-btn:hover:not(:disabled) { background: #e2e2ea; color: var(--text); }
:root[data-theme="light"] .switch-btn.on:hover:not(:disabled) { background: #0ea371; color: #fff; }
@media (max-width: 600px) { .payday-country { flex: 1 1 100%; } }

/* Facebook data page: hour chart (spend share against purchase value share) and video depth bars */
.fb-split { align-items: start; }
.fb-hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; height: 170px; align-items: end; margin: 8px 0 4px; }
.fb-hour { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 4px; border-radius: 6px; }
.fb-hour.best { background: var(--good-soft); } .fb-hour.worst { background: var(--bad-soft); }
.fb-cols { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 1px; }
.fb-cols span { width: 42%; min-height: 1px; border-radius: 3px 3px 0 0; animation: grow .9s cubic-bezier(.2, .7, .2, 1) both; transform-origin: bottom; }
.fb-cols .s { background: var(--text-3); opacity: .45; }
.fb-cols .v { background: var(--aurora); }
:root[data-theme="light"] .fb-cols .v { background: var(--t-blue); }
.fb-hour small { font-size: .68rem; color: var(--text-3); height: 1em; }
.fb-device-line { margin: -4px 0 4px 120px; }
.fb-depth { display: flex; align-items: flex-end; gap: 3px; height: 30px; width: 54px; }
.fb-depth span { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: var(--aurora); }
:root[data-theme="light"] .fb-depth span { background: var(--t-blue); }
@media (max-width: 640px) { .fb-hours { gap: 1px; height: 130px; } .fb-device-line { margin-left: 0; } }
.fb-ads td { white-space: nowrap; } .fb-ads td:first-child { white-space: normal; min-width: 160px; }
.gd-days { gap: 1px; height: 150px; } .gd-days .fb-cols span { width: 45%; } .gd-days small { white-space: nowrap; }
.fb-ads .fb-depth { height: 40px; width: 64px; }

/* Why your sales move: relevant factors grouped by why they matter */
.factor-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.factor-group { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface-2); }
.card .factor-group h3 { margin: 0 0 2px; padding-top: 0; border-top: 0; font-size: 1rem; }
.factor-group ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.factor-group li { display: grid; gap: 2px; padding-left: 12px; border-left: 3px solid var(--line); }
.factor-group li.lvl-good { border-left-color: var(--good); }
.factor-group li.lvl-warn { border-left-color: var(--warn); }
.factor-group li.lvl-bad { border-left-color: var(--bad); }
.factor-group li span { font-size: .9rem; color: var(--text-2); }

/* Insights home (Meta Ads Insights module) */
.ih-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; }
.ih-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ih-bars { display: flex; align-items: flex-end; gap: 5px; height: 220px; margin: 18px 0 10px; }
.ih-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.ih-bar span { width: 100%; min-height: 3px; border-radius: 8px 8px 3px 3px; background: color-mix(in srgb, var(--text) 12%, transparent); }
.ih-bar.now span { background: linear-gradient(180deg, #6d7cff, #3446f2); box-shadow: 0 10px 20px -12px rgba(52, 70, 242, .8); }
.ih-bar small { font-size: .66rem; color: var(--text-3); height: 12px; }
.ih-list { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 12px; }
.ih-list li { display: flex; align-items: flex-start; gap: 12px; }
.ih-list li > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ih-list li .badge { flex: none; margin-top: 1px; }
.ih-facts { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 12px; }
.ih-facts li { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 10px; }
.ih-facts .ih-k { grid-row: span 2; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding-top: 3px; }
.ih-cal { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 10px; }
.ih-cal li { display: flex; align-items: center; gap: 12px; }
.ih-cal li > div { display: flex; flex-direction: column; min-width: 0; }
.ih-date { flex: none; width: 46px; height: 50px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--line); }
.ih-date b { font: 700 1.1rem/1 var(--font-display); color: var(--text); letter-spacing: -.02em; }
.ih-ok { display: flex; gap: 10px; align-items: center; }
@media (max-width: 1100px) { .ih-row, .ih-three { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .ih-bars { gap: 2px; height: 160px; } }
.ih-list.ih-stack li { flex-direction: column; gap: 6px; }

/* Your own days: the days GrowViking found, each with confirm, edit or ignore */
.own-found, .own-mine { margin-bottom: 18px; }
.own-found .card-head h3, .own-mine .card-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.own-date.found { background: linear-gradient(140deg, #6d7cff, #8b5cf6); }
.own-found-row { align-items: flex-start !important; }
.own-found-row .own-body { gap: 3px; }
.own-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.own-found-row { padding: 12px 0 !important; }
.own-actions { flex: none; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.own-edit { position: relative; }
.own-edit > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; margin: 0; }
.own-edit > summary::-webkit-details-marker { display: none; }
.own-edit[open] > form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 15; width: min(360px, 86vw); display: grid; gap: 4px; text-align: left; box-shadow: var(--shadow-lg); }
.own-add { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.own-add > summary { cursor: pointer; color: var(--text-2); font-weight: 550; }
.own-add .own-day-form { margin-top: 12px; max-width: 520px; }
@media (max-width: 700px) {
  .own-found-row { flex-wrap: wrap; }
  .own-actions { width: 100%; justify-content: flex-start; }
  .own-edit[open] > form { left: 0; right: auto; }
}
.own-actions form, .own-actions details { display: flex; margin: 0; }
.own-edit > summary.small-btn { min-height: 32px; font-weight: 600; }
.own-edit { height: 32px; }
.own-actions button { margin: 0; }

/* Sign-ups per day (signups.html) */
.daycols { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin: 12px 0 4px; }
.daycols span { flex: 1; min-height: 2px; background: var(--accent, #4f6bff); border-radius: 3px 3px 0 0; }

/* The top bar's real height (set by mm.js, it wraps on narrow screens): the "on this page" chips stick just
   below it, and a jump to a section lands below both instead of under them. */
.app .content .card[id], .app .content .pod-card[id], .app .content section[id] { scroll-margin-top: calc(var(--top-h, 68px) + 64px); }
.weather-market + .weather-market { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.weather-market h3 { margin: 0 0 10px; }

/* The plan (plan.html) */
.plan-moves { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.plan-moves li { display: flex; gap: 12px; align-items: flex-start; }
.plan-moves li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plan-moves .badge { flex: none; margin-top: 2px; }
.plan-days { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; margin: 8px 0 16px; }
.plan-day { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.plan-day .pd-bar { display: flex; align-items: flex-end; width: 100%; height: 120px; }
.plan-day .pd-bar span { width: 100%; min-height: 3px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.plan-day.strong .pd-bar span { background: var(--good, #16a34a); }
.plan-day.weak .pd-bar span { background: var(--warn, #d97706); }
.plan-day b { font-size: .75rem; }
.plan-day small { font-size: .7rem; color: var(--text-3); white-space: nowrap; }
@media (max-width: 600px) { .plan-days { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

/* Insights home: the plan first */
.ih-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 16px; }
.ih-plan-h { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); color: var(--text); text-decoration: none; }
.ih-plan-h b { font-size: 1.5rem; }
.ih-coming li > div { display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 760px) { .ih-plan-grid { grid-template-columns: 1fr; } }

/* Insights: the story page (insights.html) */
.ins-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px 20px; }
.ins-filters label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--text-2); margin: 0; }
.ins-filters input[type=date] { margin: 0; height: 40px; }
.ins-filters button { margin: 0; height: 40px; }
.ins-presets { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.ins-presets .chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-2); font-size: .82rem; font-weight: 600; text-decoration: none; background: var(--surface); }
.ins-presets .chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.ins-filters { position: relative; z-index: 30; }
.ins-sites-field { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--text-2); }
.ins-sites { position: relative; }
.ins-sites summary { list-style: none; cursor: pointer; height: 40px; min-width: 170px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--field); color: var(--text); font-size: .88rem; font-weight: 600; user-select: none; }
.ins-sites summary::-webkit-details-marker { display: none; }
.ins-sites summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: translateY(-2px) rotate(45deg); transition: transform .15s ease; }
.ins-sites[open] summary::after { transform: translateY(2px) rotate(225deg); }
.ins-sites[open] summary { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ins-sites-list { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; width: max(100%, 260px); max-height: min(60vh, 360px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--line-strong);
  box-shadow: 0 24px 48px -16px rgba(10, 10, 40, .45); }
.ins-filters .ins-site-row, .ins-site-row { display: flex; flex-direction: row; align-items: center; gap: 10px; margin: 0; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: .92rem; color: var(--text); font-weight: 500; }
.ins-site-row:hover { background: var(--accent-soft); }
.ins-site-row input { margin: 0; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.ins-site-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-site-row.all { font-weight: 700; border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; margin-bottom: 4px; }
.ins-filters .ins-sites-apply { margin: 6px 2px 2px; height: 38px; width: calc(100% - 4px); }
@media (max-width: 560px) { .ins-sites-field, .ins-sites summary { width: 100%; } .ins-sites-list { width: 100%; } }
/* Date range picker (mm.js, [data-range]): one button opens a calendar; the two date fields stay in the form, hidden. */
.range-note { display: none; }
.range.range-ready { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.range.range-ready > label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.range.range-ready .range-note { display: block; }
.range-field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 0; font-weight: 550; font-size: .88rem; }
.ins-filters .range-field { gap: 4px; margin: 0; font-weight: 400; font-size: .8rem; color: var(--text-2); }
.range-pop { position: relative; }
.range-pop summary { list-style: none; cursor: pointer; height: 40px; min-width: 210px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--field); color: var(--text); font-size: .88rem; font-weight: 600; user-select: none; white-space: nowrap; }
.range-pop summary::-webkit-details-marker { display: none; }
.range-pop summary svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--text-3); stroke-width: 1.8; stroke-linecap: round; }
.range-field:not(.ins-filters *) .range-pop summary { height: 46px; }
.range-pop[open] summary { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.range-panel { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; padding: 14px; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: 0 24px 48px -16px rgba(10, 10, 40, .45); color: var(--text); }
.range-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.range-hint { font-size: .82rem; font-weight: 600; color: var(--text-2); }
.range-pop .range-panel button { margin: 0; min-height: 0; overflow: visible; box-shadow: none; transform: none; filter: none; white-space: nowrap; }
.range-pop .range-panel button::after { display: none; }
.range-pop button.range-nav { width: 34px; height: 34px; padding: 0; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 1.2rem; line-height: 1; }
.range-pop button.range-nav:hover { background: var(--accent-soft); }
.range-months { display: flex; gap: 22px; }
.range-month { width: 266px; }
.range-title { text-align: center; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.range-grid { display: grid; grid-template-columns: repeat(7, 38px); row-gap: 2px; }
.range-wd { text-align: center; font-size: .72rem; font-weight: 600; color: var(--text-3); padding: 4px 0; }
.range-pop button.range-day { height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: 500 .88rem var(--font-body); cursor: pointer; }
.range-pop button.range-day:not(.edge):not(:disabled):hover { background: var(--accent-soft); }
.range-pop button.range-day.today { box-shadow: inset 0 0 0 1px var(--line-strong); }
.range-pop button.range-day.in { background: var(--accent-soft); border-radius: 0; }
.range-pop button.range-day.edge, .range-pop button.range-day.edge:hover { background: var(--accent); color: #fff; font-weight: 700; }
.range-pop button.range-day.first:not(.last) { border-radius: 10px 0 0 10px; }
.range-pop button.range-day.last:not(.first) { border-radius: 0 10px 10px 0; }
.range-pop button.range-day:disabled { color: var(--text-3); opacity: .45; cursor: default; }
@media (max-width: 639px) { .range-field, .range-pop summary { width: 100%; } .range-panel { left: 0; right: auto; width: min(340px, calc(100vw - 32px)); padding: 10px; }
  .range-month { width: auto; } .range-grid { grid-template-columns: repeat(7, minmax(34px, 1fr)); } }
.ins-story { padding: 4px 4px 0; }
.ins-lead { font-size: 1.25rem; line-height: 1.55; margin: 0; color: var(--text); max-width: 72ch; }
.ins-lead b.up { color: var(--good, #16a34a); }
.ins-lead b.down { color: var(--bad, #dc2626); }
.ins-chart { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 220px; margin: 16px 0 6px; }
.ins-col { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.ins-col span { width: 100%; min-height: 2px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #8c98ff, #3446f2); opacity: .85; }
.ins-col.best span { background: linear-gradient(180deg, #34d399, #059669); opacity: 1; }
.ins-col.weak span { background: linear-gradient(180deg, #fbbf24, #d97706); opacity: 1; }
.ins-spend { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ins-spend polyline { fill: none; stroke: #f97316; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ins-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--text-3); }
.ins-spend.google polyline { stroke: #16a34a; stroke-dasharray: 4 3; }
.ins-notes { margin: 14px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.ins-share { display: grid; gap: 8px; container-type: inline-size; }
/* Share rows: name, bar, share, amount. They follow the box they sit in, not the screen, so the amount never runs
   past a card's edge: in a narrow box the amount moves under the name. */
.ins-share-row { display: grid; grid-template-columns: minmax(0, 120px) minmax(40px, 1fr) 3.4em auto; gap: 10px; align-items: center; }
.ins-share-row > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-share-row > b, .ins-share-row > .small { white-space: nowrap; text-align: right; }
@container (max-width: 420px) {
  .ins-share-row { grid-template-columns: minmax(0, 2fr) minmax(40px, 1fr) 3.4em; row-gap: 2px; }
  .ins-share-row > .small { grid-column: 1 / -1; text-align: left; white-space: normal; overflow-wrap: anywhere; }
}
.ins-brief-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 8px 0 16px; }
.ins-brief-card { padding: 16px 18px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.ins-brief-card h3 { margin: 0 0 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.ins-brief-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ins-brief-card li { display: flex; flex-direction: column; gap: 2px; }
.ins-brief-card li.skip b { color: var(--bad, #dc2626); }
@media (max-width: 600px) { .ins-lead { font-size: 1.05rem; } .ins-chart { height: 160px; gap: 1px; } }

/* Insights: every area at a glance */
.ins-areas { margin: 22px 0; }
.ins-areas-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ins-areas-head h2 { margin: 0; }
.ins-area-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ins-area.wide { grid-column: span 2; }
.ins-area.wide ul { grid-template-columns: 1fr 1fr; column-gap: 18px; }
@media (max-width: 1100px) { .ins-area-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ins-area { --tone: var(--accent); --tone-soft: var(--accent-soft); position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 18px 18px 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  color: inherit; text-decoration: none; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.ins-area::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tone); opacity: .9; }
.ins-area:hover { transform: translateY(-2px); border-color: var(--tone); box-shadow: 0 10px 28px -14px var(--tone); }
.ins-area.good { --tone: var(--good); --tone-soft: var(--good-soft); }
.ins-area.warn { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.ins-area.bad { --tone: var(--bad); --tone-soft: var(--bad-soft); }
.ins-area-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ins-area-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--tone-soft); color: var(--tone); }
.ins-area-title { font-weight: 600; flex: 1; }
.ins-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 4px var(--tone-soft); }
.ins-area-value { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.ins-area ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .86rem; color: var(--text-2); }
.ins-area li { padding-left: 12px; position: relative; }
.ins-area li::before { content: ""; position: absolute; left: 0; top: .55em; width: 5px; height: 5px; border-radius: 50%; background: var(--tone); }
.ins-area-go { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .88rem; color: var(--accent); }
.ins-area:hover .ins-area-go { gap: 9px; }
@media (max-width: 560px) { .ins-area-grid { grid-template-columns: 1fr; } .ins-area.wide { grid-column: auto; } .ins-area.wide ul { grid-template-columns: 1fr; } .ins-area-value { font-size: 1.35rem; } }

/* Orders at a glance */
.ord-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 18px 0; }
.ord-card { margin: 0; }
.ord-card h3 { margin: 0 0 12px; }
.ord-card .ins-share-row { grid-template-columns: minmax(0, 1.3fr) minmax(50px, 1fr) 3.4em auto; }
@container (max-width: 420px) { .ord-card .ins-share-row { grid-template-columns: minmax(0, 2fr) minmax(40px, 1fr) 3.4em; } }
.ord-split { display: flex; height: 18px; border-radius: 999px; overflow: hidden; gap: 3px; margin: 6px 0 14px; }
.ord-split span { display: block; min-width: 4px; }
.ord-split .new, .ord-legend i.new { background: var(--accent); }
.ord-split .back, .ord-legend i.back { background: var(--good); }
.ord-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; }
.ord-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.ord-more > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ord-more > summary::-webkit-details-marker { display: none; }
.ord-more > summary h2 { margin: 0; color: var(--text); }
.ord-more > summary::after { content: "Show"; margin-left: auto; font-size: .85rem; font-weight: 600; color: var(--accent); }
.ord-more[open] > summary::after { content: "Hide"; }
.ord-more[open] > summary { margin-bottom: 14px; }

/* Setup checklist: one card per group, open steps first, done ones folded */
.checklist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.checklist-group { display: grid; gap: 12px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); scroll-margin-top: 24px; }
.checklist-group header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.checklist-group h3 { margin: 0; font: 750 1.05rem/1.2 var(--font-display); letter-spacing: -0.02em; }
.checklist-done summary { cursor: pointer; font-size: .82rem; font-weight: 650; color: var(--text-2); }
.checklist-done[open] summary { margin-bottom: 10px; }
.module-steps li.check .step-dot { border-color: var(--warn); color: var(--warn); font: 800 .7rem/1 var(--font-body); }
.module-steps li.extra .step-dot { border-style: dashed; }
.module-steps .badge { font-size: .66rem; padding: 1px 7px; justify-self: start; margin: 2px 0; }

/* ---------- Currency: each shop and ad account in its own currency, totals in the base ---------- */
.fx-pick fieldset { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.fx-pick label { flex: 1 1 240px; margin: 0; }
.fx-pick button { margin: 0; }
#currency .fx-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.fx-src { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.fx-src .fx-kind { grid-column: 1 / -1; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.fx-src b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-src .fx-cur { font: 700 .95rem var(--font-mono); color: var(--accent-strong); }
.fx-src .fx-rate { grid-column: 1 / -1; font-size: .78rem; color: var(--text-2); }
.fx-src .fx-wait { color: var(--warn); }
.fx-meta { border-left: 3px solid #1877f2; }
.fx-google { border-left: 3px solid #fbbc04; }
.fx-tiktok { border-left: 3px solid #ff0050; }
.fx-shop { border-left: 3px solid var(--good); }
.fx-orig { margin-top: 14px; }
.fx-orig summary { cursor: pointer; font-size: .85rem; font-weight: 650; color: var(--text-2); }

/* the way back into the setup wizard (app/wizard_routes.py keeps where the person was) */
.wizard-back { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 14px 18px; border-radius: 18px; text-decoration: none;
  color: #fff; background: linear-gradient(135deg, #3446f2, #8b5cf6); box-shadow: 0 14px 32px -18px rgba(52, 70, 242, .9); position: sticky; top: calc(var(--top-h, 68px) + 10px); z-index: 30; }
.wizard-back:hover { filter: brightness(1.07); color: #fff; }
.wizard-back .wb-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .22); font-weight: 700; }
.wizard-back .wb-step { opacity: .85; margin-left: 6px; }
@media (max-width: 720px) { .wizard-back .wb-step { display: block; margin-left: 0; } }

/* Setup center, symmetric layout (2026-10-07): every section on one even grid, equal card heights per row,
   long lists folded. Checklist = one aligned row per group; modules = same blocks in the same place on every card. */
.setup-section-head { align-items: flex-end; }
.checklist-list { display: grid; gap: 10px; }
.checklist-row { border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); scroll-margin-top: 24px; }
.checklist-row > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 34px minmax(170px, 1fr) minmax(0, 1.6fr) 210px 16px; align-items: center; gap: 18px; padding: 14px 20px; min-height: 64px; }
.checklist-row > summary::-webkit-details-marker { display: none; }
.checklist-row > summary:hover .cl-name b { text-decoration: underline; }
.cl-state { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; font: 800 .95rem/1 var(--font-display); color: #fff; background: var(--t-sun, #f59e0b); }
.checklist-row.is-done .cl-state { background: var(--good); }
.checklist-row.is-extra .cl-state { background: var(--surface-2); color: var(--text-2); border: 1px dashed var(--line-strong); }
.cl-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cl-name b { font: 750 1rem/1.2 var(--font-display); letter-spacing: -0.01em; }
.cl-next { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-meter { display: grid; grid-template-columns: minmax(0, 1fr) 54px; align-items: center; gap: 10px; }
.cl-meter b { font-size: .82rem; text-align: right; white-space: nowrap; }
.cl-chev { color: var(--text-3); transition: transform .2s ease; }
.checklist-row[open] .cl-chev { transform: rotate(180deg); }
.checklist-row[open] > summary { border-bottom: 1px solid var(--line); }
.cl-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; padding: 16px 20px 18px 72px; }

.module-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
.module-card { gap: 16px; }
.module-card header { min-height: 50px; }
.module-tagline { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(3 * 1.5em); line-height: 1.5; }
.module-ready { display: grid; gap: 0; }
.module-ready-note { margin-top: 8px; font-weight: 600; }
.module-meter.is-empty span { width: 0; }
.module-more { border-top: 1px dashed var(--line-strong); padding-top: 12px; }
.module-more > summary { cursor: pointer; font-size: .82rem; font-weight: 650; color: var(--text-2); }
.module-more[open] > summary { margin-bottom: 10px; }
.module-more .module-plugs { border-top: 0; padding-top: 10px; }
.module-card footer { border-top: 1px solid var(--line); padding-top: 14px; min-height: 52px; }

.country-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.country-card { container-type: inline-size; }
@container (min-width: 620px) {
  .country-card dl { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .country-card dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); }
}

.group-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.group-body { height: 100%; grid-template-rows: auto auto 1fr; }
.group-next { align-self: end; }
.calendar-form > .actions { margin-top: 18px; }

.own-mine .own-days { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.own-mine .own-days li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.own-more { margin-top: 4px; border-top: 1px solid var(--line); }
.own-more > summary { cursor: pointer; padding: 12px 0 0; font-weight: 650; color: var(--accent-strong, var(--accent)); }
.own-more[open] > summary { padding-bottom: 6px; }

@media (max-width: 1180px) {
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checklist-row > summary { grid-template-columns: 34px minmax(0, 1fr) 170px 16px; }
  .cl-next { display: none; }
}
@media (max-width: 900px) {
  .own-mine .own-days { grid-template-columns: minmax(0, 1fr); }
  .own-mine .own-days li:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .group-grid, .module-grid { grid-template-columns: minmax(0, 1fr); }
  .module-tagline { min-height: 0; }
  .checklist-row > summary { grid-template-columns: 34px minmax(0, 1fr) 16px; gap: 12px; padding: 12px 14px; }
  .cl-meter { grid-column: 2 / 3; grid-row: 2; }
  .cl-chev { grid-column: 3; grid-row: 1; }
  .cl-steps { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 16px; }
}
.checklist-row > summary { color: var(--text); }
@media (max-width: 600px) { .payday-row select { flex: 1 1 100%; width: 100%; min-width: 0; max-width: 100%; } }

/* Guided flows (templates/_flows.html): Settings and Setup start each add or connect action as a wizard flow */
.flow-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.flow-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--line-strong);
  background: var(--surface-solid); color: var(--text); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.flow-tile:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -20px rgba(40, 50, 140, .55); color: var(--text); }
.flow-tile .module-ico { width: 40px; height: 40px; border-radius: 13px; }
.flow-tile b { display: block; font: 700 .98rem/1.2 var(--font-display); }
.flow-tile small { display: block; color: var(--text-2); font-size: .8rem; line-height: 1.3; margin-top: 2px; }
@media (max-width: 1100px) { .flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .flow-grid { grid-template-columns: minmax(0, 1fr); } }

/* Business Insight and Ads Insight: one layout for every overview (app/hub.py, hub.html).
   1 key numbers (four equal tiles), 2 one chart, 3 folded details, 4 what to do. */
.hub-part { display: grid; gap: 12px; margin-bottom: 18px; }
.hub-lead { margin: 0; font-size: 1.02rem; color: var(--text-2); max-width: 900px; }
.kpis.hub-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.hub-tiles .kpi { min-height: 132px; justify-content: space-between; }
.kpis.hub-tiles .value { font-size: clamp(1.5rem, 2.3vw, 2.3rem); }
:root[data-theme="light"] .kpis.hub-tiles > .kpi:nth-child(1) { background: var(--t-ink); }
:root[data-theme="light"] .kpis.hub-tiles > .kpi:nth-child(2) { background: var(--t-violet); }
:root[data-theme="light"] .kpis.hub-tiles > .kpi:nth-child(3) { background: var(--t-cyan); }
:root[data-theme="light"] .kpis.hub-tiles > .kpi:nth-child(4) { background: var(--t-blue); }
.hub-vs { font-weight: 500; opacity: .75; }
@media (max-width: 900px) { .kpis.hub-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.hub-chart-card, .hub-details { margin-bottom: 18px; }
.sw.p0, .hub-stack .p0, .hub-bar { background: linear-gradient(180deg, #8c98ff, #3446f2); }
.sw.p1, .hub-stack .p1 { background: linear-gradient(180deg, #4ade80, #16a34a); }
.sw.p2, .hub-stack .p2 { background: linear-gradient(180deg, #f472b6, #db2777); }
.sw.line { height: 3px; border-radius: 2px; background: #f97316; }
.hub-chart { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 230px; margin: 18px 0 6px; }
.hub-col { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.hub-bar, .hub-stack { width: 100%; min-height: 2px; border-radius: 6px 6px 2px 2px; opacity: .9; }
.hub-stack { display: flex; flex-direction: column-reverse; overflow: hidden; }
.hub-stack i { display: block; min-height: 1px; }
.hub-col:hover .hub-bar, .hub-col:hover .hub-stack { opacity: 1; filter: brightness(1.12); }
.hub-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hub-line polyline { fill: none; stroke: #f97316; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.hub-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--text-3); }
.hub-notes { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .86rem; color: var(--text-2); }
.hub-quiet { margin: 16px 0; }
.hub-ranked { display: grid; gap: 8px; margin-top: 16px; }
.hub-rank-row { display: grid; grid-template-columns: minmax(120px, 230px) minmax(0, 1fr) 90px; gap: 12px; align-items: center; font-size: .86rem; }
.hub-rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-rank-track { height: 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.hub-rank-bar { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #34d399, #059669); }
.hub-rank-bar.neg { background: linear-gradient(90deg, #fb7185, #e11d48); }
.hub-rank-row b { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.hub-rank-row b.down { color: var(--bad); }

.hub-details .card-head { margin-bottom: 4px; }
.hub-fold { border-top: 1px solid var(--line-strong); }
.hub-fold:first-of-type { border-top: 0; }
.hub-fold summary { list-style: none; display: grid; grid-template-columns: 38px minmax(0, 1fr) 22px; gap: 12px; align-items: center; padding: 14px 2px; cursor: pointer; }
.hub-fold summary::-webkit-details-marker { display: none; }
.hub-fold-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); }
.hub-fold-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hub-fold-text span { font-size: .86rem; color: var(--text-2); }
.hub-fold-chev { color: var(--text-3); transition: transform .2s ease; display: grid; place-items: center; }
.hub-fold[open] .hub-fold-chev { transform: rotate(180deg); }
.hub-fold-body { padding: 0 2px 16px 50px; }
.hub-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hub-rows li { display: grid; grid-template-columns: minmax(110px, 220px) minmax(0, 1fr) minmax(90px, auto); grid-template-areas: "name bar value" "name note note"; gap: 2px 14px; align-items: center; }
.hub-row-name { grid-area: name; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.hub-row-bar { grid-area: bar; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.hub-row-bar span { display: block; height: 100%; border-radius: inherit; background: var(--aurora); }
.hub-rows li.good .hub-row-bar span { background: linear-gradient(90deg, #34d399, #059669); }
.hub-rows li.bad .hub-row-bar span { background: linear-gradient(90deg, #fb7185, #e11d48); }
.hub-rows li.warn .hub-row-bar span { background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.hub-row-value { grid-area: value; text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .9rem; }
.hub-rows li.bad .hub-row-value { color: var(--bad); }
.hub-row-note { grid-area: note; font-size: .78rem; color: var(--text-3); }
.hub-more { display: inline-flex; gap: 6px; margin-top: 12px; font-size: .86rem; font-weight: 600; }

.hub-part-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.hub-part-head h2 { margin: 0; }
.hub-todos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hub-todo { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.hub-todo::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--info); }
.hub-todo.bad::before { background: var(--bad); } .hub-todo.warn::before { background: var(--warn); } .hub-todo.good::before { background: var(--good); }
.hub-todo-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hub-chip { font-size: .72rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.hub-todo h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
.hub-why, .hub-do { margin: 0; font-size: .86rem; color: var(--text-2); }
.hub-todo .hub-more { margin-top: auto; padding-top: 4px; }
@media (max-width: 1100px) { .hub-todos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .hub-todos { grid-template-columns: 1fr; }
  .hub-fold-body { padding-left: 2px; }
  .hub-rows li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name value" "bar bar" "note note"; }
  .hub-chart { height: 170px; gap: 1px; }
  .hub-rank-row { grid-template-columns: minmax(0, 1fr) 70px; } .hub-rank-track { grid-column: 1 / -1; grid-row: 2; }
}
/* Quick look (Business Insight overview): one small graph per tab, two wide cards then three, phone: one column */
.hub-glance { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.hub-gl { grid-column: span 2; display: flex; flex-direction: column; gap: 12px; margin: 0; color: inherit; text-decoration: none; min-width: 0; transition: transform .18s ease, box-shadow .18s ease; }
.hub-gl-profit, .hub-gl-orders { grid-column: span 3; }
.hub-gl:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.hub-gl-head { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.hub-gl-title { display: flex; flex-direction: column; min-width: 0; }
.hub-gl-title b { font: 700 1.02rem/1.2 var(--font-display); }
.hub-gl-title span { font-size: .78rem; color: var(--text-3); }
.hub-gl-go { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); font-weight: 700; transition: background .18s ease, color .18s ease; }
.hub-gl:hover .hub-gl-go { background: var(--text); color: var(--bg); }
.hub-gl-figure { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hub-gl-value { font: 800 clamp(1.5rem, 2.2vw, 2rem)/1.05 var(--font-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.hub-gl-value.error { color: var(--bad); }
.hub-gl-label { font-size: .84rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-gl-empty { margin: 4px 0; font-size: .88rem; }
.hub-gl-take { margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--line-strong); font-size: .88rem; color: var(--text-2); line-height: 1.45; }
.hub-gl .t0, .hub-gl-bars .hub-gl-track span, .hub-gl-week span { background: linear-gradient(180deg, #8c98ff, #3446f2); }
.hub-gl .t1 { background: linear-gradient(180deg, #4ade80, #16a34a); }
.hub-gl .t2 { background: linear-gradient(180deg, #f472b6, #db2777); }
.hub-gl .t3 { background: linear-gradient(180deg, #a5aecb, #6b7198); }
.hub-gl .t4 { background: linear-gradient(180deg, #fcd34d, #f59e0b); }
.hub-gl-split { display: flex; gap: 3px; height: 18px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.hub-gl-split i { display: block; min-width: 4px; }
.hub-gl-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .84rem; }
.hub-gl-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.hub-gl-legend .sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.hub-gl-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.hub-gl-legend b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.hub-gl-ringrow { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; }
.hub-gl-ring { position: relative; width: 96px; height: 96px; display: grid; place-items: center; }
.hub-gl-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(#16a34a 0 calc(var(--a) * 1%), #3446f2 0 100%);
  -webkit-mask: radial-gradient(circle, transparent 0 57%, #000 58%); mask: radial-gradient(circle, transparent 0 57%, #000 58%); }
.hub-gl-ring span { position: relative; font: 800 1.15rem/1 var(--font-display); }
.hub-gl-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.hub-gl-bars li { display: grid; grid-template-columns: minmax(0, 1fr) 44px; grid-template-areas: "name value" "bar bar"; gap: 3px 8px; align-items: center; font-size: .82rem; }
.hub-gl-name { grid-area: name; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.hub-gl-bars li.hot .hub-gl-name { color: var(--text); font-weight: 600; }
.hub-gl-track { grid-area: bar; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.hub-gl-track span { display: block; height: 100%; border-radius: inherit; opacity: .55; }
.hub-gl-bars li.hot .hub-gl-track span { opacity: 1; }
.hub-gl-bars b { grid-area: value; text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.hub-gl-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; height: 120px; align-items: end; }
.hub-gl-week div { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 4px; min-width: 0; }
.hub-gl-week span { display: block; border-radius: 6px 6px 2px 2px; opacity: .4; }
.hub-gl-week div.hot span { opacity: 1; background: linear-gradient(180deg, #4ade80, #16a34a); }
.hub-gl-week i { font-style: normal; font-size: .7rem; color: var(--text-3); text-align: center; overflow: hidden; }
.hub-gl-week div.hot i { color: var(--text); font-weight: 700; }
.hub-gl ul.hub-gl-legend, .hub-gl ul.hub-gl-bars { padding: 0; margin: 0; } .hub-gl ul.hub-gl-legend li, .hub-gl ul.hub-gl-bars li { margin: 0; padding: 0; }
@media (max-width: 1100px) { .hub-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hub-gl, .hub-gl-profit, .hub-gl-orders { grid-column: span 1; } .hub-gl-profit { grid-column: 1 / -1; } }
@media (max-width: 640px) { .hub-glance { grid-template-columns: minmax(0, 1fr); gap: 12px; } .hub-gl-profit { grid-column: auto; } }
.hub-empty { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.hub-empty > div { flex: 1 1 260px; } .hub-empty h2 { margin: 0 0 4px; }
.hub-empty-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); }
.hub-foot { margin-top: 8px; }

/* ---- AI Customer Service (support_*.html) ---- */
.sv-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.sv-filters .chip { text-decoration: none; }
.sv-filters .chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.sv-n { font-size: .75rem; opacity: .7; margin-left: 2px; }
.sv-inbox { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.sv-list { padding: 6px; max-height: 76vh; overflow: auto; }
.sv-list ul { list-style: none; margin: 0; padding: 0; }
.sv-list li a { display: flex; gap: 12px; padding: 12px; border-radius: 14px; color: inherit; text-decoration: none; }
.sv-list li a:hover { background: var(--surface-2); }
.sv-list li.on a { background: var(--accent-soft); }
.sv-ava { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--tone-aurora, #6d7cff); }
.sv-ava.k-messenger { background: linear-gradient(135deg, #4f8cff, #a43cff); }
.sv-ava.k-instagram { background: linear-gradient(135deg, #feda75, #d62976 55%, #4f5bd5); }
.sv-ava.k-whatsapp { background: linear-gradient(135deg, #5af07a, #128c7e); }
.sv-ava.k-email { background: linear-gradient(135deg, #64748b, #1e293b); }
.sv-row { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.sv-top { display: flex; justify-content: space-between; gap: 8px; }
.sv-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-top time { flex: none; font-size: .75rem; color: var(--text-3); }
.sv-sub { font-size: .85rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sv-tags .badge { font-size: .7rem; }
.sv-conv { min-height: 60vh; display: flex; flex-direction: column; gap: 14px; }
.sv-back { display: none; }
.sv-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.sv-head h2 { margin: 0; }
.sv-head p { margin: 4px 0 0; }
.sv-alert { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); margin: 0; }
.sv-log { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface-2); max-height: 46vh; overflow: auto; }
.sv-msg { display: flex; flex-direction: column; max-width: 78%; }
.sv-msg.out { align-self: flex-end; align-items: flex-end; }
.sv-bubble { padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; background: var(--surface-solid); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.sv-msg.out .sv-bubble { background: var(--accent); color: var(--on-accent); border-color: transparent; border-radius: 16px; border-bottom-right-radius: 4px; }
.sv-meta { font-size: .72rem; color: var(--text-3); margin-top: 3px; }
.sv-draft { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; border: 1.5px dashed var(--accent); background: var(--accent-soft); }
.sv-draft-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.sv-draft-head b { display: inline-flex; gap: 6px; align-items: center; }
.sv-draft textarea { width: 100%; margin: 0; }
.sv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sv-actions button { display: inline-flex; gap: 6px; align-items: center; }
.sv-why summary { cursor: pointer; font-size: .85rem; color: var(--text-2); }
.sv-why ul { margin: 8px 0 0; padding-left: 18px; font-size: .85rem; color: var(--text-2); }
.sv-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.sv-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 48px 16px; color: var(--text-2); min-height: 30vh; }
.sv-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.sv-card .card-head h2 { display: inline-flex; gap: 8px; align-items: center; }
.sv-chan { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin: 0 0 10px; }
.sv-chan .muted { flex: 1 1 160px; }
.sv-steps { margin: 6px 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.sv-steps li.done { color: var(--text-2); }
.sv-steps li.done b { color: var(--good); }
.sv-steps select, .sv-steps input { margin: 6px 0 0; }
.sv-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.sv-inline select { flex: 1 1 200px; margin: 0; }
.sv-code { white-space: pre-wrap; overflow-wrap: anywhere; font: .8rem var(--font-mono); padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.sv-switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.sv-switch { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.sv-switch input { width: auto; margin: 3px 0 0; }
.sv-switch > span { display: flex; flex-direction: column; gap: 2px; }
.sv-switch.off { opacity: .6; cursor: default; }
.sv-room { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; background: var(--info-soft); color: var(--text); margin: 8px 0 0; }
.sv-meter { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 4px 0 10px; }
.sv-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #34d399, #047857); }
@media (max-width: 900px) {
  .sv-inbox { grid-template-columns: minmax(0, 1fr); }
  .sv-inbox.has-conv .sv-list { display: none; }
  .sv-inbox:not(.has-conv) .sv-conv { display: none; }
  .sv-back { display: inline-block; }
  .sv-cards { grid-template-columns: minmax(0, 1fr); }
  .sv-msg { max-width: 92%; }
}

/* ---- Stock & Supply (app/templates/supply_*.html) ---- */
.sp-kpi { text-decoration: none; color: inherit; }
.sp-kpi.on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), var(--shadow); }
.sp-search input { margin: 0; min-width: 200px; }
.sp-table td { vertical-align: middle; }
.sp-lasts { min-width: 150px; white-space: nowrap; }
.sp-lasts .small { margin-left: 8px; }
.sp-runway { position: relative; display: inline-block; width: 96px; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); vertical-align: middle; overflow: visible; }
.sp-runway-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--good); }
.sp-runway.warn .sp-runway-fill { background: var(--warn); }
.sp-runway.bad .sp-runway-fill { background: var(--bad); }
.sp-runway.plain .sp-runway-fill { background: var(--text-2); opacity: .5; }
.sp-runway-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: var(--text); opacity: .65; }
.sp-item-runway .sp-runway { width: 100%; height: 14px; margin: 6px 0 12px; }
.sp-big-badge { font-size: .85rem; padding: 6px 14px; }
.sp-h3 { margin: 16px 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.sp-inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 8px 0; }
.sp-inline-form input, .sp-inline-form select, .sp-inline-form label { margin: 0; width: auto; flex: 1 1 140px; }
.sp-inline-form button { flex: 0 0 auto; }
.sp-qty { width: 90px !important; min-width: 0; margin: 0; padding: 6px 8px; }
.sp-return { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.sp-return-line { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 6px 0; }
.sp-return-line > span { flex: 1 1 200px; }
.sp-return-line label { flex: 0 0 140px; margin: 0; }
.sp-shop { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.sp-shop:first-of-type { border-top: 0; }
.sp-shop > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.sp-shop-do { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sp-basket-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 0; }
.sp-basket-foot button { margin-left: auto; }
.sp-extra td { opacity: .78; }
.sp-whatif { margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.sp-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0 0 16px; counter-reset: none; }
.sp-steps li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-weight: 600; font-size: .85rem; }
.sp-steps li span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); font-size: .75rem; }
.sp-steps li.done { color: var(--text); }
.sp-steps li.done span { background: var(--good); border-color: var(--good); color: #fff; }
.sp-steps li.now { border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--text); }
.sp-row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sp-vendors { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 18px; }
.sp-vendor { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.sp-vendor:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.sp-vendor.off { opacity: .6; }
.sp-vendor-top { display: flex; align-items: center; gap: 8px; }
.sp-vendor-top b { font-size: 1.05rem; }
.sp-score { margin-left: auto; flex: none; white-space: nowrap; display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 8px; border-radius: 14px; font-weight: 800; font-size: .95rem; background: var(--surface-2); border: 1px solid var(--line); }
.sp-score.good { background: var(--good-soft); color: var(--good); }
.sp-score.warn { background: var(--warn-soft); color: var(--warn); }
.sp-score.bad { background: var(--bad-soft); color: var(--bad); }
.sp-score.big { min-width: 64px; height: 64px; font-size: 1.4rem; border-radius: 20px; }
.sp-change { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.sp-change:first-of-type { border-top: 0; }
.sp-track { list-style: none; display: flex; padding: 0; margin: 14px 0 10px; }
.sp-track li { flex: 1; position: relative; text-align: center; font-size: .76rem; color: var(--text-2); }
.sp-track li i { display: block; width: 14px; height: 14px; margin: 0 auto 6px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line); position: relative; z-index: 1; }
.sp-track li::before { content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.sp-track li:first-child::before { display: none; }
.sp-track li.done i { background: var(--good); border-color: var(--good); }
.sp-track li.done::before, .sp-track li.now::before { background: var(--good); }
.sp-track li.now i { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.sp-track li.now span { color: var(--text); font-weight: 700; }
.sp-ship.late { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.sp-events { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 4px; }
.sp-modes { margin-bottom: 12px; }
.sp-tabs { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.sp-tabs a { padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; text-decoration: none; color: var(--text-2); }
.sp-tabs a.on { background: var(--accent); color: var(--on-accent, #fff); }
.sp-fold-table > summary { cursor: pointer; font-weight: 600; margin: 6px 0; }
.sp-count .sp-scan-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.sp-count .sp-scan-form input { flex: 1 1 180px; margin: 0; font-size: 1.1rem; padding: 12px 14px; }
.sp-scan { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: #000; aspect-ratio: 4 / 3; max-height: 50vh; margin-bottom: 10px; }
.sp-scan video { width: 100%; height: 100%; object-fit: cover; }
.sp-scan-frame { position: absolute; inset: 30% 12%; border: 2px solid rgba(255, 255, 255, .85); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .25); }
.sp-found { margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.crumbs { margin: 0 0 4px; font-size: .8rem; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a::after { content: " ›"; }
@media (max-width: 720px) {
  .sp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-basket-foot button { margin-left: 0; width: 100%; }
  .sp-track li span { font-size: .66rem; }
  .sp-search input { min-width: 0; }
}

/* ===== Polish round 2026-10-09: alignment, spacing and calmer presentation on every page ===== */
/* Top bar: the language picker and the account button sit on the same line as the search and Ask GV Brain */
.gv-top-right details, .gv-top details { margin-top: 0; }
.switcher .who { min-width: 0; overflow: hidden; }
.switcher .meta, .switcher .who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* KPI tiles: values line up across a row even when one label runs to two lines */
.kpi .label { min-height: 2.5em; align-items: flex-start; line-height: 1.25; }
.kpis.compact .kpi .label { min-height: 0; }
.kpi .value { font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums; }
:root[data-theme="light"] .kpi .value.small, :root[data-theme="light"] .kpi .value.word { font-size: 1.3rem; white-space: normal; letter-spacing: -0.01em; line-height: 1.2; }
:root[data-theme="light"] .kpi .delta { max-width: 100%; border-radius: 12px; line-height: 1.35; hyphens: auto; }
/* Text in number tables is set in the body font; only the numbers keep the even-width digits */
table.numbers td .badge, table.numbers td .tag, table.numbers td .muted { font-family: var(--font-body); }
/* Cards inside a form keep the same spacing as cards on the page */
.content > form:not(.inline):not(.card):not(.actions):not(.row) { display: flex; flex-direction: column; gap: 24px; margin: 0; }
.content > form:not(.inline):not(.card):not(.actions):not(.row) > .actions:last-child, .content > form:not(.inline):not(.card):not(.actions):not(.row) > button:last-child { align-self: flex-start; }
/* Label + field + button rows: the button sits on the field's line, not the label's */
form.actions:has(> label), .actions:has(> label > select), .actions:has(> label > input) { align-items: flex-end; }
.actions > label { margin: 0; }
/* Numbered steps with several lines of text: the number sits at the top, next to the title */
.step { align-items: flex-start; }
.step .tick { margin-top: 1px; }
/* Module tabs: fade at the edge when more tabs are off-screen */
.gv-tabs.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
/* "On this page" chips: no band across the whole page behind them */
.onpage { width: max-content; max-width: calc(100% + 16px); }
/* File pickers inside a drop zone: one dashed box, not two */
.dropzone input[type=file] { border: 0 !important; background: transparent !important; padding: 0; }
/* Action cards: the colour stripe is straight, not bent by the round corners */
.hub-todo::before { top: 18px; bottom: 18px; border-radius: 0 4px 4px 0; }
/* Cards next to each other end at the same height */
.sv-cards { align-items: stretch; }
.sv-room > svg { flex: none; margin-top: 3px; }
/* Ideas: no stray divider above each idea title */
.creative h3, .card .creative h3 { border-top: 0; padding-top: 0; margin-top: 0; }
.creative .actions select { border-radius: 999px !important; min-height: 40px; }
/* Ad image strips keep their space while the picture loads */
.ad-strip figure { background: var(--surface-2); border-radius: 16px; min-width: 120px; }
/* Budget bars in tables: text stays on one line */
td:has(> .minibar) { white-space: nowrap; }
.page-head .actions > form { margin: 0; }
@media (max-width: 600px) {
  .page-head .actions > form { flex: 1 1 auto; }
  .page-head .actions > form button { width: 100%; }
  .switcher .meta { display: none; }
}
/* Number tables: words in the body font, numbers with even-width digits (mono only where it is a code) */
table.numbers td { font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.proposal .effect, .proposal-top .effect { font-family: var(--font-body); font-variant-numeric: tabular-nums; }
/* Audit log: the time stays on one line */
table.audit td.when { white-space: nowrap; }
/* Settings: the small section titles have no half-width line above them */
.card .lc-sub h3 { border-top: 0; padding-top: 0; }
.card .lc-sub { border-top: 1px solid var(--line); padding-top: 18px; }
/* Form grids: fields line up at the bottom even when a label runs to two lines; six fields make 3 + 3 */
.grid { align-items: end; }
@media (min-width: 861px) { .grid:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Meta setup: text starts at the top, next to the permissions list */
.meta-hero { align-items: start; }
/* Setup & modules: every card's parts (title, text, readiness, details, switch) line up across a row */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 861px) { .module-card { display: grid; grid-row: span 5; grid-template-rows: subgrid; align-content: start; } .module-card > footer { margin-top: 0; } }
}
.own-actions .small-btn, .own-actions summary.btn { min-height: 34px; height: 34px; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; }
/* Text on a colour tile stays readable */
:root[data-theme="light"] .kpi .muted { color: rgba(255, 255, 255, .78); }
@media (max-width: 600px) {
  /* KPI tiles: two per row on phones in the light look too */
  :root[data-theme="light"] .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  :root[data-theme="light"] .kpis:not(:has(> .kpi:nth-child(3):last-child)):not(:has(> .kpi:nth-child(5):last-child)) > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* Tables that turn into cards: column name on top, the value under it, nothing cut off */
  table.audit:not(.numbers) td[data-label] { display: block; text-align: left; padding: 4px 14px; }
  table.audit:not(.numbers) td[data-label]::before { content: attr(data-label); display: block; max-width: none; margin-bottom: 2px; font-size: .7rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
  table.audit:not(.numbers) td[colspan]::before { display: none; }
  table.audit:not(.numbers) .badge { white-space: normal; }
  .tbl-scroll:has(> table.audit:not(.numbers)) { overflow: visible; }
  .proposal-top .effect { width: auto; align-self: flex-start; text-align: left; }
  .lc-card .lc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats:has(> :nth-child(3):last-child) > :last-child { grid-column: 1 / -1; }
  .meta-scopes code.val { display: none; }
}
/* Warnings: the badge sits in its own column, the title and text line up next to it */
ul.flags li.flag-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
ul.flags li.flag-row > .badge { margin: 1px 0 0; }
.plan-list li.plan-fold { border-left-color: var(--line-strong); }
.plan-list li.plan-fold details { margin: 0; }
.plan-list li.plan-fold summary { font-size: .82rem; }
.plan-list li.plan-fold .plan-list { margin-top: 10px; }
details.fold-more { margin-top: 14px; }
details.fold-more > summary { font-size: .86rem; color: var(--text-2); }
details.fold-more[open] > summary { margin-bottom: 8px; }
/* The logo cubes in a page's hero no longer dip into the tiles under it */
.hero-banner .pods-visual { margin-bottom: 0; }
/* Form grids never leave one field alone on a row: 4 fields make 4 or 2 + 2, 7-8 make two rows of 4 */
@media (min-width: 861px) {
  .grid:has(> :nth-child(4):last-child), .grid:has(> :nth-child(8):last-child), .grid:has(> :nth-child(7):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-2 .grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .look-form .grid-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 601px) and (max-width: 860px) { .grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.swatch-input input[type=color] { height: 46px; }
.grid-even:has(> label > textarea) { align-items: start; }
/* Notices: one sentence stays one sentence (bold words no longer split it into columns) */
p.ok, p.error { display: block; position: relative; padding-left: 46px; }
p.ok::before, p.error::before { position: absolute; left: 16px; top: 13px; margin: 0; }
/* Lists in the module overviews start where the card's text starts */
.card ul.hub-notes, .card ul.hub-rows { padding-left: 0; margin: 12px 0 0; }
.card ul.hub-rows { margin: 0; }
/* Tables that scroll sideways show a soft shadow at the edge, so you can see there is more */
.scroll { max-width: 100%; -webkit-overflow-scrolling: touch;
  background: linear-gradient(90deg, var(--surface) 30%, transparent) left / 40px 100% no-repeat local,
              linear-gradient(270deg, var(--surface) 30%, transparent) right / 40px 100% no-repeat local,
              radial-gradient(farthest-side at 0 50%, rgba(10, 10, 30, .14), transparent) left / 14px 100% no-repeat scroll,
              radial-gradient(farthest-side at 100% 50%, rgba(10, 10, 30, .14), transparent) right / 14px 100% no-repeat scroll; }
/* Date filters: quick ranges, dates, sites and Show sit on one line on wide screens */
@media (min-width: 1100px) { .ins-presets { flex-basis: auto; margin-right: auto; align-self: center; } }
/* Two cards side by side with the same size */
.grid-2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.grid-2.even > .card, .grid-2.even > * > .card { height: 100%; }
@media (max-width: 860px) { .grid-2.even { grid-template-columns: minmax(0, 1fr); } }
/* Weather: the week fills the row */
@media (min-width: 861px) { .weather-days { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); } }
@media (max-width: 600px) { .weather-days { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 30%; overflow-x: auto; scrollbar-width: none; } }
/* Weather: each day's outcome, and why (app/market_days.py) */
.wx-card { --wx-weather: #5cc8f0; --wx-weekday: #a78bfa; --wx-pay: #fbbf4a; --wx-holiday: #f472b6; }
:root[data-theme="light"] .wx-card { --wx-weather: #22a6d6; --wx-weekday: #8b5cf6; --wx-pay: #e0a21a; --wx-holiday: #ec4899; }
.wx-head-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wx-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2, rgba(127,127,127,.1)); }
.wx-card .wx-switch button { min-height: 0; font: inherit; font-size: .82rem; font-weight: 600; border: 0; background: none; color: var(--text-2); padding: 5px 14px; border-radius: 999px; cursor: pointer; box-shadow: none; }
.wx-card .wx-switch button:hover { transform: none; filter: none; box-shadow: none; color: var(--text); background: none; }
.wx-card .wx-switch button[aria-pressed="true"], .wx-card .wx-switch button[aria-pressed="true"]:hover { background: var(--surface-solid); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); }
.wx-card button.weather-day { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; min-height: 0; white-space: normal; overflow: visible; font: inherit; color: var(--text); text-align: left; cursor: pointer; border: 1px solid transparent; border-radius: 14px; gap: 6px; padding: 10px 10px 12px; background: var(--surface-2, rgba(127,127,127,.08)); box-shadow: none; filter: none; }
.wx-card button.weather-day:hover { background: var(--surface-2, rgba(127,127,127,.08)); color: var(--text); transform: translateY(-1px); box-shadow: none; filter: none; border-color: var(--line-strong); }
.wx-card button.weather-day::before, .wx-card button.weather-day::after, .wx-switch button::before, .wx-switch button::after { content: none; }
.wx-card .weather-day[aria-expanded="true"] { border-color: var(--accent); }
.wx-card .weather-day:focus-visible, .wx-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wx-sky { display: flex; gap: 6px; align-items: center; font-size: .8rem; color: var(--text-2); }
.wx-out { display: block; white-space: nowrap; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.wx-card .up { color: var(--good); } .wx-card .down { color: var(--bad); } .wx-card .flat { color: var(--text-3); }
.wx-card .v-profit { display: none; } .wx-card.show-profit .v-profit { display: block; } .wx-card.show-profit .v-sales { display: none; }
.wx-bar { display: flex; gap: 2px; height: 6px; border-radius: 99px; overflow: hidden; background: var(--line); }
.wx-bar i { display: block; height: 100%; }
.wx-why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 14px; padding: 16px; border-radius: 14px; background: var(--surface-2, rgba(127,127,127,.08)); }
.wx-why[hidden] { display: none; }
.wx-why > div { display: grid; gap: 8px; align-content: start; min-width: 0; }
.wx-factor { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: .88rem; }
.wx-track { grid-column: 1 / -1; position: relative; height: 6px; border-radius: 99px; background: var(--line); }
.wx-fill { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
.wx-mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--text-3); }
.wx-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.wx-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.wx-dots i { width: 13px; height: 13px; border-radius: 50%; background: currentColor; }
@media (max-width: 600px) { .wx-why { grid-template-columns: minmax(0, 1fr); } .wx-card .weather-days { grid-auto-columns: 34%; } }
/* Vendors fill the row */
.sp-vendors { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
/* Days with no sales show no stub bar */
.hub-bar[style="height: 0.0%"], .hub-stack[style="height: 0.0%"] { min-height: 0; }
/* Small forms in a row: fields first, the button right after them, all on one line */
form.row { justify-content: flex-start; align-items: flex-end; }
form.row > label { flex: 0 1 320px; margin: 0; }
.sp-inline-form label > input, .sp-inline-form label > select { width: 100%; }
/* Show and Hide on the order folds in the page's language */
.ord-more > summary[data-show]::after { content: attr(data-show); }
.ord-more[open] > summary[data-hide]::after { content: attr(data-hide); }
/* Overview section titles have the same size as card titles */
.hub-part-head h2 { font-size: 1.45rem; letter-spacing: -.04em; }
/* Demo badge never wraps on its own */
.page-head .badge { white-space: nowrap; }
@media (max-width: 600px) {
  /* Wide number tables: the name column wraps so the numbers show too */
  table.numbers td:first-child { white-space: normal; min-width: 150px; max-width: 58vw; }
  .hub-vs { display: none; }
  .ord-more > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .ord-more > summary > :not(h2) { grid-column: 1 / -1; grid-row: 2; }
}
.page-head .sub .demo-tag { display: table; margin-top: 10px; }
/* Long source names read as text with a coloured dot, not as a stretched pill */
.src-long { display: block; font-weight: 600; padding-left: 14px; position: relative; }
.src-long::before { content: ""; position: absolute; left: 0; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.src-long.lvl-good::before { background: var(--good); } .src-long.lvl-warn::before { background: var(--warn); } .src-long.lvl-bad::before { background: var(--bad); }
/* Numbers everywhere: the same clean font as the tiles, even-width digits, right-aligned in tables */
.num { font-family: var(--font-body); }
.stats .num { font-family: var(--font-body); font-weight: 700; letter-spacing: -0.02em; }
.hub-row-value { font-family: var(--font-body); font-weight: 600; }
table th.num, table td.num { text-align: right; }
table th.num { font-family: inherit; }
/* Lists with their own look (plans, notes, moves) start where the card's text starts */
.card ul.plan-moves, .card ul.ih-list, .card ul.ins-notes, .card ul.ih-cal, .card ul.ih-facts, .card ul.own-days, .card ul.step-log { padding-left: 0; }
/* Warnings written as a sentence stay one sentence */
p.callout { display: block; }
p.callout > svg { vertical-align: -3px; margin-right: 8px; }
/* Grids with a few cards: no lonely card, no empty half row */
.hub-todos:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.hub-todos:has(> :nth-child(2):last-child), .hub-todos:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 861px) { .ins-brief-grid:has(> :nth-child(6):last-child), .ins-brief-grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ins-brief-grid { align-items: stretch; }
.fb-split { align-items: stretch; }
.card .ins-brief-card h3 { border-top: 0; padding-top: 0; }
/* Bar labels that are too long end in … instead of running under the bar */
.bar-row > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.ins-areas-head h2 { font-size: 1.45rem; letter-spacing: -.04em; }
.hub-fold summary { color: var(--text); font-weight: 400; }
/* Six tiles make two rows of three */
@media (min-width: 861px) { .kpis:has(> .kpi:nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Tile colours that mean something: loss red, watch amber, healthy green */
:root[data-theme="light"] .kpis > .kpi.kpi-bad.kpi-bad { background: linear-gradient(135deg, #fb7185, #e11d48 55%, #9f1239); }
:root[data-theme="light"] .kpis > .kpi.kpi-warn.kpi-warn { background: var(--t-sun); }
:root[data-theme="light"] .kpis > .kpi.kpi-good.kpi-good { background: linear-gradient(135deg, #34d399, #059669 55%, #065f46); }
.page-head > .actions, .page-head > form { margin-left: auto; }
/* Days after the last data in a chart: a faint dashed floor instead of an empty stretch */
.hub-col.no-data, .ins-col.no-data { border-bottom: 2px dashed var(--line-strong); opacity: .7; }
.hub-col.no-data .hub-bar, .ins-col.no-data span { display: none; }
@media (max-width: 600px) {
  /* Data tables become cards on phones, like the simple tables */
  table.data:not(.numbers) thead { display: none; }
  table.data:not(.numbers) tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.data:not(.numbers) td { display: block; border: 0; padding: 4px 14px; text-align: left; white-space: normal; }
  table.data:not(.numbers) td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: .7rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
  table.data:not(.numbers) td[data-label=""]::before, table.data:not(.numbers) td[colspan]::before { display: none; }
  table.data:not(.numbers) td:first-child { font-weight: 650; }
  table.data:not(.numbers) td.num { text-align: left; }
  .tbl-scroll:has(> table.data:not(.numbers)), .scroll:has(> table.data:not(.numbers)) { overflow: visible; background: none; }
  table.audit td:empty, table.data td:empty { display: none; }
  .kpi .label { display: block; }
  .kpi .label > span { display: block; font-size: .72rem; }
}
@media (max-width: 600px) {
  /* Phone cards: short values two to a line, so a row reads as a compact card */
  table.audit:not(.numbers) tr, table.data:not(.numbers) tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; column-gap: 8px; }
  table.audit:not(.numbers) td, table.data:not(.numbers) td { grid-column: 1 / -1; min-width: 0; }
  table.audit:not(.numbers) td.c-short, table.data:not(.numbers) td.c-short { grid-column: auto; }
  table.audit:not(.numbers) td:first-child, table.data:not(.numbers) td:first-child { grid-column: 1 / -1; }
}
/* Fields beside a text box start at the top, like the text box */
.grid:has(> label > textarea) { align-items: start; }
/* Bold figures in tables use the same number font as the rest */
table.numbers td strong, table.audit td strong { font-family: var(--font-body); font-variant-numeric: tabular-nums; }
/* Segment tables: amounts never break between number and currency */
table.data.seg td:not(:first-child) { white-space: nowrap; }
@media (max-width: 600px) {
  .page-head > .actions, .page-head > form { margin-left: 0; }
  table.audit td.c-empty, table.data td.c-empty { display: none; }
  table.data.seg td:not(:first-child) { white-space: normal; }
}
table.data.seg { table-layout: fixed; min-width: 860px; }
table.data.seg th { white-space: normal; letter-spacing: .04em; padding-left: 10px; padding-right: 10px; hyphens: auto; } /* fixed columns: a long heading wraps in its column */
table.data.seg td:first-child, table.data.seg td:last-child { white-space: normal; }
details.seg-fold > summary { font: 650 1rem var(--font-display); color: var(--text); padding: 10px 0; border-top: 1px solid var(--line); }
@media (max-width: 600px) { table.data.seg { min-width: 0; table-layout: auto; } table.data.seg colgroup { display: none; } }
/* Charts: axis numbers in the body font */
.chart text { font-family: var(--font-body); }
/* Shop connection: the plugin option sits in its own box */
.live-box { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.live-box > p:first-child { margin-top: 0; }
.live-box > * + * { margin-top: 10px; }
/* Pods: nine pods make three even rows */
@media (min-width: 861px) { .pods-grid:has(> :nth-child(9):last-child), .pods-grid:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .pods-grid:has(> :nth-child(10):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); } .pods-grid:has(> :nth-child(8):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Touch screens: no grey row left behind by a tap */
@media (hover: none) { table.data tbody tr:hover td, table.audit tbody tr:hover td { background: transparent !important; } }
@media (max-width: 600px) { td.with-thumb > .thumb { float: left; margin: 0 10px 4px 0; } td.with-thumb { white-space: normal; } }
@media (max-width: 600px) {
  /* Date filters on phones: quick ranges in one sliding row, dates full width, sites and Show side by side */
  .ins-presets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; -webkit-mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 28px), transparent); }
  .ins-presets::-webkit-scrollbar { display: none; }
  .ins-presets .chip { flex: none; }
  .ins-filters > .range { flex: 1 1 100%; }
  .ins-filters > .range > :not(label) { width: 100%; }
  .ins-filters > .ins-sites-field { flex: 1 1 0; min-width: 0; }
  .ins-filters > button[type=submit] { flex: none; align-self: flex-end; }
}
@media (max-width: 480px) {
  /* Phone top bar: the business switcher shows its square and the arrow, not a cut-off name */
  .app.docked .gv-top .gv-switch { width: auto; flex: none; }
  .app.docked .gv-top-right { margin-left: auto; }
  .app.docked .gv-switch .switcher .who { display: none; }
}
.ins-sites > summary { color: var(--text); }
@media (max-width: 600px) {
  /* Two values side by side: when one column name wraps, the values still line up */
  table.audit:not(.numbers) td.c-short, table.data:not(.numbers) td.c-short { display: flex; flex-direction: column; justify-content: space-between; }
}

/* Polish round 2026-10-09: German/phone/dark checks */
.multi-select .ms-count { white-space: nowrap; flex: none; }
.own-actions summary.btn, .own-actions form { margin: 0; }
.own-actions { align-items: center; }
.setup-ring-facts { align-items: start; }
.grid:has(> label:nth-child(5):last-child) { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.meta-sep, .settings-meta .sep { white-space: nowrap; }
@media (max-width: 600px) {
  label.choice { border-radius: 14px; }
  .card > table.audit.numbers, fieldset > table.audit.numbers { display: block; overflow-x: auto; max-width: 100%; }
  .card > table.audit.numbers td input[type=number] { width: 4.5em !important; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .module-card:not(.is-on) .module-ico { opacity: .92; filter: grayscale(.6) brightness(1.25); }
}
:root[data-theme="dark"] .module-card:not(.is-on) .module-ico { opacity: .92; filter: grayscale(.6) brightness(1.25); }
/* The privacy policy and the terms (legal.html): a readable column with a list of sections at the top. */
.legal { max-width: 860px; margin: 0 auto; line-height: 1.65; }
.legal h2 { margin-top: 32px; scroll-margin-top: 90px; }
.legal h3 { margin-top: 22px; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 6px 0; }
.legal-note { display: block; margin: 8px 0 4px; }
.legal-toc { margin: 18px 0 8px; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.legal-toc ol { margin: 6px 0 0; padding-left: 1.3em; columns: 2; column-gap: 28px; }
.legal-toc li { margin: 3px 0; break-inside: avoid; }
.legal-table td { vertical-align: top; }
.legal-table td:first-child { white-space: nowrap; font-weight: 600; }
@media (max-width: 700px) { .legal-toc ol { columns: 1; } .legal-table td:first-child { white-space: normal; } }

/* Free trial: one calm line while it runs (stronger in the last days), and the "trial has ended" page */
.trial-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 8px 8px 8px 14px; border-radius: 16px; font-size: .88rem; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text-2); }
.trial-line strong { color: var(--text); }
.trial-line.urgent { background: var(--warn-soft); border-color: var(--warn); color: var(--text); }
.trial-line.urgent strong { color: var(--warn); }
.trial-line .btn { margin: 0; }
.narrow.trial-ended { max-width: 560px; }
.trial-ended .bill-lines { margin: 16px 0; }
.trial-ended .pay-ways { margin-bottom: 14px; }

/* Who orders next and the buying patterns (customers page, app/rhythm.py) */
.rh-next .kpis { margin: 14px 0 6px; }
.rh-cols { display: grid; grid-template-columns: repeat(15, 1fr); gap: 6px; align-items: end; height: 120px; margin: 18px 0 8px; }
.rh-cols.small-cols { grid-template-columns: repeat(13, 1fr); height: 90px; }
.rh-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.rh-col span { display: block; min-height: 3px; border-radius: 6px 6px 3px 3px; background: var(--surface-2); border: 1px solid var(--line); transform-origin: bottom; animation: grow-y .9s cubic-bezier(.2, .7, .2, 1) both; }
.rh-col.near span { background: var(--aurora); border-color: transparent; box-shadow: 0 0 14px rgba(124, 139, 255, .45); }
.rh-col i { font-style: normal; font-size: .7rem; color: var(--text-3); text-align: center; margin-top: 4px; font-variant-numeric: tabular-nums; }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.rh-move { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.rh-move b { margin-right: 6px; }
.rh-title { margin: 28px 0 12px; }
.rh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.rh-grid .card { margin: 0; }
.rh-grid h3 { margin: 0 0 10px; }
.rh-row span:first-child { overflow: hidden; text-overflow: ellipsis; }
.rh-pairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rh-pairs li { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.rh-pairs li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-pairs em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .rh-cols { gap: 3px; height: 96px; } .rh-col i { font-size: .6rem; } }

/* The "worth testing, not promises" line by suggestions (templates/_suggest_note.html, Ali 2026-10-12). */
.suggest-note { display: flex; gap: 7px; align-items: flex-start; margin: 10px 0 0; font-size: .8rem; line-height: 1.45; color: var(--text-2); }
.suggest-note svg { flex: none; margin-top: 2px; color: var(--accent); }
.suggest-note a { white-space: nowrap; }
.page-head .suggest-note, .hub-part-head + .suggest-note { margin: 0 0 12px; }

/* The story on top of Today (templates/_start_story.html, Ali 2026-10-13): five steps you scroll through, violet on
   growviking.com and brand blue inside the Shopify admin (.st-blue). No z-index and nothing sticky, so the top bar
   and the dock always stay on top. */
.st { --st-accent: #8b5cf6; --st-ring: rgba(139, 92, 246, .2); --st-dim: color-mix(in srgb, var(--text) 14%, transparent); display: flex; flex-direction: column; gap: 40px; margin-bottom: 40px; }
.st.st-blue { --st-accent: #3446f2; --st-ring: rgba(52, 70, 242, .18); }
.st i[class^="tone-"], .st-num { display: grid; place-items: center; color: #fff; }
.st-hero { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 30px; align-items: center; padding: 40px 44px; border-radius: 34px; color: #fff; background: var(--tone-brain); box-shadow: var(--shadow-lg); }
.st-blue .st-hero { background: radial-gradient(60% 50% at 20% 20%, rgba(124, 247, 255, .3), transparent 70%), radial-gradient(130% 120% at 30% 15%, #2a3ad8, #121a7a 55%, #070b33); }
.st-hero-text { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.st-kicker { align-self: flex-start; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.st-hero h1 { margin: 0; color: #fff; font-size: clamp(2.4rem, 5vw, 4rem); line-height: .98; letter-spacing: -0.04em; }
.st-hero h1 span { opacity: .55; }
.st-hero p { margin: 0; font-size: 1.12rem; line-height: 1.45; max-width: 560px; opacity: .9; }
.st-chapters { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chapters a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 9px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; font-size: .9rem; text-decoration: none; }
.st-chapters a:hover { background: rgba(255, 255, 255, .2); }
.st-chapters b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #0a0a0f; font-size: .75rem; }
.st-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.st-ring { position: relative; width: 400px; height: 400px; justify-self: center; }
.st-ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-ring-track { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 22; }
.st-ring-dots { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 4; stroke-dasharray: 2 12; stroke-linecap: round; }
.st-spin { transform-origin: 200px 200px; animation: st-spin 16s linear infinite; }
@keyframes st-spin { to { transform: rotate(360deg); } }
.st-ring-core { position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18); display: grid; place-items: center; }
.st-ring-core svg { width: 130px; height: 130px; overflow: visible; }
.st-node { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: .82rem; font-weight: 700; }
.st-node i { width: 58px; height: 58px; border-radius: 18px; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); }
.st-node svg { width: 28px; height: 28px; }
.n-top { left: 50%; top: 0; transform: translateX(-50%); }
.n-bottom { left: 50%; bottom: 0; transform: translateX(-50%); flex-direction: column-reverse; }
.n-left { left: 0; top: 50%; transform: translateY(-50%); }
.n-right { right: 0; top: 50%; transform: translateY(-50%); }
@media (prefers-reduced-motion: reduce) { .st-spin, .st-lines path, .st-dots i.lit, .st-heat i.peak { animation: none !important; } }

.st-chap, .st-numbers-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 22px; scroll-margin-top: 96px; }
.st-num { width: 60px; height: 60px; border-radius: 19px; font-family: var(--font-display, inherit); font-weight: 800; font-size: 1.6rem; }
.st-body { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.st-step { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.st-chap h2, .st-numbers-head h2 { margin: 4px 0 0; font-size: clamp(1.6rem, 3vw, 2.5rem); letter-spacing: -0.035em; }
.st-chap h2 .muted { color: var(--text-3); }
.st-numbers-head { align-items: center; margin-bottom: 14px; }
.st-numbers-head .sub { margin: 6px 0 0; color: var(--text-2); }
.st-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.st-card { background: var(--surface-solid, var(--surface)); border: 1px solid var(--line); border-radius: 26px; padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.st-card-head { display: flex; align-items: center; gap: 12px; }
.st-card-head > i { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; }
.st-card-head > i svg { width: 21px; height: 21px; }
.st-card-head b { display: block; font-size: 1.02rem; line-height: 1.2; }
.st-card-head span { display: block; font-size: .8rem; color: var(--text-2); line-height: 1.3; }
.st-center { text-align: center; }
.st-link { margin: 0; font-weight: 600; }

.st-src { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.st-src .st-card { display: flex; flex-direction: column; gap: 14px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chips span { font-size: .88rem; padding: 7px 12px; border-radius: 999px; background: var(--surface-2); }
.st-chips span.off { color: var(--text-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-3) 50%, transparent); }
.st-chips span.more { font-weight: 700; background: transparent; border: 1.5px dashed var(--st-accent); color: var(--st-accent); }
.st-lines { position: relative; height: 110px; margin: -18px 0 -22px; }
.st-lines svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.st-lines path { fill: none; stroke: var(--st-accent); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-dasharray: 3 7; animation: st-dash 1.4s linear infinite; }
@keyframes st-dash { to { stroke-dashoffset: -20; } }
.st-lines span { position: absolute; top: 0; width: 14px; height: 14px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--st-accent); box-shadow: 0 0 0 5px var(--st-ring); }
.st-pill { position: relative; align-self: center; display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 20px 10px 10px; border-radius: 999px; background: var(--tone-brain); color: #fff; font-weight: 600; max-width: 100%; }
.st-blue .st-pill { background: radial-gradient(130% 120% at 30% 15%, #2a3ad8, #121a7a 55%, #070b33); }
.st-pill > span { flex: none; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: grid; place-items: center; }
.st-pill > span svg { width: 38px; height: 38px; overflow: visible; color: #fff; }
.st-pill a { color: #fff; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); text-decoration: none; white-space: nowrap; }
.st-loop { flex-wrap: wrap; justify-content: center; }

.st-dots-card { display: flex; flex-direction: column; gap: 10px; }
.st-dots-card p { margin: 0; }
.st-dots { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.st-dotgroup { display: inline-flex; align-items: center; gap: 5px; }
.st-dots i, .st-mini i { width: 16px; height: 16px; border-radius: 50%; background: var(--st-dim); }
.st-dots i.lit { background: var(--c); box-shadow: 0 0 10px var(--c); animation: st-glow 2.6s ease-in-out infinite; }
.st-mini i.lit { background: var(--c); }
.st-dots i.dash, .st-mini i.dash { background: transparent; border: 1.5px dashed var(--text-3); }
.st-dot-more em { font-style: normal; font-size: .82rem; font-weight: 600; color: var(--text-2); margin-left: 4px; }
@keyframes st-glow { 50% { opacity: .65; } }
.st-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.st-group { display: flex; flex-direction: column; gap: 12px; }
.st-group .st-card-head > i { width: 38px; height: 38px; border-radius: 12px; }
.st-mini { display: flex; flex-wrap: wrap; gap: 4px; }
.st-mini i { width: 12px; height: 12px; }
.st-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.st-group li { display: flex; align-items: flex-start; gap: 8px; font-size: .86rem; font-weight: 650; line-height: 1.3; }
.st-group li.muted { font-weight: 400; }
.st-group li i { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--st-dim); }
.st-secret { background: var(--tone-brain); color: #fff; border-color: transparent; }
.st-blue .st-secret { background: radial-gradient(130% 120% at 30% 15%, #2a3ad8, #121a7a 55%, #070b33); }
.st-secret .st-card-head > i { background: rgba(255, 255, 255, .12); }
.st-secret .st-card-head > i svg { width: 32px; height: 32px; overflow: visible; }
.st-secret .st-card-head span, .st-secret p { color: rgba(255, 255, 255, .85); margin: 0; }
.st-secret .st-mini i.dash { border-color: rgba(255, 255, 255, .7); }

.st-pat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.st-pat .st-card { display: flex; flex-direction: column; gap: 12px; }
.st-pat h3 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }
.st-pat p { margin: 0; }
.st-heat-card { grid-row: span 2; position: relative; }
.st-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 650; padding: 6px 11px; border-radius: 999px; background: var(--surface-2); }
.st-tag i { width: 9px; height: 9px; border-radius: 50%; }
.st-heat { display: grid; grid-template-columns: 44px repeat(6, minmax(0, 1fr)); gap: 5px; align-items: center; }
.st-heat i { height: 24px; border-radius: 7px; background: var(--st-dim); }
.st-heat i.l1 { background: color-mix(in srgb, var(--st-accent) 22%, transparent); }
.st-heat i.l2 { background: color-mix(in srgb, var(--st-accent) 45%, transparent); }
.st-heat i.l3 { background: color-mix(in srgb, var(--st-accent) 70%, transparent); }
.st-heat i.l4 { background: var(--st-accent); }
.st-heat i.peak { background: #10b981; box-shadow: 0 0 16px rgba(16, 185, 129, .8); animation: st-glow 2.4s ease-in-out infinite; }
.st-heat-day, .st-heat-time { font-size: .72rem; color: var(--text-2); }
.st-heat-time { text-align: center; }
.st-heat-time b { font-weight: inherit; }
.st-heat-time em { display: none; font-style: normal; }
@media (max-width: 560px) { .st-heat-time b { display: none; } .st-heat-time em { display: inline; } } /* hours fit a phone */
/* The period switch (no script): one hidden radio per period; the checked one shows its panel and lights its tab. */
.st-heat-pick { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.st-heat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.st-heat-tabs label { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: .82rem; font-weight: 600; cursor: pointer; }
.st-heat-tabs label:hover { color: var(--text); }
.st-heat-panel { display: none; }
.st-heat-panel h3 { margin: 10px 0 14px; }
#st-heat-coming:checked ~ .st-heat-panels [data-v="coming"], #st-heat-summer:checked ~ .st-heat-panels [data-v="summer"],
#st-heat-winter:checked ~ .st-heat-panels [data-v="winter"], #st-heat-year:checked ~ .st-heat-panels [data-v="year"],
#st-heat-all:checked ~ .st-heat-panels [data-v="all"] { display: block; }
#st-heat-coming:checked ~ .st-heat-tabs [for="st-heat-coming"], #st-heat-summer:checked ~ .st-heat-tabs [for="st-heat-summer"],
#st-heat-winter:checked ~ .st-heat-tabs [for="st-heat-winter"], #st-heat-year:checked ~ .st-heat-tabs [for="st-heat-year"],
#st-heat-all:checked ~ .st-heat-tabs [for="st-heat-all"] { background: var(--text); color: var(--bg); }
.st-heat-pick:focus-visible ~ .st-heat-tabs label { outline: none; }
#st-heat-coming:focus-visible ~ .st-heat-tabs [for="st-heat-coming"], #st-heat-summer:focus-visible ~ .st-heat-tabs [for="st-heat-summer"],
#st-heat-winter:focus-visible ~ .st-heat-tabs [for="st-heat-winter"], #st-heat-year:focus-visible ~ .st-heat-tabs [for="st-heat-year"],
#st-heat-all:focus-visible ~ .st-heat-tabs [for="st-heat-all"] { outline: 2px solid var(--st-accent); outline-offset: 2px; }
.st-season { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, #22d3ee 12%, transparent); font-size: .9rem; line-height: 1.4; }
.st-season svg { flex: none; width: 18px; height: 18px; color: #0891b2; margin-top: 1px; }
.st-heat-time { text-align: center; }
.st-finding.lvl-warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.st-finding.lvl-bad { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }

.st-moves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.st-move { display: flex; flex-direction: column; gap: 10px; }
.st-move p { margin: 0; }
.st-move .btn { margin-top: auto; align-self: flex-start; display: inline-flex; gap: 7px; align-items: center; max-width: 100%; white-space: normal; text-align: left; }
.st-when { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--st-accent); }
.st-days { display: flex; flex-direction: column; gap: 14px; }
.st-days h3 { margin: 0; font-size: 1.2rem; }
.st-days p { margin: 0; }
.st-bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; height: 170px; }
.st-bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; height: 100%; gap: 6px; }
.st-bar span { display: block; border-radius: 8px 8px 4px 4px; background: color-mix(in srgb, var(--st-accent) 30%, transparent); }
.st-bar.strong span { background: var(--st-accent); box-shadow: 0 0 14px var(--st-ring); }
.st-bar.weak span { background: color-mix(in srgb, var(--text) 22%, transparent); }
.st-bar em { font-style: normal; font-size: .68rem; line-height: 1.2; text-align: center; color: var(--text-2); }

.st-learn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.st-learn .st-card { display: flex; flex-direction: column; gap: 14px; }
.st-learn p { margin: 0; }
.st-test { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 600; }
.st-result { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); font-size: .88rem; font-weight: 600; }
.st-learnt { width: 100%; height: 130px; }
.st-learnt .area { fill: color-mix(in srgb, var(--st-accent) 18%, transparent); }
.st-learnt .line { fill: none; stroke: var(--st-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1180px) { .st-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .st-hero { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .st { gap: 30px; }
  .st-hero { padding: 26px 20px; text-align: center; }
  .st-kicker, .st-hero .actions, .st-chapters { align-self: center; justify-content: center; }
  .st-ring { width: 280px; height: 280px; }
  .st-ring-core { width: 120px; height: 120px; } .st-ring-core svg { width: 92px; height: 92px; }
  .st-node i { width: 44px; height: 44px; border-radius: 14px; } .st-node svg { width: 22px; height: 22px; }
  .st-chap, .st-numbers-head { grid-template-columns: 1fr; gap: 10px; }
  .st-num { width: 44px; height: 44px; border-radius: 14px; font-size: 1.2rem; }
  .st-src, .st-pat, .st-moves, .st-learn, .st-board { grid-template-columns: 1fr; }
  .st-heat-card { grid-row: auto; }
  .st-lines { height: 60px; margin: -10px 0 -14px; }
  .st-lines path:first-child, .st-lines path:last-child, .st-lines span:not(:nth-of-type(2)) { display: none; }
  .st-bars { gap: 3px; height: 130px; }
  .st-bar em { font-size: .58rem; }
  .st-pill { font-size: .85rem; }
}
@media (max-width: 560px) { .st-chapters { display: none; } .st-hero { padding: 28px 20px; } }

/* Chart key (app/templates/_chart_key.html): the ONE way every chart says what its colours, lines and shades mean.
   Wraps inside its card in every language; a long label breaks rather than running out. */
.chart-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 12px; font-size: .8rem; line-height: 1.35; color: var(--text-2); min-width: 0; }
.key-i { display: inline-flex; align-items: center; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
.key-sw { flex: none; display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: var(--key); }
.key-dot { border-radius: 50%; }
.key-line { width: 18px; height: 3px; border-radius: 2px; }
.key-dash { width: 18px; height: 0; border-radius: 0; background: none; border-top: 3px dashed var(--key); }
.key-scale { width: 40px; border-radius: 4px; }
.key-glow { box-shadow: 0 0 10px var(--key); }
.key-note { flex: 1 1 100%; color: var(--text-3); overflow-wrap: anywhere; }
.chart-key:has(.key-i) .key-note { margin-top: 2px; }
.chart-key.in-head { margin-top: 0; }
.key-faded { opacity: .45; }
.key-soft { opacity: .72; }
:root { --fb-value: var(--aurora); } :root[data-theme="light"] { --fb-value: var(--t-blue); } /* the value bars on Facebook and Google data */
.chart-key.tight { margin: -4px 0 12px; }

/* Track record (templates/track_record.html): long words wrap inside their tile at any width */
.tr-kpis .kpi .value.small, .tr-money .kpi .value.small { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.tr-kpis .kpi .delta, .tr-money .kpi .delta { overflow-wrap: anywhere; font-weight: 500; }
.tr-row { border-top: 1px solid var(--line); padding: 10px 0; }
.tr-row summary { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
.tr-row summary::-webkit-details-marker { display: none; }
.tr-what { min-width: 0; overflow-wrap: anywhere; }
.tr-body { padding: 8px 0 0; color: var(--text-2); overflow-wrap: anywhere; }
.tr-body p { margin: 4px 0; }
.tr-chart text.axis { font-size: 11px; fill: var(--text-3); }
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin: 4px 0; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .tr-row summary { grid-template-columns: 1fr auto; }
  .tr-row summary > .muted { grid-column: 1 / -1; }
}
.tr-kpis .kpi .value.small { overflow-wrap: break-word; hyphens: auto; }
.tr-of { font-size: .5em; opacity: .7; font-weight: 600; }
.tr-level { display: block; font-weight: 700; line-height: 1.3; margin: 2px 0 6px; overflow-wrap: break-word; hyphens: auto; }
.tr-more > summary { list-style: none; margin-top: 12px; display: inline-flex; }
.tr-more > summary::-webkit-details-marker { display: none; }
.tr-more[open] > summary { display: none; }
@media (max-width: 560px) { .tr-kpis > .kpi:first-child, .tr-kpis > .kpi:last-child { grid-column: 1 / -1; } }
/* Predictions (/pod/predictions): the coming days in a bento, a chart of the last and next 14 days, the week day by day */
/* doubled class: wins over the light theme's :root[data-theme="light"] .kpis grid */
.kpis.pr-bento.pr-bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pr-bento .pr-big { grid-column: span 2; }
.pr-tile { gap: 6px; min-width: 0; }
.kpis .pr-tile .label { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; }
.kpis .pr-tile .label > .pr-tag { display: inline-block; flex: none; opacity: 1; font-size: .66rem; }
.pr-tag { font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, currentColor 14%, transparent); white-space: nowrap; }
.pr-when { font-size: .8rem; color: inherit; opacity: .8; overflow-wrap: anywhere; }
.pr-tile .value { overflow-wrap: anywhere; }
.pr-big .value { font-size: 2.6rem; }
.pr-range { font-size: .88rem; font-weight: 600; color: inherit; opacity: .92; overflow-wrap: anywhere; }
.pr-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-facts span { font-size: .76rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; overflow-wrap: anywhere; }
.pr-mini { display: flex; align-items: flex-end; gap: 5px; height: 64px; margin-top: auto; padding-top: 8px; }
.pr-mini i { flex: 1; min-height: 3px; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, currentColor 45%, transparent); }
.pr-mini i.strong { background: currentColor; }
.pr-mini i.weak { background: color-mix(in srgb, currentColor 22%, transparent); }
.pr-chart { width: 100%; min-width: 560px; height: auto; display: block; }
.pr-chart text.axis { font-size: 13px; fill: var(--text-3); }
.pr-grid { stroke: var(--line); stroke-dasharray: 3 4; }
.pr-base { stroke: var(--line-strong, var(--line)); }
.pr-sold { fill: var(--chart-c); opacity: .85; }
.pr-fc { fill: var(--chart-a); }
.pr-fc.strong { fill: var(--good); }
.pr-fc.weak { fill: var(--warn); }
.pr-today { stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 5 4; }
.pr-chart text.pr-today-t { font-weight: 700; fill: var(--text-2); }
.pr-sub { margin: 20px 0 10px; font-size: 1rem; }
.pr-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.pr-day { display: flex; flex-direction: column; gap: 3px; padding: 12px 10px; border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--chart-a) 7%, transparent); min-width: 0; }
.pr-day.strong { background: color-mix(in srgb, var(--good) 13%, transparent); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.pr-day.weak { background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.pr-dname { font-weight: 700; font-size: .85rem; display: flex; flex-direction: column; }
.pr-dname small { font-weight: 500; color: var(--text-3); font-size: .74rem; }
.pr-day b { font: 600 1.05rem/1.2 var(--font-mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pr-lvl { font-size: .76rem; font-weight: 600; color: var(--text-2); }
.pr-why { font-size: .72rem; color: var(--text-3); overflow-wrap: anywhere; hyphens: auto; }
.pr-moves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 12px; }
.pr-move { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.pr-move b, .pr-move p { overflow-wrap: anywhere; margin: 0; }
.pr-move.kind-do { border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.pr-move .badge { white-space: normal; text-align: left; }
.pr-divider { margin: 34px 0 14px; }
.pr-divider h2 { font-size: 1.6rem; margin: 0 0 4px; }
.pr-divider .sub { margin: 0; color: var(--text-2); }
@media (max-width: 980px) { .kpis.pr-bento.pr-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pr-bento .pr-big { grid-column: 1 / -1; }
  .pr-week { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; } .pr-day { flex: 0 0 22%; scroll-snap-align: start; } }
@media (max-width: 560px) {
  .kpis.pr-bento.pr-bento { grid-template-columns: 1fr; } .pr-big .value { font-size: 2rem; }
  .pr-tile .value { font-size: 1.35rem; }
  .pr-day { flex: 0 0 31%; }
  .pr-moves { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .pr-chart-card .scroll { overflow-x: auto; } .pr-chart { min-width: 680px; max-width: none; } }

/* Launch page: goal, rules, GV Brain patterns, interest search (2026-10-15) */
.field-title { margin: 16px 0 8px; font-weight: 650; font-size: .92rem; }
.card > .field-title:first-of-type { margin-top: 4px; }
.goal-cards, .rule-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.goal-cards .mode-card > span, .rule-cards .mode-card > span, .budget-mode .mode-card > span, .interest-card > span { min-width: 0; overflow-wrap: anywhere; }
.brain-patterns { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.brain-patterns .field-title { margin-top: 0; }
.pattern-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.pattern-list .pattern { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--surface); border-left: 4px solid var(--good); overflow-wrap: anywhere; }
.pattern-list .pattern.down { border-left-color: var(--bad); }
.pattern-list .pattern label.check { margin: 0; align-items: flex-start; }
.pattern-list .pattern label.check input { margin-top: 3px; flex: none; }
.pattern-mark { width: 10px; height: 10px; border-radius: 3px; background: var(--good); flex: none; margin-top: 5px; }
.pattern.down .pattern-mark { background: var(--bad); }
.write-status:empty { display: none; }
.write-status { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); }
.write-status.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); }
#write-btn[disabled] { opacity: .7; cursor: progress; }
.text-block .warn-line { color: var(--bad); margin: 4px 0 0; }
label.big-check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
label.big-check input { margin-top: 3px; flex: none; }
label.big-check:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.interest-search { position: relative; margin: 12px 0 4px; }
.interest-search label { display: block; font-weight: 600; margin-bottom: 4px; }
.interest-search input[type=search] { width: 100%; }
.interest-results { position: absolute; z-index: 30; left: 0; right: 0; list-style: none; margin: 4px 0 0; padding: 6px; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); max-height: 320px; overflow-y: auto; }
.interest-results li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; overflow-wrap: anywhere; }
.interest-results li:hover, .interest-results li[aria-selected=true] { background: var(--accent-soft); }
.interest-results li .small { color: var(--text-2); white-space: nowrap; }
.interest-results li.none { cursor: default; color: var(--text-2); }
.card:has(.interest-results:not([hidden])) { z-index: 25; }
.interest-picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-x { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 4px 4px 12px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent-soft); font-size: .85rem; overflow-wrap: anywhere; }
.chip-x .x { margin: 0; min-height: 0; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: transparent; color: var(--text); border: 0; box-shadow: none; font-size: 1rem; line-height: 1; }
.chip-x .x:hover { background: var(--surface-2); }
.account-line { margin: 0 0 6px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
@media (max-width: 640px) { .interest-results { position: static; } .interest-results li { flex-direction: column; gap: 2px; } }
/* A blocked or stopped launch: change the limit and try again, right there */
.fix-box { margin: 14px 0; padding: 14px 16px; border: 1px solid var(--accent); border-radius: 14px; background: var(--accent-soft); }
.fix-box h3 { margin: 0 0 6px; font-size: 1rem; }
.fix-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.fix-row label { flex: 1 1 200px; margin: 0; }
.fix-row button { margin: 0; }
