@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

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

:root {
  /* Core palette */
  --ink:        #0D1117;
  --ink-80:     #1C2633;
  --ink-60:     #2D3F52;
  --slate:      #64748B;
  --mist:       #94A3B8;
  --border:     #E2E8F0;
  --surface:    #F8FAFC;
  --white:      #FFFFFF;

  /* Accent — indigo-to-violet */
  --accent:     #6366F1;
  --accent-dk:  #4F46E5;
  --accent-lt:  #EEF2FF;
  --accent-mid: #C7D2FE;

  /* Semantic */
  --green:      #10B981;
  --green-lt:   #D1FAE5;
  --red:        #EF4444;
  --red-lt:     #FEE2E2;
  --amber:      #F59E0B;
  --amber-lt:   #FEF3C7;
  --blue:       #3B82F6;
  --blue-lt:    #EFF6FF;
  --purple:     #8B5CF6;
  --purple-lt:  #F5F3FF;
  --teal:       #14B8A6;
  --teal-lt:    #F0FDFA;
  --orange:     #F97316;
  --orange-lt:  #FFF7ED;

  /* Type */
  --font:       'Inter', system-ui, sans-serif;
  --mono:       'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing & radius */
  --r-sm:  8px;
  --r:     14px;
  --r-lg:  20px;
  --r-xl:  28px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);

  /* Sidebar */
  --sidebar-w: 248px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────────
   LAYOUT
───────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ─────────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-logo {
  padding: 1.5rem 1.25rem 1.25rem;
}
.sidebar-logo a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(99,102,241,.25);
}
.logo-text {
  font-size: 16px;
  font-weight: 700;
  color: white;
  letter-spacing: -.3px;
}
.logo-text span { color: var(--accent); }

.sidebar-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  padding: 1.25rem 1.25rem .5rem;
}

.sidebar-nav {
  padding: .25rem .75rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: .6rem .875rem;
  border-radius: var(--r-sm);
  color: rgba(255,255,255,.5);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 1px;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.9);
}
.nav-item.active {
  background: rgba(99,102,241,.18);
  color: white;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 17px; flex-shrink: 0; opacity: .7; }
.nav-item.active .nav-icon { opacity: 1; color: var(--accent); }
.nav-item:hover .nav-icon { opacity: 1; }

.nav-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  background: rgba(99,102,241,.3);
  color: var(--accent-mid);
  padding: 2px 6px;
  border-radius: 99px;
  letter-spacing: .04em;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: 11px;
  color: rgba(255,255,255,.2);
}

/* ─────────────────────────────────────────────
   MAIN
───────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ─────────────────────────────────────────────
   TOPBAR
───────────────────────────────────────────── */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.page-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.3px;
}
.page-subtitle {
  font-size: 12.5px;
  color: var(--mist);
  margin-top: 2px;
}
.topbar-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--slate);
  background: var(--surface);
  padding: 5px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
}

.content {
  padding: 2rem;
  max-width: 860px;
  width: 100%;
}

/* ─────────────────────────────────────────────
   CARDS
───────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 1.25rem; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.2px;
}
.card-subtitle {
  font-size: 12px;
  color: var(--mist);
  margin-top: 2px;
}

/* Result card — dark gradient */
.card-result {
  background: var(--ink);
  border: none;
  border-radius: var(--r-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.card-result::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(99,102,241,.35) 0%, transparent 70%);
  pointer-events: none;
}

/* ─────────────────────────────────────────────
   FORM ELEMENTS
───────────────────────────────────────────── */
.field { margin-bottom: 1.125rem; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: .4rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.field input,
.field select {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.5rem;
}
.field input:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.field input[type="date"] {
  color-scheme: light;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.input-prefix { position: relative; }
.input-prefix .prefix-sym {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
  pointer-events: none;
}
.input-prefix input { padding-left: 2rem; }

/* ─────────────────────────────────────────────
   RANGE SLIDER
───────────────────────────────────────────── */
.range-group { margin-bottom: 1.25rem; }
.range-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .6rem;
}
.range-label .lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.range-label .val {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--mono);
}

input[type="range"] {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 99px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15), var(--shadow);
  cursor: grab;
  transition: box-shadow .15s;
}
input[type="range"]::-webkit-slider-thumb:active {
  cursor: grabbing;
  box-shadow: 0 0 0 5px rgba(99,102,241,.2), var(--shadow);
}

/* ─────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: .7rem 1.25rem;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
  letter-spacing: -.1px;
}
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 1px 2px rgba(99,102,241,.3), inset 0 1px 0 rgba(255,255,255,.1);
}
.btn-primary:hover {
  background: var(--accent-dk);
  box-shadow: 0 4px 12px rgba(99,102,241,.4);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--surface);
  color: var(--slate);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  background: var(--border);
  color: var(--ink);
}

/* ─────────────────────────────────────────────
   STATS / RESULT NUMBERS
───────────────────────────────────────────── */
.stat-grid {
  display: grid;
  gap: 1px;
  background: rgba(255,255,255,.07);
  border-radius: 12px;
  overflow: hidden;
}
.stat-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.stat-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.stat-grid.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.stat-cell {
  background: rgba(255,255,255,.04);
  padding: .9rem 1rem;
  text-align: center;
}
.stat-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.35);
  margin-bottom: .35rem;
}
.stat-val {
  font-size: 18px;
  font-weight: 700;
  color: white;
  font-family: var(--mono);
  letter-spacing: -.5px;
}

/* Result headline */
.result-headline {
  color: rgba(255,255,255,.4);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.result-big {
  font-size: 44px;
  font-weight: 800;
  color: white;
  letter-spacing: -2px;
  line-height: 1;
  font-family: var(--mono);
}
.result-sub {
  font-size: 13px;
  color: rgba(255,255,255,.35);
  margin-top: .3rem;
  margin-bottom: 1.5rem;
}

/* ─────────────────────────────────────────────
   SPLIT BAR (principal vs interest etc.)
───────────────────────────────────────────── */
.split-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(255,255,255,.3);
  margin-bottom: .4rem;
}
.split-bar {
  height: 6px;
  background: rgba(255,255,255,.08);
  border-radius: 99px;
  overflow: hidden;
  display: flex;
}
.split-bar-fill {
  height: 100%;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.fill-accent  { background: var(--accent); }
.fill-green   { background: var(--green); }
.fill-red     { background: var(--red); }
.fill-amber   { background: var(--amber); }
.fill-blue    { background: var(--blue); }

/* ─────────────────────────────────────────────
   TABS
───────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 3px;
  margin-bottom: 1.5rem;
  width: fit-content;
}
.tab {
  padding: .45rem 1.125rem;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mist);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
  transition: all .15s;
  letter-spacing: -.1px;
}
.tab.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ─────────────────────────────────────────────
   TOOL GRID (homepage)
───────────────────────────────────────────── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.tool-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.375rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, border-color .2s, transform .2s;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  position: relative;
  overflow: hidden;
}
.tool-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.tool-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  transform: translateY(-3px);
}
.tool-card:hover::after { opacity: 1; }

.tool-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px;
}
.tool-card h3 { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.tool-card p { font-size: 13px; color: var(--slate); line-height: 1.55; }
.tool-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--accent-lt);
  color: var(--accent-dk);
  align-self: flex-start;
  letter-spacing: .03em;
}
.tool-arrow {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 14px;
  color: var(--mist);
  transition: transform .2s, color .2s;
}
.tool-card:hover .tool-arrow {
  transform: translate(2px, -2px);
  color: var(--accent);
}

/* ─────────────────────────────────────────────
   HERO (homepage)
───────────────────────────────────────────── */
.hero {
  background: var(--ink);
  padding: 2.5rem 2rem 2rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(99,102,241,.2) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: 100px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(16,185,129,.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(99,102,241,.15);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 1rem;
  border: 1px solid rgba(99,102,241,.2);
}
.hero h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.7px;
  line-height: 1.2;
  color: white;
  margin-bottom: .75rem;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 14.5px;
  color: rgba(255,255,255,.5);
  line-height: 1.65;
  max-width: 480px;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.75rem;
}
.hero-stat-val {
  font-size: 24px;
  font-weight: 800;
  color: white;
  font-family: var(--mono);
  letter-spacing: -1px;
}
.hero-stat-lbl {
  font-size: 11px;
  color: rgba(255,255,255,.35);
  margin-top: 2px;
  font-weight: 500;
}

/* ─────────────────────────────────────────────
   TABLE
───────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--surface);
  padding: .625rem 1rem;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mist);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink-60);
  font-size: 13px;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface); }
.text-right { text-align: right; }
.text-muted { color: var(--mist); }

/* ─────────────────────────────────────────────
   INFO BOX
───────────────────────────────────────────── */
.info-box {
  background: rgba(99,102,241,.06);
  border: 1px solid rgba(99,102,241,.15);
  border-radius: var(--r-sm);
  padding: .875rem 1rem;
  font-size: 13px;
  color: var(--ink-60);
  line-height: 1.6;
  margin-top: 1rem;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.info-box .info-icon {
  color: var(--accent);
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ─────────────────────────────────────────────
   BMI SCALE BAR
───────────────────────────────────────────── */
.bmi-scale {
  position: relative;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  background: linear-gradient(to right, #60A5FA 0%, #34D399 28%, #FBBF24 55%, #F87171 100%);
  margin-bottom: .4rem;
}
.bmi-thumb {
  position: absolute;
  top: -4px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  transition: left .4s cubic-bezier(.4,0,.2,1);
}

/* ─────────────────────────────────────────────
   AD SLOT
───────────────────────────────────────────── */
.ad-slot {
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--r-sm);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mist);
  font-size: 12px;
  margin: 1.5rem 0;
  letter-spacing: .05em;
  font-weight: 500;
}

/* ─────────────────────────────────────────────
   SECTION LABEL
───────────────────────────────────────────── */
.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: .75rem;
}

/* ─────────────────────────────────────────────
   BREAKDOWN ROW (salary, sip)
───────────────────────────────────────────── */
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-row.total {
  font-weight: 700;
  border-top: 2px solid var(--border);
  border-bottom: none;
  padding-top: .75rem;
  margin-top: .25rem;
  font-size: 14px;
}

/* ─────────────────────────────────────────────
   CATEGORY PILLS (unit converter)
───────────────────────────────────────────── */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.category-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: .45rem .875rem;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--slate);
  font-family: var(--font);
  transition: all .15s;
}
.category-pill.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(99,102,241,.3);
}
.category-pill:hover:not(.active) {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─────────────────────────────────────────────
   MOBILE TOPBAR
───────────────────────────────────────────── */
.mobile-topbar {
  display: none;
  background: var(--ink);
  padding: .875rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.mobile-logo { font-size: 16px; font-weight: 700; color: white; }
.mobile-logo span { color: var(--accent); }

/* ─────────────────────────────────────────────
   BOTTOM NAV
───────────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.07);
  padding: .4rem 0 .6rem;
  z-index: 100;
}
.bottom-nav-items {
  display: flex;
  justify-content: space-around;
  max-width: 500px;
  margin: 0 auto;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: rgba(255,255,255,.35);
  text-decoration: none;
  font-size: 9.5px;
  font-weight: 600;
  padding: .3rem .5rem;
  border-radius: 8px;
  transition: color .15s;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item i { font-size: 20px; }

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.25);
  padding: 1.25rem 2rem;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: auto;
}
.site-footer a {
  color: rgba(255,255,255,.3);
  text-decoration: none;
  transition: color .15s;
}
.site-footer a:hover { color: rgba(255,255,255,.6); }
.footer-links { display: flex; gap: 1.5rem; }

/* ─────────────────────────────────────────────
   BMI CATEGORY CHIPS
───────────────────────────────────────────── */
.bmi-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}
.bmi-cat-chip {
  padding: .75rem;
  border-radius: var(--r-sm);
  text-align: center;
}

/* ─────────────────────────────────────────────
   QUICK REF
───────────────────────────────────────────── */
.quick-ref-list div {
  padding: .35rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--slate);
  font-family: var(--mono);
}
.quick-ref-list div:last-child { border-bottom: none; }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding-bottom: 70px; }
  .mobile-topbar { display: flex; }
  .bottom-nav { display: block; }
  .topbar { display: none; }
  .content { padding: 1.25rem; }
  .hero { padding: 1.5rem 1.25rem; }
  .hero h1 { font-size: 22px; }
  .field-row { grid-template-columns: 1fr; }
  .bmi-cats { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 1.25rem; }
}

@media (max-width: 600px) {
  .tool-grid { grid-template-columns: 1fr; }
  .stat-grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .stat-grid.cols-3 { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Utility */
.mt-0  { margin-top: 0; }
.mt-1  { margin-top: .5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.gap-top { margin-top: 1.25rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
code.formula {
  font-family: var(--mono);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 13px;
  color: var(--accent-dk);
}