/* =========================================================
   ConverteTudo — estilos do site
   Tokens de cor: claro por padrão, escuro pelo sistema ou pela
   escolha do visitante (atributo data-theme no <html>).
   ========================================================= */
:root {
  --paper: #F4F7FB;
  --surface: #FFFFFF;
  --ink: #1C1E21;
  --ink-2: #4A5160;
  --brand-text: #1C1E21;
  --line: #DDE2EA;
  --line-strong: #B9C6D8;
  --action: #0062E6;
  --action-h: #004FBA;
  --tint: #E9F1FF;
  --link: #0057D9;
  --ok: #0A7A4B;
  --ok-t: #E6F5EE;
  --err: #B42318;
  --err-t: #FEF3F2;
  --err-l: #FECDCA;
  --shadow-card: 0 30px 60px -40px rgba(28, 30, 33, .45);
  --radius-card: 24px;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Outfit", "Figtree", system-ui, sans-serif;
  --wrap: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1116; --surface: #161A21; --ink: #ECEEF1; --ink-2: #A8AFBB; --brand-text: #F1F2F4;
    --line: #2A303B; --line-strong: #3B4351; --action: #1F6FEB; --action-h: #1A5FD0; --tint: #182234;
    --link: #7DB1FF; --ok: #5BD69A; --ok-t: #10261C; --err: #FF9B91; --err-t: #2A1414; --err-l: #5C2320;
    --shadow-card: 0 30px 60px -40px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1116; --surface: #161A21; --ink: #ECEEF1; --ink-2: #A8AFBB; --brand-text: #F1F2F4;
  --line: #2A303B; --line-strong: #3B4351; --action: #1F6FEB; --action-h: #1A5FD0; --tint: #182234;
  --link: #7DB1FF; --ok: #5BD69A; --ok-t: #10261C; --err: #FF9B91; --err-t: #2A1414; --err-l: #5C2320;
  --shadow-card: 0 30px 60px -40px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: var(--link); }
p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); margin: 0; letter-spacing: -.02em; text-wrap: balance; line-height: 1.15; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 3px; }
.icon { flex: none; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 860px; }
.muted { color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -100px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--surface); color: var(--ink); font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 14px; border: 1px solid transparent;
  font: 600 16px var(--font-body); text-decoration: none; cursor: pointer;
  touch-action: manipulation; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-h); color: #fff; }
.btn-primary:disabled { background: var(--line); color: var(--ink-2); cursor: not-allowed; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); color: var(--ink); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; border-radius: 12px; }

/* ---------- Cabeçalho ---------- */
.site-header { position: relative; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--brand-text); text-decoration: none;
  font: 700 21px var(--font-head); letter-spacing: -.02em;
}
.brand:hover { color: var(--brand-text); }
.main-nav { flex: 1; }
.main-nav ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.main-nav a {
  position: relative; display: flex; align-items: center; min-height: 44px; padding: 0 12px;
  border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px;
}
.main-nav a:hover { color: var(--ink); background: var(--tint); }
.main-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.main-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 3px; border-radius: 3px; background: var(--action);
}
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); display: grid; place-items: center; cursor: pointer; touch-action: manipulation;
}
.icon-btn:hover { border-color: var(--ink-2); }
.menu-btn {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; margin-left: auto;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 15px var(--font-body); cursor: pointer; touch-action: manipulation;
}

/* Painéis (popover): configurações no desktop, menu completo no celular. */
.panel {
  position: fixed; inset: auto; top: 72px; right: max(12px, calc((100vw - var(--wrap)) / 2 + 20px));
  margin: 0; width: 320px; max-height: calc(100dvh - 90px); overflow: auto; overscroll-behavior: contain;
  padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink);
  box-shadow: 0 28px 56px -20px rgba(28, 30, 33, .4);
}
.panel:is(:popover-open, .is-open) { display: flex; flex-direction: column; gap: 18px; }
@supports not selector(:popover-open) { .panel:not(.is-open) { display: none; } }
.panel h2 { font: 600 14px var(--font-body); color: var(--ink-2); letter-spacing: 0; margin-bottom: 8px; }
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px;
  border-radius: 12px; background: var(--paper); border: 1px solid var(--line);
}
.seg > a, .seg > button {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 8px;
  border: 0; border-radius: 9px; background: transparent; color: var(--ink-2);
  font: 600 14px var(--font-body); text-decoration: none; cursor: pointer; touch-action: manipulation;
}
.seg > [aria-pressed="true"], .seg > [aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(28, 30, 33, .18); }
.flag { width: 22px; height: 15px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.mobile-nav ul { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.mobile-nav a {
  display: flex; align-items: center; min-height: 52px; padding: 0 6px; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px;
}
.mobile-nav a[aria-current="page"] { color: var(--link); }

/* ---------- Rodapé ---------- */
.site-footer { margin-top: 72px; background: var(--surface); border-top: 1px solid var(--line); color: var(--ink-2); }
.footer-inner { padding-top: 56px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 40px; }
.footer-cols { display: grid; grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-about { display: flex; flex-direction: column; gap: 12px; }
.footer-about p { font-size: 15px; max-width: 320px; }
.site-footer h2 { font: 600 15px var(--font-body); color: var(--ink); letter-spacing: 0; margin-bottom: 6px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul a, .site-footer ul button {
  display: flex; align-items: center; min-height: 36px; padding: 0; border: 0; background: none;
  color: var(--ink-2); text-decoration: none; font: 15px var(--font-body); cursor: pointer; text-align: left;
}
.site-footer ul a:hover, .site-footer ul button:hover { color: var(--link); text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; }

/* ---------- Início ---------- */
.hero { padding-block: 72px 56px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.hero-logo { width: 96px; height: 96px; animation: ct-turn .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes ct-turn { from { rotate: -160deg; opacity: 0; scale: .8; } to { rotate: 0deg; opacity: 1; scale: 1; } }
.wordmark { display: block; font-size: clamp(52px, 10vw, 112px); line-height: .95; letter-spacing: -.03em; font-weight: 700; color: var(--brand-text); }
.h1-sub { display: block; margin-top: 14px; font: 600 clamp(18px, 2.2vw, 22px)/1.35 var(--font-body); letter-spacing: 0; color: var(--ink-2); }
.lead { max-width: 600px; font-size: 18px; color: var(--ink-2); }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.live {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.live strong { color: var(--ink); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #12B76A; box-shadow: 0 0 0 4px rgba(18, 183, 106, .18); }
.section { padding-block: 64px; }
.section-head { margin-bottom: 28px; max-width: 680px; }
.section-head h2, .h2 { font-size: clamp(28px, 3.4vw, 38px); }
.section-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 28px; }
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tool {
  display: flex; gap: 24px; align-items: flex-start; padding: 28px; border-radius: var(--radius-card);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.tool:hover { border-color: var(--action); box-shadow: 0 18px 40px -24px rgba(0, 98, 230, .55); color: var(--ink); }
.pad { flex: none; width: 104px; height: 104px; border-radius: 22px; background: #FFFFFF; border: 1px solid var(--line); display: grid; place-items: center; }
.pad img { width: 76px; height: 76px; }
.tool-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tool h3 { font-size: 25px; }
.tool .formats { font-size: 14px; color: var(--ink-2); }
.tool .go { margin-top: 6px; font-weight: 600; color: var(--link); }
.soon-title { margin: 36px 0 14px; font: 600 16px var(--font-body); color: var(--ink-2); letter-spacing: 0; }
.soon-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.soon { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; border: 1px dashed var(--line-strong); color: var(--ink-2); font-weight: 600; font-size: 15px; }
.soon img { width: 44px; height: 44px; border-radius: 10px; background: #fff; filter: grayscale(1); opacity: .55; }
.soon small { display: block; font-weight: 500; font-size: 13px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.steps li { position: relative; display: flex; flex-direction: column; gap: 8px; padding-top: 60px; }
.steps li::before {
  counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 44px; height: 44px;
  border-radius: 50%; background: var(--action); color: #fff; display: grid; place-items: center; font: 700 18px var(--font-head);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 21px; left: 56px; right: -16px; height: 2px; background: var(--line); }
.steps h3 { font-size: 21px; }
.fmt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fmt { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.fmt:hover { border-color: var(--action); color: var(--ink); }
.fmt b { font: 700 26px/1.1 var(--font-head); letter-spacing: -.02em; }
.fmt span { font-size: 14px; color: var(--ink-2); }
.privacy-panel { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; padding: 44px; border-radius: 28px; background: var(--tint); }
.privacy-panel .icon { color: var(--action); }
.privacy-panel dl { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.privacy-panel dt { font-weight: 700; }
.privacy-panel dd { margin: 2px 0 0; color: var(--ink-2); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.card:hover { border-color: var(--action); color: var(--ink); }
.card h3 { font-size: 21px; line-height: 1.25; }
.card .meta { font-size: 14px; color: var(--ink-2); }

/* ---------- Perguntas frequentes ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--link); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--ink-2); }

/* ---------- Páginas internas ---------- */
.page-head { padding-top: 32px; display: flex; flex-direction: column; gap: 10px; max-width: 780px; }
.page-head h1 { font-size: clamp(32px, 4.8vw, 50px); line-height: 1.05; }
.page-head p { font-size: 18px; color: var(--ink-2); }
.crumbs { font-size: 15px; color: var(--ink-2); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--ink-2); }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600;
}
.chip:hover { border-color: var(--action); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Texto longo: guias e páginas legais */
.layout-aside { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.layout-aside > article { flex: 3 1 600px; min-width: 0; }
.layout-aside > aside { flex: 1 1 260px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 20px; }
.prose { display: flex; flex-direction: column; gap: 18px; font-size: 18px; line-height: 1.8; max-width: 72ch; }
.prose h2 { font-size: clamp(24px, 2.6vw, 30px); margin-top: 24px; scroll-margin-top: 20px; }
.prose h3 { font-size: 21px; margin-top: 8px; }
.prose ul, .prose ol { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 6px; }
.prose code { font-size: .9em; background: var(--tint); padding: 2px 6px; border-radius: 6px; }
.prose pre { margin: 0; padding: 16px; border-radius: 12px; background: var(--tint); overflow-x: auto; font-size: 15px; line-height: 1.6; }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.table-box table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.table-box th, .table-box td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table-box thead th { background: var(--paper); font-weight: 600; }
.toc { padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.toc h2 { font: 600 15px var(--font-body); letter-spacing: 0; color: var(--ink-2); }
.byline { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-2); }
.byline img { width: 40px; height: 40px; border-radius: 50%; }
.cta-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 28px; border-radius: 22px; background: var(--tint); }
.cta-box h2 { font-size: 24px; }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 8px; font-size: 15px; font-weight: 600; }
.input, .select {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--surface); color: var(--ink); font: 400 16px var(--font-body);
}
.select { font-weight: 500; }
textarea.input { min-height: 160px; resize: vertical; }
.input:focus-visible, .select:focus-visible { outline-offset: 0; border-color: var(--action); }
.field-error { color: var(--err); font-weight: 500; font-size: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--ink-2); font-weight: 400; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--action); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.trap { position: absolute; left: -9999px; }
.alert { font-size: 15px; color: var(--err); background: var(--err-t); border: 1px solid var(--err-l); border-radius: 12px; padding: 12px 14px; text-align: left; }
.notice-ok { color: var(--ok); background: var(--ok-t); border-radius: 12px; padding: 12px 14px; }

/* ---------- Ferramentas ---------- */
.tool-card { display: flex; flex-direction: column; gap: 22px; padding: 28px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  min-height: 300px; padding: 24px; border: 2px dashed var(--line-strong); border-radius: 18px; background: var(--tint);
  text-align: center; cursor: pointer;
}
.drop:hover, .drop:focus-within, .drop.is-dragover { border-color: var(--action); }
.drop img { width: 84px; height: 84px; border-radius: 18px; background: #fff; }
.drop strong { font-size: 20px; }
.drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.only-touch { display: none; }
.center-row { display: flex; justify-content: center; }
.mode-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mode-row .seg { display: inline-grid; grid-auto-columns: auto; }
.mode-row .seg > button { min-height: 44px; padding: 0 16px; font-size: 15px; }
.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; overscroll-behavior: contain; }
.file { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 12px; border: 1px solid var(--line); border-radius: 14px; }
.file-thumb { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--tint); color: var(--link); display: grid; place-items: center; font-size: 12px; font-weight: 700; object-fit: cover; overflow: hidden; }
.file-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.file-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.icon-x { width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.icon-x:hover { background: var(--tint); color: var(--ink); }
.limit-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.adv summary { cursor: pointer; font-weight: 600; color: var(--link); min-height: 44px; display: inline-flex; align-items: center; }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 12px; }
.adv input[type="range"], .opts input[type="range"] { width: 100%; height: 36px; accent-color: var(--action); }
.adv input[type="color"] { width: 100%; height: 48px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.actionbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.actionbar .field { flex: 1 1 280px; }
.actionbar > .btn { flex: 1 1 240px; }

/* Barra de progresso nativa (<progress>) */
.pb {
  appearance: none; border: 0 solid; overflow: clip; width: 100%; height: 12px; border-radius: 999px;
  background: var(--line); container-type: inline-size; --pb-dur: 1.5s;
}
.pb::-webkit-progress-bar { background: transparent; }
.pb::-webkit-progress-value { background: var(--action); border-radius: 999px; transition: inline-size .3s; animation: var(--pb-anim, none); }
.pb::-moz-progress-bar { background: var(--action); border-radius: 999px; animation: var(--pb-anim, none); }
.pb:indeterminate { --pb-anim: pb-indeterminate var(--pb-dur) infinite linear; }
@keyframes pb-indeterminate { from, to { inline-size: 30%; margin-right: auto; } from { translate: -100%; } to { translate: 100cqi; } }
.pb.pb-thin { height: 6px; }
.pb.is-over::-webkit-progress-value { background: var(--err); }
.pb.is-over::-moz-progress-bar { background: var(--err); }
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stages li { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.stages li::before { content: ""; display: block; height: 4px; border-radius: 999px; background: var(--line); }
.stages li.is-active { color: var(--ink); }
.stages li.is-active::before { background: var(--action); }
.stages li.is-done { color: var(--ink); }
.stages li.is-done::before { background: var(--ok); }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.progress-head label { font-weight: 700; font-size: 19px; }
.progress-pct { font: 700 24px var(--font-head); color: var(--link); font-variant-numeric: tabular-nums; }
.result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 12px 0; }
.result-badge { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; }
.result-badge.ok { background: var(--ok-t); color: var(--ok); }
.result-badge.err { background: var(--err-t); color: var(--err); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; }

/* Removedor de fundo */
.done-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; }
.viewer { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); touch-action: pan-y; background: var(--paper); }
.viewer canvas, .viewer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.viewer .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.viewer .divider { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 3px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); pointer-events: none; }
.viewer .knob { position: absolute; top: 50%; left: var(--pos, 50%); width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; color: #1C1E21; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); display: grid; place-items: center; pointer-events: none; }
.viewer .tag { position: absolute; top: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(28, 30, 33, .78); color: #fff; font-size: 13px; font-weight: 600; pointer-events: none; }
.viewer input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.viewer:has(input:focus-visible) { outline: 3px solid var(--action); outline-offset: 3px; }
.bg-transparent { background-color: #fff; background-image: linear-gradient(45deg, #E2E8F0 25%, transparent 25%), linear-gradient(-45deg, #E2E8F0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #E2E8F0 75%), linear-gradient(-45deg, transparent 75%, #E2E8F0 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.opts { display: flex; flex-direction: column; gap: 20px; }
.opts .seg { grid-auto-columns: 1fr; }
.swatch-row { display: flex; align-items: center; gap: 10px; }
.swatch-row input[type="color"] { width: 52px; height: 44px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.side-actions { display: flex; flex-direction: column; gap: 10px; }
.side-actions.actionbar > .btn { flex: 0 0 auto; }
.queue { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; }
.queue button { width: 64px; height: 64px; padding: 0; border-radius: 12px; border: 2px solid var(--line); overflow: hidden; background: var(--paper); cursor: pointer; flex: none; }
.queue button[aria-pressed="true"] { border-color: var(--action); }
.queue img { width: 100%; height: 100%; object-fit: cover; }

/* Página de formato */
.format-hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.format-hero > div { flex: 1 1 420px; min-width: 0; }

/* ---------- Erro 404/500 ---------- */
.error-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 72px 20px; }
.error-page .code { font: 700 96px/1 var(--font-head); color: var(--action); letter-spacing: -.04em; }
.error-page > div { max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: 18px; }

/* ---------- Anúncios ---------- */
.ad-slot { margin: 32px 0; min-height: 120px; }
.ad-slot.sidebar { min-height: 280px; margin: 0; }
.ad-label { display: block; margin-bottom: 6px; font-size: 12px; color: var(--ink-2); text-align: center; }

/* ---------- Celular ---------- */
@media (max-width: 880px) {
  .main-nav, .settings-btn { display: none; }
  .menu-btn { display: inline-flex; }
  .panel { left: 12px; right: 12px; width: auto; top: 76px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
  .hero { padding-block: 44px 36px; gap: 18px; }
  .hero-logo { width: 72px; height: 72px; }
  .ctas { flex-direction: column; width: 100%; }
  .ctas .btn { width: 100%; }
  .section { padding-block: 44px; }
  .tools { grid-template-columns: 1fr; gap: 14px; }
  .tool { padding: 18px; gap: 16px; border-radius: 20px; }
  .pad { width: 72px; height: 72px; border-radius: 16px; }
  .pad img { width: 54px; height: 54px; }
  .tool h3 { font-size: 21px; }
  .soon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .soon { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .steps li { padding: 0 0 0 60px; min-height: 44px; }
  .steps li:not(:last-child)::after { top: 52px; left: 21px; right: auto; bottom: -18px; width: 2px; height: auto; }
  .fmt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .privacy-panel { grid-template-columns: 1fr; padding: 26px; gap: 24px; border-radius: 22px; }
  .cards { grid-template-columns: 1fr; }
  .tool-card { padding: 18px; border-radius: 20px; gap: 18px; }
  .drop { min-height: 220px; }
  .layout-aside > aside { position: static; }
  .done-grid { grid-template-columns: 1fr; gap: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .result .btn { width: 100%; }
  .actionbar.sticky-mobile {
    position: sticky; bottom: 0; z-index: 5; margin: 0 -18px -18px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 20px 20px;
    box-shadow: 0 -14px 24px -18px rgba(28, 30, 33, .4);
  }
  .actionbar.sticky-mobile > * { flex: 1 1 100%; }
  .mode-row .seg { display: grid; width: 100%; grid-auto-columns: 1fr; }
}
@media (hover: none) and (pointer: coarse) {
  .only-pointer { display: none; }
  .only-touch { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-logo { animation: none; }
  .pb { --pb-dur: 10s; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
@media (forced-colors: active) {
  .main-nav a[aria-current="page"]::after { background: CanvasText; }
}
