/* Cortega Model Recommender — matches the cortega.ai marketing site design system:
   light surfaces, navy text, Cortega green accent, system fonts. */

:root {
  --navy: #0a0f1e;
  --navy-2: #0f172a;
  --navy-3: #1e293b;
  --navy-4: #334155;

  --green: #3f7d2a;
  --green-hover: #2d5a1b;
  --green-deep: #235314;
  --lime: #7ed348;
  --green-pale: #eef7e8;
  --green-border: #b7e6a2;

  --indigo: #0b7681;
  --indigo-2: #3fc7d4;
  --indigo-pale: #e3f2f3;
  --indigo-border: #a9d6da;
  --amber: #d97706;
  --amber-pale: #fffbeb;
  --amber-border: #fde68a;

  --text: #0f172a;
  --text-2: #334155;
  --text-3: #64748b;
  --text-4: #94a3b8;

  --border: #dbe1e8;
  --border-2: #eceff3;
  --border-strong: #b9c2ce;
  --surface: #f5f7fa;
  --surface-2: #eef1f6;
  --white: #ffffff;

  --good: #15803d;
  --good-bg: #e7f6ec;
  --warn: #b45309;

  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 26px rgba(15, 23, 42, 0.07);
  --shadow: 0 18px 60px rgba(15, 23, 42, 0.13);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }

/* ============ NAV (matches cortega.ai shared.js header) ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 64px;
  background: rgba(10, 15, 30, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  padding: 0 40px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: 34px; }
.nav-wordmark { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.3px; }
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link {
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover, .nav-link.active { color: #f8fafc; background: rgba(255, 255, 255, 0.06); }
.nav-item-dropdown { position: relative; }
.nav-dropdown-toggle { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
.nav-dropdown-toggle-split { display: inline-flex; align-items: center; gap: 4px; user-select: none; padding-right: 6px; }
.nav-dropdown-toggle-label { text-decoration: none; color: inherit; }
.nav-dropdown-caret-btn { display: inline-flex; align-items: center; cursor: pointer; padding: 3px; margin: -3px -3px -3px 1px; border-radius: 999px; }
.nav-dropdown-caret-btn:hover { background: rgba(255, 255, 255, 0.12); }
.nav-caret { transition: transform 0.15s; opacity: 0.8; }
.nav-item-dropdown:hover .nav-caret,
.nav-item-dropdown.open .nav-caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 210px;
  background: #131b2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown.open .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-link {
  display: block;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.nav-dropdown-link:hover, .nav-dropdown-link.active { color: #f8fafc; background: rgba(255, 255, 255, 0.07); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-menu-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  cursor: pointer;
}
.nav-menu-toggle span { display: block; width: 16px; height: 2px; background: #94a3b8; border-radius: 999px; }
.nav-btn {
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 7px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-btn-ghost { color: #cbd5e1; border: 1px solid rgba(255, 255, 255, 0.16); }
.nav-btn-ghost:hover { color: #f8fafc; border-color: rgba(255, 255, 255, 0.34); }
.nav-btn-primary { background: #0b7681; color: #fff; }
.nav-btn-primary:hover { background: #09656e; }

/* ============ PAGE HERO (from cortega.ai subpage pattern) ============ */
.page-hero {
  background: linear-gradient(180deg, rgba(126, 211, 72, 0.10), rgba(10, 15, 30, 0) 60%), var(--navy);
  padding: 40px 40px 62px;
}
.page-hero-inner { max-width: 1100px; margin: 0 auto; }
.eyebrow {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--indigo-2);
  margin-bottom: 12px;
}
.page-hero h1 {
  color: #f8fafc;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 850;
  letter-spacing: -0.9px;
  line-height: 1.08;
  margin-bottom: 12px;
}
.page-hero h1 span { color: var(--indigo-2); }
.page-hero-sub {
  color: #aab7ca;
  font-size: 15px;
  line-height: 1.6;
  max-width: 620px;
}
.catalog-banner {
  display: inline-block;
  margin-top: 20px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
}
.catalog-banner::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--indigo-2);
  margin-right: 9px;
  vertical-align: middle;
}
.catalog-banner strong { color: #f8fafc; font-weight: 700; }

/* ============ MAIN LAYOUT ============ */
.page-body {
  max-width: 1420px;
  margin: -40px auto 0;
  padding: 0 40px 64px;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  grid-template-areas:
    "form budget"
    "results budget";
  column-gap: 24px;
  row-gap: 0;
  align-items: start;
}
.form-col { grid-area: form; min-width: 0; }
.budget-dock {
  grid-area: budget;
  position: sticky;
  top: 80px;
  z-index: 4;
  align-self: start;
  min-width: 0;
  max-width: 292px;
}
.results-shell { grid-area: results; }
.controls {
  display: grid;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ============ PANELS ============ */
.panel {
  background: var(--white);
  padding: 16px 22px 18px;
}
.panel + .panel { border-top: 1px solid var(--border); }
.panel-head {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
  padding-bottom: 0;
  border-bottom: 0;
}
.step-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
  background: var(--indigo);
  border: 0;
}
.panel-heading { min-width: 0; }
.panel-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
  line-height: 1.3;
}
.panel-title .optional-tag {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  line-height: 1.5;
}
.panel-sub {
  margin-top: 3px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.5;
  max-width: 68ch;
}

.section-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
  margin: 0 0 9px;
}
.section-label .hint,
.field-block .hint {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  margin-left: 6px;
  color: var(--text-3);
}

.fineprint {
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.55;
  margin: 9px 0 0;
}

/* ============ WORKLOADS ROW ============ */
.workload-row {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 18px;
  align-items: start;
}
.workload-block { min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--white);
  border: 1px solid #cbd5e1;
  color: var(--text-2);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.chip:hover { border-color: var(--indigo); color: var(--indigo); }
.chip.active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
  font-weight: 700;
}

.team-block {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.team-label {
  display: grid;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
}
.team-label input {
  width: 100%;
  font-size: 18px;
  font-weight: 750;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--mono);
}
.team-block.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ============ ESTIMATE ============ */
.estimate-panel {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px;
}
.estimate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.estimate-grid label,
.estimate-grid .ratio-cell {
  display: grid;
  gap: 5px;
  padding: 9px 11px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--border);
  margin: 0;
  color: inherit;
}
.estimate-grid .ratio-cell {
  background: var(--surface);
  border-style: dashed;
}
.estimate-grid .ratio-cell .k { color: var(--indigo); }
.estimate-grid .k {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
  line-height: 1.35;
}
.estimate-grid input {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 10px;
  width: 100%;
}
.estimate-grid strong {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding: 8px 0;
}

/* ============ BASE MODEL / HINT ============ */
.field-block { margin: 0; display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.hint-wrap { position: relative; }
.hint-dropdown {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 260px;
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hint-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--border-2);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  padding: 10px 12px;
  cursor: pointer;
}
.hint-option:hover,
.hint-option[aria-selected="true"] { background: var(--indigo-pale); }
.hint-option:last-child { border-bottom: 0; }
.hint-name {
  display: block;
  font-family: inherit;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}
.base-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.base-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--indigo-pale);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.base-chip:hover { border-color: var(--indigo); color: var(--indigo); }

/* ============ FORM CONTROLS ============ */
label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
}
input, select, button {
  font: inherit;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
input::placeholder { color: var(--text-4); }
input:focus, select:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(11, 118, 129, 0.16);
}

/* Range sliders — flat "fader" control: 4px rail, filled progress in teal,
   compact rectangular handle (not a circle). --fill % is set from JS. */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background:
    linear-gradient(var(--indigo), var(--indigo)) left / var(--fill, 0%) 100% no-repeat,
    #d7dee7;
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: #d7dee7; }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--indigo); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 6px;
  height: 18px;
  margin-top: -7px;
  border-radius: 2px;
  background: var(--indigo);
  border: 1px solid #075762;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
}
input[type="range"]::-moz-range-thumb {
  width: 6px;
  height: 18px;
  border-radius: 2px;
  background: var(--indigo);
  border: 1px solid #075762;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
}
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(11, 118, 129, 0.25); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px rgba(11, 118, 129, 0.25); }
input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--indigo);
  padding: 0;
}

/* ============ PRIORITIES / DIALS ============ */
.dials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.dials label {
  grid-template-columns: 78px 1fr 30px;
  gap: 13px;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  padding: 7px 14px;
  background: var(--white);
  border-top: 1px solid var(--border-2);
  border-left: 1px solid var(--border-2);
}
.dials label:nth-child(-n + 2) { border-top: 0; }
.dials label:nth-child(odd) { border-left: 0; }
.dials label:hover { background: var(--surface); }
@media (max-width: 620px) {
  .dials { grid-template-columns: 1fr; }
  .dials label:nth-child(2) { border-top: 1px solid var(--border-2); }
  .dials label { border-left: 0; }
}
.dials label span {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ============ RUN BAR (footer row of the form card) ============ */
.run-bar {
  display: grid;
  gap: 10px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px 22px;
}
.run-bar-main {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1px;
  border-radius: var(--radius);
  border: none;
  background: var(--indigo);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.btn-cta:hover { background: #0b6973; transform: translateY(-1px); }
.btn-cta:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(11, 118, 129, 0.3); }
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.status {
  min-height: 1.2em;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

/* ============ RESULTS ============ */
/* Sits clearly apart from the form card: wider bleed, teal cap, own shadow. */
.results-shell {
  margin-top: 40px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--indigo);
  background: var(--white);
  box-shadow: var(--shadow);
}
.results-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.limit-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 650;
}
.limit-control select { padding: 7px 10px; }

.results { display: grid; gap: 16px; }

.stats-bar {
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.6;
}
.stats-bar strong { color: var(--text-2); font-weight: 700; }

/* ---- result card: reasoning left, score + costs in filled rail right ---- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-areas: "main rail";
}
.card-main { grid-area: main; padding: 18px 20px; min-width: 0; }
.card-rail {
  grid-area: rail;
  padding: 16px 18px;
  background: var(--surface);
  border-left: 1px solid var(--border-strong);
  display: grid;
  gap: 12px;
  align-content: start;
}
.rail-block {
  display: grid;
  gap: 7px;
}
.rail-block-ai {
  border-top: 1px solid var(--border-strong);
  padding-top: 10px;
}
.cost-cat-title {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--green-deep);
}
.cost-cat-title-right {
  text-align: right;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
  color: var(--green-deep);
}
.api-seller {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.api-check {
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}
.sh-row-cortega-ai {
  justify-content: space-between;
  align-items: center;
}
.sh-row-cortega-ai .cost-cat-title {
  color: var(--green-deep);
  border: 0;
  padding: 0;
}
.card-rail .metric-v.muted {
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 700;
  color: var(--text-3);
}
@media (max-width: 720px) {
  .card-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "rail" "main";
  }
  .card-rail {
    border-left: 0;
    border-bottom: 1px solid var(--border-strong);
  }
}

.card {
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
}
.card.is-base {
  border-color: var(--indigo);
  box-shadow: 0 0 0 1px var(--indigo), var(--shadow-sm);
}

.card-id { display: grid; gap: 3px; min-width: 0; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.card h2 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
  font-family: var(--mono);
  color: var(--text);
  word-break: break-word;
}
.meta { color: var(--text-2); font-size: 12px; font-family: var(--mono); }
.rank-pill {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--white);
  color: var(--text-2);
  border: 1px solid var(--border-strong);
}
.card.is-best .rank-pill {
  background: var(--indigo);
  color: #fff;
  border-color: var(--indigo);
}

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  color: var(--text-3);
  background: var(--white);
  white-space: nowrap;
}
.badge.open-weight {
  border-color: var(--green-border);
  color: var(--green-deep);
  background: var(--green-pale);
}

/* rail metrics */
.metric { display: grid; gap: 2px; }
.metric-k {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-3);
}
.metric-v {
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}
.metric-sub { font-size: 11px; color: var(--text-3); line-height: 1.4; }
.meets-line {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--good-bg);
  border: 1px solid var(--green-border);
  font-size: 12px;
  font-weight: 700;
  color: var(--good);
  line-height: 1.4;
}
.meets-k {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 2px;
}
.sh-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.sh-row b { font-family: var(--mono); font-weight: 700; color: var(--text-2); }
.card-rail .sh-row { justify-content: space-between; }
.sh-cost,
.metric-v-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.metric-v-row { margin-top: 2px; }

.budget-add,
.budget-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.budget-add {
  border: 1px solid var(--indigo-border);
  background: var(--white);
  color: var(--indigo);
}
.budget-add:hover { background: var(--indigo-pale); }
.budget-add.is-on {
  background: var(--indigo-pale);
  color: var(--indigo);
}
.budget-add:focus-visible,
.budget-remove:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(11, 118, 129, 0.28); }
.budget-remove {
  border: 1px solid var(--border-strong);
  background: var(--white);
  color: var(--text-3);
  font-size: 15px;
  font-weight: 600;
}
.budget-remove:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
}

.budget-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  border-top: 4px solid var(--indigo);
  box-shadow: var(--shadow-sm);
  overflow-x: hidden;
}
.budget-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.budget-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.budget-head .panel-title { font-size: 15px; margin: 0; }
.budget-head .panel-sub { margin-top: 4px; font-size: 12px; }
.budget-save-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.budget-save-form[hidden] { display: none; }
.budget-save-note {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-2);
}
.budget-save-field {
  display: grid;
  gap: 3px;
  font-size: 11px;
  font-weight: 650;
  color: var(--text-2);
}
.budget-save-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 400;
}
.budget-save-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.budget-save-cancel {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
}
.budget-save-cancel:hover { color: var(--text); }
.budget-save-status {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--green-deep);
}
.budget-save-status.is-error { color: #b91c1c; }
.budget-save-status[hidden] { display: none; }
.budget-list {
  flex: 0 1 auto;
  min-width: 0;
  overflow: visible;
  padding: 8px 12px 12px;
  display: grid;
  gap: 12px;
  align-content: start;
}
.budget-section {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  min-width: 0;
  overflow: hidden;
}
.budget-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}
.budget-section-title {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--green-deep);
  min-width: 0;
}
.btn-budget-link {
  flex-shrink: 0;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--green-hover);
  background: var(--green-deep);
  color: #f4faf0;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.btn-budget-link:hover {
  background: var(--green-hover);
  border-color: var(--green);
  color: #fff;
}
.budget-section-list {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.budget-section-foot {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0 0;
  margin: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  min-width: 0;
}
.budget-section-foot-total-only {
  justify-content: flex-end;
}
.budget-section-sum {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  flex-shrink: 0;
  line-height: 1.2;
  margin-left: auto;
}
button.btn-config-export {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  width: auto;
  margin: 0;
  margin-right: auto;
  padding: 3px 2px;
  border-radius: 4px;
  border: 1px solid var(--green-hover);
  background: var(--green-deep);
  color: #f4faf0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-config-arrow {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
button.btn-config-export:hover {
  background: var(--green-hover);
  border-color: var(--green);
  color: #fff;
}
button.btn-config-export:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(63, 125, 42, 0.35);
}
.budget-empty {
  margin: 4px 2px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.4;
}
.budget-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 6px;
  align-items: center;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  min-width: 0;
}
.budget-item-main { min-width: 0; overflow: hidden; }
.budget-item-model {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.budget-item-seller {
  font-size: 10px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0;
}
.budget-item-amt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.budget-item-amt strong {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
}

.section-title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 800;
  color: var(--text-2);
  margin: 14px 0 5px;
}
.card-main > .section-title:first-of-type { margin-top: 0; }
ul { margin: 0; padding-left: 1.1rem; }
li { margin: 4px 0; line-height: 1.5; font-size: 13px; color: var(--text-2); }
.why li::marker { color: var(--good); }
.whynot li::marker { color: var(--warn); }
.empty {
  color: var(--text-3);
  text-align: center;
  padding: 40px 20px;
  font-size: 14px;
}

/* ============ FOOTER (from cortega.ai) ============ */
footer.site-footer { background: var(--navy-2); padding: 48px 40px 32px; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 54px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--navy-3);
}
.footer-logo { display: flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 800; color: #fff; }
.footer-brand p { color: #64748b; font-size: 13px; line-height: 1.6; margin-top: 10px; }
.footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.footer-col h5 {
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  margin: 0 0 13px;
}
.footer-col a { display: block; color: #94a3b8; text-decoration: none; font-size: 13px; margin-bottom: 9px; }
.footer-col a:hover { color: #f8fafc; }
.footer-bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-bottom p { color: #64748b; font-size: 12.5px; }
.footer-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-pill {
  color: #94a3b8;
  border: 1px solid var(--navy-4);
  background: var(--navy-3);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1180px) {
  .page-body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "form"
      "budget"
      "results";
  }
  .budget-dock { margin-top: 16px; max-width: none; }
}

@media (max-width: 980px) {
  .nav { padding: 10px 20px; flex-wrap: wrap; gap: 10px; }
  .nav-logo { margin-right: 0; }
  .nav-links {
    display: none;
    order: 3;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav.nav-open .nav-links { display: flex; }
  .nav-link { padding: 10px 0; border-radius: 0; }
  .nav-item-dropdown { width: 100%; }
  .nav-dropdown-toggle { padding: 10px 0; width: 100%; justify-content: space-between; }
  .nav-dropdown-menu {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    background: transparent; border: none; padding: 0 0 6px 14px; margin: 0;
    max-height: 0; overflow: hidden; transition: max-height 0.2s ease;
  }
  .nav-item-dropdown.open .nav-dropdown-menu { max-height: 280px; }
  .nav-dropdown-link { padding: 8px 0; }
  .nav-actions { margin-left: auto; gap: 6px; }
  .nav-menu-toggle { display: inline-flex; }
  .nav-btn { padding: 8px 10px; font-size: 12px; }

  .page-hero { padding: 32px 20px 52px; }
  .page-body { padding: 0 20px 48px; }
  footer.site-footer { padding: 40px 20px 28px; }
}

@media (max-width: 720px) {
  .workload-row { grid-template-columns: 1fr; }
  .estimate-grid { grid-template-columns: 1fr 1fr; }
  .cost-row { grid-template-columns: 1fr; gap: 4px; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 560px) {
  .page-hero h1 { letter-spacing: -0.4px; }
  .panel { padding: 16px; }
  .results-shell { padding: 16px; margin-top: 28px; }
  .results-head { flex-direction: column; }
  .dials label { grid-template-columns: 72px 1fr 30px; gap: 10px; }
  .run-bar { padding: 14px 16px; }
  .run-bar-main { flex-direction: column; align-items: stretch; }
  .btn-cta { width: 100%; }
  .estimate-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
