/* ===== Variables ===== */
:root {
    --bg-dark: #0a0e17;
    --bg-card: #131928;
    --bg-sidebar: #0d1220;
    --accent: #00c8ff;
    --accent-dim: #0088aa;
    --accent-glow: rgba(0, 200, 255, 0.15);
    --text: #d0d8e8;
    --text-dim: #7a8ba8;
    --text-bright: #ffffff;
    --border: #1e2a40;
    --green: #00e676;
    --orange: #ff9100;
    --red: #ff5252;
    --yellow: #ffd740;
    --blue: #448aff;
    --cyan: #00e5ff;
    --sidebar-w: 220px;
    --radius: 8px;
    --mobile-header-h: 48px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, 'Segoe UI', 'Noto Sans JP', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}
.logo-icon { font-size: 28px; }
.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}
.logo-text span { font-size: 11px; color: var(--text-dim); font-weight: 400; }

/* Search Box */
.search-box {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.search-box input, .search-mobile {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.search-box input:focus, .search-mobile:focus {
    border-color: var(--accent);
}
.search-box input::placeholder, .search-mobile::placeholder {
    color: var(--text-dim);
}

.nav-list { list-style: none; padding: 8px 0; flex: 1; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    min-height: 44px;
}
.nav-link:hover { color: var(--text); background: var(--accent-glow); }
.nav-link.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: var(--accent-glow);
}
.nav-icon { font-size: 16px; }

/* ===== Mobile Header ===== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--mobile-header-h);
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    z-index: 90;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
}
.hamburger {
    background: none;
    border: none;
    color: var(--text);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mobile-title {
    font-weight: 700;
    color: var(--accent);
    font-size: 15px;
    white-space: nowrap;
}
.search-mobile {
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
    min-width: 0;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}
.sidebar-overlay.show { display: block; }

/* ===== Content ===== */
.content {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 0;
    min-height: 100vh;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    padding: 60px 40px 40px;
    background: linear-gradient(135deg, #0a1628, #0d1f3c);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0.4;
    pointer-events: none;
}
.circuit-svg { width: 100%; height: 100%; }
.circuit-line {
    stroke: var(--accent);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawLine 1.5s ease forwards;
}
.cl-1 { animation-delay: 0s; }
.cl-2 { animation-delay: 0.8s; }
.cl-3 { animation-delay: 0.3s; }
.cl-4 { animation-delay: 0.5s; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
.tester-box, .ecu-box { fill: var(--bg-card); stroke: var(--accent); stroke-width: 2; }
.box-label { fill: var(--accent); font-size: 16px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; }
svg .byte-label { fill: var(--yellow); font-family: 'Consolas', monospace; font-size: 13px; text-anchor: middle; opacity: 0; animation: fadeIn 0.5s ease forwards; }
.bl-1 { animation-delay: 0.6s; }
.bl-2 { animation-delay: 1.4s; }
.bl-3 { animation-delay: 1.0s; }
.arrow-head { fill: var(--accent); opacity: 0; animation: fadeIn 0.3s ease forwards; }
.ah-1 { animation-delay: 0.5s; }
.ah-2 { animation-delay: 1.3s; }
.sid-badge { fill: var(--green); opacity: 0.2; stroke: var(--green); stroke-width: 1; }
.sid-text { fill: var(--green); font-size: 14px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; }
.nrc-badge-svg { fill: var(--red); opacity: 0.2; stroke: var(--red); stroke-width: 1; }
.nrc-text { fill: var(--red); font-size: 14px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; }
@keyframes fadeIn { to { opacity: 1; } }
.hero-title { position: relative; font-size: 32px; color: var(--text-bright); margin-bottom: 8px; }
.hero-tagline { position: relative; font-size: 16px; color: var(--text-dim); }

/* ===== Sections ===== */
.overview-section, .categories-section, .spec-section, .sources-section {
    padding: 32px 40px;
    border-bottom: 1px solid var(--border);
}
.overview-desc { font-size: 15px; line-height: 1.8; max-width: 720px; }
.section-desc { font-size: 14px; color: var(--text-dim); margin-bottom: 20px; max-width: 640px; }
h2 { font-size: 20px; color: var(--text-bright); margin-bottom: 20px; padding-left: 12px; border-left: 3px solid var(--accent); }
h3 { font-size: 16px; color: var(--text-bright); margin: 16px 0 12px; }

/* Key Points */
.point-list { list-style: none; margin-top: 16px; }
.point-item { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; font-size: 14px; }
.point-bullet { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; flex-shrink: 0; margin-top: 6px; }

/* Category Grid */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.category-card {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    text-decoration: none; color: var(--text); transition: all 0.2s; cursor: pointer;
}
.category-card:hover { border-color: var(--accent); background: var(--accent-glow); }
.cat-icon { font-size: 24px; }
.cat-name { flex: 1; font-size: 14px; font-weight: 600; }
.cat-arrow { color: var(--accent-dim); font-size: 18px; }

/* ===== Page Header ===== */
.page-header {
    padding: 40px 40px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #0a1628, #0d1f3c);
}
.page-icon { font-size: 36px; display: block; margin-bottom: 12px; }
.page-header h1 { font-size: 28px; color: var(--text-bright); margin-bottom: 8px; border: none; padding: 0; }
.page-desc { font-size: 14px; color: var(--text-dim); max-width: 640px; }

/* ===== Protocol Stack ===== */
.sw-stack { max-width: 560px; }
.sw-layer { display: flex; align-items: stretch; margin-bottom: 4px; }
.sw-layer-name {
    width: 160px; background: var(--accent-dim); color: var(--text-bright);
    font-size: 13px; font-weight: 600; padding: 12px; display: flex; align-items: center;
    border-radius: var(--radius) 0 0 var(--radius);
}
.sw-layer:nth-child(2) .sw-layer-name { background: #2a6b4a; }
.sw-layer:nth-child(3) .sw-layer-name { background: #4a3a6b; }
.sw-layer:nth-child(4) .sw-layer-name { background: #6b4a3a; }
.sw-layer-info {
    flex: 1; background: var(--bg-card); border: 1px solid var(--border); border-left: none;
    border-radius: 0 var(--radius) var(--radius) 0; padding: 12px;
    display: flex; flex-direction: column; justify-content: center;
}
.sw-provider { font-size: 13px; font-weight: 600; color: var(--text-bright); }
.sw-desc { font-size: 12px; color: var(--text-dim); }

/* ===== History Timeline ===== */
.history-timeline { max-width: 560px; }
.history-item { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.history-year { min-width: 70px; font-weight: 700; color: var(--accent); font-size: 14px; }
.history-event { font-size: 14px; }

/* ===== Byte Format Display ===== */
.byte-format { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.byte-field {
    background: var(--bg-card); border: 2px solid var(--field-color, var(--accent));
    border-radius: var(--radius); padding: 12px; text-align: center; min-width: 80px; flex: 1;
}
.field-name { font-weight: 700; color: var(--field-color, var(--accent)); font-size: 14px; margin-bottom: 4px; font-family: 'Consolas', monospace; }
.field-size { font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.field-desc { font-size: 12px; color: var(--text); }

/* ===== Byte Examples ===== */
.examples-list { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.byte-example { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.example-name { font-weight: 600; color: var(--text-bright); margin-bottom: 10px; font-size: 14px; }
.byte-row { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.byte-row.compact { gap: 4px; }
.byte-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.byte-cell.sm .byte-val { padding: 4px 6px; font-size: 13px; }
.byte-val {
    font-family: 'Consolas', monospace; font-size: 15px; font-weight: 700; color: var(--green);
    background: rgba(0, 230, 118, 0.1); padding: 6px 10px; border-radius: 4px; display: inline-block;
}
.byte-cell .byte-label {
    font-size: 10px; color: var(--text-dim); text-align: center; max-width: 80px;
    fill: unset; opacity: 1; animation: none;
}
.example-desc { font-size: 13px; color: var(--text-dim); font-style: italic; }

/* ===== Session Cards ===== */
.session-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.session-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-top: 3px solid var(--session-color, var(--accent)); border-radius: var(--radius); padding: 20px;
}
.session-header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.session-id {
    font-family: 'Consolas', monospace; font-weight: 700; color: var(--session-color, var(--accent));
    font-size: 14px; background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 4px;
}
.session-name { font-size: 13px; font-weight: 600; color: var(--text-bright); font-family: 'Consolas', monospace; }
.session-name-ja { font-size: 16px; font-weight: 700; color: var(--text-bright); margin-bottom: 8px; }
.session-desc { font-size: 13px; margin-bottom: 12px; }
.session-scenario { font-size: 12px; color: var(--text-dim); background: rgba(255,255,255,0.03); padding: 8px 12px; border-radius: 4px; margin-bottom: 10px; }
.session-sids { font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* ===== Tags ===== */
.sid-tag {
    font-family: 'Consolas', monospace; font-size: 11px; padding: 2px 6px;
    background: var(--accent-glow); border: 1px solid var(--accent-dim); border-radius: 10px; color: var(--accent);
}

/* ===== Sequence Flow ===== */
.sequence-flow { max-width: 520px; }
.seq-step {
    display: flex; gap: 12px; padding: 12px 16px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
}
.seq-num {
    width: 28px; height: 28px; background: var(--accent); color: var(--bg-dark);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.seq-body { flex: 1; }
.seq-action { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.seq-send { color: var(--green); }
.seq-recv { color: var(--cyan); }
.seq-desc { font-size: 13px; color: var(--text); margin-top: 4px; }
.seq-detail { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.flow-arrow { text-align: center; color: var(--accent-dim); font-size: 12px; padding: 2px 0; }

/* ===== Level Table ===== */
.level-table { max-width: 480px; }
.level-row { display: flex; gap: 12px; padding: 10px; border-bottom: 1px solid var(--border); align-items: center; }
.level-id { font-family: 'Consolas', monospace; font-size: 13px; color: var(--accent); width: 80px; flex-shrink: 0; }
.level-name { font-weight: 600; font-size: 13px; color: var(--text-bright); width: 80px; flex-shrink: 0; }
.level-use { font-size: 13px; color: var(--text-dim); }

/* ===== Timing ===== */
.timing-params { max-width: 560px; }
.timing-row { display: flex; gap: 12px; padding: 10px; border-bottom: 1px solid var(--border); align-items: center; }
.timing-name { font-family: 'Consolas', monospace; font-weight: 600; color: var(--accent); width: 100px; flex-shrink: 0; }
.timing-value { font-weight: 700; color: var(--text-bright); width: 80px; flex-shrink: 0; }
.timing-desc { font-size: 13px; color: var(--text-dim); }

/* ===== SID Section ===== */
.sid-section h2 { display: flex; align-items: center; gap: 10px; }
.sid-hex {
    font-family: 'Consolas', monospace; font-size: 16px; color: var(--green);
    background: rgba(0, 230, 118, 0.1); padding: 4px 10px; border-radius: 4px;
}
.sid-name-ja { font-size: 15px; color: var(--text-dim); margin-bottom: 8px; }
.sid-desc { font-size: 14px; margin-bottom: 16px; max-width: 640px; }

/* SubFunction Table */
.subfunc-table { margin-bottom: 16px; max-width: 640px; overflow-x: auto; }
.subfunc-header {
    display: grid; grid-template-columns: 70px 200px 1fr; gap: 8px; padding: 8px 12px;
    background: var(--border); border-radius: var(--radius) var(--radius) 0 0;
    font-size: 12px; font-weight: 600; color: var(--text-dim);
}
.subfunc-row {
    display: grid; grid-template-columns: 70px 200px 1fr; gap: 8px; padding: 8px 12px;
    border-bottom: 1px solid var(--border); font-size: 13px;
}
.subfunc-id { font-family: 'Consolas', monospace; color: var(--accent); font-weight: 600; }
.subfunc-name { font-family: 'Consolas', monospace; color: var(--text-bright); font-size: 12px; }
.subfunc-desc { color: var(--text-dim); }

/* Request/Response Pair */
.req-resp-pair { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.req-box, .resp-box {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px 16px; min-width: 160px; flex: 1;
}
.req-box { border-top: 2px solid var(--green); }
.resp-box { border-top: 2px solid var(--cyan); }
.rr-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.req-box .rr-label { color: var(--green); }
.resp-box .rr-label { color: var(--cyan); }
.rr-meaning { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.rr-arrow { font-size: 24px; color: var(--accent-dim); }

/* SID Scenario & Notes */
.sid-scenario {
    font-size: 13px; background: rgba(255,255,255,0.03); padding: 12px 16px;
    border-radius: var(--radius); margin-bottom: 12px; border-left: 3px solid var(--orange);
}
.safety-note {
    font-size: 13px; background: rgba(255,82,82,0.08); border: 1px solid rgba(255,82,82,0.3);
    padding: 10px 16px; border-radius: var(--radius); margin-bottom: 12px; color: var(--red);
}
.sid-note { font-size: 12px; color: var(--text-dim); font-style: italic; margin-bottom: 12px; }
.sid-meta { display: flex; gap: 20px; font-size: 12px; color: var(--text-dim); flex-wrap: wrap; }
.nrc-link {
    font-family: 'Consolas', monospace; color: var(--red); text-decoration: none;
    padding: 1px 4px; background: rgba(255,82,82,0.08); border-radius: 3px; cursor: pointer;
}
.nrc-link:hover { background: rgba(255,82,82,0.2); }

/* DID Table */
.did-table { margin: 16px 0; max-width: 640px; overflow-x: auto; }
.did-row { display: grid; grid-template-columns: 90px 220px 1fr; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.did-id { font-family: 'Consolas', monospace; color: var(--accent); font-weight: 600; }
.did-name { font-family: 'Consolas', monospace; color: var(--text-bright); font-size: 12px; }
.did-desc { color: var(--text-dim); }

/* ===== DTC Status Bits ===== */
.status-bits { margin: 16px 0; max-width: 560px; }
.bit-row { display: grid; grid-template-columns: 50px 200px 1fr; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.bit-num { font-family: 'Consolas', monospace; color: var(--accent); font-weight: 600; }
.bit-name { font-family: 'Consolas', monospace; color: var(--text-bright); font-size: 12px; }
.bit-desc { color: var(--text-dim); }

/* ===== UDS Sequence ===== */
.uds-sequence { max-width: 520px; }
.uds-step {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
}
.uds-sid {
    font-family: 'Consolas', monospace; font-size: 13px; font-weight: 700; color: var(--green);
    background: rgba(0,230,118,0.1); padding: 4px 8px; border-radius: 4px; flex-shrink: 0; white-space: nowrap;
}
.uds-step-body { display: flex; flex-direction: column; gap: 2px; }
.uds-service { font-size: 13px; font-weight: 600; color: var(--text-bright); }
.uds-desc { font-size: 12px; color: var(--text-dim); }

/* ===== NRC Styles ===== */
.nrc-summary { max-width: 640px; max-height: 400px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.nrc-summary-row {
    display: grid; grid-template-columns: 60px 240px 1fr; gap: 8px; padding: 6px 12px;
    border-bottom: 1px solid var(--border); font-size: 13px; transition: background 0.15s;
}
.nrc-summary-row:hover { background: var(--accent-glow); }
.nrc-code { font-family: 'Consolas', monospace; color: var(--red); font-weight: 700; }
.nrc-name-en { font-family: 'Consolas', monospace; color: var(--text-bright); font-size: 11px; }
.nrc-short { color: var(--text-dim); }

.nrc-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; margin-bottom: 12px;
}
.nrc-header { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.nrc-code-big {
    font-family: 'Consolas', monospace; font-size: 20px; font-weight: 700; color: var(--red);
    background: rgba(255,82,82,0.1); padding: 6px 14px; border-radius: var(--radius);
}
.nrc-names { display: flex; flex-direction: column; }
.nrc-name-main { font-family: 'Consolas', monospace; font-size: 14px; color: var(--text-bright); font-weight: 600; }
.nrc-name-ja { font-size: 15px; color: var(--text); }
.nrc-description { font-size: 14px; margin-bottom: 12px; }
.nrc-when, .nrc-fix { font-size: 13px; padding: 8px 12px; border-radius: 4px; margin-bottom: 8px; }
.nrc-when { background: rgba(255,145,0,0.06); border-left: 3px solid var(--orange); }
.nrc-fix { background: rgba(0,230,118,0.06); border-left: 3px solid var(--green); }
.nrc-sids { font-size: 12px; color: var(--text-dim); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* ===== Diagnostic Flow ===== */
.difficulty-badge { font-size: 11px; padding: 2px 10px; border-radius: 12px; font-weight: 600; vertical-align: middle; }
.difficulty-badge.basic { background: rgba(0,230,118,0.15); color: var(--green); }
.difficulty-badge.intermediate { background: rgba(255,145,0,0.15); color: var(--orange); }
.difficulty-badge.advanced { background: rgba(255,82,82,0.15); color: var(--red); }

.diag-flow { max-width: 640px; }
.diag-step { display: flex; gap: 12px; padding: 10px 16px; border-radius: var(--radius); margin-bottom: 4px; }
.diag-step.send { background: rgba(0,230,118,0.05); border-left: 3px solid var(--green); }
.diag-step.recv { background: rgba(0,229,255,0.05); border-left: 3px solid var(--cyan); }
.diag-step.note { background: rgba(255,215,64,0.05); border-left: 3px solid var(--yellow); }
.step-direction { font-size: 12px; font-weight: 700; width: 60px; flex-shrink: 0; }
.send-dir { color: var(--green); }
.recv-dir { color: var(--cyan); }
.note-dir { color: var(--yellow); }
.step-body { flex: 1; }
.step-bytes {
    font-family: 'Consolas', monospace; font-size: 13px; font-weight: 700; color: var(--yellow);
    background: rgba(255,215,64,0.08); padding: 2px 8px; border-radius: 4px; display: inline-block; margin-bottom: 4px;
}
.step-service { font-size: 12px; font-weight: 600; color: var(--text-bright); }
.step-desc { font-size: 12px; color: var(--text-dim); }
.step-note { font-size: 11px; color: var(--orange); font-style: italic; margin-top: 2px; }

/* ===== Sources ===== */
.sources-section { padding: 24px 40px 40px; }
.source-list { list-style: none; }
.source-list li { padding: 6px 0; }
.source-list a { color: var(--accent-dim); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.source-list a:hover { color: var(--accent); }

/* ===== Search Results ===== */
.search-results { padding: 32px 40px; }
.search-results h2 { margin-bottom: 16px; }
.search-result-item {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; margin-bottom: 8px; cursor: pointer; transition: border-color 0.2s;
}
.search-result-item:hover { border-color: var(--accent); }
.search-result-cat { font-size: 11px; color: var(--accent); text-transform: uppercase; margin-bottom: 4px; }
.search-result-title { font-size: 15px; font-weight: 600; color: var(--text-bright); margin-bottom: 4px; }
.search-result-code { font-family: 'Consolas', monospace; color: var(--green); }
.search-result-desc { font-size: 13px; color: var(--text-dim); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .mobile-header { display: flex; }
    .content { margin-left: 0; padding-top: var(--mobile-header-h); }
    .hero { padding: 32px 20px 24px; }
    .hero-title { font-size: 22px; }
    .overview-section, .categories-section, .spec-section, .sources-section { padding: 20px 16px; }
    .page-header { padding: 24px 16px 16px; }
    .page-header h1 { font-size: 22px; }
    .byte-format { flex-direction: column; }
    .byte-field { min-width: unset; }
    .session-cards { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: 1fr; }
    .req-resp-pair { flex-direction: column; }
    .rr-arrow { transform: rotate(90deg); }
    .subfunc-header, .subfunc-row { grid-template-columns: 60px 140px 1fr; font-size: 12px; }
    .did-row { grid-template-columns: 70px 1fr; }
    .did-desc { grid-column: 1 / -1; }
    .nrc-summary-row { grid-template-columns: 50px 1fr; }
    .nrc-name-en { grid-column: 1 / -1; }
    .bit-row { grid-template-columns: 45px 1fr; }
    .bit-desc { grid-column: 1 / -1; }
    .search-results { padding: 20px 16px; }
    .sw-layer { flex-direction: column; }
    .sw-layer-name { width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
    .sw-layer-info { border-left: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); }
}
