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

.extension-list-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: clamp(0.35rem, 1vw, 0.45rem) clamp(0.65rem, 2vw, 0.9rem);
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.extension-list-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    text-decoration: none;
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    line-height: 1.7;
    color: #050618;
    font-weight: 500;
}

/* ── HEADER ── */
.header {
    background: var(--brand-primary);
    width: 100%;
    display: flex;
    align-items: center;
    padding-top: 0.7rem;
    padding-bottom: 0.3rem;
    padding-left: 3rem;
    padding-right: 3rem;
    color: rgb(255 255 255);
    font-size: 1.2rem;
    line-height: 1.5rem;
    position: fixed;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    gap: 1rem;
}

.header-left a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header h1 {
    font-size: 1.4rem;
    line-height: 1.7rem;
    font-weight: 500;
    color: rgb(255 255 255);
    margin: 0;
    text-align: left;
}

.powered-by {
    height: 3.5rem;
    margin-top: -0.25rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.9rem;
}

.user-email { color: white; font-weight: 500; }

.logout-btn {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.header-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.header-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    text-decoration: none;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
}

.nav-link:hover { background: rgba(255, 255, 255, 0.1); }

.header.customer-navbar {
    background: var(--brand-primary);
    padding: 18px 3rem;
    align-items: center;
    font-size: 1.2rem;
    line-height: 1.5rem;
}

.header.customer-navbar .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.header.customer-navbar .header-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1 1 auto;
    padding: 0;
    min-height: 0;
    margin: 0;
}

.header.customer-navbar .header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
    flex: 0 0 auto;
    padding: 0;
    margin: 0;
}

.header.customer-navbar h1,
.header.customer-navbar h1 a {
    font-size: 1.26rem;
    line-height: 1.2;
    font-weight: 500;
    color: #fff;
    margin: 0;
    text-decoration: none;
}

.header.customer-navbar .powered-by {
    height: 24px;
    width: auto;
    margin: 0;
    display: block;
}

.header.customer-navbar .user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-size: 0.875rem;
}

.header.customer-navbar .extension-list-btn,
.header.customer-navbar .logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: transparent;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin: 0;
}

.header.customer-navbar .extension-list-btn:hover,
.header.customer-navbar .logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: transparent;
    color: #fff;
    text-decoration: none;
}

/* ── HERO ── */
.hero-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 84px 2rem 0 2rem;
}

.hero-card {
    display: flex;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.hero-content {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-image {
    flex: 0 0 40%;
    max-width: 40%;
    position: relative;
    overflow: hidden;
}

.hero-image img {
    width: calc(100% - 1.5rem);
    height: 330px;
    object-fit: cover;
    border-radius: 12px;
    margin: 1.5rem;
    margin-left: 0;
}

.hero-category {
    display: inline-block;
    color: #e85a2a;
    font-size: 0.85rem;
    font-weight: 500;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 1.75rem;
    color: #050618;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.hero-subtitle {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
}

.hero-meta {
    margin-top: 1rem;
    color: #64748b;
    font-size: 0.9rem;
}

/* ── LAYOUT ── */
.content-wrapper {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    gap: 2rem;
}

/* ── SIDEBAR TOC ── */
.sidebar {
    width: 260px;
    flex-shrink: 0;
}

.toc-container {
    position: sticky;
    top: 84px;
    background: rgba(21, 80, 198, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.toc-container::-webkit-scrollbar {
    display: none;
}

.toc-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.toc-list { list-style: none; }

.toc-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    color: #050618;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(21, 80, 198, 0.1);
    transition: color 0.2s;
}

.toc-item:last-child .toc-link { border-bottom: none; }
.toc-link:hover { color: var(--brand-primary); }
.toc-link.active { color: var(--brand-primary); }
.toc-arrow { opacity: 0; color: var(--brand-primary); }
.toc-link.active .toc-arrow { opacity: 1; }

.toc-item.level-3 .toc-link {
    padding-left: 0.75rem;
    font-size: 0.8rem;
    color: #5b6f98;
}

.toc-item.level-3 .toc-link:hover,
.toc-item.level-3 .toc-link.active {
    color: var(--brand-primary);
}

/* ── MAIN CONTENT ── */
.main-content {
    flex: 1;
    min-width: 0;
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.article-content h1 {
    font-size: 1.55rem;
    font-weight: 700;
    color: #1a1a2e;
    padding-bottom: 1.3rem;
    scroll-margin-top: 84px;
}

.article-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 2.5rem 0 1rem 0;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    scroll-margin-top: 84px;
}

.article-content h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.article-content hr + h2 {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.article-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 1.5rem 0 0.75rem 0;
}

.article-content p {
    color: #050618;
    margin: 0 0 22.4px 0;
    font-size: 16px;
    line-height: 200%;
    letter-spacing: .02em;
    font-weight: 400;
}

.article-content ul, .article-content ol {
    margin: 1rem 0 1.5rem 1.75rem;
    color: #050618;
}

.article-content li {
    margin-bottom: 0.5rem;
    font-size: 16px;
    line-height: 200%;
    letter-spacing: .02em;
    font-weight: 400;
}

.article-content a { color: #2563eb; text-decoration: none; }
.article-content a:hover { text-decoration: underline; }
.article-content strong { color: #1a1a2e; font-weight: 600; }

/* ══════════════════════════════════════════
    HIGHLIGHTED TABLES
    ══════════════════════════════════════════ */
.article-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.75rem 0;
    font-size: 0.93rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(52, 46, 124, 0.10), 0 1px 4px rgba(52,46,124,0.07);
    border: 1.5px solid #c7c3e8;
}

.article-content table thead tr {
    background: linear-gradient(90deg, var(--brand-primary) 0%, #4a3fa0 100%);
}

.article-content table th {
    padding: 0.78rem 1rem;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffffff;
    border-bottom: 2px solid rgba(255,255,255,0.15);
    border-right: 1px solid rgba(255,255,255,0.10);
    white-space: nowrap;
}

.article-content table th:last-child { border-right: none; }

.article-content table td {
    padding: 0.72rem 1rem;
    text-align: left;
    border-bottom: 1px solid #ebe9f8;
    border-right: 1px solid #ebe9f8;
    color: #1a1a2e;
    vertical-align: top;
    transition: background 0.15s;
}

.article-content table td:last-child { border-right: none; }

.article-content table tbody tr:last-child td { border-bottom: none; }

.article-content table tbody tr:nth-child(odd)  { background: #ffffff; }
.article-content table tbody tr:nth-child(even) { background: #f4f2fd; }

.article-content table tbody tr:hover td { background: #eae7f8; }

.article-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2rem 0;
    height: 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
}

.article-content blockquote {
    border-left: 4px solid var(--brand-primary);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #f8f8ff;
    border-radius: 0 8px 8px 0;
    color: #1a1a2e;
    font-size: 0.95rem;
}

.article-content blockquote p { margin: 0; font-weight: 500; }
.article-content blockquote strong { color: var(--brand-primary); }

/* ══════════════════════════════════════════
    DARK BLUE CODE BLOCKS WITH HEADER
    ══════════════════════════════════════════ */

.code-block {
    margin: 1.75rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(10, 25, 60, 0.22);
    border: 1px solid #1a3558;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0d2137;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #1a3558;
    gap: 1rem;
}

.code-block-header .cb-dots {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.cb-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.cb-dots .dot-red   { background: #ff5f57; }
.cb-dots .dot-amber { background: #ffbd2e; }
.cb-dots .dot-green { background: #28c840; }

.cb-filename {
    font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
    font-size: 0.78rem;
    color: #7eb8f7;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cb-badge {
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.cb-badge-red {
    color: #ff7b6b;
    background: rgba(255, 90, 70, 0.13);
    border: 1px solid rgba(255, 90, 70, 0.35);
}

.cb-badge-amber {
    color: #ffc36b;
    background: rgba(255, 180, 50, 0.12);
    border: 1px solid rgba(255, 180, 50, 0.35);
}

.code-block pre {
    margin: 0;
    background: #0a1929;
    padding: 1.25rem 1.35rem;
    overflow-x: auto;
    border: none;
    border-radius: 0;
    box-shadow: none;
    
    ::-webkit-scrollbar {
        display: none;
        width: 0px;
    }

    scrollbar-width: none;
    -ms-overflow-style: none; 
}

.code-block pre code {
    background: transparent;
    padding: 0;
    border: none;
    font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.8;
    color: #cdd9e5;
    display: block;
}

/* Fallback for non-enhanced pre blocks */
.article-content pre:not(.code-block pre) {
    margin: 1.75rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(10, 25, 60, 0.22);
    border: 1px solid #1a3558;
    background: #0a1929;
    padding: 1.25rem 1.35rem;
    overflow-x: auto;
}

.article-content pre:not(.code-block pre) code {
    background: transparent;
    padding: 0;
    border: none;
    font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.8;
    color: #cdd9e5;
    display: block;
}

/* Syntax highlighting overrides for dark blue theme */
.code-block pre code.hljs {
    background: transparent;
    padding: 0;
}

.hljs-keyword { color: #79c0ff; }
.hljs-string { color: #a5d6a7; }
.hljs-number { color: #f0a070; }
.hljs-comment { color: #4a7090; font-style: italic; }
.hljs-function .hljs-title { color: #82aaff; }
.hljs-built_in { color: #82aaff; }
.hljs-variable { color: #cdd9e5; }
.hljs-attr { color: #79c0ff; }
.hljs-property { color: #cdd9e5; }
.hljs-literal { color: #f0a070; }
.hljs-regexp { color: #a5d6a7; }
.hljs-selector-class { color: #82aaff; }
.hljs-selector-tag { color: #79c0ff; }
.hljs-name { color: #79c0ff; }
.hljs-attribute { color: #a5d6a7; }
.hljs-punctuation { color: #8b949e; }

/* Inline code (outside code-blocks) */
.article-content p code,
.article-content li code,
.article-content td code {
    background: #f4f4f4;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.9em;
    color: #050618;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .hero-section { padding: 90px 1rem 0 1rem; }
    .hero-card { flex-direction: column; }
    .hero-image { flex: none; max-width: 100%; }
    .hero-image img { margin: 1.5rem; width: calc(100% - 3rem); }
    .content-wrapper { padding: 2rem 1rem; }
}

@media (max-width: 600px) {
    .header { padding: 0.7rem 1rem 0.3rem 1rem; }
    .hero-content { padding: 1.5rem; }
    .hero-title { font-size: 1.4rem; }
    .main-content { padding: 1.5rem; }
}

@media (min-width: 1600px) {
    .hero-section { max-width: 1500px; }
    .content-wrapper { max-width: 1500px; }
}

/* @media (min-width: 1920px) {
    .hero-section { max-width: 1800px; }
    .content-wrapper { max-width: 1800px; }
}

@media (min-width: 2400px) {
    .hero-section { max-width: 2100px; }
    .content-wrapper { max-width: 2100px; }
    .hero-card { max-height: 320px; }
    .hero-image { flex: 0 0 35%; max-width: 35%; }
    .hero-image img { max-height: 290px; object-fit: contain; }
} */
