:root {
  --paper: #f3f5f2;
  --ink: #19211c;
  --muted: #617068;
  --line: #c8d0c7;
  --folder: #f6d37c;
  --folder-dark: #d3a545;
  --blue: #244f78;
  --green: #2f6b4f;
  --red: #9f3e35;
  --panel: #fffdf6;
  --shadow: 0 20px 50px rgba(32, 35, 28, 0.14);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(25, 33, 28, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(25, 33, 28, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(25, 33, 28, 0.12);
  background: rgba(243, 245, 242, 0.92);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  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: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--ink);
  border-top: 10px solid var(--folder);
  background: #fff8dd;
  color: var(--blue);
  font-weight: 950;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav-links a {
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  padding: 8px 10px;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(36, 79, 120, 0.1);
  color: var(--ink);
  outline: none;
}

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

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  align-items: start;
  gap: 30px;
}

.kicker {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 246, 0.86);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 7px 10px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  line-height: 1.04;
}

h1 {
  max-width: 780px;
  font-size: clamp(42px, 7vw, 80px);
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: 19px;
  margin: 20px 0 0;
}

.hero-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.note {
  border: 1px solid var(--line);
  background: rgba(255, 253, 246, 0.78);
  padding: 14px;
}

.note strong {
  display: block;
  font-size: 20px;
}

.note span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.tool-shell {
  border: 2px solid var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tool-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid var(--ink);
  background: var(--blue);
  color: white;
  padding: 14px 16px;
}

.tool-head h2 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
}

.stamp {
  border: 1px solid rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 4px 8px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 46px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #eef1ec;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 10px;
}

.tab:last-child {
  border-right: 0;
}

.tab[aria-selected="true"] {
  background: var(--panel);
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--folder-dark);
}

.panel {
  display: none;
  padding: 18px;
}

.panel.active {
  display: block;
}

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

.field label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #b8c1b9;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  padding: 10px 11px;
}

.field input:focus,
.field select:focus,
.button:focus-visible {
  outline: 3px solid rgba(211, 165, 69, 0.36);
  outline-offset: 2px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 10px 14px;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

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

.metric {
  min-height: 102px;
  border: 1px solid var(--line);
  background: white;
  padding: 14px;
}

.metric.wide {
  grid-column: 1 / -1;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  margin-top: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 950;
  line-height: 1;
}

.metric-value.compact {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 19px;
  line-height: 1.3;
}

.strong {
  color: var(--green);
}

.moderate {
  color: var(--folder-dark);
}

.weak {
  color: var(--red);
}

.checklist {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  border-left: 4px solid var(--folder-dark);
  background: rgba(246, 211, 124, 0.16);
  padding: 10px 12px;
}

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

.content-inner {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

.content-inner h2,
.simple-page h2,
.article-page h2 {
  font-size: clamp(28px, 4vw, 44px);
  margin-top: 34px;
}

.content-inner p,
.content-inner li,
.simple-page p,
.simple-page li,
.article-page p,
.article-page li {
  color: #44514a;
  font-size: 17px;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.formula,
.disclaimer-box,
.answer-card {
  border: 1px solid var(--line);
  background: rgba(255, 253, 246, 0.86);
  padding: 16px;
}

.formula {
  border-left: 5px solid var(--blue);
  font-family: "SFMono-Regular", Consolas, monospace;
  overflow-x: auto;
}

.disclaimer-box {
  background: rgba(36, 79, 120, 0.08);
  color: #42514b;
  font-size: 14px;
}

.answer-card {
  border-left: 6px solid var(--blue);
  margin: 24px 0;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.resource-card {
  border: 1px solid var(--line);
  background: rgba(255, 253, 246, 0.86);
  padding: 18px;
  text-decoration: none;
}

.resource-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.resource-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}

.simple-page,
.article-page {
  width: min(880px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.simple-page h1,
.article-page h1 {
  font-size: clamp(38px, 6vw, 68px);
}

.site-footer {
  border-top: 2px solid var(--ink);
  background: #e1e7df;
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner a {
  margin-left: 12px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 920px) {
  .hero-grid,
  .split {
    grid-template-columns: 1fr;
  }
}

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

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

  .hero-notes,
  .form-grid,
  .results,
  .tabs,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .tab {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-inner a {
    display: inline-block;
    margin: 0 12px 8px 0;
  }
}
