body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
.doc-sidebar {
    position: sticky;
    top: 20px;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 20px;
    height: fit-content;
}
.doc-sidebar .nav-link {
    color: #475569;
    padding: 8px 15px;
    border-left: 3px solid transparent;
    border-radius: 0;
}
.doc-sidebar .nav-link:hover,
.doc-sidebar .nav-link.active {
    color: #3157D5;
    background: #eef2ff;
    border-left-color: #3157D5;
}
.doc-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    font-family: "Consolas", "Monaco", monospace;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 15px 0;
    line-height: 1.5;
}
.code-block pre {
    margin: 0;
    font-family: inherit;
    white-space: pre-wrap;
}
.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3157D5, #1e3a8a);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 15px;
}
.method {
    background: #f1f5f9;
    border-left: 4px solid #3157D5;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}
.method h5 {
    color: #3157D5;
}
.api-endpoint {
    background: #e2e8f0;
    padding: 10px 15px;
    border-radius: 5px;
    font-family: monospace;
    margin: 10px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #3157D5 100%);
    color: white;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero-section::after {
    content: ""; position: absolute; top: -140px; right: -100px;
    width: 460px; height: 460px; border-radius: 50%;
    background: radial-gradient(circle, rgba(129,140,248,.4) 0%, transparent 65%);
    pointer-events: none;
}
.hero-section .container { position: relative; z-index: 1; }
.hero-section h1, .hero-section .lead, .hero-section p { color: #fff; }
.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px; padding: .4rem .95rem;
    font-size: .78rem; font-weight: 700; color: #e0e7ff; margin-bottom: 1.1rem;
}
.principle-card {
    background: #f8fafc !important;
    border-radius: 16px !important;
    padding: 32px 28px !important;
    height: 100% !important;
    border: 1px solid #f1f5f9 !important;
    transition: all 0.2s ease !important;
}
.principle-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05) !important;
}
.principle-header {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin-bottom: 18px !important;
}
.principle-icon-box {
    width: 54px !important;
    height: 54px !important;
    background: #0066cc !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    font-size: 22px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25) !important;
}
.principle-title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
}
.principle-desc {
    color: #475569 !important;
    font-size: 0.96rem !important;
    line-height: 1.55 !important;
    margin-bottom: 16px !important;
}
.principle-list {
    padding-left: 22px !important;
    margin: 0 !important;
    color: #334155 !important;
    font-size: 0.93rem !important;
    line-height: 1.65 !important;
}
.principle-list li {
    margin-bottom: 4px !important;
}
.law-badge {
    display: inline-block;
    background: #e2e8f0;
    padding: 5px 15px;
    border-radius: 20px;
    margin: 5px;
    font-size: 0.9rem;
}
/* Search specific styles */
.search-highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    color: #856404;
}
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}
.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
}
.search-result-item:hover {
    background-color: #f1f5f9;
}
.search-result-item:last-child {
    border-bottom: none;
}
.search-result-title {
    font-weight: 600;
    color: #3157D5;
    margin-bottom: 5px;
}
.search-result-text {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.4;
}
.search-no-results {
    padding: 20px;
    text-align: center;
    color: #64748b;
    font-style: italic;
}
.search-result-count {
    padding: 10px 15px;
    background: #f1f5f9;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.85rem;
    color: #64748b;
}
.search-container {
    position: relative;
}
.search-clear {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    display: none;
}
.search-clear:hover {
    color: #ef4444;
}
.active-search-term {
    animation: highlightPulse 2s ease;
}
@keyframes highlightPulse {
    0% { background-color: #fff3cd; }
    100% { background-color: transparent; }
}

/* ═══════ Small-screen tuning (added 2026-08-20) ═══════ */
@media (max-width: 575.98px) {
    /* 30px content padding + 32px card padding are heavy on a 360px screen. */
    .doc-content { padding: 1.15rem; }
    .principle-card { padding: 20px 16px !important; }
    .principle-header { gap: 12px !important; margin-bottom: 14px !important; }
    .principle-icon-box { width: 46px !important; height: 46px !important; font-size: 19px !important; }
    .principle-title { font-size: 1.2rem !important; }
    .hero-section { padding: 3rem 0 2.25rem; }
    .code-block { padding: 14px; }
    .feature-icon { width: 48px; height: 48px; font-size: 20px; }
}
