:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #172033;
  --muted: #667085;
  --line: #e4e7ec;
  --surface: #ffffff;
  --soft: #f7f8fa;
  --accent: #2858d7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--surface); }
a { color: inherit; }
button, input { font: inherit; }

.site-header,
.site-footer,
main {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
nav { display: flex; gap: 18px; }
nav a, .site-footer a { text-decoration: none; color: var(--muted); }

main { padding: 72px 0; }
.hero { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
h1, h2 { margin: 0; line-height: 1.05; letter-spacing: -.04em; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.lede { margin: 22px auto 28px; max-width: 620px; color: var(--muted); font-size: 1.1rem; line-height: 1.7; }

.tool-search { max-width: 640px; margin: 0 auto; text-align: left; }
.tool-search label { display: block; margin-bottom: 8px; font-size: .9rem; font-weight: 700; }
.search-row { display: flex; gap: 10px; }
.search-row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.search-row button { border: 0; border-radius: 14px; padding: 14px 20px; background: var(--accent); color: white; font-weight: 800; cursor: pointer; }

.ad-slot { min-height: 90px; display: grid; place-items: center; margin: 40px 0; border: 1px dashed #cbd0d9; border-radius: 14px; color: #8a94a6; background: var(--soft); font-size: .82rem; }
.section-block { margin-top: 72px; }
.section-heading { margin-bottom: 24px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tool-card { display: block; padding: 22px; border: 1px solid var(--line); border-radius: 18px; text-decoration: none; background: white; }
.tool-card:hover { border-color: #b8c3dd; }
.tool-card strong { display: block; margin-bottom: 8px; font-size: 1.05rem; }
.tool-card span { color: var(--muted); line-height: 1.55; }
.empty-state { color: var(--muted); }
.privacy-card { margin-top: 72px; padding: 32px; border-radius: 24px; background: var(--soft); }
.privacy-card p:last-child { max-width: 760px; color: var(--muted); line-height: 1.7; }
.site-footer { display: flex; justify-content: space-between; gap: 18px; padding: 28px 0 44px; border-top: 1px solid var(--line); color: var(--muted); }

.converter-hero { margin-bottom: 36px; }
.converter-panel { max-width: 780px; margin: 0 auto; padding: 30px; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 16px 40px rgba(23, 32, 51, .08); }
.converter-panel-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.converter-panel-heading h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.local-badge { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; background: #eef4ff; color: #2449a8; font-size: .82rem; font-weight: 700; }
.drop-zone { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px; border: 2px dashed #bac4d4; border-radius: 20px; background: var(--soft); text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--accent); background: #f2f6ff; }
.drop-zone strong { font-size: 1.2rem; color: var(--accent); }
.drop-zone span, .drop-zone small { color: var(--muted); }
.selected-file { margin-top: 16px; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; }
.selected-file > div { min-width: 0; }
.selected-file strong, .selected-file span { display: block; }
.selected-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file span { margin-top: 4px; color: var(--muted); font-size: .9rem; }
.converter-options { margin: 24px 0; }
.converter-options label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-weight: 700; }
.converter-options input[type="range"] { width: 100%; }
.primary-action, .download-action { width: 100%; display: inline-flex; align-items: center; justify-content: center; min-height: 52px; border: 0; border-radius: 14px; background: var(--accent); color: white; font-weight: 800; text-decoration: none; cursor: pointer; }
.primary-action:disabled { opacity: .45; cursor: not-allowed; }
.text-button { border: 0; padding: 6px 0; background: transparent; color: var(--accent); font-weight: 700; cursor: pointer; }
.converter-status { margin: 14px 0 0; color: var(--muted); text-align: center; }
.conversion-result { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 22px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); }
.conversion-result img { width: 100%; max-height: 220px; object-fit: contain; border-radius: 12px; background: white; }
.result-copy { display: grid; gap: 10px; }
.result-copy > span { color: var(--muted); }
.content-section { max-width: 880px; margin-inline: auto; }
.steps-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.steps-list li { counter-increment: steps; position: relative; padding: 18px 18px 18px 58px; border: 1px solid var(--line); border-radius: 16px; }
.steps-list li::before { content: counter(steps); position: absolute; left: 18px; top: 17px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: white; font-weight: 800; }
.steps-list strong, .steps-list span { display: block; }
.steps-list span { margin-top: 5px; color: var(--muted); }

@media (max-width: 760px) {
  .site-header { align-items: flex-start; padding: 18px 0; }
  nav { font-size: .92rem; }
  main { padding-top: 48px; }
  .search-row { flex-direction: column; }
  .tool-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
  .converter-panel { padding: 20px; }
  .converter-panel-heading { flex-direction: column; }
  .local-badge { align-self: flex-start; }
  .conversion-result { grid-template-columns: 1fr; }
  .conversion-result img { max-height: 260px; }
}
