/* ============================================================
   ConvertFlow — design system  ("The Workbench")
   Display: Space Grotesk · Body: Inter · Data: Space Mono
   Light + dark theme. Change palette tokens below to re-skin.
   ============================================================ */
:root {
  /* palette — light */
  --bg:          #faf9f6;   /* warm paper */
  --bg-sunken:   #f1efe9;
  --surface:     #ffffff;
  --surface-2:   #faf9f6;
  --ink:         #17161c;   /* near-black, warm */
  --ink-soft:    #55535e;
  --muted:       #908d98;
  --line:        #e8e4dc;   /* warm hairline */
  --primary:     #4b45a8;   /* restrained deep indigo */
  --primary-ink: #3a3589;
  --primary-tint:#eeedf6;
  --accent:      #4b45a8;   /* accent == primary (no coral) */
  --accent-ink:  #3a3589;
  --btn-bg:      #17161c;   /* ink primary buttons (classy) */
  --btn-fg:      #ffffff;
  --success:     #1a9d63;
  --success-bg:  #e9f6ef;
  --success-ink: #0c6b41;
  --danger:      #c0392f;
  --danger-bg:   #fbeeed;
  --danger-ink:  #9a2b23;

  --font-display:'Space Grotesk', system-ui, sans-serif;
  --font:        'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:   'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --radius:      14px;
  --radius-sm:   10px;
  --radius-lg:   18px;
  --shadow-sm:   0 1px 2px rgba(23,22,28,.04);
  --shadow:      0 1px 2px rgba(23,22,28,.04), 0 12px 28px -18px rgba(23,22,28,.24);
  --shadow-lg:   0 24px 60px -28px rgba(23,22,28,.35);
  --ring:        0 0 0 3px rgba(75,69,168,.18);
  --maxw:        1160px;
}
:root[data-theme="dark"] {
  --bg:#131217; --bg-sunken:#1b1a21; --surface:#1c1b22; --surface-2:#222129;
  --ink:#f4f2ec; --ink-soft:#c2bfc8; --muted:#8a8792; --line:#2c2a33;
  --primary:#a49df4; --primary-ink:#b9b3ff; --primary-tint:#26243a;
  --accent:#a49df4; --accent-ink:#b9b3ff;
  --btn-bg:#f4f2ec; --btn-fg:#17161c;
  --success:#48d495; --success-bg:#16301f; --success-ink:#9bf0c6;
  --danger:#ff7a70; --danger-bg:#361a19; --danger-ink:#ffb8b2;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow-lg:0 24px 60px -28px rgba(0,0,0,.7); --shadow:0 1px 2px rgba(0,0,0,.4),0 14px 34px -20px rgba(0,0,0,.7);
  --ring:0 0 0 3px rgba(164,157,244,.3);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#131217; --bg-sunken:#1b1a21; --surface:#1c1b22; --surface-2:#222129;
    --ink:#f4f2ec; --ink-soft:#c2bfc8; --muted:#8a8792; --line:#2c2a33;
    --primary:#a49df4; --primary-ink:#b9b3ff; --primary-tint:#26243a;
    --accent:#a49df4; --accent-ink:#b9b3ff;
    --btn-bg:#f4f2ec; --btn-fg:#17161c;
    --success:#48d495; --success-bg:#16301f; --success-ink:#9bf0c6;
    --danger:#ff7a70; --danger-bg:#361a19; --danger-ink:#ffb8b2;
    --shadow-sm:0 1px 2px rgba(0,0,0,.4);
    --shadow-lg:0 24px 60px -28px rgba(0,0,0,.7); --shadow:0 1px 2px rgba(0,0,0,.4),0 14px 34px -20px rgba(0,0,0,.7);
    --ring:0 0 0 3px rgba(164,157,244,.3);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.6; -webkit-font-smoothing: antialiased; transition: background .3s, color .3s;
}
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.12; color: var(--ink); font-weight: 700; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); }
h3 { font-size: 1.18rem; }
p { color: var(--ink-soft); margin: 0 0 1rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease, background .3s ease; }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 30px -22px rgba(23,22,42,.5); }
.nav { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 1.16rem; color: var(--ink); letter-spacing: -.035em; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 27px; height: 27px; color: var(--primary); display: grid; place-items: center; }
.brand .logo svg { width: 27px; height: 27px; display: block; }
.nav .spacer { flex: 1; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { position: relative; color: var(--ink-soft); font-weight: 500; font-size: .92rem; padding: 4px 0; letter-spacing: -.01em; transition: color .18s ease; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; border-radius: 2px;
  background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .28s cubic-bezier(.2,.7,.2,1); }
.nav-links a:hover::after { transform: scaleX(1); }
.theme-btn { background: transparent; border: 0; width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center; color: var(--ink-soft); transition: color .18s ease, background .18s ease; }
.theme-btn:hover { color: var(--ink); background: var(--bg-sunken); }
.theme-btn svg { width: 19px; height: 19px; }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--ink); padding: 6px; }
.menu-toggle svg { width: 24px; height: 24px; display: block; }
@media (max-width: 860px) {
  .menu-toggle { display: grid; place-items: center; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 6px 22px 14px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a::after { display: none; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 9px; justify-content: center; font-family: var(--font-display);
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 600; font-size: .98rem; padding: 12px 22px; border-radius: 11px;
  border: 0; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, opacity .15s, background .15s; letter-spacing: -.01em; }
.btn:hover { text-decoration: none; color: var(--btn-fg); transform: translateY(-1px); box-shadow: var(--shadow); opacity: .92; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; border-radius: 12px; }
.btn-accent { background: var(--primary); color: #fff; }
.btn-accent:hover { background: var(--primary-ink); color: #fff; opacity: 1; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { background: var(--bg-sunken); color: var(--ink); border-color: var(--ink-soft); opacity: 1; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 84px 0 40px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-soft); font-family: var(--font-mono); font-size: .72rem; letter-spacing: .02em; padding: 6px 13px;
  border-radius: 999px; margin-bottom: 26px; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.hero h1 { max-width: 16ch; margin: 0 auto .7rem; letter-spacing: -.04em; }
.hero .grad { color: var(--primary); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); max-width: 600px; margin: 0 auto 1.7rem; color: var(--ink-soft); }
.trust { display: flex; gap: 12px 26px; justify-content: center; flex-wrap: wrap; margin: 30px 0 4px; }
.trust div { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font-weight: 500; font-size: .9rem; }
.trust .t-ic { color: var(--primary); display: inline-flex; }
.trust .t-ic svg { width: 16px; height: 16px; }

/* ---------- Tool grid ---------- */
.cat-title { display: flex; align-items: center; gap: 12px; margin: 40px 0 4px; }
.cat-title span { font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.cat-title:after { content: ""; height: 1px; background: var(--line); flex: 1; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 16px; margin: 18px 0 8px; }
.tool-card { position: relative; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: transform .16s ease, box-shadow .2s ease, border-color .16s; overflow: hidden; }
.tool-card:after { content: "→"; position: absolute; top: 22px; right: 20px; color: var(--muted); font-family: var(--font-mono);
  opacity: 0; transform: translateX(-4px); transition: .2s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--ink-soft); text-decoration: none; }
.tool-card:hover:after { opacity: 1; transform: translateX(0); color: var(--ink); }
.tool-card .ic { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 16px;
  background: var(--bg-sunken); color: var(--ink); border: 1px solid var(--line); transition: color .16s, background .16s, border-color .16s; }
.tool-card .ic svg { width: 22px; height: 22px; }
.tool-card:hover .ic { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.tool-card h3 { margin: 0 0 4px; font-size: 1.05rem; letter-spacing: -.01em; }
.tool-card p { margin: 0; font-size: .89rem; color: var(--muted); }

/* ---------- Feature cards ---------- */
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .ic { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--primary-tint); color: var(--primary); }
.feature .ic svg { width: 23px; height: 23px; }
.feature h3 { margin-bottom: 4px; font-size: 1.05rem; }
.feature p { margin: 0; font-size: .92rem; }

/* ---------- Tool page ---------- */
.crumbs { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); padding: 22px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--primary); }
.tool-hero { text-align: center; padding: 26px 0 6px; }
.tool-hero .ic-lg { width: 60px; height: 60px; border-radius: 15px; display: inline-grid; place-items: center;
  background: var(--primary-tint); color: var(--primary); margin-bottom: 16px; }
.tool-hero .ic-lg svg { width: 30px; height: 30px; }
.workspace { max-width: 840px; margin: 22px auto 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* Dropzone */
.dropzone { position: relative; border: 2px dashed var(--line); border-radius: var(--radius-lg); background:
  linear-gradient(var(--surface), var(--surface)) padding-box; padding: 54px 26px; text-align: center; cursor: pointer;
  transition: border-color .16s, background .16s, transform .12s; }
.dropzone:hover { border-color: var(--primary); }
.dropzone.drag { border-color: var(--primary); background: var(--primary-tint); transform: scale(1.01); }
.dropzone .dz-ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; background: var(--primary-tint);
  display: grid; place-items: center; font-size: 1.9rem; }
.dropzone h3 { margin: 0 0 4px; font-size: 1.25rem; }
.dropzone p { margin: 0; color: var(--muted); font-size: .95rem; }
.dz-formats { margin-top: 14px; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); letter-spacing: .04em; }

.add-more { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 2px; padding: 10px 16px; border: 1.5px dashed var(--line);
  background: var(--surface); color: var(--primary); border-radius: 11px; cursor: pointer; font-weight: 600; font-family: var(--font-display); width: 100%; justify-content: center; }
.add-more:hover { border-color: var(--primary); background: var(--primary-tint); }

/* File list */
.list-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 10px; }
.list-head .count { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }
.list-head .clear { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .85rem; }
.list-head .clear:hover { color: var(--danger); }
.file-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 10px; }
.file-item { display: flex; align-items: center; gap: 13px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 13px; transition: box-shadow .15s, border-color .15s; }
.file-item:hover { box-shadow: var(--shadow-sm); }
.file-item .fi-thumb { width: 42px; height: 42px; border-radius: 8px; background: var(--primary-tint); display: grid; place-items: center;
  font-size: 1.1rem; flex-shrink: 0; object-fit: cover; overflow: hidden; }
.file-item .fi-meta { flex: 1; min-width: 0; }
.file-item .fi-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .94rem; }
.file-item .fi-size { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); }
.file-item .fi-ctrls { display: flex; align-items: center; gap: 2px; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 6px 8px; border-radius: 7px; line-height: 1; }
.icon-btn:hover { background: var(--bg-sunken); color: var(--primary); }
.icon-btn.danger:hover { color: var(--danger); }

/* Options */
.options { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0 4px; }
.options > .opt-title { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }
.field { margin-bottom: 16px; } .field:last-child { margin-bottom: 0; }
.field > label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; }
.field input[type=text], .field input[type=number], .field select { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line);
  border-radius: 10px; font: inherit; color: var(--ink); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type=range] { flex: 1; accent-color: var(--primary); }
.range-row output { font-family: var(--font-mono); font-weight: 700; min-width: 56px; text-align: right; color: var(--primary); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1.5px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--surface); }
.seg button { background: transparent; border: 0; padding: 10px 16px; cursor: pointer; font: inherit; font-weight: 600; color: var(--ink-soft); transition: background .12s, color .12s; }
.seg button + button { border-left: 1.5px solid var(--line); }
.seg button.active { background: var(--primary); color: #fff; }

/* Action bar */
.actionbar { display: flex; gap: 12px; align-items: center; margin: 18px 0 2px; }
.actionbar .btn { flex: 1; }
@media (max-width: 520px) { .actionbar { flex-direction: column-reverse; } .actionbar .btn { width: 100%; } }

/* Status */
.status { display: none; text-align: center; padding: 30px 20px; }
.status.show { display: block; }
.scanner { width: 120px; height: 5px; border-radius: 999px; margin: 0 auto 16px; background: var(--bg-sunken); overflow: hidden; position: relative; }
.scanner:before { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--accent)); animation: scan 1.1s ease-in-out infinite; }
@keyframes scan { 0% { left: -40%; } 100% { left: 100%; } }
.status .st-msg { font-family: var(--font-mono); font-size: .9rem; color: var(--ink-soft); }

/* Result */
.result { border: 1px solid color-mix(in srgb, var(--success) 40%, var(--line)); background: var(--success-bg); border-radius: var(--radius-lg); padding: 24px; }
.result-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.result-ic { width: 46px; height: 46px; border-radius: 13px; background: var(--success); color: #fff; display: grid; place-items: center; font-size: 1.4rem; flex-shrink: 0; }
.result-head h3 { color: var(--success-ink); margin: 0; }
.result-head .readout { margin: 2px 0 0; font-family: var(--font-mono); font-size: .9rem; color: var(--success-ink); }
.result-head .readout b { background: color-mix(in srgb, var(--success) 25%, transparent); padding: 1px 7px; border-radius: 6px; }
.out-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; }
.out-item { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.out-item .oi-name { flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.out-item .oi-size { font-family: var(--font-mono); font-size: .74rem; color: var(--muted); white-space: nowrap; }
.out-item .oi-dl { color: var(--primary); font-weight: 600; font-size: .85rem; background: none; border: 0; cursor: pointer; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.result-actions .btn { flex: 1; min-width: 180px; }

.error-box { display: flex; gap: 10px; align-items: flex-start; background: var(--danger-bg); border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line));
  color: var(--danger-ink); border-radius: var(--radius-sm); padding: 13px 15px; margin: 14px 0; font-size: .92rem; }

/* ---------- Prose ---------- */
.prose { max-width: 760px; margin: 46px auto 0; }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 50px; margin-bottom: 18px; color: var(--ink-soft); }
.steps li:before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: -1px; width: 34px; height: 30px;
  color: var(--primary); font-family: var(--font-mono); font-weight: 700; font-size: .95rem; display: grid; place-items: center;
  border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); }
.prose h2 { margin-top: 46px; margin-bottom: 16px; font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
.prose > h2:first-child, .prose > *:first-child { margin-top: 0; }
.faq { margin-top: 10px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; margin-bottom: 12px; background: var(--surface); transition: border-color .18s ease, box-shadow .18s ease; }
.faq details:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { position: relative; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; cursor: pointer;
  padding: 18px 40px 18px 0; list-style: none; line-height: 1.4; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
/* animated + → − marker on the right */
.faq summary:before { content: ""; position: absolute; right: 4px; top: 50%; width: 13px; height: 2px; margin-top: -1px; background: var(--primary); border-radius: 2px; }
.faq summary:after { content: ""; position: absolute; right: 9.5px; top: 50%; width: 2px; height: 13px; margin-top: -6.5px; background: var(--primary); border-radius: 2px; transition: transform .28s cubic-bezier(.2,.7,.2,1), opacity .2s ease; }
.faq details[open] summary:after { transform: rotate(90deg) scale(0); opacity: 0; }
.faq details p { padding: 0 0 18px; margin: 0; color: var(--ink-soft); line-height: 1.6; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.related-grid a { display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 15px; font-weight: 600; color: var(--ink); font-size: .92rem; transition: border-color .15s, transform .15s, box-shadow .15s; }
.related-grid a:hover { border-color: var(--ink-soft); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.related-grid .ric { display: inline-flex; color: var(--primary); flex-shrink: 0; }
.related-grid .ric svg { width: 20px; height: 20px; }

/* ---------- Ads ---------- */
.ad-slot { margin: 30px auto; text-align: center; min-height: 90px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-sunken); border: 1px dashed var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: .72rem; font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; overflow: hidden; }
/* Hide empty ad placeholders on the live site until real ad units are set
   (via BRAND.adSlots). Real ad units render an <ins>, which stays visible. */
.ad-slot.ad-empty { display: none; }
.ad-slot ins { display: block; width: 100%; }

/* Long vertical skyscraper ads in the desktop gutters.
   Hidden by default; only shown when there's genuinely empty space either side. */
.ad-rail { position: fixed; top: 84px; width: 160px; height: 600px; z-index: 40; display: none; }
.ad-rail .ad-slot { width: 100%; height: 100%; min-height: 0; margin: 0; }
.ad-rail-left  { left:  calc((100vw - var(--maxw)) / 2 - 172px); }
.ad-rail-right { right: calc((100vw - var(--maxw)) / 2 - 172px); }
@media (min-width: 1500px) { .ad-rail { display: block; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: color-mix(in srgb, #fff 72%, var(--ink)); margin-top: 70px; padding: 52px 0 26px; }
:root[data-theme="dark"] .site-footer, :root:not([data-theme="light"]) .site-footer { background: #0a0916; }
.site-footer a { color: color-mix(in srgb, #fff 72%, transparent); } .site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 30px; }
.footer-grid .brand { color: #fff; }
.footer-grid h4 { color: #fff; font-size: .82rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; font-weight: 400; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; font-size: .9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 34px; padding-top: 22px; font-size: .84rem;
  color: color-mix(in srgb, #fff 50%, transparent); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

section { scroll-margin-top: 84px; }

/* ============================================================
   Motion — hero entrance + scroll reveal (no external library)
   ============================================================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero .eyebrow, .hero h1, .hero .lead, .hero .btn-row, .hero .trust {
  opacity: 0; animation: fadeUp .8s cubic-bezier(.2,.7,.2,1) forwards; }
.hero h1 { animation-delay: .07s; }
.hero .lead { animation-delay: .15s; }
.hero .btn-row { animation-delay: .23s; }
.hero .trust { animation-delay: .31s; }
.tool-hero .ic-lg, .tool-hero h1, .tool-hero .lead { opacity: 0; animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) forwards; }
.tool-hero h1 { animation-delay: .06s; }
.tool-hero .lead { animation-delay: .14s; }

/* scroll-reveal: JS adds .js-reveal + .anim(on <html>); observer adds .in */
.anim .js-reveal { opacity: 0; transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); will-change: opacity, transform; }
.anim .js-reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero .eyebrow, .hero h1, .hero .lead, .hero .btn-row, .hero .trust,
  .tool-hero .ic-lg, .tool-hero h1, .tool-hero .lead { opacity: 1; animation: none; }
  .anim .js-reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ============================================================
   Résumé builder
   ============================================================ */
.rb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; margin-top: 8px; }
@media (max-width: 980px) { .rb-grid { grid-template-columns: 1fr; } }
.rb-form { padding: 22px; }
.rb-side { position: sticky; top: 82px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 980px) { .rb-side { position: static; } }

/* progress dots */
.rb-progress { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.rb-dot { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 10px 5px 6px; cursor: pointer; color: var(--muted); font-size: .78rem; }
.rb-dot span { width: 18px; height: 18px; border-radius: 50%; background: var(--bg-sunken); color: var(--ink-soft);
  display: grid; place-items: center; font-size: .7rem; font-weight: 700; font-family: var(--font-mono); }
.rb-dot em { font-style: normal; font-weight: 600; }
.rb-dot.active { border-color: var(--primary); color: var(--primary); }
.rb-dot.active span { background: var(--primary); color: #fff; }
.rb-dot.done span { background: var(--success); color: #fff; }

.rb-h { font-size: 1.4rem; margin-bottom: 16px; }
.rb-opt { font-family: var(--font-mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; vertical-align: middle; }

.rb-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .rb-fgrid { grid-template-columns: 1fr; } }
.rb-field { margin-bottom: 14px; } .rb-field.full { grid-column: 1 / -1; }
.rb-field > label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; }
.rb-fh { font-weight: 400; color: var(--muted); font-size: .78rem; }
.rb-field input[type=text], .rb-field input[type=email], .rb-field textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); background: var(--surface); }
.rb-field textarea { resize: vertical; line-height: 1.5; }
.rb-field input:focus, .rb-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

.rb-entries { display: flex; flex-direction: column; gap: 14px; margin-bottom: 12px; }
.rb-entry { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface-2); }
.rb-entry-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rb-dates { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rb-inline { width: 92px !important; padding: 8px 10px !important; }
.rb-check { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--ink-soft); cursor: pointer; }
.rb-check input { accent-color: var(--primary); }

.rb-bullets { display: flex; flex-direction: column; gap: 8px; }
.rb-bullet-row { display: flex; align-items: center; gap: 8px; }
.rb-bl-dot { color: var(--primary); font-weight: 700; }
.rb-bullet-row input { flex: 1; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 9px; font: inherit; background: var(--surface); color: var(--ink); }
.rb-bullet-row input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.rb-addbullet { margin-top: 8px; background: none; border: 0; color: var(--primary); font-weight: 600; cursor: pointer; font-family: var(--font-display); font-size: .9rem; }

.rb-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.rb-stepcount { color: var(--muted); font-size: .8rem; }

/* ATS panel */
.rb-ats { padding: 18px; }
.rb-ats-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.rb-ring { --v: 0; --c: var(--primary); width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--line) 0); position: relative; }
.rb-ring:before { content: ""; position: absolute; inset: 6px; background: var(--surface); border-radius: 50%; }
.rb-ring b { position: relative; font-family: var(--font-display); font-size: 1.15rem; }
.rb-ring small { position: relative; font-size: .55rem; color: var(--muted); font-family: var(--font-mono); }
.rb-ring.sm { width: 54px; height: 54px; }
.rb-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rb-checks li { display: flex; align-items: center; gap: 9px; font-size: .84rem; color: var(--ink-soft); }
.rb-checks li span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 700; flex-shrink: 0; }
.rb-checks li.ok span { background: var(--success-bg); color: var(--success-ink); }
.rb-checks li.warn span { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.rb-checks li.bad span { background: var(--danger-bg); color: var(--danger-ink); }
.rb-checks li.ok { color: var(--ink); }

/* live document preview */
.rb-preview-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-sunken); }
.rb-preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.rb-dlbtns { display: flex; gap: 8px; }
.btn-sm { padding: 9px 14px; font-size: .88rem; border-radius: 10px; }
.rb-doc { background: #fff; color: #1a1a22; margin: 16px; padding: 34px 36px; border-radius: 4px; box-shadow: var(--shadow-sm);
  font-family: 'Inter', Arial, sans-serif; font-size: 12px; line-height: 1.5; min-height: 300px; }
.rb-doc .doc-name { font-size: 24px; font-weight: 800; letter-spacing: -.01em; color: #14141c; font-family: 'Space Grotesk', Arial, sans-serif; }
.rb-doc .doc-title { font-size: 13px; color: #555; margin-top: 2px; }
.rb-doc .doc-contact { font-size: 10.5px; color: #666; margin-top: 6px; }
.rb-doc .doc-sec { margin-top: 16px; }
.rb-doc .doc-h { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #14141c;
  border-bottom: 1px solid #d7d7e0; padding-bottom: 3px; margin-bottom: 8px; }
.rb-doc .doc-item { margin-bottom: 10px; }
.rb-doc .doc-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.rb-doc .doc-strong { font-weight: 700; color: #1a1a22; }
.rb-doc .doc-dates { font-size: 10.5px; color: #777; white-space: nowrap; }
.rb-doc .doc-sub { font-size: 11px; color: #666; margin: 1px 0 3px; }
.rb-doc .doc-p { margin: 3px 0; color: #333; }
.rb-doc .doc-ul { margin: 4px 0 0; padding-left: 16px; }
.rb-doc .doc-ul li { margin-bottom: 2px; color: #333; }
.rb-doc:empty:before { content: "Your resume preview appears here as you type."; color: #999; }
:root[data-theme="dark"] .rb-doc, :root:not([data-theme="light"]) .rb-doc { background: #f7f7fb; }

.rb-finish { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.rb-finish .btn { display: block; margin-bottom: 8px; }
.rb-bigscore .rb-ring { width: 96px; height: 96px; --c: var(--primary); }
.rb-bigscore .rb-ring b { font-size: 1.7rem; }
.rb-bigscore .rb-ring small { font-size: .6rem; }
