/* ============================================================
   InstAlert — DeFi-style dark design system
   ============================================================ */
:root {
  --bg: #07050f;
  --bg-2: #0b0818;
  --surface: rgba(22, 17, 40, .55);
  --surface-solid: #14102a;
  --border: rgba(255, 255, 255, .08);
  --border-lit: rgba(255, 255, 255, .16);

  --text: #eef0fb;
  --text-dim: #a6a9cc;
  --text-mute: #6d6f95;

  --blue: #4f8ff7;
  --blue-2: #3b7ce8;
  --pink: #ec4899;
  --purple: #8b5cf6;
  --signal: #34d399;
  --drop: #fbbf24;
  --danger: #f87171;

  --font-sans: "Inter", "Noto Sans Georgian", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --radius: 18px;
  --maxw: 1120px;
  --shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.mono { font-family: var(--font-mono); }

/* subtle starfield-ish body glow */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(50% 40% at 80% 8%, rgba(139, 92, 246, .10), transparent 60%),
    radial-gradient(45% 35% at 12% 90%, rgba(79, 143, 247, .08), transparent 60%);
}

/* ---- layout ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 78px 0; position: relative; }
.center { text-align: center; }
.h-sec {
  font-family: var(--font-sans); font-weight: 750; letter-spacing: -.02em;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.2; margin: 0 0 16px;
}
.eyebrow {
  font-family: var(--font-mono); color: var(--blue); font-weight: 500; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase; margin: 0 0 14px;
}
.lead { color: var(--text-dim); font-size: 1.1rem; max-width: 620px; }
.muted { color: var(--text-mute); font-size: .9rem; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: linear-gradient(135deg, var(--purple), var(--pink)); color: #fff;
  border: none; cursor: pointer;
  padding: 12px 24px; border-radius: 12px; font-size: .96rem; font-weight: 600;
  font-family: var(--font-sans);
  box-shadow: 0 6px 20px rgba(139, 92, 246, .30);
  transition: transform .12s ease, box-shadow .2s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06);
  box-shadow: 0 12px 30px rgba(236, 72, 153, .38); }
.btn:active { transform: translateY(0); filter: brightness(.97); }
.btn-lg { padding: 12px 24px; font-size: .94rem; border-radius: 12px; }
/* Nav pill = glass secondary, so the gradient primaries stay the hero action. */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .05); color: var(--text);
  border: 1px solid var(--border-lit);
  border-radius: 999px; padding: 9px 18px; font-weight: 600; font-size: .92rem;
  transition: border-color .15s, background .15s, transform .12s, box-shadow .2s;
}
.pill:hover { border-color: rgba(236, 72, 153, .5); background: rgba(236, 72, 153, .08);
  transform: translateY(-1px); box-shadow: 0 6px 20px rgba(139, 92, 246, .25); }

/* ---- top nav ---- */
.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 20; }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.08rem; }
/* The mark is a transparent PNG that carries its own glow — no box, rounded
   corners or shadow (those were for the old logo's solid dark tile). */
.brand .logo { width: 32px; height: 32px; object-fit: contain; display: block; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-dim); font-size: .92rem; }
.nav-links a:hover { color: #fff; }

/* ============================================================
   HERO — centered, light-beam
   ============================================================ */
.hero { position: relative; overflow: hidden; padding: 128px 0 34px; }
/* glow behind the left content */
.beam {
  position: absolute; top: -70px; left: 3%; width: min(600px, 64%); height: 640px;
  pointer-events: none; z-index: 0;
}
.beam::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(46% 60% at 45% 6%, rgba(139, 92, 246, .48), transparent 68%),
    radial-gradient(62% 76% at 45% 24%, rgba(236, 72, 153, .3), transparent 70%);
  filter: blur(8px);
  -webkit-mask: linear-gradient(#000 60%, transparent);
  mask: linear-gradient(#000 60%, transparent);
}
.beam::after {  /* vertical streaks */
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 7px, rgba(255, 255, 255, .045) 7px 8px);
  -webkit-mask: radial-gradient(48% 62% at 45% 16%, #000, transparent 72%);
  mask: radial-gradient(48% 62% at 45% 16%, #000, transparent 72%);
}
.hero-grid {
  position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center;
}
.logo-mark {
  width: 74px; height: 74px; margin: 0 0 18px; object-fit: contain; display: block;
}
.login-logo { width: min(150px, 46%); height: auto; margin: 0 auto 4px; display: block; }
.h-hero {
  font-family: var(--font-sans); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.95rem, 4.4vw, 3.2rem); line-height: 1.08; margin: 0 0 8px; color: #fff;
  text-wrap: balance;
}
.h-hero .pink { color: var(--pink); }
.slogan { color: var(--signal); font-weight: 600; font-size: 1rem; letter-spacing: .01em; margin: 0 0 14px; }
.hero-sub { color: var(--text-dim); font-size: 1.05rem; margin: 18px 0 0; max-width: 480px; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* ---- filter-management showcase (landing) ---- */
/* Stretch: the card is shorter than the feature list, and letting it sit at its
   natural height left a dead gap beneath it. Stretching makes the card fill the
   row (the alert list anchors to the bottom), so the column reads as one block. */
.manage-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 38px; align-items: stretch; }
.mock-filter { background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; }
.mf-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.mf-label { font-weight: 650; color: #fff; }
.mf-actions { display: flex; gap: 2px; margin-left: auto; }
.mock-filter .recent-list { margin-top: 0; padding-top: 14px; border-top: 1px solid var(--border); }
/* The graph absorbs the card's spare height instead of leaving a dead gap
   above the alert list — so it grows on wide screens and stays compact on
   phones (where the card is at its natural height). */
.mock-filter .spark { margin-bottom: 14px; flex: 1; display: flex; flex-direction: column; }
.mock-filter .spark .spark-bars { flex: 1; height: auto; min-height: 26px; }
.mock-filter .recent-item .r-link { color: var(--text-dim); }
.manage-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.manage-list li { display: flex; gap: 13px; align-items: flex-start; }
.manage-list .ml-ic { flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--border-lit); }
.manage-list b { display: block; color: #fff; font-size: .97rem; margin-bottom: 3px; }
.manage-list p { margin: 0; color: var(--text-dim); font-size: .89rem; line-height: 1.5; }

/* ---- animated radar (hero right) ---- */
.hero-right { display: flex; justify-content: center; }
.radar {
  position: relative; width: min(400px, 84vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle, rgba(52, 211, 153, .12), rgba(5, 18, 13, .5) 68%, rgba(3, 10, 8, .65));
  border: 1px solid rgba(52, 211, 153, .35);
  box-shadow: 0 0 70px rgba(52, 211, 153, .16), inset 0 0 50px rgba(52, 211, 153, .07);
}
.radar-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.radar-svg circle, .radar-svg line { fill: none; stroke: rgba(52, 211, 153, .32); stroke-width: 1; }
.radar-svg .dot { fill: rgba(52, 211, 153, .55); stroke: none; }
.radar-grid {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 9.9%, rgba(52, 211, 153, .1) 9.9% 10%),
    repeating-linear-gradient(90deg, transparent 0 9.9%, rgba(52, 211, 153, .1) 9.9% 10%);
  -webkit-mask: radial-gradient(circle, #000 66%, transparent 70%);
  mask: radial-gradient(circle, #000 66%, transparent 70%);
}
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(52, 211, 153, .5) 0deg, rgba(52, 211, 153, .14) 22deg, transparent 42deg, transparent 360deg);
  animation: radar-rotate 4s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 69%, transparent 71%);
  mask: radial-gradient(circle, #000 69%, transparent 71%);
}
@keyframes radar-rotate { to { transform: rotate(360deg); } }
.rblip {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 12px #34d399, 0 0 4px #fff; opacity: 0;
  animation: rblip 4s linear infinite;
}
@keyframes rblip { 0%, 100% { opacity: 0; transform: scale(.4); } 6% { opacity: 1; transform: scale(1); } 55% { opacity: .2; } }

/* ---- product mockup (hero centerpiece) ---- */
.mock {
  /* width matches the hero content inset (.hero-grid padding) so the card lines
     up with the text above instead of running full-bleed on phones */
  position: relative; z-index: 2; max-width: 560px; width: calc(100% - 48px);
  margin: 56px auto 0;
  background: rgba(14, 11, 28, .72); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-lit); border-radius: 22px; box-shadow: var(--shadow);
  overflow: hidden; text-align: left;
}
.mock-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; border-bottom: 1px solid var(--border);
}
.mock-head .brand { font-size: .98rem; }
.mock-dots { color: var(--text-mute); letter-spacing: 3px; }
.mock-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.mock-alert {
  display: flex; gap: 12px; padding: 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--border);
  border-left: 3px solid var(--signal);
}
.mock-alert.drop { border-left-color: var(--drop); }
.mock-alert .m-ic { font-size: 1.3rem; }
.mock-alert .m-tag { font-size: .74rem; color: var(--signal); letter-spacing: .03em; font-weight: 600; }
.mock-alert.drop .m-tag { color: var(--drop); }
.mock-alert .m-title { font-weight: 600; font-size: .98rem; margin: 3px 0; }
.mock-alert .m-meta { color: var(--text-dim); font-size: .88rem; }
.mock-alert .m-meta b { font-family: var(--font-mono); font-weight: 500; color: var(--text); }
.mock-foot {
  padding: 12px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: .8rem; color: var(--text-mute);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--signal);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); animation: pulse 2s infinite; display: inline-block; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

/* ============================================================
   STATS — floating cards with bar charts
   ============================================================ */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card {
  background: var(--surface); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-lit); border-radius: 18px; padding: 18px 16px;
}
.stat-card .s-val { font-family: var(--font-mono); font-weight: 700; font-size: 1.35rem; }
.stat-card .s-lbl { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-mute); margin-top: 2px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 46px; margin-top: 14px; }
.bars i { flex: 1; border-radius: 3px 3px 0 0; display: block; }
.bars.p i { background: linear-gradient(180deg, var(--pink), rgba(236, 72, 153, .25)); }
.bars.g i { background: linear-gradient(180deg, var(--signal), rgba(52, 211, 153, .25)); }
.bars.b i { background: linear-gradient(180deg, var(--blue), rgba(79, 143, 247, .25)); }

/* ---- feature cards ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.card:hover { border-color: var(--border-lit); box-shadow: 0 18px 44px rgba(0, 0, 0, .4); transform: translateY(-3px); }
.feat-ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.35rem; margin-bottom: 16px;
  background: rgba(79, 143, 247, .12); border: 1px solid rgba(79, 143, 247, .25);
}
.feat-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.feat-desc { color: var(--text-dim); font-size: .95rem; }

/* ---- steps ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step-num {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem; color: var(--blue);
  background: rgba(79, 143, 247, .1); border: 1px solid rgba(79, 143, 247, .28); margin-bottom: 16px;
}
.step h3 { font-size: 1.1rem; margin: 0 0 8px; }
.step p { color: var(--text-dim); font-size: .95rem; margin: 0; }

/* ---- integration/site chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border-lit); border-radius: 999px;
  padding: 11px 20px; font-weight: 600; font-size: .95rem;
}
.chip small { font-family: var(--font-mono); color: var(--text-mute); font-weight: 400; font-size: .8rem; }
.chip:hover { border-color: var(--blue); }

/* ---- CTA ---- */
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid var(--border-lit); border-radius: 26px; padding: 64px 40px;
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(236, 72, 153, .18), transparent 62%),
    radial-gradient(80% 120% at 50% 100%, rgba(79, 143, 247, .18), transparent 62%),
    linear-gradient(160deg, #120d24, #0b0818);
}

/* ---- footer ---- */
.foot { border-top: 1px solid var(--border); padding: 40px 0; color: var(--text-mute); font-size: .88rem; }
.foot-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot .mono { font-size: .8rem; }

/* ============================================================
   App shell (login + dashboard)
   ============================================================ */
.nav.app { position: sticky; background: rgba(7, 5, 15, .8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.app-main { max-width: 880px; margin: 36px auto; padding: 0 20px; }
.panel { background: var(--surface); backdrop-filter: blur(12px); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; margin-bottom: 20px; }
.panel h2 { font-family: var(--font-sans); font-weight: 700; font-size: 1.12rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* Keep the panel heading and the "n / max" counter on one line — they were
   wrapping to two lines each once the view toggle joined the header. */
.row-between h2 { white-space: nowrap; }
.list-tools .muted { white-space: nowrap; }

.add-form { display: flex; gap: 10px; margin-top: 14px; }
.add-form input { flex: 1; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--border-lit);
  background: rgba(0, 0, 0, .3); color: var(--text); font-size: .95rem; font-family: var(--font-sans); }
.add-form input:focus { outline: none; border-color: var(--blue); }

/* Each filter is its own card — separated, not divider-separated rows. The
   stacked list is the base layout; grid view is a desktop-only enhancement
   (below 621px the toggle is hidden and .view-grid simply has no effect). */
.filter-list { list-style: none; padding: 0; margin: 14px 0 0;
  display: flex; flex-direction: column; gap: 12px; }
.filter-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 15px 16px; background: rgba(255, 255, 255, .03); border: 1px solid var(--border);
  border-radius: 14px; transition: border-color .15s, background .15s; }
.filter-item:hover { border-color: var(--border-lit); background: rgba(255, 255, 255, .055); }

@media (min-width: 621px) {
  .filter-list.view-grid { display: grid; gap: 14px; align-items: start;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
  /* Grid view = compact card: stack the content and drop what can't fit a
     narrow column (last-checked, hint). */
  .filter-list.view-grid .filter-item { flex-direction: column; align-items: stretch; gap: 10px; }
  .filter-list.view-grid .filter-main { width: 100%; }
  .filter-list.view-grid .filter-label { display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; }
  .filter-list.view-grid .checked,
  .filter-list.view-grid .filter-hint { display: none; }
  .filter-list.view-grid .filter-actions { justify-content: flex-end; margin-top: auto; }
  .filter-list.view-grid .spark-sm .spark-bars { max-width: none; }
  /* the "·" separators strand at the start of a line once the stats wrap */
  .filter-list.view-grid .stat-dot { display: none; }
  /* Recent alerts inside a narrow card: title on its own line (ellipsis), with
     price and time on a second line, so nothing is squeezed or clipped. */
  .filter-list.view-grid .recent-item { display: grid; gap: 1px 6px;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "ic link" "price when"; }
  .filter-list.view-grid .recent-item .r-ic { grid-area: ic; }
  .filter-list.view-grid .recent-item .r-link { grid-area: link; }
  .filter-list.view-grid .recent-item .r-price { grid-area: price; }
  .filter-list.view-grid .recent-item .r-when { grid-area: when; margin-left: 0; text-align: right; }
}
/* view toggle */
.list-tools { display: flex; align-items: center; gap: 12px; }
.view-toggle { display: inline-flex; gap: 2px; background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border-lit); border-radius: 10px; padding: 3px; }
.vt-btn { background: transparent; border: none; cursor: pointer; color: var(--text-mute);
  padding: 5px 10px; border-radius: 8px; font-size: .9rem; line-height: 1;
  transition: background .15s, color .15s; }
.vt-btn:hover { color: var(--text); }
.vt-btn[aria-pressed="true"] { background: rgba(255, 255, 255, .1); color: var(--text); }
.site-tag { font-family: var(--font-mono); font-size: .74rem; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--border-lit); margin-right: 10px; }
.filter-label { font-weight: 550; color: var(--text); text-decoration: none; }
a.filter-label:hover { color: var(--pink); text-decoration: underline; }

/* ---- filter detail page ---- */
.back-link { display: inline-block; color: var(--text-dim); text-decoration: none;
  font-size: .9rem; margin-bottom: 16px; }
.back-link:hover { color: var(--pink); }
.detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-head .detail-title { margin: 0; font-size: 1.15rem; font-weight: 700; }
.spark { margin-top: 20px; }
.spark-label { font-size: .74rem; color: var(--text-mute); letter-spacing: .02em; margin-bottom: 8px; }
.spark-bars { display: flex; align-items: flex-end; gap: 4px; height: 48px; }
/* Each day is a full-height column so the whole slot is hoverable — a day with
   0 alerts is a 3px bar, which would otherwise be impossible to hover. */
.spark-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; }
.spark-col i { width: 100%; min-height: 3px; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--signal), rgba(52, 211, 153, .25));
  transition: filter .12s; }
.spark-col:hover i { filter: brightness(1.35); }
/* pretty hover tooltip (replaces the plain native title) */
.spark-col:hover::after {
  content: attr(data-label); position: absolute; left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%); background: var(--surface-solid); color: var(--text);
  border: 1px solid var(--border-lit); border-radius: 9px; padding: 6px 10px;
  font-size: .74rem; font-weight: 600; white-space: nowrap; letter-spacing: .01em;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .5); pointer-events: none; z-index: 20; }
.spark-col:hover::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 3px);
  transform: translateX(-50%); border: 5px solid transparent;
  border-top-color: var(--border-lit); pointer-events: none; z-index: 20; }
/* compact sparkline for dashboard rows */
.spark-sm { margin-top: 2px; }
.spark-sm .spark-bars { height: 26px; gap: 3px; max-width: 340px; }
.alert-history { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; }
.alert-row { display: flex; align-items: center; gap: 9px; font-size: .86rem; min-width: 0;
  padding: 10px 0; border-top: 1px solid var(--border); }
.alert-row:first-child { border-top: none; }
.alert-row .r-ic { flex: none; }
.alert-row .r-link { color: var(--text-dim); text-decoration: none; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.alert-row .r-link:hover { color: var(--pink); text-decoration: underline; }
.alert-row .r-price { flex: none; font-weight: 600; color: var(--text); }
.alert-row .r-price .r-was { font-weight: 400; color: var(--text-mute); font-size: .8rem;
  text-decoration: line-through; }
.alert-row .r-when { flex: none; margin-left: auto; color: var(--text-mute); font-size: .76rem; }

/* ---- settings page ---- */
.settings-form { margin-top: 16px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.interval-options { display: flex; flex-wrap: wrap; gap: 9px; }
.interval-option { position: relative; cursor: pointer; }
.interval-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.interval-option span { display: inline-block; padding: 9px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border-lit);
  font-size: .88rem; color: var(--text-dim); transition: all .15s; }
.interval-option:hover span { color: var(--text); border-color: rgba(236, 72, 153, .4); }
.interval-option.is-active span,
.interval-option input:checked + span {
  background: linear-gradient(135deg, var(--purple), var(--pink)); color: #fff;
  border-color: transparent; font-weight: 600; }
/* keyboard focus must stay visible even though the radio itself is hidden */
.interval-option input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.account-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; }
.account-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 11px 0; border-top: 1px solid var(--border); font-size: .9rem; }
.account-list li:first-child { border-top: none; }
.account-list span { color: var(--text-dim); }
.account-list b { color: var(--text); font-weight: 600; }
.account-list a { color: var(--pink); text-decoration: none; }
.account-list a:hover { text-decoration: underline; }

/* ---- filter controls (pause/rename/open-site) ---- */
.btn-sm { padding: 8px 14px; font-size: .85rem; border-radius: 10px; box-shadow: none; }
.btn-ghost { background: rgba(255, 255, 255, .05); color: var(--text);
  border: 1px solid var(--border-lit); box-shadow: none; }
.btn-ghost:hover { border-color: rgba(236, 72, 153, .5); background: rgba(236, 72, 153, .08);
  filter: none; transform: translateY(-1px); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: rgba(248, 113, 113, .5); background: rgba(248, 113, 113, .1); }
.paused-badge { font-size: .68rem; padding: 2px 9px; border-radius: 999px; margin-left: 8px;
  background: rgba(251, 191, 36, .14); color: var(--drop); border: 1px solid rgba(251, 191, 36, .3); }
.is-paused .filter-main { opacity: .5; }
.checked { color: var(--text-mute); }
.filter-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.act-btn { background: transparent; border: 1px solid transparent; cursor: pointer;
  font-size: .95rem; opacity: .6; padding: 6px 8px; border-radius: 9px; color: var(--text);
  text-decoration: none; display: inline-flex; align-items: center; line-height: 1; }
.act-btn:hover { opacity: 1; background: rgba(255, 255, 255, .06); }
.detail-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.rename-form { display: flex; gap: 8px; flex: 1; min-width: 220px; }
.rename-form input[type=text] { flex: 1; min-width: 0; background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border-lit); border-radius: 10px; padding: 8px 12px; color: var(--text);
  font-family: var(--font-sans); font-size: .9rem; }
.rename-form input[type=text]:focus { outline: none; border-color: rgba(236, 72, 153, .5); }
.ctrl-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-id { font-family: var(--font-mono); color: var(--text-mute); font-size: .78rem; margin-left: 6px; }
.filter-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.filter-head { display: flex; align-items: center; flex-wrap: wrap; }
.filter-stats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .8rem; color: var(--text-mute); }
.filter-stats .stat-count { color: var(--signal); font-weight: 600; }
.filter-stats .stat-new { color: var(--blue); }
.filter-stats .stat-drop { color: var(--drop); }
.filter-stats .stat-dot { opacity: .5; }
.filter-hint { font-size: .78rem; color: var(--drop); opacity: .9; }

/* dashboard summary header */
.summary-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.sum-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; text-align: center; backdrop-filter: blur(12px); }
.sum-val { font-size: 1.7rem; font-weight: 800; color: #fff; line-height: 1; }
.sum-lbl { font-size: .72rem; color: var(--text-mute); margin-top: 6px; letter-spacing: .02em; }

/* recent-alerts feed (per filter) */
.recent { margin-top: 2px; }
.recent-toggle { cursor: pointer; font-size: .78rem; color: var(--text-dim);
  list-style: none; display: inline-flex; align-items: center; gap: 5px; user-select: none; }
.recent-toggle::before { content: "▸"; font-size: .7rem; transition: transform .15s; }
.recent[open] .recent-toggle::before { transform: rotate(90deg); }
.recent-toggle::-webkit-details-marker { display: none; }
.recent-list { list-style: none; padding: 8px 0 2px; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.recent-item { display: flex; align-items: center; gap: 8px; font-size: .82rem; min-width: 0; }
.recent-item .r-ic { flex: none; }
.recent-item .r-link { color: var(--text-dim); text-decoration: none; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.recent-item .r-link:hover { color: var(--pink); text-decoration: underline; }
.recent-item .r-price { flex: none; font-weight: 600; color: var(--text); }
.recent-item .r-when { flex: none; margin-left: auto; color: var(--text-mute); font-size: .74rem; }
.btn-remove { background: transparent; border: 1px solid transparent; cursor: pointer;
  font-size: 1.05rem; opacity: .55; padding: 6px 9px; border-radius: 9px; }
.btn-remove:hover { opacity: 1; background: rgba(248, 113, 113, .12); }

.flash { padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; font-size: .95rem; }
.flash.ok { background: rgba(52, 211, 153, .12); color: var(--signal); border: 1px solid rgba(52, 211, 153, .3); }
.flash.error { background: rgba(248, 113, 113, .12); color: var(--danger); border: 1px solid rgba(248, 113, 113, .3); }
.flash.warn { background: rgba(251, 191, 36, .12); color: #fbbf24; border: 1px solid rgba(251, 191, 36, .3); }
.flash.warn a { color: inherit; text-decoration: underline; font-weight: 600; }

.login-card { max-width: 440px; margin: 90px auto; text-align: center; position: relative; }
.login-box { margin-top: 26px; }

/* ---- scroll reveal ---- */
html.js .section .card, html.js .section .step, html.js .section .center,
html.js .stat-card, html.js .cta-band, html.js .chip {
  opacity: 0; transform: translateY(22px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1), border-color .18s, box-shadow .18s;
}
html.js .section .card.in, html.js .section .step.in, html.js .section .center.in,
html.js .stat-card.in, html.js .cta-band.in, html.js .chip.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .section .card, html.js .section .step, html.js .section .center,
  html.js .stat-card, html.js .cta-band, html.js .chip { opacity: 1; transform: none; transition: none; }
  .pulse, .radar-sweep, .rblip { animation: none; }
}

/* ---- responsive ---- */
@media (max-width: 860px) {
  .grid-3, .steps, .stats-grid, .stat-cards { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(3, 1fr); }
  .section { padding: 68px 0; }
  /* Only the landing page's section anchors are dropped on small screens.
     The app nav carries settings/logout — hiding those left mobile users with
     no way out of the dashboard. */
  .nav:not(.app) .nav-links { display: none; }
  .nav.app .nav-links { gap: 14px; }
  .nav.app .nav-links a { font-size: .85rem; }
  .cta-band { padding: 44px 24px; }
}

/* Hero collapses to a single full-width column below 1024px: a two-column
   split leaves the headline too narrow (long Georgian words wrap one-per-line).
   Drop the decorative radar here — the product mockup right below carries the
   visual — so the headline can breathe. */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-right { display: none; }
  .hero-sub { max-width: none; }
  .manage-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* Phones: the showcase text ran too large next to the narrow card. */
@media (max-width: 620px) {
  .lead { font-size: .98rem; }
  .manage-grid { gap: 24px; }
  .mock-filter { padding: 16px 15px; }
  .mf-label { font-size: .93rem; }
  .manage-list { gap: 15px; }
  .manage-list b { font-size: .92rem; }
  .manage-list p { font-size: .83rem; line-height: 1.45; }
  .manage-list .ml-ic { width: 30px; height: 30px; font-size: .88rem; }

  /* Dashboard on phones: list view only — a grid of cards is too cramped at
     this width, so the view toggle is hidden and every filter is a full card. */
  .app-main { padding: 0 14px; }
  .panel { padding: 18px 16px; }
  .panel h2 { font-size: 1.02rem; }
  .view-toggle { display: none; }
  .filter-stats .stat-dot { display: none; }
  /* the input+button row didn't wrap, pushing the button off-screen */
  .add-form { flex-wrap: wrap; }
  .add-form input { flex: 1 1 100%; }
  .add-form .btn { width: 100%; }
}

/* ============================================================
   Admin — operator reporting (/admin)
   Reuses the app's surface/panel language; adds only what a
   dashboard needs: a KPI grid, horizontal bars, and a table.
   ============================================================ */
.adm-head { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin: 0 0 20px; }
.adm-title { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 750;
  letter-spacing: -.02em; margin: 0; }
.adm-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* KPI cards: auto-fit so the row reflows from 4-up to 1-up without breakpoints */
.kpi-grid { display: grid; gap: 14px; margin-bottom: 20px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpi { background: var(--surface); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 14px; padding: 18px 18px 16px; }
.kpi-val { font-size: 1.75rem; font-weight: 700; line-height: 1.15;
  letter-spacing: -.02em; color: var(--text); }
.kpi-lbl { font-size: .82rem; color: var(--text-dim); margin-top: 4px; }
.kpi-sub { font-size: .74rem; color: var(--text-mute); margin-top: 8px;
  padding-top: 8px; border-top: 1px solid var(--border); }
.kpi-delta { color: var(--signal); font-family: var(--font-mono);
  font-weight: 600; margin-left: 6px; }

/* Taller sparkline for the 30-day growth charts. */
.spark-lg .spark-bars { height: 110px; gap: 3px; }
.spark-lg .spark-col i {
  background: linear-gradient(180deg, var(--blue), rgba(79, 143, 247, .2)); }
.spark-col.alt i {
  background: linear-gradient(180deg, var(--purple), rgba(139, 92, 246, .2)); }

/* Horizontal bars — funnel, distribution, engagement, tiers. */
.bar-list { display: flex; flex-direction: column; gap: 11px; margin-top: 16px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 1.1fr) 3fr auto;
  align-items: center; gap: 12px; }
.bar-name { font-size: .84rem; color: var(--text-dim); }
.bar-track { height: 10px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, .06); }
.bar-fill { height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--blue-2));
  /* a sliver so a non-zero-but-tiny bucket is still visible */
  min-width: 3px; transition: width .35s ease; }
.bar-fill.purple { background: linear-gradient(90deg, var(--purple), #6d3fd4); }
.bar-fill.signal { background: linear-gradient(90deg, var(--signal), #17a673); }
.bar-val { font-size: .78rem; color: var(--text-mute); white-space: nowrap; }

/* Tables scroll inside their panel rather than widening the page. */
.table-scroll { overflow-x: auto; margin-top: 16px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.adm-table th { text-align: left; font-weight: 600; font-size: .74rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-mute);
  padding: 0 12px 10px 0; white-space: nowrap; }
.adm-table td { padding: 11px 12px 11px 0; border-top: 1px solid var(--border);
  white-space: nowrap; }
.adm-table tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.tg-yes { color: var(--signal); }
.tg-no { color: var(--text-mute); }

.adm-search { display: flex; gap: 10px; flex-wrap: wrap; }
.adm-search input { flex: 1 1 260px; background: rgba(0, 0, 0, .25);
  border: 1px solid var(--border-lit); border-radius: 12px; padding: 12px 14px;
  color: var(--text); font-family: var(--font-sans); font-size: .92rem; }
.adm-search input:focus { outline: none; border-color: var(--blue); }

.pager { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 18px; }

@media (max-width: 720px) {
  /* Stack the bar rows: a 3-column grid squeezes the track to nothing. */
  .bar-row { grid-template-columns: 1fr auto; }
  .bar-track { grid-column: 1 / -1; order: 3; }
  .kpi-val { font-size: 1.5rem; }
}

/* ============================================================
   Auth — email/password sign-in, sign-up, and account claim
   ============================================================ */
.auth-form { display: flex; flex-direction: column; gap: 8px; margin-top: 22px;
  text-align: left; }
.auth-label { font-size: .82rem; color: var(--text-dim); font-weight: 500; }
.auth-form input {
  background: rgba(0, 0, 0, .25); border: 1px solid var(--border-lit);
  border-radius: 12px; padding: 13px 15px; color: var(--text);
  font-family: var(--font-sans); font-size: .95rem; width: 100%; }
/* Email and password are Latin/numeric, so mono suits them and sidesteps the
   Georgian-glyph gap in JetBrains Mono. */
.auth-form input[type="email"], .auth-form input[type="password"] {
  font-family: var(--font-mono); font-size: .9rem; }
.auth-form input:focus { outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(79, 143, 247, .16); }
.auth-form input:not(:placeholder-shown):invalid { border-color: var(--danger); }
.auth-form .btn { margin-top: 12px; width: 100%; }
.auth-form .auth-label + input { margin-bottom: 4px; }
.auth-hint { font-size: .76rem; color: var(--text-mute); margin: -2px 0 0; }
.auth-link { color: var(--blue); font-weight: 600; }
.auth-link:hover { color: var(--pink); }


/* Inside a settings panel the form is left-aligned and not full-bleed. */
.auth-form-inline { max-width: 380px; margin-top: 16px; }
.auth-form-inline .btn { width: auto; align-self: flex-start; }

/* The claim prompt is a warning, not a neutral panel — losing account access
   is the consequence of ignoring it. */
.panel-warn { border-color: rgba(251, 191, 36, .35);
  background: linear-gradient(180deg, rgba(251, 191, 36, .07), transparent 60%),
              var(--surface); }
.panel-warn h2 { color: var(--drop); }

@media (max-width: 720px) {
  /* iOS Safari zooms the page when a focused input's text is under 16px, and
     never zooms back out. 16px is the floor that prevents it.
     Repeats the [type=...] selectors deliberately: the base rule above is more
     specific than a bare `.auth-form input`, so a shorter selector here loses
     no matter where it sits in the file. */
  .auth-form input[type="email"],
  .auth-form input[type="password"],
  .adm-search input { font-size: 16px; }
}

/* ============================================================
   Legal pages (/privacy) — long-form prose, not app chrome
   ============================================================ */
.legal { max-width: 760px; }
.legal .panel h2 { margin-top: 0; font-size: 1.02rem; }
.legal .panel p:last-child { margin-bottom: 0; }
/* Prose needs a longer measure than the app's dense stat rows. */
.legal .muted { line-height: 1.72; }
.legal-list { margin: 12px 0 0; padding-left: 20px; color: var(--text-dim);
  font-size: .9rem; line-height: 1.72; }
.legal-list li { margin-bottom: 8px; }
.legal-list li:last-child { margin-bottom: 0; }
.legal-list b { color: var(--text); font-weight: 600; }
.legal-rule { border: 0; border-top: 1px solid var(--border); margin: 34px 0 26px; }
.foot-inner a { color: var(--text-dim); text-decoration: none; }
.foot-inner a:hover { color: var(--pink); }

/* Language switcher. The active language is not a link and is not dimmed —
   "which one am I reading" has to be answerable without hovering, and two
   equally-styled words would read as two links. */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; }
.lang-switch .lang-on { color: var(--text); font-weight: 600; }
.lang-switch a { color: var(--text-mute); }
.lang-switch a:hover { color: var(--pink); }

/* The language rows on /settings reuse the interval chips, which are <label>s
   there and <a>s here — so the anchor needs the text styling a label inherits. */
a.interval-option { text-decoration: none; color: inherit; }

/* Plan cards (/pricing and /subscription). The cards are the plan config
   rendered — the layout has to survive a tier being added or hidden, so the
   grid auto-fills rather than naming a column count.

   These carry the whole story now; there is no comparison table beside them
   (ADR-037). Each card is a column with its features centred under a price that
   appears exactly once, so five of them read as five answers rather than as a
   grid to be traced. */
.plan-grid { display: grid; gap: 16px; margin: 22px 0;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.plan-card { display: flex; flex-direction: column; gap: 6px;
  align-items: center; text-align: center; }
.plan-card .plan-name { margin: 0; font-size: 1.02rem; }
/* Sans, not mono, even though it is often a number: a negotiated tier reads
   "შეთანხმებით", and the mono faces carry no Georgian glyphs. */
.plan-price { font-size: 1.5rem; font-weight: 700;
  color: var(--text); margin: 2px 0 6px; }
.plan-points { list-style: none; padding: 0; margin: 0 0 14px; width: 100%;
  color: var(--text-dim); font-size: .88rem; line-height: 1.6; }
.plan-points li { display: flex; gap: 8px; align-items: flex-start;
  text-align: left; padding: 4px 0; }
.plan-points li::before { content: "✓"; flex: none; color: var(--signal);
  font-weight: 700; }
/* Analytics is the line a cheaper tier is missing, so it is the one line a
   card states in the negative rather than leaving out — you cannot be sold
   something you never saw named. */
.plan-points li.plan-missing { color: var(--text-mute); }
.plan-points li.plan-missing::before { content: "✕"; color: var(--text-mute); }
.plan-points li.plan-highlight { color: var(--text); font-weight: 600; }
.plan-card .btn { margin-top: auto; }

/* The plan you are on, marked in the colour that means "this is live and
   working" everywhere else in the product. It used to be the brand purple —
   the same purple as the Choose button on every other card, which made the one
   card you could not choose look like the one you should. */
.plan-card.is-current { border-color: rgba(52, 211, 153, .45);
  background: linear-gradient(180deg, rgba(52, 211, 153, .07), transparent 55%),
              var(--surface); }
.plan-current-tag { display: inline-flex; align-items: center; gap: 6px;
  margin-top: auto; padding: 9px 16px; border-radius: 999px;
  background: rgba(52, 211, 153, .12); border: 1px solid rgba(52, 211, 153, .4);
  color: var(--signal); font-size: .82rem; font-weight: 700; }
.plan-current-tag::before { content: "●"; font-size: .6rem; }

/* Subscription (/subscription). Rows in an `.account-list` that carry a control
   rather than just a value — the list already lays out label/value, so the
   button takes the value's place instead of a new row type. */
.account-list li form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.account-list li .row-actions + .row-actions { margin-left: 8px; }
.account-list li small { display: block; font-weight: 400; font-size: .78rem;
  color: var(--text-mute); margin-top: 2px; }
.btn-quiet { background: none; color: var(--text-dim); border: 1px solid var(--border);
  box-shadow: none; }
.btn-quiet:hover { color: var(--text); border-color: rgba(236, 72, 153, .4); filter: none; }

/* The badge that replaced `tier.toUpperCase()`. The paid tiers wear the brand
   and free is the quiet one. */
.plan-pill { display: inline-block; margin-top: 6px; padding: 3px 9px;
  border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  background: rgba(255, 255, 255, .06); color: var(--text-dim);
  border: 1px solid var(--border-lit); }
.plan-pill-standard, .plan-pill-pro, .plan-pill-business {
  background: linear-gradient(135deg, var(--purple), var(--pink)); color: #fff;
  border-color: transparent; }
.plan-pill-starter { background: rgba(79, 143, 247, .16); color: var(--blue);
  border-color: rgba(79, 143, 247, .32); }

/* The confirmation page's warning list — the consequences of a plan change,
   named before anything is written. */
.warn-list { list-style: none; padding: 0; margin: 14px 0 0; }
.warn-list li { display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 0; border-top: 1px solid var(--border); color: var(--text-dim);
  font-size: .9rem; line-height: 1.6; }
.warn-list li:first-child { border-top: none; }
.warn-list li::before { content: "!"; flex: none; width: 18px; height: 18px;
  margin-top: 2px; border-radius: 50%; background: rgba(251, 191, 36, .16);
  color: var(--drop); font-size: .72rem; font-weight: 700; text-align: center;
  line-height: 18px; }
.confirm-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; }

/* The plan you are on, and — separately — the trial. Two facts, two
   treatments: one line saying "Starter (trial)" is how a started trial went
   unnoticed. */
.plan-status { border-color: rgba(52, 211, 153, .34); }
.plan-pill-current { background: rgba(52, 211, 153, .14); color: var(--signal);
  border-color: rgba(52, 211, 153, .42); }
.trial-card { border-color: rgba(251, 191, 36, .34);
  background: linear-gradient(180deg, rgba(251, 191, 36, .06), transparent 60%),
              var(--surface); }
.trial-left { color: var(--drop); white-space: nowrap; }
.trial-bar { height: 5px; border-radius: 999px; margin-top: 14px;
  background: rgba(251, 191, 36, .18); overflow: hidden; }
.trial-bar i { display: block; height: 100%; background: var(--drop); }
.btn-danger { background: none; color: var(--danger); box-shadow: none;
  border: 1px solid rgba(248, 113, 113, .45); }
.btn-danger:hover { background: rgba(248, 113, 113, .10); filter: none; }

/* Poll-health dot on /admin. Green when the scheduler is on schedule, red
   when filters are being polled less often than their plan promises — the one
   failure that produces no error anywhere else. */
.ok-dot, .bad-dot { display: inline-block; width: 9px; height: 9px;
  border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.ok-dot { background: var(--signal); box-shadow: 0 0 0 3px rgba(52, 211, 153, .16); }
.bad-dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(248, 113, 113, .16); }
