/* flo2.com — de-slopped test skin (cool blue-navy, one turquoise accent).
   Headings: Bricolage Grotesque · Body: IBM Plex Sans · Code: IBM Plex Mono. */

:root {
  /* surfaces — cool deep blue-navy (back toward the brand look) */
  --bg: #0b0e22;
  --bg2: #0e1228;
  --panel: #141834;
  --panel2: #141834;
  --panel-solid: #1a1f40;
  --line: rgba(150, 195, 255, 0.10);
  --line2: rgba(150, 195, 255, 0.18);
  --text: #eaf0ff;
  --muted: #a7b1d2;          /* AA on navy */
  --muted2: #7e88a6;

  /* one deliberate turquoise (the prod headline colour) + light-blue support — no gradients */
  --accent: #2fe4d3;
  --aqua: #2fe4d3;           /* legacy name: "cyan" classes stay turquoise */
  --sky: #5cc8f4;            /* light sky-blue */
  --deepsky: #56b4e6;
  --cadet: #3aa9c0;
  --fuchsia: #e85bd0;        /* magenta — kept as a token, used only incidentally */
  --violet: #8b8ff5;         /* fallback role */
  --ok: #2fd98a;             /* success / abtest role — mint */
  --warn: #f2c94c;           /* racing role — gold */
  --bad: #ff5d6c;

  --cyan: var(--aqua);

  /* "gradients" collapsed to the solid turquoise — headlines paint flat accent */
  --grad: #2fe4d3;
  --grad-cta: #2fe4d3;
  --grad-soft: rgba(47, 228, 211, 0.10);

  --radius: 12px;
  --shadow: 0 14px 34px -20px rgba(0, 0, 0, .55);   /* reserved for true overlays only */
  --glow: none;                                     /* still flat — no decorative glow */

  --font-head: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  /* flat charcoal — no whole-page gradient field */
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}
h1, h2, h3, .brand { font-family: var(--font-head); font-weight: 700; }
a { color: var(--aqua); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
/* headline accent — flat turquoise, no gradient, no clip */
.grad-text { color: var(--accent); -webkit-text-fill-color: var(--accent); background: none; }

/* layout */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.row { display: flex; gap: 14px; }
.row.wrap-row { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 14px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; }

/* nav */
/* transparent over the hero (lets the hero background show through); turns footer-dark on scroll */
nav.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; background: transparent; border-bottom: 1px solid transparent; transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease; }
nav.topbar.scrolled { background: rgba(13, 16, 34, .96); border-bottom-color: var(--line2); }
nav.topbar .wrap { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { font-size: 23px; letter-spacing: -.6px; display: flex; align-items: baseline; gap: 0; }
.brand .two { color: var(--accent); -webkit-text-fill-color: var(--accent); background: none; }
.brand .arrow { font-family: var(--font-head); font-weight: 600; font-size: 12px; color: var(--muted2); margin-left: 9px; letter-spacing: .4px; align-self: center; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; }
.navlinks { display: flex; gap: 24px; align-items: center; }
.navlinks a { color: var(--muted); font-size: 14px; font-weight: 500; font-family: var(--font-head); }
.navlinks a:hover { color: var(--text); text-decoration: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); padding: 10px 18px; border-radius: 11px; font-size: 14px; font-weight: 600; font-family: var(--font); cursor: pointer; transition: .16s; white-space: nowrap; }
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border: 1px solid var(--accent); color: #04121a; font-weight: 700; }
.btn.primary:hover { background: #56eddd; border-color: #56eddd; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 9px; }
.btn.danger { color: var(--bad); border-color: rgba(251, 44, 54, .35); }
.btn.danger:hover { border-color: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* inputs */
input, select, textarea { background: #0c1024; border: 1px solid var(--line2); color: var(--text); padding: 11px 13px; border-radius: 10px; font-size: 14px; width: 100%; font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
label { font-size: 12.5px; color: var(--muted); display: block; margin-bottom: 6px; }
.field { margin-bottom: 12px; }

/* cards */
/* one approach: a defined hairline edge, no diffuse shadow */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card.glow { background: var(--panel); box-shadow: none; }
.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--line2); letter-spacing: 0; }
.pill.cyan { color: var(--accent); border-color: rgba(47, 228, 211, .42); background: rgba(47, 228, 211, .08); }
.pill.violet { color: var(--violet); border-color: rgba(139, 143, 245, .42); background: rgba(139, 143, 245, .08); }
.pill.ok { color: var(--ok); border-color: rgba(47, 217, 138, .42); background: rgba(47, 217, 138, .07); }
.pill.warn { color: var(--warn); border-color: rgba(242, 201, 76, .42); background: rgba(242, 201, 76, .07); }
.pill.bad { color: var(--bad); border-color: rgba(255, 93, 108, .42); background: rgba(255, 93, 108, .07); }
.pill.gray { color: var(--muted); }

/* ── hero: full-bleed flow field — streams flowing out to providers ── */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); isolation: isolate; min-height: 600px; }
/* original cyan flow-field restored — eye-catching brand motion */
#hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
#hero-threads { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
@media (max-width: 860px) { #hero-threads { display: none; } } /* phones use the always-on .providers-strip instead */
/* subtle cool-dark readability scrim over the animated field — left-weighted where the copy sits.
   This is a functional legibility gradient (dark), not a coloured glow. */
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background:
  linear-gradient(100deg, rgba(8,10,26,.62) 0%, rgba(8,10,26,.30) 38%, rgba(8,10,26,.05) 60%, transparent 72%); }
.hero .wrap { position: relative; z-index: 2; }
/* extra top padding clears the now-overlapping fixed navbar */
.hero-content { max-width: 640px; padding: 116px 24px 82px; }

.hero h1 { font-family: var(--font-head); font-size: clamp(48px, 7.2vw, 90px); line-height: .98; margin: 6px 0 18px; letter-spacing: -1.5px; font-weight: 700; }
.hero-sub { font-size: clamp(16px, 1.6vw, 21px); color: #cdd6f0; max-width: 540px; margin: 0 0 26px; font-weight: 400; line-height: 1.55; }
.hero-sub b { color: var(--accent); font-weight: 600; }

/* hero headline — the cyan→magenta gradient, no glow */
.hero .grad-text { color: var(--accent); -webkit-text-fill-color: var(--accent); background: none; filter: none; }
@keyframes gradslide { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .hero .grad-text { animation: none; } }

/* hero flow streams — token shimmer handed to the compositor (no JS, no SVG filters → smooth on phones) */
.fg-streams { animation: fg-drift 7s ease-in-out infinite; will-change: transform; }
.fg-out { animation: fg-out 3s linear infinite; }
.fg-back { animation: fg-back 4.5s linear infinite; }
@keyframes fg-out { to { stroke-dashoffset: -480; } }
@keyframes fg-back { to { stroke-dashoffset: 480; } }
@keyframes fg-drift { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -9px, 0); } }
/* cascading volume "mountains" — drift sideways (compositor transform; periodic path → seamless loop) */
.fg-band { animation-name: fg-flow; animation-timing-function: linear; animation-iteration-count: infinite; will-change: transform; }
@keyframes fg-flow { from { transform: translateX(0); } to { transform: translateX(-1440px); } }
@media (prefers-reduced-motion: reduce) { .fg-out, .fg-back, .fg-streams, .fg-band { animation: none !important; } }

/* provider strip — always visible, independent of the background's mobile crop */
.providers-strip { border-bottom: 1px solid var(--line); background: var(--bg2); }
.providers-strip .wrap { display: flex; align-items: center; gap: 18px; padding: 15px 24px; flex-wrap: wrap; }
.ps-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted2); white-space: nowrap; }
.ps-logos { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.ps-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.ps-chip .ps-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.ps-ico { width: 18px; height: 18px; flex: none; }
.ps-more { color: var(--muted2); font-weight: 500; }

.counter-chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line2); font-size: 13px; margin-bottom: 22px; }
.counter-chip b { font-family: var(--font-mono); color: var(--accent); letter-spacing: .3px; }
.counter-chip .lbl { color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.auth-card { width: 100%; max-width: 520px; box-shadow: var(--glow); padding: 24px 26px; }
.auth-card label { font-size: 14px; color: var(--text); font-weight: 500; margin-bottom: 12px; }
.auth-card .row { gap: 12px; }
.auth-card input { height: 56px; font-size: 16px; padding: 0 20px; border-radius: 14px; }
.auth-card input::placeholder { color: var(--muted2); }
.auth-card .btn { height: 56px; padding: 0 28px; font-size: 15px; border-radius: 14px; }
.auth-card .note { margin-top: 16px; font-size: 13px; }
.code-grid { letter-spacing: 14px; text-align: center; font-size: 24px; font-weight: 700; }
.note { font-size: 12.5px; color: var(--muted2); }
.trust { margin-top: 16px; font-size: 12.5px; color: var(--muted2); display: flex; gap: 18px; flex-wrap: wrap; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }

/* AI tokenomics pills */
.upgrade-line { color: var(--muted); font-size: 14px; margin: 26px 0 12px; font-family: var(--font-mono); letter-spacing: .5px; }
.tokenomics-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.tpill { padding: 9px 17px; border-radius: 999px; border: 1px solid var(--line2); background: var(--grad-soft); font-weight: 600; font-size: 14px; color: var(--text); }

@media (max-width: 720px) {
  .hero { min-height: 0; }
  .hero-content { padding: 84px 22px 58px; } /* clear the 66px fixed topbar so the counter-chip isn't cramped */
}

/* sections — flat, no radial glow fields. .alt just shifts the surface a touch. */
.section { padding: 72px 0; position: relative; }
.section.alt { background: var(--bg2); }
.section h2 { font-size: clamp(27px, 4vw, 40px); letter-spacing: -.8px; margin: 0 0 10px; }
.section .lead { color: var(--muted); max-width: 68ch; margin: 0 0 36px; font-size: 16px; line-height: 1.6; }
/* kicker in the body face, sentence case, no tracking — not the uppercase mono pill */
.eyebrow { font-family: var(--font); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--accent); font-weight: 600; margin-bottom: 10px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.feature { padding: 24px; transition: border-color .18s; position: relative; }
/* no accent under-bar, no glow lift — a quiet border shift on hover */
.feature .ico { display: inline-flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1; margin-bottom: 14px; color: var(--accent); }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 8px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 60ch; }
.feature:hover { border-color: var(--line2); }

/* ── Success stories ── */
.stories { background: var(--bg2); }
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.story { display: flex; flex-direction: column; gap: 14px; text-align: left; transition: border-color .18s; }
.story:hover { border-color: var(--line2); }
.story .stars { color: var(--warn); letter-spacing: 3px; font-size: 15px; }
.story blockquote { margin: 0; font-size: 15px; line-height: 1.65; color: #dbe2f7; max-width: 64ch; }
.story figcaption { margin-top: auto; display: flex; flex-direction: column; gap: 3px; padding-top: 4px; }
.story figcaption a { color: var(--accent); font-weight: 700; font-size: 15px; font-family: var(--font-head); }
.story figcaption a:hover { text-decoration: underline; }
.story figcaption span { color: var(--muted); font-size: 12.5px; }

/* ── Dashboard — "configuration summary" aesthetic from the reference: soft panels,
   colourful info cards with rounded-square icons, section headers with icons. ── */
#dashboard .card { background: var(--panel); border-radius: var(--radius); }
.dash-head { margin-bottom: 6px; }
.dash-head h2 { margin: 0; }
/* section header — the icon sits inline with no filled container */
.dsec-h { display: flex; align-items: center; gap: 9px; font-family: var(--font-head); font-weight: 700; font-size: 17px; margin: 24px 0 14px; }
.dsec-i { display: inline-flex; place-items: center; font-size: 15px; flex: 0 0 auto; color: var(--muted); }
.dsec-i.cyan { color: var(--accent); }
.dsec-i.green { color: var(--ok); }
.dsec-i.violet { color: var(--violet); }
.dsec-i.orange { color: var(--warn); }
/* colourful info cards (the Model-Details-style tiles) */
.info-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1040px) { .info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* stat tiles — uniform flat panels, value in text colour, small inline mark. No tints, no glow. */
.info-card { position: relative; display: flex; flex-direction: column; gap: 11px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); transition: border-color .16s; }
.info-card:hover { border-color: var(--line2); }
.info-card .ic { display: inline-flex; place-items: center; font-size: 18px; line-height: 1; color: var(--muted); }
.info-card .val { font-family: var(--font-head); font-size: 27px; font-weight: 700; line-height: 1; color: var(--text); }
.info-card .lbl { font-size: 12px; letter-spacing: 0; color: var(--muted); }
.info-card.cyan .ic { color: var(--accent); }
.info-card.violet .ic { color: var(--violet); }
.info-card.green .ic, .info-card.green .val { color: var(--ok); }
.info-card.orange .ic { color: var(--warn); }
#dashboard tbody tr { transition: background .12s; }
#dashboard tbody tr:hover { background: rgba(190, 219, 255, .04); }
/* landing dashboard preview — a framed, sample-data mock of the real Overview */
.dash-preview { margin-top: 30px; border-radius: 14px; border: 1px solid var(--line2); background: var(--panel); overflow: hidden; }
.dpv-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.dpv-dot { width: 11px; height: 11px; border-radius: 50%; background: #2a2f4a; }
.dpv-dot.r { background: #ff5f57; } .dpv-dot.y { background: #febc2e; } .dpv-dot.g { background: #28c840; }
.dpv-url { margin-left: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--muted2); }
.dpv-body { padding: 20px 24px 26px; }
.dpv-body .dsec-h:first-child { margin-top: 2px; }
.dpv-card { border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.dpv-card th, .dpv-card td { padding: 11px 14px; }
.dpv-card tbody tr:last-child td { border-bottom: none; }
.step, .metric { transition: border-color .18s; }
.step:hover, .metric:hover { border-color: var(--line2); }
.providers-strip { border-top: 1px solid var(--line); }
.metric .lbl { color: var(--muted); }
@media (max-width: 760px) { .cs-grid-3, .cs-grid-2, .story-grid { grid-template-columns: 1fr; } .cs-actions { width: 100%; } }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 30px; }
.metric { text-align: center; padding: 28px 14px; }
.metric .big { font-family: var(--font-head); font-size: 42px; font-weight: 700; line-height: 1; letter-spacing: -1px; }
.metric .lbl { color: var(--muted); font-size: 13px; margin-top: 10px; }

/* closing CTA — one solid accent band, dark ink, no glow */
.cta-band { position: relative; overflow: hidden; text-align: center; background: var(--accent); border-top: 1px solid rgba(0,0,0,.12); border-bottom: 1px solid rgba(0,0,0,.18); }
.cta-band .wrap { position: relative; z-index: 1; }
.cta-band .pill { background: rgba(4,20,26,.12); border-color: rgba(4,20,26,.28); color: #052028; }
.cta-band h2 { color: #04222b; margin: 14px 0 8px; text-shadow: none; }
.section.cta-band .lead { color: #052028; max-width: 58ch; margin: 0 auto 24px; }
.btn.dark { background: #11142e; color: #eaf0ff; border: 1px solid rgba(0,0,0,.2); }
.btn.dark:hover { border-color: #11142e; transform: translateY(-1px); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.step { padding: 24px; }
.step .num { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--aqua); margin-bottom: 10px; letter-spacing: 1px; }
.step h3 { margin: 0 0 7px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
.codeblock { background: #0a0c1e; border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow: auto; font-size: 12.5px; font-family: var(--font-mono); color: #cdd6f0; }
.codeblock pre { margin: 0; }
.codeblock .k { color: var(--aqua); }

/* AI Rank teaser */
.airank { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; }
.airank .board { padding: 8px; }
.rank-row { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: none; }
.rank-row .pos { font-family: var(--font-mono); color: var(--muted2); }
.rank-row .pos.top { color: var(--aqua); }
.rank-row .bar { height: 6px; border-radius: 999px; background: var(--grad-cta); }
.rank-row .pct { font-family: var(--font-mono); font-size: 13px; color: var(--sky); }
.blurred { filter: blur(5px); opacity: .8; user-select: none; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; background: var(--panel); }
.faq details[open] { border-color: var(--line2); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-family: var(--font-head); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--aqua); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; }

footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted2); font-size: 13px; font-family: var(--font-head); }
/* logged in: the footer's landing-anchor links point at hidden sections → keep only the copyright */
body.app-mode footer .cols, body.app-mode footer .spread .muted { display: none; }
body.app-mode footer { padding: 22px 0; }
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; margin-bottom: 28px; }
footer a { color: var(--muted); }
footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted2); margin: 0 0 12px; }
footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }

/* ── dashboard (unchanged structure, repainted via vars) ── */
#dashboard { padding-top: 66px; } /* clear the fixed navbar */
.dash { display: grid; grid-template-columns: 220px 1fr; gap: 26px; padding: 30px 0 70px; align-items: start; }
.sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .tab { text-align: left; padding: 10px 14px; border-radius: 11px; background: transparent; border: 1px solid transparent; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 600; display: flex; gap: 10px; align-items: center; font-family: var(--font); }
.sidebar .tab:hover { color: var(--text); background: var(--panel); }
.sidebar .tab.active { color: var(--text); background: var(--panel); border-color: var(--line2); box-shadow: inset 2px 0 0 var(--accent); }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat .v { font-family: var(--font-head); font-size: 28px; font-weight: 700; }
.stat .k { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted2); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
tr:hover td { background: rgba(190, 219, 255, .03); }
.table-wrap { overflow-x: auto; }

.keycard { display: flex; flex-direction: column; gap: 12px; }
/* collapsible flo2-key card — minimal by default, expands on header click */
.keyhead { cursor: pointer; user-select: none; }
.keyhead .khead-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kchev { color: var(--muted2); font-size: 12px; width: 12px; flex: 0 0 auto; transition: color .15s; }
.keyhead:hover .kchev { color: var(--accent); }
.keybody { display: flex; flex-direction: column; gap: 12px; }
.secret { display: flex; align-items: center; gap: 8px; background: #0a0c1e; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-family: var(--font-mono); font-size: 13px; }
.secret .val { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.secret.keyurl { margin-top: 8px; }
.secret.keyurl .urll { flex: 0 0 auto; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
/* flo2-key filter dropdown (Overview / Requests) */
.key-filter-wrap { display: inline-flex; align-items: center; gap: 8px; }
.key-filter-wrap > .muted { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.key-filter { width: auto; min-width: 180px; padding: 8px 12px; font-size: 13px; }
/* Economy section */
.card.economy { padding: 16px 18px; }
.eco-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.eco-big { display: flex; flex-direction: column; gap: 4px; padding: 4px 22px 4px 0; border-right: 1px solid var(--line2); }
.eco-big .val { font-family: var(--font-head); font-size: 34px; font-weight: 800; line-height: 1; color: var(--ok); }
.eco-big .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.eco-expl { flex: 1; min-width: 240px; font-size: 14px; line-height: 1.5; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle input { width: auto; }

.modal-bg { position: fixed; inset: 0; background: rgba(10, 9, 12, .7); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--panel-solid); border: 1px solid var(--line2); border-radius: var(--radius); padding: 26px; width: 100%; max-width: 580px; max-height: 88vh; overflow: auto; box-shadow: var(--shadow); }
.modal.wide { max-width: 1040px; }  /* Models dialog: fit the price columns without a horizontal scroll */
.modal h3 { margin: 0 0 16px; }
/* Models dialog: long provider model lists (e.g. Google) — scroll the rows inside a capped
   region and pin the column header, so prices stay easy to fill in far down the list. */
.modeltbl { max-height: 58vh; overflow: auto; }
.modeltbl thead th { position: sticky; top: 0; z-index: 2; background: var(--panel-solid); box-shadow: inset 0 -1px 0 var(--line2); }
/* per-model reasoning_effort allow-list — compact wrapping checkbox group */
td.reff { white-space: normal; max-width: 172px; }
td.reff label { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted2); margin: 0 7px 3px 0; cursor: pointer; }
td.reff input { width: auto; margin: 0; }
td.reff .reff-gate { width: 100%; margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); font-size: 10.5px; }

.route-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 104px 78px 44px auto; gap: 8px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-solid); margin-bottom: 8px; }
.route-row .rr-info { min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.route-row .rr-info .mono { word-break: break-word; }
.route-row.drag { cursor: grab; }
.route-row.dragging { opacity: .4; }
.grip { color: var(--muted2); cursor: grab; text-align: center; }
/* role is read from the badge + the tinted model name — no side-stripe border (the AI-UI tell) */
.role-default, .role-fallback, .role-racing, .role-abtest, .role-on { border-left: 1px solid var(--line); }
/* route model name tinted by role */
.route-row .rr-model { font-weight: 600; }
.route-row.role-default  .rr-model { color: var(--aqua); }
.route-row.role-racing   .rr-model { color: var(--warn); }
.route-row.role-fallback .rr-model { color: var(--violet); }
.route-row.role-abtest   .rr-model { color: var(--ok); }
.route-row .rr-prov { font-size: 11px; opacity: .7; }
/* Request-detail timeline (Gantt): start offset + latency-to-first-token (hatched) vs generation (solid, role colour) */
.gantt { display: flex; flex-direction: column; gap: 6px; margin: 16px 0 8px; }
.gantt-row { display: grid; grid-template-columns: 230px 1fr 74px; gap: 10px; align-items: center; }
.gantt-lbl { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; }
.gantt-lbl .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-track { position: relative; height: 16px; background: rgba(190, 219, 255, .05); border: 1px solid var(--line); border-radius: 6px; }
.gantt-bar { position: absolute; top: 0; height: 100%; border-radius: 5px; overflow: hidden; display: flex; min-width: 2px; }
.gantt-q { flex-shrink: 0; background: repeating-linear-gradient(45deg, rgba(190,219,255,.20), rgba(190,219,255,.20) 3px, transparent 3px, transparent 7px); }
.gantt-think { flex-shrink: 0; background: var(--violet); opacity: .9; }
.gantt-gen { flex: 1; background: var(--aqua); opacity: .9; }
.gantt-t { font-size: 11px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.gantt-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 11px; color: var(--muted2); padding-left: 240px; margin-top: 2px; }
.gantt-legend i { display: inline-block; width: 18px; height: 9px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.gantt-legend i.q { background: repeating-linear-gradient(45deg, rgba(190,219,255,.5), rgba(190,219,255,.5) 3px, transparent 3px, transparent 7px); }
.gantt-legend i.think { background: var(--violet); }
.gantt-legend i.gen { background: var(--aqua); }
/* A/B run results — win-share line chart + Prompt Insights report */
.ab-chart { width: 100%; height: auto; display: block; }
.ab-chart-box { background: rgba(5,6,20,.4); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.ab-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 12px; }
.ab-leg { display: inline-flex; align-items: center; gap: 5px; color: var(--muted2); }
.ab-leg i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
td.ab-cands { white-space: normal; max-width: 420px; line-height: 2; }
.route-row.paused { opacity: .7; border-color: rgba(255, 93, 108, .35); }
.route-row.paused .rr-model { text-decoration: line-through; color: var(--muted2); }
.insights h4 { margin: 12px 0 4px; font-size: 14.5px; color: #fff; font-family: var(--font-head); }
.insights p { margin: 6px 0; font-size: 14px; line-height: 1.62; color: #cdd6f0; }
.insights ul { margin: 6px 0; padding-left: 20px; }
.insights li { font-size: 14px; line-height: 1.6; margin: 3px 0; color: #cdd6f0; }
.insights code { font-family: var(--font-mono); font-size: .88em; background: rgba(0,0,0,.35); padding: 2px 6px; border-radius: 5px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--panel-solid); border: 1px solid var(--line2); padding: 12px 18px; border-radius: 12px; z-index: 90; box-shadow: var(--shadow); font-size: 14px; }
.toast.bad { border-color: var(--bad); color: var(--bad); }
.toast.ok { border-color: var(--ok); }

.spinner { width: 16px; height: 16px; border: 2px solid var(--line2); border-top-color: var(--aqua); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { color: var(--muted2); text-align: center; padding: 42px; border: 1px dashed var(--line2); border-radius: 12px; }

.ab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ab-col { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.ab-col pre { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; max-height: 320px; overflow: auto; margin: 8px 0 0; font-family: var(--font-mono); }

/* ── Playground ── */
.pg { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.pg-controls { grid-column: 1; }
.pg-output { grid-column: 2; }
.pg-code { grid-column: 1 / -1; }
.pg textarea { resize: vertical; min-height: 44px; }
.pg-paramhead { font-family: var(--font-mono); font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted2); margin: 6px 0 8px; }
.pg-params { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 9px 10px; margin-bottom: 10px; }
.pg-params .field { margin: 0; }
.pg-params label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; font-family: var(--font-mono); }
.pg-params input, .pg-params select { padding: 8px 10px; font-size: 13px; }
.pg-check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text); margin: 2px 0 14px; cursor: pointer; user-select: none; }
.pg-check input { width: auto; accent-color: var(--aqua); }
.pg-docnote { margin: 11px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.pg-docnote a { color: var(--sky); }
.pg-docnote a:hover { color: var(--aqua); }
.pg-answer { white-space: pre-wrap; word-break: break-word; min-height: 120px; max-height: 340px; overflow: auto; margin: 0; }
.pg-snippet { white-space: pre; overflow: auto; margin: 0; max-height: 360px; }
.pg-metrics { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; min-height: 28px; }
.pg-chip { display: inline-flex; align-items: baseline; gap: 6px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; padding: 4px 10px; font-family: var(--font-mono); font-size: 12.5px; }
.pg-chip .k { color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-size: 10.5px; }
.pg-chip .v { color: var(--aqua); font-weight: 600; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: rgba(5, 5, 26, .55); border: 1px solid var(--line2); border-radius: 11px; padding: 4px; }
.seg-btn { background: transparent; border: 0; color: var(--muted); font-family: var(--font); font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: 8px; cursor: pointer; transition: .15s; white-space: nowrap; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--panel); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line2); }
@media (max-width: 820px) { .pg { grid-template-columns: 1fr; } .pg-controls, .pg-output, .pg-code { grid-column: 1; } }

@media (max-width: 900px) {
  .airank { grid-template-columns: 1fr; }
  footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .dash { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .route-row { grid-template-columns: 1fr 1fr; }
  .ab-grid { grid-template-columns: 1fr; }
  /* keep the header usable on phones: hide in-page anchors, KEEP Sign in / Sign out */
  .navlinks { gap: 14px; }
  #nav-public a[href^="#"]:not(#nav-signin) { display: none; }
  #nav-email { display: none; }
}
@media (max-width: 560px) {
  /* stack the email field above the button so the placeholder is never clipped */
  .auth-card .row { flex-direction: column; }
  .auth-card .row .btn { width: 100%; }
}

/* ── AI tokenomics: savings calculator, levers, founder story ── */
.tk-calc { margin: 22px 0 10px; padding: 22px 24px; border: 1px solid var(--line2); border-radius: 14px; }
.tk-calc-kicker { font-family: var(--font); font-weight: 600; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--accent); }
.tk-calc-head h3 { font-size: 22px; margin: 6px 0 0; color: var(--text); }
.tk-calc-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; align-items: end; margin-top: 14px; }
.tk-calc-grid label { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.tk-calc-grid label b { color: var(--text); }
.tk-calc-grid label > span { color: var(--accent); font-family: var(--font-mono); font-weight: 600; }
.tk-in { display: flex; align-items: center; gap: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.tk-in > span { color: var(--muted2); }
.tk-in input { background: transparent; border: 0; color: var(--text); font: 600 16px var(--font-mono); width: 100%; outline: none; }
.tk-in input:focus { outline: none; }
.tk-calc-grid input[type=range] { width: 100%; accent-color: var(--accent); }
.tk-calc-out { margin-top: 20px; padding-top: 18px; border-top: 1px dashed rgba(190,219,255,.18); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.tk-out-main { font-size: 18px; color: var(--text); }
.tk-out-main b { font-family: var(--font-head); font-size: 27px; color: var(--accent); margin: 0 6px; }
.tk-out-main span { color: var(--ok); font-weight: 700; }
.tk-out-sub { color: var(--muted); font-size: 14px; }
.tk-cta { margin-top: 10px; }
.tk-note { color: var(--muted2); font-size: 12px; margin-top: 4px; }
.tk-levers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0 6px; }
.tk-lever { padding: 18px; }
.tk-lever .ico { font-size: 22px; line-height: 1; color: var(--accent); display: inline-flex; }
.tk-lever .ico svg { width: 22px; height: 22px; }
.tk-lever h3 { font-size: 16px; margin: 8px 0 6px; color: var(--text); }
.tk-lever p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.tk-lever p b { color: #cdd6f0; }
.tk-tag { display: inline-block; margin-top: 10px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tk-tag.green { color: var(--ok); border-color: rgba(47, 217, 138, .4); }
/* founder quote — a flat panel, not an indigo side-stripe block */
.tk-story { margin: 22px 0 6px; padding: 18px 22px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; }
.tk-story blockquote { margin: 0; font-size: 16px; line-height: 1.7; color: #dbe2f7; max-width: 70ch; }
.tk-story figcaption { margin-top: 10px; font-family: var(--font-head); font-weight: 600; font-size: 13px; color: var(--muted); }
@media (max-width: 820px) { .tk-calc-grid { grid-template-columns: 1fr; } .tk-levers { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tk-levers { grid-template-columns: 1fr; } }

/* ── Type scale + CTA emphasis (no glow) ── */
.btn.primary { font-size: 15px; letter-spacing: 0; }
.btn.primary:hover { transform: translateY(-1px); }
.auth-card label { font-size: 15px; font-weight: 600; color: var(--text); }
.auth-card .btn.primary { font-weight: 700; }
.tk-cta { font-size: 15.5px; padding: 13px 26px; font-weight: 700; }
.tk-out-sub b { color: var(--ok); }
.eyebrow { font-size: 13px; color: var(--accent); font-weight: 600; }
.section h2 { font-size: clamp(29px, 4.4vw, 44px); letter-spacing: -1px; }
.section .lead { font-size: 17px; color: var(--muted); }
.feature h3 { font-size: 18px; }
.hero-sub { font-size: clamp(17px, 1.7vw, 22px); color: #cdd6f0; }
.hero-sub b { color: var(--accent); font-weight: 700; }
.story .stars { color: var(--warn); font-size: 16px; letter-spacing: 2px; }

/* Privacy section */
.privacy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pcard { padding: 22px; }
.pcard .pico { font-size: 24px; line-height: 1; margin-bottom: 12px; color: var(--accent); display: inline-flex; }
.pcard .pico svg { width: 22px; height: 22px; }
.pcard h3 { font-size: 17px; margin: 0 0 8px; color: var(--text); }
.pcard p { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0; }
.pcard p b { color: #cdd6f0; }
@media (max-width: 760px) { .privacy-grid { grid-template-columns: 1fr; } }
