/* converter.css — styles specific to the /convert app page.
   Same design tokens as the landing page (variables.css), just applied
   to a tool layout instead of a marketing layout. */

.app-nav {
  padding: 18px 0;
  border-bottom: 1px solid var(--surface-border);
}
.app-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.back-link {
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.back-link:hover {
  color: var(--ink);
}

.app-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 100px;
}

.app-head {
  text-align: center;
  margin-bottom: 40px;
}
.app-head h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  margin: 16px 0 10px;
  letter-spacing: -0.01em;
}
.app-head p {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 46ch;
  margin: 0 auto;
}

/* Step tracker */
.step-tracker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.step-tracker .tick {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--surface-border);
  transition: all 0.25s var(--ease);
}
.step-tracker .tick.active {
  color: var(--ink);
  border-color: var(--surface-border-strong);
  background: var(--surface);
}
.step-tracker .tick.done {
  color: var(--success);
  border-color: rgba(74, 222, 128, 0.3);
}
.step-tracker .sep {
  width: 18px;
  height: 1px;
  background: var(--surface-border);
}

.panel {
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}
.panel-head h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.panel-head .hint {
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* Dropzone */
.dropzone {
  border: 1.5px dashed var(--surface-border-strong);
  border-radius: var(--radius-md);
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  background: var(--surface);
}
.dropzone:hover,
.dropzone.drag {
  border-color: var(--violet-soft);
  background: var(--surface-strong);
}
.dropzone .dz-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: var(--gradient-signature-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber-soft);
}
.dz-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}
.dz-sub {
  font-size: 13px;
  color: var(--ink-faint);
}
#fileInput {
  display: none;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.file-chip .file-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--surface-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--violet-soft);
}
.file-chip .name {
  font-weight: 600;
  font-size: 14px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-chip .meta {
  font-size: 12.5px;
  color: var(--ink-faint);
}
.file-chip button {
  border: none;
  background: none;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  padding: 8px;
}
.file-chip button:hover {
  color: var(--danger);
}

.dev-preview {
  margin-bottom: 22px;
}
.dev-fade-grid {
  display: flex;
  gap: 10px;
}
.dev-fade-box {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 14px 16px;
}
.dev-fade-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.dev-fade-text {
  font-family: var(--font-display);
  font-size: 14.5px;
  line-height: 1.5;
}

/* Mode + options */
.mode-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.mode-card,
.opt {
  flex: 1;
  min-width: 150px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  cursor: pointer;
  background: var(--surface);
  transition: all 0.2s var(--ease);
}
.mode-card.active,
.opt.active {
  border-color: var(--violet-soft);
  background: var(--gradient-signature-soft);
}
.mode-card .m-title,
.opt .opt-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mode-card .m-sub,
.opt .opt-sub {
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.5;
}
.badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--gradient-signature);
  color: #16121c;
  padding: 2px 7px;
  border-radius: 999px;
}
.opt-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--ink-soft);
}
.options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.slider-row {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.slider-row .sl-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.slider-row .sl-title {
  font-size: 13.5px;
  font-weight: 600;
}
.slider-row .sl-val {
  font-size: 12px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}
input[type='range'] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--surface-border-strong), var(--ink));
  outline: none;
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient-signature);
  border: 2px solid #16121c;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
input[type='range']::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient-signature);
  border: 2px solid #16121c;
  cursor: pointer;
}
.sl-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 8px;
}

/* Preview panel */
.preview-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background: #fff;
  aspect-ratio: 8.5 / 11;
  width: 100%;
}
.preview-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.preview-placeholder {
  aspect-ratio: 8.5 / 11;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: 13.5px;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

/* Buttons + progress */
.btn-block {
  width: 100%;
}
.progress-wrap {
  margin-top: 18px;
  display: none;
}
.progress-wrap.show {
  display: block;
}
.progress-label {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
}
.progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--gradient-signature);
  width: 0%;
  transition: width 0.3s var(--ease);
}

.status-box {
  display: none;
  margin-top: 16px;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 13.5px;
  gap: 10px;
  align-items: flex-start;
}
.status-box.show {
  display: flex;
}
.status-box.error {
  background: var(--danger-bg);
  color: #9a2626;
  border: 1px solid rgba(220, 38, 38, 0.22);
}
.status-box.success {
  background: var(--success-bg);
  color: #12703a;
  border: 1px solid rgba(22, 163, 74, 0.22);
}
.status-box strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

.price-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  background: var(--gradient-signature-soft);
  border: 1px solid var(--surface-border-strong);
  color: var(--amber-soft);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 4px;
}

.note {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: 14px;
  line-height: 1.6;
}
.note strong {
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .app-shell {
    padding: 32px 16px 80px;
  }
  .panel {
    padding: 20px;
  }
  .mode-row,
  .options {
    flex-direction: column;
  }
  .step-tracker {
    font-size: 11px;
  }
  .dev-fade-grid {
    flex-direction: column;
  }
}
