/* =============================================================================
   HANDBUCH (Online Manual) Styles
   ============================================================================= */

/* --- Variables --- */
:root {
    --hb-sidebar-width: 300px;
    --hb-sidebar-bg: #1e293b;
    --hb-sidebar-text: #cbd5e1;
    --hb-sidebar-active: #10b981;
    --hb-sidebar-hover: #334155;
    --hb-content-max: 900px;
    --hb-border: #e2e8f0;
}

/* =============================================================================
   INDEX PAGE — Hero & Cards
   ============================================================================= */

.handbuch-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.handbuch-hero {
    text-align: center;
    padding: 3rem 1rem 2.5rem;
}

.handbuch-hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--v5-primary);
    margin-bottom: 0.75rem;
}

.handbuch-hero-subtitle {
    font-size: 1.1rem;
    color: var(--v5-gray-500);
    max-width: 650px;
    margin: 0 auto 2rem;
}

/* Search Box */
.handbuch-search-box {
    max-width: 550px;
    margin: 0 auto;
    position: relative;
}

/* Hero variant — larger, wider */
.handbuch-search-box-hero {
    max-width: 680px;
}

.handbuch-search-box-hero input {
    padding: 14px 18px 14px 46px !important;
    font-size: 1.12rem !important;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(30, 58, 95, 0.08);
}

.handbuch-search-box-hero .handbuch-search-icon {
    left: 16px;
    font-size: 1.1rem;
}

.handbuch-search-box-hero input:focus {
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.1), 0 4px 20px rgba(30, 58, 95, 0.1) !important;
}

/* Keyboard hint inside search input */
.handbuch-search-hint {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    color: #94a3b8 !important;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 8px;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: none;
    font-family: inherit;
    transition: opacity 0.2s;
}

.handbuch-search-input-wrap input:focus ~ .handbuch-search-hint {
    opacity: 0;
}

/* Search input - custom element, no Bootstrap form-control */
.handbuch-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.handbuch-search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

.handbuch-search-input-wrap input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    font-family: inherit;
    font-size: 1.05rem;
    color: #1e293b !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-text-fill-color: #1e293b !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.handbuch-search-input-wrap input:focus {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.1);
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
}

.handbuch-search-input-wrap input::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
}

.handbuch-search-box-large {
    max-width: 700px;
}

.handbuch-search-box-large input {
    padding: 14px 18px 14px 44px;
    font-size: 1.15rem;
}

/* Search Dropdown */
.handbuch-search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--hb-border);
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.handbuch-search-dropdown::-webkit-scrollbar {
    width: 6px;
}

.handbuch-search-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.handbuch-search-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.handbuch-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Results count header */
.handbuch-dropdown-header {
    padding: 0.5rem 1rem;
    font-size: 0.78rem;
    color: #94a3b8;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 10px 10px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.handbuch-search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--v5-gray-700);
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.handbuch-search-result-item:last-child {
    border-bottom: none;
}

.handbuch-search-result-item:hover {
    background: #f8fafc;
    color: var(--v5-primary);
    text-decoration: none;
}

.handbuch-search-result-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 6px;
    color: var(--v5-primary);
    font-size: 0.85rem;
    margin-top: 2px;
}

.handbuch-search-result-item:hover .handbuch-search-result-icon {
    background: var(--v5-primary);
    color: white;
}

.handbuch-search-result-body {
    flex: 1;
    min-width: 0;
}

.handbuch-search-result-body strong {
    display: block;
    color: var(--v5-primary);
    font-size: 0.92rem;
    margin-bottom: 2px;
}

.handbuch-search-result-body small {
    color: var(--v5-gray-500);
    font-size: 0.82rem;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    white-space: pre-line;
}

.handbuch-search-result-item mark {
    background: #fef08a;
    padding: 0 2px;
    border-radius: 2px;
    color: inherit;
}

/* "Show all results" link at bottom */
.handbuch-search-show-all {
    display: block;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: var(--v5-primary);
    text-decoration: none;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    border-radius: 0 0 10px 10px;
    position: sticky;
    bottom: 0;
    font-weight: 500;
}

.handbuch-search-show-all:hover {
    background: #f1f5f9;
    text-decoration: none;
}

/* No results message */
.handbuch-search-no-results {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    color: #94a3b8;
    font-size: 0.9rem;
    gap: 0.5rem;
}

/* Group Titles */
.handbuch-group-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--v5-primary);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--v5-gray-200);
}

.handbuch-group-title:first-of-type {
    margin-top: 1.5rem;
}

/* Chapter Cards Grid */
.handbuch-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.handbuch-card {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--hb-border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    box-shadow: var(--v5-shadow-sm);
}

.handbuch-card:hover {
    border-color: var(--v5-primary);
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.handbuch-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--v5-gray-100);
    border-radius: 10px;
    margin-right: 1.25rem;
    font-size: 1.3rem;
    color: var(--v5-primary);
}

.handbuch-card:hover .handbuch-card-icon {
    background: var(--v5-primary);
    color: white;
}

.handbuch-card-body {
    flex: 1;
    min-width: 0;
}

.handbuch-card-body h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--v5-primary);
    margin: 0 0 0.25rem;
}

.handbuch-card-body p {
    font-size: 0.9rem;
    color: var(--v5-gray-500);
    margin: 0;
}

.handbuch-card-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0.5rem;
}

.handbuch-tag {
    display: inline-block;
    font-size: 0.75rem;
    background: var(--v5-gray-100);
    color: var(--v5-gray-600);
    padding: 2px 8px;
    border-radius: 4px;
}

.handbuch-tag-more {
    background: var(--v5-primary);
    color: white;
    font-weight: 500;
}

.handbuch-card-arrow {
    flex-shrink: 0;
    margin-left: 1rem;
    color: var(--v5-gray-400);
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.handbuch-card:hover .handbuch-card-arrow {
    transform: translateX(4px);
    color: var(--v5-primary);
}


/* =============================================================================
   CHAPTER PAGE — Sidebar + Content Layout
   ============================================================================= */

.handbuch-page-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* --- Sidebar --- */
.handbuch-sidebar {
    width: var(--hb-sidebar-width);
    flex-shrink: 0;
    background: var(--hb-sidebar-bg);
    color: var(--hb-sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
}

.handbuch-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.handbuch-sidebar-home {
    color: white;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
}

.handbuch-sidebar-home:hover {
    color: var(--hb-sidebar-active);
    text-decoration: none;
}

.handbuch-sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--hb-sidebar-text);
    font-size: 1.2rem;
    cursor: pointer;
}

.handbuch-sidebar-search {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.handbuch-sidebar-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.handbuch-sidebar-search-icon {
    position: absolute;
    left: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 2;
}

.handbuch-sidebar-search-wrap input {
    width: 100%;
    padding: 6px 10px 6px 30px;
    font-family: inherit;
    font-size: 0.85rem;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.handbuch-sidebar-search-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.4);
}

.handbuch-sidebar-search-wrap input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--hb-sidebar-active);
    box-shadow: none;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Sidebar inline search results */
.handbuch-sidebar-results {
    display: none;
    margin-top: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    max-height: 50vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.handbuch-sidebar-results::-webkit-scrollbar { width: 4px; }
.handbuch-sidebar-results::-webkit-scrollbar-track { background: transparent; }
.handbuch-sidebar-results::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.handbuch-sb-results-header {
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.handbuch-sb-result {
    display: block;
    padding: 0.5rem 0.6rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s;
}

.handbuch-sb-result:last-child {
    border-bottom: none;
}

.handbuch-sb-result:hover {
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.handbuch-sb-result-title {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: #e2e8f0;
    margin-bottom: 2px;
}

.handbuch-sb-result:hover .handbuch-sb-result-title {
    color: var(--hb-sidebar-active);
}

.handbuch-sb-result-snippet {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.handbuch-sb-result mark {
    background: rgba(254, 240, 138, 0.3);
    color: #fef08a;
    padding: 0 1px;
    border-radius: 2px;
}

.handbuch-sb-show-all {
    display: block;
    text-align: center;
    padding: 0.45rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--hb-sidebar-active);
    text-decoration: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.15s;
}

.handbuch-sb-show-all:hover {
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.handbuch-sb-no-results {
    padding: 0.6rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
}

.handbuch-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.handbuch-sidebar-group {
    padding: 1rem 1rem 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
}

.handbuch-sidebar-item {
    margin: 1px 0;
}

.handbuch-sidebar-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--hb-sidebar-text);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.handbuch-sidebar-link:hover {
    background: var(--hb-sidebar-hover);
    color: white;
    text-decoration: none;
}

.handbuch-sidebar-item.active > .handbuch-sidebar-link {
    background: rgba(16, 185, 129, 0.15);
    color: var(--hb-sidebar-active);
    border-left-color: var(--hb-sidebar-active);
    font-weight: 600;
}

.handbuch-sidebar-subsections {
    list-style: none;
    padding: 0;
    margin: 0;
}

.handbuch-sidebar-sublink {
    display: block;
    padding: 0.35rem 1rem 0.35rem 2.5rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.82rem;
    transition: all 0.15s;
}

.handbuch-sidebar-sublink:hover {
    color: white;
    text-decoration: none;
}

.handbuch-sidebar-sublink.active {
    color: var(--hb-sidebar-active);
    font-weight: 500;
}

.handbuch-sidebar-toggle {
    display: none;
}

.handbuch-sidebar-overlay {
    display: none;
}

/* --- Content Area --- */
.handbuch-content {
    flex: 1;
    min-width: 0;
    padding: 2rem 3rem 4rem;
    max-width: calc(var(--hb-content-max) + 6rem);
}

/* Breadcrumbs */
.handbuch-breadcrumb ol {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    font-size: 0.88rem;
}

.handbuch-breadcrumb li {
    color: var(--v5-gray-500);
}

.handbuch-breadcrumb li + li::before {
    content: '/';
    margin: 0 0.5rem;
    color: var(--v5-gray-400);
}

.handbuch-breadcrumb li a {
    color: var(--v5-primary);
    text-decoration: none;
}

.handbuch-breadcrumb li a:hover {
    text-decoration: underline;
}

.handbuch-breadcrumb li.active {
    color: var(--v5-gray-700);
    font-weight: 500;
}

/* Chapter Header */
.handbuch-chapter-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--v5-gray-200);
}

.handbuch-chapter-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--v5-primary);
    margin-bottom: 0.5rem;
}

.handbuch-chapter-description {
    font-size: 1.05rem;
    color: var(--v5-gray-500);
    margin: 0;
}

/* =============================================================================
   ARTICLE CONTENT — Markdown Rendered Styles
   ============================================================================= */

.handbuch-article {
    line-height: 1.75;
    font-size: 0.98rem;
    color: var(--v5-gray-700);
}

.handbuch-article h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--v5-primary);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--v5-gray-200);
}

.handbuch-article h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--v5-primary-dark, #152a45);
    margin: 2rem 0 0.75rem;
}

.handbuch-article h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--v5-gray-700);
    margin: 1.5rem 0 0.5rem;
}

.handbuch-article p {
    margin-bottom: 1rem;
}

.handbuch-article ul,
.handbuch-article ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.handbuch-article li {
    margin-bottom: 0.35rem;
}

.handbuch-article a {
    color: var(--v5-primary);
    text-decoration: underline;
}

.handbuch-article a:hover {
    color: var(--hb-sidebar-active);
}

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

.handbuch-article figure {
    margin: 1.5rem 0;
    text-align: center;
}

.handbuch-article figcaption {
    font-size: 0.85rem;
    color: var(--v5-gray-500);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Code */
.handbuch-article code {
    background: var(--v5-gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: var(--v5-font-mono);
    color: #d63384;
}

.handbuch-article pre {
    background: var(--v5-gray-100);
    border: 1px solid var(--v5-gray-200);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.handbuch-article pre code {
    background: none;
    padding: 0;
    color: var(--v5-gray-700);
}

/* Tables */
.handbuch-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.92rem;
}

.handbuch-article th {
    background: var(--v5-primary);
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 0.6rem 1rem;
}

.handbuch-article td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--v5-gray-200);
}

.handbuch-article tr:hover td {
    background: var(--v5-gray-50);
}

/* Blockquotes as hint boxes */
.handbuch-article blockquote {
    border-left: 4px solid var(--v5-primary);
    background: #f0f4f8;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 0 8px 8px 0;
    font-size: 0.94rem;
}

.handbuch-article blockquote p:last-child {
    margin-bottom: 0;
}

/* Hint box variants via markdown conventions:
   > **Tipp:** ...    → green
   > **Warnung:** ... → yellow
   > **Wichtig:** ... → red
   > **Info:** ...    → blue (default)
*/
.handbuch-hint-tip {
    border-left-color: #10b981;
    background: #ecfdf5;
}

.handbuch-hint-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.handbuch-hint-important {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.handbuch-hint-info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

/* Keyboard shortcuts */
.handbuch-article kbd {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.82em;
    font-family: var(--v5-font-mono);
    color: var(--v5-gray-700);
    background: var(--v5-gray-100);
    border: 1px solid var(--v5-gray-300);
    border-radius: 4px;
    box-shadow: 0 1px 0 var(--v5-gray-300);
}


/* =============================================================================
   PREV / NEXT NAVIGATION
   ============================================================================= */

.handbuch-prev-next {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--v5-gray-200);
}

.handbuch-prev,
.handbuch-next {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    background: white;
    border: 1px solid var(--hb-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--v5-gray-700);
    transition: all 0.2s;
    max-width: 48%;
}

.handbuch-prev:hover,
.handbuch-next:hover {
    border-color: var(--v5-primary);
    box-shadow: var(--v5-shadow-sm);
    text-decoration: none;
    color: var(--v5-primary);
}

.handbuch-prev small,
.handbuch-next small {
    display: block;
    font-size: 0.75rem;
    color: var(--v5-gray-500);
    margin-bottom: 2px;
}

.handbuch-prev span,
.handbuch-next span {
    font-weight: 600;
    font-size: 0.95rem;
}

.handbuch-next {
    margin-left: auto;
    text-align: right;
}


/* =============================================================================
   SEARCH PAGE
   ============================================================================= */

.handbuch-search-page {
    max-width: 800px;
    margin: 0 auto;
}

.handbuch-search-page h1 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--v5-primary);
    margin-bottom: 1.5rem;
}

.handbuch-search-page-results {
    margin-top: 1.5rem;
}

.handbuch-search-page-result {
    display: block;
    padding: 1rem 1.25rem;
    background: white;
    border: 1px solid var(--hb-border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.handbuch-search-page-result:hover {
    border-color: var(--v5-primary);
    box-shadow: var(--v5-shadow-sm);
    text-decoration: none;
    color: inherit;
}

.handbuch-search-page-result h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--v5-primary);
    margin: 0 0 0.25rem;
}

.handbuch-search-page-result p {
    font-size: 0.9rem;
    color: var(--v5-gray-600);
    margin: 0;
    white-space: pre-line;
    line-height: 1.5;
}

.handbuch-search-page-result mark {
    background: #fef08a;
    padding: 0 2px;
    border-radius: 2px;
}

.handbuch-search-count {
    font-size: 0.9rem;
    color: var(--v5-gray-500);
    margin-bottom: 1rem;
}


/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 992px) {
    .handbuch-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 1050;
    }

    .handbuch-sidebar.open {
        left: 0;
    }

    .handbuch-sidebar-close {
        display: block;
    }

    .handbuch-sidebar-toggle {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        position: fixed;
        bottom: 1.5rem;
        left: 1.5rem;
        z-index: 100;
        background: var(--v5-primary);
        color: white;
        border: none;
        border-radius: 50px;
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        font-weight: 500;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        cursor: pointer;
        transition: transform 0.2s;
    }

    .handbuch-sidebar-toggle:hover {
        transform: scale(1.05);
    }

    .handbuch-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }

    .handbuch-sidebar-overlay.open {
        display: block;
    }

    .handbuch-content {
        padding: 1.5rem 1.25rem 4rem;
    }

    .handbuch-prev-next {
        flex-direction: column;
    }

    .handbuch-prev,
    .handbuch-next {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .handbuch-hero h1 {
        font-size: 1.6rem;
    }

    .handbuch-hero-subtitle {
        font-size: 0.95rem;
    }

    .handbuch-chapter-header h1 {
        font-size: 1.5rem;
    }

    .handbuch-card {
        padding: 1rem;
    }

    .handbuch-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-right: 1rem;
    }

    .handbuch-card-body h3 {
        font-size: 0.95rem;
    }

    .handbuch-card-sections {
        display: none;
    }

    .handbuch-content {
        padding: 1rem 1rem 4rem;
    }
}

/* --- CTA Box (for non-authenticated users) --- */
.handbuch-cta-box {
    margin: 2.5rem 0 1.5rem;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    text-align: center;
}

.handbuch-cta-box-index {
    margin: 3rem 0 0;
}

.handbuch-cta-content h3 {
    color: #f1f5f9;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.handbuch-cta-content p {
    color: #94a3b8;
    font-size: 1rem;
    margin-bottom: 1.25rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.handbuch-cta-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #1f2937;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.handbuch-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
    color: #1f2937;
    text-decoration: none;
}

/* FAQ cross-link hint */
.handbuch-faq-hint {
    background: #f8f9fa;
    border-radius: 10px;
}
