/* ============================================
   qPlayer Support - style.css
   Matches qplayer.app marketing site design system
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Surface */
    --bg:           #08080f;
    --bg-tint:      #0d0d18;
    --bg-soft:      #11111d;
    --surface:      rgba(255,255,255,0.03);
    --surface-hi:   rgba(255,255,255,0.06);
    --border:       rgba(255,255,255,0.08);
    --border-hi:    rgba(255,255,255,0.14);

    /* Text */
    --text:         #f5f5fa;
    --text-mid:     #c4c4d4;
    --text-dim:     #8a8aa0;
    --text-faint:   #5a5a72;

    /* Brand */
    --accent:       #5b8cff;
    --accent-hi:    #7aa2ff;
    --cyan:         #00d4ff;
    --purple:       #7b2fff;
    --pink:         #d946ef;
    --green:        #28c840;
    --gradient:     linear-gradient(135deg, #5b8cff 0%, #00d4ff 50%, #7b2fff 100%);
    --gradient-soft: linear-gradient(135deg, rgba(91,140,255,0.18) 0%, rgba(0,212,255,0.12) 50%, rgba(123,47,255,0.18) 100%);

    /* Layout */
    --maxw:         1100px;
    --maxw-prose:   780px;
    --nav-h:        64px;
    --r-sm:         10px;
    --r-md:         16px;
    --r-lg:         24px;
    --r-xl:         32px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "ss01", "cv11";
}

a { color: var(--accent-hi); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text); }
img, svg { display: block; max-width: 100%; }

/* ---------- Utility ---------- */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

/* ---------- Scroll Animations ---------- */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
/* transform: none (not translateY(0)) once landed - a lingering transform
   creates a stacking context that traps children's z-index, which pushed the
   search dropdown behind later sections. */
.fade-up.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }

/* ============================
   HEADER / NAV (matches marketing site)
   ============================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-h);
    transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
    border-bottom: 1px solid transparent;
}
.site-header.scrolled {
    background: rgba(8, 8, 15, 0.72);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom-color: var(--border);
}
.header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}
.header-brand:hover { color: var(--text); }
.header-logo { height: 28px; }
.header-title {
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 0;
}
.header-nav {
    display: flex;
    gap: 28px;
    align-items: center;
}
.header-nav a {
    color: var(--text-mid);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}
.header-nav a:hover { color: var(--text); }
@media (max-width: 720px) {
    .header-nav { gap: 18px; }
    .header-nav a { font-size: 0.8rem; }
}
@media (max-width: 480px) {
    .header-nav a:not(:last-child) { display: none; }
}

/* Body offset for fixed nav */
body { padding-top: var(--nav-h); }

/* ============================
   HERO (index page)
   ============================ */
.support-hero {
    position: relative;
    padding: 80px 24px 56px;
    text-align: center;
    overflow: hidden;
}
.support-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.support-hero-bg .glow-1 {
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(91,140,255,0.45), transparent 70%);
    top: -180px; left: -120px;
}
.support-hero-bg .glow-2 {
    width: 460px; height: 460px;
    background: radial-gradient(circle, rgba(123,47,255,0.4), transparent 70%);
    top: -100px; right: -100px;
}
.support-hero-bg::after {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.025) 1px, transparent 0);
    background-size: 4px 4px;
    opacity: 0.4;
}
.support-hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
}
.support-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin-bottom: 16px;
}
.support-hero p {
    color: var(--text-mid);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    margin-bottom: 36px;
    line-height: 1.55;
}

/* Search */
.search-container {
    position: relative;
    max-width: 540px;
    margin: 0 auto;
}
.search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border-radius: 999px;
    border: 1px solid var(--border-hi);
    background: var(--surface-hi);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.15);
    background: rgba(255,255,255,0.08);
}
.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
}

/* ============================
   CATEGORIES GRID (index)
   ============================ */
.categories {
    padding: 16px 24px 56px;
    max-width: var(--maxw);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.category-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 26px 24px 24px;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.3s ease,
                background 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
}
.category-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hi);
    background: var(--surface-hi);
    color: inherit;
}
.category-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: var(--gradient-soft);
    color: var(--accent-hi);
    font-size: 1.2rem;
}
.category-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.015em;
    color: var(--text);
}
.category-card p {
    color: var(--text-mid);
    font-size: 0.86rem;
    line-height: 1.55;
}
.category-count {
    display: inline-block;
    margin-top: 14px;
    font-size: 0.72rem;
    color: var(--accent-hi);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Featured (Features Overview) variant */
.category-card.featured {
    background: linear-gradient(135deg, rgba(91,140,255,0.08), rgba(123,47,255,0.06));
    border-color: rgba(91,140,255,0.22);
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 720px;
    margin: 0 auto;
    padding: 22px 26px;
}
.category-card.featured .category-icon {
    margin-bottom: 0;
    width: 44px; height: 44px;
    font-size: 1.4rem;
}
.category-card.featured > div { flex: 1; }
.category-card.featured h3 { margin-bottom: 4px; }
.category-card.featured .featured-arrow {
    color: var(--text-dim);
    font-size: 1.2rem;
    margin-left: auto;
    transition: transform 0.2s;
}
.category-card.featured:hover .featured-arrow { transform: translateX(4px); color: var(--text); }

@media (max-width: 880px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .categories-grid { grid-template-columns: 1fr; gap: 12px; }
    .category-card { padding: 22px 20px; }
    .category-card.featured { padding: 18px 20px; gap: 14px; }
}

/* ============================
   ARTICLE LIST (Category Page TOC)
   ============================ */
.articles-section {
    padding: 0 24px 64px;
    max-width: 880px;
    margin: 0 auto;
}
.articles-section h2 {
    font-size: clamp(1.4rem, 3vw, 1.7rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: var(--text);
}
.article-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.article-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 18px 22px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    text-decoration: none;
    color: inherit;
}
.article-card:hover {
    transform: translateX(3px);
    border-color: var(--border-hi);
    background: var(--surface-hi);
    color: inherit;
}
.article-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--gradient-soft);
    color: var(--accent-hi);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}
.article-icon.video {
    background: rgba(255, 59, 48, 0.12);
    color: #ff6b6b;
}
.article-info { flex: 1; min-width: 0; }
.article-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text);
    letter-spacing: -0.01em;
}
.article-info p {
    color: var(--text-mid);
    font-size: 0.8rem;
    line-height: 1.5;
}

.article-badge {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(91, 140, 255, 0.14);
    color: var(--accent-hi);
}
.article-badge.video {
    background: rgba(255, 59, 48, 0.12);
    color: #ff6b6b;
}
.article-badge.pro {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: #fff;
}
.article-badge.coming-soon {
    background: rgba(255, 179, 0, 0.14);
    color: #ffb300;
}

.article-arrow {
    flex-shrink: 0;
    color: var(--text-dim);
    font-size: 1.05rem;
    transition: transform 0.2s, color 0.2s;
}
.article-card:hover .article-arrow {
    transform: translateX(3px);
    color: var(--text);
}

@media (max-width: 560px) {
    .article-card { padding: 16px; gap: 12px; }
    .article-badge { display: none; }
}

/* ============================
   ARTICLE DETAIL PAGE
   ============================ */
.article-header {
    padding: 56px 24px 28px;
    max-width: var(--maxw-prose);
    margin: 0 auto;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.82rem;
}
.breadcrumb a {
    color: var(--text-dim);
}
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .separator { color: var(--text-faint); }
.breadcrumb .current {
    color: var(--text);
    font-weight: 500;
}
.article-header h1 {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
}

/* Article body */
.article-body {
    padding: 0 24px 56px;
    max-width: var(--maxw-prose);
    margin: 0 auto;
    scroll-margin-top: calc(var(--nav-h) + 16px);
}
.article-body + .article-body {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    margin-top: 24px;
}

.article-body h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.6rem);
    font-weight: 700;
    margin: 8px 0 14px;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.2;
}
.article-body h3 {
    font-size: 1.08rem;
    font-weight: 600;
    margin: 28px 0 10px;
    color: var(--text);
    letter-spacing: -0.01em;
}
.article-body p {
    color: var(--text-mid);
    font-size: 0.96rem;
    line-height: 1.75;
    margin-bottom: 16px;
}
.article-body ul, .article-body ol {
    color: var(--text-mid);
    font-size: 0.96rem;
    line-height: 1.75;
    margin: 0 0 16px 24px;
}
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body em { color: var(--text); font-style: italic; }

/* Callout box */
.callout {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--r-sm);
    padding: 18px 22px;
    margin: 22px 0;
}
.callout.tip { border-left-color: var(--green); }
.callout.warning { border-left-color: #ff9f0a; }

.callout h4 {
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-hi);
}
.callout.tip h4 { color: #5fe676; }
.callout.warning h4 { color: #ffb547; }
.callout p { margin-bottom: 0; font-size: 0.92rem; }

/* Steps */
.steps {
    counter-reset: step-counter;
    list-style: none !important;
    margin: 16px 0 24px !important;
    padding: 0 !important;
}
.steps > li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 48px;
    margin-bottom: 18px;
    color: var(--text-mid);
    font-size: 0.95rem;
    line-height: 1.7;
}
.steps > li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--gradient-soft);
    color: var(--accent-hi);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Article figure / diagram */
.article-figure {
    margin: 28px 0;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
    background: var(--surface);
}
.article-figure img {
    width: 100%;
    display: block;
}
.article-figure figcaption {
    padding: 12px 20px;
    font-size: 0.78rem;
    color: var(--text-dim);
    text-align: center;
    border-top: 1px solid var(--border);
}

/* Comparison table */
.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 24px 0;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
    font-size: 0.85rem;
}
.comparison-table thead th {
    background: rgba(91, 140, 255, 0.08);
    color: var(--text);
    font-weight: 600;
    padding: 14px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.01em;
}
.comparison-table thead th:first-child { text-align: left; }
.comparison-table tbody td {
    padding: 12px 16px;
    color: var(--text-mid);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.comparison-table tbody td:first-child {
    text-align: left;
    color: var(--text);
    font-weight: 500;
}
.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.comparison-table .check { color: var(--green); }
.comparison-table .cross { color: #ff453a; }
.comparison-table .limited { color: #ffb300; font-size: 0.8rem; }
.comparison-table .best { color: var(--green); font-weight: 600; }

@media (max-width: 640px) {
    .comparison-table { font-size: 0.75rem; }
    .comparison-table thead th,
    .comparison-table tbody td { padding: 10px 8px; }
}

/* Video embed */
.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin: 24px 0;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55);
}
.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--r-md);
    max-width: 960px;
    margin: 24px auto;
    border: 1px solid var(--border);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55);
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video link card */
.video-link {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 59, 48, 0.06);
    border: 1px solid rgba(255, 59, 48, 0.18);
    border-radius: var(--r-md);
    padding: 16px 20px;
    margin: 20px 0;
    transition: transform 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
}
.video-link:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 59, 48, 0.35);
    color: inherit;
}
.video-link .play-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 59, 48, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #ff6b6b;
}
.video-link .video-info h5 {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text);
}
.video-link .video-info p {
    color: var(--text-mid);
    font-size: 0.8rem;
    margin: 0;
}

/* ============================
   CONTACT SECTION
   ============================ */
.contact-section {
    padding: 24px 24px 80px;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.contact-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 48px 40px;
    overflow: hidden;
}
.contact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-soft);
    opacity: 0.4;
    z-index: 0;
    filter: blur(40px);
}
.contact-card > * { position: relative; z-index: 1; }
.contact-card h2 {
    font-size: clamp(1.4rem, 3vw, 1.7rem);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    color: var(--text);
}
.contact-card p {
    color: var(--text-mid);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 24px;
}
.contact-card p a { color: var(--accent-hi); }
.contact-card p a:hover { color: var(--text); }

.contact-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 999px;
    background: var(--gradient);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 24px rgba(91,140,255,0.35);
}
.contact-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(91,140,255,0.45);
    color: #fff !important;
}

/* ============================
   FOOTER
   ============================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 24px 32px;
    background: var(--bg);
}
.footer-content {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-logo {
    height: 28px;
    opacity: 0.6;
}
.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--text-dim);
    font-size: 0.85rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-credit {
    font-size: 0.78rem;
    color: var(--text-faint);
}
.footer-credit a { color: var(--text-dim); }
.footer-credit a:hover { color: var(--text); }

@media (max-width: 720px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* ============================================
   Video walkthrough embed
   Placeholder until data-video is set; then click-to-load (see script.js).
   ============================================ */
.video-walkthrough {
    display: flex;
    gap: 18px;
    align-items: center;
    background: var(--gradient-soft);
    border: 1px solid var(--border-hi);
    border-radius: var(--r-md);
    padding: 18px 20px;
    margin: 24px 0;
}
.video-walkthrough .vw-thumb {
    flex: 0 0 auto;
    width: 96px;
    height: 60px;
    border-radius: var(--r-sm);
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--border-hi);
    display: grid;
    place-items: center;
    color: var(--text);
    font-size: 20px;
    line-height: 1;
}
.video-walkthrough.ready .vw-thumb { cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.video-walkthrough.ready .vw-thumb:hover { border-color: var(--accent); color: var(--accent-hi); }
.video-walkthrough .vw-thumb.has-poster {
    background-size: cover;
    background-position: center;
    color: #fff;
    font-size: 26px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}
.video-walkthrough.ready .vw-thumb.has-poster:hover { border-color: var(--accent); color: #fff; }
.video-walkthrough .vw-body { min-width: 0; }
.video-walkthrough .vw-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-hi);
    margin-bottom: 4px;
}
.video-walkthrough .vw-title { margin: 0 0 4px; font-size: 16px; color: var(--text); }
.video-walkthrough .vw-desc { margin: 0; font-size: 14px; color: var(--text-mid); line-height: 1.5; }
.video-walkthrough .vw-soon {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 10px;
}
/* Once a video loads, the block becomes a full-width 16:9 player. */
.video-walkthrough.has-video { display: block; padding: 0; background: none; border: none; }
.video-walkthrough .vw-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border-hi); }
.video-walkthrough .vw-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) {
    .video-walkthrough { flex-direction: column; align-items: flex-start; }
    .video-walkthrough .vw-thumb { width: 100%; height: 96px; }
}

/* ============================================
   "Start here" guided path (support home)
   ============================================ */
.start-path {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px 28px 24px;
}
.start-path > h2 { margin: 0 0 6px; font-size: 1.4rem; color: var(--text); }
.start-path > p { margin: 0 0 20px; color: var(--text-mid); }
.path-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.path-steps a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    transition: border-color 0.2s, transform 0.2s;
}
.path-steps a:hover { border-color: var(--accent); transform: translateX(4px); }
.path-num {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    background: var(--gradient);
    color: #fff;
}
.path-label { display: flex; flex-direction: column; gap: 2px; font-size: 0.92rem; color: var(--text-mid); }
.path-label strong { color: var(--text); font-size: 1rem; }

/* ============================================
   Related articles + next/prev pager (injected)
   ============================================ */
.related-section {
    max-width: 800px;
    margin: 48px auto 64px;
    padding: 0 24px;
}
.related-heading {
    font-size: 22px;
    margin: 0 0 16px;
}
.article-pager {
    display: flex;
    gap: 14px;
    margin-top: 18px;
}
.pager-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}
.pager-link:hover { border-color: var(--accent); background: rgba(255,255,255,0.03); }
.pager-link.next { text-align: right; align-items: flex-end; }
.pager-label { font-size: 12px; color: var(--text-dim); }
.pager-title { font-size: 15px; font-weight: 600; color: var(--text); }
.pager-spacer { flex: 1; }

/* ============================================
   Live search - results dropdown + overlay
   ============================================ */
.search-container { position: relative; }
.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    max-height: 420px;
    overflow-y: auto;
    background: #101016;
    border: 1px solid var(--border-hi);
    border-radius: var(--r-md);
    box-shadow: 0 16px 48px rgba(0,0,0,0.55);
    z-index: 300;
    text-align: left;
}
.search-results.open { display: block; }
.sr-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 16px;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}
.sr-item:last-child { border-bottom: none; }
.sr-item:hover, .sr-item.active { background: rgba(255,255,255,0.05); }
.sr-path { font-size: 13px; font-weight: 600; color: var(--text); }
.sr-sep { color: var(--text-dim); margin: 0 2px; }
.sr-snippet { font-size: 12.5px; color: var(--text-mid); line-height: 1.45; }
.search-results mark, .sp-results mark {
    background: none;
    color: var(--accent-hi);
    font-weight: 700;
}
.sr-empty { padding: 16px; font-size: 13px; color: var(--text-dim); }

/* Header search trigger (article pages, injected) */
.header-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    font-size: 13px;
    color: var(--text-mid);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 12px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.header-search-btn:hover { border-color: var(--accent); color: var(--text); }
.header-search-btn kbd {
    font-size: 10px;
    padding: 1px 5px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
}

/* Command-palette style overlay */
.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 900;
    padding: 12vh 20px 0;
}
.search-overlay.open { display: block; }
.search-panel {
    max-width: 640px;
    margin: 0 auto;
    background: #101016;
    border: 1px solid var(--border-hi);
    border-radius: var(--r-md);
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
    overflow: hidden;
}
.sp-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
}
.sp-input {
    flex: 1;
    font: inherit;
    font-size: 16px;
    color: var(--text);
    background: none;
    border: none;
    outline: none;
}
.sp-bar kbd {
    font-size: 10px;
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
}
.sp-results {
    position: static;
    border: none;
    box-shadow: none;
    border-radius: 0;
    max-height: 50vh;
}
@media (max-width: 640px) {
    .article-pager { flex-direction: column; }
    .header-search-btn kbd { display: none; }
}

/* ============================================
   "Was this helpful?" feedback widget (injected)
   ============================================ */
.feedback-widget {
    max-width: 800px;
    margin: 40px auto 0;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: rgba(255,255,255,0.02);
}
.fb-question { font-size: 15px; font-weight: 600; color: var(--text); }
.fb-buttons { display: flex; gap: 10px; }
.fb-btn {
    font: inherit;
    font-size: 14px;
    color: var(--text-mid);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 16px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, transform 0.1s;
}
.fb-btn:hover { border-color: var(--accent); color: var(--text); }
.fb-btn:active { transform: scale(0.96); }
.fb-thanks { margin: 0; font-size: 14px; color: var(--text-mid); }
.fb-thanks a { color: var(--accent-hi); }

/* ============================================
   Sticky "On this page" TOC (injected, ≥1280px)
   ============================================ */
.article-toc {
    display: none;
    position: fixed;
    top: 130px;
    right: 28px;
    width: 190px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding: 4px 0 4px 14px;
    border-left: 1px solid var(--border);
}
@media (min-width: 1280px) { .article-toc { display: block; } }
.toc-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 10px;
}
.article-toc a {
    display: block;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--text-dim);
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.15s;
}
.article-toc a:hover { color: var(--text); }
.article-toc a.active { color: var(--accent-hi); font-weight: 600; }

/* ============================================
   Hover heading anchors
   ============================================ */
section.article-body h2 { position: relative; }
.heading-anchor {
    margin-left: 10px;
    font-size: 0.8em;
    font-weight: 400;
    color: var(--text-dim);
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
section.article-body h2:hover .heading-anchor { opacity: 1; }
.heading-anchor:hover { color: var(--accent-hi); }
.heading-anchor.copied { color: #34d399; opacity: 1; }

/* Keep the live-search dropdown above - and unclipped by - the hero.
   overflow: visible is safe: the glow blobs are already clipped by
   .support-hero-bg's own overflow: hidden. */
.support-hero { position: relative; z-index: 60; overflow: visible; }
.search-container { z-index: 500; }

/* Supported Fixtures list (fixtures.html) */
.fixture-filter {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0 12px;
}
.fixture-filter input[type="search"] {
    flex: 1;
    max-width: 420px;
    padding: 12px 16px;
    font: inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    outline: none;
    transition: border-color 0.2s ease;
}
.fixture-filter input[type="search"]:focus { border-color: var(--accent); }
.fixture-filter input[type="search"]::placeholder { color: var(--text-faint); }
.fixture-count { color: var(--text-dim); font-size: 0.82rem; white-space: nowrap; }
.fixture-table-wrap {
    max-height: 640px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}
.fixture-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.83rem;
}
.fixture-table thead th {
    position: sticky;
    top: 0;
    background: #12121f;
    color: var(--text);
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.01em;
    z-index: 2;
}
.fixture-table tbody td {
    padding: 10px 16px;
    color: var(--text-mid);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: top;
}
.fixture-table tbody td:nth-child(2) { color: var(--text); font-weight: 500; }
.fixture-table tbody tr:last-child td { border-bottom: none; }
.fixture-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.fx-dim { color: var(--text-faint); }
.fx-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.fx-builtin  { background: rgba(40, 200, 64, 0.12);  color: #5fe676; }
.fx-ondemand { background: rgba(91, 140, 255, 0.12); color: var(--accent-hi); }
.fx-verified { background: rgba(0, 212, 255, 0.12);  color: var(--cyan); }
.fixture-note { margin-top: 14px; color: var(--text-dim); font-size: 0.85rem; }
@media (max-width: 640px) {
    .fixture-table thead th:nth-child(3), .fixture-table tbody td:nth-child(3) { display: none; }
}
