:root {
  color-scheme: light;
  --navy: #07143d;
  --blue: #2458e8;
  --blue-soft: #eef3ff;
  --ink: #15213b;
  --muted: #647089;
  --line: #dce3ee;
  --surface: #f5f7fb;
  --white: #fff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
}

a { color: inherit; }

.site-header {
  background: var(--navy);
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,.13);
}

.header-inner,
.page-shell,
.site-footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.brand span {
  margin-left: 3px;
  padding: 4px 7px 6px;
  background: #2563eb;
  border-radius: 5px;
}

.header-link {
  color: #dbe5ff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.page-shell { padding: 38px 0 64px; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a { text-decoration: none; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 30px;
  align-items: center;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-mark {
  width: 144px;
  height: 144px;
  justify-self: end;
  display: grid;
  place-items: center;
  border: 1px solid #bfd0ff;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 54px;
  font-weight: 900;
}

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

.calculator-panel,
.info-panel,
.tool-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(12, 30, 73, .06);
}

.calculator-panel { padding: 26px; }

.calculator-panel h2,
.info-panel h2,
.more-tools h2 { margin: 0 0 8px; font-size: 22px; }

.panel-intro { margin: 0 0 22px; color: var(--muted); }

.calculator-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.calc-field { display: grid; gap: 7px; min-width: 0; }
.calc-field > span:first-child,
.calc-checks legend { font-size: 13px; font-weight: 800; color: #344054; }

.calc-input-wrap { position: relative; display: block; }

.calc-input-wrap input,
.calc-field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 52px 12px 14px;
  border: 1px solid #cfd8e6;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
}

.calc-field select { padding-right: 38px; }

.calc-input-wrap small {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 700;
}

.calc-input-wrap input:focus,
.calc-field select:focus {
  outline: 3px solid rgba(37, 99, 235, .14);
  border-color: var(--blue);
}

.calc-checks {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.calc-checks legend { margin-bottom: 10px; }

.calc-checks label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.calc-checks input { width: 20px; height: 20px; accent-color: var(--blue); }

.calc-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 18px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.calc-submit:hover { background: #194bd5; }

.calc-error {
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid #f3b4ae;
  border-radius: 7px;
  background: #fff1f0;
  color: #b42318;
  font-weight: 700;
}

.calc-result {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid #b9ccff;
  border-radius: 8px;
  background: #f0f5ff;
}

.calc-result-label { color: var(--muted); font-size: 13px; font-weight: 800; }
.calc-result-value { color: #173eaa; font-size: 32px; font-weight: 900; }
.calc-result-value small { margin-left: 7px; color: var(--ink); font-size: 15px; }
.calc-result p { margin: 12px 0 0; color: #475467; }
.calc-result ul { margin: 13px 0 0; padding-left: 20px; columns: 2; }

.info-panel { padding: 22px; }
.info-panel p, .info-panel li { color: var(--muted); }
.info-panel ul { margin: 12px 0 0; padding-left: 18px; }

.safety-note {
  margin-top: 18px;
  padding: 14px;
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
  color: #344054;
  font-size: 14px;
}

.sources { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.sources h3 { margin: 0 0 8px; font-size: 15px; }
.sources a { color: #174fcf; }

.more-tools { margin-top: 34px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tool-card { padding: 18px; text-decoration: none; transition: transform .16s ease, border-color .16s ease; }
.tool-card:hover { transform: translateY(-2px); border-color: #9bb6ff; }
.tool-card strong { display: block; margin-bottom: 6px; }
.tool-card span { color: var(--muted); font-size: 14px; }

.directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.directory-card { min-height: 170px; display: flex; flex-direction: column; }
.directory-card .tool-link { margin-top: auto; color: var(--blue); font-weight: 800; }

.site-footer {
  padding: 30px 0;
  border-top: 1px solid var(--line);
  background: #fff;
}

.site-footer-inner { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 13px; }
.site-footer a { color: #2458e8; font-weight: 700; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
  .tool-layout { grid-template-columns: 1fr; }
  .tool-grid, .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .header-inner, .page-shell, .site-footer-inner { width: min(100% - 24px, 1120px); }
  .header-inner { min-height: 64px; }
  .page-shell { padding-top: 26px; }
  h1 { font-size: 32px; }
  .hero-copy { font-size: 16px; }
  .calculator-panel { padding: 18px; }
  .calculator-fields, .calc-checks, .tool-grid, .directory-grid { grid-template-columns: 1fr; }
  .calc-result ul { columns: 1; }
  .site-footer-inner { flex-direction: column; }
}
