/* ================================================================
   SHARED STRUCTURAL
   ================================================================ */
.notebook-card { position: relative; }

.secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em 1.2em;
    margin-top: 0.6em;
}
.secondary-actions a {
    transition: all 0.15s;
}

.ref-links {
    margin-top: 0.8em;
}
.ref-links span {
    display: inline;
}
.ref-links a {
    transition: color 0.15s;
}

.primary-btn::after {
    content: ' \2197';
    font-size: 0.85em;
}

.action-codealong::before {
    content: '\270E  ';
    opacity: 0.5;
}
.action-download::before {
    content: '\2193  ';
    opacity: 0.5;
}

/* ================================================================

   THEME: NOIR
   Dark, editorial. Giant italic serif. Ruled rows.

   ================================================================ */
.theme-noir {
    background: #111;
    color: #999;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 19px;
    line-height: 1.6;
}

.theme-noir .page { max-width: 820px; }

.theme-noir .conference-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7em;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c0392b;
    margin-bottom: 1.2em;
}

.theme-noir .site-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3.2em, 7vw, 5em);
    font-weight: 400;
    font-style: italic;
    color: #f0ece4;
    line-height: 1.08;
    margin-bottom: 0.4em;
    letter-spacing: -0.01em;
}

.theme-noir .site-author {
    font-family: 'Inter', sans-serif;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 1.2em;
}

.theme-noir .site-description {
    font-size: 1em;
    color: #777;
    line-height: 1.65;
    margin-bottom: 0.3em;
}
.theme-noir .site-description strong {
    color: #e8e4dc;
    font-weight: 600;
}

.theme-noir .site-meta-links {
    font-family: 'Inter', sans-serif;
    font-size: 0.85em;
    color: #555;
    margin-top: 1.5em;
}
.theme-noir .site-meta-links a {
    color: #888;
}
.theme-noir .site-meta-links a:hover {
    color: #f0ece4;
}

.theme-noir .section-divider {
    border: none;
    margin: 2em 0 0;
}

.theme-noir .notebook-card {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 0 24px;
    align-items: start;
    padding: 1.8em 0;
    border-top: 1px solid #222;
}
.theme-noir .notebook-card:last-of-type {
    border-bottom: 1px solid #222;
}

.theme-noir .step-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.05em;
    color: #c0392b;
    padding-top: 2px;
    font-style: italic;
}

.theme-noir .card-content {
    min-width: 0;
}

.theme-noir .notebook-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.9em;
    font-weight: 600;
    color: #e8e4dc;
    margin-bottom: 0.35em;
    line-height: 1.3;
}
.theme-noir .notebook-title a {
    color: inherit;
}
.theme-noir .notebook-title a:hover {
    color: #c0392b;
}

.theme-noir .notebook-desc {
    font-size: 0.9em;
    color: #666;
    line-height: 1.55;
}

.theme-noir .card-action {
    padding-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.theme-noir .primary-btn {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7em;
    font-weight: 500;
    color: #e8e4dc;
    border: 1px solid #444;
    padding: 8px 20px;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.15s;
}
.theme-noir .primary-btn:hover {
    border-color: #e8e4dc;
    background: #e8e4dc;
    color: #111;
}

.theme-noir .read-btn {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7em;
    font-weight: 500;
    color: #888;
    border: 1px solid #333;
    padding: 7px 20px;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.15s;
    text-align: center;
}
.theme-noir .read-btn:hover {
    color: #e8e4dc;
    border-color: #666;
}

.theme-noir .secondary-actions {
    grid-column: 2 / -1;
    margin-top: 0.6em;
    margin-bottom: 0.3em;
}
.theme-noir .secondary-actions a {
    font-family: 'Inter', sans-serif;
    font-size: 0.8em;
    color: #bbb;
    letter-spacing: 0.02em;
}
.theme-noir .secondary-actions a:hover {
    color: #e8e4dc;
}

.theme-noir .ref-links {
    grid-column: 2 / -1;
    font-family: 'Inter', sans-serif;
    font-size: 0.85em;
    color: #555;
}
.theme-noir .ref-links span { color: #555; }
.theme-noir .ref-links a { color: #9a8a7a; }
.theme-noir .ref-links a:hover { color: #c0392b; }

.theme-noir .site-footer {
    margin-top: 4em;
    font-family: 'Inter', sans-serif;
}
.theme-noir .newsletter-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5em;
    font-style: italic;
    color: #e8e4dc;
    margin-bottom: 0.2em;
}
.theme-noir .newsletter-desc {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 0.5em;
}
.theme-noir .newsletter-signup {
    background: #111;
    text-align: center;
}
.theme-noir .newsletter-embed {
    width: 100%;
    max-width: 480px;
    height: 100px;
}

/* ================================================================

   THEME: BROADSHEET
   Light, massive condensed type. Monospace body.

   ================================================================ */
.theme-broadsheet {
    background: #f0ece4;
    color: #3a3530;
    font-family: 'IBM Plex Sans', -apple-system, sans-serif;
    font-size: 18px;
    line-height: 1.65;
}

.theme-broadsheet .page { max-width: 880px; }

.theme-broadsheet .conference-label {
    display: inline-block;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c0392b;
    border: 2px solid #c0392b;
    padding: 6px 14px;
    margin-bottom: 1.5em;
}

.theme-broadsheet .site-title {
    font-family: 'Archivo Black', Impact, sans-serif;
    font-size: clamp(2.8em, 7vw, 5em);
    font-weight: 800;
    color: #1a1a1a;
    line-height: 0.92;
    text-transform: uppercase;
    margin-bottom: 0.25em;
    letter-spacing: 0.01em;
}

.theme-broadsheet .site-author {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #f0ece4;
    background: #1a1a1a;
    padding: 0.35em 0.7em;
    margin-bottom: 1.5em;
}

.theme-broadsheet .site-description {
    font-size: 1em;
    color: #3a3530;
    line-height: 1.7;
    margin-bottom: 0.3em;
}
.theme-broadsheet .site-description strong {
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.theme-broadsheet .site-meta-links {
    font-size: 1em;
    color: #888;
    margin-top: 1.5em;
}
.theme-broadsheet .site-meta-links a { color: #8b5e3c; }
.theme-broadsheet .site-meta-links a:hover { color: #c0392b; }

.theme-broadsheet .section-divider {
    border: none;
    border-top: 3px solid #1a1a1a;
    margin: 2em 0 0;
}

.theme-broadsheet .notebook-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 32px;
    align-items: start;
    padding: 2em 0;
    border-bottom: 2px solid #ccc5b8;
    overflow: hidden;
}

.theme-broadsheet .step-number {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Archivo Black', Impact, sans-serif;
    font-size: 8em;
    font-weight: 900;
    color: #1a1a1a;
    opacity: 0.06;
    line-height: 1;
    pointer-events: none;
}

.theme-broadsheet .card-content { min-width: 0; }

.theme-broadsheet .notebook-title {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.4em;
    line-height: 1.3;
    letter-spacing: 0.02em;
}
.theme-broadsheet .notebook-title a {
    color: inherit;
}
.theme-broadsheet .notebook-title a:hover {
    color: #c0392b;
}

.theme-broadsheet .notebook-desc {
    font-size: 0.95em;
    color: #4a4440;
    line-height: 1.6;
    max-width: 540px;
}

.theme-broadsheet .card-action {
    padding-top: 0;
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.theme-broadsheet .primary-btn {
    display: inline-block;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #f0ece4;
    background: #1a1a1a;
    padding: 10px 22px;
    white-space: nowrap;
    transition: all 0.15s;
    text-align: center;
}
.theme-broadsheet .primary-btn:hover {
    background: #c0392b;
}

.theme-broadsheet .read-btn {
    display: inline-block;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.85em;
    font-weight: 500;
    color: #1a1a1a;
    border: 1.5px solid #999;
    padding: 8px 22px;
    white-space: nowrap;
    transition: all 0.15s;
    text-align: center;
}
.theme-broadsheet .read-btn:hover {
    border-color: #1a1a1a;
    background: #1a1a1a;
    color: #f0ece4;
}

.theme-broadsheet .secondary-actions {
    grid-column: 1 / -1;
}
.theme-broadsheet .secondary-actions a {
    font-size: 0.95em;
    color: #8b5e3c;
}
.theme-broadsheet .secondary-actions a:hover { color: #c0392b; }

.theme-broadsheet .ref-links {
    grid-column: 1 / -1;
    font-size: 1em;
    color: #777;
}
.theme-broadsheet .ref-links span { color: #777; }
.theme-broadsheet .ref-links a { color: #8b5e3c; text-decoration: underline; }
.theme-broadsheet .ref-links a:hover { color: #c0392b; }

.theme-broadsheet .site-footer {
    margin-top: 4em;
}
.theme-broadsheet .newsletter-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.6em;
    text-transform: uppercase;
    color: #1a1a1a;
    margin-bottom: 0.2em;
}
.theme-broadsheet .newsletter-desc {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 0.5em;
}
.theme-broadsheet .newsletter-signup {
    background: #f0ece4;
    text-align: center;
}
.theme-broadsheet .newsletter-embed {
    width: 100%;
    max-width: 480px;
    height: 100px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 640px) {
    .theme-noir .notebook-card,
    .theme-broadsheet .notebook-card {
        grid-template-columns: 1fr;
        gap: 0.5em 0;
    }
    .theme-noir .step-number { margin-bottom: 0.3em; }
    .theme-broadsheet .step-number { display: none; }
    .theme-noir .card-action,
    .theme-broadsheet .card-action {
        grid-column: 1;
        margin-top: 0.8em;
    }
    .theme-noir .primary-btn,
    .theme-broadsheet .primary-btn,
    .theme-noir .read-btn,
    .theme-broadsheet .read-btn {
        text-align: center;
    }
    .theme-noir .secondary-actions,
    .theme-broadsheet .secondary-actions,
    .theme-noir .ref-links,
    .theme-broadsheet .ref-links {
        grid-column: 1;
    }
}
