:root {
  --bg: #f7faf9;
  --surface: #ffffff;
  --surface-soft: #eef8f4;
  --text: #15201b;
  --muted: #5d6b66;
  --line: #dfe9e5;
  --accent: #0f8f68;
  --accent-dark: #087453;
  --danger: #b42318;
  --radius: 8px;
  --shadow: 0 8px 24px rgba(21, 32, 27, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  color: var(--text);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.nav-list,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a,
.footer-links a {
  color: var(--muted);
  font-weight: 650;
}

.nav-list a[aria-current="page"] {
  color: var(--accent-dark);
}

main {
  padding: 34px 0 56px;
}

.hero,
.section {
  margin-bottom: 34px;
}

.hero {
  padding: 34px 0 8px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
}

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

h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 6vw, 54px);
}

h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

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

p {
  margin: 0 0 14px;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 19px;
}

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

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

.card,
.calculator-panel,
.notice,
.result-box,
.faq-item,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card,
.calculator-panel,
.notice,
.faq-item {
  padding: 20px;
}

.card {
  box-shadow: var(--shadow);
}

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

.card-link,
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  padding: 10px 14px;
  text-decoration: none;
  cursor: pointer;
}

.card-link:hover,
.button:hover,
.card-link:focus,
.button:focus {
  background: var(--accent-dark);
  color: #ffffff;
  text-decoration: none;
}

.button.secondary {
  background: #ffffff;
  color: var(--accent-dark);
}

.button.secondary:hover,
.button.secondary:focus {
  background: var(--surface-soft);
  color: var(--accent-dark);
}

.calculator-form {
  display: grid;
  gap: 16px;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd9d4;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
}

input:focus,
select:focus,
textarea:focus,
button:focus,
a:focus {
  outline: 3px solid rgba(15, 143, 104, 0.22);
  outline-offset: 2px;
}

.result-box {
  min-height: 64px;
  margin-top: 16px;
  padding: 18px;
  background: #f3fbf8;
  font-weight: 750;
}

.result-box.error {
  border-color: #f3b8b1;
  background: #fff4f2;
  color: var(--danger);
}

.notice {
  background: var(--surface-soft);
  color: #27473c;
}

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

.footer-inner {
  display: grid;
  gap: 12px;
}

.muted,
.small {
  color: var(--muted);
}

.small {
  font-size: 14px;
}

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

.content-list li {
  margin-bottom: 8px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item h3 {
  font-size: 17px;
}

.table-wrap {
  overflow-x: auto;
}

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

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

th {
  background: var(--surface-soft);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.updated {
  margin-top: 26px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 760px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

  h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 17px;
  }

  .card,
  .calculator-panel,
  .notice,
  .faq-item {
    padding: 16px;
  }
}
