/* Self-hosted fonts (Inter + Manrope, SIL Open Font License; latin + latin-ext). */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/manrope-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   Clipimo — dark / red noir downloader
   Design tokens
   ============================================================ */
:root {
  /* backgrounds */
  --bg: #050505;
  --surface-1: #0a0a0a;
  --surface-2: #101010;
  --surface-3: #141414;
  --surface-hover: #171717;

  /* text */
  --text: #f5f5f5;
  --text-2: #a1a1aa;   /* zinc-400 */
  --text-3: #71717a;   /* zinc-500 */

  /* accent */
  --red: #e6293e;
  --red-hi: #ff3b52;
  --red-dim: #b81f30;
  --red-glow: rgba(230, 41, 62, 0.45);
  --red-wash: rgba(230, 41, 62, 0.08);

  /* borders */
  --hair: rgba(255, 255, 255, 0.07);
  --hair-2: rgba(255, 255, 255, 0.12);
  --hair-red: rgba(230, 41, 62, 0.35);

  /* layout */
  --max: 1200px;
  --nav-h: 68px;
  --radius: 14px;
  --radius-sm: 10px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

/* light fallback guarded per contract (this product is dark-first) */
:root:not([data-theme="dark"]) { color-scheme: dark; }

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

/* The HTML `hidden` attribute must always win over component display rules
   (e.g. .result{display:grid}, .dl-error{display:flex}, .dl-clear{display:inline-flex}).
   JS toggles state via `el.hidden = true/false`, which adds/removes the attribute,
   so legitimate transitions still work — the element simply shows again once the
   attribute is gone. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--red); color: #fff; }

:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 2px; border-radius: 4px; }

/* ============================================================
   Background depth
   ============================================================ */
.bg-layer { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.bg-grid {
  background-image:
    linear-gradient(var(--hair) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 62%);
  -webkit-mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 62%);
  opacity: 0.5;
}

.bg-glow {
  background:
    radial-gradient(600px 420px at 50% 4%, rgba(230, 41, 62, 0.16), transparent 70%),
    radial-gradient(900px 600px at 50% 0%, rgba(230, 41, 62, 0.06), transparent 65%);
}

.bg-noise {
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   Nav
   ============================================================ */
.nav-wrap {
  position: fixed;
  top: 16px; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 24px;
}
.nav {
  width: 100%;
  max-width: var(--max);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 18px;
  background: rgba(10, 10, 10, 0.66);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--hair);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.brand-mark { color: var(--red); display: inline-flex; }
.brand-name { color: var(--text); }

.nav-center { display: flex; gap: 4px; }
.nav-link {
  font-size: 14px; color: var(--text-2); font-weight: 500;
  padding: 7px 13px; border-radius: 999px;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-secondary { font-size: 14px; color: var(--text-2); font-weight: 500; padding: 7px 12px; transition: color 0.18s var(--ease); }
.nav-secondary:hover { color: var(--text); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.14s var(--ease), background 0.18s var(--ease),
              box-shadow 0.2s var(--ease), border-color 0.18s var(--ease), opacity 0.18s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, var(--red-hi), var(--red));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset, 0 6px 20px -8px var(--red-glow);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #ff4d63, var(--red-hi));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1) inset, 0 10px 30px -8px var(--red-glow);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset, 0 4px 12px -6px var(--red-glow); }
.btn-primary:disabled { opacity: 0.42; cursor: not-allowed; }
.btn-sm { height: 38px; padding: 0 18px; font-size: 14px; }
.nav-cta { border-radius: 999px; }

/* ============================================================
   Hero
   ============================================================ */
main { position: relative; z-index: 1; }
.hero {
  max-width: 860px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 76px) 24px 96px;
  text-align: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--text-2);
  padding: 6px 14px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--surface-1);
  margin: 0 0 26px;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px 1px var(--red-glow); }

.hero-title {
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.04;
  font-weight: 800;
  margin: 0 0 20px;
}
.accent-text { color: var(--text-3); }

.hero-sub {
  color: var(--text-2);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto 40px;
}

/* ============================================================
   Downloader
   ============================================================ */
.downloader { max-width: 800px; margin: 0 auto; text-align: left; }

.dl-form { width: 100%; }
.dl-field {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--hair-2);
  border-radius: var(--radius);
  padding: 8px 8px 8px 16px;
  transition: border-color 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.2s;
  box-shadow: 0 20px 60px -30px rgba(0,0,0,0.9);
}
.dl-field:focus-within {
  border-color: var(--hair-red);
  box-shadow: 0 0 0 3px var(--red-wash), 0 20px 60px -30px rgba(0,0,0,0.9);
}
.dl-field[data-state="detected"] { border-color: var(--hair-red); }
.dl-field[data-state="invalid"] { border-color: rgba(230,41,62,0.5); box-shadow: 0 0 0 3px var(--red-wash); }

.dl-platform-icon { color: var(--text-3); display: inline-flex; flex-shrink: 0; transition: color 0.2s; }
.dl-field[data-state="detected"] .dl-platform-icon { color: var(--red); }

.dl-input {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  color: var(--text);
  font-family: var(--font-body); font-size: 16px;
  padding: 12px 4px;
}
.dl-input::placeholder { color: var(--text-3); }

.dl-clear {
  background: none; border: none; cursor: pointer;
  color: var(--text-3); display: inline-flex; padding: 6px; border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.dl-clear:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.dl-submit { height: 46px; padding: 0 24px; flex-shrink: 0; position: relative; }
.dl-spinner {
  position: absolute; width: 17px; height: 17px;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  border-radius: 50%; opacity: 0; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.dl-submit.loading .dl-submit-label { opacity: 0; }
.dl-submit.loading .dl-spinner { opacity: 1; }

/* status line */
.dl-status { margin: 14px 2px 0; min-height: 20px; }
.dl-status-text {
  font-size: 13.5px; color: var(--text-3);
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.2s;
}
.dl-status-text::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-3); transition: background 0.2s, box-shadow 0.2s;
}
.dl-status[data-tone="detected"] .dl-status-text { color: var(--red-hi); }
.dl-status[data-tone="detected"] .dl-status-text::before { background: var(--red); box-shadow: 0 0 8px 1px var(--red-glow); }
.dl-status[data-tone="invalid"] .dl-status-text { color: #f0a; color: var(--red-hi); }
.dl-status[data-tone="invalid"] .dl-status-text::before { background: var(--red); }
.dl-status[data-tone="loading"] .dl-status-text { color: var(--text-2); }

/* support row */
.dl-support {
  display: flex; align-items: center; gap: 22px;
  margin: 22px 2px 0; flex-wrap: wrap;
  transition: opacity 0.3s var(--ease);
}
.support-item { display: flex; align-items: center; gap: 10px; }
.support-mark {
  display: inline-flex; color: var(--text-2);
  width: 30px; height: 30px; align-items: center; justify-content: center;
  border: 1px solid var(--hair); border-radius: 8px; background: var(--surface-1);
}
.support-name { font-weight: 600; font-size: 14px; color: var(--text); }
.support-types { font-size: 13px; color: var(--text-3); }
.support-divider { width: 1px; height: 26px; background: var(--hair); }

/* ============================================================
   Result panel
   ============================================================ */
.result {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  background: var(--surface-1);
  border: 1px solid var(--hair-2);
  border-radius: var(--radius);
  padding: 20px;
  animation: rise 0.4s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.result-media { position: relative; }
.result-thumb {
  width: 100%; aspect-ratio: 9 / 16; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface-3);
  border: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: center;
}
.result-thumb svg { width: 100%; height: 100%; display: block; }
.result-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result-thumb[data-shape="square"] { aspect-ratio: 1 / 1; }
.result-thumb[data-shape="wide"] { aspect-ratio: 16 / 9; }
.result-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 6px;
  background: rgba(5,5,5,0.7); color: var(--text);
  border: 1px solid var(--hair-2); backdrop-filter: blur(6px);
}

.result-info { display: flex; flex-direction: column; }
.result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.result-title { font-size: 21px; }
.result-reset {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--hair); color: var(--text-2);
  font-size: 13px; font-family: var(--font-body); font-weight: 500;
  padding: 6px 11px; border-radius: 8px; cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.result-reset:hover { color: var(--text); border-color: var(--hair-2); background: rgba(255,255,255,0.03); }

.result-meta {
  display: grid; grid-template-columns: repeat(4, auto);
  gap: 8px 28px; margin: 18px 0 20px; justify-content: start;
}
.result-meta div { display: flex; flex-direction: column; gap: 3px; }
.result-meta dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); }
.result-meta dd { margin: 0; font-size: 14px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }

.result-variants { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.variant {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface-2); border: 1px solid var(--hair);
  border-radius: var(--radius-sm); padding: 11px 12px 11px 15px;
  transition: border-color 0.18s var(--ease), background 0.18s;
}
.variant:hover { border-color: var(--hair-2); background: var(--surface-3); }
.variant-label { font-weight: 600; font-size: 14px; min-width: 92px; }
.variant-meta { font-size: 13px; color: var(--text-3); flex: 1; font-variant-numeric: tabular-nums; }
.variant-tag {
  font-size: 11px; font-weight: 600; color: var(--red-hi);
  border: 1px solid var(--hair-red); background: var(--red-wash);
  padding: 2px 8px; border-radius: 999px;
}
.variant-dl {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 15px; border-radius: 8px;
  background: var(--surface-3); border: 1px solid var(--hair-2); color: var(--text);
  font-family: var(--font-body); font-weight: 600; font-size: 13.5px; cursor: pointer;
  transition: background 0.16s, border-color 0.16s, transform 0.12s;
}
.variant-dl:hover { background: var(--surface-hover); border-color: var(--hair-red); }
.variant-dl:active { transform: translateY(1px); }
.variant.is-primary .variant-dl {
  background: linear-gradient(180deg, var(--red-hi), var(--red)); border-color: transparent; color: #fff;
  box-shadow: 0 5px 16px -8px var(--red-glow);
}
.variant.is-primary .variant-dl:hover { background: linear-gradient(180deg, #ff4d63, var(--red-hi)); }

/* error panel */
.dl-error {
  margin-top: 18px;
  display: flex; align-items: center; gap: 12px;
  background: rgba(230,41,62,0.06); border: 1px solid var(--hair-red);
  border-radius: var(--radius-sm); padding: 14px 16px;
  animation: rise 0.35s var(--ease);
}
.dl-error-icon { color: var(--red-hi); display: inline-flex; flex-shrink: 0; }
.dl-error-text { flex: 1; font-size: 14px; color: var(--text); }
.dl-error-retry {
  background: none; border: 1px solid var(--hair-red); color: var(--red-hi);
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  padding: 6px 13px; border-radius: 8px; cursor: pointer;
  transition: background 0.15s;
}
.dl-error-retry:hover { background: var(--red-wash); }

/* trust */
.trust-copy { text-align: center; margin: 28px 0 0; font-size: 13px; color: var(--text-3); }

/* ============================================================
   SEO landing pages (child routes) — reuse the existing system
   ============================================================ */
.seo-hero { max-width: 860px; }
.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-3); margin: 0 0 20px;
}
.breadcrumb a { color: var(--text-2); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--red-hi); }
.breadcrumb [aria-current="page"] { color: var(--text); }
.breadcrumb-sep { color: var(--text-3); opacity: 0.6; }

.prose {
  color: var(--text-2); font-size: 16px; line-height: 1.7;
  max-width: 720px; margin: 0;
}
.feature-grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .feature-grid-2 { grid-template-columns: 1fr; } }

/* ============================================================
   Sections
   ============================================================ */
.section { max-width: var(--max); margin: 0 auto; padding: 64px 24px; }
.section-narrow { max-width: 760px; }
.section-head { margin-bottom: 40px; }
.section-title { font-size: clamp(26px, 3vw, 34px); }
.section-sub { color: var(--text-2); margin: 10px 0 0; font-size: 16px; }

/* pipeline / how it works */
.pipeline {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: stretch; gap: 0;
}
.pipe-step {
  flex: 1;
  background: var(--surface-1); border: 1px solid var(--hair);
  border-radius: var(--radius); padding: 26px 24px;
  position: relative;
}
.pipe-num {
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  color: var(--red); display: inline-block; margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.pipe-title { font-size: 18px; margin-bottom: 8px; }
.pipe-desc { color: var(--text-2); font-size: 14.5px; margin: 0; }
.pipe-connector {
  flex: 0 0 44px; align-self: center; height: 1px;
  background: linear-gradient(90deg, var(--hair), var(--hair-red), var(--hair));
  position: relative;
}
.pipe-connector::after {
  content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 8px 1px var(--red-glow);
}

/* feature grid (asymmetric) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-card {
  background: var(--surface-1); border: 1px solid var(--hair);
  border-radius: var(--radius); padding: 24px;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease), background 0.22s;
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px 180px at 30% -10%, var(--red-wash), transparent 70%);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.feature-card:hover { border-color: var(--hair-2); transform: translateY(-2px); }
.feature-card:hover::before { opacity: 1; }
.fc-wide { grid-column: span 2; }
.fc-tall { grid-row: span 2; }
.fc-title { font-size: 18px; margin-bottom: 9px; position: relative; }
.fc-desc { color: var(--text-2); font-size: 14.5px; margin: 0; position: relative; }
/* Platform marks on device how-to cards (reuses the .support-mark tile). */
.device-marks { display: flex; gap: 8px; margin-bottom: 16px; position: relative; }
.device-marks .support-mark { width: 40px; height: 40px; border-radius: 10px; color: var(--text); }
.fc-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 22px; position: relative; }
.fc-visual span {
  aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--hair);
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
}
.fc-visual span:nth-child(1) { background: linear-gradient(135deg, rgba(230,41,62,0.18), var(--surface-2)); }

/* tools */
.tools-block { margin-bottom: 32px; }
.tools-label {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  color: var(--text); margin-bottom: 14px;
}
.tools-label .support-mark { width: 26px; height: 26px; }
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tool-link {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  column-gap: 12px; row-gap: 4px;
  background: var(--surface-1); border: 1px solid var(--hair);
  border-radius: var(--radius-sm); padding: 18px 20px;
  transition: border-color 0.2s var(--ease), background 0.2s, transform 0.2s var(--ease);
}
.tool-link:hover { border-color: var(--hair-red); background: var(--surface-2); transform: translateY(-2px); }
.tool-name { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; color: var(--text); }
.tool-desc { grid-column: 1; font-size: 13.5px; color: var(--text-3); }
.tool-arrow {
  grid-row: 1 / 3; grid-column: 2; color: var(--text-3);
  font-size: 18px; transition: color 0.2s, transform 0.2s var(--ease);
}
.tool-link:hover .tool-arrow { color: var(--red); transform: translateX(3px); }

/* why */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.why-col {
  background: var(--surface-1); border: 1px solid var(--hair);
  border-radius: var(--radius); padding: 26px 28px;
}
.why-us { border-color: var(--hair-red); background: linear-gradient(180deg, rgba(230,41,62,0.05), var(--surface-1)); }
.why-tag {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 14px;
  margin-bottom: 16px;
}
.why-us .why-tag { color: var(--red-hi); }
.why-them .why-tag { color: var(--text-3); }
.why-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.why-col li { font-size: 15px; color: var(--text-2); padding-left: 20px; position: relative; }
.why-us li { color: var(--text); }
.why-us li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 2px; background: var(--red); }
.why-them li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 8px; height: 1.5px; background: var(--text-3); }

/* faq */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface-1); border: 1px solid var(--hair);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--hair-2); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 18px 20px;
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chev { width: 12px; height: 12px; flex-shrink: 0; position: relative; }
.faq-chev::before, .faq-chev::after {
  content: ""; position: absolute; top: 50%; left: 50%; background: var(--text-2);
  transition: transform 0.25s var(--ease);
}
.faq-chev::before { width: 12px; height: 1.6px; transform: translate(-50%,-50%); }
.faq-chev::after { width: 1.6px; height: 12px; transform: translate(-50%,-50%); }
.faq-item[open] .faq-chev::after { transform: translate(-50%,-50%) scaleY(0); }
.faq-item[open] .faq-chev::before { background: var(--red); }
.faq-item p { margin: 0 20px 18px; color: var(--text-2); font-size: 14.5px; }

/* ============================================================
   Footer
   ============================================================ */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--hair); margin-top: 40px; }
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 56px 24px 40px;
  display: grid; grid-template-columns: 1.4fr 2fr; gap: 48px;
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-statement { color: var(--text-2); font-size: 14.5px; max-width: 320px; margin: 0; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1000px) { .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 600; margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: var(--text-2); transition: color 0.15s; }
.footer-col a:hover { color: var(--red-hi); }
.footer-bottom {
  max-width: var(--max); margin: 0 auto; padding: 22px 24px;
  border-top: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 13px; color: var(--text-3);
}

/* ============================================================
   Responsive niceties (desktop-first; graceful down-scale)
   ============================================================ */
@media (max-width: 1040px) {
  .fc-wide { grid-column: span 2; }
}
@media (max-width: 860px) {
  .nav-center { display: none; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .fc-wide, .fc-tall { grid-column: auto; grid-row: auto; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  .result { grid-template-columns: 1fr; }
  .result-media { max-width: 220px; }
  .pipeline { flex-direction: column; }
  .pipe-connector { width: 1px; height: 32px; flex-basis: 32px; background: linear-gradient(180deg, var(--hair), var(--hair-red)); }
  .tools-grid, .why-grid, .feature-grid { grid-template-columns: 1fr; }
  .dl-field { flex-wrap: wrap; }
  .dl-submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ============================================================
   Language selector (header) — native <details>, premium/compact
   ============================================================ */
.lang-select { position: relative; }
.lang-trigger {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 12px; border-radius: 999px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  letter-spacing: 0.02em; color: var(--text-2);
  border: 1px solid var(--hair); background: var(--surface-1);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.lang-trigger::-webkit-details-marker { display: none; }
.lang-trigger::marker { content: ""; }
.lang-trigger:hover { color: var(--text); border-color: var(--hair-2); background: var(--surface-2); }
.lang-select[open] .lang-trigger { color: var(--text); border-color: var(--hair-red); }
.lang-trigger .lang-code { font-weight: 700; }
.lang-chev {
  width: 7px; height: 7px; flex-shrink: 0;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 0.2s var(--ease);
}
.lang-select[open] .lang-chev { transform: rotate(-135deg) translate(-1px, -1px); }

.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 184px; max-width: calc(100vw - 24px);
  max-height: 70vh; overflow: auto;
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px; z-index: 60;
  background: rgba(12, 12, 12, 0.97);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--hair-2); border-radius: 12px;
  box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.7);
}
.lang-opt {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--text-2); font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.lang-opt:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.lang-opt .lang-code {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--text-3); min-width: 22px;
}
.lang-opt .lang-name { font-family: var(--font-display); font-weight: 600; }
.lang-opt.is-current { background: var(--red-wash); color: var(--text); }
.lang-opt.is-current .lang-code { color: var(--red-hi); }

/* RTL: open the menu toward the start (visual left) edge */
[dir="rtl"] .lang-menu { right: auto; left: 0; }

/* Mobile: keep the control compact and the menu on-screen next to the CTA */
@media (max-width: 560px) {
  .lang-trigger { padding: 0 10px; height: 36px; }
  .lang-menu { min-width: 170px; }
}

/* ============================================================
   RTL (Arabic) — scoped overrides only.
   These rules apply ONLY under [dir="rtl"], so LTR locales
   (en/de/nl/fr) are byte-for-byte unaffected. They mirror the
   handful of places that hardcode a left/right assumption; the
   rest of the layout is flex/grid-centered and direction-agnostic.
   ============================================================ */
[dir="rtl"] { text-align: right; }

/* the downloader block is left-aligned in LTR → right-aligned in RTL */
[dir="rtl"] .downloader { text-align: right; }

/* the URL input stays LTR (Instagram/Facebook URLs), left-aligned text */
[dir="rtl"] .dl-input { text-align: left; }

/* mirror the asymmetric paddings */
[dir="rtl"] .nav { padding: 0 18px 0 10px; }
[dir="rtl"] .dl-field { padding: 8px 16px 8px 8px; }
[dir="rtl"] .variant { padding: 11px 15px 11px 12px; }

/* result badge sits in the opposite top corner */
[dir="rtl"] .result-badge { left: auto; right: 10px; }

/* comparison-list bullets move to the right edge */
[dir="rtl"] .why-col li { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .why-us li::before { left: auto; right: 0; }
[dir="rtl"] .why-them li::before { left: auto; right: 2px; }

/* pipeline connector dot points the other way */
[dir="rtl"] .pipe-connector::after { right: auto; left: 0; }

/* the "→" tool arrow should point toward the (RTL) reading flow */
[dir="rtl"] .tool-arrow { transform: scaleX(-1); }
[dir="rtl"] .tool-link:hover .tool-arrow { transform: scaleX(-1) translateX(3px); }

/* numeric/URL/format tokens stay LTR wherever they must read correctly */
[dir="rtl"] .result-meta dd,
[dir="rtl"] .variant-meta { direction: ltr; text-align: right; }

/* Shareable asset (guide pages) */
.share-figure { margin: 24px 0 0; }
.share-figure img { display: block; width: 100%; max-width: 480px; height: auto; margin: 0 auto; border-radius: 16px; border: 1px solid var(--hair-2); }
.embed-label { margin: 24px 0 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.embed-code { margin: 0; padding: 16px; background: var(--surface-2); border: 1px solid var(--hair-2); border-radius: 12px; color: var(--text-2); font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; direction: ltr; text-align: left; }
.updated-note { margin: 10px 0 0; font-size: 13px; color: var(--text-3); }

/* Instagram image resizer (client-side tool) */
.resizer [hidden] { display: none !important; }
.rz-drop { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 20px; border: 1.5px dashed var(--hair-2); border-radius: 18px; background: var(--surface-1); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.rz-drop:hover, .rz-drop.is-over { border-color: var(--hair-red); background: var(--red-wash); }
.rz-drop-text { font-size: 16px; color: var(--text); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.rz-privacy { font-size: 13px; color: var(--text-3); }
.rz-editor { display: flex; flex-direction: column; gap: 14px; }
.rz-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rz-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--hair-2); background: var(--surface-2); color: var(--text-2); font: inherit; font-size: 13.5px; cursor: pointer; }
.rz-chip:hover { color: var(--text); }
.rz-chip.is-active { border-color: var(--red); color: var(--text); background: var(--red-wash); }
.rz-px { font-size: 11.5px; color: var(--text-3); }
.rz-bg { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-3); }
.rz-stage { display: flex; justify-content: center; padding: 14px; border-radius: 16px; background: var(--surface-1); border: 1px solid var(--hair); }
.rz-stage canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 62vh; border-radius: 6px; cursor: grab; touch-action: none; background: #000; }
.rz-stage canvas:active { cursor: grabbing; }
.rz-hint { margin: -4px 0 0; font-size: 13px; color: var(--text-3); text-align: center; }
.rz-zoom { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--text-2); }
.rz-zoom input { flex: 1; accent-color: var(--red); }
.rz-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-ghost { background: transparent; border: 1px solid var(--hair-2); color: var(--text-2); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-3); }
.rz-error { margin: 0; font-size: 14px; color: var(--red-hi); }

/* Nav: tool link, guides dropdown, mobile menu (CSS-only <details>, crawlable links) */
.nav-link-tool { color: var(--text); }
.nav-menu, .nav-burger { position: relative; }
.nav-menu-trigger { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.nav-menu-trigger::-webkit-details-marker, .nav-burger-trigger::-webkit-details-marker { display: none; }
.nav-menu-trigger::marker, .nav-burger-trigger::marker { content: ""; }
.nav-menu[open] .nav-menu-trigger { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-menu[open] .lang-chev { transform: rotate(-135deg) translate(-1px, -1px); }
.nav-menu-list {
  position: absolute; top: calc(100% + 10px); left: 0;
  min-width: 240px; max-width: calc(100vw - 24px);
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px; z-index: 60;
  background: rgba(12, 12, 12, 0.97);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--hair-2); border-radius: 12px;
  box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.7);
}
.nav-menu-opt { padding: 9px 12px; border-radius: 8px; color: var(--text-2); font-size: 14px; transition: background .15s, color .15s; }
.nav-menu-opt:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-menu-strong { color: var(--text); font-weight: 600; }
.nav-menu-head { padding: 10px 12px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.nav-burger { display: none; }
.nav-burger-trigger { width: 38px; padding: 0; justify-content: center; }
.nav-burger-icon, .nav-burger-icon::before, .nav-burger-icon::after { display: block; width: 15px; height: 1.6px; background: currentColor; border-radius: 2px; position: relative; }
.nav-burger-icon::before, .nav-burger-icon::after { content: ""; position: absolute; left: 0; }
.nav-burger-icon::before { top: -5px; }
.nav-burger-icon::after { top: 5px; }
.nav-burger-list { left: auto; right: 0; }
[dir="rtl"] .nav-menu-list { left: auto; right: 0; }
[dir="rtl"] .nav-burger-list { right: auto; left: 0; }
@media (max-width: 1000px) { .nav-link { padding: 7px 10px; } }
@media (max-width: 860px) { .nav-burger { display: block; } }
@media (max-width: 560px) { .nav-burger-trigger { width: 36px; height: 36px; } }
/* Very narrow phones: keep the CTA + menu inside the pill (logo mark stays). */
@media (max-width: 420px) {
  .brand-name { display: none; }
  .nav-right { gap: 6px; }
}
/* Mobile menu spans the screen under the pill so it never runs off-edge. */
@media (max-width: 860px) {
  .nav-burger-list { position: fixed; top: 76px; left: 16px; right: 16px; min-width: 0; max-height: calc(100vh - 96px); overflow: auto; }
  [dir="rtl"] .nav-burger-list { left: 16px; right: 16px; }
}
