/* Folio PDF — camada de refinamento visual (carregada depois de styles.css e app.css) */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --line: #e4e7ec;
  --line-2: #d0d5dd;
  --text: #101828;
  --text-2: #344054;
  --muted: #667085;
  --brand: #2453e6;
  --brand-2: #1a43c7;
  --brand-soft: #eef2fe;
  --ink: #101828;
  --danger: #d92d20;
  --ok: #079455;
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font: 'Source Serif 4', Georgia, serif;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 9px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 12px 24px -8px rgba(16, 24, 40, .12), 0 4px 8px -4px rgba(16, 24, 40, .05);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .22);
  --header-h: 64px;
}
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--ui); background: var(--bg); color: var(--text); font-size: 15px; letter-spacing: -.005em; overflow-x: hidden; }
.brand { font-family: var(--font); }
svg { flex: none; }
::selection { background: #d6e0fd; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- botões */
.btn { font-family: var(--ui); font-weight: 600; font-size: 14px; border-radius: 10px; padding: 11px 18px; gap: 8px; box-shadow: none; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 9px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-xs), inset 0 -1px 0 rgba(0,0,0,.12); }
.btn-primary:hover { background: var(--brand-2); transform: none; box-shadow: var(--shadow-sm); }
.btn-primary:disabled { background: #98a2b3; box-shadow: none; }
.btn-ghost { background: #fff; color: var(--text-2); border: 1px solid var(--line-2); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { border-color: var(--line-2); background: var(--surface-2); color: var(--text); }

/* ---------- header */
.site-header { background: rgba(255,255,255,.86); border-bottom: 1px solid var(--line); }
.header-inner { height: var(--header-h); }
.brand { font-size: 18px; gap: 9px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; font-size: 16px; background: var(--ink); }
.brand-name span { color: var(--brand); }
.nav { gap: 4px; font: 500 14px var(--ui); }
.nav a { padding: 7px 12px; border-radius: 8px; color: var(--text-2); }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.header-cta { padding: 8px 14px; }

/* ---------- home */
.home-hero { padding: 72px 0 28px; background:
  radial-gradient(900px 340px at 50% -60px, rgba(36,83,230,.09), transparent 70%),
  linear-gradient(to bottom, #fff, var(--bg)); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin-bottom: 22px; box-shadow: var(--shadow-xs); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px #dcfae6; }
.home-hero h1 { font-family: var(--font); font-size: clamp(34px, 5.2vw, 58px); font-weight: 600; line-height: 1.05; letter-spacing: -.025em; }
.home-hero .lede { font-size: 18px; line-height: 1.55; max-width: 600px; margin: 18px auto 32px; }
.search { border-radius: 12px; padding: 0 16px; border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(36,83,230,.12); }
.search input { padding: 14px 0; font-size: 15px; }
.cat-chips { gap: 6px; margin-top: 22px; }
.chip { border-color: var(--line); padding: 7px 14px; font: 500 13.5px var(--ui); color: var(--text-2); box-shadow: var(--shadow-xs); }
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.tool-grid-sec { padding: 32px 0 88px; }
.tool-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tool-card { display: flex; flex-direction: column; border-color: var(--line); border-radius: var(--r-lg); padding: 20px 20px 18px; box-shadow: var(--shadow-xs); }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.tc-icon { width: 42px; height: 42px; border-radius: 11px; margin-bottom: 16px; background: color-mix(in srgb, var(--c) 10%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 16%, transparent); }
.tc-icon svg { width: 21px; height: 21px; }
.tool-card strong { font-size: 15.5px; font-weight: 600; margin-bottom: 5px; }
.tool-card p { font-size: 13.5px; line-height: 1.5; flex: 1; }
.tc-where { position: static; display: inline-flex; align-items: center; gap: 5px; margin-top: 14px; padding: 0; background: none !important; font-size: 12px; font-weight: 500; color: var(--muted) !important; letter-spacing: 0; }

.section-title { font-family: var(--font); font-size: clamp(26px, 3.4vw, 38px); font-weight: 600; letter-spacing: -.02em; }
.section-sub { font-size: 16px; margin: 12px 0 44px; }
section { padding: 80px 0; }

.why-grid { gap: 16px; }
.why-card { border-radius: var(--r-lg); padding: 26px; }
.why-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: #fff; border: 1px solid var(--line); color: var(--brand); margin-bottom: 18px; box-shadow: var(--shadow-xs); font-size: 0; }
.why-card strong { font-size: 16px; font-weight: 600; }
.why-card p { font-size: 14.5px; line-height: 1.6; }

.leadband { background: var(--bg); border-top: 0; }
.lead-card { background: var(--ink); border-radius: 22px; padding: 44px 48px; box-shadow: none; position: relative; overflow: hidden; }
.lead-card::after { content: ""; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(36,83,230,.45), transparent 65%); pointer-events: none; }
.lead-card > * { position: relative; z-index: 1; }
.lead-copy h2 { font-family: var(--font); font-size: 28px; font-weight: 600; }
.lead-copy p { color: #98a2b3; }
.lead-form input[type=email] { border-radius: 10px; padding: 12px 14px; font-size: 15px; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.07); }
.lead-form .btn-primary { padding: 12px 18px; }
.lead-consent { color: #98a2b3; }
.lead-consent input { accent-color: var(--brand); }

.faq-list { max-width: 760px; }
.faq details { padding: 20px 2px; }
.faq summary { font: 600 16px var(--ui); color: var(--text); gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after, .faq details[open] summary::after { content: ""; width: 20px; height: 20px; flex: none; background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { font-size: 15px; line-height: 1.65; }

.footer-cols { grid-template-columns: repeat(4, 1fr); }
.footer-cols h4 { font: 600 12px var(--ui); letter-spacing: .06em; color: var(--muted); }
.footer-cols a { color: var(--text-2); }

/* ---------- tela da ferramenta */
.tv { padding: 28px 0 96px; }
.tv-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin-bottom: 20px; padding: 4px 0; }
.tv-back:hover { color: var(--text); }
.tv-head { margin-bottom: 28px; }
.tv-icon { width: 54px; height: 54px; border-radius: 14px; background: color-mix(in srgb, var(--c) 10%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 18%, transparent); }
.tv-head h1 { font-family: var(--font); font-size: clamp(26px, 3.4vw, 36px); font-weight: 600; line-height: 1.1; }
.tv-head p { margin-top: 6px; font-size: 15.5px; }

.upload { gap: 10px; min-height: 320px; border: 1.5px dashed var(--line-2); background: #fff; padding: 36px 24px; box-shadow: var(--shadow-xs); }
.upload:hover, .upload.drag { border-color: var(--brand); background: #fbfcff; }
.upload.drag { box-shadow: 0 0 0 6px rgba(36,83,230,.08); }
.up-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); margin-bottom: 8px; }
.up-btn { background: var(--brand); font-weight: 600; font-size: 16px; padding: 14px 30px; border-radius: 11px; box-shadow: var(--shadow-sm), inset 0 -1px 0 rgba(0,0,0,.14); transition: background .15s; }
.upload:hover .up-btn { background: var(--brand-2); }
.up-or { font-size: 14px; }
.upload small { color: #98a2b3; font-size: 12.5px; letter-spacing: .02em; }
.where-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 16px; line-height: 1.45; }
.where-note svg { color: var(--ok); }

.work { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
.work-main { border-radius: var(--r-lg); box-shadow: var(--shadow-xs); min-height: 360px; }
.work-side { top: calc(var(--header-h) + 20px); }
.side-box { border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.side-box h3 { font: 600 16px var(--ui); margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.side-box .where-note { justify-content: flex-start; align-items: flex-start; font-size: 12.5px; }
.side-box .where-note svg { margin-top: 1px; }

.field { margin-bottom: 18px; }
.field > label { color: var(--text-2); margin-bottom: 8px; }
.field small { font-size: 12.5px; margin-top: 6px; line-height: 1.45; }
.field input[type=text], .field input[type=number], .field input[type=password], .field input[type=url], .field select {
  font-size: 15px; border-color: var(--line-2); border-radius: var(--r-sm); box-shadow: var(--shadow-xs); color: var(--text); }
.field select { appearance: none; -webkit-appearance: none; padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; }
.field input:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(36,83,230,.12); }
.field input[type=color] { width: 48px; height: 38px; border-color: var(--line-2); border-radius: var(--r-sm); padding: 3px; cursor: pointer; }
.field.check { gap: 10px; color: var(--text-2); line-height: 1.4; }
.field input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.radios { gap: 6px; }
.radio { position: relative; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px 10px 38px; box-shadow: var(--shadow-xs); }
.radio::before { content: ""; position: absolute; left: 13px; top: 50%; width: 14px; height: 14px; margin-top: -8px; border-radius: 50%; border: 1.5px solid var(--line-2); background: #fff; box-sizing: content-box; transition: .15s; }
.radio:hover { border-color: #98a2b3; }
.radio b { font-weight: 600; color: var(--text); }
.radio small { color: var(--muted); font-size: 12.5px; }
.radio.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.radio.on::before { border: 4.5px solid var(--brand); width: 7px; height: 7px; margin-top: -8px; }
.range output { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 500; }

.run-btn { padding: 14px; font-size: 15px; border-radius: 11px; background: var(--brand) !important; box-shadow: var(--shadow-sm), inset 0 -1px 0 rgba(0,0,0,.14); }
.run-btn:hover { background: var(--brand-2) !important; }
.progress .bar { height: 6px; background: var(--surface-2); }
.err-msg { color: #b42318; background: #fef3f2; border-color: #fecdca; padding: 11px 13px; border-radius: var(--r-sm); font-size: 13.5px; line-height: 1.45; }

/* ---------- arquivos */
.fc-head { gap: 8px; margin-bottom: 16px; }
.fc-head strong { font-size: 14.5px; font-weight: 600; }
.fc-head .muted { font-size: 13.5px; }
.fc-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.fc { border-color: var(--line); padding: 8px; }
.fc.sortable:hover { border-color: var(--line-2); }
.fc-thumb { height: 176px; border-radius: 8px; border-color: var(--line); }
.fc-ph { color: #98a2b3; display: grid; place-items: center; }
.fc-name { margin: 9px 2px 0; color: var(--text); }
.fc-meta { margin: 1px 2px 2px; }
.fc-del { top: 6px; right: 6px; display: grid; place-items: center; background: rgba(16,24,40,.78); }
.fc-del:hover { background: var(--danger); }
.drag-ghost { border-radius: 14px; }
.dragging { opacity: .35; }

/* ---------- páginas */
.hint { font-size: 13.5px; margin: -6px 0 16px; }
.pg-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.pg { border-width: 1.5px; padding: 10px 8px 8px; }
.pg-img img { box-shadow: 0 1px 3px rgba(16,24,40,.14); border-radius: 2px; }
.pg-n { font-weight: 500; font-variant-numeric: tabular-nums; }
.pg-check { top: 8px; right: 8px; width: 22px; height: 22px; border-color: var(--line-2); }
.pg.sel { border-color: var(--brand); background: var(--brand-soft); }
.pg.sel .pg-check { background: var(--brand); border-color: var(--brand); }
.pg-tools button { display: grid; place-items: center; width: 32px; height: 30px; border-radius: 8px; border-color: var(--line-2); color: var(--text-2); }
.pg-tools button[data-a=x]:hover { border-color: var(--danger); color: var(--danger); }

.loading { padding: 80px 20px; font-size: 14px; }
.loading::before { content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 14px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--brand); animation: fspin .8s linear infinite; }
@keyframes fspin { to { transform: rotate(360deg); } }
.url-hero { line-height: 1.6; }
.url-hero svg { color: var(--brand); }

/* ---------- editor */
.work-editor { grid-template-columns: minmax(0, 1fr) 290px; }
.ed-bar { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; top: var(--header-h); margin: -20px -20px 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.ed-tools { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 11px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.ed-tools::-webkit-scrollbar { display: none; }
.ed-tool { display: inline-flex; align-items: center; gap: 7px; flex: none; border: 0; background: transparent; border-radius: 8px; padding: 8px 12px; font: 500 13.5px var(--ui); color: var(--text-2); white-space: nowrap; }
.ed-tool:hover { color: var(--text); background: rgba(255,255,255,.7); border: 0; }
.ed-tool.active { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }
.ed-other { flex: none; }
.ed-props { gap: 14px; padding: 10px 14px; background: var(--surface-2); border-radius: var(--r-md); color: var(--text-2); }
.ed-props label { font-weight: 500; }
.ed-props input[type=number], .ed-props select { border-color: var(--line-2); font: inherit; background: #fff; }
.ed-props input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; }
.ed-hint { color: #1a3faa; background: var(--brand-soft); border: 1px solid #d6e0fd; border-radius: var(--r-sm); padding: 9px 12px; margin-bottom: 14px; }
.ed-pages { gap: 24px; background: #eaecf0; border-radius: var(--r-md); padding: 22px 0 30px; }
.ed-page { box-shadow: 0 1px 3px rgba(16,24,40,.12), 0 8px 24px -8px rgba(16,24,40,.16); touch-action: manipulation; }
.ed-pnum { bottom: -19px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.ed-item:hover { border-color: #a4bcfd; }
.ed-k-whiteout { border-color: var(--line-2); }
.ed-x { top: -12px; right: -12px; width: 24px; height: 24px; place-items: center; background: var(--danger); box-shadow: var(--shadow-sm); }
.ed-item.selected .ed-x { display: grid; }
.ed-rs { right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 4px; }
@media (pointer: coarse) {
  .ed-rs { width: 22px; height: 22px; right: -11px; bottom: -11px; }
  .ed-x { width: 28px; height: 28px; top: -14px; right: -14px; }
}

/* ---------- assinatura */
.sig-dialog { border-radius: 20px; max-width: 600px; }
.sig-dialog::backdrop { background: rgba(16,24,40,.55); backdrop-filter: blur(3px); }
.sig-box { padding: 26px; }
.sig-box h3 { font-family: var(--font); font-size: 22px; font-weight: 600; margin-bottom: 16px; }
.sig-tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 11px; margin-bottom: 16px; }
.sig-tabs button { border: 0; background: transparent; border-radius: 8px; padding: 7px 14px; color: var(--text-2); }
.sig-tabs button.active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
#sigCanvas { border: 1px solid var(--line-2); border-radius: var(--r-md); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='200'%3E%3Cline x1='40' y1='150' x2='520' y2='150' stroke='%23d0d5dd' stroke-dasharray='4 5'/%3E%3C/svg%3E") center/100% 100% no-repeat; }
.sig-row { gap: 10px; margin-top: 12px; font-size: 13.5px; color: var(--text-2); }
.sig-color { width: 24px; height: 24px; border-width: 2px; }
#sigText { font-size: 15px; border-color: var(--line-2); border-radius: var(--r-sm); }
#sigText:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(36,83,230,.12); }
.sig-preview { border: 1px solid var(--line); background: var(--bg); border-radius: var(--r-md); margin-top: 12px; font-size: 50px; }
.sig-actions { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- resultado */
.result { padding: 56px 24px; box-shadow: var(--shadow-xs); }
.res-check { width: 64px; height: 64px; background: #dcfae6; color: var(--ok); margin-bottom: 22px; box-shadow: 0 0 0 8px #ecfdf3; }
.result h2 { font-family: var(--font); font-size: clamp(24px, 3vw, 30px); font-weight: 600; margin-bottom: 20px; }
.res-dl { font-size: 16px; padding: 15px 30px; border-radius: 12px; background: var(--brand) !important; box-shadow: var(--shadow-sm), inset 0 -1px 0 rgba(0,0,0,.14); }
.res-dl:hover { background: var(--brand-2) !important; }
.res-actions { gap: 8px; }
.res-next { margin: 34px auto 0; max-width: 560px; }
.res-next p { font-size: 13px; font-weight: 500; }
.saving { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; border-radius: var(--r-md); font-size: 14px; }
.saving b { font-size: 24px; font-variant-numeric: tabular-nums; }
.saving.neutral { background: var(--surface-2); color: var(--text-2); border-color: var(--line); }

.toast { background: var(--ink); border-radius: var(--r-md); bottom: calc(24px + env(safe-area-inset-bottom)); }
.toast.err { background: #b42318; }

/* ================= responsivo ================= */
@media (max-width: 1080px) {
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
  .work, .work-editor { grid-template-columns: 1fr; }
  .work-side { position: static; order: 0 !important; }
}
@media (max-width: 640px) {
  :root { --header-h: 58px; }
  .wrap { padding: 0 16px; }
  section { padding: 52px 0; }
  .header-inner { gap: 10px; }
  .header-cta { padding: 8px 12px !important; font-size: 13px !important; }

  .home-hero { padding: 40px 0 16px; }
  .br-desk { display: none; }
  .eyebrow { font-size: 12px; margin-bottom: 18px; }
  .home-hero h1 { font-size: 34px; }
  .home-hero .lede { font-size: 16px; margin: 14px auto 24px; }
  .search input { font-size: 16px; }
  .cat-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 20px -16px 0; padding: 2px 16px 6px; scrollbar-width: none; }
  .cat-chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }

  .tool-grid-sec { padding: 20px 0 56px; }
  .tool-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tool-card { padding: 16px 14px 14px; border-radius: 14px; }
  .tool-card:hover { transform: none; }
  .tc-icon { width: 38px; height: 38px; margin-bottom: 12px; }
  .tool-card strong { font-size: 14.5px; line-height: 1.3; }
  .tool-card p { display: none; }
  .tc-where { margin-top: 8px; font-size: 11.5px; }

  .section-sub { font-size: 15px; margin-bottom: 30px; }
  .why-card { padding: 22px; }
  .lead-card { padding: 30px 22px; border-radius: 18px; }
  .lead-copy h2 { font-size: 23px; }
  .lead-form .btn-primary { width: 100%; }
  .faq summary { font-size: 15px; }

  .tv { padding: 16px 0 64px; }
  .tv-back { margin-bottom: 14px; }
  .tv-head { gap: 12px; margin-bottom: 20px; align-items: flex-start; }
  .tv-icon { width: 44px; height: 44px; border-radius: 12px; }
  .tv-icon svg { width: 22px; height: 22px; }
  .tv-head h1 { font-size: 25px; }
  .tv-head p { font-size: 14.5px; }

  .upload { min-height: 250px; border-radius: 18px; padding: 28px 18px; }
  .up-btn { width: 100%; max-width: 300px; padding: 15px 20px; }
  .up-or { display: none; }
  .where-note { font-size: 12.5px; text-align: left; }

  .work { gap: 14px; }
  .work-main { padding: 14px; min-height: 0; border-radius: 16px; }
  .side-box { padding: 18px; border-radius: 16px; }
  .field input[type=text], .field input[type=number], .field input[type=password], .field input[type=url], .field select { font-size: 16px; }

  .fc-head { margin-bottom: 12px; }
  .fc-head .spacer { display: none; }
  .fc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .fc-thumb { height: 150px; }
  .fc-del { opacity: 1; }

  .hint { font-size: 13px; }
  .pg-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .pg { padding: 6px 4px; }
  .pg-img { height: 112px; }
  .pg-img img { max-height: 104px; min-width: 0; min-height: 0; }
  .pg-tools { gap: 2px; }
  .pg-tools button { width: 28px; height: 28px; }

  .ed-bar { margin: -14px -14px 12px; padding: 10px 12px; border-radius: 16px 16px 0 0; }
  .ed-tool { padding: 8px 10px; }
  .ed-other span { display: none; }
  .ed-other { padding: 8px 10px; }
  .ed-pages { padding: 14px 0 22px; margin: 0 -14px; border-radius: 0; }

  .sig-box { padding: 20px 18px; }
  .sig-actions .btn { flex: 1; }
  #sigText { font-size: 16px; }

  .result { padding: 40px 18px; border-radius: 18px; }
  .res-dl { width: 100%; }
  .res-actions .btn { flex: 1 1 100%; }

  .footer-cols { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
}
@media (max-width: 360px) {
  .tool-grid { grid-template-columns: 1fr; }
  .pg-grid { grid-template-columns: repeat(2, 1fr); }
  .header-cta span { display: none; }
}

/* ---------- ajustes finais */
.footer-top { grid-template-columns: 1fr 2.6fr; }
.sig-dialog { margin: auto; max-height: calc(100dvh - 24px); overflow: auto; }
@media (min-width: 981px) {
  .ed-tools { flex-wrap: wrap; overflow: visible; }
  .ed-bar { align-items: flex-start; }
}
@media (max-width: 980px) {
  .work:not(.work-editor) .work-side { order: -1 !important; }
  /* editor: barra de salvar fixa no rodapé da tela */
  .work-editor .work-side { position: sticky; bottom: 0; z-index: 20; order: 2 !important; margin: 0 -16px; }
  .work-editor .side-box { border-radius: 16px 16px 0 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px -12px rgba(16,24,40,.25); border-bottom: 0; }
  .work-editor .side-box h3, .work-editor .side-box .where-note { display: none; }
  .work-editor .run-btn { margin: 0; }
  .work-editor .progress { margin-top: 10px; }
  .work-editor .err-msg { margin-top: 10px; }
}

.sig-tabs button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--brand); }
.sig-tabs button:focus:not(:focus-visible) { outline: none; }
