.content-section,
.calculator-section {
  max-width: 48rem;
}

.content-section h1,
.hero-section h1,
.calculator-section h1 {
  margin: 0 0 var(--space-4);
  font-size: clamp(2rem, 8vw, 3.5rem);
  line-height: 1.05;
}

.content-section h2,
.hero-section h2,
.calculator-section h2 {
  margin: var(--space-6) 0 var(--space-3);
  font-size: 1.5rem;
  line-height: 1.2;
}

.calculator-section h2:first-child,
.section-heading h2,
.result-card h2,
.placeholder-section h2,
.methodology-section h2,
.examples-section h2,
.faq-section h2,
.advanced-placeholder h3 {
  margin-top: 0;
}

.content-section p,
.hero-section p,
.calculator-section p {
  margin: 0 0 var(--space-4);
}

.content-section ul,
.content-section ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.3rem;
}

.content-section li + li {
  margin-top: var(--space-2);
}

.content-section p:last-child,
.hero-section p:last-child,
.calculator-section p:last-child {
  margin-bottom: 0;
}

.placeholder-section {
  padding: var(--space-5);
}

.methodology-section h3,
.examples-section h3 {
  line-height: 1.25;
}

.faq-item p:last-child,
.example-card p:last-child,
.disclaimer-block p:last-child {
  margin-bottom: 0;
}

.guide-content section {
  margin-top: var(--space-6);
}

.content-cta {
  margin: var(--space-5) 0;
}

.table-wrap {
  width: 100%;
  margin: var(--space-4) 0;
  overflow-x: auto;
}

.table-wrap:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.table-wrap::before {
  content: "Scroll table horizontally if needed.";
  display: block;
  margin-bottom: var(--space-2);
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.content-section table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  border: 1px solid var(--color-border);
  background: var(--color-surface-strong);
}

.content-section caption {
  padding: var(--space-3);
  color: var(--color-muted);
  font-weight: 700;
  text-align: left;
}

.content-section th,
.content-section td {
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.content-section th {
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
}

.guide-content .faq-item + .faq-item {
  margin-top: var(--space-3);
}

@media (max-width: 480px) {
  .content-section h1,
  .hero-section h1,
  .calculator-section h1 {
    font-size: 2rem;
  }

  .content-section h2,
  .hero-section h2,
  .calculator-section h2 {
    font-size: 1.35rem;
  }

  .content-section table {
    min-width: 40rem;
  }
}

@media (min-width: 760px) {
  .calculator-section {
    max-width: none;
  }
}
