/* ===== Dark-mode override ===== */
/* color-scheme: dark tells the browser the page is dark from parse time, so
   Chrome's text rasterizer calibrates subpixel anti-aliasing for a dark
   background from the first paint (preventing the washed-out-glyphs race).
   Also makes native UI (scrollbars, form controls, <select>s) use dark variants. */
:root { color-scheme: dark; }

/* Kept with !important so bootstrap's default light backgrounds don't bleed
   through on the body/article/heading elements. */
html, body, article, h1, h2, a {
    background-color: #000 !important;
    -webkit-font-smoothing: subpixel-antialiased !important;
    -moz-osx-font-smoothing: auto !important;
}

/* ===== Global typography & layout ===== */
body {
    color: #333333;
    margin-top: 5rem;
}

h1, h2, h3, h4, h5, h6 {
    color: #444444;
}

ul {
    margin: 0;
}

/* ===== Content section (used by detail pages) ===== */
.content-section {
    padding: 10px 20px;
    background-color: black !important;
}

/* ===== Article metadata (used by detail pages) ===== */
.article-metadata {
    padding-bottom: 1px;
}

.article-metadata a:hover {
    color: #333;
    text-decoration: none;
}

/* ===== Smart navbar (auto-hide on scroll) ===== */
.smart-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.25s ease, opacity 0.25s ease;
    border-bottom: 0;
    box-shadow: none;
    padding-top: env(safe-area-inset-top, 0px);
}
.smart-navbar.nav-hidden {
    transform: translateY(-100%);
    opacity: 0;
}
#nav-spacer {
    background-color: #000;
}

/* ===== Navbar post-actions (vocabSize + tolerableCarousels controls) ===== */
#postActions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    font-size: clamp(9px, 1.1vw, 13px);
}

#vocabSection, #carouselSection {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    border: 1px solid lawngreen;
    padding: 2px 5px;
    background: black;
    font-size: inherit;
}

#vocabSize, #tolerableCarousels {
    width: 60px;
    color: red;
    background: black;
    border: 1px solid #555;
    font-size: inherit;
}

#updateVocab, #updateTolerableCarousels {
    color: lawngreen;
    background: black;
    border: 1px solid #555;
    font-size: inherit;
    white-space: nowrap;
}
