:root {
  --ink: #17201c;
  --muted: #5b6761;
  --line: #d8e1dc;
  --panel: #ffffff;
  --soft: #f4f7f5;
  --mint: #0f8f6f;
  --mint-dark: #0a684f;
  --blue: #225c8f;
  --coral: #c8563f;
  --amber: #a86d17;
  --shadow: 0 12px 36px rgba(23, 32, 28, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: #fbfcfb;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: var(--blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--mint-dark);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 251, 0.94);
  backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--mint);
  color: #fff;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

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

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 22px;
  align-items: start;
  padding: 22px 0 28px;
}

.copy-block {
  padding-top: 4px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--mint-dark);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 900px;
  font-size: clamp(2.05rem, 5vw, 4.5rem);
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.25rem);
}

h3 {
  font-size: 1.1rem;
}

.lead {
  max-width: 740px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.calculator {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.calculator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #f7faf8;
}

.calculator-header h2 {
  font-size: 1.12rem;
}

.status {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.field {
  display: grid;
  gap: 6px;
}

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

label,
.label {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 760;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cdd8d2;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 10px 11px;
}

input:focus,
select:focus {
  outline: 3px solid rgba(15, 143, 111, 0.18);
  border-color: var(--mint);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdfc;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--mint);
}

.actions {
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: var(--mint);
  color: #fff;
  font: inherit;
  font-weight: 800;
  padding: 10px 14px;
  cursor: pointer;
}

button:hover {
  background: var(--mint-dark);
}

button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

button.secondary:hover {
  background: var(--soft);
}

.results {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fbfdfc;
}

.result-main {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 8px;
  background: #e8f4ef;
}

.result-main span {
  color: var(--mint-dark);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.result-main strong {
  font-size: clamp(1.7rem, 5vw, 2.45rem);
  line-height: 1;
}

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

.metric {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.metric strong {
  font-size: 1.04rem;
}

.note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.band {
  border-top: 1px solid var(--line);
  padding: 36px 0;
}

.section-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  align-items: start;
}

.content {
  min-width: 0;
  max-width: 780px;
}

.content p {
  color: var(--muted);
}

.content ul,
.content ol {
  padding-left: 22px;
}

.content li + li {
  margin-top: 8px;
}

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

.link-card {
  display: grid;
  gap: 6px;
  min-height: 138px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.link-card:hover {
  border-color: rgba(15, 143, 111, 0.48);
  box-shadow: 0 8px 24px rgba(15, 143, 111, 0.08);
}

.link-card strong {
  font-size: 1rem;
}

.link-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f4f7f5;
  font-size: 0.86rem;
}

tr:last-child td {
  border-bottom: 0;
}

.faq {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

details p {
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #f4f7f5;
  margin-top: 36px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.small {
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-hero,
  .section-grid {
    grid-template-columns: 1fr;
  }

  .tool-hero {
    padding-top: 18px;
  }

  .tool-hero .calculator {
    order: -1;
  }

  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .page,
  .nav,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  h1 {
    font-size: 2.08rem;
  }

  .form-grid,
  .result-grid,
  .link-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
