/* FeeRuler.com Production Stylesheet (Zero JS compiler overhead, <9KB) */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1A202C;
  background: #FFFFFF;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.55;
}
a { color: #1D4ED8; text-decoration: none; }
a:hover { text-decoration: underline; }
.font-editorial { font-family: 'Source Serif 4', Georgia, serif; }
.tnum { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.container { max-width: 1152px; width: 100%; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid #E2E8F0; background: #FFFFFF; position: sticky; top: 0; z-index: 40; }
.header-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #0F2942; text-decoration: none; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: #0F2942; display: block; line-height: 1.05; }
.brand-sub { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #94A3B8; display: block; margin-top: 2px; }
.header-search-wrap { position: relative; flex: 1; max-width: 420px; display: none; }
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #94A3B8; pointer-events: none; }
.header-search {
  width: 100%; padding: 7px 12px 7px 34px; font-size: 14px; background: #F8FAFC;
  border: 1px solid #CBD5E1; border-radius: 6px; color: #0F172A; outline: none;
}
.header-search:focus { background: #FFFFFF; border-color: #0F2942; }
.search-dropdown {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #FFFFFF;
  border: 1px solid #E2E8F0; border-radius: 6px; box-shadow: 0 10px 25px rgba(15,41,66,0.1);
  max-height: 300px; overflow-y: auto; z-index: 50;
}
.search-dropdown a { display: flex; flex-direction: column; padding: 10px 14px; border-bottom: 1px solid #F1F5F9; color: #0F2942; text-decoration: none; }
.search-dropdown a:last-child { border-bottom: none; }
.search-dropdown a:hover { background: #F8FAFC; }
.search-dropdown .sr-title { font-size: 14px; font-weight: 600; }
.search-dropdown .sr-cat { font-size: 12px; color: #64748B; }
.desktop-nav { display: none; align-items: center; gap: 22px; font-size: 14px; font-weight: 500; flex-shrink: 0; }
.desktop-nav a { color: #475569; text-decoration: none; }
.desktop-nav a:hover, .desktop-nav a.active { color: #0F2942; font-weight: 600; }
.mob-btn {
  padding: 7px; border: 1px solid #E2E8F0; border-radius: 6px; background: #FFFFFF;
  color: #334155; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.mob-menu { border-top: 1px solid #E2E8F0; background: #FFFFFF; padding: 10px 20px 14px; }
.mob-menu a { display: block; padding: 10px 8px; font-size: 14px; font-weight: 500; color: #1E293B; border-radius: 5px; }
.mob-menu a:hover { background: #F8FAFC; text-decoration: none; }

/* Hero */
.hero { background: #F6F8FA; border-bottom: 1px solid #E2E8F0; padding: 44px 0 48px; }
.hero-inner { max-width: 680px; }
.hero h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); line-height: 1.2; color: #0F2942; letter-spacing: -0.02em; }
.hero p { margin: 12px 0 0; font-size: 16px; color: #475569; }
.hero-search-wrap { position: relative; max-width: 560px; margin-top: 22px; }
.hero-search-wrap .search-icon { left: 14px; width: 18px; height: 18px; }
.hero-search {
  width: 100%; padding: 12px 14px 12px 42px; font-size: 15px; background: #FFFFFF;
  border: 1px solid #CBD5E1; border-radius: 6px; color: #0F172A; outline: none;
}
.hero-search:focus { border-color: #0F2942; box-shadow: 0 0 0 3px rgba(15,41,66,0.08); }
.popular-links { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #64748B; align-items: center; }
.popular-links a { color: #334155; text-decoration: underline; }
.popular-links a:hover { color: #0F2942; }

/* Directory Layout */
.dir-section { padding: 40px 0; flex: 1; }
.dir-layout { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
.cat-sidebar { display: none; position: sticky; top: 88px; }
.cat-sidebar h2 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #64748B; margin: 0 0 12px 10px; }
.cat-nav-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border: none; border-radius: 6px; background: transparent;
  font-size: 14px; font-weight: 500; color: #334155; cursor: pointer; text-align: left;
  margin-bottom: 3px; font-family: inherit;
}
.cat-nav-btn:hover { background: #F1F5F9; }
.cat-nav-btn.active { background: #0F2942; color: #FFFFFF; font-weight: 600; }
.cat-nav-btn .cnt { font-size: 12px; color: #94A3B8; }
.cat-nav-btn.active .cnt { color: #BFDBFE; }
.dir-head { display: flex; flex-direction: column; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid #E2E8F0; }
.dir-head h2 { margin: 0; font-size: 20px; color: #0F2942; }
.dir-count { margin: 2px 0 0; font-size: 14px; color: #64748B; }
.mob-cat-select {
  width: 100%; padding: 9px 12px; border: 1px solid #CBD5E1; border-radius: 6px;
  font-size: 14px; font-weight: 500; color: #0F2942; background: #FFFFFF; font-family: inherit;
}
.dir-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 22px; }
.dir-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  padding: 20px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 6px;
  color: inherit; text-decoration: none; transition: border-color 150ms, background 150ms;
}
.dir-card:hover { border-color: #0F2942; background: #FAFBFD; text-decoration: none; }
.card-cat { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #1D4ED8; margin-bottom: 6px; }
.dir-card h3 { margin: 0; font-size: 16px; color: #0F2942; line-height: 1.3; }
.dir-card p { margin: 6px 0 0; font-size: 13.5px; color: #475569; line-height: 1.5; }
.card-cta { font-size: 12.5px; font-weight: 600; color: #0F2942; }
.empty-box { padding: 44px 20px; text-align: center; border: 1px dashed #CBD5E1; border-radius: 6px; margin-top: 20px; }
.empty-box button { background: none; border: none; color: #1D4ED8; text-decoration: underline; cursor: pointer; font-size: 14px; font-family: inherit; margin-top: 6px; }
.trust-grid { margin-top: 52px; padding-top: 36px; border-top: 1px solid #E2E8F0; display: grid; grid-template-columns: 1fr; gap: 28px; }
.trust-grid h3 { margin: 0 0 6px; font-size: 14px; color: #0F2942; }
.trust-grid p { margin: 0; font-size: 14px; color: #475569; }

/* Breadcrumb & Tool Page */
.bc-bar { background: #F6F8FA; border-bottom: 1px solid #E2E8F0; }
.bc-inner { padding: 11px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: #475569; }
.bc-links { display: flex; align-items: center; gap: 8px; overflow-x: auto; white-space: nowrap; }
.bc-links a { color: #475569; text-decoration: underline; }
.bc-links a:hover { color: #0F2942; }
.tool-layout { padding: 32px 0; display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; flex: 1; }
.tool-h1 { margin: 0; font-size: clamp(24px, 3.2vw, 32px); color: #0F2942; line-height: 1.2; }
.tool-intro { margin: 10px 0 0; font-size: 15px; color: #475569; }
.calc-box { margin-top: 24px; border: 1px solid #CBD5E1; border-radius: 6px; overflow: hidden; background: #FFFFFF; display: grid; grid-template-columns: 1fr; }
.calc-inputs { padding: 22px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid #E2E8F0; }
.calc-results { padding: 22px; background: #F6F8FA; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: #334155; margin-bottom: 5px; }
.field input[type="number"], .field select {
  width: 100%; padding: 9px 11px; font-size: 14px; border: 1px solid #CBD5E1; border-radius: 5px;
  background: #FFFFFF; color: #0F172A; font-family: inherit; outline: none;
}
.field input[type="number"]:focus, .field select:focus { border-color: #0F2942; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: #334155; cursor: pointer; }
.res-kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #64748B; }
.res-big { font-size: 32px; font-weight: 700; color: #0F2942; margin-top: 4px; line-height: 1.1; }
.res-big.neg { color: #BE123C; }
.res-sub { font-size: 12.5px; color: #475569; margin-top: 5px; }
.res-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.copy-btn {
  font-size: 12px; font-weight: 600; padding: 6px 11px; border: 1px solid #CBD5E1;
  background: #FFFFFF; color: #0F2942; border-radius: 5px; cursor: pointer; font-family: inherit;
}
.copy-btn:hover { border-color: #0F2942; }
.res-lines { margin-top: 18px; padding-top: 14px; border-top: 1px solid #E2E8F0; display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.res-line { display: flex; justify-content: space-between; gap: 12px; }
.res-line .lbl { color: #475569; }
.res-line .neg { color: #BE123C; }
.res-line.total { font-weight: 700; border-top: 1px solid #E2E8F0; padding-top: 9px; color: #0F2942; }
.bundle-note { padding: 12px; background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: 5px; font-size: 12.5px; color: #1E3A8A; }

/* Editorial Below-Fold & FAQ */
.editorial { margin-top: 32px; padding-top: 26px; border-top: 1px solid #E2E8F0; display: flex; flex-direction: column; gap: 28px; }
.editorial h2 { margin: 0 0 10px; font-size: 18px; color: #0F2942; }
.editorial p { margin: 0; font-size: 14.5px; color: #334155; line-height: 1.65; }
.formula-box {
  margin-top: 12px; padding: 13px 15px; background: #F6F8FA; border: 1px solid #E2E8F0;
  border-radius: 5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; color: #0F172A; overflow-x: auto;
}
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid #E2E8F0; border-radius: 6px; background: #FFFFFF; overflow: hidden; }
.faq-toggle {
  width: 100%; text-align: left; padding: 14px 16px; background: #FFFFFF; border: none;
  font-size: 14px; font-weight: 600; color: #0F2942; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; cursor: pointer; font-family: inherit;
}
.faq-toggle:hover { background: #F8FAFC; }
.faq-icon { font-size: 16px; font-weight: 700; color: #64748B; flex-shrink: 0; }
.faq-panel { padding: 0 16px 15px; font-size: 14px; color: #475569; line-height: 1.6; border-top: 1px solid #F1F5F9; padding-top: 10px; }

/* Sidebar */
.tool-sidebar { display: flex; flex-direction: column; gap: 20px; }
.side-box { border: 1px solid #E2E8F0; border-radius: 6px; padding: 18px; background: #F6F8FA; }
.side-box.white { background: #FFFFFF; }
.side-box h2 { margin: 0 0 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #0F2942; }
.rel-list { display: flex; flex-direction: column; gap: 9px; }
.rel-card { display: block; padding: 11px 13px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 5px; color: inherit; text-decoration: none; }
.rel-card:hover { border-color: #0F2942; text-decoration: none; }
.rel-cat { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #1D4ED8; }
.rel-title { font-size: 13.5px; font-weight: 600; color: #0F2942; margin-top: 2px; }
.jump-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.jump-btn { background: none; border: none; padding: 0; font-size: 14px; color: #1D4ED8; cursor: pointer; text-align: left; font-family: inherit; }
.jump-btn:hover { text-decoration: underline; }

/* Data Tables & Content Pages */
.content-wrap { max-width: 760px; padding: 40px 0; flex: 1; }
.content-wrap h1 { margin: 12px 0 16px; font-size: clamp(26px, 3.6vw, 34px); color: #0F2942; }
.content-wrap h2 { margin: 28px 0 10px; font-size: 18px; color: #0F2942; padding-top: 20px; border-top: 1px solid #E2E8F0; }
.content-wrap p { font-size: 15px; color: #334155; line-height: 1.65; }
.table-wrap { overflow-x: auto; border: 1px solid #E2E8F0; border-radius: 6px; margin-top: 24px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; background: #FFFFFF; }
thead { background: #F6F8FA; border-bottom: 1px solid #E2E8F0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #475569; }
th, td { padding: 13px 15px; border-bottom: 1px solid #E2E8F0; vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
.num-right { text-align: right; white-space: nowrap; }

/* Toast & Footer */
.toast {
  position: fixed; bottom: 20px; right: 20px; background: #0F2942; color: #FFFFFF;
  font-size: 12.5px; font-weight: 500; padding: 10px 16px; border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18); opacity: 0; pointer-events: none; transition: opacity 200ms;
}
.toast.show { opacity: 1; }
.site-footer { border-top: 1px solid #E2E8F0; background: #F6F8FA; margin-top: 64px; }
.footer-grid { padding: 40px 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; font-size: 13px; }
.footer-grid h4 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #334155; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.footer-grid a { color: #475569; }
.footer-grid a:hover { color: #0F2942; }
.footer-bottom { border-top: 1px solid #E2E8F0; padding: 16px 20px; text-align: center; font-size: 12px; color: #64748B; }

/* Responsive Breakpoints */
@media (min-width: 640px) {
  .header-search-wrap { display: block; }
  .dir-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .dir-head { flex-direction: row; align-items: center; justify-content: space-between; }
  .mob-cat-select { width: 240px; }
}
@media (min-width: 768px) {
  .desktop-nav { display: flex; }
  .mob-btn, .mob-menu { display: none !important; }
  .calc-box { grid-template-columns: 1fr 1fr; }
  .calc-inputs { border-bottom: none; border-right: 1px solid #E2E8F0; }
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .dir-layout { grid-template-columns: 230px 1fr; }
  .cat-sidebar { display: block; }
  .mob-cat-wrap { display: none; }
  .tool-layout { grid-template-columns: 2fr 1fr; }
  .tool-sidebar { position: sticky; top: 88px; }
}
