/* ═══════════════════════════════════════════════════════════════════
   tool-system.css - Premium SaaS Tool Page Design System
   Sejda • $1000 UI audit level • Clean, human-designed
   ═══════════════════════════════════════════════════════════════════ */

/* ── Root tokens ─────────────────────────────────────────────────── */
:root {
  --brand:       #f27328;
  --brand-dark:  #d9621a;
  --brand-light: #fef7f0;
  --brand-mid:   #fde8d4;

  --page-bg:     #f8fafc;
  --card-bg:     #ffffff;
  --border:      #e8eaed;
  --border-soft: #f0f2f4;

  --txt-head:    #111827;
  --txt-body:    #4b5563;
  --txt-muted:   #9ca3af;

  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;

  --shadow-sm:   0 1px 4px rgba(0,0,0,0.05);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.07);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.09);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);

  --container:   1160px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base reset for tool pages ───────────────────────────────────── */
.tool-page * { box-sizing: border-box; }
.tool-page { background: var(--page-bg); }

/* ── Container ───────────────────────────────────────────────────── */
.tool-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 640px) { .tool-container { padding: 0 16px; } }

/* ═══════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════ */
.tool-hero {
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
  padding: 52px 0 0;
  position: relative;
  overflow: hidden;
}
.tool-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent, var(--brand)) 0%, transparent 100%);
  opacity: 0.6;
}
.tool-hero-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.tool-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-light);
  color: var(--brand);
  border: 1px solid var(--brand-mid);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.tool-hero-badge svg { width: 13px; height: 13px; }

.tool-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: var(--txt-head);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}
.tool-hero-subtitle {
  font-size: 17px;
  color: var(--txt-body);
  line-height: 1.65;
  margin: 0 auto 36px;
  max-width: 560px;
  font-weight: 400;
}
.tool-hero-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--txt-muted);
  margin-bottom: 28px;
}
.tool-hero-breadcrumb a {
  color: var(--txt-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.tool-hero-breadcrumb a:hover { color: var(--brand); }
.tool-hero-breadcrumb span { opacity: 0.5; }

/* ═══════════════════════════════════════════════════════════════════
   UPLOAD ZONE
   ═══════════════════════════════════════════════════════════════════ */
.tool-upload-wrapper {
  background: #fff;
  padding: 0 0 52px;
}
.tool-upload-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.tool-upload-zone {
  background: var(--page-bg);
  border: 2px dashed #d1d5db;
  border-radius: var(--radius-xl);
  padding: 56px 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.2s var(--ease);
  position: relative;
  user-select: none;
}
.tool-upload-zone:hover {
  border-color: var(--accent, var(--brand));
  background: var(--brand-light);
  transform: translateY(-1px);
}
.tool-upload-zone.is-dragging {
  border-color: var(--accent, var(--brand));
  background: var(--brand-light);
  border-style: solid;
  transform: scale(1.01);
}
.tool-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.tool-upload-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent, var(--brand)) 0%, var(--accent-dark, var(--brand-dark)) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(242, 115, 40, 0.25);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.tool-upload-zone:hover .tool-upload-icon {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 12px 32px rgba(242, 115, 40, 0.35);
}
.tool-upload-icon svg { width: 30px; height: 30px; color: #fff; }

.tool-upload-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--txt-head);
  margin: 0 0 8px;
}
.tool-upload-sub {
  font-size: 14.5px;
  color: var(--txt-muted);
  margin: 0 0 24px;
  line-height: 1.6;
}
.tool-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent, var(--brand));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(242, 115, 40, 0.28);
  pointer-events: none; /* Let parent input handle it */
}
.tool-upload-zone:hover .tool-upload-btn {
  background: var(--accent-dark, var(--brand-dark));
  box-shadow: 0 6px 20px rgba(242, 115, 40, 0.38);
  transform: translateY(-1px);
}
.tool-upload-btn svg { width: 16px; height: 16px; }

.tool-upload-meta {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--txt-muted);
}

/* Trust bar */
.tool-trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.tool-trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--txt-muted);
  font-weight: 500;
}
.tool-trust-item svg { width: 15px; height: 15px; color: #22c55e; }

/* ═══════════════════════════════════════════════════════════════════
   FILES SELECTED STATE (after file pick)
   ═══════════════════════════════════════════════════════════════════ */
.tool-files-list {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}
.tool-files-list.is-visible { display: flex; }

.tool-file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  transition: box-shadow 0.2s;
}
.tool-file-card:hover { box-shadow: var(--shadow-md); }
.tool-file-icon {
  width: 38px; height: 38px;
  background: var(--brand-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tool-file-icon svg { width: 18px; height: 18px; color: var(--brand); }
.tool-file-info { flex: 1; min-width: 0; }
.tool-file-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--txt-head);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-file-size { font-size: 12px; color: var(--txt-muted); margin-top: 2px; }
.tool-file-remove {
  width: 28px; height: 28px;
  border: none; background: none;
  cursor: pointer;
  color: var(--txt-muted);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.tool-file-remove:hover { background: #fee2e2; color: #ef4444; }
.tool-file-remove svg { width: 14px; height: 14px; }

/* Add more files button */
.tool-add-more {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--txt-muted);
  background: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  width: 100%;
}
.tool-add-more:hover { border-color: var(--accent, var(--brand)); color: var(--accent, var(--brand)); }
.tool-add-more svg { width: 15px; height: 15px; }
.tool-add-more.is-visible { display: flex; }

/* Action area */
.tool-action-area {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.tool-action-area.is-visible { display: flex; }

.tool-process-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent, var(--brand));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(242, 115, 40, 0.3);
  width: 100%;
  letter-spacing: -0.01em;
}
.tool-process-btn:hover {
  background: var(--accent-dark, var(--brand-dark));
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(242, 115, 40, 0.4);
}
.tool-process-btn:active { transform: translateY(0); }
.tool-process-btn svg { width: 18px; height: 18px; }
.tool-process-btn.is-loading { opacity: 0.7; pointer-events: none; }

.tool-reset-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--txt-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.tool-reset-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Upload progress */
.tool-upload-progress {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.tool-upload-progress.is-visible { display: flex; }
.tool-progress-bar-wrap {
  background: var(--border-soft);
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
}
.tool-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent, var(--brand)), var(--accent-dark, var(--brand-dark)));
  border-radius: 100px;
  width: 0;
  transition: width 0.4s var(--ease);
}
.tool-progress-label {
  font-size: 13px;
  color: var(--txt-muted);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════
   STEP INDICATOR (How it works)
   ═══════════════════════════════════════════════════════════════════ */
.tool-steps-section {
  background: var(--page-bg);
  padding: 72px 0;
  border-top: 1px solid var(--border-soft);
}
.tool-section-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent, var(--brand));
  margin-bottom: 10px;
  text-align: center;
}
.tool-section-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--txt-head);
  text-align: center;
  margin: 0 0 10px;
  letter-spacing: -0.025em;
}
.tool-section-sub {
  font-size: 15.5px;
  color: var(--txt-body);
  text-align: center;
  margin: 0 auto 52px;
  max-width: 480px;
  line-height: 1.6;
}

.tool-steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}
.tool-steps-row::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(16.67% + 28px);
  right: calc(16.67% + 28px);
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.tool-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.tool-step-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--txt-muted);
  margin-bottom: 20px;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
}
.tool-step:first-child .tool-step-circle,
.tool-step.is-active .tool-step-circle {
  background: var(--accent, var(--brand));
  border-color: var(--accent, var(--brand));
  color: #fff;
  box-shadow: 0 6px 20px rgba(242, 115, 40, 0.3);
}
.tool-step-num { font-size: 17px; font-weight: 800; }
.tool-step-icon { width: 22px; height: 22px; }

.tool-step-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--txt-head);
  margin: 0 0 8px;
}
.tool-step-desc {
  font-size: 13.5px;
  color: var(--txt-body);
  line-height: 1.65;
}

@media (max-width: 640px) {
  .tool-steps-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .tool-steps-row::before { display: none; }
  .tool-step { flex-direction: row; text-align: left; gap: 18px; }
  .tool-step-circle { flex-shrink: 0; margin-bottom: 0; }
  .tool-step-content { flex: 1; }
}

/* ═══════════════════════════════════════════════════════════════════
   BENEFITS / FEATURES GRID
   ═══════════════════════════════════════════════════════════════════ */
.tool-benefits-section {
  background: #fff;
  padding: 72px 0;
}
.tool-benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .tool-benefits-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tool-benefits-grid { grid-template-columns: 1fr; } }

.tool-benefit-card {
  background: var(--page-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}
.tool-benefit-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}
.tool-benefit-icon {
  width: 44px; height: 44px;
  background: var(--brand-light);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  transition: background 0.2s;
}
.tool-benefit-card:hover .tool-benefit-icon { background: var(--brand-mid); }
.tool-benefit-icon svg { width: 20px; height: 20px; color: var(--accent, var(--brand)); }
.tool-benefit-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--txt-head);
  margin: 0 0 8px;
}
.tool-benefit-desc {
  font-size: 13.5px;
  color: var(--txt-body);
  line-height: 1.65;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   ABOUT / LONG DESCRIPTION SECTION
   ═══════════════════════════════════════════════════════════════════ */
.tool-about-section {
  background: var(--page-bg);
  padding: 72px 0;
  border-top: 1px solid var(--border-soft);
}
.tool-about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) {
  .tool-about-grid { grid-template-columns: 1fr; gap: 40px; }
}
.tool-about-content h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--txt-head);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.tool-about-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--txt-head);
  letter-spacing: -0.015em;
  margin: 28px 0 12px;
}
.tool-about-content p {
  font-size: 15px;
  color: var(--txt-body);
  line-height: 1.75;
  margin: 0 0 16px;
}
.tool-about-content strong { color: var(--txt-head); font-weight: 600; }

/* Sidebar */
.tool-about-sidebar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 82px;
}
.tool-sidebar-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--txt-muted);
  margin: 0 0 16px;
}
.tool-sidebar-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tool-sidebar-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.tool-sidebar-check {
  width: 20px; height: 20px;
  background: var(--brand-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.tool-sidebar-check svg { width: 11px; height: 11px; color: var(--brand); }
.tool-sidebar-item-text { font-size: 13.5px; color: var(--txt-body); line-height: 1.5; }
.tool-sidebar-item-text strong { display: block; color: var(--txt-head); font-weight: 600; font-size: 13px; margin-bottom: 2px; }

/* ═══════════════════════════════════════════════════════════════════
   FAQ ACCORDION
   ═══════════════════════════════════════════════════════════════════ */
.tool-faq-section {
  background: #fff;
  padding: 72px 0;
}
.tool-faq-list {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tool-faq-item {
  border-bottom: 1px solid var(--border-soft);
}
.tool-faq-item:first-child { border-top: 1px solid var(--border-soft); }

.tool-faq-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 20px 4px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.tool-faq-question {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--txt-head);
  line-height: 1.4;
  flex: 1;
}
.tool-faq-icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--page-bg);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.3s var(--ease);
}
.tool-faq-icon svg { width: 12px; height: 12px; color: var(--txt-muted); transition: transform 0.3s var(--ease); }
.tool-faq-item.is-open .tool-faq-icon { background: var(--brand-light); }
.tool-faq-item.is-open .tool-faq-icon svg { transform: rotate(180deg); color: var(--brand); }
.tool-faq-item.is-open .tool-faq-question { color: var(--brand); }

.tool-faq-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s var(--ease);
}
.tool-faq-body-inner {
  padding: 0 4px 20px;
  font-size: 14.5px;
  color: var(--txt-body);
  line-height: 1.75;
}

/* ═══════════════════════════════════════════════════════════════════
   RELATED TOOLS GRID
   ═══════════════════════════════════════════════════════════════════ */
.tool-related-section {
  background: var(--page-bg);
  padding: 60px 0 80px;
  border-top: 1px solid var(--border-soft);
}
.tool-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
@media (max-width: 640px) { .tool-related-grid { grid-template-columns: 1fr 1fr; } }

.tool-related-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-decoration: none;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s;
}
.tool-related-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}
.tool-related-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tool-related-icon svg { width: 17px; height: 17px; }
.tool-related-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--txt-head);
  line-height: 1.35;
}
.tool-related-desc {
  font-size: 11.5px;
  color: var(--txt-muted);
  margin-top: 2px;
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════
   EDIT PAGE - File list + Options
   ═══════════════════════════════════════════════════════════════════ */
.tool-edit-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  padding: 36px 0 80px;
}
@media (max-width: 860px) { .tool-edit-layout { grid-template-columns: 1fr; } }

.tool-edit-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.tool-edit-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.tool-edit-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--txt-head);
  margin: 0;
}
.tool-edit-card-body { padding: 20px 24px; }

/* Uploaded file list */
.tool-edit-files { display: flex; flex-direction: column; gap: 10px; }
.tool-edit-file {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: var(--page-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  cursor: grab;
}
.tool-edit-file:active { cursor: grabbing; }
.tool-edit-file-drag { color: var(--txt-muted); cursor: grab; flex-shrink: 0; }
.tool-edit-file-drag svg { width: 16px; height: 16px; }
.tool-edit-file-name {
  font-size: 13.5px; font-weight: 500; color: var(--txt-head);
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tool-edit-file-size { font-size: 12px; color: var(--txt-muted); white-space: nowrap; }

/* Options */
.tool-option { margin-bottom: 22px; }
.tool-option:last-child { margin-bottom: 0; }
.tool-option-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--txt-head);
  margin-bottom: 6px;
}
.tool-option-help {
  font-size: 12px;
  color: var(--txt-muted);
  margin-top: 5px;
  line-height: 1.5;
}
.tool-option select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--txt-head);
  background: var(--page-bg);
  cursor: pointer;
  transition: border-color 0.2s;
}
.tool-option select:focus { outline: none; border-color: var(--accent, var(--brand)); }
.tool-option input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--txt-head);
  background: var(--page-bg);
  transition: border-color 0.2s;
}
.tool-option input[type="text"]:focus { outline: none; border-color: var(--accent, var(--brand)); }

/* Toggle switch */
.tool-toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.tool-toggle-label { font-size: 13.5px; color: var(--txt-head); font-weight: 500; }
.tool-toggle {
  position: relative; display: inline-block;
  width: 38px; height: 22px; flex-shrink: 0;
}
.tool-toggle input { opacity: 0; width: 0; height: 0; }
.tool-toggle-slider {
  position: absolute; inset: 0;
  background: #d1d5db;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s;
}
.tool-toggle-slider::after {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.tool-toggle input:checked + .tool-toggle-slider { background: var(--accent, var(--brand)); }
.tool-toggle input:checked + .tool-toggle-slider::after { transform: translateX(16px); }

/* Radio group */
.tool-radio-group { display: flex; flex-direction: column; gap: 8px; }
.tool-radio-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.tool-radio-option:hover { background: var(--page-bg); border-color: var(--border); }
.tool-radio-option input[type="radio"] { accent-color: var(--accent, var(--brand)); }
.tool-radio-option-label { font-size: 13.5px; color: var(--txt-head); cursor: pointer; }
input[type="radio"]:checked ~ .tool-radio-option { border-color: var(--accent, var(--brand)); background: var(--brand-light); }

/* Submit button (edit page) */
.tool-submit-wrap { padding: 20px 24px; border-top: 1px solid var(--border-soft); }

/* ═══════════════════════════════════════════════════════════════════
   DOWNLOAD PAGE
   ═══════════════════════════════════════════════════════════════════ */
.tool-download-hero {
  padding: 80px 0;
  text-align: center;
}
.tool-download-success {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 8px 28px rgba(34, 197, 94, 0.3);
  animation: pop 0.5s var(--ease) both;
}
@keyframes pop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.tool-download-success svg { width: 32px; height: 32px; color: #fff; }

.tool-download-card {
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.tool-download-filename {
  font-size: 14px;
  font-weight: 600;
  color: var(--txt-head);
  background: var(--page-bg);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.tool-download-filename svg { width: 16px; height: 16px; color: var(--accent, var(--brand)); flex-shrink: 0; }
.tool-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--accent, var(--brand));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 24px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(242, 115, 40, 0.3);
  margin-bottom: 14px;
}
.tool-download-btn:hover {
  background: var(--accent-dark, var(--brand-dark));
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(242, 115, 40, 0.4);
}
.tool-download-btn svg { width: 18px; height: 18px; }
.tool-download-again {
  display: block;
  text-align: center;
  font-size: 13.5px;
  color: var(--txt-muted);
  text-decoration: none;
  padding: 8px;
  border-radius: 8px;
  transition: color 0.2s;
}
.tool-download-again:hover { color: var(--brand); }

/* ═══════════════════════════════════════════════════════════════════
   ERROR / NOTIFICATION TOAST
   ═══════════════════════════════════════════════════════════════════ */
.tool-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f2937;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease);
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap;
}
.tool-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.tool-toast.is-error { background: #dc2626; }
.tool-toast.is-success { background: #16a34a; }
.tool-toast svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .tool-hero { padding: 36px 0 0; }
  .tool-hero h1 { font-size: 26px; }
  .tool-hero-subtitle { font-size: 15px; }
  .tool-upload-zone { padding: 40px 24px; }
  .tool-upload-icon { width: 52px; height: 52px; }
  .tool-upload-icon svg { width: 24px; height: 24px; }
  .tool-upload-title { font-size: 18px; }
  .tool-trust-bar { gap: 16px; }
  .tool-steps-section, .tool-benefits-section, .tool-faq-section,
  .tool-about-section, .tool-related-section { padding: 48px 0; }
  .tool-section-sub { margin-bottom: 36px; }
  .tool-download-card { padding: 24px 20px; }
}

/* ═══════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-fade-in-up { animation: fadeInUp 0.5s var(--ease) both; }
.anim-delay-1 { animation-delay: 0.05s; }
.anim-delay-2 { animation-delay: 0.1s; }
.anim-delay-3 { animation-delay: 0.15s; }
.anim-delay-4 { animation-delay: 0.2s; }
