.tool-page {
  max-width: 900px;
}

.tool-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.home-link,
.nav-bot-link {
  color: var(--primary-deep);
  font-weight: 700;
  text-decoration: none;
}

.nav-bot-link {
  padding: 9px 14px;
  border-radius: 999px;
  background: #edf1fb;
}

.tool-hero {
  padding: 44px 28px;
}

.tool-hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #ecf8f0;
  color: #17643a;
  font-size: 0.92rem;
  font-weight: 700;
}

.converter {
  padding: 32px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.section-heading .step,
.mode-picker .step {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  background: #edf1fb;
  color: var(--primary-deep);
  font-weight: 800;
}

.section-heading h2 {
  margin: 2px 0 4px;
}

.section-heading p,
.progress-panel p,
.results p,
.tool-notes p {
  margin: 0;
}

.drop-zone {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 2px dashed #b8c2df;
  border-radius: 20px;
  background: #f8f9fd;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--primary);
  background: #f1f4fc;
  transform: translateY(-1px);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.drop-zone strong {
  color: var(--primary-deep);
  font-size: 1.1rem;
}

.drop-zone small {
  margin-top: 5px;
}

.upload-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e7ecfa;
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 800;
}

.file-summary {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #faf9f6;
}

.file-summary:not([hidden]) {
  display: flex;
}

.file-summary div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.file-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-summary span {
  color: var(--muted);
  font-size: 0.92rem;
}

.text-button,
.reset-button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.text-button {
  background: transparent;
  color: var(--primary);
  font-weight: 700;
}

.mode-picker {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  border: 0;
}

.mode-picker:disabled {
  opacity: 0.5;
}

.mode-picker legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 800;
}

.mode-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
}

.mode-card:has(input:checked) {
  border-color: var(--primary);
  background: #f4f6fc;
  box-shadow: 0 0 0 1px var(--primary);
}

.mode-card input {
  margin-top: 4px;
  accent-color: var(--primary);
}

.mode-card span {
  display: grid;
  gap: 5px;
}

.mode-card em {
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e6ecfb;
  color: var(--primary-deep);
  font-size: 0.72rem;
  font-style: normal;
  text-transform: uppercase;
}

.mode-card small {
  color: var(--muted);
  line-height: 1.5;
}

.process-button {
  width: 100%;
  margin-top: 24px;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.process-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.tool-message,
.progress-panel,
.results {
  margin-top: 24px;
  padding: 20px;
  border-radius: 18px;
}

.error-message {
  border: 1px solid #efb8b8;
  background: #fff1f1;
  color: #8c2626;
  line-height: 1.6;
}

.progress-panel {
  border: 1px solid #cdd6ee;
  background: #f5f7fc;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.progress-label span {
  color: var(--primary-deep);
  font-weight: 800;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe5f3;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #6e8be0);
  transition: width 180ms ease;
}

.progress-panel p {
  margin-top: 12px;
  font-size: 0.9rem;
}

.results {
  text-align: center;
  border: 1px solid #b9dfc7;
  background: #f2fbf5;
}

.success-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #2b8b54;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
}

.download-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border: 1px solid #cfe4d7;
  border-radius: 14px;
  background: #fff;
  text-align: left;
}

.download-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.download-item a {
  flex: 0 0 auto;
  color: var(--primary-deep);
  font-weight: 800;
  text-decoration: none;
}

.result-actions {
  margin-top: 20px;
}

.tool-notes {
  margin-top: 20px;
}

@media (max-width: 620px) {
  .tool-page {
    width: min(100% - 20px, 900px);
    padding-top: 20px;
  }

  .tool-hero,
  .converter {
    padding: 26px 18px;
  }

  .tool-hero h1 {
    line-height: 1.02;
  }

  .drop-zone {
    min-height: 190px;
    padding: 20px 12px;
  }

  .file-summary,
  .download-item {
    align-items: flex-start;
  }

  .mode-card em {
    display: inline-block;
    margin: 5px 0 0;
  }
}
