:root {
  --bg: #f5efe2;
  --bg-soft: #fbf7ef;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: #fffdfa;
  --line: rgba(42, 32, 18, 0.1);
  --text: #1d180f;
  --muted: #645846;
  --accent: #c4632d;
  --accent-dark: #8a3f17;
  --accent-soft: #f0c8a9;
  --shadow: 0 18px 60px rgba(70, 42, 18, 0.08);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(196, 99, 45, 0.16), transparent 28%),
    linear-gradient(180deg, #f8f3ea 0%, #f3ecde 100%);
}

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

img {
  max-width: 100%;
}

.site-shell {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 28px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fffdf9;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.brand-copy {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.brand-copy span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}

.topnav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.country-switcher {
  display: inline-grid;
  gap: 6px;
  min-width: 180px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.country-switcher select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
}

.country-switcher select:focus {
  outline: 2px solid rgba(196, 99, 45, 0.2);
  border-color: rgba(196, 99, 45, 0.45);
}

.topnav a {
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  transition: 180ms ease;
}

.topnav a:hover,
.topnav a[aria-current="page"] {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
}

.hero,
.content-layout,
.calculator-layout,
.page-grid,
.signal-grid,
.tool-grid,
.timeline,
.faq-grid {
  display: grid;
  gap: 22px;
}

.hero {
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
  align-items: stretch;
  padding: 18px 0 30px;
}

.hero-copy,
.hero-card,
.signal-card,
.tool-card,
.content-card,
.ad-card,
.timeline-card,
.faq-card,
.calculator-card,
.result-card,
.policy-card,
.page-hero {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 40px;
}

.device-badge {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 8px 12px;
  border: 1px solid rgba(196, 99, 45, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.05;
  font-size: clamp(2.6rem, 5vw, 4.9rem);
  letter-spacing: -0.03em;
}

.hero-text,
.page-hero p,
.section-heading p,
.tool-card p,
.content-card p,
.faq-card p,
.timeline-card p,
.policy-card p {
  color: var(--muted);
}

.eyebrow,
.mini-label,
.tool-tag {
  margin: 0 0 14px;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fffdf9;
  box-shadow: 0 16px 32px rgba(138, 63, 23, 0.18);
}

.button-secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.52);
  color: var(--text);
}

.hero-card {
  padding: 32px;
  background:
    radial-gradient(circle at top right, rgba(196, 99, 45, 0.18), transparent 35%),
    var(--panel-strong);
}

.hero-ad-wrap {
  margin-top: 24px;
}

.stat-list,
.result-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stat-list li,
.result-list div {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.stat-list li:first-child,
.result-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.signal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 8px 0 18px;
}

.signal-card,
.tool-card,
.content-card,
.ad-card,
.timeline-card,
.faq-card,
.calculator-card,
.result-card,
.policy-card {
  padding: 28px;
}

.section-heading {
  max-width: 760px;
}

.section-heading h2,
.content-card h2,
.faq-card h3,
.timeline-card strong,
.tool-card h3,
.calculator-card h2,
.result-card h2,
.policy-card h2 {
  margin-top: 0;
}

.tools-section {
  padding: 24px 0 8px;
}

.ad-band {
  padding: 8px 0 18px;
}

.region-switcher {
  display: grid;
  gap: 18px;
  padding: 18px 0;
}

.mobile-quick-links {
  display: none;
  padding: 6px 0 14px;
}

.quick-link-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-link-card {
  display: grid;
  place-items: center;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow);
}

.region-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.region-pill {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: 180ms ease;
}

.region-pill:hover,
.region-pill.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fffdf9;
  border-color: transparent;
}

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

.inline-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent-dark);
  font-weight: 700;
}

.contact-button {
  margin-top: 8px;
}

.contact-note {
  color: var(--muted);
}

.content-layout {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  align-items: start;
  padding: 22px 0;
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed rgba(138, 63, 23, 0.35);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(240, 200, 169, 0.34));
}

.ad-slot span {
  font-weight: 700;
  color: var(--text);
}

.ad-slot.vertical {
  min-height: 250px;
  margin-top: 20px;
}

.inline-ad-wrap {
  margin-top: 24px;
}

.sticky-ad-card {
  position: sticky;
  top: 18px;
}

.mobile-ad-dock {
  position: sticky;
  bottom: 0;
  z-index: 10;
  padding-top: 16px;
}

.mobile-ad-inner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: rgba(255, 253, 250, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 -12px 30px rgba(70, 42, 18, 0.08);
  color: var(--muted);
}

.mobile-ad-inner span {
  color: var(--text);
  font-weight: 700;
}

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

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 36px 0 12px;
  color: var(--muted);
}

.footer p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.page-hero,
.content-page {
  display: grid;
  gap: 22px;
}

.page-hero {
  padding: 36px;
}

.page-hero.compact {
  padding: 28px 32px;
}

.policy-card h2:not(:first-child) {
  margin-top: 28px;
}

.calculator-page {
  display: grid;
  gap: 22px;
}

.calculator-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: start;
}

.calculator-form {
  display: grid;
  gap: 16px;
}

.calculator-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.calculator-form input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(42, 32, 18, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font: inherit;
}

.calculator-form input:focus {
  outline: 2px solid rgba(196, 99, 45, 0.2);
  border-color: rgba(196, 99, 45, 0.4);
}

.result-card h2 {
  margin-bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
}

.result-list dt {
  color: var(--muted);
}

.result-list dd {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
}

body.is-mobile .hero {
  grid-template-columns: 1fr;
}

body.is-mobile .hero-card {
  order: 3;
}

body.is-mobile .signal-grid {
  display: none;
}

body.is-mobile .mobile-quick-links {
  display: block;
}

body.is-mobile .calculator-layout {
  grid-template-columns: 1fr;
}

body.is-mobile .result-card {
  order: -1;
}

body.is-mobile .page-hero.compact {
  padding-bottom: 18px;
}

body.is-mobile .country-switcher {
  width: 100%;
}

body.is-mobile .country-switcher select {
  width: 100%;
}

body.is-desktop .mobile-quick-links {
  display: none;
}

@media (max-width: 980px) {
  .hero,
  .content-layout,
  .calculator-layout,
  .signal-grid,
  .tool-grid,
  .page-grid {
    grid-template-columns: 1fr;
  }

  .footer,
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .sticky-ad-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(calc(100% - 18px), var(--content-width));
    padding-top: 12px;
  }

  .hero-copy,
  .hero-card,
  .signal-card,
  .tool-card,
  .content-card,
  .ad-card,
  .timeline-card,
  .faq-card,
  .calculator-card,
  .result-card,
  .policy-card,
  .page-hero {
    padding: 22px;
    border-radius: 22px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 2.35rem;
  }

  .button,
  .topnav a {
    width: 100%;
  }

  .hero-actions {
    display: grid;
  }

  .mobile-ad-inner {
    display: flex;
  }

  .quick-link-row {
    grid-template-columns: 1fr;
  }
}
