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

:root {
    --bg: #ffffff;
    --bg-card: #ffffff;
    --bg-alt: #fdfbf7;
    --accent: #d97706;
    --accent-light: #f59e0b;
    --accent-muted: rgba(217, 119, 6, 0.08);
    --text: #1c1917;
    --text-mid: #574636;
    --text-muted: #927552;
    /* --border: rgba(217, 119, 6, 0.18);
        --shadow: 0 4px 24px rgba(217, 119, 6, 0.06); */
    --border: rgba(197, 197, 197, 0.18);
    --shadow: 0 4px 24px rgba(217, 119, 6, 0.03);
    --radius: 14px;
    --max-w: 860px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
    min-height: 100vh;
}

/* ── Nav ── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 16px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.nav-logo-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

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

.nav-links a {
    color: var(--text-mid);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

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

/* ── Hero ── */
.hero {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 72px 24px 48px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-muted);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 16px;
}

.hero h1 span {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    max-width: 520px;
    margin: 0 auto 32px;
    color: var(--text-mid);
    font-size: 16px;
}

.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.hero-meta a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.cta-wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px 48px;
    display: flex;
    justify-content: center;
    text-align: center;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.25);
    transition: all 0.25s ease;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text-mid);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
}

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

/* ── Browser Dropdown ── */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    border: none;
    cursor: pointer;
    font-family: inherit;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.dropdown-arrow {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.dropdown-wrapper.open .dropdown-arrow {
    transform: rotate(180deg);
}

.browser-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px) scale(0.96);
    width: 320px;
    max-width: calc(100vw - 32px);
    background: #ffffff;
    border: 1px solid rgba(217, 119, 6, 0.22);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(217, 119, 6, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
    text-align: left;
    z-index: 1000;
}

.dropdown-wrapper.open .browser-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}

.dropdown-menu-header {
    padding: 8px 12px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(197, 197, 197, 0.25);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.18s ease;
    cursor: pointer;
    position: relative;
}

.dropdown-item:not(.item-disabled):hover {
    background: rgba(217, 119, 6, 0.08);
    transform: translateX(2px);
}

.dropdown-item.item-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.browser-logo {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fdfbf7;
    border-radius: 9px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.browser-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.browser-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.browser-platform {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.2;
}

.browser-badge {
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 100px;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

.badge-active {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-soon {
    background: rgba(120, 113, 108, 0.1);
    color: #78716c;
    border: 1px solid rgba(120, 113, 108, 0.2);
}

/* ── TOC ── */
.toc-wrap {
    max-width: var(--max-w);
    margin: 0 auto 48px;
    padding: 0 24px;
}

.toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    box-shadow: var(--shadow);
}

.toc-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.toc-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px;
    list-style: none;
}

.toc-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-mid);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.toc-list a:hover {
    background: var(--accent-muted);
    color: var(--accent);
}

.toc-list a::before {
    content: "§";
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
}

/* ── Main Content ── */
main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px 80px;
}

.doc-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.section-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-muted);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.section-header-text h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text);
    margin-bottom: 4px;
}

.section-header-text p {
    font-size: 13px;
    color: var(--text-muted);
}

.last-updated {
    display: inline-block;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.doc-section h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin: 28px 0 12px;
    letter-spacing: -0.2px;
}

.doc-section p {
    color: var(--text-mid);
    margin-bottom: 14px;
}

.doc-section ul {
    margin: 12px 0 20px 24px;
    color: var(--text-mid);
}

.doc-section li {
    margin-bottom: 8px;
}

.highlight-box {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: var(--text-mid);
}

.highlight-box .hl-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.contact-item {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

.contact-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.contact-item-icon {
    font-size: 24px;
}

.contact-item-text strong {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Standalone Sections (#welcome & #uninstall) ── */
.standalone-section {
    max-width: var(--max-w);
    margin: 48px auto 80px;
    padding: 0 24px;
}

.standalone-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 56px 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.standalone-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-muted);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 24px;
}

.standalone-card h1 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.8px;
    line-height: 1.2;
    margin-bottom: 16px;
}

.standalone-card p.subtitle {
    max-width: 580px;
    margin: 0 auto 36px;
    color: var(--text-mid);
    font-size: 16px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    text-align: left;
    margin-bottom: 40px;
}

.feature-item {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.feature-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.feature-text h4 {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.feature-text p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ── Dynamic Section Visibility (Hash Routing) ── */
#welcome,
#uninstall {
    display: none;
}

body.view-welcome .hero,
body.view-welcome .cta-wrap,
body.view-welcome .toc-wrap,
body.view-welcome main,
body.view-welcome #uninstall {
    display: none !important;
}

body.view-welcome #welcome {
    display: block !important;
}

body.view-uninstall .hero,
body.view-uninstall .cta-wrap,
body.view-uninstall .toc-wrap,
body.view-uninstall main,
body.view-uninstall #welcome {
    display: none !important;
}

body.view-uninstall #uninstall {
    display: block !important;
}

/* ── Footer ── */
footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    text-align: center;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}

.footer-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    list-style: none;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-mid);
    text-decoration: none;
    font-size: 13.5px;
}

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

.footer-copy {
    font-size: 12px;
    color: var(--text-muted);
}

.footer-copy a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 600px) {
    .doc-section {
        padding: 24px 18px;
    }

    .standalone-card {
        padding: 36px 20px;
    }

    .hero {
        padding: 48px 16px 32px;
    }
}