/*
 * RouterOS Wiki v7 — "Deep Space Operations" Theme
 * Premium dark interface for network engineers
 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg: #080c18;
    --bg-raised: #0c1222;
    --bg-card: #0e1529;
    --bg-sidebar: #060a14;
    --bg-sidebar-hover: rgba(34, 211, 238, 0.05);
    --bg-sidebar-active: rgba(34, 211, 238, 0.08);
    --bg-code: #020610;
    --bg-inline-code: rgba(34, 211, 238, 0.07);
    --bg-tag: rgba(34, 211, 238, 0.1);
    --text: #b8c9db;
    --text-bright: #e2e8f0;
    --text-secondary: #526580;
    --text-sidebar: #5a7a9b;
    --text-sidebar-active: #e2e8f0;
    --text-code: #a8bdd0;
    --accent: #22d3ee;
    --accent-dark: #06b6d4;
    --accent-glow: rgba(34, 211, 238, 0.12);
    --border: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(34, 211, 238, 0.12);
    --red: #f87171;
    --green: #34d399;
    --orange: #fbbf24;
    --comment: #4a5c70;
    --string: #86efac;
    --keyword: #f472b6;
    --number: #93c5fd;
    --prop: #fbbf24;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    display: flex;
    min-height: 100vh;
    background-image: radial-gradient(circle, rgba(34, 211, 238, 0.025) 1px, transparent 1px);
    background-size: 28px 28px;
}

/* ═══════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════ */
.sidebar {
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-accent);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 1px 0 30px rgba(34, 211, 238, 0.03);
}

.sidebar-header {
    padding: 1.3rem 1.5rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-dark), transparent);
    opacity: 0.3;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}
.sidebar-logo svg { flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.3)); }
.sidebar-logo-text {
    font-size: 1.05rem;
    font-weight: 800;
    color: #e2e8f0;
    letter-spacing: -0.03em;
}
.sidebar-logo-text span { color: var(--accent); }
.sidebar-version {
    display: inline-block;
    background: var(--accent-glow);
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 3px;
    margin-left: 0.35rem;
    letter-spacing: 0.05em;
    border: 1px solid rgba(34, 211, 238, 0.15);
}

/* Search */
.sidebar-search {
    padding: 0.75rem 1.2rem;
    position: relative;
}
.sidebar-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 0.5rem 0.75rem 0.5rem 2.2rem;
    color: var(--text-bright);
    font-size: 0.83rem;
    font-family: inherit;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill='%235a7a9b' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.7rem center;
    transition: all 0.25s;
}
.sidebar-search input::placeholder { color: #3d5168; }
.sidebar-search input:focus {
    border-color: var(--accent-dark);
    background: rgba(34, 211, 238, 0.03);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.06);
}

/* Search results dropdown */
.search-results {
    display: none;
    position: absolute;
    left: 1.2rem;
    right: 1.2rem;
    top: 100%;
    background: #0c1526;
    border: 1px solid var(--border-accent);
    border-radius: 8px;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(34, 211, 238, 0.04);
}
.search-result {
    display: block;
    padding: 0.7rem 1rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.15s;
}
.search-result:last-child { border-bottom: none; }
.search-result:hover {
    background: rgba(34, 211, 238, 0.06);
}
.search-result-title {
    color: var(--text-bright);
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}
.search-result-snippet {
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.5;
}
.search-result-snippet mark {
    background: rgba(34, 211, 238, 0.2);
    color: var(--accent);
    padding: 0 0.15rem;
    border-radius: 2px;
}
.search-no-results {
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-align: center;
}
.search-results::-webkit-scrollbar { width: 3px; }
.search-results::-webkit-scrollbar-thumb { background: rgba(34, 211, 238, 0.15); border-radius: 4px; }

/* Navigation */
.sidebar-nav {
    padding: 0.4rem 0 2rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
.nav-group { margin-bottom: 0.15rem; }
.nav-group-title {
    display: block;
    padding: 0.6rem 1.5rem 0.3rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #3d5168;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.38rem 1.5rem 0.38rem 1.8rem;
    color: var(--text-sidebar);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    position: relative;
}
.nav-link:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-sidebar-active);
    border-left-color: rgba(34, 211, 238, 0.3);
}
.nav-link.active {
    background: var(--bg-sidebar-active);
    color: var(--text-sidebar-active);
    border-left-color: var(--accent);
    font-weight: 600;
    box-shadow: inset 2px 0 16px rgba(34, 211, 238, 0.06);
}
.nav-link .icon {
    font-size: 0.95rem;
    opacity: 0.55;
    width: 1.2rem;
    text-align: center;
    transition: opacity 0.2s;
}
.nav-link:hover .icon,
.nav-link.active .icon { opacity: 0.85; }

/* ═══════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════ */
.main {
    margin-left: 280px;
    flex: 1;
    min-width: 0;
}

.topbar {
    background: rgba(8, 12, 24, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.55rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.breadcrumb a {
    color: var(--accent-dark);
    text-decoration: none;
    transition: color 0.15s;
}
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb .sep { color: #2a3a50; }
.topbar-meta { font-size: 0.76rem; color: var(--text-secondary); }

.content-wrap {
    max-width: 860px;
    padding: 2.2rem 2.5rem 4rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.3rem;
    color: var(--text);
    transition: color 0.15s;
}
.menu-toggle:hover { color: var(--accent); }

/* ═══════════════════════════════════════
   TYPOGRAPHY & CONTENT
   ═══════════════════════════════════════ */
.page-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-bright);
    margin-bottom: 0.3rem;
    background: linear-gradient(135deg, #e2e8f0, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1.8rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.page-meta .tag {
    background: var(--bg-tag);
    color: var(--accent);
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    border: 1px solid rgba(34, 211, 238, 0.1);
}

h2 {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 2.5rem 0 0.8rem;
    color: var(--text-bright);
    letter-spacing: -0.02em;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}
h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}
h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 1.6rem 0 0.5rem;
    color: #94b8d4;
}
h4 {
    font-size: 0.93rem;
    font-weight: 700;
    margin: 1.2rem 0 0.4rem;
    color: #7a9bb8;
}
p { margin-bottom: 1rem; font-size: 0.92rem; }
a {
    color: var(--accent);
    transition: color 0.15s;
}
a:hover { color: #67e8f9; }
ul, ol { margin: 0.5rem 0 1rem 1.5rem; font-size: 0.92rem; }
li { margin-bottom: 0.3rem; }
li::marker { color: var(--accent-dark); }
strong { color: var(--text-bright); font-weight: 700; }

/* ═══════════════════════════════════════
   CALLOUTS
   ═══════════════════════════════════════ */
.callout {
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin: 1.2rem 0;
    font-size: 0.86rem;
    display: flex;
    gap: 0.7rem;
    line-height: 1.6;
    border: 1px solid transparent;
}
.callout-icon { font-size: 1.05rem; flex-shrink: 0; margin-top: 0.15rem; }
.callout-info {
    background: rgba(34, 211, 238, 0.05);
    border-left: 3px solid var(--accent);
    border-color: rgba(34, 211, 238, 0.08);
    border-left-color: var(--accent);
    color: #8ec8d8;
    box-shadow: inset 3px 0 16px rgba(34, 211, 238, 0.04);
}
.callout-warning {
    background: rgba(251, 191, 36, 0.04);
    border-left: 3px solid var(--orange);
    border-color: rgba(251, 191, 36, 0.08);
    border-left-color: var(--orange);
    color: #c9a84e;
    box-shadow: inset 3px 0 16px rgba(251, 191, 36, 0.03);
}
.callout-danger {
    background: rgba(248, 113, 113, 0.04);
    border-left: 3px solid var(--red);
    border-color: rgba(248, 113, 113, 0.08);
    border-left-color: var(--red);
    color: #d48a8a;
    box-shadow: inset 3px 0 16px rgba(248, 113, 113, 0.03);
}
.callout-tip {
    background: rgba(52, 211, 153, 0.04);
    border-left: 3px solid var(--green);
    border-color: rgba(52, 211, 153, 0.08);
    border-left-color: var(--green);
    color: #7ec4a4;
    box-shadow: inset 3px 0 16px rgba(52, 211, 153, 0.03);
}

/* ═══════════════════════════════════════
   CODE BLOCKS
   ═══════════════════════════════════════ */
pre {
    background: var(--bg-code);
    border-radius: 8px;
    padding: 1.2rem 1.4rem;
    overflow-x: auto;
    margin: 1rem 0 1.2rem;
    position: relative;
    border: 1px solid rgba(34, 211, 238, 0.06);
}
pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-dark), transparent 70%);
    opacity: 0.5;
    border-radius: 8px 8px 0 0;
}
pre code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--text-code);
}
code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}
.inline-code {
    background: var(--bg-inline-code);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--accent);
    border: 1px solid rgba(34, 211, 238, 0.06);
}
.code-label {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(34, 211, 238, 0.06);
    color: var(--text-secondary);
    font-size: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    padding: 0.2rem 0.65rem;
    border-radius: 0 8px 0 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Syntax highlighting */
.c { color: var(--comment); font-style: italic; }
.s { color: var(--string); }
.k { color: var(--keyword); }
.n { color: var(--number); }
.p { color: var(--prop); }

/* ═══════════════════════════════════════
   TABLES
   ═══════════════════════════════════════ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.86rem;
}
th {
    background: rgba(34, 211, 238, 0.04);
    font-weight: 700;
    text-align: left;
    padding: 0.6rem 1rem;
    border-bottom: 2px solid rgba(34, 211, 238, 0.12);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-dark);
}
td {
    padding: 0.55rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
tr:hover td { background: rgba(34, 211, 238, 0.02); }
.param-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
}

/* ═══════════════════════════════════════
   TABLE OF CONTENTS
   ═══════════════════════════════════════ */
.toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.3rem;
    margin-bottom: 2rem;
    position: relative;
}
.toc::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-dark), transparent 50%);
    opacity: 0.3;
    border-radius: 8px 8px 0 0;
}
.toc-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-dark);
    margin-bottom: 0.5rem;
}
.toc-list { list-style: none; font-size: 0.85rem; margin: 0; padding: 0; }
.toc-list li { padding: 0.2rem 0; }
.toc-list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}
.toc-list a:hover { color: var(--accent); }

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.page-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-footer a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    transition: color 0.15s;
}
.page-footer a:hover { color: #67e8f9; }
.site-footer {
    text-align: center;
    padding: 1.5rem 2rem;
    font-size: 0.76rem;
    color: #2a3a50;
    border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════
   RESPONSIVE — TABLET (≤900px)
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 60px rgba(0, 0, 0, 0.6);
    }
    .main { margin-left: 0; }
    .menu-toggle { display: block; }
    .content-wrap { padding: 1.5rem 1.5rem 3rem; }
    .topbar { padding: 0.55rem 1.2rem; }
    .page-title { font-size: 1.6rem; }
    h2 { font-size: 1.2rem; margin-top: 2rem; }

    /* Table horizontal scroll */
    table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Sidebar overlay/backdrop */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 99;
        transition: opacity 0.3s;
    }
    .sidebar-overlay.active {
        display: block;
    }
}

/* ═══════════════════════════════════════
   RESPONSIVE — MOBILE (≤600px)
   ═══════════════════════════════════════ */
@media (max-width: 600px) {
    body {
        background-size: 20px 20px;
    }
    .sidebar { width: 85vw; max-width: 300px; }
    .content-wrap { padding: 1.2rem 1rem 2.5rem; }
    .topbar {
        padding: 0.5rem 0.8rem;
    }
    .breadcrumb { font-size: 0.75rem; }
    .topbar-meta { display: none; }

    /* Typography mobile */
    .page-title { font-size: 1.35rem; margin-bottom: 0.2rem; }
    .page-meta { font-size: 0.75rem; gap: 0.6rem; margin-bottom: 1.3rem; }
    h2 { font-size: 1.1rem; margin-top: 1.8rem; }
    h3 { font-size: 0.98rem; }
    h4 { font-size: 0.9rem; }
    p, ul, ol, li { font-size: 0.88rem; }

    /* Code blocks mobile */
    pre { padding: 0.9rem 1rem; border-radius: 6px; margin: 0.8rem -1rem 1rem; border-radius: 0; border-left: none; border-right: none; }
    pre code { font-size: 0.74rem; }
    .code-label { font-size: 0.6rem; padding: 0.15rem 0.5rem; }

    /* Callouts mobile */
    .callout { padding: 0.8rem 0.9rem; font-size: 0.83rem; border-radius: 6px; }

    /* Touch-friendly nav links */
    .nav-link {
        padding: 0.55rem 1.5rem 0.55rem 1.8rem;
        font-size: 0.88rem;
    }
    .nav-group-title { padding: 0.6rem 1.5rem 0.35rem; font-size: 0.68rem; }

    /* Tables */
    th { padding: 0.5rem 0.7rem; font-size: 0.72rem; }
    td { padding: 0.45rem 0.7rem; font-size: 0.82rem; }

    /* TOC mobile */
    .toc { padding: 0.8rem 1rem; }
    .toc-list { font-size: 0.82rem; }

    /* Footer mobile */
    .page-footer { flex-direction: column; gap: 0.6rem; }
    .page-footer a { font-size: 0.82rem; }
    .site-footer { padding: 1rem; font-size: 0.72rem; }

    /* Inline code wrap */
    .inline-code { word-break: break-all; }
}

/* ═══════════════════════════════════════
   SCROLLBARS
   ═══════════════════════════════════════ */
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(34, 211, 238, 0.1); border-radius: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(34, 211, 238, 0.2); }

pre::-webkit-scrollbar { height: 3px; }
pre::-webkit-scrollbar-track { background: transparent; }
pre::-webkit-scrollbar-thumb { background: rgba(34, 211, 238, 0.12); border-radius: 4px; }

/* Firefox scrollbar */
.sidebar-nav { scrollbar-width: thin; scrollbar-color: rgba(34, 211, 238, 0.1) transparent; }
pre { scrollbar-width: thin; scrollbar-color: rgba(34, 211, 238, 0.12) transparent; }

/* ═══════════════════════════════════════
   ANIMATIONS & EFFECTS
   ═══════════════════════════════════════ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.content-wrap { animation: fadeIn 0.4s ease-out; }

/* Glow on code blocks hover */
pre:hover {
    border-color: rgba(34, 211, 238, 0.1);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.03);
    transition: all 0.3s;
}

/* Callout subtle glow on hover */
.callout { transition: box-shadow 0.3s; }
.callout:hover {
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.04);
}

/* TOC hover glow */
.toc { transition: border-color 0.3s; }
.toc:hover { border-color: rgba(34, 211, 238, 0.1); }

/* Table row transition */
td { transition: background 0.15s; }

/* Selection */
::selection {
    background: rgba(34, 211, 238, 0.2);
    color: var(--text-bright);
}

/* === Codex UX 2027 start === */
:root {
    --surface-glass: rgba(12, 18, 34, 0.72);
    --surface-glass-strong: rgba(14, 22, 42, 0.9);
    --ring: rgba(34, 211, 238, 0.22);
    --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.26);
}
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, rgba(34,211,238,0.045), transparent 28%, rgba(52,211,153,0.035) 62%, transparent),
        radial-gradient(circle at 78% 14%, rgba(34,211,238,0.08), transparent 28rem);
    opacity: 0.8;
    z-index: -1;
}
.reading-progress {
    position: fixed;
    left: 280px;
    right: 0;
    top: 0;
    height: 3px;
    z-index: 500;
    background: rgba(34, 211, 238, 0.05);
}
.reading-progress__bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #22d3ee, #34d399);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.5);
}
.sidebar {
    background: linear-gradient(180deg, rgba(6,10,20,0.98), rgba(8,13,25,0.96));
    border-right-color: rgba(34, 211, 238, 0.16);
}
.sidebar-logo svg { border-radius: 8px; }
.sidebar-search::after {
    content: '/';
    position: absolute;
    right: 1.65rem;
    top: 50%;
    transform: translateY(-50%);
    min-width: 1.25rem;
    height: 1.25rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: #5a7a9b;
    font: 600 0.72rem 'JetBrains Mono', monospace;
    display: grid;
    place-items: center;
    pointer-events: none;
    background: rgba(255,255,255,0.025);
}
.sidebar-search:focus-within::after { opacity: 0; }
.sidebar-search input {
    min-height: 2.35rem;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.035);
}
.search-results {
    border-radius: 12px;
    border-color: rgba(34, 211, 238, 0.2);
    box-shadow: 0 22px 70px rgba(0,0,0,0.58), 0 0 0 1px rgba(34,211,238,0.04) inset;
}
.search-result { border-radius: 8px; margin: 0.25rem; }
.search-result.is-selected,
.search-result:hover { background: rgba(34, 211, 238, 0.09); }
.nav-link {
    margin: 0.05rem 0.7rem;
    padding-left: 1.1rem;
    border-left: 0;
    border-radius: 9px;
}
.nav-link::before {
    content: '';
    width: 3px;
    align-self: stretch;
    border-radius: 99px;
    background: transparent;
    margin-right: 0.15rem;
}
.nav-link:hover,
.nav-link.active {
    border-left-color: transparent;
    transform: translateX(2px);
}
.nav-link.active::before { background: linear-gradient(180deg, #22d3ee, #34d399); }
.nav-link.active {
    background: linear-gradient(90deg, rgba(34,211,238,0.13), rgba(34,211,238,0.045));
    box-shadow: inset 0 0 0 1px rgba(34,211,238,0.12), 0 10px 28px rgba(0,0,0,0.16);
}
.topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(8, 12, 24, 0.72);
    box-shadow: 0 10px 40px rgba(0,0,0,0.18);
}
.content-wrap {
    max-width: 1040px;
    padding-top: 2.2rem;
}
.page-title {
    letter-spacing: -0.035em;
    line-height: 1.08;
}
.page-meta .tag,
.tag {
    border-radius: 999px;
    border: 1px solid rgba(34,211,238,0.16);
    background: rgba(34,211,238,0.075);
}
.toc,
table,
.callout,
pre { box-shadow: var(--shadow-soft); }
.toc {
    background: linear-gradient(180deg, rgba(14, 21, 41, 0.92), rgba(10, 16, 31, 0.82));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.toc-list a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.1rem 0; }
.toc-list a::before {
    content: '';
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 999px;
    background: rgba(34,211,238,0.18);
}
.toc-list a.is-active { color: var(--accent); }
.toc-list a.is-active::before { background: var(--accent); box-shadow: 0 0 10px rgba(34,211,238,0.6); }
h2, h3 { position: relative; }
.heading-anchor {
    opacity: 0;
    color: var(--accent);
    text-decoration: none;
    margin-left: 0.45rem;
    font-size: 0.8em;
    transition: opacity 0.15s;
}
h2:hover .heading-anchor,
h3:hover .heading-anchor { opacity: 1; }
p { max-width: 76ch; }
a { text-underline-offset: 0.18em; }
a:focus-visible,
button:focus-visible,
input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
table {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(10, 16, 31, 0.72);
}
th { background: rgba(34, 211, 238, 0.055); }
tr:hover td { background: rgba(34, 211, 238, 0.045); }
pre {
    position: relative;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(2,6,16,0.96), rgba(5,10,22,0.96));
}
.copy-code {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    border: 1px solid rgba(34,211,238,0.16);
    border-radius: 8px;
    background: rgba(8,12,24,0.76);
    color: var(--text-secondary);
    font: 600 0.68rem 'JetBrains Mono', monospace;
    padding: 0.32rem 0.55rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.18s, transform 0.18s, color 0.18s, border-color 0.18s;
}
pre:hover .copy-code,
.copy-code:focus-visible { opacity: 1; transform: translateY(0); }
.copy-code:hover,
.copy-code.is-copied { color: var(--accent); border-color: rgba(34,211,238,0.38); }
.callout { border-radius: 12px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.page-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(34,211,238,0.14);
    border-radius: 10px;
    background: rgba(34,211,238,0.045);
}
.to-top {
    position: fixed;
    right: 1.3rem;
    bottom: 1.3rem;
    width: 2.55rem;
    height: 2.55rem;
    border: 1px solid rgba(34,211,238,0.22);
    border-radius: 12px;
    background: rgba(8,12,24,0.78);
    color: var(--accent);
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 120;
    opacity: 0;
    transform: translateY(0.5rem);
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s, background 0.2s;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { background: rgba(34,211,238,0.1); }
@media (max-width: 900px) {
    .reading-progress { left: 0; }
    .topbar { position: sticky; }
    .nav-link { min-height: 2.55rem; }
}
@media (max-width: 600px) {
    .content-wrap { padding-top: 1.35rem; }
    .copy-code { opacity: 1; }
    .to-top { right: 0.9rem; bottom: 0.9rem; }
    table { border-radius: 0; margin-left: -1rem; margin-right: -1rem; width: calc(100% + 2rem); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
/* === Codex UX 2027 end === */

/* === Codex Hub Icons start === */
.nav-link .icon,
.quick-card__icon {
    width: 1.08rem;
    height: 1.08rem;
    flex: 0 0 1.08rem;
    display: inline-block;
    background: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
    opacity: 0.68;
    font-size: 0;
}
.nav-link:hover .icon,
.nav-link.active .icon { opacity: 0.95; }
.quick-card__icon { width: 1.35rem; height: 1.35rem; flex-basis: 1.35rem; opacity: 1; color: var(--accent); }
.icon-overview { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 4h11a3 3 0 0 1 3 3v13H8a3 3 0 0 1-3-3V4Zm3 3v10h8V7H8Z'/%3E%3C/svg%3E"); }
.icon-spark { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.1 6.2L20 10l-5.2 3.5L16 20l-4-4-4 4 1.2-6.5L4 10l5.9-1.8L12 2Z'/%3E%3C/svg%3E"); }
.icon-download { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 3h2v9l3.5-3.5 1.4 1.4L12 15.8 6.1 9.9l1.4-1.4L11 12V3ZM5 18h14v2H5v-2Z'/%3E%3C/svg%3E"); }
.icon-key { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 14a5 5 0 1 1 4.6-7H22v4h-2v2h-3v2h-4.4A5 5 0 0 1 8 14Zm0-3a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E"); }
.icon-terminal { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18v14H3V5Zm2 2v10h14V7H5Zm2 2 4 3-4 3v-2l1.4-1L7 11V9Zm5 5h5v2h-5v-2Z'/%3E%3C/svg%3E"); }
.icon-network { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 4h6v6H5V4Zm8 0h6v6h-6V4ZM5 14h6v6H5v-6Zm8 0h6v6h-6v-6Zm-2-7h2v2h-2V7Zm-1 8h4v2h-4v-2Zm6-5h2v4h-2v-4ZM6 10h2v4H6v-4Z'/%3E%3C/svg%3E"); }
.icon-route { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 4a3 3 0 0 1 2 5.2V12h8a2 2 0 0 0 0-4h-2V6h2a4 4 0 0 1 0 8H8a2 2 0 0 0 0 4h2v2H8a4 4 0 0 1-2-7.5V9.2A3 3 0 0 1 6 4Zm0 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm12 10a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z'/%3E%3C/svg%3E"); }
.icon-shield { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 20 5v6c0 5-3.2 9.4-8 11-4.8-1.6-8-6-8-11V5l8-3Zm0 3.1L6 7.3V11c0 3.7 2.2 7 6 8.5 3.8-1.5 6-4.8 6-8.5V7.3l-6-2.2Z'/%3E%3C/svg%3E"); }
.icon-server { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16v6H4V4Zm0 10h16v6H4v-6Zm3-8v2h2V6H7Zm0 10v2h2v-2H7Z'/%3E%3C/svg%3E"); }
.icon-layers { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3 9 5-9 5-9-5 9-5Zm-6.8 9L12 15.8 18.8 12 21 13.2l-9 5-9-5L5.2 12Zm0 5L12 20.8 18.8 17 21 18.2l-9 5-9-5L5.2 17Z'/%3E%3C/svg%3E"); }
.icon-wifi { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 18.5 15 22H9l3-3.5ZM3 9.5a14 14 0 0 1 18 0l-2 2a11 11 0 0 0-14 0l-2-2Zm4 4a8 8 0 0 1 10 0l-2.1 2.1a5 5 0 0 0-5.8 0L7 13.5Z'/%3E%3C/svg%3E"); }
.icon-scale { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 3h2v3h6v2h-2.2l3.2 7h-8l3.2-7H13v11h4v2H7v-2h4V8H8.8l3.2 7H4l3.2-7H5V6h6V3ZM7.1 13h1.8L8 11l-.9 2Zm8 0h1.8l-.9-2-.9 2Z'/%3E%3C/svg%3E"); }
.icon-globe { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2c-1 1.2-1.7 2.8-2 5h4c-.3-2.2-1-3.8-2-5ZM4.3 13a8 8 0 0 0 2.4 4.8A16 16 0 0 1 6 13H4.3Zm1.7-2c.1-1.8.4-3.4.8-4.8A8 8 0 0 0 4.3 11H6Zm4 2c.3 3 .9 5.2 2 7 1.1-1.8 1.7-4 2-7h-4Zm4-2c-.3-3-.9-5.2-2-7-1.1 1.8-1.7 4-2 7h4Zm3.2 2c-.1 1.8-.4 3.4-.8 4.8a8 8 0 0 0 2.4-4.8h-1.6Zm1.6-2a8 8 0 0 0-2.4-4.8c.4 1.4.7 3 .8 4.8h1.6Z'/%3E%3C/svg%3E"); }
.icon-lock { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V8a5 5 0 0 1 10 0v2h2v11H5V10h2Zm2 0h6V8a3 3 0 0 0-6 0v2Zm2 4v3h2v-3h-2Z'/%3E%3C/svg%3E"); }
.icon-link { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 12a4 4 0 0 1 4-4h3v2h-3a2 2 0 0 0 0 4h3v2h-3a4 4 0 0 1-4-4Zm1 1H5a3 3 0 0 1 0-6h4V5H5a5 5 0 0 0 0 10h4v-2Zm6 4h4a5 5 0 0 0 0-10h-4v2h4a3 3 0 0 1 0 6h-4v2Z'/%3E%3C/svg%3E"); }
.icon-tunnel { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 19V9a8 8 0 0 1 16 0v10h-2V9A6 6 0 0 0 6 9v10H4Zm5 0V9a3 3 0 0 1 6 0v10h-2V9a1 1 0 0 0-2 0v10H9Z'/%3E%3C/svg%3E"); }
.icon-sensor { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a7 7 0 0 1 7 7v3h2v2h-2v4h-2v-4h-4v4h-2v-4H7v4H5v-4H3v-2h2v-3a7 7 0 0 1 7-7Zm-5 10h10v-3a5 5 0 0 0-10 0v3Zm3-4h2v2h-2V9Zm4 0h2v2h-2V9Z'/%3E%3C/svg%3E"); }
.icon-ban { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 0 0-6.3 12.9L16.9 5.7A8 8 0 0 0 12 4Zm6.3 3.1L7.1 18.3A8 8 0 0 0 18.3 7.1Z'/%3E%3C/svg%3E"); }
.icon-box { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2 9 5v10l-9 5-9-5V7l9-5Zm0 2.3L6.1 7.5 12 10.7l5.9-3.2L12 4.3Zm-7 5V16l6 3.3v-6.8L5 9.3Zm14 0-6 3.2v6.8l6-3.3V9.3Z'/%3E%3C/svg%3E"); }
.icon-code { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m8 7 2 1.4L7.6 12l2.4 3.6L8 17l-4-5 4-5Zm8 0 4 5-4 5-2-1.4 2.4-3.6L14 8.4 16 7Zm-3.2-1 2 .5L11.2 18l-2-.5L12.8 6Z'/%3E%3C/svg%3E"); }
.icon-chart { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 19h16v2H2V3h2v16Zm3-2V9h3v8H7Zm5 0V5h3v12h-3Zm5 0v-6h3v6h-3Z'/%3E%3C/svg%3E"); }
.icon-cert { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l5 5v15H6V2Zm8 2H8v16h10V8h-4V4Zm-3 8h4v2h-4v-2Zm0 4h5v2h-5v-2ZM9 8h3v3H9V8Z'/%3E%3C/svg%3E"); }
.icon-package { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6 12 2l8 4v12l-8 4-8-4V6Zm8-1.8L7.7 6.3 12 8.4l4.3-2.1L12 4.2ZM6 8v8.8l5 2.5V10.2L6 8Zm12 0-5 2.2v9.1l5-2.5V8Z'/%3E%3C/svg%3E"); }
.icon-gauge { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4a10 10 0 0 1 10 10c0 2.1-.6 4-1.7 5.6l-1.7-1.1A8 8 0 1 0 5.4 18.5l-1.7 1.1A10 10 0 0 1 12 4Zm5 5-4 6h-2l3-7 3 1Z'/%3E%3C/svg%3E"); }
.icon-wrench { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 6.5a6.5 6.5 0 0 1-8.1 6.3L6.7 20 4 17.3l7.2-7.2A6.5 6.5 0 0 1 17.5 2l-3.1 3.1 4.5 4.5L22 6.5Z'/%3E%3C/svg%3E"); }
.icon-router { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 10h14a3 3 0 0 1 3 3v5H2v-5a3 3 0 0 1 3-3Zm-1 6h16v-3a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v3Zm3-2h2v2H7v-2Zm4 0h2v2h-2v-2Zm5 0h2v2h-2v-2ZM8 6a6 6 0 0 1 8 0l-1.5 1.5a4 4 0 0 0-5 0L8 6Zm-3-3a10 10 0 0 1 14 0l-1.4 1.4a8 8 0 0 0-11.2 0L5 3Z'/%3E%3C/svg%3E"); }
.icon-switch { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6h18v12H3V6Zm2 2v8h14V8H5Zm2 2h2v2H7v-2Zm4 0h2v2h-2v-2Zm4 0h2v2h-2v-2Zm-8 4h10v1H7v-1Z'/%3E%3C/svg%3E"); }
.icon-plug { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h2v5h2V2h2v5h2V2h2v7a5 5 0 0 1-4 4.9V22h-2v-8.1A5 5 0 0 1 7 9V2Z'/%3E%3C/svg%3E"); }
.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 17rem;
    gap: 1.2rem;
    align-items: stretch;
    margin-bottom: 1.1rem;
}
.home-hero__content,
.home-hero__panel,
.quick-card {
    border: 1px solid rgba(34,211,238,0.12);
    background: linear-gradient(180deg, rgba(14,21,41,0.86), rgba(10,16,31,0.72));
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
}
.home-hero__content { padding: 1.55rem; }
.eyebrow {
    color: var(--accent);
    font: 700 0.72rem 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 0.65rem;
}
.home-lead { color: var(--text); font-size: 1rem; margin: 0.8rem 0 1.15rem; }
.home-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.home-actions a {
    min-height: 2.35rem;
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(34,211,238,0.16);
    border-radius: 999px;
    background: rgba(34,211,238,0.06);
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
}
.home-hero__panel {
    padding: 1.15rem;
    display: grid;
    align-content: center;
    gap: 0.8rem;
}
.home-hero__panel div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.65rem;
}
.home-hero__panel div:last-child { border-bottom: 0; padding-bottom: 0; }
.home-hero__panel span { color: var(--text-secondary); font-size: 0.78rem; }
.home-hero__panel strong { color: var(--text-bright); font: 700 0.86rem 'JetBrains Mono', monospace; text-align: right; }
.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 1.25rem 0 2.2rem;
}
.quick-card {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    color: var(--text-bright);
    text-decoration: none;
    transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.quick-card:hover {
    transform: translateY(-2px);
    border-color: rgba(34,211,238,0.28);
    background: linear-gradient(180deg, rgba(18,29,52,0.92), rgba(11,20,38,0.78));
}
.quick-card strong { display: block; font-size: 0.92rem; line-height: 1.25; margin-bottom: 0.25rem; }
.quick-card small { display: block; color: var(--text-secondary); line-height: 1.45; }
@media (max-width: 900px) {
    .home-hero { grid-template-columns: 1fr; }
    .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .home-hero__content { padding: 1.05rem; }
    .home-actions a { width: 100%; justify-content: center; }
    .quick-grid { grid-template-columns: 1fr; }
}
/* === Codex Hub Icons end === */
