/* ===== Furo light-theme customizations ===== */

/* Force light mode — hide the theme toggle */
.theme-toggle {
    display: none !important;
}

/* Typography & readability */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
                 Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.content {
    font-size: 1.02rem;
    line-height: 1.75;
    letter-spacing: 0.01em;
}

/* Headings */
.content h1,
.content h2,
.content h3,
.content h4 {
    color: #2e2924;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.content h1 {
    border-bottom: 2px solid #e0d9cf;
    padding-bottom: 0.4em;
    margin-bottom: 1em;
}

/* Links */
.content a {
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.content a:hover {
    text-decoration-thickness: 2px;
}

/* Inline code */
.content code.literal {
    font-size: 0.9em;
    padding: 0.15em 0.35em;
    border-radius: 4px;
    border: 1px solid #e0d9cf;
}

/* Code blocks */
.content pre {
    border-radius: 6px;
    border: 1px solid #e0d9cf;
}

/* Admonitions — softer edges */
.admonition {
    border-radius: 6px;
    border-left-width: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Math blocks — slight background for legibility */
div.math {
    background: #f8f5f0;
    padding: 1em 1.2em;
    border-radius: 6px;
    border: 1px solid #ece7df;
    overflow-x: auto;
}

/* Tables */
.content table {
    border-collapse: collapse;
}

.content table th {
    background: #f3efe9;
    font-weight: 600;
    color: #3b3632;
}

.content table td,
.content table th {
    border: 1px solid #e0d9cf;
    padding: 0.55em 0.8em;
}

.content table tr:nth-child(even) {
    background: #faf8f5;
}

/* Sidebar polish */
.sidebar-brand-text {
    font-weight: 600;
}

.sidebar-tree .current > .reference {
    font-weight: 600;
    color: #4a7c72;
}

/* TOC in right rail */
.toc-tree a.reference {
    color: #63594f;
    font-size: 0.88rem;
}

.toc-tree a.reference:hover {
    color: #4a7c72;
}

/* Scrollbar (webkit) — keep it subtle */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d4ccc2;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #bab2a7;
}

/* Sidebar donate section */
.sidebar-donate {
    padding: 0.75rem 1rem 4rem;
    border-top: 1px solid #e0d9cf;
    margin-top: 0.5rem;
}

.donate-label {
    font-size: 0.78rem;
    color: #8c8078;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.donate-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45em;
    padding: 0.6em 1.2em;
    background: #003087;
    color: #fff !important;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0, 48, 135, 0.18);
}

.donate-button:hover {
    background: #001f5b;
    box-shadow: 0 3px 10px rgba(0, 48, 135, 0.28);
}

.donate-icon {
    flex-shrink: 0;
    opacity: 0.9;
}

/* Cover hero section for the landing page */
.cover-hero {
    position: relative;
    margin: -20px -20px 40px -20px;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.cover-hero img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    object-position: center 40%;
    display: block;
    filter: brightness(0.45);
}

.cover-hero .cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.35) 100%
    );
}

.cover-hero .cover-title {
    font-size: 2.8em;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.cover-hero .cover-subtitle {
    font-size: 1.3em;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 24px 0;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

.cover-hero .cover-rule {
    width: 80px;
    height: 2px;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    margin: 0 0 24px 0;
}

.cover-hero .cover-author {
    font-size: 1.05em;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 6px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 400;
}

.cover-hero .cover-tagline {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.45);
    margin: 12px 0 0 0;
    font-style: italic;
    max-width: 500px;
}

.cover-hero .cover-credit {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.65em;
    color: rgba(255, 255, 255, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
    .cover-hero img {
        height: 320px;
    }
    .cover-hero .cover-title {
        font-size: 2em;
    }
    .cover-hero .cover-subtitle {
        font-size: 1.1em;
    }
}
