:root { --bg: #0f172a; --sf: #1e293b; --acc: #3b82f6; --txt: #f8fafc; --mut: #94a3b8; --bd: #334155; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--txt); line-height: 1.6; }
a { text-decoration: none; color: inherit; transition: 0.2s; }

.layout { display: flex; min-height: 100vh; }
.sidebar { width: 280px; background: var(--sf); border-right: 1px solid var(--bd); position: sticky; top: 0; height: 100vh; flex-shrink: 0; display: flex; flex-direction: column; }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem; flex-shrink: 0; }
.sidebar-content { flex-grow: 1; overflow-y: auto; padding: 0 1.5rem 1.5rem; }
.content { flex: 1; padding: 3rem; max-width: 1400px; margin: 0 auto; width: 100%; }

.logo { font-size: 1.5rem; font-weight: 800; display: block; }
.logo span { color: var(--acc); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; }
.menu-toggle .bar { display: block; width: 25px; height: 3px; background-color: var(--txt); margin: 5px 0; transition: 0.3s; }

.nav-link { display: flex; gap: 0.75rem; padding: 0.75rem; color: var(--mut); border-radius: 6px; margin-bottom: 5px; font-weight: 500; }
.nav-link:hover { background: rgba(255,255,255,0.05); color: var(--txt); }

.search-wrap { position: relative; margin-bottom: 2rem; margin-top: 1.5rem; }
#s { width: 100%; background: var(--bg); border: 1px solid var(--bd); padding: 0.75rem; border-radius: 8px; color: white; }
#r { position: absolute; top: 100%; left: 0; right: 0; background: var(--sf); border: 1px solid var(--bd); z-index: 10; display: none; max-height: 300px; overflow-y: auto; }
#r a { display: block; padding: 0.75rem; border-bottom: 1px solid var(--bd); font-size: 0.9rem; }
#r a:hover { background: var(--acc); }

.hero { text-align: center; margin-bottom: 4rem; }
.hero h1 { font-size: 3rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
.hero p { color: var(--mut); font-size: 1.2rem; }
.hl { color: var(--acc); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.card { background: var(--sf); border: 1px solid var(--bd); padding: 1.5rem; border-radius: 12px; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); border-color: var(--acc); }
.card-head { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.badge { font-size: 0.7rem; background: rgba(59,130,246,0.1); color: var(--acc); padding: 2px 8px; border-radius: 99px; text-transform: uppercase; font-weight: bold; height: fit-content; }
.res { font-family: 'Fira Code'; font-weight: 700; color: var(--mut); margin-top: auto; }

.crumbs { color: var(--mut); margin-bottom: 2rem; }
.crumbs a:hover { color: var(--acc); text-decoration: underline; }

.detail-split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: center; }
.viz-col { background: var(--sf); padding: 4rem; border-radius: 20px; border: 1px solid var(--bd); display: flex; justify-content: center; }
.device-frame { background: white; width: 100%; max-width: 300px; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; color: black; font-weight: 800; font-family: 'Fira Code'; }

.info-col h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.intro { font-size: 1.1rem; color: var(--mut); margin-bottom: 2rem; line-height: 1.7; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.stat { background: var(--sf); padding: 1rem; border: 1px solid var(--bd); border-radius: 8px; font-family: 'Fira Code'; font-weight: 700; font-size: 1.2rem; }
.stat span { display: block; font-size: 0.75rem; color: var(--mut); font-family: 'Inter'; font-weight: 400; text-transform: uppercase; margin-bottom: 4px; }

.code-wrap { background: #000; border-radius: 10px; border: 1px solid var(--bd); overflow: hidden; }
.code-head { background: #1e293b; padding: 0.5rem 1rem; font-size: 0.8rem; color: var(--mut); border-bottom: 1px solid var(--bd); }
.code-wrap pre { padding: 1rem; color: #7dd3fc; font-family: 'Fira Code'; overflow-x: auto; }

.site-footer { margin-top: 5rem; border-top: 1px solid var(--bd); padding-top: 2rem; text-align: center; color: var(--mut); }

.related-section, .faq-section, .privacy-policy {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--bd);
}
.related-section h2, .faq-section h2, .privacy-policy h1, .privacy-policy h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    background: var(--sf);
    border: 1px solid var(--bd);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
}
.faq-item summary {
    font-weight: 600;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 0.5rem;
}
.faq-item summary:hover {
    color: var(--acc);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bd);
    color: var(--mut);
    line-height: 1.7;
}

.privacy-policy p, .privacy-policy li {
    color: var(--mut);
    line-height: 1.7;
    margin-bottom: 1rem;
}
.privacy-policy h2 {
    font-size: 1.5rem;
    text-align: left;
    margin-top: 2rem;
}
.privacy-policy ul {
    list-style-type: disc;
    margin-left: 20px;
}
.privacy-policy a {
    color: var(--acc);
    text-decoration: underline;
}

@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; border-right: none; }
    .sidebar-header { border-bottom: 1px solid var(--bd); }
    .sidebar:not(.is-open) .sidebar-header { border-bottom: none; }
    .menu-toggle { display: block; }
    .sidebar-content { display: none; padding-top: 1.5rem; }
    .sidebar.is-open .sidebar-content { display: block; }
    .search-wrap { margin-top: 0; }
    .detail-split { grid-template-columns: 1fr; }
    .content { padding: 2rem 1.5rem; }
}