/* =========================================================
   ROLLS — landing page styles
   ========================================================= */

/* --------- Tokens (dark default + light override) --------- */
:root {
  --bg:           #050505;
  --bg-1:         #0b0b0c;
  --bg-2:         #111114;
  --bg-3:         #17171a;
  --bg-4:         #1d1d20;
  --line:         rgba(255,255,255,0.07);
  --line-2:       rgba(255,255,255,0.12);
  --line-3:       rgba(255,255,255,0.20);
  --fg:           #f5f5f7;
  --fg-2:         #c7c7cc;
  --fg-3:         #8a8a91;
  --fg-4:         #5b5b62;
  --accent:       #7c3aed;
  --accent-2:     #a78bfa;
  --accent-3:     #c4b5fd;
  --accent-soft:  rgba(124, 58, 237, 0.15);
  --green:        #10b981;
  --green-2:      #34d399;
  --green-soft:   rgba(16, 185, 129, 0.15);
  --red:          #ef4444;
  --red-soft:     rgba(239, 68, 68, 0.15);
  --amber:        #f59e0b;
  --amber-soft:   rgba(245, 158, 11, 0.15);
  --blue:         #60a5fa;
  --blue-soft:    rgba(96, 165, 250, 0.15);
  --pink:         #f472b6;
  --pink-soft:    rgba(244, 114, 182, 0.15);
  --wa-green:     #25d366;
  --wa-dark:      #075E54;
  --wa-bubble:    #DCF8C6;
  --wa-bg:        #ECE5DD;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 0 rgba(255,255,255,0.04) inset, 0 1px 2px rgba(0,0,0,0.4);
  --shadow:    0 1px 0 rgba(255,255,255,0.06) inset, 0 20px 40px -20px rgba(0,0,0,0.7);
  --shadow-lg: 0 1px 0 rgba(255,255,255,0.06) inset, 0 40px 80px -30px rgba(0,0,0,0.8), 0 20px 40px -20px rgba(0,0,0,0.6);

  --ease-out:  cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);

  --maxw: 1240px;
  --pad: clamp(20px, 4vw, 56px);
}

html[data-theme="light"] {
  --bg:           #fafaf9;
  --bg-1:         #ffffff;
  --bg-2:         #f4f4f3;
  --bg-3:         #ececeb;
  --bg-4:         #e1e1e0;
  --line:         rgba(0,0,0,0.06);
  --line-2:       rgba(0,0,0,0.10);
  --line-3:       rgba(0,0,0,0.18);
  --fg:           #0a0a0b;
  --fg-2:         #2a2a2e;
  --fg-3:         #5b5b62;
  --fg-4:         #8a8a91;
  --shadow:       0 1px 0 rgba(0,0,0,0.02) inset, 0 20px 40px -20px rgba(0,0,0,0.15);
  --shadow-lg:    0 1px 0 rgba(0,0,0,0.02) inset, 0 40px 80px -30px rgba(0,0,0,0.25), 0 20px 40px -20px rgba(0,0,0,0.1);
}

/* --------- Reset --------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-feature-settings: 'ss01', 'ss02', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
  overflow-x: hidden;
}
::selection { background: var(--accent); color: white; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
img, svg { display: block; max-width: 100%; }
.mono { font-family: 'Geist Mono', ui-monospace, 'SF Mono', monospace; font-variant-numeric: tabular-nums; }

/* --------- Layout primitives --------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  width: 100%;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.eyebrow-c { justify-content: center; display: inline-flex; }

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; margin: 0; line-height: 1.05; }
h1 { font-size: clamp(40px, 6.4vw, 80px); font-weight: 600; letter-spacing: -0.035em; }
h2 { font-size: clamp(32px, 4.4vw, 56px); letter-spacing: -0.03em; text-wrap: balance; }
h3 { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -0.02em; }
p  { margin: 0; color: var(--fg-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px;
  border-radius: 999px;
  font-weight: 500; font-size: 15px;
  transition: transform 0.2s var(--ease-snap), background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -10px var(--fg); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -10px var(--accent); }
.btn-ghost { background: transparent; color: var(--fg); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--line-3); }
.btn .arrow { transition: transform 0.2s var(--ease-snap); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }

/* --------- Nav --------- */
nav.top {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
nav.top.scrolled { border-bottom-color: var(--line); }
nav.top .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 17px; letter-spacing: -0.01em;
}
.brand .mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  display: grid; place-items: center;
  color: white;
  box-shadow: 0 4px 16px -4px var(--accent), inset 0 1px 0 rgba(255,255,255,0.2);
}
.nav-links {
  display: flex; align-items: center; gap: 28px;
  font-size: 14px; color: var(--fg-2);
}
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--fg); }
.nav-cta { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--fg-2);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.icon-btn:hover { background: var(--bg-2); color: var(--fg); border-color: var(--line-2); }
.theme-toggle .sun { display: none; }
html[data-theme="light"] .theme-toggle .moon { display: none; }
html[data-theme="light"] .theme-toggle .sun  { display: block; }

.sign-in {
  font-size: 14px; color: var(--fg-2);
  padding: 8px 14px; border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.sign-in:hover { color: var(--fg); background: var(--bg-2); }

@media (max-width: 820px) { .nav-links { display: none; } .sign-in { display: none; } }

/* --------- Hero --------- */
.hero {
  position: relative;
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(48px, 8vw, 120px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 60%;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-soft) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-copy h1 .accent { color: var(--accent); }
.hero-copy h1 .stack  { display: block; }
.hero-copy .sub {
  margin-top: 28px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--fg-2);
  max-width: 34ch;
  line-height: 1.5;
}
.hero-cta { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { margin-top: 28px; display: flex; gap: 22px; flex-wrap: wrap; color: var(--fg-3); font-size: 13px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta svg { width: 14px; height: 14px; color: var(--green); }

/* --------- Hero mini-app (browser + dashboard) --------- */
.stage {
  position: relative;
  perspective: 1800px;
  min-height: 460px;
}
.browser {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotateY(-6deg) rotateX(4deg) translateZ(0);
  transition: transform 0.6s var(--ease-snap);
  position: relative;
  z-index: 1;
}
.stage:hover .browser { transform: rotateY(-3deg) rotateX(2deg); }
.browser-chrome {
  height: 36px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 14px;
  gap: 14px;
}
.traffic { display: flex; gap: 6px; }
.traffic span { width: 11px; height: 11px; border-radius: 50%; background: var(--bg-3); }
.traffic span:nth-child(1) { background: #ff5f57; }
.traffic span:nth-child(2) { background: #febc2e; }
.traffic span:nth-child(3) { background: #28c840; }
.browser-url {
  flex: 1; text-align: center;
  font-size: 11px; color: var(--fg-3);
  font-family: 'Geist Mono', monospace;
}

.miniapp {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  height: 460px;
}
.miniapp .side {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 14px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.miniapp .side .logo {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 14px;
  font-size: 11px; font-weight: 600;
}
.miniapp .side .logo .m {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  display: grid; place-items: center; color: white;
}
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 11.5px; color: var(--fg-3);
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.nav-item:hover { color: var(--fg); background: var(--bg-3); }
.nav-item.active { color: var(--fg); background: var(--bg-3); }
.nav-item svg { width: 13px; height: 13px; flex-shrink: 0; }

.miniapp .body { padding: 16px 18px; overflow: hidden; display: flex; flex-direction: column; gap: 14px; min-height: 0; position: relative; }
.miniapp .body-head { display: flex; justify-content: space-between; align-items: flex-start; }
.miniapp .body-head h4 { font-size: 16px; font-weight: 600; }
.miniapp .body-head p  { font-size: 11px; color: var(--fg-3); margin-top: 2px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}
.stat .ico {
  width: 22px; height: 22px;
  border-radius: 6px;
  display: grid; place-items: center;
  margin-bottom: 8px;
}
.stat .ico svg { width: 12px; height: 12px; }
.stat .num { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 10px; color: var(--fg-3); margin-top: 2px; }
.stat.s1 .ico { background: var(--accent-soft); color: var(--accent-2); }
.stat.s2 .ico { background: var(--green-soft);  color: var(--green); }
.stat.s3 .ico { background: var(--red-soft);    color: var(--red); }
.stat.s4 .ico { background: var(--amber-soft);  color: var(--amber); }

.chart-card {
  flex: 1; min-height: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: flex; flex-direction: column;
}
.chart-card .ch-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.chart-card .ch-head h5 { font-size: 11px; font-weight: 600; }
.chart-card .ch-head .insight {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9.5px; color: var(--green);
  background: var(--green-soft);
  padding: 2px 6px; border-radius: 999px;
}
.chart-card svg.chart { width: 100%; flex: 1; min-height: 0; }

/* Send-reports button — now anchored inside body so phone never covers it */
.send-row {
  display: flex; justify-content: flex-end;
}
.send-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: white;
  font-size: 11px; font-weight: 500;
  padding: 7px 12px;
  border-radius: 999px;
  transition: transform 0.15s var(--ease-snap), box-shadow 0.2s, background 0.2s;
}
.send-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -6px var(--accent); }
.send-btn:active { transform: scale(0.97); }
.send-btn svg { width: 11px; height: 11px; }
.send-btn .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: white;
  animation: pulse 2.2s var(--ease-out) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(1.3); }
}

/* Phone — bottom right, never covers Send button anymore */
.phone {
  position: absolute;
  right: -28px;
  bottom: -32px;
  width: 200px;
  height: 400px;
  transform: translateX(120%) rotateY(-12deg) rotateX(2deg);
  background: #1a1a1c;
  border-radius: 32px;
  border: 1px solid var(--line-3);
  padding: 7px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.04);
  opacity: 0;
  transition: transform 0.7s var(--ease-snap), opacity 0.5s var(--ease-out);
  z-index: 2;
}
.phone.in { transform: translateX(0) rotateY(-12deg) rotateX(2deg); opacity: 1; }
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 26px;
  background: var(--wa-bg);
  overflow: hidden; position: relative;
  display: flex; flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.wa-header {
  background: var(--wa-dark); color: white;
  padding: 12px 10px 8px;
  display: flex; align-items: center; gap: 8px;
}
.wa-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; color: var(--wa-dark);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
}
.wa-name   { font-size: 12px; font-weight: 500; }
.wa-status { font-size: 9px; opacity: 0.8; }
.wa-body { flex: 1; padding: 10px 8px; overflow: hidden; }
.wa-bubble {
  background: var(--wa-bubble);
  border-radius: 8px 8px 2px 8px;
  padding: 8px 10px;
  max-width: 92%;
  margin-left: auto;
  font-size: 11px;
  color: #0a0a0a;
  line-height: 1.45;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.wa-bubble.in { opacity: 1; transform: translateY(0); }
.wa-bubble .head { font-weight: 600; margin-bottom: 4px; }
.wa-bubble .row  { display: flex; justify-content: space-between; padding: 1px 0; font-size: 10.5px; }
.wa-bubble .row span:last-child { color: var(--wa-dark); font-weight: 500; }
.wa-bubble .time { font-size: 9px; color: #667781; text-align: right; margin-top: 4px; }

@media (max-width: 980px) {
  .phone { position: relative; right: auto; bottom: auto; transform: translateX(0) scale(0.9); margin: 24px auto 0; }
  .phone.in { transform: translateX(0) scale(0.9); }
  .browser, .stage:hover .browser { transform: none; }
}

/* --------- Section spacing --------- */
section { padding: clamp(80px, 10vw, 140px) 0; }
section.compact { padding: clamp(56px, 7vw, 96px) 0; }
.section-head { max-width: 740px; margin-bottom: clamp(48px, 6vw, 72px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { margin-top: 14px; }
.section-head p  { margin-top: 18px; font-size: clamp(16px, 1.4vw, 18px); color: var(--fg-3); }

/* --------- Hard truths --------- */
.truths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .truths { grid-template-columns: 1fr; } }
.truth {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 0.3s var(--ease-snap), border-color 0.2s, background 0.3s;
}
.truth:hover { transform: translateY(-4px); border-color: var(--line-2); }
.truth .big {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--fg);
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}
.truth .big .unit { font-size: 0.36em; color: var(--fg-3); margin-left: 4px; font-weight: 500; }
.truth .big.red    { color: var(--red); }
.truth .big.amber  { color: var(--amber); }
.truth .big.accent { color: var(--accent-2); }
.truth h3 { font-size: 20px; margin-bottom: 8px; }
.truth p  { font-size: 14.5px; color: var(--fg-3); line-height: 1.55; }
.truth .src { font-size: 11px; color: var(--fg-4); margin-top: 16px; font-family: 'Geist Mono', monospace; }

/* --------- POVs --------- */
.povs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .povs { grid-template-columns: 1fr; } }
.pov {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  overflow: hidden;
  transition: transform 0.3s var(--ease-snap), border-color 0.2s;
}
.pov:hover { transform: translateY(-4px); border-color: var(--line-2); }
.pov-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500;
  padding: 5px 10px; border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.pov-badge.g { background: var(--green-soft); color: var(--green); }
.pov-badge.b { background: var(--blue-soft); color: var(--blue); }
.pov h3 { margin-top: 18px; font-size: 22px; }
.pov h3 .sub { display: block; color: var(--fg-3); font-size: 14px; font-weight: 400; margin-top: 4px; letter-spacing: -0.01em; }
.pov ul { margin: 22px 0 0; padding: 0; list-style: none; }
.pov ul li {
  display: flex; gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--fg-2);
}
.pov ul li:first-child { border-top: none; padding-top: 0; }
.pov ul li svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; color: var(--fg-4); }

/* --------- Feature spotlights --------- */
.spot {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  margin-bottom: clamp(80px, 10vw, 140px);
}
.spot:last-child { margin-bottom: 0; }
.spot.reverse { grid-template-columns: 1.15fr 1fr; }
.spot.reverse .spot-copy { order: 2; }
@media (max-width: 880px) {
  .spot, .spot.reverse { grid-template-columns: 1fr; }
  .spot.reverse .spot-copy { order: 0; }
}
.spot-copy .eyebrow { margin-bottom: 16px; }
.spot-copy h3 { font-size: clamp(28px, 3vw, 40px); }
.spot-copy p  { margin-top: 18px; color: var(--fg-3); font-size: 16px; max-width: 42ch; line-height: 1.55; }
.spot-copy .insights { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.spot-copy .insights .ins {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; color: var(--fg-2);
}
.spot-copy .insights .ins svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 3px; color: var(--accent-2); }

.spot-vis {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease-snap), border-color 0.2s;
}
.spot-vis:hover { transform: translateY(-3px); border-color: var(--line-2); }

/* Attendance vis */
.vis-att .head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; gap: 16px; }
.vis-att .head h5 { font-size: 14px; font-weight: 600; }
.vis-att .head .meta { font-size: 12px; color: var(--fg-3); margin-top: 4px; }
.vis-att .head .pill-94 {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-soft); color: var(--green);
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
}
.vis-att .head .pill-94::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
}
.vis-att .donut { display: flex; align-items: center; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.vis-att .donut svg { width: 110px; height: 110px; flex-shrink: 0; }
.vis-att .legend { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.vis-att .legend .row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
}
.vis-att .legend .row span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-2); }
.vis-att .legend .dot { width: 8px; height: 8px; border-radius: 50%; }
.vis-att .legend .row .val { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.vis-att .row-list { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.vis-att .row-list .rl {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}
.vis-att .row-list .name { display: flex; align-items: center; gap: 10px; }
.vis-att .row-list .av {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-2);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
}
.vis-att .pill {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: var(--green-soft); color: var(--green); font-weight: 500;
}
.vis-att .pill.absent { background: var(--red-soft); color: var(--red); }
.vis-att .pill.late   { background: var(--amber-soft); color: var(--amber); }

/* Fees vis — FIXED: explicit bar heights resolve correctly */
.vis-fees .head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; gap: 16px; }
.vis-fees .head h5 { font-size: 14px; font-weight: 600; }
.vis-fees .head .total { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.vis-fees .head .total .pct { font-size: 12px; color: var(--green); margin-left: 6px; font-weight: 500; }
.vis-fees .head .sub { font-size: 12px; color: var(--fg-3); margin-top: 2px; }
.vis-fees .chart-wrap {
  position: relative;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.vis-fees .gridline {
  position: absolute; left: 0; right: 0;
  border-top: 1px dashed var(--line);
  pointer-events: none;
}
.vis-fees .bars {
  display: flex; gap: 12px; align-items: flex-end;
  height: 140px; position: relative;
}
.vis-fees .bar {
  flex: 1;
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 6px;
  position: relative;
}
.vis-fees .bar .col {
  width: 100%; max-width: 36px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-radius: 5px 5px 0 0;
  position: relative;
  transition: height 0.5s var(--ease-snap);
  box-shadow: 0 0 24px -6px var(--accent);
}
.vis-fees .bar.pending .col { background: linear-gradient(180deg, var(--bg-4), var(--bg-3)); box-shadow: none; }
.vis-fees .bar .col .v {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  font-size: 9.5px; color: var(--fg-3);
  font-family: 'Geist Mono', monospace; font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity 0.2s;
}
.vis-fees .bar:hover .col .v { opacity: 1; }
.vis-fees .bar .lbl { font-size: 10px; color: var(--fg-3); position: absolute; bottom: -18px; }
.vis-fees .bars-x-pad { padding-bottom: 22px; }
.vis-fees .footer-row { display: flex; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; flex-wrap: wrap; }
.vis-fees .footer-row .chip { display: inline-flex; gap: 6px; align-items: center; color: var(--fg-3); }
.vis-fees .footer-row .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.vis-fees .footer-row .dot.gray { background: var(--bg-4); }
.vis-fees .insight {
  margin-top: 14px; padding: 10px 12px;
  background: var(--bg-2); border-radius: 8px;
  font-size: 12px; color: var(--fg-2);
  display: flex; gap: 8px; align-items: flex-start;
}
.vis-fees .insight svg { width: 14px; height: 14px; margin-top: 2px; color: var(--accent-2); flex-shrink: 0; }

/* Tests vis */
.vis-test table { width: 100%; border-collapse: collapse; font-size: 13px; }
.vis-test thead th {
  text-align: left; text-transform: uppercase;
  font-size: 10px; letter-spacing: 0.08em;
  color: var(--fg-3); font-weight: 500;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.vis-test thead th:last-child, .vis-test tbody td:last-child { text-align: right; }
.vis-test tbody td { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--fg-2); font-variant-numeric: tabular-nums; }
.vis-test tbody tr:last-child td { border-bottom: none; }
.vis-test .pct { font-weight: 600; color: var(--fg); }
.vis-test .grade {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
}
.vis-test .grade.a { background: var(--green-soft); color: var(--green); }
.vis-test .grade.b { background: var(--blue-soft); color: var(--blue); }
.vis-test .grade.c { background: var(--amber-soft); color: var(--amber); }
.vis-test .grade.d { background: var(--red-soft); color: var(--red); }
.vis-test .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.vis-test .head h5 { font-size: 14px; font-weight: 600; }
.vis-test .head .meta { font-size: 12px; color: var(--fg-3); }

/* Insights vis */
.vis-ins .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.vis-ins .head h5 { font-size: 14px; font-weight: 600; }
.vis-ins .ins-card {
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 13px;
}
.vis-ins .ins-card:last-child { margin-bottom: 0; }
.vis-ins .ins-card .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.vis-ins .ins-card .ico svg { width: 14px; height: 14px; }
.vis-ins .ins-card .txt strong { display: block; color: var(--fg); margin-bottom: 2px; font-weight: 600; font-size: 13px; }
.vis-ins .ins-card .txt span   { color: var(--fg-3); font-size: 12.5px; }
.vis-ins .ins-card.red    { background: rgba(239, 68, 68, 0.06); border-color: rgba(239, 68, 68, 0.2); }
.vis-ins .ins-card.red    .ico { background: var(--red-soft);   color: var(--red); }
.vis-ins .ins-card.amber  { background: rgba(245, 158, 11, 0.06); border-color: rgba(245, 158, 11, 0.2); }
.vis-ins .ins-card.amber  .ico { background: var(--amber-soft); color: var(--amber); }
.vis-ins .ins-card.green  { background: rgba(16, 185, 129, 0.06); border-color: rgba(16, 185, 129, 0.2); }
.vis-ins .ins-card.green  .ico { background: var(--green-soft); color: var(--green); }
.vis-ins .ins-card.accent { background: rgba(124, 58, 237, 0.06); border-color: rgba(124, 58, 237, 0.2); }
.vis-ins .ins-card.accent .ico { background: var(--accent-soft); color: var(--accent-2); }

/* =========================================================
   INTERACTIVE DEMO — the centrepiece
   ========================================================= */
.demo-section {
  background:
    radial-gradient(ellipse at 50% 0%, var(--accent-soft) 0%, transparent 40%),
    var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.demo-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 40px; flex-wrap: wrap;
  margin-bottom: 48px;
}
.demo-head .left { flex: 1; min-width: 280px; max-width: 720px; }
.demo-head .left h2 { margin-top: 14px; }
.demo-head .left p { margin-top: 18px; font-size: clamp(16px, 1.4vw, 18px); color: var(--fg-3); }
.demo-head .right { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.kbd-hint {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px; color: var(--fg-2);
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease-snap);
  cursor: pointer;
}
.kbd-hint:hover { background: var(--bg-2); border-color: var(--line-3); transform: translateY(-1px); }
.kbd-hint .kbd {
  display: inline-flex; gap: 3px;
}
.kbd span, .kbd-hint .kbd span {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px; font-weight: 500;
  color: var(--fg-2);
  box-shadow: 0 1px 0 var(--line);
}

.demo-browser {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.demo-browser .browser-chrome {
  height: 44px;
  padding: 0 16px;
  gap: 18px;
}
.demo-browser .browser-url {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--bg-3);
  padding: 5px 14px;
  border-radius: 999px;
  text-align: left;
  flex: 0 0 auto;
  max-width: 60%;
  font-size: 12px;
}
.demo-browser .browser-url::before {
  content: ""; width: 12px; height: 12px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='11' width='18' height='11' rx='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>") center / contain no-repeat;
}
.demo-browser .url-spacer { flex: 1; }
.demo-browser .url-search-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-3);
  padding: 5px 12px 5px 14px;
  border-radius: 999px;
  font-size: 12px; color: var(--fg-3);
  border: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.demo-browser .url-search-btn:hover { border-color: var(--line-2); color: var(--fg-2); }

.demo-app {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  height: 620px;
  position: relative;
}
.demo-side {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
}
.demo-side .brand-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 18px;
  font-size: 13px; font-weight: 600;
}
.demo-side .brand-row .m {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  display: grid; place-items: center; color: white;
}
.demo-side .brand-row .ins { font-size: 10px; color: var(--fg-3); font-weight: 400; display: block; }
.demo-side .nav-section {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-4); padding: 12px 10px 6px;
}
.demo-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--fg-3);
  transition: background 0.2s, color 0.2s;
  width: 100%; text-align: left;
  position: relative;
}
.demo-nav-item:hover { color: var(--fg); background: var(--bg-3); }
.demo-nav-item.active { color: var(--fg); background: var(--bg-3); }
.demo-nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px;
  width: 3px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.demo-nav-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.demo-nav-item .badge {
  margin-left: auto;
  background: var(--accent-soft); color: var(--accent-2);
  font-size: 10px; padding: 1px 7px; border-radius: 999px;
}
.demo-nav-item .badge.red { background: var(--red-soft); color: var(--red); }

.demo-side .side-foot {
  margin-top: auto;
  padding: 12px 10px; border-top: 1px solid var(--line);
}
.demo-side .user-card {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
}
.demo-side .user-card .av {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-2);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
}
.demo-side .user-card .name { font-weight: 500; }
.demo-side .user-card .role { color: var(--fg-3); font-size: 10px; }

.demo-main {
  position: relative;
  overflow: hidden;
}
.demo-panel {
  position: absolute; inset: 0;
  padding: 24px 28px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.32s var(--ease-out), transform 0.32s var(--ease-snap);
}
.demo-panel.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.demo-panel-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px; gap: 16px;
}
.demo-panel-head h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.demo-panel-head .meta { font-size: 12px; color: var(--fg-3); margin-top: 4px; }

/* Dashboard panel — stat tiles + insight banner + chart */
.d-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 16px;
}
.d-stat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.d-stat .ico {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  margin-bottom: 10px;
}
.d-stat .ico svg { width: 14px; height: 14px; }
.d-stat .num { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.d-stat .lbl { font-size: 11px; color: var(--fg-3); margin-top: 2px; }
.d-stat .trend { font-size: 11px; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; }
.d-stat .trend.up { color: var(--green); }
.d-stat .trend.down { color: var(--red); }
.d-stat.a1 .ico { background: var(--accent-soft); color: var(--accent-2); }
.d-stat.a2 .ico { background: var(--green-soft); color: var(--green); }
.d-stat.a3 .ico { background: var(--red-soft); color: var(--red); }
.d-stat.a4 .ico { background: var(--amber-soft); color: var(--amber); }

.d-insight {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 16px;
  font-size: 13px;
}
.d-insight .ico {
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-2);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.d-insight .ico svg { width: 12px; height: 12px; }
.d-insight strong { color: var(--fg); font-weight: 600; }
.d-insight .ts { color: var(--fg-4); font-size: 11px; margin-left: auto; font-family: 'Geist Mono', monospace; }

.d-row { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; }
.d-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.d-card .ch-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.d-card .ch-head h5 { font-size: 12px; font-weight: 600; }
.d-card .ch-head .pill { font-size: 10px; color: var(--green); background: var(--green-soft); padding: 2px 8px; border-radius: 999px; }
.d-card svg.chart { width: 100%; height: 130px; }

.d-side-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.d-side-card h5 { font-size: 12px; font-weight: 600; margin-bottom: 10px; }
.d-side-card .pie-wrap { display: flex; align-items: center; gap: 14px; }
.d-side-card svg.pie { width: 80px; height: 80px; flex-shrink: 0; }
.d-side-card .pie-legend { font-size: 11px; color: var(--fg-2); display: flex; flex-direction: column; gap: 6px; }
.d-side-card .pie-legend .row { display: flex; align-items: center; gap: 8px; }
.d-side-card .pie-legend .dt { width: 6px; height: 6px; border-radius: 50%; }

/* Students panel */
.d-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.d-search-field {
  flex: 1; min-width: 200px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 10px;
  font-size: 12px; color: var(--fg-3);
  transition: border-color 0.2s;
  cursor: pointer;
}
.d-search-field:hover { border-color: var(--line-2); }
.d-search-field svg { width: 14px; height: 14px; }
.d-search-field .kbd-mini {
  margin-left: auto;
  display: inline-flex; gap: 2px;
}
.d-search-field .kbd-mini span {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 4px; font-size: 10px; font-family: 'Geist Mono', monospace;
}
.d-filter-pill {
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--fg-2);
}
.d-filter-pill.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }

.d-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.d-table thead th {
  text-align: left;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-3); font-weight: 500;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg-1); z-index: 1;
}
html[data-theme="light"] .d-table thead th { background: var(--bg); }
.d-table tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}
.d-table tbody tr { transition: background 0.15s; cursor: pointer; }
.d-table tbody tr:hover { background: var(--bg-2); }
.d-table .stu { display: flex; align-items: center; gap: 10px; }
.d-table .stu .av {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent-2);
}
.d-table .stu .av.g { background: var(--green-soft); color: var(--green); }
.d-table .stu .av.a { background: var(--amber-soft); color: var(--amber); }
.d-table .stu .av.b { background: var(--blue-soft); color: var(--blue); }
.d-table .stu .av.p { background: var(--pink-soft); color: var(--pink); }
.d-table .stu .name { color: var(--fg); font-weight: 500; }
.d-table .stu .meta { font-size: 11px; color: var(--fg-3); }

.tag {
  display: inline-block;
  font-size: 11px; padding: 2px 8px; border-radius: 5px;
  background: var(--bg-3); color: var(--fg-2);
  font-weight: 500;
}
.tag.active { background: var(--green-soft); color: var(--green); }
.tag.late   { background: var(--amber-soft); color: var(--amber); }
.tag.due    { background: var(--red-soft); color: var(--red); }
.tag.paid   { background: var(--green-soft); color: var(--green); }
.tag.low    { background: var(--green-soft); color: var(--green); }
.tag.med    { background: var(--amber-soft); color: var(--amber); }
.tag.high   { background: var(--red-soft); color: var(--red); }

/* Attendance panel */
.d-att-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 16px;
}
.d-mini-stat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
}
.d-mini-stat .num {
  font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums;
  min-width: 50px;
}
.d-mini-stat.g .num { color: var(--green); }
.d-mini-stat.a .num { color: var(--amber); }
.d-mini-stat.r .num { color: var(--red); }
.d-mini-stat .lbl { font-size: 11px; color: var(--fg-3); }

.att-row {
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 6px;
  background: var(--bg-2);
  transition: background 0.15s;
}
.att-row:hover { background: var(--bg-3); }
.att-name { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.att-name .av {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-2);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
}
.att-pills { display: inline-flex; gap: 4px; padding: 3px; background: var(--bg-3); border-radius: 8px; }
.att-pill {
  font-size: 11px; padding: 5px 12px; border-radius: 6px;
  color: var(--fg-3); font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.att-pill:hover { color: var(--fg); }
.att-pill.active.p { background: var(--green); color: white; }
.att-pill.active.l { background: var(--amber); color: white; }
.att-pill.active.a { background: var(--red); color: white; }
.att-action {
  display: flex; gap: 8px; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Fees panel */
.d-fee-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 16px;
}
.d-fee-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px;
}
.d-fee-card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.d-fee-card .top h5 { font-size: 11px; font-weight: 500; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em; }
.d-fee-card .top .delta { font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.d-fee-card .top .delta.up { background: var(--green-soft); color: var(--green); }
.d-fee-card .top .delta.down { background: var(--red-soft); color: var(--red); }
.d-fee-card .big { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.d-fee-card .bar {
  margin-top: 10px; height: 4px;
  background: var(--bg-3); border-radius: 2px; overflow: hidden;
  position: relative;
}
.d-fee-card .bar .fill { height: 100%; background: var(--accent); border-radius: 2px; }

.fee-row {
  display: grid; grid-template-columns: 1.4fr 0.9fr 0.7fr 0.8fr 0.5fr;
  gap: 14px; align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  transition: background 0.15s;
}
.fee-row:hover { background: var(--bg-2); }
.fee-row .av {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-2);
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
}
.fee-row .name-col { display: flex; align-items: center; gap: 10px; }
.fee-row .amt { font-variant-numeric: tabular-nums; color: var(--fg); font-weight: 500; }
.fee-row .receipt-btn {
  font-size: 11px; padding: 5px 12px; border-radius: 999px;
  background: var(--bg-3); color: var(--fg-2);
  transition: background 0.2s, color 0.2s;
}
.fee-row .receipt-btn:hover { background: var(--accent); color: white; }

/* Fee record modal */
.fee-modal {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease-out);
  z-index: 10;
}
.fee-modal.active { opacity: 1; pointer-events: auto; }
.fee-modal .box {
  width: min(380px, 90%);
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 22px;
  transform: translateY(20px);
  transition: transform 0.25s var(--ease-snap);
}
.fee-modal.active .box { transform: translateY(0); }
.fee-modal h4 { font-size: 16px; margin-bottom: 4px; }
.fee-modal .sub { font-size: 12px; color: var(--fg-3); margin-bottom: 18px; }
.fee-modal .amt-input {
  width: 100%;
  background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 14px 16px;
  font-family: 'Geist Mono', monospace; font-size: 20px;
  color: var(--fg); font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
}
.fee-modal .amt-input:focus { border-color: var(--accent); }
.fee-modal .receipt-pill {
  font-size: 11px; color: var(--fg-3);
  background: var(--bg-2); padding: 6px 12px; border-radius: 6px;
  margin-top: 12px; display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Geist Mono', monospace;
}
.fee-modal .actions { display: flex; gap: 10px; margin-top: 18px; }
.fee-modal .actions .btn { flex: 1; height: 40px; font-size: 13px; }

/* Tests panel */
.d-test-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px;
}

/* Reports panel */
.d-report-tile {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px;
  margin-bottom: 12px;
  display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center;
}
.d-report-tile h5 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.d-report-tile p { font-size: 12px; color: var(--fg-3); }
.d-report-tile .stat-big {
  font-size: 28px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  color: var(--accent-2);
}
.d-report-tile.green .stat-big { color: var(--green); }
.d-report-tile.red .stat-big { color: var(--red); }
.d-report-tile.amber .stat-big { color: var(--amber); }

/* Toast for copy actions */
.toast {
  position: absolute;
  left: 50%; bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--fg);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-snap);
  z-index: 20;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast svg { width: 14px; height: 14px; color: var(--green); }

/* =========================================================
   COMMAND PALETTE (⌘K)
   ========================================================= */
.cmd-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease-out);
  z-index: 100;
}
.cmd-overlay.open { opacity: 1; pointer-events: auto; }
.cmd-panel {
  width: min(640px, 92%);
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.6);
  overflow: hidden;
  transform: translateY(-12px) scale(0.98);
  transition: transform 0.2s var(--ease-snap);
}
.cmd-overlay.open .cmd-panel { transform: translateY(0) scale(1); }
.cmd-input-row {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.cmd-input-row svg { width: 18px; height: 18px; color: var(--fg-3); flex-shrink: 0; }
.cmd-input {
  flex: 1;
  background: transparent; border: none; outline: none;
  font-family: inherit; font-size: 16px;
  color: var(--fg);
}
.cmd-input::placeholder { color: var(--fg-4); }
.cmd-input-row .esc {
  font-size: 11px; padding: 3px 8px; border-radius: 5px;
  background: var(--bg-3); color: var(--fg-3);
  font-family: 'Geist Mono', monospace;
  border: 1px solid var(--line);
}
.cmd-list {
  max-height: 50vh; overflow-y: auto;
  padding: 8px;
}
.cmd-group { padding: 8px 0; }
.cmd-group + .cmd-group { border-top: 1px solid var(--line); }
.cmd-group-title {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-4); padding: 6px 12px;
}
.cmd-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.1s;
}
.cmd-item:hover, .cmd-item.selected { background: var(--bg-3); }
.cmd-item .ico {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg-2); color: var(--fg-2);
  display: grid; place-items: center;
  flex-shrink: 0;
  font-size: 13px; font-weight: 600;
}
.cmd-item .ico.s { background: var(--accent-soft); color: var(--accent-2); }
.cmd-item .ico.r { background: var(--green-soft); color: var(--green); }
.cmd-item .ico.a { background: var(--amber-soft); color: var(--amber); font-size: 12px; }
.cmd-item .body { flex: 1; min-width: 0; }
.cmd-item .name { font-size: 14px; font-weight: 500; color: var(--fg); display: flex; align-items: center; gap: 8px; }
.cmd-item .meta { font-size: 11.5px; color: var(--fg-3); margin-top: 2px; display: flex; gap: 8px; }
.cmd-item .meta span { display: inline-flex; align-items: center; gap: 4px; }
.cmd-item mark { background: var(--accent-soft); color: var(--accent-2); border-radius: 3px; padding: 0 2px; }
.cmd-item .type {
  font-size: 10px;
  padding: 2px 8px; border-radius: 4px;
  background: var(--bg-3); color: var(--fg-3);
  font-family: 'Geist Mono', monospace;
}
.cmd-item kbd {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 4px; font-size: 10px;
  font-family: 'Geist Mono', monospace;
  color: var(--fg-3);
}
.cmd-empty {
  padding: 40px 20px; text-align: center;
  color: var(--fg-3); font-size: 14px;
}
.cmd-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 11px; color: var(--fg-4);
}
.cmd-foot .legend { display: flex; gap: 16px; }
.cmd-foot .legend span { display: inline-flex; align-items: center; gap: 5px; }
.cmd-foot kbd {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 4px; font-size: 10px;
  font-family: 'Geist Mono', monospace;
}

@media (max-width: 880px) {
  .demo-app { grid-template-columns: 1fr; height: 720px; }
  .demo-side { display: none; }
  .demo-panel { padding: 18px; }
  .d-stats { grid-template-columns: repeat(2, 1fr); }
  .d-row { grid-template-columns: 1fr; }
  .d-fee-cards { grid-template-columns: 1fr; }
  .d-att-grid { grid-template-columns: 1fr; }
  .d-test-grid { grid-template-columns: 1fr; }
  .fee-row { grid-template-columns: 1fr auto; gap: 8px; font-size: 12px; }
  .fee-row .name-col { grid-column: 1 / -1; }
  .fee-row .receipt-btn { grid-column: 1 / -1; justify-self: start; }
}

/* =========================================================
   WHATSAPP MOMENT
   ========================================================= */
.wa-moment {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-1) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.wa-moment::before {
  content: ""; position: absolute; inset: -20% -20% auto -20%;
  height: 70%;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}
.wa-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  position: relative;
}
@media (max-width: 880px) { .wa-grid { grid-template-columns: 1fr; } }
.wa-grid h2 { margin-top: 14px; }
.wa-grid .lead { margin-top: 20px; font-size: 18px; color: var(--fg-2); max-width: 38ch; line-height: 1.5; }
.wa-pts { margin-top: 32px; display: flex; flex-direction: column; gap: 14px; }
.wa-pts .pt { display: flex; gap: 12px; align-items: flex-start; }
.wa-pts .pt .num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-2);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; font-family: 'Geist Mono', monospace;
  flex-shrink: 0;
}
.wa-pts .pt strong { display: block; color: var(--fg); font-weight: 600; }
.wa-pts .pt span { color: var(--fg-3); font-size: 14px; }

.wa-demo { display: flex; gap: 24px; justify-content: center; align-items: center; position: relative; }
.wa-demo .laptop {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
  width: 280px; box-shadow: var(--shadow-lg);
}
.wa-demo .laptop h6 { font-size: 12px; font-weight: 600; margin-bottom: 12px; display: flex; justify-content: space-between; }
.wa-demo .laptop h6 .meta { font-size: 10px; color: var(--fg-3); font-weight: 400; }
.wa-demo .row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; font-size: 11.5px;
  border-bottom: 1px solid var(--line);
}
.wa-demo .row:last-of-type { border-bottom: none; }
.wa-demo .row .l { display: flex; align-items: center; gap: 8px; color: var(--fg-2); }
.wa-demo .row .l .av {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent-2);
}
.wa-demo .row .l .av.g { background: var(--green-soft); color: var(--green); }
.wa-demo .row .l .av.a { background: var(--amber-soft); color: var(--amber); }
.wa-demo .send-all {
  margin-top: 12px; width: 100%; padding: 10px 0;
  background: var(--wa-green); color: white;
  border-radius: 8px; font-size: 12px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform 0.15s var(--ease-snap), box-shadow 0.2s;
}
.wa-demo .send-all:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -6px var(--wa-green); }
.wa-arrow {
  color: var(--fg-3);
  animation: arrowFloat 2s ease-in-out infinite;
}
@keyframes arrowFloat {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}
.wa-phone {
  width: 200px; height: 400px;
  background: #1a1a1c;
  border-radius: 32px; padding: 7px;
  border: 1px solid var(--line-3);
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}
.wa-phone .scr {
  width: 100%; height: 100%; border-radius: 26px; overflow: hidden;
  background: var(--wa-bg);
  display: flex; flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.wa-phone .hdr {
  background: var(--wa-dark); color: white;
  padding: 12px 10px 8px;
  display: flex; align-items: center; gap: 8px;
}
.wa-phone .hdr .av {
  width: 28px; height: 28px; border-radius: 50%;
  background: white; color: var(--wa-dark);
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.wa-phone .hdr .name { font-size: 12px; font-weight: 500; }
.wa-phone .hdr .stat-l { font-size: 9px; opacity: 0.8; }
.wa-phone .conv { flex: 1; padding: 10px 8px; overflow: hidden; }
.wa-phone .bub {
  background: var(--wa-bubble);
  border-radius: 7px 7px 1px 7px;
  padding: 7px 9px;
  max-width: 92%; margin-left: auto;
  font-size: 10px;
  color: #0a0a0a;
  line-height: 1.45;
  margin-bottom: 6px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
}
.wa-phone .bub.in { opacity: 1; transform: translateY(0); }
.wa-phone .bub strong { display: block; margin-bottom: 3px; font-weight: 600; font-size: 10px; }
.wa-phone .bub .ln { display: flex; justify-content: space-between; padding: 1px 0; font-size: 9.5px; }
.wa-phone .bub .ln span:last-child { color: var(--wa-dark); font-weight: 500; }
.wa-phone .bub .ti { font-size: 8.5px; color: #667781; text-align: right; margin-top: 4px; }
@media (max-width: 580px) {
  .wa-demo { flex-direction: column; }
  .wa-arrow { transform: rotate(90deg); }
  .wa-demo .laptop, .wa-phone { width: 260px; }
  .wa-phone { height: 380px; }
}

/* =========================================================
   COST CALCULATOR
   ========================================================= */
.calc-section {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.calc-card {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.calc-head {
  padding: 32px 36px 28px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; flex-wrap: wrap;
}
.calc-head h3 { font-size: 24px; }
.calc-head .sub { font-size: 14px; color: var(--fg-3); margin-top: 6px; max-width: 50ch; }
.calc-head .freq-toggle {
  display: inline-flex; gap: 2px; padding: 4px;
  background: var(--bg-2); border-radius: 999px; border: 1px solid var(--line);
}
.calc-head .freq-toggle button {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px; color: var(--fg-3);
  transition: background 0.2s, color 0.2s;
}
.calc-head .freq-toggle button.active { background: var(--accent); color: white; }

.calc-slider-row {
  padding: 32px 36px;
  border-bottom: 1px solid var(--line);
}
.calc-slider-row .top {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px;
}
.calc-slider-row .top .lbl { font-size: 13px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.08em; }
.calc-slider-row .top .value { font-size: 36px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.calc-slider-row .top .value .unit { font-size: 16px; color: var(--fg-3); margin-left: 6px; font-weight: 400; letter-spacing: 0; }

.calc-slider {
  appearance: none;
  -webkit-appearance: none;
  width: 100%; height: 6px;
  background: var(--bg-3);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  position: relative;
}
.calc-slider::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) var(--p, 0%), var(--bg-3) var(--p, 0%));
}
.calc-slider::-moz-range-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) var(--p, 0%), var(--bg-3) var(--p, 0%));
}
.calc-slider::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 24px; height: 24px;
  background: white;
  border: 3px solid var(--accent);
  border-radius: 50%;
  margin-top: -9px;
  cursor: grab;
  box-shadow: 0 4px 12px -4px var(--accent), 0 0 0 4px rgba(124,58,237,0.15);
  transition: transform 0.15s var(--ease-snap), box-shadow 0.2s;
}
.calc-slider::-webkit-slider-thumb:active {
  transform: scale(1.15);
  box-shadow: 0 4px 12px -4px var(--accent), 0 0 0 8px rgba(124,58,237,0.2);
  cursor: grabbing;
}
.calc-slider::-moz-range-thumb {
  width: 24px; height: 24px;
  background: white; border: 3px solid var(--accent);
  border-radius: 50%; cursor: grab;
  box-shadow: 0 4px 12px -4px var(--accent), 0 0 0 4px rgba(124,58,237,0.15);
}
.calc-ticks {
  margin-top: 14px;
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--fg-4); font-family: 'Geist Mono', monospace;
}

.calc-results {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}
@media (max-width: 880px) { .calc-results { grid-template-columns: 1fr; } }
.calc-col {
  padding: 28px 32px 32px;
  border-right: 1px solid var(--line);
}
.calc-col:last-child { border-right: none; }
@media (max-width: 880px) { .calc-col { border-right: none; border-bottom: 1px solid var(--line); } .calc-col:last-child { border-bottom: none; } }
.calc-col.highlight {
  background:
    radial-gradient(ellipse at 50% 0%, var(--accent-soft) 0%, transparent 60%),
    var(--bg-2);
  position: relative;
}
.calc-col.highlight::after {
  content: "RECOMMENDED";
  position: absolute; top: 16px; right: 16px;
  font-size: 9px; letter-spacing: 0.1em;
  padding: 3px 8px; border-radius: 4px;
  background: var(--accent); color: white;
}
.calc-col-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.calc-col-head .mk {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 600;
}
.calc-col-head .mk.k1 { background: var(--bg-3); color: var(--fg-2); }
.calc-col-head .mk.k2 { background: var(--amber-soft); color: var(--amber); }
.calc-col-head .mk.k3 { background: var(--accent-soft); color: var(--accent-2); }
.calc-col-head h4 { font-size: 15px; font-weight: 600; }
.calc-col-head .role { font-size: 11px; color: var(--fg-3); margin-top: 2px; }

.calc-price {
  font-size: 40px; font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  display: flex; align-items: baseline; gap: 6px;
}
.calc-price .currency { font-size: 22px; color: var(--fg-3); font-weight: 500; }
.calc-price .per { font-size: 13px; color: var(--fg-3); font-weight: 400; margin-left: 8px; }
.calc-col.highlight .calc-price { color: var(--accent-2); }
.calc-col .price-range {
  font-size: 12px; color: var(--fg-3); margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.calc-break {
  margin-top: 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.calc-break .row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--fg-3);
  padding: 4px 0;
}
.calc-break .row .v { color: var(--fg-2); font-variant-numeric: tabular-nums; font-family: 'Geist Mono', monospace; }
.calc-break .row.total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; color: var(--fg); font-weight: 500; }
.calc-break .row.total .v { color: var(--fg); }

.calc-features { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.calc-features li {
  list-style: none; padding: 6px 0 6px 22px; position: relative;
  font-size: 12.5px; color: var(--fg-2);
}
.calc-features li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 14px; height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>") center / contain no-repeat;
}
.calc-features li.x::before {
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M18 6 6 18M6 6l12 12'/></svg>") center / contain no-repeat;
}
.calc-features li.x { color: var(--fg-3); }

.calc-savings {
  margin: 24px 36px 36px;
  padding: 20px 28px;
  background:
    radial-gradient(ellipse at 0% 50%, var(--accent-soft) 0%, transparent 60%),
    var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.calc-savings .left h5 { font-size: 14px; font-weight: 500; color: var(--fg-3); margin-bottom: 4px; }
.calc-savings .left .big {
  font-size: 32px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--accent-2); font-variant-numeric: tabular-nums;
}
.calc-savings .left .big .sub-text { font-size: 14px; color: var(--fg-3); font-weight: 400; margin-left: 8px; }
.calc-savings .right { font-size: 12px; color: var(--fg-3); max-width: 280px; text-align: right; }

.calc-foot {
  padding: 16px 36px;
  border-top: 1px solid var(--line);
  font-size: 11px; color: var(--fg-4);
  font-family: 'Geist Mono', monospace;
  text-align: center;
  line-height: 1.6;
}

/* =========================================================
   Smart insight tiles
   ========================================================= */
.ins-section {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
html[data-theme="light"] .ins-section { background: var(--bg); }
.ins-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 880px) { .ins-grid { grid-template-columns: 1fr; } }
.ins-tile {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px;
  transition: transform 0.3s var(--ease-snap), border-color 0.2s;
}
html[data-theme="light"] .ins-tile { background: var(--bg-1); }
.ins-tile:hover { transform: translateY(-4px); border-color: var(--line-2); }
.ins-tile .source {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--fg-3);
  font-family: 'Geist Mono', monospace;
  background: var(--bg-2);
  padding: 3px 10px; border-radius: 999px;
  margin-bottom: 14px;
}
.ins-tile h4 { font-size: 17px; font-weight: 600; line-height: 1.35; }
.ins-tile .num {
  margin-top: 14px;
  font-size: 32px; font-weight: 600; letter-spacing: -0.03em;
  color: var(--accent-2); font-variant-numeric: tabular-nums;
}
.ins-tile.green .num { color: var(--green); }
.ins-tile.red   .num { color: var(--red); }
.ins-tile.amber .num { color: var(--amber); }
.ins-tile p { margin-top: 6px; font-size: 13px; color: var(--fg-3); }

/* --------- Trust block --------- */
.trust { text-align: center; }
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 24px;
}
@media (max-width: 880px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
.trust-cell {
  padding: 28px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.trust-cell .ico {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-2);
  display: grid; place-items: center;
  margin: 0 auto 14px;
}
.trust-cell .ico svg { width: 18px; height: 18px; }
.trust-cell h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.trust-cell p  { font-size: 13px; color: var(--fg-3); }

/* --------- FAQ --------- */
.faq {
  max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
}
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 26px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  font-size: 17px; font-weight: 500;
  color: var(--fg);
  transition: color 0.2s;
}
.faq-q:hover { color: var(--accent-2); }
.faq-q .plus { width: 22px; height: 22px; position: relative; flex-shrink: 0; }
.faq-q .plus::before, .faq-q .plus::after {
  content: ""; position: absolute;
  background: currentColor; transition: transform 0.3s var(--ease-snap);
}
.faq-q .plus::before { left: 0; right: 0; top: 50%; height: 1.5px; transform: translateY(-50%); }
.faq-q .plus::after  { top: 0; bottom: 0; left: 50%; width: 1.5px; transform: translateX(-50%); }
.faq-item.open .faq-q .plus::after { transform: translateX(-50%) scaleY(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease-snap), padding 0.3s var(--ease-snap); }
.faq-a-inner { padding: 0 0 26px; color: var(--fg-3); font-size: 15px; max-width: 60ch; line-height: 1.6; }
.faq-item.open .faq-a { max-height: 400px; }

/* --------- Final CTA --------- */
.cta-final {
  text-align: center;
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.cta-final::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, var(--accent-soft) 0%, transparent 50%);
  pointer-events: none;
}
.cta-final h2 { max-width: 16ch; margin: 0 auto; }
.cta-final p { margin-top: 20px; font-size: 18px; color: var(--fg-3); max-width: 50ch; margin-left: auto; margin-right: auto; }
.cta-final .btns { margin-top: 36px; display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.cta-final .footnote { margin-top: 24px; font-size: 13px; color: var(--fg-4); }

/* --------- Footer --------- */
footer { padding: 64px 0 40px; border-top: 1px solid var(--line); }
footer .row {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 20px;
}
footer .links { display: flex; gap: 28px; flex-wrap: wrap; font-size: 14px; color: var(--fg-3); }
footer .links a { transition: color 0.2s; }
footer .links a:hover { color: var(--fg); }
footer .copy { color: var(--fg-4); font-size: 13px; margin-top: 32px; }

/* --------- Reveal animations --------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-snap);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="100"] { transition-delay: 0.1s; }
.reveal[data-delay="200"] { transition-delay: 0.2s; }
.reveal[data-delay="300"] { transition-delay: 0.3s; }
.reveal[data-delay="400"] { transition-delay: 0.4s; }

/* =========================================================
   SVG sizing — icons injected via innerHTML in demo.js
   have no inline width/height; scope them defensively.
   ========================================================= */
.demo-app svg,
.cmd-overlay svg,
.kbd-hint svg,
.browser-url svg,
.url-search-btn svg,
.fee-modal svg,
.demo-panel-head .btn svg,
.toast svg {
  width: 14px; height: 14px;
  flex-shrink: 0;
}
.cmd-overlay .cmd-input-row > svg { width: 18px; height: 18px; }
.demo-side .brand-row .m svg { width: 13px; height: 13px; }
.demo-nav-item svg { width: 15px; height: 15px; }
.d-stat .ico svg { width: 14px; height: 14px; }
.d-insight .ico svg { width: 12px; height: 12px; }
.d-card svg.chart { width: 100%; height: 130px; }
.d-side-card svg.pie { width: 80px; height: 80px; flex-shrink: 0; }
.d-report-tile .stat-big svg { width: 28px; height: 28px; }
.d-search-field svg { width: 14px; height: 14px; }
.cmd-item .ico svg { width: 14px; height: 14px; }
.att-action .btn svg { width: 14px; height: 14px; }
.fee-row .receipt-btn svg { width: 12px; height: 12px; }

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