/* ==========================================================================
   Analíticas — design system
   Geist type, flat layered surfaces with hairline borders, one ink color
   and one accent; data colors from the validated chart palette. No
   gradients anywhere.
   ========================================================================== */
:root {
  --bg: #f6f6f7;
  --bg-2: #efeff1;
  --card: #ffffff;
  --card-2: #fafafa;
  --raised: #ffffff;
  --sunken: #f0f0f2;
  --line: rgba(15, 15, 20, .07);
  --line-2: rgba(15, 15, 20, .12);
  --line-3: rgba(15, 15, 20, .2);
  --text: #0b0b0f;
  --text-2: #55555e;
  --text-3: #8c8c96;
  --grid: #ececef;
  --axis: #d4d4d8;
  --primary: #2a78d6;
  --primary-2: #256abf;
  --primary-soft: rgba(42, 120, 214, .09);
  --primary-ink: #1c5cab;
  --on-primary: #fff;
  --up: #067a3a;
  --up-soft: rgba(12, 163, 12, .1);
  --down: #c42f2f;
  --down-soft: rgba(208, 59, 59, .09);
  --warning: #9a6200;
  --warning-soft: rgba(250, 178, 25, .14);
  --danger: #d03b3b;
  --star: #f5a623;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #6250d6;
  --series-8: #e34948;
  --compare: #b4b4bb;
  /* Channel identity */
  --c-ga4: #eb6834;
  --c-gsc: #2a78d6;
  --c-apple: #1d1d1f;
  --c-play: #1baf7a;
  --brand: #0b0b0f;
  --on-brand: #ffffff;
  --accent: #2a78d6;
  --shadow-sm: 0 1px 2px rgba(15, 15, 20, .04);
  --shadow: 0 1px 2px rgba(15, 15, 20, .04), 0 12px 32px -20px rgba(15, 15, 20, .25);
  --shadow-lg: 0 40px 100px -30px rgba(15, 15, 20, .35), 0 2px 8px rgba(15, 15, 20, .06);
  --radius: 20px;
  --radius-sm: 12px;
  --sidebar-w: 268px;
  --font: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08090b; --bg-2: #0d0e11; --card: #111215; --card-2: #15161a; --raised: #18191d; --sunken: #1c1d22;
    --line: rgba(255, 255, 255, .065); --line-2: rgba(255, 255, 255, .11); --line-3: rgba(255, 255, 255, .2);
    --text: #f2f2f4; --text-2: #b4b4bd; --text-3: #7b7b86; --grid: #1e1f24; --axis: #2c2d33;
    --primary: #4f8cff; --primary-2: #6b9dff; --primary-soft: rgba(79, 140, 255, .14); --primary-ink: #9ec0ff;
    --up: #2bd46b; --up-soft: rgba(43, 212, 107, .12); --down: #ff6b6b; --down-soft: rgba(255, 107, 107, .12);
    --warning: #fbbf24; --warning-soft: rgba(251, 191, 36, .12); --danger: #ff6b6b;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
    --compare: #4a4a52; --c-apple: #e8e8ed;
    --brand: #f2f2f4; --on-brand: #08090b; --accent: #4f8cff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 40px -24px rgba(0, 0, 0, .9);
    --shadow-lg: 0 40px 120px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .04);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #08090b; --bg-2: #0d0e11; --card: #111215; --card-2: #15161a; --raised: #18191d; --sunken: #1c1d22;
  --line: rgba(255, 255, 255, .065); --line-2: rgba(255, 255, 255, .11); --line-3: rgba(255, 255, 255, .2);
  --text: #f2f2f4; --text-2: #b4b4bd; --text-3: #7b7b86; --grid: #1e1f24; --axis: #2c2d33;
  --primary: #4f8cff; --primary-2: #6b9dff; --primary-soft: rgba(79, 140, 255, .14); --primary-ink: #9ec0ff;
  --up: #2bd46b; --up-soft: rgba(43, 212, 107, .12); --down: #ff6b6b; --down-soft: rgba(255, 107, 107, .12);
  --warning: #fbbf24; --warning-soft: rgba(251, 191, 36, .12); --danger: #ff6b6b;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  --compare: #4a4a52; --c-apple: #e8e8ed;
  --brand: #f2f2f4; --on-brand: #08090b; --accent: #4f8cff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 40px -24px rgba(0, 0, 0, .9);
  --shadow-lg: 0 40px 120px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .04);
  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; letter-spacing: -.003em;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.xs { width: 13px; height: 13px; }
svg.i.lg { width: 22px; height: 22px; }
svg.i.xl { width: 28px; height: 28px; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.num, .tnum { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nowrap { flex-wrap: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--primary-soft); }

/* ==========================================================================
   Layout
   ========================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .25s var(--ease); }
.app.rail { grid-template-columns: 72px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none;
  display: flex; flex-direction: column; gap: 2px; padding: 18px 14px 14px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 72%, transparent);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
}
.sidebar::-webkit-scrollbar { display: none; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 16px; font-weight: 650; font-size: 15.5px; letter-spacing: -.02em; line-height: 1.2; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--on-brand); background: var(--brand); flex: none; }
.brand-mark svg { width: 17px; height: 17px; stroke-width: 2.4; }
.brand small { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.brand .lbl { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rail-btn { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--text-3); flex: none; transition: background .15s, color .15s; }
.rail-btn:hover { background: var(--sunken); color: var(--text); }
.nav-item .pinned { color: var(--text-3); display: grid; opacity: .8; }
.nav-projects { display: flex; flex-direction: column; gap: 2px; }
.nav-more { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; font-weight: 550; color: var(--text-2); text-align: left; transition: background .15s, color .15s; }
.nav-more:hover { background: var(--sunken); color: var(--text); }
.nav-more.faint { color: var(--text-3); }
.nav-label .nl-toggle { margin: 0; display: flex; align-items: center; gap: 6px; padding: 2px 4px 2px 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; }
.nav-label .nl-toggle:hover { background: none; color: var(--text); }
.nav-label .nl-toggle svg { transition: transform .2s var(--ease); }
.nav-label.closed .nl-toggle svg { transform: rotate(-90deg); }
.nav-label .nl-n { font-weight: 600; color: var(--text-3); background: var(--sunken); border-radius: 6px; padding: 0 5px; letter-spacing: 0; }
.nav-label > button:not(.nl-toggle) { margin-left: auto; }
.nav-label > button:not(.nl-toggle) + a { margin-left: 2px; }

/* Rail: the sidebar folds to icons. */
.app.rail .sidebar { padding: 18px 12px 14px; align-items: stretch; }
.app.rail .sidebar .lbl, .app.rail .sidebar .chs, .app.rail .sidebar .pinned, .app.rail .sidebar .count, .app.rail .nav-label, .app.rail .search-btn kbd { display: none; }
.app.rail .brand { flex-direction: column; padding: 2px 0 14px; gap: 10px; }
.app.rail .nav-item, .app.rail .search-btn, .app.rail .me { justify-content: center; padding-left: 0; padding-right: 0; }
.app.rail .nav-item.active::before { left: -12px; }
.app.rail .nav-projects { padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); }
.app.rail .me { padding: 6px 0; border-color: transparent; background: none; }
.search-btn {
  display: flex; align-items: center; gap: 9px; width: 100%; height: 36px; padding: 0 10px; margin-bottom: 10px; border-radius: 10px;
  color: var(--text-3); background: var(--sunken); border: 1px solid var(--line); font-size: 13.5px; transition: border-color .15s, color .15s;
}
.search-btn:hover { border-color: var(--line-2); color: var(--text-2); }
.search-btn kbd { margin-left: auto; }
kbd { font-family: var(--font); font-size: 11px; font-weight: 600; color: var(--text-3); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--card); }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 36px;
  padding: 7px 10px; border-radius: 10px; color: var(--text-2); font-weight: 500; text-align: left;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-item:hover { background: var(--sunken); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.nav-item.active::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--text); }
.nav-item .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-size: 11.5px; font-weight: 650; background: var(--down-soft); color: var(--down); }
.nav-item .count.blue { background: var(--primary-soft); color: var(--primary-ink); }
.nav-label { display: flex; align-items: center; padding: 18px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.nav-label a, .nav-label button { margin-left: auto; color: var(--text-3); border-radius: 6px; padding: 2px; display: grid; }
.nav-label a:hover, .nav-label button:hover { color: var(--text); background: var(--sunken); }
.nav-item .chs { margin-left: auto; display: flex; gap: 3px; }
.nav-item .chs i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); opacity: .9; }
.sidebar-foot { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; margin-top: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); text-align: left; width: 100%; transition: border-color .15s; }
.me:hover { border-color: var(--line-2); }
.me .t { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.me .s { font-size: 12px; color: var(--text-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
  padding: 18px 32px 14px; padding-top: calc(18px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.title-block { min-width: 0; flex: 1; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-3); margin-bottom: 4px; min-height: 18px; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--text); text-decoration: none; }
.topbar h1 { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.035em; line-height: 1.15; display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar h1 .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.content { padding: 8px 32px 64px; width: 100%; max-width: 1680px; }
.content.enter { animation: enter .32s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .content.enter { animation: none; } }
.mbar, .ptr { display: none; }
.content.dim { opacity: .55; transition: opacity .2s; pointer-events: none; }

/* ==========================================================================
   Controls
   ========================================================================== */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 10px; font-weight: 550; font-size: 13.5px; white-space: nowrap;
  background: var(--card); border: 1px solid var(--line-2); color: var(--text); box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s, opacity .15s;
}
.btn:hover { border-color: var(--line-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--text); color: var(--bg); border-color: transparent; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn.primary:hover { opacity: .88; }
.btn.accent { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.btn.accent:hover { opacity: .92; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--sunken); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 30px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--sunken); border: 1px solid var(--line); flex: none; }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 8px; font-size: 12.5px; font-weight: 550; color: var(--text-2); white-space: nowrap; transition: color .15s, background .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.seg button svg { width: 14px; height: 14px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font-size: 12.5px; font-weight: 550; color: var(--text-2); transition: all .15s; white-space: nowrap; }
.chip:hover { color: var(--text); border-color: var(--line-3); text-decoration: none; }
.chip.on { background: var(--text); color: var(--bg); border-color: transparent; }
.chip img { width: 16px; height: 16px; border-radius: 4px; }

.select {
  height: 36px; padding: 0 32px 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background-color: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238c8c96' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
  appearance: none; -webkit-appearance: none; font-weight: 550; font-size: 13px; box-shadow: var(--shadow-sm); max-width: 100%;
}
.select.sm { height: 30px; font-size: 12.5px; border-radius: 9px; }
.input, textarea.input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-2);
  background: var(--card); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 120px; padding: 11px 12px; resize: vertical; line-height: 1.55; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.input.sm { height: 32px; font-size: 13px; border-radius: 9px; }
.search { position: relative; }
.search > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search .input { padding-left: 34px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .field > .l { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--text-3); }
.check { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); cursor: pointer; transition: border-color .15s, background .15s; }
.check:hover { border-color: var(--line-2); }
.check input { width: 17px; height: 17px; accent-color: var(--primary); flex: none; margin: 0; }
.check:has(input:checked) { border-color: color-mix(in srgb, var(--primary) 45%, transparent); background: var(--primary-soft); }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.switch { position: relative; width: 40px; height: 24px; flex: none; border-radius: 999px; background: var(--line-3); transition: background .2s; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s var(--ease); }
.switch.on { background: var(--up); }
.switch.on::after { transform: translateX(16px); }

/* Filters bar */
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.range { position: relative; flex: none; }
.range-btn .sub { color: var(--text-3); font-weight: 500; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 270px; padding: 6px; border-radius: 16px;
  background: var(--raised); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); animation: pop .16s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.menu button.opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 10px; text-align: left; font-weight: 500; }
.menu button.opt:hover { background: var(--sunken); }
.menu button.opt .ck { width: 16px; color: var(--primary); display: grid; }
.menu button.opt .ck svg { stroke-width: 3; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu .custom { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; }
.menu .custom .input { height: 34px; font-size: 13px; padding: 0 8px; }
.menu .custom .btn { grid-column: span 2; }
.menu .sec { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }

/* ==========================================================================
   Surfaces
   ========================================================================== */
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > * { position: relative; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 18px 20px 8px; }
.card-h h2, .card-h h3 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.015em; }
.card-h .sub { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.card-b { padding: 10px 20px 20px; }
.card-b.flush { padding: 4px 0 10px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 36px 0 14px; flex-wrap: wrap; }
.section-title h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.025em; }
.section-title .sub { color: var(--text-3); font-size: 13px; }

/* Greeting */
.greet { margin: 2px 0 22px; }
.greet h2 { margin: 0; font-size: 14px; font-weight: 500; color: var(--text-3); }
.greet p { margin: 6px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -.035em; line-height: 1.35; max-width: 920px; }
.greet p em { font-style: normal; color: var(--up); }

/* Hero */
.hero-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 16px; align-items: stretch; }
.hero { overflow: hidden; }
.hero-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-bottom: 1px solid var(--line); }
.hero-tab { position: relative; text-align: left; padding: 16px 20px 14px; border-right: 1px solid var(--line); transition: background .2s; min-width: 0; }
.hero-tab:last-child { border-right: 0; }
.hero-tab:hover { background: color-mix(in srgb, var(--sunken) 50%, transparent); }
.hero-tab.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); }
.hero-tab .l { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.hero-tab .v { font-size: 25px; font-weight: 650; letter-spacing: -.04em; margin-top: 6px; line-height: 1.1; }
.hero-tab .f { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 12px; color: var(--text-3); }
.hero-tab:not(.on) .v { color: var(--text-2); }
.hero-body { padding: 20px 20px 14px; }
.hero-figure { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-figure .v { font-size: 54px; font-weight: 650; letter-spacing: -.055em; line-height: .95; }
.hero-figure .meta { padding-bottom: 4px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; font-size: 12.5px; color: var(--text-3); }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; }
/* Seven or more tiles: two even rows of four instead of 5 + 2. */
@media (min-width: 1200px) { .kpis:has(> :nth-child(7)) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Exactly six: one row of six on wide screens, two of three otherwise. */
@media (min-width: 901px) { .kpis:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .kpis:has(> :nth-child(6):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpi {
  position: relative; overflow: hidden; text-align: left; padding: 16px 16px 0; border-radius: 16px; min-width: 0;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.kpi.tap { cursor: pointer; user-select: none; }
.kpi.tap:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.kpi.on { border-color: color-mix(in srgb, var(--primary) 55%, transparent); box-shadow: 0 0 0 4px var(--primary-soft), var(--shadow); }
.kpi .label { position: relative; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.kpi .value { position: relative; font-size: 27px; font-weight: 650; letter-spacing: -.04em; line-height: 1.2; margin-top: 10px; }
.kpi .foot { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 6px; min-height: 20px; }
.kpi .prev { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi .spark { position: relative; margin: 10px -16px 0; width: calc(100% + 32px); }
.kpi.nodata .value { color: var(--text-3); }
.kpi.nodata { padding-bottom: 16px; }
.ch-ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; color: var(--c, var(--text-2)); background: color-mix(in srgb, var(--c, var(--text-3)) 13%, transparent); }
.ch-ic svg { width: 14px; height: 14px; }
.ch-ic.lg { width: 36px; height: 36px; border-radius: 11px; }
.ch-ic.lg svg { width: 19px; height: 19px; }

.delta { display: inline-flex; align-items: center; gap: 2px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--up); background: var(--up-soft); }
.delta.down { color: var(--down); background: var(--down-soft); }
.delta.flat { color: var(--text-3); background: var(--sunken); }
.delta svg { width: 11px; height: 11px; stroke-width: 2.8; }

/* Insights */
.insights { display: flex; flex-direction: column; padding: 2px 0 6px; }
.insight { display: flex; gap: 12px; padding: 12px 18px; color: var(--text); border-top: 1px solid var(--line); transition: background .15s; }
.insight:first-child { border-top: 0; }
.insight:hover { background: color-mix(in srgb, var(--sunken) 60%, transparent); text-decoration: none; }
.insight .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.insight .ic.up { color: var(--up); background: var(--up-soft); }
.insight .ic.down { color: var(--down); background: var(--down-soft); }
.insight .ic.warn { color: var(--warning); background: var(--warning-soft); }
.insight .ic.record { color: var(--series-7); background: color-mix(in srgb, var(--series-7) 13%, transparent); }
.insight .ic.country { color: var(--primary); background: var(--primary-soft); font-size: 16px; }
.insight .t { font-weight: 600; font-size: 13.5px; letter-spacing: -.01em; }
.insight .b { font-size: 12.5px; color: var(--text-2); margin-top: 1px; }

/* Chart */
.chart { width: 100%; position: relative; }
.chart-svg { display: block; overflow: visible; }
.chart-svg .grid { stroke: var(--grid); stroke-width: 1; }
.chart-svg .axis-base { stroke: var(--axis); stroke-width: 1; }
.chart-svg .tick { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; font-family: var(--font); }
.chart-svg .hair { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 2 3; }
.chart-svg .ring { stroke: var(--card); stroke-width: 2.5; }
.chart-svg .col:hover path, .chart-svg .col:focus path { filter: brightness(1.15); }
.chart-svg rect:focus, .chart-svg g:focus { outline: none; }
.chart-svg .draw { stroke-dasharray: var(--len); animation: draw 1.1s var(--ease) both; }
.chart-svg .fade { animation: fadein .9s var(--ease) both; }
@keyframes draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@keyframes fadein { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .chart-svg .draw, .chart-svg .fade, .bar-row .fill { animation: none; } }
.chart-tip {
  position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; opacity: 0; min-width: 160px; max-width: 320px; padding: 10px 12px; border-radius: 13px;
  background: color-mix(in srgb, var(--raised) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); font-size: 12.5px; transition: opacity .12s;
}
.chart-tip.show { opacity: 1; }
.chart-svg .note-line { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 1 3; }
.chart-svg .note-dot { fill: var(--card); stroke: var(--text-2); stroke-width: 1.75; }
.tip-note { display: flex; gap: 7px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); color: var(--text); font-weight: 550; }
.tip-note::before { content: '✎'; color: var(--text-3); }
.tip-title { color: var(--text-3); font-weight: 550; margin-bottom: 6px; font-size: 12px; }
.tip-row { display: flex; align-items: center; gap: 8px; line-height: 1.75; }
.tip-row strong { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tip-name { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip-key { width: 14px; height: 0; border-top: 2.5px solid var(--c); border-radius: 2px; flex: none; }
.tip-key.dashed { border-top-style: dashed; border-top-width: 2px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 16px; height: 0; border-top: 2.5px solid var(--c); border-radius: 2px; }
.legend i.dashed { border-top: 2px dashed var(--c); }
.legend i.box { width: 10px; height: 10px; border: 0; border-radius: 3px; background: var(--c); }
.spark { display: block; }

/* Split bar (platform share) */
.split { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--sunken); }
.split i { display: block; height: 100%; background: var(--c); }
.split-legend { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; }
.split-legend .it { display: flex; align-items: center; gap: 9px; }
.split-legend .it b { font-size: 19px; letter-spacing: -.035em; font-weight: 650; display: block; line-height: 1.1; }
.split-legend .it .s { display: block; font-size: 12px; color: var(--text-3); }

/* Calendar heatmap */
.heat { overflow-x: auto; scrollbar-width: thin; padding: 2px 0 4px; }
.heat svg { display: block; }
.heat rect.c:hover { stroke: var(--text); stroke-width: 1.5; }
.heat-legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: 11.5px; color: var(--text-3); margin-top: 10px; }
.heat-legend i { width: 11px; height: 11px; border-radius: 3px; background: var(--c); }

/* Bar list */
.bars { display: flex; flex-direction: column; }
.bar-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 7px 20px; min-height: 40px; }
.bar-row:hover { background: color-mix(in srgb, var(--sunken) 55%, transparent); }
.bar-row .fill { position: absolute; left: 12px; top: 5px; bottom: 5px; border-radius: 4px 8px 8px 4px; background: color-mix(in srgb, var(--c, var(--series-1)) 14%, transparent); max-width: calc(100% - 24px); transform-origin: left; animation: grow .7s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.bar-row .k { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar-row .k .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.bar-row .k .s { color: var(--text-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .v { position: relative; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; letter-spacing: -.01em; }
.bar-row .d { position: relative; min-width: 58px; text-align: right; }
.bar-row a.t { color: var(--text); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .k > span { overflow: hidden; }
.flag { font-size: 16px; line-height: 1; }
.more { padding: 8px 20px 2px; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { position: sticky; top: 0; text-align: right; font-weight: 550; font-size: 11.5px; letter-spacing: .02em; color: var(--text-3); padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--card); white-space: nowrap; cursor: pointer; user-select: none; }
.tbl th:first-child, .tbl td:first-child { text-align: left; padding-left: 20px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 20px; }
.tbl th.sorted { color: var(--text); }
.tbl td { padding: 9px 14px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td.key { max-width: 440px; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: normal; font-weight: 500; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--sunken) 55%, transparent); }
.tbl .sub { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 400; }
.tbl .chg { font-size: 11px; margin-left: 6px; font-weight: 600; }
.chg.up { color: var(--up); } .chg.down { color: var(--down); }
.tbl.lb td { vertical-align: middle; }
.tbl.lb tbody tr { cursor: pointer; }
.lb-name { display: flex; align-items: center; gap: 12px; }
.lb-name .t { font-weight: 600; letter-spacing: -.01em; }
.lb-val { font-weight: 650; letter-spacing: -.01em; }
.lb-val .chg { display: block; margin: 0; }

/* Tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 4px 0 20px; padding: 4px; border-radius: 14px; background: var(--sunken); border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 10px; font-weight: 550; font-size: 13px; color: var(--text-2); white-space: nowrap; transition: color .15s, background .15s; }
.tabs button:hover, .tabs a:hover { color: var(--text); text-decoration: none; }
.tabs .on { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.tabs svg { width: 15px; height: 15px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--sunken); color: var(--text-2); white-space: nowrap; border: 1px solid var(--line); }
.badge.ok { background: var(--up-soft); color: var(--up); border-color: transparent; }
.badge.err { background: var(--down-soft); color: var(--down); border-color: transparent; }
.badge.warn { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge.blue { background: var(--primary-soft); color: var(--primary-ink); border-color: transparent; }
.badge.brand { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.app-icon { width: 28px; height: 28px; border-radius: 22%; flex: none; object-fit: cover; background: var(--sunken); box-shadow: 0 0 0 1px var(--line), 0 2px 6px -2px rgba(0, 0, 0, .25); }
.app-icon.xs { width: 18px; height: 18px; }
.app-icon.sm { width: 22px; height: 22px; }
.app-icon.md { width: 40px; height: 40px; }
.app-icon.lg { width: 76px; height: 76px; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -16px rgba(0, 0, 0, .5); }

/* Avatars */
.avatar { position: relative; width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; overflow: hidden; font-size: 12.5px; font-weight: 650; color: #fff; background: var(--c, #6250d6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.avatar.grad { background: var(--c, #4f8cff); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.fav { background: var(--card); box-shadow: 0 0 0 1px var(--line-2); }
.avatar.fav img { width: 58%; height: 58%; object-fit: contain; }
.avatar.fav.on-dark { background: #16171b; box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); }
.avatar.fav.own img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xs { width: 20px; height: 20px; border-radius: 6px; font-size: 9.5px; }
.avatar.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }
.avatar.lg { width: 56px; height: 56px; border-radius: 17px; font-size: 20px; }
.avatar.xl { width: 76px; height: 76px; border-radius: 22px; font-size: 28px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.avatar.round { border-radius: 50%; }
.stack { display: flex; align-items: center; }
.stack > * + * { margin-left: -8px; }
.stack > * { box-shadow: 0 0 0 2px var(--card) !important; }

/* Project cards */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; overflow: hidden; color: var(--text); transition: border-color .2s, box-shadow .25s, transform .25s var(--ease); }
.pcard:hover { text-decoration: none; border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pcard-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; }
.pcard-h h3 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.025em; }
.pcard-h .s { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.plats { display: flex; gap: 4px; }
.plat { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 7px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.plat svg { width: 12px; height: 12px; }
.pcard-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; padding: 18px 20px 4px; }
.mini .l { font-size: 11.5px; font-weight: 550; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .v { font-size: 19px; font-weight: 650; letter-spacing: -.035em; line-height: 1.3; }
.mini .delta { height: 18px; font-size: 10.5px; padding: 0 6px; }
.pcard-spark { margin: auto 0 0; padding-top: 6px; }
.pcard-foot { display: flex; align-items: center; gap: 12px; padding: 12px 20px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.pcard-foot b { color: var(--text); font-weight: 650; }
.rating-pill { display: inline-flex; align-items: center; gap: 5px; }
.rating-pill svg { width: 12px; height: 12px; }

/* Project cover */
.cover { position: relative; overflow: hidden; padding: 26px 26px 22px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.cover > * { position: relative; z-index: 1; }
.cover h2 { margin: 0; font-size: 28px; font-weight: 650; letter-spacing: -.045em; }
.cover .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--text-2); font-size: 13px; margin-top: 4px; align-items: center; }
.linked { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.link-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border-radius: 11px; background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--line-2); color: var(--text); font-size: 13px; font-weight: 550; backdrop-filter: blur(6px); transition: border-color .15s, transform .15s; }
.link-chip:hover { border-color: var(--line-3); text-decoration: none; transform: translateY(-1px); }
.link-chip .k { color: var(--text-3); font-weight: 500; font-size: 12px; }
.link-chip.add { border-style: dashed; color: var(--text-2); padding: 0 12px; }

/* Platform panels */
.pp { display: flex; flex-direction: column; color: var(--text); }
a.pp:hover { text-decoration: none; border-color: var(--line-2); }
.pp-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px 4px; }
.pp-h h3 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.015em; }
.pp-h .sub { font-size: 12px; color: var(--text-3); }
.pp-m { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px 20px 4px; }
.pp-chart { padding: 6px 0 0; margin-top: auto; }

/* Feed */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 12px 20px; color: var(--text); border-top: 1px solid var(--line); transition: background .15s; align-items: flex-start; }
.feed-item:first-child { border-top: 0; }
.feed-item:hover { background: color-mix(in srgb, var(--sunken) 55%, transparent); text-decoration: none; }
.feed-item .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--sunken); color: var(--text-2); font-size: 15px; }
.feed-item .ic.review { color: var(--star); background: var(--warning-soft); }
.feed-item .ic.status { color: var(--primary); background: var(--primary-soft); }
.feed-item .ic.record { color: var(--series-7); background: color-mix(in srgb, var(--series-7) 13%, transparent); }
.feed-item .ic.sale { color: var(--up); background: var(--up-soft); }
.feed-item .t { font-weight: 600; font-size: 13.5px; letter-spacing: -.01em; }
.feed-item .b { color: var(--text-2); font-size: 12.5px; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-item .w { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.feed-item .amt { margin-left: auto; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; padding-left: 8px; }
.feed-item .amt.neg { color: var(--down); }
.feed-item.focus { background: var(--primary-soft); }

/* Live */
.live-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--up); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--up); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.pulse.idle { background: var(--text-3); animation: none; }
.live-strip { display: flex; align-items: center; gap: 16px; margin: -6px 0 18px; padding: 10px 14px 10px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); flex-wrap: wrap; }
.ls-n { display: flex; align-items: baseline; gap: 8px; }
.ls-n b { font-size: 20px; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ls-n span { color: var(--text-2); font-size: 13px; }
.ls-bars { display: flex; align-items: flex-end; gap: 2px; height: 26px; }
.ls-bars i { width: 4px; border-radius: 2px 2px 1px 1px; background: var(--up); opacity: .75; }
.ls-bars i.z { background: var(--line-2); opacity: 1; }
.ls-bars i:last-child { opacity: 1; }
.ls-top { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; min-width: 0; }
.ls-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px 0 5px; border-radius: 10px; background: var(--sunken); color: var(--text); font-size: 12.5px; font-weight: 550; max-width: 220px; }
.ls-chip:hover { text-decoration: none; background: var(--line); }
.ls-chip b { font-variant-numeric: tabular-nums; color: var(--up); }
@media (max-width: 900px) { .ls-top { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .ls-bars { margin-left: auto; } }

/* Weekday × hour heatmap (sequential blue ramp) */
.card-b.flush .wheat-box { padding: 4px 20px 14px; }
.wheat-wrap { overflow-x: auto; scrollbar-width: thin; }
.wheat { display: grid; grid-template-columns: 34px repeat(24, minmax(16px, 1fr)) 46px; gap: 3px; min-width: 560px; align-items: center; }
.wheat .hh { font-size: 10.5px; color: var(--text-3); text-align: left; font-variant-numeric: tabular-nums; }
.wheat .dd { font-size: 11.5px; color: var(--text-2); font-weight: 550; }
.wheat .tt { font-size: 11.5px; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.wheat i, .heat-legend i.s0, .heat-legend i.s1, .heat-legend i.s2, .heat-legend i.s3, .heat-legend i.s4, .heat-legend i.s5 { display: block; aspect-ratio: 1; border-radius: 4px; background: var(--sunken); }
.wheat i:hover { outline: 1.5px solid var(--text); }
.s1 { background: color-mix(in srgb, var(--series-1) 16%, var(--sunken)) !important; }
.s2 { background: color-mix(in srgb, var(--series-1) 34%, var(--sunken)) !important; }
.s3 { background: color-mix(in srgb, var(--series-1) 55%, var(--sunken)) !important; }
.s4 { background: color-mix(in srgb, var(--series-1) 78%, var(--sunken)) !important; }
.s5 { background: var(--series-1) !important; }
.heat-legend i.s1, .heat-legend i.s2, .heat-legend i.s3, .heat-legend i.s4, .heat-legend i.s5 { width: 11px; }

/* Position distribution */
.pdist { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.pd { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 14px 0; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; min-height: 150px; }
.pd-l { font-size: 12px; font-weight: 600; color: var(--text-2); }
.pd-v { font-size: 26px; font-weight: 650; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pd-bar { margin-top: auto; width: calc(100% + 28px); margin-left: -14px; height: 46px; display: flex; align-items: flex-end; }
.pd-bar i { display: block; width: 100%; background: color-mix(in srgb, var(--c-gsc) 22%, transparent); border-top: 2px solid var(--c-gsc); }
.pd.p1 .pd-bar i, .pd.p2 .pd-bar i { background: color-mix(in srgb, var(--c-gsc) 40%, transparent); }

/* Keywords */
.kw-list { border-top: 1px solid var(--line); }
.kw-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.kw-row:last-child { border-bottom: 0; }
.kw-row:hover { background: color-mix(in srgb, var(--sunken) 55%, transparent); }
.kw-row .t { font-weight: 600; letter-spacing: -.01em; }
.kw-row .s { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.kw-row .s b { color: var(--text-2); }
.kw-spark { flex: none; width: 160px; }
.pos-badge { flex: none; width: 52px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 16px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; background: var(--sunken); color: var(--text-2); }
.pos-badge.top3 { background: var(--up-soft); color: var(--up); }
.pos-badge.top10 { background: var(--primary-soft); color: var(--primary-ink); }
.pos-badge.top20 { background: var(--warning-soft); color: var(--warning); }

/* Page speed */
.gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 6px 20px 22px; }
.gauge { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.gauge b { position: absolute; top: 26px; font-size: 26px; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.gauge span { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.gauge .g-bg { fill: none; stroke: var(--sunken); stroke-width: 7; }
.gauge .g-fg { fill: none; stroke-width: 7; stroke-linecap: round; transition: stroke-dasharray .8s var(--ease); }
.gauge.good .g-fg { stroke: var(--up); } .gauge.good b { color: var(--up); }
.gauge.mid .g-fg { stroke: var(--warning); } .gauge.mid b { color: var(--warning); }
.gauge.bad .g-fg { stroke: var(--danger); } .gauge.bad b { color: var(--danger); }
.vitals { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.vital { padding: 14px; border-radius: 14px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.vital .vv { font-size: 24px; font-weight: 650; letter-spacing: -.04em; }
.vbar { height: 6px; border-radius: 3px; background: var(--down-soft); overflow: hidden; margin: 6px 0 2px; }
.vbar i { display: block; height: 100%; background: var(--up); }
.sdot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); flex: none; }
.sdot.good { background: var(--up); } .sdot.mid { background: var(--warning); } .sdot.bad { background: var(--danger); }
.psi-shot { max-width: 100%; border-radius: 14px; box-shadow: 0 0 0 1px var(--line); }
.psi-shot.mobile { max-height: 520px; }
@media (max-width: 900px) { .pdist { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kw-spark { display: none; } }

/* Retention */
.tbl.ret td, .tbl.ret th { text-align: center; padding: 6px 4px; }
.tbl.ret td:first-child, .tbl.ret th:first-child { text-align: left; }
.tbl.ret th { cursor: default; }
.tbl.ret tr.avg td { border-top: 2px solid var(--line-2); font-weight: 650; }
.rt { display: block; min-width: 54px; padding: 6px 4px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--sunken); }
.rt.strong { color: #fff; }

/* Indexing */
.ix-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.ix-row:first-child { border-top: 0; }
.ix-row:hover { background: color-mix(in srgb, var(--sunken) 55%, transparent); }
.ix-row .t { font-weight: 600; }
.ix-row .s { font-size: 12.5px; color: var(--text-3); }
.ix-row > svg:last-child { color: var(--text-3); flex: none; }
.ix-v { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ix-v.lg { width: 40px; height: 40px; }
.ix-v.ok { color: var(--up); background: var(--up-soft); }
.ix-v.bad { color: var(--down); background: var(--down-soft); }
.ix-v.err { color: var(--warning); background: var(--warning-soft); }
.kvs { display: flex; flex-direction: column; }
.kv { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.kv:first-child { border-top: 0; }
.kv span { color: var(--text-3); }
.kv b { font-weight: 550; word-break: break-word; }
@media (max-width: 900px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* Uptime */
.up-hero { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.up-hero b { font-size: 17px; letter-spacing: -.02em; }
.up-hero .muted { font-size: 13px; }
.pulse.red { background: var(--down); animation-name: pulse-red; }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--down) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.up-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.up-card { display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 16px; text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.up-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-lg); }
.up-card .t { font-weight: 650; letter-spacing: -.015em; }
.up-card .s { font-size: 12px; color: var(--text-3); }
.up-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 3px 9px 3px 8px; border-radius: 999px; white-space: nowrap; }
.up-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.up-state.ok { color: var(--up); background: var(--up-soft); }
.up-state.down { color: var(--down); background: var(--down-soft); }
.up-state.lg { width: 40px; height: 40px; padding: 0; justify-content: center; }
.up-state.lg::before { width: 12px; height: 12px; }
.up-strip { display: grid; grid-template-columns: repeat(48, 1fr); gap: 2px; height: 26px; }
.up-strip i { border-radius: 2px; background: var(--up); opacity: .85; }
.up-strip i.none { background: var(--sunken); opacity: 1; }
.up-strip i.part { background: var(--warning); }
.up-strip i.down { background: var(--down); }
.up-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.up-stats span { display: block; font-size: 11px; color: var(--text-3); }
.up-stats b { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.up-err { font-size: 12.5px; color: var(--down); background: var(--down-soft); padding: 8px 10px; border-radius: 10px; }
.up-pill { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.up-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.up-pill.ok { color: var(--up); background: var(--up-soft); }
.up-pill.down { color: var(--down); background: var(--down-soft); }
.up-pill:hover { text-decoration: none; }

/* Goals */
.goals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.goals-grid.big { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); }
.goal { padding: 18px 20px 16px; }
.goal.compact { cursor: pointer; }
.goal .t { font-weight: 650; letter-spacing: -.015em; }
.goal .s { font-size: 12px; color: var(--text-3); }
.goal-nums { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; }
.goal-nums .v { font-size: 28px; font-weight: 650; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.goal-nums b { font-size: 15px; font-variant-numeric: tabular-nums; }
.goal-bar { position: relative; height: 10px; border-radius: 5px; background: var(--sunken); margin-top: 10px; }
.goal-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--series-1); transition: width .8s var(--ease); }
.goal-bar i.ok { background: var(--up); }
.goal-bar i.warn { background: var(--warning); }
.goal-bar i.err { background: var(--down); }
.goal-now { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 1px; background: var(--text); }
.goal-chart { margin-top: 12px; }

/* Compare */
.cmp-chip.on { background: var(--card); color: var(--text); border-color: var(--cc, var(--text)); box-shadow: inset 0 0 0 1px var(--cc, var(--text)); }
.cmp-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }

/* Report */
.rp-cover { display: flex; align-items: center; gap: 20px; padding: 24px; flex-wrap: wrap; }
.rp-cover h2 { margin: 2px 0 4px; font-size: 28px; letter-spacing: -.045em; }
.rp-foot { text-align: center; font-size: 12px; margin: 28px 0 0; }
.share-mode { grid-template-columns: minmax(0, 1fr) !important; }
.share-mode .content { margin: 0 auto; }

/* Stars & reviews */
.stars { display: inline-flex; gap: 1px; color: var(--star); }
.stars svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.stars svg.off { fill: var(--line-3); }
.reviews { display: flex; flex-direction: column; gap: 12px; }
.review { padding: 18px 20px; }
.review.focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft), var(--shadow); }
.review-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-h .who { color: var(--text-3); font-size: 12.5px; }
.review h4 { margin: 10px 0 4px; font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.review p { margin: 0; color: var(--text-2); white-space: pre-line; }
.review p.only { margin-top: 10px; color: var(--text); }
.response { margin-top: 14px; padding: 12px 14px; border-radius: 13px; background: var(--sunken); border: 1px solid var(--line); }
.response .l { font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.response p { color: var(--text); }
.review .actions { margin-top: 12px; display: flex; gap: 8px; }
.dist { display: flex; flex-direction: column; gap: 4px; }
.dist-row { display: grid; grid-template-columns: 34px 1fr 52px; align-items: center; gap: 10px; font-size: 13px; border-radius: 9px; padding: 4px 6px; text-align: left; }
button.dist-row:hover { background: var(--sunken); }
.dist-row.on { background: var(--primary-soft); }
.dist-row .track { height: 8px; border-radius: 4px; background: var(--sunken); overflow: hidden; }
.dist-row .track i { display: block; height: 100%; border-radius: 4px; background: var(--star); }
.dist-row .n { text-align: right; color: var(--text-3); font-variant-numeric: tabular-nums; }
.big-rating { display: flex; align-items: baseline; gap: 10px; }
.big-rating .v { font-size: 52px; font-weight: 650; letter-spacing: -.055em; line-height: 1; }
.store-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-2); padding: 0 8px; height: 22px; border-radius: 999px; background: var(--sunken); }
.store-tag svg { width: 12px; height: 12px; }
.side-sticky { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 16px; }

/* App header */
.app-head { display: flex; gap: 20px; align-items: center; padding: 24px; overflow: hidden; flex-wrap: wrap; }
.app-head > * { position: relative; z-index: 1; }
.app-head h2 { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.04em; }
.app-head .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-2); font-size: 13px; margin-top: 6px; align-items: center; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 12.5px; padding: 4px 10px 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--text-3)) 12%, transparent); color: var(--text); white-space: nowrap; }
.status-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--text-3)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--text-3)) 25%, transparent); }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center; padding: 11px 20px; border-top: 1px solid var(--line); }
.tl-item:first-child { border-top: 0; }
.tl-item .ver { font-weight: 600; font-family: var(--mono); font-size: 13px; }
.shots { display: flex; gap: 12px; overflow-x: auto; padding: 4px 20px 18px; scroll-snap-type: x mandatory; }
.shots img { height: 300px; border-radius: 18px; scroll-snap-align: start; box-shadow: 0 0 0 1px var(--line); background: var(--sunken); }

/* Notices & empty states */
.notice { display: flex; gap: 12px; padding: 13px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; }
.notice.warn { background: var(--warning-soft); border-color: transparent; color: var(--text); }
.notice.err { background: var(--down-soft); border-color: transparent; color: var(--text); }
.notice.info { background: var(--primary-soft); border-color: transparent; color: var(--text); }
.notice svg.i { margin-top: 1px; }
.notices { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.notices:empty { display: none; }
.empty { text-align: center; padding: 56px 24px; color: var(--text-2); }
.empty .ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 16px; background: var(--sunken); color: var(--text); border: 1px solid var(--line); }
.empty h3 { margin: 0 0 6px; color: var(--text); font-size: 18px; letter-spacing: -.025em; }
.empty p { margin: 0 auto 18px; max-width: 460px; }
.nodata { display: grid; place-items: center; min-height: 170px; color: var(--text-3); font-size: 13px; text-align: center; padding: 20px; }
.loader { display: grid; place-items: center; min-height: 60vh; }
#root > .loader { position: fixed; inset: 0; min-height: 0; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--primary); animation: spin .8s linear infinite; }
.inline-load { display: grid; place-items: center; min-height: 150px; }
.skel { border-radius: 10px; background: var(--sunken); animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }

/* Settings, lists */
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; position: relative; padding-left: 36px; color: var(--text-2); line-height: 1.55; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--primary-soft); color: var(--primary-ink); }
.steps li b { color: var(--text); font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: 12px; background: var(--sunken); padding: 2px 6px; border-radius: 6px; word-break: break-all; border: 1px solid var(--line); }
.copy { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; border-radius: 11px; background: var(--sunken); border: 1px solid var(--line); }
.copy code { background: none; border: 0; padding: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; border-radius: 16px; text-align: center; border: 1.5px dashed var(--line-3); background: var(--sunken); color: var(--text-2); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-soft); }
.drop.has { border-style: solid; border-color: var(--up); background: var(--up-soft); color: var(--text); }
.progress { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--sunken); border: 1px solid var(--line); }
.pstep { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: var(--text-3); transition: color .2s; }
.pstep .pdot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-3); flex: none; display: grid; place-items: center; transition: all .2s; }
.pstep.now { color: var(--text); font-weight: 550; }
.pstep.now .pdot { border-color: var(--line-2); border-top-color: var(--text); animation: spin .8s linear infinite; }
.pstep.done { color: var(--text-2); }
.pstep.done .pdot { background: var(--up); border-color: var(--up); }
.pstep.done .pdot::after { content: ''; width: 6px; height: 3.5px; border: solid #fff; border-width: 0 0 1.8px 1.8px; transform: translateY(-1px) rotate(-45deg); }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-row .t { font-weight: 600; letter-spacing: -.01em; }
.list-row .s { font-size: 12.5px; color: var(--text-3); }
.icon-pick { position: relative; display: grid; border-radius: 9px; }
.icon-pick > span:last-child { position: absolute; right: -5px; bottom: -5px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); opacity: 0; transition: opacity .15s; }
.icon-pick:hover > span:last-child { opacity: 1; }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 4px 20px 20px; }
.slot { border-radius: 14px; border: 1px dashed var(--line-3); padding: 12px; min-height: 96px; display: flex; flex-direction: column; gap: 8px; background: color-mix(in srgb, var(--sunken) 40%, transparent); }
.slot .slot-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.slot .item { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 12.5px; font-weight: 550; }
.slot .item .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .add { display: flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border-radius: 10px; color: var(--text-3); font-size: 12.5px; font-weight: 550; border: 1px dashed transparent; transition: all .15s; margin-top: auto; }
.slot .add:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.picker { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); text-align: left; transition: all .15s; }
.pick:hover { border-color: var(--primary); background: var(--primary-soft); }
.pick .s { font-size: 12px; color: var(--text-3); }
.member { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line); }
.member:first-child { border-top: 0; }
.member .projs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.member .projs .badge i { width: 7px; height: 7px; border-radius: 2px; background: var(--c); }
.cred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 14px; }
.cred-grid .list-row.cred { border-top: 1px solid var(--line); align-items: flex-start; padding: 18px 20px; }
.src-list { columns: 2; column-gap: 0; column-rule: 1px solid var(--line); overflow: hidden; }
.src-list .list-row { border-top: 0; border-bottom: 1px solid var(--line); margin-bottom: -1px; break-inside: avoid; }
.split-2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.pref { display: flex; align-items: center; gap: 14px; padding: 15px 20px; border-top: 1px solid var(--line); }
.pref:first-child { border-top: 0; }
.pref .t { font-weight: 600; }
.pref .s { font-size: 12.5px; color: var(--text-3); }

/* Alerts */
.rule { padding: 18px 20px; display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.rule .sentence { flex: 1; min-width: 280px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; line-height: 2.1; }
.rule .sentence .select, .rule .sentence .input { height: 32px; font-size: 13px; border-radius: 9px; width: auto; }
.rule .sentence .input { width: 72px; text-align: right; }
.rule .state { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); margin-top: 8px; flex-wrap: wrap; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.preset { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 15px 16px; border-radius: 15px; border: 1px solid var(--line); background: var(--card); transition: all .2s var(--ease); box-shadow: var(--shadow-sm); }
.preset:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.preset .t { font-weight: 600; font-size: 13.5px; margin-top: 10px; letter-spacing: -.01em; }
.preset .s { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

/* Command palette */
.palette-back { position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, .4); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade .12s; }
.palette { width: min(620px, 100%); border-radius: 18px; background: var(--raised); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .16s var(--ease); }
.palette input { width: 100%; height: 56px; border: 0; outline: 0; background: transparent; padding: 0 20px 0 50px; font-size: 16px; }
.palette .q { position: relative; border-bottom: 1px solid var(--line); }
.palette .q svg { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.palette .results { max-height: 52vh; overflow-y: auto; padding: 6px; }
.palette .res { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: 11px; text-align: left; }
.palette .res.on { background: var(--sunken); }
.palette .res .s { margin-left: auto; font-size: 12px; color: var(--text-3); }
.palette .grp { padding: 8px 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }

/* Modal & toast */
.modal-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .42); backdrop-filter: blur(4px); animation: fade .15s; }
.modal-back.leaving { animation: fade .18s reverse forwards; }
.modal-back.leaving .modal { animation: pop .18s var(--ease) reverse forwards; }
html.locked { overflow: hidden; }
.grabber { display: none; }
.sheet-me { display: flex; align-items: center; gap: 14px; padding: 18px 20px 6px; }
.sheet-me b { font-size: 16px; letter-spacing: -.02em; }
.sheet-group { margin: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.sheet-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 10px 16px; color: var(--text); font-weight: 550; font-size: 15px; text-align: left; border-top: 1px solid var(--line); }
.sheet-row:first-child { border-top: 0; }
.sheet-row:hover { text-decoration: none; background: var(--sunken); }
.sheet-row > svg:first-child { color: var(--text-2); }
.sheet-row small { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.sheet-row > svg:last-child { color: var(--text-3); }
.cp-count { font-size: 12.5px; margin: 0 2px 8px; }
.cp-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 56vh; overflow-y: auto; padding: 2px; }
.cp-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); transition: opacity .2s, border-color .2s; }
.cp-row.off { opacity: .5; }
.cp-row.off:hover { opacity: .8; }
.cp-pin { color: var(--text-3); }
.cp-pin.on { color: var(--text); background: var(--sunken); }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 22px; background: var(--raised); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); animation: pop .2s var(--ease); }
.modal.wide { width: min(760px, 100%); }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 20px 22px 6px; }
.modal-h h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.025em; }
.modal-h .sub { font-size: 12.5px; color: var(--text-3); }
.modal-b { padding: 12px 22px 8px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; }
#toast-root { position: fixed; z-index: 300; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 13px; background: var(--text); color: var(--bg); font-weight: 550; box-shadow: var(--shadow-lg); animation: pop .2s var(--ease); pointer-events: auto; max-width: min(540px, calc(100vw - 32px)); }
.toast.err { background: var(--danger); color: #fff; }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: #07080b; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art > * { position: relative; }
.auth-art h2 { font-size: 42px; line-height: 1.06; letter-spacing: -.05em; font-weight: 650; margin: 0 0 16px; max-width: 540px; }
.auth-art p { color: rgba(255, 255, 255, .62); font-size: 16px; max-width: 460px; margin: 0; }
.auth-art .brand { color: #fff; padding: 0; }
.auth-art .brand small { color: rgba(255, 255, 255, .5); }
.art-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 34px; max-width: 520px; }
.art-card { padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(10px); }
.art-card.wide { grid-column: span 2; }
.art-card .v { font-size: 28px; font-weight: 650; letter-spacing: -.045em; }
.art-card .l { font-size: 12.5px; color: rgba(255, 255, 255, .55); display: flex; align-items: center; gap: 7px; }
.art-card .delta.up { color: #2bd46b; background: rgba(43, 212, 107, .15); }
.art-card .ch-ic { background: rgba(255, 255, 255, .1); color: #fff; }
.auth-form { display: grid; place-items: center; padding: 32px 24px; }
.auth-card { width: min(380px, 100%); }
.auth-card .brand { padding: 0 0 28px; }
.auth-card h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.045em; font-weight: 650; }
.auth-card > p { margin: 0 0 26px; color: var(--text-2); }
.auth-card .btn { width: 100%; height: 44px; margin-top: 8px; }
.err-text { color: var(--danger); font-size: 13px; margin: 4px 0 8px; min-height: 1px; }

/* Mobile tab bar */
.tabbar { display: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1280px) {
  .hero-wrap { grid-template-columns: minmax(0, 1fr); }
  .split-2 { grid-template-columns: minmax(0, 1fr); }
  .src-list { columns: 1; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  /* Phones: a native-feeling app. Large titles that hand off to a compact
     blurred bar, a docked tab bar, sheets from the bottom, inset lists. */
  body { background: var(--bg); overscroll-behavior-y: none; }
  .app, .app.rail { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .mbar {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; position: fixed; z-index: 45; left: 0; right: 0; top: 0;
    height: calc(46px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 6px 0; text-align: center;
    background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px);
    border-bottom: .5px solid var(--line-2); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .18s, transform .18s;
  }
  .mbar.show { opacity: 1; transform: none; pointer-events: auto; }
  .mbar b { font-size: 15.5px; font-weight: 650; letter-spacing: -.02em; }
  .mb-back { width: 40px; height: 40px; display: grid; place-items: center; color: var(--accent); }
  .mb-back svg { width: 24px; height: 24px; stroke-width: 2.2; }
  .ptr { display: grid; place-items: center; position: fixed; z-index: 46; top: calc(10px + env(safe-area-inset-top)); left: 50%; width: 36px; height: 36px; border-radius: 50%; background: var(--raised); border: 1px solid var(--line-2); box-shadow: var(--shadow); color: var(--text-2); opacity: 0; transform: translate(-50%, -40px); pointer-events: none; }
  .ptr.spin { opacity: 1 !important; transform: translate(-50%, 40px) !important; }
  .ptr.spin svg { animation: spin .8s linear infinite; }
  .topbar { position: relative; padding: 14px 16px 10px; padding-top: calc(14px + env(safe-area-inset-top)); align-items: center; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; }
  .topbar.scrolled { border: 0; }
  .crumbs { font-size: 13px; }
  .crumbs a { color: var(--accent); }
  .topbar h1 { font-size: 32px; letter-spacing: -.045em; font-weight: 700; }
  .topbar h1 .t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .title-block { flex-basis: 100%; }
  .top-actions { width: calc(100% + 32px); margin: 0 -16px; padding: 2px 16px 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .top-actions::-webkit-scrollbar { display: none; }
  .content { padding: 4px 16px calc(96px + env(safe-area-inset-bottom)); }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .projects { grid-template-columns: minmax(0, 1fr); }
  .card { border-radius: 18px; box-shadow: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px 13px 0; border-radius: 16px; }
  .kpi .value { font-size: 22px; }
  .kpi .prev { display: none; }
  .kpi .spark { margin: 8px -13px 0; width: calc(100% + 26px); }
  .hero-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-tab { padding: 13px 14px 11px; border-bottom: 1px solid var(--line); }
  .hero-tab:nth-child(2n) { border-right: 0; }
  .hero-tab .v { font-size: 21px; }
  .hero-body { padding: 16px 14px 10px; }
  .hero-figure .v { font-size: 42px; }
  .greet p { font-size: 19px; }
  .section-title { margin: 28px 0 12px; }
  .card-h { padding: 15px 16px 6px; }
  .card-b { padding: 8px 16px 16px; }
  .bar-row { padding: 7px 16px; }
  .bar-row .fill { left: 8px; max-width: calc(100% - 16px); }
  .tbl th:first-child, .tbl td:first-child { padding-left: 16px; }
  .tl-item { grid-template-columns: 70px 1fr; }
  .tl-item > :last-child { grid-column: 2; justify-self: start; }
  .shots img { height: 230px; }
  .app-head, .cover { padding: 18px; gap: 14px; }
  .app-head .app-icon.lg, .cover .avatar.xl { width: 60px; height: 60px; }
  .cover h2, .app-head h2 { font-size: 22px; }
  .slots { grid-template-columns: minmax(0, 1fr); }
  .pp-m { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checks { grid-template-columns: minmax(0, 1fr); }
  .side-sticky { position: static; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .tabs { width: calc(100% + 32px); margin-left: -16px; margin-right: -16px; padding: 4px 16px; border-radius: 0; background: transparent; border: 0; }
  .tabs button, .tabs a { background: var(--sunken); }
  .tabs .on { background: var(--text); color: var(--bg); box-shadow: none; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 2px 16px; }
  .filters::-webkit-scrollbar { display: none; }
  .filters .search { min-width: 180px; }
  /* One swipeable row: nothing inside may shrink or wrap into a tall column. */
  .filters > * { flex: none; }
  .filters .chips { flex-wrap: nowrap; }
  .filters .grow { display: none; }
  .cred-grid, .cp-list { grid-template-columns: minmax(0, 1fr); }
  .cp-list { max-height: none; }
  .list-row, .member, .pref { padding-left: 16px; padding-right: 16px; }
  /* Docked tab bar */
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding: 6px 4px calc(4px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px);
    border-top: .5px solid var(--line-2);
  }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0 2px; font-size: 10.5px; font-weight: 600; color: var(--text-3); position: relative; letter-spacing: 0; transition: color .15s, transform .1s; }
  .tabbar a svg, .tabbar button svg { width: 24px; height: 24px; stroke-width: 1.9; }
  .tabbar a.active, .tabbar button.active { color: var(--accent); }
  .tabbar a.active svg, .tabbar button.active svg { stroke-width: 2.3; }
  .tabbar a:active, .tabbar button:active { transform: scale(.92); }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .count { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
  /* Sheets */
  .menu { position: fixed; left: 8px; right: 8px; top: auto; bottom: calc(8px + env(safe-area-inset-bottom)); min-width: 0; max-height: 72vh; overflow: auto; border-radius: 22px; animation: up .28s var(--ease); z-index: 120; }
  .modal-back { place-items: end center; padding: 0; }
  .modal, .modal.wide { width: 100%; border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom); max-height: 94vh; animation: up .32s cubic-bezier(.2, .9, .25, 1); transition: transform .25s var(--ease); }
  .modal-back.leaving .modal { animation: up .2s ease-in reverse forwards; }
  .modal.sheet { background: var(--bg); }
  .grabber { display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--line-3); margin: 8px auto 0; }
  .modal-f { position: sticky; bottom: 0; background: var(--raised); border-top: 1px solid var(--line); padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-f .btn { flex: 1; height: 44px; }
  .palette-back { padding-top: calc(10px + env(safe-area-inset-top)); }
  /* Native list */
  .ios-list { border-radius: 18px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
  .ios-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; color: var(--text); position: relative; }
  .ios-row + .ios-row::before { content: ''; position: absolute; top: 0; left: 62px; right: 0; border-top: 1px solid var(--line); }
  .ios-row:hover { text-decoration: none; }
  .ios-row:active { background: var(--sunken); }
  .ios-row .t { font-weight: 600; font-size: 15.5px; letter-spacing: -.015em; }
  .ios-row .s { font-size: 12.5px; color: var(--text-3); }
  .ios-row > svg:last-child { color: var(--text-3); flex: none; }
  .ios-val { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
  .ios-val b { font-size: 16px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
  /* Touch feedback instead of hover lifts */
  .pcard:hover, .preset:hover, .link-chip:hover { transform: none; box-shadow: none; }
  .pcard:active, .pp:active, .kpi.tap:active, .preset:active, .insight:active, .feed-item:active, .btn:active { transform: scale(.98); }
  .pcard, .pp, .kpi, .preset { transition: transform .12s var(--ease); }
  #toast-root { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@keyframes up { from { transform: translateY(100%); } }
@media (max-width: 420px) {
  .pcard-kpis { gap: 12px 6px; }
  .mini .v { font-size: 16px; }
}
@media (forced-colors: active) { .delta, .badge { border: 1px solid CanvasText; } }
@media print {
  .sidebar, .top-actions, .tabbar, .mbar, .ptr, .live-strip, [data-notes] { display: none !important; }
  .app { display: block; }
  :root, body { background: #fff !important; }
  .topbar { position: static; padding: 0 0 8px; border: 0; background: none; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; border-color: #e5e5ea; }
  .kpi { break-inside: avoid; }
  .grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  @page { margin: 14mm; }
}
@media (max-width: 900px) {
  .up-grid, .goals-grid, .goals-grid.big { grid-template-columns: minmax(0, 1fr); }
  .up-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rp-cover { padding: 18px; }
}

/* Setup checklist & guides */
.setup { margin-bottom: 16px; }
.setup-bar { width: 160px; height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.setup-bar i { display: block; height: 100%; background: var(--up); }
.setup-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; padding: 6px 20px 20px; }
.setup-i { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 13px; border: 1px solid var(--line); text-align: left; transition: border-color .15s, background .15s; }
.setup-i:not(.ok):hover { border-color: var(--line-3); background: var(--sunken); }
.setup-i b { display: block; font-weight: 600; font-size: 13.5px; }
.setup-i small { display: block; font-size: 12px; color: var(--text-3); }
.setup-i.ok { opacity: .65; cursor: default; }
.setup-i.ok b { text-decoration: line-through; text-decoration-color: var(--text-3); }
.setup-c { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-3); display: grid; place-items: center; flex: none; }
.setup-i.ok .setup-c { background: var(--up); border-color: var(--up); color: #fff; }
.setup-i > svg:last-child { color: var(--text-3); }
.how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.how-i { padding: 14px 16px; border-radius: 14px; background: var(--sunken); }
.how-i p { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; }
.step-box { display: flex; gap: 14px; padding: 16px; border-radius: 14px; border: 1px solid var(--line-2); }
.step-box.done { border-color: color-mix(in srgb, var(--up) 40%, transparent); }
.step-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 13px; background: var(--primary-soft); color: var(--primary-ink); }
.step-box.done .step-n { background: var(--up); color: #fff; }
.locked-card { opacity: .6; }
.prov { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.prov-i { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--line-2); text-align: left; transition: border-color .15s, box-shadow .15s; }
.prov-i span { font-size: 12px; color: var(--text-3); }
.prov-i.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
@media (max-width: 900px) { .how, .prov { grid-template-columns: minmax(0, 1fr); } .setup-bar { display: none; } }
.input.mono { background: var(--card); border: 1px solid var(--line-2); padding: 0 12px; border-radius: 11px; font-size: 13px; word-break: normal; }
.input.mono:focus { border-color: var(--primary); }

/* iOS Safari zooms into any field under 16px when it gets focus; on touch
   screens every field is 16px so the page stays put (pinch-zoom still works). */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px !important; }
}
