/* Accohub Statement Converter — brand tokens from the Accohub palette */
:root {
  --primary: #5B5BD6;
  --primary-2: #6A6AD9;
  --primary-ink: #4343B8;
  --primary-tint: #EEEEFC;
  --accent: #F59E0B;
  --accent-ink: #B45309;
  --accent-tint: #FEF3C7;
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --text: #1F2937;
  --muted: #6B7280;
  --line: #E5E7EB;
  --ok: #047857;
  --ok-tint: #D1FAE5;
  --bad: #B91C1C;
  --bad-tint: #FEE2E2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 41, 55, .06), 0 8px 24px rgba(31, 41, 55, .06);
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); }
img { max-width: 100%; }
a { color: var(--primary-ink); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: #fff; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.fine { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }

/* ---------- top bar ---------- */
.topbar { background: var(--grad); color: #fff; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.logo-pill { background: #fff; border-radius: 10px; padding: 5px 10px; display: inline-flex; align-items: center; height: 40px; }
.logo-pill img { height: 30px; width: auto; display: block; }
.logo-text { font-weight: 800; color: var(--primary); letter-spacing: -.02em; font-size: 20px; }
.brand-sub { font-weight: 600; font-size: 15px; opacity: .95; }
.topnav { display: flex; gap: 18px; }
.topnav a { color: #fff; text-decoration: none; font-size: 14px; opacity: .9; }
.topnav a:hover { opacity: 1; text-decoration: underline; }

/* ---------- buttons, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 10px 18px; font: 600 14.5px/1.2 var(--font); cursor: pointer; text-decoration: none; transition: transform .06s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(91, 91, 214, .35); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(91, 91, 214, .45); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: #fff; color: var(--primary-ink); border-color: #D7D7F5; }
.btn-ghost:hover { background: var(--primary-tint); }
.btn-block { width: 100%; padding: 13px; font-size: 15.5px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.link { background: none; border: 0; color: var(--primary-ink); cursor: pointer; text-decoration: underline; padding: 0; }
.field { display: grid; gap: 6px; margin-top: 14px; }
.field label { font-weight: 600; font-size: 13.5px; }
input, select { font: inherit; color: var(--text); border: 1px solid #D1D5DB; border-radius: 9px; padding: 9px 11px; background: #fff; width: 100%; }
input[type=radio], input[type=checkbox] { width: auto; padding: 0; border: 0; border-radius: 0; background: none; accent-color: var(--primary); flex: none; margin: 0; }
input:focus, select:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(91, 91, 214, .2); }
.help { margin: 0; font-size: 12.5px; color: var(--muted); }
.form-error { color: var(--bad); background: var(--bad-tint); border-radius: 8px; padding: 8px 12px; font-size: 13.5px; margin: 12px 0 0; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- hero / upload ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: start; padding: 44px 0 20px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--primary-ink); margin: 0 0 8px; }
h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 14px; }
.hl { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 16.5px; color: #374151; max-width: 34em; margin: 0 0 22px; }
.proof-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.proof-points li { display: flex; gap: 12px; align-items: flex-start; }
.proof-points strong { display: block; }
.proof-points span { color: var(--muted); font-size: 14px; }
.pp-ic { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary-ink); font-weight: 700; }
.upload-card { padding: 22px; }
.drop { border: 2px dashed #C7C7F1; border-radius: 12px; padding: 30px 18px; text-align: center; cursor: pointer; background: #FAFAFF; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-tint); }
.drop-ic { width: 48px; height: 48px; color: var(--primary); }
.drop-title { font-weight: 700; font-size: 17px; margin: 6px 0 4px; }
.drop-hint { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.picked { margin-top: 12px; display: grid; gap: 6px; }
.picked-item { display: flex; justify-content: space-between; gap: 10px; background: var(--bg); border-radius: 9px; padding: 8px 12px; font-size: 14px; }
.picked-item span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opts { margin: 16px 0 4px; border-top: 1px solid var(--line); padding-top: 12px; }
.opts summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--primary-ink); }
.opts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#convert { margin-top: 16px; }

.how { padding: 28px 0 40px; }
.how h2 { font-size: 22px; margin: 0 0 16px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps h3 { margin: 8px 0 6px; font-size: 16px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 14px; }

/* ---------- progress ---------- */
.progress-card { max-width: 560px; margin: 60px auto; padding: 34px; text-align: center; }
.spinner { width: 44px; height: 44px; margin: 0 auto 16px; border-radius: 50%; border: 4px solid var(--primary-tint); border-top-color: var(--primary); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.progress-card h2 { margin: 0 0 4px; font-size: 22px; }
.stages { list-style: none; padding: 0; margin: 20px 0; text-align: left; display: grid; gap: 8px; }
.stages li { display: flex; gap: 10px; align-items: center; font-size: 14.5px; }
.stages li::before { content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-tint); color: var(--ok); font-size: 12px; font-weight: 800; }
.stages li.now::before { content: ""; background: var(--primary-tint); border: 3px solid var(--primary); width: 16px; height: 16px; margin: 0 3px; }
.stages li.now { font-weight: 600; }

/* ---------- error ---------- */
.error-card { max-width: 620px; margin: 60px auto; padding: 32px; }
.err-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-ink); display: grid; place-items: center; font-weight: 900; font-size: 22px; margin-bottom: 10px; }
.error-card h2 { margin: 0 0 6px; }
.tips { color: #374151; padding-left: 18px; margin: 10px 0 18px; }
.tips li { margin: 4px 0; }

/* ---------- result ---------- */
.result-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 30px 0 16px; flex-wrap: wrap; }
.r-title { font-size: 28px; margin: 0; }
.dl { display: flex; gap: 10px; }
.cert { padding: 18px 20px; display: grid; gap: 14px; }
.cert-main { display: flex; gap: 14px; align-items: center; }
.cert-badge { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; font-weight: 900; background: var(--ok-tint); color: var(--ok); }
.cert-badge.warn { background: var(--accent-tint); color: var(--accent-ink); }
.cert-badge.na { background: var(--primary-tint); color: var(--primary-ink); }
.cert-line { font-size: 18px; font-weight: 700; margin: 0; }
.cert-sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 500 13.5px var(--font); cursor: pointer; color: var(--text); }
.chip b { font-variant-numeric: tabular-nums; margin-right: 2px; }
.chip.on { background: var(--text); border-color: var(--text); color: #fff; }
.chip.c-ok b { color: var(--ok); } .chip.c-adj b { color: var(--primary-ink); } .chip.c-rev b { color: var(--accent-ink); }
.chip.c-ed b { color: #7C3AED; } .chip.c-rem b { color: var(--muted); }
.chip.on b { color: #fff; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; margin: 14px 0; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.fact dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.fact dd { margin: 3px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fact.flag dd { color: var(--accent-ink); }
.table-tools { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin: 18px 0 10px; flex-wrap: wrap; }
.table-tools input { max-width: 360px; }
.table-tools p { margin: 0; }
.table-wrap { overflow: auto; max-height: 70vh; }
table.tx { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tx th { position: sticky; top: 0; z-index: 1; background: var(--grad); color: #fff; text-align: left; font-weight: 600; padding: 10px; white-space: nowrap; }
.tx td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tx .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx td.c-n { width: 44px; color: var(--muted); }
.tx td.c-d { white-space: nowrap; }
.tx .c-narr { min-width: 280px; }
.tx td.c-narr { overflow-wrap: anywhere; }
.tx .c-chk { text-align: center; width: 44px; }
.tx tbody tr.r { cursor: pointer; }
.tx tbody tr.r:hover td { background: #FAFAFF; }
.tx tbody tr.r.open td { background: var(--primary-tint); }
.tx tbody tr.r.st-rev td:first-child { box-shadow: inset 3px 0 var(--accent); }
.tx tbody tr.r.st-adj td:first-child { box-shadow: inset 3px 0 var(--primary); }
.tx tbody tr.r.st-ed td:first-child { box-shadow: inset 3px 0 #7C3AED; }
.tx tbody tr.r.excluded td { text-decoration: line-through; color: var(--muted); }
.tx .computed { color: var(--muted); font-style: italic; }
.tie { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 800; }
.tie.y { background: var(--ok-tint); color: var(--ok); } .tie.n { background: var(--bad-tint); color: var(--bad); } .tie.u { background: var(--bg); color: var(--muted); }
.badge { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.b-ok { background: var(--ok-tint); color: var(--ok); } .b-adj { background: var(--primary-tint); color: var(--primary-ink); }
.b-rev { background: var(--accent-tint); color: var(--accent-ink); } .b-ed { background: #EDE9FE; color: #6D28D9; } .b-rem { background: var(--bg); color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }
tr.detail td { background: #FCFCFF; padding: 0; }
.detail-in { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 16px; }
.detail-in .evidence { grid-column: 1 / -1; margin: 0; }
.evidence img { max-height: 120px; object-fit: contain; object-position: left center; }
.note { margin: 0 0 10px; font-weight: 600; }
.evidence { margin: 0 0 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.evidence img { display: block; width: 100%; height: auto; image-rendering: auto; }
.evidence figcaption { font-size: 12px; color: var(--muted); padding: 6px 10px; border-top: 1px solid var(--line); }
.tie-explain { margin: 0; color: #374151; }
.edit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.edit-grid label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: #374151; }
.edit-grid .span2 { grid-column: span 2; }
.edit-grid input { padding: 7px 9px; font-size: 13.5px; }
.edit .actions { margin-top: 12px; }
.empty { text-align: center; color: var(--muted); padding: 30px; margin: 0; }
.removed { margin-top: 18px; padding: 18px; }
.removed h2 { font-size: 17px; margin: 0 0 4px; }
.result-foot { padding: 24px 0 40px; display: grid; gap: 8px; }
.result-foot p { margin: 0; }

/* ---------- footer, privacy ---------- */
.foot { border-top: 1px solid var(--line); background: #fff; margin-top: 30px; }
.foot-in { display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.prose { max-width: 760px; padding: 36px 0 20px; }
.prose h1 { font-size: 32px; }
.prose h2 { font-size: 19px; margin: 28px 0 8px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; background: #fff; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--primary-tint); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 28px; gap: 26px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .detail-in { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .brand-sub { display: none; }
  .steps, .opts-grid { grid-template-columns: 1fr; }
  .edit-grid { grid-template-columns: 1fr 1fr; }
  .edit-grid .span2 { grid-column: span 2; }
  .dl { width: 100%; } .dl .btn { flex: 1; }
  .progress-card, .error-card { margin: 28px auto; padding: 24px; }
}
@media print {
  .topbar, .foot, .dl, .table-tools, .result-foot, .chips { display: none; }
  .table-wrap { max-height: none; overflow: visible; }
}

/* ---------- v1.1: account area ---------- */
.acct { display: inline-flex; align-items: center; gap: 10px; }
.acct a, .acct .btn-signin { color: #fff; text-decoration: none; font-size: 14px; }
.acct .credits-pill { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 4px 12px; font-weight: 600; }
.acct .btn-signin { background: #fff; color: var(--primary-ink); border-radius: 9px; padding: 6px 14px; font-weight: 600; }
.acct .btn-signin:hover { background: var(--primary-tint); }

/* ---------- v1.1: processing animation ---------- */
.scan { position: relative; width: 120px; height: 150px; margin: 0 auto 18px; }
.scan-doc { width: 120px; height: 150px; display: block; }
.doc-bg { fill: #fff; stroke: #D7D7F5; stroke-width: 2; }
.doc-h { fill: var(--primary); opacity: .85; }
.doc-rows rect { fill: #E5E7EB; }
.doc-ticks circle { fill: var(--ok); opacity: 0; animation: tick 3.2s infinite; }
.doc-ticks circle:nth-child(2) { animation-delay: .8s; } .doc-ticks circle:nth-child(3) { animation-delay: 1.6s; }
.doc-ticks circle:nth-child(4) { animation-delay: 2.4s; }
.doc-rows rect { animation: row 3.2s infinite; }
.doc-rows rect:nth-child(2) { animation-delay: .4s; } .doc-rows rect:nth-child(3) { animation-delay: .8s; }
.doc-rows rect:nth-child(4) { animation-delay: 1.2s; } .doc-rows rect:nth-child(5) { animation-delay: 1.6s; }
.doc-rows rect:nth-child(6) { animation-delay: 2s; } .doc-rows rect:nth-child(7) { animation-delay: 2.4s; }
.doc-rows rect:nth-child(8) { animation-delay: 2.8s; }
.scan-bar { position: absolute; left: 4px; right: 4px; top: 14px; height: 3px; border-radius: 3px;
  background: var(--accent); box-shadow: 0 0 14px 3px rgba(245,158,11,.55); animation: sweep 3.2s ease-in-out infinite; }
@keyframes sweep { 0% { top: 14px; } 50% { top: 128px; } 100% { top: 14px; } }
@keyframes row { 0%, 100% { fill: #E5E7EB; } 20% { fill: #C7C7F1; } 40% { fill: #E5E7EB; } }
@keyframes tick { 0%, 20% { opacity: 0; transform: scale(.4); } 30%, 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
.doc-ticks circle { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: reduce) {
  .scan-bar, .doc-rows rect, .doc-ticks circle { animation: none; }
  .doc-ticks circle { opacity: 1; }
}
.eta { font-weight: 600; color: var(--primary-ink); margin: 10px 0 0; min-height: 1.4em; }
.tip { background: var(--accent-tint); color: #78350F; border-radius: 10px; padding: 10px 14px; font-size: 13.5px;
  margin: 6px 0 14px; min-height: 2.6em; transition: opacity .4s; }
.tip.fade { opacity: 0; }

/* ---------- v1.1: locked preview ---------- */
.lock { display: flex; gap: 16px; align-items: flex-start; padding: 20px; margin-top: 14px; border: 2px solid #C7C7F1;
  background: linear-gradient(180deg, #FFFFFF, #F7F7FE); }
.lock-ic { font-size: 28px; line-height: 1; }
.lock h2 { margin: 0 0 4px; font-size: 19px; }
.lock-body { flex: 1; }
.lock .actions { margin-top: 12px; }
.btn-google { background: #fff; color: #1F2937; border: 1px solid #D1D5DB; }
.btn-google:hover { background: #F9FAFB; }
.btn-google svg { width: 18px; height: 18px; }
tr.teaser td { filter: blur(4px); user-select: none; pointer-events: none; color: var(--muted); }

/* ---------- v1.1: pricing & account ---------- */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 18px 0; }
.pack { padding: 22px; display: grid; gap: 6px; text-align: center; }
.pack.best { border: 2px solid var(--primary); position: relative; }
.pack.best::before { content: "Best value"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.pack .pages { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.pack .price { font-size: 22px; font-weight: 700; color: var(--primary-ink); }
.pack .per { color: var(--muted); font-size: 13px; }
.balance-card { padding: 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.balance-card .big { font-size: 36px; font-weight: 800; }
.notice { border-radius: 10px; padding: 12px 14px; margin: 14px 0; font-size: 14px; }
.notice.ok { background: var(--ok-tint); color: var(--ok); } .notice.bad { background: var(--bad-tint); color: var(--bad); }
.notice.info { background: var(--primary-tint); color: var(--primary-ink); }
.hist { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.hist th, .hist td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.hist td.num, .hist th.num { text-align: right; font-variant-numeric: tabular-nums; }
.phone-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; max-width: 520px; }
.phone-row .field { flex: 1; min-width: 200px; margin: 0; }
@media (max-width: 560px) { .acct .credits-pill { display: none; } .lock { flex-direction: column; } }
.pad { padding: 20px; }
.prose-wide { max-width: 1000px; }
.pad h2:first-child { margin-top: 0; }

/* ===================== v1.2: free PDF tools ===================== */
.btn-accent { background: var(--accent); color: #1F2937; box-shadow: 0 4px 14px rgba(245, 158, 11, .35); }
.btn-accent:hover { background: #F7AE33; }
.btn-wide { width: 100%; margin-top: 14px; }
.link { color: var(--primary-ink); text-decoration: underline; }
.hub-hero { padding: 40px 0 10px; max-width: 760px; }
.hub-hero h1 { font-size: clamp(28px, 4.4vw, 42px); line-height: 1.15; margin: 0 0 12px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 22px 0 28px; }
.tool-tile { display: flex; flex-direction: column; gap: 6px; padding: 20px; color: var(--text); text-decoration: none; transition: transform .1s, box-shadow .15s, border-color .15s; }
.tool-tile:hover { transform: translateY(-2px); border-color: #C7C7F1; box-shadow: 0 10px 28px rgba(91, 91, 214, .14); }
.tool-tile strong { font-size: 16.5px; }
.tool-tile .muted { font-size: 13.5px; }
.tile-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary-ink); font-size: 22px; font-weight: 700; }
.hub-cta { display: flex; gap: 24px; align-items: center; justify-content: space-between; padding: 26px; margin-bottom: 40px; border-left: 5px solid var(--accent); }
.hub-cta h2 { margin: 0 0 6px; font-size: 21px; }
.hub-cta p { margin: 0; color: #374151; }
.tool-main { padding-bottom: 40px; }
.crumbs { font-size: 13px; color: var(--muted); margin: 22px 0 10px; }
.crumbs a { color: var(--primary-ink); }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.tool-card { padding: 26px; }
.tool-card h1 { margin: 0 0 6px; font-size: 30px; }
.tool-card .lede { margin-bottom: 10px; }
.private-badge { display: inline-flex; gap: 8px; align-items: center; background: var(--ok-tint); color: var(--ok); font-weight: 600; font-size: 13.5px; padding: 6px 12px; border-radius: 999px; margin: 0 0 18px; }
.drop { display: block; }
.drop .drop-ic { display: block; margin: 0 auto; width: auto; height: auto; font-size: 30px; line-height: 1; }
.drop-title, .drop-sub { display: block; }
.drop-sub { color: var(--muted); font-size: 14px; }
.file-list { list-style: none; margin: 14px 0 0; padding: 0; }
.file-list li { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.file-list .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-list .fsize { color: var(--muted); font-size: 13px; white-space: nowrap; }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; color: var(--primary-ink); font-size: 15px; display: inline-grid; place-items: center; }
.icon-btn:hover:not(:disabled) { background: var(--primary-tint); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.tool-opts { margin-top: 16px; }
.opt { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 12px; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.opt legend { font-weight: 700; font-size: 13px; padding: 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.opt label { display: inline-flex; gap: 7px; align-items: center; cursor: pointer; white-space: nowrap; }
.opt-row { border: 0; padding: 0; }
.opt-inline { display: flex; gap: 10px; align-items: center; margin: 0 0 12px; font-weight: 600; }
.opt-inline input[type=text], .opt-inline input[type=number] { flex: 1; max-width: 320px; padding: 9px 12px; border: 1px solid #D1D5DB; border-radius: 9px; font: inherit; }
.opt-inline input[type=number] { max-width: 110px; }
.tool-status { margin-top: 14px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.tool-status .bar { height: 8px; border-radius: 999px; background: var(--primary-tint); overflow: hidden; }
.tool-status .bar span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.tool-result { margin-top: 16px; }
.ok-line { display: flex; gap: 12px; align-items: flex-start; background: var(--ok-tint); color: #065F46; padding: 12px 14px; border-radius: 10px; }
.ok-line.warn { background: var(--accent-tint); color: #78350F; }
.ok-ic { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; font-weight: 800; }
.tool-card .err { margin-top: 12px; color: var(--bad); background: var(--bad-tint); padding: 10px 12px; border-radius: 10px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; margin-top: 4px; }
.thumb { margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; text-align: center; }
.thumb-img { height: 150px; display: grid; place-items: center; overflow: hidden; }
.thumb-img img { max-width: 100%; max-height: 140px; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); transition: transform .15s; }
.thumb figcaption { font-size: 12.5px; font-weight: 700; margin: 4px 0; }
.thumb-actions { display: flex; justify-content: center; gap: 3px; flex-wrap: wrap; }
.thumb-actions .icon-btn { width: 26px; height: 26px; font-size: 13px; }
.side { display: grid; gap: 16px; }
.side .card { padding: 20px; }
.cta-card { border-top: 4px solid var(--accent); }
.cta-card h2 { margin: 0 0 6px; font-size: 19px; }
.cta-card p { margin: 0 0 14px; color: #374151; font-size: 14px; }
.cta-card .btn { width: 100%; white-space: normal; text-align: center; }
.h-sm { font-size: 15px; margin: 0 0 8px; }
.more-tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.more-tools a { color: var(--primary-ink); text-decoration: none; font-weight: 600; }
.more-tools a:hover { text-decoration: underline; }
.faq { max-width: 760px; margin: 34px 0 10px; }
.faq h2 { font-size: 20px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 8px 0 0; color: #374151; }
/* converter: sign-in gate before upload */
.gate { text-align: center; padding: 26px 18px; border: 2px dashed #C7C7F1; border-radius: 12px; background: #FAFAFF; }
.gate h3 { margin: 4px 0 6px; font-size: 18px; }
.gate p { margin: 0 0 14px; color: #374151; }
.gate .gate-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 320px; margin: 0 auto; }
.free-pill { display: inline-block; background: var(--accent-tint); color: var(--accent-ink); font-weight: 700; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; }
.allowance { font-size: 13.5px; color: #374151; margin: 10px 0 0; text-align: center; }
@media (max-width: 900px) {
  .tool-grid { grid-template-columns: 1fr; }
  .hub-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .tool-card { padding: 18px; }
  .tool-card h1 { font-size: 25px; }
}

/* ===================== v1.3: site shell (header, mega menu, footer) ===================== */
html { overflow-x: hidden; scroll-padding-top: 84px; }
.topbar { position: sticky; top: 0; z-index: 40; box-shadow: 0 2px 10px rgba(67, 67, 184, .25); }
.topbar-in { height: 64px; }
.brand { gap: 10px; flex: none; }
.brand .logo-pill { height: 38px; width: 38px; padding: 4px; justify-content: center; border-radius: 10px; }
.brand .logo-pill img { height: 30px; width: 30px; object-fit: contain; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: #fff; }
.brand-dot { color: var(--accent); }
.brand-sub { font-weight: 600; font-size: 14px; opacity: .85; border-left: 1px solid rgba(255,255,255,.4); padding-left: 10px; }
.topnav { display: flex; align-items: center; gap: 6px; }
.topnav > a, .mega > summary { color: #fff; text-decoration: none; font-size: 14.5px; font-weight: 600; padding: 8px 12px; border-radius: 9px; opacity: 1; display: inline-flex; align-items: center; gap: 6px; }
.topnav > a:hover, .mega > summary:hover, .mega[open] > summary { background: rgba(255,255,255,.14); text-decoration: none; }
.topnav > a.active, .mega > summary.active { background: rgba(255,255,255,.2); }
.topbar-in { position: relative; }
.mega { position: static; }
.mega > summary { list-style: none; cursor: pointer; }
.mega > summary::-webkit-details-marker { display: none; }
.mega > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
.mega-panel { position: absolute; top: calc(100% - 4px); right: 20px; left: auto; width: min(980px, calc(100% - 40px)); background: #fff; color: var(--text); border-radius: 16px; box-shadow: 0 18px 50px rgba(31, 41, 55, .22); border: 1px solid var(--line); padding: 22px 24px 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 22px; z-index: 50; }
.mega-col ul { list-style: none; margin: 0 0 12px; padding: 0; }
.mega-col a { display: flex; gap: 9px; align-items: center; color: var(--text); text-decoration: none; padding: 5px 6px; border-radius: 8px; font-size: 14px; }
.mega-col a:hover { background: var(--primary-tint); color: var(--primary-ink); }
.mi-ic { width: 24px; height: 24px; flex: none; border-radius: 7px; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary-ink); font-size: 13px; font-weight: 700; }
.mega-h { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 4px 0 6px; display: flex; align-items: center; gap: 6px; }
.mega-paid { background: #FFFBEB; border-radius: 12px; padding: 4px 10px 8px; grid-row: span 2; }
.mega-paid .mi-ic { background: var(--accent-tint); color: var(--accent-ink); }
.mega-note { font-size: 12.5px; color: #78350F; margin: 0; }
.mega-note a { color: var(--accent-ink); font-weight: 700; }
.topnav .mega-all { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 12px; color: var(--primary-ink); font-weight: 700; text-decoration: none; font-size: 14px; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; line-height: 1.4; vertical-align: middle; }
.tag-free { background: var(--ok-tint); color: var(--ok); }
.tag-paid { background: var(--accent); color: #1F2937; }
.topnav .tag-free { background: rgba(255,255,255,.9); }
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.45); background: transparent; border-radius: 10px; padding: 0; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.acct { margin-left: 6px; }

.foot { margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 24px; padding: 30px 20px 10px; }
.foot-grid ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.foot-grid a { color: #374151; text-decoration: none; font-size: 13.5px; }
.foot-grid a:hover { color: var(--primary-ink); text-decoration: underline; }
.foot-h { font-weight: 800; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.foot .brand-name { color: var(--primary); }
.foot-in { border-top: 1px solid var(--line); }

/* ===================== tools home ===================== */
.hub-hero { padding: 38px 0 6px; max-width: 860px; }
.hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; max-width: 640px; }
.split-card { display: grid; gap: 3px; padding: 14px 16px; border-radius: 14px; text-decoration: none; color: var(--text); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.split-card strong { font-size: 16px; }
.split-card span:last-child { color: var(--muted); font-size: 13px; }
.split-card .tag { justify-self: start; }
.split-paid { border-color: #FCD34D; background: #FFFBEB; }
.hub-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0 6px; position: sticky; top: 64px; background: var(--bg); padding: 10px 0; z-index: 5; }
.hchip { border: 1px solid #D7D7F5; background: #fff; color: var(--primary-ink); border-radius: 999px; padding: 7px 14px; font: 600 13.5px var(--font); cursor: pointer; }
.hchip:hover { background: var(--primary-tint); }
.hchip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.hchip-paid { border-color: #FCD34D; color: var(--accent-ink); }
.hchip-paid.on { background: var(--accent); border-color: var(--accent); color: #1F2937; }
.hub-h { font-size: 22px; margin: 18px 0 4px; display: flex; align-items: center; gap: 10px; }
.cat-sec h2:not(.hub-h) { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 0 10px; }
.cat-sec .hub-grid { margin: 0 0 10px; }
.tile-top { display: flex; justify-content: space-between; align-items: flex-start; }
.tile-paid { border-color: #FCD34D; background: linear-gradient(180deg, #FFFBEB 0%, #fff 70%); }
.tile-paid .tile-ic { background: var(--accent-tint); color: var(--accent-ink); }
.hub-paid { margin: 30px 0 10px; padding: 22px; border-radius: 18px; background: #FFFBEB; border: 1px solid #FDE68A; }
.hub-paid .hub-h { margin-top: 0; }
.hub-grid-paid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 14px; }

/* ===================== converter page layout ===================== */
.hero { grid-template-columns: 1.05fr .95fr; grid-template-areas: "copy form" "points form"; row-gap: 22px; }
.hero > .hero-copy { grid-area: copy; }
.hero > .upload-card { grid-area: form; }
.hero > .proof-points { grid-area: points; align-self: start; }
.hero-copy .crumbs { margin-top: 0; }
.hero-copy .lede { margin-bottom: 0; }

/* ===================== new tool controls ===================== */
.opt-col { flex-direction: column; }
.opt-block { display: block; font-weight: 700; margin: 0 0 6px; }
.tool-opts textarea { width: 100%; padding: 10px 12px; border: 1px solid #D1D5DB; border-radius: 10px; font: 14px/1.5 var(--mono); resize: vertical; margin-bottom: 12px; }
.opt input.mm { width: 72px; padding: 6px 8px; border: 1px solid #D1D5DB; border-radius: 8px; font: inherit; margin-left: 4px; }
.sig-tabs { display: flex; gap: 18px; margin-bottom: 8px; }
.sig-pad { width: 100%; max-width: 600px; height: auto; aspect-ratio: 3 / 1; border: 1px dashed #A5A5EC; border-radius: 10px; background: #fff linear-gradient(transparent 74%, #E5E7EB 74%, #E5E7EB 75%, transparent 75%); touch-action: none; cursor: crosshair; display: block; }
#sig-name { width: 100%; max-width: 400px; padding: 10px 12px; border: 1px solid #D1D5DB; border-radius: 10px; font: italic 22px 'Segoe Script', 'Brush Script MT', cursive; }
.md-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 12px; }
.md-grid label { display: grid; gap: 4px; font-weight: 600; font-size: 13px; color: var(--muted); }
.md-grid input { padding: 8px 10px; border: 1px solid #D1D5DB; border-radius: 9px; font: 14px var(--font); color: var(--text); }

/* ===================== responsive ===================== */
@media (max-width: 980px) {
  .mega-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  html.js .topnav { display: none; }
  html:not(.js) .topbar-in { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  html:not(.js) .topnav { flex-wrap: wrap; width: 100%; }
  html.js .nav-open .topnav, .nav-open .topnav { display: flex; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: 2px; background: var(--primary-ink); padding: 10px 16px 16px; max-height: calc(100vh - 64px); overflow-y: auto; box-shadow: 0 16px 30px rgba(31, 41, 55, .3); }
  .topnav > a, .mega > summary { padding: 12px 10px; font-size: 15.5px; }
  .mega-panel { position: static; transform: none; width: auto; grid-template-columns: 1fr 1fr; box-shadow: none; margin: 4px 0 8px; padding: 14px; }
  .mega-paid { grid-row: auto; }
  .acct { margin: 10px 0 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.25); justify-content: space-between; }
  .acct .credits-pill { display: inline-block; }
  .brand-sub { display: inline; }
  .hub-chips { top: 64px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .hchip { flex: none; }
}
@media (max-width: 560px) {
  .mega-panel { grid-template-columns: 1fr; }
  .hero-split { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-grid > div:nth-child(3) .foot-h { display: none; }
  .md-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .hub-paid { padding: 16px; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: "copy" "form" "points"; }
}
.topnav .mega-panel a:hover { text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .nav-toggle span { transition: none; } }

.opt-inline:has(input[type=checkbox]) { font-weight: 600; justify-content: flex-start; cursor: pointer; }
input[type=radio]:focus, input[type=checkbox]:focus { box-shadow: none; outline: 2px solid var(--primary); outline-offset: 2px; }
