/* ==========================================================================
   Lumara Scroll Tracker — Lumara visual identity
   Mobile-first · light + dark themes · glass surfaces · no build step
   Brand: Purple #6D28FF · Violet #9333EA · Pink #EC4899 · Cyan #00D9FF · Green #22C55E
   ========================================================================== */

@font-face { font-family: "Inter Var"; src: url("../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Jakarta Var"; src: url("../fonts/jakarta-var.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

/* ---------- Design tokens ---------- */
:root {
  /* Brand (theme-independent) */
  --purple: #6D28FF;
  --violet: #9333EA;
  --pink: #EC4899;
  --cyan: #00D9FF;
  --green: #22C55E;
  --grad: linear-gradient(135deg, #6D28FF 0%, #9333EA 52%, #EC4899 100%);
  --grad-soft: linear-gradient(135deg, rgba(109,40,255,.14), rgba(147,51,234,.10) 50%, rgba(236,72,153,.12));
  --grad-cyan: linear-gradient(135deg, #6D28FF, #00D9FF);

  /* Type */
  --font: "Inter Var", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Jakarta Var", "Inter Var", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --fs-xs: .75rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem;

  /* Spacing scale (4px base) */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.25rem; --s6: 1.5rem; --s8: 2rem; --s10: 2.5rem; --s12: 3rem;

  /* Shape & motion */
  --r-sm: 10px; --r: 16px; --r-lg: 22px; --r-pill: 999px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --t-fast: .15s; --t: .25s; --t-slow: .5s;

  --tabbar-h: 68px;
}

/* Light theme (default) */
:root, [data-theme="light"] {
  --bg: #F7F5FF;
  --bg-2: #EEE9FF;
  --surface: rgba(255, 255, 255, .72);
  --surface-strong: rgba(255, 255, 255, .92);
  --surface-2: rgba(109, 40, 255, .055);
  --surface-3: rgba(109, 40, 255, .10);
  --input: rgba(255, 255, 255, .85);
  --border: rgba(109, 40, 255, .12);
  --border-strong: rgba(109, 40, 255, .24);
  --glass-edge: rgba(255, 255, 255, .9);
  --text: #1B1535;
  --text-2: #3E3760;
  --muted: #6A6488;
  --faint: #A29DBD;
  --link: #6D28FF;
  --good: #15A34A; --good-bg: rgba(34, 197, 94, .12);
  --warn: #D97706; --warn-bg: rgba(245, 158, 11, .14);
  --bad: #E11D48;  --bad-bg: rgba(225, 29, 72, .10);
  --info: #0891B2; --info-bg: rgba(0, 217, 255, .14);
  --shadow-sm: 0 1px 2px rgba(40, 16, 110, .06);
  --shadow: 0 1px 2px rgba(40, 16, 110, .05), 0 12px 32px -10px rgba(76, 29, 149, .18);
  --shadow-lg: 0 2px 6px rgba(40, 16, 110, .06), 0 24px 56px -16px rgba(76, 29, 149, .28);
  --glow: 0 8px 24px -6px rgba(109, 40, 255, .45);
  --orb-opacity: .55;
  --sheet: #FFFFFF;
  --chart-grid: rgba(109, 40, 255, .08);
  color-scheme: light;
}

/* Dark theme */
[data-theme="dark"] {
  --bg: #0B0820;
  --bg-2: #120D2E;
  --surface: rgba(28, 21, 64, .55);
  --surface-strong: rgba(30, 23, 68, .92);
  --surface-2: rgba(255, 255, 255, .045);
  --surface-3: rgba(255, 255, 255, .08);
  --input: rgba(10, 7, 30, .55);
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --glass-edge: rgba(255, 255, 255, .10);
  --text: #F3F0FF;
  --text-2: #D6D0F3;
  --muted: #A49DC8;
  --faint: #6F6896;
  --link: #B99BFF;
  --good: #34D876; --good-bg: rgba(34, 197, 94, .14);
  --warn: #FBBF24; --warn-bg: rgba(251, 191, 36, .13);
  --bad: #FB7185;  --bad-bg: rgba(251, 113, 133, .13);
  --info: #00D9FF; --info-bg: rgba(0, 217, 255, .12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 18px 40px -14px rgba(0, 0, 0, .65);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 28px 64px -18px rgba(0, 0, 0, .75);
  --glow: 0 10px 30px -6px rgba(147, 51, 234, .6);
  --orb-opacity: .75;
  --sheet: #171036;
  --chart-grid: rgba(255, 255, 255, .06);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
.theme-anim, .theme-anim * { transition: background-color var(--t-slow) var(--ease), border-color var(--t-slow) var(--ease), color var(--t) var(--ease) !important; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 var(--fs-md)/1.6 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: rgba(147, 51, 234, .28); }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--t-fast); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 var(--s2); letter-spacing: -.02em; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(1.55rem, 1.2rem + 1.6vw, 2.2rem); font-weight: 750; }
h2 { font-size: 1.02rem; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 var(--s3); }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-3); padding: .1em .4em; border-radius: 6px; }
img, svg { max-width: 100%; }
.icon { flex: none; display: inline-block; vertical-align: middle; }

.wrap { width: min(1200px, 100% - 2rem); margin-inline: auto; }
@media (min-width: 640px) { .wrap { width: min(1200px, 100% - 3rem); } }
main.wrap { flex: 1; padding-block: var(--s5) var(--s12); position: relative; z-index: 1; }

/* Utilities */
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.good { color: var(--good); } .bad { color: var(--bad); }
.mt { margin-top: var(--s6); } .mt-sm { margin-top: var(--s3); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; z-index: 50; }
.skip:focus { left: 1rem; top: 1rem; background: var(--grad); color: #fff; padding: .55rem 1rem; border-radius: var(--r-sm); }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; border-radius: 6px; }
[data-theme="dark"] :focus-visible { outline-color: #B99BFF; }
[hidden] { display: none !important; }

/* Ambient background orbs (cheap radial gradients, no filters) */
.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; opacity: var(--orb-opacity); will-change: transform; }
.o1 { width: 70vmax; height: 70vmax; left: -25vmax; top: -30vmax; background: radial-gradient(closest-side, rgba(109, 40, 255, .32), transparent); animation: drift 26s var(--ease) infinite alternate; }
.o2 { width: 60vmax; height: 60vmax; right: -25vmax; top: -10vmax; background: radial-gradient(closest-side, rgba(236, 72, 153, .22), transparent); animation: drift 32s var(--ease) infinite alternate-reverse; }
.o3 { width: 55vmax; height: 55vmax; left: 20vmax; bottom: -35vmax; background: radial-gradient(closest-side, rgba(0, 217, 255, .14), transparent); animation: drift 38s var(--ease) infinite alternate; }
@keyframes drift { to { transform: translate3d(4vmax, 3vmax, 0) scale(1.08); } }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: var(--s3); min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; white-space: nowrap; margin-right: auto; }
.brand-text { font-family: var(--font-display); font-size: 1.02rem; letter-spacing: -.01em; }
.brand-text strong { font-weight: 800; }
.brand-text span { font-weight: 500; color: var(--muted); }
.logo-mark { border-radius: 9px; box-shadow: var(--glow); transition: transform var(--t) var(--ease-spring); }
.brand:hover .logo-mark { transform: rotate(-8deg) scale(1.05); }
.topbar-tools { display: flex; align-items: center; gap: var(--s2); }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); cursor: pointer; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-strong); }
.icon-btn:active { transform: scale(.95); }
.theme-toggle [data-theme-icon] { display: none; line-height: 0; }
[data-theme-pref="auto"] .theme-toggle [data-theme-icon="auto"],
[data-theme-pref="light"] .theme-toggle [data-theme-icon="light"],
[data-theme-pref="dark"] .theme-toggle [data-theme-icon="dark"],
html:not([data-theme-pref]) .theme-toggle [data-theme-icon="light"] { display: inline; animation: spinIn .4s var(--ease-spring); }
@keyframes spinIn { from { transform: rotate(-90deg) scale(.6); opacity: 0; } }
.avatar { display: none; flex: none; width: 36px; height: 36px; border-radius: 50%; place-items: center; background: var(--grad); color: #fff; font-weight: 700; font-size: .9rem; box-shadow: var(--glow); }

/* Main nav — mobile: slide-down sheet; desktop (≥1100px): inline pill nav */
@media (max-width: 639.98px) { .hide-sm { display: none !important; } }
.mainnav {
  position: fixed; left: var(--s3); right: var(--s3); top: 72px; z-index: 40;
  display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: var(--s2);
  max-height: calc(100dvh - 90px); overflow-y: auto;
  background: var(--sheet); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg), 0 0 0 100vmax rgba(11, 8, 32, .28);
  opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none; visibility: hidden;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility 0s linear var(--t);
}
.mainnav.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.mainnav a, .nav-link {
  display: flex; align-items: center; gap: var(--s3); width: 100%;
  padding: .7rem .85rem; border-radius: 12px; border: 0; background: none;
  color: var(--text-2); font: 550 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; text-align: left;
  transition: background var(--t-fast), color var(--t-fast);
}
.mainnav a:hover, .nav-link:hover { background: var(--surface-2); color: var(--text); }
.mainnav a[aria-current="page"] { background: var(--grad-soft); color: var(--text); }
.mainnav a[aria-current="page"] .icon { color: var(--purple); }
[data-theme="dark"] .mainnav a[aria-current="page"] .icon { color: #C4A8FF; }
.nav-signout { display: block; border-top: 1px solid var(--border); margin-top: var(--s1); padding-top: var(--s1); }
.nav-only-sheet { border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; }
.nav-only-sheet + .nav-only-sheet { border-top: 0; }

@media (min-width: 1100px) {
  .nav-toggle { display: none; }
  .avatar { display: inline-grid; }
  .brand { margin-right: var(--s4); }
  .mainnav {
    position: static; flex-direction: row; align-items: center; gap: 2px; margin-right: auto; max-height: none; overflow: visible;
    padding: 4px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-sm);
    opacity: 1; transform: none; pointer-events: auto; visibility: visible;
  }
  .mainnav a, .nav-link { width: auto; padding: .45rem .8rem; border-radius: 10px; font-size: .9rem; gap: .45rem; white-space: nowrap; }
  .mainnav a .icon, .nav-link .icon { display: none; }
  .mainnav a[aria-current="page"] { background: var(--grad); color: #fff; box-shadow: var(--glow); }
  .nav-signout { border: 0; margin: 0; padding: 0; }
  .nav-signout .nav-link { color: var(--muted); }
  .nav-only-sheet { display: none !important; }
}

/* Bottom tab bar (app, mobile) */
.tabbar {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 0 var(--s2) env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid var(--border);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: var(--tabbar-h); color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 600;
  transition: color var(--t-fast);
}
.tabbar a[aria-current="page"] { color: var(--purple); }
[data-theme="dark"] .tabbar a[aria-current="page"] { color: #C4A8FF; }
.tabbar a:not(.tab-main)[aria-current="page"] .icon { transform: translateY(-1px); }
.tab-fab {
  display: grid; place-items: center; width: 52px; height: 52px; margin-top: -26px; border-radius: 18px;
  background: var(--grad); color: #fff; box-shadow: var(--glow), 0 0 0 5px var(--bg);
  transition: transform var(--t) var(--ease-spring);
}
.tab-main:active .tab-fab { transform: scale(.92); }
.tab-main[aria-current="page"] { color: var(--text); }
body.app main.wrap { padding-bottom: calc(var(--tabbar-h) + var(--s10)); }
body.app .footer { padding-bottom: calc(var(--tabbar-h) + var(--s6) + env(safe-area-inset-bottom)); }
@media (min-width: 1100px) {
  .tabbar { display: none; }
  body.app main.wrap { padding-bottom: var(--s12); }
  body.app .footer { padding-bottom: var(--s6); }
}

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 1; margin-top: var(--s8); border-top: 1px solid var(--border); padding: var(--s10) 0 var(--s6); color: var(--muted); font-size: var(--fs-sm); background: color-mix(in srgb, var(--bg) 60%, transparent); }
.footer-grid { display: grid; gap: var(--s8) var(--s6); grid-template-columns: 1fr 1fr; }
.footer-about { grid-column: 1 / -1; display: grid; gap: var(--s3); max-width: 340px; }
.footer-about p { margin: 0; line-height: 1.55; }
.footer-about .brand { margin: 0; }
.footer nav { display: grid; gap: .55rem; align-content: start; }
.footer h3 { font: 700 .72rem/1.2 var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--text); margin: 0 0 .35rem; }
.footer a { color: var(--muted); text-decoration: none; width: fit-content; }
.footer a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid var(--border); font-size: .82rem; }
.footer-brand { display: inline-flex; align-items: center; gap: .45rem; }
.footer-brand .logo-mark { box-shadow: none; }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .footer-about { grid-column: auto; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ---------- Glass cards & layout ---------- */
.card {
  position: relative; min-width: 0; margin-bottom: var(--s4); padding: var(--s5);
  background: var(--surface);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-edge);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t);
}
@media (min-width: 640px) { .card { padding: var(--s6); } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-head a.small { text-decoration: none; font-weight: 600; }
.card-head a.small:hover { text-decoration: underline; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; margin: var(--s2) 0 var(--s6); }
.page-head h1 { margin-bottom: var(--s1); }
.page-head p { margin: 0; }
.page-head .btn .icon { margin-left: -2px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-items: start; }
.grid-2 > .card, .grid-2 > div > .card:last-child { margin-bottom: 0; }
.grid-2 + .grid-2, .grid-2 + .card, .card + .grid-2, .tiles + .grid-2, .tiles + .card { margin-top: var(--s4); }
@media (min-width: 960px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.narrow { max-width: 600px; }
.row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.row-2 { display: grid; grid-template-columns: 1fr; gap: var(--s3); }
@media (min-width: 520px) { .row-2 { grid-template-columns: 1fr 1fr; } }

/* Entrance animation: content rises in, staggered */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
main.wrap > *, .tiles > .card, .grid-2 > * { animation: rise .55s var(--ease) backwards; }
.tiles > .card:nth-child(2), .grid-2 > :nth-child(2) { animation-delay: .06s; }
.tiles > .card:nth-child(3) { animation-delay: .12s; }
.tiles > .card:nth-child(4) { animation-delay: .18s; }
main.wrap > :nth-child(3) { animation-delay: .08s; } main.wrap > :nth-child(4) { animation-delay: .14s; } main.wrap > :nth-child(n+5) { animation-delay: .2s; }

/* ---------- Stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.tiles > .card { margin-bottom: 0; }
@media (min-width: 640px) { .tiles { gap: var(--s4); } }
@media (min-width: 1024px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { padding: var(--s4); overflow: hidden; }
@media (min-width: 640px) { .tile { padding: var(--s5); } }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-edge); border-color: var(--border-strong); }
.tile h2 { display: flex; align-items: center; gap: .5rem; font: 600 var(--fs-xs)/1.3 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: var(--s2); }
.tile-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--grad-soft); color: var(--purple); }
[data-theme="dark"] .tile-icon { color: #C4A8FF; }
.tiles > .tile:first-child { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--glow), var(--shadow); }
.tiles > .tile:first-child::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .25), transparent); pointer-events: none; }
.tiles > .tile:first-child h2, .tiles > .tile:first-child .muted, .tiles > .tile:first-child .small, .tiles > .tile:first-child a { color: rgba(255, 255, 255, .85); }
.tiles > .tile:first-child .big { color: #fff; }
.tiles > .tile:first-child .tile-icon { background: rgba(255, 255, 255, .18); color: #fff; }
.tiles > .tile:first-child .meter { background: rgba(255, 255, 255, .22); }
.tiles > .tile:first-child .meter span { background: #fff; }
.tiles > .tile:first-child .meter.is-over span { background: #FFE1EA; }
.big { font: 750 clamp(1.45rem, 1.1rem + 1.3vw, 2rem)/1.15 var(--font-display); letter-spacing: -.03em; margin: var(--s1) 0 var(--s2); font-variant-numeric: tabular-nums; color: var(--text); }
.unit { font: 500 .85rem/1 var(--font); color: var(--muted); letter-spacing: 0; }
.tile .small:last-child { margin: 0; }
.tile p.small { font-size: .8rem; }
@media (min-width: 640px) { .tile p.small { font-size: var(--fs-sm); } }

/* ---------- Buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 42px; padding: .6rem 1.15rem; border: 1px solid transparent; border-radius: 12px;
  background: var(--grad); background-size: 140% 140%; background-position: 0% 50%;
  color: #fff; font: 650 .93rem/1.2 var(--font); letter-spacing: .005em; text-decoration: none; cursor: pointer;
  box-shadow: var(--glow);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease), background-position var(--t-slow) var(--ease), filter var(--t-fast);
}
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn:hover { background-position: 100% 50%; transform: translateY(-1px); box-shadow: 0 14px 30px -8px rgba(147, 51, 234, .55); text-decoration: none; color: #fff; }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn-ghost::after { display: none; }
.btn-ghost:hover { background: var(--surface-strong); color: var(--text); border-color: var(--purple); box-shadow: var(--shadow); }
.btn-sm { min-height: 36px; padding: .42rem .85rem; font-size: .85rem; border-radius: 10px; }
.btn-lg { min-height: 50px; padding: .8rem 1.5rem; font-size: 1rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-danger, .btn-stop { background: linear-gradient(135deg, #F43F5E, #EC4899); box-shadow: 0 8px 22px -6px rgba(244, 63, 94, .5); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.linkish { background: none; border: 0; padding: 0; color: var(--link); font: inherit; font-weight: 550; cursor: pointer; text-decoration: none; }
.linkish:hover { text-decoration: underline; text-underline-offset: 3px; }
.linkish.danger, .danger { color: var(--bad); }
form.inline { display: inline; }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s4); }
.form h2 { margin-bottom: 0; }
label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 600; color: var(--text-2); }
label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 450; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: .62rem .85rem;
  font: 400 1rem/1.3 var(--font); color: var(--text);
  background: var(--input); border: 1px solid var(--border-strong); border-radius: 12px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
@media (min-width: 640px) { input, select, textarea { font-size: .95rem; } }
input::placeholder { color: var(--faint); }
input:hover, select:hover { border-color: color-mix(in srgb, var(--purple) 45%, var(--border-strong)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(109, 40, 255, .16); background: var(--surface-strong); }
select { appearance: none; padding-right: 2.2rem; 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='%239333EA' 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 .85rem center; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--purple); margin-top: .15rem; flex: none; }
input[type="color"] { width: 54px; padding: .2rem; cursor: pointer; }
input[type="date"] { min-width: 0; }
.hint { display: block; font-size: .82rem; font-weight: 400; color: var(--muted); margin: 0; line-height: 1.5; }
.field-error { color: var(--bad); font-size: .85rem; font-weight: 500; margin: -.6rem 0 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: .9rem; font-weight: 600; color: var(--text-2); margin-bottom: .35rem; padding: 0; }
/* Segmented control */
.seg { display: grid; }
.seg > legend { grid-column: 1 / -1; }
.seg { grid-template-columns: 1fr 1fr; gap: 4px; padding: 0; }
.seg > label {
  position: relative; display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px;
  padding: .5rem .75rem; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--input);
  font-weight: 600; font-size: .88rem; cursor: pointer; transition: all var(--t-fast);
}
.seg > label input { position: absolute; opacity: 0; pointer-events: none; }
.seg > label:has(input:checked) { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.seg > label:has(input:focus-visible) { outline: 2px solid var(--purple); outline-offset: 2px; }

/* ---------- Flash messages ---------- */
.flash { display: flex; gap: .6rem; align-items: flex-start; border-radius: 14px; padding: .8rem 1rem; margin-bottom: var(--s4); border: 1px solid; font-size: .93rem; font-weight: 500; animation: rise .4s var(--ease) backwards; }
.flash::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: .45rem; border-radius: 50%; background: currentColor; }
.flash-success { background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 35%, transparent); color: var(--good); }
.flash-error { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 35%, transparent); color: var(--bad); }
.flash-info { background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 35%, transparent); color: var(--info); }
.flash > * { color: var(--text); }

/* ---------- Badges, dots ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; font: 650 .7rem/1 var(--font); letter-spacing: .02em; padding: .32rem .6rem; border-radius: var(--r-pill); white-space: nowrap; vertical-align: middle; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-timer { color: var(--good); background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 25%, transparent); }
.badge-screen_time { color: var(--info); background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.badge-manual { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.badge-admin { color: var(--violet); background: var(--grad-soft); border-color: var(--border-strong); }
[data-theme="dark"] .badge-admin { color: #D3B8FF; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 4px; margin-right: .55rem; flex: none; vertical-align: middle; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent); }

/* ---------- Progress meters ---------- */
.meter { height: 8px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; margin: .45rem 0 .5rem; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--grad); transform-origin: left; animation: grow 1s var(--ease) both .2s; }
.meter.is-ok span { background: linear-gradient(90deg, #22C55E, #00D9FF); }
.meter.is-near span { background: linear-gradient(90deg, #F59E0B, #EC4899); }
.meter.is-over span { background: linear-gradient(90deg, #EC4899, #F43F5E); }
@keyframes grow { from { transform: scaleX(0); } }
.limit-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); font-size: .92rem; font-weight: 500; }
.limits { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }

/* ---------- Lists ---------- */
.plist, .recent, .sources { list-style: none; margin: 0; padding: 0; }
.plist li { display: grid; grid-template-columns: auto 1fr auto 3.4rem; align-items: center; gap: .25rem; padding: .6rem .5rem; margin: 0 -.5rem; border-radius: 10px; font-size: .93rem; transition: background var(--t-fast); }
.plist li + li { border-top: 1px solid var(--border); }
.plist li:hover { background: var(--surface-2); }
.plist li .muted { text-align: right; font-size: .85rem; }
.recent li { display: grid; grid-template-columns: auto 1fr auto auto; grid-auto-flow: row dense; align-items: center; column-gap: .6rem; padding: .65rem 0; font-size: .92rem; }
.recent li + li { border-top: 1px solid var(--border); }
.recent li > :nth-child(3) { grid-column: 2; grid-row: 2; font-size: .78rem; }
.recent .badge, .table .badge { font-size: .7rem; }
.recent li > :nth-child(4) { grid-column: 3; grid-row: 1; }
.recent li > :nth-child(5) { grid-column: 4; grid-row: 1 / span 2; }
@media (min-width: 560px) {
  .recent li { grid-template-columns: auto 1fr auto auto auto; }
  .recent li > :nth-child(n) { grid-row: auto; grid-column: auto; }
  .recent li > :nth-child(3) { font-size: .85rem; }
  .recent li > :nth-child(3) { font-size: .85rem; }
}
.sources li { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: .6rem 0; font-size: .92rem; }
.sources li + li { border-top: 1px solid var(--border); }
.insights { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.insight { position: relative; padding: .85rem 1rem .85rem 3rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); transition: transform var(--t) var(--ease), background var(--t); }
.insight:hover { transform: translateX(3px); background: var(--surface-3); }
.insight::before { content: ""; position: absolute; left: 1rem; top: 1rem; width: 20px; height: 20px; border-radius: 7px; background: var(--grad-cyan); -webkit-mask: var(--ins-icon) center / 14px no-repeat, linear-gradient(#000 0 0); mask: var(--ins-icon) center / 14px no-repeat, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.insight { --ins-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z'/%3E%3C/svg%3E"); }
.insight-good::before { background: linear-gradient(135deg, #22C55E, #00D9FF); }
.insight-warn::before { background: linear-gradient(135deg, #F59E0B, #EC4899); }
.insight strong { font-family: var(--font-display); font-weight: 650; }
.insight p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }

/* ---------- Charts ---------- */
.chart-box { position: relative; height: 240px; }
@media (min-width: 640px) { .chart-box { height: 270px; } }
.chart-box-sm { height: 220px; margin-bottom: var(--s4); }
.chart-box-lg { height: 280px; }
@media (min-width: 640px) { .chart-box-lg { height: 330px; } }
.chart-box canvas { animation: fadeIn .6s var(--ease) both .1s; }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 calc(var(--s2) * -1); padding: 0 var(--s2); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .75rem .6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th { font: 650 .72rem/1.2 var(--font); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table thead th:first-child { border-top-left-radius: 10px; } .table thead th:last-child { border-top-right-radius: 10px; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .note { max-width: 260px; color: var(--muted); }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions > * + * { margin-left: .75rem; }
.table.compact th, .table.compact td { padding: .55rem .5rem; }
.platforms-admin input { min-height: 38px; padding: .4rem .6rem; }
.platforms-admin input[type="number"] { width: 92px; }
.platforms-admin input[name="name"] { min-width: 160px; }

/* Day-entry grid (track & goals) */
.entry-grid { width: 100%; border-collapse: collapse; }
.entry-grid th, .entry-grid td { padding: .3rem .2rem; text-align: left; font-size: .9rem; }
.entry-grid thead th { font: 650 .68rem/1.2 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-bottom: .5rem; }
.entry-grid tbody th { position: relative; padding-left: 1.35rem; font-weight: 600; line-height: 1.25; color: var(--text-2); }
.entry-grid tbody th .dot { position: absolute; left: .2rem; top: 50%; transform: translateY(-50%); margin: 0; }
.entry-grid input { min-height: 40px; padding: .45rem .55rem; text-align: center; }
.entry-grid tr.has-error th { color: var(--bad); }
.entry-grid tbody tr { transition: background var(--t-fast); }
.entry-grid tbody tr:focus-within th { color: var(--purple); }
[data-theme="dark"] .entry-grid tbody tr:focus-within th { color: #C4A8FF; }
@media (min-width: 640px) { .entry-grid tbody th { white-space: nowrap; } }

/* ---------- Filters, tabs, pager ---------- */
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); align-items: end; }
.filter-actions { grid-column: 1 / -1; display: flex; gap: var(--s3); align-items: center; }
@media (min-width: 800px) { .filters { display: flex; flex-wrap: wrap; } .filters label { flex: 1 1 150px; } .filter-actions { padding-bottom: 3px; } }
.tabs { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s5); }
.tabs > a {
  padding: .5rem .95rem; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--text-2); text-decoration: none; font-size: .86rem; font-weight: 600; transition: all var(--t-fast);
}
.tabs > a:hover { border-color: var(--purple); color: var(--text); }
.tabs > a[aria-current="page"] { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.custom-range { display: flex; gap: var(--s2); align-items: center; width: 100%; }
.custom-range input { flex: 1; min-height: 38px; padding: .35rem .6rem; font-size: .88rem; }
@media (min-width: 860px) { .custom-range { width: auto; margin-left: auto; } .custom-range input { flex: none; width: auto; } }
.pager { display: flex; justify-content: space-between; align-items: center; padding-top: var(--s4); font-size: .9rem; color: var(--muted); }
.pager a { font-weight: 600; text-decoration: none; padding: .4rem .8rem; border-radius: 10px; border: 1px solid var(--border); }
.pager a:hover { border-color: var(--purple); }

/* ---------- Timer ---------- */
.timer-card { text-align: center; overflow: hidden; }
.timer-card .card-head, .timer-card > p { text-align: left; }
.timer-face { position: relative; display: grid; place-items: center; align-content: center; gap: .3rem; width: min(260px, 78vw); aspect-ratio: 1; margin: var(--s6) auto; border-radius: 50%; }
.timer-face::before { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 6px; background: conic-gradient(from 0deg, var(--surface-3), var(--surface-3)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.timer-face::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--surface-2); z-index: -1; }
.timer-card.is-running .timer-face::before { background: conic-gradient(from var(--spin, 0deg), #6D28FF, #9333EA, #EC4899, #00D9FF, #6D28FF); animation: spin 4s linear infinite; }
.timer-card.is-running .timer-face { filter: drop-shadow(0 10px 30px rgba(147, 51, 234, .35)); }
@property --spin { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --spin: 360deg; } }
.timer-time { font: 700 clamp(2.1rem, 1.6rem + 2.4vw, 3rem)/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timer-card.is-running .timer-time { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.timer-label { color: var(--muted); font-size: .9rem; font-weight: 500; max-width: 80%; }
.timer-controls { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; }
.timer-controls select { max-width: 260px; flex: 1 1 200px; }
.timer-count { margin-top: var(--s5); padding: var(--s4); border-radius: 16px; background: var(--good-bg); border: 1px solid color-mix(in srgb, var(--good) 25%, transparent); animation: rise .4s var(--ease) backwards; }
.timer-count .row { justify-content: center; }
.timer-count input { max-width: 180px; }
.timer-msg { min-height: 1.4em; margin: var(--s3) 0 0; color: var(--muted); }
.timer-banner { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); background: var(--grad-soft), var(--surface); border-color: var(--border-strong); }
.timer-banner > div { flex: 1; }
.pulse { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 0 rgba(236, 72, 153, .6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(236, 72, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); } }

/* ---------- Goals ---------- */
.hm { max-width: 340px; }
.day-dots { display: flex; gap: var(--s2); margin: var(--s3) 0; flex-wrap: wrap; }
.day-dot { width: 2.3rem; height: 2.3rem; border-radius: 12px; display: grid; place-items: center; font-size: .78rem; font-weight: 700; transition: transform var(--t) var(--ease-spring); }
.day-dot:hover { transform: translateY(-3px); }
.day-dot.ok { background: linear-gradient(135deg, rgba(34, 197, 94, .2), rgba(0, 217, 255, .18)); color: var(--good); }
.day-dot.over { background: linear-gradient(135deg, rgba(236, 72, 153, .2), rgba(244, 63, 94, .18)); color: var(--bad); }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 30%, var(--border)); }

/* ---------- Empty states ---------- */
.empty { display: grid; justify-items: center; text-align: center; gap: var(--s2); padding: var(--s8) var(--s4); color: var(--muted); }
.empty h3 { margin: var(--s2) 0 0; font-size: 1.02rem; }
.empty p { max-width: 34ch; margin: 0 0 var(--s2); font-size: .92rem; }
.empty-art { position: relative; width: 104px; height: 104px; display: grid; place-items: center; }
.empty-ring { position: absolute; inset: 0; border-radius: 50%; background: var(--grad-soft); border: 1px solid var(--border); animation: breathe 3.6s var(--ease) infinite; }
.empty-ring.r2 { inset: 16px; background: var(--surface-strong); box-shadow: var(--shadow); animation-delay: .4s; }
.empty-icon { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--grad); color: #fff; box-shadow: var(--glow); }
.spark { position: absolute; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); animation: twinkle 2.8s var(--ease) infinite; }
.spark.s1 { top: 6px; right: 10px; background: var(--cyan); }
.spark.s2 { bottom: 12px; left: 2px; width: 6px; height: 6px; background: var(--pink); animation-delay: .9s; }
.spark.s3 { top: 30px; left: -6px; width: 5px; height: 5px; background: var(--violet); animation-delay: 1.6s; }
@keyframes breathe { 50% { transform: scale(1.06); } }
@keyframes twinkle { 0%, 100% { opacity: .25; transform: rotate(45deg) scale(.7); } 50% { opacity: 1; transform: rotate(45deg) scale(1.15); } }

/* ---------- Auth ---------- */
.auth main.wrap { display: grid; place-items: start center; padding-top: var(--s8); }
@media (min-width: 640px) { .auth main.wrap { padding-top: var(--s12); } }
.auth-card { width: min(450px, 100%); padding: var(--s6); }
@media (min-width: 640px) { .auth-card { padding: var(--s8) var(--s8) var(--s6); } }
.auth-card::before { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 3px; border-radius: 0 0 4px 4px; background: var(--grad); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: var(--s5); }
.auth-card > .muted.small:last-child { margin: var(--s5) 0 0; text-align: center; }

/* ---------- Prose pages ---------- */
.prose { max-width: 780px; margin-inline: auto; padding: var(--s6); }
@media (min-width: 640px) { .prose { padding: var(--s10) var(--s12); } }
.prose h2 { font-size: 1.2rem; margin-top: var(--s8); }
.prose p, .prose li { color: var(--text-2); }
.prose ul { padding-left: 1.2rem; } .prose li { margin-bottom: .4rem; }
.prose li::marker { color: var(--violet); }
.defs dt { margin-top: var(--s5); } .defs dd { margin: .45rem 0 0; color: var(--text-2); }

/* ---------- Landing ---------- */
.landing main.wrap { padding-top: 0; }
.hero { display: grid; gap: var(--s8); align-items: center; padding: var(--s8) 0 var(--s10); }
@media (min-width: 900px) { .hero { grid-template-columns: 1.2fr 1fr; gap: var(--s12); padding: var(--s12) 0 var(--s12); } }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem; border-radius: var(--r-pill); background: var(--grad-soft); border: 1px solid var(--border-strong); color: var(--violet); font-weight: 700; text-transform: uppercase; letter-spacing: .09em; font-size: .72rem; margin-bottom: var(--s5); }
[data-theme="dark"] .eyebrow { color: #D3B8FF; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 3.6vw, 3.9rem); line-height: 1.05; letter-spacing: -.04em; margin-bottom: var(--s5); font-weight: 800; }
.lede { font-size: clamp(1.02rem, .95rem + .3vw, 1.18rem); color: var(--muted); max-width: 40rem; line-height: 1.65; }
.hero-actions { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s6); }
.hero-actions .btn { flex: 1 1 auto; }
@media (min-width: 520px) { .hero-actions .btn { flex: none; } }
.hero-visual { position: relative; }
.hero-visual::before { content: ""; position: absolute; inset: 8% 0 -8% 6%; border-radius: 32px; background: var(--grad); opacity: .35; filter: blur(48px); z-index: -1; }
.hero-card { padding: var(--s6); margin: 0; animation: float 7s var(--ease) infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.mini-head { display: grid; gap: .15rem; }
.mini-head span:first-child { color: var(--muted); font-size: .85rem; font-weight: 600; }
.mini-head strong { font: 800 2.2rem/1.1 var(--font-display); letter-spacing: -.03em; }
.delta { display: inline-flex; width: fit-content; font-size: .8rem; font-weight: 700; padding: .25rem .6rem; border-radius: var(--r-pill); background: var(--good-bg); }
.mini-bars { display: flex; align-items: flex-end; gap: .55rem; height: 150px; margin: var(--s6) 0 var(--s4); }
.mini-bars span { flex: 1; border-radius: 8px 8px 4px 4px; background: linear-gradient(to top, #00D9FF 0 38%, #9333EA 38% 72%, #EC4899 72%); transform-origin: bottom; animation: barUp .9s var(--ease-spring) both; }
.mini-bars span:nth-child(2) { animation-delay: .05s; } .mini-bars span:nth-child(3) { animation-delay: .1s; } .mini-bars span:nth-child(4) { animation-delay: .15s; }
.mini-bars span:nth-child(5) { animation-delay: .2s; } .mini-bars span:nth-child(6) { animation-delay: .25s; } .mini-bars span:nth-child(7) { animation-delay: .3s; }
@keyframes barUp { from { transform: scaleY(0); } }
.mini-legend { display: flex; flex-wrap: wrap; gap: var(--s4); font-size: .85rem; color: var(--muted); }
.mini-note { font-size: .72rem; color: var(--faint); margin: var(--s3) 0 0; text-align: right; }
.features { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { margin: 0; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-edge); border-color: var(--border-strong); }
.feature-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--grad); color: #fff; margin-bottom: var(--s4); box-shadow: var(--glow); transition: transform var(--t) var(--ease-spring); }
.feature:hover .feature-icon { transform: rotate(-6deg) scale(1.06); }
.feature h2 { font-size: 1.08rem; } .feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.honesty { margin-top: var(--s4); padding: var(--s6); background: var(--grad-soft), var(--surface); }
@media (min-width: 640px) { .honesty { padding: var(--s10); } }
.honesty h2 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); }
.source-list { list-style: none; padding: 0; display: grid; gap: var(--s3); margin: var(--s4) 0 var(--s5); }
.source-list li { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; color: var(--text-2); }
.source-list .badge { min-width: 8.5rem; justify-content: center; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Print ---------- */
@media print {
  .topbar, .tabbar, .footer, .bg-orbs, .btn, .tabs { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; backdrop-filter: none; background: #fff; border-color: #ddd; }
}

/* Tables keep rows on one line and scroll sideways on small screens */
.table td { white-space: nowrap; }
.table td.note { white-space: normal; min-width: 160px; }
.table td br + .small { display: inline-block; margin-top: 2px; }

/* ==========================================================================
   v1.2 — public site & account components
   ========================================================================== */
.center { text-align: center; }
.faint { color: var(--faint); }
.xsmall { font-size: .76rem; }
.narrow-center { max-width: 820px; margin-inline: auto; }
textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Sections */
.section { padding: var(--s10) 0 0; }
@media (min-width: 900px) { .section { padding-top: var(--s12); } }
.section-tight { padding-top: var(--s4); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto var(--s8); }
.section-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: var(--s3); }
.section-head .lede { margin-inline: auto; }
.page-hero { text-align: center; max-width: 820px; margin: 0 auto; padding: var(--s8) 0 var(--s6); }
@media (min-width: 900px) { .page-hero { padding: var(--s12) 0 var(--s8); } }
.page-hero h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.3rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 800; margin-bottom: var(--s4); }
.page-hero .lede { margin-inline: auto; }

/* Hero extras */
.hero-points { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); list-style: none; padding: 0; margin: var(--s6) 0 0; color: var(--text-2); font-size: .9rem; font-weight: 550; }
.hero-points li { display: inline-flex; align-items: center; gap: .4rem; }
.hero-points .icon { color: var(--green); }

/* Dashboard preview (illustration) */
.preview { position: relative; border-radius: 24px; padding: 10px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-edge); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: float 8s var(--ease) infinite; }
.preview-bar { display: flex; align-items: center; gap: 6px; padding: 4px 8px 10px; }
.preview-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); }
.preview-bar span:nth-child(1) { background: #F43F5E; } .preview-bar span:nth-child(2) { background: #FACC15; } .preview-bar span:nth-child(3) { background: #22C55E; }
.preview-bar em { margin-left: 8px; font-style: normal; font-size: .72rem; color: var(--faint); padding: 3px 10px; border-radius: 8px; background: var(--surface-2); }
.preview-body { display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: var(--bg); background: color-mix(in srgb, var(--bg) 82%, transparent); }
.preview-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ptile { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface-strong); border: 1px solid var(--border); }
.ptile small { font-size: .66rem; color: var(--muted); font-weight: 600; }
.ptile strong { font: 800 1.15rem/1.2 var(--font-display); letter-spacing: -.02em; }
.ptile .pgood { color: var(--good); }
.ptile-hero { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.ptile-hero small { color: rgba(255, 255, 255, .85); }
.pmeter { display: block; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .25); margin: 3px 0; overflow: hidden; }
.pmeter b { display: block; height: 100%; background: #fff; border-radius: inherit; transform-origin: left; animation: grow 1.2s var(--ease) both .4s; }
.preview-chart { padding: 12px; border-radius: 14px; background: var(--surface-strong); border: 1px solid var(--border); }
.pc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pc-head small { font-size: .72rem; font-weight: 700; }
.pc-legend { display: inline-flex; gap: 8px; align-items: center; font-size: .64rem; color: var(--muted); }
.pc-legend i { width: 7px; height: 7px; border-radius: 2px; background: var(--c); margin-right: -4px; }
.pc-bars { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 130px; align-items: end; }
.pc-limit { position: absolute; left: 0; right: 0; bottom: calc(70% + 16px); border-top: 2px dashed var(--pink); opacity: .7; }
.pc-col { display: grid; justify-items: center; gap: 4px; height: 100%; grid-template-rows: 1fr auto; }
.pc-col small { font-size: .62rem; color: var(--faint); font-weight: 600; }
.pc-stack { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; max-width: 26px; height: 100%; transform-origin: bottom; animation: barUp .9s var(--ease-spring) both; animation-delay: var(--d); }
.pc-stack b { display: block; background: var(--c); }
.pc-stack b:first-child { border-radius: 6px 6px 0 0; }
.preview-insight { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.preview-insight p { margin: 0; font-size: .74rem; color: var(--muted); line-height: 1.45; }
.preview-insight strong { display: block; color: var(--text); font-size: .8rem; }
.preview-insight .tile-icon { width: 24px; height: 24px; flex: none; }
.preview-note { position: absolute; right: 16px; bottom: -26px; margin: 0; font-size: .7rem; color: var(--faint); }
@media (max-width: 420px) { .hide-xs { display: none; } .preview-tiles { grid-template-columns: 1fr 1fr; } }

/* Platform chips */
.platform-chips { list-style: none; padding: 0; margin: var(--s4) auto var(--s3); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); max-width: 980px; }
.platform-chip { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .9rem .45rem .45rem; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-weight: 600; font-size: .9rem; transition: transform var(--t) var(--ease), border-color var(--t); }
.platform-chip:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.chip-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); font: 800 .85rem/1 var(--font-display); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
[data-theme="light"] .chip-mark { color: color-mix(in srgb, var(--c) 70%, #1B1535); }
.platform-chips.detailed { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s4); max-width: none; }
.platform-chips.detailed .platform-chip { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: .8rem; row-gap: 2px; padding: var(--s5); border-radius: var(--r-lg); align-items: center; }
.platform-chips.detailed .chip-mark { grid-row: 1 / span 3; width: 46px; height: 46px; font-size: 1.1rem; border-radius: 14px; }
.platform-chips.detailed .chip-name { font: 700 1rem/1.3 var(--font-display); }
.chip-meta { font-size: .78rem; font-weight: 500; color: var(--muted); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s4); grid-template-columns: 1fr; counter-reset: s; }
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { margin: 0; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-edge); }
.step-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; margin-bottom: var(--s4); background: var(--grad-soft); border: 1px solid var(--border-strong); font: 800 1.05rem/1 var(--font-display); color: var(--violet); }
[data-theme="dark"] .step-num { color: #D3B8FF; }
.step h3 { font-size: 1.05rem; } .step p { margin: 0; color: var(--muted); font-size: .94rem; }
.features-3 { grid-template-columns: 1fr; }
@media (min-width: 900px) { .features-3 { grid-template-columns: repeat(3, 1fr); } }
.feature h3 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: 1.05rem; }

/* FAQ accordion */
.faq { display: grid; gap: var(--s3); }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transition: border-color var(--t), box-shadow var(--t); }
.faq-item[open] { border-color: var(--border-strong); box-shadow: var(--shadow); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4) var(--s5); cursor: pointer; list-style: none; font: 650 1rem/1.4 var(--font-display); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { position: relative; flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--surface-2); transition: background var(--t), transform var(--t) var(--ease); }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; border-radius: 2px; background: var(--violet); transform: translate(-50%, -50%); transition: transform var(--t) var(--ease); }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-icon { background: var(--grad); }
.faq-item[open] .faq-icon::before, .faq-item[open] .faq-icon::after { background: #fff; }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-item p { margin: 0; padding: 0 var(--s5) var(--s5); color: var(--text-2); line-height: 1.65; animation: rise .35s var(--ease) backwards; }

/* Pricing */
.pricing { display: grid; gap: var(--s4); grid-template-columns: 1fr; max-width: 1000px; margin: 0 auto; }
.pricing-1 { max-width: 460px; }
@media (min-width: 760px) { .pricing-2 { grid-template-columns: 1fr 1fr; } .pricing-3 { grid-template-columns: repeat(3, 1fr); } }
.plan { margin: 0; display: grid; gap: var(--s3); align-content: start; padding: var(--s6); }
.plan h3 { font-size: 1.1rem; margin: 0; }
.plan-price { margin: 0; color: var(--muted); }
.plan-price span { font: 800 2.8rem/1 var(--font-display); letter-spacing: -.04em; color: var(--text); }
.plan-list { list-style: none; padding: 0; margin: var(--s2) 0 var(--s4); display: grid; gap: .6rem; }
.plan-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .94rem; color: var(--text-2); }
.plan-list .icon { flex: none; margin-top: 3px; padding: 2px; border-radius: 6px; width: 20px; height: 20px; background: var(--good-bg); color: var(--good); }
.plan-featured { border: 0; box-shadow: var(--glow), var(--shadow-lg); }
.plan-featured::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }

/* Privacy block / split cards / CTA */
.split-card { display: grid; gap: var(--s6); align-items: center; padding: var(--s6); }
@media (min-width: 900px) { .split-card { grid-template-columns: 1fr 1.2fr; padding: var(--s10); } .split-card > .row { justify-content: flex-end; } }
.split-card h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.8rem); font-weight: 800; letter-spacing: -.02em; }
.privacy-grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 560px) { .privacy-grid { grid-template-columns: 1fr 1fr; } }
.privacy-point { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4); border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); }
.privacy-point .tile-icon { width: 34px; height: 34px; flex: none; border-radius: 11px; }
.privacy-point h3 { font-size: .95rem; margin-bottom: .2rem; }
.privacy-point p { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.5; }
.cta-band { text-align: center; padding: var(--s10) var(--s6); background: var(--grad); border: 0; color: #fff; box-shadow: var(--glow), var(--shadow-lg); overflow: hidden; }
.cta-band::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -200px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .28), transparent); pointer-events: none; }
.cta-band::after { content: ""; position: absolute; width: 360px; height: 360px; left: -120px; bottom: -220px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 217, 255, .35), transparent); pointer-events: none; }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; }
.cta-band p { color: rgba(255, 255, 255, .88); margin-bottom: var(--s5); }
.btn-light { background: #fff; color: var(--purple); box-shadow: 0 10px 30px -8px rgba(20, 0, 60, .45); }
.btn-light:hover { background: #fff; color: var(--violet); }
.btn-light::after { background: linear-gradient(120deg, transparent 30%, rgba(147, 51, 234, .15) 50%, transparent 70%); }

/* About / prose cards */
.prose-card h2, .prose-card h3 { display: flex; align-items: center; gap: .5rem; }
.prose-card h3 .icon { color: var(--violet); }
.prose-card p { color: var(--text-2); }
.prose-card p:last-child { margin-bottom: 0; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.check-list li { display: flex; gap: .6rem; color: var(--text-2); }
.check-list .icon { flex: none; margin-top: 4px; color: var(--good); }

/* Contact */
.contact-grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.6fr 1fr; } }
.contact-grid > .card { margin: 0; }
.contact-side { display: grid; gap: var(--s4); }
.contact-side .card { margin: 0; }
.contact-side .feature-icon { width: 38px; height: 38px; border-radius: 12px; margin-bottom: var(--s3); }
.contact-side h3 { font-size: 1rem; } .contact-side p { margin: 0; font-size: .92rem; }
.message-body { margin: 0; padding: var(--s4); border-radius: var(--r); background: var(--surface-2); color: var(--text-2); white-space: normal; overflow-wrap: anywhere; }

/* Legal pages */
.legal .prose h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; }
.lede-sm { font-size: 1.05rem; color: var(--text-2); }
.legal-contact { margin-top: var(--s8); padding: var(--s5); border-radius: var(--r); background: var(--grad-soft); border: 1px solid var(--border); }
.legal-contact h2 { margin-top: 0 !important; font-size: 1.05rem !important; }
.legal-contact p { margin: 0; }
.legal-nav { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.legal-nav a { font-size: .85rem; font-weight: 600; text-decoration: none; padding: .35rem .8rem; border-radius: var(--r-pill); border: 1px solid var(--border); color: var(--text-2); }
.legal-nav a:hover { border-color: var(--purple); color: var(--text); }
.prose .table-wrap { margin: var(--s4) 0; }
.prose ol { padding-left: 1.3rem; } .prose ol li::marker { color: var(--violet); font-weight: 700; }

/* Account */
.verify-banner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: .8rem 1rem; margin-bottom: var(--s4); border-radius: 16px; background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); animation: rise .4s var(--ease) backwards; }
.verify-banner p { flex: 1 1 240px; margin: 0; font-size: .9rem; color: var(--text-2); }
.verify-banner form { margin: 0; }
.verify-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 25%, transparent); }
.badge-warn { color: var(--warn); background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.profile-card { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5); }
.profile-meta { flex: 1 1 260px; min-width: 0; }
.profile-meta h2 { font-size: 1.3rem; margin-bottom: .2rem; }
.profile-meta p { margin: 0 0 .25rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; overflow-wrap: anywhere; }
.avatar-lg { display: inline-grid !important; width: 64px; height: 64px; border-radius: 20px; font-size: 1.6rem; font-family: var(--font-display); }
.auth-art { margin: 0 auto var(--s4); }
.auth-card .center { text-align: center; }
.strength { display: flex; gap: 4px; margin-top: 6px; }
.strength i { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); transition: background var(--t); }
.strength[data-score="1"] i:nth-child(-n+1) { background: var(--bad); }
.strength[data-score="2"] i:nth-child(-n+2) { background: var(--warn); }
.strength[data-score="3"] i:nth-child(-n+3) { background: linear-gradient(90deg, #22C55E, #00D9FF); }
.strength[data-score="4"] i { background: linear-gradient(90deg, #22C55E, #00D9FF); }

/* Small-screen top bar: keep everything on one line */
html, body { overflow-x: clip; }
.btn { white-space: nowrap; }
.topbar-tools { flex: none; }
@media (max-width: 420px) {
  .topbar-inner { gap: var(--s2); }
  .brand-text > span { display: none; }
  .topbar-tools .btn-sm { padding-inline: .7rem; }
}

/* ==========================================================================
   v1.3 — dashboard v2, tracking & connections
   ========================================================================== */
.filter-bar { margin-bottom: var(--s6); }
.dash-section { margin-bottom: var(--s8); }
.section-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.section-title { font-size: 1.25rem; font-weight: 750; letter-spacing: -.02em; margin: 0; }
.section-row a.small { text-decoration: none; font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.stat-grid > .card { margin: 0; }
.stat-grid .tile-total { grid-column: 1 / -1; }
@media (min-width: 700px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); } .stat-grid .tile-total { grid-column: auto; } }
@media (min-width: 1200px) { .stat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.stat-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1000px) { .stat-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.big-name { display: flex; align-items: center; font-size: 1.25rem; }

.tile-total { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--glow), var(--shadow); }
.tile-total::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .25), transparent); pointer-events: none; }
.tile-total h2, .tile-total .small, .tile-total .muted { color: rgba(255, 255, 255, .88); }
.tile-total .big { color: #fff; }
.tile-total .tile-icon { background: rgba(255, 255, 255, .18); color: #fff; }
.tile-total .meter { background: rgba(255, 255, 255, .22); }
.tile-total .meter span { background: #fff; }
.tile-total p.small { margin: 0 0 .2rem; }

.tile-platform { border-top: 3px solid var(--c); }
.tile-platform h2 { text-transform: none; letter-spacing: 0; font-size: .82rem; color: var(--text-2); }
.tile-platform .chip-mark { width: 24px; height: 24px; font-size: .72rem; border-radius: 8px; }
.share-bar { height: 6px; border-radius: 9px; background: var(--surface-3); overflow: hidden; margin: .2rem 0 .5rem; }
.share-bar span { display: block; height: 100%; border-radius: inherit; background: var(--c); transform-origin: left; animation: grow 1s var(--ease) both .25s; }

.videos-card .video-types { display: grid; gap: var(--s3); grid-template-columns: 1fr; }
@media (min-width: 800px) { .videos-card .video-types { grid-template-columns: repeat(3, 1fr); } }
.vtype { display: grid; gap: .25rem; align-content: start; padding: var(--s4); border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); }
.vtype-label { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 650; color: var(--text-2); }
.vtype-label .icon { color: var(--violet); }
.vtype-num { font: 800 1.7rem/1.15 var(--font-display); letter-spacing: -.03em; }
.vtype-counted { border-color: color-mix(in srgb, var(--good) 30%, var(--border)); }
.vtype-detected { border-style: dashed; }
.badge-exp { color: var(--warn); background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.detected small { font-size: .7rem; color: var(--muted); }

.badge-android, .badge-extension { color: var(--violet); background: var(--grad-soft); border-color: var(--border-strong); }
[data-theme="dark"] .badge-android, [data-theme="dark"] .badge-extension { color: #D3B8FF; }
.badge-superseded { margin-top: 4px; color: var(--muted); background: transparent; border: 1px dashed var(--border-strong); }
.badge-superseded::before { background: var(--faint); }

/* Example dashboard (illustrative) */
.example-card { display: grid; gap: var(--s6); align-items: center; background: var(--grad-soft), var(--surface); border-style: dashed; border-color: var(--border-strong); }
@media (min-width: 900px) { .example-card { grid-template-columns: 1fr 1fr; padding: var(--s8); } }
.example-copy h2 { font-size: 1.3rem; font-weight: 750; }
.example-list { display: grid; gap: .55rem; padding: var(--s5); border-radius: var(--r); background: var(--surface-strong); border: 1px solid var(--border); }
.example-row { display: grid; grid-template-columns: 150px 1fr 70px; align-items: center; gap: var(--s3); font-size: .9rem; font-weight: 550; }
.example-row i { display: block; height: 10px; border-radius: 9px; background: var(--surface-3); position: relative; overflow: hidden; }
.example-row i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--c); border-radius: inherit; }
.example-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.example-total { border-top: 1px solid var(--border); padding-top: .55rem; }
.example-total i { visibility: hidden; }
@media (max-width: 480px) { .example-row { grid-template-columns: 1fr 64px; } .example-row i { display: none; } }

/* Timer review step */
.timer-review { text-align: left; margin-top: var(--s2); padding: var(--s5); border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border-strong); display: grid; gap: var(--s3); animation: rise .35s var(--ease) backwards; }
.review-title { margin: 0; }
.timer-review .timer-controls { justify-content: flex-start; }
.timer-card[data-mode="review"] .timer-face::before { background: conic-gradient(#22C55E, #00D9FF, #22C55E); }
.timer-msg.bad { color: var(--bad); }

/* Connections */
.status-legend { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s4); padding: 0; list-style: none; }
.status-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border-radius: var(--r-pill); font: 650 .72rem/1 var(--font); border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-available { color: var(--good); background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 25%, transparent); }
.st-manual { color: var(--violet); background: var(--grad-soft); border-color: var(--border-strong); }
[data-theme="dark"] .st-manual { color: #D3B8FF; }
.st-usage_time { color: var(--info); background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.st-video_exp { color: var(--warn); background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.st-connected { color: #fff; background: var(--grad); border-color: transparent; }
.st-not_connected { color: var(--muted); border-style: dashed; }
.status-table td { white-space: normal; }
.status-table .chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.device-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.device { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; padding: var(--s4); border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); }
.device-meta { flex: 1 1 220px; min-width: 0; }
.device-meta strong { display: block; }
.device-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex: none; }
.device-dot.on { background: var(--green); box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }
.pair-code { display: inline-block; font: 800 clamp(1.8rem, 1.4rem + 2vw, 2.6rem)/1 var(--mono); letter-spacing: .12em; padding: .6rem 1rem; border-radius: 14px; background: var(--surface-strong); border: 1px dashed var(--border-strong); user-select: all; }
.pair-box { display: grid; gap: var(--s3); justify-items: start; padding: var(--s5); border-radius: var(--r); background: var(--grad-soft); border: 1px solid var(--border-strong); }
.method-grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 900px) { .method-grid { grid-template-columns: repeat(3, 1fr); } }
.method-grid .card { margin: 0; }
.method-grid h3 { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: 1.02rem; }
.method-grid ul { padding-left: 1.1rem; margin: var(--s2) 0 0; color: var(--text-2); font-size: .9rem; }
.method-grid li { margin-bottom: .3rem; }
.note-box { padding: var(--s4); border-radius: var(--r); background: var(--info-bg); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); font-size: .9rem; color: var(--text-2); }
.w-wide { min-width: 190px; }
