:root {
  --ink: #172026;
  --muted: #66717a;
  --line: #d9e0e6;
  --panel: #ffffff;
  --soft: #eef4f7;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --warn: #b45309;
  --blue: #1d4ed8;
  --shadow: 0 18px 60px rgba(23, 32, 38, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f7fafb;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

button,
select,
input {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 5vw;
  background: rgba(247, 250, 251, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

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

.nav-links {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--ink);
}

main {
  width: min(1180px, 90vw);
  margin: 0 auto;
}

.ad-slot {
  display: grid;
  min-height: 96px;
  place-items: center;
  padding: 18px;
  color: #52616b;
  text-align: center;
  border: 1px dashed #aab7c0;
  background: #f0f5f8;
}

.ad-slot span {
  display: block;
  font-weight: 700;
  color: #34444f;
}

.ad-slot small {
  display: block;
  margin-top: 4px;
}

.side-ad {
  position: fixed;
  top: 118px;
  z-index: 10;
  display: none;
  width: 160px;
  min-height: 600px;
  padding: 18px 12px;
  color: #52616b;
  text-align: center;
  border: 1px dashed #aab7c0;
  background: #f0f5f8;
}

.side-ad span {
  display: block;
  font-weight: 700;
  color: #34444f;
}

.side-ad small {
  display: block;
  margin-top: 6px;
}

.side-ad-left {
  left: max(18px, calc((100vw - 1180px) / 2 - 190px));
}

.side-ad-right {
  right: max(18px, calc((100vw - 1180px) / 2 - 190px));
}

.ad-slot-top,
.ad-slot-wide {
  margin: 24px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 470px);
  gap: 42px;
  align-items: center;
  min-height: calc(100vh - 190px);
  padding: 34px 0 54px;
}

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

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

h1 {
  max-width: 780px;
  margin-bottom: 20px;
  font-size: clamp(2.45rem, 6vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-text {
  max-width: 600px;
  color: var(--muted);
  font-size: 1.15rem;
}

.converter-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.drop-zone {
  display: grid;
  min-height: 270px;
  place-items: center;
  padding: 24px;
  text-align: center;
  border: 2px dashed #9aabb6;
  border-radius: 8px;
  background: #f8fbfc;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone:hover,
.drop-zone:focus,
.drop-zone.is-dragging {
  border-color: var(--accent);
  background: #edf8f6;
  outline: none;
}

.drop-icon {
  display: grid;
  width: 74px;
  height: 88px;
  place-items: end center;
  padding-bottom: 14px;
  color: #fff;
  font-weight: 800;
  border-radius: 7px;
  background: linear-gradient(145deg, var(--blue), var(--accent));
}

.drop-zone h2 {
  margin: 18px 0 4px;
  font-size: 1.35rem;
}

.drop-zone p {
  margin-bottom: 18px;
  color: var(--muted);
}

.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.file-name,
.file-meta {
  display: block;
}

.file-name {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.file-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.field-label {
  display: block;
  margin: 18px 0 8px;
  color: #34444f;
  font-weight: 800;
}

select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid #b8c4cc;
  border-radius: 8px;
  background: #fff;
}

.primary-button,
.secondary-button,
.icon-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.secondary-button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #e5edf1;
  color: var(--ink);
  font-weight: 800;
}

.status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
}

.status.is-error {
  color: #b91c1c;
}

.content-band {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 26px 0;
}

.ad-slot-side {
  min-height: 330px;
}

.formats,
.faq {
  padding: 10px 0;
}

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

.format-grid a {
  display: block;
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: border-color 160ms ease, transform 160ms ease;
}

.format-grid a:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.format-grid strong,
.format-grid span {
  display: block;
}

.format-grid span {
  margin-top: 8px;
  color: var(--muted);
}

.faq {
  max-width: 850px;
  margin-bottom: 70px;
}

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

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

details p {
  margin: 10px 0 0;
  color: var(--muted);
}

.seo-section {
  max-width: 900px;
  padding: 28px 0 14px;
}

.seo-section p,
.article-page p {
  color: var(--muted);
  font-size: 1.04rem;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.link-grid a,
.cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  text-align: center;
}

.page-main {
  min-height: calc(100vh - 260px);
}

.article-page {
  max-width: 820px;
  padding: 44px 0;
}

.article-page h1 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.article-page h2 {
  margin-top: 34px;
}

.article-page a:not(.cta-link) {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cta-link {
  width: auto;
  margin-top: 12px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  width: min(1180px, 90vw);
  margin: 0 auto;
  padding: 30px 0 46px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer strong {
  color: var(--ink);
}

.site-footer p {
  margin: 6px 0 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.site-footer a {
  color: #34444f;
  font-weight: 700;
}

.ad-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 18, 24, 0.62);
}

.ad-modal.is-open {
  display: flex;
}

.ad-dialog {
  position: relative;
  width: min(520px, 100%);
  padding: 26px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.close-modal {
  position: absolute;
  top: 14px;
  right: 14px;
}

.modal-label {
  color: var(--warn);
  font-weight: 800;
  text-transform: uppercase;
}

.modal-ad-box {
  display: grid;
  min-height: 230px;
  place-items: center;
  margin-top: 18px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed #aab7c0;
  background: #f7fafb;
}

@media (max-width: 860px) {
  .topbar {
    min-height: 66px;
  }

  .nav-links {
    display: none;
  }

  main {
    width: min(94vw, 680px);
  }

  .hero,
  .content-band,
  .format-grid,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 20px;
    min-height: auto;
    padding-top: 18px;
  }

  h1 {
    font-size: 2.7rem;
    line-height: 1;
  }

  .ad-slot-side {
    min-height: 130px;
  }

  .site-footer {
    display: block;
    width: min(94vw, 680px);
  }

  .site-footer nav {
    justify-content: flex-start;
    margin-top: 18px;
  }
}

@media (min-width: 1560px) {
  .side-ad {
    display: block;
  }
}
