/* Base Variables & Theme */
:root {
    --primary: #990000;
    --primary-hover: #b30000;
    --primary-light: #fff0f0;
    --dark: #0f172a;
    --dark-muted: #475569;
    --light: #f8fafc;
    --border: #e2e8f0;
    --success: #10b981;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-bg-solid: #ffffff;
    --text: #1e293b;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.85);
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary: #ff4d4d;
        --primary-hover: #ff6666;
        --primary-light: rgba(255, 77, 77, 0.15);
        --dark: #f8fafc;
        --dark-muted: #94a3b8;
        --light: #0f172a;
        --border: #1e293b;
        --success: #34d399;
        --card-bg: rgba(30, 41, 59, 0.7);
        --card-bg-solid: #1e293b;
        --text: #cbd5e1;
        --glass-border: rgba(255, 255, 255, 0.05);
        --glass-bg: rgba(15, 23, 42, 0.85);
        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--light);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 15% 50%, rgba(153, 0, 0, 0.03), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.03), transparent 25%);
    background-attachment: fixed;
}

@media (prefers-color-scheme: dark) {
    body {
        background-image: radial-gradient(circle at 15% 50%, rgba(255, 77, 77, 0.05), transparent 25%),
            radial-gradient(circle at 85% 30%, rgba(52, 211, 153, 0.05), transparent 25%);
    }
}

h1,
h2,
h3,
h4,
h5 {
    overflow-wrap: break-word;
    word-break: break-word;
    font-family: 'Playfair Display', serif;
    color: var(--dark);
    line-height: 1.2;
}

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

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 2rem;
    }
}

/* Header & Nav */
header {
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background-color: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    transition: var(--transition);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--dark);
    font-weight: 700;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
}

@media (min-width: 480px) {
    .logo-group {
        font-size: 1.25rem;
    }
}

.logo-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    object-fit: contain;
    box-shadow: 0 4px 10px rgba(153, 0, 0, 0.25);
}

nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

nav a {
    color: var(--dark-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

nav a:hover,
nav a.active {
    color: var(--primary);
}

.btn-nav {
    background-color: var(--primary);
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    transition: var(--transition);
}

.btn-nav:hover {
    background-color: var(--primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(153, 0, 0, 0.3);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: var(--transition);
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--dark);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 860px) {
    .nav-toggle {
        display: flex;
    }

    nav {
        display: none;
        position: fixed;
        top: 4.5rem;
        left: 0;
        right: 0;
        background-color: var(--card-bg-solid);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 0;
        z-index: 99;
        box-shadow: var(--shadow-lg);
    }

    nav.open {
        display: flex;
    }

    nav a {
        padding: 1rem 1.5rem;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--border);
    }

    nav a:last-child {
        border-bottom: none;
    }

    .btn-nav {
        margin: 0.75rem 1.5rem;
        text-align: center;
    }
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    color: var(--dark-muted);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-btn:hover,
.nav-dropdown:hover .dropdown-btn {
    color: var(--primary);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--card-bg-solid);
    min-width: 160px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    z-index: 101;
    padding: 0.5rem 0;
    margin-top: 1rem;
}

/* Invisible bridge so hover doesn't break */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 1rem;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
    border-bottom: none;
}

.dropdown-content a:hover,
.dropdown-content a.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

@media (max-width: 860px) {
    .nav-dropdown,
    .dropdown-content,
    .nav-dropdown:hover .dropdown-content,
    .nav-dropdown:active .dropdown-content {
        display: contents !important;
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }
    .dropdown-btn {
        display: none !important;
    }
    .nav-dropdown::after {
        display: none !important;
    }
    .dropdown-content a {
        padding: 1rem 1.5rem !important;
        font-size: 1.05rem !important;
        color: var(--dark-muted) !important;
        border-bottom: 1px solid var(--border) !important;
        font-weight: 500 !important;
        white-space: normal !important;
    }
    .dropdown-content a:hover,
    .dropdown-content a.active {
        background-color: transparent !important;
        color: var(--primary) !important;
    }
}

/* Base Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    background-color: var(--primary);
    color: white !important;
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(153, 0, 0, 0.35);
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(153, 0, 0, 0.45);
}

.btn-primary svg {
    fill: currentColor;
    width: 1.25rem;
    height: 1.25rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    background-color: var(--glass-bg);
    color: var(--dark) !important;
    border: 1px solid var(--border);
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    border-color: var(--dark-muted);
    transform: translateY(-2px);
    background-color: var(--card-bg-solid);
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --- HERO SECTION --- */
.hero {
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero {
        padding: 6rem 0;
    }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 968px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        text-align: left;
    }
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
}

.hero-content h1 span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.hero-content h1 span::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    height: 8px;
    background-color: var(--primary-light);
    z-index: -1;
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--dark-muted);
    margin-bottom: 2.5rem;
    max-width: 540px;
    margin-inline: auto;
}

@media (min-width: 968px) {
    .hero-content p {
        margin-inline: 0;
    }
}

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

@media (min-width: 968px) {
    .hero-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

.hero-visual {
    position: relative;
    perspective: 1000px;
}

.hero-mockup {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hero-mockup:hover {
    transform: rotateY(0) rotateX(0) scale(1.02);
}

@media (max-width: 968px) {
    .hero-mockup {
        transform: none;
        margin: 0 auto;
        max-width: 500px;
    }

    .hero-mockup:hover {
        transform: translateY(-5px);
    }
}

.browser-header {
    background-color: var(--light);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.browser-dots {
    display: flex;
    gap: 0.375rem;
}

.browser-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
}

.browser-dot.red {
    background: #ef4444;
}

.browser-dot.yellow {
    background: #f59e0b;
}

.browser-dot.green {
    background: #10b981;
}

/* --- SHOWCASE / FEATURES --- */
.showcase-section {
    padding: 4rem 0;
    background-color: var(--card-bg-solid);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--dark-muted);
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 6rem;
}

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

@media (min-width: 900px) {
    .feature-row {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .feature-row.reverse .feature-text {
        order: 2;
    }

    .feature-row.reverse .feature-media {
        order: 1;
    }
}

.feature-text h3 {
    font-size: clamp(1.25rem, 4.5vw, 1.75rem);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.feature-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    letter-spacing: 0.5px;
}

.feature-text p {
    font-size: 1.1rem;
    color: var(--dark-muted);
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.feature-list svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: var(--success);
    flex-shrink: 0;
}

.feature-media {
    position: relative;
}

/* --- VIDEO LIGHTBOX OVERLAY ---
   Videos render as thumbnails in the feature rows.
   Hovering over a .video-zoom-wrap opens a large fixed overlay via JS.
   The overlay closes when the mouse leaves it OR when Escape is pressed.
*/
.video-zoom-wrap {
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
}

.video-zoom-wrap video,
.video-zoom-wrap img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    border: none;
    pointer-events: none;
    /* JS handles interaction on the wrapper */
}

/* Hint badge */
.video-zoom-wrap::after {
    content: '▶ Click to expand';
    position: absolute;
    bottom: 0.6rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.72rem;
    font-family: 'Inter', sans-serif;
    padding: 0.25rem 0.6rem;
    border-radius: 0.375rem;
    pointer-events: none;
    backdrop-filter: blur(4px);
    transition: opacity 0.2s;
}

/* --- LIGHTBOX PANEL (injected by JS) --- */
#video-lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    /* Positioned so the expanded video floats near the thumbnail.
       Exact position is set by JS based on the thumbnail’s location. */
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    pointer-events: auto;
    animation: lb-open 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#video-lightbox video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

/* Dim backdrop */
#video-lightbox-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: lb-fade 0.25s ease forwards;
}

@keyframes lb-open {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes lb-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Standalone video/img without the zoom wrapper (e.g. cloud sync card) */
.feature-media>video,
.feature-media>img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    background-color: var(--card-bg-solid);
}

.feature-media::before {
    content: '';
    position: absolute;
    inset: -10px;
    z-index: -1;
    background: linear-gradient(45deg, var(--primary-light), transparent);
    border-radius: 1rem;
    opacity: 0.5;
    filter: blur(20px);
}

/* --- COMMUNITY & REVIEWS SECTION --- */
.community-section {
    padding: 6rem 0;
    background-color: var(--card-bg-solid);
    border-top: 1px solid var(--border);
}

.ao3-highlight-card {
    background: var(--light);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 3rem;
    margin: 0 auto 4rem;
    max-width: 800px;
    box-shadow: var(--shadow-lg);
    position: relative;
    text-align: center;
}

.ao3-quote-icon {
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.ao3-quote-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

.ao3-highlight-card blockquote {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--dark);
    margin: 1rem 0 2rem;
    line-height: 1.6;
}

.ao3-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: left;
}

.ao3-avatar {
    width: 3rem;
    height: 3rem;
    background: #990000;
    /* AO3 Red */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.ao3-author strong {
    display: block;
    color: var(--dark);
    font-size: 1.1rem;
}

.ao3-author span {
    color: var(--dark-muted);
    font-size: 0.9rem;
}

.reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.review-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.review-stars {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.platform-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
}

.platform-badge.gumroad {
    background: rgba(255, 144, 222, 0.2);
    color: #c43290;
}

.platform-badge.firefox {
    background: rgba(255, 113, 57, 0.2);
    color: #d64a1a;
}

.platform-badge.chrome {
    background: rgba(66, 133, 244, 0.2);
    color: #2a6acb;
}

.review-text {
    font-size: 1.05rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.5;
}

.review-author {
    font-size: 0.9rem;
    color: var(--dark-muted);
    font-weight: 500;
}

.summary-card {
    text-align: center;
}

.summary-card .review-header {
    margin-bottom: 1rem;
    flex-direction: row;
    gap: 0.5rem;
    display: flex;
}

.summary-card .review-text {
    margin-bottom: 0.5rem;
    flex-grow: 0;
}

.summary-card .review-subtext {
    font-size: 0.85rem;
    color: var(--dark-muted);
}

/* --- SUPPORT / PRO SECTION --- */
.pro-section {
    padding: 6rem 0;
    background-color: var(--light);
    text-align: center;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.pro-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-xl);
}

.pro-card h2 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    margin-bottom: 1rem;
}

.pro-card p {
    font-size: 1.15rem;
    color: var(--dark-muted);
    margin-bottom: 2rem;
}

.pro-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: left;
    margin-bottom: 2.5rem;
}

@media (min-width: 560px) {
    .pro-features {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

.pro-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.pro-item svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: var(--primary);
    flex-shrink: 0;
}

.pro-item span {
    font-size: 1.05rem;
    font-weight: 500;
}

/* --- GUIDES & MANUALS LAYOUT --- */
.page-hero {
    background-color: var(--card-bg-solid);
    border-bottom: 1px solid var(--border);
    padding: 2.5rem 0 2rem;
}

@media (min-width: 768px) {
    .page-hero {
        padding: 4rem 0 3rem;
    }
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--dark-muted);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.guide-layout {
    padding: 2.5rem 0 3rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: start;
}

@media (min-width: 968px) {
    .guide-layout {
        grid-template-columns: 1fr 260px;
        gap: 4rem;
    }

    .toc-sidebar {
        display: block;
    }
}

.toc-sidebar {
    display: none;
    position: sticky;
    top: 6rem;
    background-color: var(--card-bg-solid);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.toc-sidebar h4 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dark-muted);
    margin-bottom: 1rem;
}

.toc-sidebar ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-sidebar a {
    color: var(--dark-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
    display: block;
    padding: 0.25rem 0;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
}

.toc-sidebar a:hover {
    color: var(--primary);
    border-left-color: var(--primary);
}

.guide-content p {
    font-size: 1.05rem;
    color: var(--dark-muted);
    margin-bottom: 1.5rem;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3.5rem 0;
}

.guide-section {
    margin-bottom: 3.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background-color: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.guide-section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.75rem 0 0.75rem;
}

.guide-section ul,
.guide-section ol {
    padding-left: 1.5rem;
    color: var(--dark-muted);
    margin-bottom: 1.5rem;
}

.guide-section li {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.callout {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}

.callout-tip {
    background-color: var(--primary-light);
    border-color: var(--primary);
}

.callout-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.callout-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.callout-body>strong {
    display: block;
    font-size: 0.95rem;
    color: var(--dark);
    margin-bottom: 0.35rem;
}

.callout-body p {
    font-size: 0.9rem;
    color: var(--dark-muted);
    margin: 0;
}

.figure {
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background-color: var(--card-bg-solid);
}

.figure figcaption {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    color: var(--dark-muted);
    font-style: italic;
    border-top: 1px solid var(--border);
    background-color: var(--light);
}

.step-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0;
}

.step-list li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin: 0;
    font-size: 1.05rem;
}

.step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

pre code {
    display: block;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    overflow-x: auto;
    background: var(--card-bg-solid);
    border: 1px solid var(--border);
    font-family: monospace;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.manuals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .manuals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.manual-card {
    background: var(--card-bg-solid);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
}

.manual-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.manual-card svg {
    width: 2.5rem;
    height: 2.5rem;
    fill: var(--primary);
    margin-bottom: 1rem;
}

.manual-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.manual-card p {
    color: var(--dark-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.manual-card span {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- PRIVACY POLICY SPECIFICS --- */
main.container {
    padding-block: 4rem 6rem;
    /* only overrides vertical — horizontal comes from .container */
}

main.container h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    color: var(--dark);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

main.container .last-updated {
    color: var(--dark-muted);
    font-size: 0.9rem;
    margin-bottom: 3rem;
    display: block;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

main.container h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    color: var(--dark);
    margin: 2.5rem 0 1rem;
}

main.container p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

main.container ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

main.container li {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.highlight-card {
    background-color: var(--card-bg-solid);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.highlight-card h3 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-size: 1.15rem;
}

.highlight-card p {
    margin-bottom: 0;
    font-size: 1rem;
    color: var(--text);
}

/* --- FOOTER --- */
footer {
    background-color: var(--dark);
    color: #94a3b8;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    margin-top: auto;
}

@media (prefers-color-scheme: dark) {
    footer {
        background-color: #0b0f19;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 560px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (min-width: 900px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 4rem;
    }
}

.footer-about h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.footer-about p {
    max-width: 320px;
    line-height: 1.6;
}

.footer-links h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: white;
}

/* ===========================================
   MOBILE OVERRIDES (max 600px)
   =========================================== */
@media (max-width: 600px) {

    /* --- Base --- */
    .container {
        padding: 0 1rem;
    }

    /* --- Hero --- */
    .hero {
        padding: 2.5rem 0 2rem;
    }

    /* --- Feature section --- */
    .showcase-section {
        padding: 2.5rem 0;
    }

    .feature-row {
        margin-bottom: 3rem;
        gap: 1.5rem;
    }

    .feature-text p {
        font-size: 1rem;
    }

    .feature-list li {
        font-size: 0.95rem;
    }

    /* Badge next to h3: break to its own line on very narrow screens */
    .feature-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.55rem;
    }

    /* --- PRO section --- */
    .pro-section {
        padding: 3rem 0;
    }

    .pro-card {
        padding: 2rem 1.25rem;
        border-radius: 1rem;
    }

    .pro-card p {
        font-size: 1rem;
    }

    .pro-item span {
        font-size: 0.95rem;
    }

    /* --- Section headers --- */
    .section-header {
        margin-bottom: 2.5rem;
    }

    /* --- Manuals grid --- */
    .manuals-grid {
        grid-template-columns: 1fr;
        margin-top: 0px;
        padding: 0px 12px;
    }

    /* --- Guide layout (sync guide / manuals) --- */
    .guide-layout {
        padding: 2rem 0 3rem;
        gap: 1.5rem;
    }

    .guide-section {
        margin-bottom: 2rem;
    }

    .guide-section li,
    .guide-section p,
    .step-list li {
        font-size: 0.95rem;
    }

    /* --- Privacy policy main --- */
    main.container {
        padding-block: 2rem 4rem;
    }

    main.container p,
    main.container li {
        font-size: 1rem;
    }

    main.container h2 {
        font-size: 1.4rem;
        margin: 2rem 0 0.75rem;
    }

    /* --- Footer --- */
    footer {
        padding: 2.5rem 0 1.5rem;
    }

    .footer-grid {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding-top: 1.25rem;
    }

    .footer-bottom p {
        font-size: 0.8rem;
    }
}

/* --- RELEASES STYLES --- */
.release-major-group {
    margin-bottom: 3rem;
    background: var(--card-bg-solid);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.release-major-title {
    background: var(--light);
    padding: 1.5rem 2rem;
    font-size: 1.5rem;
    margin: 0;
    border-bottom: 1px solid var(--border);
    font-family: 'Playfair Display', serif;
    color: var(--primary);
}

.release-minor-list {
    display: flex;
    flex-direction: column;
}

.release-block {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.release-block:last-child {
    border-bottom: none;
}

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

.release-version {
    font-size: 1.25rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    margin: 0;
}

.release-date {
    font-size: 0.9rem;
    color: var(--dark-muted);
    font-weight: 500;
}

.release-features {
    list-style-type: disc;
    padding-left: 1.5rem;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.release-features li {
    font-size: 1.05rem;
}

/* --- INSTALL MODAL --- */
#install-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: lb-fade 0.25s ease forwards;
}

#install-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--card-bg-solid);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    text-align: center;
    opacity: 0;
    animation: install-open 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes install-open {
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

#install-modal h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

#install-modal p {
    color: var(--dark-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.install-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-install-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-chrome {
    background-color: #4285F4;
    color: white !important;
}

.btn-chrome:hover {
    background-color: #3367D6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.btn-firefox {
    background-color: #FF7139;
    color: white !important;
}

.btn-firefox:hover {
    background-color: #E25822;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 113, 57, 0.3);
}

.install-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-muted);
    line-height: 1;
}

.install-close:hover {
    color: var(--text);
}

/* --- SYNC PROVIDER MODAL --- */
#sync-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: lb-fade 0.25s ease forwards;
}

#sync-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--card-bg-solid);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    padding: 2rem;
    width: 90%;
    max-width: 520px;
    text-align: center;
    opacity: 0;
    animation: install-open 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#sync-modal h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

#sync-modal>p {
    color: var(--dark-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.sync-provider-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .sync-provider-options {
        grid-template-columns: 1fr;
    }
}

.sync-provider-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    background: var(--light);
}

.sync-provider-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--card-bg-solid);
}

.sync-provider-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.25rem;
}

.sync-provider-card strong {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    font-family: 'Inter', sans-serif;
}

.sync-provider-card span {
    font-size: 0.82rem;
    color: var(--dark-muted);
    text-align: center;
    line-height: 1.4;
}

.sync-provider-card em {
    font-style: normal;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 0.25rem;
}