/* ==========================================================================
   DocEpic design system — loaded after site.css on every page.
   Modern SaaS look (soft #f8fafc canvas, 14–16px cards, micro-shadows, Inter + Plus Jakarta Sans)
   and the two product suites: Image Tools (indigo #6366f1) and Data & Excel Tools (emerald #10b981).

   1. Fonts             2. Tokens & suite themes   3. Typography & base
   4. Header suite tabs 5. Suite landing & homepage strip
   6. Tool workspace (animated dropzone, badges, processing)
   7. Components: card, segmented control, range + value sync, toggle chips,
      skeletons, stat compare, data table & diff colours, crop box
   8. Toasts            9. Motion preferences
   10. Image tools: option controls, result report, before/after slider
   11. Image edit tools: live preview, resize, rotate, border and crop controls
   12. Watermark, filters, blur regions and passport photos
   13. Data & Excel tools: preview toolbar, column chips, result stats
   ========================================================================== */

/* 1. Fonts ------------------------------------------------------------------ */
/* Variable fonts, self-hosted from @fontsource-variable (SIL Open Font License, see /fonts/LICENSE-*.txt).
   Paths match the <link rel="preload"> tags in _Layout.cshtml exactly, so each file downloads once. */
@font-face {
  font-family: "Inter";
  font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Tokens & suite themes ---------------------------------------------------- */
:root {
  --bg: #f8fafc;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;

  --suite-image: #6366f1;
  --suite-image-strong: #4f46e5;
  --suite-image-soft: #eef2ff;
  --suite-data: #10b981;
  --suite-data-strong: #047857;
  --suite-data-soft: #ecfdf5;
  --suite-media: #f97316;
  --suite-media-strong: #c2410c;
  --suite-media-soft: #fff7ed;

  /* Data diff colours (Compare sheets) — tinted cells with a strong edge, readable in both themes. */
  --diff-added: #16a34a;
  --diff-removed: #dc2626;
  --diff-changed: #d97706;


  --shadow-xs: 0 1px 2px rgb(15 23 42 / 0.05);
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.04), 0 1px 3px rgb(15 23 42 / 0.07);
  --shadow-md: 0 4px 6px -1px rgb(15 23 42 / 0.06), 0 10px 24px -6px rgb(15 23 42 / 0.10);
  --shadow-glow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent), 0 12px 32px -8px color-mix(in srgb, var(--brand) 45%, transparent);

  --radius: 14px;
  --radius-card: 16px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f17;
    --surface: #121722;
    --surface-2: #1a2030;
    --border: #262d3d;
    --text: #e8ecf4;
    --text-muted: #94a0b8;
    --suite-image: #818cf8;
    --suite-image-strong: #a5b4fc;
    --suite-image-soft: #1e1b4b;
    --suite-data: #34d399;
    --suite-data-strong: #6ee7b7;
    --suite-data-soft: #052e22;
    --suite-media: #fb923c;
    --suite-media-strong: #fdba74;
    --suite-media-soft: #431407;
    --diff-added: #4ade80;
    --diff-removed: #f87171;
    --diff-changed: #fbbf24;
    --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.4);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f17;
  --surface: #121722;
  --surface-2: #1a2030;
  --border: #262d3d;
  --text: #e8ecf4;
  --text-muted: #94a0b8;
  --suite-image: #818cf8;
  --suite-image-strong: #a5b4fc;
  --suite-image-soft: #1e1b4b;
  --suite-data: #34d399;
  --suite-data-strong: #6ee7b7;
  --suite-data-soft: #052e22;
  --suite-media: #fb923c;
  --suite-media-strong: #fdba74;
  --suite-media-soft: #431407;
  --diff-added: #4ade80;
  --diff-removed: #f87171;
  --diff-changed: #fbbf24;
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.4);
}

/* Suite pages re-tint the brand: buttons, focus rings, progress bars and drop zones follow the suite accent. */
body.suite-image {
  --brand: var(--suite-image);
  --brand-strong: var(--suite-image-strong);
  --brand-soft: var(--suite-image-soft);
  --suite: var(--suite-image);
}
body.suite-data {
  --brand: var(--suite-data);
  --brand-strong: var(--suite-data-strong);
  --brand-soft: var(--suite-data-soft);
  --suite: var(--suite-data);
}
body.suite-media {
  --brand: var(--suite-media);
  --brand-strong: var(--suite-media-strong);
  --brand-soft: var(--suite-media-soft);
  --suite: var(--suite-media);
}
body.suite-image, body.suite-data, body.suite-media {
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--brand) 40%, transparent);
  --shadow-glow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent), 0 12px 32px -8px color-mix(in srgb, var(--brand) 45%, transparent);
}
/* Plain links use the text-safe shade of the accent (emerald text on white would be only 2.5:1).
   :where() keeps specificity at a bare "a", so classed links (buttons, cards, chips) keep their own colours. */
:where(body.suite-image, body.suite-data, body.suite-media) a { color: color-mix(in srgb, var(--brand) 65%, var(--text)); }

/* White text needs the deeper shade of each accent to pass WCAG AA (4.5:1); the accent itself is kept for fills. */
body.suite-image .btn--primary, body.suite-data .btn--primary, body.suite-media .btn--primary { background: var(--brand-strong); }
body.suite-image .btn--primary:hover, body.suite-data .btn--primary:hover, body.suite-media .btn--primary:hover { background: color-mix(in srgb, var(--brand-strong) 85%, #000); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.suite-data .btn--primary,
  :root:not([data-theme="light"]) body.suite-media .btn--primary,
  :root:not([data-theme="light"]) body.suite-image .btn--primary { color: #0b0f17; background: var(--brand); }
}
:root[data-theme="dark"] body.suite-data .btn--primary,
:root[data-theme="dark"] body.suite-media .btn--primary,
:root[data-theme="dark"] body.suite-image .btn--primary { color: #0b0f17; background: var(--brand); }

/* 3. Typography & base -------------------------------------------------------- */
body { font-family: var(--font); font-feature-settings: "cv11", "ss01"; }
h1, h2, h3, .logo, .tool-card__name, .dropzone__title, .done__title, .processing__title, .modal__title {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
h1 { font-weight: 800; }
h2, h3 { font-weight: 700; }
.hub-search__kbd { font-family: var(--font); }

.tool-card, .ws-panel, .feature, .hub-item--ad { border-radius: var(--radius-card); }
.tool-card { box-shadow: var(--shadow-xs); }
.tool-card:hover { box-shadow: var(--shadow-md); }

.btn { border-radius: 10px; transition: background-color 0.15s, border-color 0.15s, box-shadow 0.2s, transform 0.1s var(--ease-out); }
.btn--primary { box-shadow: 0 1px 2px rgb(15 23 42 / 0.12), inset 0 1px 0 rgb(255 255 255 / 0.12); }
.btn--primary:hover { box-shadow: 0 6px 16px -4px color-mix(in srgb, var(--brand) 55%, transparent); }
.btn:focus-visible, .chip:focus-visible, .nav-link:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.tag--memory { background: color-mix(in srgb, var(--cat, var(--brand)) 14%, transparent); color: color-mix(in srgb, var(--cat, var(--brand)) 65%, var(--text)); }

/* 4. Header suite tabs --------------------------------------------------------- */
/* The line before the suite tabs is drawn by the first tab, so the menu list holds only real items. */
.nav-suite--first::before { content: ""; display: block; flex: none; width: 1px; height: 22px; margin: 0 8px; background: var(--border); }
.nav-suite__tab { position: relative; gap: 8px; }
.nav-suite__dot {
  width: 8px; height: 8px; flex: none; border-radius: 50%;
  background: var(--suite); box-shadow: 0 0 0 3px color-mix(in srgb, var(--suite) 20%, transparent);
}
.nav-suite__tab:hover { background: color-mix(in srgb, var(--suite) 10%, transparent); color: var(--text); }
.nav-suite__tab.is-current { color: color-mix(in srgb, var(--suite) 50%, var(--text)); background: color-mix(in srgb, var(--suite) 10%, transparent); }

.mega .mega__promo {
  display: flex; flex-direction: column; gap: 6px; justify-content: flex-end;
  margin: 0 !important; padding: 18px !important; border-radius: 12px !important;
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--suite) 30%, transparent), transparent 60%),
    color-mix(in srgb, var(--suite) 9%, var(--surface)) !important;
  border: 1px solid color-mix(in srgb, var(--suite) 25%, var(--border));
}
.mega__promo-title { font: 700 1rem/1.2 var(--font-display); color: var(--text); }
.mega__promo-text { color: var(--text-muted); font-size: 0.85rem; line-height: 1.45; }
.mega__promo-cta { margin-top: 4px; color: color-mix(in srgb, var(--suite) 65%, var(--text)); font-weight: 700; font-size: 0.88rem; }

@media (min-width: 1024px) {
  .nav-suite--first { display: flex; align-items: center; }
  .mega--suite { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(220px, 260px); }
  /* Three quick links don't fit next to five menus on small laptops; they stay in the mobile drawer. */
  .nav-quick { display: none; }
}
@media (min-width: 1360px) { .nav-quick { display: list-item; } }
@media (max-width: 1023.98px) {
  .nav-suite--first::before { width: auto; height: 1px; margin: 8px 12px 4px; }
  .nav-suite__tab { justify-content: flex-start; gap: 10px; }
  .nav-suite__tab .chevron { margin-left: auto; }
  .mega .mega__promo { margin-top: 4px !important; }
}

/* 5. Suite landing & homepage strip --------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--suite, var(--brand)) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--suite, var(--brand)) 22%, var(--border));
  color: color-mix(in srgb, var(--suite, var(--brand)) 65%, var(--text)); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em;
}
.eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse-dot 2.4s ease-in-out infinite; }
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 0%, transparent); opacity: 0.6; } }

.suite-hero {
  position: relative; overflow: hidden; padding: 48px 0 24px; text-align: center;
  background:
    radial-gradient(60% 80% at 50% -10%, color-mix(in srgb, var(--suite) 18%, transparent), transparent 70%),
    linear-gradient(to bottom, transparent, var(--bg));
}
/* Faint grid behind the hero, fading out at the edges. */
.suite-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--suite) 10%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--suite) 10%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(70% 70% at 50% 30%, #000, transparent 75%);
}
.suite-hero__inner { position: relative; max-width: 860px; }
.suite-hero__title { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.1rem); line-height: 1.1; margin-bottom: 14px; }
.suite-hero__lead { max-width: 640px; margin: 0 auto; color: var(--text-muted); font-size: 1.08rem; }
.suite-hero__facts {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px;
  margin: 22px 0 0; padding: 0; list-style: none; color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
}
.suite-hero__facts li { display: inline-flex; align-items: center; gap: 6px; }
.suite-hero__facts svg { width: 18px; height: 18px; fill: none; stroke: var(--suite); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.suite-body { padding-bottom: 24px; }
.suite-jump {
  position: sticky; top: var(--header-h); z-index: 40;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1) 8px; padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px);
}
.suite-jump::-webkit-scrollbar { display: none; }
.suite-section { padding-top: 20px; scroll-margin-top: calc(var(--header-h) + 64px); }
.suite-section__title { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; margin-bottom: 14px; }
.suite-section__title::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--suite); }
.suite-infeed { margin-top: 24px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.suite-infeed .ad-slot { margin: 0; }

.suite-steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.suite-steps .card { padding: 22px; }
.suite-steps h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.suite-steps p { margin: 0; color: var(--text-muted); font-size: 0.93rem; }
.suite-steps__num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: color-mix(in srgb, var(--suite) 14%, transparent); color: color-mix(in srgb, var(--suite) 65%, var(--text));
  font: 800 1rem/1 var(--font-display);
}

/* Homepage: two suite cards between the hero and the PDF hub. */
.suite-strip { padding: 28px 0 4px; }
.suite-strip__grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.suite-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; overflow: hidden;
  padding: 22px 22px 20px; border-radius: var(--radius-card);
  border: 1px solid color-mix(in srgb, var(--suite) 22%, var(--border));
  background:
    radial-gradient(90% 140% at 100% 0%, color-mix(in srgb, var(--suite) 16%, transparent), transparent 60%),
    var(--surface);
  color: var(--text); box-shadow: var(--shadow-xs);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, border-color 0.2s;
}
.suite-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--suite); box-shadow: 0 14px 32px -12px color-mix(in srgb, var(--suite) 50%, transparent); }
.suite-card__badge {
  position: absolute; top: 18px; right: 18px; padding: 3px 9px; border-radius: 999px;
  /* 55 % of the suite colour keeps white text above 4.5:1 for both accents, in light and dark themes. */
  background: color-mix(in srgb, var(--suite) 55%, #000); color: #fff; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
}
.suite-card__title { font: 800 1.3rem/1.2 var(--font-display); letter-spacing: -0.02em; }
.suite-card__text { color: var(--text-muted); font-size: 0.93rem; }
.suite-card__tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.suite-card__tool {
  padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  background: color-mix(in srgb, var(--suite) 10%, var(--surface)); color: var(--text);
}
.suite-card__cta { margin-top: 8px; color: color-mix(in srgb, var(--suite) 65%, var(--text)); font-weight: 700; font-size: 0.92rem; }
.suite-card__cta span { display: inline-block; transition: transform 0.2s var(--ease-out); }
.suite-card:hover .suite-card__cta span { transform: translateX(4px); }

/* 6. Tool workspace ------------------------------------------------------------- */
.engine-badge--memory::before { background: var(--suite, var(--brand)); }

/* Animated drop zone: floating icon, breathing border on hover, lift + glow while a file hovers over the page. */
.dropzone {
  position: relative; isolation: isolate;
  transition: background-color 0.2s, border-color 0.2s, transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.dropzone::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 40%, color-mix(in srgb, var(--cat, var(--brand)) 12%, transparent), transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.dropzone:hover::before, .dropzone:focus-visible::before, body.is-dragging-file .dropzone::before { opacity: 1; }
.dropzone:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.dropzone__icon { animation: dz-float 3.2s ease-in-out infinite; }
.dropzone:hover .dropzone__icon { animation-duration: 1.6s; }
@keyframes dz-float { 50% { transform: translateY(-6px); } }
body.is-dragging-file .dropzone {
  transform: scale(1.01);
  border-color: var(--cat, var(--brand)); border-style: solid;
  box-shadow: var(--shadow-glow);
}
.dropzone__formats { margin: 10px 0 0; color: var(--text-muted); font-size: 0.8rem; }

.drop-overlay { background: color-mix(in srgb, var(--brand) 18%, rgb(10 12 20 / 0.5)); animation: fade-in 0.15s ease-out; }
.drop-overlay__box { animation: pop-in 0.3s var(--ease-spring); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.94); } }

.ws-panel:not([hidden]) { animation: panel-in 0.28s var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }

/* Processing: the spinner gets a soft halo in the suite colour; the bar shimmers while it fills. */
.spinner { border-top-color: var(--brand); box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand) 8%, transparent); }
.progress__bar {
  background:
    linear-gradient(90deg, transparent, rgb(255 255 255 / 0.35), transparent) 0 0 / 40% 100% no-repeat,
    var(--brand);
  animation: bar-shine 1.4s linear infinite;
}
@keyframes bar-shine { from { background-position: -40% 0, 0 0; } to { background-position: 140% 0, 0 0; } }
.done__icon { animation: pop-in 0.4s var(--ease-spring); }

/* 7. Components ----------------------------------------------------------------- */
.card {
  padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-card);
  background: var(--surface); box-shadow: var(--shadow-xs);
}
.card--interactive { transition: transform 0.2s var(--ease-out), box-shadow 0.2s, border-color 0.2s; }
.card--interactive:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); box-shadow: var(--shadow-md); }
.card__title { margin: 0 0 4px; font: 700 1rem/1.3 var(--font-display); }
.card__hint { margin: 0; color: var(--text-muted); font-size: 0.88rem; }

/* Segmented control (base styles in site.css §9c): a hairline border and smooth state changes. */
.segmented { border: 1px solid var(--border); border-radius: 12px; }
.segmented span { transition: background-color 0.15s, color 0.15s, box-shadow 0.15s; }
.segmented span:hover { color: var(--text); }
.segmented input:checked + span { color: var(--text); }

/* Range slider with a synced value: <div class="range-field"><label>…</label><output>80%</output><input type="range" class="range"></div> */
.range-field { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; }
.range-field > label { font-weight: 600; font-size: 0.9rem; }
.range-field > output {
  min-width: 56px; padding: 3px 9px; border-radius: 8px; text-align: center;
  background: var(--brand-soft); color: color-mix(in srgb, var(--brand) 65%, var(--text)); font-weight: 700; font-size: 0.85rem; font-variant-numeric: tabular-nums;
  transition: transform 0.15s var(--ease-spring);
}
.range-field > output.is-bumped { transform: scale(1.08); }
.range-field > .range { grid-column: 1 / -1; }
.range {
  --pct: 50%;
  width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(to right, var(--brand) var(--pct), var(--surface-2) var(--pct));
}
.range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--surface-2); }
.range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--brand); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand); box-shadow: var(--shadow-sm);
  transition: transform 0.15s var(--ease-spring), box-shadow 0.15s;
}
.range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand); box-shadow: var(--shadow-sm);
}
.range:hover::-webkit-slider-thumb, .range:active::-webkit-slider-thumb { transform: scale(1.15); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: var(--focus-ring); }
.range:focus-visible::-moz-range-thumb { box-shadow: var(--focus-ring); }

/* Toggle chips (column picker): <button class="toggle-chip" aria-pressed="true">Name</button> */
.toggle-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-muted); font: 600 0.85rem/1.3 var(--font); cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.toggle-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toggle-chip::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 4px;
  border: 1.5px solid currentColor; transition: background-color 0.15s;
}
.toggle-chip:hover { border-color: var(--brand); color: var(--text); }
.toggle-chip:active { transform: scale(0.97); }
.toggle-chip[aria-pressed="true"] { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 45%, transparent); color: color-mix(in srgb, var(--brand) 65%, var(--text)); }
.toggle-chip[aria-pressed="true"]::before {
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
  border-color: var(--brand);
}
.toggle-chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Skeleton loaders — use while a preview, table or thumbnail is loading. */
.skeleton {
  display: block; border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 40%, var(--surface)) 37%, var(--surface-2) 63%) 0 0 / 400% 100%;
  animation: skeleton 1.3s ease-in-out infinite;
}
.skeleton--text { height: 0.85em; margin: 0.45em 0; }
.skeleton--text:last-child { width: 65%; }
.skeleton--thumb { aspect-ratio: 4 / 3; border-radius: 12px; }
.skeleton--row { height: 34px; margin-bottom: 4px; }
@keyframes skeleton { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Before / after comparison (original vs compressed size). */
.stat-compare { display: grid; gap: 10px; grid-template-columns: 1fr auto 1fr; align-items: center; }
.stat { padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.stat__label { display: block; color: var(--text-muted); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat__value { display: block; margin-top: 2px; font: 800 1.35rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.stat--good .stat__value { color: var(--success); }
.stat-compare__arrow { width: 22px; height: 22px; fill: none; stroke: var(--text-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.saving-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); font-weight: 800; font-size: 0.8rem;
}

/* Data table with sticky header — live previews and the sheet diff grid. */
.data-table-wrap {
  max-height: 420px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  overscroll-behavior: contain;
}
.data-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td {
  max-width: 280px; padding: 7px 12px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
  text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.data-table th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2);
  font-weight: 700; font-size: 0.78rem; letter-spacing: 0.02em; color: var(--text);
}
.data-table th:first-child, .data-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); color: var(--text-muted); text-align: right; }
.data-table th:first-child { z-index: 3; background: var(--surface-2); }
.data-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.data-table tbody tr:hover td { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.data-table .is-empty { color: var(--text-muted); font-style: italic; }
.data-table .is-dimmed { opacity: 0.4; text-decoration: line-through; }

.cell--added, .data-table tbody tr td.cell--added { background: color-mix(in srgb, var(--diff-added) 16%, var(--surface)); box-shadow: inset 3px 0 0 var(--diff-added); }
.cell--removed, .data-table tbody tr td.cell--removed { background: color-mix(in srgb, var(--diff-removed) 14%, var(--surface)); box-shadow: inset 3px 0 0 var(--diff-removed); text-decoration: line-through; }
.cell--changed, .data-table tbody tr td.cell--changed { background: color-mix(in srgb, var(--diff-changed) 18%, var(--surface)); box-shadow: inset 3px 0 0 var(--diff-changed); }
.cell__old { display: block; color: var(--text-muted); font-size: 0.78em; text-decoration: line-through; }
.diff-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 10px; padding: 0; list-style: none; font-size: 0.85rem; color: var(--text-muted); }
.diff-legend li { display: inline-flex; align-items: center; gap: 6px; }
.diff-legend li::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--swatch); }
.diff-legend .is-added { --swatch: var(--diff-added); }
.diff-legend .is-removed { --swatch: var(--diff-removed); }
.diff-legend .is-changed { --swatch: var(--diff-changed); }

/* Image crop box (prefixed "ic-": site.css has the Crop PDF tool's .crop-*): <div class="ic-stage"><img><div class="ic-box"><span class="ic-handle" data-handle="nw">…</div></div> */
.ic-stage { position: relative; display: inline-block; max-width: 100%; user-select: none; -webkit-user-select: none; touch-action: none; }
.ic-stage img { display: block; max-width: 100%; max-height: 70vh; }
.ic-box {
  position: absolute; cursor: move;
  outline: 2px solid #fff; box-shadow: 0 0 0 9999px rgb(10 12 20 / 0.55);
  background-image:
    linear-gradient(to right, transparent calc(33.33% - 0.5px), rgb(255 255 255 / 0.5) calc(33.33% - 0.5px) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px) calc(66.66% - 0.5px), rgb(255 255 255 / 0.5) calc(66.66% - 0.5px) calc(66.66% + 0.5px), transparent calc(66.66% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.33% - 0.5px), rgb(255 255 255 / 0.5) calc(33.33% - 0.5px) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px) calc(66.66% - 0.5px), rgb(255 255 255 / 0.5) calc(66.66% - 0.5px) calc(66.66% + 0.5px), transparent calc(66.66% + 0.5px));
}
.ic-handle {
  position: absolute; width: 18px; height: 18px; margin: -9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand); box-shadow: var(--shadow-sm);
}
.ic-handle[data-handle="nw"] { top: 0; left: 0; cursor: nwse-resize; }
.ic-handle[data-handle="ne"] { top: 0; right: 0; cursor: nesw-resize; }
.ic-handle[data-handle="sw"] { bottom: 0; left: 0; cursor: nesw-resize; }
.ic-handle[data-handle="se"] { bottom: 0; right: 0; cursor: nwse-resize; }
@media (pointer: coarse) { .ic-handle { width: 28px; height: 28px; margin: -14px; } }

/* 8. Toasts ---------------------------------------------------------------------- */
.toast {
  position: relative; overflow: hidden; align-items: center;
  border: 1px solid var(--border); border-left: 0; border-radius: 14px;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.35s var(--ease-spring);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(0.96); } }
.toast.is-leaving { opacity: 0; transform: translateX(24px); transition: opacity 0.2s, transform 0.2s var(--ease-out); }
.toast__icon {
  width: 22px; height: 22px; flex: none; fill: none; stroke: var(--toast-color, var(--text-muted));
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.toast--success { --toast-color: var(--success); }
.toast--error { --toast-color: var(--danger); }
.toast--info { --toast-color: var(--brand); }
.toast__timer {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--toast-color, var(--text-muted)); opacity: 0.55; transform-origin: left;
  animation: toast-timer linear forwards;
}
.toast:hover .toast__timer { animation-play-state: paused; }
@keyframes toast-timer { to { transform: scaleX(0); } }

/* 9. Motion preferences ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .toast__timer { display: none; }
  .suite-card:hover, .tool-card:hover, body.is-dragging-file .dropzone { transform: none; }
}

/* 10. Image tools ------------------------------------------------------------------- */
fieldset.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.field__legend { margin-bottom: 6px; padding: 0; font-weight: 600; font-size: 0.9rem; }

.segmented--stack { display: grid; grid-template-columns: 1fr 1fr; }
.segmented span small { display: block; margin-top: 2px; font-size: 0.7rem; font-weight: 500; color: var(--text-muted); }

/* Size presets for Compress to KB: big tappable tiles. */
.kb-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.kb-preset { position: relative; }
.kb-preset input { position: absolute; opacity: 0; pointer-events: none; }
.kb-preset span {
  display: flex; align-items: baseline; justify-content: center; gap: 2px; min-height: 44px; padding: 10px 4px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer;
  font: 800 1.05rem/1 var(--font-display); font-variant-numeric: tabular-nums;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s, transform 0.1s;
}
.kb-preset span small { font: 600 0.7rem/1 var(--font); color: var(--text-muted); }
.kb-preset span:hover { border-color: var(--brand); }
.kb-preset input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: color-mix(in srgb, var(--brand) 65%, var(--text)); box-shadow: inset 0 0 0 1px var(--brand); }
.kb-preset input:focus-visible + span { box-shadow: var(--focus-ring); }
.kb-preset:last-child span { font-size: 0.85rem; }

.input-suffix { position: relative; }
.input-suffix .input { padding-right: 44px; }
.input-suffix > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: 600; font-size: 0.85rem; pointer-events: none; }

/* Result report under the download button. */
.done__report { width: 100%; max-width: 760px; margin-top: 20px; text-align: left; }
.img-report { display: grid; gap: 16px; }
.saving-pill--none { background: var(--surface-2); color: var(--text-muted); }
.img-report__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.img-report__failed { margin: 0; color: var(--danger); font-size: 0.88rem; font-weight: 600; }
.img-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  animation: panel-in 0.3s var(--ease-out) both;
}
.img-row:nth-child(2) { animation-delay: 40ms; } .img-row:nth-child(3) { animation-delay: 80ms; } .img-row:nth-child(n+4) { animation-delay: 120ms; }
.img-row__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.img-row__sizes { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 0.9rem; }
.img-row__meta, .img-row__notes { grid-column: 1; color: var(--text-muted); font-size: 0.8rem; }
.img-row__notes { color: color-mix(in srgb, var(--brand) 65%, var(--text)); font-weight: 600; }
.img-row__download { grid-column: 2; grid-row: 2 / span 2; justify-self: end; }
.img-row.is-failed { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); background: color-mix(in srgb, var(--danger) 5%, var(--surface)); }
.img-row__error { grid-column: 1 / -1; color: var(--danger); font-size: 0.85rem; }
.fit-badge { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); font-weight: 700; }
.fit-badge--no { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
@media (max-width: 560px) {
  .img-row { grid-template-columns: minmax(0, 1fr); }
  .img-row__sizes { white-space: normal; }
  .img-row__download { grid-column: 1; grid-row: auto; justify-self: start; }
  .stat-compare { grid-template-columns: 1fr; }
  .stat-compare__arrow { justify-self: center; transform: rotate(90deg); }
}

/* Before/after slider: the original is clipped to the left of --pos, over the result. */
.ba {
  position: relative; width: 100%; max-height: 70vh; margin: 0; overflow: hidden;
  border-radius: 12px; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 20px 20px;
  box-shadow: var(--shadow-sm); user-select: none; -webkit-user-select: none;
}
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.ba__img--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.25); pointer-events: none;
}
.ba__handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 20px no-repeat;
  box-shadow: var(--shadow-md);
}
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.ba:has(.ba__range:focus-visible) .ba__handle::after { box-shadow: var(--focus-ring); }
.ba__label {
  position: absolute; top: 10px; padding: 4px 10px; border-radius: 999px; pointer-events: none;
  background: rgb(15 23 42 / 0.72); color: #fff; font-size: 0.75rem; font-weight: 700; backdrop-filter: blur(4px);
}
.ba__label--before { left: 10px; }
.ba__label--after { right: 10px; }
.ba__hint { margin: 6px 0 0; color: var(--text-muted); font-size: 0.8rem; text-align: center; }

/* 11. Image edit tools ------------------------------------------------------------------ */
.live-preview { margin-bottom: 16px; }
.live-preview__stage {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 160px; overflow: hidden; border-radius: 12px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 60%, var(--surface));
  transition: height 0.25s var(--ease-out);
}
.live-preview__stage.is-transparent,
.live-preview__stage:has(.frame-preview) {
  background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px;
}
.live-preview__stage > img { display: block; max-width: 100%; max-height: 320px; }
.live-preview__stage > img.is-transformed {
  position: absolute; left: 50%; top: 50%; max-width: none; max-height: none;
  transition: transform 0.35s var(--ease-spring);
  box-shadow: 0 4px 16px rgb(15 23 42 / 0.18);
}
.live-preview__stage .skeleton--thumb { width: min(320px, 70%); }
.live-preview__caption { margin: 6px 0 0; color: var(--text-muted); font-size: 0.8rem; text-align: center; }
.live-preview__error { margin: 0; padding: 24px; color: var(--text-muted); text-align: center; }
/* What "Crop" keeps after straightening: everything outside is dimmed. */
.keep-area {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none;
  outline: 2px dashed #fff; box-shadow: 0 0 0 9999px rgb(10 12 20 / 0.45);
}
.frame-preview { line-height: 0; box-shadow: 0 6px 20px rgb(15 23 42 / 0.2); overflow: hidden; transition: padding 0.2s, border-radius 0.2s, background-color 0.2s; }
.frame-preview > img { display: block; max-width: none; }

/* Resize: width ⛓ height */
.dim-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: end; }
.dim-row .input { min-width: 0; padding: 0 28px 0 10px; font-variant-numeric: tabular-nums; }
.dim-row .input-suffix > span { right: 9px; font-size: 0.78rem; }
/* Spinner arrows would take a third of these narrow boxes; typing and the arrow keys still work. */
.dim-row .input { -moz-appearance: textfield; appearance: textfield; }
.dim-row .input::-webkit-inner-spin-button, .dim-row .input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.lock-btn {
  display: grid; place-items: center; width: 34px; height: 44px; padding: 0;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-muted); cursor: pointer;
}
.lock-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lock-btn[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: color-mix(in srgb, var(--brand) 65%, var(--text)); }
.lock-btn[aria-pressed="false"] svg { opacity: 0.45; }
.lock-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.preset-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.preset-chip, .ratio-chip span {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text);
  font: 700 0.85rem/1.1 var(--font); cursor: pointer; transition: border-color 0.15s, background-color 0.15s;
}
.preset-chip small, .ratio-chip small { font-weight: 500; font-size: 0.68rem; color: var(--text-muted); }
.preset-chip:hover, .ratio-chip span:hover { border-color: var(--brand); }

/* Rotate & flip buttons */
.tool-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tool-btn {
  display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text);
  font: 600 0.82rem/1.2 var(--font); cursor: pointer; text-align: left;
  transition: border-color 0.15s, background-color 0.15s, transform 0.1s;
}
.tool-btn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool-btn:hover { border-color: var(--brand); }
.tool-btn:active { transform: scale(0.97); }
.tool-btn[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: color-mix(in srgb, var(--brand) 65%, var(--text)); }
.tool-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Colour swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  position: relative; width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  background: var(--swatch, conic-gradient(red, yellow, lime, cyan, blue, magenta, red));
  box-shadow: inset 0 0 0 1px rgb(15 23 42 / 0.15); transition: transform 0.15s var(--ease-spring);
}
.swatch:hover { transform: scale(1.1); }
.swatch input[type="radio"] { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch:has(input:checked), .swatch.is-selected { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); }
.swatch:has(input:focus-visible) { box-shadow: 0 0 0 2px var(--surface), var(--focus-ring); }
.swatch--custom input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }

/* Crop */
.ratio-chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.ratio-chip { position: relative; }
.ratio-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ratio-chip span { width: 100%; align-items: flex-start; }
.ratio-chip input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.ratio-chip input:focus-visible + span { box-shadow: var(--focus-ring); }
.crop-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.crop-fields label { display: grid; gap: 4px; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.crop-fields .input { min-height: 38px; }
.workbench__main, .workbench__custom { min-width: 0; }
.workbench__custom:has(.ic-stage) { display: flex; justify-content: center; padding: 12px; border-radius: 12px; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; }
.ic-stage { overflow: hidden; align-self: center; line-height: 0; }
.ic-stage img { max-width: none; max-height: none; } /* sized by ic-box.js */
.ic-stage.is-dragging, .ic-stage.is-dragging * { cursor: grabbing; }
.ic-box:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ic-handle[data-handle="n"] { top: 0; left: 50%; cursor: ns-resize; }
.ic-handle[data-handle="s"] { bottom: 0; left: 50%; cursor: ns-resize; }
.ic-handle[data-handle="e"] { top: 50%; right: 0; cursor: ew-resize; }
.ic-handle[data-handle="w"] { top: 50%; left: 0; cursor: ew-resize; }
.ic-handle[data-handle="n"], .ic-handle[data-handle="s"], .ic-handle[data-handle="e"], .ic-handle[data-handle="w"] { border-radius: 4px; width: 14px; height: 14px; margin: -7px; }
.ic-stage.has-aspect .ic-handle:is([data-handle="n"], [data-handle="s"], [data-handle="e"], [data-handle="w"]) { display: none; }
.ic-badge {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px;
  background: rgb(15 23 42 / 0.72); color: #fff; font: 700 0.72rem/1.4 var(--font); white-space: nowrap; pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.ic-loading { width: min(420px, 100%); }
.result-preview {
  margin: 0; padding: 12px; border-radius: 12px; text-align: center;
  background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px;
}
.result-preview__img { max-width: 100%; max-height: 360px; box-shadow: var(--shadow-sm); }

/* 12. Watermark, filters, blur regions, passport photos ---------------------------------- */
.preset-chip.is-active { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.live-preview__note { color: var(--danger); font-weight: 600; }
.wm-layer { position: absolute; pointer-events: none; }
.input--file { padding: 8px; min-height: auto; font-size: 0.85rem; }
.input--file::file-selector-button {
  margin-right: 10px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: 600 0.82rem var(--font); cursor: pointer;
}

/* 3 × 3 watermark position picker */
.position-grid { display: grid; grid-template-columns: repeat(3, 34px); gap: 4px; padding: 6px; width: max-content; border-radius: 12px; background: var(--surface-2); }
.position-grid label { position: relative; display: grid; place-items: center; width: 34px; height: 26px; border-radius: 6px; background: var(--surface); cursor: pointer; }
.position-grid label::after { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--border); transition: background-color 0.15s, transform 0.15s var(--ease-spring); }
.position-grid input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.position-grid label:has(input:checked)::after { background: var(--brand); transform: scale(1.4); }
.position-grid label:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.position-grid.is-disabled { opacity: 0.4; pointer-events: none; }

/* Blur: marked areas over the picture */
.workbench__custom:has(.re-stage) { display: flex; justify-content: center; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.re-stage { position: relative; align-self: center; line-height: 0; overflow: hidden; cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; }
.re-stage img { display: block; max-width: none; max-height: none; pointer-events: none; }
.re-region {
  position: absolute; cursor: move; outline: 2px solid #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.35), 0 2px 10px rgb(0 0 0 / 0.25);
  backdrop-filter: blur(var(--re-blur, 6px)); -webkit-backdrop-filter: blur(var(--re-blur, 6px));
}
.re-stage[data-mode="fill"] .re-region { backdrop-filter: none; -webkit-backdrop-filter: none; background: #000; }
.re-stage[data-mode="pixelate"] .re-region {
  background-image: linear-gradient(rgb(255 255 255 / 0.08) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 0.08) 1px, transparent 1px);
  background-size: var(--re-blur, 6px) var(--re-blur, 6px);
}
.re-region:focus-visible { outline: 2px solid var(--brand); }
.re-remove {
  position: absolute; top: -11px; right: -11px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
  background: #fff; color: #0f172a; font: 700 15px/22px var(--font); text-align: center; cursor: pointer; box-shadow: var(--shadow-sm);
}
.re-handle { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; border-radius: 3px; background: #fff; border: 2px solid var(--brand); cursor: nwse-resize; }
@media (pointer: coarse) { .re-handle { width: 22px; height: 22px; right: -11px; bottom: -11px; } }
.re-stage.is-whole { cursor: default; }
.re-stage.is-whole::after { content: ""; position: absolute; inset: 0; backdrop-filter: blur(var(--re-blur, 6px)); -webkit-backdrop-filter: blur(var(--re-blur, 6px)); }
.re-stage.is-whole[data-mode="fill"]::after { backdrop-filter: none; background: #000; }
.re-stage.is-whole .re-region { display: none; }
.region-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 0.85rem; font-weight: 600; }

/* Passport photo: face guide inside the crop box */
.ratio-chips--wide { grid-template-columns: 1fr; }
.ic-stage.has-face-guide .ic-box::after {
  content: ""; position: absolute; left: 50%; top: 9%; width: 56%; height: 64%; transform: translateX(-50%);
  border: 2px dashed rgb(255 255 255 / 0.85); border-radius: 50%; pointer-events: none;
}
.ic-stage.has-face-guide .ic-box::before {
  content: ""; position: absolute; left: 12%; right: 12%; top: 42%; border-top: 1px dashed rgb(255 255 255 / 0.6); pointer-events: none;
}

/* 13. Data & Excel tools ------------------------------------------------------------------ */
.data-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 10px; }
.data-toolbar__sheet { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.85rem; }
.data-toolbar__summary { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: color-mix(in srgb, var(--brand) 65%, var(--text)); font-size: 0.8rem; font-weight: 700; }
.data-toolbar__summary:empty { display: none; }
.check--inline { display: inline-flex; align-items: center; font-size: 0.88rem; }
.input--sm { min-height: 34px; padding: 0 8px; font-size: 0.85rem; }
.data-table__more { margin: 6px 0 0; color: var(--text-muted); font-size: 0.8rem; }
.data-table-wrap .skeleton--row { margin: 8px; }
.data-table th.is-key { background: color-mix(in srgb, var(--brand) 16%, var(--surface-2)); color: color-mix(in srgb, var(--brand) 65%, var(--text)); }
.data-table th.is-key::before { content: "🔑 "; font-size: 0.75em; }
.data-table tbody tr.is-removed td:first-child { color: var(--diff-removed); text-decoration: line-through; }
.data-table .col--removed, .data-table th.col--removed { opacity: 0.45; background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--diff-removed) 14%, transparent) 6px 8px); }
.data-table td[title] { cursor: help; }

.col-chips__bar { display: flex; gap: 12px; margin-bottom: 6px; font-size: 0.8rem; font-weight: 600; }
.col-chips__bar .link-btn { color: color-mix(in srgb, var(--brand) 65%, var(--text)); }
.col-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; max-height: 260px; overflow: auto; }
.col-chip { display: inline-flex; align-items: center; max-width: 100%; }
.col-chip .toggle-chip { max-width: 220px; }
.col-chips--sortable .col-chip { gap: 2px; padding-left: 2px; border-radius: 999px; background: var(--surface-2); }
.col-chip__grip { display: grid; place-items: center; width: 18px; height: 28px; color: var(--text-muted); cursor: grab; touch-action: none; }
.col-chip__grip svg { width: 14px; height: 14px; fill: currentColor; }
.col-chip.is-dragging { opacity: 0.9; box-shadow: var(--shadow-md); }

.data-report { display: grid; gap: 10px; }
.data-report__grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.data-report__size { margin: 0; color: var(--text-muted); font-size: 0.85rem; text-align: center; }
.stat__note { display: block; margin-top: 2px; color: var(--text-muted); font-size: 0.78rem; }

/* Data tools, Step 6: merge, split, CSV ↔ Excel, JSON */
.live-preview--table { margin-bottom: 16px; }
.data-table tbody tr.is-band td { background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.data-table td.is-missing { background-image: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--text-muted) 12%, transparent) 5px 6px); }
.data-table td.is-source { color: var(--text-muted); font-size: 0.78rem; }
.data-table td.type-number { text-align: right; color: color-mix(in srgb, var(--brand) 70%, var(--text)); }
.data-table td.type-date { color: #b45309; }
.type-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: 0.8rem; color: var(--text-muted); }
.type-legend li::before { content: "Aa"; margin-right: 5px; font-weight: 700; color: var(--text); }
.type-legend .is-number::before { content: "12"; color: color-mix(in srgb, var(--brand) 70%, var(--text)); }
.type-legend .is-date::before { content: "📅"; }

/* Compare Excel Sheets: colour-coded result */
.done__report:has(.diff-report) { max-width: none; }
/* min-width: 0 lets the wide table scroll inside its box instead of stretching the page on phones. */
.done__report { min-width: 0; }
.diff-report { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.diff-report > * { min-width: 0; }
.diff-report__files { margin: 0; text-align: center; color: var(--text-muted); overflow-wrap: anywhere; }
.diff-report__cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.diff-stat { border-left: 4px solid var(--swatch, var(--border)); }
.diff-stat--added { --swatch: var(--diff-added); }
.diff-stat--removed { --swatch: var(--diff-removed); }
.diff-stat--changed { --swatch: var(--diff-changed); }
.diff-report__line { margin: 0; text-align: center; font-weight: 600; }
.diff-report__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.diff-report__bar .diff-legend { margin: 0; }
.diff-filter { width: auto; }
.diff-filter span { padding: 6px 12px; }
.diff-grid { max-height: 560px; }
.diff-grid .diff-mark { font-weight: 800; text-align: center; }
.diff-grid tr.diff-added .diff-mark { color: var(--diff-added); }
.diff-grid tr.diff-removed .diff-mark { color: var(--diff-removed); }
.diff-grid tr.diff-changed .diff-mark { color: var(--diff-changed); }
.diff-grid tr.diff-removed td:not(.diff-mark) { text-decoration: line-through; color: var(--text-muted); }
.diff-grid tr.diff-gap td { padding: 6px; text-align: center; color: var(--text-muted); font-style: italic; background: var(--surface-2); }
.data-table th.col--added { background: color-mix(in srgb, var(--diff-added) 22%, var(--surface-2)); }
.data-table th.col--added::after { content: " new"; font-size: 0.7em; color: var(--diff-added); }
.data-table th.col--removed::after { content: " gone"; font-size: 0.7em; color: var(--diff-removed); }
.compare-order { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.notice--warning { margin: 0; }

/* Footer: suite column titles are links to their hubs */
.footer-col__title a { color: inherit; }
.footer-col__title a:hover { color: color-mix(in srgb, var(--brand) 65%, var(--text)); }

/* Brand wordmark: "Doc" in the text colour, "Epic" in the brand gradient */
.logo__text { letter-spacing: -0.02em; }
.logo__accent {
  background: linear-gradient(90deg, #6366f1, #10b981);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (forced-colors: active) { .logo__accent { color: CanvasText; background: none; } }

/* Tool page: the tool's own introduction above "How to use" */
.tool-about { max-width: 760px; margin: 0 0 18px; color: var(--text); font-size: 1.02rem; line-height: 1.65; }


/* Remove Background: preview on a checkerboard + background picker (under the download button) */
.rb { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; width: 100%; max-width: 1080px; margin-top: 8px; text-align: left; }
.rb__stage { display: grid; place-items: center; min-height: 240px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.rb__canvas { display: block; max-width: 100%; max-height: 70vh; height: auto; border-radius: 8px; box-shadow: 0 1px 3px rgb(15 23 42 / .08); }
.rb__canvas.is-transparent { background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 0 0 / 20px 20px; }
.rb__panel { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.rb__title { margin: 0; font-size: 1rem; }
.rb__tabs { width: 100%; }
.rb__pane { display: flex; flex-direction: column; gap: 10px; }
.rb__swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rb__swatch { position: relative; cursor: pointer; }
.rb__swatch input[type="radio"] { position: absolute; opacity: 0; }
.rb__swatch > span:first-of-type { display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--border); }
.rb__swatch input:checked + span { outline: 3px solid var(--suite-image); outline-offset: 2px; }
.rb__swatch input:focus-visible + span { outline: 3px solid var(--suite-image-strong); outline-offset: 2px; }
.rb__presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rb__preset { position: relative; cursor: pointer; }
.rb__preset input { position: absolute; opacity: 0; }
.rb__preset canvas, .rb__preset > span:first-of-type { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--border); overflow: hidden; }
.rb__preset--upload > span:first-of-type { font-size: .72rem; font-weight: 600; text-align: center; color: var(--suite-image-strong); background: var(--suite-image-soft); border-style: dashed; }
.rb__preset--upload img { width: 100%; height: 100%; object-fit: cover; }
.rb__preset input:checked + canvas, .rb__preset input:checked + span { outline: 3px solid var(--suite-image); outline-offset: 2px; }
.rb__preset input:focus-visible + canvas, .rb__preset input:focus-visible + span { outline: 3px solid var(--suite-image-strong); outline-offset: 2px; }
.rb__status { min-height: 1.2em; margin: 0; font-size: .85rem; color: var(--text-muted); }
.rb__download { width: 100%; }
@media (max-width: 760px) {
  .rb { grid-template-columns: minmax(0, 1fr); }
}
/* "Choose any colour": a full-width button; the native colour input covers it invisibly, so any tap opens the picker. */
.rb__picked { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.rb__custom { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 12px; cursor: pointer; }
.rb__custom:hover { border-color: var(--suite-image); background: var(--suite-image-soft); }
.rb__custom input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.rb__custom-swatch { flex: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: conic-gradient(#ef4444, #f59e0b, #eab308, #22c55e, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #ef4444); }
.rb__custom-text { display: flex; flex-direction: column; gap: 2px; font-size: 0.9rem; }
.rb__custom-text small { color: var(--text-muted); font-family: var(--font-mono, monospace); }
.rb__custom-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.rb__custom:has(input[type="radio"]:checked) { border-style: solid; border-color: var(--suite-image); box-shadow: 0 0 0 2px var(--suite-image); }
.rb__custom:has(.rb__custom-input:focus-visible) { box-shadow: var(--focus-ring); }
.rb__scale { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted); margin-top: -4px; }

/* Image report: where the images were processed */
.img-report__where { margin: 4px 0 0; font-size: .85rem; color: var(--text-muted); text-align: center; }
.engine-badge--hybrid::before { background: var(--success); }

/* Media tools (Video & Audio suite: wwwroot/js/engine/media-ui.js) ------------- */
.media-stage { display: grid; gap: 12px; }
.media-player { border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.media-player video { display: block; width: 100%; max-height: 360px; background: #000; }
.media-player audio { display: block; width: 100%; margin: 12px 0; }
.media-player__none { margin: 0; padding: 24px 16px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.media-meta { margin: 0; font-size: 0.88rem; font-weight: 600; color: var(--text-muted); overflow-wrap: anywhere; }
.media-trim { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.media-trim__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.media-trim__row > label { min-width: 2.6rem; font-weight: 600; font-size: 0.9rem; }
.media-trim__time { width: 7.5rem; font-variant-numeric: tabular-nums; }
.media-trim__summary { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--brand-soft); font-weight: 600; font-size: 0.88rem; }
.media-engine { margin: 0; font-size: 0.82rem; color: var(--text-muted); }
.media-preview { display: grid; gap: 6px; justify-items: start; }
.media-preview .btn svg { width: 16px; height: 16px; fill: currentColor; }
.media-preview audio { width: 100%; }
.media-report { display: grid; gap: 12px; }
.media-report__note { margin: 0; font-weight: 600; font-size: 0.9rem; text-align: center; }
.media-report__player video, .media-report__player img { display: block; max-width: 100%; max-height: 320px; margin: 0 auto; border-radius: 12px; }
.media-report__player audio { display: block; width: 100%; }
.media-report__where { margin: 0; font-size: .85rem; color: var(--text-muted); text-align: center; }
.media-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.transcript { width: 100%; min-height: 160px; resize: vertical; font-size: .95rem; line-height: 1.6; }
.qr-maker { display: grid; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.qr-types { display: flex; flex-wrap: wrap; gap: 6px; }
.qr-maker__body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.qr-fields { display: grid; gap: 10px; }
.qr-fields > div { display: grid; gap: 10px; }
.qr-fields textarea { resize: vertical; }
.qr-preview { margin: 0; display: grid; gap: 8px; justify-items: center; text-align: center; }
.qr-preview canvas { width: 240px; height: 240px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.qr-preview figcaption { font-size: .82rem; color: var(--text-muted); }
.qr-result img { display: block; width: 220px; height: 220px; margin: 0 auto; border: 1px solid var(--border); border-radius: 12px; object-fit: contain; background: #fff; }
.qr-result__text { overflow-wrap: anywhere; color: var(--text); }
.qr-scan { display: grid; gap: 10px; }
.qr-scan__item { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); text-align: left; }
.qr-scan__kind { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); }
.qr-scan__value { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: .95rem; }
.qr-scan__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.qr-camera { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: #000; }
.qr-camera video { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.qr-camera__frame { position: absolute; width: 60%; aspect-ratio: 1; border: 3px solid rgb(255 255 255 / .85); border-radius: 16px; box-shadow: 0 0 0 999px rgb(0 0 0 / .35); pointer-events: none; }
@media (max-width: 720px) { .qr-maker__body { grid-template-columns: 1fr; } .qr-preview { order: -1; } }
.size-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 18px 0 6px; }
.size-links__label { font-weight: 600; font-size: .9rem; margin-right: 4px; }
.size-links .preset-chip { text-decoration: none; color: var(--text); }
.crop-video { display: grid; gap: 8px; margin-top: 10px; }
.crop-video__box:empty { display: none; }
.tts { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.tts__label { font-weight: 600; font-size: .92rem; }
.tts__text { min-height: 220px; resize: vertical; font-size: 1rem; line-height: 1.55; }
.tts__bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tts__sample { margin-top: 8px; }
.tts__count { font-size: .82rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.captions { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.captions__bar { display: flex; flex-wrap: wrap; gap: 8px; }
.captions__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; max-height: 420px; overflow-y: auto; }
.captions__list:empty { display: none; }
.captions__list--read .captions__item { display: block; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font-size: 0.92rem; }
.media-report .captions { display: grid; gap: 10px; margin-top: 14px; text-align: left; }
.captions__item { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; }
.captions__time { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); font: 600 0.78rem/1.2 var(--font); font-variant-numeric: tabular-nums; cursor: pointer; white-space: nowrap; }
.captions__time:hover { border-color: var(--brand); }
.captions__text { min-height: 2.6em; resize: vertical; font-size: 0.92rem; }
.captions__remove { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--text-muted); cursor: pointer; }
.captions__remove:hover { background: var(--surface-2); color: var(--danger, #dc2626); }
.captions__remove svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 520px) { .captions__item { grid-template-columns: 1fr auto; } .captions__time { grid-column: 1 / -1; justify-self: start; } }
.notice--info { margin: 0; max-width: none; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); font-weight: 500; font-size: 0.82rem; }
.media-player { position: relative; }
.media-overlay { position: absolute; pointer-events: none; }

/* Caption look (Auto Subtitles): presets, colours, and the draggable preview over the video */
.caption-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.caption-preset { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 600 0.78rem/1.2 var(--font); cursor: pointer; }
.caption-preset:hover { border-color: var(--brand); }
.caption-preset[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
.caption-preset__sample { display: grid; place-items: center; width: 100%; height: 34px; border-radius: 6px; background-color: #64748b; background-image: linear-gradient(135deg, #475569, #94a3b8); font: 800 1.05rem/1 var(--font); }
.caption-preset__sample[style*="background:"] { background-image: none; }
.caption-checks { margin-top: 8px; }
.caption-colours { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.caption-colours select { width: auto; flex: 1 1 110px; }
.caption-places { display: flex; flex-wrap: wrap; gap: 6px; }
.caption-layer { position: absolute; pointer-events: none; overflow: hidden; }
.caption-preview { position: absolute; transform: translate(-50%, -50%); max-width: 90%; width: max-content; text-align: center; line-height: 1.25; border-radius: 4px; pointer-events: auto; cursor: grab; touch-action: none; user-select: none; outline: 1px dashed rgb(255 255 255 / 0.55); outline-offset: 3px; overflow-wrap: break-word; }
.caption-preview:focus-visible { outline: 2px solid #fff; }
.caption-preview.is-dragging { cursor: grabbing; outline-color: #fff; }
.rw-frame { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.rw-frame__title { font-size: 0.92rem; align-self: center; }
.rw-frame__editor:has(.re-stage) { display: flex; justify-content: center; padding: 8px; border-radius: 10px; background: var(--surface-2); }

/* ==========================================================================
   Design refresh (Nov 2026, "professional grid"): one brand blue, flat white cards with filled icons, segmented
   tabs, no decorative dots, gradients or NEW badges. Only the look changes here: markup, content and every script
   hook stay as they were. Ad slots keep their reserved sizes.
   ========================================================================== */
:root {
  --brand: #1d4ed8;
  --brand-strong: #1e40af;
  --brand-soft: #eef2fe;
  --on-brand: #ffffff;
  --bg: #ffffff;
  --band: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #f1f3f7;
  --border: #e6e8ee;
  --text: #111827;
  --text-muted: #4b5563;
  --font-display: var(--font);
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent);
  --shadow-xs: 0 1px 2px rgb(16 24 40 / 0.05);
  --shadow-card-hover: 0 8px 24px -8px rgb(16 24 40 / 0.14);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #7ea2ff; --brand-strong: #a3bdff; --brand-soft: #1a2547; --on-brand: #0b1220;
    --bg: #0d1017; --band: #131722; --surface: #151a25; --surface-2: #1c2230; --border: #272e3e;
    --text: #e8ecf4; --text-muted: #a3acc0;
    --shadow-card-hover: 0 8px 24px -8px rgb(0 0 0 / 0.6);
  }
}
:root[data-theme="dark"] {
  --brand: #7ea2ff; --brand-strong: #a3bdff; --brand-soft: #1a2547; --on-brand: #0b1220;
  --bg: #0d1017; --band: #131722; --surface: #151a25; --surface-2: #1c2230; --border: #272e3e;
  --text: #e8ecf4; --text-muted: #a3acc0;
  --shadow-card-hover: 0 8px 24px -8px rgb(0 0 0 / 0.6);
}
/* One brand everywhere: suite pages keep their colour for icons and accents (--suite), not for buttons and links. */
body.suite-image, body.suite-data, body.suite-media { --brand: inherit; --brand-strong: inherit; --brand-soft: inherit; }
body.suite-image .btn--primary, body.suite-data .btn--primary, body.suite-media .btn--primary { background: var(--brand); color: var(--on-brand); }
body.suite-image .btn--primary:hover, body.suite-data .btn--primary:hover, body.suite-media .btn--primary:hover { background: var(--brand-strong); }
:where(body.suite-image, body.suite-data, body.suite-media) a { color: var(--brand); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.suite-data .btn--primary,
  :root:not([data-theme="light"]) body.suite-media .btn--primary,
  :root:not([data-theme="light"]) body.suite-image .btn--primary { color: var(--on-brand); background: var(--brand); }
}
:root[data-theme="dark"] body.suite-data .btn--primary,
:root[data-theme="dark"] body.suite-media .btn--primary,
:root[data-theme="dark"] body.suite-image .btn--primary { color: var(--on-brand); background: var(--brand); }

h1 { font-weight: 800; letter-spacing: -0.03em; }
.btn { border-radius: 10px; }
.btn--primary { box-shadow: 0 1px 2px rgb(16 24 40 / 0.12); }
.btn--primary:hover { box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 60%, transparent); }

/* Header: plain links, no coloured dots. */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.nav-suite__dot { display: none; }
.nav-suite__tab:hover, .nav-suite__tab.is-current { background: var(--surface-2); color: var(--text); }
.mega__heading::before { display: none; }
.mega .mega__promo { background: var(--band) !important; border: 1px solid var(--border); }
.mega__promo-cta { color: var(--brand); }

/* Chips: no dots; quiet outline. */
.chip::before { display: none; }
.chip { background: var(--surface); border-color: var(--border); }
.chip:hover { border-color: var(--brand); color: var(--text); }

/* Homepage hero: a calm band with the search box. */
.hero { background: var(--band); border-bottom: 1px solid var(--border); padding: 52px 0 40px; }
.hero__title { font-size: clamp(1.9rem, 1.1rem + 3vw, 2.75rem); line-height: 1.12; }
.hero__lead { color: var(--text-muted); }
.hero__facts { color: var(--text-muted); }
.hero__facts svg { stroke: var(--text-muted); }
.hub-search__input { border-radius: 12px; border: 1px solid #d9dde5; box-shadow: var(--shadow-xs); }
:root[data-theme="dark"] .hub-search__input { border-color: var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hub-search__input { border-color: var(--border); } }
.hub-search__input:focus { border-color: var(--brand); box-shadow: var(--focus-ring); }
.hub-suggest { border-radius: 12px; }

/* Homepage suite cards: flat, no glow, no NEW badge. */
.suite-card { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.suite-card:hover { transform: none; border-color: var(--suite); box-shadow: var(--shadow-card-hover); }
.suite-card__badge { display: none; }
.suite-card__tool { background: var(--surface-2); }

/* Category filter: a segmented control (grey track, the chosen one white). */
.filter-chips { gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.chip--filter { border: 0; background: transparent; color: var(--text-muted); font-weight: 600; padding: 8px 14px; border-radius: 9px; }
.chip--filter:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.chip--filter[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(16 24 40 / 0.12); }
.chip--filter[aria-current="true"] .chip__count { color: var(--text-muted); opacity: 1; }

/* Tool cards: white, filled icon, name, one line; the in-browser/cloud/popular notes as quiet text. */
.tool-card { padding: 22px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-xs); }
.tool-card:hover { transform: none; border-color: var(--brand); box-shadow: var(--shadow-card-hover); }
.tool-card__name { font-family: var(--font); font-size: 1.05rem; letter-spacing: -0.01em; }
.tool-icon { background: var(--cat); color: #ffffff; border-radius: 11px; }
.tool-icon svg { stroke-width: 2; }
.tag, .tag--client, .tag--server, .tag--memory, .tag--popular {
  background: none; padding: 0; border-radius: 0; color: var(--text-muted); font-weight: 600; font-size: 0.76rem; letter-spacing: 0;
}
.tool-card__meta { gap: 0; }
.tool-card__meta .tag + .tag::before { content: "·"; margin: 0 6px; }

/* Tool page: the title block and a clean drop zone with one strong button. */
.tool-hero h1 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.5rem); }
.engine-badge { background: transparent; border: 0; padding: 0; color: var(--text-muted); font-weight: 500; }
.dropzone {
  background: var(--surface); border: 2px dashed #c9d3e6; border-radius: 16px;
}
:root[data-theme="dark"] .dropzone { border-color: #34405a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dropzone { border-color: #34405a; } }
.dropzone:hover, .dropzone.is-dragover { background: var(--brand-soft); border-color: var(--brand); }
.dropzone::before { display: none; }
.dropzone__icon { animation: none; color: var(--brand); stroke: var(--brand); }
.dropzone .btn--primary { padding: 14px 32px; font-size: 1.05rem; box-shadow: 0 4px 12px -2px color-mix(in srgb, var(--brand) 40%, transparent); }
body.is-dragging-file .dropzone { border-color: var(--brand); }
.ws-panel, .card { border-color: var(--border); }
.preset-chip { border-color: var(--border); }
.size-links .preset-chip:hover { border-color: var(--brand); }

/* Phones: a little tighter. */
@media (max-width: 640px) {
  .hero { padding: 36px 0 28px; }
  .tool-card { padding: 16px; }
  .filter-chips { border-radius: 10px; }
}

/* Homepage hero, modern: a soft brand glow from the top and a faint grid that fades out (CSS only, no image). */
.hero {
  position: relative; overflow: hidden; isolation: isolate; padding: 72px 0 56px;
  background: radial-gradient(60% 75% at 50% 0%, color-mix(in srgb, var(--brand) 11%, transparent), transparent 72%), var(--band);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 65% 70% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 65% 70% at 50% 0%, #000 20%, transparent 75%);
}
.hero__title { max-width: 920px; margin-inline: auto; font-size: clamp(2.1rem, 1.1rem + 3.6vw, 3.5rem); line-height: 1.05; letter-spacing: -0.04em; }
.hero__lead { max-width: 700px; margin: 18px auto 0; font-size: 1.1rem; line-height: 1.65; text-wrap: pretty; }
.hero__title { text-wrap: balance; }
.hero__facts { margin-top: 24px; gap: 10px; }
.hero__facts li {
  padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 0.85rem; font-weight: 500; box-shadow: var(--shadow-xs);
}
.hero__facts svg { width: 16px; height: 16px; stroke: var(--brand); }
.hero .hub-search { max-width: 680px; margin-top: 30px; }
.hero .hub-search__input {
  height: 62px; border-radius: 14px; font-size: 1.02rem;
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 12px 32px -12px rgb(16 24 40 / 0.18);
}
.hero__chips { margin-top: 20px; gap: 8px; }
.hero__chips-label { font-size: 0.85rem; }
.hero__chips .chip {
  padding: 6px 12px; font-size: 0.82rem; font-weight: 500;
  background: color-mix(in srgb, var(--surface) 75%, transparent); border-color: var(--border);
}
.hero__chips .chip:hover { border-color: var(--brand); color: var(--brand); background: var(--surface); }
@media (max-width: 640px) {
  .hero { padding: 44px 0 36px; }
  .hero__lead { font-size: 1rem; }
  .hero__facts { gap: 8px; }
  .hero__facts li { font-size: 0.8rem; padding: 5px 10px; }
  .hero .hub-search__input { height: 56px; }
}

/* Computers: the heading on one line and the lead in two, like the big tool sites; phones wrap as before. */
@media (min-width: 1100px) {
  .hero__title { max-width: none; font-size: 2.65rem; white-space: nowrap; }
  .hero__inner { max-width: 1120px; }
  .hero__chips { max-width: 860px; margin-inline: auto; }
  .hero__lead { max-width: 1060px; font-size: 1.08rem; text-wrap: balance; }
}

/* Header menu, modern and even: every group (PDF, Image, Data & Excel, Video & Audio, Guides) looks the same;
   an underline marks the open or current one; the panels are soft cards with quiet headings. */
@media (min-width: 1024px) {
  .nav-suite--first::before { display: none; }
  .nav-list { gap: 4px; }
  .nav-list > li { display: flex; align-items: center; height: 100%; }
  .nav-link, .nav-suite__tab {
    position: relative; height: 100%; padding: 0 12px; border-radius: 0; background: none !important;
    color: var(--text-muted); font-weight: 600; font-size: 0.92rem;
  }
  .nav-link::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px;
    background: var(--brand); transform: scaleX(0); transition: transform 0.18s ease;
  }
  .nav-link:hover, .has-mega.is-open > .nav-link, .nav-suite__tab.is-current { color: var(--text); }
  .has-mega.is-open > .nav-link::after, .nav-suite__tab.is-current::after { transform: scaleX(1); }
  @media (hover: hover) { .has-mega:hover > .nav-link { color: var(--text); } .has-mega:hover > .nav-link::after { transform: scaleX(1); } }
  .nav-link .chevron { width: 14px; height: 14px; opacity: 0.7; }

  .has-mega.is-open > .mega, .has-mega:hover > .mega {
    padding: 28px; gap: 28px; border-radius: 16px; border-color: var(--border);
    box-shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 24px 48px -12px rgb(16 24 40 / 0.22);
  }
}
.mega__heading { margin: 0 0 10px; font-size: 0.72rem; letter-spacing: 0.08em; color: var(--text-muted); }
.mega a { padding: 7px 10px; margin-inline: -10px; border-radius: 8px; font-size: 0.92rem; font-weight: 500; transition: background-color 0.12s, color 0.12s; }
.mega a:hover { background: var(--surface-2); color: var(--brand); }
.mega .mega__promo { box-shadow: none; }
.mega .mega__promo:hover { border-color: var(--brand); color: var(--text); }
.mega__promo-title { font-family: var(--font); font-weight: 700; }

/* Phones and tablets: the drawer lists the groups as even rows. */
@media (max-width: 1023.98px) {
  .nav-list > li { border-bottom: 1px solid var(--border); }
  .nav-list > li:last-child { border-bottom: 0; }
  .nav-link { font-weight: 600; border-radius: 10px; }
  .nav-suite--first::before { display: none; }
}
/* A long group (9+ tools) takes two columns side by side, so the panel stays short. */
@media (min-width: 1024px) {
  .mega__col:has(> ul > li:nth-child(9)) { grid-column: span 2; }
  .mega__col:has(> ul > li:nth-child(9)) > ul { columns: 2; column-gap: 28px; }
  .mega__col > ul > li { break-inside: avoid; }
}

/* Menu colour (asked for): each group shows its colour dot in the bar and a tinted pill when open or current;
   the panel headings carry the group's colour and dot. */
:root { --pdf-accent: #e5322d; }
:root[data-theme="dark"] { --pdf-accent: #ff6b66; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pdf-accent: #ff6b66; } }
.nav-suite__dot {
  display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%;
  background: var(--suite); box-shadow: 0 0 0 3px color-mix(in srgb, var(--suite) 22%, transparent);
}
@media (min-width: 1024px) {
  .nav-link::after { display: none; }
  .nav-link, .nav-suite__tab { height: auto; padding: 8px 12px; border-radius: 10px; color: var(--text); gap: 8px; }
  .nav-suite__tab:hover, .has-mega.is-open > .nav-suite__tab, .nav-suite__tab.is-current {
    background: color-mix(in srgb, var(--suite) 12%, transparent) !important;
    color: color-mix(in srgb, var(--suite) 55%, var(--text));
  }
  @media (hover: hover) {
    .has-mega:hover > .nav-suite__tab { background: color-mix(in srgb, var(--suite) 12%, transparent) !important; color: color-mix(in srgb, var(--suite) 55%, var(--text)); }
  }
  .nav-link--plain:hover { background: var(--surface-2) !important; }
}
.mega__heading { display: flex; align-items: center; gap: 8px; color: color-mix(in srgb, var(--cat, var(--suite, var(--brand))) 70%, var(--text)); font-weight: 800; }
.mega__heading::before {
  display: block; content: ""; width: 9px; height: 9px; flex: none; border-radius: 50%;
  background: var(--cat, var(--suite, var(--brand)));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat, var(--suite, var(--brand))) 20%, transparent);
}

/* Footer in the logo's colours: deep navy, an indigo glow on one side and an emerald one on the other, and the
   logo's indigo→emerald line along the top. The footer re-defines the colour tokens for itself, so everything in
   it (links, notification switch, Install button) follows, in light and dark themes alike. */
.site-footer {
  --text: #eef1f8; --text-muted: #a9b3c9; --border: rgb(255 255 255 / 0.1);
  --surface: rgb(255 255 255 / 0.04); --surface-2: rgb(255 255 255 / 0.08);
  --brand: #8ea9ff; --brand-strong: #b4c6ff; --brand-soft: rgb(142 169 255 / 0.14); --on-brand: #0b1220;
  --footer-accent: #34d399;
  position: relative; margin-top: 48px; padding-top: 56px; border-top: 0; color: var(--text);
  background:
    radial-gradient(45% 60% at 0% 0%, rgb(99 102 241 / 0.28), transparent 70%),
    radial-gradient(40% 55% at 100% 100%, rgb(16 185 129 / 0.20), transparent 70%),
    #0c1330;
}
.site-footer::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, #6366f1, #10b981);
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover, .site-footer .footer-col a:hover { color: var(--footer-accent); text-decoration: none; }
.site-footer .logo, .site-footer .logo__text { color: #ffffff; }
.footer-brand p { color: var(--text-muted); }
.footer-col__title { color: #ffffff; font-weight: 700; letter-spacing: 0.01em; }
.footer-col__title a { color: #ffffff; text-decoration: none; }
.footer-col__title a:hover { color: var(--footer-accent); }
.footer-col a, .footer-col .link-btn { color: var(--text-muted); }
.footer-col .link-btn:hover { color: var(--footer-accent); }
.privacy-badge svg { stroke: var(--footer-accent); }
.social-links a { border-color: var(--border); background: var(--surface); color: var(--text-muted); }
.social-links a:hover, .social-links a:focus-visible { color: #ffffff; border-color: var(--footer-accent); background: rgb(16 185 129 / 0.16); }
.site-footer .notify-box { background: rgb(255 255 255 / 0.05); border-color: var(--border); backdrop-filter: none; }
.site-footer .switch input:checked + .switch__track { background: var(--footer-accent); }
.footer-bottom { border-top-color: var(--border); color: var(--text-muted); }

/* Footer, modern layout: small caps titles with the logo's gradient bar, an even grid of link columns (five a
   row on computers, so the ten groups make two clean rows), roomier links that slide a little on hover. */
.site-footer { padding-top: 64px; }
.footer-top { gap: 48px; }
@media (min-width: 1024px) { .footer-top { grid-template-columns: 280px minmax(0, 1fr); } }
.footer-brand .logo { font-size: 1.35rem; }
.footer-brand > p:first-of-type { margin-top: 14px; font-size: 0.95rem; line-height: 1.6; }
.footer-links { gap: 36px 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .footer-links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .footer-links { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.footer-col__title {
  position: relative; margin: 0 0 16px; padding-bottom: 10px;
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #ffffff;
}
.footer-col__title::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #6366f1, #10b981);
}
.footer-col ul { gap: 9px; }
.footer-col a, .footer-col .link-btn { font-size: 0.9rem; display: inline-block; transition: color 0.15s, transform 0.15s; }
.footer-col a:hover, .footer-col .link-btn:hover { transform: translateX(2px); }
.site-footer .notify-box { border-radius: 14px; }
.footer-bottom { margin-top: 48px; padding-block: 22px; font-size: 0.84rem; }
@media (max-width: 639px) {
  .site-footer { padding-top: 48px; }
  .footer-links { gap: 28px 20px; }
}
/* Suite titles that are links look exactly like the other titles; eleven groups sit four a row (4·4·3) so none is left alone. */
.site-footer .footer-col .footer-col__title a {
  display: inline; font-size: inherit; font-weight: inherit; letter-spacing: inherit; color: #ffffff;
  text-decoration: none; transform: none;
}
.site-footer .footer-col .footer-col__title a:hover { color: var(--footer-accent); }
@media (min-width: 1100px) { .footer-links { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 36px; } }

/* Search results on the homepage were cut off by the hero box: the hero no longer clips, and sits above the
   sections after it so the list drops over them. The grid layer is inset 0, so nothing spills out. */
.hero { overflow: visible; z-index: 2; }

/* Header bar, glass style (chosen over the tinted bar): a frosted white (dark: frosted night) bar with a hairline and a
   soft shadow; hover and open menus use a quiet neutral pill (the colour dots carry the colour); the round
   buttons sit in small outlined boxes. Phones keep a solid bar, because blur would clip the side drawer. */
.site-header {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 8px 24px -12px rgb(15 23 42 / 0.14);
}
@media (min-width: 1024px) {
  .site-header { background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); }
  .nav-suite__tab:hover, .has-mega.is-open > .nav-suite__tab, .nav-suite__tab.is-current {
    background: color-mix(in srgb, var(--text) 6%, transparent) !important; color: var(--text);
  }
  @media (hover: hover) {
    .has-mega:hover > .nav-suite__tab { background: color-mix(in srgb, var(--text) 6%, transparent) !important; color: var(--text); }
  }
}
.header-actions > .icon-btn:not(.nav-burger) { border: 1px solid color-mix(in srgb, var(--text) 12%, transparent); border-radius: 10px; }
.header-actions > .icon-btn:not(.nav-burger):hover { background: color-mix(in srgb, var(--text) 5%, transparent); }

/* Tool pages, modern (asked for; content unchanged): the hero is a soft rounded band in the tool's category colour
   with the same faded grid as the homepage; the drop box is tinted in that colour; the guide below gets numbered
   step circles, tick lists, option cards side by side and FAQ cards with a +/− toggle. Ad slots are untouched. */
.tool-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 40px 24px 30px; margin-bottom: 28px; border: 1px solid var(--border); border-radius: 24px;
  background: radial-gradient(60% 90% at 50% 0%, color-mix(in srgb, var(--cat, var(--brand)) 13%, transparent), transparent 72%), var(--band);
}
.tool-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 0%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 80% at 50% 0%, #000 15%, transparent 75%);
}
.tool-hero .tool-icon {
  width: 64px; height: 64px; margin-bottom: 16px; border-radius: 18px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--cat, var(--brand)) 14%, transparent), 0 10px 24px -8px color-mix(in srgb, var(--cat, var(--brand)) 55%, transparent);
}
.tool-hero .tool-icon svg { width: 32px; height: 32px; }
.tool-hero h1 { margin: 0; font-size: clamp(2rem, 1.3rem + 2.4vw, 2.9rem); letter-spacing: -0.035em; line-height: 1.1; }
.tool-hero > p:not(.notice) { margin-top: 10px; font-size: 1.08rem; line-height: 1.6; text-wrap: balance; }
.tool-hero .engine-badge {
  margin-top: 14px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: 0.84rem; box-shadow: var(--shadow-xs);
}
.tool-hero .notice { margin-top: 14px; }

.workspace .dropzone {
  border-color: color-mix(in srgb, var(--cat, var(--brand)) 38%, var(--border));
  background: color-mix(in srgb, var(--cat, var(--brand)) 4%, var(--surface));
  border-radius: 18px; transition: border-color 0.15s, background-color 0.15s;
}
.workspace .dropzone:hover, .workspace .dropzone.is-dragover {
  border-color: var(--cat, var(--brand)); background: color-mix(in srgb, var(--cat, var(--brand)) 8%, var(--surface));
}
.workspace .dropzone svg { color: var(--cat, var(--brand)); stroke: currentColor; }
.workspace .dropzone__title { font-size: 1.2rem; letter-spacing: -0.01em; }

.tool-page .section__title { font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.65rem); letter-spacing: -0.025em; margin: 36px 0 14px; }
.tool-page .section > .section__title:first-child { margin-top: 0; }
.tool-about, .guide-text p { max-width: 760px; line-height: 1.7; }

.tool-page .steps { counter-reset: step; list-style: none; padding: 0; gap: 12px; max-width: 820px; }
.tool-page .steps > li {
  counter-increment: step; position: relative; padding: 14px 16px 14px 60px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); line-height: 1.6;
}
.tool-page .steps > li::before {
  content: counter(step); position: absolute; left: 16px; top: 13px; width: 30px; height: 30px;
  display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 0.9rem;
  background: color-mix(in srgb, var(--cat, var(--brand)) 14%, transparent); color: color-mix(in srgb, var(--cat, var(--brand)) 75%, var(--text));
}

.tool-page .guide-list { list-style: none; padding: 0; gap: 10px; }
.tool-page .guide-list > li { position: relative; padding-left: 32px; }
.tool-page .guide-list > li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: color-mix(in srgb, var(--cat, var(--brand)) 14%, transparent);
}
.tool-page .guide-list > li::after {
  content: ""; position: absolute; left: 7px; top: 6px; width: 5px; height: 9px;
  border: solid color-mix(in srgb, var(--cat, var(--brand)) 80%, var(--text)); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.tool-page .guide-options { max-width: none; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.tool-page .guide-options__item {
  position: relative; padding: 18px 18px 16px; border-radius: 16px; overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tool-page .guide-options__item::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--cat, var(--brand)); opacity: 0.8;
}
.tool-page .guide-options__item:hover { border-color: color-mix(in srgb, var(--cat, var(--brand)) 40%, var(--border)); box-shadow: var(--shadow-sm, 0 4px 14px rgb(15 23 42 / 0.06)); }
.tool-page .guide-options dt { font-size: 1.02rem; }

.tool-page .faq { display: grid; gap: 10px; max-width: 860px; }
.tool-page .faq__item { border-radius: 14px; transition: border-color 0.15s, box-shadow 0.15s; }
.tool-page .faq__item summary {
  position: relative; list-style: none; padding: 16px 52px 16px 18px; font-size: 1rem;
}
.tool-page .faq__item summary::-webkit-details-marker { display: none; }
.tool-page .faq__item summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  background: var(--surface-2); color: var(--text-muted); font-weight: 600; font-size: 1.1rem; line-height: 1;
}
.tool-page .faq__item[open] { border-color: color-mix(in srgb, var(--cat, var(--brand)) 40%, var(--border)); box-shadow: 0 6px 20px -10px rgb(15 23 42 / 0.18); }
.tool-page .faq__item[open] summary::after {
  content: "−"; background: color-mix(in srgb, var(--cat, var(--brand)) 14%, transparent); color: color-mix(in srgb, var(--cat, var(--brand)) 80%, var(--text));
}
.tool-page .faq__item p { padding: 0 18px 16px; line-height: 1.65; }

@media (max-width: 639px) {
  .tool-hero { padding: 28px 16px 22px; border-radius: 18px; }
  .tool-hero .tool-icon { width: 56px; height: 56px; border-radius: 16px; }
  .tool-page .steps > li { padding-left: 54px; }
}
/* Guides under a tool: link rows with an arrow instead of a bullet list. */
.tool-page .guide-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tool-page .guide-links > li > a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  color: var(--text); font-weight: 600; line-height: 1.45; text-decoration: none; transition: border-color 0.15s, color 0.15s;
}
.tool-page .guide-links > li > a::after { content: "→"; flex: none; color: var(--text-muted); transition: transform 0.15s, color 0.15s; }
.tool-page .guide-links > li > a:hover { border-color: color-mix(in srgb, var(--cat, var(--brand)) 45%, var(--border)); color: color-mix(in srgb, var(--cat, var(--brand)) 70%, var(--text)); }
.tool-page .guide-links > li > a:hover::after { transform: translateX(3px); color: var(--cat, var(--brand)); }
@media (max-width: 639px) { .tool-page .guide-links { grid-template-columns: 1fr; } }
/* Phones: the header is fully solid (text behind it showed through), and the badge wraps neatly. */
@media (max-width: 1023.98px) { .site-header { background: var(--surface); } }
@media (max-width: 639px) { .tool-hero .engine-badge { border-radius: 14px; padding: 8px 14px; line-height: 1.45; } }
/* The hero and the drop box looked like two equal boxes: the hero is now open (no border, no panel), only a soft
   glow behind the icon, so the drop box is the one clear box on the page, lifted with a shadow. */
.tool-hero {
  border: 0; border-radius: 0; overflow: visible; padding: 8px 0 4px; margin-bottom: 24px;
  background: radial-gradient(38% 70% at 50% 0%, color-mix(in srgb, var(--cat, var(--brand)) 12%, transparent), transparent 70%);
}
.tool-hero::before { display: none; }
.workspace .ws-panel--upload { box-shadow: 0 1px 2px rgb(15 23 42 / 0.05), 0 18px 40px -18px color-mix(in srgb, var(--cat, var(--brand)) 40%, rgb(15 23 42 / 0.3)); }
@media (max-width: 639px) { .tool-hero { padding: 4px 0 0; border-radius: 0; } }
/* Phones: the badge is plain text with its dot, not one more box. */
@media (max-width: 639px) { .tool-hero .engine-badge { border: 0; background: none; box-shadow: none; padding: 0 8px; font-size: 0.86rem; color: var(--text-muted); } }

/* Guides list and guide pages, modern (asked for; text unchanged). */
/* List: wider page, two cards a row, the whole card clickable, titles in ink (blue on hover), group headings with
   the logo's gradient bar. */
.prose:has(> .guide-index) { max-width: 1120px; }
.prose:has(> .guide-index) > h1 { font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.2rem); letter-spacing: -0.04em; margin-bottom: 10px; }
.prose:has(> .guide-index) > h1 + p { max-width: 760px; font-size: 1.08rem; color: var(--text-muted); }
.prose:has(> .guide-index) > h2 {
  position: relative; margin-top: 44px; padding-bottom: 10px; font-size: 1.35rem; letter-spacing: -0.02em;
}
.prose:has(> .guide-index) > h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, #6366f1, #10b981);
}
.guide-index { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px; margin-top: 18px; }
.guide-index__item {
  position: relative; display: flex; flex-direction: column; margin: 0; padding: 20px 22px;
  border-radius: 16px; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.guide-index__item:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  box-shadow: 0 14px 30px -16px rgb(15 23 42 / 0.25); transform: translateY(-2px);
}
.guide-index__title { color: var(--text); text-decoration: none; font-size: 1.06rem; line-height: 1.4; letter-spacing: -0.01em; }
.guide-index__title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.guide-index__item:hover .guide-index__title { color: var(--brand); }
.guide-index__item p { color: var(--text-muted); font-size: 0.94rem; line-height: 1.6; }
.guide-index__item .updated { margin-top: auto; padding-top: 12px; font-size: 0.82rem; }

/* A guide: big title, the byline as a quiet line, a larger intro, roomy headings, numbered step circles, a cleaner
   table, softer links, and "More guides" as link cards. Reading width stays narrow. */
.guide > h1 { font-size: clamp(2rem, 1.3rem + 2.2vw, 2.8rem); letter-spacing: -0.035em; line-height: 1.12; text-wrap: balance; }
.guide > .updated { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 0.86rem; }
.guide > .updated::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #10b981); }
.guide .guide__intro { font-size: 1.14rem; line-height: 1.75; color: var(--text); padding-bottom: 8px; }
.guide h2 { margin-top: 2em; font-size: 1.45rem; letter-spacing: -0.02em; }
.guide a:not(.btn) { text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.guide a:not(.btn):hover { text-decoration-color: currentColor; }
.guide .guide__steps { counter-reset: gstep; list-style: none; padding: 0; gap: 12px; }
.guide .guide__steps > li {
  counter-increment: gstep; position: relative; margin: 0; padding: 14px 16px 14px 58px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
}
.guide .guide__steps > li::before {
  content: counter(gstep); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px;
  display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 0.85rem;
  background: var(--brand-soft, color-mix(in srgb, var(--brand) 12%, transparent)); color: var(--brand);
}
.guide .guide__table { border-radius: 14px; box-shadow: 0 1px 2px rgb(15 23 42 / 0.04); }
.guide .guide__table thead th {
  background: color-mix(in srgb, var(--brand) 7%, var(--surface)); color: var(--text);
  font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase;
}
.guide .guide__table tbody tr:nth-child(even) > * { background: color-mix(in srgb, var(--text) 2.5%, transparent); }
.guide .guide__table tbody tr:hover > * { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.guide .faq { display: grid; gap: 10px; }
.guide .faq__item summary { position: relative; list-style: none; padding: 16px 52px 16px 18px; }
.guide .faq__item summary::-webkit-details-marker { display: none; }
.guide .faq__item summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px;
  display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--text-muted); font-weight: 600;
}
.guide .faq__item[open] { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.guide .faq__item[open] summary::after { content: "−"; background: var(--brand-soft, color-mix(in srgb, var(--brand) 12%, transparent)); color: var(--brand); }
.guide .faq__item p { padding: 0 18px 16px; }

/* "More guides" under a guide: link cards with an arrow. */
.prose > h2:first-child + ul:not([class]) { list-style: none; padding: 0; display: grid; gap: 10px; }
.prose > h2:first-child + ul:not([class]) > li { margin: 0; }
.prose > h2:first-child + ul:not([class]) > li > a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text);
  font-weight: 600; line-height: 1.45; text-decoration: none; transition: border-color 0.15s, color 0.15s;
}
.prose > h2:first-child + ul:not([class]) > li > a::after { content: "→"; flex: none; color: var(--text-muted); transition: transform 0.15s; }
.prose > h2:first-child + ul:not([class]) > li > a:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); color: var(--brand); }
.prose > h2:first-child + ul:not([class]) > li > a:hover::after { transform: translateX(3px); color: var(--brand); }
@media (max-width: 639px) { .guide .guide__steps > li { padding-left: 52px; } .guide-index__item { padding: 18px; } }
.prose .guide-index { padding: 0; margin-left: 0; }
.prose .guide-index__title, .prose .guide-index__title:hover { text-decoration: none; }
.prose .guide-index__item { margin-bottom: 0; }
.prose a.guide-index__title:not(.btn), .prose > h2:first-child + ul:not([class]) > li > a:not(.btn) { text-decoration: none; }

/* About, Privacy, Terms and Contact, modern (asked for; text unchanged): a big title with the logo's gradient bar,
   a larger first paragraph, headings with a small gradient mark, tick lists, and a lifted contact form. */
.info-page > h1 {
  position: relative; margin-bottom: 18px; padding-bottom: 16px;
  font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.1rem); letter-spacing: -0.04em; line-height: 1.08;
}
.info-page > h1::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, #6366f1, #10b981);
}
.info-page > h1 + p, .info-page > h1 + .updated + p { font-size: 1.12rem; line-height: 1.75; color: var(--text); }
.info-page > .updated {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 5px 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 0.82rem;
}
.info-page > .updated::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #10b981; }
.info-page h2 {
  display: flex; align-items: center; gap: 12px; margin-top: 2.2em; font-size: 1.4rem; letter-spacing: -0.02em;
}
.info-page h2::before {
  content: ""; flex: none; width: 6px; height: 1.1em; border-radius: 3px; background: linear-gradient(180deg, #6366f1, #10b981);
}
.info-page p { line-height: 1.75; }
.info-page ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.info-page ul > li { position: relative; margin: 0; padding-left: 32px; line-height: 1.7; }
.info-page ul > li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-soft, color-mix(in srgb, var(--brand) 12%, transparent));
}
.info-page ul > li::after {
  content: ""; position: absolute; left: 7px; top: 8px; width: 5px; height: 9px;
  border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.info-page a:not(.btn) { text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.info-page a:not(.btn):hover { text-decoration-color: currentColor; }

.info-page .contact-form {
  gap: 18px; margin: 1.6em 0; padding: 28px; border-radius: 20px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.05), 0 22px 44px -22px rgb(29 78 216 / 0.35);
}
.info-page .contact-form .field label { font-size: 0.9rem; }
.info-page .contact-form .input {
  min-height: 48px; border-radius: 12px; background: var(--surface-2, var(--surface));
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.info-page .contact-form .input:focus {
  outline: none; background: var(--surface); border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
}
.info-page .contact-form textarea.input { min-height: 160px; padding-top: 12px; }
.info-page .contact-form .btn { min-height: 48px; padding-inline: 26px; border-radius: 12px; font-size: 1rem; }
@media (max-width: 639px) { .info-page .contact-form { padding: 20px 16px; border-radius: 16px; } .info-page .contact-form .btn { justify-self: stretch; } }

/* Suite hubs (PDF, Image, Data & Excel, Video & Audio), modern (asked for; text unchanged): the hero matches the
   homepage (glow + faded grid, fact pills), the category bar sticks under the header as a pill bar with coloured
   dots, section headings carry a count and the suite's gradient bar, cards lift on hover, numbered steps. */
.suite-hero { position: relative; isolation: isolate; overflow: hidden; }
.suite-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 60% 75% at 50% 0%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 75% at 50% 0%, #000 15%, transparent 75%);
}
.suite-hero { background: radial-gradient(55% 80% at 50% 0%, color-mix(in srgb, var(--suite, var(--brand)) 14%, transparent), transparent 72%), var(--band); }
.suite-hero__title { font-size: clamp(2.1rem, 1.2rem + 3.2vw, 3.4rem); letter-spacing: -0.04em; line-height: 1.06; text-wrap: balance; }
.suite-hero__lead { font-size: 1.1rem; line-height: 1.65; text-wrap: pretty; }
.suite-hero__facts { gap: 10px; }
.suite-hero__facts li {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--text); font-size: 0.85rem; font-weight: 500; box-shadow: var(--shadow-xs);
}
.suite-hero__facts svg { stroke: var(--suite, var(--brand)); }

.suite-jump {
  position: sticky; top: calc(var(--header-h) + 8px); z-index: 20;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: fit-content; max-width: 100%;
  margin: 8px auto 8px; padding: 6px; border: 1px solid var(--border); border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.5) blur(12px);
  box-shadow: 0 10px 30px -18px rgb(15 23 42 / 0.35);
}
.suite-jump .chip--filter {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 0; border-radius: 999px;
  background: none; color: var(--text); font-weight: 600; font-size: 0.9rem; text-decoration: none;
}
.suite-jump .chip--filter::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cat, var(--suite));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat, var(--suite)) 20%, transparent);
}
.suite-jump .chip--filter:hover { background: color-mix(in srgb, var(--cat, var(--suite)) 10%, transparent); }
.suite-jump .chip__count {
  min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2);
  color: var(--text-muted); font-size: 0.75rem; font-weight: 700; text-align: center;
}
@media (max-width: 767px) {
  .suite-jump { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; border-radius: 14px; scrollbar-width: none; }
  .suite-jump::-webkit-scrollbar { display: none; }
  .suite-jump .chip--filter { flex: none; }
}
.suite-section { scroll-margin-top: calc(var(--header-h) + 80px); }
.suite-section__title {
  position: relative; display: flex; align-items: center; gap: 10px;
  margin: 44px 0 18px; padding-bottom: 12px; font-size: 1.45rem; letter-spacing: -0.02em;
}
.suite-section__title::before { display: none; }
.suite-section__title::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--suite, var(--brand)), color-mix(in srgb, var(--suite, var(--brand)) 30%, #10b981));
}
.suite-body .hub-item > a, .suite-body .hub-item > .tool-card { transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.suite-body .hub-item > a:hover, .suite-body .hub-item > .tool-card:hover {
  transform: translateY(-3px); border-color: color-mix(in srgb, var(--suite, var(--brand)) 45%, var(--border));
  box-shadow: 0 16px 32px -18px color-mix(in srgb, var(--suite, var(--brand)) 55%, rgb(15 23 42 / 0.4));
}
.suite-steps .card { position: relative; padding: 24px; border-radius: 18px; }
.suite-steps__num {
  display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px; border-radius: 50%;
  background: color-mix(in srgb, var(--suite, var(--brand)) 14%, transparent);
  color: color-mix(in srgb, var(--suite, var(--brand)) 80%, var(--text)); font-weight: 800;
}
.suite-jump .chip--filter::before { display: inline-block !important; flex: none; }

/* Suite hubs on computers, like the homepage: the heading on one line and the lead in two; phones wrap as before. */
@media (min-width: 1100px) {
  .suite-hero__inner { max-width: 1160px; }
  .suite-hero__title { max-width: none; white-space: nowrap; font-size: min(2.6rem, 3.6vw); }
  body.suite-media .suite-hero__title { font-size: min(2.05rem, 2.7vw); }
  .suite-hero__lead { max-width: 1040px; font-size: 1.08rem; text-wrap: balance; }
}

/* Homepage suite cards: four now (PDF first) — four a row on computers, 2×2 on tablets, one column on phones. */
.suite-strip__grid { grid-template-columns: 1fr; }
@media (min-width: 640px) { .suite-strip__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .suite-strip__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Homepage filters: the four suites evenly, and PDF's own parts as a smaller second row. */
.filter-chips--sub { margin-top: 8px; background: none; padding: 0; gap: 6px; }
.filter-chips--sub .chip--filter { font-size: 0.84rem; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.filter-chips--sub .chip--filter[aria-current="true"] { border-color: var(--cat); color: var(--text); background: color-mix(in srgb, var(--cat) 10%, var(--surface)); }

/* Ready-made pages under the tool cards: compact links grouped by the tool they open. */
.ready-pages { margin-top: 48px; }
.ready-pages__title { margin: 0 0 6px; font-size: 1.45rem; letter-spacing: -0.02em; }
.ready-pages__lead { margin: 0 0 20px; }
.ready-pages__suite { margin-top: 26px; }
.ready-pages__suite-title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 1.05rem;
}
.ready-pages__suite-title::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cat); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat) 20%, transparent); }
.ready-pages__suite { columns: 1; }
.ready-pages__group {
  display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 6px 16px; align-items: start;
  padding: 10px 0; border-top: 1px solid var(--border);
}
.ready-pages__tool { font-weight: 700; color: var(--text); text-decoration: none; font-size: 0.92rem; }
.ready-pages__tool:hover { color: var(--brand); }
.ready-pages__group ul { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0; padding: 0; list-style: none; }
.ready-pages__group li a {
  display: inline-block; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--text-muted); font-size: 0.82rem; text-decoration: none; transition: border-color .15s, color .15s;
}
.ready-pages__group li a:hover { border-color: color-mix(in srgb, var(--cat) 50%, var(--border)); color: var(--text); }
@media (max-width: 639px) { .ready-pages__group { grid-template-columns: 1fr; } }

/* All tools & pages (/all-tools): every tool by kind and category, with its ready-made pages as small links. */
.all-tools__title { font-size: clamp(2rem, 1.3rem + 2.4vw, 2.9rem); letter-spacing: -0.04em; margin: 8px 0 10px; }
.all-tools__lead { max-width: 760px; color: var(--text-muted); font-size: 1.05rem; line-height: 1.65; }
.all-tools__jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.all-tools__suite { margin-top: 40px; scroll-margin-top: calc(var(--header-h) + 16px); }
.all-tools__suite-title {
  position: relative; margin: 0 0 6px; padding-bottom: 10px; font-size: 1.5rem; letter-spacing: -0.02em;
}
.all-tools__suite-title a { color: var(--text); text-decoration: none; }
.all-tools__suite-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; border-radius: 2px; background: var(--cat, var(--brand)); }
.all-tools__category { margin: 22px 0 8px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.all-tools__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.all-tools__list > li { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; gap: 4px 16px; padding: 9px 0; border-top: 1px solid var(--border); }
.all-tools__tool { font-weight: 600; color: var(--text); text-decoration: none; }
.all-tools__tool:hover { color: var(--brand); }
.all-tools__pages { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0; padding: 0; list-style: none; }
.all-tools__pages a {
  display: inline-block; padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--text-muted); font-size: 0.82rem; text-decoration: none;
}
.all-tools__pages a:hover { color: var(--text); border-color: color-mix(in srgb, var(--cat, var(--brand)) 50%, var(--border)); }
@media (max-width: 639px) { .all-tools__list > li { grid-template-columns: 1fr; } }
/* Footer: five even columns now (PDF, Image, Data & Excel, Video & Audio, Company) — one row on computers. */
@media (min-width: 1100px) { .footer-links { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px 24px; } }
/* Second-row filters for every kind; under All, each row starts with its kind's name and colour dot. */
.filter-subs { display: grid; gap: 6px; margin-top: 8px; }
.filter-subs .filter-chips--sub { margin-top: 0; flex-wrap: wrap; align-items: center; }
.filter-chips__label {
  display: inline-flex; align-items: center; gap: 7px; min-width: 116px; margin-right: 4px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted);
}
.filter-chips__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cat); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat) 20%, transparent); }
@media (max-width: 639px) { .filter-chips__label { min-width: 0; width: 100%; } }
/* Filters as before: the main row, the chosen kind's categories beside it on the same line, the count underneath. */
.hub-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.hub-bar .filter-subs { display: contents; }
.hub-bar .filter-subs .filter-chips--sub { margin: 0; flex-wrap: wrap; }
.hub-bar .filter-subs .filter-chips--sub[hidden] { display: none; }
.hub-bar .hub-status { flex-basis: 100%; margin: 2px 0 0; }
