.cd-page {
  --cd-gold: #D4AF57;
  --cd-gold-ink: #8d6c23;
  --cd-ink: #191919;
  --cd-muted: #52525b;
  --cd-line: #E6E4DF;
  --cd-paper: #F7F6F3;
  --cd-card: #fff;
  --cd-foot: #FAFAF8;
  --cd-ph: #EFECE6;
  background: var(--cd-paper);
  color: var(--cd-ink);
  font-family: "Plus Jakarta Sans", "Manrope", "Segoe UI", sans-serif;
  padding: 32px 0 72px;
  caret-color: var(--cd-ink);
  scrollbar-color: var(--cd-gold) var(--cd-paper);
}

.cd-page ::selection {
  background: #D4AF57;
  color: #191919;
}

.cd-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #71717a;
  font-size: 0.75rem;
  font-weight: 500;
}

.cd-crumb a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.18em;
}

.cd-crumb a:hover { color: var(--cd-ink); }

.cd-crumb [aria-current="page"] {
  color: #27272a;
  font-weight: 600;
}

.cd-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 40px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--cd-line);
}

.cd-intro-copy { max-width: 42rem; }

.cd-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: #B58E38;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.2;
  text-transform: uppercase;
}

.cd-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cd-gold);
}

.cd-intro h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(1.875rem, 2.6vw, 2.625rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

.cd-lead {
  margin: 10px 0 0;
  max-width: 62ch;
  color: #52525b;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.6;
}

.cd-all,
.cd-retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 10px;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--cd-gold);
  color: #191919;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(25, 25, 25, 0.06);
}

.cd-all svg {
  width: 16px;
  height: 16px;
  transition: transform 200ms ease;
}

.cd-all:hover,
.cd-retry:hover { background: #c49f48; color: #191919; }

.cd-all:hover svg { transform: translateX(3px); }

.cd-all:focus-visible,
.cd-retry:focus-visible,
.cd-shot:focus-visible,
.cd-toggle:focus-visible,
.cd-mini:focus-visible,
.cd-discover:focus-visible,
.cd-subs a:focus-visible,
.cd-crumb a:focus-visible,
.cd-search input:focus-visible {
  outline: 2px solid var(--cd-gold);
  outline-offset: 3px;
}

.cd-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 28px;
}

.cd-tools-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.cd-tools h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cd-badge {
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  background: #EAE8E2;
  color: #3f3f46;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
}

.cd-search {
  position: relative;
  width: min(100%, 18rem);
  flex: none;
}

.cd-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cd-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: #a1a1aa;
  transform: translateY(-50%);
  pointer-events: none;
}

.cd-search input {
  width: 100%;
  height: 36px;
  padding: 0 16px 0 36px;
  border: 1px solid #E0DED7;
  border-radius: 999px;
  background: #fff;
  color: #27272a;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
}

.cd-search input::placeholder { color: #a1a1aa; }

.cd-search input:focus {
  border-color: var(--cd-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 87, 0.2);
}

.cd-empty {
  margin: 0 0 18px;
  color: var(--cd-muted);
  font-size: 0.9rem;
}

.cd-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cd-cell { min-width: 0; }

.cd-cell[hidden] { display: none; }

.cd-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--cd-line);
  border-radius: 18px;
  background: var(--cd-card);
  box-shadow: 0 1px 2px rgba(25, 25, 25, 0.04);
  transition: border-color 240ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cd-card:hover { border-color: rgba(212, 175, 87, 0.6); }

.cd-card.is-open {
  border-color: var(--cd-gold);
  box-shadow: 0 0 0 1px var(--cd-gold);
}

.cd-shot {
  display: block;
  color: #fff;
  text-decoration: none;
}

.cd-media {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cd-ph);
}

.cd-media img,
.cd-ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cd-media img { transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1); }

.cd-card:hover .cd-media img { transform: scale(1.05); }

.cd-ph {
  display: grid;
  place-items: center;
  background: var(--cd-ph);
}

.cd-ph svg { width: 84px; height: 84px; }

.cd-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.2) 42%, transparent 70%);
  pointer-events: none;
}

.cd-cap {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.cd-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.cd-go {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  backdrop-filter: blur(8px);
}

.cd-go svg { width: 14px; height: 14px; }

.cd-shot:hover .cd-go {
  background: var(--cd-gold);
  color: #191919;
}

.cd-foot {
  padding: 14px;
  border-top: 1px solid #F0EFEA;
  background: var(--cd-foot);
}

.cd-bar,
.cd-discover {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
}

.cd-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #3f3f46;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.cd-card.is-open .cd-toggle { color: var(--cd-ink); font-weight: 700; }

.cd-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cd-gold);
}

.cd-card.is-open .cd-dot { width: 8px; height: 8px; }

.cd-chev {
  width: 14px;
  height: 14px;
  color: #a1a1aa;
  transition: transform 200ms ease;
}

.cd-toggle[aria-expanded="true"] .cd-chev {
  color: var(--cd-gold);
  transform: rotate(180deg);
}

.cd-mini {
  flex: none;
  color: var(--cd-gold-ink);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.cd-mini:hover { color: #6e5418; }

.cd-discover {
  color: var(--cd-ink);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.cd-discover svg {
  width: 14px;
  height: 14px;
  color: var(--cd-gold);
}

.cd-discover:hover { color: var(--cd-gold-ink); }

.cd-subs {
  max-height: 13rem;
  margin: 8px 0 0;
  padding: 8px 4px 0 0;
  overflow: auto;
  border-top: 1px solid #EAE8E2;
  list-style: none;
  scrollbar-color: var(--cd-gold) #f1f0ec;
  scrollbar-width: thin;
}

.cd-subs a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #52525b;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.cd-subs a span { min-width: 0; }

.cd-subs svg {
  flex: none;
  width: 12px;
  height: 12px;
  color: #a1a1aa;
}

.cd-subs a:hover {
  border-color: #EAE8E2;
  background: #fff;
  color: var(--cd-ink);
}

.cd-note {
  padding: 28px 22px;
  border: 1px solid var(--cd-line);
  border-radius: 18px;
  background: var(--cd-card);
}

.cd-note h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.cd-note p {
  margin: 0 0 16px;
  max-width: 62ch;
  color: var(--cd-muted);
  line-height: 1.5;
}

.cd-skel {
  overflow: hidden;
  border: 1px solid var(--cd-line);
  border-radius: 18px;
  background: var(--cd-card);
}

.cd-skel-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--cd-ph);
}

.cd-skel-line {
  display: block;
  height: 12px;
  margin: 16px 14px;
  border-radius: 6px;
  background: var(--cd-ph);
}

html[data-theme="dark"] .cd-page {
  --cd-gold-ink: #e4c77a;
  --cd-ink: #f4f1ea;
  --cd-muted: #c8bfb0;
  --cd-line: #3a342c;
  --cd-paper: #12110f;
  --cd-card: #1c1b19;
  --cd-foot: #171614;
  --cd-ph: #2a2723;
  scrollbar-color: var(--cd-gold) #12110f;
}

html[data-theme="dark"] .cd-page ::selection {
  background: #6e5824;
  color: #fff;
}

html[data-theme="dark"] .cd-crumb,
html[data-theme="dark"] .cd-lead { color: var(--cd-muted); }

html[data-theme="dark"] .cd-crumb [aria-current="page"] { color: var(--cd-ink); }

html[data-theme="dark"] .cd-kicker { color: #e4c77a; }

html[data-theme="dark"] .cd-badge {
  background: #2c2924;
  color: #e7e1d6;
}

html[data-theme="dark"] .cd-search input {
  border-color: #3a342c;
  background: #1c1b19;
  color: var(--cd-ink);
}

html[data-theme="dark"] .cd-foot { border-top-color: #2c2924; }

html[data-theme="dark"] .cd-toggle { color: #d6d0c6; }

html[data-theme="dark"] .cd-subs { border-top-color: #2c2924; scrollbar-color: var(--cd-gold) #1c1b19; }

html[data-theme="dark"] .cd-subs a { color: #c8bfb0; }

html[data-theme="dark"] .cd-subs a:hover {
  border-color: #3a342c;
  background: #242220;
  color: var(--cd-ink);
}

@media (min-width: 640px) {
  .cd-page { padding-top: 40px; }
  .cd-lead { font-size: 1rem; }
  .cd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .cd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .cd-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .cd-intro {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 28px;
  }
  .cd-intro h1 { max-width: none; }
  .cd-tools { flex-direction: column; align-items: stretch; }
  .cd-search { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cd-card,
  .cd-media img,
  .cd-chev,
  .cd-all svg { transition: none; }
  .cd-card:hover .cd-media img,
  .cd-all:hover svg { transform: none; }
}
