/* gallery.css — generated by scripts/generate-preview.js. Do not edit by hand. */
    @font-face {
      font-family: "Inter";
      font-style: normal;
      font-weight: 400 600;
      font-display: swap;
      src: url("fonts/inter-latin.woff2") format("woff2");
      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: "Space Grotesk";
      font-style: normal;
      font-weight: 500;
      font-display: swap;
      src: url("fonts/space-grotesk-latin.woff2") format("woff2");
      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;
    }
    :root {
      --bg: #fbfbfa;
      --surface: #ffffff;
      --surface-2: #f4f2ef;
      --border: #e7e5e1;
      --border-strong: #d4d1cc;
      --ink: #1c1b19;
      --muted: #78736c;
      --icon: #3a3733;
      --accent: #b4541e;
      --accent-contrast: #9a4216;
      --accent-soft: #fbeee5;
      --shadow: 0 8px 24px rgba(28, 27, 25, 0.08);
      --radius: 4px;
      --radius-widget: 8px;
      --site-shell: 1280px;
    }
    [data-theme="dark"] {
      --bg: #161513;
      --surface: #1f1e1b;
      --surface-2: #2a2825;
      --border: #33312d;
      --border-strong: #47443f;
      --ink: #f0eeea;
      --muted: #9b968e;
      --icon: #d8d5d0;
      --accent: #e07a3e;
      --accent-contrast: #e07a3e;
      --accent-soft: #3a2517;
      --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
    * { box-sizing: border-box; }
    html { scroll-padding-top: 64px; }
    body {
      display: flex;
      flex-direction: column;
      margin: 0;
      min-height: 100vh;
      min-height: 100dvh;
      font-family: Inter, system-ui, sans-serif;
      font-size: calc(16px * var(--text-scale, 1));
      background: var(--bg);
      color: var(--ink);
      -webkit-font-smoothing: antialiased;
      transition: background 200ms ease, color 200ms ease;
    }
    .wrap {
      display: flex;
      flex: 1;
      flex-direction: column;
      margin: 0 auto;
      max-width: var(--site-shell);
      padding: 0 24px;
      width: 100%;
    }

    /* ---- Topbar ---- */
    .topbar-shell {
      border-bottom: 1px solid transparent;
      position: sticky;
      top: 0;
      z-index: 20;
      background: transparent;
      transition: background 160ms ease, border-color 160ms ease;
    }
    .topbar-shell.is-scrolled {
      background: var(--surface);
      border-bottom-color: var(--border);
    }
    .topbar {
      align-items: center;
      display: flex;
      gap: 16px;
      justify-content: space-between;
      margin: 0 auto;
      max-width: var(--site-shell);
      min-height: 56px;
      padding: 8px 24px;
    }
    .brand { color: var(--ink); display: inline-flex; }
    .brand svg { display: block; height: 24px; width: auto; }
    .topbar-search {
      display: block;
      flex: 1;
      max-width: 400px;
      opacity: 0;
      pointer-events: none;
      transform: translateY(-4px);
      transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms;
      visibility: hidden;
    }
    .topbar-shell.has-docked-search .topbar-search {
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
      transition-delay: 0s;
      visibility: visible;
    }
    .topbar-actions { align-items: center; display: flex; gap: 8px; }
    .topbar-link {
      align-items: center;
      border-radius: var(--radius);
      color: var(--ink);
      display: inline-flex;
      gap: 8px;
      height: 32px;
      padding: 0 8px;
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 500;
      text-decoration: none;
    }
    .topbar-link:hover { background: var(--surface-2); }
    .topbar-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .topbar-link svg { height: 16px; width: 16px; }

    /* ---- Hero ---- */
    .hero { padding: 48px 0 8px; text-align: center; }
    .hero-title {
      font-family: "Space Grotesk", Inter, system-ui, sans-serif;
      font-size: calc(40px * var(--text-scale, 1));
      font-weight: 500;
      letter-spacing: -0.02em;
      line-height: 1.1;
      margin: 0 auto;
      max-width: 640px;
    }
    .hero-sub {
      color: var(--muted);
      font-size: calc(16px * var(--text-scale, 1));
      line-height: 1.6;
      margin: 16px auto 0;
      max-width: 560px;
    }
    .hero-search { margin: 32px auto 0; max-width: 480px; min-height: 48px; }

    /* ---- Category filters ---- */
    .category-strip {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: center;
      margin: 28px auto 0;
      max-width: 920px;
    }
    .category-filter {
      align-items: center;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--muted);
      cursor: pointer;
      display: inline-flex;
      font: inherit;
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 500;
      gap: 6px;
      height: 32px;
      padding: 0 10px;
      transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
    }
    .category-filter:hover {
      background: var(--surface-2);
      border-color: var(--border-strong);
      color: var(--ink);
    }
    .category-filter.is-active {
      background: var(--accent-soft);
      border-color: var(--accent);
      color: var(--accent-contrast);
    }
    .category-filter:focus-visible {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-soft);
    }
    .category-filter span {
      color: var(--muted);
      font-size: calc(12px * var(--text-scale, 1));
      font-variant-numeric: tabular-nums;
    }
    .category-filter.is-active span { color: var(--accent-contrast); }
    /* "New" pill — recency, shown only when recent icons exist (set by JS) */
    .category-filter-new { border-color: var(--accent); color: var(--accent); }
    .category-filter-new span { color: var(--accent); }
    .category-filter-new:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
    .category-filter-new.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
    .category-filter-new.is-active span { color: #fff; }
    .category-toggle { display: none; }
    /* "New" badge on a card corner */
    .card-new {
      position: absolute;
      top: 8px;
      right: 8px;
      background: var(--accent);
      border-radius: 999px;
      color: #fff;
      font-size: calc(10px * var(--text-scale, 1));
      font-weight: 600;
      letter-spacing: 0.02em;
      line-height: 1;
      padding: 3px 6px;
      text-transform: uppercase;
    }
    .audit-new {
      justify-self: start;
      width: max-content;
      background: var(--accent);
      border-radius: 999px;
      color: #fff;
      font-size: calc(10px * var(--text-scale, 1));
      font-weight: 600;
      letter-spacing: 0.02em;
      margin-left: 8px;
      padding: 2px 6px;
      text-transform: uppercase;
    }

    /* ---- Search field (single instance, relocated on scroll) ---- */
    .field { position: relative; width: 100%; }
    .search-icon {
      color: var(--muted);
      height: 16px;
      left: 12px;
      pointer-events: none;
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 16px;
    }
    .search {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--ink);
      font: inherit;
      font-size: calc(14px * var(--text-scale, 1));
      height: 40px;
      padding: 0 72px 0 40px;
      width: 100%;
    }
    .search::placeholder { color: var(--muted); }
    .search:focus-visible {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-soft);
      outline: none;
    }
    .topbar-search .search { height: 32px; }
    .search-kbd {
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--muted);
      font-family: inherit;
      font-size: calc(12px * var(--text-scale, 1));
      line-height: 1;
      padding: 4px 8px;
      pointer-events: none;
      position: absolute;
      right: 40px;
      top: 50%;
      transform: translateY(-50%);
    }
    .field.has-value .search-kbd { display: none; }
    .clear-search {
      align-items: center;
      background: transparent;
      border: 0;
      border-radius: var(--radius);
      color: var(--muted);
      cursor: pointer;
      display: none;
      height: 24px;
      justify-content: center;
      padding: 0;
      position: absolute;
      right: 8px;
      top: 50%;
      transform: translateY(-50%);
      width: 24px;
    }
    .field.has-value .clear-search { display: inline-flex; }
    .clear-search:hover { background: var(--surface-2); color: var(--ink); }
    .clear-search:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
    .clear-search svg { height: 14px; width: 14px; }

    /* ---- Toolbar ---- */
    .toolbar {
      align-items: center;
      display: flex;
      flex-wrap: wrap;
      gap: 8px 16px;
      justify-content: space-between;
      margin: 32px 0 16px;
      min-height: 40px;
    }
    .result-count {
      color: var(--muted);
      font-size: calc(13px * var(--text-scale, 1));
      font-variant-numeric: tabular-nums;
      margin: 0;
    }
    .toolbar-summary { align-items: center; display: flex; gap: 12px; }
    .toolbar-controls { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
    .view-switch {
      display: flex;
      gap: 0;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }
    .view-btn {
      background: var(--surface);
      border: 0;
      border-left: 1px solid var(--border);
      color: var(--muted);
      cursor: pointer;
      font: inherit;
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 500;
      height: 32px;
      padding: 0 14px;
    }
    .view-btn:first-child { border-left: 0; }
    .view-btn:hover { background: var(--surface-2); color: var(--ink); }
    .view-btn.is-active { background: var(--accent-soft); color: var(--accent-contrast); }
    .view-btn:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); outline: none; }
    .sizes { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
    .size-btn {
      background: var(--surface);
      border: 0;
      border-left: 1px solid var(--border);
      color: var(--muted);
      cursor: pointer;
      font: inherit;
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 500;
      height: 32px;
      padding: 0 16px;
      transition: background 150ms ease, color 150ms ease;
    }
    .size-btn:first-child { border-left: 0; }
    .size-btn:hover { background: var(--surface-2); }
    .size-btn.is-active { background: var(--accent-soft); color: var(--accent-contrast); }
    .size-btn:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); outline: none; }
    .size-slider-control { align-items: center; display: flex; gap: 8px; min-height: 32px; }
    .size-range {
      accent-color: var(--accent);
      cursor: pointer;
      width: 96px;
    }
    .size-range:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .size-output {
      color: var(--muted);
      font-size: calc(13px * var(--text-scale, 1));
      font-variant-numeric: tabular-nums;
      min-width: 40px;
    }
    .export-controls {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-widget);
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 8px;
    }
    .export-row {
      align-items: center;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .export-label {
      color: var(--muted);
      font-size: calc(12px * var(--text-scale, 1));
      font-weight: 600;
      padding: 0 6px;
      width: 48px;
    }
    .export-scale {
      align-items: center;
      color: var(--muted);
      cursor: pointer;
      display: none;
      font-size: calc(12px * var(--text-scale, 1));
      font-weight: 600;
      gap: 6px;
      margin-left: 4px;
      user-select: none;
    }
    .export-controls[data-format="png"] .export-scale { display: inline-flex; }
    .export-scale input { accent-color: var(--accent); cursor: pointer; height: 14px; margin: 0; width: 14px; }
    .export-size-switch {
      border: 1px solid var(--border);
      border-radius: var(--radius);
      display: flex;
      gap: 0;
      overflow: hidden;
    }
    .export-size-btn {
      background: var(--surface);
      border: 0;
      border-left: 1px solid var(--border);
      color: var(--muted);
      cursor: pointer;
      font: inherit;
      font-size: calc(12px * var(--text-scale, 1));
      font-weight: 600;
      height: 26px;
      min-width: 40px;
      padding: 0 9px;
    }
    .export-size-btn:first-child { border-left: 0; }
    .export-size-btn:hover { background: var(--surface-2); color: var(--ink); }
    .export-size-btn.is-active { background: var(--accent-soft); color: var(--accent-contrast); }
    .export-size-btn:focus-visible {
      outline: none;
      box-shadow: inset 0 0 0 2px var(--accent);
    }
    .export-preview {
      align-items: center;
      display: flex;
      gap: 24px;
      justify-content: center;
      padding: 16px 8px 8px;
    }
    .export-preview-glyph { display: inline-flex; }
    .export-preview-glyph svg {
      color: var(--export-color, var(--icon));
      height: var(--export-preview-size, 24px);
      width: var(--export-preview-size, 24px);
      transition: height 150ms ease, width 150ms ease;
    }
    .export-note {
      color: var(--muted);
      font-size: calc(12px * var(--text-scale, 1));
      line-height: 1.5;
      margin: 8px 0 0;
    }
    .export-settings { margin-bottom: 24px; }
    .export-settings .download-list-title,
    .download-list .download-list-title { margin-bottom: 8px; }
    .export-format-switch {
      border: 1px solid var(--border);
      border-radius: var(--radius);
      display: flex;
      gap: 0;
      overflow: hidden;
    }
    .export-format-btn {
      background: var(--surface);
      border: 0;
      border-left: 1px solid var(--border);
      color: var(--muted);
      cursor: pointer;
      font: inherit;
      font-size: calc(12px * var(--text-scale, 1));
      font-weight: 600;
      height: 26px;
      min-width: 42px;
      padding: 0 9px;
    }
    .export-format-btn:first-child { border-left: 0; }
    .export-format-btn:hover { background: var(--surface-2); color: var(--ink); }
    .export-format-btn.is-active { background: var(--accent-soft); color: var(--accent-contrast); }
    .export-hint { color: var(--muted); font-size: calc(12px * var(--text-scale, 1)); line-height: 1.5; margin: 0; }
    .export-hint-outlined,
    .export-hint-stroke { display: none; }
    .export-controls[data-format="outlined"] .export-hint-outlined { display: block; }
    .export-controls[data-format="svg"] .export-hint-stroke { display: block; }
    .export-hex,
    .export-color,
    .export-reset {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--ink);
      font: inherit;
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 500;
      height: 32px;
    }
    .export-hex {
      padding: 0 8px;
      text-transform: lowercase;
      width: 82px;
    }
    .export-hex::placeholder { color: var(--muted); text-transform: none; }
    .export-color {
      cursor: pointer;
      padding: 3px;
      width: 32px;
    }
    .export-reset {
      cursor: pointer;
      padding: 0 8px;
    }
    .export-hex:hover,
    .export-color:hover,
    .export-reset:hover {
      background: var(--surface-2);
      border-color: var(--border-strong);
    }
    .export-format-btn:focus-visible,
    .export-hex:focus-visible,
    .export-color:focus-visible,
    .export-reset:focus-visible {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-soft);
    }
    body[data-view="audit"] .sizes,
    body[data-view="audit"] .size-slider-control { display: none; }
    .theme-toggle,
    .cdn-trigger,
    .download-trigger {
      align-items: center;
      border-radius: var(--radius);
      cursor: pointer;
      display: inline-flex;
      font: inherit;
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 600;
      gap: 8px;
      height: 32px;
      justify-content: center;
      text-decoration: none;
      transition: background 150ms ease, border-color 150ms ease;
    }
    .theme-toggle {
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--ink);
      padding: 0;
      width: 32px;
    }
    .theme-toggle:hover { background: var(--surface-2); border-color: var(--border-strong); }
    .theme-toggle:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
    .theme-toggle svg { height: 16px; width: 16px; }
    [data-theme="dark"] .theme-toggle .icon-moon { display: none; }
    :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: none; }
    .cdn-trigger {
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--ink);
      padding: 0 12px;
    }
    .cdn-trigger:hover { background: var(--surface-2); border-color: var(--border-strong); }
    .cdn-trigger:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
    .cdn-trigger svg { color: var(--muted); height: 16px; width: 16px; }
    .download-trigger {
      background: var(--ink);
      border: 1px solid var(--ink);
      color: var(--bg);
      padding: 0 16px;
    }
    .download-trigger:hover { opacity: 0.88; }
    .download-trigger:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
    .download-trigger svg { height: 16px; width: 16px; }
    .download-list {
      display: grid;
      gap: 8px;
    }
    .download-list-title {
      color: var(--muted);
      font-size: calc(12px * var(--text-scale, 1));
      font-weight: 600;
      margin: 4px 0 0;
      text-transform: uppercase;
    }
    .download-menu-item {
      align-items: center;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--ink);
      cursor: pointer;
      display: flex;
      font: inherit;
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 500;
      gap: 10px;
      min-height: 36px;
      padding: 0 10px;
      text-align: left;
      text-decoration: none;
      width: 100%;
    }
    .download-menu-item:hover { background: var(--surface-2); border-color: var(--border-strong); }
    .download-menu-item:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
    .download-menu-item svg { color: var(--muted); height: 16px; width: 16px; }

    /* ---- Modals ---- */
    body.has-cdn,
    body.has-export { overflow: hidden; }
    .cdn-modal,
    .export-modal {
      align-items: center;
      background: rgba(28, 27, 25, 0.36);
      display: flex;
      inset: 0;
      justify-content: center;
      opacity: 0;
      padding: 24px;
      pointer-events: none;
      position: fixed;
      transition: opacity 180ms ease;
      z-index: 45;
    }
    [data-theme="dark"] .cdn-modal,
    [data-theme="dark"] .export-modal { background: rgba(0, 0, 0, 0.56); }
    .cdn-modal.is-open,
    .export-modal.is-open {
      opacity: 1;
      pointer-events: auto;
    }
    .cdn-panel,
    .export-panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-widget);
      box-shadow: var(--shadow);
      display: grid;
      gap: 16px;
      max-width: 560px;
      padding: 20px;
      transform: translateY(8px);
      transition: transform 180ms ease;
      width: min(100%, 560px);
    }
    .cdn-modal.is-open .cdn-panel,
    .export-modal.is-open .export-panel { transform: translateY(0); }
    .cdn-panel > *,
    .export-panel > * { min-width: 0; }
    .cdn-head,
    .export-head {
      align-items: center;
      display: flex;
      gap: 16px;
      justify-content: space-between;
    }
    .cdn-title,
    .export-title {
      font-family: "Space Grotesk", Inter, system-ui, sans-serif;
      font-size: calc(22px * var(--text-scale, 1));
      font-weight: 500;
      margin: 0;
    }
    .cdn-close,
    .export-close {
      align-items: center;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--muted);
      cursor: pointer;
      display: inline-flex;
      height: 32px;
      justify-content: center;
      padding: 0;
      width: 32px;
    }
    .cdn-close:hover,
    .export-close:hover { background: var(--surface-2); color: var(--ink); }
    .cdn-close:focus-visible,
    .export-close:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
    .cdn-close svg,
    .export-close svg { height: 16px; width: 16px; }
    .cdn-copy-text {
      color: var(--muted);
      font-size: calc(14px * var(--text-scale, 1));
      line-height: 1.6;
      margin: 0;
    }
    .cdn-version-row {
      align-items: center;
      display: flex;
      gap: 8px;
      justify-content: flex-start;
    }
    .cdn-version-label {
      color: var(--muted);
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 600;
    }
    .cdn-version-select {
      appearance: none;
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--ink);
      cursor: pointer;
      font: inherit;
      font-size: calc(13px * var(--text-scale, 1));
      min-width: 0;
      padding: 6px 28px 6px 8px;
      width: auto;
    }
    .cdn-version-select:disabled { cursor: default; opacity: 0.8; padding-right: 8px; }
    .cdn-version-select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
    .cdn-catalog-link { color: var(--muted); font-size: calc(12px * var(--text-scale, 1)); text-underline-offset: 3px; }
    .cdn-catalog-link:hover { color: var(--ink); }
    .cdn-catalog-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .cdn-field-row {
      display: grid;
      gap: 8px;
      grid-template-columns: minmax(0, 1fr) auto;
    }
    .cdn-code {
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--ink);
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: calc(12px * var(--text-scale, 1));
      height: 40px;
      min-width: 0;
      padding: 0 10px;
      width: 100%;
    }
    .cdn-code:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
    .cdn-copy {
      align-items: center;
      background: var(--ink);
      border: 1px solid var(--ink);
      border-radius: var(--radius);
      color: var(--bg);
      cursor: pointer;
      display: inline-flex;
      font: inherit;
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 600;
      gap: 8px;
      height: 40px;
      justify-content: center;
      padding: 0 14px;
    }
    .cdn-copy:hover { opacity: 0.88; }
    .cdn-copy:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
    .cdn-copy svg { height: 16px; width: 16px; }
    .cdn-example {
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--muted);
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: calc(12px * var(--text-scale, 1));
      line-height: 1.6;
      margin: 0;
      overflow: auto;
      padding: 12px;
    }

    /* ---- Grid ---- */
    .grid {
      display: grid;
      gap: 8px;
      grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
      padding-bottom: 24px;
    }
    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-widget);
      display: flex;
      flex-direction: column;
      padding: 0;
      position: relative;
      transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
    }
    .card:hover, .card:focus-within {
      border-color: var(--border-strong);
      box-shadow: var(--shadow);
      transform: translateY(-2px);
    }
    .card-open {
      align-items: center;
      background: transparent;
      border: 0;
      border-radius: inherit;
      color: inherit;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      font: inherit;
      gap: 8px;
      padding: 24px 8px 16px;
      width: 100%;
    }
    .card-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .card.copied { border-color: var(--accent); }
    .card[hidden] { display: none; }
    .glyph {
      align-items: center;
      color: var(--export-color, var(--icon));
      display: flex;
      height: 48px;
      justify-content: center;
    }
    .glyph svg { display: block; height: var(--size, 24px); width: var(--size, 24px); }
    .label {
      color: var(--muted);
      font-size: calc(12px * var(--text-scale, 1));
      max-width: 100%;
      overflow: hidden;
      text-align: center;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .actions {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      display: flex;
      gap: 0;
      opacity: 0;
      overflow: hidden;
      pointer-events: none;
      position: absolute;
      right: 8px;
      top: 8px;
      transition: opacity 150ms ease;
    }
    .card:focus-within .actions,
    .card.show-actions .actions {
      opacity: 1;
      pointer-events: auto;
    }
    @media (hover: hover) {
      .card:hover .actions {
        opacity: 1;
        pointer-events: auto;
      }
    }
    @media (hover: none) {
      /* Avoid iOS/Safari consuming the first tap to synthesize :hover.
         Touch users reach these actions from the detail panel instead. */
      .actions { display: none; }
    }
    .action-btn {
      align-items: center;
      background: var(--surface);
      border: 0;
      border-left: 1px solid var(--border);
      color: var(--muted);
      cursor: pointer;
      display: inline-flex;
      height: 32px;
      justify-content: center;
      width: 32px;
    }
    .action-btn:first-child { border-left: 0; }
    .action-btn:hover { background: var(--surface-2); color: var(--ink); }
    .action-btn svg { height: 16px; width: 16px; }

    /* ---- Audit ---- */
    #catalog[data-view="audit"] .grid { display: none; }
    #catalog[data-view="gallery"] .audit { display: none; }
    .audit {
      border: 1px solid var(--border);
      border-radius: var(--radius-widget);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    .audit-row {
      align-items: center;
      background: var(--surface);
      border: 0;
      border-top: 1px solid var(--border);
      color: var(--ink);
      cursor: pointer;
      display: grid;
      font: inherit;
      gap: 16px;
      grid-template-columns: minmax(180px, 1fr) minmax(360px, 2fr);
      min-height: 88px;
      padding: 12px 16px;
      text-align: left;
      transition: background 150ms ease;
      width: 100%;
    }
    .audit-row:first-child { border-top: 0; }
    .audit-row:hover { background: var(--surface-2); }
    .audit-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
    .audit-row[hidden] { display: none; }
    .audit-meta {
      display: grid;
      gap: 6px;
      min-width: 0;
    }
    .audit-name {
      color: var(--ink);
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 600;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .audit-category {
      color: var(--muted);
      font-size: calc(12px * var(--text-scale, 1));
    }
    .audit-sizes {
      align-items: center;
      display: grid;
      gap: 8px;
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .audit-size {
      align-items: center;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--export-color, var(--icon));
      display: flex;
      gap: 8px;
      height: 56px;
      justify-content: center;
      min-width: 0;
    }
    .audit-size svg { display: block; flex: 0 0 auto; }
    .audit-size span {
      color: var(--muted);
      font-size: calc(11px * var(--text-scale, 1));
      font-variant-numeric: tabular-nums;
      min-width: 16px;
    }

    /* ---- Empty state ---- */
    .empty {
      align-items: center;
      color: var(--muted);
      display: flex;
      flex-direction: column;
      gap: 16px;
      padding: 64px 0;
      text-align: center;
    }
    .empty[hidden] { display: none; }
    .empty .glyph { color: var(--muted); height: auto; }
    .empty .glyph svg { height: 32px; width: 32px; }
    .empty-title { color: var(--ink); font-size: calc(16px * var(--text-scale, 1)); font-weight: 600; margin: 0; }
    .empty-hint { font-size: calc(14px * var(--text-scale, 1)); margin: 0; }
    .empty-clear {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--ink);
      cursor: pointer;
      font: inherit;
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 600;
      height: 32px;
      padding: 0 16px;
    }
    .empty-clear:hover { background: var(--surface-2); border-color: var(--border-strong); }
    .empty-clear:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

    /* ---- Detail drawer ---- */
    body.has-detail { overflow: hidden; }
    .detail {
      align-items: stretch;
      background: rgba(28, 27, 25, 0.36);
      display: flex;
      inset: 0;
      justify-content: flex-end;
      opacity: 0;
      pointer-events: none;
      position: fixed;
      transition: opacity 180ms ease;
      z-index: 40;
    }
    [data-theme="dark"] .detail { background: rgba(0, 0, 0, 0.56); }
    .detail.is-open {
      opacity: 1;
      pointer-events: auto;
    }
    .detail-panel {
      background: var(--surface);
      border-left: 1px solid var(--border);
      box-shadow: var(--shadow);
      display: flex;
      flex-direction: column;
      max-width: 480px;
      min-height: 100%;
      transform: translateX(24px);
      transition: transform 180ms ease;
      width: min(100%, 480px);
    }
    .detail.is-open .detail-panel { transform: translateX(0); }
    .detail-head {
      align-items: center;
      border-bottom: 1px solid var(--border);
      display: flex;
      gap: 16px;
      justify-content: space-between;
      padding: 16px 20px;
    }
    .detail-title {
      font-size: calc(14px * var(--text-scale, 1));
      font-weight: 600;
      margin: 0;
    }
    .detail-close {
      align-items: center;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--muted);
      cursor: pointer;
      display: inline-flex;
      height: 32px;
      justify-content: center;
      padding: 0;
      width: 32px;
    }
    .detail-close:hover { background: var(--surface-2); color: var(--ink); }
    .detail-close:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
    .detail-close svg { height: 16px; width: 16px; }
    .detail-body {
      display: flex;
      flex: 1;
      flex-direction: column;
      gap: 24px;
      overflow: auto;
      padding: 24px 20px;
    }
    .detail-preview {
      align-items: center;
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: var(--radius-widget);
      color: var(--export-color, var(--icon));
      display: flex;
      height: 176px;
      justify-content: center;
    }
    .detail-preview svg { display: block; height: var(--detail-size, 24px); width: var(--detail-size, 24px); }
    .detail-meta {
      display: grid;
      gap: 12px;
    }
    .detail-name {
      font-family: "Space Grotesk", Inter, system-ui, sans-serif;
      font-size: calc(24px * var(--text-scale, 1));
      font-weight: 500;
      margin: 0;
    }
    .detail-category {
      color: var(--accent);
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 600;
      margin: 0;
    }
    .detail-aliases {
      color: var(--muted);
      font-size: calc(13px * var(--text-scale, 1));
      line-height: 1.6;
      margin: 0;
    }
    .detail-sizes {
      display: grid;
      gap: 8px;
      grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    }
    .detail-size {
      align-items: center;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--export-color, var(--icon));
      cursor: pointer;
      display: flex;
      flex-direction: column;
      font: inherit;
      gap: 8px;
      height: 84px;
      justify-content: center;
      padding: 0;
    }
    .detail-size:hover { background: var(--surface-2); border-color: var(--border-strong); }
    .detail-size.is-active {
      background: var(--accent-soft);
      border-color: var(--accent);
      color: var(--accent-contrast);
    }
    .detail-size:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
    .detail-size svg { display: block; }
    .detail-size span {
      color: var(--muted);
      font-size: calc(12px * var(--text-scale, 1));
      font-variant-numeric: tabular-nums;
    }
    .copy-options {
      display: grid;
      gap: 8px;
    }
    .detail-export {
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: var(--radius-widget);
      display: grid;
      gap: 12px;
      padding: 12px;
    }
    .detail-export-title {
      color: var(--ink);
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 600;
      margin: 0;
    }
    .copy-title {
      color: var(--ink);
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 600;
      margin: 0;
    }
    .copy-rows {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-widget);
      overflow: hidden;
    }
    .copy-row {
      align-items: center;
      background: transparent;
      border: 0;
      border-top: 1px solid var(--border);
      color: var(--ink);
      cursor: pointer;
      display: flex;
      font: inherit;
      gap: 12px;
      min-height: 44px;
      padding: 8px 12px;
      text-align: left;
      width: 100%;
    }
    .copy-row:first-child { border-top: 0; }
    .copy-row:hover { background: var(--surface-2); }
    .copy-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
    .copy-row-label {
      flex: none;
      font-size: calc(12px * var(--text-scale, 1));
      font-weight: 600;
      width: 72px;
    }
    .copy-row-value {
      color: var(--muted);
      flex: 1;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: calc(11px * var(--text-scale, 1));
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .copy-row svg { color: var(--muted); flex: none; height: 14px; width: 14px; }
    .detail-download {
      align-items: center;
      background: var(--ink);
      border: 1px solid var(--ink);
      border-radius: var(--radius);
      color: var(--bg);
      display: inline-flex;
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 600;
      gap: 10px;
      height: 40px;
      justify-content: center;
      text-decoration: none;
    }
    .detail-download:hover { opacity: 0.88; }
    .detail-download:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
    .detail-download svg { height: 16px; width: 16px; }

    /* ---- Toast ---- */
    .toast {
      background: var(--ink);
      border-radius: var(--radius);
      bottom: 24px;
      box-shadow: var(--shadow);
      color: var(--bg);
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 500;
      left: 50%;
      opacity: 0;
      padding: 8px 16px;
      pointer-events: none;
      position: fixed;
      transform: translate(-50%, 8px);
      transition: opacity 200ms ease, transform 200ms ease;
      z-index: 80;
    }
    .toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

    /* ---- Footer ---- */
    .site-footer {
      align-items: center;
      border-top: 1px solid var(--border);
      display: flex;
      gap: 16px;
      justify-content: space-between;
      margin-left: -24px;
      margin-right: -24px;
      margin-top: auto;
      padding: 24px 24px 48px;
    }
    #catalog { padding-bottom: 48px; }
    .footer-brand { align-items: flex-start; color: var(--ink); display: grid; gap: 8px; }
    .footer-brand-copy { display: grid; gap: 4px; }
    .footer-brand svg { display: block; height: 24px; width: auto; }
    .footer-copy { color: var(--muted); font-size: calc(13px * var(--text-scale, 1)); margin: 0; }
    .footer-copy a { color: var(--muted); font-weight: 500; text-decoration: none; }
    .footer-copy a:hover { color: var(--accent); }
    .footer-copy a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
    .footer-links { align-items: center; display: flex; flex-wrap: wrap; gap: 16px; }
    .footer-link {
      align-items: center;
      color: var(--muted);
      display: inline-flex;
      gap: 8px;
      font-size: calc(13px * var(--text-scale, 1));
      font-weight: 500;
      text-decoration: none;
    }
    .footer-link:hover { color: var(--accent); }
    .footer-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
    .footer-link svg { height: 16px; width: 16px; }

    /* ---- Mobile ---- */
    @media (max-width: 760px) {
      .hero { padding: 32px 0 8px; }
      .hero-title { font-size: calc(32px * var(--text-scale, 1)); }
      .category-strip {
        align-items: center;
        justify-content: center;
        margin-top: 20px;
      }
      .category-strip .category-filter { display: none; }
      .category-strip .category-filter[data-category="all"],
      .category-strip .category-filter-new,
      .category-strip .category-filter.is-active,
      .category-strip.is-expanded .category-filter { display: inline-flex; }
      .category-strip .category-filter[hidden] { display: none; }
      .category-toggle {
        align-items: center;
        background: transparent;
        border: 0;
        border-radius: var(--radius);
        color: var(--muted);
        cursor: pointer;
        display: inline-flex;
        font: inherit;
        font-size: calc(13px * var(--text-scale, 1));
        font-weight: 500;
        gap: 6px;
        height: 32px;
        padding: 0 8px;
      }
      .category-toggle:hover { color: var(--ink); }
      .category-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
      .category-toggle svg { height: 14px; transition: transform 150ms ease; width: 14px; }
      .category-strip.is-expanded .category-toggle svg { transform: rotate(180deg); }
      .toolbar { align-items: stretch; flex-direction: column; }
      .toolbar-summary { justify-content: space-between; }
      .toolbar-controls { justify-content: space-between; }
      .cdn-field-row { grid-template-columns: 1fr; }
      .cdn-copy { width: 100%; }
      .grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
      .audit-row { grid-template-columns: 1fr; }
      .audit-sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .site-footer { align-items: flex-start; flex-direction: column; }
      .topbar-shell.is-scrolled .topbar-search { display: none; }
      .detail { align-items: flex-end; justify-content: center; }
      .detail-panel {
        border-left: 0;
        border-radius: var(--radius-widget) var(--radius-widget) 0 0;
        /* dvh tracks the *visible* viewport on mobile Safari/Chrome; plain vh
           ignores the browser chrome and pushes the header (with the close
           button) off the top of the screen. */
        max-height: 92vh;
        max-height: 92dvh;
        min-height: 0;
        padding-bottom: env(safe-area-inset-bottom);
        transform: translateY(24px);
      }
      .detail.is-open .detail-panel { transform: translateY(0); }
      .detail-sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

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