/* ==========================================================================
   Cursor Model Advisor — Page Styles
   Standalone page, visually consistent with david.zoerb.eu
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens (copied from ../css/style.css)
   -------------------------------------------------------------------------- */
:root {
  --bg:           #0d0d14;
  --bg-alt:       #111120;
  --surface:      #14141f;
  --surface-2:    #1b1b2e;
  --border:       #252538;
  --text:         #e2e2f0;
  --text-muted:   #7878a0;
  --text-subtle:  #6a6a9a;
  --accent:       #1d8cf8;
  --accent-dark:  #1371d9;
  --accent-light: #5ab4ff;
  --accent-glow:  rgba(29, 140, 248, 0.15);
  --accent-glow2: rgba(29, 140, 248, 0.08);
  --warn:         #f59e0b;
  --warn-glow:    rgba(245, 158, 11, 0.15);
  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg:    0 8px 48px rgba(0, 0, 0, 0.6);
  --transition:   0.25s ease;
  --nav-height:   64px;
  --max-width:    1100px;
}

html.light-theme {
  --bg:           #f4f4f8;
  --bg-alt:       #eeeef5;
  --surface:      #ffffff;
  --surface-2:    #e4e4f0;
  --border:       #d0d0e0;
  --text:         #0d0d14;
  --text-muted:   #3d3d58;
  --text-subtle:  #8888aa;
  --accent-light: #1371d9;
  --accent-glow:  rgba(29, 140, 248, 0.10);
  --accent-glow2: rgba(29, 140, 248, 0.06);
  --warn:         #d97706;
  --warn-glow:    rgba(217, 119, 6, 0.12);
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg:    0 8px 48px rgba(0, 0, 0, 0.14);
}

/* Theme toggle icon visibility */
.icon-sun  { display: none; }
html.light-theme .icon-sun  { display: block; }
html.light-theme .icon-moon { display: none; }

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent); }

ul { list-style: none; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition),
              backdrop-filter var(--transition);
}

.site-header.is-sticky {
  background: rgba(13, 13, 20, 0.88);
  border-color: var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html.light-theme .site-header.is-sticky {
  background: rgba(244, 244, 248, 0.92);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav-logo:hover { color: var(--accent-light); }

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-title {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition);
}
.btn-icon:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--accent);
}
.btn-icon svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   Main Content
   -------------------------------------------------------------------------- */
main {
  padding-block: 2.5rem 4rem;
}

/* --------------------------------------------------------------------------
   Page Heading
   -------------------------------------------------------------------------- */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.page-header h1 span {
  color: var(--accent-light);
}

.page-header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-subtle);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  margin-top: 0.75rem;
}
.source-badge svg { width: 12px; height: 12px; }

/* --------------------------------------------------------------------------
   Config Panel
   -------------------------------------------------------------------------- */
.config-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.config-panel-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.config-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.config-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.config-field .input-wrap {
  position: relative;
}

.config-field .input-prefix {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  font-size: 0.9rem;
  pointer-events: none;
}

.config-field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  -moz-appearance: textfield;
}

.config-field input::-webkit-outer-spin-button,
.config-field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.config-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.config-field input.has-prefix {
  padding-left: 1.75rem;
}

/* Advanced section (collapsible <details>) */
.config-advanced {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 0.875rem;
}

.config-advanced > summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  user-select: none;
  transition: color var(--transition);
}
.config-advanced > summary::-webkit-details-marker { display: none; }

.config-advanced > summary::before {
  content: '▶';
  font-size: 0.6rem;
  display: inline-block;
  transition: transform var(--transition);
}

.config-advanced[open] > summary::before {
  transform: rotate(90deg);
}

.config-advanced > summary:hover {
  color: var(--text-muted);
}

.config-grid--advanced {
  margin-top: 0.875rem;
  grid-template-columns: repeat(2, 1fr);
}

.config-hint {
  font-size: 0.73rem;
  color: var(--text-subtle);
  line-height: 1.4;
  margin-top: 0.125rem;
}

/* --------------------------------------------------------------------------
   Advisor Sections
   -------------------------------------------------------------------------- */
/* Unified layout container — config + model selection + output sections */
.advisor-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.advisor-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Collapsible advisor cards (config + model selection) */
.advisor-card-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.advisor-card-summary::-webkit-details-marker { display: none; }
.advisor-card-summary::marker { display: none; }

.summary-text {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.collapse-chevron {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition);
}
details.advisor-card[open] > .advisor-card-summary .collapse-chevron {
  transform: rotate(180deg);
}

/* Config card body needs its own padding (advisor-card-body has none by default) */
.config-body {
  padding: 1.5rem;
}

.advisor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.advisor-card-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.advisor-card-header h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.advisor-card-header .card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.advisor-card-body {
  padding: 1.25rem 1.5rem;
}

/* --------------------------------------------------------------------------
   TL;DR Card
   -------------------------------------------------------------------------- */
.tldr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.tldr-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.tldr-item.is-recommended {
  border-color: var(--accent);
  background: var(--accent-glow2);
}

.tldr-item-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}

.tldr-item.is-recommended .tldr-item-label {
  color: var(--accent-light);
}

.tldr-item-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.tldr-item-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tldr-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: 0.6rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.tldr-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tldr-legend-sep {
  color: var(--border);
  user-select: none;
}

.tldr-budget-line {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.tldr-budget-line strong {
  color: var(--text);
}

.tldr-warning {
  font-size: 0.82rem;
  color: var(--warn);
  margin-top: 0.375rem;
}

/* --------------------------------------------------------------------------
   Daily Driver Banner
   -------------------------------------------------------------------------- */
.daily-driver-banner {
  background: var(--accent-glow2);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.ddb-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.ddb-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  margin-bottom: 0.25rem;
}

.ddb-model {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.375rem;
}

.ddb-meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.ddb-stats {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.ddb-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
}

.ddb-stat-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.ddb-stat-lbl {
  font-size: 0.68rem;
  color: var(--text-subtle);
  text-align: right;
  white-space: nowrap;
}

.ddb-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(29, 140, 248, 0.15);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Quick Guide — Scenario Cards (2 cards: Standard + Quick Edit)
   -------------------------------------------------------------------------- */
.scenario-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

/* Each column groups the 3 cards for one scenario */
.scenario-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scenario-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.scenario-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* Row that holds the scenario label + Best/Value/Best-val pill */
.scenario-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem;
}

.scenario-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Pill that shows "Best", "Value", or "Best/val" */
.scenario-tag {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  white-space: nowrap;
  color: var(--text-muted);
}

.scenario-tag--best   { color: var(--accent-light); border-color: var(--accent); }
.scenario-tag--budget { color: #6ee7b7;             border-color: rgba(16,185,129,0.4); }
.scenario-tag--smart  { color: var(--warn);          border-color: var(--warn); }

html.light-theme .scenario-tag--budget { color: #059669; border-color: rgba(16,185,129,0.5); }

.scenario-examples {
  font-size: 0.72rem;
  color: var(--text-subtle);
  line-height: 1.4;
}

.scenario-model {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.scenario-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.scenario-reason {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.4;
  font-style: italic;
  margin-top: 0.15rem;
  margin-bottom: 0.1rem;
}

.scenario-billing {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.125rem;
}

.scenario-budget {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Credit Pills
   -------------------------------------------------------------------------- */
.credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  white-space: nowrap;
  width: fit-content;
}

.credit-pill--1 {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

html.light-theme .credit-pill--1 {
  color: #059669;
  background: rgba(16, 185, 129, 0.10);
}

.credit-pill--2 {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warn);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.credit-pill--multi {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.credit-pill--maxmode {
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

html.light-theme .credit-pill--maxmode {
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.10);
}

/* --------------------------------------------------------------------------
   Credits column in Request Pool table
   -------------------------------------------------------------------------- */
.credits-cell {
  font-size: 0.82rem;
  white-space: nowrap;
  vertical-align: middle;
}

.credit-budget {
  display: block;
  font-size: 0.72rem;
  color: var(--text-subtle);
  margin-top: 0.2rem;
}

/* --------------------------------------------------------------------------
   Tables (shared)
   -------------------------------------------------------------------------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.advisor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.advisor-table thead th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 0.75rem 0.625rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.advisor-table thead th:first-child { padding-left: 0; }

.advisor-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.advisor-table tbody tr:last-child { border-bottom: none; }
.advisor-table tbody tr:hover { background: var(--surface-2); }

.advisor-table tbody td {
  padding: 0.625rem 0.75rem;
  vertical-align: middle;
}

.advisor-table tbody td:first-child { padding-left: 0; }

/* --------------------------------------------------------------------------
   Request Pool table
   -------------------------------------------------------------------------- */
.row-recommended td:first-child {
  position: relative;
}
.row-recommended td:first-child::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.provider-cell {
  font-weight: 600;
  color: var(--text);
  font-size: 0.82rem;
  white-space: nowrap;
}

.model-cell {
  color: var(--text);
}

.model-id {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-left: 0.35rem;
}

.rec-marker {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  margin-right: 0.25rem;
}

.cost-cell {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.82rem;
  white-space: nowrap;
  color: var(--text);
}

.note-cell {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.free-preview-row td {
  color: var(--warn);
}

/* --------------------------------------------------------------------------
   Tier badge
   -------------------------------------------------------------------------- */
.tier-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  white-space: nowrap;
}

.tier-badge.frontier {
  background: rgba(29, 140, 248, 0.15);
  color: var(--accent-light);
  border: 1px solid rgba(29, 140, 248, 0.3);
}

.tier-badge.high {
  background: rgba(129, 140, 248, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.25);
}

.tier-badge.moderate {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   Max Mode warning badges
   -------------------------------------------------------------------------- */
.mult-warn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--warn);
  white-space: nowrap;
}

.mult-ok {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   API Pool compact summary
   -------------------------------------------------------------------------- */
.api-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}

.api-compact-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.api-compact-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   Section notes / tips
   -------------------------------------------------------------------------- */
.section-tip {
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  line-height: 1.6;
}

.section-tip strong {
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Empty / no-data state
   -------------------------------------------------------------------------- */
.empty-state {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.5rem 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: 0.82rem;
}

.site-footer a {
  color: var(--text-muted);
}
.site-footer a:hover {
  color: var(--accent-light);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .tldr-grid {
    grid-template-columns: 1fr 1fr;
  }

  .scenario-grid {
    grid-template-columns: 1fr 1fr;
  }

  .advisor-card-body {
    padding: 1rem;
  }

  .advisor-card-header {
    padding: 1rem;
  }

  /* Indent fix for recommended marker on mobile */
  .row-recommended td:first-child::before {
    left: -1rem;
  }
  .advisor-card-body {
    padding-left: 1.25rem;
  }
}

@media (max-width: 480px) {
  .config-grid {
    grid-template-columns: 1fr;
  }

  .tldr-grid {
    grid-template-columns: 1fr;
  }

  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .scenario-cards {
    grid-template-columns: 1fr;
  }

  .nav-title {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Model Selection Card
   -------------------------------------------------------------------------- */
.model-sel-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.875rem;
}

.model-sel-search-wrap {
  flex: 1;
  min-width: 180px;
}

.model-sel-search-wrap input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.model-sel-search-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.model-sel-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-sel {
  appearance: none;
  -webkit-appearance: none;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Inter', system-ui, sans-serif;
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-sel:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
}

.model-sel-summary {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-bottom: 0.875rem;
}

.model-sel-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.model-sel-group {
  margin-bottom: 0.5rem;
}

.model-sel-group-header {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  padding: 0.375rem 0 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

.model-sel-group-items {
  list-style: none;
}

.model-sel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius);
  transition: background var(--transition);
  gap: 0.75rem;
}
.model-sel-item:hover {
  background: var(--surface-2);
}

.model-sel-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.4;
  flex-wrap: wrap;
}

.model-sel-name {
  font-weight: 500;
}

.model-sel-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Toggle switch */
.model-toggle {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  border: none;
  background: var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
.model-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-subtle);
  transition: transform var(--transition), background var(--transition);
}
.model-toggle.is-on {
  background: var(--accent);
}
.model-toggle.is-on::after {
  transform: translateX(16px);
  background: #fff;
}
.model-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Discount badge on model items */
.discount-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--warn-glow);
  color: var(--warn);
  border: 1px solid rgba(245, 158, 11, 0.3);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Discount config section (inside Advanced panel)
   -------------------------------------------------------------------------- */
.discount-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

.config-field--full {
  grid-column: 1 / -1;
}

/* Dropdown select styled to match inputs */
.config-field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237878a0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  cursor: pointer;
}
.config-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Suffix label (e.g. %) positioned inside input-wrap */
.input-suffix {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  font-size: 0.9rem;
  pointer-events: none;
}

/* Discount expiry status hint — coloured by JS */
#discount-expiry-status {
  transition: color var(--transition);
}

/* Discount tip in daily driver banner */
.ddb-discount-tip {
  margin-top: 0.75rem;
  padding: 0.6rem 0.875rem;
  background: var(--warn-glow);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.ddb-discount-tip strong {
  color: var(--warn);
}

/* Disclaimer below Recommendations */
.pricing-disclaimer {
  margin-top: 1.25rem;
  padding: 0.875rem 1.125rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.pricing-disclaimer a {
  color: var(--accent);
  text-decoration: none;
}
.pricing-disclaimer a:hover {
  text-decoration: underline;
}

/* Discount badge variant for scenario cards */
.discount-badge--card {
  font-size: 0.6rem;
  padding: 0.08rem 0.35rem;
  vertical-align: middle;
}

/* Subtle left border on discounted scenario cards / banner */
.scenario-card.is-discounted,
.daily-driver-banner.is-discounted {
  border-left: 3px solid var(--warn);
}

/* Discount expiry notice in Quick Guide */
.discount-expiry-notice {
  margin-bottom: 1rem;
  padding: 0.6rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.discount-expiry-notice--warning {
  background: var(--warn-glow);
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--warn);
}

@media (max-width: 480px) {
  .model-sel-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .model-sel-actions {
    justify-content: flex-end;
  }
}
