:root {
  --bg: #f6f7f2;
  --panel: #ffffff;
  --ink: #171b1d;
  --muted: #687074;
  --line: #dfe4dc;
  --accent: #106b5b;
  --accent-2: #ef6b4f;
  --soft: #eaf2ed;
  --danger: #b33226;
  --shadow: 0 24px 70px rgba(23, 27, 29, 0.12);
  --font-body: "SF Pro Text", Inter, "Segoe UI", Arial, Helvetica, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(16, 107, 91, 0.08), transparent 42%),
    linear-gradient(315deg, rgba(239, 107, 79, 0.08), transparent 38%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
  gap: 36px;
  align-items: center;
  min-height: 620px;
}

.intro {
  max-width: 610px;
}

.logo {
  display: block;
  width: min(220px, 72vw);
  height: auto;
  margin-bottom: 34px;
}

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

h1,
h2,
p,
strong,
span {
  overflow-wrap: anywhere;
}

h1 {
  display: grid;
  gap: 8px;
  max-width: 620px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 5.2vw, 58px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

h1 em {
  display: inline-block;
  color: var(--accent);
  font-style: normal;
  font-weight: 700;
}

h2,
.selected-converter strong,
.converter-card strong {
  font-family: var(--font-display);
  font-weight: 700;
}

.lead {
  max-width: 560px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.upload-panel,
.catalog,
.notes article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.upload-panel {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 4vw, 30px);
}

.selected-converter {
  display: grid;
  gap: 4px;
  padding: 18px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.selected-converter span {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.selected-converter strong {
  font-size: 26px;
}

.selected-converter p {
  margin: 0;
  color: var(--muted);
}

.dropzone {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  border: 2px dashed #b9c5bd;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: #f2faf5;
  transform: translateY(-2px);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.dropzone strong {
  color: var(--ink);
  font-size: 22px;
}

.drop-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 8px;
  background: var(--panel);
  color: var(--accent);
  font-size: 32px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(23, 27, 29, 0.1);
}

.file-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.file-card div {
  display: grid;
  gap: 2px;
}

.file-card span {
  color: var(--muted);
  font-size: 14px;
}

.primary,
.ghost,
.tab,
.converter-card {
  border-radius: 8px;
}

.primary,
.ghost {
  min-height: 48px;
  font-weight: 900;
}

.primary {
  border: 0;
  background: var(--accent);
  color: white;
  transition: background 160ms ease, transform 160ms ease;
}

.primary:hover:not(:disabled) {
  background: #0c5c4e;
  transform: translateY(-1px);
}

.primary:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ghost {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 0 14px;
}

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

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

.status.success {
  color: var(--accent);
  font-weight: 800;
}

.queue-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.queue-panel[hidden] {
  display: none;
}

.queue-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.queue-stats div {
  display: grid;
  gap: 2px;
  min-height: 70px;
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.queue-stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.queue-stats strong {
  color: var(--accent);
  font-size: 26px;
  line-height: 1;
}

.progress {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #e6ece7;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-2);
  transition: width 500ms ease;
}

.queue-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.catalog {
  display: grid;
  gap: 18px;
  margin-top: 16px;
  padding: clamp(18px, 3vw, 26px);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab {
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  padding: 10px 14px;
  font-weight: 850;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

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

.converter-card {
  display: grid;
  gap: 10px;
  min-height: 154px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.converter-card:hover,
.converter-card.active {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(23, 27, 29, 0.08);
}

.converter-card.active {
  background: #f7fcf9;
}

.formats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 950;
}

.format {
  display: inline-grid;
  min-width: 54px;
  min-height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--accent);
  font-size: 13px;
}

.arrow {
  color: var(--accent-2);
  font-weight: 950;
}

.converter-card strong {
  font-size: 18px;
}

.converter-card span:last-child {
  color: var(--muted);
  font-size: 14px;
}

.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.notes article {
  min-height: 142px;
  padding: 22px;
}

.notes h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.notes p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .converter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .page {
    padding: 32px 0;
  }

  .hero,
  .notes {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  h1 {
    max-width: 540px;
  }
}

@media (max-width: 680px) {
  .converter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .page {
    width: min(100% - 24px, 1180px);
  }

  .lead {
    font-size: 17px;
  }

  .dropzone {
    min-height: 220px;
    padding: 22px 14px;
  }

  .file-card {
    align-items: stretch;
    flex-direction: column;
  }

  .converter-grid {
    grid-template-columns: 1fr;
  }
}
