:root {
  --bg: #f5f7f2;
  --surface: #ffffff;
  --surface-soft: #eef4ef;
  --surface-strong: #19342c;
  --text: #151917;
  --muted: #65716b;
  --line: #dbe3dc;
  --green: #116149;
  --green-strong: #0b4735;
  --green-soft: #e2f0e8;
  --gold: #b98120;
  --red: #bf3e32;
  --shadow: 0 18px 42px rgba(28, 38, 32, 0.09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 68px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 242, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  white-space: nowrap;
}

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

.top-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.top-nav a {
  padding: 10px 14px;
  border-radius: 6px;
  color: #344039;
  font-weight: 700;
}

.top-nav a:hover,
.top-nav a:focus {
  background: var(--green-soft);
  color: var(--green-strong);
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-button svg,
.side-link svg {
  width: 18px;
  height: 18px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  min-height: 360px;
  padding: 56px 48px 40px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(17, 97, 73, 0.92), rgba(25, 52, 44, 0.94)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='600' viewBox='0 0 1200 600'%3E%3Crect width='1200' height='600' fill='%2319342c'/%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.16'%3E%3Cpath d='M80 450c120-110 230-160 330-150s170 85 270 75 180-120 285-130 175 45 235 88' stroke-width='8'/%3E%3Cpath d='M0 150h1200M0 280h1200M0 410h1200M220 0v600M460 0v600M700 0v600M940 0v600' stroke-width='2'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.14'%3E%3Ccircle cx='230' cy='328' r='10'/%3E%3Ccircle cx='545' cy='380' r='10'/%3E%3Ccircle cx='865' cy='258' r='10'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  color: #fff;
}

.hero-content {
  align-self: end;
  max-width: 820px;
}

.eyebrow,
.kicker {
  margin: 0 0 10px;
  color: #cfe9d8;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1,
h2,
h3,
p,
strong,
span {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: 50px;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.65;
}

.hero-summary {
  align-self: end;
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.summary-row {
  display: grid;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-row span {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.summary-row strong {
  font-size: 30px;
}

.mini-bars {
  display: grid;
  gap: 8px;
}

.mini-bars span {
  display: block;
  width: var(--w);
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.sidebar {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: #fbfcf8;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: #3f4944;
  font-weight: 700;
}

.side-link:hover,
.side-link.active {
  background: var(--green-soft);
  color: var(--green-strong);
}

.content {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 28px;
}

.tool-panel,
.article-panel,
.metric-card,
.ad-slot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-panel,
.article-panel {
  padding: 24px;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-heading h2,
.article-panel h2 {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.25;
}

.section-heading p,
.article-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-intro {
  max-width: 760px;
  margin-bottom: 18px !important;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-strong);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

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

label {
  display: grid;
  gap: 8px;
  color: #26312c;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d4ded7;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
}

input:focus,
select:focus,
button:focus {
  outline: 3px solid rgba(17, 97, 73, 0.16);
  outline-offset: 2px;
}

.input-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #d4ded7;
  border-radius: 8px;
  background: #fff;
}

.input-unit input {
  border: 0;
}

.input-unit b {
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 140px;
  padding: 18px;
  box-shadow: none;
}

.metric-card span {
  color: var(--muted);
  font-weight: 800;
}

.metric-card strong {
  font-size: 26px;
  line-height: 1.1;
}

.metric-card small {
  color: var(--muted);
  line-height: 1.45;
}

.primary-metric {
  background: var(--surface-strong);
  color: #fff;
}

.primary-metric span,
.primary-metric small {
  color: rgba(255, 255, 255, 0.72);
}

.cost-table {
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cost-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 130px;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 16px;
  border-top: 1px solid #edf1ed;
}

.cost-row:first-child {
  border-top: 0;
}

.cost-row.head {
  min-height: 42px;
  background: #f7faf7;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.cost-row b,
.cost-row em {
  text-align: right;
}

.cost-row em {
  color: var(--muted);
  font-style: normal;
}

.target-layout {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.target-card {
  background: #f9fbf8;
}

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

.article-grid article,
.faq-list article {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.article-grid h3,
.faq-list h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.keyword-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.keyword-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf8;
  color: #37443d;
  font-weight: 800;
}

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

.tool-link-grid a,
.related-grid a {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf8;
}

.tool-link-grid a:hover,
.tool-link-grid a:focus,
.related-grid a:hover,
.related-grid a:focus {
  border-color: rgba(17, 97, 73, 0.45);
  background: var(--green-soft);
}

.tool-link-grid strong,
.related-grid strong {
  color: var(--green-strong);
  font-size: 17px;
}

.tool-link-grid span,
.related-grid span {
  color: var(--muted);
  line-height: 1.55;
}

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

.ad-slot {
  display: grid;
  min-height: 96px;
  place-items: center;
  border-style: dashed;
  background: #fbfcfb;
  color: #8a948f;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: none;
}

.top-ad {
  min-height: 90px;
}

.mid-ad {
  min-height: 120px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

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

.site-footer a {
  color: var(--green);
  font-weight: 900;
  white-space: nowrap;
}

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

.text-page {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.text-page h1 {
  margin: 0 0 12px;
  font-size: 34px;
}

.text-page h2 {
  margin: 28px 0 8px;
  font-size: 21px;
}

.text-page p,
.text-page li {
  color: var(--muted);
  line-height: 1.75;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.breadcrumb a {
  color: var(--green);
}

.text-page .lead {
  color: #3b4640;
  font-size: 18px;
  line-height: 1.7;
}

.formula-box {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}

.formula-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--green-strong);
}

.comparison-table {
  overflow: hidden;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.comparison-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 14px;
  min-height: 48px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.comparison-row:first-child {
  border-top: 0;
}

.comparison-row.head {
  background: #f7faf7;
  color: var(--muted);
  font-weight: 900;
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .side-link {
    justify-content: center;
  }

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

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 18px;
  }

  .top-nav {
    display: none;
  }

  .hero-band {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 42px 18px 24px;
  }

  h1 {
    font-size: 38px;
  }

  .content {
    padding: 18px 14px;
  }

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

  .article-grid,
  .target-layout,
  .tool-link-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .brand {
    font-size: 16px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  h1 {
    font-size: 32px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .tool-panel,
  .article-panel {
    padding: 18px;
  }

  .section-heading {
    display: grid;
  }

  .form-grid,
  .result-grid,
  .cost-row,
  .comparison-row {
    grid-template-columns: 1fr;
  }

  .cost-row {
    align-items: start;
    padding: 12px 14px;
  }

  .cost-row.head {
    display: none;
  }

  .cost-row b,
  .cost-row em {
    text-align: left;
  }

  .site-footer {
    display: grid;
    padding: 20px 14px;
  }

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