:root {
  --bg-white: #FFFFFF;
  --bg-subtle: #F5F5F7;
  --border-light: #E5E5EA;
  --border-hover: #D1D1D6;
  --text-dark: #1D1D1F;
  --text-body: #515154;
  --text-muted: #6E6E73;
  --text-subtle: #86868B;
  --radius-card: 24px;
  --radius-pill: 9999px;

  /* Semantic Soft Tints */
  --good-bg: #ECFDF5;
  --good-border: #A7F3D0;
  --good-text: #065F46;

  --warn-bg: #FFFBEB;
  --warn-border: #FDE68A;
  --warn-text: #92400E;

  --bad-bg: #FEF2F2;
  --bad-border: #FECACA;
  --bad-text: #991B1B;

  /* Consistent Two-Tone Emerald Chart */
  --chart-base: #059669;
  --chart-profit: #6EE7B7;
  --chart-profit-border: #34D399;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  max-width: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-white);
  color: var(--text-dark);
  line-height: 1.5;
  font-size: 15px;
  overflow-x: clip;
  max-width: 100%;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-feature-settings: "tnum" on, "lnum" on;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Sticky Frosted Glass Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.market-seg button {
  padding: 3px 9px;
  font-size: 11px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-dark);
  flex-shrink: 0;
}

.brand-monogram {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--text-dark);
  color: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.02em;
}

.brand-name {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.025em;
}

.country-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.header-nav::-webkit-scrollbar {
  display: none;
}

.header-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.header-link:hover,
.header-link.is-active {
  color: var(--text-dark);
}

.header-link.is-active {
  font-weight: 800;
  position: relative;
}

.header-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-dark);
}

.lang-switch {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn.active {
  background: var(--text-dark);
  color: var(--bg-white);
}

/* Hero Section */
.hero {
  padding: 44px 0 28px;
  text-align: center;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 18px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--chart-base);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.16);
}

.hero h1 {
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text-dark);
  max-width: 780px;
  margin: 0 auto 14px;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Main Calculator Card */
.calc-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
  margin-bottom: 24px;
}

.mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.segmented-control {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.segmented-control::-webkit-scrollbar {
  display: none;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.seg-btn.active {
  background: var(--text-dark);
  color: var(--bg-white);
}

.preset-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-pill {
  border: 1px solid var(--border-light);
  background: var(--bg-white);
  color: var(--text-body);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.preset-pill:hover {
  border-color: var(--border-hover);
  background: var(--bg-subtle);
}

.preset-pill.active {
  border-color: var(--text-dark);
  background: var(--text-dark);
  color: var(--bg-white);
}

/* Input Grid */
.inputs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dark);
}

.field-hint {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 0 14px;
  height: 46px;
  transition: border-color 0.15s ease;
}

.price-box:focus-within {
  border-color: var(--text-dark);
}

.price-input {
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
  width: 100%;
  outline: none;
  min-width: 0;
  letter-spacing: -0.02em;
}

.price-unit {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-left: 8px;
  flex-shrink: 0;
}

.clean-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border-light);
  border-radius: 9999px;
  outline: none;
  margin-top: 4px;
}

.clean-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-dark);
  cursor: pointer;
  border: 2px solid var(--bg-white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.clean-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-dark);
  cursor: pointer;
  border: 2px solid var(--bg-white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.quick-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.choice-pill {
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-body);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.choice-pill:hover {
  border-color: var(--border-hover);
}

.choice-pill.active {
  background: var(--text-dark);
  color: var(--bg-white);
  border-color: var(--text-dark);
}

/* Bottom Controls Bar (Tax Wrapper, Inflation, Risk Filter) */
.calc-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.control-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.mini-seg {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.mini-seg button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.mini-seg button.active {
  background: var(--text-dark);
  color: var(--bg-white);
}

/* Top Summary KPI Strip (3 Core Metrics Max) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-card.is-highlight {
  background: var(--good-bg);
  border-color: var(--good-border);
}

.kpi-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.kpi-card.is-highlight .kpi-lbl {
  color: var(--good-text);
}

.kpi-val {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-dark);
  line-height: 1.15;
}

.kpi-card.is-highlight .kpi-val {
  color: var(--good-text);
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-body);
  line-height: 1.4;
}

/* Visual Comparison Chart Card */
.chart-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  margin-bottom: 24px;
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-dark);
}

.vbar-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-body);
}

.vbar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.vbar-swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

.vbar-swatch-main {
  background: var(--chart-base);
}

.vbar-swatch-sub {
  background: var(--chart-profit);
  border: 1px solid var(--chart-profit-border);
}

.vbar-swatch-loss {
  background: var(--bad-border);
  border: 1px solid var(--bad-text);
}

.vbar-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vbar-row {
  display: grid;
  grid-template-columns: 220px 1fr 155px;
  align-items: center;
  gap: 14px;
  padding: 8px 8px;
  margin: 0 -8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.14s ease;
}

.vbar-row:hover {
  background: var(--bg-subtle);
}

.vbar-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.vbar-rank {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-subtle);
  width: 22px;
  flex-shrink: 0;
}

.vbar-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vbar-track {
  height: 22px;
  background: var(--bg-subtle);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
}

.vbar-base {
  background: var(--chart-base);
  height: 100%;
  transition: width 0.25s ease;
}

.vbar-profit {
  background: var(--chart-profit);
  height: 100%;
  transition: width 0.25s ease;
}

.vbar-row.is-loss .vbar-base {
  background: #FCA5A5;
}

.vbar-val {
  text-align: right;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-dark);
  white-space: nowrap;
}

.vbar-val span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--good-text);
  margin-left: 4px;
}

.vbar-row.is-loss .vbar-val span {
  color: var(--bad-text);
}

/* Ranked Cards List */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-dark);
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.rank-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rank-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.rank-card.is-winner {
  border-color: var(--good-border);
  background: linear-gradient(180deg, #F6FEF9 0%, #FFFFFF 48%);
}

.rank-card.is-benchmark-loss {
  border-color: var(--bad-border);
  background: #FFFDFD;
}

.rank-card-top {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 16px;
}

.rank-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-dark);
  flex-shrink: 0;
}

.rank-card.is-winner .rank-num {
  background: var(--text-dark);
  color: var(--bg-white);
  border-color: var(--text-dark);
}

.rank-info {
  min-width: 0;
}

.rank-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.tier-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-body);
}

.tier-pill.is-good {
  background: var(--good-bg);
  border-color: var(--good-border);
  color: var(--good-text);
}

.tier-pill.is-warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-text);
}

.tier-pill.is-bad {
  background: var(--bad-bg);
  border-color: var(--bad-border);
  color: var(--bad-text);
}

.rank-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.rank-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.rank-metrics {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: right;
}

.metric-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-subtle);
  white-space: nowrap;
}

.metric-val {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-dark);
  white-space: nowrap;
}

.metric-val.is-profit {
  color: var(--good-text);
}

.metric-val.is-loss {
  color: var(--bad-text);
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--text-dark);
  color: var(--bg-white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.12s ease;
}

.btn-pill:hover {
  opacity: 0.88;
}

.btn-pill.is-secondary {
  background: var(--bg-subtle);
  color: var(--text-dark);
  border: 1px solid var(--border-light);
}

/* Expandable Bank Promo Sub-Drawer */
.promo-sublist {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.promo-bank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 10px 14px;
}

.promo-bank-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bank-logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bank-logo svg {
  width: 100%;
  height: 100%;
}

.promo-bank-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-bank-meta {
  font-size: 11.5px;
  color: var(--good-text);
  font-weight: 600;
}

.promo-bank-cta {
  font-size: 12px;
  font-weight: 700;
  color: var(--bg-white);
  background: var(--text-dark);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.promo-bank-cta:hover {
  opacity: 0.86;
}

/* Cross-Link Bridge Banner to HipoRank */
.bridge-banner {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.bridge-banner h3 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.bridge-banner p {
  font-size: 13px;
  color: var(--text-muted);
}

/* KNF Disclaimer & Footer */
.disclaimer-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 16px 20px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 28px;
}

.site-footer {
  border-top: 1px solid var(--border-light);
  padding: 24px 0 36px;
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(29, 29, 31, 0.42);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 200;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  max-width: 500px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-dark);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.modal-metric {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 10px 12px;
}

.modal-metric.is-accent {
  background: var(--good-bg);
  border-color: var(--good-border);
}

.modal-why {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-body);
}

.modal-why-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.modal-check {
  color: var(--good-text);
  font-weight: 800;
}

.modal-cta-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Inline Numeric Pill (e.g. Current Age) */
.inline-num-pill {
  height: 32px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: border-color 0.15s ease;
}

.inline-num-pill:focus-within {
  border-color: var(--text-dark);
}

.inline-num-pill input {
  width: 38px;
  border: none;
  outline: none;
  font-weight: 800;
  font-size: 13px;
  background: transparent;
  text-align: center;
  color: var(--text-dark);
  -moz-appearance: textfield;
}

.inline-num-pill input::-webkit-outer-spin-button,
.inline-num-pill input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Accelerator Callout Strip */
.accelerator-strip {
  background: var(--good-bg);
  border: 1px solid var(--good-border);
  color: var(--good-text);
  border-radius: 18px;
  padding: 14px 18px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.accelerator-btn {
  border: 1px solid var(--good-border);
  background: var(--bg-white);
  color: var(--good-text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.accelerator-btn:hover {
  background: #D1FAE5;
  border-color: #6EE7B7;
}

/* 4-Stage Milestone Progress Ladder */
.milestone-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.milestone-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.milestone-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.milestone-card.is-reached {
  border-color: var(--good-border);
  background: linear-gradient(180deg, #F6FEF9 0%, #FFFFFF 55%);
}

.milestone-card.is-next {
  border: 1.5px solid var(--text-dark);
}

.milestone-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.milestone-card.is-reached .rank-num {
  background: var(--chart-base);
  color: var(--bg-white);
  border-color: var(--chart-base);
}

.milestone-card.is-next .rank-num {
  background: var(--text-dark);
  color: var(--bg-white);
  border-color: var(--text-dark);
}

.milestone-target-col {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.milestone-bar-wrap {
  height: 18px;
  background: var(--bg-subtle);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  margin: 14px 0 10px;
}

.milestone-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

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

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

  .vbar-row {
    grid-template-columns: 140px 1fr 125px;
    gap: 10px;
  }

  .rank-card-top {
    grid-template-columns: auto 1fr;
  }

  .rank-metrics {
    grid-column: 1 / -1;
    justify-content: space-between;
    text-align: left;
    padding-top: 8px;
    border-top: 1px solid var(--bg-subtle);
  }

  .rank-card-top .btn-pill {
    grid-column: 1 / -1;
    width: 100%;
  }

  .milestone-head {
    grid-template-columns: auto 1fr;
  }

  .milestone-target-col {
    grid-column: 1 / -1;
    text-align: left;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid var(--bg-subtle);
  }

  .promo-sublist {
    grid-template-columns: 1fr;
  }

  .bridge-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-inner {
    height: auto;
    padding: 10px 0;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .header-nav {
    display: flex;
    order: 3;
    width: 100%;
    padding-top: 8px;
    padding-bottom: 2px;
    gap: 16px;
    border-top: 1px solid var(--bg-subtle);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .header-nav::-webkit-scrollbar {
    display: none;
  }
}
