/*
Theme Name: Flipbook
Author: Antigravity
Description: A custom theme with a retractable sidebar and max-width 800px content.
Version: 1.0
*/

/* =============================
   DESIGN TOKENS
   ============================= */
:root {
    --sidebar-width: 280px;
    --content-max-width: 800px;

    /* Color Palette — inspired by À Compétence Égale */
    --primary: #e85d26;
    /* Warm orange accent */
    --primary-dark: #c94d1e;
    --primary-light: #fff3ef;
    --secondary: #2c3e50;
    /* Dark navy */
    --secondary-light: #34495e;
    --bg-color: #f7f8fa;
    --bg-white: #ffffff;
    --text-color: #3a3a3a;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --border-light: #f0f1f3;
    --success: #10b981;
    --info: #3b82f6;

    /* Typography */
    --font-body: 'Google Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'DM Serif Display', Georgia, 'Times New Roman', serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

/* Dark Mode Theme */
body.dark-mode {
    --bg-color: #1a1b1e;
    --bg-white: #25262b;
    --text-color: #e5e7eb;
    --text-light: #9ca3af;
    --border-color: #374151;
    --border-light: #2d3748;
    --primary-light: #3d2a22;
    --secondary: #f9fafb;
    --secondary-light: #d1d5db;
}

/* High Contrast Theme (Optimized for low vision) */
body.high-contrast {
    --bg-color: #000000;
    --bg-white: #000000;
    --text-color: #ffff00; /* High contrast yellow */
    --text-light: #ffffff;
    --border-color: #ffffff;
    --border-light: #ffffff;
    --primary: #ffffff;
    --primary-dark: #ffffff;
    --primary-light: #333300;
    --secondary: #ffffff;
    --secondary-light: #ffffff;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
}

body.high-contrast * {
    border-color: #ffffff !important;
}

body.high-contrast mark.search-highlight {
    background: #ffff00;
    color: #000000;
}

body.high-contrast .wp-block-pullquote,
body.high-contrast .wp-block-pullquote blockquote,
body.high-contrast .section-highlight,
body.high-contrast .wp-block-group.section-highlight,
body.high-contrast .wp-block-group.section-highlight .wp-block-group__inner-container {
    background: #000000 !important;
    background-image: none !important;
    color: #ffff00 !important;
    box-shadow: none !important;
}

body.high-contrast .wp-block-pullquote p,
body.high-contrast .wp-block-pullquote cite,
body.high-contrast .section-highlight *,
body.high-contrast .wp-block-group.section-highlight * {
    color: #ffff00 !important;
}

body.high-contrast .wp-block-pullquote blockquote::before {
    color: #ffffff !important;
    opacity: 1;
}

body.high-contrast .wp-block-button__link,
body.high-contrast .wp-block-button a,
body.high-contrast button.wp-element-button,
body.high-contrast .download-pdf-btn,
body.high-contrast .guide-start-btn {
    background: #000000 !important;
    background-image: none !important;
    color: #ffff00 !important;
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
}

body.high-contrast .wp-block-button__link:hover,
body.high-contrast .wp-block-button__link:focus,
body.high-contrast .wp-block-button a:hover,
body.high-contrast .wp-block-button a:focus,
body.high-contrast button.wp-element-button:hover,
body.high-contrast button.wp-element-button:focus,
body.high-contrast .download-pdf-btn:hover,
body.high-contrast .download-pdf-btn:focus,
body.high-contrast .guide-start-btn:hover,
body.high-contrast .guide-start-btn:focus {
    background: #ffff00 !important;
    color: #000000 !important;
    border-color: #ffff00 !important;
    transform: none;
}

body.dark-mode .wp-block-pullquote,
body.dark-mode .wp-block-pullquote blockquote,
body.dark-mode .section-highlight,
body.dark-mode .wp-block-group.section-highlight,
body.dark-mode .wp-block-group.section-highlight .wp-block-group__inner-container {
    background: var(--bg-white) !important;
    background-image: none !important;
    color: var(--text-color) !important;
}

body.dark-mode .wp-block-pullquote p,
body.dark-mode .wp-block-pullquote cite,
body.dark-mode .section-highlight *,
body.dark-mode .wp-block-group.section-highlight * {
    color: var(--text-color) !important;
}

body.dark-mode .wp-block-pullquote {
    border: 1px solid var(--border-color);
}

body.dark-mode .section-highlight,
body.dark-mode .wp-block-group.section-highlight {
    border: 1px solid var(--border-color);
}

/* =============================
   RESET & BASE
   ============================= */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    transition: font-size 0.3s ease;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================
   LAYOUT
   ============================= */
#page {
    display: flex;
    flex-wrap: wrap;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* =============================
   SIDEBAR
   ============================= */
#sidebar {
    width: var(--sidebar-width);
    background: var(--bg-white);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
    padding: 5rem var(--space-lg) var(--space-lg);
}

#sidebar.closed {
    transform: translateX(-100%);
}

.sidebar-header {
    margin-bottom: var(--space-xl);
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--secondary);
}

.site-title a {
    text-decoration: none;
    color: inherit;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-navigation li {
    margin-bottom: var(--space-xs);
}

.main-navigation a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.main-navigation a:hover,
.main-navigation .current-menu-item>a {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

/* =============================
   MAIN CONTENT
   ============================= */
#content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: margin-left 0.3s ease;
}

#content.full-width {
    margin-left: 0;
}

/* =============================
   TOP HEADER
   ============================= */
.site-header {
    width: 100%;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-md) var(--space-2xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
	max-height: 80px;
}

.site-header .site-title {
    margin-top: 0;
    margin-bottom: 0;
}

.top-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    position: relative;
}

.top-navigation li {
    position: relative;
}

.top-navigation a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.top-navigation a:hover,
.top-navigation li:hover > a,
.top-navigation li.is-open > a {
    background-color: var(--primary-light);
    color: var(--primary);
}

.top-navigation .dropdown-icon {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.top-navigation li:hover .dropdown-icon,
.top-navigation li.is-open .dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown sub-menu positioning */
.top-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 260px;
    z-index: 1010;
    padding: var(--space-sm) 0;
    flex-direction: column;
    margin-top: 4px;
}

/* Show submenu on hover (desktop only) or when open class is active */
@media (min-width: 769px) {
    .top-navigation li:hover .sub-menu {
        display: flex;
    }
}

.top-navigation li.is-open .sub-menu {
    display: flex;
}

/* Submenu items styling */
.top-navigation .sub-menu li {
    width: 100%;
}

.top-navigation .sub-menu a {
    display: block;
    width: 100%;
    padding: var(--space-sm) var(--space-lg);
    border-radius: 0;
    background-color: transparent;
    color: var(--text-color);
    font-size: 0.95rem;
    white-space: normal;
    word-break: break-word;
    text-align: left;
}

.top-navigation .sub-menu a:hover,
.top-navigation .sub-menu .current-menu-item > a,
.top-navigation .sub-menu .current_page_item > a {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Responsive adjust for smaller viewports */
@media (max-width: 768px) {
    .top-navigation .sub-menu {
        right: 0;
        min-width: 280px;
        max-width: calc(100vw - 2rem);
    }
}


#primary {
    width: 100%;
    max-width: var(--content-max-width);
}

/* =============================
   GUIDE COVER TEMPLATE
   ============================= */
/* We reset the padding of #content for the cover template to allow full height */
.guide-cover-template {
    max-width: 100% !important;
}

body:has(.guide-cover-template) #content {
    padding: 0;
}

.guide-cover-article {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 80px); /* fallback if no header */
}

body:has(.site-header) .guide-cover-article {
    min-height: calc(100vh - 73px); /* approx header height */
}

/* For cover pages that don't display the header, use pure 100vh */
body.page-template-page-guide-cover .guide-cover-article {
    min-height: 100vh;
}

.cover-top-section {
    flex: 2; /* takes 2/3 of space */
    background-color: #F6645A;
    color: #ffffff;
    display: flex;
    align-items: flex-end;
    padding: var(--space-3xl) var(--space-2xl) var(--space-xl);
    min-height: 60vh;
}

.cover-top-content {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.cover-top-section h1.entry-title {
    color: #ffffff;
    font-size: 6rem;
    margin: 0;
}

.cover-bottom-section {
    flex: 1; /* takes 1/3 of space */
    background-color: var(--bg-white);
    padding: var(--space-xl) var(--space-2xl);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 30vh;
}

.cover-bottom-section .entry-content {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

/* Specific typography for cover bottom section as requested */
.cover-bottom-section h2,
.cover-bottom-section .wp-block-heading:where(h2) {
    color: #5E5E5E;
    font-size: 48px;
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

.cover-bottom-section p.caption,
.cover-bottom-section .caption {
    color: #5E5E5E;
    font-size: 16px;
    margin-top: 0;
}

/* =============================
   TABLE OF CONTENTS TEMPLATE
   ============================= */
.toc-template-wrapper {
    max-width: 100% !important;
    background-color: #F6645A;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--space-3xl) var(--space-2xl);
}

body.page-template-page-toc #page,
body:has(.toc-template-wrapper) #content {
    background-color: #F6645A;
    padding: 0;
}

.toc-article {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--space-xl) 0;
}

.toc-title {
    color: #FFF;
    font-size: 72px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: var(--space-3xl);
    line-height: 1.1;
}

/* Styled Page List block inside TOC template */
.toc-content .wp-block-page-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc-content .wp-block-page-list li {
    background: transparent;
    border-left: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: var(--space-md);
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    transition: none;
}

.toc-content .wp-block-page-list li::before {
    display: none;
}

.toc-content .wp-block-page-list li:hover {
    box-shadow: none;
    transform: none;
}

.toc-content .wp-block-page-list a {
    color: #FFF;
    font-size: 16px;
    text-decoration: none;
    font-weight: 500;
    white-space: normal;
    word-break: break-word;
}

.toc-content .wp-block-page-list a:hover {
    color: #fff;
    opacity: 0.8;
}

/* Create the dotted leader effect */
.toc-content .wp-block-page-list li::after {
    content: "";
    display: block;
    flex-grow: 1;
    border-bottom: 2px dotted #FFF;
    margin: 0 var(--space-sm);
    opacity: 0.6;
    position: relative;
    top: -4px;
}

/* If there are nested lists, adjust them */
.toc-content .wp-block-page-list ul {
    margin-top: var(--space-sm);
    padding-left: var(--space-xl);
    width: 100%;
}

/* Hide dotted leaders on responsive touch/mobile screens */
@media (max-width: 768px) {
    .toc-content .wp-block-page-list li::after {
        display: none;
    }
}

/* =============================
   TOGGLE BUTTON
   ============================= */
#sidebar-toggle {
    position: fixed;
    top: var(--space-md);
    left: var(--space-md);
    z-index: 1100;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

#sidebar-toggle:hover {
    background-color: var(--bg-color);
    box-shadow: var(--shadow-md);
}

#sidebar-toggle svg {
    fill: currentColor;
    width: 24px;
    height: 24px;
}

/* =============================
   TYPOGRAPHY — HEADINGS
   ============================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--secondary);
    line-height: 1.3;
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    font-weight: 700;
}

h1,
.entry-title {
    font-size: 2.25rem;
    margin-top: 0;
    color: var(--secondary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h2,
.wp-block-heading:where(h2) {
    font-size: 1.75rem;
    color: var(--secondary);
    padding-bottom: var(--space-sm);
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

h3,
.wp-block-heading:where(h3) {
    font-size: 1.35rem;
    color: var(--primary);
    font-weight: 700;
}

h4,
.wp-block-heading:where(h4) {
    font-size: 1.1rem;
    color: var(--secondary-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.95rem;
}

/* =============================
   TYPOGRAPHY — BODY
   ============================= */
p,
.entry-content p {
    margin-bottom: var(--space-lg);
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1rem;
}

a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* =============================
   LISTS — UL / OL
   ============================= */
.entry-content ul,
.entry-content ol {
    margin: 0 0 var(--space-lg) 0;
    padding-left: var(--space-lg);
}

.entry-content ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.entry-content ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: var(--space-sm);
    line-height: 1.7;
}

.entry-content ul li::before {
    content: '';
    position: absolute;
    left: 0.25rem;
    top: 0.65rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(246, 100, 90, 0.15); /* A soft coral halo effect */
}

.entry-content ol {
    counter-reset: ol-counter;
    list-style: none;
    padding-left: 0;
}

.entry-content ol li {
    counter-increment: ol-counter;
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.entry-content ol li::before {
    content: counter(ol-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75rem;
    height: 1.75rem;
    background-color: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* =============================
   BLOCKQUOTE / CITATION
   ============================= */
blockquote,
.wp-block-quote {
    border-left: 4px solid var(--primary);
    margin: var(--space-xl) 0;
    padding: var(--space-lg) var(--space-xl);
    background: var(--primary-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--secondary);
    position: relative;
}

blockquote p,
.wp-block-quote p {
    margin-bottom: var(--space-sm);
    font-size: 1.05rem;
    line-height: 1.8;
}

blockquote cite,
.wp-block-quote cite {
    display: block;
    margin-top: var(--space-md);
    font-style: normal;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}

blockquote::before,
.wp-block-quote::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.2;
    line-height: 1;
    font-family: Georgia, serif;
}

/* PULLQUOTE / Citation en exergue */
.wp-block-pullquote {
    border: none;
    padding: var(--space-xl);
    margin: var(--space-2xl) 0;
    text-align: center;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    border-radius: var(--radius-lg);
    color: #fff;
}

.wp-block-pullquote blockquote {
    border-left: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

.wp-block-pullquote blockquote::before {
    color: rgba(255, 255, 255, 0.3);
    position: static;
    display: block;
    font-size: 3rem;
    margin-bottom: -1rem;
}

.wp-block-pullquote p {
    font-size: 1.3rem;
    font-weight: 600;
    font-style: italic;
    color: #fff;
    line-height: 1.6;
}

.wp-block-pullquote cite {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 400;
    font-style: normal;
    margin-top: var(--space-md);
    display: block;
}

/* =============================
   BUTTONS
   ============================= */
.wp-block-button__link,
.wp-block-button a,
button.wp-element-button {
    display: inline-block;
    background-color: var(--primary);
    color: #fff !important;
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    letter-spacing: 0.01em;
}

.wp-block-button__link:hover,
.wp-block-button a:hover,
button.wp-element-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Outline style button */
.wp-block-button.is-style-outline .wp-block-button__link {
    background: transparent;
    color: var(--primary) !important;
    border: 2px solid var(--primary);
    box-shadow: none;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--primary);
    color: #fff !important;
}

/* =============================
   ACCORDION (WP Details block)
   ============================= */
details,
.wp-block-details {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    background: var(--bg-white);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

details:hover,
.wp-block-details:hover {
    box-shadow: var(--shadow-md);
}

details[open],
.wp-block-details[open] {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

summary,
details summary {
    padding: var(--space-md) var(--space-lg);
    font-weight: 600;
    color: var(--secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    transition: all 0.2s ease;
    font-size: 1rem;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: var(--space-md);
}

details[open] summary::after {
    content: '−';
}

summary:hover {
    background-color: var(--bg-color);
}

details[open] summary {
    background-color: var(--primary-light);
    border-bottom: 1px solid var(--border-color);
}

details>*:not(summary) {
    padding: 0 var(--space-lg);
}

details>p:last-child {
    padding-bottom: var(--space-md);
}

/* =============================
   HIGHLIGHTED SECTION
   ============================= */
.section-highlight,
.wp-block-group.section-highlight {
    background: linear-gradient(135deg, var(--primary-light) 0%, #fff0eb 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-2xl);
    margin: var(--space-xl) var(--space-lg);
    font-style: italic;
}

.section-highlight h2,
.section-highlight h3 {
    border-bottom: none;
    display: block;
}

/* =============================
   IMAGES
   ============================= */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--space-md) 0;
}

.wp-block-image figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: var(--space-sm);
}

/* =============================
   PAGE NAVIGATION
   ============================= */
.page-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-3xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #3A3A3A;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.nav-btn:hover {
    background-color: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.nav-btn svg {
    fill: currentColor;
    width: 24px;
    height: 24px;
}

.nav-spacer {
    width: 50px;
}

.flipbook-download-pdf {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: var(--space-3xl);
}

.download-pdf-btn {
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    padding: 0.85rem 1.6rem;
    transition: all 0.2s ease;
}

.download-pdf-btn:hover,
.download-pdf-btn:focus {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.download-pdf-btn:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 3px;
}

.flipbook-print-pdf-meta {
    display: none;
}

/* =============================
   GUIDE PRESENTATION
   ============================= */
.guide-start-btn {
    display: inline-block;
    background-color: var(--primary);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    margin: var(--space-xl) 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.guide-start-btn:hover {
    background-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Guide TOC */
.guide-toc {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-color);
}

.guide-toc h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    border-bottom: none;
    display: block;
}

.guide-toc ol {
    list-style: none;
    padding-left: 0;
    counter-reset: guide-toc;
}

.guide-toc ol li {
    counter-increment: guide-toc;
    padding-left: 2.5rem;
    margin-bottom: var(--space-md);
    position: relative;
}

.guide-toc ol li::before {
    content: counter(guide-toc);
    background-color: var(--primary);
    color: #fff;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
}

.guide-toc a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
}

.guide-toc a:hover {
    color: var(--primary);
}

/* Sidebar Guide TOC */
.guide-sidebar-toc {
    margin-top: 0;
}

.guide-back-link {
    display: block;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    padding: var(--space-sm);
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
    transition: color 0.2s;
}

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

.guide-sidebar-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-sidebar-toc li {
    margin-bottom: var(--space-xs);
}

.guide-sidebar-toc li::before {
    display: none;
}

.guide-sidebar-toc a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-size: 0.92rem;
}

.guide-sidebar-toc a:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.guide-sidebar-toc li.current-page a {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

/* =============================
   SWUP TRANSITIONS
   ============================= */
.transition-fade {
    transition: 0.4s;
    opacity: 1;
    transform: translateY(0);
}

html.is-animating .transition-fade {
    opacity: 0;
    transform: translateY(20px);
}

html.is-leaving .transition-fade {
    opacity: 0;
    transform: translateY(-20px);
}

/* =============================
   ACCESSIBILITY CONTROLS
   ============================= */
/* Accessibility Drawer Wrapper */
.accessibility-drawer-wrapper {
    position: fixed;
    top: var(--space-xl);
    right: 0;
    z-index: 2000;
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
}

/* Toggle Button */
.accessibility-toggle {
    background: var(--secondary);
    color: var(--bg-white);
    border: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    padding: 12px;
    cursor: pointer;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accessibility-toggle:hover {
    padding-right: 18px;
    background: var(--primary);
}

.accessibility-drawer-wrapper.is-open .accessibility-toggle {
    transform: translateX(-260px); /* Adjust based on drawer width */
    background: var(--primary);
}

/* Drawer Bar */
.accessibility-drawer {
    width: 260px;
    background: var(--bg-white);
    color: var(--text-color);
    height: auto;
    min-height: 200px;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    border-left: 4px solid var(--primary);
    padding: var(--space-xl);
    position: fixed;
    top: var(--space-xl);
    right: -264px; /* Hidden */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 0 0 var(--radius-lg);
    visibility: hidden;
}

.accessibility-drawer-wrapper.is-open .accessibility-drawer {
    right: 0;
    visibility: visible;
}

.drawer-header h3 {
    margin: 0 0 var(--space-lg) 0;
    font-size: 1.1rem;
    color: var(--secondary);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: var(--space-xs);
}

.control-group {
    margin-bottom: var(--space-xl);
}

.control-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.control-buttons {
    display: flex;
    gap: var(--space-sm);
}

.control-buttons.flex-wrap {
    flex-wrap: wrap;
}

.control-buttons button, .toggle-btn {
    flex: 1;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    color: var(--secondary);
    transition: all 0.2s ease;
}

.control-buttons button:hover, .toggle-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.toggle-btn.active {
    background: var(--primary);
    color: var(--bg-white);
    border-color: var(--primary);
}

body.dark-mode .accessibility-toggle {
    background: var(--bg-white);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

body.dark-mode .accessibility-toggle:hover,
body.dark-mode .accessibility-drawer-wrapper.is-open .accessibility-toggle {
    background: var(--primary);
    color: #ffffff;
}

body.dark-mode .accessibility-drawer {
    background: var(--bg-white);
    color: var(--text-color);
    border-color: var(--primary);
}

body.dark-mode .control-buttons button,
body.dark-mode .toggle-btn {
    background: var(--bg-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

body.dark-mode .toggle-btn.active,
body.dark-mode .theme-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

body.high-contrast .accessibility-toggle,
body.high-contrast .accessibility-drawer-wrapper.is-open .accessibility-toggle,
body.high-contrast .accessibility-drawer {
    background: #000000 !important;
    color: #ffff00 !important;
    border-color: #ffffff !important;
    box-shadow: none !important;
}

body.high-contrast .drawer-header h3,
body.high-contrast .control-label {
    color: #ffff00 !important;
    border-color: #ffffff !important;
}

body.high-contrast .control-buttons button,
body.high-contrast .toggle-btn,
body.high-contrast .theme-btn {
    background: #000000 !important;
    color: #ffff00 !important;
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
}

body.high-contrast .control-buttons button:hover,
body.high-contrast .control-buttons button:focus,
body.high-contrast .toggle-btn:hover,
body.high-contrast .toggle-btn:focus,
body.high-contrast .theme-btn:hover,
body.high-contrast .theme-btn:focus,
body.high-contrast .toggle-btn.active,
body.high-contrast .theme-btn.active {
    background: #ffff00 !important;
    color: #000000 !important;
    border-color: #ffff00 !important;
}

/* Dyslexic Font */
body.dyslexic-font {
    font-family: 'Open Dyslexic', 'OpenDyslexic', 'OpenDyslexicRegular', 'Comic Sans MS', 'Chalkboard SE', sans-serif !important;
}

/* Sub-page Footer Band */
.subpage-footer-band {
    height: 40px;
    background-color: #F6645A;
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
    z-index: 10;
}

/* Guide Page Decorative Line */
.guide-page-line {
    width: 100px;
    height: 5px;
    background-color: #F6645A;
    margin-bottom: 50px;
}

/* =============================
   RESPONSIVE
   ============================= */
@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
    }

    #sidebar.open {
        transform: translateX(0);
    }

    #content {
        margin-left: 0;
        padding: 5rem var(--space-lg) var(--space-xl);
    }

    #sidebar-toggle {
        display: flex;
    }

    h1,
    .entry-title {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .wp-block-pullquote p {
        font-size: 1.1rem;
    }
}

/* =============================
   TIMELINE BLOCK (Vertical)
   ============================= */
.flipbook-timeline-editor-wrapper {
    padding: 1rem 0;
}

/* The vertical container */
.flipbook-timeline-container {
    display: flex;
    flex-direction: column;
    gap: 120px; /* At least 3x more vertical space (prev was ~40px) */
    padding: var(--space-lg) 0 var(--space-lg) 60px;
    margin: var(--space-xl) 0;
    position: relative;
}

/* The vertical line */
.flipbook-timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 30px;
    width: 4px;
    background-color: var(--border-color);
    z-index: 1;
}

/* Individual Item */
.flipbook-timeline-item {
    display: flex;
    flex-direction: row;
    align-items: center; /* Center items vertically relative to each other */
    gap: var(--space-lg);
    position: relative;
    z-index: 2;
}

/* Bullet point - positioned on the vertical line */
.timeline-item-bullet {
    position: absolute;
    left: -42px;
    top: 50%; /* Center relative to the item height */
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-color: var(--primary);
    border: 4px solid var(--bg-white);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--primary-light);
    z-index: 3;
    flex-shrink: 0;
}

.flipbook-timeline-item:nth-child(even) .timeline-item-bullet {
    background-color: var(--secondary);
    box-shadow: 0 0 0 2px var(--border-color);
}

/* Year Section */
.timeline-item-year {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--primary);
    font-weight: 700;
    line-height: 1;
    min-width: 80px;
    flex-shrink: 0;
}

.flipbook-timeline-item:nth-child(even) .timeline-item-year {
    color: var(--secondary);
}

/* Text Wrapper */
.timeline-item-text-wrapper {
    background-color: var(--primary); /* Orange as requested */
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    max-width: 50%;
    text-align: left;
    box-shadow: var(--shadow-sm);
    position: relative;
}

/* Arrow pointing to bullet/year area */
.timeline-item-text-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    transform: translateY(-50%);
    border-width: 10px 10px 10px 0;
    border-style: solid;
    border-color: transparent var(--primary) transparent transparent;
}

.flipbook-timeline-container .timeline-item-text {
    font-size: 0.95rem;
    color: #ffffff !important; /* Force white text for all timeline items */
    margin: 0 !important;
    font-weight: 500;
    line-height: 1.5;
}

.flipbook-timeline-container .timeline-item-year {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--primary); /* Back to orange for odd items */
    font-weight: 700;
    line-height: 1;
    min-width: 80px;
    flex-shrink: 0;
}

.flipbook-timeline-item:nth-child(even) .timeline-item-year {
    color: var(--secondary) !important; /* Back to navy for even items */
}

/* Alternating style colors - Even items remain Navy */
.flipbook-timeline-item:nth-child(even) .timeline-item-text-wrapper {
    background-color: var(--secondary);
}

.flipbook-timeline-item:nth-child(even) .timeline-item-text-wrapper::after {
    border-color: transparent var(--secondary) transparent transparent;
}

.flipbook-timeline-item:nth-child(even) .timeline-item-text {
    color: #fff;
}

@media (max-width: 600px) {
    .flipbook-timeline-container {
        padding-left: 50px;
        gap: 80px; /* Bit tighter on mobile */
    }
    .flipbook-timeline-container::before {
        left: 20px;
    }
    .flipbook-timeline-item {
        flex-direction: column;
        gap: var(--space-xs);
        align-items: flex-start;
    }
    .timeline-item-bullet {
        left: -42px; /* Relative to padding-left */
        top: 20px;
        transform: none;
    }
    .timeline-item-year {
        min-width: auto;
        padding-top: 0;
        margin-bottom: 5px;
        font-size: 1.2rem;
    }
    .timeline-item-text-wrapper {
        max-width: 100%; /* Full width on mobile */
    }
    .timeline-item-text-wrapper::after {
        top: 15px;
        transform: none;
    }
}

/* =============================
   QUIZ INTERFACE
   ============================= */
#flipbook-quiz-app {
    max-width: 800px;
    margin: var(--space-xl) auto;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-2xl);
    border: 1px solid var(--border-color);
}

.quiz-progress {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: var(--space-md);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quiz-question {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-top: 0;
    margin-bottom: var(--space-xl);
    line-height: 1.4;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.quiz-option-btn {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    font-size: 1.05rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-color);
    font-weight: 500;
}

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

.quiz-option-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.quiz-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-xl);
}

.quiz-nav-btn {
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quiz-prev-btn {
    background: transparent;
    color: var(--secondary);
    border: 1px solid var(--border-color);
}

.quiz-prev-btn:hover {
    background: var(--bg-color);
    color: var(--secondary-light);
}

.quiz-next-btn {
    background: var(--primary);
}

.quiz-next-btn:hover:not(:disabled) {
    background: var(--primary-dark);
}

/* Results */
.quiz-score-title {
    font-size: 2rem;
    text-align: center;
    margin-top: 0;
    margin-bottom: var(--space-md);
    color: var(--secondary);
}

.quiz-score-message {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-xl);
    padding: var(--space-md);
    border-radius: var(--radius-md);
}

.quiz-score-message.expert { background: #e0f2fe; color: #0369a1; }
.quiz-score-message.good { background: #fef9c3; color: #a16207; }
.quiz-score-message.needs-work { background: #fee2e2; color: #b91c1c; }

.quiz-recap {
    margin-top: var(--space-xl);
    border-top: 2px solid var(--border-color);
    padding-top: var(--space-xl);
}

.quiz-recap-question {
    background: var(--bg-color);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.recap-q-text {
    font-weight: 700;
    color: var(--secondary);
    margin-top: 0;
    margin-bottom: var(--space-sm);
}

.recap-answer {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.recap-answer.correct {
    background-color: #dcfce7;
    color: #15803d;
    border-left: 4px solid #22c55e;
}

.recap-answer.incorrect {
    background-color: #fee2e2;
    color: #b91c1c;
    border-left: 4px solid #ef4444;
}

.quiz-retake-btn {
    background: var(--secondary);
    display: block;
    width: 60%;
    margin: var(--space-xl) auto 0;
    text-align: center;
}
.quiz-retake-btn:hover {
    background: var(--secondary-light);
}
/* =============================
   SEARCH INTERFACE
   ============================= */

/* Sidebar Search */
.sidebar-search {
    margin-bottom: var(--space-xl);
    padding: 0 10px;
}

.scoped-search-form {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border: 2px solid var(--primary); /* Force orange border */
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.scoped-search-form:focus-within {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.scoped-search-form label {
    flex: 1;
}

.scoped-search-form .search-field {
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 2px 10px 6px; /* Final padding: top/bottom 10, right 2, left 6 */
    font-size: 1rem;
    color: var(--text-color);
    outline: none;
}

.scoped-search-form .search-field::placeholder {
    font-size: 0.8rem;
    opacity: 0.7;
}

.scoped-search-form .search-submit {
    background: transparent;
    border: none;
    padding: 8px 8px; /* Reduced side padding to compensate for larger icon */
    cursor: pointer;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.scoped-search-form .search-submit svg {
    width: 24px; /* Increased icon size back to 24px */
    height: 24px;
}

.scoped-search-form .search-submit:hover {
    color: var(--secondary);
    transform: scale(1.1);
}

/* Search Results Page */
.search-results-container {
    max-width: 800px;
    margin: var(--space-xl) 0;
}

.search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-result-item {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border-color);
}

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

.result-title {
    font-size: 1.8rem;
    margin: 0 0 var(--space-sm) 0;
}

.result-title a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.result-title a:hover {
    color: var(--primary);
}

.result-excerpt {
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.result-link {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-link:hover {
    text-decoration: underline;
}

.search-results-container .search-form {
    margin-top: var(--space-xl);
    max-width: 500px;
}

/* Search Highlighting */
.search-highlight {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    padding: 0 2px;
    border-radius: 2px;
}

.flipbook-timeline-item:nth-child(even) .search-highlight {
    background-color: var(--secondary-light);
    color: var(--secondary);
}

/* =============================
   PDF / PRINT EXPORT
   ============================= */
@media print {
    @page {
        margin: 24mm 18mm 22mm;

        @bottom-left {
            content: url("/wp-content/uploads/2026/05/logo-ace.svg");
            width: 28mm;
            height: auto;
            vertical-align: middle;
        }

        @bottom-center {
            content: var(--flipbook-pdf-footer-title, "");
            font-family: Arial, sans-serif;
            font-size: 8.5pt;
            color: #000;
            vertical-align: middle;
        }

        @bottom-right {
            content: counter(page);
            font-family: Arial, sans-serif;
            font-size: 9pt;
            color: #000;
            vertical-align: middle;
        }
    }

    @page:first {
        @bottom-left {
            content: "";
        }

        @bottom-center {
            content: "";
        }

        @bottom-right {
            content: "";
        }
    }

    html,
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt !important;
        overflow: visible !important;
    }

    #wpadminbar,
    .site-header,
    #sidebar,
    #sidebar-toggle,
    .accessibility-drawer-wrapper,
    .page-navigation,
    .flipbook-download-pdf,
    .subpage-footer-band,
    .edge-blob {
        display: none !important;
    }

    .flipbook-print-pdf-meta {
        position: relative;
        display: block !important;
    }

    #page,
    #content,
    #primary,
    #main,
    #swup {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        border: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    article {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .entry-header,
    .entry-content,
    .toc-header,
    .toc-content,
    .cover-top-section,
    .cover-bottom-section,
    .cover-top-content,
    .cover-bottom-section .entry-content {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0 0 1rem !important;
        padding: 0 !important;
        background: #fff !important;
        color: #000 !important;
    }

    .guide-page-line {
        display: none !important;
    }

    .flipbook-print-logo {
        position: absolute;
        top: 0;
        right: 0;
        display: flex !important;
        justify-content: flex-end;
        align-items: flex-start;
        width: 32mm;
        height: 14mm;
        text-align: right;
    }

    .flipbook-print-logo img {
        display: block;
        width: 32mm;
        max-height: 14mm;
        height: auto;
        margin: 0 !important;
        border-radius: 0 !important;
        object-fit: contain;
    }

    .flipbook-print-guide-title {
        display: block !important;
        margin: 0 38mm 1.5rem 0 !important;
        padding: 0 0 0.75rem !important;
        border-bottom: 1px solid #000 !important;
        color: #000 !important;
        font-family: var(--font-heading);
        font-size: 22pt !important;
        line-height: 1.2 !important;
        page-break-after: avoid;
    }

    .flipbook-print-page-number {
        display: none !important;
    }

    .wp-block-accordion-panel {
        display: block !important;
        height: auto !important;
        max-height: none !important;
        opacity: 1 !important;
        overflow: visible !important;
        visibility: visible !important;
    }

    .wp-block-accordion-heading__toggle {
        break-after: avoid;
        page-break-after: avoid;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    li,
    blockquote,
    figcaption,
    .entry-title,
    .toc-title {
        color: #000 !important;
    }

    a {
        color: #000 !important;
        text-decoration: underline;
    }

    img,
    figure {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
