:root {
  --bg: #f5f1e8;
  --surface: #fffdf8;
  --surface-strong: #efe5d0;
  --text: #1f2a1f;
  --muted: #5d6659;
  --accent: #0f766e;
  --accent-dark: #0b4f4a;
  --border: #d9cfbe;
  --shadow: 0 14px 40px rgba(31, 42, 31, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: linear-gradient(180deg, #f8f5ef 0%, var(--bg) 100%);
  color: var(--text);
}

a {
  color: inherit;
}

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

.site-header {
  border-bottom: 1px solid rgba(217, 207, 190, 0.8);
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
}

.hero,
.section {
  padding: 4rem 0;
}

.hero-grid,
.two-column,
.cards {
  display: grid;
  gap: 1.5rem;
}

.hero-grid,
.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

h1,
h2 {
  line-height: 1.1;
  margin-top: 0;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 60ch;
}

.compact-lead {
  margin-bottom: 0;
}

.subtle-copy {
  color: var(--muted);
  margin-top: -0.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.feature-list {
  margin: 0;
  padding-left: 1.25rem;
}

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

.button {
  display: inline-block;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  padding: 0.9rem 1.3rem;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.button-secondary {
  background: var(--surface-strong);
  color: var(--text);
}

.form-card {
  margin-top: 1.5rem;
}

.calculator-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.calculator-panel {
  min-height: 100%;
}

.panel-kicker {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.panel-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.panel-toggle input {
  width: auto;
}

.calculator-panel.is-disabled {
  opacity: 0.58;
}

.form-row {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-row label,
.form-row legend {
  font-weight: 700;
}

.choice-row {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
}

.form-row input,
.form-row select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

.form-row small {
  color: var(--muted);
}

.form-row ul {
  list-style: none;
  padding: 0;
  margin: 0.2rem 0 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-row li label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 400;
}

.form-row input[type="radio"] {
  width: auto;
  margin: 0;
}

.inline-note {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--muted);
}

.mobile-tabs {
  display: none;
}

.recommendation-card,
.results-stack {
  margin-top: 1.5rem;
}

.recommendation-metrics {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.metric-label,
.result-meta {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.result-card h2 {
  margin-bottom: 0.5rem;
}

.result-value {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
}

.result-list {
  margin: 1rem 0 0;
}

.result-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-top: 1px solid rgba(217, 207, 190, 0.8);
}

.result-list dt,
.result-list dd {
  margin: 0;
}

.info-grid {
  margin-top: 1.5rem;
}

.content-width {
  max-width: 760px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.text-link {
  color: var(--accent-dark);
}

.error {
  color: #b91c1c;
}

@media (max-width: 980px) {
  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .hero-grid,
  .two-column,
  .cards,
  .result-grid,
  .recommendation-metrics {
    grid-template-columns: 1fr;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .mobile-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 1.25rem 0 1rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
  }

  .mobile-tab {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    padding: 0.7rem 1rem;
    font: inherit;
    white-space: nowrap;
  }

  .mobile-tab.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
  }

  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .calculator-panel {
    display: none;
  }

  .calculator-panel.is-active {
    display: block;
  }
}
