/* Blot — browser-local PDF redaction. Hand-written CSS, no build step. */
:root {
  color-scheme: light;
  --paper: #f6f5f1;
  --paper-2: #fffefa;
  --ink: #13151a;
  --ink-2: #3c414c;
  --ink-3: #6b7280;
  --line: #e2e0d8;
  --line-2: #cfccc2;
  --accent: #c93a14;
  --accent-ink: #fff7f3;
  --accent-soft: #fbe9e2;
  --ok: #1c7a52;
  --ok-soft: #e4f3ec;
  --warn: #8a5a00;
  --warn-soft: #fbf1dc;
  --bar: #101114;
  --shadow: 0 1px 2px rgba(20, 22, 28, .06), 0 8px 24px -12px rgba(20, 22, 28, .18);
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0d0e11;
    --paper-2: #14161b;
    --ink: #ecebe6;
    --ink-2: #b9bcc4;
    --ink-3: #8b909a;
    --line: #262930;
    --line-2: #363a43;
    --accent: #ff6a3d;
    --accent-ink: #1a0d07;
    --accent-soft: #2a1712;
    --ok: #6ee7b0;
    --ok-soft: #10231b;
    --warn: #f2c46b;
    --warn-soft: #241d10;
    --bar: #e9e8e2;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px -16px rgba(0, 0, 0, .8);
  }
}
html[data-theme="light"] { color-scheme: light; --paper:#f6f5f1; --paper-2:#fffefa; --ink:#13151a; --ink-2:#3c414c; --ink-3:#6b7280; --line:#e2e0d8; --line-2:#cfccc2; --accent:#c93a14; --accent-ink:#fff7f3; --accent-soft:#fbe9e2; --ok:#1c7a52; --ok-soft:#e4f3ec; --bar:#101114; }
html[data-theme="dark"] { color-scheme: dark; --paper:#0d0e11; --paper-2:#14161b; --ink:#ecebe6; --ink-2:#b9bcc4; --ink-3:#8b909a; --line:#262930; --line-2:#363a43; --accent:#ff6a3d; --accent-ink:#1a0d07; --accent-soft:#2a1712; --ok:#6ee7b0; --ok-soft:#10231b; --bar:#e9e8e2; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
a.link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 650; font-family: var(--sans); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--ink-3); }
.small { font-size: 13.5px; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 22px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.03em; font-size: 19px; }
.brand .mark { width: 22px; height: 22px; display: block; }
.brand .mark rect { fill: var(--ink); }
.nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav a { color: var(--ink-2); font-size: 14.5px; }
.nav a:hover { color: var(--ink); }
.nav .navline { width: 1px; height: 18px; background: var(--line-2); }
.iconbtn { background: none; border: 1px solid var(--line-2); color: var(--ink-2); border-radius: 999px; padding: 6px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.iconbtn:hover { border-color: var(--ink-3); color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--paper-2); --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 15px;
  cursor: pointer; transition: transform .06s ease, background .15s ease, opacity .15s;
  text-align: center; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-accent { --bg: var(--accent); --fg: var(--accent-ink); --bd: var(--accent); }
.btn-ghost { --bg: transparent; --fg: var(--ink); --bd: var(--line-2); }
.btn-quiet { --bg: transparent; --fg: var(--ink-2); --bd: transparent; padding: 8px 10px; }
.btn-sm { padding: 8px 13px; font-size: 13.5px; border-radius: 9px; }
.btn-block { width: 100%; }

/* ---------- landing ---------- */
.hero { padding: 74px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
h1.hero-title { font-size: clamp(2.2rem, 4.6vw, 3.55rem); margin: 18px 0 0; letter-spacing: -.035em; font-weight: 680; }
h1.hero-title .strike { position: relative; white-space: nowrap; }
h1.hero-title .strike::after {
  content: ""; position: absolute; left: -.02em; right: -.02em; bottom: -.06em;
  height: .085em; background: var(--accent); border-radius: 2px;
}
.hero-sub { margin-top: 18px; font-size: 18px; color: var(--ink-2); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-note { display: flex; gap: 16px; margin-top: 20px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.tick { color: var(--ok); font-weight: 700; }

/* demo card */
.demo-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); overflow: hidden;
}
.demo-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 60%, var(--paper-2)); }
.demo-head .dots { display: flex; gap: 5px; }
.demo-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); display: block; }
.demo-head .name { font-size: 12.5px; color: var(--ink-3); margin-left: 4px; font-family: var(--mono); }
.demo-body { position: relative; padding: 26px 28px 30px; }
.demo-paper { background: #fff; color: #14161a; border: 1px solid #e6e4dc; border-radius: 8px; padding: 20px 20px 24px; font-size: 13px; line-height: 1.75; position: relative; }
.demo-paper .ph { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8a8f99; }
.demo-paper h4 { font-size: 15px; margin: 6px 0 12px; letter-spacing: -.01em; }
.demo-paper .ln { height: 7px; background: #ecebe6; border-radius: 3px; margin: 8px 0; }
.demo-paper .ln.w80 { width: 80%; } .demo-paper .ln.w60 { width: 60%; } .demo-paper .ln.w92 { width: 92%; }
.redactbar {
  display: inline-block; background: #111; color: #111; border-radius: 2px; padding: 0 3px;
  line-height: 1.35; vertical-align: baseline; transition: background .3s ease, color .3s ease;
}
.demo-card:hover .redactbar, .demo-card.is-swept .redactbar { background: #111; }
.demo-card .demo-badge {
  position: absolute; right: 16px; bottom: 14px; display: inline-flex; align-items: center; gap: 7px;
  background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 650; padding: 6px 10px; border-radius: 999px;
}
.demo-stamp { position: absolute; inset: 0; pointer-events: none; }
.demo-scan {
  position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent);
  top: 12%; opacity: 0; animation: scan 3.4s ease-in-out infinite;
}
@keyframes scan { 0%,100% { opacity: 0; top: 12%; } 10% { opacity: .9; } 50% { top: 82%; opacity: .9; } 60% { opacity: 0; } }

/* sections */
section { padding: 64px 0; }
.section-head { max-width: 60ch; }
.section-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); margin-top: 10px; }
.section-head p { margin-top: 12px; color: var(--ink-2); font-size: 17px; }
.kicker { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 650; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { font-size: 16.5px; margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: 14.5px; }
.card .num { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.card .ico { width: 30px; height: 30px; margin-bottom: 14px; color: var(--accent); }

.compare { margin-top: 34px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 650; background: color-mix(in srgb, var(--paper) 55%, var(--paper-2)); }
tr:last-child td { border-bottom: 0; }
td.yes { color: var(--ok); font-weight: 600; }
td.no { color: var(--ink-3); }
.table-scroll { overflow-x: auto; }

/* pricing */
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 34px; align-items: stretch; }
.plan { background: var(--paper-2); border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); position: relative; }
.plan .tag { position: absolute; top: -12px; left: 24px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.plan h3 { font-size: 18px; }
.plan .price { font-size: 40px; font-weight: 680; letter-spacing: -.035em; margin-top: 14px; line-height: 1; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.plan ul li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.plan ul li .tick { line-height: 1.5; }
.plan ul li.off { color: var(--ink-3); }
.plan ul li.off .tick { color: var(--ink-3); }
.plan .spacer { flex: 1; }

/* faq */
.faq { margin-top: 30px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin-top: 10px; color: var(--ink-2); font-size: 15px; max-width: 72ch; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--ink-3); font-size: 14px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a:hover { color: var(--ink); }

/* ---------- app shell ---------- */
body.app { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--paper); }
.appbar { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 58px; border-bottom: 1px solid var(--line); background: var(--paper-2); flex: 0 0 auto; }
.appbar .brand { font-size: 17px; }
.appbar .filemeta { font-size: 13px; color: var(--ink-3); margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34vw; }
.appbar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tools-toggle { display: none; }
.pro-badge { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: var(--acne-soft, var(--accent-soft)); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); display: none; }
.pro-badge.on { display: inline-block; }

.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: 290px 1fr; }
.side { border-right: 1px solid var(--line); background: var(--paper-2); overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.side h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.panel { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--paper); }
.chiprow { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 9px; color: var(--ink-2); background: var(--paper-2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }
.chip:hover { border-color: var(--ink-3); }
.field { display: grid; gap: 5px; margin-top: 10px; }
.field label { font-size: 12.5px; color: var(--ink-3); }
.input, select.input, textarea.input {
  width: 100%; background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 8px 10px; font-size: 14px; min-width: 0;
}
textarea.input { resize: vertical; min-height: 58px; font-family: var(--mono); font-size: 12.5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.list { display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.list .item { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 8px; border-radius: 8px; background: var(--paper-2); border: 1px solid var(--line); }
.list .item .txt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12px; }
.list .item button { background: none; border: 0; color: var(--ink-3); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; border-radius: 5px; }
.list .item button:hover { color: var(--accent); background: var(--accent-soft); }
.empty-note { font-size: 12.5px; color: var(--ink-3); }

.canvasarea { position: relative; overflow: auto; background:
  radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 0) 0 0 / 16px 16px,
  color-mix(in srgb, var(--paper) 92%, var(--ink)); display: flex; flex-direction: column; align-items: center; padding: 22px 22px 40px; }
.pagecard { position: relative; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 18px 40px -22px rgba(0,0,0,.45); border-radius: 2px; }
.pagecard canvas { display: block; border-radius: 2px; }
.overlay { position: absolute; inset: 0; cursor: crosshair; touch-action: none; }
.redact-box { position: absolute; background: var(--bar); border-radius: 1px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent); cursor: move; }
.redact-box.draft { background: color-mix(in srgb, var(--bar) 55%, transparent); box-shadow: 0 0 0 1px var(--accent); }
.redact-box .rm { position: absolute; top: -9px; right: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: 0; font-size: 12px; line-height: 1; display: none; cursor: pointer; }
.redact-box.selected { box-shadow: 0 0 0 2px var(--accent); }
.redact-box.selected .rm, .redact-box:hover .rm { display: block; }

.pagebar { display: flex; align-items: center; gap: 10px; margin-top: 16px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px; box-shadow: var(--shadow); position: sticky; bottom: 8px; }
.pagebar button { background: none; border: 0; color: var(--ink-2); cursor: pointer; font-size: 14px; padding: 5px 9px; border-radius: 999px; }
.pagebar button:hover { background: var(--paper); color: var(--ink); }
.pagebar .pg { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 74px; text-align: center; }
.pagebar .divider { width: 1px; height: 16px; background: var(--line-2); }

.dropzone {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(2px); z-index: 5;
}
.dropzone.dragover { background: var(--accent-soft); }
.dropinner { text-align: center; max-width: 460px; border: 1.5px dashed var(--line-2); border-radius: 18px; padding: 40px 28px; background: var(--paper-2); }
.dropinner h2 { font-size: 20px; margin-bottom: 8px; }
.dropinner p { color: var(--ink-2); font-size: 14.5px; }
.dropinner .btn { margin-top: 18px; }
.dropinner .tiny { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper-2); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 90; box-shadow: var(--shadow); max-width: min(560px, 90vw); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #8f1d0c; color: #fff; }
.toast.good { background: #14532d; color: #fff; }

/* modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8,9,11,.55); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 80; }
.modal-backdrop.show { display: flex; }
.modal { background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px; width: min(520px, 100%); padding: 24px; box-shadow: var(--shadow); max-height: 90dvh; overflow: auto; }
.modal h2 { font-size: 20px; }
.modal p { color: var(--ink-2); font-size: 14.5px; margin-top: 8px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.modal .actions .btn-quiet { margin-right: auto; }

/* verify report */
.report { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--paper); font-size: 13.5px; }
.report .verdict { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.report .verdict.ok { color: var(--ok); }
.report .verdict.bad { color: var(--accent); }
.report ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin-top: 10px; font-size: 12.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }

body.app .toast { bottom: 84px; }

/* legal pages */
.doc { padding: 52px 0 72px; }
.doc .prose { max-width: 74ch; }
.prose h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.prose h2 { font-size: 1.15rem; margin: 34px 0 8px; }
.prose p, .prose li { color: var(--ink-2); font-size: 15.5px; }
.prose p { margin-top: 10px; }
.prose ul { margin-top: 10px; padding-left: 20px; }
.prose li { margin-top: 6px; }
.prose .updated { margin-top: 10px; color: var(--ink-3); font-size: 13.5px; }

/* responsive */
@media (max-width: 900px) {
  .hero { padding: 44px 0 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-sub { max-width: none; }
  .grid3 { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .nav a.hide-sm { display: none; }
  .nav .navline { display: none; }
  .workspace { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { display: none; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; gap: 10px; }
  body.tools-open .side {
    display: grid; grid-template-columns: 1fr; align-content: start;
    max-height: 52dvh; overflow-y: auto; overflow-x: hidden;
  }
  body.tools-open .side .panel { min-width: 0; width: auto; }
  body.tools-open .side .panel h3 { margin-bottom: 6px; }
  body.tools-open .side .chiprow { gap: 5px; }
  .tools-toggle { display: inline-flex; }
  .canvasarea { padding: 12px; }
  .appbar .filemeta { max-width: 40vw; }
  .appbar { padding: 0 10px; gap: 8px; height: 54px; }
  .appbar .brand span.word { display: none; }
}
@media (max-width: 560px) {
  .wrap { width: min(1120px, 100% - 28px); }
  h1.hero-title { font-size: 2rem; }
  .hero-cta .btn { flex: 1 1 auto; }
  .demo-body { padding: 16px; }
  .modal { padding: 18px; }
  th, td { padding: 10px 11px; font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
