/* The catalogue keeps the DucDZ shell, with crisp, native-size interactive specimens. */
:root {
  --a-bg: #fafafa;
  --a-surface: #fff;
  --a-ink: #111827;
  --a-muted: #526179;
  --a-line: #e1e5eb;
  --a-soft: #f0f2f5;
  --a-accent: #086bdf;
  --a-accent-soft: #e9f2ff;
  --a-demo: #f1f2f4;
  --a-shadow: 0 2px 5px #182c4510, 0 16px 38px #182c4509;
}
:root[data-theme=dark] {
  --a-bg: #0d1015;
  --a-surface: #191e27;
  --a-ink: #edf1f8;
  --a-muted: #a5b1c4;
  --a-line: #303848;
  --a-soft: #202734;
  --a-accent: #78b1ff;
  --a-accent-soft: #173454;
  --a-demo: #151b24;
  --a-shadow: 0 2px 6px #0003, 0 18px 40px #0002;
}
body { font-weight: 450; -webkit-font-smoothing: auto; text-rendering: optimizeLegibility; }
main { max-width: 1064px; padding-inline: 32px; }
.header-inner { width: min(1020px,calc(100% - 48px)); gap: 18px; }
.app-header { background: color-mix(in srgb,var(--a-bg) 92%,transparent); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); }
.wordmark { font-weight: 650; }
.main-nav { gap: 22px; font-weight: 550; }
.language-picker { border-radius: 8px; min-height: 32px; }
.icon-button,.suite-menu summary { height: 34px; width: 32px; border-radius: 8px; }
#quickSearch { width: 160px; justify-content: flex-start; padding-inline: 9px; gap: 7px; border-color: var(--a-line); background: var(--a-surface); box-shadow: 0 1px 2px #182c4510; }
#quickSearch>svg { width: 14px; height: 14px; color: var(--a-muted); }
#quickSearch>span { flex: 1; text-align: left; font-size: 11px; color: var(--a-muted); }
#quickSearch>kbd { font-size: 9px; padding: 0 4px; background: var(--a-soft); }
.hero { padding: 48px 0 30px; }
.hero h1 { font-size: clamp(32px,3.5vw,46px); font-weight: 650; letter-spacing: -.04em; line-height: 1.15; margin-block: 16px 12px; text-wrap: balance; }
.hero-copy { font-size: 15px; line-height: 1.65; }
.hero .search-box { height: 54px; border-radius: 11px; box-shadow: 0 1px 3px #182c4510,0 1px 2px #182c4508; }
.search-box input { font-weight: 450; }
.library-toolbar { margin-bottom: 24px; }
.catalog-grid { gap: 30px 22px; }
.demo-stage.demo-card { height: auto; aspect-ratio: 16 / 9; border-radius: 14px; border-color: var(--a-line); background: var(--a-demo); }
.card-link:hover .demo-card { border-color: color-mix(in srgb,var(--a-accent) 35%,var(--a-line)); box-shadow: 0 5px 15px #182c4510; transform: translateY(-2px); }
.card-title-row { padding: 11px 3px 0; gap: 7px; }
.catalog-card h3 { font-size: 14px; font-weight: 650; line-height: 1.4; letter-spacing: -.025em; }
.card-api { margin: 4px 3px; font-size: 11px; line-height: 1.45; }
.card-description { margin-inline: 3px; max-width: 100%; font-size: 13px; line-height: 1.45; font-weight: 450; }
.platform-label { font-size: 8px; color: var(--a-muted); opacity: .85; }
.random-button { background: var(--a-surface); box-shadow: 0 1px 2px #182c4510; }
.app-footer { max-width: 1000px; }

/* An anchored specimen on the left and the terminology alongside it. */
.detail-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 30px 20px; }
.detail-topbar .breadcrumbs { margin: 0; min-width: 0; font-size: 12px; }
.detail-topbar .detail-actions { margin: 0; flex-shrink: 0; gap: 6px; max-width: none; }
.detail-actions .button { min-height: 32px; padding: 6px 9px; font-size: 11px; white-space: nowrap; flex: initial; border-radius: 7px; background: var(--a-surface); }
.detail-actions .button svg { width: 13px; height: 13px; }
.detail-layout { display: grid; grid-template-columns: minmax(0,1.06fr) minmax(0,.94fr); gap: 36px; align-items: start; margin-bottom: 42px; }
.detail-visual { position: sticky; top: 86px; min-width: 0; }
.detail-demo-wrap { border: 1px solid var(--a-line); border-radius: 14px; overflow: hidden; background: var(--a-demo); }
.detail-demo-wrap>.demo-stage { border: 0; border-radius: 0; min-height: 320px; height: auto; }
.anatomy-toolbar { padding: 11px 14px; border: 0; border-top: 1px solid var(--a-line); border-radius: 0; background: color-mix(in srgb,var(--a-surface) 64%,var(--a-demo)); gap: 6px; }
.anatomy-toolbar>span { font-size: 10px; }
.anatomy-toolbar button { width: 23px; min-width: 23px; height: 23px; font-size: 10px; background: var(--a-surface); }
.anatomy-toolbar button[aria-pressed=true] { background: #8338ec; border-color: #8338ec; color: #fff; }
.demo-instruction { align-items: flex-start; gap: 10px; font-size: 10px; padding: 12px 3px; }
.demo-instruction span { gap: 6px; }
.demo-instruction .text-button { font-size: 11px; white-space: nowrap; }
.detail-heading { margin: 0 0 17px; }
.detail-heading h1 { font-size: clamp(29px,2.7vw,36px); line-height: 1.14; margin: 0 0 8px; font-weight: 650; letter-spacing: -.045em; }
.detail-heading .eyebrow { font-size: 9px; margin-bottom: 7px; }
.detail-subtitle { font-size: 13px; line-height: 1.55; }
.detail-api { font-size: 12px; border: 0; padding: 0; margin: 11px 0 1px; border-radius: 0; }
.detail-summary { font-size: 14px; font-weight: 450; line-height: 1.7; }
.detail-summary>p+p { margin-top: 12px; }
.aliases { font-size: 11px; gap: 5px; margin-top: 15px; }
.aliases span { padding: 3px 7px; }
.detail-jump { gap: 5px; margin-top: 21px; }
.detail-jump a { font-size: 10px; border-radius: 6px; padding: 4px 7px; }
.detail-section { padding: 26px 0; border-bottom: 0; }
.detail-section h2 { font-family: var(--a-mono); font-size: 10px; font-weight: 500; letter-spacing: .075em; text-transform: uppercase; margin-bottom: 14px; color: var(--a-muted); }
.section-intro { font-size: 12px; line-height: 1.7; margin: 8px 0 13px; }
.phrase-list { gap: 5px; margin-top: 10px; }
.phrase-list span { padding: 4px 8px; background: var(--a-soft); border: 0; border-radius: 6px; font-size: 11px; line-height: 1.45; font-style: italic; }
.anatomy-list { gap: 0; border: 1px solid var(--a-line); border-radius: 11px; overflow: hidden; }
.anatomy-item { border: 0; border-radius: 0; padding: 15px 13px; gap: 11px; align-items: flex-start; background: var(--a-surface); }
.anatomy-item+.anatomy-item { border-top: 1px solid var(--a-line); }
.anatomy-item[aria-pressed=true] { background: var(--a-accent-soft); }
.anatomy-number { width: 18px; height: 18px; border: 0; margin-top: 2px; color: #8438e8; background: #ede4ff; font-size: 10px; }
.anatomy-copy>strong { font-size: 13px; font-weight: 650; }
.anatomy-copy>span { font-size: 12px; line-height: 1.65; }
.anatomy-copy code { font-size: 10px; line-height: 1.7; }
.detail-aside { position: static; margin-block: 24px 30px; }
.prompt-panel,.debug-panel { border-radius: 10px; }
.prompt-panel-header { padding: 13px 15px; }
.prompt-panel-content { padding: 16px; }
.prompt-panel-content p { font-size: 12px; line-height: 1.8; }
.detail-related { grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 50px; }
.detail-related .demo-card { height: auto; }
.comparison-grid { gap: 10px; }
.comparison-content { padding: 15px 10px; }
.comparison-content>h3 { font-size: 17px; }
.comparison-tiles { gap: 5px; }
.comparison-tiles>span { padding: 9px 5px; gap: 4px; font-size: 8px; }
.comparison-choice { gap: 8px; }
.code-panel pre { font-size: 11px; line-height: 1.7; padding: 14px; }
.dna-grid { gap: 10px; }
.dna-card { padding: 12px; }
.dna-heading { gap: 6px; }
.dna-heading strong { font-size: 12px; }
.dna-heading>span { font-size: 8px; }
.readable-list { font-size: 13px; line-height: 1.8; }

@media(min-width:1280px) {
  main:has(.detail-layout) { max-width: 1160px; }
  .detail-layout { gap: 40px; }
}
@media(max-width:900px) {
  .header-inner { gap: 12px; }
  .main-nav { gap: 15px; }
  #quickSearch { width: 32px; padding: 0; justify-content: center; box-shadow: none; border-color: transparent; background: transparent; }
  #quickSearch>span,#quickSearch>kbd { display: none; }
  .detail-topbar { align-items: flex-start; flex-direction: column; gap: 13px; }
  .detail-layout { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .detail-visual { position: static; }
  .detail-demo-wrap>.demo-stage { min-height: 340px; }
  .detail-heading h1 { font-size: 34px; }
  .detail-section h2 { font-size: 11px; }
  .anatomy-copy>span,.section-intro { font-size: 13px; }
}
@media(max-width:800px) {
  .header-inner { width: calc(100% - 40px); }
  .hero { padding-top: 43px; }
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-card h3 { font-size: 14px; }
  .detail-related { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:520px) {
  main { padding-inline: 20px; }
  .header-inner { width: calc(100% - 28px); gap: 8px; }
  .wordmark { height: 52px; }
  .header-actions { gap: 4px; }
  .header-actions .icon-button,.suite-menu summary { width: 28px; }
  .language-picker { max-width: 90px; font-size: 11px; padding-inline: 6px; }
  #quickSearch { display: none; }
  .main-nav { height: 38px; }
  .hero { padding-block: 36px 25px; }
  .hero-copy { font-size: 13px; }
  .catalog-grid { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .demo-stage.demo-card { aspect-ratio: 16 / 9; }
  .catalog-card h3 { font-size: 15px; }
  .card-description { font-size: 13px; line-height: 1.55; }
  .detail-topbar { padding-block: 22px 17px; }
  .detail-actions { width: 100%; flex-wrap: wrap; }
  .detail-actions .button { min-height: 38px; padding: 6px 9px; }
  .detail-actions .button:last-child { flex: 1; }
  .detail-topbar .breadcrumbs { font-size: 11px; }
  .detail-demo-wrap>.demo-stage { min-height: 300px; }
  .detail-heading h1 { font-size: 30px; }
  .detail-summary { font-size: 14px; }
  .comparison-grid { grid-template-columns: minmax(0,1fr); }
  .comparison-content { padding: 20px; }
  .comparison-content>h3 { font-size: 22px; }
  .comparison-tiles>span { font-size: 10px; padding: 13px 10px; }
  .detail-related { grid-template-columns: minmax(0,1fr); }
  .app-footer { margin-inline: 20px; }
}
@media(max-width:360px) {
  .header-inner { gap: 4px; }
  .wordmark { font-size: 11.5px; gap: 4px; }
  .wordmark>svg { width: 18px; height: 18px; }
  .wordmark-divider { margin-inline: 4px; }
  .header-actions { gap: 3px; }
  .header-actions .icon-button,.suite-menu summary { width: 25px; }
  .language-picker { max-width: 78px; font-size: 10px; }
}
@media(prefers-reduced-motion:reduce) { .card-link:hover .demo-card { transform: none; } }
