:root {
  --ink: #172033;
  --muted: #5d6b7e;
  --line: #dce4ed;
  --paper: #ffffff;
  --wash: #f4f7fa;
  --teal: #087f72;
  --teal-dark: #06665d;
  --blue: #2365c6;
  --gold: #bd7a00;
  --radius: 8px;
  --shadow: 0 8px 24px rgba(23, 32, 51, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #174b96;
}

button,
input,
select {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

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

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.brand img {
  width: auto;
  height: 38px;
}

.site-nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.site-nav a {
  padding: 8px 10px;
  color: #39475a;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--teal-dark);
  background: #eaf7f5;
}

.hero {
  padding: 64px 0 52px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.65fr);
  gap: 52px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.2;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: 44px;
}

h2 {
  margin-bottom: 14px;
  font-size: 28px;
}

h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.lede {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.review-box {
  border-left: 4px solid var(--teal);
  padding: 8px 0 8px 18px;
}

.review-box strong,
.review-box span {
  display: block;
}

.review-box span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.page-shell {
  padding-top: 44px;
  padding-bottom: 72px;
}

.section {
  margin-bottom: 52px;
}

.section-intro {
  max-width: 780px;
  margin: -4px 0 24px;
  color: var(--muted);
}

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

.tool-card {
  min-height: 218px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.tool-card .tag {
  width: fit-content;
  margin-bottom: 28px;
  padding: 4px 8px;
  border: 1px solid #b9d9d5;
  color: var(--teal-dark);
  background: #f0faf8;
  font-size: 12px;
  font-weight: 750;
}

.tool-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.tool-card a {
  margin-top: auto;
  font-weight: 750;
}

.evidence-grid,
.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.evidence-item {
  padding: 22px 0;
  border-top: 2px solid var(--line);
}

.evidence-item p {
  margin: 0;
  color: var(--muted);
}

.content-page {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 76px;
}

.content-page > p,
.content-page li {
  color: #445267;
}

.content-page h2 {
  margin-top: 42px;
  font-size: 24px;
}

.content-page h3 {
  margin-top: 28px;
}

.notice {
  margin: 26px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--gold);
  background: #fff8e8;
  color: #554314;
}

.source-list {
  padding-left: 20px;
}

.source-list li {
  margin-bottom: 10px;
}

.breadcrumbs {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a {
  color: var(--teal-dark);
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.calculator-panel {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #3e4c60;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #bdc9d7;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: 3px solid rgba(35, 101, 198, 0.16);
  border-color: var(--blue);
}

.primary-button {
  min-height: 44px;
  margin-top: 22px;
  padding: 10px 18px;
  border: 0;
  border-radius: 5px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.result-panel {
  min-width: 0;
  min-height: 100%;
  padding: 28px;
  border: 1px solid #b7d8d4;
  border-radius: var(--radius);
  background: #eef9f7;
}

.result-panel[hidden] {
  display: block;
}

.result-panel .result-empty {
  color: var(--muted);
}

.result-panel.ready .result-empty {
  display: none;
}

.result-list {
  margin: 0;
}

.result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid #cde2df;
}

.result-row:last-child {
  border-bottom: 0;
}

.result-row dt {
  color: #526071;
}

.result-row dd {
  margin: 0;
  color: var(--teal-dark);
  font-weight: 850;
}

.tool-content {
  margin-top: 44px;
}

.tool-content section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.tool-content p,
.tool-content li {
  color: #48566a;
}

.tool-content table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.tool-content th,
.tool-content td {
  padding: 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.time-table {
  width: 100%;
  border-collapse: collapse;
}

.time-table th,
.time-table td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
}

.time-table input {
  width: 100%;
  min-width: 90px;
  padding: 8px;
  border: 1px solid #bdc9d7;
}

.site-footer {
  padding: 38px 0;
  background: var(--ink);
  color: #afbac8;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 32px;
  align-items: center;
}

.footer-brand img {
  height: 30px;
  filter: brightness(0) invert(1);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

.footer-links a {
  color: #d3dae3;
  font-size: 13px;
}

.footer-copy {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
}

@media (max-width: 840px) {
  .hero-inner,
  .calculator-layout,
  .tool-grid,
  .evidence-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .tool-grid {
    gap: 12px;
  }

  .tool-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 0;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .site-nav {
    margin-left: 0;
    justify-content: flex-start;
  }

  .hero {
    padding: 44px 0 36px;
  }

  h1 {
    font-size: 34px;
  }

  .field-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .result-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .primary-button,
  .breadcrumbs {
    display: none;
  }

  body {
    background: #fff;
  }

  .calculator-panel,
  .result-panel {
    box-shadow: none;
  }
}
