@font-face{font-family:"Public Sans";font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/fonts/public-sans-latin.5ed4d31c98.woff2) format("woff2");}
@font-face{font-family:"Bricolage Grotesque";font-style:normal;font-display:swap;font-weight:200 800;src:url(/assets/fonts/bricolage-grotesque-latin.a97804dc9f.woff2) format("woff2");}
:root {
  --paper: #f5f7f6;
  --surface: #ffffff;
  --ink: #16211f;
  --muted: #56625f;
  --line: #dbe3e0;
  --line-strong: #c0cbc7;
  --brand: #0e5a57;
  --brand-hover: #0a4744;
  --tint: #e5f1ee;
  --tint-strong: #cfe6e1;
  --danger: #b42318;
  --danger-tint: #fdeceb;
  --ok: #1f7a4d;
  --on-brand: #ffffff;
  --shadow: 0 1px 2px rgba(16, 32, 30, .06), 0 1px 3px rgba(16, 32, 30, .08);
  --radius: 10px;
  --font-display: "Bricolage Grotesque", "Public Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1514;
    --surface: #152120;
    --ink: #e3ecea;
    --muted: #93a5a1;
    --line: #263533;
    --line-strong: #34463f;
    --brand: #5fc4b9;
    --brand-hover: #86d6cd;
    --tint: #16302d;
    --tint-strong: #1f423e;
    --danger: #ff8a7d;
    --danger-tint: #3a1f1e;
    --ok: #6fd39b;
    --on-brand: #06201d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Public Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "tnum" 0;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1, .tool-title h1 { font-family: var(--font-display); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

#app { max-width: 1240px; margin: 0 auto; padding: 36px 28px 48px; }

/* ---------- Início ---------- */
.home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.home-title h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.015em; }
.lead { margin: 8px 0 0; color: var(--muted); font-size: 17px; max-width: 58ch; }

.stamp {
  display: flex; align-items: center; gap: 12px;
  background: transparent; color: var(--brand); cursor: pointer;
  border: 2px solid var(--brand); border-radius: 8px;
  padding: 10px 16px 10px 12px;
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--brand);
  transform: rotate(-1.5deg);
  transition: transform .2s ease;
  text-align: left;
}
.stamp:hover { transform: rotate(0deg); }
.stamp-icon { display: flex; }
.stamp-icon svg { width: 30px; height: 30px; }
.stamp-text { display: flex; flex-direction: column; }
.stamp-text strong { font-size: 15.5px; font-weight: 700; letter-spacing: .01em; }
.stamp-text span { font-size: 12.5px; opacity: .9; }

.search-wrap { position: relative; max-width: 540px; margin: 30px 0 30px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }
.search-input { padding-left: 38px !important; height: 44px; font-size: 15.5px; }
.search-empty { margin-top: 12px; }

.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 36px 44px; align-items: start; }
.group h2 { font-size: 14px; font-weight: 650; color: var(--muted); padding: 0 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.tool-list { list-style: none; margin: 0; padding: 0; }
.tool-link {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start;
  padding: 10px; border-radius: 8px; color: var(--ink); text-decoration: none;
}
.tool-link:hover, .tool-link:focus-visible { background: var(--tint); }
.tool-link-icon { color: var(--brand); display: flex; padding-top: 1px; }
.tool-link-text { display: flex; flex-direction: column; }
.tool-link-text strong { font-size: 15.5px; font-weight: 620; }
.tool-link-text span { font-size: 13.5px; color: var(--muted); }
.group-note p { margin: 4px 10px 0; color: var(--muted); font-size: 14px; }
.group-note strong { color: var(--ink); font-weight: 600; }

.foot { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }

/* ---------- Ferramenta ---------- */
.tool-head { margin-bottom: 24px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 14px; padding: 4px 6px 4px 2px; border-radius: 6px; }
.back span { display: flex; }
.back:hover { color: var(--brand); }
.tool-title { display: flex; gap: 16px; align-items: center; }
.tool-icon { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--tint); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.tool-icon svg { width: 28px; height: 28px; }
.tool-title h1 { font-size: 27px; font-weight: 700; letter-spacing: -0.01em; outline: none; }
.tool-title p { margin: 3px 0 0; color: var(--muted); max-width: 70ch; }

.tool-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.tool-body.is-empty { grid-template-columns: minmax(0, 1fr); }
.work { min-width: 0; }
.work-content:empty { display: none; }

.dropzone {
  border: 2px dashed var(--line-strong); border-radius: 16px; background: var(--surface);
  padding: 64px 24px; text-align: center; transition: border-color .15s, background .15s;
}
.drop-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.drop-hint { margin: 4px 0 0; color: var(--muted); }
.drop-note { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 52ch; }
body.drag-over .dropzone { border-color: var(--brand); background: var(--tint); }
body.drag-over .tool-body:not(.is-empty) .work { outline: 2px dashed var(--brand); outline-offset: 8px; border-radius: 12px; }
.drop-compact { display: inline-flex; }

.panel {
  position: sticky; top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; display: flex; flex-direction: column; gap: 18px; max-height: calc(100vh - 32px); overflow: auto;
}
.panel-options { display: flex; flex-direction: column; gap: 16px; }
.panel-options:empty, .panel-status:empty { display: none; }
.panel-actions { display: flex; flex-direction: column; gap: 8px; }
.panel-actions:empty { display: none; }
.panel-summary { margin: 0; color: var(--muted); font-size: 14px; }
.tool-body.is-busy .work { pointer-events: none; opacity: .7; }

.work-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.toolbar-hint, .work-hint { font-size: 13px; }
.work-hint { margin: 0 0 14px; }
.toolbar-sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }

.file-head { display: flex; align-items: center; gap: 14px; justify-content: space-between; margin-bottom: 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.file-head-name { display: flex; flex-direction: column; min-width: 0; }
.file-head-name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60ch; }
.file-head-name .muted { font-size: 13px; }

/* ---------- Controles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px; border-radius: 8px; border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; cursor: pointer; line-height: 1.2; text-decoration: none;
  transition: background .12s, border-color .12s;
}
.btn span { display: flex; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:not(:disabled):hover { background: var(--brand-hover); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:not(:disabled):hover { background: var(--tint); border-color: var(--brand); }
.btn-sm { padding: 6px 10px; font-size: 13.5px; font-weight: 550; }
.btn-lg { padding: 12px 20px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }
.icon-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: 7px; cursor: pointer; color: var(--ink); padding: 0; }
.icon-btn:hover { background: var(--tint); color: var(--brand); }
.icon-btn.is-active { background: var(--tint-strong); color: var(--brand); }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; text-align: left; }
.muted { color: var(--muted); }

.input {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--ink); min-height: 40px;
}
.input:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
textarea.input { resize: vertical; min-height: 80px; }
input[type="color"].input { padding: 3px; height: 40px; width: 56px; }
input[type="range"] { width: 100%; accent-color: var(--brand); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13.5px; font-weight: 620; }
.field-row { display: flex; gap: 10px; align-items: flex-end; }
.field-row > * { flex: 1; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.field-error { color: var(--danger); font-size: 13px; margin: 0; }
.fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.fieldset legend { font-size: 13.5px; font-weight: 620; padding: 0; margin-bottom: 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack p { margin: 0; }

.choice { display: flex; flex-direction: column; gap: 6px; }
.choice.inline { flex-direction: row; flex-wrap: wrap; }
.choice.inline .choice-opt { flex: 1 1 auto; }
.choice-opt { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; }
.choice-opt input { margin: 3px 0 0; accent-color: var(--brand); }
.choice-opt:has(input:checked) { border-color: var(--brand); background: var(--tint); }
.choice-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 1px; }
.choice-label { display: flex; flex-direction: column; font-size: 14.5px; font-weight: 550; }
.choice-label small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14.5px; }
.check input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--brand); flex: none; }
.check span { display: flex; flex-direction: column; }
.check small { color: var(--muted); font-size: 12.5px; }

.pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; }
.pos-grid button { height: 34px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pos-grid button span { width: 14px; height: 4px; border-radius: 2px; background: var(--line-strong); }
.pos-grid button.is-active { border-color: var(--brand); background: var(--tint); }
.pos-grid button.is-active span { background: var(--brand); }
.pos-grid .mid { visibility: hidden; }

.tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 99px; background: var(--tint); color: var(--brand); font-size: 11.5px; font-weight: 600; }

/* ---------- Status / resultado ---------- */
.progress { display: flex; flex-direction: column; gap: 8px; }
.progress-text { font-size: 13.5px; color: var(--muted); }
.progress-bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; position: relative; }
.progress-bar span { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .2s; }
.progress-bar.indeterminate span { width: 35%; position: absolute; animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { 0% { left: -35%; } 100% { left: 100%; } }
.notice { padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.notice + .notice { margin-top: 8px; }
.notice-error { background: var(--danger-tint); color: var(--danger); }
.notice-info { background: var(--tint); }
.notice-warn { background: var(--tint); border-left: 3px solid var(--brand); }
.result { display: flex; flex-direction: column; gap: 10px; }
.result-head { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.result-mark { width: 26px; height: 26px; border-radius: 99px; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; }
.result-mark svg { width: 16px; height: 16px; }
.result-summary { margin: 0; font-size: 14px; }
.result .hint { text-align: center; }
.result-files summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
.result-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; font-size: 13.5px; }
.result-list li { display: flex; justify-content: space-between; gap: 10px; }
.result-list .link-btn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-bar { display: flex; gap: 10px; }
.cb-row { flex: 1; display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--muted); }
.cb-row strong { color: var(--ink); font-size: 16px; }

/* ---------- Grades ---------- */
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pg-card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 10px 6px; user-select: none; transition: border-color .12s, box-shadow .12s;
}
.page-grid.selectable .pg-card { cursor: pointer; }
.pg-card[draggable="true"] { cursor: grab; }
.pg-card:hover { border-color: var(--line-strong); }
.pg-card.is-selected { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--tint); }
.pg-card.is-dragging { opacity: .4; }
.pg-card.drop-before { box-shadow: -4px 0 0 0 var(--brand); }
.pg-card.drop-after { box-shadow: 4px 0 0 0 var(--brand); }
.pg-thumb { height: 168px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pg-thumb img { max-width: 100%; max-height: 100%; box-shadow: 0 1px 3px rgba(0,0,0,.18); background: #fff; transition: transform .2s ease; }
.thumb-ph { width: 70%; height: 85%; background: var(--paper); border-radius: 3px; }
.thumb-ph.thumb-err::after { content: "Sem prévia"; display: flex; height: 100%; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.pg-blank { width: 70%; height: 85%; background: #fff; border: 1px dashed var(--line-strong); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; color: #6b7280; padding: 6px; }
.pg-foot { display: flex; flex-direction: column; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.pg-num { font-variant-numeric: tabular-nums; }
.pg-file { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.pg-tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); padding: 2px; opacity: 0; transition: opacity .12s; }
.pg-card:hover .pg-tools, .pg-card:focus-within .pg-tools { opacity: 1; }
.pg-check { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 99px; border: 1.5px solid var(--line-strong); background: var(--surface); display: flex; align-items: center; justify-content: center; color: transparent; }
.pg-check svg { width: 14px; height: 14px; }
.pg-card.is-selected .pg-check { background: var(--brand); border-color: var(--brand); color: #fff; }

.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.file-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.file-card[draggable="true"] { cursor: grab; }
.file-card.is-dragging { opacity: .4; }
.file-card.drop-before { box-shadow: -4px 0 0 0 var(--brand); }
.file-card.drop-after { box-shadow: 4px 0 0 0 var(--brand); }
.fc-thumb { height: 170px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.fc-thumb img { max-width: 100%; max-height: 100%; box-shadow: 0 1px 3px rgba(0,0,0,.18); background: #fff; }
.fc-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-meta { font-size: 12.5px; color: var(--muted); }
.fc-remove { position: absolute; top: 6px; right: 6px; background: var(--surface); }
.fc-order { position: absolute; top: 8px; left: 8px; min-width: 22px; height: 22px; border-radius: 99px; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 6px; }

/* ---------- Modal / toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 15, 30, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100; }
.modal { background: var(--surface); border-radius: 14px; width: min(480px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.modal-wide { width: min(780px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 8px; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 8px 18px 16px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.prose h3 { font-size: 15px; margin: 18px 0 6px; }
.prose p { margin: 0 0 10px; }
.prose ul { margin: 0 0 10px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.license-text { white-space: pre-wrap; font-size: 11.5px; max-height: 320px; overflow: auto; background: var(--paper); padding: 12px; border-radius: 8px; }

#toast-root { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: min(560px, 92vw); transition: opacity .3s, transform .3s; }
.toast-error { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; transform: translateY(6px); }

@media (max-width: 900px) {
  #app { padding: 22px 16px 40px; }
  .tool-body { grid-template-columns: minmax(0, 1fr); }
  .panel { position: static; max-height: none; order: -1; }
  .home-title h1 { font-size: 28px; }
  .stamp { transform: none; }
  .page-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .pg-thumb { height: 140px; }
  .pg-tools { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Cartões informativos / propriedades ---------- */
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.info-card p { margin: 0 0 6px; }
.info-card p:last-child { margin: 0; }
.props { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 14px; }
.props dt { color: var(--muted); }
.props dd { margin: 0; font-weight: 550; }
.pw-row { display: flex; gap: 6px; }
.pw-row .input { flex: 1; }
details.adv summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
details.adv[open] summary { margin-bottom: 10px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }

/* ---------- Prévia de página ---------- */
.page-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.pv-wrap { position: relative; box-shadow: 0 2px 10px rgba(0,0,0,.15); background: #fff; }
.pv-base, .pv-over { display: block; }
.pv-over { position: absolute; inset: 0; pointer-events: none; }
.pv-label { font-size: 12.5px; }

.text-preview { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; max-height: 60vh; overflow: auto; font-size: 14px; }
.text-preview p { margin: 0 0 10px; max-width: 75ch; }
.text-preview .tp-heading { font-weight: 700; font-size: 16px; }
.text-preview-label { font-size: 12.5px; }

/* ---------- Recortar ---------- */
.crop-stage { position: relative; margin: 0 auto; box-shadow: 0 2px 10px rgba(0,0,0,.15); background: #fff; user-select: none; touch-action: none; }
.crop-canvas { display: block; }
.crop-shade { position: absolute; inset: 0; background: rgba(15, 20, 35, .55); pointer-events: none; }
.crop-box { position: absolute; border: 2px solid var(--brand); cursor: move; box-shadow: 0 0 0 1px #fff inset; }
.crop-h { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid var(--brand); border-radius: 3px; }
.crop-nw { left: -8px; top: -8px; cursor: nwse-resize; }
.crop-ne { right: -8px; top: -8px; cursor: nesw-resize; }
.crop-sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.crop-se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.crop-n { left: calc(50% - 7px); top: -8px; cursor: ns-resize; }
.crop-s { left: calc(50% - 7px); bottom: -8px; cursor: ns-resize; }
.crop-e { right: -8px; top: calc(50% - 7px); cursor: ew-resize; }
.crop-w { left: -8px; top: calc(50% - 7px); cursor: ew-resize; }

/* ---------- Editor ---------- */
.tool-body.is-editor { grid-template-columns: minmax(0, 1fr) 300px; }
.editor { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ed-toolbar { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface); }
.ed-tool { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 58px; padding: 6px 4px 4px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: var(--ink); font-size: 11.5px; }
.ed-tool span { display: flex; }
.ed-tool:hover { background: var(--tint); }
.ed-tool.is-active { background: var(--tint-strong); color: var(--brand); font-weight: 650; }
.ed-spacer { flex: 1; }
.ed-zoom { min-width: 62px; }
.ed-hintbar { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-bottom: 1px solid var(--line); min-height: 40px; }
.ed-hint { margin: 0; font-size: 13px; flex: 1; min-width: 0; }
.ed-view { display: flex; align-items: center; gap: 2px; flex: none; }
.ed-scroller { height: calc(100vh - 290px); min-height: 420px; overflow: auto; background: var(--paper); }
.ed-pages { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 18px 16px 40px; width: max-content; min-width: 100%; }
.ed-page-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ed-page { position: relative; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.ed-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ed-layer { position: absolute; inset: 0; touch-action: none; }
.ed-page-num { font-size: 12px; }
.ed-pages[data-tool="select"] .ed-layer { cursor: default; }
.ed-pages[data-tool="text"] .ed-layer, .ed-pages[data-tool="date"] .ed-layer { cursor: text; }
.ed-pages:not([data-tool="select"]):not([data-tool="text"]):not([data-tool="date"]) .ed-layer { cursor: crosshair; }
.ed-el { position: absolute; cursor: move; user-select: none; touch-action: none; }
.ed-el:hover { outline: 1px dashed rgba(14, 90, 87, .6); outline-offset: 2px; }
.ed-el.is-selected { outline: 2px solid #0e5a57; outline-offset: 2px; }
.ed-el.is-editing { cursor: text; }
.ed-text { display: inline-block; white-space: pre; line-height: 1.2; min-width: 4px; outline: none; color: #111; }
.ed-el.is-editing .ed-text { user-select: text; }
.ed-text:empty::before { content: "Digite aqui"; color: #9aa3b4; }
.ed-el img { width: 100%; height: 100%; display: block; pointer-events: none; }
.ed-el svg { width: 100%; height: 100%; display: block; overflow: visible; pointer-events: none; }
.ed-whiteout { background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.ed-highlight { background: rgba(255, 225, 77, .4); mix-blend-mode: multiply; }
.ed-rect { border: 1.5px solid #b42318; }
.ed-redact { background: #000; }
.ed-redact:hover { outline-color: #ff6b5e; }
.ed-handle { position: absolute; right: -7px; bottom: -7px; width: 12px; height: 12px; background: #fff; border: 2px solid #0e5a57; border-radius: 3px; cursor: nwse-resize; display: none; }
.ed-el.is-selected:not(.is-editing) .ed-handle { display: block; }
.ed-ink-tmp { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ed-props { display: flex; flex-direction: column; gap: 14px; }
.ed-sel { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.ed-sel-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.sig-current { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; justify-content: center; }
.sig-current img { max-width: 100%; max-height: 70px; }

/* ---------- Assinatura ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: transparent; padding: 8px 14px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.sig-pad-wrap { position: relative; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.sig-pad { display: block; touch-action: none; cursor: crosshair; }
.sig-line { position: absolute; left: 8%; right: 8%; bottom: 26%; border-bottom: 1px solid #c9ced8; pointer-events: none; }
.sig-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.sig-fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sig-font { background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px; font-size: 30px; min-height: 70px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sig-font.is-active { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.sig-photo-prev { background: #fff; border: 1px dashed var(--line-strong); border-radius: 10px; min-height: 120px; display: flex; align-items: center; justify-content: center; padding: 10px; }
.sig-photo-prev .muted { color: #6b7280; }
.sig-photo-canvas { max-width: 100%; max-height: 220px; }
.sig-colors { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.swatch { width: 26px; height: 26px; border-radius: 99px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; }
.swatch.is-active { box-shadow: 0 0 0 2px var(--brand); }

@media (max-width: 900px) {
  .tool-body.is-editor { grid-template-columns: minmax(0, 1fr); }
  .ed-scroller { height: 70vh; }
  .ed-tool { min-width: 52px; }
  .ed-tool-label { display: none; }
}

/* depois do resultado, o botão de ação vira secundário: o destaque passa para o download */
.panel.has-result .panel-actions .btn-primary { background: var(--surface); color: var(--brand); border-color: var(--line-strong); }
.panel.has-result .panel-actions .btn-primary:not(:disabled):hover { background: var(--tint); }

/* ---------- Comparar ---------- */
.cmp-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.cmp-slot { background: var(--surface); border: 2px dashed var(--line-strong); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-height: 130px; }
.cmp-slot.is-over { border-color: var(--brand); background: var(--tint); }
.cmp-slot-label { font-weight: 650; font-size: 14px; }
.cmp-slot-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; max-width: 100%; }
.cmp-slot-body p { margin: 0; font-size: 13.5px; }
.cmp-file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-legend { display: flex; gap: 16px; font-size: 13px; margin-bottom: 10px; }
.cmp-list { display: flex; flex-direction: column; gap: 10px; }
.cmp-item { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.cmp-item-head { display: flex; align-items: center; gap: 10px; font-size: 12.5px; margin-bottom: 6px; }
.cmp-num { min-width: 22px; height: 22px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11.5px; }
.cmp-ctx { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.cmp-text { margin: 0; white-space: pre-wrap; max-width: 80ch; }
ins { background: #d9f5e3; color: #0f5132; text-decoration: none; border-bottom: 2px solid #1d7a46; }
del { background: #fde2e1; color: #8a1c14; }
@media (prefers-color-scheme: dark) {
  ins { background: #173d29; color: #a7f0c4; border-bottom-color: #6fd39b; }
  del { background: #43201e; color: #ffb4ab; }
}
@media (max-width: 700px) { .cmp-slots { grid-template-columns: 1fr; } }
.check:has(input:disabled) { opacity: .55; cursor: default; }

/* ---------- Site (pdflocal.com.br) — complementa styles.css ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body.site { display: flex; flex-direction: column; min-height: 100vh; }
body.site #app { display: contents; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; width: 100%; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 300; }
.skip:focus { left: 12px; }

/* marca */
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--brand); text-decoration: none; --mark-paper: var(--paper); }
.brand .mark { flex: none; }
.brand-name { font-family: var(--font-display); font-size: 23px; font-weight: 520; color: var(--ink); letter-spacing: -0.025em; line-height: 1; }
.brand-name b { font-weight: 800; color: var(--brand); }

/* cabeçalho */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.site-head.scrolled, .site-head { border-bottom-color: var(--line); }
.head-row { display: flex; align-items: center; gap: 28px; height: 64px; }
.site-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 550; padding: 8px 12px; border-radius: 8px; }
.site-nav a:hover { background: var(--tint); color: var(--brand); }
.site-nav a[aria-current="page"] { color: var(--brand); }
.menu-btn { display: none; margin-left: auto; }
.net-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--brand); background: var(--tint); padding: 4px 10px; border-radius: 99px; }

/* rodapé */
.site-foot { margin-top: 96px; border-top: 1px solid var(--line); background: var(--surface); }
.foot-promise { padding-top: 44px; padding-bottom: 36px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.foot-promise h2 { font-family: var(--font-display); font-size: 26px; font-weight: 720; letter-spacing: -0.02em; line-height: 1.15; max-width: 18ch; }
.foot-promise p { color: var(--muted); margin: 10px 0 0; max-width: 42ch; }
.foot-col h3 { font-size: 13.5px; color: var(--muted); font-weight: 650; margin-bottom: 10px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 14.5px; }
.foot-col a { color: var(--ink); text-decoration: none; }
.foot-col a:hover { color: var(--brand); text-decoration: underline; }
.foot-bottom { border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 22px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; color: var(--muted); font-size: 13px; }

/* início */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 40px; align-items: center; padding: 56px 0 40px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(38px, 5.6vw, 66px); font-weight: 760; letter-spacing: -0.035em; line-height: 1.0; max-width: 13ch; }
.hero .lead { font-size: 18.5px; margin-top: 20px; max-width: 52ch; color: var(--muted); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); }
.hero-note strong { color: var(--ink); font-weight: 650; }
.hero-stamp { color: var(--brand); justify-self: center; width: min(340px, 100%); transform: rotate(-9deg); }
.hero-stamp svg { width: 100%; height: auto; display: block; --paper: var(--paper); }
@media (prefers-reduced-motion: no-preference) {
  .hero-stamp { animation: carimbar .55s cubic-bezier(.2, .9, .3, 1.2) .25s both; }
  @keyframes carimbar { 0% { opacity: 0; transform: rotate(-4deg) scale(1.25); } 60% { opacity: 1; } 100% { opacity: 1; transform: rotate(-9deg) scale(1); } }
}

.section { padding: 64px 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.section h2 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 34px); font-weight: 740; letter-spacing: -0.025em; line-height: 1.1; }
.section-sub { color: var(--muted); margin: 8px 0 0; max-width: 60ch; }
.section .search-wrap { margin: 0; width: min(420px, 100%); }

.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 15px; }
.compare-table th, .compare-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table thead th { font-size: 13.5px; color: var(--muted); font-weight: 650; background: var(--paper); }
.compare-table thead th.us { color: var(--brand); }
.compare-table td.us { background: var(--tint); font-weight: 600; }
.compare-table td:first-child { color: var(--muted); width: 34%; }

.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.highlight { padding: 22px 22px 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.highlight + .highlight { padding-left: 22px; border-left: 1px solid var(--line); }
.highlight strong { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.highlight span { color: var(--muted); font-size: 14.5px; }
.highlight em { font-style: normal; color: var(--brand); font-weight: 650; font-size: 14px; margin-top: auto; padding-top: 8px; }
.highlight:hover strong { color: var(--brand); }

.verify { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.verify h3 { font-size: 16.5px; margin-bottom: 6px; }
.verify p { margin: 0; color: var(--muted); font-size: 14.5px; }
.verify kbd { font-family: inherit; font-size: 12.5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface); color: var(--ink); }

.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 620; font-size: 16px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 22px; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 26px; }
.faq details p { margin: 0 0 18px; color: var(--muted); max-width: 70ch; }

.promise-band { margin-top: 72px; padding: 40px; border-radius: 18px; background: var(--brand); color: var(--on-brand); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.promise-band p { margin: 0; font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; max-width: 26ch; }
.promise-band .btn { background: var(--on-brand); color: var(--brand); }
.promise-band .btn:hover { background: var(--paper); }

/* ferramentas na página inicial */
body.site .groups { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.section .group h2 { font-family: inherit; font-size: 14px; font-weight: 650; letter-spacing: 0; color: var(--muted); line-height: 1.2; }

/* página de ferramenta */
.crumbs { font-size: 13.5px; color: var(--muted); padding-top: 26px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.page-tool .tool-head { margin: 12px 0 26px; }
.local-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--brand); }
.local-badge svg { width: 16px; height: 16px; }
.tool-info { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; margin-top: 72px; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: passo; display: flex; flex-direction: column; gap: 14px; }
.steps li { counter-increment: passo; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(passo); width: 28px; height: 28px; border-radius: 99px; border: 1.5px solid var(--brand); color: var(--brand); font-weight: 700; font-size: 13.5px; display: flex; align-items: center; justify-content: center; }
.steps li p { margin: 3px 0 0; }
.tool-info h2 { font-family: var(--font-display); font-size: 22px; font-weight: 720; margin-bottom: 16px; letter-spacing: -0.015em; }
.related { margin-top: 56px; }
.related ul { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.related a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 99px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 550; background: var(--surface); }
.related a:hover { border-color: var(--brand); color: var(--brand); }
.related a svg { width: 18px; height: 18px; color: var(--brand); }
.noscript-box { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }

/* páginas de texto */
.doc { max-width: 760px; padding-top: 40px; }
.doc h1 { font-family: var(--font-display); font-size: clamp(32px, 4.4vw, 48px); font-weight: 760; letter-spacing: -0.03em; line-height: 1.05; }
.doc .lead { font-size: 18px; color: var(--muted); margin: 16px 0 0; }
.doc h2 { font-family: var(--font-display); font-size: 24px; font-weight: 720; letter-spacing: -0.015em; margin: 44px 0 12px; }
.doc h3 { font-size: 17px; margin: 24px 0 8px; }
.doc p, .doc li { font-size: 16px; line-height: 1.65; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc code { font-size: 14px; background: var(--tint); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.doc .callout { border-left: 3px solid var(--brand); background: var(--surface); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 20px 0; }
.doc .callout p { margin: 0; }
.download-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin: 24px 0; }
.download-card .meta { color: var(--muted); font-size: 14px; }
.hash { display: block; margin-top: 6px; font-size: 13px; }
.csp-rule { white-space: pre-wrap; word-break: break-all; font-size: 13px; line-height: 1.6; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 12px 0 0; }
.csp-rule code { background: none; padding: 0; font-size: inherit; }
.license-full { white-space: pre-wrap; font-size: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; max-height: none; overflow: auto; }

.notfound { text-align: left; padding-top: 80px; padding-bottom: 20px; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-stamp { width: 220px; justify-self: start; order: -1; margin-bottom: -8px; }
  .foot-promise { grid-template-columns: 1fr 1fr; }
  .foot-promise > :first-child { grid-column: 1 / -1; }
  .verify { grid-template-columns: 1fr; gap: 18px; }
  .tool-info { grid-template-columns: 1fr; gap: 36px; }
  .highlight + .highlight { padding-left: 0; border-left: 0; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .head-row { gap: 12px; }
  .menu-btn { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 14px; }
  body.menu-open .site-nav { display: flex; }
  .net-status { display: none; }
  .promise-band { padding: 26px; }
  .hero { padding-bottom: 8px; }
  .section { padding-top: 48px; }
  .hero-stamp { width: 180px; }
  .compare-table th, .compare-table td { padding: 10px 12px; font-size: 14px; }
}

/* versão offline (arquivo único) */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.topbar-tag { font-size: 12.5px; font-weight: 650; color: var(--brand); background: var(--tint); padding: 3px 10px; border-radius: 99px; }
