
  /* Base styles that apply to all variants */
  body { background: var(--secondary-100); }

  main {
    padding: .75rem;
  }
  /* Blue Study Style (current default) – inherits core tokens; no override block needed */

  /* Clear Sight Style - Clean, minimal, bright */
  .style-clear-sight {
    --primary-500: #06b6d4; /* Cyan */
    --primary-600: #0891b2;
    --primary-700: #0e7490;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --gray-950: #020617;
    --surface: #ffffff;
    --secondary-100: #f0f9ff;
  }

  /* Per-style page backgrounds are handled by core tokens; do not override here */

  .style-clear-sight #resourceThumb {
    border: 2px solid rgba(6, 182, 212, 0.2);
    background: rgba(6, 182, 212, 0.05);
  }

  .style-clear-sight #resourceThumb:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.4);
  }

  .style-clear-sight .btn {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
    color: var(--gray-800);
  }

  .style-clear-sight .btn:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 12px 24px rgba(6, 182, 212, 0.25);
  }

  .style-clear-sight .meta-chip {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
    color: var(--primary-600);
  }

  /* Golden View Style - Warm, rich, elegant */
  .style-golden-view {
    --primary-500: var(--primary-200); /* Amber */
    --secondary-100: var(--primary-100); /* Main page background */
  }

  /* Per-style page backgrounds are handled by core tokens; do not override here */
  body.style-golden-view {
    background: var(--primary-100) !important;
  }

  .style-golden-view #resourceThumb {
    border: 2px solid rgba(245, 158, 11, 0.2);
    background: rgba(245, 158, 11, 0.05);
  }

  .style-golden-view #resourceThumb:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
  }

  /* Golden View buttons and chips use default styling (no orange tint override) */
  
  /* Golden View subtitle darker color */
  .style-golden-view #resourceSubtitle {
    color: var(--gray-700);
  }

  /* Apply style-specific enhancements to existing styles when active */
  .style-clear-sight .resource-featured-section::before {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  }

  /* Hero band uses local variable set by JS after data loads */
  .resource-featured-section::before {
    background: var(--local-band-bg, var(--primary-500));
  }

  .notion-image {
    border-radius: 2px;
  }

  .style-clear-sight [data-theme="dark"] .resource-featured-section::before {
    background: linear-gradient(135deg, #0e7490 0%, #06b6d4 100%);
  }

  /* Golden View featured section background - use primary color */
  .style-golden-view .resource-featured-section::before {
    background: var(--primary-500);
  }

  .style-golden-view [data-theme="dark"] .resource-featured-section::before {
    background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
  }

  /* Style-specific placeholder variants */
  .style-clear-sight .placeholder-variant-1 { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); }
  .style-clear-sight .placeholder-variant-2 { background: linear-gradient(135deg, #0e7490 0%, #0284c7 100%); }
  .style-clear-sight .placeholder-variant-3 { background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%); }
  .style-clear-sight .placeholder-variant-4 { background: linear-gradient(135deg, #0284c7 0%, #0e7490 100%); }
  .style-clear-sight .placeholder-variant-5 { background: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%); }

  .style-golden-view .placeholder-variant-1 { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
  .style-golden-view .placeholder-variant-2 { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); }
  .style-golden-view .placeholder-variant-3 { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
  .style-golden-view .placeholder-variant-4 { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); }
  .style-golden-view .placeholder-variant-5 { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); }

    /* Resource detail layout tweaks */
    main.container { box-sizing: border-box; }
    #resourceHeader { gap: 1rem; }
    #resourceThumb img { display:block; width:100%; height:100%; object-fit:cover; border-radius:inherit; }
    #resourceThumb { transition: transform 0.3s ease, box-shadow 0.3s ease; will-change: transform, box-shadow; }
    #resourceThumb:hover { transform: translateY(-2px) scale(1.015); box-shadow: 0 10px 24px rgba(0,0,0,0.14); }
    /* Placeholder styles for resourceThumb (desktop) */
    #resourceThumb .feature-media.silo-placeholder { 
      display: flex; 
      align-items: center; 
      justify-content: center; 
      width: 100%; 
      height: 100%; 
      border-radius: inherit; 
    }
    #resourceThumb .feature-media.silo-placeholder .placeholder-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 1rem;
      width: 100%;
      height: 100%;
    }
    #resourceThumb .feature-media.silo-placeholder .placeholder-author {
      font-size: .75rem;
      font-weight: 800;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: var(--gray-600);
      margin-bottom: .35rem;
    }
    #resourceThumb .feature-media.silo-placeholder .placeholder-title {
      font-size: .95rem;
      font-weight: 700;
      color: var(--gray-800);
      line-height: 1.2;
      margin-bottom: .25rem;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      line-clamp: 3;
      -webkit-box-orient: vertical;
    }
    #resourceThumb .feature-media.silo-placeholder .placeholder-type {
      font-size: .7rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .06em;
      color: var(--gray-500);
    }
    #resourceTitle { letter-spacing: -.01em; hyphens: none; -webkit-hyphens: none; -ms-hyphens: none; word-break: normal; }
    /* Resource subtitle appearance (below H1) */
    #resourceSubtitle { color: var(--gray-200); font-weight: var(--resource-subtitle-weight, 700); font-size: 1rem; letter-spacing: .005em; margin-top: -1rem; line-height: 1.45; }
    /* Ensure type/category chip sits directly under the image */
    #resourceHeader #resourceMetaChip { margin-top: .4rem; }
    #resourceMeta { color: var(--gray-600); }
    .divider { height: 1px; background: var(--gray-200); border: 0; }

    /* Local override: avoid global .container p 2rem bottom margin on this page */
    .resource-page .container p { margin-bottom: 0rem; }

    /* Header video container (right side) */
    #resourceHeaderVideo { flex: 0 0 auto; width: 480px; max-width: 480px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: transparent; display: none; }
    /* Fallback to avoid zero-height in some flex/aspect-ratio combos */
    #resourceHeaderVideo:not([data-has-markup]) { min-height: 270px; }
    #resourceHeaderVideo iframe,
    #resourceHeaderVideo video { width: 100%; height: 100%; display: block; border: 0; background: transparent; }

    /* Notion content and embed fixes */
    #resourceBody, #resourceBody * { box-sizing: border-box; }
    /* Tighter rhythm and typography */
    #resourceBody.u-flow { --u-flow-space: .75rem; }
    /* Match news/article.html .content-body typography exactly */
    #resourceBody { background: transparent; border: 0; padding: 0; box-shadow: none; color: var(--gray-900); line-height: 1.72; font-size: 0.99rem; letter-spacing: 0.002em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; hyphens: manual; -webkit-hyphens: manual; -ms-hyphens: manual; text-wrap: pretty; display: flow-root; }
    /* Modal Notion content should mirror resource body */
    .subpage-modal-content, .subpage-modal-content * { box-sizing: border-box; }
    .subpage-modal-content.u-flow { --u-flow-space: .75rem; }
    .subpage-modal-content { background: transparent; border: 0; padding: 0; box-shadow: none; color: var(--gray-900); line-height: 1.72; font-size: 0.99rem; letter-spacing: 0.002em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; hyphens: manual; -webkit-hyphens: manual; -ms-hyphens: manual; text-wrap: pretty; display: flow-root; }
    .subpage-modal-content p { margin: .8rem 0; text-align: start; color: var(--gray-900); word-spacing: -0.005em; hyphens: manual; -webkit-hyphens: manual; -ms-hyphens: manual; line-height: 1.72; }
    .subpage-modal-content h1 { margin: 1.6rem 0 .7rem; letter-spacing: -.012em; line-height: 1.25; font-weight: 700; color: var(--gray-950); }
    .subpage-modal-content h2 { margin: 1.4rem 0 .65rem; letter-spacing: -.01em; line-height: 1.3; font-weight: 700; color: var(--gray-900); }
    .subpage-modal-content h3 { margin: 1.2rem 0 .6rem; letter-spacing: -.008em; line-height: 1.35; font-weight: 600; color: var(--gray-850); }
    .subpage-modal-content ul, .subpage-modal-content ol { margin: .65rem 0; padding-left: 2rem; }
    .subpage-modal-content li { margin: .35rem 0; hyphens: manual; -webkit-hyphens: manual; -ms-hyphens: manual; line-height: 1.68; }
    .subpage-modal-content li p { margin: .3rem 0; }
    .subpage-modal-content strong, .subpage-modal-content b { font-weight: 600; color: var(--gray-950); }
    .subpage-modal-content em, .subpage-modal-content i { font-style: italic; }
    .subpage-modal-content a { color: var(--primary-600); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color .15s ease, text-decoration-color .15s ease; }
    .subpage-modal-content a:hover { color: var(--primary-700); text-decoration-thickness: 1.5px; }
    .subpage-modal-content code { font-family: 'Consolas', 'Monaco', 'Courier New', monospace; font-size: .9rem; background: var(--gray-100); padding: .15rem .4rem; border-radius: 4px; color: var(--gray-800); border: 1px solid var(--gray-200); }
    .subpage-modal-content blockquote { border-left: 3px solid var(--primary-500); padding: .7rem 0 .7rem 1.5rem; margin: 1.3rem 0; font-style: italic; color: var(--gray-700); background: var(--gray-50); border-radius: 0 8px 8px 0; line-height: 1.68; hyphens: manual; -webkit-hyphens: manual; -ms-hyphens: manual; }
    .subpage-modal-content blockquote p:first-child { margin-top: 0; }
    .subpage-modal-content blockquote p:last-child { margin-bottom: 0; }
    .subpage-modal-content img { max-width: 100%; height: auto; display: block; border-radius: 8px; }
    .subpage-modal-content figure { margin: 1rem 0; padding: 0; }
    .subpage-modal-content figcaption { color: var(--gray-600); font-size: .9rem; margin-top: .5rem; font-style: italic; line-height: 1.5; text-align: center; }
    .subpage-modal-content iframe,
    .subpage-modal-content video { width: 100% !important; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; display:block; border-radius: 10px; background: transparent; }
    .subpage-modal-content .notion-embed,
    .subpage-modal-content .embed,
    .subpage-modal-content .youtube-embed-container { width: 100%; }
    .subpage-modal-content .notion-embed, .subpage-modal-content .youtube-embed-container, .subpage-modal-content video, .subpage-modal-content figure { margin: .75rem 0; }
    /* Toggle styling in modal */
    .subpage-modal-content .notion-toggle { border: 2px solid var(--gray-300); border-radius:12px; background: var(--gray-50); padding:.5rem .75rem; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease; }
    .subpage-modal-content .notion-toggle + .notion-toggle { margin-top:.35rem; }
    .subpage-modal-content .notion-toggle summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:.5rem; }
    .subpage-modal-content .notion-toggle summary h1,
    .subpage-modal-content .notion-toggle summary h2,
    .subpage-modal-content .notion-toggle summary h3 { all: unset; font-size: 1.25rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color: var(--gray-800); }
    .subpage-modal-content .notion-toggle summary::-webkit-details-marker { display:none; }
    .subpage-modal-content .notion-toggle .toggle-heading { margin:0; font-size: 1.25rem; letter-spacing:.06em; text-transform:uppercase; color: var(--gray-800); }
    .subpage-modal-content .notion-toggle .toggle-content { padding:.5rem .25rem .25rem .25rem; }
    .subpage-modal-content .notion-toggle .toggle-content { max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-2px); transition: max-height .25s ease, opacity .25s ease, transform .25s ease; }
    .subpage-modal-content .notion-toggle:not([open]) .toggle-content { padding-top: 0; padding-bottom: 0; }
    .subpage-modal-content .notion-toggle[open] .toggle-content { max-height: 1200px; opacity: 1; transform: translateY(0); }
    .subpage-modal-content .notion-toggle summary:before { content:'▾'; display:inline-block; transition: transform .2s ease; }
    .subpage-modal-content .notion-toggle[open] summary:before { transform: rotate(180deg); }
    .subpage-modal-content .notion-toggle:hover { background: var(--gray-100); border-color: var(--gray-400); transform: translateY(-1px); box-shadow: 0 6px 12px rgba(0,0,0,0.08); }
    .subpage-modal-content .notion-toggle[open] { background: var(--gray-50); border-color: var(--gray-400); }
    /* Column layouts in modal */
    .subpage-modal-content .notion-column-list,
    .subpage-modal-content .column-list,
    .subpage-modal-content .notion-column-list,
    .subpage-modal-content .column-list,
    .subpage-modal-content .columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: .5rem 0; }
    /* 3-column support in modal */
    .subpage-modal-content .notion-column-list[data-columns="3"],
    .subpage-modal-content .column-list[data-columns="3"],
    .subpage-modal-content .columns[data-columns="3"] { grid-template-columns: 1fr 1fr 1fr; }
    @media (min-width: 1100px){
      .subpage-modal-content .notion-column-list,
      .subpage-modal-content .column-list,
      .subpage-modal-content .columns { gap: 2rem; }
    }
    .subpage-modal-content .notion-column,
    .subpage-modal-content .column { padding: 0; margin: 0; border-radius: 0; box-shadow: none; background: transparent; width: 100% !important; float: none !important; }
    #resourceBody p { margin: .8rem 0; text-align: start; color: var(--gray-900); word-spacing: -0.005em; hyphens: manual; -webkit-hyphens: manual; -ms-hyphens: manual; line-height: 1.72; font-size: 1.01rem; }
    #resourceBody h1 { margin: 1.6rem 0 .7rem; letter-spacing: -.012em; line-height: 1.25; font-weight: 700; color: var(--gray-950); }
    #resourceBody h2 { margin: 1.4rem 0 .65rem; letter-spacing: -.01em; line-height: 1.3; font-weight: 700; color: var(--gray-900); }
    #resourceBody h3 { margin: 1.2rem 0 .6rem; letter-spacing: -.008em; line-height: 1.35; font-weight: 600; color: var(--gray-850); }
    #resourceBody ul, #resourceBody ol { margin: .65rem 0; padding-left: 2rem; }
    #resourceBody li { margin: .35rem 0; hyphens: manual; -webkit-hyphens: manual; -ms-hyphens: manual; line-height: 1.68; }
    #resourceBody li p { margin: .3rem 0; }
    #resourceBody strong, #resourceBody b { font-weight: 600; color: var(--gray-950); }
    #resourceBody em, #resourceBody i { font-style: italic; }
    #resourceBody a { color: var(--gray-900); text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color .15s ease, text-decoration-color .15s ease; }
    #resourceBody a:hover { color: var(--primary-700); text-decoration-thickness: 1.5px; }
    #resourceBody code { font-family: 'Consolas', 'Monaco', 'Courier New', monospace; font-size: .9rem; background: var(--gray-100); padding: .15rem .4rem; border-radius: 4px; color: var(--gray-800); border: 1px solid var(--gray-200); }
    #resourceBody blockquote { border-left: 3px solid var(--primary-500); padding: .7rem 0 .7rem 1.5rem; margin: 1.3rem 0; font-style: italic; color: var(--gray-700); hyphens: manual; -webkit-hyphens: manual; -ms-hyphens: manual; background: var(--gray-50); border-radius: 0 8px 8px 0; line-height: 1.68; }
    #resourceBody blockquote p:first-child { margin-top: 0; }
    #resourceBody blockquote p:last-child { margin-bottom: 0; }
    /* Generic responsive media */
    #resourceBody img { max-width: 100%; height: auto; display: block; }
    #resourceBody figure { margin: 0 0 .75rem 0; }
    #resourceBody figcaption { color: var(--gray-600); font-size: .9rem; margin-top: .25rem; }
    #resourceBody iframe,
    #resourceBody video { width: 100% !important; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; display:block; border-radius: 10px; background: transparent; }
    #resourceBody .notion-embed,
    #resourceBody .embed,
    #resourceBody .youtube-embed-container { width: 100%; }
    #resourceBody .notion-embed, #resourceBody .youtube-embed-container, #resourceBody video, #resourceBody figure { margin: .75rem 0; }
    /* Callout styling */
    #resourceBody .notion-callout { display:flex; gap:.75rem; padding: .95rem 1.1rem; border:1px solid var(--gray-300); border-radius:10px; background: var(--gray-50); margin:.75rem 0; font-size: 1.01rem; line-height: 1.68; box-shadow: 0 1px 3px rgba(0,0,0,.03); }
    /* Ensure toggles inside callouts are visible and spaced */
    #resourceBody .notion-callout .notion-toggle { background: transparent; border-color: var(--gray-300); margin: .4rem 0; }
    #resourceBody .notion-callout .toggle-content { padding:.45rem 0 0 0; }
    #resourceBody .notion-callout .callout-icon { display:none; }
    #resourceBody .notion-callout .callout-content { flex:1; }
    /* Balance spacing inside callouts: trim outer element margins */
    #resourceBody .notion-callout .callout-content > *:first-child { margin-top: 0 !important; }
    #resourceBody .notion-callout .callout-content > *:last-child { margin-bottom: 0 !important; }
    /* Normalize heading spacing within callouts for visual balance */
    #resourceBody .notion-callout h3 { margin: .4rem 0 .35rem; font-size: 1.05rem; font-weight: 600; }
    #resourceBody .notion-callout .callout-text { margin:0 0 .4rem 0; font-size: 1.01rem; line-height: 1.68; }
    /* Ensure consistent font-size for all text elements within callouts */
    #resourceBody .notion-callout p,
    #resourceBody .notion-callout div,
    #resourceBody .notion-callout span,
    #resourceBody .notion-callout li { font-size: 1.01rem; line-height: 1.68; }
    #resourceBody .notion-callout p { margin: .5rem 0; }
    /* Color variants from Notion */
    #resourceBody .notion-callout--blue { background:#afd1ff; border-color:#3e4956; }
    #resourceBody .notion-callout--green { background:#c4ffe4; border-color:#517765; }
    #resourceBody .notion-callout--yellow { background:#ffeea8; border-color:#585031; }
    #resourceBody .notion-callout--red { background:#ffc0c0; border-color:#694040; }
    #resourceBody .notion-callout--purple { background:#c8bdff; border-color:#413e4b; }
    #resourceBody .notion-callout--pink { background:#ffc3e4; border-color:#4a3c44; }
    #resourceBody .notion-callout--orange { background:#ffdfb8; border-color:#483d31; }
    /* File link block */
    #resourceBody .notion-file { margin:.5rem 0; }
    #resourceBody .notion-file .file-link { display:inline-flex; align-items:center; gap:.35rem; padding:.45rem .65rem; border:1px solid var(--gray-300); border-radius:10px; text-decoration:none; color: var(--gray-800); background: var(--gray-50); transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease; will-change: transform, box-shadow; }
    #resourceBody .notion-file .file-link:hover { background: var(--gray-100); border-color: var(--gray-400); transform: translateY(-1px); box-shadow: 0 6px 12px rgba(0,0,0,0.10); }
    #resourceBody .notion-file .file-link:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
    #resourceBody .notion-file .file-link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-200, rgba(59,130,246,.35)), 0 6px 12px rgba(0,0,0,0.10); }
    #resourceBody .notion-file .file-name { font-weight:600; }
    /* Toggle styling */
    #resourceBody .notion-toggle { border:1px solid var(--gray-300); border-radius:10px; background: var(--gray-50); padding:.6rem .8rem; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease; will-change: transform, box-shadow; margin: .65rem 0; }
    #resourceBody .notion-toggle + .notion-toggle { margin-top:.45rem; }
    #resourceBody .notion-toggle summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:.5rem; padding: .15rem 0; }
    #resourceBody .notion-toggle summary h1,
    #resourceBody .notion-toggle summary h2,
    #resourceBody .notion-toggle summary h3 { all: unset; font-size:.96rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color: var(--gray-900); line-height: 1.4; }
    #resourceBody .notion-toggle summary::-webkit-details-marker { display:none; }
    #resourceBody .notion-toggle .toggle-heading { margin:0; font-size:.96rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color: var(--gray-900); line-height: 1.4; }
    #resourceBody .notion-toggle .toggle-content { padding:.6rem .25rem .3rem .25rem; }
    /* Animated open/close for toggle content */
    #resourceBody .notion-toggle .toggle-content { max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-2px); transition: max-height .25s ease, opacity .25s ease, transform .25s ease; }
    #resourceBody .notion-toggle:not([open]) .toggle-content { padding-top: 0; padding-bottom: 0; }
    #resourceBody .notion-toggle[open] .toggle-content { max-height: 1200px; opacity: 1; transform: translateY(0); }
    #resourceBody .notion-toggle summary:before { content:'▾'; display:inline-block; transition: transform .2s ease; }
    #resourceBody .notion-toggle[open] summary:before { transform: rotate(180deg); }
    /* Hover and focus micro-interactions */
    #resourceBody .notion-toggle:hover { background: var(--gray-100); border-color: var(--gray-400); transform: translateY(-1px); box-shadow: 0 6px 12px rgba(0,0,0,0.08); }
    #resourceBody .notion-toggle:focus-within { outline: none; border-color: var(--primary-400, var(--primary-500)); box-shadow: 0 0 0 3px var(--primary-200, rgba(59,130,246,.35)); }
    #resourceBody .notion-toggle[open] { background: var(--gray-50); border-color: var(--gray-400); }
    /* Notion-style column layouts */
    #resourceBody .notion-column-list,
    #resourceBody .column-list,
    #resourceBody .notion-column-list,
    #resourceBody .column-list,
    #resourceBody .columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: .5rem 0; }
    /* 3-column support in main body */
    #resourceBody .notion-column-list[data-columns="3"],
    #resourceBody .column-list[data-columns="3"],
    #resourceBody .columns[data-columns="3"] { grid-template-columns: 1fr 1fr 1fr; }
    @media (min-width: 1100px){
      #resourceBody .notion-column-list,
      #resourceBody .column-list,
      #resourceBody .columns { gap: 2rem; }
    }
    #resourceBody .notion-column,
    #resourceBody .column { padding: 0; margin: 0; border-radius: 0; box-shadow: none; background: transparent; width: 100% !important; float: none !important; }


    /* News section moved below header - clean layout */
    .resource-related-news-section { 
      margin: 0 !important; 
      padding: 0 !important; 
      width: 100% !important; 
      max-width: 100% !important; 
    }
    .resource-related-news-rail { 
      display: flex !important; 
      flex-direction: row !important; 
      flex-wrap: wrap !important; 
      gap: .5rem !important; 
      align-items: flex-start !important; 
      justify-content: flex-end !important; 
      margin: 0 !important; 
      padding: 0 !important; 
    }
    .resource-related-news-link { 
      display: inline-flex !important; 
      align-items: baseline !important; 
      gap: .35rem !important; 
      text-decoration: none !important; 
      color: var(--gray-700) !important; 
      padding: .2rem .35rem !important; 
      border-radius: 8px !important; 
      transition: color .15s ease, background-color .15s ease, transform .15s ease !important; 
      white-space: nowrap !important; 
      flex: 0 0 auto !important; 
    }
    /* Smooth micro-interactions for chip/date inside the news link */
    .resource-related-news-link .rrn-chip {
      transition: color .15s ease, background-color .15s ease, border-color .15s ease, transform .15s ease;
    }
    .resource-related-news-link:hover { 
      color: var(--gray-900) !important; 
      transform: translateY(-1px) !important; 
      background: var(--resource-news-hover-bg, var(--gray-100)) !important; 
    }
    .resource-related-news-link:hover .rrn-chip {
      background: var(--resource-news-hover-bg, var(--gray-100)) !important;
      border-color: var(--resource-news-chip-border-hover, var(--gray-400)) !important;
      color: var(--gray-900) !important;
      transform: translateY(-1px) !important;
    }
    /* On hover, make the date black as requested */
    .resource-related-news-link:hover .rrn-date {
      color: #000 !important;
    }
    /* Revert to original order: title first, then tag, then date */
    .resource-related-news-link .rrn-title { 
      font-size: .9rem !important; 
      font-weight: 800 !important; 
      color: var(--gray-900) !important; 
      margin: 0 !important; 
      letter-spacing: -0.01em !important; 
    }
    .resource-related-news-link .rrn-chip { 
      display: inline-block !important; 
      padding: .2rem .5rem !important; 
      border: 1px solid var(--resource-news-chip-border, var(--gray-300)) !important; 
      background: var(--resource-news-chip-bg, var(--gray-50)) !important; 
      color: var(--resource-news-chip-color, var(--gray-700)) !important; 
      border-radius: 999px !important; 
      font-weight: 700 !important; 
      font-size: .72rem !important; 
      line-height: 1 !important; 
    }
    .resource-related-news-link .rrn-date { 
      font-size: .78rem !important; 
      color: var(--gray-200) !important; 
      font-weight: 700 !important; 
      margin: 0 !important; 
    }
    .resource-related-news-link .rrn-sep { 
      color: var(--gray-400) !important; 
      font-weight: 700 !important; 
    }
    /* Mobile layout */
    @media (max-width: 768px) {
      main.container { max-width: 100%; padding: 0; }
      /* Ensure we override external mobile.css padding */
      body.resource-page main.container { padding: 0 !important; }
      #resourceHeader { flex-direction: column; align-items: stretch; gap: .85rem !important; }
      /* Mobile: cover image frame with white border (3px) */
      #resourceThumb { flex: 0 0 auto; width: 100% !important; max-width: 560px; margin: 0 auto; aspect-ratio: 8.5 / 11; border-radius: 12px; overflow: hidden; border: 3px solid #fff !important; background: var(--gray-900, #0f172a); }
      /* Ensure placeholder content is visible on mobile */
      #resourceThumb .feature-media.silo-placeholder { 
        display: flex !important; 
        align-items: center !important; 
        justify-content: center !important; 
        width: 100% !important; 
        height: 100% !important; 
        border-radius: inherit !important; 
      }
      #resourceThumb .feature-media.silo-placeholder .placeholder-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: .5rem !important;
        width: 100% !important;
        height: 100% !important;
      }
      /* Hide placeholder when actual content is present */
      #resourceThumb .feature-media:not(.silo-placeholder) .silo-placeholder,
      #resourceThumb .feature-media:has(img, video, picture) .silo-placeholder {
        display: none !important;
      }
      #resourceTitle { font-size: clamp(1.25rem, 1.05rem + 1.8vw, 1.85rem) !important; margin-top: .25rem !important; }
      #resourceMeta { font-size: .95rem; }
      #resourceActions { display: grid !important; grid-template-columns: 1fr; gap: .5rem !important; width: 100%; }
      #resourceActions .btn, #resourceActions .btn-primary, #resourceActions a.btn { width: 100%; justify-content: center; }
      /* Ragged-right mobile adjustments */
      /* Provide a bit of horizontal breathing room for content on small screens */
      #resourceBody { padding-left: 0.75rem; padding-right: 0.75rem; width: 100%; line-height: 1.7; }
      #resourceBody h1 { font-size: 1.85rem; margin: 1.4rem 0 .6rem; letter-spacing: -.01em; }
      #resourceBody h2 { font-size: 1.55rem; margin: 1.25rem 0 .55rem; letter-spacing: -.008em; }
      #resourceBody h3 { font-size: 1.3rem; margin: 1.1rem 0 .5rem; letter-spacing: -.006em; }
      #resourceBody p { margin: .7rem 0; font-size: 1.01rem; }
      #resourceBody ul, #resourceBody ol { margin: .6rem 0; }
      #resourceBody li { margin: .3rem 0; }
      #resourceBody blockquote { padding: .65rem 0 .65rem 1.3rem; margin: 1.1rem 0; }
      #resourceBody .notion-callout { padding: .85rem 1rem; margin: .7rem 0; }
      #resourceBody .notion-column-list,
      #resourceBody .column-list,
      #resourceBody .columns { grid-template-columns: 1fr; }
      /* For three-column groups on very small screens, show one column */
      #resourceBody .notion-column-list[data-columns="3"],
      #resourceBody .column-list[data-columns="3"],
      #resourceBody .columns[data-columns="3"] { grid-template-columns: 1fr; }
      /* Collapse modal columns on mobile */
      .subpage-modal-content .notion-column-list,
      .subpage-modal-content .column-list,
      .subpage-modal-content .columns { grid-template-columns: 1fr; }
      /* Modal: prefer one column for three-column groups on small phones */
      .subpage-modal-content .notion-column-list[data-columns="3"],
      .subpage-modal-content .column-list[data-columns="3"],
      .subpage-modal-content .columns[data-columns="3"] { grid-template-columns: 1fr; }
      #resourceHeaderVideo { width: 100%; max-width: 560px; margin: 0 auto; flex: 0 0 auto; min-height: auto; }
      /* Related compositions list mobile adjustments */
      .related-composition-item { 
        flex-direction: row; 
        align-items: center; 
        gap: .6rem; 
        padding: .6rem .6rem; 
      }
      .related-composition-item-media { 
        flex: 0 0 72px; 
        width: 72px; 
        height: 72px; 
        aspect-ratio: 1; 
        border-radius: 8px; 
      }
      .related-composition-item-content { 
        text-align: left; 
        gap: .1rem;
        flex: 1 1 auto;
        min-width: 0;
      }
      .related-composition-item-actions { 
        justify-content: flex-start; 
      }
      /* Compact audio accordion like catalog */
      .rc-audio-accordion .rc-acc-head { padding: .4rem .5rem; }
      .rc-audio-accordion .rc-acc-toggle .caret { width: 22px; height: 22px; font-size: 14px; }
      .rc-audio-accordion .rc-acc-body { padding: .5rem .6rem; }
      .rc-audio-accordion .rc-score-btn { min-height:34px; padding:.42rem .8rem; border-radius:10px; font-size:.9rem; }
      /* Other Types Carousel mobile adjustments */
      .other-types-card { min-width: 160px; max-width: 180px; }
      .other-types-carousel { gap: .5rem; padding: 0 .75rem 0 0; }
      .other-types-header h3,
      .other-types-header span { font-size: 1rem; }
    }

    /* Tablet: force 2 columns for 3-col groups (desktop remains 3) */
    @media (min-width: 768px) and (max-width: 1099px){
      #resourceBody .notion-column-list[data-columns="3"],
      #resourceBody .column-list[data-columns="3"],
      #resourceBody .columns[data-columns="3"] { grid-template-columns: 1fr 1fr; }
      .subpage-modal-content .notion-column-list[data-columns="3"],
      .subpage-modal-content .column-list[data-columns="3"],
      .subpage-modal-content .columns[data-columns="3"] { grid-template-columns: 1fr 1fr; }
    }
    
    /* Dark mode text color safety */
    [data-theme="dark"] #resourceBody { color: var(--gray-100); }
    
    /* Bottom actions (match news-article look) */
    .article-actions { display:flex; gap: 1rem; align-items:center; justify-content:flex-end; }
    .btn { 
      padding: 0.6rem 1.2rem;
      border-radius: 10px;
      border: 1px solid var(--gray-300);
      background: white;
      color: var(--gray-800);
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
      transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
      will-change: transform, box-shadow;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
    }
    /* Ensure Free Download button shows its border (component injects border:none inline) */
    #resourceActions .btn.free-download-btn { border: 1px solid var(--gray-300) !important; }
    .btn:hover { 
      transform: translateY(-2px) scale(1.015);
      background: var(--gray-50);
      border-color: var(--gray-400);
      box-shadow: 0 8px 16px rgba(0,0,0,0.12);
    }
    .btn:active { transform: translateY(0) scale(0.995); box-shadow: 0 2px 6px rgba(0,0,0,0.10); }
    .btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-200, rgba(59,130,246,.35)), 0 8px 16px rgba(0,0,0,0.12); }
    [data-theme="dark"] .btn { background: var(--gray-700); border-color: var(--gray-600); color: var(--gray-100); }
    [data-theme="dark"] .btn:hover { background: var(--gray-600); border-color: var(--gray-500); box-shadow: 0 8px 16px rgba(0,0,0,0.36); }

    /* Purchase button gradients (Buy Now: blue, Free Download: green) */
    #resourceActions .composition-buy-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: .35rem;
      padding: .52rem .9rem;
      border-radius: 10px;
      background: linear-gradient(135deg, #5B86F9 0%, #7C3AED 100%);
      color: #fff;
      border: none;
      font-weight: 800;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(92,105,245,.22);
      font-size: .95rem;
      line-height: 1;
    }
    #resourceActions .composition-buy-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 16px rgba(92,105,245,.28);
      filter: saturate(1.03);
    }
    #resourceActions .composition-buy-btn.free-download-btn {
      background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
      color: #fff;
      border: none !important;
      box-shadow: 0 6px 18px rgba(16,185,129,.25);
    }
    #resourceActions .composition-buy-btn.free {
      background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
      color: #fff;
      border: none !important;
      box-shadow: 0 6px 18px rgba(16,185,129,.25);
    }
    #resourceActions .composition-buy-btn:disabled,
    #resourceActions .composition-buy-btn.btn-disabled {
      opacity: .6;
      cursor: not-allowed;
      filter: grayscale(0.1);
    }

    /* Primary button micro-interactions (e.g., Buy/Download) */
    .btn-primary { 
      transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
      will-change: transform, box-shadow;
    }
    .btn-primary:hover { transform: translateY(-2px) scale(1.015); box-shadow: 0 10px 18px rgba(0,0,0,0.15); }
    .btn-primary:active { transform: translateY(0) scale(0.995); box-shadow: 0 2px 6px rgba(0,0,0,0.10); }
    .btn-primary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-200, rgba(59,130,246,.35)), 0 10px 18px rgba(0,0,0,0.15); }

    /* Dark mode adjustments for toggles */
    [data-theme="dark"] #resourceBody .notion-toggle:hover { background: var(--gray-700); border-color: var(--gray-500); box-shadow: 0 6px 12px rgba(0,0,0,0.4); }
    
    /* Related news rail (mirrors composition page, compact) */
    .resource-related-news-section { width:100%; max-width:100%; margin:0; padding:0; box-sizing:border-box; opacity: 0; transition: opacity .26s cubic-bezier(.2,.65,.2,1); will-change: opacity; pointer-events: none; }
    /* When revealed (via animation or explicit class), allow interaction */
    .resource-related-news-section.is-visible { opacity: 1; pointer-events: auto; }
    /* In right header column, news sits below the video */
    #resourceHeaderRight .resource-related-news-section { width: 100%; margin-top: .35rem; }
    /* When no video, give the news container extra breathing room at top */
    #resourceHeaderRight.no-video .resource-related-news-section { margin-top: 1rem; padding-top: .5rem; border: none;}
    /* Hide right header column entirely when there's no video/content */
    #resourceHeaderRight.no-video { display: none !important; }
    .resource-related-news-title { font-size:.95rem; font-weight:800; color: var(--gray-600); margin: .5rem 0 .35rem 0; text-align:left; }
    .resource-related-news-rail { display:flex; flex-direction:column; align-items:flex-end; gap:.05rem; overflow:visible; padding:0; text-align:right; }
    .resource-related-news-link { display:inline-flex; align-items:baseline; gap:.35rem; text-decoration:none; color: var(--gray-700); padding:.2rem .35rem; border-radius:8px; transition: color .15s ease, background-color .15s ease, transform .15s ease; white-space:nowrap; }
    .resource-related-news-link:hover { color: var(--gray-900); transform: translateY(-1px); background: var(--gray-100); }
    .rrn-date { font-size:.78rem; color: var(--gray-600); font-weight:700; margin:0; }
    .rrn-title { font-size:.9rem; font-weight:800; color: var(--gray-900); margin:0; letter-spacing:-0.01em; }
    .rrn-sep { color: var(--gray-400); font-weight:700; }
    .rrn-chip { display:inline-block; padding:.2rem .5rem; border:1px solid var(--gray-300); background: var(--gray-50); color: var(--gray-700); border-radius:999px; font-weight:700; font-size:.72rem; line-height:1; }
    @media (max-width: 768px){
      .resource-related-news-section { padding: 0 .75rem !important; }
      .resource-related-news-rail { 
        gap:.5rem; 
        align-items:center; 
        justify-content:center !important; 
        flex-wrap: wrap !important; 
      }
      .resource-related-news-link { 
        width:100% !important; 
        max-width:100% !important; 
        white-space:normal !important; 
        flex-wrap:wrap !important; 
        justify-content:center !important; 
        text-align:center !important; 
        row-gap:.15rem; 
        column-gap:.35rem; 
        margin-bottom:.5rem !important;
      }
    }

    /* Golden View: ensure date text uses var(--gray-700) */
    .style-golden-view .resource-related-news-link .rrn-date {
      color: var(--gray-700) !important;
    }
    .style-golden-view .resource-related-news-link:hover .rrn-date {
      color: var(--gray-700) !important;
    }

    /* Related compositions list styling (like music catalog) */
    .related-compositions-list { 
      display: flex; 
      flex-direction: column; 
      gap: 0; 
      border: 1px solid var(--gray-200); 
      border-radius: 10px; 
      overflow: hidden;
      background: var(--surface);
    }
    .related-composition-item { 
      background: var(--surface); 
      border-bottom: 1px solid var(--gray-200); 
      padding: .6rem .75rem; 
      cursor: pointer; 
      transition: background-color .15s ease, transform .12s ease; 
      text-decoration: none;
      color: inherit;
      display: flex;
      align-items: center; /* center media relative to row content */
      flex-wrap: wrap; /* enable audio row to wrap under */
      gap: .75rem;
      min-height: 72px; /* Ensure consistent height */
    }
    .related-composition-item:last-child { border-bottom: none; }
    .related-composition-item:hover { 
      background: var(--gray-50); 
      transform: translateY(-2px);
    }
    .related-composition-item-media { 
      flex: 0 0 96px;
      width: 96px;
      height: 96px;
      aspect-ratio: 1;
      background: var(--gray-100); 
      border-radius: 10px;
      object-fit: cover; 
      display: block;
    }
    .related-composition-item-media:not(.silo-placeholder) { background: var(--gray-100); }
    .related-composition-item-media.silo-placeholder { 
      display: flex; 
      align-items: center; 
      justify-content: center; 
      background: var(--gray-100);
      border-radius: 6px;
    }
    /* Placeholder content styling for composition items */
    .related-composition-item-media.silo-placeholder .placeholder-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: .25rem;
      width: 100%;
      height: 100%;
    }
    .related-composition-item-media.silo-placeholder .placeholder-author {
      font-size: .45rem;
      font-weight: 800;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: var(--gray-600);
      margin-bottom: .15rem;
    }
    .related-composition-item-media.silo-placeholder .placeholder-title {
      font-size: .5rem;
      font-weight: 700;
      color: var(--gray-800);
      line-height: 1.1;
      margin-bottom: .1rem;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
    }
    .related-composition-item-media.silo-placeholder .placeholder-type {
      font-size: .4rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .06em;
      color: var(--gray-500);
    }
    /* Placeholder variant colors for composition items */
    .related-composition-item-media.placeholder-variant-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
    .related-composition-item-media.placeholder-variant-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
    .related-composition-item-media.placeholder-variant-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
    .related-composition-item-media.placeholder-variant-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
    .related-composition-item-media.placeholder-variant-5 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
    .related-composition-item-media.placeholder-variant-6 { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
    .related-composition-item-media.placeholder-variant-7 { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
    .related-composition-item-media.placeholder-variant-8 { background: linear-gradient(135deg, #ff8a80 0%, #ffb74d 100%); }
    .related-composition-item-media.placeholder-variant-9 { background: linear-gradient(135deg, #81c784 0%, #aed581 100%); }
    .related-composition-item-media.placeholder-variant-10 { background: linear-gradient(135deg, #64b5f6 0%, #90caf9 100%); }
    .related-composition-item-media.placeholder-variant-11 { background: linear-gradient(135deg, #ba68c8 0%, #ce93d8 100%); }
    .related-composition-item-media.placeholder-variant-12 { background: linear-gradient(135deg, #ffb74d 0%, #ffd54f 100%); }
    /* Ensure text is visible on gradient backgrounds */
    .related-composition-item-media.silo-placeholder[class*="placeholder-variant-"] .placeholder-content {
      color: white;
      text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    }
    .related-composition-item-media.silo-placeholder[class*="placeholder-variant-"] .placeholder-author,
    .related-composition-item-media.silo-placeholder[class*="placeholder-variant-"] .placeholder-title,
    .related-composition-item-media.silo-placeholder[class*="placeholder-variant-"] .placeholder-type {
      color: white;
    }
    /* Hide placeholder when actual content is present */
    .related-composition-item-media:not(.silo-placeholder) .silo-placeholder,
    .related-composition-item-media:has(img, video, picture) .silo-placeholder {
      display: none !important;
    }
    .related-composition-item-content { 
      flex: 1;
      display: flex; 
      flex-direction: column; 
      justify-content: center;
      gap: .1rem; 
    }
    .related-composition-item-title { 
      font-weight: 700; 
      font-size: .95rem; 
      color: var(--gray-900); 
      line-height: 1.25; 
      margin: 0;
    }
    .related-composition-item-meta { 
      color: var(--gray-600); 
      font-size: .82rem; 
      margin: 0;
    }


    .related-composition-item-actions {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      gap: .5rem;
    }
    .related-composition-item .btn-small {
      padding: .35rem .65rem;
      font-size: .8rem;
      border-radius: 5px;
      border: 1px solid var(--gray-300);
      background: var(--surface);
      color: var(--gray-700);
      text-decoration: none;
      font-weight: 600;
      transition: all .15s ease;
    }
    .related-composition-item .btn-small:hover {
      background: var(--gray-100);
      border-color: var(--gray-400);
      transform: translateY(-1px);
    }
    /* Listen toggle + inline audio container */
    /* Listen toggle styled like a disclosure, not a button */
    .listen-toggle { 
      display: none; 
      appearance: none; 
      -webkit-appearance: none; 
      background: transparent; 
      border: 0; 
      color: var(--gray-900); 
      font-weight: 800; 
      letter-spacing: 0; 
      text-transform: none; 
      padding: 0; 
      border-radius: 8px; 
      align-items: center; 
      gap: .45rem; 
      margin-top: .05rem;
    }
    .listen-toggle::before { content: '▾'; width: 26px; height: 26px; border: 1.5px solid var(--gray-800); border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; transition: transform .18s ease, box-shadow .18s ease; color: var(--gray-900); background: #fff; box-shadow: 0 2px 6px rgba(2,6,23,.12); }
    .listen-toggle.is-open::before { transform: rotate(180deg); }
    .listen-toggle:hover { background: transparent; }
    [data-theme="dark"] .listen-toggle { color: var(--gray-100); }
    [data-theme="dark"] .listen-toggle:hover { background: transparent; }
    .related-composition-audio { 
      display: none; 
      width: 100%; 
      flex: 1 0 100%; /* force wrap to new line */
      order: 99; /* ensure it sits after actions */
      margin-top: .35rem; 
    }
    .related-composition-audio .audio-block { border:1px solid var(--gray-200); border-radius:8px; padding:.4rem; background: var(--surface); }
    .related-composition-audio .audio-title { font-weight:700; font-size:.9rem; color: var(--gray-800); margin:0 0 .25rem 0; }

    /* Resource compositions: New-Releases-style audio accordion row */
    .rc-audio-accordion { 
      margin: .25rem 0 0; 
      border-radius:12px; 
      width: 100%; 
      flex: 1 0 100%; 
      order: 100; 
      background: rgba(199, 253, 238, 0.32);
      border: 2px solid rgba(247, 251, 255, 0.864);
      -webkit-backdrop-filter: blur(12px) saturate(140%);
      backdrop-filter: blur(12px) saturate(140%);
      box-shadow: 0 5px 5px -8px rgba(2,6,23,.78), 0 5px 5px -4px rgba(2,6,23,.85);
    }
    .rc-audio-accordion .rc-acc-head { display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:.55rem .95rem; width:100%; cursor:pointer; box-sizing: border-box; border-radius:12px; background: transparent; color: var(--gray-900); transition: transform .18s ease, box-shadow .18s ease; }
    .rc-audio-accordion .rc-acc-head:hover { transform: translateY(-1px); }
    .rc-audio-accordion .rc-acc-toggle { width:auto; padding:0; background:transparent; border:0; display:flex; align-items:center; gap:.6rem; cursor:pointer; color: var(--gray-900); font-weight:900; letter-spacing:-.01em; flex:1; }
    .rc-audio-accordion .rc-acc-toggle .caret { width:26px; height:26px; border-radius:999px; border:1.5px solid var(--gray-900); background:#fff; color: var(--gray-900); display:inline-flex; align-items:center; justify-content:center; line-height:1; font-size:16px; font-weight:800; box-shadow: 0 2px 6px rgba(2,6,23,.12); transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
    .rc-audio-accordion .rc-acc-toggle .label { font-weight:900; color: var(--gray-900); }
    .rc-audio-accordion:hover .rc-acc-toggle .caret { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(2,6,23,.20); }
    .rc-audio-accordion[aria-expanded="true"] .rc-acc-toggle .caret { transform: rotate(180deg); background: var(--gray-900); color: #fff; border-color: var(--gray-900); }
    .rc-audio-accordion .rc-score-btn { display:inline-flex; align-items:center; justify-content:center; padding:.42rem .9rem; min-height:34px; border-radius:10px; border:1px solid var(--gray-300); background:#fff; color: var(--gray-900); font-weight:800; font-size:.9rem; line-height:1.1; cursor:pointer; letter-spacing:-.01em; margin-right:.1rem; }
    .rc-audio-accordion .rc-score-btn:hover { filter: brightness(1.03); }
    .rc-audio-accordion .rc-acc-body { padding: 0 .75rem; border-top: 1px solid var(--gray-200); background: var(--gray-50); max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-8px); transition: max-height .28s cubic-bezier(.4,0,.2,1), opacity .22s ease, transform .22s ease, padding .18s ease; display:block; }
    .rc-audio-accordion[aria-expanded="true"] .rc-acc-body { max-height: 800px; opacity: 1; transform: translateY(0); padding: .6rem .75rem; }
    [data-theme="dark"] .rc-audio-accordion { background: var(--gray-800); border-color: var(--gray-700); box-shadow: 0 2px 12px rgba(0,0,0,.35); }
    [data-theme="dark"] .rc-audio-accordion .rc-acc-toggle .caret { border-color: var(--gray-300); color: var(--gray-100); background: var(--gray-800); }
    [data-theme="dark"] .rc-audio-accordion[aria-expanded="true"] .rc-acc-toggle .caret { background: var(--gray-100); color: var(--gray-900); border-color: var(--gray-100); }
    [data-theme="dark"] .rc-audio-accordion .rc-score-btn { background: var(--gray-700); border-color: var(--gray-600); color: var(--gray-100); }
    [data-theme="dark"] .related-compositions-header h3 { color: var(--gray-100); }
    [data-theme="dark"] .related-compositions-list { 
      background: var(--gray-800); 
      border-color: var(--gray-700); 
    }
    [data-theme="dark"] .related-composition-item { 
      background: var(--gray-800); 
      border-color: var(--gray-700); 
    }
    [data-theme="dark"] .related-composition-item:hover { 
      background: var(--gray-700); 
    }
    [data-theme="dark"] .related-composition-item-title { color: var(--gray-100); }
    [data-theme="dark"] .related-composition-item-meta { color: var(--gray-300); }
    [data-theme="dark"] .related-composition-item .btn-small {
      background: var(--gray-700);
      border-color: var(--gray-600);
      color: var(--gray-100);
    }
    [data-theme="dark"] .related-composition-item .btn-small:hover {
      background: var(--gray-600);
      border-color: var(--gray-500);
    }

    /* ===== WORKS IN RESOURCE CAROUSEL (New Releases Style) ===== */
    #relatedCompositions .rc-carousel-container {
      width: 100%;
      max-width: 100%;
    }
    
    .rc-carousel-featured {
      display: flex;
      align-items: flex-start;
      gap: .75rem;
      padding: 1rem 0;
    }
    .rc-carousel-image {
      position: relative;
      flex: 0 0 240px;
      max-width: 240px;
      width: 100%;
      aspect-ratio: 8.5 / 11;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 10px 16px -8px rgba(2,6,23,.78), 0 3px 8px -3px rgba(2,6,23,.85);
      transition: transform .18s ease, box-shadow .18s ease;
      background: var(--gray-100);
    }
    
    .rc-carousel-image:hover {
      transform: translateY(-4px) scale(1.006);
      box-shadow: 0 10px 22px -10px rgba(2,6,23,.38), 0 6px 12px -6px rgba(2,6,23,.28);
    }
    
    .rc-carousel-image picture {
      position: absolute;
      inset: 0;
      display: block;
    }
    .rc-carousel-img {
      position: absolute;
      inset: 0;
      width: 100% !important;
      height: 100% !important;
      object-fit: cover !important;
      object-position: center !important;
      border-radius: inherit;
      display: block;
      filter: none !important;
    }
    
    .rc-cover-overlay {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(2,6,23,.74);
      opacity: 0;
      transition: opacity .22s ease;
      border-radius: inherit;
      pointer-events: none;
      z-index: 30;
    }
    
    .rc-carousel-image.has-image:hover .rc-cover-overlay {
      opacity: 1;
      pointer-events: auto;
    }
    .rc-carousel-image:not(.has-image) .rc-cover-overlay { opacity: 0 !important; pointer-events: none !important; }
    
    .rc-cover-learn {
      display: inline-flex;
      align-items: center;
      gap: .4rem;
      padding: .36rem .7rem;
      border-radius: 10px;
      border: 1px solid rgba(255,255,255,.12);
      background: rgba(15,23,42,.72);
      color: #ffffff;
      font-weight: 800;
      font-size: .8rem;
      letter-spacing: .02em;
      cursor: pointer;
      text-decoration: none;
      text-shadow: 0 2px 8px rgba(0,0,0,.35);
      transition: all .2s ease;
      pointer-events: auto;
    }
    
    .rc-cover-learn:hover {
      transform: scale(1.04);
      box-shadow: 0 8px 22px rgba(2,6,23,.28);
    }
    /* Ensure placeholders fill image frame */
    .rc-carousel-image .silo-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; display: block; }
    .rc-carousel-image .silo-placeholder .placeholder-content { width: 100%; height: 100%; display: grid; place-items: center; }
    .rc-thumb .silo-placeholder { width: 100%; height: 100%; border-radius: inherit; display: block; }
    
    .rc-carousel-details {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: .35rem;
    }
    
    .rc-title-container {
      display: flex;
      flex-direction: column;
      gap: .15rem;
    }
    
    .rc-carousel-title {
      font-size: 1.2rem;
      font-weight: 700;
      letter-spacing: -.012em;
      line-height: 1.25;
      color: var(--gray-950);
      margin: 0;
    }
    
    .rc-carousel-inst {
      font-size: 1.02rem;
      color: var(--gray-700);
      line-height: 1.4;
      margin: 0;
    }
    
    .rc-primary-actions {
      display: flex;
      gap: 0;
      align-items: center;
      margin-top: 0;
    }
    /* Purchase button: match dynamic states like resource.html */
    #relatedCompositions .composition-buy-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: .35rem;
      padding: .52rem .9rem;
      border-radius: 10px;
      background: linear-gradient(135deg, #5B86F9 0%, #7C3AED 100%);
      color: #fff;
      border: none;
      font-weight: 800;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(92,105,245,.22);
      font-size: .95rem;
      line-height: 1;
      text-decoration: none;
      transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    }
    #relatedCompositions .composition-buy-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 16px rgba(92,105,245,.28); filter: saturate(1.03); }
    #relatedCompositions .composition-buy-btn.free-download-btn { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color:#fff; border:none; box-shadow: 0 8px 20px rgba(16,185,129,.25); }
    #relatedCompositions .composition-buy-btn.btn-disabled { opacity:.6; cursor:not-allowed; filter:grayscale(0.1); }
    
    .rc-learn-btn {
      padding: .48rem .8rem;
      border-radius: 10px;
      border: 1px solid var(--gray-300);
      background: #fff;
      color: var(--gray-800);
      font-weight: 700;
      font-size: .9rem;
      line-height: 1.1;
      cursor: pointer;
      transition: all .15s ease;
      margin: 0;
    }
    
    .rc-learn-btn:hover {
      background: var(--gray-50);
      border-color: var(--gray-400);
      transform: translateY(-1px);
    }
    
    .rc-carousel-desc {
      font-size: 0.99rem;
      line-height: 1.72;
      color: var(--gray-900);
      letter-spacing: 0.002em;
      margin: .4rem 0 0 0;
    }
    
    /* Audio accordion styling for Works carousel */
    .rc-under-actions {
      margin-top: .5rem;
    }
    
    .rc-audio-accordion {
      border-radius: 12px;
      background: rgba(199, 232, 253, 0.05);
      border: 2px solid rgba(247, 251, 255, 0.864);
      -webkit-backdrop-filter: blur(12px) saturate(140%);
      backdrop-filter: blur(12px) saturate(140%);
      box-shadow: 0 5px 5px -8px rgba(2,6,23,.78), 0 5px 5px -4px rgba(2,6,23,.85);
    }
    
    .rc-audio-accordion .acc-head-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: .75rem;
      padding: .9rem .95rem;
      background: transparent;
      border-radius: 12px;
      transition: transform .18s ease, box-shadow .18s ease;
    }
    
    .rc-audio-accordion .acc-head-row:hover {
      box-shadow: none;
      transform: none;
      background: rgba(255,255,255,.06);
    }
    .rc-audio-accordion .acc-head-row:hover .accordion-toggle .caret { background: #f8fafc; }
    
    .rc-audio-accordion .accordion-toggle {
      width: auto;
      padding: 0;
      background: transparent;
      border: 0;
      display: flex;
      align-items: center;
      gap: .6rem;
      cursor: pointer;
      color: var(--gray-900);
      font-weight: 900;
      letter-spacing: -.01em;
      flex: 1;
    }
    /* Eliminate inherited button hover shadows/backgrounds on the toggle */
    .rc-audio-accordion .accordion-toggle,
    .rc-audio-accordion .accordion-toggle:hover,
    .rc-audio-accordion .accordion-toggle:focus,
    .rc-audio-accordion .accordion-toggle:active {
      box-shadow: none !important;
      background: transparent !important;
      transform: none !important;
    }
    
    .rc-audio-accordion .accordion-toggle .caret {
      width: 26px;
      height: 26px;
      border-radius: 999px;
      border: 1.5px solid var(--gray-900);
      background: #fff;
      color: var(--gray-900);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      font-size: 16px;
      font-weight: 800;
      box-shadow: 0 2px 6px rgba(2,6,23,.12);
      transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    }
    
    .rc-audio-accordion[aria-expanded="true"] .accordion-toggle .caret {
      transform: rotate(180deg);
      background: var(--gray-900);
      color: #fff;
      border-color: var(--gray-900);
    }
    
    .rc-audio-accordion .accordion-body {
      display: block;
      padding: 0 .75rem;
      border-top: 1px solid var(--gray-200);
      background: transparent;
      max-height: 0;
      overflow: hidden;
      opacity: 0;
      transform: translateY(-8px);
      transition: all .25s cubic-bezier(.4,0,.2,1);
    }
    
    .rc-audio-accordion[aria-expanded="true"] .accordion-body,
    .rc-audio-accordion .accordion-body.is-open {
      max-height: 800px;
      opacity: 1;
      transform: translateY(0);
      padding: .6rem .75rem;
    }
    
    .rc-score-btn {
      padding: .48rem .9rem;
      border-radius: 10px;
      border: 1px solid var(--gray-300);
      background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
      color: var(--gray-900);
      font-weight: 800;
      font-size: .9rem;
      line-height: 1.1;
      cursor: pointer;
      transition: all .15s ease;
    }
    
    .rc-score-btn:hover {
      background: linear-gradient(180deg, var(--gray-50), var(--gray-200));
      transform: translateY(-1px);
    }
    
    /* Audio player elements */
    .composition-audio-title {
      font-size: 0.95rem;
      font-weight: 700;
      color: var(--gray-900);
      margin-bottom: .5rem;
    }
    
    .rc-audio-container {
      display: flex;
      flex-direction: column;
      gap: .5rem;
    }
    
    .rc-audio-players audio {
      width: 100%;
      max-width: 100%;
      border-radius: 8px;
    }
    
    .audio-performer {
      font-size: 0.88rem;
      color: var(--gray-700);
      font-style: italic;
    }
    
    .audio-tags {
      display: flex;
      gap: .4rem;
      flex-wrap: wrap;
    }
    
    .rc-audio-nav {
      display: none;
      align-items: center;
      justify-content: space-between;
      gap: .5rem;
      margin-top: .5rem;
      padding-top: .5rem;
      border-top: 1px solid var(--gray-200);
    }
    
    .audio-nav-btn {
      padding: .4rem .7rem;
      border-radius: 8px;
      border: 1px solid var(--gray-300);
      background: #fff;
      color: var(--gray-800);
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      transition: all .15s ease;
    }
    
    .audio-nav-btn:hover {
      background: var(--gray-50);
      border-color: var(--gray-400);
      transform: translateY(-1px);
    }
    
    .audio-nav-info {
      font-size: 0.88rem;
      color: var(--gray-600);
      font-weight: 600;
    }
    
    /* Thumbnail carousel for Works */
    .rc-thumb-carousel {
      position: relative;
      margin-top: 1rem;
    }

    .rc-thumb-carousel::before {
      content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100vw;
        height: 100%;
        border: 2px solid var(--gray-300);
        background: var(--primary-200);
        z-index: -1;
    }
    
    .rc-thumb-carousel .rail {
      display: flex;
      gap: 1rem;
      overflow-x: auto;
      padding: 1.25rem;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: thin;
      scrollbar-color: var(--gray-400) transparent;
    }
    
    .rc-thumb-carousel .rail::-webkit-scrollbar {
      height: 6px;
    }
    
    .rc-thumb-carousel .rail::-webkit-scrollbar-thumb {
      background: var(--gray-400);
      border-radius: 999px;
    }
    
    .rc-thumb {
      min-width: 150px;
      max-width: 170px;
      aspect-ratio: 8.5 / 11;
      border-radius: 12px;
      overflow: hidden;
      cursor: pointer;
      background: var(--gray-100);
      box-shadow: 0 5px 7px rgba(2,6,23,.12);
      transition: all .18s ease;
      flex-shrink: 0;
      scroll-snap-align: start;
      border: 2px solid transparent;
    }
    
    .rc-thumb:hover {
      transform: translateY(-3px);
      box-shadow: 0 12px 28px rgba(2,6,23,.12);
    }
    
    .rc-thumb.active {
      border-color: var(--primary-600);
      box-shadow: 0 0 0 2px rgba(255,255,255,.95), 0 0 0 4px var(--primary-600), 0 12px 28px rgba(59,130,246,.18);
      transform: scale(1.05);
    }
    
    .rc-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      border-radius: inherit;
    }
    
    /* Mobile adjustments for Works carousel */
    @media (max-width: 768px) {
      .rc-carousel-featured {
        flex-direction: column;
        gap: 1rem;
      }
      
      .rc-carousel-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
      }
      
      .rc-primary-actions {
        flex-direction: column;
        width: 100%;
      }
      
      .rc-learn-btn,
      .rc-carousel-buy {
        width: 100%;
        justify-content: center;
      }
      
      .rc-thumb { min-width: 130px; max-width: 150px; }
    }
    
    /* Dark mode for Works carousel */
    [data-theme="dark"] .rc-carousel-title {
      color: var(--gray-100);
    }
    
    [data-theme="dark"] .rc-carousel-inst,
    [data-theme="dark"] .rc-carousel-desc {
      color: var(--gray-300);
    }
    
    [data-theme="dark"] .rc-learn-btn {
      background: var(--gray-700);
      border-color: var(--gray-600);
      color: var(--gray-100);
    }
    
    [data-theme="dark"] .rc-learn-btn:hover {
      background: var(--gray-600);
      border-color: var(--gray-500);
    }
    
    [data-theme="dark"] .rc-audio-accordion {
      background: var(--gray-800);
      border-color: var(--gray-700);
    }
    
    [data-theme="dark"] .rc-audio-accordion .acc-head-row {
      background: var(--gray-700);
    }
    
    [data-theme="dark"] .rc-audio-accordion .accordion-body {
      background: var(--gray-800);
    }
    
    [data-theme="dark"] .rc-score-btn {
      background: linear-gradient(180deg, var(--gray-800), var(--gray-700));
      border-color: var(--gray-600);
      color: var(--gray-100);
    }
    /* ===== OTHER TYPES CAROUSEL - MATCHES RELATED WORKS ===== */
    /* Full-bleed colored band wrapper */
    #otherTypesCarousel {
      position: relative;
      width: 100%;
      max-width: none;
      padding: 2rem 0 2.5rem 0;
      box-sizing: border-box;
      border-bottom: 1px solid var(--gray-200);
    }
    
    /* Full-bleed background band using pseudo-element */
    #otherTypesCarousel::before {
      content: "";
      position: absolute;
      z-index: -1;
      top: 0;
      bottom: 0;
      left: 50%;
      right: 50%;
      margin-left: -50vw;
      margin-right: -50vw;
      background: var(--primary-400);
      border-bottom: 2px solid var(--gray-700);
      border-top: 2px solid var(--gray-700);
    }
    
    /* Classy inline header (matches related works) */
    .other-types-header {
      padding: 0;
    }
    
    .other-types-header h3 {
      display: block;
      width: fit-content;
      margin: 0 0 .6rem 0 !important;
      transform: translateX(0);
      padding: 0;
      color: #ffffff;
      opacity: .98;
      font-weight: 900;
      font-size: 1.6rem;
      letter-spacing: .06em;
      text-transform: none;
      /* Multi-layer text-shadow for stroke + depth */
      text-shadow:
        0 1px 0 rgba(0,0,0,.55),
        1px 0 0 rgba(0,0,0,.55),
        -1px 0 0 rgba(0,0,0,.55),
        0 -1px 0 rgba(0,0,0,.55),
        1px 1px 0 rgba(0,0,0,.55),
        -1px 1px 0 rgba(0,0,0,.55),
        1px -1px 0 rgba(0,0,0,.55),
        -1px -1px 0 rgba(0,0,0,.55),
        0 2px 6px rgba(0,0,0,.25);
      border: 0;
      background: transparent;
      position: relative;
    }
    
    .other-types-header h3::after { content: none; }
    /* Carousel container */
    .other-types-carousel { 
      display: flex;
      flex-direction: row;
      overflow-x: auto;
      overflow-y: hidden;
      gap: 1rem;
      padding: .25rem 0 0 0;
      width: 100%;
      scroll-behavior: smooth;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: thin;
      scrollbar-color: var(--primary-500) var(--gray-200);
      justify-content: flex-start;
      scroll-snap-type: x mandatory;
    }
    
    /* Scrollbar styling */
    .other-types-carousel::-webkit-scrollbar {
      height: 6px;
    }
    
    .other-types-carousel::-webkit-scrollbar-track {
      background: var(--gray-200);
      border-radius: var(--radius-full);
      margin: 0 0.5rem;
    }
    
    .other-types-carousel::-webkit-scrollbar-thumb {
      background: var(--primary-500);
      border-radius: var(--radius-full);
      border: 1px solid var(--gray-200);
    }
    
    .other-types-carousel::-webkit-scrollbar-thumb:hover {
      background: var(--primary-600);
    }
    
    /* Card styling (matches related works) */
    .other-types-card {
      min-width: 230px;
      max-width: 230px;
      flex: 0 0 auto;
      background: linear-gradient(145deg, var(--gray-50) 0%, var(--gray-100) 100%);
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      cursor: pointer;
      border: 1px solid var(--gray-200);
      position: relative;
      transform: translateY(20px);
      opacity: 0;
      will-change: transform, box-shadow, background, opacity;
      animation: otherTypesCardEntrance 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
      text-decoration: none;
      color: inherit;
      display: block;
      scroll-snap-align: start;
    }

    /* Override transition timing for hover lift to 0.2s */
    .other-types-card {
      transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    }

    .other-types-card:hover {
      transform: translateY(-3px);
    }
    
    /* Staggered entrance animations */
    .other-types-card:nth-child(1) { animation-delay: 0.1s; }
    .other-types-card:nth-child(2) { animation-delay: 0.2s; }
    .other-types-card:nth-child(3) { animation-delay: 0.3s; }
    .other-types-card:nth-child(4) { animation-delay: 0.4s; }
    .other-types-card:nth-child(5) { animation-delay: 0.5s; }
    .other-types-card:nth-child(6) { animation-delay: 0.6s; }
    .other-types-card:nth-child(7) { animation-delay: 0.7s; }
    .other-types-card:nth-child(8) { animation-delay: 0.8s; }
    
    @keyframes otherTypesCardEntrance {
      from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }
    
    .other-types-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 12px 24px rgba(0, 0, 0, 0.20), 0 8px 18px rgba(59, 130, 246, 0.16);
      background: linear-gradient(145deg, var(--gray-50) 0%, var(--primary-50) 100%);
      border-color: var(--primary-300);
      z-index: 10;
    }

    /* Hover overlay (match Related Works) */
    .composition-hover-overlay {
      position: absolute !important; inset: 0 !important; display: flex !important; align-items: flex-start !important; justify-content: flex-start !important;
      padding: .75rem .9rem !important; background: linear-gradient(180deg, rgba(2,6,23,.85) 0%, rgba(2,6,23,.65) 35%, rgba(2,6,23,.9) 100%) !important;
      color: #fff !important; opacity: 0 !important; transition: opacity .18s ease !important; pointer-events: none !important; border-radius: inherit !important; z-index: 30 !important;
    }
    .other-types-card:hover .composition-hover-overlay { opacity: 1 !important; pointer-events: auto !important; }
    /* Programmatic hover support to ensure overlay shows even if :hover is flaky */
    .other-types-card.is-hovered .composition-hover-overlay { opacity: 1 !important; pointer-events: auto !important; }
    
    /* Lift the whole card when any descendant (image/overlay/etc.) is hovered */
    .other-types-card:has(:hover),
    .other-types-card:focus-within {
      transform: translateY(-3px) !important;
      box-shadow: 0 12px 24px rgba(0, 0, 0, 0.20), 0 8px 18px rgba(59, 130, 246, 0.16);
      transition: transform 0.2s ease, box-shadow 0.2s ease !important;
      z-index: 10;
    }
    .composition-overlay-content { width: 100%; height: 100%; display: flex; flex-direction: column; }
    .ov-title { font-weight: 900; letter-spacing: -0.01em; margin: 0; line-height: 1.05; font-size: 1.0rem; }
    .ov-instrument { margin-top: .25rem; font-weight: 700; font-size: .85rem; color: #e6edf7; }
    .ov-row { display:flex; gap:.45rem; margin-top:.5rem; align-items:center; flex-wrap:wrap; }
    .ov-chip { display:inline-flex; align-items:center; gap:.35rem; padding:.22rem .55rem; border-radius:999px; background: rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.22); font-weight:800; font-size:.75rem; }
    .ov-btn { display:inline-flex; align-items:center; justify-content:center; gap:.4rem; margin-top:auto; padding:.4rem .7rem; border-radius:10px; background:#fff; color:#0f172a; text-decoration:none; font-weight:800; }
    .ov-description { margin-top:.5rem; color:#e5e7eb; font-size:.9rem; line-height:1.4; display:block; flex: 1 1 auto; overflow:hidden; position: relative; }
    .ov-description::after { content:''; position:absolute; left:0; right:0; bottom:0; height:3rem; pointer-events:none; background: linear-gradient(180deg, rgba(2,6,23,0) 0%, rgba(2,6,23,.45) 55%, rgba(2,6,23,.85) 100%); }
    
    /* Card image with 8.5x11 aspect ratio */
    .other-types-card-media { 
      width: 100%; 
      height: 298px; /* 230px * (11/8.5) = 298px */
      object-fit: cover;
      object-position: center;
      transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      background: transparent;
      will-change: transform;
      display: block;
      border: none;
      overflow: hidden;
      border-radius: inherit;
      position: relative;
      background-color: var(--gray-900, #0f172a);
    }
    
    .other-types-card-media:not(.silo-placeholder) { 
      background: var(--gray-100); 
    }
    
    .other-types-card-media.silo-placeholder {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100%;
      border-radius: 8px;
    }
    
    /* Ensure placeholders fill exactly */
    .other-types-card-media > .silo-placeholder,
    .other-types-card-media > .feature-media {
      width: 100%;
      height: 100%;
      display: block;
      border-radius: inherit;
      background: transparent;
      position: absolute;
      inset: 0;
    }
    
    /* Ensure the hover targets the same element that has both classes */
    .other-types-card.rc-appear:hover {
      transform: translateY(-3px);
    }
    
    /* Hide text content (image only display) */
    .other-types-card-body {
      display: none;
    }
    
    /* Hide placeholder when actual content is present */
    .other-types-card-media:not(.silo-placeholder) .silo-placeholder,
    .other-types-card-media:has(img, video, picture) .silo-placeholder {
      display: none !important;
    }
    
    /* Dark mode */
    [data-theme="dark"] #otherTypesCarousel::before {
      background: var(--primary-500);
    }
    
    [data-theme="dark"] #otherTypesCarousel {
      border-bottom-color: var(--gray-700);
    }
    
    [data-theme="dark"] .other-types-header h3 {
      color: var(--gray-100); 
    }
    
    [data-theme="dark"] .other-types-card { 
      background: var(--gray-800); 
      border-color: var(--gray-700);
      box-shadow: 0 2px 8px rgba(0,0,0,.2);
    }
    
    [data-theme="dark"] .other-types-card:hover { 
      box-shadow: 0 20px 40px rgba(0,0,0,.4);
      border-color: var(--gray-600);
    }
    
    /* Mobile responsive */
    @media (max-width: 768px) {
      #otherTypesCarousel {
        padding: 1.5rem 0 2rem 0;
      }
      
      .other-types-header h3 {
        font-size: 1.1rem;
        margin: 0 0 1rem 1rem !important;
      }
      
      .other-types-card {
        min-width: 200px;
        max-width: 200px;
      }
      
      .other-types-card-media {
        height: 258px; /* 200px * (11/8.5) = 258px */
      }
      
      .other-types-carousel {
        gap: .75rem;
        padding: .5rem 0 .75rem 0;
      }
    }
    
    @media (max-width: 480px) {
      .other-types-card {
        min-width: 200px;
        max-width: 200px;
      }
      
      .other-types-card-media {
        height: 258px;
      }
    }

    /* Bottom bar layout + meta chip */
    #resourceActionsBar { justify-content: flex-start; align-items: center; }
    .meta-chip { display:inline-flex; align-items:center; gap:.35rem; padding:.25rem .6rem; border-radius:999px; border:1px solid var(--gray-300); background: var(--gray-50); color: var(--gray-700); font-weight:700; font-size:.78rem; }
    /* Header chip under image stays compact */
    #resourceHeader #resourceMetaChip { align-self: flex-start; flex: 0 0 auto; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    /* Bottom bar chip - push to the right */
    #resourceActionsBar .meta-chip { flex: 0 0 auto; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-left: auto; }
    /* Actions stay on the left */
    #resourceActionsBar .actions-left { display:flex; gap: 1rem; align-items:center; }
    [data-theme="dark"] .meta-chip { background: var(--gray-800); border-color: var(--gray-700); color: var(--gray-100); }
    /* Hide header meta, since we moved it to bottom chip */
    #resourceMeta { display: none; }

    /* Subpage navigation (tabs) */
    .resource-subnav { display:flex; gap:.25rem; align-items:flex-end; border-bottom:1px solid var(--gray-200); margin: .75rem 0 1rem; overflow-x:auto; scrollbar-width:none; }
    .resource-subnav::-webkit-scrollbar { display:none; }
    .resource-subnav .subnav-btn { appearance:none; -webkit-appearance:none; background:transparent; border:0; border-bottom:3px solid transparent; padding:.5rem .6rem; color: var(--gray-600); font-weight:800; letter-spacing:.06em; text-transform:uppercase; cursor:pointer; border-radius:8px 8px 0 0; transition: color .15s ease, border-color .15s ease, transform .12s ease; }
    .resource-subnav .subnav-btn:hover { color: var(--gray-800); transform: translateY(-1px); }
    .resource-subnav .subnav-btn.is-active { color: var(--gray-900); border-color: var(--primary-400, var(--primary-500)); }
    [data-theme="dark"] .resource-subnav { border-color: var(--gray-700); }
    [data-theme="dark"] .resource-subnav .subnav-btn { color: var(--gray-300); }
    [data-theme="dark"] .resource-subnav .subnav-btn:hover { color: var(--gray-100); }
    [data-theme="dark"] .resource-subnav .subnav-btn.is-active { color: var(--gray-50); border-color: var(--primary-500); }

    /* Subpage containers */
    .resource-subpages { display:block; }
    .resource-subpage { display:none; }
    .resource-subpage.is-active { display:block; }

    /* Subpage cards row (inline where subpages appear) */
    .resource-subpage-cards { display:flex; flex-wrap:wrap; gap:.5rem; margin:.5rem 0 .85rem; align-items:flex-start; }
    .resource-subpage-cards .subpage-card { display:inline-flex; align-items:center; gap:.4rem; border:1px solid var(--gray-200); background: var(--gray-50); border-radius:10px; padding:.55rem .75rem; color: var(--gray-800); font-weight:800; letter-spacing:.04em; text-transform:uppercase; cursor:pointer; transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease; will-change: transform, box-shadow; }
    .resource-subpage-cards .subpage-card:hover { transform: translateY(-1px); background: var(--gray-100); border-color: var(--gray-300); box-shadow: 0 6px 12px rgba(0,0,0,0.10); }
    .resource-subpage-cards .subpage-card .subpage-icon { opacity:.75; }
    /* Extra page mode indicator */
    .resource-subpage-cards .subpage-card[data-mode="page"]::after { content: '↗'; margin-left: .25rem; font-size: .85rem; opacity: .6; }
    .resource-subpage-cards .subpage-card[data-mode="page"]:hover::after { opacity: 1; }
    /* Subpage back navigation container */
    .subpage-back-nav-container { 
      margin: 1.5rem 0 0 0; 
      opacity: 0;
      transform: translateY(14px);
      animation: overlaySlideUp 300ms cubic-bezier(0.2, 0.65, 0.2, 1) 100ms forwards;
    }
    .subpage-back-nav { padding: 0.65rem 0.85rem; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 8px; display: inline-flex; align-items: center; gap: 0.5rem; }
    .subpage-back-nav a { color: var(--primary-600); text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 0.35rem; transition: all 0.15s ease; cursor: pointer; }
    .subpage-back-nav a:hover { color: var(--primary-700); transform: translateX(-2px); }
    .subpage-back-nav:hover { background: var(--gray-100); border-color: var(--gray-300); }
    [data-theme="dark"] .subpage-back-nav { background: var(--gray-800); border-color: var(--gray-700); }
    [data-theme="dark"] .subpage-back-nav a { color: var(--primary-400); }
    [data-theme="dark"] .subpage-back-nav a:hover { color: var(--primary-300); }
    [data-theme="dark"] .resource-subpage-cards .subpage-card { border-color: var(--gray-700); background: var(--gray-800); color: var(--gray-100); }
    [data-theme="dark"] .resource-subpage-cards .subpage-card:hover { background: var(--gray-700); border-color: var(--gray-600); box-shadow: 0 6px 12px rgba(0,0,0,0.36); }

    /* Subpage modal */
    .subpage-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display:none; align-items:center; justify-content:center; z-index: 9999; }
    .subpage-modal { width: min(920px, 94vw); max-height: 86vh; overflow:auto; background: white; color: var(--gray-900); border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.35); border:1px solid var(--gray-200); }
    .subpage-modal-header { display:flex; align-items:center; justify-content:space-between; padding:.75rem 1rem; border-bottom:1px solid var(--gray-200); position: sticky; top: 0; background: inherit; z-index: 1; }
    .subpage-modal-title { font-weight: 800; letter-spacing:-.01em; margin:0; }
    .subpage-modal-close { appearance:none; -webkit-appearance:none; background:transparent; border:0; font-size:1.25rem; cursor:pointer; line-height:1; padding:.25rem .4rem; border-radius:8px; }
    .subpage-modal-content { padding: 1rem 1.1rem 1.25rem; }
    [data-theme="dark"] .subpage-modal { background: var(--gray-800); color: var(--gray-100); border-color: var(--gray-700); box-shadow: 0 20px 40px rgba(0,0,0,0.7); }
    [data-theme="dark"] .subpage-modal-header { border-color: var(--gray-700); }

    /* Image Spotlight Overlay */
    .image-spotlight-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.9);
      display: none;
      align-items: flex-start;
      justify-content: center;
      z-index: 10000;
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      padding: 2rem;
      overflow-y: auto;
      /* Lock background scrolling */
      overflow-y: auto;
    }
    .image-spotlight-backdrop.show {
      overflow-y: auto;
    }
    .image-spotlight {
      position: relative;
      max-width: calc(100vw - 4rem);
      max-height: calc(100vh - 4rem);
      background: var(--surface);
      border-radius: 16px;
      box-shadow: 0 24px 64px rgba(0,0,0,0.5);
      overflow: hidden;
      transform: scale(0.9);
      opacity: 0;
      transition: transform 0.3s ease, opacity 0.3s ease;
      /* Allow scrolling within the spotlight if content is larger */
      max-height: 90vh;
      overflow-y: auto;
    }
    .image-spotlight.show {
      transform: scale(1);
      opacity: 1;
    }
    .image-spotlight img {
      width: 100%;
      height: auto;
      object-fit: contain;
      display: block;
      border-radius: 16px;
      max-height: calc(100vh - 8rem);
    }
    .image-spotlight-close {
      position: absolute;
      top: 1rem;
      right: 1rem;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: rgba(0,0,0,0.7);
      border: 2px solid rgba(255,255,255,0.3);
      color: white;
      font-size: 1.5rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    .image-spotlight-close:hover {
      background: rgba(0,0,0,0.9);
      border-color: rgba(255,255,255,0.6);
      transform: scale(1.1);
    }
    .image-spotlight-caption {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: linear-gradient(transparent, rgba(0,0,0,0.8));
      color: white;
      padding: 2rem 1.5rem 1rem;
      font-size: 0.9rem;
      line-height: 1.4;
      opacity: 0;
      transform: translateY(20px);
      transition: all 0.3s ease;
    }
    .image-spotlight.show .image-spotlight-caption {
      opacity: 1;
      transform: translateY(0);
    }
    /* Ensure images are clickable */
    #resourceBody img,
    .content-body img,
    .subpage-modal-content img {
      cursor: pointer;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    #resourceBody img:hover,
    .content-body img:hover,
    .subpage-modal-content img:hover {
      transform: scale(1.01);
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    /* Improve visibility and accessibility of subpage modal close button */
    .subpage-modal-close {
      color: var(--gray-800);
      background: var(--gray-50);
      border: 1px solid var(--gray-300);
      width: 36px;
      height: 36px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .subpage-modal-close:hover {
      background: var(--gray-100);
      border-color: var(--primary-300);
    }
    .subpage-modal-close:focus-visible {
      outline: 2px solid var(--primary-300);
      outline-offset: 2px;
    }
    [data-theme="dark"] .subpage-modal-close {
      color: var(--gray-100);
      background: var(--gray-700);
      border-color: var(--gray-600);
    }
    [data-theme="dark"] .subpage-modal-close:hover {
      background: var(--gray-600);
      border-color: var(--gray-500);
    }
    /* Table styling for Notion content */
    .notion-table {
      width: 100%;
      border-collapse: collapse;
      margin: 1.1rem 0;
      border: 1px solid var(--gray-600);
      border-radius: 10px;
      overflow: hidden;
      box-shadow: 0 1px 3px rgba(0,0,0,.02);
      background: var(--gray-200);
    }
    .notion-table-row {
      border-bottom: 3px solid var(--gray-600);
      transition: background-color .15s ease;
    }
    .notion-table-row:hover {
      background: var(--gray-100);
    }
    .notion-table-row:last-child {
      border-bottom: none;
    }
    .notion-table-row td,
    .notion-table-row th {
      padding: .8rem 1rem;
      text-align: left;
      vertical-align: top;
      border-right: 1px solid var(--gray-600);
      line-height: 1.6;
    }
    .notion-table-row td:last-child,
    .notion-table-row th:last-child {
      border-right: none;
    }
    .notion-table-row td {
      font-size: .97rem;
      color: var(--gray-800);
    }
    .notion-table-row th {
      background: var(--gray-50);
      font-weight: 600;
      font-size: .93rem;
      color: var(--gray-900);
      letter-spacing: .008em;
    }
    .notion-table-row:first-child th {
      background: var(--gray-50);
      border-bottom: 2px solid var(--gray-250);
      font-weight: 700;
    }
    /* Dark mode table styling */
    [data-theme="dark"] .notion-table {
      border-color: var(--gray-700);
    }
    [data-theme="dark"] .notion-table-row {
      border-color: var(--gray-700);
    }
    [data-theme="dark"] .notion-table-row td,
    [data-theme="dark"] .notion-table-row th {
      border-color: var(--gray-700);
    }
    [data-theme="dark"] .notion-table-row th {
      background: var(--gray-800);
      color: var(--gray-100);
    }
    [data-theme="dark"] .notion-table-row:first-child th {
      background: var(--gray-700);
      border-color: var(--gray-600);
    }

    /* Mobile table responsiveness */
    @media (max-width: 768px) {
      .notion-table {
        font-size: .92rem;
        margin: .95rem 0;
      }
      .notion-table-row td,
      .notion-table-row th {
        padding: .65rem .85rem;
      }
      .notion-table-row td {
        font-size: .94rem;
      }
      .notion-table-row th {
        font-size: .9rem;
      }
    }
    /* Table of Contents Styling - Horizontal Top Navigation */
    .notion-toc {
      position: -webkit-sticky; /* iOS Safari support */
      position: sticky;
      background: rgba(114, 114, 114, 0.341);
      border: 1px solid var(--gray-200);
      border-radius: 12px;
      padding: 0.75rem 1rem;
      margin: 1rem 0 2rem 0; /* Increased top margin */
      top: calc(1rem + 80px); /* Account for navigation height + extra space */
      z-index: 100;
      box-shadow: 0 4px 12px rgba(0,0,0,0.08);
      width: 100%;
      /* Ensure it stays within viewport bounds */
      left: 0;
      right: 0;
      /* Allow content to extend full width */
      box-sizing: border-box;
      /* Prevent transforms from breaking sticky */
      will-change: auto;
      transform: none;
    }
    
    .notion-toc.horizontal {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      overflow-x: auto;
      overflow-y: hidden;
      scrollbar-width: thin;
      scrollbar-color: var(--gray-500) var(--gray-200);
      -webkit-overflow-scrolling: touch;
      padding-bottom: 0.25rem;
    }
    .notion-toc.horizontal::-webkit-scrollbar {
      height: 8px;
      background: var(--gray-200);
      border-radius: 4px;
      box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    }
    .notion-toc.horizontal::-webkit-scrollbar-thumb {
      background: var(--gray-500);
      border-radius: 4px;
    }
    .notion-toc.horizontal::-webkit-scrollbar-thumb:hover {
      background: var(--gray-600);
    }
    .notion-toc h3 {
      margin: 0 1rem 0 0;
      font-size: 0.9rem;
      font-weight: 800;
      letter-spacing: -0.01em;
      white-space: nowrap;
      flex-shrink: 0;
      color: #ffffff;
      text-shadow:
        /* Subtle stroke */
        -1px 0 0 rgba(0,0,0,0.4),
        1px 0 0 rgba(0,0,0,0.4),
        0 -1px 0 rgba(0,0,0,0.4),
        0 1px 0 rgba(0,0,0,0.4),
        /* Soft drop shadow */
        0 2px 3px rgba(0,0,0,0.35);
    }
    .toc-section {
      display: flex;
      align-items: center;
      gap: 0.25rem;
      flex-wrap: nowrap;
      overflow-x: auto;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }
    .toc-item {
      flex-shrink: 0;
      
    }
    .toc-h1, .toc-h2, .toc-h3 {
      font-weight: 600;
      font-size: 0.85rem;
      padding: 0.4rem 0.8rem;
      border-radius: 8px;
      border: 1px solid var(--gray-300);
      background: var(--gray-50);
      transition: all 0.15s ease;
      min-height: 36px; /* Ensure consistent height */
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    /* Ensure Beginning link matches other TOC items */
    .toc-h1 {
      background: var(--gray-50);
      border-color: var(--gray-300);
      color: var(--gray-700);
      border: 1px solid var(--gray-300);
      padding: 0.4rem 0.8rem;
      border-radius: 8px;
      font-weight: 600;
      font-size: 0.85rem;
      min-height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .toc-h2 {
      background: var(--gray-50);
      border-color: var(--gray-300);
      color: var(--gray-700);
      border: 1px solid var(--gray-300);
      padding: 0.4rem 0.8rem;
      border-radius: 8px;
      font-weight: 600;
      font-size: 0.85rem;
      min-height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .toc-h3 {
      background: var(--gray-100);
      border-color: var(--gray-200);
      color: var(--gray-600);
      font-size: 0.8rem;
      padding: 0.4rem 0.8rem;
      border: 1px solid var(--gray-200);
      border-radius: 8px;
      font-weight: 600;
      min-height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .toc-link {
      color: inherit;
      text-decoration: none;
      display: block;
      transition: all 0.15s ease;
    }
    .toc-link:hover {
      transform: translateY(-1px);
      box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    }
    .toc-link.active {
      background: var(--primary-500);
      color: white;
      border-color: var(--primary-300);
      border-radius: 8px;
    }
    .toc-more {
      font-size: 0.75rem;
      color: var(--gray-500);
      font-style: italic;
      padding: 0.4rem 0.8rem;
      border-radius: 8px;
      background: var(--gray-100);
      border: 1px solid var(--gray-200);
      flex-shrink: 0;
    }

    /* Dark mode table of contents */
    [data-theme="dark"] .notion-toc {
      background: var(--gray-800);
      border-color: var(--gray-700);
    }
    [data-theme="dark"] .notion-toc::before {
      background: linear-gradient(90deg, transparent 0%, var(--gray-600) 50%, transparent 100%);
    }
    [data-theme="dark"] .notion-toc h3 {
      color: #ffffff;
      text-shadow:
        -1px 0 0 rgba(0,0,0,0.5),
        1px 0 0 rgba(0,0,0,0.5),
        0 -1px 0 rgba(0,0,0,0.5),
        0 1px 0 rgba(0,0,0,0.5),
        0 2px 3px rgba(0,0,0,0.45);
    }
    [data-theme="dark"] .toc-h1 {
      background: var(--gray-700);
      border-color: var(--gray-600);
      color: var(--gray-200);
      padding: 0.4rem 0.8rem; /* Ensure consistent padding in dark mode */
      min-height: 36px; /* Ensure consistent height in dark mode */
      display: flex;
      align-items: center;
      justify-content: center;
    }
    [data-theme="dark"] .toc-h2 {
      background: var(--gray-700);
      border-color: var(--gray-600);
      color: var(--gray-200);
    }
    [data-theme="dark"] .toc-h3 {
      background: var(--gray-600);
      border-color: var(--gray-500);
      color: var(--gray-300);
    }
    [data-theme="dark"] .toc-link.active {
      background: var(--primary-500);
      color: white;
      border-color: var(--primary-500);
    }
    [data-theme="dark"] .toc-more {
      background: var(--gray-700);
      border-color: var(--gray-600);
      color: var(--gray-400);
    }

    /* Mobile table of contents */
    @media (max-width: 768px) {
      .notion-toc {
        position: -webkit-sticky !important; /* iOS Safari */
        position: sticky !important; /* Explicitly maintain sticky positioning on mobile */
        margin: 0 0 1.5rem 0; /* Flush to top on mobile */
        padding: 0.5rem 0.75rem;
        top: 68px !important; /* Stick to the very top on mobile */
        /* Ensure full width on mobile */
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        z-index: 1000 !important; /* Ensure it stays above everything except modals */
        background: rgba(64, 64, 64, 0.31); /* Ensure background is visible */
        box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Add shadow for depth */
        border: 1px solid var(--gray-200);
      }
      /* Fallback: when sticky is broken on some devices, use fixed positioning */
      .notion-toc.is-fixed-mobile { 
        position: fixed !important; 
        top: 0 !important; 
        left: 0; 
        right: 0; 
        margin: 0; 
        width: 100%;
        max-width: 100%;
        z-index: 1000 !important; 
        border-left-width: 0; 
        border-right-width: 0; 
        border-radius: 0 0 12px 12px; 
      }
      /* Spacer inserted before TOC to avoid layout jump when fixed */
      .notion-toc-spacer { height: var(--toc-fixed-height, 56px); }
      /* Ensure ancestors don't block sticky by creating a clipping context */
      main.container, #rcContent, #resourceBody { 
        overflow: visible !important; 
        contain: none !important;
        transform: none !important;
      }
      .notion-toc.horizontal {
        gap: 0.75rem;
        padding: 0 0.25rem; /* Add some padding to prevent edge cutoff */
        width: 100%;
        justify-content: flex-start;
        scrollbar-width: thin;
        scrollbar-color: var(--gray-500) var(--gray-200);
      }
      .notion-toc.horizontal::-webkit-scrollbar {
        height: 8px;
        background: var(--gray-200);
        border-radius: 4px;
        box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
      }
      .notion-toc.horizontal::-webkit-scrollbar-thumb {
        background: var(--gray-500);
        border-radius: 4px;
      }
      .notion-toc.horizontal::-webkit-scrollbar-thumb:hover {
        background: var(--gray-600);
      }
      .notion-toc h3 {
        font-size: 0.85rem;
        padding-bottom: 0.5rem;
        color: #ffffff;
        text-shadow:
          -1px 0 0 rgba(0,0,0,0.4),
          1px 0 0 rgba(0,0,0,0.4),
          0 -1px 0 rgba(0,0,0,0.4),
          0 1px 0 rgba(0,0,0,0.4),
          0 2px 3px rgba(0,0,0,0.35);
      }
      .toc-h1, .toc-h2, .toc-h3 {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        min-width: max-content;
      }
      .toc-h3 {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
      }
      .toc-section {
        gap: 0.75rem;
        padding: 0;
      }
    }

    /* Yellow Callout Carousel (YCC) */
    .ycc-carousel { position: relative; width: 100%; margin: .5rem 0 1rem; }
    .ycc-track {
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: 100%;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
      gap: 0;
      border-radius: 12px;
    }
    .ycc-slide { scroll-snap-align: start; padding: .25rem; box-sizing: border-box; }
    .ycc-slide-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: stretch; }
    .ycc-slide-grid > * { width: 100%; height: auto; min-height: 0; }
    .ycc-slide-grid img, .ycc-slide-grid video, .ycc-slide-grid iframe { width:100%; height:auto; display:block; border-radius:10px; background: transparent; }
    .ycc-nav { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); display:flex; justify-content: space-between; align-items:center; pointer-events:none; padding: 0 .25rem; }
    .ycc-btn { pointer-events: all; appearance: none; -webkit-appearance: none; border: 1px solid var(--gray-300); background: var(--gray-50); color: var(--gray-800); border-radius: 999px; width: 34px; height: 34px; display:inline-flex; align-items:center; justify-content:center; font-weight: 800; cursor:pointer; box-shadow: 0 2px 8px rgba(2,6,23,.08); }
    .ycc-btn:hover { background: var(--gray-100); border-color: var(--gray-400); transform: translateY(-1px); }
    .ycc-dots { display:flex; gap:.35rem; justify-content:center; align-items:center; margin-top:.35rem; }
    .ycc-dot { width:8px; height:8px; border-radius:999px; background: var(--gray-300); }
    .ycc-dot.is-active { background: var(--gray-700); }
    @media (max-width: 768px){ .ycc-slide-grid { grid-template-columns: 1fr; } }
    @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
    @keyframes overlaySlideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
    
    /* Resource Featured Wrapper (full-bleed background like News featured section) */
    .resource-featured-section { 
      position: relative; 
      padding-top: 1rem; 
      padding-bottom: 2rem; 
    }
    /* Full-bleed background using pseudo-element so inner max-width remains intact */
    .resource-featured-section::before {
      content: "";
      position: absolute;
      z-index: -1;
      top: 0; 
      bottom: 0; 
      left: 50%; 
      right: 50%;
      margin-left: -50vw; 
      margin-right: -50vw;
      /* Use local variable set by JS; fallback to primary-500 */
      background: var(--local-band-bg, var(--primary-500));
      border-bottom: 2px solid var(--gray-700);
    }
    /* Avoid collapsing margins adding gaps at top/bottom */
    .resource-featured-section > :first-child { margin-top: 0 !important; }
    .resource-featured-section > :last-child { margin-bottom: 0 !important; }
    /* Dark mode keeps same gradient */
    [data-theme="dark"] .resource-featured-section::before { 
      background: linear-gradient(180deg, var(--gray-700) 0%, var(--gray-800) 100%);
    }
    
    /* Ensure adequate horizontal padding on larger screens */
    @media (min-width: 769px) {
      #resourceBody {
        padding-left: .5rem;
        padding-right: .5rem;
      }
    }
  