/* PDFNova design system — tokens, layout, components. Light + dark. */
:root {
  --bg: #f7f7fb;
  --bg-elev: #ffffff;
  --bg-sunken: #eef0f6;
  --ink: #12131a;
  --ink-2: #424656;
  --ink-3: #6b7085;
  --line: #e2e4ee;
  --line-strong: #cfd2e0;
  --brand: #4b3fe0;
  --brand-ink: #ffffff;
  --brand-soft: #ecebff;
  --brand-hover: #3d31cc;
  --accent: #ff6b4a;
  --ok: #138a52;
  --ok-soft: #e3f6ec;
  --warn: #a05a00;
  --warn-soft: #fff3dc;
  --err: #c62e3a;
  --err-soft: #fde8ea;
  --shadow-sm: 0 1px 2px rgba(18, 19, 26, .06), 0 1px 1px rgba(18, 19, 26, .04);
  --shadow: 0 6px 24px -8px rgba(30, 27, 90, .18), 0 2px 6px rgba(18, 19, 26, .05);
  --shadow-lg: 0 24px 60px -20px rgba(30, 27, 90, .35);
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --maxw: 1180px;
  --cat-organize: #4b3fe0;
  --cat-edit: #d6336c;
  --cat-optimize: #0c8f7d;
  --cat-from_pdf: #e8590c;
  --cat-to_pdf: #1971c2;
  --cat-pages: #7048e8;
  --cat-security: #2b8a3e;
  --cat-stamp: #c2255c;
  --cat-popular: #4b3fe0;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f15; --bg-elev: #171923; --bg-sunken: #1f2230; --ink: #f1f2f8; --ink-2: #c3c6d6; --ink-3: #8d91a7;
    --line: #2a2d3d; --line-strong: #3a3e52; --brand: #8b80ff; --brand-ink: #0e0f15; --brand-soft: #262356;
    --brand-hover: #a39aff; --ok-soft: #10301f; --warn-soft: #33260c; --err-soft: #3a1418; --ok: #4cd08d; --err: #ff6b77; --warn: #ffb547;
    --shadow: 0 8px 30px -10px rgba(0, 0, 0, .6); --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0f15; --bg-elev: #171923; --bg-sunken: #1f2230; --ink: #f1f2f8; --ink-2: #c3c6d6; --ink-3: #8d91a7;
  --line: #2a2d3d; --line-strong: #3a3e52; --brand: #8b80ff; --brand-ink: #0e0f15; --brand-soft: #262356;
  --brand-hover: #a39aff; --ok-soft: #10301f; --warn-soft: #33260c; --err-soft: #3a1418; --ok: #4cd08d; --err: #ff6b77; --warn: #ffb547;
  --shadow: 0 8px 30px -10px rgba(0, 0, 0, .6); --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 28px; height: 28px; }
[hidden] { display: none !important; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: -.03em; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 32px; height: 32px; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a, .nav button {
  padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 550; background: none; border: 0; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.nav a:hover, .nav button:hover { background: var(--bg-sunken); color: var(--ink); text-decoration: none; }
.header-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--r-sm); border: 1px solid transparent; background: none; cursor: pointer;
  display: grid; place-items: center; color: var(--ink-2);
}
.icon-btn:hover { background: var(--bg-sunken); color: var(--ink); }
.mega {
  position: absolute; left: 0; right: 0; top: 62px; background: var(--bg-elev); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg); padding: 24px 0 28px; max-height: calc(100vh - 62px); overflow: auto;
}
.mega-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px 28px; }
.mega h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.mega a { display: flex; align-items: center; gap: 8px; padding: 5px 0; color: var(--ink-2); font-size: 14px; }
.mega a:hover { color: var(--brand); text-decoration: none; }
@media (max-width: 720px) { .nav .hide-sm { display: none; } .nav { margin-left: 0; } }

/* ---- buttons & inputs ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--ink); font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; white-space: nowrap; text-decoration: none !important;
}
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px -8px var(--brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-lg { padding: 15px 28px; font-size: 17px; border-radius: 14px; }
.btn-ghost { border-color: transparent; background: none; }
.btn-ghost:hover { background: var(--bg-sunken); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg-elev);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea.input { min-height: 90px; resize: vertical; }
input[type="color"].input { padding: 4px; height: 42px; width: 64px; }
input[type="range"] { width: 100%; accent-color: var(--brand); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 17px; height: 17px; margin: 0; flex: none; }

/* ---- home ---- */
.hero { padding: 56px 0 28px; text-align: center; }
.hero h1 span { background: linear-gradient(100deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--ink-2); font-size: 18px; max-width: 640px; margin: 0 auto 26px; }
.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 32px 0 12px; }
.btn-editor { background: #008f6b; border-color: #008f6b; color: #fff; font-size: 20px; font-weight: 700; border-radius: 5px; min-height: 54px; box-shadow: var(--shadow-sm); }
.btn-editor:hover { background: #007b5c; border-color: #007b5c; color: #fff; text-decoration: none; }
.hero-actions .btn-editor span { font-weight: 400; }
.hero-tools-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); }
.tool-discovery { padding-top: 20px; scroll-margin-top: 85px; }
@media (max-width: 520px) {
  .hero-actions .btn-editor { font-size: 17px; padding: 12px 16px; gap: 6px; flex-wrap: wrap; justify-content: center; }
}
.search {
  max-width: 520px; margin: 0 auto; position: relative;
}
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { padding: 14px 16px 14px 44px; border-radius: 14px; font-size: 16px; box-shadow: var(--shadow-sm); }
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 26px 0 8px; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink-2);
  cursor: pointer; font-weight: 550; font-size: 14px;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tool-section { margin: 34px 0; }
.tool-section h2 { display: flex; align-items: center; gap: 10px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tool-card {
  display: flex; gap: 14px; padding: 18px; border-radius: var(--r); background: var(--bg-elev); border: 1px solid var(--line);
  color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; align-items: flex-start; min-height: 104px;
}
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: transparent; text-decoration: none; }
.tool-card h3 { margin: 0 0 4px; }
.tool-card p { margin: 0; color: var(--ink-3); font-size: 13.5px; line-height: 1.45; }
.tool-ico {
  --c: var(--brand); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--c);
}
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 56px 0 30px; }
.feature { padding: 22px; border-radius: var(--r); background: var(--bg-elev); border: 1px solid var(--line); }
.feature .tool-ico { margin-bottom: 12px; }

/* ---- tool page ---- */
.tool-hero { padding: 40px 0 18px; text-align: center; }
.tool-hero .tool-ico { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 14px; }
.tool-hero .tool-ico .icon { width: 32px; height: 32px; }
.tool-card .tool-ico .icon { width: 22px; height: 22px; }
.tool-hero p { color: var(--ink-2); font-size: 17px; max-width: 620px; margin: 0 auto; }
.workspace { max-width: 920px; margin: 18px auto 40px; }
.card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.dropzone {
  border: 2px dashed var(--line-strong); border-radius: var(--r-lg); padding: 46px 20px; text-align: center; background: var(--bg-elev);
  transition: border-color .15s, background .15s;
}
.dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .btn-lg:not(.more) { min-width: 240px; }
.upload-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; align-items: center; }
.split-btn { display: inline-flex; }
.split-btn .btn-primary:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.split-btn .more { border-top-left-radius: 0; border-bottom-left-radius: 0; padding: 0 12px; border-left: 1px solid color-mix(in srgb, var(--brand-ink) 30%, transparent); }
.menu { position: absolute; z-index: 30; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 220px; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; color: var(--ink); }
.menu button:hover, .menu a:hover { background: var(--bg-sunken); text-decoration: none; }
.drop-hint { margin-top: 14px; color: var(--ink-3); font-size: 13.5px; }

.file-list { list-style: none; margin: 0; padding: 0; }
.file-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-elev);
}
.file-item:last-child { border-bottom: 0; }
.file-item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .meta { font-size: 12.5px; color: var(--ink-3); }
.file-item .grow { flex: 1; min-width: 0; }
.file-item .handle { cursor: grab; color: var(--ink-3); }
.file-item.dragging { opacity: .5; }
.progress { height: 4px; border-radius: 4px; background: var(--bg-sunken); overflow: hidden; margin-top: 6px; }
.progress > i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .2s; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-err { background: var(--err-soft); color: var(--err); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-body { padding: 18px; }
.opts { display: grid; gap: 18px; }
.opt > label.lbl, .opt > .lbl { display: block; font-weight: 600; margin-bottom: 8px; font-size: 14px; }
.opt .help { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.choice-group { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 10px;
  cursor: pointer; background: var(--bg-elev); font-size: 14px; user-select: none;
}
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.choice input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { margin-top: 2px; }
.more-toggle { display: flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--brand); font-weight: 600; cursor: pointer; padding: 4px 0; }
.more-toggle .icon { transition: transform .2s; }
.more-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.actions-bar { display: flex; justify-content: center; padding: 22px 18px 24px; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.inline-fields { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-fields > * { flex: 1; min-width: 120px; }

/* thumbnails */
.thumbs-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--thumb, 130px), 1fr)); gap: 18px; padding: 18px; max-height: 620px; overflow: auto; }
.thumb { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.thumb .sheet {
  position: relative; width: 100%; aspect-ratio: 1 / 1.3; display: grid; place-items: center; background: var(--bg-sunken); border-radius: 8px;
  border: 2px solid transparent; transition: border-color .12s, box-shadow .12s;
}
.thumb canvas { max-width: 92%; max-height: 92%; box-shadow: var(--shadow-sm); background: #fff; transition: transform .2s; }
.thumb .lbl { font-size: 12px; color: var(--ink-3); }
.thumb.selected .sheet { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.thumb.deleted .sheet { opacity: .3; }
.thumb .tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.thumb:hover .tools, .thumb:focus-within .tools { opacity: 1; }
.thumb .tools button { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg-elev); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.thumb .tools button:hover { color: var(--brand); }
.thumb .tools .icon { width: 16px; height: 16px; }
.thumb .check-mark { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: none; place-items: center; }
.thumb.selected .check-mark { display: grid; }
.thumb.blank canvas { display: none; }
.thumb.blank .sheet::after { content: "Blank page"; color: var(--ink-3); font-size: 12px; }
.thumb.drop-before .sheet { box-shadow: -4px 0 0 var(--brand); }
.cut { position: relative; }
.cut-mark { position: absolute; right: -14px; top: 0; bottom: 22px; width: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cut-mark::before { content: ""; width: 2px; height: 70%; border-radius: 2px; background: var(--line-strong); }
.cut-mark:hover::before { background: var(--brand); }
.cut-mark.on::before { background: var(--accent); width: 3px; height: 100%; }
.cut-mark .scissors { position: absolute; top: -6px; color: var(--accent); display: none; }
.cut-mark.on .scissors { display: block; }
.area-wrap { position: relative; display: inline-block; margin: 0 auto; touch-action: none; }
.area-wrap canvas { display: block; max-width: 100%; box-shadow: var(--shadow); }
.area-box { position: absolute; border: 2px solid var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); pointer-events: none; }

/* result */
.result { text-align: center; padding: 34px 18px; }
.result .state-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; }
.result .ok { background: var(--ok-soft); color: var(--ok); }
.result .err { background: var(--err-soft); color: var(--err); }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: spin 0.9s linear infinite; margin: 8px auto 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 20px 0 6px; }
.result-items { max-width: 520px; margin: 18px auto 0; text-align: left; }
.result-items a { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); }
.result-items a:hover { background: var(--bg-sunken); text-decoration: none; }
.preview-frame { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: var(--r); margin-top: 20px; background: var(--bg-sunken); }
.warnings { max-width: 560px; margin: 14px auto 0; text-align: left; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert-err { background: var(--err-soft); color: var(--err); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-info { background: var(--brand-soft); color: var(--ink); }

/* info sections */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 40px 0; }
.step { padding: 20px; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg-elev); }
.step .num { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; display: grid; place-items: center; margin-bottom: 10px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--ink-3); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 10px 0 0; color: var(--ink-2); }
.prose { max-width: 760px; margin: 40px auto; }
.prose h2 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-2); }
.prose pre { max-width: 100%; overflow-x: auto; background: var(--bg-sunken); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 13px; }
.prose code { overflow-wrap: anywhere; }
.prose pre code { overflow-wrap: normal; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(10, 10, 20, .45); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal { width: min(460px, 100%); background: var(--bg-elev); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 24px; }
.modal h3 { font-size: 18px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* toast */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14px; animation: rise .2s ease-out; }
.toast.err { background: var(--err); color: #fff; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* footer */
.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--bg-elev); padding: 34px 0 26px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 24px; }
.foot-grid h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 10px; }
.foot-grid a { display: block; color: var(--ink-2); padding: 3px 0; }
.foot-bottom { margin-top: 26px; color: var(--ink-3); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

.related { margin: 40px 0; }
.recent { margin-top: 28px; }
.recent-item { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.recent-item:last-child { border-bottom: 0; }
.kbd { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 5px; }

/* ---- accessibility: visible keyboard focus everywhere ---- */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.input:focus-visible { outline: none; }
.choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.tool-card:focus-visible { outline-offset: 3px; }
.field-err { color: var(--err); margin-top: 6px; }
.input[aria-invalid="true"] { border-color: var(--err); }
body.modal-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .spinner { animation-duration: 1.5s !important; }
}
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 10px; text-decoration: none; }
main:focus { outline: none; }
