:root {
  --black:    #0b0c0c;
  --white:    #ffffff;
  --blue:     #1d70b8;
  --blue2:    #003078;
  --blue-lt:  #e8f0fb;
  --yellow:   #ffdd00;
  --grey-bg:  #f3f2f1;
  --grey-mid: #b1b4b6;
  --grey-dk:  #505a5f;
  --grey-bdr: #6f777b;
  --green:    #00703c;
  --green-lt: #e3f3ea;
  --red:      #d4351c;
  --red-lt:   #fde8e4;
  --border:   #b1b4b6;
  --radius:   4px;
  --shadow:   0 2px 12px rgba(0,0,0,0.12);
  --font-head: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.15s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--grey-bg);
  color: var(--black);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

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

.site-header {
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
  overflow: visible;
  flex-wrap: nowrap;
}
.logo {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo strong { color: var(--yellow); }
.logo-icon { color: var(--yellow); font-size: 0.75rem; }

.gov-strip { background: var(--yellow); padding: 5px 0; }
.gov-strip .container { display: flex; align-items: center; gap: 12px; }
.gov-strip span { font-size: 0.75rem; font-weight: 700; color: var(--black); letter-spacing: 0.04em; }
.gov-strip-badge {
  background: var(--black);
  color: var(--yellow);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.main-nav { display: flex; gap: 2px; flex: 1; overflow: visible; }
.nav-group { position: relative; }
.nav-toggle {
  background: none;
  border: none;
  color: var(--grey-mid);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-toggle:hover, .nav-toggle.active { background: rgba(255,255,255,0.1); color: var(--white); }
.nav-toggle span { font-size: 0.6rem; margin-left: 4px; }
.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--blue);
  border-radius: 0 0 var(--radius) var(--radius);
  min-width: 230px;
  padding: 8px 0;
  box-shadow: var(--shadow);
  list-style: none;
  z-index: 200;
}
.nav-dropdown.open { display: block; }
.nav-dropdown li a {
  display: block;
  padding: 9px 16px;
  color: var(--blue);
  text-decoration: none;
  font-size: 0.875rem;
  border-bottom: 1px solid #f3f2f1;
  transition: var(--transition);
}
.nav-dropdown li a:hover { background: var(--blue-lt); padding-left: 22px; color: var(--blue2); }
.nav-dropdown li:last-child a { border-bottom: none; }
.nav-dropdown-heading { border-bottom: 2px solid var(--border) !important; margin-bottom: 4px; }
.nav-cat-link {
  display: block;
  padding: 10px 16px !important;
  font-weight: 700 !important;
  color: var(--blue2) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: none !important;
}
.nav-cat-link:hover { background: var(--blue-lt) !important; padding-left: 16px !important; }

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--grey-bdr);
  color: var(--white);
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.header-search { position: relative; margin-left: 8px; flex-shrink: 0; }
.search-toggle {
  background: none;
  border: 1px solid var(--grey-bdr);
  color: var(--grey-mid);
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.search-toggle:hover { border-color: var(--white); color: var(--white); }
.search-box {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 240px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--blue);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  z-index: 300;
}
.search-box.open { display: block; }
.search-box input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  font-size: 0.85rem;
  padding: 10px 12px;
  color: var(--black);
  background: var(--white);
  font-family: var(--font-body);
}
.search-box input:focus { outline: none; border-bottom-color: var(--blue); box-shadow: none; }
.search-results { max-height: 300px; overflow-y: auto; }
.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  text-decoration: none;
  border-bottom: 1px solid #f3f2f1;
  transition: var(--transition);
}
.search-result-item:hover { background: var(--blue-lt); }
.search-result-item:last-child { border-bottom: none; }
.search-result-name { font-size: 0.875rem; color: var(--blue); font-weight: 500; }
.search-result-cat { font-size: 0.72rem; color: var(--grey-bdr); }
.search-no-results { padding: 12px 16px; font-size: 0.875rem; color: var(--grey-bdr); }

.ad-zone {
  background: var(--grey-bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  text-align: center;
}
.ad-zone--bottom { border-top: 1px solid var(--border); border-bottom: none; margin-top: 48px; }
.ad-zone .container { display: flex; justify-content: center; align-items: center; }
.ad-placeholder {
  background: repeating-linear-gradient(45deg, #e8e8e8, #e8e8e8 10px, #f3f2f1 10px, #f3f2f1 20px);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}
.ad-placeholder span { font-size: 0.7rem; color: var(--grey-bdr); letter-spacing: 0.08em; text-transform: uppercase; }
.ad-sidebar-slot { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 20px; }
.hide-mobile { display: flex; }
.show-mobile { display: none; }
.ad-zone--infeed {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 32px 0;
  background: var(--grey-bg);
}

.hero { padding: 60px 0 48px; background: var(--grey-bg); border-bottom: 4px solid var(--blue); }
.hero-tag {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 16px;
}
.hero h1 span { color: var(--blue); }
.hero p { font-size: 1.1rem; color: var(--grey-dk); max-width: 560px; margin-bottom: 32px; line-height: 1.6; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stat strong { display: block; font-family: var(--font-head); font-size: 1.75rem; color: var(--blue); }
.hero-stat span { font-size: 0.8rem; color: var(--grey-dk); }

.rate-notice {
  background: var(--blue-lt);
  border-left: 4px solid var(--blue);
  padding: 12px 20px;
  margin-bottom: 32px;
  border-radius: 0 var(--radius) var(--radius) 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.rate-notice strong { font-size: 0.875rem; color: var(--blue2); font-weight: 700; }
.rate-notice span { font-size: 0.8rem; color: var(--grey-dk); }
.rate-pill {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue2);
  white-space: nowrap;
}

.section-meta {
  color: var(--grey-bdr);
  font-size: 0.875rem;
  margin-bottom: 24px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 16px;
}
.section-meta::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--black);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tool-card:hover { border-top-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-1px); }
.tool-icon {
  width: 40px;
  height: 40px;
  background: var(--blue-lt);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}
.tool-card h3 { font-family: var(--font-head); font-size: 0.95rem; font-weight: 700; color: var(--blue); }
.tool-card p { font-size: 0.8rem; color: var(--grey-dk); line-height: 1.5; }
.tool-badge { font-size: 0.72rem; font-weight: 700; color: var(--green); margin-top: auto; }

.tool-page { padding: 40px 0 80px; }
.tool-header { margin-bottom: 36px; }
.breadcrumb { font-size: 0.8rem; color: var(--grey-bdr); margin-bottom: 16px; }
.breadcrumb a { color: var(--blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; }
.tool-header h1 {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--black);
}
.tool-header p { color: var(--grey-dk); font-size: 1rem; max-width: 600px; border-left: 4px solid var(--yellow); padding-left: 12px; }
.tool-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }

.tool-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--blue);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 32px;
}
.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 700; color: var(--black); margin-bottom: 8px; }
.form-group label em { font-weight: 400; color: var(--grey-dk); font-style: normal; }
.input-wrap { position: relative; }
.input-prefix, .input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--grey-dk);
  font-size: 0.9rem;
  pointer-events: none;
}
.input-prefix { left: 12px; }
.input-suffix { right: 14px; }
.input-wrap input { padding-left: 42px; }
.input-wrap.suffix input { padding-right: 32px; }

input[type="text"], input[type="number"], select {
  width: 100%;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 14px 10px 14px;
  transition: var(--transition);
  appearance: none;
}
.input-wrap input[type="text"],
.input-wrap input[type="number"] { padding-left: 32px; }
input:focus, select:focus { outline: 3px solid var(--yellow); outline-offset: 0; border-color: var(--black); box-shadow: none; }

.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 2px solid var(--grey-mid);
  border-radius: 2px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  color: var(--black);
}
.radio-pill input { display: none; }
.radio-pill:has(input:checked), .radio-pill.selected { border-color: var(--blue); background: var(--blue-lt); color: var(--blue2); }
.radio-pill:hover { border-color: var(--blue); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary { background: var(--blue); color: var(--white); border-color: var(--blue2); }
.btn-primary:hover { background: var(--blue2); border-color: var(--blue2); }
.btn-ghost { background: var(--grey-bg); color: var(--black); border-color: var(--grey-mid); }
.btn-ghost:hover { border-color: var(--black); }
.btn-block { width: 100%; justify-content: center; }

.results-panel {
  background: var(--grey-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 28px;
  margin-top: 24px;
  display: none;
}
.results-panel.visible { display: block; }
.results-panel h3 { font-family: var(--font-head); font-size: 0.72rem; color: var(--grey-bdr); margin-bottom: 20px; text-transform: uppercase; letter-spacing: 0.1em; }
.result-rows { display: flex; flex-direction: column; }
.result-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.result-row:last-child { border-bottom: none; }
.result-row label { color: var(--grey-dk); font-weight: 500; }
.result-row .value { font-family: var(--font-head); font-size: 1.1rem; color: var(--black); }
.result-row.highlight { background: var(--blue-lt); margin: 0 -28px; padding: 14px 28px; border-bottom: none; border-top: 1px solid var(--border); margin-top: 4px; }
.result-row.highlight .value { color: var(--blue2); font-size: 1.5rem; }
.result-row.positive .value { color: var(--green); }
.result-row.negative .value { color: var(--red); }

.tool-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.sidebar-card h4 {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--yellow);
  display: inline-block;
}
.sidebar-links { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sidebar-links a { color: var(--blue); text-decoration: none; font-size: 0.875rem; display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f3f2f1; transition: var(--transition); }
.sidebar-links a:hover { color: var(--blue2); padding-left: 6px; text-decoration: underline; }
.sidebar-links a:last-child { border-bottom: none; }
.sidebar-links a::before { content: '›'; color: var(--blue); font-size: 1rem; }

.cta-card { background: var(--blue2); border-radius: var(--radius); padding: 20px; color: var(--white); }
.cta-card h4 { font-family: var(--font-head); font-size: 1rem; margin-bottom: 8px; color: var(--yellow); display: block; }
.cta-card p { font-size: 0.8125rem; color: #c8d8e8; margin-bottom: 16px; line-height: 1.5; }

.explainer { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; margin-top: 32px; }
.explainer h2 { font-family: var(--font-head); font-size: 1.3rem; margin-bottom: 16px; color: var(--black); padding-bottom: 12px; border-bottom: 2px solid var(--grey-bg); }
.explainer h3 { font-family: var(--font-head); font-size: 1rem; margin: 24px 0 10px; color: var(--blue2); }
.explainer p { color: var(--grey-dk); font-size: 0.9rem; line-height: 1.7; margin-bottom: 12px; }
.explainer ul { color: var(--grey-dk); font-size: 0.9rem; line-height: 1.7; padding-left: 20px; }
.explainer ul li { margin-bottom: 6px; }
.explainer a { color: var(--blue); }
.explainer a:hover { color: var(--blue2); }

.tool-disclaimer {
  background: var(--blue-lt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 20px;
  margin-top: 28px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.disclaimer-icon { color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.tool-disclaimer p { font-size: 0.8rem; color: var(--grey-dk); line-height: 1.6; }
.tool-disclaimer p strong { color: var(--black); }
.tool-disclaimer a { color: var(--blue); }
.tool-disclaimer a:hover { text-decoration: underline; }

.site-footer { background: var(--black); padding: 52px 0 28px; color: var(--grey-mid); }
.site-footer a { color: var(--grey-mid); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }

.footer-notice {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 4px solid var(--yellow);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 20px;
  margin-bottom: 40px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.footer-notice-icon { color: var(--yellow); flex-shrink: 0; margin-top: 2px; }
.footer-notice-icon svg { display: block; }
.footer-notice p { font-size: 0.8rem; color: var(--grey-mid); line-height: 1.6; }
.footer-notice p strong { color: var(--white); }
.footer-notice a { color: var(--yellow) !important; }
.footer-notice a:hover { text-decoration: underline; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 40px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { font-size: 0.78rem; color: var(--grey-bdr); line-height: 1.6; margin-bottom: 8px; }
.footer-disclaimer { font-size: 0.72rem !important; font-style: italic; }
.footer-links { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.footer-links a { color: var(--grey-bdr) !important; font-size: 0.78rem; }
.footer-links a:hover { color: var(--yellow) !important; }
.footer-col h4 {
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--yellow);
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-col ul li a { color: var(--grey-mid) !important; font-size: 0.75rem; }
.footer-col ul li a:hover { color: var(--white) !important; }
.footer-bottom {
  border-top: 1px solid #1a1a1a;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.75rem; color: var(--grey-bdr); }
.footer-jfweb a { color: var(--yellow) !important; }
.footer-jfweb a:hover { text-decoration: underline; }

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .tool-layout { grid-template-columns: 1fr 280px; }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: var(--black);
    border-bottom: 3px solid var(--yellow);
    padding: 16px;
    gap: 6px;
    z-index: 99;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .nav-dropdown { position: static; box-shadow: none; border: none; border-top: none; background: rgba(255,255,255,0.05); margin-top: 4px; border-radius: var(--radius); }
  .nav-dropdown li a { color: var(--grey-mid); border-bottom-color: rgba(255,255,255,0.05); }
  .hamburger { display: block; }
  .hide-mobile { display: none !important; }
  .show-mobile { display: flex !important; }
  .tool-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { gap: 24px; }
  .gov-strip span { font-size: 0.68rem; }
  .search-toggle { display: none; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .rate-notice { flex-direction: column; align-items: flex-start; gap: 8px; }
}
.footer-top-row{margin-bottom:32px;padding-bottom:32px;border-bottom:1px solid #1a1a1a}
.footer-cols-row{display:grid;grid-template-columns:repeat(6,1fr);gap:16px;margin-bottom:40px}
.footer-col h4{font-family:var(--font-head);font-size:0.62rem;font-weight:700;text-transform:uppercase;letter-spacing:0.08em;color:var(--yellow);margin-bottom:10px}
.footer-col ul li a{color:var(--grey-mid)!important;font-size:0.72rem}
