/* Palette and typography mirror the FreeLLMAPI app (client/src/index.css):
   neutral monochrome base, Geist type, and the app's functional accents -
   emerald = live/healthy, violet = tools, cyan = vision, amber = caution. */
:root {
  --bg: #fcfcfc;
  --bg-raise: #f5f5f5;
  --bg-card: #ffffff;
  --fg: #1a1a1a;
  --muted: #6e6e6e;
  --faint: #a3a3a3;
  --border: #e4e4e4;
  --border-bright: #d4d4d4;
  --live: #171717;
  --on-live: #ffffff;
  --live-dim: rgba(0, 0, 0, 0.06);
  --live-border: rgba(0, 0, 0, 0.18);
  --live-shadow: rgba(0, 0, 0, 0.16);
  --ok: #059669;
  --ok-dim: rgba(16, 185, 129, 0.1);
  --ok-border: rgba(16, 185, 129, 0.35);
  --violet: #7c3aed;
  --violet-dim: rgba(124, 58, 237, 0.1);
  --violet-border: rgba(124, 58, 237, 0.3);
  --cyan: #0e7490;
  --cyan-dim: rgba(8, 145, 178, 0.1);
  --cyan-border: rgba(8, 145, 178, 0.3);
  --amber: #b45309;
  --amber-dim: rgba(217, 119, 6, 0.1);
  --amber-border: rgba(217, 119, 6, 0.3);
  --danger: #e11d48;
  --danger-dim: rgba(244, 63, 94, 0.08);
  --danger-border: rgba(244, 63, 94, 0.3);
  --glow-tint: rgba(255, 255, 255, 0.05);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --contrast-bg: #000000;
  --contrast-fg: #fafafa;
  --contrast-muted: #a3a3a3;
  --contrast-accent: #ffffff;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Monaco, monospace;
}
/* Dark band: wraps the nav + hero/header of each page, using the app's
   dark theme values. Everything inside adapts through the same vars. */
.dark-band {
  --bg: #000000;
  --bg-raise: #1a1a1a;
  --bg-card: #1c1c1c;
  --fg: #fafafa;
  --muted: #a3a3a3;
  --faint: #737373;
  --border: rgba(255, 255, 255, 0.1);
  --border-bright: rgba(255, 255, 255, 0.18);
  --live: #fafafa;
  --on-live: #171717;
  --live-dim: rgba(255, 255, 255, 0.09);
  --live-border: rgba(255, 255, 255, 0.25);
  --live-shadow: rgba(0, 0, 0, 0.4);
  --ok: #34d399;
  --ok-dim: rgba(52, 211, 153, 0.13);
  --ok-border: rgba(52, 211, 153, 0.35);
  --violet: #a78bfa;
  --violet-dim: rgba(167, 139, 250, 0.15);
  --violet-border: rgba(167, 139, 250, 0.35);
  --cyan: #22d3ee;
  --cyan-dim: rgba(34, 211, 238, 0.13);
  --cyan-border: rgba(34, 211, 238, 0.35);
  --amber: #fbbf24;
  --amber-dim: rgba(251, 191, 36, 0.13);
  --amber-border: rgba(251, 191, 36, 0.35);
  --glow-tint: rgba(255, 255, 255, 0.045);
  --card-shadow: none;
  background: #000000;
  color: var(--fg);
}
.dark-band .brand-mark { background: #fafafa; }
.dark-band .brand-mark svg circle:first-child { fill: #000000; }
.dark-band .hero { padding-bottom: 72px; }
.dark-band .catalog-head { padding-bottom: 44px; }
.dark-band .detail-head { padding-bottom: 48px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}
.mono { font-family: var(--font-mono); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; }

/* ---------- nav ---------- */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16.5px; color: var(--fg); text-decoration: none;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: #171717;
  display: grid; place-items: center;
}
.brand-mark svg { width: 17px; height: 17px; display: block; }
.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 13px; border-radius: 9px; transition: all 0.15s;
}
.nav-links a:hover { color: var(--fg); background: var(--bg-raise); }
.nav-links a.nav-cta { color: var(--on-live); background: var(--live); font-weight: 600; padding: 9px 18px; margin-left: 6px; }
.nav-links a.nav-cta:hover { filter: brightness(1.08); color: var(--on-live); background: var(--live); }
@media (max-width: 560px) { .nav-links a.nav-hide { display: none; } }

/* ---------- shared bits ---------- */
.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px; border-radius: 999px;
  background: var(--ok-dim); color: var(--ok);
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  border: 1px solid var(--ok-border);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-dim);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 9px transparent; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 12px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: all 0.2s; border: 1px solid transparent; cursor: pointer;
  font-family: inherit; letter-spacing: -0.01em;
}
.btn-primary { background: var(--live); color: var(--on-live); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 22px var(--live-shadow); filter: brightness(1.05); }
.btn-ghost { background: var(--bg-card); color: var(--fg); border-color: var(--border-bright); }
.btn-ghost:hover { background: var(--bg-raise); }

.chip {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  background: var(--bg-raise); border: 1px solid var(--border);
  color: var(--muted);
}
.chip.green { color: var(--ok); background: var(--ok-dim); border-color: transparent; }
.chip.violet { color: var(--violet); background: var(--violet-dim); border-color: transparent; }
.chip.cyan { color: var(--cyan); background: var(--cyan-dim); border-color: transparent; }
.chip.amber { color: var(--amber); background: var(--amber-dim); border-color: transparent; }
.chip.dim { color: var(--faint); }

footer {
  margin-top: 80px; padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--faint); font-size: 13px;
  text-align: center;
}
footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- landing ---------- */
.glow {
  position: absolute; inset: 0 0 auto 0; height: 560px; pointer-events: none;
  background: radial-gradient(700px 320px at 50% -80px, var(--glow-tint), transparent 70%);
}
.page-top { position: relative; }
.hero { padding: 72px 0 28px; text-align: center; position: relative; }
h1 {
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.05; letter-spacing: -0.03em;
  margin: 26px 0 16px; font-weight: 650;
}
.hero h1 { color: var(--muted); }
.hero h1 .live-word { color: var(--fg); }
.subtitle {
  font-size: clamp(16px, 2vw, 18.5px); color: var(--muted);
  max-width: 600px; margin: 0 auto 34px;
}
.subtitle strong { color: var(--fg); font-weight: 600; }

/* hero search */
.hero-search {
  max-width: 640px; margin: 0 auto 28px; position: relative;
}
.hero-search input {
  width: 100%; padding: 17px 22px 17px 52px;
  font-size: 16px; color: var(--fg);
  background: var(--bg-card); border: 1px solid var(--border-bright);
  border-radius: 14px; outline: none;
  font-family: inherit;
  box-shadow: var(--card-shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-search input:focus { border-color: var(--live); box-shadow: 0 0 0 4px var(--live-dim); }
.hero-search input::placeholder { color: var(--faint); }
.hero-search .search-icon {
  position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.cta-row { display: inline-flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; }
.cta-note { display: block; margin-top: 16px; color: var(--faint); font-size: 13.5px; }

.stats-strip {
  display: flex; flex-wrap: wrap; justify-content: center;
  margin: 54px auto 0; max-width: 780px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--card-shadow);
}
.stat { flex: 1 1 150px; padding: 24px 16px; text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat .num {
  font-family: var(--font-mono);
  font-size: clamp(24px, 3.4vw, 32px); font-weight: 600; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; display: block; line-height: 1.1;
}
.stat .num.green { color: var(--ok); }
.stat .lbl { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.09em; margin-top: 7px; display: block; font-weight: 500; }

section { padding: 72px 0 8px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-eyebrow {
  font-family: var(--font-mono);
  color: var(--muted); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.2em;
}
h2 {
  font-size: clamp(26px, 3.8vw, 38px); margin: 12px 0 12px;
  font-weight: 650; letter-spacing: -0.025em; line-height: 1.12;
}
.section-sub { color: var(--muted); max-width: 580px; margin: 0 auto; font-size: 16px; }
.section-sub strong { color: var(--fg); }

/* featured model cards on landing */
.model-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.model-card {
  display: block; text-decoration: none;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.model-card:hover { border-color: var(--border-bright); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07); }
.model-card .m-name { font-weight: 600; font-size: 15px; margin-bottom: 2px; letter-spacing: -0.01em; }
.model-card .m-id {
  font-family: var(--font-mono);
  font-size: 11.5px; color: var(--faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 13px;
}
.model-card .m-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.browse-all { text-align: center; margin-top: 30px; }

/* free vs premium compact compare */
.compare {
  max-width: 740px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--card-shadow);
}
.compare-row {
  display: flex; align-items: center; gap: 18px;
  padding: 25px 30px;
}
.compare-row + .compare-row { border-top: 1px solid var(--border); }
.compare-row .tier { flex: 0 0 110px; font-weight: 700; font-size: 15px; }
.compare-row .desc { color: var(--muted); font-size: 14.5px; }
.compare-row .desc strong { color: var(--fg); }
.compare-row.premium { background: var(--live-dim); }
.compare-row.premium .desc { color: var(--fg); }
.compare-row.premium .desc strong { color: var(--live); }
@media (max-width: 560px) { .compare-row { flex-direction: column; align-items: flex-start; gap: 6px; } }

/* pricing */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 780px; margin: 0 auto; }
@media (max-width: 640px) { .pricing { grid-template-columns: 1fr; } }
.price-card {
  position: relative; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--card-shadow);
}
.price-card.featured {
  background: var(--contrast-bg); color: var(--contrast-fg);
  border-color: var(--contrast-bg);
}
.price-card.featured .price-name { color: var(--contrast-accent); }
.price-card.featured .price-amount small { color: var(--contrast-muted); }
.price-card.featured .price-list li { color: var(--contrast-fg); }
.price-card.featured .price-list li::before { color: var(--contrast-accent); }
.price-card.featured .btn-primary { background: #fafafa; color: #171717; }
.price-tag {
  position: absolute; top: -12px; left: 28px; background: var(--live); color: var(--on-live);
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px;
}
.price-card.featured .price-tag { background: var(--contrast-accent); color: #171717; }
.price-tag.alt { background: var(--bg-raise); color: var(--fg); border: 1px solid var(--border); }
.price-name { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.price-amount {
  font-size: 46px; font-weight: 700; letter-spacing: -0.03em; margin: 10px 0 16px;
  font-variant-numeric: tabular-nums;
}
.price-amount small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-card .btn { width: 100%; justify-content: center; }
.price-list { list-style: none; padding: 0; margin: 0 0 24px; font-size: 14.5px; }
.price-list li { padding: 6px 0 6px 26px; position: relative; color: var(--fg); }
.price-list li::before { content: "✓"; position: absolute; left: 0; color: var(--muted); font-weight: 700; }
#checkout-error { text-align: center; color: var(--danger); font-size: 14px; margin-top: 16px; min-height: 20px; }
.guarantee { text-align: center; color: var(--faint); font-size: 13.5px; margin-top: 22px; }
.guarantee strong { color: var(--muted); }

/* ---------- catalog page ---------- */
.catalog-head { padding: 38px 0 8px; }
.catalog-head h1 { font-size: clamp(30px, 4.2vw, 44px); margin: 0 0 8px; }
.catalog-head p { color: var(--muted); margin: 0; font-size: 15.5px; }
.catalog-head .freshness { margin-top: 14px; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 26px 0 18px; position: sticky; top: 0; z-index: 5;
  background: linear-gradient(var(--bg) 85%, transparent);
  padding: 12px 0 14px;
}
.toolbar .search-wrap { position: relative; flex: 1 1 260px; }
.toolbar input[type="search"] {
  width: 100%; padding: 11px 16px 11px 42px;
  font-size: 14.5px; color: var(--fg); font-family: inherit;
  background: var(--bg-card); border: 1px solid var(--border-bright);
  border-radius: 11px; outline: none;
  transition: border-color 0.2s;
}
.toolbar input[type="search"]:focus { border-color: var(--live); }
.toolbar input::placeholder { color: var(--faint); }
.toolbar .search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.toolbar select {
  padding: 10px 36px 10px 16px; font-size: 13.5px; color: var(--fg); font-family: inherit; font-weight: 500;
  background: var(--bg-card) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%236e6e6e' fill='none' stroke-width='1.5' stroke-linecap='round'/></svg>") no-repeat right 14px center;
  border: 1px solid var(--border-bright); border-radius: 11px; outline: none;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.toolbar .toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 16px; border-radius: 11px; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border-bright);
  font-size: 13.5px; color: var(--muted); user-select: none; font-weight: 500;
  transition: all 0.15s;
}
.toolbar .toggle input { display: none; }
/* active filter chips pick up the app's capability colors */
#t-tools.toggle.on { color: var(--violet); border-color: var(--violet-border); background: var(--violet-dim); }
#t-vision.toggle.on { color: var(--cyan); border-color: var(--cyan-border); background: var(--cyan-dim); }
.result-count { color: var(--faint); font-size: 13px; margin: 0 0 14px 4px; }
.result-count b { color: var(--muted); }

.model-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding-bottom: 24px; }
.model-row {
  display: flex; align-items: center; gap: 18px; min-width: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 17px 20px;
  text-decoration: none; box-shadow: var(--card-shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.model-row:hover { border-color: var(--border-bright); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06); }
.model-row .row-main { flex: 1; min-width: 0; }
.model-row .row-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; letter-spacing: -0.01em; }
.model-row .row-id {
  font-family: var(--font-mono);
  font-size: 11.5px; color: var(--faint); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.model-row .row-facts {
  flex: none; display: flex; gap: 20px; align-items: center;
  font-family: var(--font-mono);
  font-size: 12px; color: var(--muted); text-align: right;
}
.model-row .fact b { color: var(--fg); font-weight: 600; display: block; font-size: 13px; }
.model-row .fact { min-width: 64px; }
@media (max-width: 700px) {
  .model-row { flex-wrap: wrap; gap: 12px; }
  .model-row .row-main { flex: 1 1 100%; }
  .model-row .row-facts { width: 100%; justify-content: flex-start; text-align: left; gap: 24px; }
}
@media (max-width: 560px) {
  .toolbar { gap: 8px; }
  .toolbar select { flex: 1 1 auto; }
  .toolbar .toggle { flex: 0 0 auto; }
  .model-row { padding: 15px 16px; }
}
.empty-state { text-align: center; color: var(--faint); padding: 48px 0; }

/* ---------- model detail page ---------- */
.crumb { font-size: 13.5px; color: var(--faint); margin: 28px 0 0; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--fg); }
.detail-head { padding: 16px 0 8px; }
.detail-head h1 { font-size: clamp(30px, 4.6vw, 48px); margin: 8px 0 6px; }
.detail-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.detail-sub { color: var(--muted); font-size: 15px; margin: 10px 0 0; }

.offers-grid {
  display: grid; gap: 14px; margin-top: 26px;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}
.panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 26px;
  box-shadow: var(--card-shadow);
}
.panel h3 {
  margin: 0 0 14px; font-size: 12.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.offer-id {
  font-family: var(--font-mono);
  font-size: 12.5px; color: var(--muted);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg-raise); border: 1px solid var(--border);
  padding: 8px 12px; border-radius: 9px; margin: 0 0 12px;
  overflow: hidden;
}
.offer-id .id-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offer-id button {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 12px; font-family: inherit; padding: 0; flex: none; font-weight: 600;
}
.offer-id button:hover { color: var(--fg); }
.offer-id button:hover { text-decoration: underline; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-family: var(--font-mono); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.kv .v.green { color: var(--ok); }
.kv .v.dim { color: var(--faint); font-weight: 400; }

.quirk { padding: 10px 0 2px; }
.quirk .q-title { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.quirk .q-body { color: var(--muted); font-size: 13px; margin-top: 2px; }
.sev { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; }
.sev.info { color: var(--muted); border: 1px solid var(--border-bright); }
.sev.warn, .sev.warning { color: var(--amber); background: var(--amber-dim); border: 1px solid var(--amber-border); }
.sev.critical { color: var(--danger); background: var(--danger-dim); border: 1px solid var(--danger-border); }

.upsell {
  margin-top: 32px; text-align: center;
  background: var(--contrast-bg); color: var(--contrast-fg);
  border-radius: var(--radius-lg); padding: 42px 32px;
}
.upsell h3 {
  margin: 0 0 10px; font-size: clamp(22px, 3vw, 28px); font-weight: 650; letter-spacing: -0.02em;
}
.upsell p { color: var(--contrast-muted); margin: 0 auto 22px; max-width: 500px; font-size: 15px; }
.upsell p strong { color: var(--contrast-accent); }
.upsell .btn-primary { background: #fafafa; color: #171717; }
