/* ============================================
   LightTrailGPSPro Website - Mountain Theme
   HYBRID: Marketing Style + All Features
   ============================================ */

:root {
    color-scheme: light dark;

    /* Primary Colors - Morning Sky */
    --color-mountain-deep: #4A7BA7;
    --color-mountain-blue: #6B9DC7;
    --color-sky-dawn: #87CEEB;
    --color-sky-light: #E8F4FC;

    /* Accent Colors */
    --color-sunrise-orange: #E67E22;
    --color-sunrise-gold: #F4A942;
    --color-sunset-pink: #F5B7B1;

    /* Forest/Nature */
    --color-forest-deep: #1D4D2C;
    --color-forest-green: #2D6A3F;
    --color-trail-brown: #8B6914;

    /* Neutrals */
    --color-snow: #FAFBFC;
    --color-mist: #F0F3F7;
    --color-stone: #E2E8F0;
    --color-slate: #64748B;
    --color-rock: #334155;
    --color-night: #0F172A;

    /* Text */
    --color-text: #1E293B;
    --color-text-muted: #64748B;
    --color-text-light: #94A3B8;

    /* Gradients - Morning Sky (light blue to white) */
    --gradient-sky: linear-gradient(180deg, #5B9BD5 0%, #87CEEB 35%, #B8E0F7 65%, #E8F4FC 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(230, 126, 34, 0.3);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--color-text);
    background: var(--color-snow);
    line-height: 1.6;
}
h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-rock);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); }

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    transition: all var(--transition-base);
}
.nav.scrolled {
    background: rgba(91, 157, 213, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
}
.nav.scrolled .nav-logo { color: white; text-shadow: none; }
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-container.nav-centered {
    justify-content: center;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #1A3A5C;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}
.nav-logo.nav-logo-large {
    font-size: 1.75rem;
    gap: var(--space-md);
}
.nav-logo.nav-logo-large .logo-icon {
    font-size: 2rem;
}
.logo-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}
.logo-icon img {
    height: 2em;
    width: auto;
}
.nav-links { display: flex; align-items: center; gap: var(--space-xl); }
.nav-links a { color: #1A3A5C; font-weight: 500; font-size: 0.95rem; text-shadow: 0 1px 2px rgba(255,255,255,0.5); }
.nav-links a:hover { color: var(--color-sunrise-orange); }
.nav-cta {
    background: var(--color-sunrise-orange);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-weight: 600;
}
.nav-cta:hover { background: var(--color-sunrise-gold); color: white !important; }

/* Auth-state swap: default to anonymous nav; signed-in variant is hidden until the
   `is-signed-in` class is applied to <html> by the inline cookie check in <head>. */
.nav-auth { display: contents; }
.nav-auth-signed-in,
.footer-auth-signed-in { display: none; }
html.is-signed-in .nav-auth-anon,
html.is-signed-in .footer-auth-anon { display: none; }
html.is-signed-in .nav-auth-signed-in { display: block; position: relative; }
html.is-signed-in .footer-auth-signed-in { display: contents; }

.account-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.55);
    color: #1A3A5C;
    border: 1px solid rgba(26, 58, 92, 0.15);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.account-toggle:hover { background: var(--color-sunrise-orange); color: white; border-color: var(--color-sunrise-orange); }
.nav.scrolled .account-toggle { background: rgba(255, 255, 255, 0.2); color: white; border-color: rgba(255, 255, 255, 0.4); }
.nav.scrolled .account-toggle:hover { background: var(--color-sunrise-orange); border-color: var(--color-sunrise-orange); }
.account-avatar { font-size: 1rem; line-height: 1; }
.account-caret { font-size: 0.75rem; line-height: 1; }

.account-menu {
    position: absolute;
    top: calc(100% + var(--space-sm));
    right: 0;
    min-width: 220px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-sm) 0;
    display: flex;
    flex-direction: column;
    z-index: 1100;
}
.account-menu[hidden] { display: none; }
.account-menu a {
    display: block;
    padding: var(--space-sm) var(--space-lg);
    color: var(--color-text);
    font-size: 0.95rem;
    text-shadow: none;
}
.account-menu a:hover { background: var(--color-mist); color: var(--color-sunrise-orange); }

/* ============================================
   Hero Section (Compact)
   ============================================ */
.hero {
    position: relative;
    padding: 80px 0 60px;
    background: var(--gradient-sky);
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.mountain-layer {
    position: absolute;
    bottom: 0; left: 0; right: 0;
}
.mountain-back {
    height: 120px;
    background: linear-gradient(180deg, #A8C8E8 0%, #C5DCF0 100%);
    clip-path: polygon(0% 100%, 0% 60%, 10% 70%, 20% 40%, 30% 55%, 40% 25%, 50% 45%, 60% 20%, 70% 50%, 80% 30%, 90% 55%, 100% 35%, 100% 100%);
    opacity: 0.6;
}
.mountain-mid {
    height: 80px;
    background: linear-gradient(180deg, #7BA3C9 0%, #9FC5E8 100%);
    clip-path: polygon(0% 100%, 0% 70%, 15% 50%, 25% 65%, 35% 35%, 45% 55%, 55% 30%, 65% 50%, 75% 25%, 85% 45%, 100% 40%, 100% 100%);
    opacity: 0.8;
}
.mountain-front {
    height: 50px;
    background: linear-gradient(180deg, #5B8DB8 0%, #7BA3C9 100%);
    clip-path: polygon(0% 100%, 0% 60%, 20% 40%, 40% 60%, 60% 30%, 80% 55%, 100% 35%, 100% 100%);
}
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    width: 80%;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #1A3A5C;
    margin-bottom: var(--space-md);
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}
.hero-highlight {
    display: block;
    color: var(--color-sunrise-orange);
    -webkit-text-fill-color: var(--color-sunrise-orange);
}
.hero-tagline {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #1A3A5C;
    margin-bottom: var(--space-md);
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}
.hero-subtitle {
    font-size: 0.95rem;
    color: #2C5282;
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}
.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: all var(--transition-base);
}
.btn-primary {
    background: var(--color-sunrise-orange);
    color: white;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.btn-primary:hover { background: var(--color-sunrise-gold); transform: translateY(-2px); }
.btn-secondary {
    background: rgba(255,255,255,0.7);
    color: #1A3A5C;
    border: 2px solid rgba(26, 58, 92, 0.3);
}
.btn-secondary:hover { background: rgba(255,255,255,0.9); }

/* ============================================
   Features Grid (ALL FEATURES)
   ============================================ */
.features {
    padding: var(--space-3xl) 0;
    background: var(--color-snow);
}
.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}
.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, var(--color-mountain-deep), var(--color-sunrise-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

/* Feature Category Headers */
.feature-category {
    margin-bottom: var(--space-2xl);
}
.category-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-stone);
}
.category-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}
.category-icon img {
    width: 28px;
    height: 28px;
    filter: invert(25%) sepia(60%) saturate(600%) hue-rotate(180deg) brightness(0.9);
}
.category-title {
    font-size: 1.25rem;
    color: var(--color-mountain-deep);
    margin: 0;
}
.category-count {
    background: var(--color-sunrise-orange);
    color: white;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Feature Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-md);
}
.feature-card {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 1px solid var(--color-stone);
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-sunrise-orange);
}
.feature-icon {
    font-size: 1.75rem;
    margin-bottom: var(--space-sm);
    height: 32px;
    display: flex;
    align-items: center;
}
.feature-icon img {
    width: 32px;
    height: 32px;
    filter: invert(25%) sepia(60%) saturate(600%) hue-rotate(180deg) brightness(0.9);
}
.feature-title {
    font-size: 1rem;
    margin-bottom: var(--space-xs);
    color: var(--color-mountain-deep);
}
.feature-desc {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ============================================
   Detailed Sections
   ============================================ */
.details-section {
    padding: var(--space-3xl) 0;
    scroll-margin-top: 80px;
}
.details-section:nth-child(even) { background: var(--color-mist); }
.details-section:nth-child(odd) { background: white; }

/* Section with subtle tinted backgrounds */
.bg-forest {
    background: linear-gradient(180deg, #F0F7F2 0%, #E8F5EC 100%) !important;
    color: var(--color-text);
}
.bg-forest .section-title,
.bg-forest .detail-title { color: var(--color-forest-deep); -webkit-text-fill-color: var(--color-forest-deep); }
.bg-forest .detail-desc { color: var(--color-text-muted); }
.bg-forest .detail-list li::before { color: var(--color-forest-green); }
.bg-forest .data-table th { background: rgba(45, 106, 63, 0.1); color: var(--color-text); }
.bg-forest .data-table td { border-color: rgba(45, 106, 63, 0.15); }

.bg-mountain {
    background: linear-gradient(180deg, #EDF4F9 0%, #E3EEF6 100%) !important;
    color: var(--color-text);
}
.bg-mountain .section-title,
.bg-mountain .detail-title { color: var(--color-mountain-deep); -webkit-text-fill-color: var(--color-mountain-deep); }
.bg-mountain .detail-desc { color: var(--color-text-muted); }
.bg-mountain .detail-list li::before { color: var(--color-mountain-blue); }

/* Detail Block */
.detail-block {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-2xl);
    align-items: start;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--color-stone);
    scroll-margin-top: 180px;
}
.detail-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.detail-block.reverse { grid-template-columns: 300px 1fr; }
.detail-block.full-width { grid-template-columns: 1fr; }

/* Stacked screenshots on right side */
.detail-screenshots-stacked {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    width: 250px;
}

.detail-screenshots-stacked img {
    width: 100%;
    border-radius: var(--radius-md);
}
.detail-screenshot picture,
.detail-screenshots-dual picture,
.detail-screenshots-stacked picture,
.map-type-item picture {
    display: block;
    width: 100%;
}
.detail-block.reverse .detail-screenshot { order: -1; }

.detail-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}
.detail-icon {
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}
.detail-icon img {
    width: 28px;
    height: 28px;
    filter: invert(25%) sepia(60%) saturate(600%) hue-rotate(180deg) brightness(0.9);
}
.detail-title {
    font-size: 1.35rem;
    color: var(--color-mountain-deep);
    margin: 0;
}
.detail-desc {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
}
.data-table th, .data-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--color-stone);
}
.data-table th {
    background: var(--color-mist);
    font-weight: 600;
    color: var(--color-mountain-deep);
}

/* Detail Lists */
.detail-subsection { margin-bottom: var(--space-lg); }
.detail-subsection h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-sunrise-orange);
    margin-bottom: var(--space-sm);
}
.detail-list { list-style: none; }
.detail-list li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-xs);
    font-size: 0.95rem;
}
.detail-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-forest-green);
    font-weight: bold;
}

/* Steps */
.detail-steps {
    background: rgba(0,0,0,0.03);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}
.bg-forest .detail-steps { background: rgba(45, 106, 63, 0.05); }
.bg-mountain .detail-steps { background: rgba(74, 123, 167, 0.05); }
.detail-steps h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-sunrise-orange);
    margin-bottom: var(--space-md);
}
.detail-steps ol { list-style: none; counter-reset: steps; }
.detail-steps ol li {
    counter-increment: steps;
    position: relative;
    padding-left: var(--space-xl);
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
}
.detail-steps ol li::before {
    content: counter(steps);
    position: absolute;
    left: 0;
    width: 20px; height: 20px;
    background: var(--color-sunrise-orange);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Screenshot Placeholder */
.detail-screenshot {
    background: linear-gradient(135deg, var(--color-mist) 0%, var(--color-stone) 100%);
    border: 2px dashed var(--color-slate);
    border-radius: var(--radius-xl);
    aspect-ratio: 9/16;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    position: sticky;
    top: 100px;
    overflow: hidden;
}

/* Screenshot images - full image visible, container adapts to image size */
.detail-screenshot:has(img) {
    aspect-ratio: auto;  /* Container adapts to image */
    background: none;
    border: none;
    padding: 0;
}

.detail-screenshot img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
}

/* Video in detail screenshots */
.detail-screenshot video {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    display: block;
}

.detail-screenshot.detail-video {
    aspect-ratio: auto;
    background: none;
    border: none;
    padding: 0;
}
.bg-forest .detail-screenshot {
    background: rgba(45, 106, 63, 0.05);
    border-color: rgba(45, 106, 63, 0.15);
}
.bg-mountain .detail-screenshot {
    background: rgba(74, 123, 167, 0.05);
    border-color: rgba(74, 123, 167, 0.15);
}
.screenshot-icon { font-size: 2.5rem; opacity: 0.4; }
.screenshot-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-align: center;
}
.bg-forest .screenshot-label { color: var(--color-forest-green); }
.bg-mountain .screenshot-label { color: var(--color-mountain-blue); }

/* Wide screenshots for reports */
.detail-screenshot.wide {
    aspect-ratio: 16/10;
    position: static;
}

/* ============================================
   Stats Section
   ============================================ */
.stats {
    padding: var(--space-2xl) 0;
    background: linear-gradient(135deg, var(--color-mountain-deep), var(--color-mountain-blue));
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}
.stat-item { text-align: center; }
.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--color-sunrise-orange);
    line-height: 1;
    margin-bottom: var(--space-xs);
}
.stat-label { color: rgba(255,255,255,0.8); font-size: 0.9rem; }

/* ============================================
   Download Section
   ============================================ */
.download {
    padding: var(--space-3xl) 0;
    background: var(--color-night);
    text-align: center;
}
.download-title { font-size: 2rem; color: white; margin-bottom: var(--space-sm); }
.download-subtitle { font-size: 1.1rem; color: rgba(255,255,255,0.7); margin-bottom: var(--space-xl); }
.download-buttons { display: flex; gap: var(--space-lg); justify-content: center; flex-wrap: wrap; }
.store-btn {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    background: white;
    color: var(--color-night);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}
.store-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-xl); }
.store-icon { font-size: 1.5rem; }
.store-text { text-align: left; }
.store-label { display: block; font-size: 0.65rem; opacity: 0.7; text-transform: uppercase; }
.store-name { display: block; font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 600; }

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: var(--space-xl) 0;
    background: var(--color-night);
    color: rgba(255,255,255,0.6);
    border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: white;
}
.footer-links { display: flex; gap: var(--space-xl); }
.footer-links a:hover { color: var(--color-sunrise-orange); }
.footer-copy { font-size: 0.85rem; text-align: center; }
.footer-copy a { text-decoration: underline; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .detail-block { grid-template-columns: 1fr; }
    .detail-block.reverse { grid-template-columns: 1fr; }
    .detail-screenshot {
        max-width: 250px;
        margin: 0 auto;
        position: static;
    }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .features-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 1.75rem; }
}

/* ============================================
   Icon Reference Section
   ============================================ */
.icon-reference {
    background: linear-gradient(135deg, var(--color-mist) 0%, var(--color-stone) 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-2xl);
    text-align: center;
}
.icon-ref-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-mountain-deep);
    margin-bottom: var(--space-lg);
}
.icon-ref-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg);
}
.icon-ref-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    min-width: 70px;
}
.icon-ref-placeholder {
    width: 48px;
    height: 48px;
    background: white;
    border: 2px dashed var(--color-slate);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all var(--transition-base);
}
.icon-ref-placeholder:hover {
    border-color: var(--color-sunrise-orange);
    transform: scale(1.1);
}
.icon-ref-item span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
}
.icon-ref-note {
    margin-top: var(--space-md);
    font-size: 0.75rem;
    color: var(--color-text-light);
    font-style: italic;
}

/* ============================================
   Highlighted Feature Cards
   ============================================ */
.feature-category.featured {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.1) 0%, rgba(244, 169, 66, 0.1) 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    border: 2px solid var(--color-sunrise-orange);
}
.feature-card.highlight {
    border-color: var(--color-sunrise-orange);
    background: linear-gradient(135deg, white 0%, rgba(230, 126, 34, 0.05) 100%);
}
.feature-card.highlight:hover {
    border-color: var(--color-sunrise-gold);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(230, 126, 34, 0.2);
}

/* ============================================
   Dual Screenshots Layout
   ============================================ */
.detail-screenshots-dual {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.detail-screenshot.small {
    aspect-ratio: 9/12;
    position: static;
    min-height: 180px;
}
.detail-screenshot.small:has(img) {
    aspect-ratio: auto;
    min-height: auto;
}
.detail-block.reverse .detail-screenshots-dual { order: -1; }

/* Map Types Grid - 4 screenshots in a row */
.map-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.map-type-item {
    text-align: center;
}

.map-type-item img {
    width: 100%;
    border-radius: var(--radius-md);
}

.map-type-item span {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

@media (max-width: 600px) {
    .map-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Ruler Types Grid - 2 screenshots in a row */
.ruler-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 250px);
    gap: var(--space-md);
    margin-top: var(--space-lg);
    justify-content: center;
}

.ruler-type-item {
    text-align: center;
}

.ruler-type-item .ruler-label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.ruler-type-item img {
    width: 100%;
    border-radius: var(--radius-md);
}

@media (max-width: 550px) {
    .ruler-types-grid {
        grid-template-columns: 250px;
    }
}

/* Discovery Types Grid - 4 screenshots in a row */
.discovery-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.discovery-type-item {
    text-align: center;
}

.discovery-type-item .discovery-label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.discovery-type-item img {
    width: 100%;
    border-radius: var(--radius-md);
}

@media (max-width: 900px) {
    .discovery-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .discovery-types-grid {
        grid-template-columns: 1fr;
    }
}

/* Filter Types Grid - 2 screenshots in a row */
.filter-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 250px);
    gap: var(--space-md);
    margin-top: var(--space-lg);
    justify-content: center;
}

.filter-type-item img {
    width: 100%;
    border-radius: var(--radius-md);
}

@media (max-width: 600px) {
    .filter-types-grid {
        grid-template-columns: 250px;
    }
}

/* Report Types Grid - 2 larger screenshots */
.report-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 320px);
    gap: var(--space-md);
    margin-top: var(--space-lg);
    justify-content: center;
}

.report-type-item img {
    width: 100%;
    border-radius: var(--radius-md);
}

@media (max-width: 700px) {
    .report-types-grid {
        grid-template-columns: 300px;
    }
}

/* Triple Types Grid - 3 screenshots in a row */
.triple-types-grid {
    display: grid;
    grid-template-columns: repeat(3, 320px);
    gap: var(--space-md);
    margin-top: var(--space-lg);
    justify-content: center;
}

.triple-type-item img {
    width: 100%;
    border-radius: var(--radius-md);
}

@media (max-width: 1050px) {
    .triple-types-grid {
        grid-template-columns: repeat(2, 320px);
    }
}

@media (max-width: 700px) {
    .triple-types-grid {
        grid-template-columns: 320px;
    }
}

@media (max-width: 900px) {
    .detail-screenshots-dual {
        flex-direction: row;
        justify-content: center;
    }
    .detail-screenshot.small {
        max-width: 150px;
        min-height: 200px;
    }
    .detail-screenshot.small:has(img) {
        max-width: none;
        min-height: auto;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.5s ease forwards; }

/* ============================================
   Utility Classes
   ============================================ */
.reviewed {
    /* Review marker - no visual change */
}

.hidden {
    display: none;
}

/* ============================================
   Landing — Nav links
   ============================================ */
.nav .nav-links a.nav-cta { color: white; text-shadow: none; }
.nav.scrolled .nav-links a { color: white; text-shadow: none; }
.documentation-page .nav {
    background: rgba(91, 157, 213, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
}
.documentation-page .nav-logo,
.documentation-page .nav-links a {
    color: white;
    text-shadow: none;
}
.documentation-page .nav-links a[aria-current="page"] {
    color: var(--color-sunrise-gold);
}

/* ============================================
   Landing — Hero stores
   ============================================ */
.hero-stores {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}
.store-btn-compact {
    padding: var(--space-sm) var(--space-md);
    background: rgba(255,255,255,0.85);
}
.store-btn-compact .store-icon { font-size: 1.2rem; }
.store-btn-compact .store-name { font-size: 0.95rem; }

/* ============================================
   Landing — Highlights
   ============================================ */
.highlights {
    padding: var(--space-3xl) 0;
    background: var(--color-snow);
}
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-lg);
}
.highlight-card {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-stone);
    transition: all var(--transition-base);
}
.highlight-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-sunrise-orange);
}
.highlight-title {
    font-size: 1.1rem;
    color: var(--color-mountain-deep);
    margin: var(--space-sm) 0 var(--space-xs);
}
.highlight-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}
.highlights-cta {
    text-align: center;
    margin-top: var(--space-2xl);
}

/* ============================================
   Landing — Pricing
   ============================================ */
.pricing {
    padding: var(--space-3xl) 0;
    background: linear-gradient(180deg, #F0F7F2 0%, #E8F5EC 100%);
    scroll-margin-top: 80px;
}
.pricing .section-title { color: var(--color-forest-deep); -webkit-text-fill-color: var(--color-forest-deep); }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    max-width: 880px;
    margin: 0 auto;
}
.pricing-card {
    position: relative;
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-stone);
    display: flex;
    flex-direction: column;
}
.pricing-card-featured {
    border-color: var(--color-sunrise-orange);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(230, 126, 34, 0.15);
}
.pricing-badge {
    position: absolute;
    top: -12px;
    right: var(--space-lg);
    background: var(--color-sunrise-orange);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}
.pricing-plan {
    font-size: 1.4rem;
    color: var(--color-mountain-deep);
    margin-bottom: var(--space-xs);
}
.pricing-plan-summary {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
}
.pricing-features {
    list-style: none;
    margin-bottom: var(--space-lg);
    flex-grow: 1;
}
.pricing-features li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
    color: var(--color-text);
}
.pricing-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-forest-green);
    font-weight: 700;
}
.pricing-cta {
    align-self: stretch;
    justify-content: center;
}
.pricing-fineprint {
    margin-top: var(--space-md);
    font-size: 0.8rem;
    color: var(--color-text-light);
    line-height: 1.5;
}
.pricing-notes {
    max-width: 760px;
    margin: var(--space-2xl) auto 0;
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}
.pricing-notes h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-sunrise-orange);
    margin-bottom: var(--space-sm);
}
.pricing-account-links {
    text-align: center;
    margin-top: var(--space-xl);
    color: var(--color-text-muted);
    font-size: 0.95rem;
}
.pricing-account-link {
    color: var(--color-mountain-deep);
    font-weight: 600;
}
.pricing-account-link:hover { color: var(--color-sunrise-orange); }
.pricing-account-sep {
    margin: 0 var(--space-sm);
    color: var(--color-text-light);
}

/* ============================================
   Landing — Manual intro
   ============================================ */
.manual-intro {
    padding: var(--space-3xl) 0 var(--space-xl);
    background: var(--color-mist);
    scroll-margin-top: 80px;
}
.manual-intro .section-header { margin-bottom: 0; }
.documentation-page .manual-intro {
    padding-top: calc(var(--space-4xl) + 80px);
}

/* ============================================
   Landing — Download actions
   ============================================ */
.download-actions {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

/* ============================================
   Landing — Footer columns
   ============================================ */
.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: var(--space-xl);
    width: 100%;
    max-width: 720px;
    margin-top: var(--space-md);
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    text-align: left;
}
.footer-col-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: white;
    margin-bottom: var(--space-xs);
}
.footer-col a {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
}
.footer-col a:hover { color: var(--color-sunrise-orange); }

/* ============================================
   Landing — Responsive
   ============================================ */
@media (max-width: 768px) {
    /* Old rule hid all nav links on mobile; the landing nav keeps the auth CTAs visible
       and only collapses the in-page anchors. */
    .nav-links { display: flex; gap: var(--space-sm); align-items: center; }
    .nav-links a[href^="#"] { display: none; }
    .documentation-page .nav-links a[href="/"],
    .documentation-page .nav-links a[href="/#pricing"] { display: none; }
    .nav-logo span:not(.logo-icon) { font-size: 1.1rem; }

    .pricing-grid { grid-template-columns: 1fr; }
    .footer-nav { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .nav-logo span:not(.logo-icon) { display: none; }
    .nav-links { gap: var(--space-xs); }
    .nav-links a { font-size: 0.85rem; }
    .nav-cta { padding: var(--space-xs) var(--space-md); }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .hero-buttons .btn { justify-content: center; }
    .footer-nav { grid-template-columns: 1fr; text-align: center; }
    .footer-col { text-align: center; align-items: center; }
}

/* ============================================
   Dark mode
   Surface/text tokens are remapped so the bulk of the page (cards, sections,
   tables, lists that already use the variables) inherits dark backgrounds and
   light text for free. The hero gradient becomes a dusk-to-night sky, and the
   handful of elements that hardcode `white` / `#1A3A5C` are overridden below.
   Brand accents (sunrise orange, forest greens, mountain blues) keep their
   identity across both modes.
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --color-snow: #0e1620;
        --color-mist: #18222e;
        --color-stone: rgba(167, 189, 224, 0.16);
        --color-slate: rgba(167, 189, 224, 0.4);
        --color-rock: #cbd9ff;
        --color-text: #e6ecf3;
        --color-text-muted: #a3b1c6;
        --color-text-light: #7d8ba3;

        /* Dusk sky — keeps the same top-to-bottom horizon feel but in a navy
         * palette so it transitions cleanly into the dark sections below. */
        --gradient-sky: linear-gradient(180deg, #0c1c33 0%, #173455 35%, #244a78 65%, #34618f 100%);

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.45);
        --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.5);
        --shadow-xl: 0 20px 32px rgba(0, 0, 0, 0.55);
        --shadow-glow: 0 0 40px rgba(230, 126, 34, 0.35);
    }

    /* Headings — base.css uses var(--color-rock) which we've remapped, but the
     * h1-h4 default also gets a global lift so any inline-styled or unstyled
     * headings stay readable. */
    h1, h2, h3, h4 { color: var(--color-rock); }

    /* Nav — anonymous links sit on top of the dawn sky in light mode (so their
     * #1A3A5C is fine); in dark mode they sit on the dusk sky and need a light
     * tint with a softer drop-shadow so they don't blow out. */
    .nav-logo { color: #e6ecf3; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
    .nav-links a { color: #e6ecf3; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
    .nav.scrolled { background: rgba(15, 23, 42, 0.92); }
    .nav.scrolled .nav-logo,
    .nav.scrolled .nav-links a { color: white; }

    .account-toggle {
        background: rgba(24, 34, 46, 0.7);
        color: #e6ecf3;
        border-color: rgba(167, 189, 224, 0.2);
    }
    .nav.scrolled .account-toggle {
        background: rgba(255, 255, 255, 0.12);
        color: white;
        border-color: rgba(255, 255, 255, 0.25);
    }
    .account-menu { background: #1f2a37; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55); }
    .account-menu a:hover { background: rgba(255, 255, 255, 0.06); }

    /* Hero text on the dusk sky. */
    .hero-title,
    .hero-tagline { color: #f5f9ff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); }
    .hero-subtitle { color: #c3d4ea; }

    /* Mountain illustration layers — pulled into the night palette so they
     * read as silhouettes against the dusk sky instead of bright daylight. */
    .mountain-back {
        background: linear-gradient(180deg, #1a2c45 0%, #233a58 100%);
        opacity: 0.75;
    }
    .mountain-mid {
        background: linear-gradient(180deg, #0f1f33 0%, #1a2c45 100%);
        opacity: 0.88;
    }
    .mountain-front {
        background: linear-gradient(180deg, #060d18 0%, #0f1f33 100%);
    }

    .btn-secondary {
        background: rgba(255, 255, 255, 0.08);
        color: #e6ecf3;
        border-color: rgba(255, 255, 255, 0.2);
    }
    .btn-secondary:hover { background: rgba(255, 255, 255, 0.14); }

    /* Section backgrounds — odd/even alternation needs an explicit override
     * because `white` and `var(--color-mist)` need to flip independently
     * (without this, every odd section is pure black against the bg). */
    .details-section:nth-child(odd) { background: #18222e; }
    .details-section:nth-child(even) { background: #111923; }

    .bg-forest {
        background: linear-gradient(180deg, #0e1f17 0%, #122a1d 100%) !important;
        color: var(--color-text);
    }
    .bg-forest .section-title,
    .bg-forest .detail-title { color: #7fdfa3; -webkit-text-fill-color: #7fdfa3; }
    .bg-forest .detail-list li::before { color: #7fdfa3; }
    .bg-forest .data-table th { background: rgba(46, 168, 89, 0.18); color: var(--color-text); }
    .bg-forest .data-table td { border-color: rgba(46, 168, 89, 0.22); }
    .bg-forest .detail-steps { background: rgba(46, 168, 89, 0.08); }
    .bg-forest .detail-screenshot {
        background: rgba(46, 168, 89, 0.08);
        border-color: rgba(46, 168, 89, 0.22);
    }
    .bg-forest .screenshot-label { color: #7fdfa3; }

    .bg-mountain {
        background: linear-gradient(180deg, #0d1a2a 0%, #122339 100%) !important;
        color: var(--color-text);
    }
    .bg-mountain .section-title,
    .bg-mountain .detail-title { color: #8fb4ff; -webkit-text-fill-color: #8fb4ff; }
    .bg-mountain .detail-list li::before { color: #8fb4ff; }
    .bg-mountain .detail-steps { background: rgba(70, 138, 217, 0.1); }
    .bg-mountain .detail-screenshot {
        background: rgba(70, 138, 217, 0.08);
        border-color: rgba(70, 138, 217, 0.22);
    }
    .bg-mountain .screenshot-label { color: #8fb4ff; }

    /* Cards — flip the hardcoded `white` backgrounds to the elevated dark
     * surface. The accent borders (sunrise orange on hover/featured) stay. */
    .feature-card,
    .highlight-card,
    .pricing-card,
    .pricing-notes {
        background: #1f2a37;
        border-color: rgba(167, 189, 224, 0.16);
    }
    .feature-card.highlight {
        background: linear-gradient(135deg, #1f2a37 0%, rgba(230, 126, 34, 0.15) 100%);
        border-color: var(--color-sunrise-orange);
    }

    .detail-steps { background: rgba(255, 255, 255, 0.04); }
    .detail-screenshot {
        background: linear-gradient(135deg, #18222e 0%, #1f2a37 100%);
        border-color: rgba(167, 189, 224, 0.22);
    }

    /* Icon reference grid — placeholders default to `white` so dashed boxes
     * read as ghosted icons in light mode; in dark mode they want the same
     * faint card-surface look. */
    .icon-ref-placeholder {
        background: #18222e;
        border-color: rgba(167, 189, 224, 0.28);
    }

    /* Pricing section uses a green dawn gradient in light mode — swap to a
     * darker forest tint that matches `.bg-forest`. */
    .pricing {
        background: linear-gradient(180deg, #0e1f17 0%, #122a1d 100%);
    }
    .pricing .section-title { color: #7fdfa3; -webkit-text-fill-color: #7fdfa3; }
    .pricing-features li { color: var(--color-text); }
    .pricing-features li::before { color: #7fdfa3; }
    .pricing-plan { color: #8fb4ff; }

    /* Stats band keeps its mountain-blue gradient — it's a brand surface and
     * the white text on top reads fine in both modes. */

    /* Store buttons stay light (Apple/Google brand convention). */

    /* Forms/inputs the doc pages don't use right now, but if a future page
     * adds one, give it sane dark defaults. */
    input, textarea, select {
        background: #18222e;
        color: var(--color-text);
        border-color: rgba(167, 189, 224, 0.28);
    }
}
