/**
 * SecurityProviders.com.au — Interactive Guide Reading Experience Styles
 * Phase 3.9F Specification
 */

:root {
    --guide-bg: #FFFFFF;
    --guide-surface: #F8FAF9;
    --guide-card-bg: #FFFFFF;
    --guide-text: #101D38;
    --guide-muted: #5A6982;
    --guide-border: #E2E8F0;
    --guide-border-subtle: #F1F5F9;
    --guide-primary: #00843D;
    --guide-primary-dark: #006830;
    --guide-primary-light: #EBF7EE;
    --guide-accent: #FCB50F;
    --guide-code-bg: #0F172A;
    --guide-tldr-bg: #F4FBF7;
    --guide-tldr-border: #A7D8B9;
    --guide-focus-ring: rgba(0, 132, 61, 0.35);
}

[data-theme="dark"] {
    --guide-bg: #0B111E;
    --guide-surface: #111A2C;
    --guide-card-bg: #162238;
    --guide-text: #F8FAFC;
    --guide-muted: #94A3B8;
    --guide-border: #23334E;
    --guide-border-subtle: #19253A;
    --guide-primary: #059669;
    --guide-primary-dark: #047857;
    --guide-primary-light: #064E3B;
    --guide-accent: #FBBF24;
    --guide-code-bg: #060B14;
    --guide-tldr-bg: #0E241B;
    --guide-tldr-border: #059669;
    --guide-focus-ring: rgba(5, 150, 105, 0.45);
}

[data-theme="dark"] body {
    background-color: var(--guide-bg);
    color: var(--guide-text);
}

/* 1. Page Container & Layout Grid */
.guide-page-wrapper {
    background-color: var(--guide-bg);
    color: var(--guide-text);
    min-height: 100vh;
    padding-bottom: 5rem;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.guide-main-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Breadcrumbs & Header */
.guide-breadcrumb-nav {
    padding: 1.5rem 0 1rem;
    font-size: 0.85rem;
    color: var(--guide-muted);
}

.guide-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.guide-breadcrumbs a {
    color: var(--guide-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.guide-breadcrumbs a:hover {
    color: var(--guide-primary);
    text-decoration: underline;
}

.guide-breadcrumbs .breadcrumb-sep {
    color: var(--guide-muted);
    opacity: 0.6;
}

.guide-breadcrumbs .breadcrumb-current {
    color: var(--guide-text);
    font-weight: 600;
}

/* Article Hero Header */
.guide-article-hero {
    padding: 1rem 0 2rem;
    border-bottom: 1px solid var(--guide-border);
    margin-bottom: 2.5rem;
}

.guide-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--guide-primary);
    background: var(--guide-primary-light);
    border: 1px solid var(--guide-primary);
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 1.25rem;
    text-decoration: none;
    transition: all 0.2s;
}

.guide-category-badge:hover {
    background: var(--guide-primary);
    color: #FFFFFF;
}

.guide-article-title {
    font-size: 2.75rem;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--guide-text);
    margin: 0 0 1.25rem;
}

@media (max-width: 768px) {
    .guide-article-title {
        font-size: 2rem;
    }
}

.guide-article-excerpt {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--guide-muted);
    margin: 0 0 1.5rem;
    max-width: 920px;
}

.guide-article-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--guide-muted);
}

.guide-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.guide-meta-item strong {
    color: var(--guide-text);
}

.guide-meta-dot {
    opacity: 0.5;
}

.guide-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--guide-primary-light);
    color: var(--guide-primary);
}

/* Reader Action Toolbar */
.guide-toolbar-container {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--guide-border);
}

.guide-toolbar-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.guide-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    font-family: inherit;
}

.guide-btn:focus-visible {
    outline: 2px solid var(--guide-primary);
    outline-offset: 2px;
}

.guide-btn-primary {
    background-color: var(--guide-primary);
    color: #FFFFFF;
}

.guide-btn-primary:hover {
    background-color: var(--guide-primary-dark);
    transform: translateY(-1px);
}

.guide-btn-outline {
    background-color: var(--guide-card-bg);
    color: var(--guide-text);
    border: 1px solid var(--guide-border);
}

.guide-btn-outline:hover {
    border-color: var(--guide-primary);
    color: var(--guide-primary);
    background-color: var(--guide-primary-light);
}

.guide-theme-toggle {
    margin-left: auto;
    background-color: var(--guide-card-bg);
    border: 1px solid var(--guide-border);
    color: var(--guide-text);
    padding: 0.6rem 0.9rem;
}

.guide-theme-toggle:hover {
    border-color: var(--guide-accent);
}

.guide-toolbar-microcopy {
    display: block;
    font-size: 0.8rem;
    color: var(--guide-muted);
    margin-top: 0.5rem;
}

/* Toast Notification */
.guide-copy-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--guide-primary-dark);
    color: #FFFFFF;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
    pointer-events: none;
}

.guide-copy-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 2. Main Two-Column Reading Grid */
.guide-reading-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 3.5rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .guide-reading-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }
}

/* 3. Sticky Left Rail (Desktop TOC) */
.guide-sidebar-rail {
    position: sticky;
    top: 5.5rem;
    max-height: calc(100vh - 6.5rem);
    overflow-y: auto;
    padding-right: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--guide-border) transparent;
}

.guide-sidebar-rail::-webkit-scrollbar {
    width: 4px;
}

.guide-sidebar-rail::-webkit-scrollbar-thumb {
    background-color: var(--guide-border);
    border-radius: 4px;
}

@media (max-width: 1024px) {
    .guide-sidebar-rail {
        display: none;
    }
}

.guide-toc-header-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--guide-muted);
    margin: 0 0 0.85rem;
}

/* Reading Progress Indicator */
.guide-progress-box {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--guide-border);
}

.guide-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--guide-muted);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.guide-progress-track {
    width: 100%;
    height: 4px;
    background-color: var(--guide-border);
    border-radius: 9999px;
    overflow: hidden;
}

.guide-progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: var(--guide-primary);
    border-radius: 9999px;
    transition: width 0.1s linear;
}

/* Hierarchical Navigation Tree */
.guide-toc-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.guide-toc-group {
    margin-bottom: 0.35rem;
}

.guide-toc-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 6px;
    transition: background-color 0.15s;
}

.guide-toc-item-header:hover {
    background-color: var(--guide-surface);
}

.guide-toc-link {
    display: block;
    flex-grow: 1;
    padding: 0.45rem 0.6rem;
    font-size: 0.875rem;
    line-height: 1.35;
    color: var(--guide-muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.15s ease;
}

.guide-toc-link:hover {
    color: var(--guide-text);
}

.guide-toc-link.is-active {
    color: var(--guide-primary);
    font-weight: 700;
    border-left-color: var(--guide-primary);
    background-color: var(--guide-primary-light);
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.guide-toc-group-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--guide-muted);
    padding: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.15s ease;
}

.guide-toc-group-toggle:hover {
    color: var(--guide-text);
}

.guide-toc-group.is-expanded .guide-toc-group-toggle svg {
    transform: rotate(90deg);
}

.guide-toc-sublist {
    list-style: none;
    margin: 0;
    padding: 0.2rem 0 0.4rem 1.25rem;
    border-left: 1px solid var(--guide-border);
    margin-left: 0.75rem;
    display: none;
}

.guide-toc-group.is-expanded .guide-toc-sublist {
    display: block;
}

.guide-toc-sublink {
    display: block;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--guide-muted);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.guide-toc-sublink:hover {
    color: var(--guide-text);
}

.guide-toc-sublink.is-active {
    color: var(--guide-primary);
    font-weight: 700;
    background-color: var(--guide-primary-light);
}

.guide-toc-actions-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    margin-top: 1.25rem;
    border-top: 1px solid var(--guide-border);
}

.guide-toc-action-link {
    background: transparent;
    border: none;
    font-size: 0.8rem;
    color: var(--guide-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.15s, background-color 0.15s;
    font-family: inherit;
}

.guide-toc-action-link:hover {
    color: var(--guide-text);
    background-color: var(--guide-surface);
}

/* 4. Mobile Sticky Contents Bar & Drawer */
.guide-mobile-bar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--guide-card-bg);
    border-bottom: 1px solid var(--guide-border);
    padding: 0.75rem 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

@media (max-width: 1024px) {
    .guide-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

.mobile-bar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--guide-primary);
}

.mobile-active-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--guide-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 48vw;
    margin-left: 0.5rem;
}

.mobile-bar-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--guide-muted);
}

/* Mobile Drawer Modal */
.guide-mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.guide-mobile-backdrop.is-visible {
    display: block;
    opacity: 1;
}

.guide-mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 360px;
    background: var(--guide-card-bg);
    z-index: 2100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.guide-mobile-drawer.is-open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--guide-border);
}

.drawer-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--guide-muted);
}

.drawer-close-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--guide-muted);
    cursor: pointer;
    padding: 0.25rem;
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

/* 5. Editorial Content Rail */
.guide-content-column {
    min-width: 0;
    max-width: 840px;
}

/* TL;DR Summary Block */
.guide-tldr-card {
    background-color: var(--guide-tldr-bg);
    border: 1px solid var(--guide-tldr-border);
    border-left: 4px solid var(--guide-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.guide-tldr-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--guide-primary);
    margin-bottom: 0.65rem;
}

.guide-tldr-text {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--guide-text);
    margin: 0;
}

/* Markdown Body Typography */
.guide-markdown-body {
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--guide-text);
}

.guide-markdown-body p {
    margin: 0 0 1.5rem;
}

.guide-markdown-body h2.guide-heading {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--guide-text);
    margin: 3rem 0 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--guide-border-subtle);
    scroll-margin-top: 6rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.guide-markdown-body h3.guide-heading {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--guide-text);
    margin: 2.25rem 0 1rem;
    scroll-margin-top: 6rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.guide-markdown-body h4.guide-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--guide-text);
    margin: 1.75rem 0 0.75rem;
    scroll-margin-top: 6rem;
}

.heading-anchor {
    font-size: 0.9em;
    color: var(--guide-muted);
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.guide-heading:hover .heading-anchor {
    opacity: 1;
}

.heading-anchor:hover {
    color: var(--guide-primary);
}

/* Lists */
.guide-markdown-body ul.guide-unordered-list,
.guide-markdown-body ol.guide-ordered-list {
    margin: 0 0 1.75rem;
    padding-left: 1.75rem;
}

.guide-markdown-body li {
    margin-bottom: 0.5rem;
    line-height: 1.65;
}

/* Checklists */
ul.guide-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    background-color: var(--guide-surface);
    border: 1px solid var(--guide-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.guide-checklist-item {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--guide-border);
}

.guide-checklist-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.guide-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
}

.guide-checkbox {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    accent-color: var(--guide-primary);
    cursor: pointer;
}

.guide-checklist-item.is-completed .checklist-text {
    text-decoration: line-through;
    color: var(--guide-muted);
}

/* Callout Boxes */
.guide-callout {
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid var(--guide-muted);
    background-color: var(--guide-surface);
}

.guide-callout-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.guide-callout-body p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.guide-callout-important {
    border-left-color: var(--guide-accent);
    background-color: rgba(252, 181, 15, 0.08);
    color: var(--guide-text);
}
.guide-callout-important .guide-callout-header {
    color: #B45309;
}
[data-theme="dark"] .guide-callout-important .guide-callout-header {
    color: var(--guide-accent);
}

.guide-callout-warning {
    border-left-color: #EF4444;
    background-color: rgba(239, 68, 68, 0.08);
}
.guide-callout-warning .guide-callout-header {
    color: #DC2626;
}

.guide-callout-tip {
    border-left-color: var(--guide-primary);
    background-color: var(--guide-primary-light);
}
.guide-callout-tip .guide-callout-header {
    color: var(--guide-primary);
}

.guide-callout-note {
    border-left-color: #3B82F6;
    background-color: rgba(59, 130, 246, 0.08);
}
.guide-callout-note .guide-callout-header {
    color: #2563EB;
}

/* Tables */
.guide-table-wrapper {
    overflow-x: auto;
    margin: 2.25rem 0;
    border: 1px solid var(--guide-border);
    border-radius: 10px;
    background-color: var(--guide-card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

.guide-table th {
    background-color: var(--guide-surface);
    color: var(--guide-text);
    font-weight: 700;
    padding: 0.85rem 1.15rem;
    border-bottom: 2px solid var(--guide-border);
}

.guide-table td {
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--guide-border);
    color: var(--guide-text);
}

.guide-table tr:last-child td {
    border-bottom: none;
}

.guide-table tr:hover td {
    background-color: var(--guide-surface);
}

/* Code Blocks */
.guide-code-container {
    background-color: var(--guide-code-bg);
    border-radius: 10px;
    overflow: hidden;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-lang {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94A3B8;
    text-transform: uppercase;
}

.code-copy-btn {
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s;
}

.code-copy-btn:hover {
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.1);
}

.guide-code-container pre {
    margin: 0;
    padding: 1.25rem;
    overflow-x: auto;
}

.guide-code-container code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #E2E8F0;
}

.guide-inline-code {
    background-color: var(--guide-surface);
    border: 1px solid var(--guide-border);
    color: var(--guide-primary-dark);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
[data-theme="dark"] .guide-inline-code {
    color: var(--guide-accent);
}

/* Links */
.guide-link {
    color: var(--guide-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.15s;
}

.guide-link:hover {
    color: var(--guide-primary-dark);
}

/* 6. FAQ Accordion Section */
.guide-faqs-section {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--guide-border);
}

.guide-faqs-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--guide-text);
    margin-bottom: 1.5rem;
}

.guide-faq-accordion {
    border: 1px solid var(--guide-border);
    border-radius: 10px;
    overflow: hidden;
}

.guide-faq-item {
    border-bottom: 1px solid var(--guide-border);
}

.guide-faq-item:last-child {
    border-bottom: none;
}

.guide-faq-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--guide-text);
    cursor: pointer;
    background-color: var(--guide-card-bg);
    transition: background-color 0.15s;
    list-style: none;
}

.guide-faq-summary::-webkit-details-marker {
    display: none;
}

.guide-faq-summary:hover {
    background-color: var(--guide-surface);
}

.guide-faq-chevron {
    transition: transform 0.2s ease;
    color: var(--guide-muted);
}

details[open] .guide-faq-chevron {
    transform: rotate(180deg);
}

.guide-faq-content {
    padding: 1rem 1.5rem 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--guide-text);
    background-color: var(--guide-surface);
}

/* 7. Author Bio & Editorial Verification Box */
.guide-author-card {
    background-color: var(--guide-surface);
    border: 1px solid var(--guide-border);
    border-radius: 12px;
    padding: 1.75rem;
    margin-top: 3.5rem;
}

.guide-author-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--guide-text);
    margin: 0 0 0.75rem;
}

.guide-author-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--guide-muted);
    margin: 0 0 1rem;
}

.guide-statutory-notice {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background-color: rgba(252, 181, 15, 0.08);
    border: 1px solid rgba(252, 181, 15, 0.35);
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--guide-text);
}

/* 8. Related Reading Journey */
.guide-related-section {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--guide-border);
}

.guide-related-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--guide-text);
    margin-bottom: 1.5rem;
}

.guide-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.guide-related-card {
    background: var(--guide-card-bg);
    border: 1px solid var(--guide-border);
    border-radius: 10px;
    padding: 1.25rem;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.guide-related-card:hover {
    transform: translateY(-2px);
    border-color: var(--guide-primary);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
}

.guide-related-cat {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--guide-primary);
    margin-bottom: 0.5rem;
}

.guide-related-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--guide-text);
    margin: 0 0 0.5rem;
    line-height: 1.35;
}

.guide-related-card-excerpt {
    font-size: 0.88rem;
    color: var(--guide-muted);
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
}

/* 9. Dedicated Print CSS (@media print) */
@media print {
    .site-header,
    .site-footer,
    .guide-sidebar-rail,
    .guide-mobile-bar,
    .guide-toolbar-container,
    .guide-copy-toast,
    .code-copy-btn,
    .heading-anchor,
    .guide-related-section {
        display: none !important;
    }

    body, .guide-page-wrapper {
        background: #FFFFFF !important;
        color: #000000 !important;
        font-size: 11pt !important;
        line-height: 1.5 !important;
        padding: 0 !important;
    }

    .guide-main-container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .guide-reading-grid {
        display: block !important;
    }

    .guide-content-column {
        max-width: 100% !important;
    }

    .guide-article-title {
        font-size: 24pt !important;
        color: #000000 !important;
    }

    .guide-tldr-card,
    .guide-callout,
    .guide-table-wrapper {
        page-break-inside: avoid;
        border: 1px solid #CCCCCC !important;
        background: #F9F9F9 !important;
    }

    .guide-table th {
        background: #EEEEEE !important;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 80%;
        color: #555555;
    }
}

/* ========================================================================= */
/* GUIDES HUB & DIRECTORY LANDING PAGE */
/* ========================================================================= */

.guides-hub-wrapper {
    background-color: #F8FAFC;
    min-height: 100vh;
}

/* 1. Hero Section */
.guides-hero-section {
    background: linear-gradient(135deg, #0B111E 0%, #101D38 60%, #162444 100%);
    color: #FFFFFF;
    padding: 3rem 0 3.5rem;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--color-primary, #00843D);
}

.guides-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: radial-gradient(circle at 85% 20%, rgba(0, 132, 61, 0.18) 0%, transparent 45%),
                      radial-gradient(circle at 15% 80%, rgba(252, 181, 15, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.guides-hero-inner {
    position: relative;
    z-index: 1;
}

/* Inverted Hero Breadcrumbs */
.guides-hero-breadcrumbs {
    margin-bottom: 1.25rem;
}

.hero-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.8125rem;
}

.hero-breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.15s ease;
}

.hero-breadcrumb-item a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

.hero-breadcrumb-sep {
    color: rgba(255, 255, 255, 0.4);
    margin-left: 0.5rem;
}

.hero-breadcrumb-item.active {
    color: #FFFFFF;
    font-weight: 600;
}

.guides-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34D399;
    padding: 4px 14px;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}

.guides-hero-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin: 0 0 1rem;
}

.guides-hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.85);
    max-width: 760px;
    margin: 0 0 2rem;
}

/* Search Bar in Hero */
.guides-hero-search-box {
    max-width: 800px;
}

.guides-search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 6px 6px 6px 16px;
    box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.35);
    border: 2px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guides-search-input-group:focus-within {
    border-color: #00843D;
    box-shadow: 0 0 0 4px rgba(0, 132, 61, 0.3);
}

.guides-search-icon {
    color: #64748B;
    margin-right: 12px;
    display: flex;
    align-items: center;
}

.guides-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.0625rem;
    color: #0F172A;
    outline: none;
    padding: 8px 4px;
}

.guides-search-input::placeholder {
    color: #94A3B8;
}

.guides-search-clear {
    color: #94A3B8;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 6px;
    transition: color 0.15s, background-color 0.15s;
}

.guides-search-clear:hover {
    color: #0F172A;
    background-color: #F1F5F9;
}

.guides-search-submit {
    padding: 12px 26px;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Quick Search Tags */
.guides-hero-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1.125rem;
    font-size: 0.8125rem;
}

.tags-label {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    margin-right: 2px;
}

.tags-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tag-pill {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.92);
    padding: 4px 12px;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.15s ease;
}

.hero-tag-pill:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    color: #FFFFFF;
}

/* 2. Content & Filtering Section */
.guides-content-section {
    padding: 2.5rem 0 4.5rem;
}

.guides-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.guides-category-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(16, 29, 56, 0.04);
}

.category-pill:hover {
    border-color: #CBD5E1;
    background-color: #F8FAFC;
    color: #0F172A;
}

.category-pill.active {
    background: #00843D;
    border-color: #00843D;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 132, 61, 0.25);
}

.pill-badge {
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 9999px;
    background: #F1F5F9;
    color: #64748B;
    font-weight: 700;
    transition: all 0.2s ease;
}

.category-pill.active .pill-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
}

.guides-toolbar-dropdowns {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.guides-select-wrapper {
    position: relative;
    display: inline-block;
}

.guides-select {
    appearance: none;
    -webkit-appearance: none;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 8px 36px 8px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(16, 29, 56, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.guides-select:focus {
    outline: none;
    border-color: #00843D;
    box-shadow: 0 0 0 3px rgba(0, 132, 61, 0.15);
}

.guides-select-wrapper .select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64748B;
    display: flex;
    align-items: center;
}

/* Status Bar & Active Filter Chips */
.guides-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.875rem 0;
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
    margin-bottom: 2rem;
}

.guides-count-summary {
    font-size: 0.9375rem;
    color: #475569;
}

.guides-count-summary strong {
    color: #0F172A;
}

.guides-active-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1E40AF;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.filter-chip:hover {
    background: #DBEAFE;
}

.chip-remove {
    font-size: 1.125rem;
    line-height: 1;
    color: #3B82F6;
    margin-left: 2px;
}

.filter-clear-all {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #EF4444;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.15s ease;
}

.filter-clear-all:hover {
    color: #DC2626;
    text-decoration: underline;
}

/* 3. Cards Grid */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 3rem;
}

@media (max-width: 1024px) {
    .guides-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .guides-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

.guide-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(16, 29, 56, 0.04);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s ease;
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px -6px rgba(16, 29, 56, 0.09), 0 4px 10px -4px rgba(16, 29, 56, 0.04);
    border-color: #CBD5E1;
}

.guide-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 1rem;
}

.guide-card-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.badge-cat {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-cat-licensing-compliance {
    background-color: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.badge-cat-cost-pricing {
    background-color: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

.badge-cat-hiring-security {
    background-color: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.badge-cat-industry-guides {
    background-color: #F3E8FF;
    color: #6B21A8;
    border: 1px solid #E9D5FF;
}

.badge-cat-default {
    background-color: #F1F5F9;
    color: #334155;
    border: 1px solid #E2E8F0;
}

.badge-jurisdiction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    padding: 3px 8px;
    border-radius: 6px;
}

.guide-card-meta-top {
    flex-shrink: 0;
}

.meta-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    color: #64748B;
}

.guide-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.guide-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 0.75rem;
    color: #0F172A;
    letter-spacing: -0.015em;
}

.guide-card-link {
    color: #0F172A;
    text-decoration: none;
    transition: color 0.15s ease;
}

.guide-card-link:hover {
    color: #00843D;
}

.guide-card-excerpt {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guide-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #F1F5F9;
    gap: 12px;
}

.guide-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #EBF7EE;
    color: #00843D;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1E293B;
    line-height: 1.2;
}

.author-date {
    font-size: 0.75rem;
    color: #64748B;
}

.guide-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #00843D;
    text-decoration: none;
    flex-shrink: 0;
    transition: gap 0.2s ease, color 0.15s ease;
}

.guide-card-cta:hover {
    color: #006830;
    gap: 9px;
}

.guide-card-cta .cta-arrow {
    transition: transform 0.2s ease;
}

.guide-card-cta:hover .cta-arrow {
    transform: translateX(3px);
}

/* 4. Empty State */
.guides-empty-state {
    text-align: center;
    padding: 4.5rem 1.5rem;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    margin-bottom: 3rem;
    box-shadow: 0 1px 3px rgba(16, 29, 56, 0.04);
}

.empty-icon-wrapper {
    margin-bottom: 1.25rem;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 0.5rem;
}

.empty-description {
    font-size: 1rem;
    color: #64748B;
    max-width: 540px;
    margin: 0 auto 1.75rem;
    line-height: 1.6;
}

.empty-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* 5. Pagination Container */
.guides-pagination-wrapper {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
}

/* 6. Editorial Trust Banner */
.guides-trust-banner {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 4px rgba(16, 29, 56, 0.03);
}

.trust-banner-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(0, 132, 61, 0.1);
    color: #00843D;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trust-banner-content {
    flex: 1;
}

.trust-banner-heading {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 0.25rem;
}

.trust-banner-text {
    font-size: 0.875rem;
    color: #64748B;
    line-height: 1.55;
    margin: 0;
}

.trust-banner-action {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .guides-trust-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 1.5rem;
    }
}

/* Dark Mode Overrides for Guides Hub */
[data-theme="dark"] .guides-hub-wrapper {
    background-color: #0B111E;
}

[data-theme="dark"] .category-pill {
    background: #162238;
    border-color: #23334E;
    color: #F8FAFC;
}

[data-theme="dark"] .category-pill:hover {
    background: #1C2B47;
    border-color: #334769;
}

[data-theme="dark"] .category-pill.active {
    background: #059669;
    border-color: #059669;
    color: #FFFFFF;
}

[data-theme="dark"] .pill-badge {
    background: #111A2C;
    color: #94A3B8;
}

[data-theme="dark"] .guides-select {
    background: #162238;
    border-color: #23334E;
    color: #F8FAFC;
}

[data-theme="dark"] .guides-status-bar {
    border-color: #23334E;
}

[data-theme="dark"] .guides-count-summary {
    color: #94A3B8;
}

[data-theme="dark"] .guides-count-summary strong {
    color: #F8FAFC;
}

[data-theme="dark"] .guide-card {
    background: #162238;
    border-color: #23334E;
}

[data-theme="dark"] .guide-card:hover {
    border-color: #334769;
}

[data-theme="dark"] .guide-card-title {
    color: #F8FAFC;
}

[data-theme="dark"] .guide-card-link {
    color: #F8FAFC;
}

[data-theme="dark"] .guide-card-link:hover {
    color: #34D399;
}

[data-theme="dark"] .guide-card-excerpt {
    color: #94A3B8;
}

[data-theme="dark"] .guide-card-footer {
    border-color: #23334E;
}

[data-theme="dark"] .author-name {
    color: #F8FAFC;
}

[data-theme="dark"] .author-date {
    color: #94A3B8;
}

[data-theme="dark"] .guides-empty-state,
[data-theme="dark"] .guides-trust-banner {
    background: #162238;
    border-color: #23334E;
}

[data-theme="dark"] .empty-title,
[data-theme="dark"] .trust-banner-heading {
    color: #F8FAFC;
}

[data-theme="dark"] .empty-description,
[data-theme="dark"] .trust-banner-text {
    color: #94A3B8;
}


