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

/* === Accessibility === */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 999;
    text-decoration: none;
}
.skip-link:focus {
    top: 8px;
}
*:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

:root {
    --bg:        #1a1a2e;
    --surface:   #16213e;
    --surface2:  #0f3460;
    --accent:    #e94560;
    --accent2:   #533483;
    --text:      #eee;
    --text-dim:  #8892b0;
    --green:     #64ffda;
    --yellow:    #ffd369;
    --radius:    8px;
    --mono:      "SF Mono", "Fira Code", "Cascadia Code", Menlo, monospace;
}

/* === Light Theme === */
[data-theme="light"] {
    --bg:        #f5f5f7;
    --surface:   #ffffff;
    --surface2:  #e5e5ea;
    --accent:    #0071e3;
    --accent2:   #7c3aed;
    --text:      #1d1d1f;
    --text-dim:  #6e6e73;
    --green:     #059669;
    --yellow:    #b45309;
}
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg:        #f5f5f7;
        --surface:   #ffffff;
        --surface2:  #e5e5ea;
        --accent:    #0071e3;
        --accent2:   #7c3aed;
        --text:      #1d1d1f;
        --text-dim:  #6e6e73;
        --green:     #059669;
        --yellow:    #b45309;
    }
}

/* === Theme Toggle === */
.theme-toggle {
    margin-left: auto;
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}
.theme-toggle:hover {
    color: var(--yellow);
    background: rgba(128, 128, 128, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.app {
    width: 100%;
    max-width: 760px;
    padding: 60px 20px 60px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* === Site Nav === */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: var(--surface);
    border-bottom: 1px solid var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}
.site-nav-inner {
    width: 100%;
    max-width: 760px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-brand {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.nav-brand:hover {
    color: var(--green);
    background: rgba(100, 255, 218, 0.08);
}
.nav-links {
    display: flex;
    gap: 6px;
    list-style: none;
}
.nav-links a {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.nav-links a:hover {
    color: var(--text);
    background: var(--surface2);
}
.nav-links a.active {
    color: var(--green);
    background: rgba(100, 255, 218, 0.08);
}

/* === Hamburger Menu === */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.15s;
}
.nav-hamburger:hover {
    background: var(--surface2);
}

@media (max-width: 768px) {
    .nav-hamburger {
        display: block;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 44px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--surface2);
        flex-direction: column;
        padding: 8px 20px 12px;
        gap: 2px;
        z-index: 199;
    }
    .nav-links.open {
        display: flex;
    }
    .nav-links a {
        display: block;
        padding: 8px 10px;
        font-size: 0.82rem;
    }
}

/* === Header === */
.header {
    text-align: center;
    padding: 48px 0 16px;
}
.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.header-sub {
    font-size: 1rem;
    color: var(--text-dim);
    margin-top: 8px;
}

/* === Tools Grid === */
.tools-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-card {
    background: var(--surface);
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
    cursor: pointer;
}
.tool-card:hover {
    border-color: var(--accent);
    background: var(--surface2);
    transform: translateY(-2px);
}

.tool-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--accent2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.85);
}

.tool-info {
    flex: 1;
    min-width: 0;
}
.tool-name {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.beta-badge {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--yellow);
    color: var(--bg);
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}
.alpha-badge {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}
.tool-desc {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.tool-arrow {
    font-size: 1.3rem;
    color: var(--text-dim);
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}
.tool-card:hover .tool-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

/* === Maturity Descriptions === */
.maturity-desc {
    display: block;
    font-size: 0.68rem;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.maturity-badge.stable {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--green);
    color: var(--bg);
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* === Updates Section === */
.updates-section {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
}
.updates-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.updates-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.update-entry {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 14px 18px;
}
.update-entry p {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-top: 6px;
}
.update-tool {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent);
}
.update-version {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-dim);
    margin-left: 6px;
}

/* === Decision Tree Section === */
.decision-tree {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
}
.decision-tree h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.decision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.decision-item {
    background: var(--surface);
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.decision-item:hover {
    border-color: var(--accent);
    background: var(--surface2);
    transform: translateY(-2px);
}
.decision-item strong {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
}
.decision-item a {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--green);
    text-decoration: none;
    transition: color 0.15s;
}
.decision-item:hover a {
    color: var(--accent);
}

/* === About Section === */
.about-section {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
}
.about-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.about-section p {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 10px;
}

/* === License Section === */
.license-section {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    padding-top: 20px;
}
.license-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.license-section p {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 10px;
}
.license-section ul {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}
.license-section li {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.6;
    padding: 6px 0 6px 16px;
    position: relative;
}
.license-section li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: var(--green);
}

/* === Footer === */
.site-footer {
    text-align: center;
    padding: 24px 16px;
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.7;
    border-top: 1px solid var(--surface2);
    margin-top: 8px;
}
.footer-copy {
    margin-top: 8px;
    font-size: 0.72rem;
    color: var(--text-dim);
    opacity: 0.7;
}

/* === Responsive === */
@media (max-width: 500px) {
    .app { padding: 56px 12px 40px; }
    .header { padding: 32px 0 12px; }
    .header h1 { font-size: 1.8rem; }
    .tool-card { padding: 16px; gap: 14px; }
    .tool-icon { width: 44px; height: 44px; font-size: 1.2rem; }
    .tool-name { font-size: 0.95rem; }
    .tool-desc { font-size: 0.78rem; }
    .decision-grid { grid-template-columns: 1fr; }
}
