/* ==========================================================================
   ConvertBrowser — visual system v2
   A ground-up redesign. Same class hooks as before (so no JS changed), a
   different product: dark, warm, modern — not "developer tool blueprint."
   ========================================================================== */

:root {
  /* Surfaces — near-black warm charcoal, not blueprint navy. No grid-paper
     texture anywhere; depth comes from elevation, not decoration. */
  --bg: #0A0B10;
  --surface: #14161D;
  --surface-2: #1B1E27;
  --surface-3: #232733;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --paper: #F3F4F7;
  --paper-dim: #A6ACBA;
  --muted: #6E7482;

  /* Accent — one warm signal color, used with intent, not decoration */
  --accent: #F5B942;
  --accent-hover: #FFCB63;
  --accent-dim: rgba(245, 185, 66, 0.35);
  --accent-wash: rgba(245, 185, 66, 0.08);
  --on-accent: #14100A;

  --success: #3DDC8A;
  --success-wash: rgba(61, 220, 138, 0.1);
  --error: #FF6B6B;
  --error-wash: rgba(255, 107, 107, 0.1);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --max-width: 760px;
  --max-width-wide: 1180px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 12px 32px -14px rgba(0, 0, 0, 0.6), 0 2px 8px -2px rgba(0, 0, 0, 0.4);
  --shadow-3: 0 28px 64px -20px rgba(0, 0, 0, 0.7), 0 8px 20px -6px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--paper);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
h1 { font-weight: 700; }
h2 { font-weight: 700; font-size: 1.7rem; }
h3 { font-weight: 600; font-size: 1.05rem; }
p { margin: 0 0 14px; color: var(--paper-dim); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex-shrink: 0; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
body.home .wrap { max-width: var(--max-width-wide); }

/* ==========================================================================
   Navigation — sticky, translucent, modern
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 11, 16, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--paper);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #E8862E);
  box-shadow: 0 4px 12px -2px rgba(245, 185, 66, 0.55);
}
.logo span { color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  color: var(--paper-dim);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { color: var(--paper); background: var(--surface-2); text-decoration: none; }
.site-nav a.nav-cta {
  color: var(--on-accent);
  background: var(--accent);
  font-weight: 600;
  margin-left: 6px;
}
.site-nav a.nav-cta:hover { background: var(--accent-hover); }

/* Mobile nav — CSS-only toggle (no JS), checkbox-driven slide panel */
.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--surface-2);
  flex-shrink: 0;
}
.nav-toggle-label svg { width: 18px; height: 18px; stroke: var(--paper); }

@media (max-width: 720px) {
  .nav-toggle-label { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px;
    gap: 2px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }
  .site-nav a { padding: 12px 8px; border-radius: var(--radius-sm); }
  .site-nav a.nav-cta { margin-left: 0; text-align: center; margin-top: 6px; }
  .nav-toggle:checked ~ .site-nav { max-height: 320px; opacity: 1; }
  .site-header .wrap { position: relative; flex-wrap: wrap; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-2); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line-strong);
  box-shadow: none;
}
.btn-ghost:hover { border-color: var(--paper-dim); background: var(--surface-2); opacity: 1; transform: none; box-shadow: none; }
.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #06231A;
}
.btn-success:hover { background: #52E39C; transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn-lg { padding: 16px 30px; font-size: 1.02rem; border-radius: var(--radius-sm); }

/* ==========================================================================
   Breadcrumb / tool header
   ========================================================================== */
.breadcrumb { font-size: 0.82rem; color: var(--muted); margin: 22px 0 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--paper-dim); }
.breadcrumb .sep { margin: 0 6px; opacity: 0.5; }
.breadcrumb [aria-current] { color: var(--paper-dim); }

.tool-header { padding-bottom: 8px; }
.tool-header h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 12px; }
.tool-header .lede { font-size: 1.05rem; max-width: 62ch; color: var(--paper-dim); }

/* ==========================================================================
   The primary card + dropzone — the centerpiece of every tool page
   ========================================================================== */
.reg-frame {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  padding: 8px;
  margin: 28px 0 12px;
}
.tool-card { padding: 28px; }

.dropzone {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 64px 28px;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.drag-over {
  border-color: var(--accent);
  background: var(--surface-2);
  outline: none;
}
.dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-pill);
  background: var(--accent-wash);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 0 auto 18px;
}
.dropzone-title { font-size: 1.2rem; font-weight: 700; color: var(--paper); margin-bottom: 6px; font-family: var(--font-display); }
.dropzone-sub { font-size: 0.9rem; color: var(--muted); }

.dz-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.dz-meta .fmt-badge { opacity: 0.85; }
.dz-meta-sep { color: var(--muted); font-size: 0.8rem; }
.dz-limit { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--paper-dim);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
}
.trust-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex-shrink: 0; }

.tool-card .trust-pill { margin-top: 18px; }

/* ==========================================================================
   Format badges
   ========================================================================== */
.tool-badge-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.fmt-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--paper);
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
}
.fmt-arrow { color: var(--accent); font-size: 0.9rem; }

/* ==========================================================================
   File list / results — the "reward" state after conversion
   ========================================================================== */
.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.88rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.file-row .fthumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--surface-3); flex-shrink: 0; }
.file-row .fname { flex: 1; color: var(--paper); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .fsize { color: var(--muted); font-family: var(--font-mono); font-size: 0.78rem; flex-shrink: 0; }
.file-row .fdims { color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; flex-shrink: 0; }
.file-row .fstatus {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  color: var(--muted);
}
.file-row .fstatus.pending { color: var(--paper-dim); }
.file-row .fstatus.processing { color: var(--accent); }
.file-row .fstatus.ok, .file-row .fstatus.done {
  color: var(--success);
  background: var(--success-wash);
}
.file-row .fstatus.err, .file-row .fstatus.error {
  color: var(--error);
  background: var(--error-wash);
}
.file-row.done { border-color: rgba(61, 220, 138, 0.3); background: var(--success-wash); }
.file-row .fdownload {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: #06231A;
  background: var(--success);
  border: 1px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
}
.file-row .fdownload:hover { background: #52E39C; }

.file-row .fremove {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}
.file-row .fremove:hover { border-color: var(--error); color: var(--error); }
.file-row .fremove:disabled { opacity: 0.3; cursor: not-allowed; }

.file-row .forder { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); width: 20px; text-align: right; flex-shrink: 0; }
.file-row .fmove-group { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.file-row .fmove-btn {
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--paper-dim);
  border-radius: 4px;
  width: 20px;
  height: 16px;
  line-height: 1;
  font-size: 0.68rem;
  cursor: pointer;
  padding: 0;
}
.file-row .fmove-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.file-row .fmove-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ==========================================================================
   Progress / error
   ========================================================================== */
.progress-track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  overflow: hidden;
  margin-top: 16px;
  display: none;
}
.progress-track.active { display: block; }
.progress-fill { height: 100%; width: 0%; background: var(--accent); border-radius: var(--radius-pill); transition: width 0.2s ease; }
.progress-label { font-size: 0.8rem; color: var(--muted); font-family: var(--font-mono); margin-top: 8px; }

.error-msg {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 107, 107, 0.35);
  background: var(--error-wash);
  color: #FFB3B3;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.error-msg:not(:empty) { display: block; }

/* ==========================================================================
   Controls (quality sliders, mode toggles, dimension fields, etc.)
   ========================================================================== */
.controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.control-field { display: flex; flex-direction: column; gap: 6px; }
.control-field label, .control-field.control-field-checkbox label, label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.control-value { color: var(--accent); font-family: var(--font-mono); }
.control-field input[type="range"] { width: 180px; accent-color: var(--accent); }
.control-field input[type="number"] {
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--paper);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  width: 110px;
}
.control-field input[type="number"]:focus { outline: none; border-color: var(--accent); }
.control-field-checkbox { flex-direction: row; align-items: center; gap: 8px; }
.control-field-checkbox input { accent-color: var(--accent); width: 16px; height: 16px; }
.control-field-group { display: flex; align-items: flex-end; gap: 10px; }
.pill-group { display: flex; gap: 6px; }

.mode-btn, .resize-mode-toggle button {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--paper-dim);
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}
.mode-btn:hover { border-color: var(--line-strong); color: var(--paper); }
.mode-btn.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.resize-mode-toggle { display: flex; gap: 6px; }

.output-preview { font-family: var(--font-mono); font-size: 0.82rem; color: var(--paper-dim); margin-top: 10px; }

.privacy-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 18px;
}
.privacy-note .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex-shrink: 0; }

/* ==========================================================================
   Content sections (How it works / About / FAQ) — quieter, reference-toned
   ========================================================================== */
.section { padding: 40px 0; border-top: 1px solid var(--line-soft); }
.section h2 { font-size: 1.35rem; }
.section p { color: var(--paper-dim); }

.related-tools {
  border-top: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 4px 0 8px;
}
.related-tools h2 { font-size: 1.1rem; }

.how-steps { padding-left: 22px; margin: 0; color: var(--paper-dim); }
.how-steps li { padding-left: 6px; margin-bottom: 10px; }

.faq-item {
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--paper);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 1.2rem; font-weight: 400; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin-top: 10px; }

/* "Continue converting" (related tools) — a real recommendation section,
   not a link list. Reuses .related-grid as the wrapper so no HTML
   restructure was needed beyond the section move. */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.related-grid a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--paper);
  font-size: 0.88rem;
  font-weight: 500;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.related-grid a:hover {
  border-color: var(--accent);
  background: var(--surface-3);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--line-soft); padding: 32px 0 48px; margin-top: 20px; }
.site-footer .wrap { font-size: 0.82rem; color: var(--muted); }

/* ==========================================================================
   Homepage — hero
   ========================================================================== */
.home-hero { padding: 88px 0 56px; text-align: center; }
.home-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-wash);
  border: 1px solid var(--accent-dim);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
}
.home-hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4rem);
  max-width: 18ch;
  margin: 0 auto 18px;
  font-weight: 700;
}
.home-hero .lede { font-size: 1.15rem; max-width: 56ch; margin: 0 auto 36px; color: var(--paper-dim); }

/* Primary hero action: search doubles as the "convert your files" entry
   point for a multi-tool product — typing jumps straight to a matching
   tool via the existing filter script below. */
.home-search-wrap { max-width: 620px; margin: 0 auto 22px; text-align: left; padding: 0; }
.home-search {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--line-strong);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  box-shadow: var(--shadow-2);
}
.home-search::placeholder { color: var(--muted); }
.home-search:focus-visible { outline: none; border-color: var(--accent); }
.home-search-meta { margin-top: 10px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); text-align: center; }
.home-search-empty {
  display: none;
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}
.home-search-empty.active { display: block; }

.home-hero-ctas { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 28px 0 26px; }
.home-trust-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }

/* ==========================================================================
   Homepage — popular strip + category sections
   ========================================================================== */
.home-section-head { margin-bottom: 22px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.home-section-head h2 { margin-bottom: 4px; }
.home-section-head p { color: var(--paper-dim); margin: 0; max-width: 60ch; }

.category-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 44px; }
.category-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--paper-dim);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
}
.category-nav a:hover { color: var(--paper); border-color: var(--line-strong); text-decoration: none; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }

.tool-card-mini {
  display: block;
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.tool-card-mini:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
  text-decoration: none;
  transform: translateY(-2px);
}
.tool-card-mini .tool-badge-row { margin-bottom: 12px; }
.tool-card-mini .fmt-badge { font-size: 0.68rem; padding: 3px 8px; }
.tool-card-mini h3 { font-size: 0.98rem; color: var(--paper); margin: 0 0 6px; }
.tool-card-mini p { color: var(--paper-dim); font-size: 0.84rem; margin: 0; line-height: 1.5; }
.tool-card-mini[hidden] { display: none; }

.tool-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  background: var(--accent-wash);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

/* Popular row — featured, larger treatment to create real hierarchy
   against the plain category grids beneath it */
.popular-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.popular-card {
  display: block;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.popular-card:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--surface-3); text-decoration: none; }
.popular-card .tool-badge-row { margin-bottom: 16px; }
.popular-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.popular-card p { font-size: 0.86rem; color: var(--paper-dim); margin: 0; }

/* ==========================================================================
   Homepage — trust / privacy grid
   ========================================================================== */
.home-privacy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.home-privacy-item {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.home-privacy-item h3 { font-size: 0.98rem; margin: 0 0 8px; color: var(--paper); }
.home-privacy-item p { color: var(--paper-dim); font-size: 0.87rem; margin: 0; }

.home-feature-banner {
  border: 1px solid var(--accent-dim);
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.home-feature-copy { flex: 1; min-width: 240px; }
.home-feature-banner h2 { font-size: 1.2rem; margin-bottom: 8px; }
.home-feature-banner p { color: var(--paper-dim); margin: 0; max-width: 55ch; }
.home-feature-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* ==========================================================================
   PDF tool components
   ========================================================================== */
.pdf-info-line { font-family: var(--font-mono); font-size: 0.85rem; color: var(--paper-dim); margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.pdf-truncate-note { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--accent-dim); border-radius: var(--radius-sm); background: var(--accent-wash); color: var(--paper-dim); font-size: 0.85rem; }

.pdf-page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 18px; }
.pdf-page-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); overflow: hidden; display: flex; flex-direction: column; }
.pdf-page-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: var(--surface-3);
  display: block;
}
.pdf-page-card .pdf-page-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.pdf-page-card .pdf-page-meta button { background: none; border: none; color: var(--accent); cursor: pointer; font-family: var(--font-mono); font-size: 0.75rem; padding: 0; }
.pdf-page-card.errored { border-color: var(--error); align-items: center; justify-content: center; min-height: 100px; padding: 10px; }
.pdf-page-card.errored .pdf-page-meta { color: var(--error); }

/* ==========================================================================
   Cropper
   ========================================================================== */
.crop-stage { margin-top: 20px; }
.crop-image-wrap { position: relative; max-width: 100%; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); }
.crop-image-wrap img { display: block; max-width: 100%; height: auto; }
.crop-box { position: absolute; border: 2px solid var(--accent); box-shadow: 0 0 0 9999px rgba(10, 11, 16, 0.6); cursor: move; }
.crop-handle { position: absolute; width: 12px; height: 12px; background: var(--accent); border: 2px solid var(--on-accent); border-radius: 50%; }
.crop-dims { font-family: var(--font-mono); font-size: 0.8rem; color: var(--paper-dim); margin-top: 10px; }

.rotate-preview-stage { margin-top: 20px; }
.rotate-preview-wrap { display: flex; justify-content: center; padding: 24px; background: var(--surface-3); border-radius: var(--radius); }
.rotate-preview-wrap img { max-width: 100%; max-height: 260px; transition: transform 0.2s ease; }

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 640px) {
  .tool-card { padding: 20px; }
  .dropzone { padding: 44px 20px; }
  .controls { flex-direction: column; align-items: stretch; }
  .control-field input[type="range"] { width: 100%; }
  .home-hero { padding: 56px 0 40px; }
  .home-hero-ctas .btn { width: 100%; }
  .tool-grid { grid-template-columns: 1fr; }
  .popular-grid { grid-template-columns: 1fr; }
  .home-feature-banner { padding: 22px 18px; }
  .file-row { flex-wrap: wrap; }
}
