:root {
    --bg-color: #ffffff;
    --brand-color: #7C2D12;
    --brand-color-rgb: 124, 45, 18;
    /* Tells the browser to theme its own UI — scrollbars, form controls,
       autofill backgrounds, spinners — instead of leaving light-mode
       widgets stranded on a dark page. */
    color-scheme: light;
}

html.dark-mode {
    color-scheme: dark;
}

body {
    background-color: var(--bg-color);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: #333;
    overflow-x: clip;
    width: 100%;
    position: relative;
}
html {
    overflow-x: clip;
    width: 100%;
}

/* Root cause of the dark-mode "text blends into card background" bug:
   Bootstrap's own .card component sets its own `color` (via its
   --bs-card-color/--bs-body-color custom properties, which this app
   never re-themes for dark mode - it uses its own html.dark-mode class
   system instead of Bootstrap's data-bs-theme). That pins EVERY
   heading/paragraph/div inside ANY .card-classed element (which is
   almost every card on the site: .resource-card, .domain-card, admin
   cards, etc.) to Bootstrap's near-black light-theme text color,
   overriding the lighter color this app's own `html.dark-mode body`
   rule sets - regardless of how dark the card's own background gets.
   One override here, matching that same body text color, fixes every
   card on the site at once instead of patching each heading/paragraph
   individually per page. */
html.dark-mode body .card {
    color: #e2e8f0;
}

h1, h2, h3, h4, h5, h6, .fw-bold, .navbar-brand {
    font-family: 'Outfit', sans-serif;
}

/* ------------------------------------------------------------
   Global link color system.
   ------------------------------------------------------------
   A bare, otherwise-unstyled <a> (the breadcrumb trail, a related-
   resource card, anything added the same way later) was falling
   through to the browser/Bootstrap default link blue, with the
   default purple on top once visited - neither matches ResourceHub's
   palette. This is deliberately the LOWEST-specificity link rule on
   the site: every link that already has its own color (`.rh-btn`,
   `.text-brand`, `.custom-nav-link`, the footer's `.dock-link`, etc.)
   keeps rendering exactly as it did, since a plain `a` selector loses
   to any class selector. `:visited` is pinned to the same color so
   the browser's default visited-purple can never surface either. */
a {
    color: var(--brand-color);
}
a:hover {
    color: var(--brand-color);
    text-decoration-color: currentColor;
}
a:not(.rh-btn):visited {
    color: var(--brand-color);
}

/* Breadcrumbs are wayfinding chrome, not a primary content link - a
   quieter, muted color (brightening to the brand accent on hover/
   focus) reads better here than reusing the same brand color as the
   page's actual calls to action. */
.breadcrumb-item a {
    color: #64748b;
}
.breadcrumb-item a:hover,
.breadcrumb-item a:focus-visible {
    color: var(--brand-color);
}
html.dark-mode body .breadcrumb-item a {
    color: #94a3b8;
}
html.dark-mode body .breadcrumb-item a:hover,
html.dark-mode body .breadcrumb-item a:focus-visible {
    color: var(--brand-color);
}

/* Consistent keyboard-focus treatment for everything that isn't a
   .rh-btn (which carries its own ring). Mouse users never see this. */
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--brand-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ------------------------------------------------------------
   Global checkbox / radio theme (Bootstrap .form-check-input).
   ------------------------------------------------------------
   `accent-color` alone (still set as a fallback further down for any
   checkbox that ISN'T Bootstrap-classed) does nothing here: Bootstrap's
   .form-check-input draws its own checkbox entirely via
   `appearance: none` + a background-image/-color it controls itself.
   IMPORTANT: unlike most Bootstrap 5.3 components, the checked/focus
   states here are NOT exposed as overridable custom properties - in
   the actual shipped 5.3.2 CSS, `.form-check-input:checked` and
   `.form-check-input:focus` set background-color/border-color/
   box-shadow as literal hardcoded values (#0d6efd, the Bootstrap
   blue), and only the checkmark GLYPH goes through a variable
   (--bs-form-check-bg-image, written by a same-specificity
   `:checked[type=...]` rule). That mismatch - assuming a
   `--bs-form-check-input-checked-*` variable family that doesn't
   actually exist in this version - is what let Bootstrap's blue keep
   rendering through an earlier pass here despite looking "themed".
   Confirmed against the exact vendored bootstrap.min.css@5.3.2 rules
   before writing this. Real fix: override the same properties/
   selectors Bootstrap itself uses, with matching-or-higher
   specificity so source order (this file loads after Bootstrap's)
   decides the tie. The checkmark itself swaps to a dark glyph in dark
   mode: white-on-amber (the dark-mode brand color) reads noticeably
   weaker than white-on-rust does in light mode. */
.form-check-input {
    border-color: rgba(0, 0, 0, 0.25);
    cursor: pointer;
}
.form-check-input:checked {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
}
.form-check-input:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 0.2rem rgba(var(--brand-color-rgb), 0.25);
}
/* :not(:checked) - a plain `.form-check-input` override here (no
   :checked qualifier) has higher specificity than Bootstrap's own
   `.form-check-input:checked` rule and would win regardless of checked
   state, silently blocking the checked-state background/checkmark
   above from ever showing in dark mode. Scoping this to the unchecked
   surface only is what lets the checked rule above take over cleanly
   once checked. The border-color is split into its own :not(:focus)
   rule below rather than living here too: at (0,3,2) this background
   rule already outranks the (0,2,0) `.form-check-input:focus` rule
   above, and if border-color were included here it would keep
   painting the dim unchecked border over the amber focus border while
   tabbed to but still unchecked - confirmed live (the focus box-shadow
   ring rendered correctly, the border color didn't, until this was
   split out). The background staying dim while focused-and-unchecked
   is fine/expected; only the border needs to yield to focus. */
html.dark-mode body .form-check-input:not(:checked) {
    background-color: rgba(255, 255, 255, 0.08);
}
html.dark-mode body .form-check-input:not(:checked):not(:focus) {
    border-color: rgba(255, 255, 255, 0.25);
}
/* Dark-mode checkmark/dot glyph: same specificity as Bootstrap's own
   `:checked[type=checkbox]` / `:checked[type=radio]` rules that write
   this same variable, so source order settles it in our favor. */
html.dark-mode body .form-check-input:checked[type="checkbox"] {
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%230f172a'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}
html.dark-mode body .form-check-input:checked[type="radio"] {
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%230f172a'/%3e%3c/svg%3e");
}

/* Fallback for a checkbox that isn't Bootstrap-classed - accent-color
   is honored by the browser's own native rendering path, which
   .form-check-input above deliberately opts out of. */
input[type="checkbox"]:not(.form-check-input),
input[type="radio"]:not(.form-check-input) {
    accent-color: var(--brand-color);
}

/* Native <select>s left un-rebuilt (see PART 4 of the phase this was
   built for - a real <select> stays preferable for simple short
   forms). Themed to match .rh-select/.contribute-input's language
   rather than the browser default, without changing their behavior. */
select.form-select:not(.contribute-input):not(.rh-select) {
    border-color: rgba(0, 0, 0, 0.15);
}
select.form-select:not(.contribute-input):not(.rh-select):focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 0.2rem rgba(var(--brand-color-rgb), 0.2);
}
html.dark-mode body select.form-select:not(.contribute-input):not(.rh-select) {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
}

/* ============================================================
   Shared "detail page" component system
   ------------------------------------------------------------
   .type-badge / .level-badge / .verify-badge / .detail-dl /
   .related-resource-card were each being hand-copied into a per-page
   inline <style> block (resource_detail.html, topic-adjacent admin
   pages, profile.html, saved.html, submission_detail.html,
   user_detail.html) - five to six near-identical copies of the same
   rules, already drifting from each other in small ways (a padding
   here, a missing box-shadow layer there - the exact kind of thing
   that made the dark-mode .card text-color bug page-by-page instead of
   global). Consolidated here as the single source every one of those
   pages (and templates/admin/edit_resource.html) now uses instead.
   Their own inline <style> blocks have had these rules removed.

   .resource-card itself is NOT defined here, on purpose: it already
   had a real global definition further down (shared with .domain-card,
   under "Cards" / "Card Left Accent Bar" - the two have always been
   the same visual component), including a dark-mode override that
   uses !important. An earlier pass at this consolidation added a
   competing copy right here, not realizing that - the two fought,
   !important silently won every time, and this block's copy did
   nothing except (accidentally) contribute a box-shadow the other
   didn't set, now folded into that real definition instead. Confirmed
   by checking what was actually rendering before deleting anything. */

.type-badge, .level-badge {
    background-color: rgba(var(--brand-color-rgb), 0.08);
    color: var(--brand-color);
    border: 1px solid rgba(var(--brand-color-rgb), 0.15);
    font-weight: 500;
    padding: 0.4em 0.8em;
}

.verify-badge { font-weight: 700; letter-spacing: 0.02em; font-size: 0.72rem; padding: 0.4em 0.8em; }
.verify-verified { background: rgba(34,197,94,0.12); color: #15803d; }
.verify-needs-review { background: rgba(148,163,184,0.15); color: #475569; }
.verify-reported { background: rgba(239,68,68,0.14); color: #b91c1c; }
.verify-outdated { background: rgba(245,158,11,0.14); color: #b45309; }
html.dark-mode body .verify-verified { background: rgba(34,197,94,0.2); color: #4ade80; }
html.dark-mode body .verify-needs-review { background: rgba(148,163,184,0.15); color: #cbd5e1; }
html.dark-mode body .verify-reported { background: rgba(239,68,68,0.2); color: #f87171; }
html.dark-mode body .verify-outdated { background: rgba(245,158,11,0.2); color: #fbbf24; }

.detail-dl { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
.detail-dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px dashed rgba(0,0,0,0.08); }
.detail-dl dt { color: #64748b; font-size: 0.85rem; font-weight: 600; }
.detail-dl dd { margin: 0; font-weight: 500; text-align: right; word-break: break-word; }
html.dark-mode body .detail-dl > div { border-bottom-color: rgba(255,255,255,0.08); }
html.dark-mode body .detail-dl dt { color: #94a3b8; }

.related-resource-card {
    display: block; padding: 1rem; border-radius: 16px; border: 1px solid rgba(0,0,0,0.08);
    text-decoration: none; color: inherit; height: 100%; transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.related-resource-card:hover { border-color: rgba(var(--brand-color-rgb), 0.35); }
html.dark-mode body .related-resource-card { border-color: rgba(255,255,255,0.08); }

/* Breadcrumb separator/active-crumb color - distinct from the
   .breadcrumb-item a link-color rules above (those theme the clickable
   crumbs; these theme the ">" separator glyph and the final, non-link
   "current page" crumb). */
.breadcrumb-item + .breadcrumb-item::before { color: #94a3b8; }
html.dark-mode body .breadcrumb-item.active { color: #cbd5e1; }

/* Admin "kind" badge (NEW RESOURCE vs UPDATE), shared by the
   Moderation Hub, submission_detail.html and user_detail.html. */
.submission-kind-badge { font-weight: 700; letter-spacing: 0.03em; font-size: 0.7rem; padding: 0.35em 0.7em; }
.submission-kind-new { background-color: rgba(34, 197, 94, 0.12); color: #15803d; }
.submission-kind-update { background-color: rgba(var(--brand-color-rgb), 0.12); color: var(--brand-color); }
html.dark-mode body .submission-kind-new { background-color: rgba(34, 197, 94, 0.18); color: #4ade80; }

/* Admin summary stat card (Moderation Hub's Pending/Approved/Rejected/
   Open Reports row, user_detail.html's contribution stats row) - was
   byte-identical in both templates' own inline <style>. */
.mod-stat-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    text-align: center;
}
html.dark-mode body .mod-stat-card {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
}
.mod-stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--brand-color);
}
.mod-stat-label {
    font-size: 0.78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
    margin-top: 0.25rem;
}
html.dark-mode body .mod-stat-label {
    color: #94a3b8;
}

/* Honour the OS "reduce motion" setting across the whole site. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Navbar */
.navbar {
    background-color: var(--bg-color);
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.floating-navbar.sticky-top {
    position: sticky;
    top: 1rem;
    z-index: 1030;
}

@media (max-width: 768px) {
    .floating-navbar.sticky-top {
        top: 0.5rem;
    }
}

/* Minimalist Glowing Pulse Dot Notification (Option 1) */
.notification-trigger {
    position: relative;
}

.notification-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    background-color: var(--brand-color, #7C2D12);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(124, 45, 18, 0.7);
    pointer-events: none;
    z-index: 10;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notification-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: inherit;
    animation: notification-pulse 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes notification-pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    70%, 100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

.notification-trigger:hover .notification-dot {
    transform: scale(1.25);
}

html.dark-mode body .notification-dot {
    background-color: var(--brand-color, #F59E0B);
    box-shadow: 0 0 12px rgba(var(--brand-color-rgb, 245, 158, 11), 0.9);
}

.navbar.scrolled {
    background-color: rgba(250, 249, 246, 0.85);
    /* backdrop-filter breaks fixed offcanvas positioning in Bootstrap */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

html.dark-mode body .navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.85);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.navbar-nav .custom-nav-link {
    color: #475569;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.navbar-nav .custom-nav-link::after {
    content: '';
    position: absolute;
    height: 2px;
    bottom: 5px; /* Offset slightly from the bottom edge */
    left: var(--bs-navbar-nav-link-padding-x, 0.5rem);
    right: var(--bs-navbar-nav-link-padding-x, 0.5rem);
    background-color: var(--brand-color);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.navbar-nav .custom-nav-link:hover, .navbar-nav .custom-nav-link.active {
    color: var(--brand-color);
}

.navbar-nav .custom-nav-link:hover::after, .navbar-nav .custom-nav-link.active::after {
    transform: scaleX(1);
}

html.dark-mode body .custom-nav-link {
    color: #94a3b8;
}

html.dark-mode body .custom-nav-link:hover, html.dark-mode body .custom-nav-link.active {
    color: var(--brand-color);
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--brand-color), #FDE047);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(var(--brand-color-rgb), 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.navbar-brand:hover .brand-icon {
    transform: scale(1.04);
    box-shadow: 0 6px 16px rgba(var(--brand-color-rgb), 0.45);
}

.brand-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Hero Section */
.hero-title {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    font-weight: 800;
    color: #222;
}

.text-brand {
    color: var(--brand-color);
}

.hero-subtitle {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    border-radius: 30px;
    padding: 1rem 1.5rem 1rem 3rem;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.search-input:focus {
    box-shadow: 0 4px 18px rgba(0,0,0,0.07);
    border-color: var(--brand-color);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* Cards
   Neither cards nor .rh-btn buttons move on hover - hover feedback is
   border, shadow and colour only, so both read as one interaction
   language. */
.domain-card,
.resource-card {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
}
/* Hover state (glow, accent bar) is defined further down under
   ".domain-card-wrapper:hover .domain-card" - not here. Triggering it
   from :hover on .domain-card itself was the cause of the edge flicker:
   translateY(-4px) moves the very box that's being hovered, so a cursor
   parked near its (now-relocated) bottom edge falls outside the hit
   area, un-hovering it, which drops it back down, re-hovering it, in a
   loop. .domain-card-wrapper never moves, so hovering it is stable no
   matter how the card inside animates. */

.section-title {
    font-weight: 700;
    font-size: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    color: #222;
}
.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #eaeaea;
    margin-left: 1.5rem;
}

/* Theme transitions are handled cleanly in theme-transition.css */

/* Card hover feedback - shared by domain cards and resource/flip cards
   (see the "Card Left Accent Bar" section further down). Colour and
   shadow only: cards don't move on hover. */
.domain-card,
.resource-card {
    transition:
        background-color 0.45s ease-in-out,
        color 0.45s ease-in-out,
        border-color 0.45s ease-in-out,
        box-shadow 0.5s ease-in-out;
}

/* Dark Mode Styles */
html.dark-mode,
html.dark-mode body {
    --bg-color: #0b0c10;
    --brand-color: #F59E0B;
    --brand-color-rgb: 245, 158, 11;
    color: #e2e8f0;
}

html.dark-mode body .navbar {
    background-color: rgba(11, 12, 16, 0.85) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

html.dark-mode body .card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html.dark-mode body .card-header {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Spotlight Overlay */
.spotlight-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    z-index: 1050;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.spotlight-overlay.active {
    opacity: 1;
}

.spotlight-container {
    width: 100%;
    max-width: 650px;
    background: #ffffff;
    transform: translateY(40px) scale(0.98);
    opacity: 0;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.spotlight-overlay.active .spotlight-container {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.spotlight-item:hover {
    background-color: rgba(210, 90, 43, 0.05) !important;
}

html.dark-mode body .spotlight-container {
    background: #12141c;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

html.dark-mode body .spotlight-item {
    background-color: transparent !important;
    color: #f8fafc;
}

html.dark-mode body .spotlight-item h6 {
    color: #f8fafc;
}

html.dark-mode body .spotlight-item .text-muted {
    color: #94a3b8 !important;
}

html.dark-mode body .spotlight-item .badge {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html.dark-mode body .spotlight-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

html.dark-mode body .spotlight-header input {
    background: transparent;
    color: #eee;
}

html.dark-mode body .spotlight-header input::placeholder {
    color: #888;
}

.spotlight-filters {
    border-color: rgba(0, 0, 0, 0.06) !important;
}
.spotlight-filter-chip {
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}
.spotlight-filter-chip:hover {
    border-color: rgba(var(--brand-color-rgb), 0.4);
    color: var(--brand-color);
}
.spotlight-filter-chip.active {
    background: var(--brand-color);
    border-color: var(--brand-color);
    color: #fff;
}
html.dark-mode body .spotlight-filters {
    border-color: rgba(255, 255, 255, 0.08) !important;
}
html.dark-mode body .spotlight-filter-chip {
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}
html.dark-mode body .spotlight-filter-chip.active {
    background: var(--brand-color);
    border-color: var(--brand-color);
    color: #0f172a;
}

html.dark-mode body .navbar-brand {
    color: #e0e0e0 !important;
}

html.dark-mode body .nav-link:not(.text-brand) {
    color: #bbb !important;
}

html.dark-mode body .nav-link:not(.text-brand):hover {
    color: #fff !important;
}

/* #94a3b8 (Tailwind slate-400) rather than the previous #a0a0a0 - that
   was this rule's own original value, but nearly every other dark-mode
   "muted" text color added since (breadcrumbs, .detail-dl dt, badges,
   the dropdown system) already standardized on #94a3b8. Two detail
   pages had locally overridden just this one rule to #94a3b8 already
   (later in the cascade than this global rule, so it silently won on
   those two pages only) - aligning the global value here is what let
   those page-local duplicates be deleted instead of kept in sync by
   hand. */
html.dark-mode body .text-muted {
    color: #94a3b8 !important;
}

html.dark-mode body .hero-title,
html.dark-mode body .section-title {
    color: #f8fafc !important;
}

html.dark-mode body .hero-subtitle {
    color: #94a3b8;
}

html.dark-mode body .search-input {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

html.dark-mode body .search-input::placeholder {
    color: #64748b;
}

html.dark-mode body .domain-card,
html.dark-mode body .resource-card {
    background-color: #12141c !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
}
/* .resource-card only (not .domain-card, to leave its current
   appearance untouched) - see the "Shared detail page component
   system" comment above .type-badge for why this lives here now. */
html.dark-mode body .resource-card {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

html.dark-mode body .domain-card-wrapper:hover .domain-card,
html.dark-mode body .resource-item:hover .resource-card.flip-card-front,
html.dark-mode body .domain-card:hover,
html.dark-mode body .resource-card:hover {
    border-color: rgba(var(--brand-color-rgb), 0.45) !important;
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.75), 0 0 25px -2px rgba(var(--brand-color-rgb), 0.25), 0 0 0 1px rgba(var(--brand-color-rgb), 0.2) !important;
}

html.dark-mode body .domain-card .card-title {
    color: #f1f5f9 !important;
}

html.dark-mode body .domain-card .card-text {
    color: #94a3b8 !important;
}

html.dark-mode body .section-title::after {
    background-color: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   PREMIUM UI UPGRADES
   ============================================================ */

/* 1. Glassmorphic Sticky Navbar */
.navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(250, 249, 246, 0.85) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transform: translate3d(0, 0, 0);
}

html.dark-mode body .navbar {
    background-color: rgba(18, 18, 18, 0.85) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* 2. Hero Floating Orbs (Hardware-accelerated GPU layer) */
.hero-section {
    position: relative;
    overflow: visible;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(45px);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    contain: paint;
}

.hero-orb-1 {
    width: 480px;
    height: 480px;
    background: rgba(var(--brand-color-rgb, 124, 45, 18), 0.12);
    top: -160px;
    left: -120px;
    animation: orbDrift 14s ease-in-out infinite;
}

.hero-orb-2 {
    width: 340px;
    height: 340px;
    background: rgba(var(--brand-color-rgb, 124, 45, 18), 0.08);
    top: 20px;
    right: -100px;
    animation: orbDrift 18s ease-in-out infinite reverse;
}

/* Wider drift + a gentle opacity "breath" so the hero doesn't just
   nudge in place - still slow/smooth enough to sit quietly behind text. */
@keyframes orbDrift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
    25%       { transform: translate(45px, -50px) scale(1.1); opacity: 1; }
    50%       { transform: translate(-20px, 25px) scale(0.92); opacity: 0.7; }
    75%       { transform: translate(30px, 35px) scale(1.05); opacity: 0.9; }
}

/* ---------- Knowledge-network host wrapper (shared across pages) ----------
   Containing block + hard clip boundary for the knowledge-network canvas
   (static/js/knowledge-network.js) on every page that hosts one: the
   dashboard, contribute, community, and the auth pages (.auth-page-main,
   auth.css - which adds its own viewport-height centering on top of
   this, but shares this same containment rule). Topic pages had one
   too, but it read as clutter around/inside the resource cards there
   and was removed - those cards are dense enough on their own.

   Two earlier attempts (a CSS dot+line, then a viewport-fixed blob
   layer) both leaked past where they belonged - a fixed layer has no
   natural stop point, so it kept drawing behind the footer, and its
   glow could show through a card mid-way through its scroll-reveal
   fade (.card-reveal animates opacity 0 -> 1, so a "behind everything"
   layer is briefly visible through a card that hasn't finished
   revealing yet). Scoping the canvas to its host element instead -
   position: relative for the absolutely-positioned canvas to size
   against, overflow: hidden to physically cut it off - means it's
   bounded by definition: it ends exactly at the host's last child,
   never reaches the footer, and can't visually spill onto anything
   beside/above it either. */
.dashboard-main,
.contribute-main,
.community-main {
    position: relative;
    overflow: hidden;
}

/* ---------- Floating Knowledge Network (canvas) ----------
   A real canvas particle network - see static/js/knowledge-network.js
   for the engine - covering the full .dashboard-main area (hero, stats
   bar, and domain grid), not just the hero. z-index: -1 (not 0) is
   deliberate: a 0-or-higher positioned element paints ABOVE plain
   static in-flow content per the CSS stacking spec, which would have
   put this canvas over the domain cards instead of under them, since
   the cards themselves declare no z-index. Negative z-index paints
   behind ALL in-flow content unconditionally, so it only ever shows
   through the true empty gaps around opaque elements like the cards -
   never a stray dot or line drawn across one - with no per-element
   awareness needed on either side. */
.knowledge-network-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    z-index: -1;
}

/* Idle bob on the domain-card glyph itself (not .icon-wrapper, which
   already owns the hover "spring pop" transform in the block below -
   animating the same property on the same element would fight that
   transition every time the animation loop resets mid-hover). Staggered
   by grid column so a 4-wide row doesn't bob in lockstep. */
.icon-wrapper > * {
    animation: iconIdleBob 3.6s ease-in-out infinite;
}

@keyframes iconIdleBob {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-3px); }
}

.domain-card-wrapper:nth-child(4n+1) .icon-wrapper > * { animation-delay: 0s; }
.domain-card-wrapper:nth-child(4n+2) .icon-wrapper > * { animation-delay: 0.5s; }
.domain-card-wrapper:nth-child(4n+3) .icon-wrapper > * { animation-delay: 1s; }
.domain-card-wrapper:nth-child(4n)   .icon-wrapper > * { animation-delay: 1.5s; }

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

/* Dashboard hero: one short centred stack (title, one-line blurb, slim
   search pill) so "Browse by Domain" starts high on the page. */
.dashboard-hero {
    padding: 1.5rem 0 0.25rem;
    margin-bottom: 2.5rem;
}
.dashboard-hero .hero-title {
    font-size: clamp(2rem, 4.2vw, 2.75rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
}
.dashboard-hero .hero-subtitle {
    font-size: 1rem;
    line-height: 1.55;
    max-width: 800px;
    margin: 0 auto 1.4rem;
    text-wrap: balance;
}
.hero-search {
    max-width: 560px;
}
.hero-search .search-input {
    height: 46px;
    padding: 0 4.5rem 0 2.75rem;
    font-size: 0.95rem;
    border-radius: 999px;
}
.hero-search .search-icon {
    left: 1.05rem;
    font-size: 1.05rem;
}
.hero-search .search-kbd {
    right: 1rem;
}
.dashboard-domains .section-title {
    margin-bottom: 1.5rem !important;
}

@media (max-width: 575.98px) {
    .dashboard-hero { padding-top: 0.75rem; margin-bottom: 2rem; }
    .hero-search .search-kbd { display: none; }
    .hero-search .search-input { padding-right: 1.25rem; }
}

/* 3. Card Left Accent Bar + Brand Glow on Hover
   ONE shared interaction language for every card system on the site:
   dashboard domain cards (.domain-card-wrapper > .domain-card) and
   topic/resource flip cards (.resource-item > ... > .resource-card)
   both key off these same rules rather than each having their own
   hover implementation - topic.html used to define a separate, weaker
   one locally (0.2s, no accent bar, no brand-tinted shadow) that read
   as a different design system; that block is gone, this is the only
   one now.

   Hover is detected on the STATIC wrapper (.domain-card-wrapper /
   .resource-item), never on the card that actually transforms - if
   :hover were on the transforming element itself, lifting it on hover
   would move its own hit area out from under a cursor parked near the
   edge, dropping it back down, re-hovering it, in a flicker loop.
   Neither wrapper class has any rule that changes ITS OWN box, so this
   is stable by construction.

   The shadow and the accent bar both key off that same trigger and
   share one duration/easing so they read as a single motion. Cards do
   not lift on hover. */
.domain-card,
.resource-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

.domain-card::before,
.resource-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--brand-color), transparent);
    border-radius: inherit;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.domain-card-wrapper:hover .domain-card::before,
.resource-item:hover .resource-card::before,
.domain-card:hover::before,
.resource-card:hover::before {
    opacity: 1;
    transform: scaleY(1);
}

.domain-card-wrapper:hover .domain-card,
.resource-item:hover .resource-card,
.domain-card:hover,
.resource-card:hover {
    border-color: rgba(var(--brand-color-rgb), 0.3) !important;
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(var(--brand-color-rgb), 0.16), 0 12px 24px -4px rgba(var(--brand-color-rgb), 0.12) !important;
}

/* Both faces share .resource-card, so these more specific selectors
   restate each face's own translateZ / rotateY (needed for the 3D flip
   itself, set in the "Flip Card" block below) on hover. Cards no longer
   lift on hover - only the border/shadow change. Only the front should
   visibly shadow on hover too - the back is reached by flipping, not by
   hovering it directly. */
.resource-item:hover .resource-card.flip-card-front {
    transform: translateZ(1px);
}

.resource-item:hover .resource-card.flip-card-back {
    transform: rotateY(180deg) translateZ(1px);
    box-shadow: none !important;
}

/* Card Scroll Entrance */
.card-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease-in-out, transform 0.55s cubic-bezier(0.34, 1.3, 0.64, 1) !important;
}

.card-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* 5. Search Focus Pulse Ring */
@keyframes focusPulse {
    0%   { box-shadow: 0 0 0 0 rgba(124, 45, 18, 0.35), 0 4px 6px rgba(0,0,0,0.02); }
    60%  { box-shadow: 0 0 0 7px rgba(124, 45, 18, 0), 0 4px 18px rgba(0,0,0,0.06); }
    100% { box-shadow: 0 0 0 0 rgba(124, 45, 18, 0), 0 4px 18px rgba(0,0,0,0.06); }
}

.search-input:focus {
    animation: focusPulse 0.75s ease-out forwards;
}

/* Ctrl+K floating badge in search */
.search-kbd {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    padding: 0.18rem 0.42rem;
    background: rgba(0,0,0,0.04);
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #aaa;
    pointer-events: none;
    font-family: monospace;
    letter-spacing: 0.04em;
    animation: kbdBreathe 3s ease-in-out infinite;
}

@keyframes kbdBreathe {
    0%, 100% { opacity: 0.55; }
    50%       { opacity: 1; }
}

html.dark-mode body .search-kbd {
    background: rgba(255,255,255,0.06);
    border-color: #444;
    color: #666;
}

/* 6. Spotlight Result Stagger Fade-in */
@keyframes resultSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.spotlight-item {
    animation: resultSlideIn 0.3s ease-out both;
}

.spotlight-container {
    border: 1px solid rgba(124, 45, 18, 0.12);
}

/* 7. Dark Mode Dot Texture on Body */
html.dark-mode body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}

/* ============================================================
   MICRO-POLISH TWEAKS
   ============================================================ */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Brand-tinted text selection */
::selection {
    background: rgba(124, 45, 18, 0.18);
    color: #8a3d14;
}

/* Slim custom scrollbar */
@media (min-width: 992px) {
    ::-webkit-scrollbar { width: 5px; height: 5px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb {
        background: rgba(124, 45, 18, 0.25);
        border-radius: 10px;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: rgba(124, 45, 18, 0.55);
    }
}

@media (max-width: 991px) {
    ::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
}

/* Animated gradient hero title */
/* Built off --brand-color so it stays readable in dark mode too (the old
   hardcoded browns here were never used anywhere, which is exactly how a
   dark-mode contrast bug like that goes unnoticed - see .text-brand for
   the same lesson learned on the auth pages). Pair with .text-brand so
   browsers without background-clip:text still get a solid brand color
   instead of invisible text. */
.gradient-text {
    background: linear-gradient(120deg, var(--brand-color) 0%, rgba(var(--brand-color-rgb), 0.55) 50%, var(--brand-color) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease-in-out infinite;
}

.brand-accent-text {
    background: linear-gradient(90deg, #F59E0B, #FDE047);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Contribute Modal */
.contribute-modal-content {
    background: #ffffff;
    border-radius: 1.5rem;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

html.dark-mode body .contribute-modal-content {
    background: #12141c;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contribute-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(var(--brand-color-rgb), 0.15), rgba(var(--brand-color-rgb), 0.05));
    color: var(--brand-color);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border: 1px solid rgba(var(--brand-color-rgb), 0.2);
    box-shadow: 0 10px 25px -5px rgba(var(--brand-color-rgb), 0.2);
    position: relative;
    overflow: hidden;
}

.contribute-icon-wrapper::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--brand-color);
    filter: blur(30px);
    opacity: 0.3;
    border-radius: 50%;
}

.contribute-icon-wrapper i {
    position: relative;
    z-index: 2;
    animation: floatingIcon 3s ease-in-out infinite;
}

@keyframes floatingIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

html.dark-mode body .contribute-icon-wrapper {
    background: linear-gradient(135deg, rgba(var(--brand-color-rgb), 0.2), rgba(var(--brand-color-rgb), 0.05));
    border: 1px solid rgba(var(--brand-color-rgb), 0.3);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(var(--brand-color-rgb), 0.15);
}

html.dark-mode body .contribute-icon-wrapper::before {
    opacity: 0.2;
}

.section-divider {
    display: flex;
    align-items: center;
}

.contribute-input {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.8rem 1.2rem;
    border-radius: 0.75rem;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem !important;
}

/* .ts-control / .ts-dropdown (Tom Select's own generated markup) used
   to be defined three separate times in this file, each written at a
   different point without removing the last - drifting into a real
   mess of conflicting values (three different border-radii, three
   different dark-mode palettes, and a dark-mode focus ring that
   actually rendered a stray green box-shadow "(Green border from
   screenshot in dark mode)" fighting a brand-colored border, since
   each generation only partially overrode the one before it). See the
   single consolidated "TOM SELECT CUSTOM STYLING" block further down
   for the real rules now - this spot intentionally left with no
   .ts-control/.ts-dropdown rules of its own any more. */

.contribute-input:focus {
    background: #ffffff;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 4px rgba(124, 45, 18, 0.1);
}

html.dark-mode body .contribute-input {
    background: rgba(0,0,0,0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
}

html.dark-mode body .contribute-input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

html.dark-mode body .contribute-input:focus {
    background: rgba(0,0,0,0.4) !important;
    border-color: var(--brand-color) !important;
    box-shadow: 0 0 0 4px rgba(var(--brand-color-rgb, 245, 158, 11), 0.2) !important;
}

html.dark-mode body .card h4 {
    color: #f1f5f9;
}

html.dark-mode body .card label.text-muted {
    color: #94a3b8 !important;
}
/* ============================================================
   TOM SELECT CUSTOM STYLING (Dropdowns)
   ------------------------------------------------------------
   The one canonical definition (see the comment where this used to be
   duplicated, above .contribute-input, and the third copy that used
   to live near .resource-level-badge further down - both removed).
   Deliberately matches .contribute-input's own light/dark/focus
   treatment value-for-value: Tom Select renders the topic/category
   picker sitting directly beside plain .contribute-input fields on
   the same forms (contribute.html, admin/edit_resource.html), so a
   visibly different control language there would read as a mistake
   rather than a deliberate choice. Focus goes through the same brand
   color as every other themed control on the site now, replacing a
   stray hardcoded green that only ever showed up in dark mode.

   font-size needs !important specifically: Tom Select's own bootstrap5
   theme ships `.ts-wrapper.form-select-lg .ts-control { font-size:
   1.25rem }` - a 3-class compound selector that outranks a plain
   `.ts-control` regardless of source order, and every picker on this
   site is a form-select-lg. Confirmed live (computed font-size stayed
   20px until this was added) rather than assumed. */

.ts-control {
    font-size: 0.95rem !important;
    padding: 0.8rem 1.2rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #1e293b;
    box-shadow: none;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.ts-control input {
    font-size: 0.95rem !important;
}

.ts-control.focus {
    background: #ffffff;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 4px rgba(var(--brand-color-rgb), 0.1);
}

html.dark-mode body .ts-control {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

html.dark-mode body .ts-control input {
    color: #f8fafc;
}

html.dark-mode body .ts-control.focus {
    background-color: rgba(0, 0, 0, 0.4);
    border-color: var(--brand-color);
    box-shadow: 0 0 0 4px rgba(var(--brand-color-rgb), 0.2);
}

.ts-control .item {
    font-size: 1rem;
}

.ts-dropdown {
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 4px;
    background-color: #fff;
    color: #0f172a;
    padding: 0;
    overflow: hidden;
}

html.dark-mode body .ts-dropdown {
    background-color: #111827;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.ts-dropdown .ts-dropdown-content {
    padding: 0;
}

.ts-dropdown .option {
    padding: 10px 16px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

html.dark-mode body .ts-dropdown .option {
    color: #f1f5f9;
}

.ts-dropdown .option:hover,
.ts-dropdown .option.active,
.ts-dropdown .option.active.active {
    background-color: var(--brand-color);
    color: #fff;
}

html.dark-mode body .ts-dropdown .option:hover,
html.dark-mode body .ts-dropdown .option.active,
html.dark-mode body .ts-dropdown .option.active.active {
    background-color: var(--brand-color);
    color: #fff;
}

/* Root cause of the "Tom Select briefly overflows its container on
   mobile" issue - not just a loading-window flash, confirmed live to
   be persistent. Tom Select hides the ORIGINAL <select> (kept for
   native form/accessibility semantics) via `position: absolute`, as a
   SIBLING of .ts-wrapper, not a descendant, and its own immediate
   parent (a plain .mb-4/.col-sm-6 field wrapper) never establishes a
   positioning context. So the browser walks further up the DOM for the
   original select's containing block, landing on some wider ancestor
   (a card body, a column) instead of the actual ~246px-wide field -
   its `left`/`right` offsets (Tom Select's own bootstrap5 theme CSS)
   then resolve against THAT width, measuring ~50px wider than the
   visible control. Harmless today only because of this site's global
   overflow-x: clip - never visible, never scrollable - but confirmed
   root-caused (not just "clip is hiding it") and fixed properly:
   giving the field wrapper its own positioning context makes the
   hidden select's containing block the correct, narrow one, so the
   two actually match. Applies to every Tom Select instance on the
   site (contribute.html's topic/existing-resource/type/level pickers,
   admin/edit_resource.html's topic picker) without needing to know
   each one's specific wrapper markup.

   Confirmed live: closes the gap entirely (0px) for fields whose
   direct wrapper has no padding of its own (contribute.html's topic/
   existing-resource pickers, edit_resource.html's topic picker).
   contribute.html's type/level pickers sit inside a Bootstrap
   `.col-sm-6` instead, which carries its own 12px/side gutter padding
   - `left`/`right` on an absolutely positioned box resolve against the
   containing block's PADDING edge, so those two still measure ~24px
   wider than their wrapper (down from ~50px before this rule). Still
   fully inert either way (same overflow-x: clip), and closing that
   last 24px would mean fighting Bootstrap's own gutter padding with
   hardcoded compensation - not worth it for an already-invisible
   measurement. */
*:has(> .ts-wrapper) {
    position: relative;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50%       { background-position: 100% center; }
}

/* Nav link slide underline */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    right: 50%;
    height: 2px;
    background: var(--brand-color);
    border-radius: 2px;
}
.nav-link:hover::after {
    left: 8px;
    right: 8px;
}
.nav-link.text-brand::after {
    left: 8px;
    right: 8px;
}

/* Card icon spring pop on hover */
.icon-wrapper {
    width: 48px;
    height: 48px;
    background-color: rgba(var(--brand-color-rgb), 0.1);
    color: var(--brand-color);
    border: 1px solid rgba(var(--brand-color-rgb), 0.2);
    overflow: hidden;
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.45s ease-in-out;
}
.domain-card-wrapper:hover .icon-wrapper {
    transform: scale(1.12) rotate(-4deg);
    background-color: rgba(var(--brand-color-rgb), 0.18) !important;
}

.domain-card .card-title {
    font-size: 1.1rem;
    color: #222;
}

/* Card "Explore →" arrow slide */
.explore-arrow {
    display: inline-block;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.domain-card-wrapper:hover .explore-arrow {
    transform: translateX(6px);
}

/* Subtle gradient wash on card hover */
.domain-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(124,45,18,0.04) 0%, transparent 55%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.domain-card-wrapper:hover .domain-card::after {
    opacity: 1;
}

/* Page load fade-in */
/* fill-mode `backwards`, not `both`: the start frame holds until the
   animation begins, but nothing stays applied once it ends. With `both`
   the final frame (an identity transform) stuck to <main> forever, keeping
   it on its own compositing layer and making it the containing block for
   any position:fixed child. */
@keyframes pageLoad {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
main {
    animation: pageLoad 0.7s ease-out backwards;
}

/* Spotlight: warmer border tint */
.spotlight-container {
    border: 1px solid rgba(124, 45, 18, 0.14);
}

/* Spotlight input caret brand color */
#spotlight-input {
    caret-color: var(--brand-color);
}
#live-search {
    caret-color: var(--brand-color);
}

/* ============================================================
   MODAL STYLING (Create Topic)
   ============================================================ */
/* Dark Mode Overrides for Modals
   ------------------------------------------------------------
   .modal-content itself is deliberately NOT themed here - a second,
   later dark-mode rule further down ("UI Elements Dark Mode Fixes",
   the brand-accented "neon glow" border/shadow) already covers
   background/border/box-shadow with !important, which silently won
   over an earlier, plainer version of this same rule that used to live
   here (confirmed live: the neon-glow values are what actually
   render). Its one property that DID still apply - color: #f8fafc,
   nothing else set .modal-content's own text color - has been folded
   into that rule instead of kept duplicated here. */
html.dark-mode body .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark-mode body .modal-footer {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark-mode body .modal-title {
    color: #f1f5f9;
}

html.dark-mode body .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

html.dark-mode body #createTopicModal .form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}
html.dark-mode body #createTopicModal .form-control:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: #33cc66;
    box-shadow: 0 0 0 0.25rem rgba(51, 204, 102, 0.25);
}

 
 

/* The .theme-transition crossfade fallback now lives in
   theme-transition.css, which both this page set AND the landing page
   load — it previously sat here, where the landing page never saw it. */

/* Mobile Responsiveness Redesign */
@media (max-width: 991px) {
    .navbar-nav {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    html.dark-mode body .navbar-nav {
        border-top: none;
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
        margin-right: 0 !important;
        width: 100%;
    }
    
    /* Disable underline animation on mobile */
    .navbar-nav .custom-nav-link::after {
        display: none !important;
    }
    
    /* Show active state with text color and subtle bg instead */
    .navbar-nav .custom-nav-link.active {
        background-color: rgba(124, 45, 18, 0.05);
        border-radius: 8px;
        padding-left: 1rem;
        color: var(--brand-color);
        font-weight: 600;
    }
    
    html.dark-mode body .navbar-nav .custom-nav-link.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
        background-color: rgba(124, 45, 18, 0.15);
    }
    
    /* Buttons in navbar */
    .navbar-nav .btn {
        width: 100%;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Offcanvas Dark Mode Styling */
    html.dark-mode body .offcanvas, html.dark-mode body .offcanvas-lg {
        background-color: #1e293b;
        color: #f1f5f9;
    }
    
    html.dark-mode body .offcanvas-header {
        border-bottom-color: rgba(255,255,255,0.1) !important;
    }
    
    html.dark-mode body .offcanvas-title {
        color: #f1f5f9 !important;
    }
    
    html.dark-mode body .btn-close {
        filter: invert(1) grayscale(100%) brightness(200%);
    }
}

@media (max-width: 768px) {
    .hero-orb-1, .hero-orb-2 {
        transform: scale(0.6);
        filter: blur(50px);
    }
    
    .hero-orb-1 { top: -80px; left: -60px; }
    .hero-orb-2 { top: 10px; right: -50px; }

    
    
    
    
    
    
    .search-kbd {
        display: none;
    }
    
    .spotlight-container {
        width: 95% !important;
        margin-top: 10vh !important;
    }
}


/* Custom Mobile Sliding Menu */
@media (max-width: 991px) {
    .custom-mobile-menu {
        position: fixed;
        top: 0;
        right: 0;
        transform: translateX(100%);
        width: 320px;
        height: 100vh;
        background-color: var(--bg-color);
        z-index: 1050;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
        display: flex;
        flex-direction: column;
        box-shadow: none;
        overflow-y: auto;
        visibility: hidden;
        pointer-events: none;
    }
    
    .custom-mobile-menu.show {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    }
    
    html.dark-mode body .custom-mobile-menu.show {
        background-color: #1e293b;
        box-shadow: -5px 0 25px rgba(0,0,0,0.5);
    }
    
    .mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1015; /* Below sticky-top navbar (1020) */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }
    
    .mobile-menu-backdrop.show {
        opacity: 1;
        visibility: visible;
    }
}

@media (min-width: 992px) {
    .custom-mobile-menu {
        display: flex;
        flex-grow: 1;
        align-items: center;
        visibility: visible !important;
        pointer-events: auto !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .mobile-menu-backdrop {
        display: none !important;
    }
}



/* Premium Mobile Menu Styling */
@media (max-width: 991px) {
    .custom-mobile-menu {
        border-left: 1px solid rgba(0,0,0,0.05);
    }
    
    html.dark-mode body .custom-mobile-menu {
        border-left: 1px solid rgba(255,255,255,0.05);
    }
    
    .custom-mobile-menu .nav-link {
        font-size: 1.15rem;
        padding: 1rem 1.25rem;
        border-radius: 12px;
        margin-bottom: 0.25rem;
        color: #475569;
        font-weight: 500;
        transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    html.dark-mode body .custom-mobile-menu .nav-link {
        color: #94a3b8;
    }
    
    .custom-mobile-menu .nav-link.active {
        color: var(--brand-color);
        font-weight: 700;
        background-color: rgba(var(--brand-color-rgb), 0.08);
    }

    html.dark-mode body .custom-mobile-menu .nav-link.active {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .custom-mobile-menu .quick-actions-row {
        justify-content: center;
        padding: 1.5rem 0;
        gap: 1.5rem !important;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        margin-bottom: 1.5rem !important;
    }
    
    html.dark-mode body .custom-mobile-menu .quick-actions-row {
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    /* Touch targets: bump the shared primitives up on mobile rather than
       re-styling per-button, so every menu action grows together. */
    .custom-mobile-menu .quick-actions-row .rh-btn--icon {
        width: 50px;
        height: 50px;
    }

    .custom-mobile-menu .quick-actions-row .rh-btn--icon i {
        font-size: 1.25rem;
    }

    .custom-mobile-menu .nav-item > .rh-btn {
        padding: 0.8rem 1rem;
        font-size: 1.05rem;
        margin-bottom: 0.75rem;
    }
}



/* Ensure Navbar is always above backdrop */
@media (max-width: 991px) {
    .navbar.sticky-top {
        z-index: 1025 !important;
        transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    }
    
    .navbar.sticky-top:has(.custom-mobile-menu.show) {
        background-color: transparent !important;
        border-color: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    .navbar.sticky-top .navbar-brand,
    .navbar.sticky-top .navbar-toggler {
        transition: opacity 0.3s ease;
    }
    
    .navbar.sticky-top:has(.custom-mobile-menu.show) .navbar-brand,
    .navbar.sticky-top:has(.custom-mobile-menu.show) .navbar-toggler {
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }
}



/* Mobile Menu Icon Visibility Fix */
#mobile-menu-icon {
    color: #0f172a !important; /* Dark color for light mode */
}
html.dark-mode body #mobile-menu-icon {
    color: #f8fafc !important; /* Light color for dark mode */
}


/* ============================================================
   ABOUT PAGE (MANUSCRIPT)
   ============================================================ */
:root {
    --sidebar-width: 280px;
}

.docs-main-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
}

/* Sidebar Navigation */
.docs-sidebar {
    padding: 10rem 2rem 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(to right, rgba(255, 255, 255, 0.8), transparent);
    z-index: 10;
}
html.dark-mode body .docs-sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(to right, rgba(9, 9, 11, 0.8), transparent);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-label {
    font-family: 'JetBrains Mono', 'Plus Jakarta Sans', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #64748b;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    font-weight: 700;
}
html.dark-mode body .sidebar-label {
    color: rgba(255, 255, 255, 0.4);
}

.nav-anchor {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    color: #475569;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}
html.dark-mode body .nav-anchor {
    color: rgba(255, 255, 255, 0.6);
}

.nav-anchor:hover {
    color: var(--brand-color);
    background: rgba(124, 45, 18, 0.05);
    border-color: rgba(124, 45, 18, 0.1);
}
html.dark-mode body .nav-anchor:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-anchor.active {
    color: var(--brand-color);
    background: rgba(124, 45, 18, 0.1);
    border-color: rgba(124, 45, 18, 0.2);
    font-weight: 600;
}
html.dark-mode body .nav-anchor.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

/* Main Canvas */
.docs-canvas {
    padding: 10rem 4rem 8rem 4rem;
    animation: canvasEnter 1s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes canvasEnter {
    from { opacity: 0; transform: translateX(20px); filter: blur(8px); }
    to { opacity: 1; transform: translateX(0); filter: blur(0); }
}

.hero-title-group {
    margin-bottom: 6rem;
    position: relative;
}

.hero-title-group h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom right, #0f172a 40%, #64748b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}
html.dark-mode body .hero-title-group h1 {
    background: linear-gradient(to bottom right, #fff 40%, #71717a);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-lead {
    font-size: 1.4rem;
    color: #475569;
    max-width: 800px;
    font-weight: 400;
    line-height: 1.6;
}
html.dark-mode body .hero-lead {
    color: #94a3b8;
    font-weight: 300;
}

.content-section {
    margin-bottom: 8rem;
    scroll-margin-top: 100px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.section-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--brand-color);
    opacity: 0.8;
}
html.dark-mode body .section-num {
    color: #fff;
    opacity: 0.6;
}

.section-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    letter-spacing: -1px;
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 0;
}
html.dark-mode body .section-header h2 {
    color: #fff;
}

.section-divider {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.1), transparent);
}
html.dark-mode body .section-divider {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
}

.prose {
    max-width: 850px;
    color: #334155;
    font-size: 1.15rem;
}
html.dark-mode body .prose {
    color: #94a3b8;
}
.prose p { margin-bottom: 1.5rem; }
.prose strong { color: #0f172a; font-weight: 600; }
html.dark-mode body .prose strong { color: #fff; }

/* Cards & Badges */
.feature-showcase, .legal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-premium-card, .legal-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    padding: 2.5rem;
    border-radius: 32px;
    position: relative;
    overflow: hidden;
    transition: color 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
html.dark-mode body .feature-premium-card, html.dark-mode body .legal-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.feature-premium-card:hover, .legal-card:hover {
    background: #fff;
    border-color: rgba(124, 45, 18, 0.1);
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
}
html.dark-mode body .feature-premium-card:hover, html.dark-mode body .legal-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.card-glow {
    position: absolute;
    top: 0; right: 0;
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(124, 45, 18, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
html.dark-mode body .card-glow {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}
.feature-premium-card:hover .card-glow { opacity: 1; }
html.dark-mode body .feature-premium-card:hover .card-glow { opacity: 0.2; }

.feature-icon-box {
    width: 50px; height: 50px;
    background: rgba(124, 45, 18, 0.1);
    border: 1px solid rgba(124, 45, 18, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-color);
    margin-bottom: 2rem;
}
html.dark-mode body .feature-icon-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

.feature-premium-card h3, .legal-card h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    color: #0f172a;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    font-weight: 600;
}
html.dark-mode body .feature-premium-card h3, html.dark-mode body .legal-card h4 { color: #fff; }

.feature-premium-card p, .legal-card p {
    font-size: 1rem;
    line-height: 1.5;
    color: #475569;
}
html.dark-mode body .feature-premium-card p, html.dark-mode body .legal-card p { color: #94a3b8; opacity: 0.8; }

.legal-card .legal-icon {
    display: flex;
    width: 40px; height: 40px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    margin-bottom: 2rem;
    align-items: center;
    justify-content: center;
    color: #0f172a;
}
html.dark-mode body .legal-card .legal-icon {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

/* Credits */
.credit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.credit-badge {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 28px;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    width: 100%;
}
html.dark-mode body .credit-badge {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.credit-badge.developer-hero {
    grid-column: span 2;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(124, 45, 18, 0.05) 0%, rgba(255, 255, 255, 0.5) 100%);
    border: 1px solid rgba(124, 45, 18, 0.15);
}
html.dark-mode body .credit-badge.developer-hero {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.credit-badge.developer-hero .feature-icon-box {
    width: 70px;
    height: 70px;
}
html.dark-mode body .credit-badge.developer-hero .feature-icon-box {
    background: rgba(255, 255, 255, 0.08);
}

.credit-badge::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(124, 45, 18, 0.05), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
html.dark-mode body .credit-badge::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 60%);
}
.credit-badge:hover {
    border-color: rgba(124, 45, 18, 0.2);
}
html.dark-mode body .credit-badge:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
}
.credit-badge:hover::before { opacity: 1; }

.credit-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.role-tag {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: fit-content;
}
html.dark-mode body .role-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.credit-title {
    font-family: "Outfit", sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.5px;
}
html.dark-mode body .credit-title { color: #fff; }
.credit-badge.developer-hero .credit-title { font-size: 2rem; }

.manifesto-card {
    background: linear-gradient(135deg, rgba(124, 45, 18, 0.05) 0%, rgba(255,255,255,0.5) 100%);
    border: 1px solid rgba(124, 45, 18, 0.15);
    padding: 3rem;
    border-radius: 32px;
    position: relative;
    margin-top: 4rem;
}
html.dark-mode body .manifesto-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(0,0,0,0) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.manifesto-card i.ph-quotes {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--brand-color);
}
html.dark-mode body .manifesto-card i.ph-quotes { color: #fff; }

.manifesto-card p {
    font-size: 1.2rem;
    font-style: italic;
    color: #334155;
    line-height: 1.7;
}
html.dark-mode body .manifesto-card p { color: #fff; opacity: 0.9; }

/* Responsive adjustments */
@media (max-width: 1024px) {
    .docs-main-layout { grid-template-columns: 1fr; }
    .docs-sidebar { display: none; }
    .docs-canvas { padding: 8rem 2rem 6rem; }
    .credit-grid { grid-template-columns: 1fr; }
    .credit-badge.developer-hero { grid-column: span 1; padding: 2.5rem; }
    .credit-badge.developer-hero .credit-title { font-size: 1.8rem; }
    .credit-badge { gap: 1rem; padding: 1.5rem; }
    .credit-title { font-size: 1.1rem; }
}

@media (max-width: 768px) {
    .feature-showcase, .legal-grid { grid-template-columns: 1fr; }
    .feature-premium-card, .legal-card { padding: 2rem; }
    .manifesto-card { padding: 2rem; }
    .manifesto-card p { font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .docs-canvas { padding: 6rem 1.25rem 4rem; }
    .credit-badge { gap: 1rem; padding: 1.5rem; }
}

/* UI Elements Dark Mode Fixes */
html.dark-mode body .modal-content {
    background-color: #121212;
    border: 1px solid var(--brand-color) !important;
    box-shadow: 0 0 20px rgba(var(--brand-color-rgb), 0.25), 0 10px 40px rgba(0, 0, 0, 0.6) !important;
    color: #f8fafc;
}
html.dark-mode body .modal-content h4,
html.dark-mode body .modal-content p,
html.dark-mode body .modal-content h5 {
    color: #f8f9fa;
}
html.dark-mode body .alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Tom Select's own "create new option" affordance (shown only for an
   instance actually configured with create: true - none of this site's
   current pickers are, but harmless/future-proof to keep themed). */
html.dark-mode body .ts-dropdown .create:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
}

/* Level Badge styling */
.resource-level-badge {
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}
html.dark-mode body .resource-level-badge {
    background-color: #1a1f24;
    color: #e2e8f0;
    border-color: #2a313a !important;
}

/* Topic page filter group headings ("Resource Format", "Learning Level").
   Previously an inline #94a3b8, which is only 2.6:1 on the light page;
   slate-500 clears 4.5:1 there, and dark mode keeps the original tone. */
.filter-group-label {
    letter-spacing: 1.5px;
    color: #64748b;
}
html.dark-mode body .filter-group-label {
    color: #94a3b8;
}

/* Light Mode Neon Modal Border */
.modal-content {
    border: 1px solid var(--brand-color) !important;
    box-shadow: 0 0 20px rgba(var(--brand-color-rgb), 0.15), 0 10px 40px rgba(0, 0, 0, 0.2) !important;
}

/* Update Profile Modal Input Group */
.update-profile-input-group {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.update-profile-input-group:focus-within {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--brand-color-rgb), 0.25);
}

.update-profile-input-group .form-control,
.update-profile-input-group .form-control:focus,
.update-profile-input-group .btn {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: inherit;
}

.update-profile-input-group .input-group-text i,
.update-profile-input-group .btn i {
    font-size: 1.25rem;
    color: #6c757d;
}

.update-profile-input-group:focus-within .input-group-text i,
.update-profile-input-group:focus-within .btn i {
    color: var(--brand-color);
}

/* Dark Mode Overrides for Update Profile Modal */
html.dark-mode body .update-profile-input-group {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

html.dark-mode body .update-profile-input-group .form-control {
    color: #f1f5f9 !important;
}

html.dark-mode body .update-profile-input-group .form-control::placeholder {
    color: #6c757d !important;
}

html.dark-mode body .update-profile-input-group .input-group-text i,
html.dark-mode body .update-profile-input-group .btn i {
    color: #adb5bd;
}

html.dark-mode body .update-profile-input-group:focus-within {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--brand-color);
}

/* Flip Card Specific CSS
   Front and back used to sit in the same CSS Grid area (grid-area: 1/1)
   so they'd overlay - but Grid sizes an implicit row to fit the TALLER
   of the two overlaid items, so a back face with more links than the
   front had content would grow the whole card past its own front-face
   boundary (hiding the border, overlapping the row below).

   Fix: the FRONT stays in normal flow - it's what gives the card its
   real height, from its own natural content, exactly like any other
   card on the site (.resource-item is a plain flex column with no
   height of its own; that height has to come from *something* in
   normal flow, all the way up the chain). The BACK is the only one
   taken out of flow (position: absolute, inset: 0) - by the time it's
   sized, its containing block (.flip-card-inner) already has a
   definite height from the front, so the back fills that exact same
   box instead of being able to grow it. (An earlier attempt made BOTH
   faces absolute, which seemed more symmetric but removed the only
   remaining in-flow content anywhere in the chain - the whole card
   collapsed to zero height instead.) overflow: hidden on the back is
   the backstop: if its own content (many links) is still taller than
   that box, it clips at the rounded corners rather than bursting out
   - .select-resource-list already scrolls its own content internally
   for exactly that case. */
.flip-card {
    background-color: transparent;
    perspective: 1000px; /* Remove this if you don't want the 3D effect */
    height: 100%;
    position: relative;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    will-change: transform;
}

.flip-card-inner.flipped {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    width: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    overflow: hidden;
    transform: translateZ(0); /* Hardware acceleration */
}

.flip-card-front {
    position: relative;
}

.flip-card-back {
    position: absolute;
    inset: 0;
    height: 100%;
}

.flip-card-front {
    z-index: 2;
    transform: rotateY(0deg) translateZ(1px);
}

.flip-card-back {
    transform: rotateY(180deg) translateZ(1px);
    border-top: 4px solid var(--brand-color) !important;
}

/* Back of card styling to match screenshot */
html.dark-mode body .flip-card-back .select-resource-title {
    color: #f1f5f9;
}

.select-resource-list {
    overflow-y: auto;
    max-height: calc(100% - 60px);
}

.select-resource-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(0,0,0,0.1);
    background: transparent;
    color: inherit;
    text-decoration: none;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.select-resource-btn:hover {
    border-color: var(--brand-color);
    background: rgba(var(--brand-color-rgb), 0.05);
    color: var(--brand-color);
}

html.dark-mode body .select-resource-btn {
    border-color: rgba(255,255,255,0.1);
    color: #f1f5f9;
}

html.dark-mode body .select-resource-btn:hover {
    border-color: rgba(var(--brand-color-rgb), 0.4);
    background: rgba(255,255,255,0.05);
}

/* Add Link Dashed Button for Contribute Form */
.add-link-dashed-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem;
    border: 2px dashed rgba(var(--brand-color-rgb), 0.3);
    border-radius: 0.75rem;
    background-color: rgba(var(--brand-color-rgb), 0.02);
    color: var(--brand-color);
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
}
.add-link-dashed-btn:hover {
    background-color: rgba(var(--brand-color-rgb), 0.08);
    border-color: rgba(var(--brand-color-rgb), 0.6);
    color: var(--brand-color);
}
html.dark-mode body .add-link-dashed-btn {
    background-color: rgba(255,255,255, 0.02);
}
html.dark-mode body .add-link-dashed-btn:hover {
    background-color: rgba(var(--brand-color-rgb), 0.15);
}

/* Compact secondary variant, shared by "+ Add Another Link" and "Can't
   find the right category?" - both were using the base .add-link-dashed-btn
   treatment (large padding, big icon) and reading as major actions
   competing with the form itself, when they're really small, secondary
   affordances. Smaller padding, a thinner border, and a lighter fill;
   the underlying .add-link-dashed-btn hover/dark-mode rules still apply
   to both, only size/weight differ here. */
.add-link-dashed-btn--compact {
    padding: 0.5rem 0.875rem;
    border-width: 1px;
    border-radius: 0.6rem;
    font-size: 0.8rem;
    gap: 0.4rem;
}
.add-link-dashed-btn--compact i {
    font-size: 0.95rem;
}
.add-link-dashed-btn--compact:hover {
    transform: none;
}

/* Edit Resource's link rows (templates/admin/edit_resource.html): each
   link gets its own bordered surface so it's visually obvious how many
   links a resource has and where one starts/ends, matching the "one
   card per link" mockup this page was designed against - plain.
   contribute.html's own link rows stay bare/unbordered on purpose
   (that form is deliberately lighter-weight; not changed here). */
.edit-link-entry {
    padding: 0.6rem 0.6rem 0.6rem 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.015);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.edit-link-entry:focus-within {
    border-color: rgba(var(--brand-color-rgb), 0.35);
}
html.dark-mode body .edit-link-entry {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}
html.dark-mode body .edit-link-entry:focus-within {
    border-color: rgba(var(--brand-color-rgb), 0.4);
}
/* Full-width below `sm` (the row lays out as flex-column there - see
   .edit-link-entry's flex-column/flex-sm-row split in the template),
   capped back to a fixed width once the row layout kicks in - matches
   the 220px this used to be a fixed inline style for, confirmed live
   at 375px/320px that label+url no longer squeeze down to ~130px each
   the way they did before this split existed. */
.edit-link-label-input {
    width: 100%;
}
@media (min-width: 576px) {
    .edit-link-label-input {
        max-width: 220px;
        flex-shrink: 0;
    }
}

/* ---------- Contribute mode toggle: equal-width segmented control ----------
   A shared light "track" with the two options inside it, rather than
   two independent pill buttons sitting side by side with a gap - that
   read as two competing CTAs instead of one control with two settings.
   The unselected (.rh-btn--ghost) segment goes borderless so it blends
   into the track; the selected (.rh-btn--solid) segment keeps its
   brown fill, reading as "the pill sitting inside the track."

   Bootstrap's .flex-fill is `flex: 1 1 auto` - grow only distributes the
   LEFTOVER space after each button is sized to its own content, so two
   buttons with different label lengths never actually land on the same
   width. `flex: 1 1 0%` (equal basis) is the real "equal columns"
   pattern: both start at zero and grow identically, landing on the exact
   same width regardless of label length. min-height covers the case
   where the longer label wraps to two lines on a narrow layout and the
   shorter one doesn't - both segments stay the same height either way. */
.contribute-mode-toggle {
    align-items: stretch;
    background-color: rgba(0, 0, 0, 0.035);
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
}

html.dark-mode body .contribute-mode-toggle {
    background-color: rgba(255, 255, 255, 0.05);
}

.contribute-mode-btn {
    flex: 1 1 0%;
    min-height: 44px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    font-size: 0.9rem;
}

.contribute-mode-btn.rh-btn--ghost {
    border-color: transparent;
}

@media (max-width: 480px) {
    .contribute-mode-toggle {
        flex-direction: column;
    }
    .contribute-mode-btn {
        min-height: 42px;
    }
}


/* Notification Dropdown UI Redesign */
.notification-dropdown {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    animation: fadeInDropdown 0.2s ease-out;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Generic Bootstrap dropdown styling (navbar "Admin" dropdown, and any
   future plain .dropdown-menu that isn't a specialised one like the
   notification bell's below, which already has its own .notification-item
   overrides). Bootstrap's stock hover/active colours are a light grey
   hover and a BRIGHT BLUE ".active" background
   (--bs-dropdown-link-hover-bg / --bs-dropdown-link-active-bg) - neither
   exists anywhere in the ResourceHub palette, and the container itself
   has no dark-mode background at all by default (only .notification-dropdown
   had its own override), so in dark mode a plain dropdown stayed a
   stark white box. This brings both in line with the rest of the site. */
.dropdown-menu {
    border-radius: 12px;
    padding: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
}

.dropdown-item {
    color: #475569;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(var(--brand-color-rgb), 0.08);
    color: var(--brand-color);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: rgba(var(--brand-color-rgb), 0.12) !important;
    color: var(--brand-color) !important;
    font-weight: 600;
}

.dropdown-item.active:hover,
.dropdown-item.active:focus {
    background-color: rgba(var(--brand-color-rgb), 0.18) !important;
    color: var(--brand-color) !important;
}

html.dark-mode body .dropdown-menu {
    background-color: #12141c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

html.dark-mode body .dropdown-item {
    color: #cbd5e1;
}

html.dark-mode body .dropdown-item:hover,
html.dark-mode body .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
}

html.dark-mode body .dropdown-item.active,
html.dark-mode body .dropdown-item:active {
    background-color: rgba(var(--brand-color-rgb), 0.22) !important;
    color: var(--brand-color) !important;
    font-weight: 600;
}

html.dark-mode body .dropdown-item.active:hover,
html.dark-mode body .dropdown-item.active:focus {
    background-color: rgba(var(--brand-color-rgb), 0.28) !important;
    color: var(--brand-color) !important;
}

.notification-item {
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #333;
}

.notification-item:hover {
    background-color: rgba(124, 45, 18, 0.05); /* Brand color light tint */
    transform: translateX(2px);
    color: #111;
}

.notification-icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(124, 45, 18, 0.1);
    color: var(--brand-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s ease, color 0.4s ease;
}

.notification-item:hover .notification-icon-wrapper {
    transform: scale(1.08);
    background-color: var(--brand-color);
    color: white;
}

.notification-title {
    color: #1f2937;
    transition: color 0.4s ease;
}

.notification-meta {
    color: #6b7280;
}

/* Dark Mode Theme Sync */
html.dark-mode body .notification-dropdown {
    background-color: #0b0c10;\n    background-image: linear-gradient(rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}

html.dark-mode body .notification-item {
    color: #e2e8f0;
}

html.dark-mode body .notification-title {
    color: #f1f5f9;
}

html.dark-mode body .notification-meta {
    color: #94a3b8;
}

html.dark-mode body .notification-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

html.dark-mode body .notification-item:hover .notification-icon-wrapper {
    background-color: var(--brand-color);
    color: white;
}



/* Force dropdown to right edge of the screen/navbar */
.notification-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    margin-top: 0 !important;
    border-top-right-radius: 0 !important;
    border-top-left-radius: 0 !important;
}

@media (min-width: 992px) {
    .notification-dropdown {
        right: 10px !important; /* Slight padding from edge on desktop */
        border-radius: 12px !important;
        margin-top: 5px !important;
    }
}

/* Dark Mode Theme Sync for Offcanvas */
html.dark-mode body .notification-offcanvas {
    background-color: #0b0c10;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03));
    color: #e2e8f0;
}
html.dark-mode body .notification-offcanvas .offcanvas-header {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
html.dark-mode body .notification-offcanvas .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Fix hover jitter (card pumping up and down) by expanding hit area */
.card-body::after {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    z-index: -1;
}

/* Micro-Animations & Hover Effects
   (Button pill shape and the sheen sweep used to be patched on here for a
   hand-picked subset of classes; both are now intrinsic to .rh-btn.) */


/* Empty States & Skeletons */
.empty-state { text-align: center; padding: 4rem 1rem; color: #64748b; }
html.dark-mode body .empty-state { color: #94a3b8; }
.empty-state svg { width: 120px; height: 120px; margin-bottom: 1.5rem; opacity: 0.6; }
.skeleton-loader { background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px; }
html.dark-mode body .skeleton-loader { background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ============================================================
   CONCEPT 3: SLEEK COMMAND DOCK FOOTER
   ============================================================ */
.command-dock-footer {
    margin-top: 6.5rem;
    padding-top: 4.5rem;
    background-color: rgba(250, 249, 246, 0.75);
    border-top: 1px solid rgba(124, 45, 18, 0.08);
    position: relative;
    z-index: 10;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

html.dark-mode body .command-dock-footer {
    background-color: rgba(11, 12, 16, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background-image: radial-gradient(ellipse 60% 120px at 50% 0%, rgba(var(--brand-color-rgb), 0.08), transparent 70%);
}

.dock-brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.02em;
}

.dock-brand-name span {
    color: var(--brand-color);
}

html.dark-mode body .dock-brand-name {
    color: #f8fafc;
}

.dock-bio {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #64748b;
    max-width: 320px;
}

html.dark-mode body .dock-bio {
    color: #94a3b8;
}

.dock-status-chip {
    background: rgba(var(--brand-color-rgb), 0.07);
    border: 1px solid rgba(var(--brand-color-rgb), 0.18);
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand-color);
    letter-spacing: 0.02em;
}

.dock-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--brand-color);
    animation: dockPulse 2s infinite;
}

@keyframes dockPulse {
    0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--brand-color-rgb), 0.7); }
    70%  { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(var(--brand-color-rgb), 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--brand-color-rgb), 0); }
}

.dock-col-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #1e293b;
}

html.dark-mode body .dock-col-title {
    color: #f1f5f9;
}

.dock-link-list li {
    margin-bottom: 0.65rem;
}

.dock-link {
    color: #64748b;
    text-decoration: none;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dock-link:hover {
    color: var(--brand-color);
    transform: translateX(4px);
}

html.dark-mode body .dock-link {
    color: #94a3b8;
}

html.dark-mode body .dock-link:hover {
    color: var(--brand-color);
}

.dock-link-icon {
    font-size: 0.85rem;
    opacity: 0.7;
    transition: transform 0.25s ease;
}

.dock-link:hover .dock-link-icon {
    opacity: 1;
    transform: translateX(2px);
}

.dock-link-admin {
    color: var(--brand-color) !important;
    font-weight: 600;
}

.dock-kbd {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-left: 6px;
    color: #64748b;
}

html.dark-mode body .dock-kbd {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

/* Command Bar */
.dock-command-bar {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

html.dark-mode body .dock-command-bar {
    background: rgba(18, 20, 28, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dock-command-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(var(--brand-color-rgb), 0.1);
    color: var(--brand-color);
    font-size: 1.05rem;
    flex-shrink: 0;
}

.dock-command-text {
    color: #475569;
}

html.dark-mode body .dock-command-text {
    color: #94a3b8;
}

.dock-kbd-inline {
    display: inline-block;
    padding: 1px 6px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
    color: #334155;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}

html.dark-mode body .dock-kbd-inline {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
    box-shadow: 0 1px 0 rgba(0,0,0,0.4);
}

.dock-footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: #64748b;
}

html.dark-mode body .dock-footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
}

.dock-meta-tag {
    font-weight: 500;
    font-size: 0.8rem;
    color: #64748b;
}

html.dark-mode body .dock-meta-tag {
    color: #94a3b8;
}

.dock-separator {
    opacity: 0.25;
}

/* Responsive Mobile Optimization for Footer */
@media (max-width: 768px) {
    .command-dock-footer {
        margin-top: 2rem !important;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
        border-top: 1px solid rgba(124, 45, 18, 0.08);
    }
    html.dark-mode body .command-dock-footer {
        border-top-color: rgba(255, 255, 255, 0.06);
    }
    .mobile-micro-footer {
        padding-top: 0.25rem !important;
        padding-bottom: 0.25rem !important;
    }
    .mobile-micro-footer .dock-brand-name {
        font-size: 1.1rem;
    }
    .mobile-micro-footer .dock-link {
        font-size: 0.78rem;
        color: #64748b;
        text-decoration: none;
    }
    .mobile-micro-footer .dock-link:hover {
        color: var(--brand-color);
    }
    html.dark-mode body .mobile-micro-footer .dock-link {
        color: #94a3b8;
    }
    html.dark-mode body .mobile-micro-footer .dock-link:hover {
        color: var(--brand-color);
    }
}




