/* ===== Carpcast Page — Wiki Theme ===== */

/* ===== Theme Variables ===== */
:root {
    --bg-color: #fff;
    --bg-secondary: #f8f9fa;
    --text-color: #222;
    --text-muted: #555;
    --border-color: #a2a9b1;
    --link-color: #0645ad;
    --link-visited: #0b0080;
    --header-bg: #fff;
    --header-border: #a2a9b1;
    --tab-active-bg: #fff;
    --tab-inactive-bg: #eaecf0;
    --accent-line: #0645ad;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.08);
    --card-shadow-hover: 0 6px 20px rgba(0,0,0,0.12);
    --overlay-bg: rgba(0,0,0,0.55);
}
[data-theme="dark"] {
    --bg-color: #101418;
    --bg-secondary: #1a1f24;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: #3a3f44;
    --link-color: #6b9eff;
    --link-visited: #9d8cff;
    --header-bg: #1a1f24;
    --header-border: #3a3f44;
    --tab-active-bg: #101418;
    --tab-inactive-bg: #2a2f34;
    --accent-line: #6b9eff;
    --card-shadow: 0 1px 4px rgba(0,0,0,0.25);
    --card-shadow-hover: 0 8px 28px rgba(0,0,0,0.35);
    --overlay-bg: rgba(0,0,0,0.7);
}

/* ===== Reset & Base ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Source Serif 4', 'Linux Libertine', Georgia, Times, serif;
    background: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
}

/* ===== Header Bar ===== */
.wiki-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.wiki-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.wiki-header-logo {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
}
.wiki-header-title {
    font-family: 'Source Serif 4', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}
.wiki-header-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== Mobile Navigation Toggle ===== */
.hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    width: 36px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: var(--bg-color);
    cursor: pointer;
    transform: rotate(90deg);
    transition: background 0.2s, border-color 0.2s;
}
.hamburger:focus-visible {
    outline: 2px solid var(--accent-line);
    outline-offset: 1px;
}
.ham-line {
    display: block;
    transition: transform 0.22s ease, opacity 0.18s ease, border-color 0.2s ease, background 0.2s ease;
}
.ham-one {
    width: 7px;
    height: 1px;
    background: var(--text-color);
}
.ham-zero {
    width: 18px;
    height: 6px;
    border: 1px solid var(--text-color);
    border-radius: 999px;
    background: transparent;
}
.hamburger.open {
    background: var(--bg-secondary);
    border-color: var(--accent-line);
}
.hamburger.open .ham-one:first-child {
    transform: translateY(5px) rotate(44deg) scaleX(2);
}
.hamburger.open .ham-zero {
    opacity: 0;
}
.hamburger.open .ham-one:last-child {
    transform: translateY(-5px) rotate(-44deg) scaleX(2);
}

.mobile-nav {
    display: none;
}

/* ===== Status Light ===== */
.status-wrap {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    position: relative;
    cursor: default;
}
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    background: #555;
}
.status-dot.status-online {
    background: #28c840;
    box-shadow: 0 0 5px rgba(40, 200, 64, 0.5);
    animation: statusPulse 3s ease-in-out infinite;
}
@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(40, 200, 64, 0.4); }
    50%      { box-shadow: 0 0 7px rgba(40, 200, 64, 0.7); }
}
.status-dot.status-offline {
    background: #ff5f57;
    box-shadow: 0 0 5px rgba(255, 95, 87, 0.45);
}
.status-text {
    font-size: 0.62rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.status-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    font-size: 0.68rem;
    white-space: nowrap;
    z-index: 200;
    border-radius: 3px;
    color: var(--text-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    pointer-events: none;
}
.status-wrap:hover .status-tooltip { display: block; }
@media (max-width: 600px) {
    .status-text, .status-dot { display: none; }
}

/* ===== Tab Navigation ===== */
.wiki-tabs {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    background: var(--tab-inactive-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
    font-size: 0.85rem;
}
.wiki-tabs-left, .wiki-tabs-right {
    display: flex;
    align-items: stretch;
}
.wiki-tab {
    padding: 8px 14px;
    color: var(--link-color);
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -1px;
    cursor: pointer;
    background: none;
    font-family: inherit;
    font-size: inherit;
}
.wiki-tab:hover { text-decoration: underline; }
.wiki-tab.active {
    background: var(--tab-active-bg);
    color: var(--text-color);
    border-color: var(--border-color);
    border-bottom: 1px solid var(--tab-active-bg);
    font-weight: 600;
    cursor: default;
    text-decoration: none;
}
.wiki-tabs-right a {
    padding: 8px 14px;
    color: var(--link-color);
    text-decoration: none;
}
.wiki-tabs-right a:hover { text-decoration: underline; }

/* ===== Main Content ===== */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 24px 40px;
    position: relative;
}
.main-content h1 {
    font-family: 'Source Serif 4', serif;
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin: 0 0 4px;
}
.page-subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0 0 20px;
}

/* ===== Guest CTA ===== */
.hero-card {
    display: block;
    margin: 0 0 24px;
    padding: 26px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    opacity: 0;
    transform: translateY(14px);
    animation: heroReveal 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) 0.08s forwards;
}
.hero-copy {
    opacity: 0;
    transform: translateY(10px);
    animation: heroSubReveal 0.7s ease 0.22s forwards;
}
.hero-kicker {
    margin: 0 0 10px;
    font-size: 0.72rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--link-color);
}
.hero-card h2,
.guest-form-section h2 {
    margin: 0 0 10px;
    font-size: 1.5rem;
    font-family: 'Source Serif 4', serif;
}
.hero-text,
.guest-form-intro {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 0.92rem;
}
.hero-actions {
    display: inline-flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--link-color);
    background: var(--link-color);
    color: var(--bg-color);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.6s ease;
}
.hero-button:hover {
    background: transparent;
    color: var(--link-color);
    transform: translateY(-1px);
}
@keyframes yellowPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(255, 215, 0, 0);
    }
}
@keyframes yellowShift {
    0%, 100% {
        background-color: #FFD700;
    }
    50% {
        background-color: #FFC700;
    }
}
.hero-button-spotlight {
    border-color: #FFD700;
    color: #222;
    animation: yellowShift 3s ease-in-out infinite;
}
.hero-button-spotlight:hover {
    background: transparent;
    color: #FFD700;
    animation: none;
    box-shadow: none;
}
.choice-group {
    margin-bottom: 18px;
}
.choice-group-heading {
    margin-bottom: 10px;
    font-size: 0.72rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--link-color);
}
.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.role-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.choice-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 58px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    font-family: 'Montserrat', sans-serif;
}
.choice-card:hover {
    border-color: color-mix(in srgb, var(--accent-line) 70%, var(--border-color) 30%);
}
.choice-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
}
.choice-copy {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-size: 0.83rem;
    line-height: 1.25;
}
.choice-copy strong {
    font-size: 0.84rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}
.choice-card:has(input:checked) {
    border-color: var(--accent-line);
    box-shadow: inset 3px 0 0 var(--accent-line);
    background: color-mix(in srgb, var(--bg-color) 86%, var(--bg-secondary) 14%);
}
.choice-card:has(input:focus-visible) {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroSubReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes forumRise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Guest Form ===== */
.guest-form-section {
    padding: 24px;
    margin: 0 0 24px;
    overflow: hidden;
    max-height: 2000px;
    opacity: 1;
    transform: translateY(0);
    transition: max-height 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.45s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), padding 0.7s ease, margin 0.7s ease;
}
.guest-form-section.forum-closed {
    max-height: 0;
    opacity: 0;
    transform: translateY(-14px) scale(0.99);
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    border-width: 0;
    pointer-events: none;
}
.guest-form-section.forum-opening {
    animation: forumRise 0.45s ease both;
}
.guest-form-intro {
    margin-bottom: 18px;
}
.form-fields {
    position: relative;
    padding-bottom: 72px;
}
.type-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.type-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    cursor: pointer;
    font-size: 0.84rem;
}
.type-option input {
    margin: 0;
}
.type-option:has(input:checked) {
    border-color: var(--accent-line);
    background: color-mix(in srgb, var(--bg-color) 80%, #d8e6ff 20%);
}
.form-section-step {
    padding: 20px;
    border: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--bg-color) 72%, var(--bg-secondary) 28%);
    margin-bottom: 18px;
}
.conditional-block.is-hidden {
    display: none;
}
.step-heading {
    margin-bottom: 18px;
}
.step-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.7rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--link-color);
}
.step-heading h3 {
    margin: 0;
    font-size: 1.15rem;
    font-family: 'Source Serif 4', serif;
}
.optional-tag {
    font-size: 0.72rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.choice-other-input {
    margin-top: 10px;
}
.input-note {
    margin-top: -2px;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.form-group textarea {
    width: 100%;
    min-height: 104px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font: inherit;
    resize: vertical;
}
.step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.form-submit.secondary {
    background: transparent;
    color: var(--text-color);
}
.form-submit:disabled {
    background: color-mix(in srgb, var(--bg-secondary) 70%, var(--bg-color) 30%);
    color: var(--text-muted);
    border-color: var(--border-color);
    cursor: not-allowed;
    opacity: 1;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.form-group label {
    font-size: 0.85rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}
.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font: inherit;
}
.recaptcha-wrap {
    margin-bottom: 16px;
    overflow-x: auto;
}
.form-submit,
.send-another-btn {
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    background: var(--text-color);
    color: var(--bg-color);
    font: inherit;
    cursor: pointer;
}
.form-submit:hover,
.send-another-btn:hover {
    opacity: 0.9;
}
.form-submit:disabled:hover {
    opacity: 1;
}
.form-status {
    display: none;
    margin-top: 14px;
    font-size: 0.88rem;
}
.form-status.error {
    color: #b42318;
}
.completion-tracker {
    position: absolute;
    right: 18px;
    bottom: 18px;
    min-width: 160px;
    max-width: 220px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--bg-color) 72%, var(--bg-secondary) 28%);
    box-shadow: var(--card-shadow);
}
.tracker-label {
    margin-bottom: 8px;
    font-size: 0.72rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.tracker-bar {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
}
.tracker-bar span {
    display: block;
    height: 100%;
    width: 33.3333%;
    background: var(--accent-line);
    transition: width 0.25s ease;
}
.form-fields.hidden,
.cf-sending-state,
.cf-check-state,
.form-success-state {
    display: none;
}
.cf-sending-state.visible,
.cf-check-state.visible,
.form-success-state.visible {
    display: flex;
    min-height: 144px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}
.form-success-state.visible {
    align-items: stretch;
    justify-content: flex-start;
    gap: 14px;
    padding: 22px;
    text-align: left;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}
.form-success-state h3 {
    margin: 0;
    font-size: 1.35rem;
}
.form-success-state p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}
.success-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid var(--accent-line);
    color: var(--accent-line);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    width: fit-content;
}
.success-calendar {
    width: 100%;
    min-height: 620px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
}
.cf-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid color-mix(in srgb, var(--border-color) 70%, transparent 30%);
    border-top-color: var(--accent-line);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.cf-checkmark {
    width: 58px;
    height: 58px;
}
.cf-circle,
.cf-check {
    stroke: #1f9d55;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.cf-circle {
    stroke-dasharray: 145;
    stroke-dashoffset: 145;
    animation: strokeCircle 0.6s ease forwards;
}
.cf-check {
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
    animation: strokeCheck 0.35s ease 0.45s forwards;
}
@keyframes strokeCircle { to { stroke-dashoffset: 0; } }
@keyframes strokeCheck { to { stroke-dashoffset: 0; } }

/* ===== Filter Bar ===== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}
.filter-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 5px 14px;
    font-size: 0.78rem;
    font-family: 'Montserrat', 'Source Serif 4', sans-serif;
    font-weight: 500;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.filter-btn:hover {
    border-color: var(--accent-line);
    color: var(--text-color);
}
.filter-btn.active {
    background: var(--accent-line);
    color: #fff;
    border-color: var(--accent-line);
}
.filter-search {
    margin-left: auto;
    position: relative;
}
.filter-search input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 5px 12px 5px 30px;
    font-size: 0.78rem;
    font-family: inherit;
    border-radius: 2px;
    width: 180px;
    transition: border-color 0.2s;
}
.filter-search input:focus {
    outline: none;
    border-color: var(--accent-line);
}
.filter-search input::placeholder { color: var(--text-muted); opacity: 0.7; }
.filter-search-icon {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 13px;
    height: 13px;
    color: var(--text-muted);
    pointer-events: none;
}

/* ===== Interview Count ===== */
.project-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ===== Interviews Grid ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

/* ===== Interview Card ===== */
.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.35s ease;
    box-shadow: var(--card-shadow);
    opacity: 0;
    will-change: transform, opacity;
}
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-line);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--accent-line);
}
.project-card:hover::before { opacity: 1; }
.project-card:focus-visible {
    outline: 2px solid var(--accent-line);
    outline-offset: 2px;
}

/* Card Image/Thumbnail - 16:9 for video */
.card-image-wrap {
    position: relative;
    overflow: hidden;
    background: var(--bg-color);
}
.card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.project-card:hover .card-image { transform: scale(1.04); }

.project-card.placeholder-blur .card-body {
    filter: none;
    opacity: 1;
}

.project-card.placeholder-blur .card-image-wrap {
    background: var(--bg-color);
}

.project-card.placeholder-blur .card-image {
    opacity: 1;
    filter: none;
    transform: none;
}

.project-card.placeholder-blur:hover .card-image {
    transform: none;
}

.project-card.placeholder-blur:hover {
    transform: none;
    box-shadow: var(--card-shadow);
    border-color: var(--border-color);
}

.project-card.placeholder-blur {
    cursor: default;
}

.card-coming-soon {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--bg-color) 78%, var(--bg-secondary) 22%);
    color: var(--text-color);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.project-card.placeholder-blur:hover::before {
    opacity: 0;
}

.card-icon-fallback {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--bg-secondary) 70%, var(--bg-color) 30%);
    color: var(--text-muted);
    font-size: 1.5rem;
}

/* Card Body */
.card-body {
    padding: 12px 14px 14px;
}
.card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
    color: var(--text-color);
}
.card-interviewee {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0 8px;
    font-style: italic;
}
.card-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0 0 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.card-tag {
    font-size: 0.62rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 1px 7px;
    border-radius: 1px;
    white-space: nowrap;
}
.card-date {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* ===== Overlay + Video Modal ===== */
.card-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    z-index: 900;
    opacity: 0;
    cursor: pointer;
}
.card-overlay.visible { opacity: 1; }

.expanded-card {
    position: fixed;
    z-index: 950;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 16px 64px rgba(0,0,0,0.3);
    overflow-y: auto;
    opacity: 0;
    will-change: transform, opacity;
}

/* Video modal content */
.expanded-inner {
    padding: 0;
}
.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.expanded-content {
    padding: 28px 32px 32px;
}
.expanded-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text-color);
}
.expanded-interviewee {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 16px;
    font-style: italic;
}
.expanded-desc {
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0 0 20px;
    color: var(--text-color);
}
.expanded-desc p {
    margin: 0 0 10px;
}
.expanded-desc p:last-child { margin-bottom: 0; }

/* Expanded detail rows */
.expanded-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.expanded-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.expanded-detail strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Expanded tags */
.expanded-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}
.expanded-tag {
    font-size: 0.68rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 2px 10px;
    border-radius: 1px;
}

/* Close button */
.expanded-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s, border-color 0.2s;
    color: #fff;
    padding: 0;
}
.expanded-close:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
}
.expanded-close svg {
    width: 14px;
    height: 14px;
}

/* ===== Launch Banner ===== */
.launch-banner {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-line);
    background: var(--bg-secondary);
}
.launch-title {
    margin-bottom: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.launch-copy {
    margin: 0 0 6px;
    color: var(--text-muted);
    font-size: 0.88rem;
}
.launch-countdown {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--link-color);
    text-transform: uppercase;
}

/* ===== Loading State ===== */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-line);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ===== Footer ===== */
.wiki-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.wiki-footer-inner {
    max-width: 900px;
    margin: 0 auto;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 8px;
}
.footer-copy { margin-bottom: 4px; }
.footer-self-hosted {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.6;
}
.wiki-footer a {
    color: var(--link-color);
    text-decoration: none;
}
.wiki-footer a:hover { text-decoration: underline; }

/* ===== Text Size (global, set from index Appearance panel) ===== */
[data-textsize="small"] .main-content { font-size: 0.88rem; }
[data-textsize="large"] .main-content { font-size: 1.1rem; }
[data-width="wide"] .main-content { max-width: none; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .projects-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .expanded-card {
        width: 94vw !important;
        left: 3vw !important;
        max-height: 88vh !important;
    }
    .expanded-content { padding: 20px 20px 24px; }
}
@media (max-width: 600px) {
    .wiki-header-tagline { display: none; }
    .wiki-header {
        padding: 8px 12px;
    }
    .wiki-header-left {
        min-width: 0;
        gap: 8px;
    }
    .wiki-header-title {
        max-width: calc(100vw - 104px);
        font-size: 1.02rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .status-wrap {
        margin-left: 4px;
    }
    .wiki-tabs { display: none; }
    .hamburger { display: inline-flex; }
    .mobile-nav {
        width: 100%;
        display: none;
        flex-direction: column;
        border-bottom: 1px solid var(--border-color);
        background: var(--tab-inactive-bg);
    }
    .mobile-nav.open { display: flex; }
    .mobile-nav-link {
        display: block;
        width: 100%;
        padding: 10px 14px;
        border-top: 1px solid var(--border-color);
        color: var(--link-color);
        text-decoration: none;
        font-size: 0.84rem;
        line-height: 1.2;
    }
    .mobile-nav-link.active {
        color: var(--text-color);
        font-weight: 600;
        background: var(--tab-active-bg);
    }
    .mobile-nav a.mobile-nav-link:hover,
    .mobile-nav a.mobile-nav-link:focus-visible {
        background: var(--tab-active-bg);
        text-decoration: underline;
        outline: none;
    }
    .main-content { padding: 16px 14px 32px; }
    .main-content h1 { font-size: 1.4rem; }
    .hero-card,
    .guest-form-section { padding: 18px; }
    .launch-banner { padding: 12px 14px; }
    .hero-card h2,
    .guest-form-section h2 { font-size: 1.25rem; }
    .form-fields { padding-bottom: 108px; }
    .completion-tracker {
        right: 12px;
        left: 12px;
        bottom: 12px;
        max-width: none;
    }
    .filter-bar { gap: 4px; }
    .filter-btn { padding: 4px 10px; font-size: 0.72rem; }
    .filter-search { margin-left: 0; width: 100%; margin-top: 4px; }
    .filter-search input { width: 100%; }
    .projects-grid { grid-template-columns: 1fr; gap: 14px; }
    .expanded-card {
        width: 100vw !important;
        left: 0 !important;
        top: 0 !important;
        max-height: 100vh !important;
        border: none;
    }
    .expanded-content { padding: 16px 16px 20px; }
    .expanded-title { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-card,
    .hero-copy {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .guest-form-section {
        transition: none;
    }
}

    /* ===== Print ===== */
@media print {
    .wiki-header, .wiki-tabs, .mobile-nav, .hamburger, .filter-bar, .card-overlay, .expanded-card, .wiki-footer { display: none !important; }
    .project-card { opacity: 1 !important; transform: none !important; break-inside: avoid; }
    .projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ===== Accessibility ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 8px;
    padding: 8px 16px;
    background: var(--accent-line);
    color: #fff;
    font-size: 0.85rem;
    z-index: 300;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
}
.skip-link:focus { top: 0; }

