/* ============================================================================
   CODE LIBRARY — original design (2026-11-29, refined 2026-11-30).
   Written for this collection only. No reference/catalog template.
   Operator law: rounded borders, BLACK surfaces, depth from stacked shadows
   on borders / margins / separators — never a grey slab or a flat hairline.
   Exact content strings are preserved.
   ============================================================================ */

.hub-body:has(.codev) {
  background: #050506 !important;
  color: #f5f5f3;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.hub-body:has(.codev) .hub-shell,
.hub-body:has(.codev) .hub-main { background: #050506; min-width: 0; }
.hub-body:has(.codev) .hub-main { padding: 0; }
.hub-body:has(.codev) .hub-side {
  border-right: 1px solid #000;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.05), 14px 0 40px -28px rgba(0,0,0,1);
  background: #050506;
  padding: 4.5rem 0 0;
}
.hub-body:has(.codev) .hub-nav a {
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #6f6f70;
  display: block;
  padding: .8rem 1.1rem;
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.95), 0 1px 0 rgba(255,255,255,.04);
  border-radius: 0;
}
.hub-body:has(.codev) .hub-nav a:hover { color: #f5f5f3; background: #08080b; }
.hub-body:has(.codev) .hub-nav a.active {
  color: #050506;
  background: #f5f5f3;
  box-shadow: 0 10px 26px -12px rgba(0,0,0,.95), inset 0 1px 0 rgba(255,255,255,.5);
  border-radius: 8px;
  margin: .35rem .6rem;
  padding: .7rem .9rem;
}

/* ---- masthead: one word only ------------------------------------------ */
.codev { max-width: 1280px; margin: 0 auto; padding: 3rem 1.6rem 6rem; }
.codev-head { padding: 0 0 1.6rem; }
.codev-h1 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1;
  letter-spacing: -.03em;
  color: #f5f5f3;
  margin: 0;
}

/* ---- two-column layout: content left, find/filter sidebar right -------- */
.codev-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}
.codev-content { min-width: 0; grid-column: 1; grid-row: 1; }
.codev-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: .65rem .85rem;
  background: linear-gradient(165deg, #0a0a0d, #050507);
  border: 1px solid rgba(255,255,255,.10);
  border-top-color: rgba(255,255,255,.16);
  border-bottom-color: #000;
  border-radius: 12px;
  box-shadow: 0 22px 46px -26px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,.06), inset 0 -2px 8px rgba(0,0,0,.75);
}
.codev-side {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 5.5rem;
  align-self: start;
  max-height: calc(100vh - 6.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.24) transparent;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.10);
  border-top-color: rgba(255,255,255,.18);
  border-bottom-color: #000;
  border-radius: 14px;
  background: linear-gradient(165deg, #0b0b0e 0%, #050506 55%, #040405 100%);
  box-shadow:
    0 30px 64px -30px rgba(0,0,0,1),
    0 10px 24px -12px rgba(0,0,0,.92),
    inset 0 1px 0 rgba(255,255,255,.07),
    inset 0 -2px 10px rgba(0,0,0,.72);
}
.codev-side::-webkit-scrollbar { width: 5px; }
.codev-side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.24); border-radius: 4px; }

/* ---- right sidebar controls: black plates with stacked depth ---------- */
.codev-find, .codev-filters {
  background: linear-gradient(165deg, #0a0a0d, #050507);
  border: 1px solid rgba(255,255,255,.10);
  border-top-color: rgba(255,255,255,.16);
  border-bottom-color: #000;
  border-radius: 12px;
  box-shadow: 0 22px 46px -26px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,.06), inset 0 -2px 8px rgba(0,0,0,.75);
}
.codev-find { position: relative; padding: .85rem .9rem .85rem 2.4rem; }
.codev-find::before {
  content: "";
  position: absolute;
  left: 1.05rem; top: 50%;
  width: 9px; height: 9px;
  margin-top: -6px;
  border: 1px solid #6f6f70;
  border-radius: 50%;
  box-shadow: 5px 5px 0 -3px #6f6f70;
  pointer-events: none;
}
.codev-find input {
  width: 100%;
  height: 34px;
  background: #030304;
  border: 1px solid #000;
  border-radius: 8px;
  color: #f5f5f3;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: .04em;
  padding: 0 .8rem;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.95), 0 1px 0 rgba(255,255,255,.05);
}
.codev-find input::placeholder { color: #6f6f70; }
.codev-find input:focus {
  outline: none;
  border-color: rgba(255,255,255,.20);
  box-shadow: inset 0 2px 8px rgba(0,0,0,.95), 0 0 0 3px rgba(0,0,0,.85), 0 0 0 4px rgba(255,255,255,.10);
}
.codev-filters {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: .85rem;
}
.codev-chip {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  text-align: left;
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #a4a4a1;
  background: linear-gradient(165deg, #0b0b0e, #050506);
  border: 1px solid rgba(255,255,255,.10);
  border-top-color: rgba(255,255,255,.18);
  border-bottom-color: #000;
  border-radius: 9px;
  padding: .7rem .85rem;
  cursor: pointer;
  box-shadow: 0 10px 22px -12px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,.07), inset 0 -2px 6px rgba(0,0,0,.7);
}
.codev-chip::before {
  content: "";
  width: 7px; height: 7px;
  flex: none;
  border-radius: 50%;
  background: #3a3a3d;
  box-shadow: inset 0 1px 2px rgba(0,0,0,1), 0 1px 0 rgba(255,255,255,.05);
}
.codev-chip:hover { color: #f5f5f3; border-top-color: rgba(255,255,255,.28); }
.codev-chip.active {
  color: #050506;
  background: linear-gradient(165deg, #f5f5f3, #c9ccd1);
  border-color: #f5f5f3;
  box-shadow: 0 12px 26px -10px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,.7);
}
.codev-chip.active::before { background: #050506; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.codev-count {
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #a4a4a1;
  font-variant-numeric: tabular-nums;
}
.codev-cols { display: flex; align-items: center; gap: 6px; }
.codev-cols-label {
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6f6f70;
  margin-right: .4rem;
}
.codev-cols button {
  width: 32px; height: 30px;
  border: 1px solid rgba(255,255,255,.10);
  border-top-color: rgba(255,255,255,.18);
  border-bottom-color: #000;
  border-radius: 8px;
  background: linear-gradient(165deg, #0b0b0e, #050506);
  color: #a4a4a1;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 18px -10px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,.06);
}
.codev-cols button:hover { color: #f5f5f3; }
.codev-cols button[aria-pressed="true"] {
  color: #050506;
  background: linear-gradient(165deg, #f5f5f3, #c9ccd1);
  border-color: #f5f5f3;
  box-shadow: 0 10px 20px -10px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,.7);
}
.codev-cols i { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; width: 13px; height: 13px; }
.codev-cols i > i { display: block; border: 1px solid currentColor; border-radius: 1px; aspect-ratio: 1; }

/* ---- source plates: rounded black faces, depth from stacked shadows ---- */
.codev-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.codev-grid[data-columns="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.codev-grid[data-columns="4"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.codev-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 14px;
  background: linear-gradient(165deg, #0b0b0e 0%, #070709 42%, #040405 100%);
  border: 1px solid rgba(255,255,255,.10);
  border-top-color: rgba(255,255,255,.18);
  border-bottom-color: #000;
  box-shadow:
    0 30px 64px -30px rgba(0,0,0,1),
    0 10px 24px -12px rgba(0,0,0,.92),
    inset 0 1px 0 rgba(255,255,255,.07),
    inset 0 -2px 10px rgba(0,0,0,.72);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.codev-card:hover {
  transform: translateY(-2px);
  border-top-color: rgba(255,255,255,.28);
  box-shadow:
    0 44px 90px -36px rgba(0,0,0,1),
    0 16px 32px -12px rgba(0,0,0,.95),
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 -2px 12px rgba(0,0,0,.78);
}
.codev-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .8rem 1rem;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,1), 0 1px 0 rgba(255,255,255,.05);
}
.codev-marker { display: flex; gap: 4px; align-items: center; }
.codev-marker i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #f5f5f3;
  display: block;
  box-shadow: 0 2px 6px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,.6);
}
.codev-marker i:nth-child(2) { background: #3a3a3d; box-shadow: inset 0 1px 2px rgba(0,0,0,1); }
.codev-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.codev-tag {
  font-family: var(--font-label);
  font-size: 7px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #a4a4a1;
  border: 1px solid rgba(255,255,255,.10);
  border-bottom-color: #000;
  border-radius: 999px;
  padding: .22rem .45rem;
  white-space: nowrap;
  background: #060608;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 4px 10px -6px rgba(0,0,0,1);
}
.codev-tag.pane {
  color: #54d6a0;
  border-color: rgba(84,214,160,.28);
  border-bottom-color: #000;
}
.codev-prov {
  margin: 1rem 1rem 0;
  padding: .55rem .7rem;
  border-radius: 8px;
  background: #030304;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.95), 0 1px 0 rgba(255,255,255,.05);
  font-family: var(--font-label);
  font-size: 9.5px;
  line-height: 1.5;
  color: #6f6f70;
  overflow-wrap: anywhere;
}
.codev-name {
  margin: .9rem 1rem .35rem;
  font-family: var(--font-sans);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.025em;
  color: #f5f5f3;
}
.codev-desc {
  margin: 0 1rem 1rem;
  font-size: 13px;
  line-height: 1.6;
  color: #a4a4a1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.codev-peek {
  margin: 0 1rem;
  border: 1px solid #000;
  border-radius: 10px;
  background: #000;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0,0,0,1), 0 1px 0 rgba(255,255,255,.05);
}
.codev-peek::before {
  content: "";
  display: block;
  height: 1px;
  background: rgba(255,255,255,.10);
  box-shadow: 0 1px 0 rgba(0,0,0,1);
}
.codev-peek pre {
  margin: 0;
  padding: .8rem .9rem;
  height: 92px;
  overflow: hidden;
  font-family: var(--font-label);
  font-size: 10px;
  line-height: 1.6;
  color: #a4a4a1;
  white-space: pre;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.012) 3px 4px);
}
/* the same peek also carries a section image or a short excerpt */
.codev-peek .codev-preview {
  display: block;
  width: 100%;
  height: 148px;
  object-fit: contain;
  background: #000;
}
.codev-peek-text {
  margin: 0;
  padding: .8rem .9rem;
  height: 92px;
  overflow: hidden;
  font-family: var(--font-label);
  font-size: 10px;
  line-height: 1.6;
  color: #a4a4a1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.codev-foot {
  margin-top: auto;
  padding: .9rem 1rem .2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.codev-meta {
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: .06em;
  color: #6f6f70;
  overflow-wrap: anywhere;
}
.codev-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: .65rem 1rem .9rem;
  box-shadow: inset 0 1px 0 rgba(0,0,0,1), 0 -1px 0 rgba(255,255,255,.04);
  overflow-x: auto;
  scrollbar-width: none;
}
.codev-actions::-webkit-scrollbar { display: none; }
.codev-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  flex: none;
  white-space: nowrap;
  font-family: var(--font-label);
  font-size: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #a4a4a1;
  background: linear-gradient(165deg, #0b0b0e, #050506);
  border: 1px solid rgba(255,255,255,.10);
  border-top-color: rgba(255,255,255,.16);
  border-bottom-color: #000;
  border-radius: 6px;
  padding: .3rem .42rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 16px -10px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,.06);
  transition: color .15s, background .15s, border-color .15s;
}
.codev-act:hover {
  color: #050506;
  background: linear-gradient(165deg, #f5f5f3, #c9ccd1);
  border-color: #f5f5f3;
}
.codev-act.primary {
  color: #03130d;
  background: linear-gradient(165deg, #54d6a0, #2e9e73);
  border-color: #54d6a0;
  box-shadow: 0 10px 18px -10px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,.35);
}
.codev-act.primary:hover { background: linear-gradient(165deg, #7ce8bb, #43b98a); }
.codev-empty {
  margin: 2rem 0 0;
  padding: 2rem;
  text-align: center;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6f6f70;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 14px;
  background: #050506;
  box-shadow: inset 0 2px 12px rgba(0,0,0,.9), 0 20px 40px -28px rgba(0,0,0,1);
}

/* ---- source viewer: rounded two-pane inspection surface --------------- */
dialog.codev-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: min(90vh, 960px);
  padding: 0;
  border: 1px solid rgba(255,255,255,.12);
  border-top-color: rgba(255,255,255,.20);
  border-bottom-color: #000;
  border-radius: 16px;
  background: linear-gradient(165deg, #0a0a0d, #040405);
  color: #f5f5f3;
  overflow: hidden;
  box-shadow:
    0 60px 120px -40px rgba(0,0,0,1),
    0 20px 44px -18px rgba(0,0,0,.96),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -2px 12px rgba(0,0,0,.8);
}
.codev-dialog::backdrop { background: rgba(0,0,0,.9); }
.codev-view { display: flex; flex-direction: column; max-height: inherit; min-height: 0; }
.codev-view-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,1), 0 1px 0 rgba(255,255,255,.05);
  background: linear-gradient(165deg, #0b0b0e, #060608);
}
.codev-view-kicker {
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #6f6f70;
  display: block;
  margin-bottom: .45rem;
}
.codev-view-title {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -.02em;
  margin: 0;
  color: #f5f5f3;
}
.codev-view-x {
  background: linear-gradient(165deg, #0b0b0e, #050506);
  border: 1px solid rgba(255,255,255,.10);
  border-bottom-color: #000;
  border-radius: 8px;
  color: #a4a4a1;
  width: 32px; height: 32px;
  font-size: 20px; line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px -10px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,.06);
}
.codev-view-x:hover { color: #050506; background: #f5f5f3; }
.codev-view-body { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 12px; flex: 1; min-height: 0; padding: 12px; }
.codev-view-rail {
  border: 1px solid rgba(255,255,255,.10);
  border-top-color: rgba(255,255,255,.16);
  border-bottom-color: #000;
  border-radius: 12px;
  background: linear-gradient(165deg, #08080b, #040405);
  box-shadow: 0 20px 40px -24px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,.05);
  padding: 1.1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.codev-spec {
  border-top: 0;
  box-shadow: inset 0 1px 0 rgba(0,0,0,1), 0 -1px 0 rgba(255,255,255,.04);
  padding-top: .75rem;
}
.codev-spec span {
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #6f6f70;
  display: block;
  margin-bottom: .35rem;
}
.codev-spec b {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 400;
  color: #f5f5f3;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.codev-spec.format b { color: #54d6a0; }
.codev-note {
  margin: 0;
  padding-top: .8rem;
  box-shadow: inset 0 1px 0 rgba(0,0,0,1);
  font-size: 12px;
  line-height: 1.6;
  color: #a4a4a1;
}
.codev-note b { color: #f5f5f3; font-weight: 400; }
.codev-how {
  margin: 0;
  font-family: var(--font-label);
  font-size: 9.5px;
  line-height: 1.6;
  color: #6f6f70;
  overflow-wrap: anywhere;
}
.codev-formats {
  margin-top: auto;
  padding-top: .8rem;
  box-shadow: inset 0 1px 0 rgba(0,0,0,1);
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #6f6f70;
  line-height: 1.7;
}
.codev-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 1px solid #000;
  border-radius: 12px;
  background: #000;
  overflow: hidden;
  box-shadow: inset 0 2px 14px rgba(0,0,0,1), 0 1px 0 rgba(255,255,255,.05);
}
.codev-pane-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .9rem;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,1), 0 1px 0 rgba(255,255,255,.05);
  background: linear-gradient(165deg, #0b0b0e, #050506);
}
.codev-pane-tag {
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #54d6a0;
}
.codev-pane-tools button {
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #a4a4a1;
  background: linear-gradient(165deg, #0b0b0e, #050506);
  border: 1px solid rgba(255,255,255,.10);
  border-bottom-color: #000;
  border-radius: 8px;
  padding: .35rem .6rem;
  cursor: pointer;
  box-shadow: 0 8px 16px -10px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,.06);
}
.codev-pane-tools button:hover, .codev-pane-tools button[aria-pressed="true"] {
  color: #050506;
  background: linear-gradient(165deg, #f5f5f3, #c9ccd1);
  border-color: #f5f5f3;
}
.codev-scroll { flex: 1; min-height: 0; overflow: auto; padding: .8rem 0 1.2rem; }
.codev-scroll code { display: block; }
.codev-line {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  font-family: var(--font-label);
  font-size: 11.5px;
  line-height: 1.7;
}
.codev-line i {
  font-style: normal;
  color: #4a4a4d;
  text-align: right;
  padding-right: 12px;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.05), 1px 0 0 rgba(0,0,0,1);
  user-select: none;
}
.codev-line span { white-space: pre; padding-left: 14px; color: #c9ccd1; }
.codev-scroll.wrap .codev-line span { white-space: pre-wrap; overflow-wrap: anywhere; }
.codev-view-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .9rem 1.4rem;
  box-shadow: inset 0 1px 0 rgba(0,0,0,1), 0 -1px 0 rgba(255,255,255,.04);
  background: linear-gradient(165deg, #0b0b0e, #060608);
}
.codev-view-foot small { color: #6f6f70; font-size: 11px; }
.codev-view-foot small b { color: #f5f5f3; font-weight: 400; }
.codev-view-foot a, .codev-view-foot button {
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #f5f5f3;
  text-decoration: none;
  background: linear-gradient(165deg, #0b0b0e, #050506);
  border: 1px solid rgba(255,255,255,.10);
  border-bottom-color: #000;
  border-radius: 8px;
  padding: .55rem .8rem;
  cursor: pointer;
  box-shadow: 0 10px 20px -12px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,.06);
}
.codev-view-foot a:hover, .codev-view-foot button:hover {
  color: #050506;
  background: linear-gradient(165deg, #f5f5f3, #c9ccd1);
  border-color: #f5f5f3;
}

@media (max-width: 820px) {
  .codev-view-body { grid-template-columns: 1fr; }
  .codev-view-rail { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .codev-formats { grid-column: 1 / -1; margin-top: 0; }
}
@media (max-width: 1080px) {
  .codev-layout { grid-template-columns: minmax(0, 1fr) 250px; }
  .codev-grid[data-columns="3"], .codev-grid[data-columns="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hub-body:has(.codev) .hub-side {
    padding: 0;
    border-right: 0; border-bottom: 1px solid #000;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.05), 0 14px 40px -26px rgba(0,0,0,1);
  }
  .codev { padding: 2.2rem 1rem 4rem; }
  .codev-layout { grid-template-columns: minmax(0, 1fr) 208px; }
  .codev-grid, .codev-grid[data-columns="3"], .codev-grid[data-columns="4"] { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  /* Never stack the controls after the cards — keep them above, always visible. */
  .codev-layout { display: flex; flex-direction: column; gap: 12px; }
  .codev-side {
    order: -1; position: static; max-height: none; overflow: visible;
    flex-direction: row; flex-wrap: wrap;
  }
  .codev-find { flex: 1 1 100%; padding-left: 2.4rem; }
  .codev-filters { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; }
  .codev-chip { width: auto; }
}
