/* Avenyra. Travel, engineered intelligently
   Brand system v1.0. Midnight Navy + Sovereign Gold + Pearl Silver
   Color hex codes are the canonical brand palette; do not drift. */

:root {
  /* === Brand palette === */
  --midnight-navy:  #0B1426;
  --royal-blue:     #122B55;
  --sovereign-gold: #D4AF37;
  --pearl-silver:   #BFC6CF;
  --ivory-cream:    #F5F4EF;

  /* === Surface tokens === */
  --bg:             var(--midnight-navy);
  --bg-elev:        #0F1A33;        /* between midnight + royal */
  --bg-card:        var(--royal-blue);
  --bg-card-hover:  #1A3568;
  --border:         #1F2D4D;
  --border-strong:  #2E4070;

  /* === Text tokens === */
  --text:           var(--ivory-cream);
  --text-muted:     var(--pearl-silver);
  --text-faint:     #7B89A0;

  /* === Accent tokens === */
  --accent:         var(--sovereign-gold);
  --accent-bright:  #E5C963;
  --accent-soft:    rgba(212, 175, 55, 0.12);
  --accent-glow:    rgba(212, 175, 55, 0.35);

  /* === Semantic === */
  --good:    #5FD99C;
  --warn:    #F5A35C;
  --bad:     #EF6B78;
  --info:    #7FB6FF;
  --mistake: #C084FC;

  /* === Type === */
  --serif:   'Cormorant Garamond', 'Times New Roman', serif;
  --sans:    'Inter', system-ui, -apple-system, sans-serif;

  /* === Geometry === */
  --radius:    8px;
  --radius-lg: 14px;
  --shadow:    0 1px 2px rgba(0,0,0,0.4), 0 12px 32px rgba(0,0,0,0.35);
  --shadow-gold: 0 0 0 1px rgba(212,175,55,0.12), 0 12px 28px rgba(212,175,55,0.18);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background:
    radial-gradient(1200px 600px at 80% -100px, rgba(212,175,55,0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(18,43,85,0.55), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============= header ============= */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 48px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 16, 32, 0.85);
  backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logomark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  color: var(--accent);
}
.logomark svg { width: 100%; height: 100%; }
.brand-text h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ivory-cream);
}
.brand-text .tagline {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 500;
}
.tabs { display: flex; gap: 4px; }
.tab {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  padding: 10px 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.15s ease;
}
.tab:hover { color: var(--text); background: var(--bg-card); }
.tab.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(212, 175, 55, 0.25);
}

/* ============= section nav (single-page continuous flow) ============= */
.section-nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.section-link {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  padding: 10px 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.section-link:hover { color: var(--text); background: var(--bg-card); }
.section-link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(212, 175, 55, 0.25);
}
@media (max-width: 880px) {
  .section-nav { gap: 0; }
  .section-link { padding: 8px 10px; font-size: 12px; letter-spacing: 0; }
}
@media (max-width: 640px) {
  .site-header { padding: 14px 16px; flex-wrap: wrap; }
  .section-nav { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ============= full-screen hero ============= */
.hero-full {
  position: relative;
  min-height: 92vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  scroll-margin-top: 80px;
}
.hero-full .bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 38%;
  z-index: 0;
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,20,38,0.45) 0%, rgba(11,20,38,0.30) 45%, rgba(11,20,38,0.95) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 820px;
}
.hero-content .eyebrow {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero-content .brand-display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(56px, 11vw, 120px);
  line-height: 1.0;
  margin: 0;
  color: var(--ivory-cream);
  text-transform: uppercase;
  letter-spacing: clamp(6px, 1.2vw, 14px);
}
.hero-content .ornament {
  display: flex; align-items: center;
  gap: 14px; justify-content: center;
  margin: 22px 0 26px;
}
.hero-content .ornament .line {
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.hero-content .ornament .dot {
  width: 7px; height: 7px;
  background: var(--accent);
  transform: rotate(45deg);
}
.hero-content .pitch {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--pearl-silver);
  margin: 14px auto 36px;
  max-width: 640px;
  line-height: 1.4;
  font-weight: 400;
}
.hero-content .cta-row {
  display: flex; gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-content .cta-row .btn { text-decoration: none; display: inline-block; }
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: var(--accent);
  opacity: 0.6;
  text-decoration: none;
  animation: scrollBounce 2.4s ease-in-out infinite;
}
.scroll-cue:hover { opacity: 1; }
@keyframes scrollBounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 8px); }
}

/* ============= continuous-flow app sections ============= */
.app-section {
  padding: 100px 32px 80px;
  scroll-margin-top: 80px;
  position: relative;
}
.app-section.alt-bg {
  background:
    linear-gradient(180deg, transparent, rgba(18,43,85,0.18), transparent);
}
.app-section.compact { padding: 64px 32px 48px; }
.section-inner {
  max-width: 1180px;
  margin: 0 auto;
}
.section-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 600;
}
.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.05;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
  color: var(--ivory-cream);
}
.section-title em {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}
.section-lead {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.55;
  max-width: 700px;
  margin: 0 0 36px;
}

/* compact app shell strip (app.html only) */
.app-strip {
  background: linear-gradient(180deg, rgba(11,20,38,0.95), rgba(18,43,85,0.35));
  border-bottom: 1px solid var(--border);
  padding: 56px 32px 36px;
}
.app-strip-inner {
  max-width: 1180px;
  margin: 0 auto;
}
.app-strip-eyebrow {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.app-strip h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  margin: 0 0 6px;
  color: var(--ivory-cream);
  letter-spacing: -0.3px;
}
.app-strip p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
  max-width: 600px;
}

/* ============= hero banner (legacy app.html marquee, preserved) ============= */
.hero-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 7;
  max-height: 480px;
  background: var(--bg);
}
.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}
.hero-banner-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11,20,38,0) 55%, rgba(11,20,38,0.85) 92%, var(--bg) 100%),
    radial-gradient(60% 80% at 50% 20%, rgba(11,20,38,0.0) 0%, rgba(11,20,38,0.18) 100%);
}
@media (max-width: 720px) {
  .hero-banner { aspect-ratio: 4 / 3; max-height: 380px; }
  .hero-banner img { object-position: center 40%; }
}

/* ============= main ============= */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hero { margin-bottom: 32px; }
.hero h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 44px;
  line-height: 1.1;
  margin: 0 0 14px;
  letter-spacing: -0.5px;
}
.hero .accent { color: var(--accent); font-style: italic; }
.lead {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 640px;
  margin: 0;
}

/* ============= cards / forms ============= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}
.form { display: flex; flex-direction: column; gap: 20px; }
.grid { display: grid; gap: 16px; }
.grid.two   { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four  { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) {
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field span {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 500;
}
.field small { color: var(--text-faint); font-size: 12px; min-height: 14px; }
.field input, .field select {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  padding: 11px 14px;
  font-family: var(--sans);
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}
.field input:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}
.field.tight input { padding: 9px 12px; font-size: 14px; }
.field input::placeholder { color: var(--text-faint); }

.balances {
  border: 1px solid rgba(46, 64, 112, 0.4);
  border-radius: 12px;
  padding: 22px 20px 20px;
  background: rgba(11, 20, 38, 0.35);
  margin: 0;
  position: relative;
}
.balances legend {
  padding: 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-left: 6px;
}
.balances legend small {
  text-transform: none;
  letter-spacing: 0.3px;
  color: var(--text-faint);
  margin-left: 8px;
  font-weight: 400;
  font-size: 11px;
}
.balance-section { margin-top: 14px; }
.balance-section:first-of-type { margin-top: 0; }
.balance-section h4 {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
  font-family: var(--sans);
}
.balance-section h4 small {
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-faint);
  margin-left: 4px;
  font-weight: 400;
}

/* Balance list: vertical rows with program name on the left and value on the right.
   Used for both transferable currencies and airline frequent flyer programs. */
.balance-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.balance-row {
  display: grid;
  grid-template-columns: 1fr 160px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(11, 20, 38, 0.45);
  border: 1px solid rgba(46, 64, 112, 0.35);
  border-radius: 10px;
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: text;
}
.balance-row:hover {
  border-color: rgba(46, 64, 112, 0.6);
  background: rgba(11, 20, 38, 0.6);
}
.balance-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.25);
}
.balance-row .name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ivory-cream);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.balance-row input[type="number"] {
  background: transparent;
  border: 1px solid rgba(191, 198, 207, 0.18);
  border-radius: 6px;
  color: var(--ivory-cream);
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  text-align: right;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.balance-row input[type="number"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.18);
}
.balance-row.removable {
  grid-template-columns: 1fr 130px 32px;
}
.balance-row .remove {
  background: transparent;
  border: 1px solid rgba(191, 198, 207, 0.2);
  color: var(--text-faint);
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  display: grid;
  place-items: center;
  transition: all 0.12s ease;
}
.balance-row .remove:hover {
  color: var(--bad);
  border-color: var(--bad);
  background: rgba(239, 107, 120, 0.08);
}

/* Mobile: tighten the name and value columns */
@media (max-width: 560px) {
  .balance-row { grid-template-columns: 1fr 110px; padding: 10px 12px; gap: 10px; }
  .balance-row.removable { grid-template-columns: 1fr 90px 28px; }
  .balance-row .name { font-size: 13px; }
  .balance-row input[type="number"] { padding: 7px 10px; font-size: 14px; }
}
.airline-balance-add select {
  background: var(--bg-elev);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 14px;
  width: 100%;
  outline: none;
  cursor: pointer;
}
.airline-balance-add select:hover {
  border-color: var(--accent);
  color: var(--text);
}
.airline-balance-add select:focus {
  border-color: var(--accent);
  border-style: solid;
}

/* ============= autocomplete ============= */
.autocomplete-field { position: relative; }
.autocomplete-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
  max-height: 360px;
  overflow-y: auto;
}
.autocomplete-dropdown.is-open { display: block; }
.autocomplete-dropdown .ac-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s ease;
}
.autocomplete-dropdown .ac-item:last-child { border-bottom: 0; }
.autocomplete-dropdown .ac-item:hover,
.autocomplete-dropdown .ac-item.is-selected {
  background: var(--accent-soft);
}
.autocomplete-dropdown .ac-iata {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--accent);
  font-weight: 500;
  width: 44px;
}
.autocomplete-dropdown .ac-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.autocomplete-dropdown .ac-name .city {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.autocomplete-dropdown .ac-name .airport {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.autocomplete-dropdown .ac-region {
  color: var(--text-faint);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.advanced {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: -4px;
}
.advanced summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.advanced summary:hover { color: var(--accent); }

.actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.btn {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn.primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #1a1f3a;
  font-weight: 600;
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(212, 175, 55, 0.35); }
.btn.ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}
.btn.ghost:hover { color: var(--text); border-color: var(--accent); }

/* ============= results ============= */
.results { margin-top: 36px; }
.results.hidden { display: none; }

/* ============= wallet status banner ============= */
.wallet-status {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  border: 1px solid;
}
.wallet-status.wallet-good {
  background: rgba(95, 217, 156, 0.08);
  border-color: rgba(95, 217, 156, 0.35);
}
.wallet-status.wallet-warn {
  background: rgba(245, 163, 92, 0.08);
  border-color: rgba(245, 163, 92, 0.35);
}
.wallet-status.wallet-bad {
  background: rgba(239, 107, 120, 0.08);
  border-color: rgba(239, 107, 120, 0.35);
}
.wallet-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}
.wallet-good .wallet-icon  { background: rgba(95, 217, 156, 0.18); color: var(--good); }
.wallet-warn .wallet-icon  { background: rgba(245, 163, 92, 0.18); color: var(--warn); }
.wallet-bad  .wallet-icon  { background: rgba(239, 107, 120, 0.18); color: var(--bad); }
.wallet-title {
  font-size: 15px;
  color: var(--ivory-cream);
  font-weight: 600;
  letter-spacing: 0.1px;
}
.wallet-detail {
  font-size: 13px;
  color: var(--pearl-silver);
  margin-top: 2px;
}

/* ============= pay-with chips inside option card ============= */
.pay-paths {
  grid-column: 1 / -1;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
  margin-top: 4px;
}
.pay-paths-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
  font-weight: 600;
}
.pay-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pay-chip {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid;
  white-space: nowrap;
  font-weight: 500;
}
.pay-chip .src { color: var(--ivory-cream); font-weight: 600; }
.pay-chip .amt { font-family: var(--serif); font-size: 13px; font-weight: 500; }
.pay-chip .status {
  font-size: 11px;
  padding-left: 6px;
  border-left: 1px solid currentColor;
  opacity: 0.85;
}
.pay-chip.sufficient {
  background: rgba(95, 217, 156, 0.10);
  border-color: rgba(95, 217, 156, 0.45);
  color: var(--good);
}
.pay-chip.sufficient .amt { color: var(--good); }
.pay-chip.close {
  background: rgba(245, 163, 92, 0.08);
  border-color: rgba(245, 163, 92, 0.35);
  color: var(--warn);
}
.pay-chip.close .amt { color: var(--warn); }
.pay-chip.insufficient {
  background: rgba(11, 20, 38, 0.5);
  border-color: rgba(46, 64, 112, 0.4);
  color: var(--text-faint);
}
.pay-chip.insufficient .amt,
.pay-chip.insufficient .src { color: var(--pearl-silver); }

.source-tag.insufficient-tag {
  background: rgba(11, 20, 38, 0.5);
  color: var(--text-faint);
  border: 1px solid rgba(46, 64, 112, 0.4);
}

@media (max-width: 720px) {
  .wallet-status { grid-template-columns: 32px 1fr; padding: 12px 14px; gap: 12px; }
  .wallet-icon { width: 28px; height: 28px; font-size: 16px; }
  .wallet-title { font-size: 14px; }
  .wallet-detail { font-size: 12.5px; }
  .pay-chip { font-size: 11.5px; padding: 6px 10px; gap: 6px; }
  .pay-chip .status { display: none; }
}

/* headline metric cards. mockup parity ("Best Opportunity / Value Score / Est. Value") */
.headline-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.headline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.headline-card.primary {
  background:
    radial-gradient(180% 110% at 100% 0%, rgba(212,175,55,0.10), transparent 50%),
    var(--bg-card);
  border-color: rgba(212, 175, 55, 0.35);
}
.headline-card .lbl {
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
}
.headline-card .route {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--ivory-cream);
  line-height: 1.05;
  margin-top: 2px;
}
.headline-card .meta {
  font-size: 13px;
  color: var(--pearl-silver);
}
.headline-card .meta-small {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: auto;
}
.headline-card .points {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--accent);
  margin-top: auto;
  letter-spacing: 0.5px;
}
.headline-card .points .taxes {
  font-size: 14px;
  color: var(--pearl-silver);
  font-family: var(--sans);
  letter-spacing: 0;
}
.headline-card .score-big {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}
.headline-card .score-big .denom {
  font-size: 18px;
  color: var(--text-muted);
  margin-left: 4px;
}
.headline-card .value-big {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 500;
  color: var(--ivory-cream);
  line-height: 1;
}
.headline-card .grade {
  font-size: 13px;
  color: var(--pearl-silver);
}
.headline-card .bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  margin-top: auto;
}
.headline-card .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  border-radius: 2px;
}
@media (max-width: 880px) {
  .headline-grid { grid-template-columns: 1fr; }
}

.summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 18px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}
.summary-bar .item { display: flex; flex-direction: column; gap: 2px; }
.summary-bar .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-faint);
}
.summary-bar .val { font-family: var(--serif); font-size: 22px; color: var(--text); }
.summary-bar .val.accent { color: var(--accent); }

.result-grid { display: grid; gap: 14px; }
.option {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(220px, 2fr) 1fr 1fr 1fr auto;
  gap: 18px;
  align-items: center;
  transition: all 0.15s ease;
}
.option:hover { border-color: var(--border-strong); background: var(--bg-card-hover); }
.option .head {
  display: flex; flex-direction: column; gap: 2px;
}
.option .program {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--text);
}
.option .partner {
  font-size: 13px;
  color: var(--text-muted);
}
.option .stat {
  display: flex; flex-direction: column; gap: 2px;
}
.option .stat .num {
  font-family: var(--serif); font-size: 22px; color: var(--text);
}
.option .stat .num.accent { color: var(--accent); }
.option .stat .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-faint);
}
.option .source-tag {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(212,175,55,0.3);
}
.option .source-tag.direct {
  background: rgba(95, 217, 156, 0.12);
  color: var(--good);
  border-color: rgba(95, 217, 156, 0.3);
}
.option .insufficient {
  color: var(--bad);
  font-size: 12px;
  margin-top: 4px;
}
.option .score-pill {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 14px;
  text-align: center;
  min-width: 64px;
}
.option .score-pill .v {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--accent);
}
.option .score-pill .l {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-faint);
}
.option .notes {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  margin-top: 4px;
}
@media (max-width: 860px) {
  .option { grid-template-columns: 1fr 1fr; }
  .option .head { grid-column: 1 / -1; }
  .option .score-pill { grid-column: 1 / -1; justify-self: start; }
}

/* score tab */
.score-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.tier-banner {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.tier-banner .glyph {
  font-family: var(--serif);
  font-size: 38px;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.25);
}
.tier-banner h3 { margin: 0; font-family: var(--serif); font-size: 26px; }
.tier-banner p { margin: 4px 0 0; opacity: 0.9; }
.tier-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}
.tier-stats .item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.tier-stats .lbl { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-faint); }
.tier-stats .val { font-family: var(--serif); font-size: 22px; color: var(--text); }
.notes-list { list-style: none; padding: 0; margin: 16px 0 0; }
.notes-list li {
  padding: 10px 14px;
  background: var(--bg-elev);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

/* positioning */
.position-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 12px;
}
.position-card h4 { margin: 0 0 6px; font-family: var(--serif); font-size: 20px; }
.position-card .meta { color: var(--text-muted); font-size: 13px; margin-bottom: 12px; }
.position-card .savings { color: var(--good); font-weight: 600; }
.position-card .risk { color: var(--warn); font-size: 13px; margin-top: 8px; }
.position-card.advisory { border-color: rgba(192, 132, 252, 0.4); background: linear-gradient(180deg, rgba(192,132,252,0.04), transparent); }
.position-card.advisory h4 { color: var(--mistake); }

/* error */
.error {
  background: rgba(239, 107, 120, 0.08);
  border: 1px solid rgba(239, 107, 120, 0.3);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--bad);
}

/* ============= four-pillar brand strip ============= */
.pillars {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(11,20,38,0.6), rgba(18,43,85,0.25));
  padding: 56px 32px;
}
.pillars-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}
.pillar {
  text-align: left;
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 6px;
  align-items: start;
}
.pillar-icon {
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  color: var(--accent);
  display: block;
  margin-top: 2px;
}
.pillar h3 {
  grid-column: 2;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ivory-cream);
  margin: 0;
  line-height: 1.25;
}
.pillar p {
  grid-column: 2;
  margin: 0;
  font-size: 13px;
  color: var(--pearl-silver);
  line-height: 1.55;
  max-width: 240px;
}
@media (max-width: 880px) {
  .pillars-inner { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}
@media (max-width: 480px) {
  .pillars-inner { grid-template-columns: 1fr; }
}

/* footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 24px 48px;
  background: rgba(11, 16, 32, 0.4);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.muted { color: var(--text-muted); }
.muted.small { font-size: 12px; }

/* misc */
.hidden { display: none !important; }
.empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
}
.empty h3 { font-family: var(--serif); }

/* tab badge */
.badge {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--bg);
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  margin-left: 6px;
  vertical-align: middle;
}
.badge:empty { display: none; }

/* promo dashboard */
.promo-section { margin-bottom: 32px; }
.promo-section h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 14px;
  color: var(--text);
}
.promo-section h3 .count {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
  margin-left: 10px;
}
.promo-grid { display: grid; gap: 12px; }
.promo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: start;
}
.promo-card.relevant {
  border-color: rgba(212, 175, 55, 0.45);
  background: linear-gradient(180deg, rgba(212,175,55,0.04), var(--bg-card));
}
.promo-card .impact-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  padding: 5px 10px;
  border-radius: 4px;
  align-self: start;
}
.impact-extreme   { background: rgba(192,132,252,0.15); color: var(--mistake); }
.impact-very-high { background: rgba(95,217,156,0.15); color: var(--good); }
.impact-high      { background: rgba(127,182,255,0.15); color: var(--info); }
.impact-medium    { background: rgba(245,163,92,0.12);  color: var(--warn); }
.impact-low       { background: rgba(148,163,184,0.12); color: var(--text-muted); }

.promo-card .body h4 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 4px;
}
.promo-card .body .meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.promo-card .body .advice {
  font-size: 13px;
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 12px;
  margin: 0;
}
.promo-card .ratio {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--accent);
  text-align: right;
  white-space: nowrap;
}
.promo-card .ratio .lbl {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 2px;
}
.relevance-pin {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}
@media (max-width: 720px) {
  .promo-card { grid-template-columns: 1fr; }
  .promo-card .ratio { text-align: left; }
}

/* learn cards */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}
.learn-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
}
.learn-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 12px;
  color: var(--accent);
}
.learn-card p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 12px;
}
.learn-card p:last-child { margin-bottom: 0; }
.learn-card em { color: var(--text); font-style: normal; font-weight: 500; }
.learn-card a { color: var(--accent); text-decoration: none; border-bottom: 1px dashed var(--accent); }
.learn-card a:hover { color: var(--accent-bright); }

/* availability hint inside option card */
.availability-hint {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
.availability-hint .label {
  flex-shrink: 0;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2px;
}
.availability-hint a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

/* premium badge */
.premium-tag {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: var(--bg);
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}

/* loading */
.loading {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
}
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
