/* ==========================================================
   Lobby: loud and friendly, for communities. A deep indigo
   night sky, huge wide uppercase headlines (Unbounded),
   glowing rounded cards and a bright pop colour for buttons.
   On the Classic styles.
   ========================================================== */

[data-bs-theme="dark"] .theme-lobby {
    --lb-bg: #15186b;            /* indigo night */
    --lb-bg-deep: #0e1050;       /* footer */
    --lb-ink: #ffffff;
    --lb-text: #e6e8ff;
    --lb-muted: #bfc4f6;         /* 8:1 on the page */
    --lb-line: rgba(255, 255, 255, .14);
    --lb-card: rgba(255, 255, 255, .07);
    --lb-card-hover: rgba(255, 255, 255, .11);
    --lb-glow: 0 18px 50px -20px rgba(0, 0, 0, .55);
    --lb-soft: rgba(255, 255, 255, .08);   /* quotes, table stripes, title box */
    --lb-link: #c9ceff;
    --lb-stars: rgba(255, 255, 255, .55);
}
[data-bs-theme="light"] .theme-lobby {
    --lb-bg: #f3f4ff;
    --lb-bg-deep: #15186b;
    --lb-ink: #0f1250;
    --lb-text: #23264f;
    --lb-muted: #4b4f7c;         /* 7:1 on the page */
    --lb-line: #dfe2fa;
    --lb-card: #ffffff;
    --lb-card-hover: #ffffff;
    --lb-glow: 0 18px 40px -22px rgba(21, 24, 107, .35);
    --lb-soft: #e8eaff;
    --lb-link: color-mix(in srgb, var(--fc-accent) 70%, #000);
    --lb-stars: rgba(86, 98, 246, .18);
}

.theme-lobby {
    --lb-on-pop: #0b0d3a;
    --lb-panel: linear-gradient(140deg, color-mix(in srgb, var(--fc-accent) 92%, #fff) 0%, var(--fc-accent) 45%, color-mix(in srgb, var(--fc-accent) 55%, #0b0d3a) 100%);
    --bs-body-bg: var(--lb-bg);
    --bs-body-color: var(--lb-text);
    --bs-emphasis-color: var(--lb-ink);
    --bs-secondary-color: var(--lb-muted);
    --bs-border-color: var(--lb-line);
    --bs-tertiary-bg: var(--lb-soft);
    color: var(--lb-text);
    background:
        radial-gradient(1100px 620px at 85% -8%, color-mix(in srgb, var(--fc-accent) 38%, transparent), transparent 70%),
        radial-gradient(900px 560px at -10% 40%, color-mix(in srgb, var(--fc-accent) 18%, transparent), transparent 70%),
        var(--lb-bg);
}
.theme-lobby h1, .theme-lobby h2, .theme-lobby h3, .theme-lobby h4 { color: var(--lb-ink); font-weight: 800; letter-spacing: -.01em; }
.theme-lobby .navbar-brand { font-weight: 800 !important; letter-spacing: -.01em; }
.theme-lobby.width-wide .container { max-width: 1320px; }
/* The topic ticker spans the full window (100vw, which on Windows includes the scrollbar): clip, not scroll. */
body.theme-lobby { overflow-x: clip; }

/* ---- Buttons: pop-coloured, rounded --------------------------------------- */
.theme-lobby .btn { border-radius: 16px; font-weight: 700; font-size: .92rem; padding: .85rem 1.5rem; transition: transform .15s, box-shadow .15s, background-color .15s; }
.theme-lobby .btn:hover { transform: translateY(-2px); }
.theme-lobby .btn-primary {
    --bs-btn-bg: var(--lb-pop); --bs-btn-border-color: var(--lb-pop); --bs-btn-color: var(--lb-on-pop);
    --bs-btn-hover-bg: color-mix(in srgb, var(--lb-pop) 85%, #fff); --bs-btn-hover-border-color: color-mix(in srgb, var(--lb-pop) 85%, #fff); --bs-btn-hover-color: var(--lb-on-pop);
    --bs-btn-active-bg: var(--lb-pop); --bs-btn-active-border-color: var(--lb-pop); --bs-btn-active-color: var(--lb-on-pop);
}
.theme-lobby .btn-primary:hover { box-shadow: 0 10px 28px -8px color-mix(in srgb, var(--lb-pop) 70%, transparent); }
.lb-btn-white { --bs-btn-bg: #fff; --bs-btn-border-color: #fff; --bs-btn-color: #0f1250; --bs-btn-hover-bg: #fff; --bs-btn-hover-border-color: #fff; --bs-btn-hover-color: color-mix(in srgb, var(--fc-accent) 80%, #000); --bs-btn-active-bg: #eef0ff; --bs-btn-active-color: #0f1250; }
.lb-btn-white:hover { box-shadow: 0 10px 28px -10px rgba(0, 0, 0, .45); }
.lb-btn-night { --bs-btn-bg: #0f1250; --bs-btn-border-color: #0f1250; --bs-btn-color: #fff; --bs-btn-hover-bg: #1d2170; --bs-btn-hover-border-color: #1d2170; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #0f1250; --bs-btn-active-color: #fff; }

/* ---- Header: a floating rounded bar ----------------------------------------- */
.theme-lobby .site-header { background: transparent; border: 0 !important; }
.theme-lobby .site-header > .container { background: var(--lb-card); border: 1px solid var(--lb-line); border-radius: 22px; margin-top: 1rem; padding: .7rem 1rem .7rem 1.4rem !important; box-shadow: var(--lb-glow); }
.theme-lobby.sticky-header .site-header { background: transparent !important; }
.theme-lobby.sticky-header .site-header > .container { -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); background: color-mix(in srgb, var(--lb-bg) 78%, transparent); }
.theme-lobby .site-header .navbar-brand { font-size: 1.25rem !important; text-transform: uppercase; }
.theme-lobby .site-header .nav-underline { --bs-nav-underline-border-width: 0; }
.theme-lobby .site-header .nav-link { border-radius: 12px; padding: .5rem .9rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.theme-lobby .site-header .nav-link:hover { background: var(--lb-soft); }
.theme-lobby .site-header .nav-link.active { background: var(--lb-pop); color: var(--lb-on-pop) !important; }
@media (max-width: 575.98px) {
    .theme-lobby .site-header > .container { margin: .75rem .75rem 0; width: auto; padding: .6rem .8rem !important; justify-content: center !important; }
    .theme-lobby .site-header .nav { gap: .1rem !important; justify-content: center !important; }
    .theme-lobby .site-header .nav-link { padding: .45rem .55rem; font-size: .72rem; }
}

/* ---- Home: shared ------------------------------------------------------- */
.lb-home { padding-top: .5rem; padding-bottom: 1rem; }
.lb-section { margin: 4.5rem 0; }
.lb-h1 { font-size: clamp(1.9rem, 1rem + 3vw, 3.4rem); line-height: 1.05; text-transform: uppercase; margin-bottom: 1.1rem; overflow-wrap: anywhere; }
.lb-h2 { font-size: clamp(1.45rem, 1rem + 1.6vw, 2.3rem); line-height: 1.1; text-transform: uppercase; margin-bottom: .8rem; }
.lb-lead { font-size: 1.12rem; line-height: 1.6; color: var(--lb-muted); max-width: 40rem; }
.lb-meta { color: var(--lb-muted); font-size: .85rem; margin: 0; }
.lb-label { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--lb-pop); color: var(--lb-on-pop); border-radius: 999px; padding: .28rem .7rem; margin: 0 0 .7rem; }

/* Sparkly sky: little stars drawn with gradients, nothing to load */
.lb-hero, .lb-band {
    background-image:
        radial-gradient(2px 2px at 12% 22%, rgba(255, 255, 255, .9), transparent 60%),
        radial-gradient(2px 2px at 38% 78%, rgba(255, 255, 255, .7), transparent 60%),
        radial-gradient(3px 3px at 64% 14%, rgba(255, 255, 255, .8), transparent 60%),
        radial-gradient(2px 2px at 82% 62%, rgba(255, 255, 255, .7), transparent 60%),
        radial-gradient(2px 2px at 92% 28%, rgba(255, 255, 255, .9), transparent 60%),
        radial-gradient(2px 2px at 24% 52%, rgba(255, 255, 255, .5), transparent 60%),
        radial-gradient(600px 300px at 100% 100%, rgba(255, 255, 255, .14), transparent 70%),
        var(--lb-panel);
}

/* ---- 1. Featured panel ------------------------------------------------------ */
.lb-hero { position: relative; border-radius: 40px; overflow: hidden; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 2rem; padding: clamp(1.75rem, 4.5vw, 4rem); margin-top: 1.5rem; color: #fff; box-shadow: 0 30px 80px -40px color-mix(in srgb, var(--fc-accent) 80%, #000); }
.lb-hero-plain { grid-template-columns: 1fr; text-align: center; }
.lb-hero-plain .lb-hero-text { margin: 0 auto; max-width: 52rem; }
.lb-hero-plain .lb-lead { margin-left: auto; margin-right: auto; }
.lb-hero-plain .d-flex { justify-content: center; }
.lb-hero .lb-h1, .lb-hero .lb-h1 a { color: #fff; text-decoration: none; }
.lb-hero .lb-h1 a:hover { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: .12em; }
.lb-hero .lb-lead { color: rgba(255, 255, 255, .9); margin-bottom: 1.75rem; }
.lb-hero-label { display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: rgba(255, 255, 255, .18); border-radius: 999px; padding: .3rem .85rem; margin-bottom: 1.1rem; }
.lb-hero-pic { position: relative; transform: rotate(2.5deg); }
.lb-hero-pic::before { content: ""; position: absolute; inset: -14px 14px 14px -14px; border-radius: 32px; background: var(--lb-pop); transform: rotate(-5deg); z-index: 0; }
.lb-hero-img { position: relative; z-index: 1; display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 28px; border: 6px solid rgba(255, 255, 255, .95); box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .55); }
@media (max-width: 991.98px) {
    .lb-hero { grid-template-columns: 1fr; }
    .lb-hero-pic { order: -1; max-width: 32rem; margin: .5rem auto 0; width: calc(100% - 1.5rem); }
}
@media (max-width: 575.98px) { .lb-hero, .lb-band { border-radius: 28px; } }

/* ---- 2. Ticker ---------------------------------------------------------------- */
.lb-ticker { overflow: hidden; margin: 2.25rem calc(50% - 50vw) 0; width: 100vw; background: var(--lb-soft); border-block: 1px solid var(--lb-line); padding: 1.1rem 0; transform: rotate(-1.2deg); }
.lb-ticker-track { display: flex; width: max-content; animation: lb-scroll 40s linear infinite; }
.lb-ticker:hover .lb-ticker-track, .lb-ticker:focus-within .lb-ticker-track { animation-play-state: paused; }
.lb-ticker-list { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.lb-ticker-list li { display: flex; align-items: center; }
.lb-tick { font-size: clamp(1.4rem, 1rem + 1.6vw, 2.4rem); font-weight: 900; text-transform: uppercase; color: var(--lb-ink); text-decoration: none; white-space: nowrap; padding: 0 1.4rem; }
a.lb-tick:hover { color: var(--lb-pop); }
[data-bs-theme="light"] a.lb-tick:hover { color: var(--lb-link); }
.lb-spark { width: 1.1rem; height: 1.1rem; flex: none; background: var(--lb-pop); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
@keyframes lb-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
    .lb-ticker-track { animation: none; }
    .lb-ticker { overflow-x: auto; }
}

/* ---- 3. Spotlight --------------------------------------------------------- */
.lb-spot { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); background: var(--lb-card); border: 1px solid var(--lb-line); border-radius: 40px; padding: clamp(1.25rem, 3vw, 2.25rem); margin-bottom: 1.75rem; box-shadow: var(--lb-glow); transition: transform .2s, background-color .2s; }
.lb-spot:hover { transform: translateY(-4px); background: var(--lb-card-hover); }
.lb-spot-flip { grid-template-columns: .9fr 1.1fr; }
.lb-spot-flip .lb-spot-pic { order: 2; }
.lb-spot-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 28px; }
.lb-spot-text { padding: .5rem clamp(0rem, 2vw, 1.5rem); }
.lb-spot .lb-h2 a { color: var(--lb-ink); text-decoration: none; }
.lb-spot:hover .lb-h2 a { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .14em; }
@media (max-width: 767.98px) {
    .lb-spot, .lb-spot-flip { grid-template-columns: 1fr; border-radius: 28px; }
    .lb-spot-flip .lb-spot-pic { order: 0; }
    .lb-spot-img { border-radius: 20px; }
}

/* ---- Cards (partials/card.php) --------------------------------------------- */
.lb-card { background: var(--lb-card); border: 1px solid var(--lb-line); border-radius: 28px; overflow: hidden; box-shadow: var(--lb-glow); transition: transform .2s, background-color .2s; }
.lb-card:hover { transform: translateY(-4px); background: var(--lb-card-hover); }
.lb-thumb-wrap { padding: .65rem .65rem 0; }
.lb-thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 20px; }
.lb-body { padding: 1.1rem 1.4rem 1.5rem; }
.lb-title { font-size: 1.05rem; line-height: 1.3; margin: 0 0 .55rem; }
.lb-title a { color: var(--lb-ink); text-decoration: none; }
.lb-card:hover .lb-title a { text-decoration: underline; text-underline-offset: .15em; }
.lb-summary { color: var(--lb-muted); font-size: .95rem; margin: 0 0 .7rem; }

/* ---- 5. Closing band --------------------------------------------------------- */
.lb-band { border-radius: 40px; padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4rem); margin: 4rem 0 1rem; text-align: center; color: #fff; }
.lb-band .lb-h1, .lb-band h2 { color: #fff; max-width: 52rem; margin-left: auto; margin-right: auto; }
.lb-band .lb-lead { color: rgba(255, 255, 255, .9); margin: 0 auto 1.75rem; }
.lb-band .fc-newsletter { background: none !important; border: 0 !important; box-shadow: none !important; margin: 0 auto !important; max-width: 38rem; color: #fff; }
.lb-band .fc-newsletter .card-body { padding: 0 !important; }
.lb-band .fc-newsletter h2 { font-size: clamp(1.9rem, 1rem + 3vw, 3.2rem) !important; text-transform: uppercase; line-height: 1.05; }
.lb-band .fc-newsletter .text-body-secondary { color: #fff !important; opacity: .9; }
.lb-band .fc-subscribe { justify-content: center; }
.lb-band .fc-newsletter .form-control { border-radius: 16px; padding: .85rem 1.2rem; border: 0; width: auto; flex: 1 1 240px; }

/* ---- Articles: title box, tables, quotes, code ------------------------------- */
.theme-lobby main > .container > header.card { background: var(--lb-card); border: 1px solid var(--lb-line); border-radius: 40px; box-shadow: var(--lb-glow); }
.theme-lobby main > .container > header.card h1 { text-transform: uppercase; line-height: 1.08; }
.theme-lobby .content-body h2, .theme-lobby .content-body h3 { letter-spacing: 0; }
.theme-lobby .content-body img { border-radius: 24px; }
.theme-lobby .content-body table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--lb-line); border-radius: 20px; overflow: hidden; margin: 1.75rem 0; font-size: .95rem; }
.theme-lobby .content-body th { background: var(--fc-accent); color: var(--fc-on-accent); font-weight: 700; text-align: left; padding: .8rem 1rem; }
.theme-lobby .content-body td { padding: .75rem 1rem; border-top: 1px solid var(--lb-line); }
.theme-lobby .content-body tbody tr:nth-child(even) td { background: var(--lb-soft); }
.theme-lobby .content-body blockquote { background: var(--lb-soft); border: 0; border-left: 6px solid var(--lb-pop); border-radius: 20px; padding: 1.25rem 1.5rem; margin: 1.75rem 0; font-size: 1.05rem; }
.theme-lobby .content-body blockquote > :last-child { margin-bottom: 0; }
.theme-lobby .content-body pre { background: #0e1050; color: #e6e8ff; border-radius: 18px; padding: 1.1rem 1.3rem; }
.theme-lobby .fc-disclosure { background: var(--lb-soft); border: 0 !important; border-radius: 16px; padding: .8rem 1rem !important; }
.theme-lobby .toc, .theme-lobby .sidebar .card, .theme-lobby .fc-newsletter { border-radius: 28px; overflow: hidden; }
/* Classic forces grey cards in dark mode (!important); Lobby's cards are glassy instead. */
.theme-lobby .card, .theme-lobby .bg-body-tertiary { background-color: var(--lb-card) !important; border-color: var(--lb-line) !important; }
.theme-lobby .card-header { background: var(--lb-soft); border-color: var(--lb-line); }

/* ---- Links and paging --------------------------------------------------------- */
/* :where() keeps this weak, so styled links (cards, ticker, buttons) keep their own colour. */
:where(.theme-lobby) a { color: var(--lb-link); }
.theme-lobby .pagination { gap: .45rem; --bs-pagination-bg: var(--lb-card); --bs-pagination-color: var(--lb-ink); --bs-pagination-hover-color: var(--lb-ink); --bs-pagination-hover-bg: var(--lb-soft); --bs-pagination-active-bg: var(--lb-pop); --bs-pagination-active-border-color: var(--lb-pop); --bs-pagination-active-color: var(--lb-on-pop); --bs-pagination-border-color: var(--lb-line); --bs-pagination-disabled-bg: transparent; }
.theme-lobby .page-link { border-radius: 14px !important; min-width: 2.7rem; text-align: center; font-weight: 700; }
.theme-lobby .form-control, .theme-lobby .form-select { border-radius: 14px; }

/* ---- Footer: deep indigo, rounded top ------------------------------------------ */
.theme-lobby .site-footer { background: var(--lb-bg-deep); color: #bfc4f6; border: 0 !important; border-radius: 40px 40px 0 0; margin-top: 4rem !important; padding-top: 2.75rem !important; }
.theme-lobby .site-footer .link-body-emphasis, .theme-lobby .site-footer .text-body-emphasis { color: #fff !important; }
.theme-lobby .site-footer .text-body-emphasis { font-weight: 800; text-transform: uppercase; }
.theme-lobby .site-footer .text-body-secondary, .theme-lobby .site-footer .link-secondary { color: #bfc4f6 !important; }
.theme-lobby .site-footer .nav-link { font-weight: 600; }
.theme-lobby .site-footer .nav-link:hover { color: var(--lb-pop) !important; }
