:root {
  --ink: #172027;
  --ink-soft: #42515a;
  --muted: #65747c;
  --line: #d8e0e2;
  --panel: #ffffff;
  --paper: #f5f7f8;
  --paper-warm: #f7f4ee;
  --green: #2f7d58;
  --green-dark: #245f45;
  --amber: #c9822b;
  --amber-soft: #f0d6ad;
  --steel: #586870;
  --danger: #9a3f35;
  --radius: 8px;
  --shadow: 0 18px 44px rgba(23, 32, 39, 0.12);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
}

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

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
}

.skip-link:focus {
  top: 16px;
}

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

.nav-shell {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, var(--green) 0 45%, transparent 45% 55%, var(--amber) 55% 100%),
    var(--ink);
  border: 1px solid rgba(23, 32, 39, 0.2);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 6px;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--ink);
  background: #e9eef0;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 610px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--ink);
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 32, 0.9) 0%, rgba(17, 24, 32, 0.74) 42%, rgba(17, 24, 32, 0.16) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 94px 24px 56px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber-soft);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.14;
}

h1 {
  max-width: 760px;
  font-size: 52px;
}

h2 {
  font-size: 34px;
}

h3 {
  font-size: 22px;
}

h4 {
  font-size: 17px;
}

.hero-lede {
  max-width: 660px;
  margin: 20px 0 0;
  color: #dbe4e6;
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  text-decoration: none;
}

.button.primary {
  background: var(--green);
  color: #fff;
}

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

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

.button.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.section {
  padding: 76px 24px;
}

.section.tight {
  padding-top: 44px;
  padding-bottom: 44px;
}

.section.alt {
  background: #fff;
}

.section.warm {
  background: var(--paper-warm);
}

.shell {
  max-width: var(--max);
  margin: 0 auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.42fr);
  gap: 34px;
  align-items: end;
  margin-bottom: 30px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

.card,
.tool-panel,
.article-card,
.toc,
.callout {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card,
.article-card {
  padding: 22px;
}

.card img,
.article-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
}

.card p,
.article-card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.metric-strip {
  margin-top: -1px;
  background: var(--ink);
  color: #fff;
}

.metric-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.metric {
  background: var(--ink);
  padding: 20px;
}

.metric strong {
  display: block;
  font-size: 26px;
}

.metric span {
  display: block;
  color: #bfcace;
  font-size: 13px;
  font-weight: 700;
}

.tool-panel {
  padding: 24px;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #bfcbd0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.result-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 6px;
  background: #e9f2ed;
  border: 1px solid #b9d6c5;
  color: #1d4f39;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

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

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

th {
  background: #eef3f1;
  color: var(--ink);
  font-size: 13px;
  text-transform: uppercase;
}

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

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 38px;
  align-items: start;
}

.article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 42px;
}

.article > * + * {
  margin-top: 18px;
}

.article h2 {
  margin-top: 46px;
  padding-top: 10px;
}

.article h3 {
  margin-top: 30px;
}

.article p,
.article li {
  color: #314049;
}

.article figure {
  margin: 28px 0;
}

.article figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.toc {
  position: sticky;
  top: 94px;
  padding: 18px;
}

.toc strong {
  display: block;
  margin-bottom: 10px;
}

.toc a {
  display: block;
  padding: 8px 0;
  color: var(--ink-soft);
  font-size: 14px;
  border-top: 1px solid #edf1f2;
}

.page-title {
  padding: 72px 24px 44px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.page-title .shell {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(280px, 0.42fr);
  gap: 40px;
  align-items: end;
}

.page-title p {
  color: var(--muted);
  margin: 16px 0 0;
  font-size: 18px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #eef3f1;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.callout {
  padding: 24px;
  background: #f4faf6;
  border-color: #bbd8c5;
}

.callout.warning {
  background: #fff7ea;
  border-color: #efd0a2;
}

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

.check-list li {
  margin: 8px 0;
}

.footer {
  background: var(--ink);
  color: #d7e0e3;
  padding: 44px 24px;
}

.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.footer a {
  display: block;
  color: #d7e0e3;
  margin-top: 8px;
}

.footer p {
  color: #aebdc2;
  margin: 12px 0 0;
}

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

.mini-kpi div {
  background: #f7f9fa;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
}

.mini-kpi strong {
  display: block;
  font-size: 22px;
}

.source-list {
  padding-left: 20px;
  color: var(--muted);
}

.source-list li {
  margin: 8px 0;
}

.contact-band {
  background: var(--ink);
  color: #fff;
}

.contact-band .shell {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.42fr);
  gap: 28px;
  align-items: center;
}

.contact-band p {
  color: #c8d3d7;
}

.quote-form {
  display: grid;
  gap: 12px;
}

.quote-form input,
.quote-form textarea {
  border-color: rgba(255, 255, 255, 0.22);
}

@media (max-width: 980px) {
  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 29px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .section-head,
  .page-title .shell,
  .article-layout,
  .contact-band .shell {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .grid.three,
  .grid.four,
  .footer-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .nav-shell,
  .hero-content,
  .section,
  .page-title,
  .footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    min-height: 560px;
  }

  .hero::after {
    background: rgba(17, 24, 32, 0.78);
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 26px;
  }

  .hero-lede,
  .page-title p {
    font-size: 17px;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .footer-grid,
  .metric-grid,
  .form-grid,
  .mini-kpi {
    grid-template-columns: 1fr;
  }

  .article {
    padding: 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }
}
