:root {
  color-scheme: light;
  --bg: #f7faf9;
  --text: #18211f;
  --muted: #5d6b67;
  --line: #d8e3df;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #f59e0b;
  --surface: #ffffff;
  --soft: #e8f3f0;
  --shadow: 0 18px 50px rgba(18, 40, 36, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
}

.top-nav,
.site-footer nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 15px;
}

.top-nav a:hover,
.site-footer a:hover {
  color: var(--brand-dark);
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.language-picker select {
  min-height: 38px;
  max-width: 150px;
  padding: 0 34px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.tool-section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 42px 20px 54px;
}

.tool-copy {
  max-width: 760px;
  margin: 0 auto 26px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 56px;
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.intro {
  margin: 0 auto;
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.converter {
  max-width: 900px;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.converter > label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
}

input[type="url"] {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  outline: none;
}

input[type="url"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.13);
}

button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

button:hover {
  background: var(--brand-dark);
}

.format-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
}

.choice:has(input:checked) {
  border-color: var(--brand);
  background: var(--soft);
  color: var(--brand-dark);
  font-weight: 800;
}

.status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--brand-dark);
  font-weight: 700;
}

.ad-slot {
  max-width: 900px;
  min-height: 96px;
  margin: 22px auto 0;
  padding: 12px;
  border: 1px dashed #b6c8c2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
}

.ad-slot span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
}

.content-band {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.content-band.muted {
  background: var(--soft);
}

.section-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 44px 20px;
}

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

.section-lead {
  max-width: 780px;
  color: var(--muted);
  font-size: 17px;
}

.keyword-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.keyword-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 800;
}

.format-grid article {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.format-grid p,
.split p,
.faq-list p {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 30px;
  align-items: start;
}

.steps {
  margin: 0;
  padding-left: 24px;
  color: var(--text);
  font-weight: 650;
}

.steps li + li {
  margin-top: 12px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 800;
}

details p {
  margin: 0;
  padding: 0 20px 18px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 20px 34px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 760px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .language-picker {
    width: 100%;
    justify-content: space-between;
  }

  .language-picker select {
    max-width: 220px;
  }

  .tool-section {
    padding-top: 28px;
  }

  h1 {
    font-size: 42px;
  }

  .url-row,
  .split,
  .format-grid {
    grid-template-columns: 1fr;
  }

  .converter {
    padding: 16px;
  }

  .url-row button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .site-header,
  .tool-section,
  .section-inner,
  .site-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 25px;
  }

  .format-row {
    display: grid;
  }
}
