:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --panel: #ffffff;
  --ink: #17201d;
  --muted: #5f6d66;
  --line: #dce2dd;
  --accent: #176b5b;
  --accent-2: #b4492f;
  --soft: #e9f3ef;
  --warn: #fff1d6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  position: sticky;
  top: 0;
  z-index: 5;
}

.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
}

.brand::before {
  content: "";
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  background: url("/favicon.svg") center / contain no-repeat;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  min-width: 0;
}

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

.language-switcher {
  width: 100%;
  color: var(--muted);
  font-size: 13px;
  position: relative;
  z-index: 10;
}

.language-switcher summary {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 760;
  list-style: none;
  min-height: 34px;
  padding: 6px 10px;
}

.language-switcher summary::-webkit-details-marker {
  display: none;
}

.language-switcher summary::after {
  content: "⌄";
  margin-left: 2px;
}

.language-switcher summary span {
  color: var(--muted);
  font-weight: 680;
}

.language-switcher summary strong {
  color: var(--ink);
  font-weight: 760;
}

.language-options {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 8px);
  width: min(680px, calc(100vw - 40px));
  max-height: min(420px, calc(100vh - 150px));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(23, 32, 29, 0.14);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 10px;
}

.language-switcher a {
  border-radius: 6px;
  color: var(--muted);
  display: block;
  padding: 8px 10px;
  text-decoration: none;
  white-space: normal;
}

.language-switcher a:hover {
  background: var(--soft);
}

.language-switcher a[aria-current="true"] {
  background: var(--soft);
  color: var(--accent);
  font-weight: 780;
}

.hero,
.section,
.article {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 20px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 36px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 740;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(40px, 7vw, 72px);
}

h2 {
  margin: 0 0 16px;
  font-size: 30px;
}

h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.lead {
  max-width: 700px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.tool-actions,
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  font-weight: 720;
  text-decoration: none;
  text-align: center;
  white-space: normal;
}

.button.secondary {
  background: transparent;
  color: var(--accent);
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 36px;
  padding: 8px 12px;
  text-align: center;
  white-space: normal;
}

.chip.active {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent);
}

.hero-panel,
.tool,
.ad-slot,
.partner-strip,
.disclosure,
.result,
.checklist,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.hero-panel {
  padding: 22px;
}

.stat {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.stat:last-child {
  border-bottom: 0;
}

.stat strong {
  color: var(--accent);
}

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

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

.tool {
  padding: 20px;
}

label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 9px 10px;
}

.result {
  margin-top: 14px;
  min-height: 70px;
  padding: 14px;
  background: var(--soft);
}

.result strong {
  display: block;
  margin-bottom: 4px;
}

.ad-slot {
  margin: 28px 0;
  padding: 18px;
  color: var(--muted);
  background: #fbfcfa;
  text-align: center;
  font-size: 14px;
}

.partner-strip {
  display: grid;
  gap: 6px;
  margin: 24px 0;
  padding: 16px;
  background: var(--soft);
}

.partner-strip strong {
  color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-note {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  overflow-wrap: normal;
  padding: 12px;
  text-align: left;
  word-break: normal;
}

th {
  background: var(--soft);
}

.checklist {
  padding: 18px 22px;
}

.checklist li {
  margin: 8px 0;
}

.disclosure {
  margin-top: 24px;
  padding: 16px;
  background: var(--warn);
  color: #5f431b;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 20px;
  color: var(--muted);
  text-align: center;
}

.footer a {
  margin: 0 8px;
}

@media (max-width: 860px) {
  .hero,
  .grid {
    grid-template-columns: 1fr;
  }

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

  .language-switcher {
    width: 100%;
  }

  .language-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(560px, calc(100vw - 40px));
  }

  h1 {
    font-size: 42px;
  }
}

@media (max-width: 520px) {
  .site-header {
    background: #fff;
    position: static;
  }

  .nav {
    gap: 12px;
    padding: 12px 16px;
  }

  .brand {
    align-items: flex-start;
    font-size: 17px;
    line-height: 1.18;
    max-width: 100%;
  }

  .brand::before {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .nav-links {
    width: 100%;
    flex-wrap: nowrap;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .language-options {
    grid-template-columns: 1fr;
    max-height: min(420px, calc(100vh - 120px));
    width: calc(100vw - 32px);
  }

  .hero,
  .section,
  .article {
    padding: 32px 16px;
  }

  h1 {
    font-size: 32px;
  }

  .lead {
    font-size: 16px;
  }
}
