/*
Theme Name: Pentest.TV
Theme URI: https://pentest.tv/
Author: Thomas Wilhelm
Author URI: https://pentest.tv/
Description: Companion site theme for the Pentest.TV YouTube channel. Features a dark hacker aesthetic with custom post types for video companion pages and books. Built standalone with no plugin dependencies.
Version: 1.9.4
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pentesttv
Tags: dark, custom-post-types, technology, blog, one-column, full-width-template
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #11161d;
    --bg-tertiary: #1a2029;
    --bg-elevated: #1f2630;
    --border-subtle: #232a33;
    --border-default: #2d3640;
    --border-strong: #3d4754;
    --text-primary: #e6edf3;
    --text-secondary: #9aa5b1;
    --text-tertiary: #6b7785;
    --text-muted: #4f5864;
    --accent: #5dcaa5;
    --accent-dim: #1d9e75;
    --accent-bg: rgba(93, 202, 165, 0.08);
    --accent-border: rgba(93, 202, 165, 0.25);
    --warning: #f0993b;
    --warning-bg: rgba(240, 153, 59, 0.08);
    --warning-border: rgba(240, 153, 59, 0.25);
    --danger: #e24b4a;
    --info: #378add;
    --code-bg: #0d1117;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", "SF Mono", Menlo, Monaco, Consolas, "Courier New", monospace;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --max-width: 1200px;
    --content-width: 760px;
}

/* ==========================================================================
   Reset and base
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--text-primary);
}

p {
    margin: 0 0 1rem;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

code, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

code {
    background: var(--code-bg);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    color: var(--accent);
    border: 1px solid var(--border-subtle);
}

pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    overflow-x: auto;
}

pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: var(--text-primary);
}

hr {
    border: 0;
    border-top: 1px solid var(--border-subtle);
    margin: 2rem 0;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ==========================================================================
   Skip link / accessibility
   ========================================================================== */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: var(--bg-primary);
    text-decoration: none;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* ==========================================================================
   Site header
   ========================================================================== */
.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
}

.site-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.site-branding a {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.site-logo-mark {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
}

.site-logo-mark::before {
    content: ">_";
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

.main-navigation a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.15s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--text-primary);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .main-navigation ul {
        display: none;
        position: absolute;
        top: 100%;
        right: 1.5rem;
        background: var(--bg-elevated);
        border: 1px solid var(--border-default);
        border-radius: var(--radius-md);
        padding: 0.75rem;
        flex-direction: column;
        gap: 0.5rem;
        min-width: 180px;
    }
    .main-navigation.toggled ul {
        display: flex;
    }
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 3rem 0;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.section-link {
    font-size: 0.85rem;
    color: var(--accent);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    padding: 4rem 1.5rem 3rem;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
}

.hero-eyebrow {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 0.75rem;
    font-family: var(--font-mono);
}

.hero h1 {
    font-size: 2.25rem;
    margin: 0 0 0.875rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 1.75rem;
    font-size: 1.05rem;
}

.hero-actions {
    display: inline-flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 600px) {
    .hero h1 { font-size: 1.65rem; }
    .hero p { font-size: 0.95rem; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    background: var(--bg-elevated);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1;
}

.btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.btn-primary {
    background: var(--accent-bg);
    border-color: var(--accent-border);
    color: var(--accent);
}

.btn-primary:hover {
    background: rgba(93, 202, 165, 0.15);
    color: var(--accent);
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

/* ==========================================================================
   Card grid
   ========================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.card-grid-narrow {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Locked 4-column grid for the homepage videos. Drops to 2 cols on
   narrow viewports, 1 col on phones — but always an even count, no
   awkward orphans on the last row. */
.card-grid-videos {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
    .card-grid-videos {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .card-grid-videos {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Video cards
   ========================================================================== */
.video-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.video-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.video-card a {
    color: inherit;
    display: block;
}

.video-card-thumb {
    aspect-ratio: 16 / 9;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
}

.video-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 2rem;
}

.video-card-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
}

.video-card-body {
    padding: 0.875rem 1rem 1rem;
}

.video-card-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 0.4rem;
    line-height: 1.4;
}

.video-card-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.video-card-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 0.5rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Book cards
   ========================================================================== */
.book-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: flex;
    gap: 0.875rem;
    transition: border-color 0.15s ease;
}

.book-card:hover {
    border-color: var(--border-strong);
}

.book-card a {
    color: inherit;
    display: contents;
}

.book-cover {
    width: 56px;
    height: 76px;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-card-body {
    min-width: 0;
    flex: 1;
}

.book-card-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 0.25rem;
    line-height: 1.35;
    color: var(--text-primary);
}

.book-card-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem;
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.badge-accent {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent-border);
}

/* ==========================================================================
   About panel
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 700px) {
    .about-grid { grid-template-columns: 1fr; }
}

.about-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.about-panel h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-weight: 500;
    margin: 0 0 0.75rem;
}

.about-panel p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.about-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.875rem;
}

.about-links a {
    color: var(--text-secondary);
}

.about-links a:hover {
    color: var(--accent);
}

/* ==========================================================================
   Single video page
   ========================================================================== */
.video-header {
    border-bottom: 1px solid var(--border-subtle);
    padding: 2rem 0 1.5rem;
}

.video-eyebrow {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
}

.video-header h1 {
    font-size: 1.75rem;
    margin: 0 0 0.625rem;
}

.video-summary {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.65;
}

.video-embed {
    aspect-ratio: 16 / 9;
    background: #000;
    margin: 1.5rem auto;
    width: 80%;
    max-width: 1100px;
    /* Don't let the embed exceed the viewport height — leaves room for the
       site header and a sliver of the page below. 9/16 of viewport width
       converts width into the height implied by 16:9, capping at ~85vh. */
    max-height: 85vh;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

@media (max-width: 700px) {
    .video-embed {
        width: 100%;
        margin: 1rem 0;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }
}

.video-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.video-embed-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.video-section {
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.video-section:last-child {
    border-bottom: none;
}

.video-section h2 {
    font-size: 1rem;
    margin: 0 0 0.875rem;
    font-weight: 600;
}

.timestamps {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.timestamps li {
    display: flex;
    gap: 0.875rem;
    padding: 0.3rem 0;
    align-items: baseline;
}

.timestamps .ts {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    min-width: 3.25rem;
    flex-shrink: 0;
}

.timestamps .label {
    color: var(--text-secondary);
}

/* Commands */
.command-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.command-block {
    background: var(--code-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.command-block:hover {
    border-color: var(--border-strong);
}

.command-block code {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text-primary);
    overflow-x: auto;
    flex: 1;
    min-width: 0;
    white-space: pre;
}

.command-block code::before {
    content: "$ ";
    color: var(--accent);
    user-select: none;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-tertiary);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--accent-bg);
}

.copy-btn.copied {
    color: var(--accent);
    border-color: var(--accent-border);
}

/* Downloads */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.download-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.85rem;
    display: flex;
    gap: 0.7rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease;
}

.download-item:hover {
    border-color: var(--accent-border);
    color: inherit;
}

.download-icon {
    width: 28px;
    height: 28px;
    background: var(--accent-bg);
    border-radius: var(--radius-sm);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
}

.download-info {
    min-width: 0;
}

.download-name {
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
    color: var(--text-primary);
}

.download-meta {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    margin: 0;
}

/* Links list */
.link-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.85;
}

.link-list li::marker {
    color: var(--text-muted);
}

/* Errata */
.errata {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.errata-prefix {
    color: var(--warning);
    font-family: var(--font-mono);
    font-weight: 600;
    margin-right: 0.4rem;
}

/* Book reference */
.book-ref-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.book-ref {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    display: flex;
    gap: 0.875rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease;
}

.book-ref:hover {
    border-color: var(--accent-border);
    color: inherit;
}

.book-ref .book-cover {
    width: 44px;
    height: 60px;
}

.book-ref-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 0.2rem;
}

.book-ref-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0;
    font-family: var(--font-mono);
}

/* ==========================================================================
   Single book page
   ========================================================================== */
.book-header {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 600px) {
    .book-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .book-header .book-cover-large { margin: 0 auto; }
}

.book-cover-large {
    width: 200px;
    aspect-ratio: 3 / 4;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.book-cover-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-info h1 {
    margin: 0 0 0.5rem;
}

.book-info-meta {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin: 0 0 1rem;
}

.book-info-desc {
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
    line-height: 1.7;
}

.book-purchase-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   Generic content (blog post / page)
   ========================================================================== */
.entry-content {
    line-height: 1.75;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
    margin-bottom: 1.25rem;
}

.entry-content h2 {
    margin-top: 2rem;
}

.entry-content blockquote {
    border-left: 3px solid var(--accent-border);
    padding: 0.5rem 0 0.5rem 1.25rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.entry-content a {
    text-decoration: underline;
    text-decoration-color: var(--accent-border);
    text-underline-offset: 2px;
}

/* ==========================================================================
   Archive title
   ========================================================================== */
.archive-header {
    padding: 2.5rem 0 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 2rem;
}

.archive-header h1 {
    margin: 0 0 0.5rem;
}

.archive-header p {
    color: var(--text-secondary);
    margin: 0;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 0;
}

.pagination .page-numbers {
    padding: 0.45rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    font-family: var(--font-mono);
}

.pagination .page-numbers.current {
    background: var(--accent-bg);
    border-color: var(--accent-border);
    color: var(--accent);
}

.pagination .page-numbers:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
}

.site-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

@media (max-width: 600px) {
    .site-footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.site-footer p {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent);
}

/* ==========================================================================
   Chapter groups (single book page)
   ========================================================================== */
.chapter-group {
    margin-bottom: 2rem;
}

.chapter-group:last-child {
    margin-bottom: 0;
}

.chapter-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    margin: 0 0 0.875rem;
    padding: 0 0 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.chapter-heading-label {
    color: var(--accent);
}

.chapter-count {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-weight: 400;
    letter-spacing: 0.04em;
}

/* Post links under a chapter heading on the book page */
.chapter-post-list {
    list-style: none;
    margin: 0.875rem 0 0;
    padding: 0;
    border-top: 1px dashed var(--border-subtle);
    padding-top: 0.75rem;
}

.chapter-post-list li {
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
    padding: 0.3rem 0;
    font-size: 0.9rem;
}

.chapter-post-list li::before {
    content: "↳";
    color: var(--text-tertiary);
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.chapter-post-list a {
    color: var(--accent);
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.chapter-post-list a:hover {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: var(--accent-border);
    text-underline-offset: 2px;
}

.chapter-post-date {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Members section on the homepage */
.section-members {
    background: linear-gradient(180deg, rgba(240, 159, 39, 0.025), rgba(240, 159, 39, 0));
}

.section-header-members h2 {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.members-badge-section {
    font-size: 0.65rem;
    padding: 0.25rem 0.55rem;
}

.section-members-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: 0 0 1.25rem;
    max-width: 640px;
    line-height: 1.6;
}

/* ==========================================================================
   Start here — homepage teaser + dedicated page
   ========================================================================== */

/* Homepage teaser section */
.start-teaser-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    padding: 1rem 0;
}

.start-teaser-eyebrow {
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
    font-family: var(--font-mono);
}

.start-teaser-heading {
    font-size: 1.6rem;
    margin: 0 0 1rem;
    line-height: 1.3;
}

.start-teaser-body {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0 0 1.5rem;
    line-height: 1.65;
}

.start-teaser-cta {
    font-size: 0.95rem;
}

@media (max-width: 600px) {
    .start-teaser-heading { font-size: 1.3rem; }
    .start-teaser-body { font-size: 0.95rem; }
}

/* Dedicated /start/ page */
.start-page-header {
    padding: 2.5rem 0 1.75rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 2rem;
}

.start-page-eyebrow {
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
    font-family: var(--font-mono);
}

.start-page-header h1 {
    font-size: 2.1rem;
    margin: 0 0 1rem;
    line-height: 1.25;
}

.start-page-lede {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
    max-width: 640px;
}

.start-page-extra {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed var(--border-subtle);
}

.start-section {
    padding: 1.5rem 0 2rem;
    border-bottom: 1px solid var(--border-subtle);
    line-height: 1.75;
}

.start-section-last {
    border-bottom: none;
}

.start-section h2 {
    font-size: 1.4rem;
    margin: 0 0 1rem;
}

.start-section h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
}

.start-section p {
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.start-section em {
    color: var(--text-tertiary);
    font-style: normal;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.start-section ul {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.start-section ul li {
    margin-bottom: 0.5rem;
}

.start-section ul li::marker {
    color: var(--text-muted);
}

.start-phase {
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.start-phase h3 {
    margin-top: 0;
}

.start-phase-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--accent-bg);
    color: var(--accent);
    border: 1px solid var(--accent-border);
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Learning paths page — content authored in WordPress block editor */

/* Headings within the checklist page */
.checklist-page h2 {
    font-size: 1.4rem;
    margin: 2.5rem 0 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    scroll-margin-top: 80px;
}

.checklist-page h2:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 1rem;
}

.checklist-page h3 {
    font-size: 0.85rem;
    margin: 1.75rem 0 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-mono);
    font-weight: 500;
    border-bottom: 1px dashed var(--border-subtle);
    padding-bottom: 0.4rem;
}

.checklist-page > p,
.checklist-page > .wp-block-paragraph {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0 0 1.25rem;
    line-height: 1.65;
}

/* Quick-nav: a paragraph with internal anchor links at the top of the page */
.checklist-page .checklist-quick-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 1rem 0 2rem;
    padding: 0;
}

@media (max-width: 600px) {
    .checklist-page .checklist-quick-nav {
        grid-template-columns: 1fr;
    }
}

.checklist-page .checklist-quick-nav a {
    display: block;
    padding: 0.7rem 0.9rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-family: var(--font-mono);
    transition: border-color 0.15s ease, color 0.15s ease;
}

.checklist-page .checklist-quick-nav a:hover {
    border-color: var(--accent-border);
    color: var(--accent);
}

/* Checklist items — unordered list with empty checkbox markers */
.checklist-page ul:not(.checklist-quick-nav) {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.checklist-page ul:not(.checklist-quick-nav) > li {
    position: relative;
    padding: 0.9rem 0 0.9rem 2rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.checklist-page ul:not(.checklist-quick-nav) > li:last-child {
    border-bottom: none;
}

.checklist-page ul:not(.checklist-quick-nav) > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
    border: 1.5px solid var(--border-strong);
    border-radius: 3px;
    background: var(--bg-secondary);
}

/* Bold text inside a checklist item — the competency name */
.checklist-page ul:not(.checklist-quick-nav) > li strong {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.97rem;
}

/* Inline emphasis or italics for the description */
.checklist-page ul:not(.checklist-quick-nav) > li em {
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-style: normal;
    display: block;
    margin: 0 0 0.45rem;
    line-height: 1.55;
}

/* Links inside the list — kept on a single line, smaller, monospace tone */
.checklist-page ul:not(.checklist-quick-nav) > li a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
}

.checklist-page ul:not(.checklist-quick-nav) > li a:hover {
    text-decoration: underline;
    text-decoration-color: var(--accent-border);
    text-underline-offset: 2px;
}

/* Small element used as a "resources:" label */
.checklist-page ul:not(.checklist-quick-nav) > li small {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: var(--text-tertiary);
    line-height: 1.5;
}

/* ==========================================================================
   Members-only badges and callout
   ========================================================================== */

/* Shared badge base */
.members-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(240, 159, 39, 0.12);
    color: #f0c275;
    border: 1px solid rgba(240, 159, 39, 0.4);
    font-size: 0.7rem;
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Badge floating over a video card thumbnail */
.members-badge-card {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(20, 14, 0, 0.85);
    color: #f5cc6a;
    border-color: rgba(245, 204, 106, 0.6);
    backdrop-filter: blur(2px);
}

/* Inline badge in the video page eyebrow line */
.members-badge-inline {
    margin-left: 0.6rem;
    vertical-align: 1px;
}

/* Optional hover lift on member cards */
.video-card-members:hover {
    border-color: rgba(245, 204, 106, 0.5);
}

/* Full callout above the embed on the single video page */
.members-callout {
    max-width: 1100px;
    width: 80%;
    margin: 1rem auto 0;
}

@media (max-width: 700px) {
    .members-callout {
        width: 100%;
        margin: 1rem 0 0;
    }
}

.members-callout-inner {
    background: linear-gradient(0deg, rgba(240, 159, 39, 0.04), rgba(240, 159, 39, 0.04));
    background-color: rgba(240, 159, 39, 0.06);
    border: 1px solid rgba(240, 159, 39, 0.35);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.members-callout-icon {
    font-size: 1.4rem;
    color: #f5cc6a;
    flex-shrink: 0;
    line-height: 1;
}

.members-callout-text {
    flex: 1;
    min-width: 200px;
}

.members-callout-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #f5cc6a;
    margin: 0 0 0.2rem;
}

.members-callout-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.55;
}

.btn-members {
    background: rgba(240, 159, 39, 0.12);
    border-color: rgba(245, 204, 106, 0.5);
    color: #f5cc6a;
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-members:hover {
    background: rgba(240, 159, 39, 0.2);
    border-color: rgba(245, 204, 106, 0.7);
    color: #f5cc6a;
}

/* ==========================================================================
   WordPress admin bar adjustment
   ========================================================================== */
.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* ==========================================================================
   WordPress core classes
   ========================================================================== */
.alignleft { float: left; margin: 0.5rem 1rem 0.5rem 0; }
.alignright { float: right; margin: 0.5rem 0 0.5rem 1rem; }
.aligncenter { display: block; margin: 1rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--text-tertiary); text-align: center; }
.gallery { margin-bottom: 1rem; }
