/* ForgeMyFile — privacy-first file converter
   ------------------------------------------------------------- */

:root {
  /* type */
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* light palette — warm-cool neutral, calm */
  --bg: #fafbfc;
  --bg-elev: #ffffff;
  --bg-sunken: #f3f5f7;
  --border: #e3e7ec;
  --border-strong: #c9d0d8;
  --text: #0f1620;
  --text-muted: #4d5764;       /* darkened from #5a6573 (~6:1 → ~7.2:1 on --bg) */
  --text-soft:  #6e7886;       /* darkened from #8b95a3 (~3.6:1 → ~4.8:1) */

  --primary: oklch(0.45 0.15 250);
  --primary-hover: oklch(0.4 0.16 250);
  --primary-soft: oklch(0.96 0.025 250);
  --primary-border: oklch(0.88 0.06 250);

  --safe: oklch(0.55 0.13 150);
  --safe-soft: oklch(0.96 0.04 150);
  --safe-border: oklch(0.85 0.08 150);

  --warn: oklch(0.7 0.15 75);
  --danger: oklch(0.55 0.18 25);

  --ad-bg: #f7f4ec;
  --ad-border: #e6dfcb;
  --ad-text: #8a7c52;

  --shadow-sm: 0 1px 2px rgba(15, 22, 32, 0.04), 0 1px 1px rgba(15, 22, 32, 0.03);
  --shadow-md: 0 4px 12px rgba(15, 22, 32, 0.06), 0 2px 4px rgba(15, 22, 32, 0.04);
  --shadow-lg: 0 16px 40px rgba(15, 22, 32, 0.1), 0 4px 8px rgba(15, 22, 32, 0.05);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --container: 1240px;
  --container-wide: 1320px;
}

[data-theme="dark"] {
  --bg: #0d1117;
  --bg-elev: #151b24;
  --bg-sunken: #0a0f15;
  --border: #232c38;
  --border-strong: #344050;
  --text: #e6ecf3;
  --text-muted: #b3bcc8;       /* lightened for ≥4.5:1 on dark bg */
  --text-soft: #8a93a1;        /* lightened from #6b7484 */

  --primary: oklch(0.7 0.13 250);
  --primary-hover: oklch(0.78 0.12 250);
  --primary-soft: oklch(0.25 0.06 250);
  --primary-border: oklch(0.35 0.08 250);

  --safe: oklch(0.72 0.13 150);
  --safe-soft: oklch(0.22 0.05 150);
  --safe-border: oklch(0.35 0.08 150);

  --ad-bg: #1a1812;
  --ad-border: #2c281c;
  --ad-text: #9c8e62;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; min-width: 0; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Hard guard against any child overflowing past the viewport */
  overflow-x: hidden;
}

/* containers must shrink with their grid/flex parents */
main, aside, section, .tool-cat, .tool-grid, .privacy-block, .seo-section,
.compare-wrap, .converter, .hero {
  min-width: 0;
  max-width: 100%;
}

img, svg, video, iframe, table { max-width: 100%; }
table { width: 100%; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg-elev) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--primary);
  display: grid;
  place-items: center;
  color: white;
}
.nav {
  display: flex;
  gap: 4px;
  margin-left: 24px;
}
.nav a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
}
.nav a:hover { color: var(--text); background: var(--bg-sunken); text-decoration: none; }
.header-spacer { flex: 1; }

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--safe-soft);
  border: 1px solid var(--safe-border);
  color: var(--safe);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.privacy-badge:hover { transform: translateY(-1px); }
.privacy-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--safe);
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--safe) 60%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.theme-toggle, .icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px; height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}
/* hamburger — visible on phones only */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px; height: 44px;
  border-radius: 8px;
  align-items: center; justify-content: center;
  margin-left: 4px;
}
.nav-toggle:hover { background: var(--bg-sunken); }
.nav-toggle[aria-expanded="true"] svg .open { display: none; }
.nav-toggle[aria-expanded="false"] svg .close { display: none; }

.mobile-nav {
  display: none;
  position: fixed;
  top: 56px; left: 0; right: 0;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  z-index: 49;
  padding: 8px;
}
.mobile-nav.show { display: block; }
.mobile-nav a {
  display: block;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text);
  border-radius: 8px;
  font-weight: 500;
}
.mobile-nav a:hover { background: var(--bg-sunken); text-decoration: none; }
.mobile-nav .sep { height: 1px; background: var(--border); margin: 6px 8px; }
.theme-toggle:hover, .icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-sunken);
}

/* ---------- ad slots ---------- */
.ad-slot {
  background: var(--ad-bg);
  border: 1px dashed var(--ad-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--ad-text);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  gap: 6px;
  position: relative;
}
.ad-slot::before {
  content: "Advertisement";
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0.7;
}
.ad-slot .ad-size { opacity: 0.55; font-size: 10px; }

/* Once an ad network is active:
   - drop the dashed-placeholder visual
   - drop fixed sizes (per Ezoic: "reserving space for the ad may result in
     empty white space if an ad doesn't load"). Ezoic's script handles sizing. */
body.ezoic-active .ad-slot,
body.adsense-active .ad-slot {
  background: transparent;
  border: none;
  padding: 0;
  /* let it collapse if no ad fills */
  min-height: 0;
  height: auto;
  width: auto;
  max-width: none;
}
body.ezoic-active .ad-slot::before,
body.adsense-active .ad-slot::before { content: ""; }
body.ezoic-active .ad-rail,
body.adsense-active .ad-rail {
  position: static; /* sticky 600px box was a fixed reservation */
}
/* Per Ezoic docs: never style the inner placeholder div. */
[id^="ezoic-pub-ad-placeholder-"] { /* intentionally empty */ }

.ad-top { width: 100%; max-width: 728px; height: 90px; margin: 16px auto 0; }
.ad-rail { width: 300px; height: 600px; position: sticky; top: 88px; }
.ad-native {
  width: 100%;
  min-height: 110px;
  margin: 24px 0;
  padding: 24px;
  align-items: flex-start;
}
.ad-step {
  width: 100%;
  min-height: 90px;
  margin: 16px 0;
}
.ad-sticky-mobile {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  z-index: 40;
  border-radius: 0;
  border-left: none; border-right: none;
}

/* ---------- main layout ---------- */
.shell {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.with-rails {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  gap: 32px;
  margin-top: 24px;
  align-items: start;
}

/* ---------- hero ---------- */
.hero {
  padding: 56px 0 24px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--safe);
  background: var(--safe-soft);
  border: 1px solid var(--safe-border);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(36px, 5.5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 20px;
  text-wrap: balance;
}
.hero h1 .hi {
  background: linear-gradient(110deg, var(--primary), var(--safe));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lede {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 28px;
  text-wrap: pretty;
}
@media (min-width: 1024px) {
  .hero p.lede { max-width: 820px; }
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--text-muted);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust svg { color: var(--safe); }

/* ---------- privacy status panel ---------- */
.privacy-status {
  margin: 32px auto 0;
  max-width: 720px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  box-shadow: var(--shadow-sm);
  text-align: left;
}
.privacy-status .ps-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.privacy-status .ps-head .live {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--safe);
}
.privacy-status .ps-head .live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--safe);
  animation: pulse 1.6s infinite;
}
.privacy-status ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.privacy-status li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--text);
}
.privacy-status li .check { color: var(--safe); }
.privacy-status li .val { color: var(--text-muted); }
.privacy-status li .val.good { color: var(--safe); font-weight: 600; }

/* ---------- tool grid ---------- */
.section { padding: 56px 0 24px; }
.section h2 {
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  font-weight: 700;
  text-wrap: balance;
}
.section p.section-lede {
  color: var(--text-muted);
  font-size: 17px;
  margin: 0 0 32px;
  max-width: 620px;
  text-wrap: pretty;
}

.tool-cat { margin-bottom: 32px; }
.tool-cat-head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.tool-cat-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.tool-cat-head .count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-soft);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 12px;
}
.tool-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  display: flex; flex-direction: column;
  gap: 8px;
  position: relative;
  font-family: inherit;
  color: inherit;
}
.tool-card:hover {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.tool-card.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 15%, transparent);
}
.tool-card .ico {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg-sunken);
  display: grid; place-items: center;
  color: var(--primary);
  margin-bottom: 4px;
}
.tool-card.active .ico { background: var(--bg-elev); }
.tool-card .name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.tool-card .desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}
.tool-card .lock-mini {
  position: absolute;
  top: 16px; right: 16px;
  color: var(--safe);
  opacity: 0.7;
}

/* ---------- converter ---------- */
.converter {
  margin-top: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.converter-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.converter-head h2 {
  font-size: 24px; margin: 0;
  letter-spacing: -0.015em;
}
.converter-head .sub {
  color: var(--text-muted); font-size: 14px; margin: 4px 0 0;
}

.dropzone {
  margin-top: 20px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 56px 24px;
  text-align: center;
  background: var(--bg-sunken);
  transition: all 0.15s;
  cursor: pointer;
  position: relative;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.dropzone .dz-ico {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--primary);
  margin: 0 auto 16px;
}
.dropzone h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.dropzone p { margin: 0 0 14px; color: var(--text-muted); font-size: 14px; }
.dropzone .browse-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  transition: background 0.15s;
}
.dropzone .browse-btn:hover { background: var(--primary-hover); }
.dropzone .stays {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--safe);
  background: var(--safe-soft);
  border: 1px solid var(--safe-border);
  padding: 5px 10px;
  border-radius: 999px;
}

/* file inputs / options */
.tool-options {
  margin-top: 16px;
  display: flex; flex-wrap: wrap; gap: 12px;
  padding: 14px;
  background: var(--bg-sunken);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.tool-options label {
  font-size: 13px;
  color: var(--text-muted);
  display: flex; flex-direction: column; gap: 4px;
}
.tool-options input, .tool-options select, .tool-options textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elev);
  color: var(--text);
  min-width: 120px;
}
.tool-options textarea { width: 100%; min-height: 120px; resize: vertical; font-family: var(--font-mono); }
.tool-options input:focus, .tool-options select:focus, .tool-options textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 18%, transparent);
}
.options-row { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; }
.options-row label { flex: 1 1 140px; }

/* file list / progress */
.file-list { margin-top: 16px; display: grid; gap: 10px; }
.file-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.file-thumb {
  width: 44px; height: 44px;
  border-radius: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-soft);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-meta .name {
  font-size: 14px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 320px;
}
.file-meta .size {
  font-size: 12px; color: var(--text-soft); font-family: var(--font-mono);
}
.file-status {
  font-size: 12px; font-family: var(--font-mono);
  color: var(--text-soft);
  display: inline-flex; align-items: center; gap: 6px;
}
.file-status.done { color: var(--safe); }
.file-status.err { color: var(--danger); }

.progress-bar {
  height: 6px; background: var(--bg-sunken);
  border-radius: 999px; overflow: hidden;
  margin-top: 12px;
}
.progress-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--safe));
  transition: width 0.3s;
}
.processing-locally {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}
.processing-locally .cpu {
  width: 14px; height: 14px;
  color: var(--primary);
  animation: spin 2.5s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* convert button */
.btn-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn {
  border: 1px solid transparent;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.15s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary:disabled {
  background: var(--bg-sunken);
  color: var(--text-muted);
  border-color: var(--border);
  cursor: not-allowed;
  opacity: 1;            /* override default 0.5 — better contrast for AA */
}
.btn-primary:disabled svg { opacity: 0.7; }
.btn-row .btn-help {
  font-size: 12px; color: var(--text-soft);
  font-family: var(--font-mono);
  align-self: center; margin-left: 4px;
}
.btn-row .btn-help[hidden] { display: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-sunken); }

/* success */
.success-card {
  margin-top: 16px;
  background: var(--safe-soft);
  border: 1px solid var(--safe-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.success-card .check-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--safe);
  color: white;
  display: grid; place-items: center;
  margin: 0 auto 14px;
  animation: pop 0.4s ease-out;
}
@keyframes pop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
.success-card h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.015em; }
.success-card p {
  margin: 0 auto 12px;
  color: var(--text-muted);
  max-width: 480px;
  font-size: 14.5px;
}
.success-card .reassurance {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--safe);
  background: var(--bg-elev);
  border: 1px solid var(--safe-border);
  padding: 6px 12px;
  border-radius: 999px;
  margin-top: 10px;
}

/* ---------- comparison table ---------- */
.compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
table.compare {
  width: 100%; border-collapse: collapse; min-width: 580px;
  font-size: 14px;
}

/* mobile: stacked label / FMF / typical layout, no horizontal scroll */
@media (max-width: 640px) {
  .compare-wrap { border: none; background: transparent; overflow: visible; }
  table.compare { min-width: 0; display: block; }
  .compare thead { display: none; }
  .compare tbody { display: block; }
  .compare tr {
    display: block;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    padding: 12px 14px;
  }
  .compare td { display: block; border: none; padding: 4px 0; font-size: 14px; }
  .compare td.row-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-soft);
    font-weight: 600;
    margin-bottom: 4px;
    padding-bottom: 4px;
  }
  .compare td:nth-of-type(2)::before { content: "ForgeMyFile · "; color: var(--primary); font-weight: 600; }
  .compare td:nth-of-type(3)::before { content: "Typical · ";    color: var(--text-soft); }
}
.compare th, .compare td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-sunken);
}
.compare th.us { color: var(--primary); }
.compare tbody tr:last-child td { border-bottom: none; }
.compare .row-label { font-weight: 500; color: var(--text); }
.compare .yes { color: var(--safe); font-weight: 600; }
.compare .no  { color: var(--danger); font-weight: 600; }
.compare .neutral { color: var(--text-muted); }

/* ---------- trust badges ---------- */
.trust-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.trust-pill {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.trust-pill .ico {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--safe-soft);
  color: var(--safe);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.trust-pill .label {
  font-size: 14px; font-weight: 600;
}
.trust-pill .sub {
  font-size: 12px; color: var(--text-muted);
}

/* ---------- SEO sections ---------- */
.seo-section {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 18px;
}
.seo-section h2 {
  font-size: 24px;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  text-wrap: balance;
}
.seo-section .seo-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 6px;
}
.seo-section p { color: var(--text-muted); margin: 0 0 14px; max-width: 720px; text-wrap: pretty; }
.seo-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  margin-top: 18px;
}
.steps { list-style: none; padding: 0; margin: 0 0 16px; counter-reset: step; }
.steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 10px 0;
  align-items: flex-start;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  width: 26px; height: 26px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}
.steps li b { display: block; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.steps li span { font-size: 14px; color: var(--text-muted); }

.faq details {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  padding: 6px 0;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--text-soft);
  font-size: 18px;
}
.faq details[open] summary::after { content: "−"; color: var(--primary); }
.faq details p { font-size: 14px; color: var(--text-muted); margin: 8px 0 4px; }

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.related-card {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-sunken);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  font-family: inherit;
  color: inherit;
  text-align: left;
}
.related-card:hover { border-color: var(--primary-border); background: var(--primary-soft); }
.related-card .ico { color: var(--primary); flex-shrink: 0; }

/* ---------- privacy section ---------- */
.privacy-block {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.privacy-block h2 { font-size: 30px; margin: 0 0 8px; letter-spacing: -0.02em; }
.privacy-block .lede {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 680px;
  margin-bottom: 28px;
  text-wrap: pretty;
}
.privacy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}
.privacy-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg-sunken);
}
.privacy-card.good { border-color: var(--safe-border); background: var(--safe-soft); }
.privacy-card.warn { border-color: oklch(0.85 0.07 75); background: oklch(0.97 0.025 75); }
[data-theme="dark"] .privacy-card.warn { background: oklch(0.22 0.04 75); border-color: oklch(0.4 0.08 75); }
.privacy-card h4 {
  margin: 0 0 6px; font-size: 15px;
  display: flex; align-items: center; gap: 8px;
}
.privacy-card.good h4 { color: var(--safe); }
.privacy-card.warn h4 { color: var(--warn); }
.privacy-card ul { padding-left: 18px; margin: 8px 0 0; font-size: 14px; color: var(--text-muted); }
.privacy-card ul li { margin-bottom: 4px; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: color-mix(in oklab, #000 55%, transparent);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.modal-backdrop.show { display: flex; animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.modal h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.015em; }
.modal .modal-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--safe);
  background: var(--safe-soft);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.modal .close {
  position: absolute; top: 16px; right: 16px;
  background: transparent; border: none;
  width: 32px; height: 32px;
  border-radius: 6px;
  color: var(--text-muted);
  display: grid; place-items: center;
}
.modal .close:hover { background: var(--bg-sunken); color: var(--text); }
.modal-list { padding: 0; list-style: none; margin: 12px 0; }
.modal-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: grid; grid-template-columns: 22px 1fr; gap: 12px;
}
.modal-list li:last-child { border-bottom: none; }
.modal-list .check { color: var(--safe); margin-top: 3px; }
.modal-list b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.modal-list span { font-size: 13.5px; color: var(--text-muted); }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 64px;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-inner .flinks { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-inner .flinks a { color: var(--text-muted); }

/* ---------- popunder notice ---------- */
.popunder-toast {
  position: fixed;
  bottom: 80px; right: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--text-muted);
  display: none;
  max-width: 280px;
  z-index: 60;
}
.popunder-toast.show { display: block; animation: fade 0.3s; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .with-rails { grid-template-columns: 1fr; gap: 20px; }
  .ad-rail { display: none; }
  .seo-grid, .privacy-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 640px) {
  .shell { padding: 0 16px; }
  .header-inner { padding: 12px 16px; gap: 8px; }
  .converter { padding: 18px; }
  .dropzone { padding: 36px 16px; }
  .privacy-block, .seo-section { padding: 22px; }
  .related-grid { grid-template-columns: 1fr; }
  .ad-sticky-mobile { display: flex; }
  body { padding-bottom: 64px; }
  /* touch targets ≥44 on phones */
  .privacy-badge { font-size: 12px; padding: 8px 12px; min-height: 36px; }
  .theme-toggle, .nav-toggle, .lang-btn { min-height: 44px; min-width: 44px; }
  .lang-btn { padding: 8px 12px; }
}
@media (max-width: 540px) {
  /* hide brand wordmark to leave room for header buttons */
  .brand span.full { display: none; }
  /* privacy status panel — stack k/v vertically */
  .privacy-status li {
    grid-template-columns: 18px 1fr;
    grid-template-rows: auto auto;
    row-gap: 2px;
  }
  .privacy-status li .val { grid-column: 2; font-size: 12px; }
  /* hero trust as 2x2 grid */
  .hero-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: start;
    gap: 8px 14px;
    text-align: left;
    max-width: 320px;
    margin-left: auto; margin-right: auto;
  }
  .hero-trust span { white-space: nowrap; }
}

/* wide screens: more density in the converter section */
@media (min-width: 1180px) {
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .converter { padding: 36px; }
}
@media (min-width: 1400px) {
  .with-rails { grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 40px; }
}

/* fullscreen modal-style mobile nav backdrop click-target */
.mobile-nav-backdrop {
  display: none;
  position: fixed;
  top: 56px; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 48;
}
.mobile-nav-backdrop.show { display: block; }
