:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-alt: #eef3fb;
  --text: #0f172a;
  --muted: #475569;
  --line: rgba(15, 23, 42, 0.08);
  --primary: #143c7d;
  --primary-soft: #2a63b8;
  --accent: #15803d;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --radius-sm: 16px;
  --container: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(42, 99, 184, 0.08), transparent 32%),
    linear-gradient(180deg, #f9fbff 0%, var(--bg) 100%);
  line-height: 1.6;
}

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

a,
button,
summary,
input {
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.narrow {
  width: min(calc(100% - 2rem), 860px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(249, 251, 255, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.header-inner,
.footer-inner,
.hero-grid,
.calculator-layout,
.example-layout {
  display: grid;
  gap: 1.5rem;
}

.header-inner {
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 78px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a:focus-visible,
.footer-nav a:hover,
.footer-nav a:focus-visible,
.inline-link:hover,
.inline-link:focus-visible {
  color: var(--primary);
}

.hero,
.calculator-section,
.info-section,
.example-section,
.seo-section,
.faq-section,
.ad-section {
  padding: 4.5rem 0;
}

.calculator-section,
.info-section,
.example-section,
.seo-section,
.faq-section {
  scroll-margin-top: 96px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(42, 99, 184, 0.35);
  outline-offset: 3px;
}

.hero-grid {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: 2rem 0;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(20, 60, 125, 0.08);
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3,
.logo,
.button,
strong,
summary {
  font-family: "Trebuchet MS", Verdana, sans-serif;
}

h1 {
  margin: 1rem 0;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

h2 {
  margin: 0.5rem 0 0.8rem;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

.hero-text,
.section-heading p,
.info-card p,
.seo-section p,
.faq-item p,
.result-panel p,
.site-footer p,
.example-card p {
  color: var(--muted);
}

.hero-text {
  max-width: 58ch;
  font-size: 1.12rem;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.9rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-soft) 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(20, 60, 125, 0.2);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary);
  border-color: rgba(20, 60, 125, 0.16);
}

.hero-panel,
.results-grid,
.info-grid,
.faq-list {
  display: grid;
  gap: 1rem;
}

.hero-panel {
  align-content: start;
}

.card,
.stat-card,
.ad-placeholder {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 1.4rem;
}

.stat-card strong,
.result-card strong {
  display: block;
  margin-bottom: 0.45rem;
}

.calculator-layout,
.example-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.calculator-form,
.result-panel,
.info-card,
.example-card,
.faq-item {
  padding: 1.6rem;
}

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

.field-full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.field input {
  width: 100%;
  min-height: 52px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: #fbfdff;
  color: var(--text);
  font: inherit;
}

.field input:focus {
  border-color: var(--primary-soft);
}

.form-note,
.error-message {
  margin: 1rem 0 0;
  font-size: 0.94rem;
}

.error-message {
  color: #b91c1c;
  min-height: 1.5em;
}

.result-heading {
  margin-bottom: 1rem;
}

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

.result-card {
  padding: 1.3rem;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}

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

.result-card strong {
  font-size: 1.65rem;
}

.result-card.highlight {
  background: linear-gradient(135deg, #ecf6ff 0%, #f6fbff 100%);
  border: 1px solid rgba(42, 99, 184, 0.12);
}

.result-card.summary {
  background: #f8fbf8;
}

.interpretation {
  margin: 1.25rem 0 0;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--accent);
  background: rgba(21, 128, 61, 0.08);
  border-radius: 0 14px 14px 0;
}

.inline-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.ad-placeholder {
  padding: 1.4rem;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, rgba(20, 60, 125, 0.04), rgba(42, 99, 184, 0.08)),
    #fff;
}

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

.clean-list {
  margin: 0;
  padding-left: 1.1rem;
}

.clean-list li + li {
  margin-top: 0.5rem;
}

.faq-item summary {
  cursor: pointer;
  font-size: 1.03rem;
}

.faq-item[open] summary {
  margin-bottom: 0.8rem;
}

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-inner {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero-grid,
  .calculator-layout,
  .example-layout,
  .info-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .header-inner {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 1rem 0;
  }

  .hero-grid {
    min-height: auto;
    padding-top: 1rem;
  }
}

@media (max-width: 640px) {
  .hero,
  .calculator-section,
  .info-section,
  .example-section,
  .seo-section,
  .faq-section,
  .ad-section {
    padding: 3.5rem 0;
  }

  .container,
  .narrow {
    width: min(calc(100% - 1.25rem), var(--container));
  }

  .site-nav,
  .hero-actions,
  .form-actions,
  .footer-nav {
    width: 100%;
  }

  .site-nav a,
  .button {
    width: 100%;
  }

  h1 {
    font-size: 2.4rem;
  }
}
