/* Toolkeel: design tokens and components. See DESIGN_SYSTEM.md. */

@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400; font-display: optional; src: url('../fonts/schibsted-grotesk-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 600; font-display: optional; src: url('../fonts/schibsted-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 800; font-display: optional; src: url('../fonts/schibsted-grotesk-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: optional; src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }

:root {
  --ink: #0E1B2E;
  --ink-soft: #4A5B70;
  --paper: #F6F7FB;
  --surface: #FFFFFF;
  --water: #EAF0FF;
  --water-deep: #D3DEFF;
  --rule: #DCE2EC;
  --rule-strong: #A3B0C4;
  --chart: #2F54EB;
  --chart-tint: #E8EDFF;
  --brand: #2F54EB;
  --brand-deep: #1E3DC8;
  --navy: #0E1B2E;
  --navy-2: #172C4A;
  --signal: #FFC83D;
  /* Category colours: maritime signal-flag hues */
  --c-pdf: #E64980;
  --c-image: #F76707;
  --c-calc: #F59F00;
  --c-text: #2F9E44;
  --c-seo: #1098AD;
  --c-developer: #7048E8;
  --c-media: #E03131;
  --accent: var(--brand);
  --ok: #1D6B45;
  --ok-tint: #E3F3EA;
  --bad: #B42318;
  --bad-tint: #FCE9E7;
  --warn: #7A4D00;
  --warn-tint: #FBF0D9;
  --on-ink: #FFFFFF;

  --font: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --r-control: 6px; --r-panel: 10px;
  --wrap: 1180px;
  --t: 150ms ease-out;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E8EDF5; --ink-soft: #A8B6C8; --paper: #0B1422; --surface: #131F31; --water: #1A2A44; --water-deep: #233757;
    --rule: #26364F; --rule-strong: #46597A; --chart: #8EA6FF; --chart-tint: #1F2B52;
    --brand: #6F8BFF; --brand-deep: #8EA6FF; --navy: #070E1A; --navy-2: #0F1D33;
    --c-pdf: #F06595; --c-image: #FF8A3D; --c-calc: #FCC419; --c-text: #51CF66; --c-seo: #3BC9DB; --c-developer: #9775FA; --c-media: #FF8787; --ok: #6FD3A1; --ok-tint: #173326;
    --bad: #FF8A80; --bad-tint: #3B1C1A; --warn: #F2C46B; --warn-tint: #3A2E14; --on-ink: #0E1A24;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1rem/1.6 var(--font); font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased; min-height: 100dvh; display: flex; flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 var(--s3); letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 var(--s4); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--rule-strong); transition: color var(--t), text-decoration-color var(--t); }
a:hover { color: var(--chart); text-decoration-color: currentColor; }
code, kbd, pre, .mono { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--water); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s6) 0; }
::selection { background: var(--chart-tint); color: var(--ink); }

:focus-visible { outline: 3px solid var(--chart); outline-offset: 2px; border-radius: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s4); top: -100px; background: var(--ink); color: var(--on-ink); padding: var(--s2) var(--s4); border-radius: var(--r-control); z-index: 100; text-decoration: none; }
.skip-link:focus { top: var(--s3); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s5); }
@media (max-width: 600px) { .wrap { padding: 0 var(--s4); } }
.prose { max-width: 70ch; }
.prose h2 { margin-top: var(--s7); }
.prose h3 { margin-top: var(--s6); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 var(--s4); }
.prose li { margin-bottom: var(--s2); }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 var(--s5); font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-weight: 600; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.875rem; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--surface); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: var(--s5); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand:hover { color: var(--ink); }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s1); }
.nav a { display: block; padding: 10px 12px; border-radius: var(--r-control); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover { background: var(--water); color: var(--ink); }
.nav a[aria-current='page'] { box-shadow: inset 0 -3px 0 var(--chart); border-radius: 0; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--rule); color: var(--ink); border-radius: var(--r-control); min-height: 44px; padding: 0 14px; font: 600 0.95rem var(--font); gap: 8px; align-items: center; cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--rule); display: none; margin: 0; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: var(--s2) var(--s4) var(--s4); }
  .nav a { padding: 12px; }
  .nav a[aria-current='page'] { box-shadow: inset 3px 0 0 var(--chart); }
}

/* ---------- Buttons & controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: var(--r-control); border: 1px solid var(--ink); background: var(--ink); color: var(--on-ink);
  font: 600 1rem var(--font); text-decoration: none; cursor: pointer; transition: background var(--t), color var(--t), border-color var(--t);
  touch-action: manipulation; white-space: nowrap;
}
.btn:hover { background: var(--chart); border-color: var(--chart); color: #fff; }
.btn svg { width: 18px; height: 18px; flex: none; }
/* Buttons that carry a file name ("Download long-name.pdf") wrap instead of overflowing on phones. */
.bench .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; padding-top: 8px; padding-bottom: 8px; line-height: 1.3; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-secondary:hover { background: var(--water); color: var(--ink); border-color: var(--ink); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--ink); padding: 0 10px; }
.btn-quiet:hover { background: var(--water); color: var(--ink); border-color: transparent; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 0.9rem; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn-secondary:disabled:hover { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
@media (prefers-color-scheme: dark) { .btn:hover { color: #0E1A24; } }

.field { display: grid; gap: 6px; margin-bottom: var(--s4); }
.field > label, .label { font-weight: 600; font-size: 0.95rem; }
.hint { font-size: 0.875rem; color: var(--ink-soft); }
input[type='text'], input[type='url'], input[type='email'], input[type='tel'], input[type='number'], input[type='search'], input[type='password'], input[type='date'], input[type='time'], input[type='datetime-local'], input[type='month'], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font: 400 1rem var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r-control); transition: border-color var(--t);
}
textarea { min-height: 220px; resize: vertical; line-height: 1.55; }
textarea[rows] { min-height: 0; } /* short fields (addresses, captions, messages) size by their rows attribute */
textarea.mono, input.mono { font-family: var(--mono); font-size: 0.9rem; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-soft); }
input[aria-invalid='true'], textarea[aria-invalid='true'] { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
input[type='color'] { width: 56px; height: 44px; padding: 4px; border: 1px solid var(--rule-strong); border-radius: var(--r-control); background: var(--surface); cursor: pointer; }
input[type='range'] { width: 100%; accent-color: var(--chart); min-height: 32px; }
input[type='checkbox'], input[type='radio'] { accent-color: var(--chart); width: 18px; height: 18px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.row-end { justify-content: flex-end; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

/* Segmented control built from radios */
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule-strong); border-radius: var(--r-control); overflow: hidden; background: var(--surface); }
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg { padding: 0; margin: 0; }
.seg label { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; cursor: pointer; font-weight: 600; font-size: 0.92rem; border-right: 1px solid var(--rule); }
.seg label:last-of-type { border-right: 0; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg label:has(input:checked) { background: var(--ink); color: var(--on-ink); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--chart); outline-offset: -3px; }

/* ---------- Hero ---------- */
.hero { padding: var(--s8) 0 var(--s7); border-bottom: 1px solid var(--rule); background:
  linear-gradient(var(--paper), var(--paper)) padding-box; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s7); align-items: start; }
.hero h1 { font-size: clamp(2.3rem, 1.5rem + 3.6vw, 4rem); max-width: 13ch; margin-bottom: var(--s4); }
.hero .lede { margin-bottom: var(--s5); }
.hero-points { list-style: none; margin: 0 0 var(--s5); padding: 0; display: grid; gap: var(--s2); }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; }
.hero-points svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--chart); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: var(--s6); } .hero { padding: var(--s7) 0 var(--s6); } }

/* ---------- Workbench (tool area) ---------- */
.bench { background: var(--water); border: 1px solid var(--rule); border-radius: var(--r-panel); position: relative; }
.bench-body { padding: var(--s5); }
@media (max-width: 600px) { .bench-body { padding: var(--s4); } }
.bench-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--rule); }
.bench-head h2, .bench-head h3 { margin: 0; font-size: 1rem; font-weight: 600; }

/* Ruler: the proof strip. Tick marks are a repeating background; major ticks every 10. */
.proof {
  display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: 10px var(--s5) 10px; font-size: 0.875rem;
  border-top: 1px solid var(--rule); color: var(--ink-soft); position: relative;
  background-image:
    repeating-linear-gradient(90deg, var(--rule-strong) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 8px);
  background-size: 100% 9px, 100% 5px; background-repeat: no-repeat; background-position: 0 0, 0 0;
  border-radius: 0 0 var(--r-panel) var(--r-panel);
}
.proof svg { width: 18px; height: 18px; color: var(--chart); flex: none; }
.proof strong { color: var(--ink); font-weight: 600; }
.proof .count { font-family: var(--mono); color: var(--chart); font-weight: 400; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 0 6px; }
.proof a { margin-left: auto; }
.proof.live { animation: tick-in 600ms ease-out; }
@keyframes tick-in { from { background-size: 0% 9px, 0% 5px; } to { background-size: 100% 9px, 100% 5px; } }

/* Drop zone */
.drop {
  display: grid; place-items: center; text-align: center; gap: var(--s2); padding: var(--s7) var(--s5); border: 2px dashed var(--rule-strong);
  border-radius: var(--r-panel); background: var(--surface); cursor: pointer; transition: border-color var(--t), background var(--t); position: relative;
}
.drop:hover, .drop.over { border-color: var(--chart); background: var(--chart-tint); }
.drop svg { width: 40px; height: 40px; color: var(--ink-soft); }
.drop .drop-title { font-weight: 600; font-size: 1.1rem; }
.drop input[type='file'] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop:focus-within { outline: 3px solid var(--chart); outline-offset: 2px; }
.drop.compact { padding: var(--s5); }

/* Options panel */
.options { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: end; margin: var(--s5) 0 0; }
.options .field { margin: 0; }
.range-out { font-family: var(--mono); font-size: 0.9rem; }

/* Results list */
.results { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: var(--s2); }
.result { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: var(--s3); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); }
.result .thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--water); border: 1px solid var(--rule); }
.result .thumb-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 6px; background: var(--water); }
.result .thumb-icon svg { width: 26px; height: 26px; color: var(--ink-soft); }
.result .name { font-weight: 600; overflow-wrap: anywhere; line-height: 1.3; }
.result .meta { font-size: 0.875rem; color: var(--ink-soft); font-family: var(--mono); overflow-wrap: anywhere; }
.result .saving { color: var(--ok); }
.result .growth { color: var(--warn); }
.result .actions { display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: flex-end; }
.result.is-error { border-color: var(--bad); background: var(--bad-tint); }
@media (max-width: 560px) { .result { grid-template-columns: 48px minmax(0, 1fr); } .result .thumb, .result .thumb-icon { width: 48px; height: 48px; } .result .actions { grid-column: 1 / -1; justify-content: flex-start; } }

.summary-bar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between; margin-top: var(--s4); padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); }

/* Stats (word counter etc.) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r-panel); overflow: hidden; margin: 0 0 var(--s4); }
.stat { background: var(--surface); padding: var(--s3) var(--s4); }
.stat dt { font-size: 0.85rem; color: var(--ink-soft); }
.stat dd { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* Messages */
.msg { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-control); border: 1px solid; margin: var(--s4) 0 0; font-size: 0.95rem; }
.msg svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.msg p { margin: 0; }
.msg-bad { color: var(--bad); background: var(--bad-tint); border-color: currentColor; }
.msg-ok { color: var(--ok); background: var(--ok-tint); border-color: currentColor; }
.msg-warn { color: var(--warn); background: var(--warn-tint); border-color: currentColor; }
.msg-info { color: var(--ink); background: var(--surface); border-color: var(--rule); }
.msg .msg-body { color: var(--ink); }
.msg strong { color: inherit; }

.progress { height: 6px; background: var(--water-deep); border-radius: 3px; overflow: hidden; margin-top: var(--s3); }
.progress > span { display: block; height: 100%; width: 0; background: var(--chart); transition: width 200ms linear; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.output { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: var(--s4); overflow: auto; }
.output pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.88rem; line-height: 1.55; }
.copyable { position: relative; }

/* ---------- Tool page layout ---------- */
.tool-hero { padding: var(--s6) 0 var(--s5); }
.tool-hero h1 { margin-bottom: var(--s3); }
.tool-hero .lede { margin-bottom: 0; }
.breadcrumbs { font-size: 0.875rem; margin-bottom: var(--s4); color: var(--ink-soft); }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 6px; color: var(--rule-strong); }
.breadcrumbs a { color: var(--ink-soft); }
.tool-main { padding-bottom: var(--s7); }
.tool-docs { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s7); padding: var(--s7) 0; border-top: 1px solid var(--rule); }
.tool-docs aside { font-size: 0.95rem; }
@media (max-width: 960px) { .tool-docs { grid-template-columns: 1fr; gap: var(--s5); } }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 var(--s5); }
.steps li { counter-increment: step; position: relative; padding-left: 44px; margin-bottom: var(--s4); min-height: 30px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font-weight: 600; font-size: 0.9rem; }
.limits { border-left: 3px solid var(--chart); padding: var(--s1) 0 var(--s1) var(--s4); margin: 0 0 var(--s5); }
.limits ul { margin: 0; padding-left: 1.1em; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: var(--s4) 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--s3); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 400; font-size: 1.3rem; line-height: 1; color: var(--ink-soft); }
.faq details[open] summary::after { content: '–'; }
.faq details > div { padding: 0 0 var(--s4); }
.side-box { border: 1px solid var(--rule); border-radius: var(--r-panel); padding: var(--s4); margin-bottom: var(--s4); background: var(--surface); }
.side-box h2 { font-size: 1rem; font-weight: 600; margin-bottom: var(--s3); letter-spacing: 0; }
.side-box ul { list-style: none; padding: 0; margin: 0; }
.side-box li + li { margin-top: var(--s2); }

/* ---------- Tool index (homepage, directory) ---------- */
.index-section { padding: var(--s7) 0; }
.index-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); }
.index-head h2 { margin: 0; }
.filter { max-width: 340px; width: 100%; position: relative; }
.filter svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-soft); pointer-events: none; }
.filter input { padding-left: 38px; }
.cat-block { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s5); padding: var(--s5) 0; border-top: 1px solid var(--rule); }
.cat-block:last-child { border-bottom: 1px solid var(--rule); }
.cat-block h3 { font-size: 1.05rem; margin: 6px 0 4px; }
.cat-block h3 a { text-decoration: none; }
.cat-block .cat-desc { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 760px) { .cat-block { grid-template-columns: 1fr; gap: var(--s3); } }
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 var(--s5); }
.tool-link { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--s3); align-items: start; padding: var(--s3) var(--s2); margin: 0 calc(var(--s2) * -1); text-decoration: none; border-radius: var(--r-control); transition: background var(--t); }
.tool-link:hover { background: var(--water); color: var(--ink); }
.tool-link .ico { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); display: grid; place-items: center; }
.tool-link .ico svg { width: 20px; height: 20px; }
.tool-link .t { font-weight: 600; display: block; line-height: 1.3; }
.tool-link .d { font-size: 0.875rem; color: var(--ink-soft); display: block; line-height: 1.4; margin-top: 2px; }
.no-results { padding: var(--s5) 0; color: var(--ink-soft); }

/* ---------- Home sections ---------- */
.band { padding: var(--s8) 0; border-top: 1px solid var(--rule); }
.band-water { background: var(--water); }
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s7); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: var(--s5); } }
.flow-diagram { width: 100%; height: auto; color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s5); margin: 0; padding: 0; list-style: none; }
.facts li { border-top: 2px solid var(--ink); padding-top: var(--s3); }
.facts h3 { margin-bottom: var(--s2); }
.facts p { margin: 0; color: var(--ink-soft); }

/* Hero demo */
.demo .bench-body { padding: var(--s4); }
.demo-result { margin-top: var(--s3); }
.demo-figure { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s3); align-items: center; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: var(--s4); }
.demo-figure .n { font: 800 1.6rem/1.1 var(--font); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.demo-figure .l { font-size: 0.85rem; color: var(--ink-soft); }
.demo-figure svg { width: 24px; height: 24px; color: var(--ink-soft); }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); margin: var(--s6) 0; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid var(--rule); border-radius: var(--r-panel); padding: var(--s5); background: var(--surface); }
.plan.current { border: 2px solid var(--ink); }
.plan .price { font: 800 2.4rem/1 var(--font); letter-spacing: -0.03em; margin: var(--s3) 0; }
.plan ul { padding-left: 1.2em; }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--rule-strong); color: var(--ink-soft); }
.badge-ok { color: var(--ok); border-color: currentColor; background: var(--ok-tint); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); background: var(--surface); padding: var(--s7) 0 var(--s5); font-size: 0.95rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s5); }
.footer-grid h2 { font-size: 0.95rem; font-weight: 600; margin-bottom: var(--s3); letter-spacing: 0; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { text-decoration: none; color: var(--ink-soft); }
.footer-grid a:hover { color: var(--chart); text-decoration: underline; }
.footer-note { color: var(--ink-soft); max-width: 36ch; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 0.875rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Toast ---------- */
.toast-region { position: fixed; left: 50%; bottom: var(--s5); transform: translateX(-50%); z-index: 60; display: grid; gap: var(--s2); pointer-events: none; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--ink); color: var(--on-ink); padding: var(--s3) var(--s4); border-radius: var(--r-control); font-weight: 600; font-size: 0.95rem; text-align: center; animation: toast-in 200ms ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Help assistant ---------- */
.help-launch { position: fixed; right: var(--s5); bottom: var(--s5); z-index: 40; box-shadow: 0 6px 18px rgba(15, 42, 63, 0.22); border-radius: 999px; padding: 0 18px 0 14px; }
@media (max-width: 600px) { .help-launch { right: var(--s4); bottom: var(--s4); } }
.help-panel {
  position: fixed; right: var(--s5); bottom: calc(var(--s5) + 56px); z-index: 50; width: min(400px, calc(100vw - 32px)); max-height: min(620px, calc(100dvh - 120px));
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r-panel);
  box-shadow: 0 16px 40px rgba(15, 42, 63, 0.25);
}
.help-panel[hidden] { display: none; }
@media (max-width: 600px) { .help-panel { right: var(--s4); left: var(--s4); width: auto; bottom: calc(var(--s4) + 56px); } }
.help-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--rule); }
.help-head h2 { font-size: 1rem; margin: 0; letter-spacing: 0; }
.help-head p { margin: 0; font-size: 0.8rem; color: var(--ink-soft); }
.help-log { flex: 1; overflow-y: auto; padding: var(--s4); display: grid; gap: var(--s3); align-content: start; }
.bubble { padding: var(--s3); border-radius: var(--r-panel); font-size: 0.95rem; max-width: 92%; }
.bubble p:last-child { margin: 0; }
.bubble-user { background: var(--ink); color: var(--on-ink); justify-self: end; }
.bubble-bot { background: var(--water); justify-self: start; }
.bubble-bot a { font-weight: 600; }
.bubble .feedback { display: flex; gap: var(--s2); align-items: center; margin-top: var(--s2); font-size: 0.85rem; color: var(--ink-soft); }
.suggest { display: flex; flex-wrap: wrap; gap: var(--s2); }
.suggest button { font: 600 0.85rem var(--font); background: var(--surface); color: var(--ink); border: 1px solid var(--rule-strong); border-radius: 999px; padding: 6px 12px; cursor: pointer; min-height: 36px; text-align: left; }
.suggest button:hover { border-color: var(--chart); color: var(--chart); }
.help-form { display: flex; gap: var(--s2); padding: var(--s3); border-top: 1px solid var(--rule); }
.help-form input { flex: 1; }

/* ---------- Ads (only rendered when enabled in config) ---------- */
.ad-slot { margin: var(--s6) auto; min-height: 280px; display: grid; place-items: center; }
.ad-slot::before { content: 'Advertisement'; display: block; font-size: 0.75rem; color: var(--ink-soft); margin-bottom: 4px; }

/* ---------- Specific tools ---------- */
.diff-view { font-family: var(--mono); font-size: 0.85rem; line-height: 1.55; border: 1px solid var(--rule); border-radius: var(--r-panel); overflow: auto; background: var(--surface); max-height: 70vh; }
.diff-view table { border-collapse: collapse; width: 100%; }
.diff-view td { padding: 0 var(--s2); vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-view td.ln { width: 1%; white-space: nowrap; color: var(--ink-soft); text-align: right; user-select: none; border-right: 1px solid var(--rule); }
.diff-view td.sign { width: 1%; user-select: none; color: var(--ink-soft); }
.diff-view tr.ins { background: var(--ok-tint); }
.diff-view tr.del { background: var(--bad-tint); }
.diff-view tr.ins td.sign { color: var(--ok); }
.diff-view tr.del td.sign { color: var(--bad); }
.diff-view ins { background: color-mix(in srgb, var(--ok) 25%, transparent); text-decoration: none; border-radius: 2px; }
.diff-view del { background: color-mix(in srgb, var(--bad) 25%, transparent); text-decoration: none; border-radius: 2px; }
.diff-view tr.skip td { color: var(--ink-soft); background: var(--water); text-align: center; font-family: var(--font); font-size: 0.85rem; padding: 4px; }

.kv { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.kv th, .kv td { text-align: left; padding: 8px var(--s3); border-bottom: 1px solid var(--rule); vertical-align: top; overflow-wrap: anywhere; }
.kv th { width: 34%; font-weight: 600; }
.kv td { font-family: var(--mono); font-size: 0.86rem; }
.kv tr.flag td, .kv tr.flag th { background: var(--warn-tint); }
.table-wrap { position: relative; /* keeps visually-hidden labels inside the scroll box on phones */ overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r-panel); background: var(--surface); }

.serp { background: #fff; color: #202124; border: 1px solid var(--rule); border-radius: var(--r-panel); padding: var(--s5); font-family: Arial, sans-serif; max-width: 680px; }
.serp.mobile { max-width: 420px; }
.serp .s-site { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.serp .s-fav { width: 26px; height: 26px; border-radius: 50%; background: #f1f3f4; border: 1px solid #dadce0; display: grid; place-items: center; font-size: 12px; color: #5f6368; }
.serp .s-name { font-size: 14px; color: #202124; line-height: 1.3; }
.serp .s-url { font-size: 12px; color: #4d5156; line-height: 1.3; overflow-wrap: anywhere; }
.serp .s-title { font-size: 20px; line-height: 1.3; color: #1a0dab; margin: 0 0 4px; font-weight: 400; overflow-wrap: anywhere; }
.serp.mobile .s-title { font-size: 18px; }
.serp .s-desc { font-size: 14px; line-height: 1.58; color: #4d5156; margin: 0; overflow-wrap: anywhere; }
.meter { height: 8px; background: var(--water-deep); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.meter > span { display: block; height: 100%; background: var(--ok); width: 0; }
.meter.over > span { background: var(--bad); }

.qr-preview { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: var(--s5); display: grid; place-items: center; min-height: 300px; }
.qr-preview svg { width: min(280px, 100%); height: auto; }
.tool-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
@media (max-width: 860px) { .tool-split { grid-template-columns: 1fr; } }

.page-list { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s2); }
.verdict { display: flex; gap: var(--s3); align-items: center; padding: var(--s4); border-radius: var(--r-panel); font-weight: 600; font-size: 1.1rem; }
.verdict svg { width: 26px; height: 26px; flex: none; }
.verdict.allowed { background: var(--ok-tint); color: var(--ok); border: 1px solid currentColor; }
.verdict.blocked { background: var(--bad-tint); color: var(--bad); border: 1px solid currentColor; }
.verdict .why { display: block; color: var(--ink); font-weight: 400; font-size: 0.95rem; }

.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); margin: var(--s4) 0; }

/* Guides */
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5); }
.guide-list li { border-top: 1px solid var(--rule); padding-top: var(--s4); }
.guide-list h2 { font-size: 1.3rem; margin-bottom: var(--s2); }
.guide-list h2 a { text-decoration: none; }
.article-meta { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: var(--s5); }
.callout { border: 1px solid var(--rule); background: var(--water); border-radius: var(--r-panel); padding: var(--s4) var(--s5); margin: var(--s5) 0; }
.callout p:last-child { margin: 0; }

.page-head { padding: var(--s7) 0 var(--s5); }
.page-body { padding-bottom: var(--s8); }
.placeholder { background: var(--warn-tint); color: var(--warn); padding: 0 4px; border-radius: 3px; font-weight: 600; }

.err-page { padding: var(--s9) 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .help-launch, .help-panel, .ad-slot { display: none !important; }
}

.mt { margin-top: var(--s4); }
textarea.short { min-height: 120px; }
.side-box h2 svg { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; margin-right: 4px; color: var(--chart); }
.kv .badge { margin-left: 8px; }
.serp-split { grid-template-columns: minmax(0, 1fr); }
.serp:not(.mobile) .s-title { white-space: nowrap; overflow: hidden; }
.serp-split .serp { max-width: 652px; }

/* =====================================================================
   v1.1 colourful layer: signal-flag palette, tool cards, navy hero
   ===================================================================== */
.cat-pdf { --accent: var(--c-pdf); }
.cat-image { --accent: var(--c-image); }
.cat-calc { --accent: var(--c-calc); }
.cat-text { --accent: var(--c-text); }
.cat-seo { --accent: var(--c-seo); }
.cat-developer { --accent: var(--c-developer); }
.cat-media { --accent: var(--c-media); }

.btn { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.btn:disabled:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--ink); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.08rem; border-radius: 10px; }
@media (prefers-color-scheme: dark) {
  .btn, .btn:hover, .btn:disabled:hover { color: #0B1422; }
  .btn-secondary, .btn-secondary:hover, .btn-quiet, .btn-quiet:hover { color: var(--ink); }
}

/* Signal stripe across the top of every page */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header::before { content: ''; display: block; height: 4px; background: linear-gradient(90deg,
  var(--c-pdf) 0 14.28%, var(--c-image) 0 28.57%, var(--c-media) 0 42.85%, var(--c-calc) 0 57.14%, var(--c-text) 0 71.42%, var(--c-seo) 0 85.71%, var(--c-developer) 0); }
.brand svg { color: var(--navy); }
@media (prefers-color-scheme: dark) { .brand svg { color: #E8EDF5; } }
.nav a { display: flex; align-items: center; gap: 7px; }
.nav a .dot { width: 9px; height: 9px; border-radius: 3px; background: var(--accent); flex: none; }
.nav a[aria-current='page'] { box-shadow: inset 0 -3px 0 var(--accent); }
.nav .nav-cta a { background: var(--brand); color: #fff; border-radius: 8px; padding: 9px 14px; }
.nav .nav-cta a:hover { background: var(--brand-deep); color: #fff; }
@media (prefers-color-scheme: dark) { .nav .nav-cta a, .nav .nav-cta a:hover { color: #0B1422; } }
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--rule); display: none; margin: 0; box-shadow: 0 12px 24px rgba(14, 27, 46, 0.12); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: var(--s2) var(--s4) var(--s4); }
  .nav a { padding: 12px; }
  .nav a[aria-current='page'] { box-shadow: inset 3px 0 0 var(--accent); }
  .nav .nav-cta a { justify-content: center; margin-top: var(--s2); }
}

/* Navy hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(47, 84, 235, 0.45), transparent 60%),
  radial-gradient(700px 400px at 0% 110%, rgba(230, 73, 128, 0.28), transparent 60%), var(--navy); color: #F2F5FA; border-bottom: 0; position: relative; overflow: hidden; }
.hero h1 { color: #fff; }
.hero .lede { color: #C3CEDF; }
.hero-points svg { color: var(--signal); }
.hero .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.hero .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: #fff; }
.hero .bench { background: var(--surface); color: var(--ink); border: 0; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.hero .bench-head { background: var(--water); border-radius: var(--r-panel) var(--r-panel) 0 0; }
.hero-flags { position: absolute; right: -40px; bottom: -40px; width: 340px; opacity: 0.16; pointer-events: none; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--s5); padding: 0; list-style: none; }
.hero-chips a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.hero-chips a:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.hero-chips .sw { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); display: grid; place-items: center; }
.hero-chips .sw svg { width: 14px; height: 14px; color: #fff; }
.hero-stats { display: flex; flex-wrap: wrap; gap: var(--s5); margin-top: var(--s5); color: #C3CEDF; font-size: 0.92rem; }
.hero-stats strong { display: block; color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }

/* Category filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--s5); }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--rule);
  background: var(--surface); color: var(--ink); font: 600 0.92rem var(--font); cursor: pointer; text-decoration: none; transition: border-color var(--t), background var(--t); }
.chip .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip[aria-pressed='true'] .dot { background: #fff; }
.chip.cat-calc[aria-pressed='true'] { color: #1F1500; }
.chip.cat-calc[aria-pressed='true'] .dot { background: #1F1500; }

/* Tool cards grid */
.tool-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s4); }
.tool-card { position: relative; display: flex; flex-direction: column; gap: var(--s3); height: 100%; padding: var(--s5) var(--s4) var(--s4); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 14px; text-decoration: none; color: var(--ink); transition: transform 160ms ease-out, box-shadow 160ms ease-out, border-color 160ms; }
.tool-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--accent) 55%, transparent); color: var(--ink); }
.tool-card .tile { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); transition: background 160ms, color 160ms; }
.tool-card:hover .tile { background: var(--accent); color: #fff; }
.tool-card.cat-calc:hover .tile { color: #1F1500; }
.tool-card .tile svg { width: 26px; height: 26px; stroke-width: 2; }
.tool-card .t { font-weight: 800; font-size: 1.04rem; letter-spacing: -0.01em; line-height: 1.25; }
.tool-card .d { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.45; }
.tool-card .new { position: absolute; top: 14px; right: 14px; font-size: 0.72rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--signal); color: #1F1500; }
.grid-section h2 { display: flex; align-items: center; gap: 10px; }
.grid-section h2 .sq { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); }
.grid-section + .grid-section { margin-top: var(--s7); }
.grid-section .more { margin-top: var(--s3); }

/* Category & tool page heads with colour band */
.color-head { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, var(--paper)), var(--paper)); border-bottom: 1px solid var(--rule); }
.color-head .page-head, .color-head .tool-hero { padding-bottom: var(--s5); }
.head-row { display: flex; gap: var(--s4); align-items: center; }
.head-tile { width: 64px; height: 64px; border-radius: 16px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 10px 24px -10px var(--accent); }
.cat-calc .head-tile { color: #1F1500; }
.head-tile svg { width: 34px; height: 34px; stroke-width: 2; }
.head-row h1 { margin: 0; }
@media (max-width: 600px) { .head-tile { width: 52px; height: 52px; } .head-tile svg { width: 28px; height: 28px; } }
.tool-main .bench { border-top: 4px solid var(--accent); }
.proof svg { color: var(--accent); }
.drop:hover, .drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.drop svg { color: var(--accent); }

/* Section bands */
.band-navy { background: var(--navy); color: #E7ECF4; }
.band-navy h2, .band-navy h3 { color: #fff; }
.band-navy p, .band-navy .facts p { color: #C3CEDF; }
.band-navy .facts li { border-top-color: var(--signal); }
.band-navy a { color: #fff; }
.band-tint { background: var(--water); }
.steps-row { list-style: none; padding: 0; margin: var(--s5) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s5); counter-reset: s; }
.steps-row li { counter-increment: s; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: var(--s5); }
.steps-row li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: var(--s3); }
.steps-row h3 { margin-bottom: 6px; }
.steps-row p { margin: 0; color: var(--ink-soft); }

/* Insights */
.insight-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s5); }
.insight-card { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform 160ms, box-shadow 160ms; }
.insight-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(14, 27, 46, 0.35); color: var(--ink); }
.insight-card .band { height: 8px; background: var(--accent); padding: 0; border: 0; }
.insight-card .body { padding: var(--s4) var(--s5) var(--s5); display: flex; flex-direction: column; gap: var(--s2); flex: 1; }
.insight-card .kicker { font-size: 0.82rem; font-weight: 600; color: var(--accent); }
.cat-calc .kicker { color: #A26100; }
.insight-card h3 { font-size: 1.12rem; line-height: 1.3; margin: 0; }
.insight-card p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }
.insight-card .meta { margin-top: auto; padding-top: var(--s3); font-size: 0.82rem; color: var(--ink-soft); }
.toc { border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: 10px; padding: var(--s4) var(--s5); background: var(--surface); margin: 0 0 var(--s5); }
.toc h2 { font-size: 1rem; margin: 0 0 var(--s2); letter-spacing: 0; }
.toc ol { margin: 0; padding-left: 1.2em; }
.key-takeaways { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--rule)); border-radius: 12px; padding: var(--s4) var(--s5); margin: 0 0 var(--s5); }
.key-takeaways h2 { font-size: 1.05rem; margin: 0 0 var(--s2); letter-spacing: 0; }
.key-takeaways ul { margin: 0; }
.author-box { display: flex; gap: var(--s3); align-items: center; border-top: 1px solid var(--rule); padding-top: var(--s4); margin-top: var(--s6); font-size: 0.92rem; color: var(--ink-soft); }
.author-box svg { width: 36px; height: 36px; flex: none; color: var(--navy); }

/* Social follow (optional, never required) */
.follow-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: center; margin: var(--s5) 0 0; padding: var(--s4) var(--s5);
  border-radius: 14px; background: linear-gradient(120deg, color-mix(in srgb, var(--c-pdf) 10%, var(--surface)), color-mix(in srgb, var(--c-developer) 10%, var(--surface))); border: 1px solid var(--rule); }
.follow-card .heart { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--c-pdf); color: #fff; }
.follow-card .heart svg { width: 24px; height: 24px; }
.follow-card p { margin: 0 0 var(--s2); }
.follow-card .row { gap: var(--s2); }
.social-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; text-decoration: none; color: #fff; }
.social-btn svg { width: 18px; height: 18px; }
.social-btn:hover { color: #fff; filter: brightness(1.08); }
.social-fb { background: #1877F2; }
.social-ig { background: #C13584; }
.social-li { background: #0A66C2; }
.footer-social { display: flex; gap: var(--s2); margin-top: var(--s4); }
.footer-social a { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); color: #fff; }
.footer-social a:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.footer-social svg { width: 20px; height: 20px; }

/* Navy footer */
.site-footer { background: var(--navy); color: #C3CEDF; border-top: 0; }
.site-footer .brand, .site-footer .brand:hover { color: #fff; }
.site-footer .brand svg { color: #fff; }
.footer-grid h2 { color: #fff; }
.footer-grid a { color: #C3CEDF; }
.footer-grid a:hover { color: #fff; }
.footer-note { color: #C3CEDF; }
.footer-base { border-top-color: rgba(255, 255, 255, 0.14); color: #9FB0C7; }
.site-footer .placeholder { background: #3A2E14; color: #F2C46B; }
@media (min-width: 761px) { .footer-grid { grid-template-columns: 1.4fr repeat(4, 1fr); } }

/* Ads: reserved space only when enabled */
.ad-slot { min-height: 280px; }
.ad-inline { margin: var(--s6) 0; min-height: 250px; display: block; }
.ad-sidebar { position: sticky; top: var(--s5); min-height: 600px; margin: 0; }

/* Calculator & generic tool output */
.big-result { font: 800 clamp(1.8rem, 1.2rem + 2vw, 2.6rem)/1.1 var(--font); letter-spacing: -0.03em; color: var(--ink); margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result-card { background: var(--surface); border: 1px solid var(--rule); border-left: 5px solid var(--accent); border-radius: 12px; padding: var(--s4) var(--s5); margin-top: var(--s4); }
.result-card .label { color: var(--ink-soft); font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 4px; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s4); align-items: end; }
.calc-grid .field { margin: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--rule); margin-bottom: var(--s4); }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font: 600 0.95rem var(--font); color: var(--ink-soft); cursor: pointer; min-height: 44px; }
.tabs button[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--accent); }
.thumbs { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s3); }
.thumb-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: var(--s2); display: grid; gap: var(--s2); position: relative; }
.thumb-card canvas, .thumb-card img { width: 100%; height: auto; border-radius: 6px; background: #fff; border: 1px solid var(--rule); display: block; }
.thumb-card .cap { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; font-weight: 600; }
.thumb-card .acts { display: flex; gap: 2px; justify-content: center; flex-wrap: wrap; }
.thumb-card.removed { opacity: 0.4; }
.thumb-card.removed canvas { filter: grayscale(1); }
.rot-90 { transform: rotate(90deg); } .rot-180 { transform: rotate(180deg); } .rot-270 { transform: rotate(270deg); }
.canvas-stage { background: repeating-conic-gradient(#e9edf3 0 25%, #fff 0 50%) 0 0 / 20px 20px; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; position: relative; touch-action: none; display: grid; place-items: center; }
.canvas-stage canvas { max-width: 100%; height: auto; display: block; }
.crop-box { position: absolute; border: 2px solid var(--accent); box-shadow: 0 0 0 9999px rgba(14, 27, 46, 0.45); cursor: move; }
.crop-box .h { position: absolute; width: 16px; height: 16px; background: #fff; border: 2px solid var(--accent); border-radius: 4px; }
.crop-box .h.nw { left: -9px; top: -9px; cursor: nwse-resize; } .crop-box .h.ne { right: -9px; top: -9px; cursor: nesw-resize; }
.crop-box .h.sw { left: -9px; bottom: -9px; cursor: nesw-resize; } .crop-box .h.se { right: -9px; bottom: -9px; cursor: nwse-resize; }
.swatches { display: flex; flex-wrap: wrap; gap: var(--s2); }
.swatch { width: 92px; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--surface); font: 400 0.8rem var(--mono); text-align: center; cursor: pointer; padding: 0; color: var(--ink); }
.swatch span { display: block; height: 56px; }
.swatch div { padding: 6px 2px; }
.strength { height: 8px; border-radius: 4px; background: var(--water-deep); overflow: hidden; margin-top: 8px; }
.strength > span { display: block; height: 100%; width: 0; transition: width 200ms; }
.sig-pad { width: 100%; height: 180px; background: #fff; border: 2px dashed var(--rule-strong); border-radius: 10px; touch-action: none; cursor: crosshair; display: block; }
.og-card { border: 1px solid #dadde1; border-radius: 10px; overflow: hidden; max-width: 520px; background: #fff; color: #1d2129; font-family: Arial, sans-serif; }
.og-card .img { aspect-ratio: 1.91 / 1; background: #e4e6eb; display: grid; place-items: center; color: #606770; font-size: 14px; overflow: hidden; }
.og-card .img img { width: 100%; height: 100%; object-fit: cover; }
.og-card .txt { padding: 10px 12px; background: #f0f2f5; }
.og-card .dom { font-size: 12px; color: #606770; text-transform: uppercase; }
.og-card .ttl { font-size: 16px; font-weight: 600; margin: 3px 0; }
.og-card .dsc { font-size: 14px; color: #606770; }
.code-out { position: relative; }
.code-out textarea { min-height: 260px; }
.flip-x svg { transform: scaleX(-1); }
.pv { aspect-ratio: 1 / 1.15; display: grid; place-items: center; overflow: hidden; background: var(--water); border-radius: 6px; }
.pv canvas { max-width: 88%; max-height: 88%; width: auto !important; height: auto; transition: transform 160ms; }
.kicker-line { font-weight: 700; font-size: 0.9rem; color: var(--accent); margin: 0 0 var(--s2); }
.cat-calc .kicker-line { color: #A26100; }
.sig-mark { position: absolute; pointer-events: none; height: auto; }
.canvas-stage .pick-canvas { cursor: crosshair; }
.pick-chip, .color-chip { display: block; width: 100%; min-width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--rule); margin-bottom: var(--s3); }
.color-chip { width: 64px; margin: 0; }
.contrast-sample { border: 1px solid var(--rule); border-radius: 12px; padding: var(--s4) var(--s5); margin-top: var(--s3); }
.contrast-sample p { margin: 0; }
.wcag { list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; gap: 4px; font-weight: 600; }
.wcag .pass { color: var(--ok); } .wcag .fail { color: var(--bad); }
.rx-view { min-height: 3em; }
.rx-view mark { background: color-mix(in srgb, var(--c-calc) 45%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.b64-prev { max-width: 100%; max-height: 260px; margin-top: var(--s3); border: 1px solid var(--rule); border-radius: 8px; background: repeating-conic-gradient(#e9edf3 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.fv-fig { margin: 0; text-align: center; display: grid; gap: 4px; justify-items: center; }
.fv-fig img { image-rendering: pixelated; border: 1px solid var(--rule); border-radius: 4px; background: repeating-conic-gradient(#e9edf3 0 25%, #fff 0 50%) 0 0 / 10px 10px; }
.chip.cat-calc[aria-pressed='true'] { color: #1F1500; }
.result-card .big-result { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); }
.calc-grid .result-card { margin-top: 0; }
#ln-bar { height: 12px; }
#ln-bar > span { background: var(--accent); }
.index-head .filter { max-width: 420px; }
.hero h1 { max-width: 16ch; }

/* =====================================================================
   v1.2 "attractive" layer: bright hero, illustrations, infographics, motion
   ===================================================================== */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 700; font-display: optional; src: url('../fonts/bricolage-grotesque-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 800; font-display: optional; src: url('../fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2'); }
:root { --display: 'Bricolage Grotesque', 'Schibsted Grotesk', system-ui, sans-serif; --paper: #F7F8FC; --shadow-lg: 0 24px 60px -24px rgba(31, 52, 120, 0.35); --shadow-md: 0 12px 30px -14px rgba(31, 52, 120, 0.3); }
@media (prefers-color-scheme: dark) { :root { --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, 0.7); --shadow-md: 0 12px 30px -14px rgba(0, 0, 0, 0.6); } }
h1, h2, .brand, .big-result, .plan .price, .stat-num, .tool-card .t { font-family: var(--display); }
h1 { letter-spacing: -0.035em; }
h2 { letter-spacing: -0.025em; }

/* Bright hero */
.hero { background: var(--paper); color: var(--ink); overflow: hidden; position: relative; isolation: isolate; padding: var(--s7) 0 var(--s8); }
.hero h1 { color: var(--ink); font-size: clamp(2.5rem, 1.6rem + 3.8vw, 4.4rem); max-width: 14ch; line-height: 1.02; }
.hero .lede { color: var(--ink-soft); font-size: 1.2rem; }
.hero-points svg { color: var(--c-text); }
.hero .btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.hero .btn-secondary:hover { background: var(--water); color: var(--ink); border-color: var(--ink); }
.hl { background: linear-gradient(92deg, #2F54EB 0%, #C2255C 55%, #E8590C 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-color-scheme: dark) { .hl { background-image: linear-gradient(92deg, #91A7FF, #F783AC 55%, #FFA94D); } }
.blob { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; opacity: 0.55; }
.blob.b1 { width: 520px; height: 520px; left: -160px; top: -180px; background: radial-gradient(circle at 50% 50%, #BAC8FF, transparent 68%); animation: drift 18s ease-in-out infinite alternate; }
.blob.b2 { width: 460px; height: 460px; right: -120px; top: 40px; background: radial-gradient(circle at 50% 50%, #FCC2D7, transparent 68%); animation: drift 22s ease-in-out infinite alternate-reverse; }
.blob.b3 { width: 420px; height: 420px; left: 35%; bottom: -260px; background: radial-gradient(circle at 50% 50%, #FFEC99, transparent 68%); animation: drift 26s ease-in-out infinite alternate; }
@media (prefers-color-scheme: dark) { .blob { opacity: 0.18; } }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(40px, 30px, 0) scale(1.12); } }
.hero-grid { align-items: center; }
.hero-art { width: 100%; height: auto; max-width: 600px; justify-self: center; overflow: visible; }
.hero-chips a { background: var(--surface); border: 1px solid var(--rule); color: var(--ink); box-shadow: 0 2px 8px -4px rgba(31, 52, 120, 0.25); }
.hero-chips a:hover { background: var(--surface); border-color: var(--accent); color: var(--ink); transform: translateY(-2px); }
.hero-chips a { transition: transform 160ms, border-color 160ms; }
.hero-chips .sw svg { color: #fff; }
.hero-chips .cat-calc .sw svg { color: #3B2A00; }
.trust-row { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s5); font-size: 0.92rem; color: var(--ink-soft); padding: 0; list-style: none; }
.trust-row li { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { width: 18px; height: 18px; color: var(--c-text); }
.rotator { display: inline-grid; vertical-align: bottom; }
.rotator > span { grid-area: 1 / 1; opacity: 0; animation: rotword 12s infinite; }
.rotator > span:nth-child(2) { animation-delay: 3s; } .rotator > span:nth-child(3) { animation-delay: 6s; } .rotator > span:nth-child(4) { animation-delay: 9s; }
@keyframes rotword { 0%, 2% { opacity: 0; transform: translateY(0.4em); } 5%, 22% { opacity: 1; transform: none; } 25%, 100% { opacity: 0; transform: translateY(-0.4em); } }

/* Illustration motion */
.ha-float { animation: floaty 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ha-float.f2 { animation-duration: 7s; animation-delay: -1s; } .ha-float.f3 { animation-duration: 5.5s; animation-delay: -2s; }
.ha-float.f4 { animation-duration: 6.5s; animation-delay: -3s; } .ha-float.f5 { animation-duration: 7.5s; animation-delay: -1.5s; } .ha-float.f6 { animation-duration: 6.2s; animation-delay: -2.5s; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(-3deg); } }
.ha-twinkle { animation: twinkle 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ha-twinkle.t2 { animation-delay: -1s; } .ha-twinkle.t3 { animation-delay: -2s; } .ha-twinkle.t4 { animation-delay: -0.5s; }
@keyframes twinkle { 0%, 100% { transform: scale(0.6); opacity: 0.4; } 50% { transform: scale(1.15); opacity: 1; } }
.ha-progress { animation: progress 3.6s cubic-bezier(.6, 0, .3, 1) infinite; transform-box: fill-box; transform-origin: left center; }
@keyframes progress { 0% { transform: scaleX(0.04); } 70%, 100% { transform: scaleX(1); } }
.ha-result { animation: pop 3.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pop { 0%, 62% { transform: scale(0.85); opacity: 0.35; } 72% { transform: scale(1.06); opacity: 1; } 80%, 100% { transform: scale(1); opacity: 1; } }
.ha-orbit { animation: spin 80s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.sc-bob { animation: floaty 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sc-spin { animation: spin 9s linear infinite; transform-box: fill-box; transform-origin: center; }

/* Section shell */
.section { padding: var(--s8) 0; position: relative; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto var(--s6); }
.section-head h2 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem); margin-bottom: var(--s3); }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; margin: 0; }
.eyebrow-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--chart-tint); color: var(--brand-deep); font-weight: 700; font-size: 0.85rem; margin-bottom: var(--s3); }
.eyebrow-pill svg { width: 16px; height: 16px; }

/* Stats band (infographic) */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); margin-top: calc(var(--s7) * -1); position: relative; z-index: 2; }
.stat-card { background: var(--surface); border-radius: 18px; padding: var(--s5); box-shadow: var(--shadow-md); border: 1px solid var(--rule); display: flex; gap: var(--s3); align-items: center; }
.stat-card .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 15%, var(--surface)); color: var(--accent); flex: none; }
.stat-card .ic svg { width: 28px; height: 28px; stroke-width: 2; }
.stat-num { font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-card .lbl { color: var(--ink-soft); font-size: 0.9rem; margin-top: 4px; }
@media (max-width: 900px) { .stats-band { grid-template-columns: 1fr 1fr; margin-top: var(--s5); } }
@media (max-width: 480px) { .stats-band { grid-template-columns: 1fr; } }

/* Category cards with art */
.cat-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
@media (max-width: 900px) { .cat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-card { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--rule); border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform 200ms ease-out, box-shadow 200ms; }
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); color: var(--ink); }
.cat-card .cat-art { width: 100%; height: auto; display: block; }
.cat-card .body { padding: var(--s4) var(--s5) var(--s5); display: grid; gap: 6px; }
.cat-card h3 { font-family: var(--display); font-size: 1.3rem; margin: 0; }
.cat-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.cat-card .cnt { font-weight: 700; color: var(--accent); font-size: 0.9rem; }
.cat-calc .cnt { color: #A26100; }
.color-head .cat-art { width: 220px; max-width: 40%; height: auto; border-radius: 18px; box-shadow: var(--shadow-md); }
.color-head .head-split { display: flex; gap: var(--s6); align-items: center; justify-content: space-between; }
@media (max-width: 700px) { .color-head .cat-art { display: none; } }

/* Tool cards: gradient tiles */
.tool-card .tile { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), color-mix(in srgb, var(--accent) 8%, var(--surface))); }
.tool-card:hover .tile { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000)); }
.tool-card:hover .tile svg { animation: wiggle 500ms ease-in-out; }
@keyframes wiggle { 30% { transform: rotate(-10deg) scale(1.08); } 60% { transform: rotate(8deg) scale(1.08); } }
.tool-card { border-radius: 16px; }

/* Marquee */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); padding: var(--s2) 0; }
.marquee-track { display: flex; gap: var(--s3); width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); text-decoration: none; font-weight: 600; white-space: nowrap; color: var(--ink); }
.marquee a:hover { border-color: var(--accent); color: var(--ink); }
.marquee a .d2 { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* Comparison infographic */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s5); align-items: stretch; }
@media (max-width: 860px) { .compare { grid-template-columns: 1fr; } .compare .vs { justify-self: center; } }
.compare .col { border-radius: 20px; padding: var(--s5); }
.compare .col h3 { font-family: var(--display); font-size: 1.25rem; margin-bottom: var(--s4); }
.compare .them { background: var(--surface); border: 1px dashed var(--rule-strong); }
.compare .us { background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), color-mix(in srgb, var(--c-pdf) 10%, var(--surface))); border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--rule)); box-shadow: var(--shadow-md); }
.compare ol { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.compare li { display: flex; gap: var(--s3); align-items: flex-start; }
.compare li .n { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.compare li .n svg { width: 20px; height: 20px; }
.compare .them .n { background: var(--bad-tint); color: var(--bad); }
.compare .us .n { background: var(--ok-tint); color: var(--ok); }
.compare li strong { display: block; }
.compare li span { color: var(--ink-soft); font-size: 0.92rem; }
.compare .vs { align-self: center; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-family: var(--display); font-weight: 800; }

/* Before/after bars */
.bars { display: grid; gap: var(--s3); margin: var(--s4) 0; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 90px; gap: var(--s3); align-items: center; font-size: 0.95rem; }
.bar-row .track { height: 22px; border-radius: 11px; background: var(--water); overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 11px; transform-origin: left; transform: scaleX(var(--w, 1)); }
.bar-row .fill.before { background: linear-gradient(90deg, #FFA8A8, #F03E3E); }
.bar-row .fill.after { background: linear-gradient(90deg, #8CE99A, #2F9E44); }
.js-reveal [data-reveal]:not(.is-in) .fill { transform: scaleX(0); }
.bar-row .fill { transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.bar-row b { font-family: var(--display); text-align: right; }
.try-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s6); align-items: center; }
@media (max-width: 900px) { .try-grid { grid-template-columns: 1fr; } }
.try-grid .bench { box-shadow: var(--shadow-lg); border: 0; }

/* Steps with path */
.steps-row li { position: relative; border-radius: 18px; text-align: left; transition: transform 200ms; }
.steps-row li:hover { transform: translateY(-3px); }
.steps-row li::before { background: linear-gradient(135deg, var(--brand), var(--c-pdf)); width: 44px; height: 44px; border-radius: 14px; font-family: var(--display); font-size: 1.2rem; }
.step-ic { position: absolute; right: var(--s5); top: var(--s5); width: 40px; height: 40px; color: var(--accent); opacity: .9; }

/* Follow band */
.follow-band { border-radius: 24px; padding: var(--s6); display: grid; grid-template-columns: auto 1fr auto; gap: var(--s5); align-items: center;
  background: linear-gradient(120deg, #2F54EB 0%, #7048E8 45%, #C2255C 100%); color: #fff; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.follow-band::after { content: ''; position: absolute; width: 300px; height: 300px; right: -80px; top: -120px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.follow-band h2 { color: #fff; margin: 0 0 6px; font-size: 1.6rem; }
.follow-band p { margin: 0; color: rgba(255, 255, 255, 0.9); }
.follow-band .big-ic { width: 64px; height: 64px; border-radius: 18px; background: rgba(255, 255, 255, 0.18); display: grid; place-items: center; }
.follow-band .big-ic svg { width: 34px; height: 34px; color: #fff; }
.follow-band .row { position: relative; z-index: 1; }
.follow-band .social-btn { background: #fff; color: var(--ink); }
.follow-band .social-btn svg { color: currentColor; }
.follow-band .social-btn.social-fb svg { color: #1877F2; } .follow-band .social-btn.social-ig svg { color: #C13584; } .follow-band .social-btn.social-li svg { color: #0A66C2; }
.follow-band .social-btn:hover { color: var(--ink); filter: none; transform: translateY(-2px); }
.follow-band .social-btn { transition: transform 160ms; }
@media (max-width: 860px) { .follow-band { grid-template-columns: 1fr; text-align: left; } }

/* Insight covers */
.insight-card .cover { display: block; aspect-ratio: 1200 / 630; width: 100%; height: auto; background: var(--water); }
.insight-card .band { display: none; }
.insight-card:hover .cover { filter: saturate(1.15); }
.article-cover { width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 20px; box-shadow: var(--shadow-md); margin: var(--s4) 0 var(--s2); display: block; }

/* Scroll reveal (only when JS is running; no layout shift: transform + opacity) */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 600ms ease-out, transform 600ms ease-out; }
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }
.js-reveal [data-reveal-group] > * { opacity: 0; transform: translateY(14px); transition: opacity 500ms ease-out, transform 500ms ease-out; }
.js-reveal [data-reveal-group].is-in > * { opacity: 1; transform: none; }
.js-reveal [data-reveal-group].is-in > *:nth-child(2) { transition-delay: 70ms; } .js-reveal [data-reveal-group].is-in > *:nth-child(3) { transition-delay: 140ms; }
.js-reveal [data-reveal-group].is-in > *:nth-child(4) { transition-delay: 210ms; } .js-reveal [data-reveal-group].is-in > *:nth-child(5) { transition-delay: 280ms; } .js-reveal [data-reveal-group].is-in > *:nth-child(6) { transition-delay: 350ms; }

/* Tool page header polish */
.color-head { background: radial-gradient(900px 260px at 85% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--paper)), var(--paper)); }
.head-tile { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 65%, #000)); border-radius: 18px; }
.tool-main .bench { border-top: 0; box-shadow: var(--shadow-md); border-radius: 18px; }
.tool-main .bench::before { content: ''; display: block; height: 5px; border-radius: 18px 18px 0 0; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #fff)); }
.btn { border-radius: 10px; }
.btn:not(.btn-secondary):not(.btn-quiet) { background: linear-gradient(135deg, #3B5BFF, #2F54EB 55%, #4C3BD9); border: 0; box-shadow: 0 8px 18px -8px rgba(47, 84, 235, 0.7); }
.btn:not(.btn-secondary):not(.btn-quiet):hover { background: linear-gradient(135deg, #2F54EB, #1E3DC8); }
.btn:not(.btn-secondary):not(.btn-quiet):disabled { box-shadow: none; }
@media (prefers-color-scheme: dark) { .btn:not(.btn-secondary):not(.btn-quiet) { background: linear-gradient(135deg, #91A7FF, #6F8BFF); } }

@media (prefers-reduced-motion: reduce) {
  .blob, .ha-float, .ha-twinkle, .ha-progress, .ha-result, .ha-orbit, .sc-bob, .sc-spin, .marquee-track, .rotator > span { animation: none !important; }
  .rotator > span { opacity: 0; } .rotator > span:first-child { opacity: 1; }
  .ha-result { opacity: 1; }
  .js-reveal [data-reveal], .js-reveal [data-reveal-group] > * { opacity: 1 !important; transform: none !important; }
  .marquee-track { flex-wrap: wrap; width: auto; } .marquee { mask-image: none; }
}
.fill[data-w='0.155'] { --w: 0.155; } .fill[data-w='0.82'] { --w: 0.82; } .fill[data-w='0.11'] { --w: 0.11; }
.bar-row .track, .bar-row .fill { display: block; }
.tool-card .tile { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 88%, #fff), color-mix(in srgb, var(--accent) 80%, #000)); color: #fff; box-shadow: 0 8px 16px -10px var(--accent); }
.tool-card.cat-calc .tile { color: #3B2A00; }
.tool-card:hover .tile { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 65%, #000)); transform: scale(1.06); }
.tool-card .tile { transition: transform 200ms; }
.chip[aria-pressed='true'] .muted { color: inherit; opacity: 0.85; }
.section.marquee-sec { padding: var(--s5) 0 0; }
.tool-link .ico { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 88%, #fff), color-mix(in srgb, var(--accent) 80%, #000)); border: 0; color: #fff; }
.tool-link.cat-calc .ico { color: #3B2A00; }
.kv thead th { width: auto; }
.donut-fig { display: flex; align-items: center; gap: var(--s5); margin: var(--s5) 0 0; padding: var(--s4) var(--s5); background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; }
.donut { width: 140px; height: 140px; transform: rotate(-90deg); flex: none; }
.donut circle { fill: none; stroke-width: 18; }
.donut-b { stroke: color-mix(in srgb, var(--accent) 22%, var(--water)); }
.donut-a { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray 600ms cubic-bezier(.2, .8, .2, 1); }
.donut-fig figcaption { line-height: 2; font-size: 1rem; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 8px; vertical-align: -1px; }
.lg-a { background: var(--accent); } .lg-b { background: color-mix(in srgb, var(--accent) 22%, var(--water)); }
@media (max-width: 480px) { .donut-fig { flex-direction: column; align-items: flex-start; } }
/* New tool components */
.chart-fig { margin: var(--s5) 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: var(--s4); }
.growth { width: 100%; height: auto; display: block; }
.g-base { fill: color-mix(in srgb, var(--accent) 45%, var(--water)); } .g-int { fill: var(--accent); }
.g-lbl { font-size: 13px; fill: var(--ink-soft); font-family: var(--font); }
.lg-base { background: color-mix(in srgb, var(--accent) 45%, var(--water)); } .lg-int { background: var(--accent); margin-left: 12px; }
.bmi-scale { width: 100%; max-width: 640px; height: auto; margin: var(--s4) 0 var(--s2); display: block; }
#bmi-marker { transition: x 500ms cubic-bezier(.2, .8, .2, 1); }
.timer-face { position: relative; width: min(320px, 80vw); aspect-ratio: 1; margin: var(--s4) auto; display: grid; place-items: center; }
.timer-face.plain { aspect-ratio: auto; padding: var(--s5) 0; }
.timer-face .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; } .ring-b { stroke: var(--water-deep); } .ring-a { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray 300ms linear; }
.timer-num { font-family: var(--display); font-size: clamp(3rem, 2rem + 4vw, 4.8rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.center { text-align: center; } .center-row { justify-content: center; }
.calc-grid.narrow { max-width: 520px; margin: var(--s4) auto; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr); gap: var(--s5); align-items: start; }
@media (max-width: 860px) { .editor-grid { grid-template-columns: 1fr; } }
.wheel-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
@media (max-width: 860px) { .wheel-grid { grid-template-columns: 1fr; } }
.wheel-wrap { position: relative; max-width: 520px; width: 100%; margin: 0 auto; }
.wheel-wrap canvas { width: 100%; height: auto; display: block; cursor: pointer; border-radius: 50%; box-shadow: var(--shadow-lg); }
.wheel-pointer { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 34px solid var(--ink); z-index: 1; filter: drop-shadow(0 3px 3px rgba(0,0,0,.25)); }
.score-row { display: flex; gap: var(--s4); align-items: center; }
.small-ring { width: 96px; height: 96px; transform: rotate(-90deg); flex: none; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checklist li { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); overflow-wrap: anywhere; }
.checklist li.pass strong { color: var(--ok); } .checklist li.fail { background: var(--bad-tint); border-color: color-mix(in srgb, var(--bad) 35%, var(--rule)); } .checklist li.fail strong { color: var(--bad); }
.outline { list-style: none; padding: 0; margin: 0; font-size: 0.92rem; }
.outline li { padding: 3px 0; overflow-wrap: anywhere; } .outline .lvl-2 { padding-left: 18px; } .outline .lvl-3 { padding-left: 36px; } .outline .lvl-4, .outline .lvl-5, .outline .lvl-6 { padding-left: 54px; color: var(--ink-soft); }

/* ---------- v1.3: trending tools (recorders, OCR, invoice, typing, fancy text, barcodes) ---------- */
.rec-panel { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s4); padding: var(--s3) var(--s4); border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); }
.rec-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--rule-strong); flex: none; }
.rec-dot.live { background: #E03131; box-shadow: 0 0 0 0 rgba(224, 49, 49, .55); animation: rec-pulse 1.4s ease-out infinite; }
@keyframes rec-pulse { to { box-shadow: 0 0 0 14px rgba(224, 49, 49, 0); } }
.timer-num.small-num { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem); line-height: 1; }
.level-meter { width: 100%; height: 120px; display: block; border-radius: 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--c-media) 8%, var(--surface)), var(--surface)); border: 1px solid var(--rule); }
#sr-video { width: 100%; max-height: 520px; border-radius: 12px; background: #0E1B2E; display: block; }
.audio-result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 1.4fr) auto; gap: var(--s3); align-items: center; }
.audio-result audio { width: 100%; }
@media (max-width: 700px) { .audio-result { grid-template-columns: 1fr; } }
.ocr-preview { max-width: 100%; max-height: 520px; height: auto; display: block; }
textarea.tall { min-height: 320px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); align-items: start; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
fieldset.box { border: 1px solid var(--rule); border-radius: 14px; padding: var(--s4) var(--s5) var(--s3); margin: 0; background: var(--surface); min-width: 0; }
fieldset.box legend { font-weight: 800; padding: 0 6px; }
.color-field { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; min-height: 44px; }
.color-field input[type=color] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); }
.items-table { table-layout: fixed; min-width: 640px; }
.items-table th:nth-child(1) { width: auto; } .items-table th:nth-child(2) { width: 72px; } .items-table th:nth-child(3) { width: 120px; } .items-table th:nth-child(4) { width: 76px; } .items-table th:nth-child(5) { width: 120px; } .items-table th:nth-child(6) { width: 52px; }
.items-table td { padding: 6px; vertical-align: middle; }
.items-table input { width: 100%; min-height: 40px; }
.items-table .num, .totals .num { text-align: right; font-variant-numeric: tabular-nums; }
.totals { width: 100%; }
.totals th { font-weight: 500; color: var(--ink-soft); text-align: left; }
.totals tr.grand th, .totals tr.grand td { font-weight: 800; font-size: 1.15rem; color: var(--ink); border-top: 2px solid var(--accent); padding-top: 10px; }
.typing-text { font: 500 1.2rem/1.9 var(--mono); padding: var(--s4) var(--s5); border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); max-height: 11.5em; overflow: auto; margin: var(--s4) 0; user-select: none; }
.typing-text span.ok { color: var(--ok); }
.typing-text span.bad { color: var(--bad); background: var(--bad-tint); border-radius: 3px; text-decoration: underline; }
.typing-text span.cur { box-shadow: inset 0 -3px 0 var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
#tt-in { font-family: var(--mono); }
.fancy-list { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: 8px; }
.fancy-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); transition: border-color .15s, transform .15s; }
.fancy-row:hover { border-color: var(--accent); transform: translateY(-1px); }
.fancy-label { font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); }
.fancy-out { font-size: 1.15rem; overflow-wrap: anywhere; }
@media (max-width: 600px) { .fancy-row { grid-template-columns: minmax(0, 1fr) auto; } .fancy-label { grid-column: 1 / -1; } }
.barcode-preview { background: #fff; border: 1px solid var(--rule); border-radius: var(--r-panel); padding: var(--s5); display: grid; place-items: center; min-height: 180px; overflow-x: auto; }
.barcode-preview img { max-width: 100%; height: auto; image-rendering: pixelated; }
.rn-out { text-align: center; padding: var(--s5); border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface)); border: 1px solid var(--rule); overflow-wrap: anywhere; max-height: 14em; overflow: auto; }
@media (prefers-reduced-motion: reduce) { .rec-dot.live { animation: none; } .fancy-row:hover { transform: none; } }

/* Date and time pickers: same look as other fields; native calendar button kept, just tidied. */
input[type='date'], input[type='time'], input[type='datetime-local'], input[type='month'] { font-variant-numeric: tabular-nums; line-height: 1.4; }
input[type='date']::-webkit-calendar-picker-indicator, input[type='time']::-webkit-calendar-picker-indicator, input[type='datetime-local']::-webkit-calendar-picker-indicator, input[type='month']::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.7; padding: 4px; border-radius: 6px; }
input[type='date']::-webkit-calendar-picker-indicator:hover, input[type='time']::-webkit-calendar-picker-indicator:hover, input[type='datetime-local']::-webkit-calendar-picker-indicator:hover, input[type='month']::-webkit-calendar-picker-indicator:hover { opacity: 1; background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* Visible file pickers (e.g. invoice logo): match the button style instead of the browser default. */
.field input[type='file'] { width: 100%; font: 400 0.95rem var(--font); color: var(--ink-soft); padding: 6px; border: 1px dashed var(--rule-strong); border-radius: var(--r-control); background: var(--surface); }
.field input[type='file']::file-selector-button { font: 600 0.9rem var(--font); margin-right: 12px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--rule-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.field input[type='file']::file-selector-button:hover { border-color: var(--accent); }

/* Kickers: tint toward the text colour so every category colour passes WCAG AA contrast (light and dark). */
.insight-card .body .kicker, .page-head .kicker-line { color: color-mix(in srgb, var(--accent) 55%, var(--ink)); }
.typing-text { height: 9.6em; }

/* Category grid for 7 toolboxes: 4 + 3 on desktop (no orphan card), last card full width on tablets. */
@media (min-width: 901px) {
  .cat-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .cat-grid > * { grid-column: span 3; }
  .cat-grid > *:nth-child(n+5) { grid-column: span 4; }
}
@media (min-width: 561px) and (max-width: 900px) { .cat-grid > *:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* =====================================================================
   v2 STAGE: identity for every inner page.
   One bold move: a full-width stage in the category colour (it matches the share images),
   with the workbench rising out of it. Everything below stays calm and readable.
   ===================================================================== */
:root { --stage-a: #2747D6; --stage-b: #7048E8; --stage-ink: #FFFFFF; --stage-soft: rgba(255, 255, 255, 0.88); --stage-glass: rgba(255, 255, 255, 0.16); --stage-line: rgba(255, 255, 255, 0.3); }
.cat-pdf { --stage-a: #B8235A; --stage-b: #EC5C93; }
.cat-image { --stage-a: #B93E0A; --stage-b: #FF8A3D; }
.cat-media { --stage-a: #A61E1E; --stage-b: #F25C5C; }
.cat-text { --stage-a: #1F7332; --stage-b: #44C15C; }
.cat-seo { --stage-a: #0A6A7B; --stage-b: #2BC0D6; }
.cat-developer { --stage-a: #5534BE; --stage-b: #8C6BFA; }
.cat-calc { --stage-a: #F2A200; --stage-b: #FFD84D; --stage-ink: #2B1D00; --stage-soft: rgba(43, 29, 0, 0.82); --stage-glass: rgba(255, 255, 255, 0.42); --stage-line: rgba(43, 29, 0, 0.16); }

.stage { position: relative; overflow: hidden; color: var(--stage-ink); isolation: isolate;
  background: radial-gradient(640px 420px at 86% 18%, rgba(255, 255, 255, 0.24), transparent 62%), radial-gradient(520px 360px at 4% 120%, rgba(255, 255, 255, 0.14), transparent 70%), linear-gradient(118deg, var(--stage-a) 0%, var(--stage-b) 100%); }
.stage::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.3) 1.3px, transparent 1.6px); background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 80%); mask-image: linear-gradient(100deg, transparent 35%, #000 80%); }
.cat-calc .stage::before { background-image: radial-gradient(rgba(43, 29, 0, 0.16) 1.3px, transparent 1.6px); }
.stage-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s7); align-items: center; padding-top: var(--s6); padding-bottom: var(--s8); }
.stage-tool .stage-inner { padding-bottom: calc(var(--s9) + var(--s5)); }
.stage-inner.no-emblem { grid-template-columns: minmax(0, 1fr); }
.stage h1 { color: inherit; font-size: clamp(2.3rem, 1.3rem + 3.6vw, 4.2rem); line-height: 1.02; letter-spacing: -0.04em; max-width: 15ch; margin: 0 0 var(--s4); }
.stage-page h1 { max-width: 20ch; }
.stage .lede { color: var(--stage-soft); font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.24rem); line-height: 1.55; max-width: 52ch; margin: 0; }
.stage .lede a { color: inherit; text-decoration-color: currentColor; }
.stage .breadcrumbs { color: var(--stage-soft); margin-bottom: var(--s5); }
.stage .breadcrumbs a { color: var(--stage-soft); text-decoration-color: transparent; }
.stage .breadcrumbs a:hover { color: var(--stage-ink); text-decoration-color: currentColor; }
.stage .breadcrumbs li:not(:last-child)::after { color: currentColor; opacity: 0.55; }
.stage a:focus-visible, .stage button:focus-visible, .stage input:focus-visible { outline-color: var(--stage-ink); }
.stage-chips { list-style: none; padding: 0; margin: var(--s5) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.stage-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 7px; border-radius: 999px; background: var(--stage-glass); border: 1px solid var(--stage-line); font-weight: 600; font-size: 0.92rem; line-height: 1.3; }
.stage-chips svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--stage-ink); color: var(--stage-a); stroke-width: 3; flex: none; }

/* Emblem: the tilted white tile from the share images, with satellites */
.emblem { position: relative; width: 300px; height: 260px; flex: none; margin-right: var(--s4); }
.emblem-back, .emblem-tile, .emblem-pic { position: absolute; border-radius: 52px; }
.emblem-back { inset: 18px 22px 30px 46px; background: var(--stage-glass); border: 1px solid var(--stage-line); transform: rotate(9deg); }
.emblem-tile { inset: 22px 46px 26px 28px; background: #fff; color: var(--stage-a); display: grid; place-items: center; transform: rotate(-6deg);
  box-shadow: 0 34px 60px -24px rgba(10, 16, 40, 0.55), inset 0 -6px 0 rgba(10, 16, 40, 0.06); }
.cat-calc .emblem-tile { color: #C27C00; }
.emblem-tile svg { width: 46%; height: 46%; stroke-width: 1.6; }
.emblem-sat { position: absolute; width: 54px; height: 54px; border-radius: 18px; background: #fff; color: var(--stage-a); display: grid; place-items: center; box-shadow: 0 14px 26px -12px rgba(10, 16, 40, 0.5); }
.cat-calc .emblem-sat { color: #C27C00; }
.emblem-sat svg { width: 26px; height: 26px; stroke-width: 2.2; }
.emblem-sat.s1 { top: 0; right: 8px; transform: rotate(8deg); }
.emblem-sat.s2 { bottom: 4px; left: 0; transform: rotate(-10deg); }
.emblem-sat.s3 { bottom: 34px; right: -6px; width: 44px; height: 44px; border-radius: 50%; background: var(--signal); color: #2B1D00; }
.emblem-sat.s3 svg { width: 22px; height: 22px; stroke-width: 3; }
.emblem-frame { width: 380px; height: 250px; }
.emblem-frame .emblem-back { inset: 14px 6px 6px 30px; border-radius: 30px; }
.emblem-pic { inset: 6px 30px 20px 8px; border-radius: 26px; overflow: hidden; background: #fff; transform: rotate(-4deg); box-shadow: 0 34px 60px -24px rgba(10, 16, 40, 0.55); border: 6px solid #fff; }
.emblem-pic img, .emblem-pic svg { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 20px; }
/* The one orchestrated moment: the emblem settles in when the page opens. */
@media (prefers-reduced-motion: no-preference) {
  .emblem-tile, .emblem-pic { animation: emblem-in 700ms cubic-bezier(0.2, 0.9, 0.25, 1.15) both; }
  .emblem-back { animation: emblem-back-in 800ms 80ms ease-out both; }
  .emblem-sat { animation: sat-in 500ms cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
  .emblem-sat.s1 { animation-delay: 320ms; } .emblem-sat.s2 { animation-delay: 420ms; } .emblem-sat.s3 { animation-delay: 520ms; }
}
@keyframes emblem-in { from { opacity: 0; transform: rotate(-16deg) scale(0.82) translateY(18px); } }
@keyframes emblem-back-in { from { opacity: 0; transform: rotate(0deg) scale(0.9); } }
@keyframes sat-in { from { opacity: 0; transform: scale(0.4); } }
@media (max-width: 900px) {
  .stage-inner { grid-template-columns: minmax(0, 1fr); gap: var(--s5); padding-top: var(--s5); padding-bottom: var(--s7); }
  .stage-tool .stage-inner { padding-bottom: calc(var(--s8) + var(--s4)); }
  .emblem { display: none; }
}

/* Workbench rising out of the stage, on a maker's cutting mat */
.rise { position: relative; z-index: 2; margin-top: calc((var(--s9) - var(--s2)) * -1); }
@media (max-width: 900px) { .rise { margin-top: calc(var(--s8) * -1); } }
.rise .tool-main { padding-bottom: var(--s6); }
.rise .bench { border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--rule)); border-radius: 24px; box-shadow: 0 40px 70px -40px rgba(14, 27, 46, 0.55), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  background-color: var(--surface);
  background-image: linear-gradient(color-mix(in srgb, var(--accent) 7%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--accent) 7%, transparent) 1px, transparent 1px);
  background-size: 28px 28px; background-position: -1px -1px; overflow: hidden; }
.rise .bench::before { content: ''; display: block; height: 16px; border-radius: 0; border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, var(--rule));
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, transparent) 0 2px, transparent 2px 70px) 0 100% / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 38%, transparent) 0 1px, transparent 1px 14px) 0 100% / 100% 6px no-repeat,
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface)); }
.rise .bench-body { padding: var(--s6); }
@media (max-width: 600px) { .rise .bench-body { padding: var(--s4); } }
.rise .proof { background-color: color-mix(in srgb, var(--accent) 5%, var(--surface)); border-top-color: color-mix(in srgb, var(--accent) 18%, var(--rule)); border-radius: 0; }

/* Drop zone: a target, not a grey box */
.drop { gap: var(--s3); padding: var(--s7) var(--s5); border: 2px dashed color-mix(in srgb, var(--accent) 50%, var(--rule)); border-radius: 20px;
  background: radial-gradient(420px 200px at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), color-mix(in srgb, var(--surface) 92%, transparent); }
.drop:hover, .drop.over { border-color: var(--accent); border-style: solid; background: radial-gradient(420px 220px at 50% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%), var(--surface); }
.drop .drop-ico { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--stage-b), var(--stage-a)); box-shadow: 0 16px 30px -14px var(--stage-a); transition: transform 200ms; }
.cat-calc .drop .drop-ico { color: #2B1D00; }
.drop .drop-ico svg { width: 36px; height: 36px; color: inherit; stroke-width: 2.2; }
.drop:hover .drop-ico, .drop.over .drop-ico { transform: translateY(-4px); }
.drop .drop-title { font-family: var(--display); font-weight: 800; font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem); letter-spacing: -0.02em; }
.drop .drop-btn { pointer-events: none; min-height: 46px; padding: 0 26px; font-size: 1rem; background: var(--stage-a); border-color: var(--stage-a); color: var(--stage-ink); border-radius: 999px; }
.drop.compact { padding: var(--s5); }
.drop.compact .drop-ico { width: 56px; height: 56px; border-radius: 18px; }
.drop.compact .drop-ico svg { width: 28px; height: 28px; }

/* ---------- Below the tool ---------- */
.docs { padding-top: var(--s5); padding-bottom: var(--s8); }
.docs h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.1rem); }

/* Infographic: how the file travels */
.journey { position: relative; margin: 0 0 var(--s8); padding: var(--s6) var(--s6) var(--s5); border-radius: 26px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--rule)); }
.journey-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); position: relative; }
.journey-steps::before { content: ''; position: absolute; top: 34px; left: 16%; right: 16%; height: 0; border-top: 3px dashed color-mix(in srgb, var(--accent) 55%, transparent); }
.journey-steps li { position: relative; display: grid; justify-items: center; text-align: center; gap: 4px; }
.journey-steps .j-ico { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; background: var(--surface); color: var(--accent); border: 2px solid color-mix(in srgb, var(--accent) 35%, var(--rule)); margin-bottom: var(--s2); box-shadow: 0 10px 22px -16px var(--accent); }
.journey-steps li:nth-child(2) .j-ico { background: linear-gradient(135deg, var(--stage-b), var(--stage-a)); color: #fff; border-color: transparent; width: 76px; height: 76px; margin-top: -4px; }
.cat-calc .journey-steps li:nth-child(2) .j-ico { color: #2B1D00; }
.journey-steps .j-ico svg { width: 32px; height: 32px; stroke-width: 2; }
.journey-steps b { font-family: var(--display); font-size: 1.08rem; }
.journey-steps span:last-child { font-size: 0.9rem; color: var(--ink-soft); }
.journey-cloud { margin: var(--s5) auto 0; width: fit-content; display: flex; align-items: center; gap: var(--s3); padding: 8px 18px 8px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); font-weight: 600; font-size: 0.95rem; }
.journey-cloud svg { width: 30px; height: 30px; padding: 5px; border-radius: 50%; background: var(--bad-tint); color: var(--bad); stroke-width: 2.2; flex: none; }
.journey-cloud a { font-weight: 400; color: var(--ink-soft); }
@media (max-width: 700px) {
  .journey { padding: var(--s5) var(--s4); }
  .journey-steps { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .journey-steps::before { top: 30px; bottom: 30px; left: 33px; right: auto; height: auto; border-top: 0; border-left: 3px dashed color-mix(in srgb, var(--accent) 55%, transparent); }
  .journey-steps li { grid-template-columns: 68px minmax(0, 1fr); justify-items: start; text-align: left; column-gap: var(--s4); row-gap: 0; }
  .journey-steps .j-ico, .journey-steps li:nth-child(2) .j-ico { grid-row: span 2; margin: 0; width: 68px; height: 68px; }
  .journey-steps b { align-self: end; }
  .journey-cloud { border-radius: 16px; }
}

/* Stepper: the steps are a real sequence, so they are numbered */
.howto { margin: 0 0 var(--s8); }
.stepper { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s4); counter-reset: st; }
.stepper li { counter-increment: st; position: relative; padding: var(--s5); padding-top: calc(var(--s5) + 56px); border-radius: 22px; background: var(--surface); border: 1px solid var(--rule); }
.stepper li::before { content: counter(st); position: absolute; top: var(--s5); left: var(--s5); font-family: var(--display); font-weight: 800; font-size: 3.4rem; line-height: 1; letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--stage-b), var(--stage-a)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stepper li:not(:last-child)::after { content: ''; position: absolute; top: calc(var(--s5) + 26px); left: calc(var(--s5) + 58px); right: var(--s5); border-top: 2px solid color-mix(in srgb, var(--accent) 22%, var(--rule)); }
.stepper p { margin: 0; font-size: 1.02rem; }

/* About + side */
.docs-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s8); align-items: start; margin-bottom: var(--s8); }
@media (max-width: 960px) { .docs-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s6); } }
.about > p:first-of-type { font-size: 1.14rem; color: var(--ink); }
.about p, .about li { color: color-mix(in srgb, var(--ink) 88%, var(--ink-soft)); }
.good-to-know { margin-top: var(--s6); padding: var(--s5) var(--s5) var(--s3); border-radius: 20px; background: var(--warn-tint); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.good-to-know h2 { display: flex; align-items: center; gap: var(--s3); font-size: 1.3rem !important; margin: 0 0 var(--s3); }
.good-to-know h2 svg { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--warn); color: var(--warn-tint); flex: none; }
.good-to-know ul { margin: 0; padding-left: 1.2em; }
.docs-side { display: grid; gap: var(--s4); position: sticky; top: var(--s5); }
@media (max-width: 960px) { .docs-side { position: static; } }
.privacy-card { position: relative; overflow: hidden; padding: var(--s5); border-radius: 22px; color: #EAF0FF; background: radial-gradient(260px 160px at 100% 0%, color-mix(in srgb, var(--stage-b) 55%, transparent), transparent 70%), #0E1B2E; }
.privacy-card > svg { width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.12); color: #fff; margin-bottom: var(--s3); }
.privacy-card h2 { color: #fff; font-size: 1.3rem !important; margin: 0 0 var(--s2); }
.privacy-card p { color: #C9D4EA; font-size: 0.95rem; }
.privacy-card a { color: #fff; font-weight: 600; }
.read-card { padding: var(--s4); border-radius: 22px; background: var(--surface); border: 1px solid var(--rule); }
.read-card h2 { font-size: 1.15rem !important; margin: 0 0 var(--s3); }
.read-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.read-card a { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: var(--s3); align-items: center; text-decoration: none; font-weight: 600; font-size: 0.92rem; line-height: 1.35; }
.read-card img { width: 84px; height: 44px; object-fit: cover; border-radius: 10px; }
.read-card a:hover span { color: var(--accent); }

/* FAQ */
.faq-block { margin: 0 0 var(--s8); }
.faq-block .faq { display: grid; gap: var(--s3); margin-top: var(--s5); max-width: 900px; }
.faq-block .faq details { border: 1px solid var(--rule); border-radius: 18px; background: var(--surface); padding: 0 var(--s5); transition: border-color var(--t), box-shadow var(--t); }
.faq-block .faq details[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--rule)); box-shadow: 0 16px 30px -24px var(--accent); }
.faq-block .faq summary { padding: var(--s4) 0; font-size: 1.05rem; align-items: center; }
.faq-block .faq summary::after { content: ''; width: 30px; height: 30px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  -webkit-mask: none; background-image: linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent)); background-size: 12px 2px, 2px 12px; background-position: center; background-repeat: no-repeat; transition: transform 200ms; }
.faq-block .faq details[open] summary::after { transform: rotate(45deg); }
.faq-block .faq details > div { color: var(--ink-soft); }

/* Related tools */
.more-tools { margin: 0 0 var(--s6); }
.more-tools .tool-grid { margin-top: var(--s5); grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.docs > .article-meta { border-top: 1px solid var(--rule); padding-top: var(--s4); }

/* Primary buttons take the page's category colour (darker end of the stage gradient keeps text contrast ≥ 4.5:1). */
main[class*='cat-'] .btn:not(.btn-secondary):not(.btn-quiet) { background: linear-gradient(135deg, color-mix(in srgb, var(--stage-a) 80%, var(--stage-b)), var(--stage-a)); color: var(--stage-ink); box-shadow: 0 10px 20px -10px var(--stage-a); }
main[class*='cat-'] .btn:not(.btn-secondary):not(.btn-quiet):hover { background: linear-gradient(135deg, var(--stage-a), color-mix(in srgb, var(--stage-a) 80%, #000)); color: var(--stage-ink); }
main.cat-calc .btn:not(.btn-secondary):not(.btn-quiet) { background: linear-gradient(135deg, #FFD43B, #F2A200); }
main.cat-calc .btn:not(.btn-secondary):not(.btn-quiet):hover { background: linear-gradient(135deg, #FCC419, #E08E00); }
.faq-block .faq details[open] summary::after { content: ''; }

/* ---------- Stage extras ---------- */
.stage-meta { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s5) 0 0; padding: 0; }
.stage-meta span { padding: 5px 14px; border-radius: 999px; background: var(--stage-glass); border: 1px solid var(--stage-line); font-weight: 600; font-size: 0.9rem; }

/* ---------- Category pages ---------- */
.cat-body { padding-top: var(--s6); }
.cat-guide { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s8); margin-top: var(--s8); align-items: start; }
@media (max-width: 960px) { .cat-guide { grid-template-columns: minmax(0, 1fr); gap: var(--s6); } }
.cat-guide .prose > p:first-child { font-size: 1.14rem; }
.cat-guide .prose ul { list-style: none; padding: 0; display: grid; gap: var(--s3); }
.cat-guide .prose li { margin: 0; padding: var(--s3) var(--s4) var(--s3) var(--s5); border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 14px 14px 0; }
.other-boxes { padding: var(--s5); border-radius: 24px; background: var(--surface); border: 1px solid var(--rule); position: sticky; top: var(--s5); }
.other-boxes h2 { font-size: 1.25rem; margin-bottom: var(--s4); }
.other-boxes ul { list-style: none; padding: 0; margin: 0 0 var(--s4); display: grid; gap: var(--s2); }
.box-link { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s3); align-items: center; padding: var(--s2); border-radius: 14px; text-decoration: none; font-weight: 700; transition: background var(--t); }
.box-link:hover { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--ink); }
.box-link .ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--stage-b), var(--stage-a)); }
.box-link.cat-calc .ico { color: #2B1D00; }
.box-link .ico svg { width: 22px; height: 22px; }
.box-link small { display: block; font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- Insights magazine ---------- */
.mag { padding-top: var(--s6); }
.feature-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; border-radius: 28px; overflow: hidden; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); box-shadow: var(--shadow-md); margin-bottom: var(--s8); transition: box-shadow 200ms, transform 200ms; }
.feature-card:hover { color: var(--ink); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.feature-card img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1200 / 630; }
.feature-card .body { display: flex; flex-direction: column; justify-content: center; gap: var(--s3); padding: var(--s7) var(--s6); }
.feature-card .kicker { font-weight: 700; color: color-mix(in srgb, var(--accent) 60%, var(--ink)); }
.feature-card .t { font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance; }
.feature-card .d { color: var(--ink-soft); font-size: 1.05rem; }
.feature-card .go { margin-top: var(--s2); font-weight: 700; color: color-mix(in srgb, var(--accent) 70%, var(--ink)); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 860px) { .feature-card { grid-template-columns: minmax(0, 1fr); } .feature-card .body { padding: var(--s5); } }
.mag-h { margin-bottom: var(--s5); }

/* ---------- Reading layout (articles and policies) ---------- */
.read-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s8); align-items: start; padding-top: var(--s7); }
.read-grid.single { grid-template-columns: minmax(0, 760px); justify-content: center; }
@media (max-width: 1000px) { .read-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s5); padding-top: var(--s6); } .read-side { display: none; } }
.read-grid .prose { max-width: 68ch; font-size: 1.07rem; line-height: 1.7; }
.read-grid .prose h2 { font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.95rem); margin-top: var(--s8); scroll-margin-top: var(--s5); }
.read-grid .prose h2::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--stage-a), var(--stage-b)); margin-bottom: var(--s3); }
.read-grid .prose table { display: table; border-collapse: separate; border-spacing: 0; border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; background: var(--surface); font-size: 0.95rem; }
@media (max-width: 700px) { .read-grid .prose table { display: block; overflow-x: auto; } }
.read-grid .prose thead th { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); font-weight: 700; }
.read-grid .prose th, .read-grid .prose td { padding: 12px 14px; }
.read-grid .prose tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--accent) 3%, var(--surface)); }
.read-grid .prose tbody tr:last-child td { border-bottom: 0; }
.read-grid .prose .callout { border: 0; border-radius: 18px; background: var(--warn-tint); padding: var(--s4) var(--s5); font-size: 0.98rem; }
.read-grid .prose blockquote { margin: var(--s6) 0; padding: 0 0 0 var(--s5); border-left: 5px solid var(--accent); font-family: var(--display); font-size: 1.35rem; line-height: 1.35; }
.read-side { position: sticky; top: var(--s5); display: grid; gap: var(--s4); }
.toc-side { padding: var(--s5); border-radius: 22px; background: var(--surface); border: 1px solid var(--rule); margin: 0; }
.toc-side h2 { font-size: 1.05rem; margin: 0 0 var(--s3); }
.toc-side ol { list-style: none; margin: 0; padding: 0; counter-reset: tc; display: grid; gap: 2px; max-height: 60vh; overflow: auto; }
.toc-side li { counter-increment: tc; }
.toc-side a { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 6px; padding: 6px 8px; border-radius: 10px; text-decoration: none; font-size: 0.92rem; line-height: 1.35; color: var(--ink-soft); }
.toc-side a::before { content: counter(tc); font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.cat-calc .toc-side a::before { color: #A26100; }
.toc-side a:hover { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--ink); }
.toc-inline { display: none; }
@media (max-width: 1000px) {
  .toc-inline { display: block; margin: 0 0 var(--s5); padding: 0 var(--s5); border: 1px solid var(--rule); border-radius: 18px; background: var(--surface); }
  .toc-inline summary { cursor: pointer; padding: var(--s4) 0; font-weight: 700; }
  .toc-inline ol { margin: 0 0 var(--s4); }
}
.side-tools { padding: var(--s4); border-radius: 22px; background: var(--surface); border: 1px solid var(--rule); }
.side-tools h2 { font-size: 1.05rem; margin: var(--s2) var(--s2) var(--s2); }
.side-tools ul { list-style: none; margin: 0; padding: 0; }

.article .key-takeaways { position: relative; border: 0; border-radius: 24px; padding: var(--s5) var(--s6); margin: 0 0 var(--s6);
  background: linear-gradient(135deg, color-mix(in srgb, var(--stage-b) 14%, var(--surface)), color-mix(in srgb, var(--stage-a) 8%, var(--surface))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.article .key-takeaways h2 { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s4); font-size: 1.25rem; }
.article .key-takeaways h2::before { display: none; }
.article .key-takeaways h2 svg { width: 34px; height: 34px; padding: 7px; border-radius: 11px; background: linear-gradient(135deg, var(--stage-b), var(--stage-a)); color: var(--stage-ink); flex: none; }
.article .key-takeaways ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.article .key-takeaways li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--s3); margin: 0; font-size: 1.02rem; }
.article .key-takeaways li svg { width: 24px; height: 24px; padding: 4px; margin-top: 2px; border-radius: 50%; background: var(--surface); color: var(--accent); stroke-width: 3; }
.cat-calc .article .key-takeaways li svg { color: #A26100; }
.sources { margin-top: var(--s8); padding: var(--s5); border-radius: 22px; background: var(--surface); border: 1px solid var(--rule); }
.read-grid .sources h2 { margin-top: 0; font-size: 1.25rem; }
.read-grid .sources h2::before { display: none; }
.sources ol { margin: 0; padding-left: 1.4em; display: grid; gap: var(--s2); font-size: 0.95rem; }
.sources li span { display: block; font-size: 0.82rem; color: var(--ink-soft); }
.author-box { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--s4); align-items: start; margin-top: var(--s6); padding: var(--s5); border-radius: 22px; background: #0E1B2E; color: #DCE5F5; }
.author-box > svg { width: 56px; height: 56px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.1); color: #fff; }
.author-box strong { color: #fff; display: block; margin-bottom: 4px; }
.author-box p { margin: 0; font-size: 0.95rem; color: #C5D1E6; }
.author-box a { color: #fff; }
.read-next { padding: var(--s8) 0 var(--s7); }
.read-next h2 { margin-bottom: var(--s5); }

/* Reading progress: driven by scrolling (no script), only where supported */
.read-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .read-progress { display: block; position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 60; transform-origin: 0 50%; background: linear-gradient(90deg, var(--stage-a), var(--stage-b)); animation: read-grow linear both; animation-timeline: scroll(root); }
  @keyframes read-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* Policies: comfortable reading with a contents rail */
.policy > p:first-child { font-size: 1.12rem; }
.policy .callout { background: linear-gradient(135deg, color-mix(in srgb, var(--stage-b) 12%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--rule)); border-radius: 20px; }

/* Plain info pages (about, contact, pricing, FAQ) */
.page-body.prose { max-width: 760px; margin-left: auto; margin-right: auto; padding-top: var(--s7); font-size: 1.06rem; line-height: 1.7; }
.page-body.prose h2::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--stage-a), var(--stage-b)); margin-bottom: var(--s3); }
.page-body.faq-block { padding-top: var(--s7); }
.page-body.faq-block .faq { margin: 0 auto; }
.stage-page h1 { font-size: clamp(2.1rem, 1.3rem + 2.5vw, 3.4rem); line-height: 1.06; max-width: 22ch; }
/* Dark mode: restore the dark page colour (an earlier light-theme override set --paper after the dark block). */
@media (prefers-color-scheme: dark) { :root { --paper: #0B1422; } }
.read-grid.single { grid-template-columns: minmax(0, min(760px, 100%)); }
.read-grid > *, .docs-grid > *, .cat-guide > * { min-width: 0; }
.read-grid > .page-body.prose { margin-left: 0; margin-right: 0; }
.prose .table-wrap { max-width: 100%; }
.feature-card.cat-calc .go, .feature-card.cat-calc .kicker, .insight-card.cat-calc .kicker { color: #8A5A00; }

/* =====================================================================
   HOME HERO v2: task search + the "never leaves your device" scene
   ===================================================================== */
.hero-v2 { padding: var(--s7) 0 var(--s8); }
.hero-v2 .blob { animation: none; }
.hero-v2 .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: var(--s6); align-items: center; }
.hero-v2 h1 { font-size: clamp(2.6rem, 1.5rem + 4vw, 4.6rem); line-height: 0.98; letter-spacing: -0.045em; max-width: 12.5ch; margin: 0 0 var(--s5); }
.hero-v2 .lede { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.28rem); max-width: 46ch; margin-bottom: var(--s6); }

.hero-search { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s2); padding: 8px 8px 8px 20px; max-width: 600px;
  background: var(--surface); border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--brand) 22%, var(--rule)); box-shadow: 0 22px 48px -22px rgba(31, 52, 120, 0.45), 0 0 0 6px color-mix(in srgb, var(--brand) 7%, transparent);
  transition: border-color var(--t), box-shadow var(--t); }
.hero-search:focus-within { border-color: var(--brand); box-shadow: 0 22px 48px -22px rgba(31, 52, 120, 0.5), 0 0 0 6px color-mix(in srgb, var(--brand) 16%, transparent); }
.hero-search > svg { width: 22px; height: 22px; color: var(--brand); }
.hero-search input { border: 0; background: transparent; min-height: 52px; padding: 0 6px; font-size: 1.08rem; box-shadow: none; width: 100%; color: var(--ink); }
.hero-search input:focus { outline: none; }
.hero-search input::-webkit-search-cancel-button { cursor: pointer; }
.hero-search .btn { min-height: 52px; padding: 0 24px; border-radius: 999px; font-size: 1rem; }
.hs-list { position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 30; list-style: none; margin: 0; padding: 8px; border-radius: 22px; background: var(--surface); border: 1px solid var(--rule); box-shadow: 0 30px 60px -24px rgba(14, 27, 46, 0.45); }
.hs-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s3); align-items: center; padding: 8px 10px; border-radius: 14px; cursor: pointer; }
.hs-list li[aria-selected='true'], .hs-list li:hover { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.hs-list .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--stage-b), var(--stage-a)); }
.hs-list .cat-calc .ico, .hs-list li.cat-calc .ico { color: #2B1D00; }
.hs-list .ico svg { width: 22px; height: 22px; }
.hs-list b { display: block; font-weight: 700; line-height: 1.3; }
.hs-list small { display: block; color: var(--ink-soft); font-size: 0.86rem; line-height: 1.35; }
.hs-list li.none { display: block; color: var(--ink-soft); cursor: default; background: none; }
@media (max-width: 560px) {
  .hero-search { grid-template-columns: auto minmax(0, 1fr); border-radius: 24px; padding: 8px 8px 8px 16px; }
  .hero-search .btn { grid-column: 1 / -1; width: 100%; }
}

.hero-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: var(--s5) 0 0; max-width: 620px; }
.hero-quick > span { font-weight: 600; color: var(--ink-soft); margin-right: 2px; }
.hero-quick a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); text-decoration: none; font-weight: 600; font-size: 0.92rem; transition: border-color var(--t), transform var(--t); }
.hero-quick a:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-1px); }
.hero-quick a svg { width: 24px; height: 24px; padding: 5px; border-radius: 8px; color: #fff; background: linear-gradient(135deg, var(--stage-b), var(--stage-a)); }
.hero-quick a.cat-calc svg { color: #2B1D00; }
.hero-v2 .trust-row { margin-top: var(--s6); gap: var(--s3) var(--s5); font-weight: 600; color: var(--ink); }
.hero-v2 .trust-row svg { width: 20px; height: 20px; color: #2F9E44; }

/* The scene */
.hero-scene { width: 100%; height: auto; max-width: 640px; justify-self: end; overflow: visible; }
.hero-scene .hs-t { font-family: var(--font); }
@media (max-width: 900px) { .hero-v2 .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero-scene { justify-self: center; max-width: 520px; margin-top: var(--s4); } }
@media (prefers-reduced-motion: no-preference) {
  .hs-in, .hs-out, .hs-ring, .hs-dot, .hs-x, .hs-blocked, .hs-hub { animation-duration: 7s; animation-iteration-count: infinite; animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1); transform-box: fill-box; transform-origin: center; }
  .hs-in { animation-name: hs-in; }
  .hs-out { animation-name: hs-out; }
  .hs-ring { animation-name: hs-ring; transform-box: view-box; transform-origin: 320px 290px; }
  .hs-dot { animation-name: hs-dot; transform-box: view-box; transform-origin: 0 0; }
  .hs-hub { animation-name: hs-hub; }
  .hs-x { animation-name: hs-x; }
}
@keyframes hs-in { 0% { opacity: 0; transform: translateX(-30px); } 10%, 26% { opacity: 1; transform: none; } 38% { opacity: 0; transform: translateX(150px) scale(0.55); } 100% { opacity: 0; transform: translateX(150px) scale(0.55); } }
@keyframes hs-dot { 0%, 22% { opacity: 0; transform: translateX(0); } 26% { opacity: 1; } 38% { opacity: 1; transform: translateX(114px); } 40%, 62% { opacity: 0; transform: translateX(114px); } 64% { opacity: 1; transform: translateX(114px); } 76% { opacity: 1; transform: translateX(228px); } 78%, 100% { opacity: 0; transform: translateX(228px); } }
@keyframes hs-ring { 0%, 36% { stroke-dasharray: 0 100; } 64% { stroke-dasharray: 100 100; } 92% { stroke-dasharray: 100 100; opacity: 1; } 100% { stroke-dasharray: 100 100; opacity: 0; } }
@keyframes hs-hub { 0%, 36% { transform: scale(1); } 40% { transform: scale(1.06); } 62% { transform: scale(1.03); } 68% { transform: scale(1); } }
@keyframes hs-out { 0%, 64% { opacity: 0; transform: translateX(-120px) scale(0.6); } 76%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes hs-x { 0%, 40% { transform: scale(1); } 46% { transform: scale(1.25); } 52%, 100% { transform: scale(1); } }

/* Trust band: verifiable claims instead of big-number stat cards */
.trust-band { margin-top: calc(var(--s7) * -1); position: relative; z-index: 2; }
.trust-band h2 { font-size: 1.05rem; margin: 0 0 var(--s3); color: var(--ink-soft); font-weight: 700; letter-spacing: 0; }
.trust-band ul { list-style: none; margin: 0; padding: var(--s5); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--surface); border-radius: 26px; border: 1px solid var(--rule); box-shadow: var(--shadow-lg); }
.trust-band li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s3); padding: var(--s2) var(--s5); }
.trust-band li + li { border-left: 1px solid var(--rule); }
.trust-band li > svg { width: 44px; height: 44px; padding: 10px; border-radius: 14px; color: #2F54EB; background: #EDF2FF; }
.trust-band li:nth-child(2) > svg { color: #6741D9; background: #F3F0FF; }
.trust-band li:nth-child(3) > svg { color: #2B8A3E; background: #EBFBEE; }
.trust-band li:nth-child(4) > svg { color: #C2255C; background: #FFF0F6; }
.trust-band b { display: block; font-family: var(--display); font-size: 1.05rem; line-height: 1.25; margin-bottom: 4px; }
.trust-band p { margin: 0 0 6px; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.45; }
.trust-band a { font-size: 0.9rem; font-weight: 600; }
@media (max-width: 1060px) { .trust-band ul { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s4); } .trust-band li:nth-child(3) { border-left: 0; } }
@media (max-width: 620px) { .trust-band { margin-top: calc(var(--s5) * -1); } .trust-band ul { grid-template-columns: minmax(0, 1fr); padding: var(--s4); } .trust-band li { padding: var(--s3) 0; } .trust-band li + li { border-left: 0; border-top: 1px solid var(--rule); } }
@media (prefers-color-scheme: dark) { .trust-band li > svg { background: rgba(255, 255, 255, 0.08) !important; color: #C5D2FF !important; } }

/* ---------- Edit PDF ---------- */
.ep-app { --ep-line: color-mix(in srgb, var(--accent) 18%, var(--rule)); }
.ep-ribbon { position: sticky; top: 0; z-index: 25; margin: 0 calc(var(--s6) * -1); padding: var(--s2) var(--s6); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--ep-line); }
@media (max-width: 600px) { .ep-ribbon { margin: 0 calc(var(--s4) * -1); padding: var(--s2) var(--s4); } }
.ep-toolbar { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: thin; }
.ep-group { display: flex; gap: 2px; padding: 0 6px; border-right: 1px solid var(--ep-line); flex: none; }
.ep-group:first-child { padding-left: 0; }
.ep-group:last-child { border-right: 0; }
.ep-tool { display: grid; justify-items: center; gap: 3px; min-width: 62px; padding: 7px 6px 6px; border-radius: 12px; border: 0; background: transparent; color: var(--ink); font: 600 0.74rem/1.1 var(--font); cursor: pointer; transition: background var(--t), color var(--t); }
.ep-tool svg { width: 22px; height: 22px; }
.ep-tool:hover { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.ep-tool[aria-pressed='true'] { background: linear-gradient(135deg, color-mix(in srgb, var(--stage-a) 80%, var(--stage-b)), var(--stage-a)); color: #fff; box-shadow: 0 8px 16px -10px var(--stage-a); }
.ep-props { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 0 4px; border-top: 1px dashed var(--ep-line); min-height: 50px; }
.ep-prop { display: flex; align-items: center; gap: 6px; }
.ep-prop[hidden] { display: none !important; }
.ep-right { margin-left: auto; }
.ep-props select { min-height: 38px; width: auto; padding: 0 28px 0 10px; border-radius: 10px; font-size: 0.92rem; }
.ep-act { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 38px; min-height: 38px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font: 700 0.92rem var(--font); cursor: pointer; }
.ep-act svg { width: 19px; height: 19px; }
.ep-act:hover:not(:disabled) { border-color: var(--accent); }
.ep-act:disabled { opacity: 0.4; cursor: default; }
.ep-act[aria-pressed='true'] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.ep-act.ep-i { font-style: italic; font-family: Georgia, serif; }
.ep-swatch input { width: 38px; height: 38px; padding: 3px; border-radius: 10px; }
.ep-check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 600; }
.ep-range { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--ink-soft); }
.ep-range input { width: 110px; min-height: 0; }
.ep-find { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0 6px; border-top: 1px dashed var(--ep-line); }
.ep-find input[type='search'], .ep-find input[type='text'] { width: 190px; min-height: 38px; border-radius: 10px; }
.ep-hint { margin: var(--s3) 0; color: var(--ink-soft); min-height: 1.4em; }
.ep-workspace { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: var(--s4); align-items: start; }
@media (max-width: 860px) { .ep-workspace { grid-template-columns: minmax(0, 1fr); } .ep-thumbs { display: none; } }
.ep-thumbs { position: sticky; top: 150px; max-height: calc(100vh - 170px); overflow: auto; padding: var(--s3); border-radius: 18px; background: var(--surface); border: 1px solid var(--rule); }
.ep-thumbs-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s2); }
.ep-thumbs ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.ep-thumb { position: relative; }
.ep-thumb-go { display: grid; gap: 4px; justify-items: center; width: 100%; padding: 6px; border: 1px solid transparent; border-radius: 12px; background: transparent; cursor: pointer; font: 700 0.8rem var(--font); color: var(--ink-soft); }
.ep-thumb-go:hover { border-color: var(--accent); }
.ep-thumb-img { display: block; width: 100%; background: #fff; box-shadow: 0 0 0 1px rgba(14, 27, 46, 0.12), 0 6px 14px -10px rgba(14, 27, 46, 0.5); border-radius: 3px; overflow: hidden; }
.ep-thumb-img canvas { width: 100%; height: 100%; display: block; }
.ep-tbs { display: flex; justify-content: center; gap: 2px; }
.ep-tb { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; }
.ep-tb:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--ink); }
.ep-tb svg { width: 17px; height: 17px; }
.ep-scroll { overflow-x: auto; padding-bottom: var(--s3); }
.ep-pages { display: grid; gap: var(--s5); max-width: 900px; margin: 0 auto; padding: var(--s3) 2px; }
.ep-pages.zoomed { max-width: none; justify-items: center; }
.ep-page { position: relative; width: 100%; background: #fff; border-radius: 4px; box-shadow: 0 14px 34px -18px rgba(14, 27, 46, 0.5), 0 0 0 1px rgba(14, 27, 46, 0.08); overflow: hidden; --k: 1; }
.ep-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.ep-num { position: absolute; right: 10px; bottom: 8px; z-index: 4; font-size: 0.76rem; font-weight: 700; color: #4A5B70; background: rgba(255, 255, 255, 0.9); padding: 1px 8px; border-radius: 999px; pointer-events: none; }
.ep-layer { position: absolute; inset: 0; z-index: 2; touch-action: none; }
.ep-pages:is([data-tool='text'], [data-tool='highlight'], [data-tool='underline'], [data-tool='strike']) .ep-layer { cursor: text; }
.ep-pages:is([data-tool='whiteout'], [data-tool='rect'], [data-tool='ellipse'], [data-tool='line'], [data-tool='arrow'], [data-tool='draw'], [data-tool='link'], [data-tool='stamp'], [data-tool='note']) .ep-layer { cursor: crosshair; }
.ep-pages[data-tool='select'] .ep-obj { cursor: move; }
.ep-pages:not([data-tool='select']) .ep-obj { pointer-events: none; }
.ep-pages[data-tool='text'] .ep-text { pointer-events: auto; cursor: text; }
.ep-obj, .ep-cover { position: absolute; box-sizing: border-box; }
.ep-cover { pointer-events: none; }
.ep-text { font-size: calc(var(--fs) * var(--k) * 1px); line-height: 1.2; white-space: pre; }
.ep-highlight { mix-blend-mode: multiply; opacity: 0.55; }
.ep-whiteout { box-shadow: 0 0 0 1px rgba(14, 27, 46, 0.1); }
.ep-rect, .ep-ellipse { border-style: solid; border-width: calc(var(--bw) * var(--k) * 1px); }
.ep-ellipse { border-radius: 50%; }
.ep-image img { width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; }
:is(.ep-draw, .ep-line, .ep-arrow, .ep-markline) svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ep-stamp { display: grid; justify-items: center; padding: calc(var(--fs) * 0.35 * var(--k) * 1px) calc(var(--fs) * 0.5 * var(--k) * 1px); border: calc(max(1.5, var(--fs) / 9) * var(--k) * 1px) solid; border-radius: 4px; font-family: Helvetica, Arial, sans-serif; line-height: 1; opacity: 0.9; white-space: nowrap; }
.ep-stamp b { font-size: calc(var(--fs) * var(--k) * 1px); letter-spacing: 0.02em; }
.ep-stamp small { font-size: calc(var(--fs) * 0.5 * var(--k) * 1px); margin-top: calc(var(--fs) * 0.1 * var(--k) * 1px); }
.ep-note { display: grid; place-items: center; background: #FFF3BF; border-radius: 6px; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.4); }
.ep-note svg { width: 80%; height: 80%; }
.ep-link { border: 2px dashed #2F54EB; background: rgba(47, 84, 235, 0.08); border-radius: 4px; }
.ep-link-tag { position: absolute; left: 0; bottom: 100%; margin-bottom: 3px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 11px var(--font); color: #fff; background: #2F54EB; padding: 2px 7px; border-radius: 6px; }
.ep-obj.selected { outline: 2px dashed var(--brand); outline-offset: 3px; }
:is(.ep-line, .ep-arrow, .ep-markline, .ep-draw).selected { outline-offset: -2px; }
.ep-handle { position: absolute; right: -9px; bottom: -9px; width: 16px; height: 16px; border-radius: 5px; background: var(--brand); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); cursor: nwse-resize; }
.ep-handle.ep-handle-end { right: auto; bottom: auto; transform: translate(-50%, -50%); border-radius: 50%; cursor: crosshair; }
.ep-run { position: absolute; z-index: 3; padding: 0; min-height: 0; border: 0; border-radius: 3px; background: rgba(47, 84, 235, 0.05); box-shadow: inset 0 0 0 1px rgba(47, 84, 235, 0.3); cursor: text; }
.ep-run:hover, .ep-run:focus-visible { background: rgba(47, 84, 235, 0.15); box-shadow: inset 0 0 0 2px #2F54EB; }
.ep-find-mark { position: absolute; z-index: 3; border-radius: 3px; background: rgba(255, 200, 61, 0.35); box-shadow: 0 0 0 2px #F59F00; pointer-events: none; }
.ep-layer textarea.ep-edit { position: absolute; z-index: 6; resize: none; overflow: hidden; font-size: calc(var(--fs) * var(--k) * 1px); line-height: 1.2; height: auto; min-height: 0; padding: 0 4px; margin: 0 0 0 -4px; border: 0; border-radius: 3px;
  background: rgba(255, 255, 255, 0.94); outline: 2px solid var(--brand); outline-offset: 1px; box-shadow: 0 8px 20px -10px rgba(14, 27, 46, 0.5); white-space: pre; }
.ep-pop { position: absolute; z-index: 8; width: 280px; display: grid; gap: 6px; padding: var(--s3); border-radius: 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--rule); box-shadow: 0 20px 40px -18px rgba(14, 27, 46, 0.6); }
.ep-pop input, .ep-pop textarea { min-height: 38px; font-size: 0.95rem; }
.ep-pop textarea { min-height: 70px; }
.ep-pop-err { margin: 0; color: var(--bad); }
.ep-layer .ep-field { position: absolute; z-index: 4; box-sizing: border-box; margin: 0; padding: 0 3px; min-height: 0; border: 1px solid rgba(47, 84, 235, 0.55); border-radius: 2px; background: rgba(219, 228, 255, 0.55);
  font: calc(var(--fh) * var(--k) * 1px) / 1.1 Helvetica, Arial, sans-serif; color: #0E1B2E; box-shadow: none; }
.ep-layer .ep-field:focus { background: rgba(255, 255, 255, 0.95); outline: 2px solid #2F54EB; }
.ep-layer .ep-field-check { accent-color: #2F54EB; }
.ep-forms { margin-top: var(--s4); padding: var(--s3) var(--s4); border-radius: 14px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); border: 1px solid var(--rule); }
.ep-dialog { width: min(560px, 94vw); border: 0; border-radius: 22px; padding: var(--s5); box-shadow: 0 40px 80px -30px rgba(14, 27, 46, 0.7); background: var(--surface); color: var(--ink); }
.ep-dialog::backdrop { background: rgba(14, 27, 46, 0.5); backdrop-filter: blur(3px); }
.ep-dialog h2 { font-size: 1.4rem; }
.sig-pad { width: 100%; height: 190px; display: block; margin: var(--s3) 0 var(--s2); border-radius: 14px; border: 2px dashed var(--rule-strong); background: #fff; touch-action: none; cursor: crosshair; }
.ep-sig-preview { min-height: 80px; margin: var(--s3) 0 0; padding: var(--s3); border-radius: 14px; background: #fff; border: 1px solid var(--rule); font: italic 600 44px "Segoe Script", "Brush Script MT", "Snell Roundhand", cursive; overflow: hidden; white-space: nowrap; }
.rise .bench { overflow: clip; } /* clip (not hidden) keeps sticky toolbars working inside the workbench */
.ep-tool { min-width: 54px; padding: 7px 4px 6px; }
.ep-group { padding: 0 4px; }

/* =====================================================================
   v1.5 WORKSPACE: clean, calm tool surface (research: iLovePDF, Smallpdf, Adobe Acrobat online,
   Omni Calculator, TinyPNG, Ahrefs). Plain white card, one dominant action, no decorative texture.
   ===================================================================== */
.rise .bench, .tool-main .bench { background: var(--surface); background-image: none; border: 1px solid color-mix(in srgb, var(--accent) 10%, var(--rule)); border-radius: 24px;
  box-shadow: 0 1px 2px rgba(14, 27, 46, 0.05), 0 28px 64px -32px rgba(14, 27, 46, 0.45); }
.rise .bench::before, .tool-main .bench::before { content: none; display: none; }
.proof, .rise .proof { background: color-mix(in srgb, var(--surface) 97%, var(--ink)); background-image: none; border-top: 1px solid var(--rule); border-radius: 0 0 24px 24px; padding: 12px var(--s6); font-size: 0.88rem; animation: none; }
.proof svg { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--ok-tint); color: var(--ok); }
.proof .count { font-family: var(--font); font-weight: 700; color: var(--ok); background: var(--ok-tint); border: 0; border-radius: 999px; padding: 0 9px; }
@media (max-width: 600px) { .proof, .rise .proof { padding: 10px var(--s4); } }

/* Drop zone: button first */
.drop { gap: var(--s3); padding: var(--s8) var(--s5) var(--s7); border: 2px dashed color-mix(in srgb, var(--accent) 32%, var(--rule)); border-radius: 18px;
  background: color-mix(in srgb, var(--accent) 3%, var(--surface)); }
.drop:hover, .drop.over { border-color: color-mix(in srgb, var(--accent) 70%, var(--rule)); border-style: dashed; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.drop .drop-ico { width: 64px; height: 64px; border-radius: 20px; box-shadow: none; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--stage-a); }
.cat-calc .drop .drop-ico { color: #A26100; }
.drop .drop-ico svg { width: 30px; height: 30px; }
.drop .drop-btn { min-height: 56px; padding: 0 36px; font-size: 1.1rem; font-weight: 700; border-radius: 14px; margin-top: var(--s2); }
.drop:hover .drop-btn, .drop.over .drop-btn { transform: translateY(-1px); box-shadow: 0 14px 26px -12px var(--stage-a); }
.drop .drop-title { font-family: var(--font); font-weight: 500; font-size: 1rem; letter-spacing: 0; color: var(--ink-soft); }
.drop .hint { font-size: 0.85rem; }
.drop.compact { padding: var(--s6) var(--s4); }
.drop.compact .drop-btn { min-height: 48px; padding: 0 26px; font-size: 1rem; }

/* ---------- Brand logo (multitool fan, from the brand package; never recoloured) ---------- */
.site-header .brand img { display: block; height: 31px; width: auto; }
@media (max-width: 600px) { .site-header .brand img { height: 28px; } }
.site-footer .brand img { display: block; height: 28px; width: auto; }
.brand-badge { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px rgba(14, 27, 46, 0.08); }
.brand-badge img { width: 30px; height: auto; }
.author-box .brand-badge { width: 56px; height: 56px; border-radius: 16px; }
.author-box .brand-badge img { width: 38px; }
.emblem-tile img { width: 52%; height: auto; }

/* ---------- Arabic edition (/ar/): Arabic typeface and right-to-left fixes ---------- */
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+060C; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+060C; }
:root:lang(ar) { --font: 'IBM Plex Sans Arabic', 'Schibsted Grotesk', system-ui, 'Segoe UI', Tahoma, sans-serif; --display: 'IBM Plex Sans Arabic', 'Bricolage Grotesque', system-ui, 'Segoe UI', Tahoma, sans-serif; }
/* Letter-spacing breaks the joins between Arabic letters. */
:lang(ar) * { letter-spacing: 0 !important; }
:lang(ar) body { line-height: 1.75; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { line-height: 1.35; }
/* Mirror the physical left/right rules used by components that appear on Arabic pages. */
[dir="rtl"] .nav, [dir="rtl"] .nav-toggle, [dir="rtl"] .proof a { margin-left: 0; margin-right: auto; }
[dir="rtl"] .skip-link { left: auto; right: var(--s4); }
[dir="rtl"] .breadcrumbs li:not(:last-child)::after { margin-left: 0; margin-right: 6px; }
[dir="rtl"] .prose ul, [dir="rtl"] .prose ol, [dir="rtl"] .good-to-know ul, [dir="rtl"] .toc ol { padding-left: 0; padding-right: 1.3em; }
[dir="rtl"] .prose th, [dir="rtl"] .prose td, [dir="rtl"] .kv th, [dir="rtl"] .kv td, [dir="rtl"] .totals th { text-align: right; }
[dir="rtl"] .result-card { border-left: 1px solid var(--rule); border-right: 5px solid var(--accent); }
[dir="rtl"] .toc { border-left: 1px solid var(--rule); border-right: 4px solid var(--accent); }
[dir="rtl"] .stepper li::before { left: auto; right: var(--s5); }
[dir="rtl"] .stepper li:not(:last-child)::after { left: var(--s5); right: calc(var(--s5) + 58px); }
[dir="rtl"] .kv .badge { margin-left: 0; margin-right: 8px; }
[dir="rtl"] .lg-int { margin-left: 0; margin-right: 12px; }
[dir="rtl"] .emblem-sat.s2 { left: auto; right: 0; }
@media (max-width: 700px) {
  [dir="rtl"] .journey-steps::before { left: auto; right: 33px; border-left: 0; border-right: 3px dashed color-mix(in srgb, var(--accent) 55%, transparent); }
  [dir="rtl"] .journey-steps li { text-align: right; }
}
/* Formulas, file names and sizes stay left-to-right inside Arabic text. */
[dir="rtl"] .ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
