/* ==========================================================================
   glgif — design tokens
   ========================================================================== */
:root {
  --paper: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #f5f3ef;
  --ink: #17161c;
  --ink-2: #3d3a47;
  --muted: #6b6875;
  --line: #e7e4dd;
  --line-strong: #d6d2c9;
  --accent: #5438e8;
  --accent-ink: #3d24c9;
  --accent-soft: #eeebff;
  --good: #0f7a52;
  --good-soft: #e6f5ee;
  --warn: #a35b00;
  --warn-soft: #fdf1e0;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(23, 22, 28, 0.05), 0 1px 1px rgba(23, 22, 28, 0.03);
  --shadow: 0 4px 12px rgba(23, 22, 28, 0.06), 0 1px 3px rgba(23, 22, 28, 0.04);
  --shadow-lg: 0 16px 48px -12px rgba(23, 22, 28, 0.16), 0 4px 12px rgba(23, 22, 28, 0.05);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1120px;
  --narrow: 720px;
  --checker: repeating-conic-gradient(#e9e6df 0% 25%, #fbfaf8 0% 50%) 50% / 16px 16px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, canvas, video, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 650; }
h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ==========================================================================
   Layout
   ========================================================================== */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: var(--narrow); margin-inline: auto; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 250, 248, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 14px; height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.06rem;
  letter-spacing: -0.03em; color: var(--ink); text-decoration: none; flex: none; }
.logo:hover { color: var(--ink); }
.logo-mark {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: linear-gradient(145deg, #6b4cf6, #4023d6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 6px rgba(84,56,232,.35);
  display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800;
  letter-spacing: -0.04em;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: 0.9rem; font-weight: 520;
  padding: 7px 11px; border-radius: 8px; white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.is-active { color: var(--accent-ink); background: var(--accent-soft); }
@media (max-width: 720px) { .nav a.opt { display: none; } }
@media (max-width: 640px) {
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-block: 9px; gap: 6px 12px; }
  .nav { width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; margin-left: 0; }
  .nav::-webkit-scrollbar { display: none; }
  /* The fifth link sits past the edge; a fade says "scroll me" instead of
     looking like the label was chopped in half. */
  .nav { mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
         -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .nav a.opt { display: inline-block; }
  .nav a { padding: 6px 9px; font-size: 0.86rem; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 40px 0 32px; font-size: 0.88rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.footer-grid h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-2); margin-bottom: 10px; font-weight: 640; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--accent-ink); }
.footer-note { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 0.82rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; } }

/* ==========================================================================
   Components
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.76rem; font-weight: 600; letter-spacing: -0.005em;
  padding: 4px 10px; border-radius: 100px;
  background: var(--good-soft); color: var(--good); border: 1px solid #cbe8db;
}
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); border-color: #d9d1ff; }
.badge.muted { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  font-size: 0.94rem; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(84,56,232,.3), 0 6px 16px -6px rgba(84,56,232,.5); }
.btn-primary:hover { background: #4a30d8; color: #fff; }
.btn-primary:disabled { background: #b9b3cf; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: #c4bfb5; }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; border-radius: 8px; }
.btn-block { width: 100%; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Hero / home
   ========================================================================== */
.hero { padding: 56px 0 8px; }
.hero h1 { max-width: 17ch; margin-bottom: 18px; }
.hero .lede { font-size: clamp(1.02rem, 2vw, 1.16rem); color: var(--ink-2); max-width: 60ch; margin-bottom: 22px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin: 34px 0 0; }
.tool-card {
  display: block; text-decoration: none; color: inherit; position: relative;
  padding: 22px 22px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.tool-card:hover { border-color: #cfc9ff; box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.tool-card .ico {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 14px;
}
.tool-card .ico svg { width: 19px; height: 19px; }
.tool-card h3 { font-size: 1.03rem; margin-bottom: 6px; letter-spacing: -0.025em; }
.tool-card p { font-size: 0.885rem; color: var(--muted); margin: 0; line-height: 1.55; }
.tool-card .go { margin-top: 14px; font-size: 0.85rem; font-weight: 620; color: var(--accent-ink); display: inline-flex; align-items: center; gap: 5px; }

.trust-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 8px; }
.trust-strip > div { background: var(--surface); padding: 20px; }
.trust-strip strong { display: block; font-size: 0.95rem; margin-bottom: 3px; letter-spacing: -0.02em; }
.trust-strip span { font-size: 0.85rem; color: var(--muted); }

/* ==========================================================================
   Tool workspace
   ========================================================================== */
.tool-head { padding: 38px 0 22px; }
.tool-head h1 { margin-bottom: 10px; }
.tool-head .sub { font-size: 1.02rem; color: var(--ink-2); max-width: 66ch; margin-bottom: 0; }

.workspace {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px;
  align-items: stretch;
}
@media (max-width: 900px) { .workspace { grid-template-columns: 1fr; } }

/* Stage = dropzone + preview */
.stage {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-sm); min-height: 320px;
  display: flex; flex-direction: column;
}
.drop {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 46px 24px; gap: 6px; cursor: pointer;
  border: 2px dashed var(--line-strong); border-radius: 11px;
  background: linear-gradient(var(--surface), var(--surface)) padding-box;
  transition: border-color .15s ease, background .15s ease;
}
.drop:hover, .drop:focus-visible { border-color: var(--accent); background: #fcfbff; }
.drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop .drop-ico { width: 46px; height: 46px; color: var(--accent); margin-bottom: 10px; opacity: .9; }
.drop strong { font-size: 1.02rem; letter-spacing: -0.02em; }
.drop .hint { font-size: 0.86rem; color: var(--muted); }
.drop .formats { font-size: 0.78rem; color: var(--muted); margin-top: 10px; font-family: var(--mono); letter-spacing: 0.02em; max-width: 100%; text-align: center; }

.preview { display: none; flex: 1; flex-direction: column; gap: 12px; }
.preview.is-on { display: flex; }
.preview-view {
  flex: 1; min-height: 240px; border-radius: 11px; background: var(--checker);
  display: grid; place-items: center; overflow: hidden; position: relative;
  border: 1px solid var(--line);
}
.preview-view canvas, .preview-view img, .preview-view video {
  max-width: 100%; max-height: 440px; width: auto; height: auto; object-fit: contain;
}
.preview-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.83rem; color: var(--muted); }
.preview-bar .file-name { font-weight: 600; color: var(--ink); max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-bar .spacer { flex: 1; }

/* Controls */
.controls { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); }
.controls-head { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 640;
  display: flex; align-items: center; justify-content: space-between; }
.controls-body { padding: 16px 18px; display: grid; gap: 15px; }
.field { display: grid; gap: 5px; }
.field > label { font-size: 0.83rem; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.field .val { font-family: var(--mono); font-size: 0.8rem; color: var(--accent-ink); background: var(--accent-soft); padding: 1px 7px; border-radius: 5px; font-weight: 600; }
.field .help { font-size: 0.76rem; color: var(--muted); line-height: 1.45; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 5px; border-radius: 3px; background: var(--line-strong); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 17px; height: 17px; margin-top: -6px;
  border-radius: 50%; background: var(--accent); border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(84,56,232,.45); }
input[type="range"]::-moz-range-track { height: 5px; border-radius: 3px; background: var(--line-strong); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2.5px solid #fff; }

input[type="number"], input[type="text"], select {
  width: 100%; padding: 8px 11px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 0.9rem; transition: border-color .14s ease, box-shadow .14s ease;
}
input[type="number"]:focus, input[type="text"]:focus, select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(84,56,232,.12);
}
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%236b6875' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
/* minmax(0, 1fr) rather than 1fr: grid items default to min-width:auto, so a
   nowrap button widens its column past the panel instead of shrinking. That is
   how the presets row used to get cut off on phones. */
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.row-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.row-2 > *, .row-4 > * { min-width: 0; }
/* Let paired buttons wrap inside their cell instead of forcing the column wide. */
.row-2 .btn, .row-4 .btn { white-space: normal; text-align: center; }
/* Two long labels side by side read badly in a narrow panel. The panel is
   narrower than the viewport on desktop too, so this keys off the panel's own
   width, not the window's. */
.controls { container-type: inline-size; }
@media (max-width: 460px) {
  .row-stack { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 420px) {
  .row-stack { grid-template-columns: minmax(0, 1fr); }
}
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 0.86rem; color: var(--ink-2); cursor: pointer; line-height: 1.4; }
.check input { margin: 3px 0 0; width: 15px; height: 15px; accent-color: var(--accent); flex: none; cursor: pointer; }

.actions { padding: 0 18px 18px; display: grid; gap: 9px; }
.size-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 0.82rem; padding: 9px 12px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.size-line b { font-family: var(--mono); color: var(--ink); font-size: 0.86rem; }
.size-line .delta { font-weight: 700; }
.size-line .delta.down { color: var(--good); }
.size-line .delta.up { color: var(--warn); }

/* progress */
.progress { display: none; padding: 0 18px 18px; }
.progress.is-on { display: block; }
.progress-track { height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #6b4cf6, #4023d6);
  border-radius: 4px; transition: width .18s ease; }
.progress-label { font-size: 0.78rem; color: var(--muted); margin-top: 6px; text-align: center; font-variant-numeric: tabular-nums; }

.alert { padding: 11px 14px; border-radius: 9px; font-size: 0.86rem; margin: 0 18px 16px; display: none; line-height: 1.5; }
.alert.is-on { display: block; }
.alert.error { background: #fdeceb; color: #8c2118; border: 1px solid #f5cdc9; }
.alert.ok { background: var(--good-soft); color: var(--good); border: 1px solid #cbe8db; }
.alert.info { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid #d9d1ff; }

/* ==========================================================================
   Ad slots (placeholders until AdSense approval)
   ========================================================================== */
/* Ad slots ---------------------------------------------------------------
   The label stays; the chrome does not. A real AdSense unit supplies its own
   creative, so the container only reserves space and keeps the page rhythm.
   `min-height` is what stops the layout from jumping when the unit fills. */
.ad-slot {
  margin: 38px auto;
  min-height: 96px;
  display: flex; flex-direction: column; justify-content: center;
  overflow: visible;
}
.ad-slot .ad-label { font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: #a8a49b; margin-bottom: 6px; font-weight: 600; text-align: center; }
.ad-slot.is-preview {
  padding: 18px; border-radius: 12px; background: var(--surface-2);
  border: 1px dashed var(--line-strong); min-height: 120px;
}
.ad-slot .ad-ph { font-size: 0.8rem; color: #a8a49b; min-height: 56px;
  display: grid; place-items: center; font-family: var(--mono); text-align: center; }
/* Under the tool: a beat of space so the unit never reads as part of the UI. */
.ad-under-tool { margin: 46px auto 8px; }
.prose .ad-slot { max-width: 100%; }

/* ==========================================================================
   Article content
   ========================================================================== */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2.2em; scroll-margin-top: 80px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.7em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 650; color: var(--ink); }
.prose code {
  font-family: var(--mono); font-size: 0.875em; background: var(--surface-2);
  padding: 1.5px 5px; border-radius: 4px; border: 1px solid var(--line); color: var(--ink-2);
}
.prose kbd { font-family: var(--mono); font-size: 0.8em; border: 1px solid var(--line-strong);
  border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; background: var(--surface); }
.prose pre {
  margin: 1.2em 0 1.4em; padding: 14px 16px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.62; color: var(--ink-2);
  white-space: pre-wrap; overflow-wrap: break-word;
}
.prose blockquote { margin: 1.4em 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--accent);
  color: var(--ink-2); font-style: normal; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin: 1.2em 0 1.4em; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.2em 0 1.4em; }
.table-wrap > table { margin: 0; min-width: 420px; }
@media (max-width: 700px) {
  .table-wrap > table { min-width: 0; font-size: 0.8rem; }
  .prose th, .prose td { padding: 7px 8px; }
}
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 630; background: var(--surface-2); font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); }
.prose td.num, .prose th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.prose-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 38px; box-shadow: var(--shadow-sm); }
@media (max-width: 700px) { .prose-wrap { padding: 24px 20px; } }

.callout { display: flex; gap: 13px; padding: 16px 18px; border-radius: 11px; margin: 1.5em 0;
  background: var(--accent-soft); border: 1px solid #dcd4ff; font-size: 0.92rem; }
.callout .ci { flex: none; width: 20px; height: 20px; color: var(--accent-ink); margin-top: 1px; }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { background: var(--warn-soft); border-color: #f3ddba; }
.callout.warn .ci { color: var(--warn); }

/* FAQ */
.faq { margin-top: 46px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; padding: 16px 30px 16px 0; font-weight: 620; font-size: 1rem;
  letter-spacing: -0.015em; position: relative; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform .18s ease;
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-item .faq-a { padding: 0 0 18px; color: var(--ink-2); font-size: 0.94rem; max-width: 68ch; }
.faq-item .faq-a p:last-child { margin-bottom: 0; }

/* Breadcrumb + related */
.crumbs { font-size: 0.8rem; color: var(--muted); margin-bottom: 16px; display: flex; gap: 7px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs span { color: var(--line-strong); }

.related { margin-top: 56px; }
.related h2 { font-size: 1.2rem; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.related-grid a {
  display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm); transition: border-color .15s ease, transform .15s ease;
}
.related-grid a:hover { border-color: #cfc9ff; transform: translateY(-1px); color: inherit; }
.related-grid .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft);
  color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.related-grid .ico svg { width: 16px; height: 16px; }
.related-grid strong { display: block; font-size: 0.9rem; letter-spacing: -0.02em; }
.related-grid small { color: var(--muted); font-size: 0.78rem; }

/* ==========================================================================
   Frame strip (images -> GIF)
   ========================================================================== */
.frames-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 0.82rem; font-weight: 600; color: var(--ink-2); padding-top: 2px;
}
.frames { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; min-height: 76px;
  scrollbar-width: thin; }
.frames:empty::after { content: "No frames yet"; color: var(--muted); font-size: 0.82rem; align-self: center; }
.frame-item {
  position: relative; flex: none; width: 74px; height: 66px; border-radius: 8px;
  overflow: hidden; border: 1px solid var(--line-strong); background: var(--checker);
  cursor: grab; transition: border-color .14s ease, transform .14s ease;
}
.frame-item:hover { border-color: var(--accent); }
.frame-item.is-drag { opacity: .35; }
.frame-item img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.frame-item .idx {
  position: absolute; left: 3px; top: 3px; background: rgba(23,22,28,.72); color: #fff;
  font-size: 10px; font-family: var(--mono); padding: 0 4px; border-radius: 3px; line-height: 15px;
}
.frame-item .x {
  position: absolute; right: 2px; top: 2px; width: 17px; height: 17px; border: 0; padding: 0;
  border-radius: 50%; background: rgba(23,22,28,.72); color: #fff; font-size: 12px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .14s ease;
}
.frame-item:hover .x { opacity: 1; }
.frame-item .x:hover { background: #b3261e; }

/* ==========================================================================
   Utilities
   ========================================================================== */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack-sm > * + * { margin-top: 10px; }
.stack > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 34px; }
.eyebrow { font-size: 0.78rem; font-weight: 660; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent-ink); margin-bottom: 10px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Homepage section headings */
.section { margin-top: 62px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 4px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 6px; }
.section-head p { color: var(--muted); font-size: 0.92rem; margin: 0 0 0; max-width: 58ch; }
