/* FeeCraft v5 — Premium Modern Fintech UI/UX Design System (Mobile-First, Zero Overflow) */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --surface-hover: #f8fafc;
  --dark-bg: #0b1220;
  --dark-surface: #111c32;
  --dark-border: rgba(148, 163, 184, 0.18);
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --ink: #0f172a;
  --ink-secondary: #475569;
  --ink-muted: #64748b;
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-hover: #047857;
  --primary-soft: #ecfdf5;
  --primary-border: #a7f3d0;
  --fee: #ef4444;
  --fee-dark: #dc2626;
  --fee-soft: #fef2f2;
  --accent-blue: #0284c7;
  --accent-blue-soft: #f0f9ff;
  --accent-violet: #7c3aed;
  --accent-violet-soft: #f5f3ff;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow: 0 10px 30px -6px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 44px -10px rgba(15, 23, 42, 0.14);
  --max-w: 1180px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.62;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
.tabular { font-variant-numeric: tabular-nums; }

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== HEADER & NAVIGATION ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--dark-border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.18rem;
  color: #ffffff;
  letter-spacing: -0.025em;
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; opacity: 0.95; }

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.38);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.nav-links > a,
.nav-drop-btn {
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 8px 12px;
  border-radius: 9px;
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s, color 0.15s;
}

.nav-links > a:hover,
.nav-links > a.active,
.nav-drop-btn:hover,
.nav-drop-btn.active,
.nav-dropdown.open .nav-drop-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
}

.nav-cta {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  padding: 9px 15px !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  margin-left: 6px;
}
.nav-cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.nav-dropdown { position: relative; }

.nav-drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 265px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 7px;
  box-shadow: var(--shadow-lg);
  z-index: 90;
}
.nav-dropdown:hover .nav-drop-menu,
.nav-dropdown.open .nav-drop-menu { display: grid; gap: 2px; }

.nav-drop-menu a {
  display: flex;
  flex-direction: column;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  transition: background 0.12s, color 0.12s;
}
.nav-drop-menu a:hover {
  background: var(--primary-soft);
  color: var(--primary-hover);
  text-decoration: none;
}
.nav-drop-menu a small {
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  color: #ffffff;
}

/* ==================== DARK FINTECH HERO & ABOVE-THE-FOLD STAGE ==================== */
.hero-home {
  background:
    radial-gradient(ellipse 65% 60% at 80% 0%, rgba(16, 185, 129, 0.2), transparent 65%),
    radial-gradient(ellipse 50% 55% at 10% 100%, rgba(56, 189, 248, 0.14), transparent 65%),
    linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
  color: #ffffff;
  padding: 36px 0 96px;
  position: relative;
}

.hero-sub {
  background:
    radial-gradient(ellipse 60% 70% at 88% 0%, rgba(16, 185, 129, 0.18), transparent 65%),
    linear-gradient(180deg, #0b1220 0%, #111c32 100%);
  color: #ffffff;
  padding: 20px 0 74px;
}

.hero-sub .breadcrumbs { color: #94a3b8; padding: 0 0 12px; }
.hero-sub .breadcrumbs a { color: #cbd5e1; }
.hero-sub .breadcrumbs a:hover { color: #34d399; }

.hero-top-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.34);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}

.eyebrow-light {
  background: var(--primary-soft);
  color: var(--primary-hover);
  border-color: var(--primary-border);
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 3.4vw, 2.55rem);
  line-height: 1.14;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero-home h1, .hero-sub h1 { color: #ffffff; }

.lead {
  margin: 0;
  font-size: clamp(0.95rem, 1.4vw, 1.06rem);
  color: var(--ink-secondary);
  max-width: 66ch;
}
.hero-home .lead, .hero-sub .lead { color: #cbd5e1; }
.hero-home .lead strong, .hero-sub .lead strong { color: #ffffff; }

.hero-trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 11px;
  border-radius: 999px;
}

/* Pull Calculator Directly Into Hero (ZERO Scrolling Needed!) */
.lift-stage {
  margin-top: -68px;
  position: relative;
  z-index: 10;
}

/* Quick Platform Switcher Bar (Homepage Above-The-Fold) */
.platform-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.platform-strip-label {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-right: 4px;
}

.plat-pill {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-secondary);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.81rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.14s;
}
.plat-pill:hover { border-color: var(--primary); color: var(--primary-hover); background: var(--primary-soft); }
.plat-pill.active {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

/* Breadcrumbs (for light pages if any) */
.breadcrumbs {
  padding: 14px 0 6px;
  font-size: 0.83rem;
  color: var(--ink-muted);
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}

/* ==================== BALANCED CALCULATOR WORKSPACE ==================== */
.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 20px;
  align-items: stretch;
  margin: 0 0 24px;
}

.tool-grid > *,
.invoice-layout > *,
.compare-grid > *,
.field-row > *,
.field-row-3 > * {
  min-width: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card-subtle {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

/* Mode Tabs (Forward vs Reverse) */
.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-subtle);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 18px;
  gap: 4px;
}

.mode-tab {
  border: none;
  background: transparent;
  padding: 10px 10px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.16s;
  text-align: center;
}

.mode-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Form Elements (16px font prevents iOS Safari input zoom!) */
.field { margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.field-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

label .hint {
  font-weight: 500;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix, .input-suffix {
  position: absolute;
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 1rem;
  pointer-events: none;
}
.input-prefix { left: 14px; }
.input-suffix { right: 14px; }

input[type="number"],
input[type="text"],
input[type="email"],
input[type="date"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1.5px solid var(--border-strong);
  border-radius: 11px;
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

select {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

input.has-prefix { padding-left: 36px; }
input.has-suffix { padding-right: 36px; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 3.5px rgba(16, 185, 129, 0.18);
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.chip {
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink-secondary);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s;
}
.chip:hover, .chip.active {
  border-color: var(--primary-dark);
  background: var(--primary-soft);
  color: var(--primary-hover);
}

/* Results Panel */
.result-hero {
  background:
    radial-gradient(circle at 92% 10%, rgba(16, 185, 129, 0.34), transparent 55%),
    linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
  color: #fff;
  border-radius: 15px;
  padding: 20px 22px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.result-hero .r-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6ee7b7;
  font-weight: 800;
}

.result-hero .r-amount {
  font-size: clamp(1.85rem, 3.3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 5px 0 6px;
  word-break: break-word;
}

.result-hero .r-sub {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.45;
}

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

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

.metric-box .m-label {
  font-size: 0.76rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.metric-box .m-val {
  font-size: clamp(1.04rem, 1.8vw, 1.22rem);
  font-weight: 800;
  margin-top: 3px;
  word-break: break-word;
}

.m-val.fee-color { color: var(--fee-dark); }
.m-val.net-color { color: var(--primary-dark); }

/* Visual Split Bar */
.split-bar-wrap { margin: auto 0 16px; padding-top: 4px; }
.split-bar {
  height: 11px;
  border-radius: 999px;
  background: var(--surface-subtle);
  overflow: hidden;
  display: flex;
}
.split-net { background: linear-gradient(90deg, #10b981, #059669); transition: width 0.25s ease; }
.split-fee { background: linear-gradient(90deg, #f87171, #dc2626); transition: width 0.25s ease; }
.split-legend {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  margin-top: 7px;
  font-weight: 600;
}

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.dot-net { background: var(--primary-dark); }
.dot-fee { background: var(--fee-dark); }

/* Buttons */
.btn-row { display: flex; gap: 9px; flex-wrap: wrap; margin-top: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 17px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.89rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  font-family: inherit;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.24);
}
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); text-decoration: none; color: #fff; }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-subtle); text-decoration: none; }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1e293b; text-decoration: none; }

.btn-sm { min-height: 38px; padding: 8px 13px; font-size: 0.83rem; }

/* ==================== DIRECTORY, FILTER TABS & SEARCH ==================== */
.section { padding: 34px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}
.section-title {
  margin: 0 0 4px;
  font-size: clamp(1.3rem, 2.3vw, 1.62rem);
  letter-spacing: -0.025em;
  font-weight: 800;
}
.section-sub { margin: 0; color: var(--ink-secondary); font-size: 0.94rem; }

.filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cat-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.14s;
}
.cat-tab:hover { border-color: var(--primary-dark); color: var(--primary-hover); }
.cat-tab.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.tool-search-wrap {
  position: relative;
  width: 310px;
  max-width: 100%;
}
.tool-search-wrap input {
  padding-left: 38px;
  min-height: 40px;
  border-radius: 999px;
  font-size: 0.88rem;
  background: var(--surface);
}
.tool-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 16px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-border);
  text-decoration: none;
}

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.tool-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.92rem;
  background: var(--primary-soft);
  color: var(--primary-hover);
  flex-shrink: 0;
}
.tool-icon.blue { background: var(--accent-blue-soft); color: #0369a1; }
.tool-icon.amber { background: var(--warn-soft); color: #b45309; }
.tool-icon.violet { background: var(--accent-violet-soft); color: #6d28d9; }

.tool-badge {
  display: inline-block;
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-hover);
}
.tool-badge.blue { background: var(--accent-blue-soft); color: #0369a1; }
.tool-badge.amber { background: var(--warn-soft); color: #b45309; }
.tool-badge.violet { background: var(--accent-violet-soft); color: #6d28d9; }

.tool-card h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.tool-card p {
  margin: 0 0 14px;
  font-size: 0.87rem;
  color: var(--ink-secondary);
  line-height: 1.5;
  flex: 1;
}

.tool-card .open-link {
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tool-card:hover .open-link { color: var(--primary-hover); }

/* ==================== EDITORIAL, TABLES & FAQs ==================== */
.content-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 26px 0;
  box-shadow: var(--shadow-sm);
}

.content-wrap h2 {
  margin: 28px 0 12px;
  font-size: clamp(1.22rem, 2vw, 1.42rem);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.content-wrap h2:first-child { margin-top: 0; }
.content-wrap h3 { margin: 20px 0 8px; font-size: 1.06rem; }
.content-wrap p { margin: 0 0 14px; color: var(--ink-secondary); }
.content-wrap ul, .content-wrap ol { margin: 0 0 16px; padding-left: 22px; color: var(--ink-secondary); }
.content-wrap li { margin-bottom: 7px; }

.formula-box {
  background: #0f172a;
  color: #e2e8f0;
  border-left: 4px solid var(--primary);
  padding: 15px 18px;
  border-radius: 0 12px 12px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.89rem;
  margin: 14px 0 18px;
  overflow-x: auto;
}

.callout {
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: 12px;
  padding: 15px 18px;
  margin: 16px 0;
  color: #064e3b;
  font-size: 0.92rem;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 14px 0 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 480px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
th { background: var(--surface-subtle); font-weight: 700; color: var(--ink); font-size: 0.83rem; white-space: nowrap; }
td { color: var(--ink-secondary); }
tr:hover td { background: #f8fafc; }

.faq-list { display: grid; gap: 10px; margin-top: 14px; }
details.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  padding: 14px 18px;
}
details.faq-item summary {
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
details.faq-item summary::after { content: '+'; font-size: 1.25rem; color: var(--primary-dark); font-weight: 700; flex-shrink: 0; }
details.faq-item[open] summary::after { content: '−'; }
details.faq-item p { margin: 10px 0 0; font-size: 0.92rem; color: var(--ink-secondary); }

/* Comparator & Rank Bars */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.provider-card {
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: var(--surface);
}
.provider-card.winner { border-color: var(--primary-dark); background: var(--primary-soft); }
.winner-pill {
  display: inline-block;
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.rank-bar-track { height: 8px; background: var(--surface-subtle); border-radius: 999px; overflow: hidden; min-width: 80px; }
.rank-bar-fill { height: 100%; background: var(--primary-dark); border-radius: 999px; }
.rank-bar-fill.loss { background: var(--fee-dark); }
.best-tag {
  display: inline-block;
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.69rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 6px;
}

/* Invoice Studio */
.invoice-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; margin: 0 0 28px; }
.line-item-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 0.7fr) minmax(0, 1fr) auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.btn-icon { background: var(--fee-soft); color: var(--fee-dark); border: 1px solid #fecaca; border-radius: 9px; width: 38px; height: 44px; cursor: pointer; font-weight: 800; }
.invoice-paper { background: #fff; border: 1px solid var(--border-strong); border-radius: 14px; padding: 32px; box-shadow: var(--shadow-lg); color: #0f172a; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 2px solid #0f172a; margin-bottom: 20px; }
.inv-logo { max-height: 52px; max-width: 155px; object-fit: contain; margin-bottom: 8px; display: none; }
.inv-title { font-size: 1.65rem; font-weight: 800; letter-spacing: -0.02em; color: #059669; margin: 0; text-align: right; }
.inv-meta { text-align: right; font-size: 0.85rem; color: #475569; margin-top: 6px; }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 22px; font-size: 0.89rem; }
.inv-parties h4 { margin: 0 0 5px; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.07em; color: #64748b; }
.inv-totals { margin-left: auto; width: 260px; max-width: 100%; margin-top: 16px; font-size: 0.91rem; }
.inv-totals .tot-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #e2e8f0; }
.inv-totals .tot-grand { font-size: 1.15rem; font-weight: 800; color: #059669; border-bottom: none; padding-top: 10px; }

/* Footer */
.site-footer { background: #0b1220; color: #cbd5e1; padding: 48px 0 28px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 30px; }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 0.93rem; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: #94a3b8; font-size: 0.86rem; }
.site-footer a:hover { color: #34d399; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.81rem;
  color: #64748b;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: #0f172a;
  color: #fff;
  padding: 11px 18px;
  border-radius: 11px;
  font-size: 0.87rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.2s;
  z-index: 120;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media print {
  body { background: #fff !important; }
  .site-header, .hero-sub, .breadcrumbs, .invoice-controls, .content-wrap, .site-footer, .no-print { display: none !important; }
  .container { max-width: 100% !important; padding: 0 !important; }
  .lift-stage { margin-top: 0 !important; }
  .invoice-layout { display: block !important; }
  .invoice-paper { border: none !important; box-shadow: none !important; padding: 0 !important; }
}

/* ==================== ROCK-SOLID RESPONSIVE BREAKPOINTS ==================== */
@media (max-width: 980px) {
  .mobile-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #0f172a;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    padding: 14px 20px 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-drop-btn { width: 100%; justify-content: space-between; }
  .nav-drop-menu {
    position: static;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    margin-top: 4px;
  }
  .nav-drop-menu a { color: #e2e8f0; }
  .nav-drop-menu a small { color: #94a3b8; }
  .nav-drop-menu a:hover { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
  .nav-dropdown:hover .nav-drop-menu { display: none; }
  .nav-dropdown.open .nav-drop-menu { display: grid; }
  .nav-cta { margin-left: 0; text-align: center; justify-content: center; margin-top: 6px; }

  .tool-grid, .invoice-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .container { padding: 0 15px; }
  .hero-home { padding: 26px 0 82px; }
  .hero-sub { padding: 16px 0 68px; }
  .lift-stage { margin-top: -58px; }
  .card { padding: 18px 16px; border-radius: 16px; }
  .content-wrap { padding: 20px 16px; border-radius: 16px; }
  .field-row, .field-row-3, .compare-grid, .inv-parties { grid-template-columns: 1fr; }
  .tool-search-wrap { width: 100%; }
  .platform-strip { padding: 9px 10px; gap: 6px; }
  .plat-pill { padding: 6px 10px; font-size: 0.78rem; }
  .invoice-paper { padding: 18px; }
  .inv-title, .inv-meta { text-align: left; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .btn-row .btn { flex: 1 1 auto; }
}

@media (max-width: 440px) {
  .result-metrics { grid-template-columns: 1fr; }
  .mode-tab { font-size: 0.79rem; padding: 9px 6px; }
  .line-item-row { grid-template-columns: 1fr 1fr; }
  .line-item-row input:first-child { grid-column: 1 / -1; }
}
