/* ==========================================================================
   ACCELPIX BROKERAGE CALCULATOR — DESIGN SYSTEM
   Token system: color, type, layout, motion
   ========================================================================== */

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

:root {
  /* ---- Brand colors (from Accelpix mark) ---- */
  --navy-900: #161B3D;
  --navy-800: #1C2150;
  --indigo-700: #232C6B;
  --indigo-600: #2A3580;
  --indigo-500: #3B4BA8;
  --indigo-400: #5266C7;
  --amber-600: #E07F0E;
  --amber-500: #F7941E;
  --amber-400: #FFB04D;
  --amber-300: #FFCB85;

  /* ---- Semantic - LIGHT mode ---- */
  --bg: #F6F7FB;
  --bg-elevated: #FFFFFF;
  --bg-sunken: #ECEFF7;
  --surface-1: #FFFFFF;
  --surface-2: #F1F3F9;
  --border-soft: #E2E5F0;
  --border-strong: #CBD0E6;
  --text-primary: #161B3D;
  --text-secondary: #4D5378;
  --text-tertiary: #8086AD;
  --accent: var(--amber-500);
  --accent-strong: var(--amber-600);
  --brand: var(--indigo-600);
  --brand-strong: var(--navy-900);
  --positive: #1A9E6B;
  --negative: #D8473A;
  --shadow-sm: 0 1px 2px rgba(22, 27, 61, 0.06), 0 1px 1px rgba(22,27,61,0.04);
  --shadow-md: 0 6px 20px rgba(22, 27, 61, 0.08), 0 2px 6px rgba(22,27,61,0.05);
  --shadow-lg: 0 20px 50px rgba(22, 27, 61, 0.14), 0 6px 16px rgba(22,27,61,0.08);
  --grain-opacity: 0.025;

  /* ---- Layout ---- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --container: 1180px;
  --header-h: 72px;

  /* ---- Type ---- */
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms;
  --t-med: 280ms;
}

html[data-theme="dark"] {
  --bg: #0E1124;
  --bg-elevated: #161A33;
  --bg-sunken: #090B18;
  --surface-1: #161A33;
  --surface-2: #1D2240;
  --border-soft: #272D52;
  --border-strong: #343C6E;
  --text-primary: #F1F2FA;
  --text-secondary: #ABB0D6;
  --text-tertiary: #6E74A0;
  --accent: var(--amber-500);
  --accent-strong: var(--amber-400);
  --brand: #6E7FD9;
  --brand-strong: #C5CCF4;
  --positive: #34D399;
  --negative: #F87171;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.55);
  --grain-opacity: 0.05;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  transition: background var(--t-med) var(--ease), color var(--t-med) var(--ease);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  width: 100%;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Subtle grain texture overlay for depth without being a "default" gradient mesh */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------------------------- HEADER + MEGA MENU ---------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
  overflow: visible;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-logo img { height: 30px; width: auto; }

/* --- Primary nav --- */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 1;
  min-width: 0;
  overflow: visible;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
  margin-left: auto;
}
.header-cta-secondary, .header-cta-primary { white-space: nowrap; flex-shrink: 0; }

@media (max-width: 1180px) { .header-nav { gap: 1px; } }
@media (max-width: 1040px) { .header-cta-secondary { display: none; } }

/* --- Nav items (plain links and dropdown triggers) --- */
.header-nav a,
.nav-trigger {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--t-fast) var(--ease);
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
}
.header-nav a:hover,
.nav-trigger:hover { color: var(--text-primary); background: var(--surface-2); }
.header-nav a.is-active { color: var(--accent-strong); font-weight: 600; }
.nav-trigger.is-open { color: var(--text-primary); background: var(--surface-2); }
.nav-trigger .chevron {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2;
  fill: none;
  transition: transform var(--t-fast) var(--ease);
  flex-shrink: 0;
}
.nav-trigger.is-open .chevron { transform: rotate(180deg); }

/* --- Dropdown wrapper --- */
.nav-dropdown {
  position: relative;
}
.nav-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  z-index: 200;
  min-width: 220px;
  overflow: hidden;
}
.nav-panel::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  width: 12px; height: 12px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-soft);
  border-left: 1px solid var(--border-soft);
  transform: translateX(-50%) rotate(45deg);
  z-index: 1;
}
.nav-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* --- Mega panel: brokers grid --- */
.nav-panel-mega {
  width: 740px;
  left: -120px;
  transform: translateX(0) translateY(-6px);
}
.nav-panel-mega.is-open { transform: translateX(0) translateY(0); }
.nav-panel-mega::before { left: 180px; }

.mega-header {
  padding: 16px 20px 10px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mega-header-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-tertiary);
}
.mega-header-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
}
.mega-header-link:hover { color: var(--accent-strong); }

.mega-broker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 12px;
  gap: 4px;
}
.mega-broker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--t-fast) var(--ease);
  cursor: pointer;
  min-width: 0;
}
.mega-broker-item:hover { background: var(--surface-2); }
.mega-broker-avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -.02em;
}
.mega-broker-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.mega-broker-tag {
  font-size: 10.5px;
  color: var(--text-tertiary);
}

/* --- Tools panel --- */
.nav-panel-tools {
  width: 520px;
  left: -140px;
  transform: translateX(0) translateY(-6px);
}
.nav-panel-tools.is-open { transform: translateX(0) translateY(0); }
.nav-panel-tools::before { left: 160px; }

.tools-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 12px;
  gap: 4px;
}
.tool-panel-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  transition: background var(--t-fast) var(--ease);
  cursor: pointer;
}
.tool-panel-item:hover { background: var(--surface-2); }
.tool-panel-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--amber-500) 14%, var(--surface-2));
  color: var(--accent-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.tool-panel-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.tool-panel-desc {
  font-size: 11.5px;
  color: var(--text-tertiary);
  line-height: 1.45;
}
.tool-panel-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--positive) 14%, transparent);
  color: var(--positive);
  margin-top: 4px;
  display: inline-block;
}

/* --- Theme toggle & menu trigger (unchanged) --- */
.theme-toggle {
  width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.theme-toggle svg { width: 19px; height: 19px; stroke: var(--text-primary); }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.menu-trigger {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  align-items: center; justify-content: center;
  cursor: pointer;
}
.menu-trigger svg { width: 20px; height: 20px; stroke: var(--text-primary); }

/* --- Mobile drawer --- */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 12, 25, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease);
}
.mobile-drawer.is-open { opacity: 1; pointer-events: auto; }
.mobile-drawer-panel {
  position: absolute;
  top: 0; right: 0;
  width: min(340px, 88vw);
  height: 100%;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transform: translateX(100%);
  transition: transform var(--t-med) var(--ease);
  overflow-y: auto;
}
.mobile-drawer.is-open .mobile-drawer-panel { transform: translateX(0); }
.mobile-drawer-close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
  cursor: pointer;
  color: var(--text-tertiary);
}
.mobile-drawer-close svg { width: 22px; height: 22px; stroke: currentColor; }
.mobile-drawer-section-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-tertiary);
  padding: 14px 0 6px;
  border-top: 1px solid var(--border-soft);
  margin-top: 6px;
}
.mobile-drawer-section-label:first-of-type { border-top: none; margin-top: 0; }
.mobile-drawer-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  margin-bottom: 2px;
}
.mobile-drawer-panel a:hover { background: var(--surface-2); color: var(--text-primary); }
.mobile-drawer-panel a .dr-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.mobile-drawer-cta {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Hide mega nav on mobile, show hamburger */
@media (max-width: 860px) {
  .header-nav { display: none; }
  .menu-trigger { display: flex; }
  .header-cta-primary, .header-cta-secondary { display: none; }
}

/* ---------------------------- BUTTONS ---------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  border-radius: var(--radius-pill);
  padding: 11px 22px;
  border: none;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: #1A1300;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border-soft);
}
.btn-ghost:hover { border-color: var(--border-strong); }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* ---------------------------- HERO ---------------------------- */
.hero {
  padding: 64px 0 48px;
  position: relative;
  overflow: hidden;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--amber-500) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber-500) 30%, transparent);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-weight: 800;
  max-width: 760px;
}
.hero h1 .accent { color: var(--accent-strong); }
.hero p.lede {
  margin-top: 18px;
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
}
.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.hero-stat .num {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-primary);
}
.hero-stat .label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ---------------------------- BROKER GRID (hub page) ---------------------------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: 1.7rem;
  font-weight: 700;
}
.section-head p { color: var(--text-tertiary); font-size: 14.5px; margin: 0; }

.search-bar {
  position: relative;
  max-width: 360px;
  width: 100%;
}
.search-bar input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  color: var(--text-primary);
  font-size: 14.5px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--t-fast) var(--ease);
}
.search-bar input:focus { border-color: var(--accent); }
.search-bar svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  stroke: var(--text-tertiary);
}

.broker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}
.broker-card {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  cursor: pointer;
  position: relative;
  min-width: 0;
}
.broker-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.broker-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.broker-avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: -0.03em;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.22);
}
.broker-avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent 55%);
  pointer-events: none;
}
.broker-card-name { font-weight: 700; font-size: 15px; }
.broker-card-tag { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.broker-card-tags {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border-soft);
}
.pill.pill-free { color: var(--positive); border-color: color-mix(in srgb, var(--positive) 40%, transparent); background: color-mix(in srgb, var(--positive) 10%, transparent); }
.broker-card-cta {
  margin-top: auto;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 6px;
}
.broker-card-cta svg { width: 14px; height: 14px; transition: transform var(--t-fast) var(--ease); }
.broker-card:hover .broker-card-cta svg { transform: translateX(3px); }

/* ---------------------------- CALCULATOR LAYOUT ---------------------------- */
.calc-page-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.calc-broker-badge {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.03em;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.14), inset 0 1px 0 rgba(255,255,255,0.22);
}
.calc-broker-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent 55%);
  pointer-events: none;
}
.breadcrumb {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}
.breadcrumb a { color: var(--text-tertiary); }
.breadcrumb a:hover { color: var(--accent-strong); }
.breadcrumb .sep { margin: 0 6px; }

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 24px;
  align-items: start;
}

.card {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 22px;
}

/* Segment tabs */
.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  padding: 5px;
  margin-bottom: 24px;
}
.tab {
  text-align: center;
  padding: 9px 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  user-select: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tab.is-active {
  background: var(--brand-strong);
  color: #fff;
}
html[data-theme="dark"] .tab.is-active { color: var(--navy-900); background: var(--accent); }

/* Form fields */
.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.field-input-wrap { position: relative; }
.field-input-wrap .prefix {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 14px;
  pointer-events: none;
}
.field input, .field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  appearance: none;
}
.field input.has-prefix { padding-left: 30px; }
.field select { font-family: var(--font-body); cursor: pointer; }
.field input:focus, .field select:focus { border-color: var(--accent); background: var(--surface-1); }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
  margin-top: 8px;
}
.toggle-row span { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.switch {
  width: 44px; height: 26px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--t-fast) var(--ease);
}
.switch::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-tertiary);
  top: 3px; left: 3px;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.switch.is-on { background: color-mix(in srgb, var(--accent) 30%, transparent); border-color: var(--accent); }
.switch.is-on::after { transform: translateX(18px); background: var(--accent-strong); }

/* Results panel */
.result-hero {
  text-align: center;
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 22px;
}
.result-hero .label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.result-hero .value {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: break-word;
}
.result-hero .value.positive { color: var(--positive); }
.result-hero .value.negative { color: var(--negative); }
.result-hero .sub { font-size: 13px; color: var(--text-tertiary); margin-top: 6px; }

/* Signature element: segmented breakdown bar */
.breakdown-bar {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 18px;
}
.breakdown-bar .seg {
  height: 100%;
  transition: width var(--t-med) var(--ease);
  min-width: 2px;
}
.breakdown-legend {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 10px 16px;
  margin-bottom: 8px;
}
.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  gap: 8px;
  min-width: 0;
}
.legend-item .dot-label {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-secondary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.legend-item .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-item .amt {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.charges-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
}
.charges-table tr {
  border-top: 1px solid var(--border-soft);
}
.charges-table tr:first-child { border-top: none; }
.charges-table td {
  padding: 10px 0;
  font-size: 14px;
}
.charges-table td:first-child { color: var(--text-secondary); }
.charges-table td:last-child {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}
.charges-table tr.total td {
  padding-top: 14px;
  font-weight: 700;
  font-size: 15px;
}
.charges-table tr.total td:last-child { color: var(--accent-strong); }

/* ---------------------------- TERMS / DISCLOSURE ---------------------------- */
.terms-section {
  background: var(--bg-sunken);
  border-top: 1px solid var(--border-soft);
  padding: 56px 0;
  margin-top: 60px;
}
.terms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
}
.terms-block h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.terms-block h4 .idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--amber-500) 14%, transparent);
  width: 22px; height: 22px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.terms-block p, .terms-block li {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.terms-block ul { margin: 0; padding-left: 18px; }
.terms-block li { margin-bottom: 6px; }
.terms-disclaimer {
  margin-top: 32px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--amber-500) 8%, var(--surface-1));
  border: 1px solid color-mix(in srgb, var(--amber-500) 25%, transparent);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.terms-disclaimer strong { color: var(--text-primary); }

/* ---------------------------- FOOTER ---------------------------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0 28px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand img { height: 26px; margin-bottom: 10px; }
.footer-brand p { font-size: 13px; color: var(--text-tertiary); max-width: 280px; }
.social-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.social-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--t-fast) var(--ease);
  flex-shrink: 0;
}
.social-icon svg { width: 16px; height: 16px; }
.social-icon:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col h5 {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.footer-col a {
  display: block;
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 9px;
  transition: color var(--t-fast) var(--ease);
}
.footer-col a:hover { color: var(--accent-strong); }
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  font-size: 12.5px;
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-legal p { line-height: 1.6; max-width: 900px; }
.footer-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-legal-links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-legal-links a { color: var(--text-tertiary); }
.footer-legal-links a:hover { color: var(--accent-strong); }
.footer-tagline { font-size: 13px; color: var(--text-tertiary); line-height: 1.6; max-width: 300px; }
.footer-logo { height: 28px; margin-bottom: 12px; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: center; transition: all var(--t-fast); }
.footer-social a:hover { background: var(--surface-1); border-color: var(--border-strong); transform: translateY(-1px); }
.footer-social svg { width: 14px; height: 14px; stroke: var(--text-tertiary); }
.footer-social a:hover svg { stroke: var(--brand); }

/* --- Wide tools mega panel --- */
.nav-panel-tools-wide {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: min(860px, calc(100vw - 32px));
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  z-index: 200;
  overflow: hidden;
}
.nav-panel-tools-wide.is-open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav-panel-tools-wide::before {
  content: ''; position: absolute; top: -6px; left: 50%; margin-left: -6px;
  width: 12px; height: 12px; background: var(--bg-elevated);
  border-top: 1px solid var(--border-soft); border-left: 1px solid var(--border-soft);
  transform: rotate(45deg); z-index: 1;
}
.tools-wide-inner { display: grid; grid-template-columns: 250px 1fr; }
.tools-col { padding: 16px 18px; min-width: 0; }
.tools-col + .tools-col { border-left: 1px solid var(--border-soft); }
.tools-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 12px; }
.tools-col-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-tertiary); white-space: nowrap; }
.tools-col-link { font-size: 11.5px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.tools-col-link:hover { color: var(--accent-strong); }
.wt-links-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; }
.wt-link { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 500; color: var(--text-secondary); transition: all var(--t-fast); min-width: 0; }
.wt-link span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-link:hover { background: var(--surface-2); color: var(--text-primary); }
.wt-icon { font-size: 12px; flex-shrink: 0; width: 18px; text-align: center; }
.wt-resource-link { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--border-soft); font-size: 12px; font-weight: 600; color: var(--text-secondary); transition: all var(--t-fast); white-space: nowrap; }
.wt-resource-link:hover { background: var(--surface-1); color: var(--brand); border-color: var(--brand); }

/* --- Accelpix.com products mega panel --- */
.nav-panel-accelpix {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: min(680px, calc(100vw - 32px));
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  z-index: 200;
  overflow: hidden;
}
.nav-panel-accelpix.is-open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav-panel-accelpix::before {
  content: ''; position: absolute; top: -6px; left: 50%; margin-left: -6px;
  width: 12px; height: 12px; background: var(--bg-elevated);
  border-top: 1px solid var(--border-soft); border-left: 1px solid var(--border-soft);
  transform: rotate(45deg); z-index: 1;
}
.mega-products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 14px; }
.mega-product-col { padding: 4px 10px; min-width: 0; }
.mega-product-col + .mega-product-col { border-left: 1px solid var(--border-soft); }
.mega-col-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-tertiary); margin-bottom: 8px; padding: 0 4px; }
.mega-product-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px; border-radius: var(--radius-sm); transition: background var(--t-fast); margin-bottom: 4px; min-width: 0; }
.mega-product-item:hover { background: var(--surface-2); }
.mega-product-item > div:last-child { min-width: 0; }
.mp-icon { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.mp-blue { background: color-mix(in srgb,#2a78d6 14%,transparent); color: #2a78d6; }
.mp-indigo { background: color-mix(in srgb,var(--indigo-500) 14%,transparent); color: var(--indigo-500); }
.mp-amber { background: color-mix(in srgb,var(--amber-500) 14%,transparent); color: var(--accent-strong); }
.mp-green { background: color-mix(in srgb,var(--positive) 14%,transparent); color: var(--positive); }
.mp-purple { background: color-mix(in srgb,#7c3aed 14%,transparent); color: #7c3aed; }
.mp-name { font-size: 12.5px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.mp-desc { font-size: 11px; color: var(--text-tertiary); line-height: 1.4; }
.mega-products-footer { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px 12px; border-top: 1px solid var(--border-soft); background: var(--surface-2); }
.mega-products-footer a { font-size: 12px; font-weight: 600; color: var(--text-secondary); padding: 4px 10px; border-radius: var(--radius-pill); background: var(--surface-1); border: 1px solid var(--border-soft); transition: all var(--t-fast); }
.mega-products-footer a:hover { border-color: var(--brand); color: var(--brand); }

/* --- Tool panel items (brokerage tools column) --- */
.tool-panel-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); transition: background var(--t-fast); cursor: pointer; }
.tool-panel-item:hover { background: var(--surface-2); }
.tool-panel-icon { width: 32px; height: 32px; border-radius: 8px; background: color-mix(in srgb,var(--amber-500) 12%,var(--surface-2)); color: var(--accent-strong); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.tool-panel-name { font-size: 12.5px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.tool-panel-desc { font-size: 11px; color: var(--text-tertiary); line-height: 1.4; }
.tool-panel-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: var(--radius-pill); background: color-mix(in srgb,var(--positive) 14%,transparent); color: var(--positive); display: inline-block; margin-top: 3px; }

/* ============================================================
   MEGA MENU — CLEAN OVERRIDE (no sub-text, no overlap)
   Descriptions removed so items are single-line and aligned.
   ============================================================ */

/* Hide all descriptive sub-text in the mega menus */
.nav-panel-tools-wide .tool-panel-desc,
.nav-panel-tools-wide .tool-panel-badge,
.nav-panel-accelpix .mp-desc { display: none !important; }

/* --- Tools mega panel: wider, clean 2-col wealth grid --- */
.nav-panel-tools-wide { width: min(820px, calc(100vw - 32px)); }
.tools-wide-inner { grid-template-columns: 240px 1fr; }
.tools-col { padding: 18px 20px; }

/* Brokerage tools column — compact single-line rows */
.nav-panel-tools-wide .tool-panel-item { padding: 8px 10px; align-items: center; }
.nav-panel-tools-wide .tool-panel-icon { width: 30px; height: 30px; font-size: 14px; }
.nav-panel-tools-wide .tool-panel-name { margin-bottom: 0; font-size: 12.5px; white-space: nowrap; }

/* Column headers never collide */
.tools-col-head { flex-wrap: nowrap; align-items: baseline; }
.tools-col-label { flex-shrink: 0; }
.tools-col-link { flex-shrink: 0; margin-left: auto; }

/* Wealth-tools links: clean 2-column, single line, ellipsis if needed */
.wt-links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 8px; }
.wt-link { padding: 6px 8px; font-size: 12.5px; }
.wt-link span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* --- Accelpix panel: wider, name-only, no description overlap --- */
.nav-panel-accelpix { width: min(560px, calc(100vw - 32px)); }
.mega-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 16px 14px; }
.mega-product-col { padding: 0 10px; }
.mega-product-item { padding: 7px 8px; align-items: center; margin-bottom: 2px; }
.mega-product-item .mp-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0; }
.mega-product-col + .mega-product-col { border-left: 1px solid var(--border-soft); }

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

/* ---------------------------- BROKER ARTICLE CONTENT ---------------------------- */
.broker-article {
  margin-top: 48px;
}
.broker-article-intro {
  max-width: 760px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.broker-article-intro strong { color: var(--text-primary); }

.tip-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--indigo-500) 8%, var(--surface-1));
  border: 1px solid color-mix(in srgb, var(--indigo-500) 22%, transparent);
}
html[data-theme="dark"] .tip-box {
  background: color-mix(in srgb, var(--indigo-400) 12%, var(--surface-1));
  border-color: color-mix(in srgb, var(--indigo-400) 30%, transparent);
}
.tip-box .tip-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.tip-box .tip-body h5 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tip-box .tip-body p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.worked-example {
  margin-top: 28px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
}
.worked-example h4 {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 10px;
}
.worked-example p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 10px;
}
.worked-example p:last-child { margin-bottom: 0; }
.worked-example .we-figure { color: var(--accent-strong); font-weight: 700; font-family: var(--font-mono); }

/* ---------------------------- COMPARISON TABLE ---------------------------- */
.compare-table-wrap {
  margin-top: 28px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 480px;
}
.compare-table th, .compare-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
.compare-table thead th {
  background: var(--surface-2);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody tr.is-current { background: color-mix(in srgb, var(--amber-500) 9%, transparent); }
.compare-table tbody tr.is-current td:first-child { font-weight: 700; color: var(--accent-strong); }
.compare-table td a { color: var(--brand); font-weight: 600; }
.compare-table td a:hover { color: var(--accent-strong); }
.compare-table td.num { font-family: var(--font-mono); color: var(--text-secondary); }

/* ---------------------------- FAQ ACCORDION ---------------------------- */
.faq-section { margin-top: 36px; }
.faq-list {
  margin-top: 18px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-1);
}
.faq-item { border-bottom: 1px solid var(--border-soft); }
.faq-item:last-child { border-bottom: none; }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
}
.faq-question .faq-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.faq-question .faq-icon svg { width: 11px; height: 11px; stroke: var(--text-secondary); transition: transform var(--t-fast) var(--ease); }
.faq-item.is-open .faq-question .faq-icon { background: var(--accent); border-color: var(--accent); }
.faq-item.is-open .faq-question .faq-icon svg { stroke: #fff; transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-med) var(--ease);
}
.faq-answer-inner {
  padding: 0 20px 18px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 720px;
}
.faq-item.is-open .faq-answer { max-height: 600px; }

/* ---------------------------- SUGGESTED TOOLS ---------------------------- */
.tools-section { margin-top: 36px; }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.tool-card .tool-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--amber-500) 16%, transparent);
  color: var(--accent-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.tool-card .tool-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.tool-card .tool-desc { font-size: 12.5px; color: var(--text-tertiary); line-height: 1.5; flex-grow: 1; }
.tool-card .tool-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  display: flex; align-items: center; gap: 4px;
  margin-top: 2px;
}
.tool-card:hover .tool-link { color: var(--accent-strong); }
.tool-card .tool-link svg { width: 12px; height: 12px; transition: transform var(--t-fast) var(--ease); }
.tool-card:hover .tool-link svg { transform: translateX(2px); }

/* ---------------------------- RESPONSIVE ---------------------------- */
@media (max-width: 1080px) {
  .broker-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 920px) {
  .calc-grid { grid-template-columns: 1fr; }
  .terms-grid { grid-template-columns: 1fr; }
  .broker-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .header-nav { display: none; }
  .menu-trigger { display: flex; }
  .header-cta-primary, .header-cta-secondary { display: none; }
  .hero { padding: 40px 0 32px; }
  .hero-stats { gap: 22px; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; }
  .footer-links { gap: 24px; }
  .tools-grid { grid-template-columns: 1fr; }
  .tip-box { flex-direction: column; }
}
@media (max-width: 540px) {
  .broker-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .broker-card { padding: 14px; }
  .result-hero .value { font-size: 2.1rem; }
  .breakdown-legend { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab { font-size: 13px; padding: 10px 6px; }
}

/* ---------------------------- MOBILE NAV DRAWER ---------------------------- */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10,12,30,0.55);
  display: none;
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
}
.mobile-drawer.is-open { display: block; opacity: 1; }
.mobile-drawer-panel {
  position: absolute;
  top: 0; right: 0;
  width: 78%;
  max-width: 320px;
  height: 100%;
  background: var(--bg-elevated);
  padding: 24px;
  transform: translateX(100%);
  transition: transform var(--t-med) var(--ease);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-drawer.is-open .mobile-drawer-panel { transform: translateX(0); }
.mobile-drawer-panel a {
  padding: 14px 4px;
  font-size: 15.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-primary);
}
.mobile-drawer-close {
  align-self: flex-end;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  cursor: pointer;
}
.mobile-drawer-close svg { width: 20px; height: 20px; stroke: var(--text-primary); }
