:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #5b6770;
  --paper: #fbfcfb;
  --line: #d9e1dc;
  --panel: #ffffff;
  --green: #1f7a5b;
  --teal: #0f6b78;
  --amber: #b7791f;
  --red: #b42318;
  --navy: #26384a;
  --shadow: 0 18px 50px rgba(23, 32, 38, 0.08);
}

* {
  box-sizing: border-box;
}

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

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

a:hover {
  text-decoration: underline;
}

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

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--green), var(--teal));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.94rem;
}

.language-switch {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
}

.hero {
  background:
    linear-gradient(90deg, rgba(23, 32, 38, 0.92), rgba(38, 56, 74, 0.74)),
    url("/assets/agentcostguard-hero.svg") center/cover no-repeat;
  color: white;
}

.hero-inner {
  width: min(1160px, calc(100% - 32px));
  min-height: clamp(560px, 82vh, 760px);
  margin: 0 auto;
  padding: 82px 0 54px;
  display: grid;
  align-content: center;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #b8f2df;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  margin: 24px 0 0;
  color: #e7f1ec;
  font-size: clamp(1.04rem, 2vw, 1.24rem);
}

.hero-actions,
.trust-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 720;
}

.button-primary {
  color: var(--ink);
  background: #c8f7dc;
}

.button-secondary {
  color: white;
  border-color: rgba(255, 255, 255, 0.42);
}

.trust-row span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #eef8f3;
  font-size: 0.9rem;
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: #eef5f1;
}

.wrap {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.section h2,
.article h1 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-lede {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

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

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

.metric,
.card,
.calculator-panel,
.results-panel,
.lead-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric,
.card {
  padding: 20px;
}

.metric strong {
  display: block;
  font-size: 2rem;
  color: var(--green);
}

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

.calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.calculator-panel,
.results-panel,
.lead-panel {
  padding: 22px;
}

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

label {
  display: grid;
  gap: 6px;
  font-weight: 690;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd8d1;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: white;
  font: inherit;
}

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

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

.result-box span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.result-box strong {
  display: block;
  margin-top: 3px;
  font-size: 1.25rem;
}

.alert {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 700;
}

.alert-ok {
  color: #14523c;
  background: #ddf7e9;
  border-color: #a9e4c2;
}

.alert-warn {
  color: #7a4b12;
  background: #fff3d6;
  border-color: #f3d08b;
}

.alert-high {
  color: var(--red);
  background: #ffe4df;
  border-color: #ffb7aa;
}

.recommendation-list {
  padding-left: 19px;
  color: var(--muted);
}

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

.monetization-slot {
  min-height: 118px;
  padding: 18px;
  border: 1px dashed #9fb4a9;
  border-radius: 8px;
  background: white;
}

.monetization-slot[hidden] {
  display: block;
  opacity: 0.72;
}

.ad-slot-active {
  border-style: solid;
}

.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: center;
}

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

.status {
  min-height: 24px;
  color: var(--muted);
}

.article {
  padding: 78px 0;
}

.article-body {
  max-width: 820px;
}

.article-body p {
  color: var(--muted);
  font-size: 1.06rem;
}

.article-section {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.site-footer {
  padding: 34px 0;
  color: #dce7e1;
  background: var(--navy);
}

.footer-inner {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.site-footer a {
  color: #b8f2df;
}

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

  .hero-inner {
    min-height: 620px;
  }

  .metric-grid,
  .card-grid,
  .calculator-grid,
  .lead-grid,
  .monetization {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav-links {
    gap: 10px;
  }

  .form-grid,
  .results-grid {
    grid-template-columns: 1fr;
  }
}
