/* ── Design tokens ─────────────────────────────────────────────────── */
:root {
  --brand:       #d4380d;
  --brand-dk:    #a82d09;
  --dark:        #0f0f1a;
  --surface:     #ffffff;
  --bg:          #f0f2f5;
  --success:     #1a7a4a;
  --muted:       #6b7280;
  --border:      #e4e7eb;

  /* Bootstrap overrides */
  --bs-primary:         #d4380d;
  --bs-primary-rgb:     212, 56, 13;
  --bs-link-color:      #d4380d;
  --bs-link-hover-color:#a82d09;
}

/* Bootstrap's .btn-primary reads its own --bs-btn-* vars (hardcoded blue),
   not --bs-primary — so remap them to the brand colour. Fixes the
   "Select PDF" button showing up blue instead of the theme red. */
.btn-primary {
  --bs-btn-bg:                   var(--brand);
  --bs-btn-border-color:         var(--brand);
  --bs-btn-hover-bg:             var(--brand-dk);
  --bs-btn-hover-border-color:   var(--brand-dk);
  --bs-btn-active-bg:            var(--brand-dk);
  --bs-btn-active-border-color:  var(--brand-dk);
  --bs-btn-focus-shadow-rgb:     var(--bs-primary-rgb);
  --bs-btn-disabled-bg:          var(--brand);
  --bs-btn-disabled-border-color:var(--brand);
}

/* ── Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ── Navbar ────────────────────────────────────────────────────────── */
.site-nav {
  background: var(--dark);
  border-radius: 0 0 14px 14px;
  padding: 0.7rem 1.5rem;
  flex-shrink: 0;
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark { width: 28px; height: 28px; flex-shrink: 0; }
.wordmark {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}
.w-pdf, .w-free { color: var(--brand); }
.w-tools { color: #ffffff; }

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-links a.active { color: #fff; }
.nav-icon { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Hero ──────────────────────────────────────────────────────────── */
.tool-hero {
  text-align: center;
  padding: 1.4rem 1rem 0.9rem;
}
.hero-tile {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), #ff6b35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.7rem;
  box-shadow: 0 6px 20px rgba(212,56,13,0.28);
}
.hero-tile svg { width: 26px; height: 26px; color: #fff; }
.tool-hero h1 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 0.2rem;
  color: var(--dark);
}
.tool-hero h1 .brand-red { color: var(--brand); }
.tagline { color: var(--muted); font-size: 0.875rem; margin: 0; }

/* ── Tool wrap ─────────────────────────────────────────────────────── */
.tool-wrap {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem 0.5rem;
  flex: 1;
}

/* ── 3-panel card ──────────────────────────────────────────────────── */
.tool-card-3 {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.07);
  display: grid;
  grid-template-columns: 1fr 100px 1fr;
  align-items: stretch;
  min-height: 280px;
}

/* ── Upload panel ──────────────────────────────────────────────────── */
.upload-panel {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  transition: opacity 0.2s, pointer-events 0.2s;
  border-radius: 16px 0 0 16px;
}
.upload-panel.dimmed {
  opacity: 0.38;
  pointer-events: none;
}

/* Drop Zone — fixed height so it never grows/shrinks with sibling panels */
.drop-zone {
  flex: 0 0 auto;
  height: 200px;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  overflow: hidden;
}
.drop-zone:hover,
.drop-zone.dragover { border-color: var(--brand); background: #fff8f7; }
.drop-zone.done  {
  border-style: solid;
  border-color: var(--success);
  background: #f0fdf4;
  cursor: default;
}
.drop-zone.error { border-color: #dc3545; background: #fff2f0; cursor: pointer; }
.drop-zone .dz-main {
  width: 100%;
  text-align: center;
  padding: 1.25rem 1rem;
}

/* Tool setting row */
.tool-setting {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  flex-shrink: 0;
}
.setting-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
}
.opt-group { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.opt-btn {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.28rem 0.75rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: #374151;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
  line-height: 1.4;
}
.opt-btn:hover { border-color: var(--brand); color: var(--brand); }
.opt-btn.active {
  border-color: var(--brand);
  background: #fff0ec;
  color: var(--brand);
  font-weight: 600;
}

/* ── Process Another File reset button ────────────────────────────── */
.btn-reset-file {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  border: 2px dashed var(--brand);
  border-radius: 12px;
  background: #fff8f7;
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
  margin-bottom: 0.5rem;
}
.btn-reset-file:hover {
  background: #ffe9e4;
  border-color: var(--brand-dk);
}

/* ── Disabled action button ────────────────────────────────────────── */
.action-btn:disabled,
.action-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Aliases used by tool JS files */
.level-btn, .format-btn {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.28rem 0.75rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: #374151;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.level-btn:hover, .format-btn:hover { border-color: var(--brand); color: var(--brand); }
.level-btn.active, .format-btn.active,
.level-btn.btn-primary, .format-btn.btn-primary {
  border-color: var(--brand);
  background: #fff0ec;
  color: var(--brand);
  font-weight: 600;
}
.rotate-btn {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.28rem 0.75rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: #374151;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.rotate-btn:hover { border-color: var(--brand); color: var(--brand); }
.rotate-btn.active,
.rotate-btn.btn-primary { border-color: var(--brand); background: #fff0ec; color: var(--brand); font-weight: 600; }

/* Range input */
.range-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}
.range-input:focus { border-color: var(--brand); }
.range-error { color: #dc3545; font-size: 0.78rem; margin-top: 0.3rem; }

/* Quality slider */
.quality-row { display: flex; align-items: center; gap: 0.6rem; }
.quality-slider { flex: 1; accent-color: var(--brand); }
.quality-value-label { font-size: 0.8rem; font-weight: 600; color: var(--brand); min-width: 2.5rem; text-align: right; }

/* Mode selector (split) */
.mode-group { display: flex; gap: 0.35rem; }
.mode-btn {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: #374151;
  cursor: pointer;
  transition: all 0.12s;
  text-align: center;
}
.mode-btn:hover { border-color: var(--brand); color: var(--brand); }
.mode-btn.active { border-color: var(--brand); background: #fff0ec; color: var(--brand); font-weight: 600; }

/* File list (merge) */
#file-list { flex: 1; overflow-y: auto; max-height: 210px; padding-top: 0.4rem; }
.file-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
  transition: border-color 0.1s, box-shadow 0.1s;
  cursor: default;
}
.file-row:last-of-type { margin-bottom: 0; }
.file-row:hover { border-color: #d1d5db; }
.file-row .fname {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--dark);
}
.file-row .fnum {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  min-width: 1.1rem;
  text-align: right;
  flex-shrink: 0;
}
.file-row .frem {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 0 0.2rem;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Drag handle */
.drag-handle {
  cursor: grab;
  color: #9ca3af;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.1rem;
  flex-shrink: 0;
  user-select: none;
}
.drag-handle:active { cursor: grabbing; }

/* Drag-and-drop states */
.file-row.dnd-dragging    { opacity: 0.35; }
.file-row.dnd-over-top    { box-shadow: 0 -2px 0 0 var(--brand); }
.file-row.dnd-over-bottom { box-shadow: 0 2px 0 0 var(--brand); }

/* ── Action panel (center 100px) ────────────────────────────────────── */
.action-panel {
  width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
  gap: 0;
  position: relative;
}
.connector {
  flex: 1;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
}
.action-btn-main {
  width: 72px;
  min-height: 72px;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--brand) 0%, #e8501e 100%);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(212,56,13,0.38);
  transition: transform 0.12s, box-shadow 0.12s;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  padding: 0.5rem;
}
.action-btn-main:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 6px 22px rgba(212,56,13,0.48);
}
.action-btn-main:active:not(:disabled) { transform: scale(0.97); }
.action-btn-main:disabled { opacity: 0.8; cursor: not-allowed; transform: none; }
.action-btn-main svg { width: 22px; height: 22px; flex-shrink: 0; }
.action-btn-main .btn-label { line-height: 1; text-align: center; }
.action-icon-normal, .action-icon-spinner { display: block; }

.action-progress {
  width: 54px;
  height: 3px;
  background: #fde8e2;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
  flex-shrink: 0;
}
.action-progress .bar {
  height: 100%;
  width: 38%;
  background: var(--brand);
  border-radius: 3px;
  animation: bar-slide 1.3s ease-in-out infinite alternate;
}

@keyframes bar-slide {
  from { transform: translateX(-100%); }
  to   { transform: translateX(370%); }
}
@keyframes spin-anim { to { transform: rotate(360deg); } }
.spin-icon { animation: spin-anim 0.75s linear infinite; transform-origin: center; }

/* ── Download panel ─────────────────────────────────────────────────── */
.download-panel {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-left: 1px solid var(--border);
  min-height: 220px;
  transition: opacity 0.2s;
  border-radius: 0 16px 16px 0;
}
.dp-empty { color: var(--muted); }
.dp-empty svg { width: 34px; height: 34px; opacity: 0.45; margin-bottom: 0.5rem; }
.dp-empty p { font-size: 0.82rem; margin: 0; }
.dp-done { width: 100%; display: flex; flex-direction: column; align-items: center; }
.dp-done .check-icon { width: 34px; height: 34px; color: var(--success); margin-bottom: 0.5rem; }
.dp-filename {
  font-weight: 600;
  font-size: 0.875rem;
  word-break: break-all;
  margin-bottom: 0.4rem;
  color: var(--dark);
}
.size-info {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  min-height: 1.8rem;
  width: 100%;
}
.savings-badge {
  display: inline-block;
  background: #d1fae5;
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 20px;
  margin-left: 0.3rem;
  vertical-align: middle;
}
.btn-download {
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.5rem 1.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto;
  box-shadow: 0 3px 12px rgba(26,122,74,0.28);
  transition: background 0.12s, transform 0.1s;
}
.btn-download:hover { background: #156139; transform: translateY(-1px); }
.btn-download svg { width: 15px; height: 15px; }

/* ── FAQ link row ───────────────────────────────────────────────────── */
.faq-link-row {
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.faq-link-row a { color: var(--brand); text-decoration: none; font-weight: 500; }
.faq-link-row a:hover { text-decoration: underline; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  border-radius: 12px 12px 0 0;
  padding: 0.8rem 1.5rem;
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
  flex-shrink: 0;
  margin-top: auto;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-privacy { display: flex; align-items: center; gap: 6px; }
.footer-privacy svg { width: 13px; height: 13px; opacity: 0.65; flex-shrink: 0; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.12s;
}
.footer-links a:hover { color: rgba(255,255,255,0.9); }

/* ── Homepage tool grid ─────────────────────────────────────────────── */
.home-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
  flex: 1;
}
.home-hero {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}
.home-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--dark);
  margin-bottom: 0.4rem;
}
.home-hero .sub { color: var(--muted); font-size: 1rem; margin: 0; }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 860px;
  margin: 0 auto;
}
.tool-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--dark);
  border: 1.5px solid var(--border);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
  display: block;
  height: 100%;
}
.tool-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 20px rgba(212,56,13,0.11);
  transform: translateY(-2px);
  color: var(--dark);
}
.tool-card .tool-icon {
  width: 46px;
  height: 46px;
  background: #fff0ec;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
  color: var(--brand);
}
.tool-card .tool-icon svg { width: 22px; height: 22px; }
.tool-card h2 { font-size: 0.92rem; font-weight: 700; margin-bottom: 0.25rem; }
.tool-card p { font-size: 0.8rem; color: var(--muted); margin: 0; }
.trust-note {
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

/* ── FAQ page ───────────────────────────────────────────────────────── */
.faq-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem;
  flex: 1;
}
.faq-hero { text-align: center; padding: 1.75rem 1rem 1.25rem; }
.faq-hero h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.5px; color: var(--dark); margin-bottom: 0.3rem; }
.faq-hero .sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.1rem; }
.search-box {
  display: flex;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 0.45rem 0.75rem;
  gap: 0.5rem;
  transition: border-color 0.15s;
}
.search-box:focus-within { border-color: var(--brand); }
.search-box svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.9rem;
  background: transparent;
  color: var(--dark);
}
.search-box input::placeholder { color: #9ca3af; }

.faq-section { margin-bottom: 1rem; }
.faq-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s;
}
.faq-section-header:hover { border-color: var(--brand); }
.faq-section.open .faq-section-header { background: #fff8f7; border-color: var(--brand); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.section-icon-tile {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.faq-section.open .section-icon-tile { background: #fde8e2; color: var(--brand); }
.section-icon-tile svg { width: 16px; height: 16px; }
.section-title {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dark);
  transition: color 0.15s;
}
.faq-section.open .section-title { color: var(--brand); }
.section-count {
  background: #f3f4f6;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  flex-shrink: 0;
}
.section-chevron {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-section.open .section-chevron { transform: rotate(180deg); }

.faq-questions {
  background: var(--surface);
  border: 1.5px solid var(--brand);
  border-top: none;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}
.faq-q { border-bottom: 1px solid var(--border); }
.faq-q:last-child { border-bottom: none; }
.faq-q-header {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
  transition: background 0.1s;
}
.faq-q-header:hover { background: #fafafa; }
.faq-q.open .faq-q-header { color: var(--brand); }
.faq-q-chevron { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; transition: transform 0.2s; }
.faq-q.open .faq-q-chevron { transform: rotate(180deg); }
.faq-a {
  display: none;
  padding: 0 1rem 0.85rem;
  font-size: 0.85rem;
  color: #4b5563;
  line-height: 1.6;
}
.faq-q.open .faq-a { display: block; }
.faq-q.hidden-by-search { display: none; }
.faq-section.all-hidden { display: none; }

/* ── Tool page SEO content article ──────────────────────────────────── */
.tool-article {
  max-width: 760px;
  width: 100%;
  margin: 1.75rem auto 0;
  padding: 0 1rem;
}
.tool-article-card {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  padding: 1.75rem 2rem;
}
.tool-article h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.3px;
  margin: 0 0 0.6rem;
}
.tool-article h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin: 1.6rem 0 0.6rem;
}
.tool-article > .tool-article-card > h3:first-of-type { margin-top: 1.2rem; }
.tool-article p {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.7;
  margin: 0 0 0.8rem;
}
.tool-article a { color: var(--brand); text-decoration: none; font-weight: 500; }
.tool-article a:hover { text-decoration: underline; }

/* Numbered how-to steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 0.7rem;
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.6;
  min-height: 1.7rem;
}
.steps li:last-child { margin-bottom: 0; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.05rem;
  width: 1.7rem;
  height: 1.7rem;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}
.steps li strong { color: var(--dark); }

/* Feature checklist */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1.25rem;
}
.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 0.25rem;
}
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success);
  font-weight: 800;
}

/* Collapsible FAQ */
.tool-faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}
.tool-faq details:last-child { border-bottom: none; padding-bottom: 0; }
.tool-faq summary {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.tool-faq summary::-webkit-details-marker { display: none; }
.tool-faq summary::after {
  content: "+";
  color: var(--brand);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
}
.tool-faq details[open] summary::after { content: "\2212"; }
.tool-faq details[open] summary { color: var(--brand); }
.tool-faq details p { margin: 0.6rem 0 0; font-size: 0.875rem; color: #4b5563; line-height: 1.65; }

@media (max-width: 640px) {
  .tool-article-card { padding: 1.4rem 1.25rem; }
  .feature-list { grid-template-columns: 1fr; }
}

/* ── Legal / content pages (Privacy, Terms) ─────────────────────────── */
.legal-wrap {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  flex: 1;
}
.legal-hero {
  text-align: center;
  padding: 2rem 1rem 1.25rem;
}
.legal-hero h1 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--dark);
  margin: 0 0 0.4rem;
}
.legal-hero .updated {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.2rem 0.7rem;
}
.legal-card {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.07);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
}
.legal-card .intro {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.7;
  margin: 0 0 1.5rem;
}
.legal-section { margin-bottom: 1.6rem; }
.legal-section:last-child { margin-bottom: 0; }
.legal-section h2 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 0.5rem;
  padding-left: 0.65rem;
  border-left: 3px solid var(--brand);
  line-height: 1.4;
}
.legal-section p,
.legal-section li {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.7;
}
.legal-section p { margin: 0 0 0.7rem; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul {
  margin: 0 0 0.7rem;
  padding-left: 1.25rem;
}
.legal-section li { margin-bottom: 0.35rem; }
.legal-section a { color: var(--brand); text-decoration: none; font-weight: 500; }
.legal-section a:hover { text-decoration: underline; }
.legal-toc {
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
}
.legal-toc h2 {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
.legal-toc ol {
  margin: 0;
  padding-left: 1.2rem;
  columns: 2;
  column-gap: 1.5rem;
}
.legal-toc li { margin-bottom: 0.3rem; }
.legal-toc a {
  color: #4b5563;
  text-decoration: none;
  font-size: 0.85rem;
}
.legal-toc a:hover { color: var(--brand); }
.contact-box {
  background: #fff8f7;
  border: 1px solid #f5d3c8;
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin-top: 0.5rem;
}
.contact-box a { font-weight: 600; }

@media (max-width: 640px) {
  .legal-card { padding: 1.4rem 1.25rem; }
  .legal-toc ol { columns: 1; }
  .legal-hero h1 { font-size: 1.55rem; }
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card-3 {
    grid-template-columns: 1fr;
  }
  .upload-panel {
    border-right: none;
    border-bottom: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
  }
  .action-panel {
    flex-direction: row;
    width: 100%;
    height: 80px;
    padding: 0 1rem;
    border-bottom: 1px solid var(--border);
  }
  .connector {
    flex: 1;
    height: 2px;
    width: auto;
  }
  .action-btn-main { min-height: 58px; width: 80px; }
  .action-progress { position: static; margin: 0 0 0 0.5rem; width: 60px; align-self: center; }
  .download-panel {
    border-left: none;
    border-radius: 0 0 16px 16px;
    min-height: 160px;
  }
  .site-nav { padding: 0.6rem 1rem; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 0.25rem 0.45rem; font-size: 0.75rem; }
  .nav-icon { display: none; }
  .home-hero h1 { font-size: 1.5rem; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
}
