/* ==========================================================================
   Pixovio design system
   One stylesheet for every page. Light + dark themes, follows the OS
   preference unless the visitor picks one with the header toggle.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --brand: #ff6b35;
  --brand-2: #ff9f1c;
  --brand-hover: #f2561d;
  --on-brand: #1b0d05;
  --brand-soft: rgba(255, 107, 53, 0.1);
  --brand-ring: rgba(255, 107, 53, 0.35);

  --bg: #fbfaf8;
  --bg-elev: #ffffff;
  --surface: #f4f2ee;
  --surface-2: #ebe8e2;
  --border: #e6e3dc;
  --border-strong: #d3cfc6;
  --text: #15151c;
  --text-2: #3f3f4c;
  --muted: #6a6a77;
  --link: #c2410c;
  --success: #15803d;
  --success-soft: #e9f8ef;
  --danger: #b42318;
  --danger-soft: #fdeeec;
  --warn: #9a5b00;
  --warn-soft: #fff4e2;
  --info: #1d4ed8;
  --info-soft: #ebf1ff;
  --checker-a: #ffffff;
  --checker-b: #ebebef;

  --shadow-sm: 0 1px 2px rgba(20, 20, 30, 0.06);
  --shadow-md: 0 1px 2px rgba(20, 20, 30, 0.05), 0 8px 24px -8px rgba(20, 20, 30, 0.12);
  --shadow-lg: 0 2px 4px rgba(20, 20, 30, 0.04), 0 24px 48px -12px rgba(20, 20, 30, 0.18);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --header-h: 64px;
  --gutter: 20px;
  --maxw: 1180px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c11;
    --bg-elev: #13141b;
    --surface: #181922;
    --surface-2: #20212c;
    --border: #262836;
    --border-strong: #363848;
    --text: #f3f3f7;
    --text-2: #c9c9d4;
    --muted: #9a9aac;
    --link: #ff8a5c;
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, 0.1);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.1);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.1);
    --info: #93b4ff;
    --info-soft: rgba(147, 180, 255, 0.1);
    --brand-soft: rgba(255, 107, 53, 0.14);
    --checker-a: #1a1b24;
    --checker-b: #23242f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 28px 56px -16px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0c11;
  --bg-elev: #13141b;
  --surface: #181922;
  --surface-2: #20212c;
  --border: #262836;
  --border-strong: #363848;
  --text: #f3f3f7;
  --text-2: #c9c9d4;
  --muted: #9a9aac;
  --link: #ff8a5c;
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.1);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.1);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.1);
  --info: #93b4ff;
  --info-soft: rgba(147, 180, 255, 0.1);
  --brand-soft: rgba(255, 107, 53, 0.14);
  --checker-a: #1a1b24;
  --checker-b: #23242f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 28px 56px -16px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1 0 auto; }
img, svg, video, canvas, picture { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; color: var(--text); font-weight: 800; text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
::selection { background: var(--brand-ring); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 200;
  background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { width: 100%; max-width: 920px; margin-inline: auto; padding-inline: var(--gutter); }
.container-prose { width: 100%; max-width: 780px; margin-inline: auto; padding-inline: var(--gutter); }
@media (max-width: 600px) { :root { --gutter: 16px; } }

.section { padding-block: 64px; }
.section-sm { padding-block: 40px; }
.section + .section { padding-top: 0; }
.section-head { max-width: 680px; margin: 0 auto 32px; text-align: center; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head p { margin-top: 10px; color: var(--muted); font-size: 1.05rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--link);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .site-header { background: var(--bg); } }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; color: var(--text); flex: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; flex: none; }
:root[data-theme="dark"] .brand-mark { box-shadow: 0 0 0 1px var(--border-strong); }
.main-nav { display: flex; align-items: center; gap: 2px; margin-left: 28px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
  border-radius: 10px; font-weight: 600; font-size: 0.95rem; color: var(--text-2);
  background: none; border: 0; transition: background-color 0.15s, color 0.15s;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { background: var(--surface); color: var(--text); }
.nav-link[aria-current="page"] { color: var(--text); }
.nav-link .chev { transition: transform 0.2s; }
.nav-link[aria-expanded="true"] .chev { transform: rotate(180deg); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-2);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.icon-btn:hover { border-color: var(--border-strong); color: var(--text); }
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
.menu-btn { display: none; }
.menu-btn .i-close, .site-header.is-open .menu-btn .i-menu { display: none; }
.site-header.is-open .menu-btn .i-close { display: block; }

.nav-item { position: relative; }
.mega {
  position: absolute; top: calc(100% + 10px); left: -12px; width: min(760px, calc(100vw - 40px));
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 14px; display: none;
  grid-template-columns: repeat(3, 1fr); gap: 4px 8px;
}
.mega::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.nav-item.is-open .mega { display: grid; }
@media (hover: hover) and (pointer: fine) { .nav-item:hover .mega { display: grid; } }
.mega-group-title { grid-column: span 1; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 4px; }
.mega-col { display: flex; flex-direction: column; gap: 2px; }
.mega-link { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; transition: background-color 0.15s; }
.mega-link:hover { background: var(--surface); }
.mega-link .tool-icon { width: 36px; height: 36px; border-radius: 10px; }
.mega-link .tool-icon .icon { width: 18px; height: 18px; }
.mega-link strong { display: block; font-size: 0.92rem; color: var(--text); line-height: 1.3; }
.mega-link span { display: block; font-size: 0.8rem; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.mega-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; padding: 12px 10px 4px; border-top: 1px solid var(--border); font-size: 0.875rem; color: var(--muted); }
.mega-foot a { color: var(--link); font-weight: 700; }

.mobile-panel { display: none; }

@media (max-width: 899px) {
  .main-nav { display: none; }
  .menu-btn { display: inline-grid; }
  /* absolute, not fixed: the header's backdrop-filter makes it the containing block */
  .mobile-panel {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 59; overflow-y: auto; overscroll-behavior: contain;
    height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    background: var(--bg); padding: 16px var(--gutter) 40px;
    border-top: 1px solid var(--border);
  }
  .site-header.is-open .mobile-panel { display: block; }
  .mobile-panel h2 { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 20px 0 8px; font-weight: 800; }
  .mobile-panel h2:first-child { margin-top: 4px; }
  .mobile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .mobile-grid a {
    display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border);
    border-radius: 12px; background: var(--bg-elev); font-weight: 600; font-size: 0.9rem; line-height: 1.25;
  }
  .mobile-grid .tool-icon { width: 32px; height: 32px; border-radius: 9px; }
  .mobile-grid .tool-icon .icon { width: 16px; height: 16px; }
  .mobile-links a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--border); font-weight: 600; }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 340px) { .mobile-grid { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 0.95rem; line-height: 1; white-space: nowrap; text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
  -webkit-user-select: none; user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 16px -6px rgba(255, 107, 53, 0.6); }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn-secondary { background: var(--bg-elev); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--text-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.btn-danger-ghost { background: transparent; color: var(--muted); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1rem; border-radius: 14px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 0.875rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.875rem; color: var(--muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0.6; margin-right: 4px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs [aria-current] { color: var(--text-2); font-weight: 600; }

/* ---------- Page hero ---------- */
.page-hero { padding: 36px 0 8px; text-align: center; position: relative; }
.page-hero .breadcrumbs ol { justify-content: center; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin-top: 16px; }
.page-hero h1 .accent { background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.02rem, 2vw, 1.15rem); color: var(--text-2); max-width: 660px; margin: 14px auto 0; }
.trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 18px; color: var(--muted); font-size: 0.9rem; font-weight: 600; list-style: none; padding: 0; }
.trust-row li { display: inline-flex; align-items: center; gap: 6px; }
.trust-row .icon { width: 16px; height: 16px; color: var(--success); }
.hero-glow { position: absolute; inset: -40px 0 auto; height: 360px; z-index: -1; pointer-events: none;
  background: radial-gradient(600px 220px at 50% 0%, var(--brand-soft), transparent 70%); }

/* ---------- Tool shell ---------- */
.tool {
  max-width: 920px; margin: 28px auto 0; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 20px;
}
@media (max-width: 600px) { .tool { padding: 14px; border-radius: 16px; } }
.tool-wide { max-width: 1120px; }
.tool-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px auto 0; font-size: 0.875rem; color: var(--muted); text-align: center; }
.tool-note .icon { width: 16px; height: 16px; color: var(--success); }

.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 6px; min-height: 230px; padding: 32px 20px; border: 2px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; transition: border-color 0.15s, background-color 0.15s;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.dropzone:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); border-color: var(--brand); }
.dropzone.is-compact { min-height: 0; padding: 18px; flex-direction: row; gap: 14px; text-align: left; }
.dropzone.is-compact .dz-icon { width: 44px; height: 44px; margin: 0; }
.dropzone.is-compact .dz-icon .icon { width: 20px; height: 20px; }
.dropzone.is-compact .dz-hint { display: none; }
.dz-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 8px; }
.dz-icon .icon { width: 28px; height: 28px; }
.dz-title { font-weight: 800; font-size: 1.15rem; color: var(--text); }
.dz-sub { color: var(--muted); font-size: 0.95rem; }
.dz-sub u { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 700; }
.dz-hint { margin-top: 8px; font-size: 0.8rem; color: var(--muted); }
.dz-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.kbd { font-family: var(--mono); font-size: 0.78em; padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--bg-elev); }

.tool-options { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 24px; margin-top: 18px; }
.tool-options:empty { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 0.8rem; font-weight: 700; color: var(--text-2); letter-spacing: 0.01em; }
.field-hint { font-size: 0.8rem; color: var(--muted); }
.field-row { display: flex; align-items: center; gap: 10px; }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 9px; font-weight: 700; font-size: 0.875rem; color: var(--muted); cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.segmented span:hover { color: var(--text); }
.segmented input:checked + span { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.segmented input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-ring); }

.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text); font-size: 0.95rem; transition: border-color 0.15s, box-shadow 0.15s;
}
.select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236a6a77' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.textarea { min-height: 120px; resize: vertical; font-family: var(--mono); font-size: 0.85rem; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 0.8; }
.input-sm { min-height: 38px; padding: 6px 10px; font-size: 0.9rem; border-radius: 10px; }
input[type="range"] { accent-color: var(--brand); width: 160px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 0.925rem; font-weight: 600; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; }
.range-val { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--text); min-width: 3ch; text-align: right; }

.file-list { list-style: none; padding: 0; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.file-list:empty { display: none; }
.file-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 10px 10px 10px 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev);
  animation: row-in 0.2s ease-out;
}
@keyframes row-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.file-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); }
.file-thumb.is-placeholder { display: grid; place-items: center; color: var(--muted); background: var(--surface); }
.file-name { font-weight: 700; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.file-meta { font-size: 0.84rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 2px; }
.file-actions { display: flex; align-items: center; gap: 6px; }
.file-row.is-error { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); background: var(--danger-soft); }
.file-row.is-error .file-meta { color: var(--danger); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }
.chip-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.chip-muted { background: var(--surface); color: var(--muted); }
.chip-brand { background: var(--brand-soft); color: var(--link); border-color: transparent; }
@media (max-width: 560px) {
  .file-row { grid-template-columns: 48px minmax(0, 1fr); }
  .file-thumb { width: 48px; height: 48px; }
  .file-actions { grid-column: 1 / -1; }
  .file-actions .btn-primary { flex: 1; }
}

.tool-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.tool-actions .summary { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.tool-actions .group { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) { .tool-actions .group, .tool-actions .group .btn { width: 100%; } .tool-actions .group { flex-direction: column-reverse; } }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--border-strong); border-top-color: var(--brand); animation: spin 0.7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width 0.2s; }

.checker {
  background-color: var(--checker-a);
  background-image: conic-gradient(var(--checker-b) 25%, transparent 0 50%, var(--checker-b) 0 75%, transparent 0);
  background-size: 16px 16px;
}

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 0.925rem; line-height: 1.5; margin-top: 14px; }
.alert .icon { margin-top: 1px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }
.alert p + p { margin-top: 4px; }

/* ---------- Generic cards ---------- */
.card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.tool-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.tool-icon .icon { width: 22px; height: 22px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--radius);
  background: var(--bg-elev); border: 1px solid var(--border); transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.tool-card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tool-card h3 { font-size: 1.05rem; letter-spacing: -0.01em; }
.tool-card p { color: var(--muted); font-size: 0.925rem; line-height: 1.55; }
.tool-card .go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.9rem; color: var(--link); }
.tool-card .go .icon { width: 16px; height: 16px; transition: transform 0.15s; }
.tool-card:hover .go .icon { transform: translateX(3px); }
.tool-card.is-current { border-color: var(--brand); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: step; list-style: none; padding: 0; }
.steps li { position: relative; padding: 22px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--on-brand); font-weight: 800; margin-bottom: 14px; }
.steps h3 { font-size: 1.05rem; margin-bottom: 6px; letter-spacing: -0.01em; }
.steps p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.feature { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); background: var(--surface); }
.feature .tool-icon { width: 40px; height: 40px; }
.feature h3 { font-size: 1rem; margin-bottom: 4px; letter-spacing: -0.01em; }
.feature p { color: var(--muted); font-size: 0.925rem; line-height: 1.55; }

/* ---------- Prose ---------- */
.prose { font-size: 1.0625rem; line-height: 1.78; color: var(--text-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin-top: 2.2em; margin-bottom: -0.2em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.8em; margin-bottom: -0.4em; letter-spacing: -0.01em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: 0.45em; }
.prose li > ul, .prose li > ol { margin-top: 0.45em; }
.prose li::marker { color: var(--brand); font-weight: 700; }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 600; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose code { font-family: var(--mono); font-size: 0.86em; padding: 0.15em 0.4em; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--text); word-break: break-word; }
.prose pre { background: #0f1117; color: #e7e7ef; border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: 0.875rem; line-height: 1.65; border: 1px solid #222533; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; word-break: normal; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin-block: 2.5em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.prose .table-wrap { margin-block: 1.6em; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.94rem; line-height: 1.5; min-width: 520px; }
.table-wrap th { text-align: left; font-weight: 800; color: var(--text); background: var(--surface); padding: 12px 14px; font-size: 0.875rem; white-space: nowrap; }
.table-wrap td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: top; }
.table-wrap td:first-child { font-weight: 700; color: var(--text); }
.callout { display: flex; gap: 12px; padding: 16px 18px; border-radius: 12px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); font-size: 0.98rem; line-height: 1.65; }
.callout > .icon { color: var(--brand); margin-top: 3px; }
.callout p { margin: 0; }
.callout-warn { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.callout-warn > .icon { color: var(--danger); }
.callout-info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.callout-info > .icon { color: var(--info); }
.prose .step-list { list-style: none; padding: 0; counter-reset: s; }
.prose .step-list > li { position: relative; padding-left: 48px; counter-increment: s; }
.prose .step-list > li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--link); font-weight: 800; font-size: 0.9rem; }
.prose .step-list > li + li { margin-top: 1em; }
.prose .mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.prose .mini-grid > div { padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-elev); font-size: 0.95rem; line-height: 1.6; }
.prose .mini-grid > div > strong:first-child { display: block; margin-bottom: 4px; }

/* ---------- Article layout ---------- */
.article-head { padding: 36px 0 28px; }
.article-head h1 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); margin-top: 18px; max-width: 900px; }
.article-head .lead { margin: 14px 0 0; max-width: 760px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 22px; color: var(--muted); font-size: 0.9rem; }
.byline .who { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.byline .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); font-weight: 800; font-size: 0.85rem; flex: none; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.1rem; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 64px; align-items: start; }
.article-main { min-width: 0; max-width: 760px; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; padding-bottom: 8px; }
.toc-title { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; border-left: 2px solid var(--border); }
.toc ol a { display: block; margin-left: -2px; padding: 6px 12px; border-left: 2px solid transparent; color: var(--muted); font-size: 0.9rem; line-height: 1.4; transition: color 0.15s, border-color 0.15s; }
.toc ol a:hover { color: var(--text); }
.toc ol a.is-active { color: var(--text); border-left-color: var(--brand); font-weight: 700; }
.toc-cta { margin-top: 20px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.toc-cta strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.toc-cta p { font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.toc-mobile { display: none; margin-bottom: 28px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elev); }
.toc-mobile summary { cursor: pointer; list-style: none; padding: 14px 16px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary .icon { transition: transform 0.2s; }
.toc-mobile[open] summary .icon { transform: rotate(180deg); }
.toc-mobile ol { padding: 0 16px 14px 34px; margin: 0; font-size: 0.95rem; }
.toc-mobile li + li { margin-top: 6px; }
.toc-mobile a { color: var(--text-2); }
@media (max-width: 1023px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-main { max-width: none; }
  .toc { display: none; }
  .toc-mobile { display: block; }
}

.author-box { display: flex; gap: 16px; align-items: flex-start; padding: 22px; margin-top: 48px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.author-box h2 { font-size: 1rem; letter-spacing: -0.01em; }
.author-box p { color: var(--muted); font-size: 0.94rem; line-height: 1.6; margin-top: 4px; }
.author-box a { color: var(--link); font-weight: 700; }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 40px; padding: 24px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--brand-soft), transparent 70%), var(--bg-elev); border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border)); }
.cta-band h2 { font-size: 1.25rem; letter-spacing: -0.01em; }
.cta-band p { color: var(--muted); margin-top: 4px; font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev); transition: border-color 0.15s; }
.faq details[open] { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; font-weight: 700; font-size: 1.02rem; color: var(--text); line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--muted); transition: transform 0.2s; }
.faq details[open] summary .icon { transform: rotate(45deg); color: var(--brand); }
.faq .faq-body { padding: 0 20px 18px; color: var(--text-2); line-height: 1.7; }
.faq .faq-body > * + * { margin-top: 0.7em; }
.faq .faq-body a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.faq .faq-body code { font-family: var(--mono); font-size: 0.86em; padding: 0.1em 0.35em; border-radius: 5px; background: var(--surface); border: 1px solid var(--border); }
.prose .faq { margin-top: 1.2em; }
.prose .faq summary { font-size: 1rem; }

/* ---------- Guides index ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.guide-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.guide-card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.guide-card h3 { font-size: 1.08rem; line-height: 1.35; letter-spacing: -0.01em; }
.guide-card p { color: var(--muted); font-size: 0.93rem; line-height: 1.55; }
.guide-card .meta { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.guide-card .go { margin-top: auto; padding-top: 4px; font-weight: 700; font-size: 0.9rem; color: var(--link); display: inline-flex; align-items: center; gap: 6px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.filter-bar button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elev); font-weight: 700; font-size: 0.875rem; color: var(--text-2); }
.filter-bar button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Simple pages ---------- */
.page-narrow { max-width: 780px; margin: 0 auto; padding: 40px var(--gutter) 0; }
.page-narrow .page-title { font-size: clamp(2rem, 4.5vw, 2.75rem); margin-top: 16px; }
.page-narrow .updated { margin-top: 8px; color: var(--muted); font-size: 0.925rem; }
.page-narrow .prose { margin-top: 28px; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 28px; }
@media (max-width: 680px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-form { display: grid; gap: 14px; margin-top: 16px; }
.contact-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .contact-form .two { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.error-hero { text-align: center; padding: 64px 0 24px; }
.error-code { font-size: clamp(4.5rem, 14vw, 7.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.05em; background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 96px; background: var(--surface); border-top: 1px solid var(--border); padding: 56px 0 28px; font-size: 0.925rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-brand p { color: var(--muted); margin-top: 12px; max-width: 320px; line-height: 1.6; }
.footer-col h2 { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--text-2); }
.footer-col a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; }
.footer-bottom p { max-width: 720px; line-height: 1.6; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 160%);
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 700; font-size: 0.925rem;
  box-shadow: var(--shadow-lg); transition: transform 0.25s cubic-bezier(.2,.9,.3,1.2); pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); }

/* ---------- Image downloader ---------- */
.url-form { display: flex; gap: 10px; }
.url-field { position: relative; flex: 1; min-width: 0; }
.url-field > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.url-field .input { min-height: 56px; padding-left: 44px; padding-right: 92px; font-size: 1rem; border-radius: 14px; }
.url-field .paste-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); min-height: 38px; }
.url-form > .btn { min-height: 56px; border-radius: 14px; padding: 0 22px; }
@media (max-width: 600px) { .url-form { flex-direction: column; } .url-form > .btn { width: 100%; } }
.format-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; align-items: center; font-size: 0.85rem; color: var(--muted); }
.result { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; margin-top: 18px; align-items: start; }
@media (max-width: 760px) { .result { grid-template-columns: 1fr; } }
.preview-box { display: grid; place-items: center; min-height: 240px; max-height: 460px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.preview-box img { max-height: 460px; width: auto; object-fit: contain; }
.result-info h2 { font-size: 1.1rem; word-break: break-all; letter-spacing: -0.01em; }
.meta-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 14px 0 18px; font-size: 0.925rem; }
.meta-list dt { color: var(--muted); font-weight: 600; }
.meta-list dd { margin: 0; font-weight: 700; color: var(--text); word-break: break-all; }
.result-actions { display: grid; gap: 8px; }
.history { margin-top: 18px; }
.history-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.history-head h2 { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.history-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; list-style: none; padding-left: 0; }
.history-list button { width: 92px; flex: none; text-align: left; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg-elev); padding: 0; transition: border-color 0.15s; }
.history-list button:hover { border-color: var(--brand); }
.history-list img { width: 92px; height: 68px; object-fit: cover; }
.history-list span { display: block; padding: 6px 8px; font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Bulk rename ---------- */
.rename-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
@media (max-width: 820px) { .rename-layout { grid-template-columns: 1fr; } }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 16px; }
.panel h2 { font-size: 0.95rem; letter-spacing: -0.01em; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.panel hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rename-list { list-style: none; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); overflow: hidden; }
.rename-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; }
.rename-list li + li { border-top: 1px solid var(--border); }
.rename-list img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.rename-list .old { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rename-list .new { font-weight: 700; font-size: 0.93rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rename-list .size { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.rename-empty { display: grid; place-items: center; text-align: center; gap: 6px; padding: 48px 20px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
@media (max-width: 480px) { .rename-list li { grid-template-columns: 40px minmax(0, 1fr) auto; } .rename-list .size { display: none; } }

/* ---------- GIF tools ---------- */
.frames-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin-top: 16px; list-style: none; padding: 0; }
.frame { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg-elev); }
.frame .thumb { aspect-ratio: 1; display: grid; place-items: center; }
.frame .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; image-rendering: auto; }
.frame .info { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; font-size: 0.78rem; color: var(--muted); border-top: 1px solid var(--border); }
.frame .info strong { color: var(--text); }
.frame .info a { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--text-2); }
.frame .info a:hover { background: var(--surface); color: var(--brand); }
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.video-stage { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
@media (max-width: 820px) { .video-stage { grid-template-columns: 1fr; } }
.video-stage video { width: 100%; max-height: 420px; border-radius: 14px; background: #000; }
.gif-out { margin-top: 18px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.gif-out img { max-height: 420px; border-radius: 12px; border: 1px solid var(--border); }
.range-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Ads ---------- */
ins.adsbygoogle, .google-auto-placed { max-width: 100% !important; overflow: hidden !important; }
.google-auto-placed { margin-block: 24px !important; }

/* ---------- Tool extras ---------- */
.page-hero { isolation: isolate; }
.panel > * + * { margin-top: 14px; }
.panel > h2 + * { margin-top: 0; }
.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.list-head .group { display: flex; gap: 8px; }
.svg-code { margin-top: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elev); }
.svg-code summary { cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 0.925rem; color: var(--text-2); display: flex; align-items: center; gap: 8px; list-style: none; }
.svg-code summary::-webkit-details-marker { display: none; }
.svg-code[open] summary { border-bottom: 1px solid var(--border); }
.svg-code textarea { border: 0; border-radius: 0; min-height: 140px; box-shadow: none !important; }
.svg-code .btn { margin: 0 14px 14px; }
@media (hover: none) { .paste-hint { display: none; } }
.video-stage .panel .btn-block + .btn-block { margin-top: 8px; }

/* ---------- Article extras ---------- */
.tick { color: var(--success); font-weight: 800; }
.cross { color: var(--danger); font-weight: 800; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat-grid > div { padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.stat-grid strong { display: block; font-size: 1.6rem; line-height: 1.1; letter-spacing: -0.03em; color: var(--link); margin-bottom: 6px; }
.stat-grid p { font-size: 0.9rem; line-height: 1.5; margin: 0; color: var(--text-2); }
.box { padding: 18px 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.box > * + * { margin-top: 0.8em; }
.box h3 { margin-top: 0 !important; margin-bottom: 0 !important; }
.box-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-weight: 800; color: var(--text); }

/* ---------- Misc ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.muted { color: var(--muted); }
.link { color: var(--link); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.stack-sm > * + * { margin-top: 8px; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media print {
  .site-header, .site-footer, .toc, .toc-mobile, .tool, ins.adsbygoogle { display: none !important; }
  body { background: #fff; color: #000; }
}
