/* CSS Variables for Consistent Theming */
:root {
    --primary-font: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
    --display-font: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
    --primary-color: #2c1810;
    --secondary-color: #8b4513;
    --accent-color: #d4af37;
    --light-bg: #f0e6d6;
    --white: #f5ede0;
    --gray-light: #e8ddd0;
    --gray-medium: #9e9e9e;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.25);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--primary-font);
    font-size: 20px;
    line-height: 1.65;
    color: var(--primary-color);
    background-color: var(--light-bg);
    overflow-x: hidden;
}

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

/* Typography */
h1,
h2,
h3 {
    font-family: var(--display-font);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.0rem;
    color: var(--primary-color);
}

h2 {
    font-size: 2.4rem;
    color: var(--primary-color);
}

h3 {
    font-size: 1.7rem;
    color: var(--secondary-color);
}

p {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-light) 100%);
    box-shadow: 0 2px 20px var(--shadow-light);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 1rem 0;
}

.nav-link {
    font-family: var(--display-font);
    font-weight: 400;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
    background: rgba(139, 69, 19, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 80%;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 2.5rem 0;
    background: linear-gradient(135deg, var(--light-bg) 0%, #f0ebe6 100%);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 69, 19, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.2rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.book-cover-container {
    position: relative;
    display: flex;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotateY(-5deg);
    }

    50% {
        transform: translateY(-10px) rotateY(-5deg);
    }
}

.book-cover {
    width: 280px;
    height: 360px;
    border-radius: 8px;
    position: relative;
    transform: perspective(1000px) rotateY(-15deg);
    transition: transform 0.3s ease;
    box-shadow:
        20px 20px 60px var(--shadow-heavy),
        -10px -10px 30px rgba(255, 255, 255, 0.3);
}

.book-cover:hover {
    transform: perspective(1000px) rotateY(-10deg) translateY(-5px);
}

.book-shadow {
    position: absolute;
    bottom: -20px;
    left: 40px;
    right: -20px;
    height: 40px;
    background: radial-gradient(ellipse, var(--shadow-medium), transparent);
    border-radius: 50%;
    z-index: -1;
    animation: shadowFloat 6s ease-in-out infinite;
}

@keyframes shadowFloat {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.2;
    }
}

.cover-placeholder {
    width: 100%;
    height: 100%;
    background: url('../assets/images/Cover-Page.png') center center;
    center center;
    background-size: cover;
    background-color: #8b4513;
    /* Fallback color if image doesn't load */
    border-radius: 8px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.hero-text {
    animation: slideInRight 1s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-title {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 1.8rem;
    color: rgba(44, 24, 16, 0.8);
    line-height: 1.65;
}

.hero-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 200px));
    gap: 0.5rem;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--display-font);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), #a0522d);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 69, 19, 0.4);
}

.btn-secondary {
    background: var(--light-bg);
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-download {
    background: linear-gradient(135deg, var(--accent-color), #b8941f);
    color: var(--primary-color);
    font-size: 1.1rem;
    padding: 1.2rem 2.5rem;
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.3);
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(212, 175, 55, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Sections */
section {
    padding: 2rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 1.2rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: rgba(44, 24, 16, 0.7);
    font-style: italic;
}

/* About Section */
.about-section {
    background: var(--light-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.3rem;
    margin-bottom: 2rem;
}

.about-card {
    background: var(--gray-light);
    padding: 0.95rem 1.05rem;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--accent-color);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-light);
}

.about-card h3 {
    margin: 0 0 0.45rem 0;
    color: var(--secondary-color);
    line-height: 1.15;
}

.author-bio {
    background: linear-gradient(135deg, var(--light-bg), var(--gray-light));
    padding: 1.6rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 1.2rem;
}

.author-bio h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.author-contact {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(139, 69, 19, 0.2);
}

.author-contact p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.author-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.author-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Download Section */
.download-section {
    background: linear-gradient(135deg, var(--primary-color), #3d2317);
    color: var(--white);
}

.download-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 4rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.download-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.download-card h2 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.download-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.download-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2.5rem 0;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    font-family: var(--display-font);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-note {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
    font-style: italic;
}

/* Chapters and Discussion Sections */
.chapters-section,
.discussion-section {
    background: var(--gray-light);
}

.chapters-placeholder,
.discussion-placeholder {
    background: var(--gray-light);
    padding: 4rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 30px var(--shadow-light);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.chapter-preview,
.contact-info {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    text-align: left;
}

.chapter-preview h4,
.contact-info h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.chapter-preview ul {
    list-style: none;
    padding: 0;
}

.chapter-preview li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
    position: relative;
    padding-left: 1.5rem;
}

.chapter-preview li::before {
    content: '▸';
    color: var(--accent-color);
    position: absolute;
    left: 0;
}

/* Footer */
.site-footer{
  background: var(--primary-color);
  color: var(--white);
  padding: 0.75rem 0;
  text-align: center;
  line-height: 1.15;
}

.footer-content p{
  color: rgba(255,255,255,0.85);
  margin: 0.12rem 0;
  line-height: 1.15;
  font-size: 0.88rem;
}
.footer-content a{color: inherit; text-decoration: underline;}
.footer-content a:hover{text-decoration: none;}
.footer-translate{font-size:0.84rem; opacity:0.9; margin-top:0.15rem;}



.about-card p {
    margin: 0;
    font-size: 1.00rem;
    line-height: 1.28;
}

.author-bio p {
    font-size: 1.05rem;
}

.blog-placeholder>p {
    font-size: 1.05rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .main-nav {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .book-cover {
        width: 240px;
        height: 310px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .download-stats {
        gap: 1.5rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .main-nav {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .book-cover {
        width: 200px;
        height: 260px;
    }

    .download-card,
    .chapters-placeholder,
    .discussion-placeholder {
        padding: 2rem;
    }

    section {
        padding: 2rem 0;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for accessibility */
.nav-link:focus,
.btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Compact About-card button spacing */
.about-card .btn{margin-top:0.55rem;}


/* =============================================================
   PAGE-LEVEL LAYOUT HELPERS
   ============================================================= */

.narrow-wrap {
    max-width: 980px;
    margin: 0 auto;
}

.accent-card {
    border-left: 6px solid #b8742a;
    padding-left: 1.25rem;
}

.accent-card h3,
.accent-card h2 {
    margin-top: 0;
}


/* =============================================================
   INTERNATIONAL EDITIONS
   ============================================================= */

.editions-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 700px) {
    .editions-list {
        grid-template-columns: 1fr;
    }
}

.edition-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.edition-code {
    min-width: 58px;
    font-weight: 600;
}

.status-mini {
    margin-left: auto;
    font-size: 0.9rem;
    opacity: 0.85;
}

.edition-title-translated {
    margin: 0.2rem 0 0 0;
    opacity: 0.9;
}

#international .accent-panel {
    padding: 0.85rem 1.05rem 0.75rem 1.05rem !important;
    background: rgba(230, 210, 185, 0.70) !important;
    box-shadow: 0 6px 16px rgba(44, 24, 16, 0.07) !important;
    border-radius: 12px !important;
}

#international .section-header            { margin-bottom: 0.45rem !important; }
#international .section-header h2         { margin: 0 0 0.15rem 0 !important; line-height: 1.05 !important; }
#international .section-subtitle          { margin: 0 !important; line-height: 1.25 !important; font-size: 0.98rem !important; }
#international .editions-list             { gap: 10px !important; margin-top: 0.55rem !important; }
#international .edition-row               { gap: 10px !important; }
#international .edition-code              { min-width: 44px !important; font-size: 0.95rem !important; }
#international .edition-info h3           { margin: 0 !important; line-height: 1.08 !important; font-size: 1.08rem !important; }
#international .edition-title-translated  { margin: 0.12rem 0 0 0 !important; line-height: 1.25 !important; font-size: 0.98rem !important; }
#international .status-mini               { font-size: 0.86rem !important; }
#international .translation-disclaimer    { margin-top: 0.55rem !important; }
#international .translation-disclaimer p  { margin: 0 !important; line-height: 1.15 !important; font-size: 0.96rem !important; }

/* Tighten spacing between Author and International Editions */
/* ── About the Work: toned-down typographic scale ── */
#about .section-header h2       { font-size: 1.55rem !important; margin-bottom: 0.25rem !important; }
#about .section-subtitle        { font-size: 0.95rem !important; }
#about .about-card h3           { font-size: 1.05rem !important; margin-bottom: 0.3rem !important; }
#about .about-card p            { font-size: 0.93rem !important; line-height: 1.45 !important; }

/* ── About the Author: same restrained scale ── */
#author        { padding-bottom: 0.35rem !important; margin-bottom: 0 !important; }
#international { padding-top: 0.35rem !important;    margin-top: 0 !important; }


/* =============================================================
   AUTHOR SECTION COMPACTING
   ============================================================= */

#author .section-header .section-subtitle { display: none !important; }
#author .author-bio h3                    { display: none !important; }
#author .accent-panel                     { padding: 0.9rem 1.05rem 0.85rem 1.05rem !important; }
#author .section-header h2              { font-size: 1.55rem !important; margin-bottom: 0.25rem !important; }
#author .author-bio p                   { font-size: 0.93rem !important; margin: 0 0 0.45rem 0 !important; line-height: 1.45 !important; }
#author .author-contact p               { font-size: 0.90rem !important; margin: 0.15rem 0 !important; line-height: 1.35 !important; }
#author .author-contact {
    margin-top: 0.25rem !important;
    padding-top: 0.25rem !important;
    border-top: 1px solid rgba(184, 116, 42, 0.25);
}


/* =============================================================
   BLOG SECTION COMPACTING
   ============================================================= */

#blog ul                                  { padding-left: 1.35rem; }
#blog li                                  { margin-left: 0.15rem; }
#blog .accent-panel                       { padding: 0.9rem 1.05rem 0.85rem 1.05rem !important; }
#blog .section-header                     { margin-bottom: 0.45rem !important; }
#blog .section-header h2                  { margin: 0 0 0.15rem 0 !important; line-height: 1.12 !important; }
#blog .section-header .section-subtitle   { margin: 0 !important; line-height: 1.2 !important; }
#blog .blog-placeholder                   { padding-left: 0.4rem !important; padding-right: 0.4rem !important; }
#blog h3                                  { margin: 0.55rem 0 0.35rem 0 !important; line-height: 1.12 !important; }
#blog h4                                  { margin: 0.5rem 0 0.2rem 0 !important; line-height: 1.12 !important; }
#blog p                                   { margin: 0 0 0.45rem 0 !important; line-height: 1.25 !important; }
#blog ul                                  { margin: 0.2rem 0 0.45rem 1.15rem !important; padding-left: 0 !important; }
#blog li                                  { margin: 0 0 0.22rem 0 !important; line-height: 1.22 !important; }
#blog .platform-note p                    { margin: 0 !important; }
#blog .hero-actions                       { margin-top: 0.55rem !important; gap: 0.6rem !important; }
#blog .btn                                { padding: 0.55rem 0.9rem !important; }


/* =============================================================
   DOWNLOAD BUTTONS  (SVG flag + language chip)
   ============================================================= */

.dlbtn {
    position: relative;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 6px 10px;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .13);
    transform: translateY(0);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    border: 1px solid rgba(255, 255, 255, .18);
    overflow: hidden;
}

.dlbtn:hover         { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, .18); filter: saturate(1.08); }
.dlbtn:active        { transform: translateY(0);    box-shadow: 0 10px 26px rgba(0, 0, 0, .13); }
.dlbtn:focus-visible { outline: 3px solid rgba(255, 255, 255, .55); outline-offset: 3px; }

.dl-flag  { font-size: 20px; line-height: 1; flex-shrink: 0; }
.dl-text  { display: flex; flex-direction: column; line-height: 1.1; overflow: hidden; }
.dl-title { font-weight: 700; font-size: .82rem; letter-spacing: .2px; color: #fff; white-space: nowrap; }
.dl-sub   { font-size: .72rem; opacity: .88; margin-top: 1px; color: #fff; white-space: nowrap; }

.dl-chip {
    margin-left: auto;
    font-weight: 700;
    font-size: .70rem;
    letter-spacing: .8px;
    padding: .2rem .4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    flex-shrink: 0;
}

/* Primary (English) — darkest, most prominent */
.dl-en    { background: linear-gradient(135deg, #3d1e08, #5a3010); }

/* Standard language editions — uniform medium brown */
.dl-lang  { background: linear-gradient(135deg, #7a5530, #9b7040); }

/* Free/bonus items — lighter warm grey */
.dl-notes { background: linear-gradient(135deg, #7a6a58, #9a8a76); }

/* Legacy aliases kept for any other pages */
.dl-fr    { background: linear-gradient(135deg, #7a5530, #9b7040); }
.dl-es    { background: linear-gradient(135deg, #7a5530, #9b7040); }

/* buttons fill their grid cell naturally */

/* =============================================================
   COMING SOON MODAL
   ============================================================= */

.cs-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9000;
    align-items: center;
    justify-content: center;
}

.cs-overlay.cs-active {
    display: flex;
}

.cs-modal {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.28);
    padding: 2.4rem 2.8rem 2rem 2.8rem;
    max-width: 380px;
    width: 90%;
    position: relative;
    text-align: center;
    animation: csModalIn 0.22s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes csModalIn {
    from { opacity:0; transform: scale(0.88); }
    to   { opacity:1; transform: scale(1); }
}

.cs-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 1.4rem;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-weight: 300;
    transition: color 0.15s;
}
.cs-close:hover { color: #333; }

.cs-icon {
    font-size: 2.8rem;
    margin-bottom: 0.6rem;
}

.cs-modal h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 0 0 0.4rem 0;
}

.cs-modal p {
    font-size: 1rem;
    color: rgba(44,24,16,0.7);
    margin: 0;
    font-style: italic;
}


/* =============================================================
   LETTERBOX TITLE  (homage to Leonardo da Vinci / De Divina Proportione)
   ============================================================= */

.letterbox-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.6rem;
}

.letterbox-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1px;
    flex-wrap: nowrap;
}

.lbox {
    display: inline-block;
    flex-shrink: 0;
}

.lbox-sm { width: 26px; height: 26px; }
.lbox-lg { width: 31px; height: 31px; }

.lbox-gap-sm { display: inline-block; width: 6px; }
.lbox-gap-lg { display: inline-block; width: 7px; }

@media (max-width: 600px) {
    .lbox-sm { width: 17px; height: 17px; }
    .lbox-lg { width: 21px; height: 21px; }
}


/*==============================================================================
   ABOUT PAGE (about.html) — page-specific styles
==============================================================================*/

/* ── Global font-size reset for this page ── */
.container, .container * {
    font-size: 0.90rem;
    line-height: 1.55;
}
h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
}
.about-hero h1  { font-size: 2.0rem !important; }
.section-divider-card h2 { }
.preface-card-header h3  { font-size: 1.0rem !important; }
.book-card h4            { font-size: 0.95rem !important; }
.toc-sidebar, .toc-sidebar * { font-size: 0.80rem !important; }
.toc-sidebar h4          { font-size: 0.72rem !important; }
code { font-size: 0.85rem !important; }

/* Layout helpers matching index.html */
.narrow-wrap { max-width: 980px; margin: 0 auto; }
.accent-card { border-left: 6px solid #b8742a; padding-left: 1.25rem; }
.accent-card h3, .accent-card h2 { margin-top: 0; }

/* Compact card styling */
.preface-card {
    background: rgba(240, 224, 200, 0.85);
    padding: 1.2rem 1.4rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(44, 24, 16, 0.08);
    margin-bottom: 1rem;
    border-left: 6px solid #b8742a;
}

.preface-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.preface-card-header img {
    height: 28px;
    width: auto;
    flex-shrink: 0;
}

.preface-card-header h3 {
    margin: 0;
    color: var(--secondary-color);
}

.preface-card p {
    margin: 0;
    line-height: 1.55;
}

.preface-card p + p {
    margin-top: 0.6rem;
}

.section-divider-card {
    background: rgba(139, 69, 19, 0.08);
    padding: 0.8rem 1.4rem;
    border-radius: 8px;
    margin: 1.5rem 0 1rem 0;
    border-left: 4px solid var(--accent-color);
}

.section-divider-card h2 {
    margin: 0;
    color: var(--primary-color);
}

.book-card {
    background: rgba(240, 224, 200, 0.9);
    padding: 1rem 1.2rem;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(44, 24, 16, 0.06);
    margin-bottom: 0.8rem;
    border-left: 4px solid var(--accent-color);
}

.book-card h4 {
    margin: 0 0 0.5rem 0;
    color: var(--secondary-color);
}

.book-card p {
    margin: 0;
    line-height: 1.5;
}

.audience-card {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(240, 224, 200, 0.9);
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(44, 24, 16, 0.06);
    margin-bottom: 0.7rem;
    border-left: 4px solid var(--accent-color);
}

.audience-card img {
    height: 22px;
    width: auto;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.audience-card-content h4 {
    margin: 0 0 0.4rem 0;
    color: var(--secondary-color);
}

.audience-card-content p {
    margin: 0;
    line-height: 1.5;
}

.reference-list {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.reference-list li {
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.signature-block {
    margin-top: 1.5rem;
}

.signature-block p {
    margin: 0.15rem 0;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

sup {
}

.footnote {
    color: rgba(44, 24, 16, 0.7);
    margin-top: 0.5rem;
    padding-left: 1rem;
}

.callout-box {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 0.8rem 1rem;
    margin: 0.8rem 0;
    border-radius: 6px;
    font-style: italic;
}

code {
    background: rgba(139, 69, 19, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* ── TOC sidebar ── */
.page-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}
.toc-sidebar {
    position: sticky;
    top: 90px;
    background: rgba(240, 224, 200, 0.85);
    border-radius: 10px;
    border-left: 4px solid #b8742a;
    padding: 1rem 1.1rem;
    box-shadow: 0 4px 16px rgba(44,24,16,0.07);
}
.toc-sidebar h4 {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #b8742a;
    margin: 0 0 0.7rem 0;
}
.toc-sidebar ol {
    margin: 0; padding-left: 1.1rem;
}
.toc-sidebar li {
    margin-bottom: 0.45rem;
    line-height: 1.3;
}
.toc-sidebar a {
    color: var(--primary-color);
    text-decoration: none;
}
.toc-sidebar a:hover { color: #b8742a; text-decoration: underline; }

@media (max-width: 820px) {
    .page-layout { grid-template-columns: 1fr; }
    .toc-sidebar { display: none; }
}

/* ── Hero banner ── */
.about-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #5a2d0c 100%);
    color: #fff;
    text-align: center;
    padding: 2rem 1rem 1.6rem;
    margin-bottom: 1.8rem;
    border-radius: 0 0 18px 18px;
}
.about-hero h1 {
    color: #fff;
    margin-bottom: 0.3rem;
    letter-spacing: 0.05em;
}
.about-hero p {
    color: rgba(255,255,255,0.75);
    margin: 0;
    font-style: italic;
}

/* ── Section dividers ── */
.section-divider-card {
    background: transparent !important;
    border-left: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 2rem 0 0.8rem 0 !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.section-divider-card h2 {
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: #b8742a !important;
    white-space: nowrap;
    margin: 0 !important;
}
.section-divider-card::after {
    content: '';
    display: block;
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #b8742a55, transparent);
}

/* ── Book cards grid ── */
.book-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    margin-bottom: 0.8rem;
}
.book-card-full {
    grid-column: 1 / -1;
}
@media (max-width: 500px) {
    .book-cards-grid { grid-template-columns: 1fr; }
    .book-card-full { grid-column: 1; }
}
.book-card {
    background: rgba(240, 224, 200, 0.92) !important;
    padding: 0.9rem 1rem !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(44,24,16,0.06) !important;
    border-left: 4px solid var(--accent-color) !important;
    margin: 0 !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(44,24,16,0.12) !important;
}
.book-card h4 {
    font-size: 0.95rem !important;
    margin-bottom: 0.4rem !important;
}
.book-card p { line-height: 1.45 !important; }


/* ── Pull quote ── */
.pull-quote {
    border-left: 5px solid #d4af37;
    margin: 0.8rem 0 1rem 0;
    padding: 0.8rem 1.2rem;
    background: rgba(212,175,55,0.07);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--primary-color);
    line-height: 1.6;
}
.pull-quote cite {
    display: block;
    margin-top: 0.4rem;
    font-style: normal;
    color: #b8742a;
}

/* ── Preface card hover ── */
.preface-card {
    transition: box-shadow 0.18s ease;
}
.preface-card:hover {
    box-shadow: 0 12px 30px rgba(44,24,16,0.12) !important;
}

/* ── Accordion sections ── */
.section-accordion {
    border-radius: 10px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}
.section-accordion summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    cursor: pointer;
    list-style: none;
    padding: 0;
    margin: 1.8rem 0 0.6rem 0;
}
.section-accordion summary::-webkit-details-marker { display: none; }
.section-accordion summary::marker { display: none; }
.section-accordion summary .section-divider-card {
    flex: 0 1 auto;
    margin: 0 !important;
    pointer-events: none;
    width: auto;
}
.section-accordion summary .section-divider-card::after {
    display: none;
}
.section-accordion summary .accordion-chevron {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #b8742a;
    transition: transform 0.25s ease;
}
.section-accordion[open] summary .accordion-chevron {
    transform: rotate(180deg);
}
.accordion-body {
    padding-top: 0.2rem;
}
/* Smooth open animation */
.accordion-body {
    animation: accordionOpen 0.2s ease-out;
}
@keyframes accordionOpen {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
    