@charset "UTF-8";
/* ==========================================================================
   CreatorDock — design tokens
   Everything visual is driven from here. Dark is the default theme, so a
   visitor with JavaScript disabled and no OS preference still gets the
   intended look. The light token block appears twice on purpose: once for
   the OS preference and once for an explicit choice via [data-theme].
   CSS has no mixins, so keep those two blocks identical when editing.
   ========================================================================== */
:root {
  color-scheme: dark;

  /* surfaces */
  --bg: #0b0c0f;
  --surface-1: #121317;
  --surface-2: #16181c;
  --surface-3: #1c1f25;
  --surface-hover: #20242b;
  --overlay: rgba(6, 7, 10, .72);

  /* lines */
  --border: #23262e;
  --border-strong: #2e323d;

  /* text */
  --text: #e9eaee;
  --text-2: #a6acb8;
  --text-3: #838a97;

  /* single accent family: restrained indigo */
  --accent: #7f86e8;
  --accent-hover: #9298f0;
  --accent-ink: #0c0d16;
  --accent-soft: rgba(127, 134, 232, .14);
  /* reads on cover artwork, which is dark in both themes */
  --accent-on-image: #a3a8f6;

  /* reserved for meaningful states only */
  --ok: #4ade80;
  --warn: #f0b429;
  --danger: #f87171;

  /* per-project accent tints, driven by the existing "accent" data field */
  --tint-mint: #34d399;
  --tint-blue: #60a5fa;
  --tint-violet: #a78bfa;
  --tint-orange: #fb923c;
  --tint-paper: #cbd5e1;

  /* geometry */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;

  /* spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* elevation, tinted to the canvas hue instead of pure black */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 14px 34px -14px rgba(4, 6, 18, .72);

  /* shell */
  --sidebar-w: 236px;
  --topbar-h: 56px;
  --content-max: 1200px;

  /* z-index scale */
  --z-sticky: 20;
  --z-scrim: 40;
  --z-drawer: 50;
  --z-overlay: 60;

  --sans: "Geist", "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", "DM Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* Light theme — OS preference (works with JavaScript disabled) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f7f9;
    --surface-1: #ffffff;
    --surface-2: #ffffff;
    --surface-3: #eff0f4;
    --surface-hover: #e9ebf1;
    --overlay: rgba(20, 22, 30, .42);
    --border: #e4e6eb;
    --border-strong: #ced2db;
    --text: #14161b;
    --text-2: #4e5462;
    --text-3: #696f7c;
    --accent: #5457d6;
    --accent-hover: #4548bd;
    --accent-ink: #ffffff;
    --accent-soft: rgba(84, 87, 214, .10);
    --ok: #15803d;
    --warn: #b45309;
    --danger: #b91c1c;
    --shadow-1: 0 1px 2px rgba(20, 24, 50, .07);
    --shadow-2: 0 14px 30px -16px rgba(20, 24, 50, .22);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface-1: #ffffff;
  --surface-2: #ffffff;
  --surface-3: #eff0f4;
  --surface-hover: #e9ebf1;
  --overlay: rgba(20, 22, 30, .42);
  --border: #e4e6eb;
  --border-strong: #ced2db;
  --text: #14161b;
  --text-2: #4e5462;
  --text-3: #696f7c;
  --accent: #5457d6;
  --accent-hover: #4548bd;
  --accent-ink: #ffffff;
  --accent-soft: rgba(84, 87, 214, .10);
  --ok: #15803d;
  --warn: #b45309;
  --danger: #b91c1c;
  --shadow-1: 0 1px 2px rgba(20, 24, 50, .07);
  --shadow-2: 0 14px 30px -16px rgba(20, 24, 50, .22);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body.is-locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset, legend { margin: 0; }
ul, ol { list-style: none; padding: 0; }
fieldset { border: 0; padding: 0; min-inline-size: 0; }
legend { padding: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--text); }

/* ==========================================================================
   Utilities
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* small "nothing here" text used inside panels and list rows */
.muted { color: var(--text-3); }

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-overlay);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform .15s ease;
}
.skip-link:focus { transform: none; }

/* ==========================================================================
   Application shell
   Desktop: a static sidebar rail plus a scrolling content column.
   Mobile: the same <aside> becomes an overlay drawer — one markup tree, no
   duplication, so the active-nav highlight can never disagree between them.
   ========================================================================== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  height: 100vh;
  padding: var(--space-4) var(--space-3);
  background: var(--surface-1);
  border-right: 1px solid var(--border);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 2px var(--space-2) var(--space-3);
}

/* close affordance for the mobile drawer; hidden on the desktop rail
   (extra specificity: .icon-button sets display:grid further down) */
.sidebar .drawer-close { display: none; }

/* compact "jump to search" affordance: focuses the explore toolbar field */
.side-search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 12.5px;
  text-align: left;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.side-search .icon { width: 15px; height: 15px; flex: none; }
.side-search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-search kbd {
  flex: none;
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface-3);
  font: 500 10px/1.6 var(--mono);
  color: var(--text-3);
}
.side-search:hover { background: var(--surface-hover); border-color: var(--border-strong); color: var(--text-2); }

/* --- brand ------------------------------------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.015em;
  white-space: nowrap;
}
.brand-mark { display: grid; place-items: center; width: 26px; height: 26px; }
.brand-mark img { width: 26px; height: 26px; }
.brand-name em { font-style: normal; font-weight: 500; color: var(--text-3); }

/* --- navigation -------------------------------------------------------- */
.nav { display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: background .15s ease, color .15s ease;
}
.nav-item .icon { width: 17px; height: 17px; color: var(--text-3); transition: color .15s ease; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item:hover .icon { color: var(--text-2); }
.nav-item:active { background: var(--surface-hover); }

/* active page indicator */
.nav-item[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}
.nav-item[aria-current="page"] .icon { color: var(--accent); }
.nav-item[aria-current="page"]:hover { background: var(--accent-soft); }

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: auto;
  padding: var(--space-4) var(--space-2) 0;
  border-top: 1px solid var(--border);
}
.sidebar-note { font-size: 11px; line-height: 1.5; color: var(--text-3); }

/* --- content column ---------------------------------------------------- */
.app-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--topbar-h);
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.context { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.context-title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.context-meta {
  display: none;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}
.context-meta.is-visible { display: inline-block; }

.topbar-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }

.topbar-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12.5px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.topbar-action .icon { width: 15px; height: 15px; color: var(--text-3); }
.topbar-action kbd {
  padding: 1px 4px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font: 500 10px/1.4 var(--mono);
  color: var(--text-3);
}
.topbar-action:hover { background: var(--surface-3); border-color: var(--border-strong); color: var(--text); }
.topbar-action:hover .icon { color: var(--text-2); }

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-2);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.icon-button .icon { width: 16px; height: 16px; }
.icon-button:hover { background: var(--surface-3); border-color: var(--border-strong); color: var(--text); }
.icon-button:active { background: var(--surface-hover); }

/* the toggle shows the theme you would switch to */
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: block; }
}
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.menu-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* --- page + footer ----------------------------------------------------- */
.page {
  flex: 1;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: var(--space-6) var(--space-5) var(--space-8);
}

.footer { border-top: 1px solid var(--border); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  max-width: var(--content-max);
  margin-inline: auto;
  padding: var(--space-5);
  font-size: 12px;
  color: var(--text-3);
}
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 500; }
.footer-brand img { width: 16px; height: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.footer a:hover { color: var(--text); }
.footer-meta { margin-left: auto; font: 400 11px/1.6 var(--mono); }

/* --- drawer scrim ------------------------------------------------------ */
.scrim {
  position: fixed;
  inset: 0;
  z-index: var(--z-scrim);
  background: var(--overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility 0s linear .2s;
}
.scrim.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .2s ease, visibility 0s linear;
}

@media (min-width: 900px) {
  .scrim { display: none; }
}

/* ==========================================================================
   Components
   ========================================================================== */

/* --- buttons ----------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.button .icon { width: 15px; height: 15px; }
.button:active { transform: translateY(1px); }

.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: var(--accent-hover); }

.button-secondary {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.button-secondary:hover { background: var(--surface-3); border-color: var(--border-strong); }

.button-ghost { background: transparent; color: var(--text-2); }
.button-ghost:hover { background: var(--surface-3); color: var(--text); }

.button-sm { height: 32px; padding: 0 11px; font-size: 12.5px; }
.button[disabled], .button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.button[disabled]:active { transform: none; }

/* --- inline links ------------------------------------------------------ */
.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  transition: color .15s ease;
}
.link .icon { width: 14px; height: 14px; color: var(--text-3); transition: color .15s ease, transform .15s ease; }
.link:hover { color: var(--accent); }
.link:hover .icon { color: var(--accent); }
.link-forward:hover .icon { transform: translateX(2px); }

/* --- text field -------------------------------------------------------- */
.field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field .icon { width: 16px; height: 16px; color: var(--text-3); }
.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 13.5px;
}
.field input::placeholder { color: var(--text-3); }
.field input:focus-visible { outline: none; }
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-lg { height: 48px; padding: 0 14px; }
.field-lg .icon { width: 18px; height: 18px; }
.field-lg input { font-size: 15px; }

/* --- filter chips ------------------------------------------------------ */
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }

.chip { position: relative; display: inline-flex; }
.chip input, .segment input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}
.chip-face {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.chip-face:hover { background: var(--surface-3); border-color: var(--border-strong); color: var(--text); }
.chip-count { font: 500 11px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--text-3); }
.chip-face:hover .chip-count { color: var(--text-2); }
.chip input:checked + .chip-face {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
  font-weight: 600;
}
.chip input:checked + .chip-face .chip-count { color: var(--accent); }
.chip input:focus-visible + .chip-face,
.segment input:focus-visible + .segment-face { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- segmented control (sort) ------------------------------------------ */
.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
}
.segment { position: relative; display: inline-flex; }
.segment-face {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-xs);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.segment-face:hover { color: var(--text); }
.segment input:checked + .segment-face {
  background: var(--surface-1);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-1);
}

/* --- page headers ------------------------------------------------------ */
.page-head { margin-bottom: var(--space-5); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow .icon { width: 13px; height: 13px; }
.page-title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.2;
  text-wrap: balance;
}
.page-sub {
  max-width: 64ch;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}

/* --- breadcrumb -------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: var(--space-4);
  font-size: 12px;
  color: var(--text-3);
}
.breadcrumb a { display: inline-flex; align-items: center; gap: 6px; transition: color .15s ease; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .icon { width: 13px; height: 13px; }
.breadcrumb-sep { color: var(--border-strong); }
.breadcrumb [aria-current="page"] { color: var(--text-2); }

/* --- toolbar ----------------------------------------------------------- */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.toolbar-sort { display: inline-flex; align-items: center; gap: 10px; }
.toolbar-label {
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}
/* the search field takes the free space in the first toolbar row */
.toolbar-row > .field { flex: 1 1 240px; max-width: 420px; }
.toolbar-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-3);
}
.toolbar-status .chip-count { font: 500 12px/1 var(--mono); color: var(--text-2); }
.result-count { font: 500 12px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--text-2); }
.toolbar-reset { margin-left: auto; }
.toolbar-reset[hidden] { display: none; }
.toolbar-hint { margin-left: auto; font: 400 11px/1.6 var(--mono); color: var(--text-3); }
.toolbar-hint kbd {
  padding: 1px 4px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface-2);
  font: 500 10px/1.5 var(--mono);
  color: var(--text-2);
}

/* --- sections ---------------------------------------------------------- */
.section + .section { margin-top: var(--space-7); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.015em;
}
.section-title .icon { width: 16px; height: 16px; color: var(--text-3); }
.section-sub { margin-top: 4px; font-size: 12.5px; color: var(--text-3); }

/* --- stats ------------------------------------------------------------- */
.stats { display: flex; flex-wrap: wrap; gap: var(--space-2); }
/* a load-failure panel replaces the stat row and should take the full width */
.stats .state { width: 100%; }
/* the stat row sits between the page head and the first section, so it owes the
   section below the same breathing room sections give each other */
.stats + .section { margin-top: var(--space-7); }
.stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 108px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.stat-value {
  font: 600 18px/1.15 var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.015em;
}
.stat-label { font-size: 11px; color: var(--text-3); }

/* --- accent tints (the "accent" field from the data files) -------------- */
[data-accent="mint"] { --tint: var(--tint-mint); }
[data-accent="blue"] { --tint: var(--tint-blue); }
[data-accent="violet"] { --tint: var(--tint-violet); }
[data-accent="orange"] { --tint: var(--tint-orange); }
[data-accent="paper"] { --tint: var(--tint-paper); }

/* --- media covers ------------------------------------------------------ */
.cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--surface-3);
}
.cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover img.is-missing { display: none; }

.cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--text-3);
  font: 600 1.6em var(--mono);
  letter-spacing: .04em;
}
@supports (color: color-mix(in oklab, red, blue)) {
  .cover-fallback {
    background: color-mix(in oklab, var(--tint, var(--surface-3)) 18%, var(--surface-2));
    color: color-mix(in oklab, var(--tint, var(--text-3)) 70%, var(--text));
  }
}
.cover-fallback[hidden] { display: none; }

/* overlay chrome sits on artwork, so it stays dark in both themes */
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-xs);
  background: rgba(8, 9, 12, .78);
  color: #dfe3ee;
  font: 500 10px/1 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.badge .icon { width: 11px; height: 11px; color: var(--accent-on-image); }

.cover-action {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-sm);
  background: rgba(8, 9, 12, .78);
  color: #eef1f8;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity .15s ease, transform .15s ease;
}
.cover-action .icon { width: 14px; height: 14px; }
.card:hover .cover-action, .card:focus-within .cover-action { opacity: 1; transform: none; }

/* --- cards ------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: var(--space-4);
}
.grid-wide { grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-2px);
}
.card-cover { aspect-ratio: 16 / 10; }
.card-cover img { transition: transform .3s ease; }
.card:hover .card-cover img { transform: scale(1.02); }

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}
.card-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-2);
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-3);
}
.card-meta .tint-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--tint, currentColor);
}
.card-title { font-size: 15px; font-weight: 600; letter-spacing: -.015em; line-height: 1.35; }
.card-title a:hover { color: var(--accent); }
.card-title a:focus-visible { outline-offset: 3px; }
.card-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}
.card-creator { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; transition: color .15s ease; }
.card-creator:hover { color: var(--text); }
.card-arrow { margin-left: auto; color: var(--text-3); transition: color .15s ease, transform .15s ease; }
.card:hover .card-arrow { color: var(--accent); transform: translateX(2px); }

/* --- tags -------------------------------------------------------------- */
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-3);
  color: var(--text-2);
  font: 500 10.5px/1.5 var(--mono);
}
.tag .icon { width: 11px; height: 11px; color: var(--text-3); }
.tag-lg { padding: 6px 10px; font-size: 11.5px; }
.tag-lg .icon { width: 13px; height: 13px; }

/* --- avatars ----------------------------------------------------------- */
.avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text-2);
  font-weight: 600;
  letter-spacing: .02em;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar img.is-missing { display: none; }
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-md { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 44px; height: 44px; font-size: 15px; border-radius: var(--radius-md); }
.avatar-xl { width: 72px; height: 72px; font-size: 24px; border-radius: var(--radius-lg); }

/* --- panels + definition rows ------------------------------------------ */
.panel {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: var(--space-3);
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.panel-head .icon { width: 13px; height: 13px; }

.detail-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 9px 0;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
}
.detail-list > div:first-child { border-top: 0; padding-top: 0; }
.detail-list > div:last-child { padding-bottom: 0; }
.detail-list dt { display: inline-flex; align-items: center; gap: 7px; color: var(--text-3); }
.detail-list dt .icon { width: 13px; height: 13px; }
.detail-list dd { color: var(--text); text-align: right; }
.detail-list dd.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.split-rows { display: grid; }
.split-rows > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
}
.split-rows > div:first-child { border-top: 0; padding-top: 0; }
.split-rows > div:last-child { padding-bottom: 0; }

/* --- callouts ---------------------------------------------------------- */
.note {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--warn);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-2);
}
.note .icon { width: 15px; height: 15px; margin-top: 2px; color: var(--warn); }
.note-info { border-left-color: var(--accent); }
.note-info .icon { color: var(--accent); }
.note code {
  padding: 1px 4px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface-2);
  font: 400 11.5px/1.5 var(--mono);
  color: var(--text);
}

/* --- checklists -------------------------------------------------------- */
.checklist { display: grid; gap: 9px; }
.checklist li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.55; color: var(--text-2); }
.checklist li .icon { width: 15px; height: 15px; margin-top: 3px; color: var(--ok); }

/* --- empty + error states ---------------------------------------------- */
.empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: var(--space-7) var(--space-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  text-align: center;
}
.empty .empty-icon,
.state .state-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-3);
  color: var(--text-3);
}
.empty .empty-icon .icon { width: 19px; height: 19px; }
.empty-title { font-size: 15px; font-weight: 600; }
.empty-text { max-width: 46ch; font-size: 13px; line-height: 1.6; color: var(--text-3); }
.empty-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: 4px; }

.state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  max-width: 60ch;
  padding: var(--space-7) 0;
}
.state .state-icon { width: 44px; height: 44px; }
.state .state-icon .icon { width: 21px; height: 21px; }
.state-danger .state-icon { color: var(--danger); }
.state-title { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.state-text { font-size: 13.5px; line-height: 1.65; color: var(--text-2); }
.state-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: 4px; }

/* --- loading skeletons ------------------------------------------------- */
.skeleton {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}
.skeleton-cover { aspect-ratio: 16 / 10; background: var(--surface-3); }
.skeleton-body { display: grid; gap: 10px; padding: 14px; }
.skeleton-line { height: 10px; border-radius: 3px; background: var(--surface-3); }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-70 { width: 70%; }
.skeleton-cover, .skeleton-line { animation: cd-pulse 1.4s ease-in-out infinite; }

@keyframes cd-pulse {
  50% { opacity: .5; }
}

/* ==========================================================================
   Page-specific composition
   ========================================================================== */

/* --- home: discovery panel --------------------------------------------- */
.discover {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--surface-1);
  background-image: radial-gradient(120% 100% at 6% 0%, var(--accent-soft), transparent 58%);
}
.discover .page-title { font-size: clamp(24px, 3vw, 32px); }
.discover-search { width: 100%; max-width: 560px; }
.discover-links { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* --- home: submission band --------------------------------------------- */
.submit-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--surface-1);
  background-image: radial-gradient(120% 140% at 2% 0%, var(--accent-soft), transparent 62%);
}
.submit-band > div { display: grid; gap: 6px; max-width: 56ch; }
.submit-band h2 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.submit-band p { font-size: 13.5px; line-height: 1.6; color: var(--text-2); }

/* --- home: category tiles ---------------------------------------------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: var(--space-3); }

.cat {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.cat:hover { border-color: var(--border-strong); background: var(--surface-hover); transform: translateY(-1px); }
.cat-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text-2);
}
.cat-icon .icon { width: 16px; height: 16px; }
.cat-body { min-width: 0; }
.cat-name { font-size: 13.5px; font-weight: 600; }
.cat-meta { font: 500 11px/1.5 var(--mono); font-variant-numeric: tabular-nums; color: var(--text-3); }
.cat-arrow { margin-left: auto; color: var(--text-3); transition: color .15s ease, transform .15s ease; }
.cat:hover .cat-arrow { color: var(--accent); transform: translateX(2px); }

/* --- project detail ---------------------------------------------------- */
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--space-6);
  align-items: start;
}
.detail-main { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.detail-aside {
  position: sticky;
  top: calc(var(--topbar-h) + var(--space-4));
  display: grid;
  gap: var(--space-4);
}
.detail-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.detail-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.detail-cover { aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.prose { max-width: 68ch; }
.prose p { margin-bottom: var(--space-4); font-size: 14.5px; line-height: 1.7; color: var(--text-2); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 600; }

/* creator card inside the project sidebar */
.creator-cell { display: flex; align-items: center; gap: 11px; }
.creator-cell-name { font-size: 14px; font-weight: 600; letter-spacing: -.01em; transition: color .15s ease; }
.creator-cell-name:hover { color: var(--accent); }
.creator-cell-role { margin-top: 2px; font-size: 12px; color: var(--text-3); }
.creator-cell-bio { margin-top: var(--space-3); font-size: 12.5px; line-height: 1.6; color: var(--text-2); }
.panel-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-3); }

/* --- creator profile --------------------------------------------------- */
.creator-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-4) var(--space-5);
  align-items: start;
  margin-bottom: var(--space-5);
}
.creator-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-3); }

/* --- about ------------------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: var(--space-4); }
.about-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}
.about-card h2, .about-card h3 { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.about-card p { font-size: 13px; line-height: 1.65; color: var(--text-2); }
.about-card code {
  padding: 1px 4px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface-3);
  font: 400 12px/1.5 var(--mono);
  color: var(--text);
}
.about-card .icon-lead { width: 18px; height: 18px; color: var(--text-3); }
.stack { display: grid; gap: var(--space-4); max-width: 74ch; }

/* --- no-JavaScript notice ---------------------------------------------- */
.noscript-note {
  display: flex;
  gap: 10px;
  margin-bottom: var(--space-4);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text-2);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .detail { grid-template-columns: minmax(0, 1fr) 272px; gap: var(--space-5); }
}

@media (max-width: 1023px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
  .detail-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); }
}

@media (max-width: 899px) {
  /* the single sidebar element becomes an overlay drawer */
  .app { display: block; }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(288px, 86vw);
    height: 100dvh;
    overflow-y: auto;
    transform: translateX(-100%);
    /* visibility also keeps the closed drawer out of the tab order.
       Flipping it with a delay (instead of animating it) lets the drawer
       take focus the moment it opens, while still fading/sliding out. */
    visibility: hidden;
    border-right: 1px solid var(--border-strong);
    box-shadow: var(--shadow-2);
    transition: transform .2s ease, visibility 0s linear .2s;
  }
  .sidebar.is-open {
    transform: none;
    visibility: visible;
    transition: transform .2s ease, visibility 0s linear;
  }

  .app-body { min-height: 100dvh; }
  .menu-toggle { display: grid; }
  .sidebar .drawer-close { display: grid; }
  .icon-button { width: 40px; height: 40px; }

  .topbar-inner, .page, .footer-inner { padding-inline: var(--space-4); }
  .page { padding-top: var(--space-5); }
  .topbar-action-label { display: none; }

  /* filters scroll horizontally instead of wrapping into a tall block */
  .chip-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    /* a nowrap flex row never shrinks below its content, so pin it to the
       screen width and let the row scroll instead of widening the page */
    width: calc(100% + var(--space-4) * 2);
    margin-inline: calc(var(--space-4) * -1);
    padding-inline: var(--space-4);
    scrollbar-width: none;
  }
  .chip-scroll::-webkit-scrollbar { display: none; }
  .chip-scroll > .chip { flex: none; }

  .toolbar-row { flex-direction: column; align-items: stretch; }
  /* in the stacked layout flex-basis sets a height, so the search field goes
     back to its natural 40px row height and takes the full width */
  .toolbar-row > .field { flex: 0 0 auto; width: 100%; max-width: none; }
  .toolbar-sort { justify-content: space-between; }
  .segmented { flex: 1; }
  .segment { flex: 1; }
  .segment-face { flex: 1; justify-content: center; }
  .toolbar-reset { margin-left: 0; }
}

@media (max-width: 640px) {
  .discover { padding: var(--space-5); }
  .creator-hero { grid-template-columns: minmax(0, 1fr); }
  .creator-hero .avatar-xl { width: 56px; height: 56px; font-size: 19px; }
  .detail-aside { grid-template-columns: minmax(0, 1fr); }
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .grid, .grid-wide { grid-template-columns: minmax(0, 1fr); }
  .page-title { font-size: 21px; }
  .footer-meta { margin-left: 0; width: 100%; }
}

/* Touch devices never fire :hover, so reveal cover actions up front. */
@media (hover: none) {
  .cover-action { opacity: 1; transform: none; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .card:hover, .cat:hover { transform: none; }
  .card:hover .card-cover img { transform: none; }
  /* the drawer/scrim hide themselves with a transition delay; drop it too */
  .sidebar, .scrim { transition-delay: 0s !important; }
  .link-forward:hover .icon,
  .cat:hover .cat-arrow, .card:hover .card-arrow { transform: none; }
}
