:root {
  --ink: #f4f5f7;
  --muted: #a4acb9;
  --line: #303744;
  --paper: #151922;
  --soft: #1d232d;
  --accent: #f2f4f8;
  --accent-dark: #cfd5df;
  --good: #8fd0bd;
  --bad: #ff8c8c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(86, 96, 112, 0.24), transparent 34%),
    linear-gradient(180deg, #10131a 0%, #171b23 52%, #0f1117 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 64px) 14px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #11141a;
  background: var(--accent);
  font-size: 13px;
  letter-spacing: 0;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11151d;
}

.language-button {
  min-width: 44px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.language-button.is-active {
  color: #11141a;
  background: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 18px;
  padding: 24px clamp(18px, 5vw, 64px) 20px;
  text-align: center;
}

.hero-copy {
  max-width: 760px;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.94;
  letter-spacing: 0;
}

.intro {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.4;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 820px) minmax(120px, 160px);
  grid-template-areas: "left converter right";
  justify-content: center;
  align-items: start;
  gap: 28px;
  padding: 8px clamp(18px, 5vw, 64px) 34px;
}

.converter {
  grid-area: converter;
  width: min(100%, 820px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 25, 34, 0.92);
  box-shadow: var(--shadow);
}

.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 320px;
  padding: 40px 24px;
  border: 1px dashed #4d5666;
  border-radius: 8px;
  background: var(--soft);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.dropzone.is-dragging {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 8px;
  color: var(--accent);
  background: #11151d;
  border: 1px solid var(--line);
}

.upload-icon svg,
.icon-button svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dropzone h2 {
  margin: 4px 0 0;
  font-size: 28px;
  letter-spacing: 0;
}

button {
  font: inherit;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.secondary-button {
  position: relative;
  z-index: 1;
  padding: 0 22px;
  color: var(--accent);
  background: #11151d;
  border: 1px solid var(--line);
}

.primary-button {
  width: 100%;
  margin-top: 18px;
  color: #11141a;
  background: var(--accent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-dark);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.file-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11151d;
}

.file-panel small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.file-panel strong {
  display: block;
  overflow-wrap: anywhere;
  margin: 4px 0;
}

.icon-button {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #151922;
  cursor: pointer;
}

.status {
  min-height: 28px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 700;
}

.status.success {
  color: var(--good);
}

.status.error {
  color: var(--bad);
}

.ad-slot {
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid #303744;
  border-radius: 8px;
  color: #7f8794;
  background: rgba(21, 25, 34, 0.72);
  text-align: center;
}

.ad-slot span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ad-slot strong {
  color: #a4acb9;
  font-size: 16px;
}

.ad-slot-wide {
  width: min(100%, 728px);
  min-height: 90px;
}

.ad-column {
  position: sticky;
  top: 18px;
}

.ad-column:first-child {
  grid-area: left;
}

.ad-column:last-child {
  grid-area: right;
}

.ad-slot-tall {
  width: 160px;
  min-height: 600px;
}

.footer {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 18px 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 18px;
  margin-top: 14px;
}

.footer-links a {
  color: var(--muted);
  font-weight: 800;
}

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

.page-shell {
  min-height: calc(100vh - 156px);
  padding: 36px clamp(18px, 5vw, 64px) 42px;
}

.info-page {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 25, 34, 0.92);
  box-shadow: var(--shadow);
}

.info-page h1 {
  max-width: 680px;
  font-size: clamp(38px, 6vw, 64px);
}

.info-page h2 {
  margin: 30px 0 10px;
  font-size: 22px;
}

.info-page p {
  max-width: 680px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.info-page a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-kicker,
.info-page .updated {
  color: #7f8794;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-email {
  font-size: 22px;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: minmax(0, 820px);
    grid-template-areas: "converter";
  }

  .ad-column {
    display: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    gap: 14px;
  }

  h1 {
    font-size: 48px;
  }

  .intro {
    font-size: 17px;
  }

  .converter {
    padding: 16px;
  }

  .dropzone {
    min-height: 280px;
    padding: 28px 16px;
  }

  .dropzone h2 {
    font-size: 24px;
  }

  .footer {
    padding-bottom: 22px;
  }
}
