/* ===== ModelRoute — premium dark cost-dashboard aesthetic ===== */

:root {
  --bg: #0b0f14;
  --bg-alt: #0e1420;
  --panel: #121925;
  --panel-border: #223044;
  --text: #e7edf5;
  --text-dim: #9fb0c3;
  --text-faint: #6b7d92;

  --cyan: #2dd4f0;
  --cyan-dim: #1aa6c2;
  --amber: #ffb454;
  --amber-dim: #cf9239;
  --green: #4ade80;
  --red: #f87171;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 24px rgba(0,0,0,0.35);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(ellipse 1200px 600px at 50% -10%, #132233 0%, var(--bg) 55%);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono);
  background: rgba(255,255,255,0.06);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  font-size: 0.9em;
  color: var(--amber);
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.15; margin: 0 0 1rem; }
h2 { font-size: 1.6rem; margin: 0 0 0.5rem; display: flex; align-items: center; gap: 0.6rem; }
h3.panel-title { font-size: 1.05rem; margin: 0 0 0.85rem; color: var(--text); }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dim));
  color: #00222b;
  font-size: 0.9rem;
  font-weight: 800;
}

.section-sub { color: var(--text-dim); max-width: 760px; margin: 0 0 1.5rem; }
.section-sub.small { font-size: 0.92rem; margin-bottom: 1rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,15,20,0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--panel-border);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.15rem; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--amber));
  color: #07121a; font-size: 1rem;
}
.top-nav { display: flex; align-items: center; gap: 1.4rem; }
.top-nav a { color: var(--text-dim); font-size: 0.92rem; font-weight: 600; }
.top-nav a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  color: var(--bg) !important;
  background: var(--cyan);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-weight: 700;
}
.nav-cta:hover { background: var(--cyan-dim); text-decoration: none; }

/* ---------- hero ---------- */
.hero { padding: 4.5rem 0 3.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}
.eyebrow {
  color: var(--cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin: 0 0 1rem;
}
.hero-sub { color: var(--text-dim); font-size: 1.08rem; max-width: 560px; }
.hero-actions { display: flex; gap: 0.9rem; margin: 1.6rem 0 1.4rem; flex-wrap: wrap; }
.hero-trust { color: var(--text-faint); font-size: 0.85rem; max-width: 520px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem 1.3rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dim));
  color: #04202b;
}
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost {
  background: transparent;
  border-color: var(--panel-border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--cyan); text-decoration: none; }
.btn-text {
  background: transparent;
  color: var(--text-faint);
  border: none;
  font-weight: 600;
  padding: 0.7rem 0.5rem;
}
.btn-text:hover { color: var(--text-dim); text-decoration: underline; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.hero-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-card);
}
.hero-card-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.hero-card-model { font-family: var(--mono); font-size: 0.92rem; color: var(--text); }
.hero-card-score { margin-left: auto; color: var(--text-faint); font-size: 0.85rem; }
.hero-bar-label { font-size: 0.8rem; color: var(--text-faint); margin: 0.7rem 0 0.35rem; }
.hero-card-savings {
  margin-top: 1.1rem; font-weight: 700; color: var(--green); font-size: 0.95rem;
}

/* ---------- tags / pills ---------- */
.tag {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tag-cheap { background: rgba(45,212,240,0.15); color: var(--cyan); border: 1px solid rgba(45,212,240,0.35); }
.tag-top { background: rgba(255,180,84,0.15); color: var(--amber); border: 1px solid rgba(255,180,84,0.35); }

.mode-tag {
  display: inline-flex;
  margin-left: 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  vertical-align: middle;
}
.mode-tag-recorded { color: var(--green); border-color: rgba(74,222,128,0.3); background: rgba(74,222,128,0.08); }

/* ---------- panels / sections ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.tool-section { padding: 1rem 0 4rem; }
.info-section { padding: 3.5rem 0; }
.info-section-alt { background: var(--bg-alt); border-top: 1px solid var(--panel-border); border-bottom: 1px solid var(--panel-border); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }

.mode-banner {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.8rem 1.2rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot-demo { background: var(--text-faint); }
.dot-live { background: var(--green); box-shadow: 0 0 8px rgba(74,222,128,0.6); }

.tool-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 1.5rem; margin-bottom: 1.5rem; align-items: start; }

.field-label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--text-dim); margin: 1.1rem 0 0.4rem; }
.field-label:first-child { margin-top: 0; }
.field-label .hint { font-weight: 400; color: var(--text-faint); }

.select, .textarea, .text-input {
  width: 100%;
  background: #0c1119;
  border: 1px solid var(--panel-border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
}
.select:focus, .textarea:focus, .text-input:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(45,212,240,0.15);
}

.threshold-row { margin-top: 1.1rem; }
.slider {
  width: 100%;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--cyan) var(--fill,35%), var(--panel-border) var(--fill,35%), var(--panel-border) 100%);
  margin-top: 0.5rem;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--cyan);
  border: 2px solid #04202b;
  cursor: pointer;
}
.slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--cyan); border: 2px solid #04202b; cursor: pointer;
}

.provider-fieldset { border: none; padding: 0; margin: 1.1rem 0 0; }
.radio-row { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.4rem; }
.radio-pill {
  display: flex; align-items: center; gap: 0.45rem;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  font-size: 0.88rem;
  transition: border-color 0.15s ease;
}
.radio-pill:has(input:checked) { border-color: var(--cyan); background: rgba(45,212,240,0.08); }
.radio-pill small { color: var(--text-faint); }
.radio-pill input { accent-color: var(--cyan); }

.key-note { font-size: 0.78rem; color: var(--text-faint); margin: 0.45rem 0 0; }
.field-error {
  margin-top: 0.6rem;
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.4);
  color: var(--red);
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.action-row { display: flex; gap: 0.8rem; margin-top: 1.4rem; flex-wrap: wrap; align-items: center; }

.empty-state { color: var(--text-faint); font-size: 0.9rem; padding: 1rem 0; }

.decision-box { padding-top: 0.2rem; }
.decision-top { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.decision-model { font-family: var(--mono); font-size: 0.92rem; color: var(--text-dim); }
.score-row { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.1rem; }
.score-value { font-family: var(--mono); font-weight: 700; color: var(--text); min-width: 3.5rem; text-align: right; }

.meter {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: #0c1119;
  border: 1px solid var(--panel-border);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(.2,.8,.2,1);
}
.meter-cheap { background: linear-gradient(90deg, var(--cyan-dim), var(--cyan)); }
.meter-top { background: linear-gradient(90deg, var(--amber-dim), var(--amber)); }
.meter-score-fill { background: linear-gradient(90deg, var(--cyan), var(--amber)); }
.meter-session { margin-top: 1.1rem; height: 12px; }

.reasons-list { margin: 0; padding-left: 1.1rem; color: var(--text-dim); font-size: 0.88rem; }
.reasons-list li { margin-bottom: 0.35rem; }

/* ---------- results ---------- */
.results-section { margin-top: 1.5rem; }
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1rem 0 1.2rem; }
.result-card-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.result-model { font-family: var(--mono); font-size: 0.85rem; color: var(--text-dim); }
.result-response {
  white-space: pre-wrap;
  font-size: 0.9rem;
  color: var(--text);
  background: #0c1119;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  min-height: 90px;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 1rem;
}
.result-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.6rem; margin: 0; }
.result-stats dt { font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.2rem; }
.result-stats dd { margin: 0; font-family: var(--mono); font-weight: 700; font-size: 0.95rem; }

.savings-banner {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 1rem;
  color: var(--text-dim);
}
.savings-banner strong { color: var(--green); font-size: 1.3rem; }
.pct-chip {
  margin-left: auto;
  background: rgba(74,222,128,0.12);
  color: var(--green);
  border: 1px solid rgba(74,222,128,0.35);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ---------- session panel ---------- */
.session-panel { margin-top: 1.5rem; }
.session-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
.session-stat { display: flex; flex-direction: column; gap: 0.3rem; }
.session-stat-label { font-size: 0.78rem; color: var(--text-faint); }
.session-stat-value { font-size: 1.35rem; font-weight: 800; font-family: var(--mono); }
.session-stat-highlight .session-stat-value { color: var(--green); }

/* ---------- recorded panel + tables ---------- */
.recorded-panel { margin-top: 1.5rem; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 620px; }
.data-table th, .data-table td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--panel-border);
  white-space: nowrap;
}
.data-table th { color: var(--text-faint); font-weight: 700; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.03em; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.data-table td.cell-cheap { color: var(--cyan); font-weight: 700; }
.data-table td.cell-top { color: var(--amber); font-weight: 700; }
.data-table td.cell-saved { color: var(--green); font-weight: 700; font-family: var(--mono); }

/* ---------- bullet lists ---------- */
.bullet-list { margin: 0; padding-left: 1.2rem; color: var(--text-dim); }
.bullet-list li { margin-bottom: 0.6rem; }
.bullet-list li:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--panel-border); padding: 2rem 0; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; color: var(--text-faint); font-size: 0.85rem; }
.footer-row a { color: var(--text-dim); }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .session-grid { grid-template-columns: repeat(2,1fr); }
  .top-nav { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .meter-fill { transition: none; }
  .btn { transition: none; }
}
