:root {
  --bg: #f7f8f3;
  --paper: #ffffff;
  --ink: #15171a;
  --muted: #66706b;
  --line: #dfe5dc;
  --green: #1f6f5b;
  --green-soft: #dff1e7;
  --blue: #315fbd;
  --blue-soft: #e1e9ff;
  --coral: #c9563f;
  --coral-soft: #ffe7df;
  --amber: #c58a1f;
  --amber-soft: #fff0c9;
  --night: #171d24;
  --shadow: 0 18px 50px rgba(25, 31, 36, 0.12);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

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

img,
svg {
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(21, 23, 26, 0.08);
  background: rgba(247, 248, 243, 0.92);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(var(--max), calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--night);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-menu a {
  color: #3d4641;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.site-menu a:hover,
.site-menu a:focus {
  background: #eef2e9;
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 9px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero-band,
.page-section,
.section-wrap,
.subpage-hero,
.plain-page,
.article-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero-band {
  padding: 66px 0 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.78fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 20px;
  font-size: 4.4rem;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 650px;
  color: #46524c;
  font-size: 1.2rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.2;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 22px rgba(31, 111, 91, 0.24);
}

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

.button.compact {
  min-height: 40px;
  padding: 9px 12px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin: 0;
}

.metric-strip div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  padding: 16px;
}

.metric-strip dt {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.metric-strip dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-console,
.tool-surface,
.side-panel,
.template-card,
.content-card,
.hub-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.hero-console {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.hero-console::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(31, 111, 91, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(49, 95, 189, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
}

.console-top,
.mini-tool,
.console-result,
.pipeline-visual {
  position: relative;
  z-index: 1;
}

.console-top {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  color: #e9efe9;
  background: var(--night);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.console-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--coral);
}

.console-top span:nth-child(2) {
  background: var(--amber);
}

.console-top span:nth-child(3) {
  background: #56b887;
}

.console-top strong {
  margin-left: auto;
  font-size: 0.82rem;
}

.mini-tool {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.mini-tool label,
.calculator label {
  display: grid;
  gap: 7px;
  color: #2d3632;
  font-size: 0.88rem;
  font-weight: 750;
}

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

input:focus,
select:focus,
button:focus,
a:focus {
  outline: 3px solid rgba(49, 95, 189, 0.22);
  outline-offset: 2px;
}

.console-result {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 18px 0;
  border: 1px solid #cfe4d8;
  border-radius: var(--radius);
  background: var(--green-soft);
  padding: 14px;
}

.console-result p {
  margin: 0;
  font-weight: 800;
}

.status-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(31, 111, 91, 0.14);
}

.pipeline-visual {
  height: 230px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 10px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.pipeline-visual span {
  display: block;
  border-radius: var(--radius) var(--radius) 2px 2px;
  background: var(--blue);
}

.pipeline-visual span:nth-child(2) {
  background: var(--green);
}

.pipeline-visual span:nth-child(3) {
  background: var(--amber);
}

.pipeline-visual span:nth-child(4) {
  background: var(--coral);
}

.page-section {
  padding: 64px 0;
}

.page-section.tinted {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - var(--max)) / 2));
  padding-right: max(16px, calc((100% - var(--max)) / 2));
  background: #eef3ed;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 26px;
}

.section-heading p:last-child,
.subpage-hero p,
.plain-page header p {
  color: var(--muted);
  font-size: 1.08rem;
}

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

.content-card,
.hub-card,
.template-card {
  min-height: 260px;
  padding: 22px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.content-card:hover,
.hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(25, 31, 36, 0.08);
}

.content-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.content-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.card-meta,
.card-footer,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-meta span,
.article-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf7;
  padding: 4px 9px;
}

.content-card h3 {
  margin: 16px 0 10px;
}

.content-card p,
.hub-card p,
.template-card p {
  color: var(--muted);
}

.card-footer {
  margin-top: auto;
  padding-top: 18px;
}

.accent-green {
  border-top: 4px solid var(--green);
}

.accent-blue {
  border-top: 4px solid var(--blue);
}

.accent-coral {
  border-top: 4px solid var(--coral);
}

.hub-card span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 34px;
  align-items: start;
}

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

.insight-list div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.insight-list strong {
  color: var(--ink);
}

.insight-list span {
  color: var(--muted);
}

.section-wrap {
  padding: 8px 0;
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 96px;
  border: 1px dashed #b9c3bc;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  color: #7b8580;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.subpage-hero {
  padding: 58px 0 34px;
}

.subpage-hero h1,
.plain-page h1,
.article-hero h1 {
  font-size: 3.4rem;
  line-height: 1;
}

.article-shell {
  padding: 42px 0 70px;
}

.article-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 36px;
}

.article-hero p:not(.eyebrow) {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.13rem;
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
  margin-top: 28px;
}

.article-main,
.plain-page .content-block {
  min-width: 0;
}

.article-main > .lead {
  color: #3c4641;
  font-size: 1.16rem;
}

.content-block {
  margin: 30px 0;
}

.content-block p {
  color: #3f4944;
}

.content-block h2 {
  margin-top: 0;
}

.article-aside {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.side-panel {
  padding: 18px;
}

.side-panel h2 {
  font-size: 1rem;
}

.side-panel a {
  display: block;
  border-top: 1px solid var(--line);
  padding: 12px 0;
  color: #34423c;
  font-weight: 750;
}

.tool-surface {
  padding: 22px;
}

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

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

.result-panel {
  display: none;
  border: 1px solid #cddbd2;
  border-radius: var(--radius);
  background: #f4f8f1;
  padding: 18px;
}

.result-panel.is-visible {
  display: block;
}

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

.result-stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.result-stat strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.1;
}

.result-stat span {
  color: var(--muted);
  font-size: 0.82rem;
}

.recommendation-list {
  margin: 12px 0 0;
  padding-left: 20px;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--green);
}

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

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

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

details p {
  margin: 12px 0 0;
}

.checklist-block {
  border: 1px solid #cfe4d8;
  border-radius: var(--radius);
  background: var(--green-soft);
  padding: 22px;
}

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

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

.plain-page {
  max-width: 860px;
  padding: 58px 0 74px;
}

.plain-page header {
  margin-bottom: 30px;
}

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

.sitemap-groups section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
}

.sitemap-groups h2 {
  font-size: 1.1rem;
}

.sitemap-groups a {
  display: block;
  border-top: 1px solid var(--line);
  padding: 9px 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #10151a;
  color: #dce4dd;
}

.footer-grid {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 34px;
  padding: 46px 0;
}

.footer-brand .brand-mark {
  background: #eef7ec;
  color: #10151a;
}

.site-footer p,
.site-footer small {
  color: #aebbb3;
}

.site-footer h2 {
  font-size: 0.94rem;
  color: #fff;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #dce4dd;
}

.footer-bottom {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 0 24px;
  color: #aebbb3;
  font-size: 0.86rem;
}

.copy-status {
  display: inline-block;
  margin-left: 10px;
  color: var(--green);
  font-weight: 800;
}

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

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

  .hero-console {
    min-height: auto;
  }

  .article-aside {
    position: static;
  }

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

@media (max-width: 720px) {
  .nav-shell {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    padding: 8px;
    box-shadow: var(--shadow);
  }

  .site-menu.is-open {
    display: grid;
  }

  .site-menu a {
    padding: 12px;
  }

  .hero-band {
    padding-top: 38px;
  }

  h1,
  .subpage-hero h1,
  .plain-page h1,
  .article-hero h1 {
    font-size: 2.5rem;
    line-height: 1.02;
  }

  h2 {
    font-size: 1.65rem;
  }

  .hero-lede,
  .section-heading p:last-child,
  .subpage-hero p,
  .plain-page header p {
    font-size: 1rem;
  }

  .metric-strip,
  .card-grid,
  .hub-grid,
  .template-grid,
  .field-grid,
  .result-grid,
  .sitemap-groups,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .footer-bottom {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .article-hero,
  .tool-surface {
    padding: 20px;
  }

  .insight-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
