    /* Container detail page styles — shared theme in theme.css */

    /* Detail page: brighter text in dark mode for readability on glass surfaces.
       Light mode inherits --text-secondary/#374151 and --text-muted/#4b5563 from theme.css.
       Dark mode override uses slightly brighter white for detail page only. */
    :root {
      --detail-text-secondary: rgba(255, 255, 255, 0.85);
      --detail-text-muted: rgba(255, 255, 255, 0.65);
    }
    [data-theme="light"] {
      --detail-text-secondary: #374151;
      --detail-text-muted: #4b5563;
    }

    /* Ensure theme.css light variables are not overridden by this file's :root.
       The readme-content and other shared elements use --text-secondary/--text-muted directly. */
    [data-theme="light"] .readme-content {
      color: #374151;
    }

    .bg-animated::before {
      content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
      background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.2) 0%, transparent 40%);
      animation: drift 25s ease-in-out infinite;
    }
    @keyframes drift {
      0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
      25% { transform: translate(3%, -2%) rotate(2deg) scale(1.05); }
      50% { transform: translate(-2%, 3%) rotate(-1deg) scale(0.95); }
      75% { transform: translate(1%, -1%) rotate(1.5deg) scale(1.02); }
    }

    .shape { will-change: transform, opacity; }
    .shape-1 {
      width: 400px; height: 400px; background: var(--gradient-1); top: 10%; right: 10%;
      animation: orbit1 14s ease-in-out infinite;
    }
    .shape-2 {
      width: 300px; height: 300px; background: var(--gradient-3); bottom: 20%; left: 5%;
      animation: orbit2 18s ease-in-out infinite;
    }
    .shape-3 {
      width: 250px; height: 250px; background: var(--gradient-2); top: 50%; left: 50%;
      animation: orbit3 22s ease-in-out infinite;
    }
    @keyframes orbit1 {
      0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.45; }
      25% { transform: translate(-40px, 30px) scale(1.15); opacity: 0.55; }
      50% { transform: translate(20px, -20px) scale(0.9); opacity: 0.35; }
      75% { transform: translate(-15px, -25px) scale(1.08); opacity: 0.5; }
    }
    @keyframes orbit2 {
      0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
      30% { transform: translate(35px, -25px) scale(1.2); opacity: 0.55; }
      60% { transform: translate(-30px, 15px) scale(0.85); opacity: 0.3; }
    }
    @keyframes orbit3 {
      0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.45; }
      20% { transform: translate(25px, 20px) scale(1.1); opacity: 0.5; }
      50% { transform: translate(-20px, -30px) scale(0.92); opacity: 0.35; }
      80% { transform: translate(10px, -15px) scale(1.18); opacity: 0.55; }
    }

    /* Detail page styles */
    .container-detail-page { min-height: 400px; }

    .back-link {
      display: inline-flex; align-items: center; gap: 0.5rem;
      margin-bottom: 1.5rem; color: var(--text-secondary); text-decoration: none;
      font-size: 0.875rem; transition: color 0.2s ease;
    }
    .back-link:hover { color: var(--text-primary); }

    .detail-header {
      display: flex; justify-content: space-between; align-items: flex-start;
      margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
    }
    .detail-title { display: flex; align-items: center; gap: 1rem; }
    .detail-title h1 { font-size: 2rem; font-weight: 700; margin: 0; }
    .detail-badge {
      font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.875rem;
      padding: 0.375rem 0.875rem; border-radius: 8px;
      background: rgba(16, 185, 129, 0.2); color: #34d399;
      border: 1px solid rgba(16, 185, 129, 0.3);
    }
    .detail-actions { display: flex; gap: 0.75rem; }

    .detail-meta {
      display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 1rem; margin-bottom: 2rem;
    }
    .meta-card { padding: 1.25rem; }
    .meta-card-label {
      font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
      color: var(--detail-text-muted); margin-bottom: 0.5rem;
    }
    .meta-card-value { font-size: 1.125rem; font-weight: 600; }

    .lineage-section { padding: 1.5rem; margin-bottom: 2rem; }
    .lineage-header {
      display: flex; align-items: center; gap: 0.5rem;
      font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; color: var(--text-primary);
    }
    .lineage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0.75rem; }
    .lineage-item {
      display: flex; flex-direction: column; gap: 0.25rem;
      padding: 0.75rem; border-radius: 6px; background: rgba(255, 255, 255, 0.05);
      animation: lineageItemIn 0.4s ease both;
      transition: opacity 0.25s ease, transform 0.25s ease;
    }
    .lineage-item.lineage-exit {
      opacity: 0; transform: scale(0.96);
    }
    .lineage-item.lineage-enter {
      animation: lineageItemIn 0.4s ease both;
    }
    @keyframes lineageItemIn {
      from { opacity: 0; transform: translateY(8px) scale(0.97); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }
    .lineage-label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--detail-text-muted); }
    .lineage-value {
      font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.8125rem;
      color: var(--detail-text-secondary); word-break: break-all;
    }
    .lineage-builtin { opacity: 0.55; }
    .lineage-builtin .lineage-label { font-size: 0.625rem; }
    .builtin-badge {
      font-size: 0.6875rem; font-style: italic;
      color: var(--detail-text-muted);
    }

    /* Variants */
    .variants-section { padding: 1.5rem; margin-bottom: 2rem; }
    .variants-header {
      display: flex; align-items: center; gap: 0.75rem;
      margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--glass-border);
    }
    .variants-header h2 { margin: 0; font-size: 1.25rem; }
    .variants-content { display: flex; flex-direction: column; gap: 1.5rem; }
    .version-group { display: flex; flex-direction: column; gap: 0.75rem; }
    .version-title { font-size: 1rem; font-weight: 600; margin: 0; color: var(--detail-text-secondary); }
    .variant-tags-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
    .variant-tag {
      font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.75rem;
      padding: 0.375rem 0.75rem; border-radius: 6px;
      background: rgba(139, 92, 246, 0.15); color: var(--accent-purple);
      border: 1px solid rgba(139, 92, 246, 0.25); cursor: pointer;
      transition: all 0.2s ease;
    }
    .variant-tag:hover { background: rgba(139, 92, 246, 0.25); transform: translateY(-1px); }
    .variant-tag.selected {
      background: rgba(139, 92, 246, 0.3); border-color: var(--accent-purple);
      box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
    }
    .variant-tag .badge-default {
      font-size: 0.625rem; padding: 0.125rem 0.375rem; border-radius: 3px;
      background: rgba(16, 185, 129, 0.3); color: var(--accent-green);
      margin-left: 0.25rem;
    }

    /* Variant dep update notification badge */
    .variant-tag { position: relative; }
    .variant-dep-badge {
      position: absolute; top: -6px; right: -6px;
      min-width: 16px; height: 16px; padding: 0 4px;
      border-radius: 999px; font-size: 0.5625rem; font-weight: 700;
      line-height: 16px; text-align: center;
      background: rgba(245, 158, 11, 0.9); color: #fff;
      border: 2px solid var(--glass-bg, rgba(30, 30, 60, 0.6));
      font-family: 'Inter', system-ui, sans-serif;
      pointer-events: none; z-index: 1;
      animation: badgePop 0.3s ease both;
    }
    @keyframes badgePop {
      from { transform: scale(0); opacity: 0; }
      60% { transform: scale(1.2); }
      to { transform: scale(1); opacity: 1; }
    }

    [data-theme="light"] .variant-dep-badge {
      background: rgba(245, 158, 11, 0.95); color: #fff;
      border-color: rgba(255, 255, 255, 0.9);
    }

    [data-theme="light"] .variant-tag { background: rgba(139, 92, 246, 0.12); color: #5b21b6; border-color: rgba(139, 92, 246, 0.3); }
    [data-theme="light"] .variant-tag:hover { background: rgba(139, 92, 246, 0.2); border-color: rgba(139, 92, 246, 0.5); color: #4c1d95; }
    [data-theme="light"] .variant-tag.selected { background: rgba(59, 130, 246, 0.15); border-color: #3b82f6; color: #1e40af; }
    [data-theme="light"] .detail-badge { background: rgba(16, 185, 129, 0.15); color: #047857; border-color: rgba(16, 185, 129, 0.3); }

    /* README */
    .readme-section { padding: 2rem; }
    .readme-header {
      display: flex; align-items: center; gap: 0.75rem;
      margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--glass-border);
    }
    .readme-header h2 { margin: 0; font-size: 1.25rem; }
    .readme-content { color: var(--text-secondary); line-height: 1.7; }
    .readme-content h1, .readme-content h2, .readme-content h3, .readme-content h4 {
      color: var(--text-primary); margin-top: 1.5em; margin-bottom: 0.75em;
    }
    .readme-content h1 { font-size: 1.75rem; }
    .readme-content h2 { font-size: 1.5rem; }
    .readme-content h3 { font-size: 1.25rem; }
    .readme-content h4 { font-size: 1.125rem; }
    .readme-content p { margin-bottom: 1em; }
    .readme-content code {
      font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.875em;
      padding: 0.2em 0.4em; background: rgba(0, 0, 0, 0.3); border-radius: 4px; color: #f472b6;
    }
    .readme-content pre {
      background: rgba(0, 0, 0, 0.3); border-radius: 8px;
      padding: 1rem; overflow-x: auto; margin: 1em 0;
    }
    .readme-content pre code { background: none; padding: 0; color: var(--text-secondary); }
    .readme-content ul, .readme-content ol { margin: 1em 0; padding-left: 1.5em; }
    .readme-content li { margin-bottom: 0.5em; }
    .readme-content a { color: var(--accent-blue); text-decoration: none; }
    .readme-content a:hover { text-decoration: underline; }
    .readme-content blockquote {
      border-left: 3px solid var(--accent-purple); margin: 1em 0;
      padding-left: 1em; color: var(--text-muted); font-style: italic;
    }
    .readme-content table { width: 100%; border-collapse: collapse; margin: 1em 0; }
    .readme-content th, .readme-content td { padding: 0.75rem; border: 1px solid var(--glass-border); text-align: left; }
    .readme-content th { background: rgba(255, 255, 255, 0.05); font-weight: 600; }
    .readme-content img { max-width: 100%; border-radius: 8px; }
    .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1em 0; }
    .table-wrapper table { margin: 0; }

    /* Dependency Health */
    .dep-health-section { padding: 1.5rem; margin-bottom: 2rem; }
    .dep-health-header {
      display: flex; align-items: center; gap: 0.75rem;
      margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--glass-border);
    }
    .dep-health-header h2 { margin: 0; font-size: 1.25rem; }
    .dep-summary-badge {
      font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
      padding: 0.25rem 0.625rem; border-radius: 999px; margin-left: auto;
    }
    .dep-badge-ok { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
    .dep-badge-warning { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
    .dep-badge-neutral { background: rgba(107, 114, 128, 0.2); color: rgba(255,255,255,0.6); border: 1px solid rgba(107, 114, 128, 0.3); }

    .dep-health-summary { margin-bottom: 1.25rem; }
    .dep-health-bar { display: flex; flex-direction: column; gap: 0.5rem; }
    .dep-bar-label { font-size: 0.75rem; color: var(--detail-text-muted); }
    .dep-bar-track {
      height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.08);
      overflow: hidden; display: flex;
    }
    .dep-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, #34d399, #10b981);
      border-radius: 3px 0 0 3px;
      transition: flex 0.4s ease;
    }
    .dep-bar-fill:only-child { border-radius: 3px; }
    .dep-bar-unmonitored {
      height: 100%;
      background: linear-gradient(90deg, #f59e0b, #d97706);
      border-radius: 0 3px 3px 0;
      transition: flex 0.4s ease;
    }

    .dep-update-table-wrap { overflow-x: auto; margin-bottom: 1.25rem; }
    .dep-update-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
    .dep-update-table th {
      text-align: left; font-size: 0.6875rem; text-transform: uppercase;
      letter-spacing: 0.05em; color: var(--detail-text-muted); padding: 0.5rem 0.75rem;
      border-bottom: 1px solid var(--glass-border);
    }
    .dep-update-table td { padding: 0.625rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.04); }
    .dep-update-row { animation: lineageItemIn 0.4s ease both; }
    .dep-update-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
    .dep-name a { color: var(--accent-blue); text-decoration: none; }
    .dep-name a:hover { text-decoration: underline; }
    .dep-version { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.75rem; }
    .dep-version-current { color: var(--detail-text-muted); }
    .dep-version-latest { color: #34d399; font-weight: 500; }

    .dep-change-badge {
      font-size: 0.625rem; font-weight: 600; text-transform: uppercase;
      padding: 0.125rem 0.5rem; border-radius: 999px;
    }
    .dep-change-major { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
    .dep-change-minor { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
    .dep-change-patch { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }

    .dep-uptodate-details { margin-bottom: 1rem; }
    .dep-uptodate-summary {
      display: flex; align-items: center; gap: 0.5rem;
      font-size: 0.8125rem; color: var(--detail-text-muted); cursor: pointer;
      padding: 0.5rem 0; list-style: none;
    }
    .dep-uptodate-summary::-webkit-details-marker { display: none; }
    .dep-uptodate-summary::before {
      content: ''; display: inline-block; width: 0; height: 0;
      border-left: 5px solid var(--detail-text-muted); border-top: 4px solid transparent;
      border-bottom: 4px solid transparent; transition: transform 0.2s ease;
    }
    details[open] > .dep-uptodate-summary::before { transform: rotate(90deg); }
    .dep-uptodate-list { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem 0 0.25rem 0; }
    .dep-uptodate-item {
      font-size: 0.75rem; padding: 0.25rem 0.625rem; border-radius: 6px;
      background: rgba(16, 185, 129, 0.08); color: var(--detail-text-secondary);
      border: 1px solid rgba(16, 185, 129, 0.15);
    }
    .dep-uptodate-version {
      font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.6875rem;
      color: var(--detail-text-muted); margin-left: 0.25rem;
    }

    .dep-disabled-list {
      display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
      margin-bottom: 1rem; font-size: 0.75rem;
    }
    .dep-disabled-label { color: var(--detail-text-muted); font-style: italic; }
    .dep-disabled-item {
      padding: 0.125rem 0.5rem; border-radius: 4px;
      background: rgba(107, 114, 128, 0.1); color: var(--detail-text-muted);
      font-style: italic; font-size: 0.6875rem; cursor: help;
    }

    .dep-health-footer {
      padding-top: 0.75rem; border-top: 1px solid var(--glass-border);
    }
    .dep-workflow-link {
      display: inline-flex; align-items: center; gap: 0.375rem;
      font-size: 0.75rem; color: var(--detail-text-muted); text-decoration: none;
      transition: color 0.2s ease;
    }
    .dep-workflow-link:hover { color: var(--accent-blue); }

    /* Light theme: dependency health overrides */
    [data-theme="light"] .dep-badge-ok { background: rgba(16, 185, 129, 0.12); color: #047857; border-color: rgba(16, 185, 129, 0.3); }
    [data-theme="light"] .dep-badge-warning { background: rgba(245, 158, 11, 0.12); color: #92400e; border-color: rgba(245, 158, 11, 0.3); }
    [data-theme="light"] .dep-badge-neutral { background: rgba(107, 114, 128, 0.1); color: #4b5563; border-color: rgba(107, 114, 128, 0.2); }
    [data-theme="light"] .dep-bar-track { background: rgba(0, 0, 0, 0.06); }
    [data-theme="light"] .dep-update-table td { border-bottom-color: rgba(0, 0, 0, 0.06); }
    [data-theme="light"] .dep-update-table tbody tr:nth-child(even) { background: rgba(0, 0, 0, 0.02); }
    [data-theme="light"] .dep-version-latest { color: #047857; }
    [data-theme="light"] .dep-change-major { background: rgba(239, 68, 68, 0.1); color: #b91c1c; border-color: rgba(239, 68, 68, 0.3); }
    [data-theme="light"] .dep-change-minor { background: rgba(245, 158, 11, 0.1); color: #92400e; border-color: rgba(245, 158, 11, 0.3); }
    [data-theme="light"] .dep-change-patch { background: rgba(16, 185, 129, 0.1); color: #047857; border-color: rgba(16, 185, 129, 0.3); }
    [data-theme="light"] .dep-uptodate-item { background: rgba(16, 185, 129, 0.06); border-color: rgba(16, 185, 129, 0.15); }

    /* Light theme: lineage & readme overrides for WCAG 2.2 AA contrast */
    [data-theme="light"] .lineage-item {
      background: rgba(0, 0, 0, 0.04);
    }
    [data-theme="light"] .readme-content code {
      background: rgba(0, 0, 0, 0.06);
      color: #9333ea;
    }
    [data-theme="light"] .readme-content pre {
      background: #1e293b;
    }
    [data-theme="light"] .readme-content pre code {
      color: #e2e8f0;
    }
    [data-theme="light"] .readme-content th {
      background: rgba(0, 0, 0, 0.04);
    }
    [data-theme="light"] .readme-content blockquote {
      color: var(--detail-text-muted);
    }
    [data-theme="light"] .back-link {
      color: var(--detail-text-secondary);
    }
    [data-theme="light"] .back-link:hover {
      color: var(--text-primary);
    }

    /* Focus visible */
    .variant-tag:focus-visible, .back-link:focus-visible, .btn:focus-visible, .theme-toggle:focus-visible {
      outline: 2px solid var(--accent-blue); outline-offset: 2px;
    }

    /* Responsive */
    @media (max-width: 1024px) {
      .detail-meta { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 768px) {
      .container { padding: 1rem; }
      .header { flex-direction: column; align-items: flex-start; gap: 1rem; }
      .header-main { font-size: 1.5rem; }
      .header-actions { width: 100%; justify-content: flex-start; }
      .detail-header { flex-direction: column; align-items: flex-start; }
      .detail-title h1 { font-size: 1.5rem; }
      .detail-actions { width: 100%; flex-wrap: wrap; }
      .detail-actions .btn { flex: 1; min-width: 120px; justify-content: center; }
      .detail-meta { grid-template-columns: 1fr; }
      .readme-section { padding: 1rem; }
      .readme-content h1 { font-size: 1.5rem; }
      .readme-content h2 { font-size: 1.25rem; }
      .readme-content h3 { font-size: 1.125rem; }
      .readme-content pre { padding: 0.75rem; font-size: 0.8rem; }
      .variants-section { padding: 1rem; }
      .variant-tags-row { gap: 0.375rem; }
      .variant-tag { font-size: 0.7rem; padding: 0.25rem 0.5rem; }
      .dep-health-section { padding: 1rem; }
      .dep-health-header { flex-wrap: wrap; }
      .dep-summary-badge { margin-left: 0; }
      .dep-update-table { font-size: 0.75rem; }
      .dep-update-table th, .dep-update-table td { padding: 0.5rem; }
      .shape { display: none; }
    }
    @media (max-width: 480px) {
      .container { padding: 0.75rem; }
      .header-main { font-size: 1.25rem; }
      .detail-title h1 { font-size: 1.25rem; }
      .detail-badge { font-size: 0.75rem; padding: 0.25rem 0.5rem; }
      .meta-card { padding: 1rem; }
      .meta-card-value { font-size: 1rem; word-break: break-all; }
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important; scroll-behavior: auto !important;
      }
      .bg-animated, .shape { animation: none !important; }
    }
