:root {
  color-scheme: light;
  --ink: #10201d;
  --muted: #53625f;
  --line: #dce7e4;
  --paper: #ffffff;
  --soft: #f3faf8;
  --brand: #14b8a6;
  --brand-dark: #0f766e;
  --focus: #0ea5e9;
}

* {
  box-sizing: border-box;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header__inner {
  width: 100%;
  max-width: 1200px;
  min-height: 60px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px max(24px, calc((100vw - 1200px) / 2));
  background: rgba(248, 250, 252, 0.92);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-left: auto;
  font-size: 0.9375rem;
  color: #334155;
  font-weight: 500;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--brand-dark);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: #0f172a;
  letter-spacing: 0;
}

.brand-icon {
  flex: 0 0 auto;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switcher {
  display: inline-flex;
  gap: 4px;
}

.lang-btn {
  min-height: 28px;
  padding: 4px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  background: none;
  color: #64748b;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.lang-btn.active,
.lang-btn:hover,
.lang-btn:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(20, 184, 166, 0.06);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--brand);
  border-radius: 10px;
  background: var(--brand);
  color: white;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(20, 184, 166, 0.22);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.button:hover,
.button:focus-visible {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.28);
  transform: translateY(-1px);
}

.button-small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.875rem;
}

.button-secondary {
  background: white;
  color: var(--brand-dark);
  box-shadow: none;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: white;
  color: var(--brand-dark);
}

main {
  min-height: 80vh;
}

.hero,
.content,
.faq,
.related,
.tool-card,
.cta-band {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  padding: 76px 0 34px;
}

.breadcrumbs {
  display: none;
}

.kicker {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.82rem;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: 3.65rem;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.9rem;
  line-height: 1.2;
  letter-spacing: 0;
}

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

.keyword-row,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.keyword-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
}

.content {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 28px 0 42px;
}

.section-block,
.tool-card,
.faq,
.related,
.cta-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.section-block {
  padding: 26px;
}

.section-block p,
.faq p,
.cta-band p {
  color: var(--muted);
}

.section-block ul {
  margin: 18px 0 0;
  padding-left: 20px;
}

.section-block li + li {
  margin-top: 8px;
}

.tool-card {
  margin-top: 14px;
  padding: 26px;
}

.calculator-grid,
.result-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.field span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.field input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.field input:focus {
  border-color: var(--focus);
  outline: 3px solid rgba(14, 165, 233, 0.18);
}

.result-card,
.related-card {
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.result-card strong {
  font-size: 1.8rem;
  line-height: 1;
}

.result-card span,
.related-card span {
  font-weight: 800;
}

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

.faq,
.related,
.cta-band {
  padding: 30px;
  margin-top: 22px;
  margin-bottom: 0;
}

details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

.related-card {
  color: inherit;
  text-decoration: none;
}

.cta-band {
  background: linear-gradient(0deg, var(--soft), var(--soft));
  margin-bottom: 42px;
}

.site-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  color: var(--muted);
  justify-content: flex-start;
}

@media (max-width: 860px) {
  .site-header {
    padding: 0 18px;
  }

  .site-header__inner {
    min-height: 64px;
    flex-wrap: wrap;
    gap: 12px 18px;
    padding: 12px 0;
  }

  .site-header nav {
    margin-left: 0;
    order: 3;
    width: 100%;
    gap: 14px;
    font-size: 0.875rem;
  }

  .site-header__actions {
    gap: 10px;
  }

  .brand {
    font-size: 1.05rem;
  }

  .content,
  .calculator-grid,
  .result-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 48px 0 26px;
  }

  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  .lede {
    font-size: 1.05rem;
  }

  .section-block,
  .tool-card,
  .faq,
  .related,
  .cta-band {
    padding: 22px;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 0 16px;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .button-small {
    min-height: 38px;
    padding: 0 14px;
  }

  .hero,
  .content,
  .faq,
  .related,
  .tool-card,
  .cta-band {
    width: min(100% - 32px, 1120px);
  }

  h1 {
    font-size: 2.15rem;
  }
}
