/* ===== Tokens ===== */
/* Palette: "desk and ink". Pine green carries actions (files stay with you), highlighter yellow marks focus,
   and every file format has its own colour, used only on the format chips. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/BricolageGrotesque-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2193, U+2212, U+2215; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/BricolageGrotesque-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2193, U+2212, U+2215; }
:root {
  --paper: #f2f4f1;        /* page background: grey-green desk */
  --sheet: #ffffff;        /* surfaces: a sheet of paper */
  --ink: #18222c;          /* text */
  --graphite: #56616c;     /* secondary text */
  --rule: #d9dfdb;         /* borders */
  --cobalt: #136b52;       /* primary action: pine */
  --cobalt-ink: #0f5a45;   /* links */
  --primary-soft: #e3efe9;
  --mark: #ffdf5e;         /* highlighter */
  --safe: #136b52;
  --warn: #8f5600;
  --danger: #b42318;
  --cat-to: #2f6bd8;
  --cat-from: #136b52;
  --cat-tools: #8a3f8f;
  --cat-office: #c4531f;
  --cat-ebook: #7848b5;
  --cat-docs: #2f7a8a;
  /* file-format chips */
  --f-pdf: #cf3a2c; --f-img: #2f6bd8; --f-word: #2b5aa8; --f-excel: #1d7f47; --f-ppt: #c4531f; --f-ebook: #7848b5;
  --f-doc: #2f7a8a; --f-cad: #a46600; --f-audio: #b03a78; --f-zip: #5f6b77;
  --focus: #e9b800;
  --shadow-sheet: 0 1px 0 rgba(24, 34, 44, .05), 0 14px 34px -18px rgba(24, 34, 44, .28);
  --r-sm: 8px;
  --r-md: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", Ubuntu, sans-serif;
  --font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.9rem, 1.4rem + 2.2vw, 2.6rem);
  --step-4: clamp(2.2rem, 1.5rem + 3.2vw, 3.4rem);
  --measure: 68ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1513; --sheet: #17201d; --ink: #e6ece9; --graphite: #a2aea8; --rule: #2a3632;
    --cobalt: #5fd0a6; --cobalt-ink: #7fdcb9; --primary-soft: #1d3a31; --mark: #e8c547; --safe: #5fd0a6; --warn: #f0b24b; --danger: #ff8a7a;
    --cat-to: #7ea6ff; --cat-from: #5fd0a6; --cat-tools: #d79ad9; --cat-office: #f2a36f; --cat-ebook: #b493f0; --cat-docs: #6fc4d4;
    --f-pdf: #d9483a; --f-img: #3a75e0; --f-word: #3a69bb; --f-excel: #23894f; --f-ppt: #cf5f2a; --f-ebook: #8456c2; --f-doc: #33818f; --f-cad: #b07410; --f-audio: #bd4886; --f-zip: #6b7783;
    --shadow-sheet: 0 1px 0 rgba(0,0,0,.35), 0 14px 34px -16px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1513; --sheet: #17201d; --ink: #e6ece9; --graphite: #a2aea8; --rule: #2a3632;
  --cobalt: #5fd0a6; --cobalt-ink: #7fdcb9; --primary-soft: #1d3a31; --mark: #e8c547; --safe: #5fd0a6; --warn: #f0b24b; --danger: #ff8a7a;
  --cat-to: #7ea6ff; --cat-from: #5fd0a6; --cat-tools: #d79ad9; --cat-office: #f2a36f; --cat-ebook: #b493f0; --cat-docs: #6fc4d4;
  --f-pdf: #d9483a; --f-img: #3a75e0; --f-word: #3a69bb; --f-excel: #23894f; --f-ppt: #cf5f2a; --f-ebook: #8456c2; --f-doc: #33818f; --f-cad: #b07410; --f-audio: #bd4886; --f-zip: #6b7783;
  --shadow-sheet: 0 1px 0 rgba(0,0,0,.35), 0 14px 34px -16px rgba(0,0,0,.7);
  color-scheme: dark;
}

/* ===== Base ===== */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--step-0)/1.6 var(--font); }
img, svg, canvas { max-width: 100%; display: block; }
a { color: var(--cobalt-ink); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: var(--step-2); font-weight: 600; margin-top: 2em; }
h3 { font-size: var(--step-1); font-weight: 600; margin-top: 1.6em; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.prose { max-width: var(--measure); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin: .3em 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0 1.5em; font-size: var(--step--1); display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .55em .7em; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-weight: 650; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sheet); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ===== Header / footer ===== */
.site-header { border-bottom: 1px solid var(--rule); background: var(--sheet); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 1.3rem/1 var(--font-display); color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: var(--r-sm); font-size: var(--step--1); font-weight: 550; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--paper); }
.theme-toggle { background: none; border: 1px solid var(--rule); color: var(--ink); border-radius: var(--r-sm); padding: 6px 10px; cursor: pointer; font: inherit; font-size: var(--step--1); }
@media (max-width: 720px) { .nav { gap: 0; } .site-header .wrap { gap: 10px; } }

.site-footer { margin-top: 80px; border-top: 1px solid var(--rule); background: var(--sheet); padding: 40px 0 28px; font-size: var(--step--1); color: var(--graphite); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.footer-grid h2 { font-size: 1rem; margin: 0 0 .6em; color: var(--ink); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: .35em 0; }
.footer-grid a { color: var(--graphite); }
.footer-note { margin-top: 28px; }

/* ===== Breadcrumb ===== */
.crumbs { font-size: var(--step--1); color: var(--graphite); margin: 20px 0 12px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--rule); }
.crumbs a { color: var(--graphite); }

/* ===== Tool header ===== */
.tool-head { padding: 8px 0 22px; display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.tool-head h1 { margin-bottom: .2em; max-width: 20ch; }
.tool-chips { padding: 14px 16px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); }
@media (max-width: 640px) { .tool-head { grid-template-columns: 1fr; gap: 12px; } .tool-chips { justify-self: start; padding: 10px 12px; } }
.tool-head .lede { font-size: var(--step-1); color: var(--graphite); max-width: 52ch; margin: 0; }
.cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--cat-color, var(--cat-to)); margin-right: 8px; vertical-align: middle; }

/* ===== The sheet: signature element ===== */
.sheet {
  --fold: 34px;
  position: relative; background: var(--sheet); border-radius: var(--r-md);
  box-shadow: var(--shadow-sheet);
  clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%);
}
.sheet::after { /* the folded corner */
  content: ""; position: absolute; top: 0; right: 0; width: var(--fold); height: var(--fold);
  background: linear-gradient(225deg, var(--paper) 50%, color-mix(in srgb, var(--rule) 70%, var(--sheet)) 50%);
  border-bottom-left-radius: 6px;
}
.tool { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0; }
.tool-main { min-width: 0; padding: 28px; min-height: 300px; display: flex; flex-direction: column; }
.tool-side { border-left: 1px solid var(--rule); padding: 28px 24px; }
@media (max-width: 880px) { .tool { grid-template-columns: minmax(0, 1fr); } .tool-main { padding: 16px; } .tool-side { padding: 20px 16px; } .tool-side { border-left: 0; border-top: 1px solid var(--rule); } }

.drop {
  flex: 1; display: grid; place-items: center; text-align: center; gap: 12px; max-height: 520px; min-height: 240px;
  border: 2px dashed color-mix(in srgb, var(--cobalt) 35%, var(--rule)); border-radius: var(--r-md); padding: 36px 20px;
  background: color-mix(in srgb, var(--primary-soft) 45%, var(--sheet)); transition: border-color .15s, background-color .15s;
}
.drop.is-over { border-color: var(--cobalt); border-style: solid; background: var(--primary-soft); }
.drop-title { font: 650 var(--step-2)/1.2 var(--font-display); margin: 0; }
.drop-or { color: var(--graphite); margin: 6px 0 10px; }
.files-bar select { font: inherit; font-size: var(--step--1); padding: 0 10px; min-height: 46px; border-radius: var(--r-sm); border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); }
.drop-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.privacy { display: flex; align-items: center; gap: 8px; color: var(--safe); font-size: var(--step--1); font-weight: 550; margin: 14px 0 0; }
.privacy svg { width: 16px; height: 16px; flex: none; }
.notice { border-left: 3px solid var(--warn); padding: 8px 12px; background: color-mix(in srgb, var(--warn) 8%, transparent); font-size: var(--step--1); margin: 12px 0 0; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 1rem/1 var(--font); padding: 13px 20px; border-radius: var(--r-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none; min-height: 46px; }
.btn-primary { background: var(--cobalt); color: #fff; }
:root[data-theme="dark"] .btn-primary { color: #0b1a14; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #0b1a14; } }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--sheet); color: var(--ink); border-color: var(--rule); }
.btn-secondary:hover { border-color: var(--graphite); }
.btn-big { font-size: 1.125rem; padding: 16px 26px; min-height: 54px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-icon { background: var(--sheet); border: 1px solid var(--rule); color: var(--ink); width: 34px; height: 34px; border-radius: var(--r-sm); display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.btn-icon svg { width: 16px; height: 16px; }

/* ===== Settings ===== */
.settings h2 { font-size: 1rem; margin: 0 0 14px; }
.field { margin-bottom: 16px; }
.field > label, .field > .label { display: block; font-size: var(--step--1); font-weight: 600; margin-bottom: 6px; }
.field select, .field input[type="text"], .field input[type="number"] {
  width: 100%; font: inherit; font-size: var(--step--1); padding: 9px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--rule); background: var(--sheet); color: var(--ink);
}
.field .hint { font-size: .8rem; color: var(--graphite); margin-top: 4px; }
.seg { display: flex; border: 1px solid var(--rule); border-radius: var(--r-sm); overflow: hidden; }
.seg label { flex: 1; text-align: center; font-size: var(--step--1); padding: 8px 4px; cursor: pointer; border-left: 1px solid var(--rule); }
.seg label:first-child { border-left: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { font-weight: 650; }
.seg label:has(input:checked) { background: color-mix(in srgb, var(--cobalt) 12%, var(--sheet)); color: var(--cobalt-ink); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: -3px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: var(--step--1); }

/* ===== Thumbnails ===== */
.files-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.files-count { font-weight: 600; }
.thumbs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
@media (max-width: 480px) { .thumbs { grid-template-columns: repeat(2, 1fr); } }
.thumb { position: relative; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 8px; display: flex; flex-direction: column; gap: 6px; cursor: grab; }
.thumb.dragging { opacity: .4; }
.thumb.drop-target { outline: 2px solid var(--cobalt); }
.thumb:focus-visible { outline: 3px solid var(--focus); }
.thumb-img { aspect-ratio: 3 / 4; display: grid; place-items: center; background: var(--sheet); border-radius: 4px; overflow: hidden; }
.thumb-img img, .thumb-img canvas { max-height: 100%; object-fit: contain; transition: transform .2s; }
.thumb-name { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-meta { font-size: .72rem; color: var(--graphite); display: flex; gap: 6px; flex-wrap: wrap; }
.tag { background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 0 5px; }
.thumb-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
@media (max-width: 480px) { .thumb-actions .btn-icon { width: 30px; height: 30px; } .thumb { padding: 6px; } }
.thumb-num { z-index: 1; position: absolute; top: 4px; left: 4px; background: var(--ink); color: var(--sheet); font-size: .7rem; font-weight: 700; border-radius: 4px; padding: 1px 6px; }
.thumb.has-error { border-color: var(--danger); }
.thumb-error { font-size: .72rem; color: var(--danger); }

/* ===== Progress / result ===== */
.progress { margin-top: 18px; }
.progress-bar { height: 8px; background: var(--paper); border-radius: 99px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--cobalt); transition: width .2s; }
.progress-text { font-size: var(--step--1); color: var(--graphite); margin-top: 6px; }
.result { display: grid; grid-template-columns: 160px 1fr; gap: 24px; align-items: center; }
@media (max-width: 560px) { .result { grid-template-columns: 1fr; } }
.result-stack { position: relative; width: 140px; height: 180px; }
.result-stack canvas, .result-stack .page { position: absolute; inset: 0; background: #fff; border: 1px solid var(--rule); border-radius: 4px; box-shadow: var(--shadow-sheet); object-fit: contain; width: 100%; height: 100%; }
.result-stack .page:nth-child(1) { transform: rotate(-4deg) translate(-6px, 4px); }
.result-stack .page:nth-child(2) { transform: rotate(3deg) translate(6px, 2px); }
.result h2 { margin: 0 0 .3em; font-size: var(--step-2); }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.alert { padding: 12px 14px; border-radius: var(--r-sm); font-size: var(--step--1); margin-top: 14px; border: 1px solid; }
.alert-error { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 7%, transparent); }
.alert-info { color: var(--ink); border-color: var(--rule); background: var(--paper); }

/* ===== Crop editor (scan) ===== */
.editor { position: fixed; inset: 0; background: rgba(9, 14, 28, .82); z-index: 50; display: grid; grid-template-rows: auto 1fr auto; }
.editor-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--sheet); flex-wrap: wrap; }
.editor-stage { position: relative; display: grid; place-items: center; overflow: hidden; padding: 24px; touch-action: none; }
.editor-stage canvas { max-height: calc(100vh - 180px); }
.editor-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.handle { fill: var(--focus); stroke: #000; stroke-width: 1.5; cursor: grab; }

/* ===== Content sections ===== */
.content { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
@media (max-width: 980px) { .content { grid-template-columns: 1fr; } }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 44px; margin: 0 0 14px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--sheet); border: 1px solid var(--rule); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.faq details { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details[open] summary { margin-bottom: 8px; }
.related { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.related a { display: block; padding: 12px 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 550; }
.related a:hover { border-color: var(--cobalt); }
.aside-box { position: sticky; top: 20px; }
.ad-slot { min-height: 280px; display: grid; place-items: center; color: var(--graphite); font-size: .75rem; border: 1px dashed var(--rule); border-radius: var(--r-sm); margin: 28px 0; }
.ad-slot[hidden] { display: none; }
.draft-note { border: 1px dashed var(--warn); padding: 14px 16px; border-radius: var(--r-sm); color: var(--warn); }

/* ===== Home ===== */
.home-hero { padding: 48px 0 28px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 880px) { .home-hero { grid-template-columns: 1fr; } }
.home-hero h1 { font-size: var(--step-4); max-width: 14ch; }
.home-hero p { font-size: var(--step-1); color: var(--graphite); max-width: 44ch; }
.hero-sheet { padding: 28px; }
.hero-sheet ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.hero-sheet li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.hero-sheet svg { width: 20px; height: 20px; color: var(--safe); margin-top: 3px; }
.search { margin: 8px 0 0; position: relative; max-width: 460px; }
.search input { width: 100%; font: inherit; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); font-size: 1.05rem; }
.tool-group { margin-top: 40px; }
.tool-group h2 { display: flex; align-items: center; margin: 0 0 16px; font-size: var(--step-1); }
.tool-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tool-card a { display: block; height: 100%; padding: 16px 18px; background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--cat-color, var(--cat-to)); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); }
.tool-card a:hover { border-color: var(--cat-color, var(--cat-to)); }
.tool-card[hidden] { display: none; }
.coming { color: var(--graphite); font-size: var(--step--1); margin-top: 14px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.cta { margin: 32px 0 8px; }
.updated { color: var(--graphite); font-size: var(--step--1); margin-top: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose ol:not(.steps) li::marker { font-weight: 700; }
.password { border: 1px solid var(--rule); border-radius: var(--r-md); padding: 20px; margin-bottom: 16px; }
.thumbs.pages .thumb { cursor: pointer; }
.thumbs.pages .thumb.is-off { opacity: .45; }
.thumb .page-check { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; z-index: 1; accent-color: var(--cobalt); }
.outputs { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.outputs li { border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 8px; background: var(--paper); font-size: .78rem; display: flex; flex-direction: column; gap: 6px; }
.outputs .out-img { aspect-ratio: 3/4; display: grid; place-items: center; background: var(--sheet); border-radius: 4px; overflow: hidden; }
.checklist { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.checklist li { display: flex; gap: 8px; align-items: baseline; }
.checklist li span { font-weight: 700; width: 1.1em; }
.checklist li.ok span { color: var(--safe); }
.checklist li.bad span { color: var(--danger); }
.pdfa-check h3 { font-size: 1rem; margin: 18px 0 4px; }
.outputs .out-img img { max-height: 100%; object-fit: contain; }
.outputs a { font-weight: 600; }
.checker { background-image: linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, #ddd 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ddd 75%), linear-gradient(-45deg, transparent 75%, #ddd 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.toolbar .btn, .btn-sm { min-height: 36px; padding: 8px 12px; font-size: .88rem; }
.file-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.file-card { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 8px 10px; }
.file-num { background: var(--ink); color: var(--sheet); border-radius: 4px; font-size: .75rem; font-weight: 700; padding: 1px 7px; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-meta { font-size: .8rem; color: var(--graphite); }
.file-actions { display: flex; gap: 4px; }
@media (max-width: 560px) { .file-card { grid-template-columns: auto 1fr; } .file-meta, .file-actions { grid-column: 2; } }
.thumb.is-removed { border-color: var(--danger); opacity: .55; }
.thumb.is-removed .thumb-img::after { content: "✕"; position: absolute; font-size: 3rem; color: var(--danger); }
.thumb .thumb-img { position: relative; }
.wm-preview { display: grid; place-items: center; min-height: 260px; background: var(--paper); border-radius: var(--r-md); padding: 16px; }
.wm-preview canvas { max-height: 520px; }
.rename-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rename-table th, .rename-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--rule); word-break: break-word; }
.table-wrap { max-height: 420px; overflow: auto; }
.all-tools { margin-top: 32px; }
.tool-wide { grid-template-columns: 1fr; }
.viewer-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 10px 0 12px; border-bottom: 1px solid var(--rule); }
.viewer-title { flex: 1 1 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-group { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.viewer-group input { font: inherit; padding: 6px 8px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--sheet); color: var(--ink); }
.viewer-pages { height: 78vh; overflow: auto; background: var(--paper); padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; border-radius: 0 0 var(--r-md) var(--r-md); }
.viewer:fullscreen { background: var(--sheet); padding: 12px; }
.viewer:fullscreen .viewer-pages { height: calc(100vh - 110px); }
.v-page { position: relative; background: #fff; box-shadow: var(--shadow-sheet); flex: none; }
.v-page canvas { display: block; }
.textLayer ::selection { background: rgba(42, 85, 229, .3); }
.textLayer .hit { background: rgba(245, 179, 1, .45); border-radius: 2px; }
.textLayer .hit-current { background: rgba(245, 120, 1, .65); }

/* pdf.js text layer (from pdf.js, Apache-2.0) */
.textLayer{
  color-scheme:only light;

  position:absolute;
  text-align:initial;
  inset:0;
  overflow:clip;
  opacity:1;
  line-height:1;
  letter-spacing:normal;
  word-spacing:normal;
  -webkit-text-size-adjust:none;
     -moz-text-size-adjust:none;
          text-size-adjust:none;
  forced-color-adjust:none;
  transform-origin:0 0;
  caret-color:CanvasText;
  z-index:0;

  &.highlighting{
    touch-action:none;
  }

  :is(span, br){
    color:transparent;
    position:absolute;
    white-space:pre;
    cursor:text;
    transform-origin:0% 0%;
    -webkit-user-select:text;
       -moz-user-select:text;
            user-select:text;
  }
  --min-font-size:1;
  --text-scale-factor:calc(var(--total-scale-factor) * var(--min-font-size));
  --min-font-size-inv:calc(1 / var(--min-font-size));

  > :not(.markedContent),
  .markedContent span:not(.markedContent){
    z-index:1;

    --font-height:0;
    font-size:calc(var(--text-scale-factor) * var(--font-height));

    --scale-x:1;
    --rotate:0deg;
    transform:rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));
  }

  .markedContent{
    display:contents;
  }

  span[role="img"]{
    -webkit-user-select:none;
       -moz-user-select:none;
            user-select:none;
    cursor:default;
  }

  .highlight{
    --highlight-bg-color:rgb(180 0 170 / 0.25);
    --highlight-selected-bg-color:rgb(0 100 0 / 0.25);
    --highlight-backdrop-filter:none;
    --highlight-selected-backdrop-filter:none;

    @media screen and (forced-colors: active){
      --highlight-bg-color:transparent;
      --highlight-selected-bg-color:transparent;
      --highlight-backdrop-filter:var(--hcm-highlight-filter);
      --highlight-selected-backdrop-filter:var(
        --hcm-highlight-selected-filter
      );
    }

    margin:-1px;
    padding:1px;
    background-color:var(--highlight-bg-color);
    backdrop-filter:var(--highlight-backdrop-filter);
    border-radius:4px;

    &.appended{
      position:initial;
    }

    &.begin{
      border-radius:4px 0 0 4px;
    }

    &.end{
      border-radius:0 4px 4px 0;
    }

    &.middle{
      border-radius:0;
    }

    &.selected{
      background-color:var(--highlight-selected-bg-color);
      backdrop-filter:var(--highlight-selected-backdrop-filter);
      scroll-margin-top:50px;
    }
  }

  ::-moz-selection{
    background:rgba(0 0 255 / 0.25);
    background:color-mix(in srgb, AccentColor, transparent 50%);
    color:transparent;
  }

  ::selection{
    background:rgba(0 0 255 / 0.25);
    background:color-mix(in srgb, AccentColor, transparent 50%);
    color:transparent;
  }

  &.selectionRendering{
    ::-moz-selection{
      background:transparent;
      color:transparent;
    }
    ::selection{
      background:transparent;
      color:transparent;
    }
  }
  br::-moz-selection{
    background:transparent;
  }
  br::selection{
    background:transparent;
  }

  .endOfContent{
    display:block;
    position:absolute;
    inset:100% 0 0;
    z-index:0;
    cursor:default;
    -webkit-user-select:none;
       -moz-user-select:none;
            user-select:none;
  }

  &.selecting .endOfContent{
    top:0;
  }
}
.textLayer { z-index: 2; }
[data-tool3] .thumb-actions { justify-content: center; gap: 3px; }
[data-tool3] .thumb-actions .btn-icon { width: 28px; height: 28px; font-size: .85rem; }

/* Engine 7: Office to PDF */
.field-group { border: 0; padding: 0; margin: 0 0 6px; min-width: 0; }
.field-group legend { font-weight: 650; font-size: .9rem; color: var(--ink); margin-bottom: 8px; padding: 0; }
.field-group + .field-group, .field-group + .field { border-top: 1px solid var(--rule); padding-top: 12px; }
.drop-hint { font-size: var(--step--1); color: var(--graphite); margin: 10px 0 0; }
.office-list .file-card { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.office-list .file-extra { grid-column: 2 / -1; }
.file-status { font-size: .82rem; color: var(--graphite); }
.file-status.is-error { color: var(--danger); }
.sheet-pick { border: 0; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .88rem; }
.outputs .btn-sm { justify-content: center; }
@media (max-width: 560px) { .office-list .file-card { grid-template-columns: auto minmax(0, 1fr); } .office-list .file-extra { grid-column: 1 / -1; } }

/* Engine 8a: PDF to Word */
.lang-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; max-height: 210px; overflow: auto; border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 8px 10px; font-size: .88rem; }
.field-more { border-top: 1px solid var(--rule); padding-top: 10px; margin-top: 4px; }
.field-more summary { cursor: pointer; font-weight: 650; font-size: .9rem; color: var(--ink); margin-bottom: 8px; }
.next-steps { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--paper); font-size: var(--step--1); }
.next-steps ol { margin: 6px 0 0; padding-left: 20px; }
.xl-preview { margin-top: 12px; border: 1px solid var(--rule); border-radius: var(--r-sm); max-height: 300px; }
.xl-preview td { white-space: nowrap; font-size: .82rem; }
.xl-preview td.num { text-align: right; font-variant-numeric: tabular-nums; }
.xl-preview tr:first-child td { font-weight: 600; }

/* Engine 10: input tabs and paste box */
.tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--rule); }
.tabs [role=tab] { font: inherit; font-weight: 600; padding: 10px 14px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--graphite); cursor: pointer; margin-bottom: -1px; }
.tabs [role=tab][aria-selected=true] { color: var(--ink); border-bottom-color: var(--cat-color, var(--ink)); }
.paste-box { width: 100%; box-sizing: border-box; font: 0.95rem/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; padding: 12px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--sheet); color: var(--ink); resize: vertical; min-height: 140px; }
.paste-box:focus { outline: 2px solid var(--cat-color, var(--ink)); outline-offset: 1px; }

/* Engine 11: text preview with copy button */
.text-preview { margin: 14px 0; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--sheet); }
.text-preview-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--rule); font-weight: 600; }
.text-preview pre { margin: 0; padding: 12px; max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 0.85rem/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: var(--ink); }

/* ===== Format chips (signature element) ===== */
.fpair { display: inline-flex; align-items: center; gap: 6px; color: var(--graphite); }
.fc { --c: var(--f-doc); position: relative; display: inline-grid; place-items: end center; width: 30px; height: 38px; padding-bottom: 6px;
  background: var(--c); color: #fff; font: 800 .56rem/1 var(--font-display); letter-spacing: .02em; border-radius: 3px 0 3px 3px;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%); flex: none; }
.fc::before { content: ""; position: absolute; top: 0; right: 0; width: 9px; height: 9px; background: color-mix(in srgb, #fff 45%, var(--c)); border-bottom-left-radius: 2px; }
.fc-long { font-size: .48rem; }
.fc-pdf { --c: var(--f-pdf); } .fc-img { --c: var(--f-img); } .fc-word { --c: var(--f-word); } .fc-excel { --c: var(--f-excel); }
.fc-ppt { --c: var(--f-ppt); } .fc-ebook { --c: var(--f-ebook); } .fc-doc { --c: var(--f-doc); } .fc-cad { --c: var(--f-cad); }
.fc-audio { --c: var(--f-audio); } .fc-zip { --c: var(--f-zip); }
.fc-lg { width: 48px; height: 60px; font-size: .82rem; padding-bottom: 9px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); border-radius: 4px 0 4px 4px; }
.fc-lg::before { width: 14px; height: 14px; }
.fc-lg.fc-long { font-size: .66rem; }
.fc-arrow { width: 16px; height: 10px; flex: none; }
.fc-act { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--cobalt-ink); }
.fc-act svg { width: 18px; height: 18px; }
.fc-act-lg { width: 44px; height: 44px; } .fc-act-lg svg { width: 24px; height: 24px; }
.tool-chips .fc-arrow { width: 22px; height: 14px; }

/* ===== Tool cards ===== */
.tool-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tool-card a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; column-gap: 14px; row-gap: 2px; align-items: start;
  height: 100%; padding: 14px 16px; background: var(--sheet); border: 1px solid var(--rule); border-left: 1px solid var(--rule); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); }
.tool-card a:hover { border-color: color-mix(in srgb, var(--cobalt) 55%, var(--rule)); background: color-mix(in srgb, var(--primary-soft) 35%, var(--sheet)); }
.tool-card .tc-chips { grid-row: 1 / span 2; padding-top: 2px; }
.tool-card .tc-chips .fpair { gap: 3px; }
.tool-card .tc-chips .fc { width: 26px; height: 33px; font-size: .5rem; padding-bottom: 5px; }
.tool-card .tc-chips .fc-long { font-size: .42rem; }
.tool-card .tc-chips .fc-arrow { width: 11px; }
.tool-card .tc-chips .fc-act { width: 26px; height: 26px; } .tool-card .tc-chips .fc-act svg { width: 15px; height: 15px; }
.tool-card strong { display: block; font: 600 1rem/1.3 var(--font-display); margin: 0 0 2px; letter-spacing: -.005em; }
.tool-card .tc-desc { font-size: .84rem; color: var(--graphite); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-grid-compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tool-grid-compact .tool-card a { align-items: center; grid-template-rows: auto; }
.tool-grid-compact .tool-card strong { margin: 0; }
.tool-group h2 { gap: 10px; }
.cat-dot { width: 12px; height: 12px; border-radius: 3px; margin-right: 0; }

/* ===== Hubs and related blocks ===== */
.hub { margin-top: 36px; }
.hub h2 { margin: 0 0 14px; }
.more-tools { margin-top: 56px; padding-top: 8px; border-top: 1px solid var(--rule); }
.more-tools h2 { font-size: var(--step-1); margin: 28px 0 12px; }
.more-tools h3 { font-size: 1.05rem; margin: 24px 0 10px; }
.reverse-link { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 28px 0 0; padding: 14px 16px; border-radius: var(--r-md); background: var(--primary-soft); }
.reverse-link > span { color: var(--graphite); }
.reverse-link a { display: inline-flex; align-items: center; gap: 10px; font: 600 1.02rem/1.2 var(--font-display); color: var(--cobalt-ink); text-decoration: none; }
.reverse-link a:hover span:last-child { text-decoration: underline; }
.reverse-link .fc { width: 24px; height: 30px; font-size: .46rem; padding-bottom: 4px; }
.reverse-link .fc-arrow { width: 11px; }
.trust-link { font-size: var(--step--1); margin: 10px 0 0; }

/* ===== Home ===== */
.home-hero { padding: 40px 0 8px; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; }
.home-hero h1 { max-width: 15ch; }
.search input { border: 2px solid var(--rule); padding: 15px 18px 15px 46px; border-radius: 999px; font-size: 1.06rem;
  background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356616c' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E") no-repeat 16px 50% / 20px; }
.search input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mark) 70%, transparent); }
.format-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; max-width: 560px; }
.format-filter button { display: inline-flex; align-items: center; gap: 8px; font: 600 .88rem/1 var(--font); color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: 999px; padding: 5px 12px 5px 6px; cursor: pointer; }
.format-filter button .fc { width: 16px; height: 20px; padding: 0; font-size: 0; border-radius: 2px 0 2px 2px; clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 0 100%); }
.format-filter button .fc::before { width: 5px; height: 5px; }
.format-filter button:hover { border-color: var(--graphite); }
.format-filter button[aria-pressed="true"] { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.filter-status { font-size: var(--step--1); color: var(--graphite); margin: 10px 0 0; min-height: 1.4em; }
.hero-art { position: relative; aspect-ratio: 5 / 4; border-radius: 22px; background:
  radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 1.5px) 0 0 / 18px 18px, var(--sheet);
  border: 1px solid var(--rule); overflow: hidden; }
.hero-art .fc { position: absolute; width: 58px; height: 72px; font-size: .9rem; padding-bottom: 11px; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); border-radius: 5px 0 5px 5px; box-shadow: 0 10px 22px -12px rgba(0,0,0,.45); }
.hero-art .fc::before { width: 16px; height: 16px; }
.hero-art .fc.fc-long { font-size: .72rem; }
.hero-art .hero-pdf { left: 50%; top: 50%; width: 120px; height: 150px; translate: -50% -50%; font-size: 1.7rem; padding-bottom: 22px; clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%); border-radius: 8px 0 8px 8px; }
.hero-art .hero-pdf::before { width: 30px; height: 30px; }
.hero-art svg.hero-flow { position: absolute; inset: 0; width: 100%; height: 100%; color: color-mix(in srgb, var(--ink) 30%, transparent); }
.trust-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 18px 0 8px; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); list-style: none; }
.trust-row li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: .9rem; color: var(--graphite); }
.trust-row strong { display: block; color: var(--ink); font-weight: 650; }
.trust-row svg { width: 20px; height: 20px; color: var(--cobalt); margin-top: 2px; }
@media (max-width: 980px) { .trust-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 880px) { .hero-art { display: none; } .home-hero { padding-top: 28px; grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .hub .tool-card .tc-desc { display: none; } .hub .tool-card a { align-items: center; } }
@media (max-width: 520px) { .trust-row { grid-template-columns: 1fr; } }

/* ===== Header, related list, footer ===== */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--sheet) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); }
.nav a[aria-current="page"] { background: var(--primary-soft); color: var(--cobalt-ink); }
.related a { display: flex; align-items: center; gap: 12px; }
.related .fc { width: 22px; height: 28px; font-size: .42rem; padding-bottom: 4px; }
.related .fc-arrow { width: 10px; }
.related .fc-act { width: 22px; height: 22px; } .related .fc-act svg { width: 13px; height: 13px; }
.related .fpair { gap: 2px; }
.site-footer { background: var(--sheet); }
.footer-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.btn-primary { box-shadow: 0 1px 0 rgba(0,0,0,.08), inset 0 -2px 0 rgba(0,0,0,.12); }
.steps li::before { background: var(--primary-soft); border-color: transparent; color: var(--cobalt-ink); }
::selection { background: var(--mark); color: #18222c; }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 600 1.3rem/1 var(--font-display); color: var(--cobalt-ink); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq h2, .more-tools h2, .hub h2 { letter-spacing: -.01em; }


/* ===== 2026-10 refresh: menu, catalogue, popular tools, next steps, how it works ===== */
/* Header: one "All tools" menu (a <details>, so it works without JavaScript) and a few direct links. */
.site-header .wrap { position: relative; }
.nav { align-items: center; }
.menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--r-sm);
  font-size: var(--step--1); font-weight: 650; color: var(--ink); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -2px; transition: rotate .15s; }
.menu[open] > summary { background: var(--primary-soft); color: var(--cobalt-ink); }
.menu[open] > summary::after { rotate: 225deg; translate: 0 2px; }
.menu > summary:hover { background: var(--paper); }
.menu-panel { position: absolute; left: 0; right: 0; top: calc(100% + 1px); background: var(--sheet); border: 1px solid var(--rule); border-radius: 0 0 var(--r-md) var(--r-md);
  box-shadow: var(--shadow-sheet); padding: 22px 24px 18px; z-index: 30; }
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 28px; }
.menu-col h2 { font: 650 .95rem/1.2 var(--font-display); margin: 0 0 8px; display: flex; align-items: center; }
.menu-col .cat-dot { width: 8px; height: 8px; margin-right: 8px; }
.menu-col ul { list-style: none; padding: 0; margin: 0 0 6px; }
.menu-col li a { display: block; padding: 4px 0; color: var(--ink); text-decoration: none; font-size: .92rem; }
.menu-col li a:hover { color: var(--cobalt-ink); text-decoration: underline; }
.menu-all { font-size: .85rem; font-weight: 600; }
@media (max-width: 860px) {
  .nav-quick { display: none; }
  .menu-panel { position: absolute; top: 100%; left: -16px; right: -16px; max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); border-radius: 0; overflow-y: auto; padding: 18px 16px 32px; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
}
@media (max-width: 480px) { .menu-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .nav a.nav-quick { display: none; } }

/* Home: the hero caption ties the picture to the promise */
.hero-caption { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 999px; padding: 7px 14px 7px 11px; font-size: .86rem; font-weight: 600; color: var(--ink); }
.hero-caption svg { width: 16px; height: 16px; color: var(--cobalt); }

/* Home: most used tools */
.popular { margin-top: 44px; }
.popular h2, .catalog > h2, .how h2 { margin: 0 0 16px; font-size: var(--step-2); }
.pop-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pop-grid a { display: grid; gap: 4px; height: 100%; padding: 18px 18px 16px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md);
  text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.pop-grid a:hover { border-color: var(--cobalt); transform: translateY(-2px); }
.pop-chips { margin-bottom: 10px; }
.pop-chips .fc-lg { width: 38px; height: 48px; font-size: .62rem; padding-bottom: 7px; clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%); }
.pop-chips .fc-lg::before { width: 11px; height: 11px; }
.pop-grid strong { font: 650 1.08rem/1.25 var(--font-display); }
.pop-grid .pop-desc { font-size: .86rem; line-height: 1.45; color: var(--graphite); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 980px) { .pop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .pop-grid { gap: 10px; } .pop-grid a { padding: 14px; } .pop-grid .pop-desc { display: none; } }

/* Home: the full catalogue, one band per category, tools as a plain list */
.catalog { margin-top: 56px; }
.cat-block { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; padding: 26px 0; border-top: 1px solid var(--rule); margin: 0; }
.cat-intro h3 { margin: 0 0 6px; font-size: var(--step-1); display: flex; align-items: center; }
.cat-intro p { color: var(--graphite); font-size: .92rem; margin: 0 0 10px; }
.cat-intro a { font-size: .9rem; font-weight: 600; }
.tool-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 18px; align-content: start; }
.tool-row a { display: flex; align-items: center; gap: 10px; height: auto; border: 0; background: transparent; padding: 7px 8px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-size: .95rem; font-weight: 550; line-height: 1.25; }
.tool-row a:hover { background: color-mix(in srgb, var(--cat-color) 10%, var(--sheet)); }
.tool-row a:hover .tr-name { text-decoration: underline; text-underline-offset: .18em; }
.tool-row .fc { width: 20px; height: 25px; font-size: 0; padding: 0; clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%); border-radius: 2px 0 2px 2px; }
.tool-row .fc::before { width: 6px; height: 6px; }
.tool-row .fpair { gap: 2px; } .tool-row .fc-arrow { width: 9px; }
.tool-row .fc-act { width: 22px; height: 22px; } .tool-row .fc-act svg { width: 13px; height: 13px; }
@media (max-width: 980px) { .tool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .cat-block { grid-template-columns: 1fr; gap: 12px; } }
@media (max-width: 460px) { .tool-list { grid-template-columns: 1fr; } }

/* Home: how it works (a real sequence, so it is numbered) */
.how { margin-top: 56px; }
.how-steps { list-style: none; counter-reset: how; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.how-steps li { counter-increment: how; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; }
.how-steps li::before { content: counter(how); grid-row: 1 / span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--cobalt); color: #fff; font: 800 1.05rem/1 var(--font-display); }
:root[data-theme="dark"] .how-steps li::before { color: #0b1a14; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .how-steps li::before { color: #0b1a14; } }
.how-steps strong { font: 650 1.05rem/1.3 var(--font-display); margin-top: 8px; }
.how-steps span { color: var(--graphite); font-size: .92rem; }
@media (max-width: 760px) { .how-steps { grid-template-columns: 1fr; } }

/* Tool pages: what to do next */
.next-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 0; font-size: .9rem; }
.next-steps > span { color: var(--graphite); font-weight: 600; }
.next-steps ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.next-steps a { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 7px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; }
.next-steps a:hover { border-color: var(--cobalt); color: var(--cobalt-ink); }
.next-steps .fc { width: 16px; height: 20px; font-size: 0; padding: 0; clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 0 100%); border-radius: 2px 0 2px 2px; }
.next-steps .fc::before { width: 5px; height: 5px; }
.next-steps .fpair { gap: 2px; } .next-steps .fc-arrow { width: 8px; }
.next-steps .fc-act { width: 20px; height: 20px; } .next-steps .fc-act svg { width: 12px; height: 12px; }

/* Drop zones: an upload symbol above the title */
.drop > div::before { content: ""; display: block; width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%;
  background: var(--cobalt) no-repeat center / 24px;
  -webkit-mask: none; mask: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V5M7.5 9.5L12 5l4.5 4.5'/%3E%3Cpath d='M5 15v3a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E"); }
.drop.is-over { border-style: solid; border-color: var(--cobalt); }

/* Footer */
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 26px; }
.footer-brand p { margin: 0; color: var(--graphite); }
.footer-brand .brand-mark { width: 30px; height: 30px; }
.foot-all { font-weight: 600; color: var(--cobalt-ink) !important; }
.cat-dot { flex: none; border-radius: 50%; } .cat-intro .cat-dot { margin-right: 10px; }
:root { accent-color: var(--cobalt); }

.nav .menu-all { display: inline-block; padding: 4px 0; font-weight: 650; color: var(--cobalt-ink); }
.nav .menu-col li a { display: block; padding: 4px 0; font-weight: 500; }
/* Pictures added to articles in the WordPress editor */
.prose figure { margin: 1.4em 0; }
.prose figure img { height: auto; border-radius: var(--r-sm); border: 1px solid var(--rule); }
.prose figcaption, .prose .table-caption { font-size: var(--step--1); color: var(--graphite); margin-top: .5em; }
.prose blockquote { margin: 1.2em 0; padding: .2em 0 .2em 1em; border-left: 3px solid var(--cobalt); color: var(--graphite); }
.brand-accent { color: var(--cobalt); }
