/* ============================================
   BRIDGELINK WEBSITE - MODERN CSS
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Light theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fc;
    --bg-tertiary: #f0f2f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fc;
    --bg-nav: rgba(255, 255, 255, 0.85);

    --text-primary: #0f1729;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;

    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-dark: #4f46e5;
    --accent-subtle: rgba(99, 102, 241, 0.08);
    --accent-glow: rgba(99, 102, 241, 0.2);

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --gradient-text: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    --gradient-hero: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    --gradient-card: linear-gradient(180deg, rgba(99, 102, 241, 0.02) 0%, transparent 100%);
}

[data-theme="dark"] {
    --bg-primary: #0b0f1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2035;
    --bg-card: #151c2e;
    --bg-card-hover: #1a2340;
    --bg-nav: rgba(11, 15, 26, 0.9);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-inverse: #0f1729;

    --accent: #818cf8;
    --accent-light: #a5b4fc;
    --accent-dark: #6366f1;
    --accent-subtle: rgba(129, 140, 248, 0.08);
    --accent-glow: rgba(129, 140, 248, 0.15);

    --border: #1e293b;
    --border-light: #1e293b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);

    --gradient-text: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #c4b5fd 100%);
    --gradient-hero: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    --gradient-card: linear-gradient(180deg, rgba(129, 140, 248, 0.03) 0%, transparent 100%);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

a:hover {
    color: var(--accent-light);
}

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-links a {
    display: block;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--accent-subtle);
}

.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
}

.theme-icon {
    position: absolute;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.theme-icon.sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.theme-icon.moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-icon.sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-icon.moon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
    background: var(--gradient-hero);
}

.hero-bg-mesh {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, var(--accent-glow) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-subtle);
    border: 1px solid var(--accent);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

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

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 32px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    animation: float 3s ease-in-out infinite;
}

.scroll-arrow {
    font-size: 1.2rem;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Image Placeholders ---------- */
.image-placeholder {
    background: var(--bg-tertiary);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    gap: 12px;
    text-align: center;
    aspect-ratio: 9 / 19;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

.image-placeholder:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.6;
}

.image-placeholder span {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.image-placeholder small {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.hero-placeholder {
    max-width: 320px;
    margin: 0 auto;
    border-radius: 32px;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.hero-placeholder::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-text);
    border-radius: 34px;
    z-index: -1;
    opacity: 0.3;
}

.wide-placeholder {
    margin-top: 40px;
}

.step-placeholder {
    margin-top: 16px;
}

.diagram-placeholder {
    margin-top: 16px;
}

/* ---------- Image Comparison Slider ---------- */
.img-compare-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    cursor: col-resize;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: var(--shadow-lg);
    display: block;
    background: var(--bg-tertiary);
}

.img-compare-wrapper.hero-placeholder {
    max-width: 320px;
    border-radius: 32px;
    box-shadow: var(--shadow-xl);
}

.img-compare-wrapper.hero-placeholder::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-text);
    border-radius: 34px;
    z-index: -1;
    opacity: 0.3;
}

.img-compare-wrapper.wide-placeholder {
    margin-top: 40px;
}

.img-compare-wrapper.step-placeholder {
    margin-top: 16px;
}

.img-compare-wrapper.diagram-placeholder {
    margin-top: 16px;
}

.img-compare-dark {
    position: relative;
    display: block;
    width: 100%;
    z-index: 1;
}

.img-compare-light {
    position: absolute;
    inset: 0;
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

.img-compare-dark img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.img-compare-light img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.img-compare-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 44px;
    height: 100%;
    z-index: 3;
    transform: translateX(-50%);
    pointer-events: none;
}

.img-compare-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.45);
}

.img-compare-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #222;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.img-compare-labels {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    z-index: 4;
    display: flex;
    justify-content: space-between;
    padding: 0 14px;
    pointer-events: none;
}

.img-compare-label-light,
.img-compare-label-dark {
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* ---------- Sections ---------- */
.section {
    padding: 100px 0;
}

.alt-bg {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.section-subheader {
    text-align: center;
    margin: 60px 0 32px;
}

.section-subheader h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-subheader p {
    color: var(--text-secondary);
}

/* ---------- About Section ---------- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s ease;
}

.about-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.about-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.about-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ---------- How It Works ---------- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    transition: all 0.3s ease;
}

.step-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -14px;
    left: 24px;
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.step-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

/* ---------- Features ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    background-image: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.feature-card.featured {
    grid-column: span 2;
}

.feature-icon {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.feature-screenshots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

/* ---------- Security ---------- */
.security-layers {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.security-layer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.security-layer.reverse {
    direction: rtl;
}

.security-layer.reverse > * {
    direction: ltr;
}

.layer-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-subtle);
    border: 1px solid var(--accent);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.layer-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.layer-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.security-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.security-list li {
    padding-left: 20px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.security-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
    font-family: var(--font-mono);
}

.reputation-thresholds {
    display: flex;
    gap: 12px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.threshold {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-width: 100px;
}

.threshold-points {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent);
    font-size: 0.9rem;
}

.threshold-action {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ---------- Groups ---------- */
.groups-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.group-feature {
    margin-bottom: 28px;
}

.group-feature h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.group-feature p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.groups-screenshots {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ---------- Privacy ---------- */
.privacy-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    margin-bottom: 60px;
}

.privacy-block.reverse {
    direction: rtl;
}

.privacy-block.reverse > * {
    direction: ltr;
}

.privacy-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.privacy-info > p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.privacy-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.option-group h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--accent);
}

.option-group ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.option-group li {
    padding-left: 16px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.option-group li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--text-tertiary);
}

.send-modes {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.send-mode {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.3s ease;
}

.send-mode:hover {
    border-color: var(--accent);
}

.send-mode.default {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.mode-name {
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.mode-default {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    padding: 2px 8px;
    background: var(--accent);
    color: white;
    border-radius: 100px;
    margin-left: 8px;
    font-weight: 600;
}

.mode-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.privacy-extras {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.privacy-extra-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.3s ease;
}

.privacy-extra-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.privacy-extra-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.privacy-extra-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ---------- Mesh Network ---------- */
.mesh-modes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.mesh-mode-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s ease;
}

.mesh-mode-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}

.mesh-mode-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.mesh-mode-icon {
    font-size: 1.75rem;
}

.mesh-mode-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.mesh-mode-card > p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.mesh-comparison {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.mesh-spec {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spec-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.spec-compare {
    display: flex;
    gap: 12px;
}

.spec-normal {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.spec-hub {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}

.overnight-features ul,
.postman-features ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
}

.overnight-features li,
.postman-features li {
    padding-left: 16px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.overnight-features li::before,
.postman-features li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
    font-weight: 700;
}

.network-health {
    text-align: center;
}

.network-health h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.network-health > p {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 32px;
}

/* ---------- Settings ---------- */
.settings-nav {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
    overflow-x: auto;
}

.settings-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.settings-tab:hover {
    color: var(--text-primary);
}

.settings-tab.active {
    background: var(--bg-card);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.settings-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.settings-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.settings-info > p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.setting-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.setting-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.setting-item h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.setting-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ---------- Specs ---------- */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.spec-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.spec-category h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.spec-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.spec-key {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.spec-val {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.85rem;
    text-align: right;
    color: var(--text-primary);
}

/* Delivery Flow */
.delivery-flow {
    text-align: center;
}

.delivery-flow h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 40px;
}

.flow-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 180px;
}

.flow-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 3px solid var(--accent);
    transition: all 0.3s ease;
}

.flow-dot.active {
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.flow-label {
    font-weight: 700;
    font-size: 0.95rem;
}

.flow-desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: center;
}

.flow-connector {
    width: 60px;
    height: 2px;
    background: var(--accent);
    margin-top: 10px;
    flex-shrink: 0;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--accent-dark);
    color: white;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-icon {
    font-size: 1.2em;
}

/* ---------- Hero Actions ---------- */
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.hero-donate {
    display: flex;
    align-items: center;
}

/* ---------- Download Section ---------- */
.download-section {
    position: relative;
    background: var(--bg-secondary);
    overflow: hidden;
    padding-top: 100px;
    padding-bottom: 100px;
}

.download-bg-mesh {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse 60% 50% at 25% 50%, var(--accent-glow) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 75% 50%, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.download-section .container {
    position: relative;
    z-index: 1;
}

/* -- Download Grid -- */
.dl-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    max-width: 900px;
    margin: 0 auto 48px;
}

/* -- Download Cards -- */
.dl-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 44px 36px 36px;
    border-radius: 20px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.dl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Play Store card – accent treatment */
.dl-card--play {
    border-color: var(--accent);
    background: linear-gradient(180deg, var(--accent-subtle) 0%, var(--bg-card) 40%);
    box-shadow: 0 0 0 1px var(--accent), 0 8px 30px rgba(99, 102, 241, 0.12);
}

.dl-card--play:hover {
    box-shadow: 0 0 0 1px var(--accent), 0 16px 48px rgba(99, 102, 241, 0.22);
}

/* APK card */
.dl-card--apk {
    background: var(--bg-card);
}

.dl-card--apk:hover {
    border-color: var(--accent-light);
}

/* Recommended badge */
.dl-card-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 20px;
    background: var(--accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 100px;
    white-space: nowrap;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.4);
}

/* Icon circles */
.dl-card-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.dl-card-icon-wrap--play {
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
}

.dl-card-icon-wrap--apk {
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    color: var(--accent);
}

.dl-card-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.dl-card-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: 340px;
}

/* -- Download Buttons -- */
.dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    padding: 15px 28px;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    margin-top: 4px;
}

.dl-btn--play {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.dl-btn--play:hover {
    background: var(--accent-dark);
    color: #fff;
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.dl-btn--apk {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.dl-btn--apk:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
    color: var(--accent);
    transform: translateY(-1px);
}

.dl-card-footnote {
    color: var(--text-tertiary);
    font-size: 0.78rem;
}

.dl-card-footnote a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* -- Hash Verification Block -- */
.dl-hashes {
    width: 100%;
    margin-top: 10px;
    padding: 16px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: left;
}

.dl-hashes-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dl-hashes-header svg {
    color: var(--accent);
    flex-shrink: 0;
}

.dl-hash-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.dl-hash-row:last-child {
    margin-bottom: 0;
}

.dl-hash-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 48px;
    text-align: right;
    flex-shrink: 0;
}

.dl-hash-code {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    word-break: break-all;
    user-select: all;
    cursor: text;
    line-height: 1.5;
}

/* -- System Requirements -- */
.dl-requirements {
    max-width: 900px;
    margin: 0 auto 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 36px;
}

.dl-requirements-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    text-align: center;
    margin-bottom: 22px;
}

.dl-req-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.dl-req-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: border-color 0.2s ease;
}

.dl-req-item:hover {
    border-color: var(--accent);
}

.dl-req-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--accent-subtle);
    color: var(--accent);
    flex-shrink: 0;
}

/* -- Support / Donate -- */
.dl-support {
    max-width: 600px;
    margin: 0 auto;
}

.dl-support-inner {
    text-align: center;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.dl-support-inner > p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.dl-support-bmc {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ---------- Nav Download Button ---------- */
.nav-download {
    background: var(--accent) !important;
    color: white !important;
    border-radius: var(--radius-sm) !important;
    padding: 6px 16px !important;
    font-weight: 600 !important;
}

.nav-download:hover {
    background: var(--accent-dark) !important;
    color: white !important;
}

/* ---------- Footer BMC ---------- */
.footer-bmc {
    margin-top: 8px;
}

/* ---------- FAQ ---------- */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    transition: all 0.3s ease;
}

.faq-item.active {
    border-color: var(--accent);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    gap: 16px;
}

.faq-question:hover {
    color: var(--accent);
}

.faq-arrow {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 2000px;
}

.faq-answer p {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.footer-brand .logo-icon {
    width: 32px;
    height: 32px;
}

.footer-brand .logo-text {
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-brand p {
    width: 100%;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0px;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 4px 0;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-card.featured {
        grid-column: span 1;
    }

    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mesh-modes {
        grid-template-columns: 1fr;
    }

    .privacy-extras {
        grid-template-columns: repeat(2, 1fr);
    }

    .dl-req-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-nav);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 40px;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .dl-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }

    .dl-req-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-placeholder {
        max-width: 240px;
    }

    .image-placeholder {
        max-width: 220px;
    }

    .img-compare-wrapper.hero-placeholder {
        max-width: 240px;
    }

    .img-compare-wrapper {
        max-width: 220px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-screenshots {
        grid-template-columns: 1fr;
    }

    .security-layer,
    .security-layer.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .groups-layout {
        grid-template-columns: 1fr;
    }

    .privacy-block,
    .privacy-block.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .privacy-extras {
        grid-template-columns: 1fr;
    }

    .settings-content {
        grid-template-columns: 1fr;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .flow-steps {
        flex-direction: column;
        align-items: center;
    }

    .flow-connector {
        width: 2px;
        height: 40px;
        margin-top: 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .reputation-thresholds {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .section {
        padding: 60px 0;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }

    .settings-nav {
        gap: 2px;
    }

    .settings-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .dl-req-grid {
        grid-template-columns: 1fr;
    }

    .dl-card {
        padding: 36px 24px 28px;
    }

    .dl-requirements {
        padding: 24px 20px;
    }
}

/* ---------- Page Header (subpages) ---------- */
.page-header {
    padding: 120px 0 60px;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.page-header .hero-bg-mesh {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, var(--accent-glow) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header .section-header {
    margin-bottom: 0;
}

.page-header .section-desc {
    max-width: 640px;
}

/* Active nav link */
.nav-links a.active {
    color: var(--accent);
    background: var(--accent-subtle);
}

/* ---------- Compatibility Page ---------- */
.compat-notice {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 24px;
    background: var(--accent-subtle);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    margin-bottom: 48px;
}

.compat-notice-icon {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.compat-notice strong {
    display: block;
    margin-bottom: 4px;
}

.compat-notice p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
}

.compat-manufacturer {
    margin-bottom: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    transition: border-color 0.3s ease;
}

.compat-manufacturer:hover {
    border-color: var(--accent);
}

.compat-mfr-header {
    padding: 24px 28px;
    position: relative;
}

.compat-mfr-header--supported {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
}

.compat-mfr-header--partial {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
}

.compat-mfr-header--unsupported {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
}

.compat-mfr-header--unverified {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
}

.compat-mfr-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.compat-mfr-header p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: 0;
}

.compat-mfr-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.compat-mfr-badge--supported {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.compat-mfr-badge--partial {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.compat-mfr-badge--no {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.compat-mfr-badge--unverified {
    background: var(--accent-subtle);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.compat-table-wrap {
    overflow-x: auto;
}

.compat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.compat-table thead th {
    padding: 12px 28px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.compat-table tbody td {
    padding: 12px 28px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.compat-table tbody tr:last-child td {
    border-bottom: none;
}

.compat-table tbody tr:hover {
    background: var(--accent-subtle);
}

.compat-table tbody td:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

.compat-table code {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--accent);
}

.compat-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.compat-status--yes {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.compat-status--partial {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.compat-status--no {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.compat-status--unverified {
    background: var(--accent-subtle);
    color: var(--accent);
}

.compat-mfr-footer {
    padding: 14px 28px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-light);
}

.compat-mfr-footer--warn {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--warning);
}

.compat-mfr-footer--warn svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.compat-mfr-footer .compat-pct {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--success);
}

/* Recommended device cards */
.compat-rec-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.compat-rec-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s ease;
}

.compat-rec-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.compat-rec-card--primary {
    border-color: var(--accent);
    background: linear-gradient(180deg, var(--accent-subtle) 0%, var(--bg-card) 40%);
    box-shadow: 0 0 0 1px var(--accent), 0 8px 30px rgba(99, 102, 241, 0.12);
}

.compat-rec-rank {
    display: inline-block;
    padding: 3px 12px;
    background: var(--accent-subtle);
    border: 1px solid var(--accent);
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.compat-rec-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.compat-rec-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.compat-rec-price {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 600;
}

@media (max-width: 1024px) {
    .compat-rec-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .compat-table thead th,
    .compat-table tbody td {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .compat-mfr-header {
        padding: 20px;
    }

    .compat-mfr-footer {
        padding: 12px 20px;
    }
}

/* ---------- Known Issues Page ---------- */
.issues-table td:first-child {
    min-width: 240px;
}

.issues-table td:first-child strong {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.issue-desc {
    display: block;
    font-size: 0.82rem;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.issue-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.issue-status--investigating {
    background: var(--accent-subtle);
    color: var(--accent);
}

.issue-status--inprogress {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.issue-status--workaround {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.issue-status--fixed {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    font-family: var(--font-mono);
}

.issue-reporter {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

@media (max-width: 768px) {
    .issues-table thead th:nth-child(4),
    .issues-table tbody td:nth-child(4) {
        display: none;
    }
}

@media (max-width: 480px) {
    .issues-table thead th:nth-child(5),
    .issues-table tbody td:nth-child(5) {
        display: none;
    }
}

@media (max-width: 480px) {
    .compat-table thead th:last-child,
    .compat-table tbody td:last-child {
        display: none;
    }

    .compat-table thead th,
    .compat-table tbody td {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* ---------- Bug Report Page ---------- */
.bug-banner {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 24px;
    border-radius: var(--radius-md);
}

.bug-banner--warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid var(--warning);
}

.bug-banner--info {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid var(--accent);
    margin-top: 16px;
}

.bug-banner--info .bug-banner-icon,
.bug-banner--info strong {
    color: var(--accent);
}

.bug-banner--info a {
    color: var(--accent);
    text-decoration: underline;
    font-weight: 500;
}

.bug-banner--info a:hover {
    opacity: 0.8;
}

.bug-banner-icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--warning);
}

.bug-banner strong {
    display: block;
    margin-bottom: 4px;
    color: var(--warning);
}

.bug-banner p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
}

.bug-tips {
    margin-top: 48px;
    padding: 28px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.bug-tips h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
}

.bug-tips h3 svg {
    flex-shrink: 0;
}

.bug-tips ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bug-tips li {
    padding-left: 20px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

.bug-tips li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
    font-family: var(--font-mono);
}

.bug-debug-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    background: var(--accent-subtle);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.bug-debug-info svg {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

/* Nav Bug Report Button */
.nav-bugreport {
    background: rgba(245, 158, 11, 0.12) !important;
    color: var(--warning) !important;
    border-radius: var(--radius-sm) !important;
    padding: 6px 16px !important;
    font-weight: 600 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.nav-bugreport:hover {
    background: rgba(245, 158, 11, 0.2) !important;
    color: var(--warning) !important;
}

/* ---------- Report CTA Banner ---------- */
.compat-report-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    background: linear-gradient(135deg, var(--accent-subtle) 0%, rgba(139, 92, 246, 0.06) 100%);
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    margin-bottom: 48px;
}

.compat-report-cta-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.compat-report-cta-content svg {
    color: var(--accent);
    flex-shrink: 0;
}

.compat-report-cta-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.compat-report-cta-content p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: 0;
}

@media (max-width: 768px) {
    .compat-report-cta {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .compat-report-cta-content {
        flex-direction: column;
    }
}

/* ---------- Report Page ---------- */
.report-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.report-step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.report-step:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.report-step-number {
    width: 36px;
    height: 36px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 auto 16px;
}

.report-step-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.report-step-content p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* Report Form */
.report-form {
    max-width: 740px;
    margin: 0 auto;
}

.report-form-section {
    margin-bottom: 8px;
    margin-top: 32px;
}

.report-form-section:first-child {
    margin-top: 0;
}

.report-form-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.report-form-section h3 svg {
    flex-shrink: 0;
}

.report-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 16px;
}

.report-field {
    margin-top: 16px;
}

.report-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.report-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.92rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.report-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.report-input::placeholder {
    color: var(--text-tertiary);
}

select.report-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.report-textarea {
    resize: vertical;
    min-height: 100px;
}

.report-textarea--code {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.7;
    white-space: pre;
    overflow-x: auto;
}

/* Radio buttons */
.report-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.report-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.report-radio:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.report-radio input[type="radio"] {
    display: none;
}

.report-radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.report-radio input[type="radio"]:checked ~ .report-radio-custom {
    border-color: var(--accent);
}

.report-radio input[type="radio"]:checked ~ .report-radio-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.report-radio:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-subtle);
    color: var(--text-primary);
}

/* Upload area */
.report-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 24px;
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
}

.report-upload:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.report-upload svg {
    color: var(--text-tertiary);
}

.report-upload p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.report-upload span {
    color: var(--text-tertiary);
    font-size: 0.78rem;
}

.report-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.report-upload-preview {
    position: relative;
    margin-top: 12px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    max-width: 300px;
}

.report-upload-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.report-upload-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.report-upload-remove:hover {
    background: var(--danger);
}

/* Multi-file preview grid (bug report) */
.report-upload-previews {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.report-upload-preview-item {
    position: relative;
    width: 140px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-alt);
}

.report-upload-preview-item img {
    display: block;
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.report-upload-preview-name {
    display: block;
    padding: 6px 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-upload-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s;
}

.report-upload-preview-remove:hover {
    background: var(--danger);
}

/* Radio validation error highlight */
.report-field--error {
    animation: fieldShake 0.4s ease;
}

.report-field--error .report-radio-group {
    border: 2px solid var(--danger);
    border-radius: var(--radius-md);
    padding: 8px;
}

@keyframes fieldShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Form actions */
.report-form-actions {
    margin-top: 32px;
    text-align: center;
}

.report-form-note {
    margin-top: 16px;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* ---------- Form Feedback ---------- */
.form-feedback {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: left;
}

.form-feedback--success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #22c55e;
}

.form-feedback--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

.form-feedback svg {
    flex-shrink: 0;
}

.form-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .report-steps {
        grid-template-columns: 1fr 1fr;
    }

    .report-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .report-steps {
        grid-template-columns: 1fr;
    }
}

/* ---------- Scroll Animations ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Selection & Scrollbar ---------- */
::selection {
    background: var(--accent);
    color: white;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ====================================================
   BUY ME A COFFEE PULL-OUT WIDGET
   ==================================================== */

/* Attention pulse on first load — fires 3 times then stops */
@keyframes bmc-pulse {
    0%, 100% { box-shadow: -4px 0 16px rgba(245, 158, 11, 0.25), -2px 0 8px rgba(0, 0, 0, 0.2); }
    50%       { box-shadow: -8px 0 28px rgba(245, 158, 11, 0.5), -4px 0 12px rgba(0, 0, 0, 0.3); }
}

.bmc-widget {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 998;
    display: flex;
    align-items: stretch;
}

/* ---- Pull-out Tab ---- */
.bmc-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 11px;
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    border: none;
    border-radius: 14px 0 0 14px;
    cursor: pointer;
    color: #1a0800;
    box-shadow: -4px 0 16px rgba(245, 158, 11, 0.25), -2px 0 8px rgba(0, 0, 0, 0.2);
    transition: background 0.2s ease, box-shadow 0.2s ease;
    animation: bmc-pulse 2s ease-in-out 1.2s 3;
    flex-shrink: 0;
    /* Mobile: eliminate 300ms tap delay and iOS highlight flash */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.bmc-tab:hover {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: -6px 0 22px rgba(245, 158, 11, 0.4), -3px 0 10px rgba(0, 0, 0, 0.25);
}

.bmc-tab-svg {
    flex-shrink: 0;
    color: #1a0800;
}

.bmc-tab-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--font-sans);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #1a0800;
    line-height: 1;
    user-select: none;
}

/* ---- Slide-out Panel ---- */
.bmc-panel {
    width: 0;
    overflow: hidden;
    transition: width 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 14px 0 0 14px;
    box-shadow: var(--shadow-xl);
    /* Cap height so panel never exceeds the viewport */
    max-height: calc(100vh - 40px);
}

.bmc-widget.open .bmc-panel {
    width: 284px;
}

.bmc-panel-inner {
    width: 284px;
    padding: 22px 20px 18px;
    position: relative;
    overflow-y: auto;
    max-height: calc(100vh - 40px);
    -webkit-overflow-scrolling: touch; /* smooth momentum scroll on iOS */
}

/* Amber accent bar along the top of the panel */
.bmc-panel-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    border-radius: 14px 0 0 0;
}

/* ---- Close Button ---- */
.bmc-panel-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    transition: all 0.2s ease;
}

.bmc-panel-close:hover {
    background: var(--border);
    color: var(--text-primary);
}

/* ---- Panel Header ---- */
.bmc-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-top: 8px;
    padding-right: 32px; /* room for close button */
}

.bmc-panel-icon-wrap {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-md);
    color: #f59e0b;
    flex-shrink: 0;
}

.bmc-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px;
    line-height: 1.2;
}

.bmc-panel-subtitle {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin: 0;
    font-weight: 500;
}

/* ---- Body Content ---- */
.bmc-panel-text {
    font-size: 0.81rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0 0 14px;
}

.bmc-panel-list {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.bmc-panel-list li {
    font-size: 0.79rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 9px;
}

.bmc-panel-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f59e0b;
    flex-shrink: 0;
}

/* ---- BMC Button ---- */
.bmc-panel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background: #FFDD00;
    color: #000000;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    margin-bottom: 10px;
    border: none;
}

.bmc-panel-btn:hover {
    background: #ffe433;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 221, 0, 0.35);
    color: #000000;
}

.bmc-panel-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ---- Footer Note ---- */
.bmc-panel-note {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    text-align: center;
    margin: 0;
}

/* ---- Light theme overrides ---- */
[data-theme="light"] .bmc-panel {
    box-shadow: var(--shadow-lg);
}

[data-theme="light"] .bmc-panel-icon-wrap {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.08) 100%);
}

/* ---- Drag handle (shown only inside mobile bottom sheet) ---- */
.bmc-drag-handle {
    display: none;
    width: 40px;
    height: 4px;
    background: var(--text-tertiary);
    border-radius: 2px;
    margin: 10px auto 16px;
    flex-shrink: 0;
    opacity: 0.5;
}

/* ---- Backdrop (mobile only) ---- */
.bmc-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 997; /* just below widget at 998 */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.bmc-backdrop.visible {
    opacity: 1;
    pointer-events: all;
}

/* ====================================================
   MOBILE: FAB + BOTTOM SHEET
   On <=768px the pull-out tab becomes a circular FAB
   and the panel slides up as a bottom sheet.
   ==================================================== */
@media (max-width: 768px) {

    /* Show backdrop and drag handle */
    .bmc-backdrop { display: block; }
    .bmc-drag-handle { display: block; }

    /* --- FAB container --- */
    .bmc-widget {
        top: auto;
        bottom: 24px;
        right: 16px;
        transform: none;
        flex-direction: column;
        align-items: flex-end;
    }

    /* --- Circular FAB button --- */
    .bmc-tab {
        width: 58px;
        height: 58px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5), 0 2px 8px rgba(0, 0, 0, 0.35);
    }

    .bmc-tab-label { display: none; }

    .bmc-tab-svg {
        width: 26px;
        height: 26px;
    }

    /* --- Bottom sheet panel --- */
    .bmc-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: auto !important;
        transform: translateY(calc(100% + 2px));
        transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 20px 20px 0 0;
        border: none;
        border-top: 1px solid var(--border);
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45);
        max-height: 85vh;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bmc-widget.open .bmc-panel {
        width: auto !important;
        transform: translateY(0);
    }

    /* Hide amber accent bar — drag handle replaces it */
    .bmc-panel-inner::before { display: none; }

    .bmc-panel-inner {
        width: 100% !important;
        max-width: 540px;
        margin: 0 auto;
        padding: 2px 20px 40px;
        overflow-y: visible;
        max-height: none;
    }

    /* Shift close button down slightly to clear the drag handle */
    .bmc-panel-close {
        top: 20px;
    }
}


/* ============================================
   SEARCH
   ============================================ */

/* ---------- Search Toggle Button ---------- */
.search-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.search-toggle:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- Search Overlay ---------- */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.search-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ---------- Search Modal ---------- */
.search-modal {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    width: min(680px, calc(100vw - 32px));
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 1101;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    overflow: hidden;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.search-modal.open {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ---------- Search Input Header ---------- */
.search-modal-header {
    padding: 4px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-input-wrap > svg {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
    padding: 16px 0;
    min-width: 0;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-input::-webkit-search-cancel-button {
    display: none;
}

.search-kbd {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ---------- Search Body ---------- */
.search-results {
    overflow-y: auto;
    overscroll-behavior: contain;
    flex: 1;
    min-height: 0;
}

.search-empty,
.search-no-results {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.search-no-results {
    display: none;
}

/* ---------- Search Result Items ---------- */
.search-result {
    display: block;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    transition: background 0.15s ease;
    cursor: pointer;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result:hover,
.search-result:focus {
    background: var(--accent-subtle);
    outline: none;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.search-result-tag {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: var(--accent-subtle);
    padding: 2px 7px;
    border-radius: 4px;
    line-height: 1.5;
}

.search-result-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
    line-height: 1.4;
}

.search-result-excerpt {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Search Footer Hint ---------- */
.search-footer {
    padding: 8px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.search-footer-hint {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-footer-hint kbd {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1px 5px;
}

/* ---------- Mobile Search ---------- */
@media (max-width: 768px) {
    .search-modal {
        top: 64px;
        width: calc(100vw - 24px);
        border-radius: var(--radius-md);
        max-height: calc(100dvh - 80px);
    }

    .search-kbd {
        display: none;
    }
}
