/* Hub CSS - Member Dashboard */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&family=Lato:wght@400;700;900&display=swap');

[x-cloak] { display: none !important; }

/* Tab nav used in the voting standings card */
.vote-tab {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    color: var(--hub-text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.vote-tab:hover { color: var(--hub-text); }
.vote-tab--active { color: var(--hub-link); border-bottom-color: var(--hub-link); }

/* ========================================
   HTMX Loading Indicator
   ======================================== */
.htmx-request .hub-content {
    opacity: 0.6;
    transition: opacity 200ms ease-out;
}

/* ========================================
   CSS Custom Properties - Dark (default)
   ======================================== */
:root {
    /* Surfaces — "Obsidian" elevation ladder (near-black charcoal).
       Distinct layers replace the old single flat navy so the UI reads
       as depth, not one monotone wash. Anchored on PL blue #092e4b. */
    --hub-bg: #0a0b10;            /* deepest page background */
    --hub-surface: #13151d;       /* inset panels, tiles, table stripes */
    --hub-card-bg: #181b24;       /* cards & modals (sits above the page) */
    --hub-elevated: #20242f;      /* dropdowns, popovers, raised pills */
    --hub-card-border: rgba(255, 255, 255, 0.07);
    --hub-border: rgba(255, 255, 255, 0.08);
    --hub-border-strong: rgba(255, 255, 255, 0.14);
    --hub-text: #F4EFDD;
    --hub-text-muted: #8b97a8;
    --hub-topbar-bg: #0d0f15;
    --hub-topbar-border: rgba(255,255,255,0.06);
    --hub-dropdown-bg: #20242f;
    --hub-dropdown-border: rgba(255,255,255,0.10);
    --hub-input-bg: #14161f;
    --hub-input-border: rgba(255,255,255,0.14);

    /* Sidebar — theme-aware (was hardcoded to --color-navy, which never
       switched on light mode). These tokens are overridden under [data-theme]. */
    --hub-sidebar-bg: #0d0f15;
    --hub-sidebar-text: #F4EFDD;
    --hub-sidebar-muted: rgba(244, 239, 221, 0.60);
    --hub-sidebar-hover: rgba(255, 255, 255, 0.06);
    --hub-sidebar-border: rgba(255, 255, 255, 0.08);

    --color-navy: #092E4C;        /* brand structural blue (button text, overlays) */
    /* Brighter PL-blue sibling for interactive/structural accents on dark */
    --hub-blue: #3d8bd4;
    --hub-blue-soft: rgba(61, 139, 212, 0.15);
    /* Hero gradient: PL blue #092e4b fading to near-black ("black & blue") */
    --hub-hero-from: #15527f;
    --hub-hero-mid: #092e4b;
    --hub-hero-to: #0a0d14;

    --color-tuscan-yellow: #EEB44B;
    --color-yellow-hover: #d4a043;
    /* Gold as TEXT (links, active tabs, prices). Theme-aware so it stays
       bright on dark but darkens to a readable amber on light surfaces.
       Gold FILLS (buttons, pills, bars) keep --color-tuscan-yellow. */
    --hub-link: #EEB44B;
    --hub-link-hover: #d4a043;
    --color-cream: #F4EFDD;
    --color-brand-link: #3d8bd4;
    --color-error: #f0a0a0;
    --color-error-bg: rgba(240, 160, 160, 0.12);
    --color-success: #7bc88f;
    --color-success-bg: rgba(123, 200, 143, 0.12);

    /* Google Calendar sync-state badge (Screen C) — theme tokens so the badge
       stays legible on both Obsidian (here) and Slate (overridden below). */
    --pl-sync-synced: #6ee7b7;
    --pl-sync-pending: #8b97a8;
    --pl-sync-failed: #f0a0a0;

    --font-heading: 'Lato', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    --sidebar-width: 220px;
    --topbar-height: 56px;
}

/* ========================================
   Light Theme Override
   ======================================== */
[data-theme="light"] {
    /* "Slate" light — cool neutral gray (not warm cream) with white cards. */
    --hub-bg: #eef0f3;
    --hub-surface: #e6e9ee;
    --hub-card-bg: #ffffff;
    --hub-elevated: #ffffff;
    --hub-card-border: #dfe3ea;
    --hub-border: #e2e6ec;
    --hub-border-strong: #cfd5de;
    --hub-text: #1D1E1E;
    --hub-text-muted: #5b6675;
    --hub-topbar-bg: #ffffff;
    --hub-topbar-border: #e2e6ec;
    --hub-dropdown-bg: #ffffff;
    --hub-dropdown-border: #e2e6ec;
    --hub-input-bg: #f4f6f8;
    --hub-input-border: #d3d9e1;

    /* Sidebar follows the theme (the fix) — light rail in light mode. */
    --hub-sidebar-bg: #ffffff;
    --hub-sidebar-text: #1D1E1E;
    --hub-sidebar-muted: #5b6675;
    --hub-sidebar-hover: rgba(9, 46, 75, 0.06);
    --hub-sidebar-border: #e2e6ec;

    --hub-blue: #2f6fb0;
    --hub-blue-soft: rgba(9, 46, 75, 0.08);
    --hub-hero-from: #f8fafc;
    --hub-hero-mid: #f1f5f9;
    --hub-hero-to: #e2e8f0;

    /* Darker amber for gold text on white (~5:1 contrast, passes AA). */
    --hub-link: #9c5e0d;
    --hub-link-hover: #7e4b09;

    /* Sync badge — darker greens/reds that pass contrast on white cards. */
    --pl-sync-synced: #1f7a52;
    --pl-sync-pending: #5b6675;
    --pl-sync-failed: #b03030;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    background-color: var(--hub-bg);
    color: var(--hub-text);
    min-height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--hub-text);
}

a {
    color: var(--hub-link);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover { color: var(--hub-link-hover); }

/* ========================================
   Sidebar
   ======================================== */
.hub-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh; /* dynamic viewport height — survives mobile URL-bar collapse */
    background-color: var(--hub-sidebar-bg);
    border-right: 1px solid var(--hub-sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transition: transform 0.2s ease;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.hub-sidebar--closed {
    transform: translateX(-100%);
}

/* Shared brand block — identical in hub and admin */
.pl-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1.25rem 1rem;
    color: var(--hub-sidebar-text);
    border-bottom: 1px solid var(--hub-sidebar-border);
    text-decoration: none;
}

.pl-brand:hover { color: var(--hub-sidebar-text); }

.pl-brand__icon { width: 24px; height: 24px; }

.pl-brand__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pl-brand__text {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.pl-brand__label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    background-color: rgba(238, 180, 75, 0.15);
    color: var(--color-tuscan-yellow);
    width: fit-content;
}

.hub-sidebar__nav {
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hub-sidebar__divider {
    border: 0;
    border-top: 1px solid var(--hub-sidebar-border);
    margin: 0.5rem 0.75rem;
    width: auto;
}

.hub-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--hub-sidebar-muted);
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.hub-sidebar__link:hover {
    background-color: var(--hub-sidebar-hover);
    color: var(--hub-sidebar-text);
}

.hub-sidebar__link.active {
    background-color: rgba(238, 180, 75, 0.12);
    color: var(--hub-sidebar-text);
    box-shadow: inset 3px 0 0 var(--color-tuscan-yellow);
    font-weight: 600;
}

.hub-sidebar__link.active svg {
    color: var(--color-tuscan-yellow);
}

.hub-sidebar__section-header {
    padding: 1.25rem 0.75rem 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hub-sidebar-muted);
}

.hub-sidebar__section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.25rem 0.75rem 0.375rem;
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hub-sidebar-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.hub-sidebar__section-toggle:hover {
    color: var(--hub-sidebar-text);
}

.hub-sidebar__chevron {
    transition: transform 0.25s ease;
}

.hub-sidebar__section-toggle[aria-expanded="true"] .hub-sidebar__chevron {
    transform: rotate(180deg);
}

.hub-sidebar__collapsible {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease;
}

.hub-sidebar__collapsible.open {
    grid-template-rows: 1fr;
}

.hub-sidebar__collapsible-inner {
    overflow: hidden;
}

/* Sidebar footer — pinned to bottom, reuses .hub-sidebar__link styling */
.hub-sidebar__footer {
    margin-top: auto;
    padding: 0.75rem 0.5rem 1rem;
    border-top: 1px solid var(--hub-sidebar-border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hub-sidebar__footer-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hub-sidebar-muted);
    padding: 0.35rem 0.75rem 0.25rem;
}

.hub-sidebar__ext-icon {
    margin-left: auto;
    opacity: 0.45;
    flex-shrink: 0;
}

.hub-sidebar__link--external:hover .hub-sidebar__ext-icon {
    opacity: 0.85;
}

.hub-sidebar__link--feedback {
    margin-top: 0.4rem;
    border-top: 1px dashed var(--hub-sidebar-border);
    padding-top: 0.75rem;
}

/* Email list used on the User Settings > Emails tab */
.hub-email-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.hub-email-list__item label {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--hub-border);
    border-radius: 6px;
    cursor: pointer;
}
.hub-email-list__item label:hover { background-color: rgba(255, 255, 255, 0.03); }
.hub-email-list__addr { flex: 1; font-family: var(--font-body); }

.hub-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    letter-spacing: 0.02em;
}
.hub-pill--ok { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; }
.hub-pill--warn { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.hub-pill--primary { background: rgba(238, 180, 75, 0.15); color: var(--color-tuscan-yellow, #EEB44B); }
/* Invite-status pills (introduced by the Manage Members invites panel). Same shape as
   the family above; new in-family modifiers, no new prefix/token. */
.hub-pill--neutral { background: rgba(139, 151, 168, 0.18); color: var(--hub-text-muted); }
.hub-pill--danger { background: rgba(224, 85, 85, 0.16); color: #f0a0a0; }

/* ========================================
   Google Calendar sync-state badge (Screen C / E)
   Shown per event row when Google sync is on. Colors come from theme tokens
   defined for both :root (Obsidian) and [data-theme="light"] (Slate) above —
   no hardcoded hex here, so the badge tracks the theme in both directions.
   ======================================== */
.pl-sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.pl-sync-badge--synced { color: var(--pl-sync-synced); }
.pl-sync-badge--pending { color: var(--pl-sync-pending); }
.pl-sync-badge--failed { color: var(--pl-sync-failed); }

/* Compact "synced to the shared Google Calendar" flag — a small green calendar-check
   glyph that replaces the wordy pill wherever a synced event is listed. */
.pl-sync-flag {
    display: inline-flex;
    align-items: center;
    color: var(--pl-sync-synced);
    line-height: 1;
}
.pl-sync-flag svg { display: block; }
/* The failure/config-gap reason, on its own line beneath the badge — visible
   inline text, never a title-tooltip (dead on touch, FRONTEND Screen C). */
.pl-sync-badge__reason {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: var(--hub-text-muted);
}

/* ========================================
   Invites panel — Manage Members page
   #invites-list is the HTMX-swappable region.
   ======================================== */
.pl-invite-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.pl-invite-form {
    margin-bottom: 1.25rem;
}
.pl-invite-form__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.pl-invite-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.pl-invite-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--hub-input-border);
    border-radius: 8px;
    background: var(--hub-surface);
}
.pl-invite-row__main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1 1 240px;
    min-width: 0;
}
.pl-invite-row__email {
    font-weight: 500;
    color: var(--hub-text);
    word-break: break-word;
}
.pl-invite-row__meta {
    font-size: 0.8125rem;
    color: var(--hub-text-muted);
}
.pl-invite-row__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.pl-invite-empty {
    color: var(--hub-text-muted);
    font-size: 0.875rem;
    margin: 0;
    padding: 0.5rem 0;
}
/* Light theme (Slate) contrast bumps — SCOPED to the invite list so the shared
   .hub-pill--ok used on other pages (e.g. user_settings.html) is untouched. */
[data-theme="light"] .pl-invite-list .hub-pill--ok { color: #1f7a52; }
[data-theme="light"] .pl-invite-list .hub-pill--neutral { color: #5b6675; }
[data-theme="light"] .pl-invite-list .hub-pill--danger { color: #b03030; }
/* Same contrast bumps for the person-status badges in the Manage Members table
   ("Hasn't signed in yet" / "Non-member user"), Review fix #8. */
[data-theme="light"] .pl-members-table .hub-pill--neutral { color: #5b6675; }
[data-theme="light"] .pl-members-table .hub-pill--danger { color: #b03030; }
/* "Your proposed events" status pills (Community Calendar Events tab + propose page):
   the shared amber/red pills need a darker text on the light theme to stay readable. */
[data-theme="light"] .pl-proposals .hub-pill--warn { color: #9a6a00; }
[data-theme="light"] .pl-proposals .hub-pill--danger { color: #b03030; }

/* ========================================
   Automations dashboard (Site Settings → Automations)
   A card list of scheduled jobs: grid on desktop, stacked with per-region labels on mobile.
   Status is shown with the shared .hub-pill--* family (no new colored pill classes); only
   layout is new here. Colors come from theme tokens — verified in Obsidian + Slate.
   ======================================== */
.pl-automation-callout {
    margin: 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--hub-card-border);
    border-left: 3px solid var(--color-tuscan-yellow);
    border-radius: 6px;
    background: var(--hub-card-bg);
    color: var(--hub-text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}
.pl-automation-callout a { color: var(--color-tuscan-yellow); font-weight: 600; }

.pl-automation-list { display: flex; flex-direction: column; gap: 0.75rem; }
.pl-automation-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--hub-card-border);
    border-radius: 8px;
    background: var(--hub-card-bg);
}
.pl-automation-card--paused { opacity: 0.62; }

.pl-automation-main { min-width: 0; }
.pl-automation-name {
    font-weight: 700;
    color: var(--hub-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.pl-automation-desc { color: var(--hub-text-muted); font-size: 0.85rem; margin-top: 0.15rem; }
.pl-automation-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: rgba(224, 85, 85, 0.16);
    color: #f0a0a0;
}
.pl-automation-paused { color: var(--hub-text-muted); font-size: 0.8rem; font-style: italic; margin-top: 0.35rem; }

.pl-automation-cell { display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-start; }
.pl-automation-cell-label {
    display: none; /* revealed only in the stacked mobile layout */
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hub-text-muted);
}
.pl-automation-schedule { color: var(--hub-text); font-size: 0.85rem; white-space: nowrap; }
.pl-automation-lastrun { display: flex; flex-direction: column; gap: 0.2rem; }
.pl-automation-time { color: var(--hub-text-muted); font-size: 0.78rem; }
.pl-automation-error {
    color: #f0a0a0;
    font-size: 0.75rem;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pl-automation-run { align-items: flex-end; }

/* Legacy-CMS clarity sub-block spans the full card width below the five regions. */
.pl-automation-subblock {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--hub-card-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}
.pl-automation-subnote { margin: 0; color: var(--hub-text-muted); font-size: 0.82rem; }
.pl-automation-subnote--off { color: #f0a0a0; font-weight: 600; }
.pl-automation-subblock code { font-size: 0.8rem; }

/* Light-mode (Slate) legibility for the shared pills used inside the cards — mirrors the
   scoped overrides added for the invite list / members table above. */
[data-theme="light"] .pl-automation-card .hub-pill--ok { color: #1f7a52; }
[data-theme="light"] .pl-automation-card .hub-pill--neutral { color: #5b6675; }
[data-theme="light"] .pl-automation-card .hub-pill--danger { color: #b03030; }
[data-theme="light"] .pl-automation-card .hub-pill--warn { color: #9a6a00; }
[data-theme="light"] .pl-automation-card .pl-automation-error,
[data-theme="light"] .pl-automation-subnote--off { color: #b03030; }
[data-theme="light"] .pl-automation-badge { background: rgba(224, 85, 85, 0.12); color: #b03030; }

@media (max-width: 640px) {
    .pl-automation-card {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 0.75rem;
    }
    .pl-automation-cell-label { display: block; }
    .pl-automation-run { align-items: stretch; margin-top: 0.75rem; }
    .pl-automation-run .hub-btn { width: 100%; text-align: center; }
    .pl-automation-error { max-width: 100%; white-space: normal; }
}
@media (max-width: 640px) {
    .pl-invite-row__actions {
        width: 100%;
    }
    .pl-invite-row__actions .hub-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* ========================================
   Main Wrapper
   ======================================== */
.hub-main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.2s ease;
}

.hub-main-wrapper--expanded {
    margin-left: 0;
}

/* ========================================
   Shared Top Bar (.pl-topbar)
   ======================================== */
.pl-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-height);
    background-color: var(--hub-topbar-bg);
    border-bottom: 1px solid var(--hub-topbar-border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 0.75rem;
    overflow: visible;
}

.pl-topbar__toggle {
    background: none;
    border: none;
    color: var(--hub-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.pl-topbar__toggle:hover {
    color: var(--hub-text);
    background-color: rgba(255, 255, 255, 0.06);
}

.pl-topbar__divider {
    width: 1px;
    height: 20px;
    background-color: var(--hub-topbar-border);
}

.pl-badge--version {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--color-tuscan-yellow);
    background-color: rgba(238, 180, 75, 0.15);
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pl-badge--version:hover {
    background-color: rgba(238, 180, 75, 0.28);
}

/* View switcher — distinct button to switch between admin/hub */
.pl-view-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-tuscan-yellow);
    background-color: rgba(238, 180, 75, 0.1);
    border: 1px solid rgba(238, 180, 75, 0.25);
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.pl-view-switcher:hover {
    background-color: rgba(238, 180, 75, 0.18);
    border-color: rgba(238, 180, 75, 0.4);
    color: var(--color-tuscan-yellow);
}

.pl-view-switcher svg {
    flex-shrink: 0;
}

.pl-topbar__spacer { flex: 1; }

.pl-topbar__theme-toggle {
    background: none;
    border: none;
    color: var(--hub-text-muted);
    cursor: pointer;
    padding: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.pl-topbar__theme-toggle:hover {
    color: var(--hub-text);
    background-color: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .pl-topbar__theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

/* ========================================
   Shared Profile Dropdown (.pl-profile)
   ======================================== */
.pl-profile {
    position: relative;
    z-index: 100;
}

.pl-profile__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-tuscan-yellow);
    color: var(--color-navy);
    font-size: 0.8125rem;
    font-weight: 700;
    font-family: var(--font-body);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.15s ease;
}

.pl-profile__avatar:hover {
    box-shadow: 0 0 0 2px var(--hub-topbar-bg), 0 0 0 4px var(--color-tuscan-yellow);
}

.pl-profile__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background-color: var(--hub-dropdown-bg);
    border: 1px solid var(--hub-dropdown-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    overflow: hidden;
    z-index: 100;
}

.pl-profile__dropdown-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--hub-dropdown-border);
}

.pl-profile__dropdown-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--hub-text);
}

.pl-profile__dropdown-email {
    font-size: 0.75rem;
    color: var(--hub-text-muted);
    margin-top: 2px;
}

.pl-profile__dropdown-item {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-family: var(--font-body);
    color: var(--hub-text);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease;
    text-decoration: none;
}

.pl-profile__dropdown-item:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--hub-text);
}

[data-theme="light"] .pl-profile__dropdown-item:hover {
    background-color: rgba(0,0,0,0.04);
}

.pl-profile__dropdown-item--danger { color: #e05555; }
.pl-profile__dropdown-item--danger:hover { color: #e05555; }

.pl-profile__dropdown-divider {
    height: 1px;
    background-color: var(--hub-dropdown-border);
    margin: 0.25rem 0;
}

/* ========================================
   Content Area
   ======================================== */
.hub-content {
    flex: 1;
    padding: 2rem 2.5rem;
}

/* ========================================
   Messages
   ======================================== */
.hub-messages {
    list-style: none;
    margin-bottom: 1.5rem;
}

.hub-message {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid;
}

.hub-message--success {
    color: var(--color-success);
    background-color: var(--color-success-bg);
    border-left-color: var(--color-success);
}

.hub-message--error {
    color: var(--color-error);
    background-color: var(--color-error-bg);
    border-left-color: var(--color-error);
}

.hub-message--info {
    color: var(--hub-text-muted);
    background-color: rgba(150, 172, 187, 0.1);
    border-left-color: var(--hub-text-muted);
}

/* ========================================
   Cards
   ======================================== */
.hub-card {
    background-color: var(--hub-card-bg);
    border: 1px solid var(--hub-card-border);
    border-radius: 10px;
    padding: 2rem;
}

/* Classes admin area (Overview sections + Settings hub cards): the dark theme's
   card border is transparent, so nested cards blend into the page. Give them a
   visible outline in dark mode; light keeps its existing card border. */
.cms-admin .hub-card {
    border-color: var(--hub-border);
}
[data-theme="light"] .cms-admin .hub-card {
    border-color: var(--hub-card-border);
}

.hub-page-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.hub-text-muted {
    color: var(--hub-text-muted);
    font-size: 0.9375rem;
}

/* ========================================
   Vote List
   ======================================== */
.hub-vote-list {
    list-style: none;
    margin-top: 1rem;
}

.hub-vote-list li {
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

[data-theme="light"] .hub-vote-list li {
    border-bottom-color: #e0ddd5;
}

.hub-vote-list li:last-child { border-bottom: none; }

.hub-success-icon {
    color: var(--color-success);
    margin-bottom: 1rem;
}

/* ========================================
   Forms
   ======================================== */
.hub-form-group {
    margin-bottom: 1.25rem;
}

.hub-form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--hub-text-muted);
    margin-bottom: 0.375rem;
    letter-spacing: 0.02em;
}

.hub-form-group input[type="text"],
.hub-form-group input[type="email"],
.hub-form-group input[type="tel"],
.hub-form-group input[type="number"],
.hub-form-group input[type="file"],
.hub-form-group select,
.hub-form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--hub-text);
    background-color: var(--hub-input-bg);
    border: 1px solid var(--hub-input-border);
    border-radius: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hub-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.hub-form-group input:focus,
.hub-form-group select:focus,
.hub-form-group textarea:focus {
    outline: none;
    border-color: var(--color-tuscan-yellow);
    box-shadow: 0 0 0 3px rgba(238, 180, 75, 0.15);
}

.hub-form-group input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Native option popups don't inherit the select's colors (FRONTEND Rule 13). */
.hub-form-group select option {
    background: var(--hub-input-bg);
    color: var(--hub-text);
}

.hub-field-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--hub-text-muted);
    margin-top: 0.25rem;
}

.hub-field-error {
    font-size: 0.8125rem;
    color: var(--color-error);
    margin-top: 0.25rem;
}

.hub-form-error {
    padding: 0.75rem 1rem;
    background-color: var(--color-error-bg);
    border-left: 3px solid var(--color-error);
    border-radius: 6px;
    color: var(--color-error);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* ========================================
   Fixed Feedback Button — bottom left
   ======================================== */
.pl-feedback-btn {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 200;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--hub-text-muted);
    background-color: var(--hub-card-bg);
    border: 1px solid var(--hub-input-border);
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.pl-feedback-btn:hover {
    color: var(--color-tuscan-yellow);
    border-color: var(--color-tuscan-yellow);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pl-feedback-btn svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.pl-feedback-btn:hover svg {
    opacity: 1;
}

/* ========================================
   Buttons
   ======================================== */
.hub-btn {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.hub-btn:active { transform: translateY(1px); }

.hub-btn--primary {
    background-color: var(--color-tuscan-yellow);
    color: var(--color-navy);
}

.hub-btn--primary:hover {
    background-color: var(--color-yellow-hover);
    color: var(--color-navy);
}

.hub-btn--danger {
    background: #c0392b;
    color: #fff;
    border: 1px solid #c0392b;
}
.hub-btn--danger:hover {
    background: #d94a3d;
    border-color: #d94a3d;
    color: #fff;
}

/* Small size modifier for table-row / inline actions. */
.hub-btn--sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.8125rem;
    border-radius: 4px;
}

/* Low-emphasis inline action (e.g. "Edit" in a table row). */
.hub-btn--ghost {
    background: transparent;
    color: var(--hub-text-muted);
    border: 1px solid var(--hub-border-strong);
}
.hub-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--hub-text);
    border-color: var(--hub-text-muted);
}

/* ========================================
   Guild Detail
   ======================================== */
.hub-detail-section {
    margin-top: 1.5rem;
}

.hub-detail-label {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hub-text-muted);
    margin-bottom: 0.75rem;
}

.hub-member-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
}

.hub-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(238, 180, 75, 0.15);
    color: var(--color-tuscan-yellow);
    font-size: 0.8125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub-member-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hub-member-name {
    font-size: 0.9375rem;
    font-weight: 400;
}

.hub-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    background-color: rgba(238, 180, 75, 0.15);
    color: var(--color-tuscan-yellow);
}

/* Alpine x-show reveal (e.g. the "schedule for later" datetime picker). A plain
   display:block class — never an inline style="display:…", which x-show strips on
   first reveal (FRONTEND.md rule 12). */
.pl-reveal {
    display: block;
    margin-top: 1rem;
}

/* A staff member's titles shown together as badges — wraps on narrow screens. */
.pl-badge-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
}

/* One title badge plus its per-title Remove control on the Staff tab. */
.pl-staff-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.hub-note {
    font-size: 0.8125rem;
    font-style: italic;
}


/* ========================================
   Members Table (Manage Members)
   Token-driven; stacks into labelled cards on phones (no horizontal scroll).
   ======================================== */
.pl-members-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.pl-members-table th,
.pl-members-table td {
    padding: 0.55rem 0.75rem;
}
.pl-members-table th {
    text-align: left;
    color: var(--hub-text-muted);
    font-weight: 500;
    font-size: 0.875rem;
}
.pl-members-table td {
    color: var(--hub-text-muted);
}
.pl-members-table td:first-child {
    color: var(--hub-text); /* Name column reads as primary text (two-tone rows) */
}
.pl-members-table tr {
    border-bottom: 1px solid var(--hub-border);
}

@media (max-width: 640px) {
    .pl-members-table thead {
        display: none;
    }
    .pl-members-table tr {
        display: block;
        border: 1px solid var(--hub-border);
        border-radius: 8px;
        margin-bottom: 0.75rem;
        padding: 0.25rem 0.75rem;
    }
    .pl-members-table td[data-label] {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        text-align: right;
        padding: 0.4rem 0;
    }
    .pl-members-table td[data-label]::before {
        content: attr(data-label);
        color: var(--hub-text-muted);
        font-weight: 500;
        text-align: left;
    }
}


/* ========================================
   Mobile Sidebar Backdrop
   ======================================== */
.hub-sidebar-backdrop {
    display: none;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .hub-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    /* On mobile, sidebar is visible when NOT closed */
    .hub-sidebar:not(.hub-sidebar--closed) {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    }

    .hub-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 99;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .hub-sidebar-backdrop--visible {
        opacity: 1;
        pointer-events: auto;
    }

    .hub-main-wrapper { margin-left: 0; }

    .hub-content {
        padding: 1.5rem 1rem;
    }

    .hub-card {
        padding: 1.25rem;
    }
}

/* ========================================
   Member Directory
   ======================================== */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.directory-card {
    background-color: var(--hub-card-bg);
    border: 1px solid var(--hub-input-border);
    border-radius: 10px;
    padding: 1.25rem;
}

.directory-card__header {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.directory-card__avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(238, 180, 75, 0.15);
    color: var(--color-tuscan-yellow);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.03em;
}

.directory-card__identity {
    min-width: 0;
}

.directory-card__name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--hub-text);
    line-height: 1.3;
}

.directory-card__preferred {
    font-size: 0.85rem;
    color: var(--hub-text-muted);
    font-style: italic;
}

.directory-card__meta {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--hub-text-muted);
}

.directory-card__role {
    font-weight: 500;
}

.directory-card__about {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: var(--hub-text-muted);
    line-height: 1.5;
}

.directory-card__contact {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hub-input-border);
}

.directory-card__contact-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding: 0.2rem 0;
    color: var(--hub-text-muted);
}

.directory-card__contact-row a {
    color: var(--color-tuscan-yellow);
    text-decoration: none;
}

.directory-card__contact-row a:hover {
    text-decoration: underline;
}

.directory-card__contact-label {
    font-weight: 500;
    color: var(--hub-text);
    min-width: 4rem;
    flex-shrink: 0;
}

.directory-card__role-mgmt {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hub-input-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.directory-card__role-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.directory-card__role-select {
    flex: 1;
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
    font-family: var(--font-body);
    color: var(--hub-text);
    background-color: var(--hub-input-bg);
    border: 1px solid var(--hub-input-border);
    border-radius: 6px;
    cursor: pointer;
}

.directory-card__role-select:focus {
    outline: none;
    border-color: var(--color-tuscan-yellow);
}

.directory-card__role-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--color-navy);
    background-color: var(--color-tuscan-yellow);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.directory-card__role-btn:hover {
    background-color: var(--color-yellow-hover);
}

/* ========================================
   Changelog Modal
   ======================================== */
.changelog-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 1rem;
}

.changelog-modal {
    background-color: var(--hub-card-bg);
    border-radius: 12px;
    border: 1px solid var(--hub-input-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.changelog-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--hub-input-border);
}

.changelog-modal__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--hub-text);
    margin: 0;
}

.changelog-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--hub-text-muted);
    padding: 0;
    line-height: 1;
}

.changelog-modal__close:hover {
    color: var(--hub-text);
}

.changelog-modal__body {
    padding: 1.5rem;
    overflow-y: auto;
}

.changelog-entry + .changelog-entry {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--hub-input-border);
}

.changelog-entry__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.changelog-entry__version {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    background-color: rgba(238, 180, 75, 0.15);
    color: var(--color-tuscan-yellow);
}

.changelog-entry__date {
    font-size: 0.8rem;
    color: var(--hub-text-muted);
}

.changelog-entry__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--hub-text);
    margin: 0 0 0.5rem 0;
}

.changelog-entry__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-entry__list li {
    font-size: 0.9rem;
    color: var(--hub-text-muted);
    padding: 0.3rem 0;
    padding-left: 1rem;
    position: relative;
}

.changelog-entry__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--color-tuscan-yellow);
}

/* ========================================
   Tab Balance Pill (topbar)
   ======================================== */
.pl-topbar__tab-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--hub-text);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    text-decoration: none;
    margin-right: 0.5rem;
    transition: background 150ms ease;
}
.pl-topbar__tab-pill:hover {
    background: rgba(255,255,255,0.14);
    color: var(--hub-text);
}
.pl-topbar__tab-pill--locked {
    background: rgba(240, 100, 100, 0.2);
    border-color: rgba(240, 100, 100, 0.4);
    color: var(--color-error);
}
[data-theme="light"] .pl-topbar__tab-pill {
    background: rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.12);
    color: #333;
}
[data-theme="light"] .pl-topbar__tab-pill:hover {
    background: rgba(0,0,0,0.1);
    color: #333;
}

/* ========================================
   Tab Pages
   ======================================== */
.tab-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.tab-page-header .hub-page-title { margin-bottom: 0; }
.tab-page-header__title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.tab-page-header__title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tab-page-header__subtext {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--hub-text-muted, #96ACBB);
}

/* Hoverable help bubble — used next to section titles */
.pl-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}
.pl-help__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    background: var(--hub-input-border, #334155);
    color: var(--hub-text, #F4EFDD);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    user-select: none;
}
.pl-help__bubble {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    z-index: 50;
    width: max-content;
    max-width: 320px;
    padding: 0.75rem 0.875rem;
    background: var(--hub-card-bg, #0b1f33);
    color: var(--hub-text, #F4EFDD);
    border: 1px solid var(--hub-input-border, #334155);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    font-size: 0.8125rem;
    line-height: 1.45;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    pointer-events: none;
}
.pl-help:hover .pl-help__bubble,
.pl-help:focus-within .pl-help__bubble {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tab-history-link {
    font-size: 0.85rem;
    color: var(--color-tuscan-yellow);
    text-decoration: none;
}
.tab-history-link:hover { text-decoration: underline; }

/* Banners */
.tab-banner {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.tab-banner--error {
    background: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid rgba(240, 160, 160, 0.25);
}
.tab-banner--warning {
    background: rgba(238, 180, 75, 0.12);
    color: var(--color-tuscan-yellow);
    border: 1px solid rgba(238, 180, 75, 0.25);
}

/* Summary card */
.tab-summary { margin-bottom: 1rem; }
.tab-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}
.tab-summary__row + .tab-summary__row {
    border-top: 1px solid var(--hub-topbar-border);
}
.tab-summary__label {
    font-size: 0.9rem;
    color: var(--hub-text-muted);
}
.tab-summary__value {
    font-size: 0.9rem;
    font-weight: 600;
}
.tab-summary__value--balance {
    font-size: 1.1rem;
    color: var(--color-tuscan-yellow);
}

/* Pending checkout — direct-keys "Pay Now" list */
.tab-checkout-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.tab-checkout-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: rgba(238, 180, 75, 0.08);
    border: 1px solid rgba(238, 180, 75, 0.3);
    border-radius: 8px;
    gap: 1rem;
}
.tab-checkout-item__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--hub-text);
}
.tab-checkout-item__meta {
    font-size: 0.8rem;
    color: var(--hub-text-muted);
    margin-top: 0.125rem;
}
.tab-checkout-item__btn {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    background: var(--color-tuscan-yellow);
    color: #1a1a1a;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: filter 0.15s ease;
}
.tab-checkout-item__btn:hover {
    filter: brightness(1.1);
}

/* Guild detail — product card grid */
.guild-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.875rem;
}
.guild-product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: border-color 0.15s ease, background 0.15s ease;
    min-height: 90px;
}
.guild-product-card:hover {
    border-color: rgba(238, 180, 75, 0.4);
    background: rgba(238, 180, 75, 0.05);
}
.guild-product-card__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--hub-text);
    line-height: 1.3;
}
.guild-product-card__price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hub-link);
}
.guild-product-card__splits {
    font-size: 0.75rem;
    color: var(--hub-text-muted);
    line-height: 1.3;
    margin-top: -0.1rem;
}
.guild-product-card__add-form {
    margin-top: 0.5rem;
}
.guild-product-card__add-btn {
    width: 100%;
    padding: 0.4rem 0.6rem;
    background: var(--color-tuscan-yellow);
    color: #1a1a2e;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease;
}
.guild-product-card__add-btn:hover {
    background: var(--color-yellow-hover);
}

/* Enter-Your-Own-Price card — first card in the product grid */
.guild-product-card--eyop {
    align-items: center;
    text-align: center;
    border-style: dashed;
    border-color: rgba(238, 180, 75, 0.4);
}
.guild-product-card--eyop:hover {
    border-color: rgba(238, 180, 75, 0.8);
    background: rgba(238, 180, 75, 0.08);
}
.guild-product-card__subtext {
    font-size: 0.8125rem;
    color: var(--hub-text-muted);
    margin-top: -0.25rem;
}
.guild-product-card__eyop-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0.25rem auto 0.25rem;
    background: var(--color-tuscan-yellow);
    border: none;
    border-radius: 50%;
    color: #1a1a2e;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}
.guild-product-card__eyop-plus:hover {
    background: var(--color-yellow-hover);
    transform: scale(1.05);
}

/* Trash-can remove button on the My Tab table */
.tab-table__remove {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 1;
    color: #dc2626;
    transition: color 0.15s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tab-table__remove svg {
    stroke: #dc2626;
}
.tab-table__remove:hover {
    color: #ef4444;
    transform: scale(1.15);
}
.tab-table__remove:hover svg {
    stroke: #ef4444;
}

/* Shared table */
.tab-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.tab-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.tab-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--hub-topbar-border);
    font-weight: 500;
    color: var(--hub-text-muted);
}
.tab-table td {
    padding: 0.5rem 0.75rem;
}
.tab-table th.tab-table__right,
.tab-table td.tab-table__right { text-align: right; }
.tab-table__date {
    font-size: 0.8rem;
    color: var(--hub-text-muted);
}

/* Add to Tab form */
.tab-add-form__fields {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
}
.tab-add-form__field {
    flex: 1;
    min-width: 150px;
}
.tab-add-form__field--amount {
    flex: 0 0 120px;
    min-width: 100px;
}
.tab-add-form__field label {
    display: block;
    font-size: 0.8rem;
    color: var(--hub-text-muted);
    margin-bottom: 0.25rem;
}
.tab-add-form__field input {
    width: 100%;
    padding: 0.5rem 0.6rem;
    background: var(--hub-input-bg);
    border: 1px solid var(--hub-input-border);
    border-radius: 6px;
    color: var(--hub-text);
    font-size: 0.85rem;
}
.tab-add-form__btn {
    padding: 0.5rem 1rem;
    background: var(--color-tuscan-yellow);
    color: #1a1a2e;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}
.tab-add-form__btn:hover {
    background: var(--color-yellow-hover);
}
.tab-form-error {
    display: block;
    font-size: 0.75rem;
    color: var(--color-error);
    margin-top: 0.25rem;
}

/* Tab History — charge cards */
.tab-charge {
    border-bottom: 1px solid var(--hub-topbar-border);
}
.tab-charge:last-child { border-bottom: none; }
.tab-charge__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}
.tab-charge__info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.tab-charge__date {
    font-size: 0.9rem;
    font-weight: 500;
}
.tab-charge__status {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}
.tab-charge__status--succeeded {
    background: var(--color-success-bg);
    color: var(--color-success);
}
.tab-charge__status--failed {
    background: var(--color-error-bg);
    color: var(--color-error);
}
.tab-charge__status--processing {
    background: rgba(238, 180, 75, 0.12);
    color: var(--color-tuscan-yellow);
}
.tab-charge__count {
    font-size: 0.8rem;
    color: var(--hub-text-muted);
}
.tab-charge__amount {
    font-weight: 600;
    font-size: 0.95rem;
}
.tab-charge__details {
    padding: 0 0 0.75rem;
}
.tab-charge__receipt-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-tuscan-yellow);
    text-decoration: none;
}
.tab-charge__receipt-link:hover { text-decoration: underline; }
.tab-entry-guild {
    font-size: 0.75rem;
    color: var(--hub-text-muted);
    opacity: 0.8;
}
.tab-charge__destination {
    font-size: 0.8rem;
    color: var(--hub-text-muted);
}

/* ========================================
   Guild page — Edit / Add Product modals
   ======================================== */

/* Header row — title + action buttons on the guild detail page. */
.pl-guild-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.pl-guild-header .hub-page-title {
    margin: 0;
}
.pl-guild-header__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Edit Guild + Add Product form shells used inside the modal. */
.pl-guild-edit-form,
.pl-product-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.pl-guild-edit-form__actions,
.pl-product-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* Inputs inside these modal forms. Mirrors the .pl-form-group styling from
   components.css but scoped so we can use standalone <input>/<textarea>
   without the wrapper class. */
.pl-guild-edit-form input[type="text"],
.pl-guild-edit-form textarea,
.pl-product-form input[type="text"],
.pl-product-form input[type="number"],
.pl-product-form select {
    background: var(--hub-input-bg, rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: var(--hub-text, #F4EFDD);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}
.pl-guild-edit-form input[type="text"]:focus,
.pl-guild-edit-form textarea:focus,
.pl-product-form input[type="text"]:focus,
.pl-product-form input[type="number"]:focus,
.pl-product-form select:focus {
    border-color: var(--color-tuscan-yellow, #EEB44B);
    outline: none;
    box-shadow: 0 0 0 3px rgba(238, 180, 75, 0.15);
}

/* Two-column row for Name + Price. */
.pl-product-form__row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.pl-product-form__row .pl-form-group {
    flex: 1 1 180px;
    min-width: 0;
}

/* Revenue-splits fieldset inside the Add Product modal. */
.pl-product-form__splits {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem 1.25rem 1.25rem;
    margin: 0;
}
.pl-product-form__splits > legend {
    padding: 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hub-text-muted, #96ACBB);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pl-splits {
    width: 100%;
    border-collapse: collapse;
    margin: 0.25rem 0 0.75rem;
}
.pl-splits thead th {
    text-align: left;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--hub-text-muted, #96ACBB);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pl-splits tbody td {
    padding: 0.375rem 0.5rem;
    vertical-align: middle;
    color: var(--hub-text, #F4EFDD);
    font-size: 0.875rem;
}
.pl-splits__percent {
    white-space: nowrap;
    width: 30%;
}
.pl-splits__percent input[type="number"] {
    display: inline-block;
    width: 6rem !important;
    margin-right: 0.35rem;
}
.pl-splits__actions {
    text-align: right;
    width: auto;
}
.pl-splits__remove {
    background: rgba(224, 85, 85, 0.1);
    color: #e05555;
    border: none;
    border-radius: 4px;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}
.pl-splits__remove:hover {
    background: rgba(224, 85, 85, 0.25);
}
.pl-splits__add {
    margin-top: 0.25rem;
}
.pl-splits__preview {
    margin: 0.5rem 0 0.25rem;
    font-size: 0.8125rem;
    font-style: italic;
    color: var(--hub-text-muted, #96ACBB);
}
.pl-splits__total {
    margin: 0.75rem 0 0;
    font-size: 0.9375rem;
    font-weight: 700;
}
.pl-splits__total--ok {
    color: #7bc88f;
}
.pl-splits__total--bad {
    color: #f0a0a0;
}

/* Small delete button on each existing product card. */
.guild-product-card {
    position: relative;
}
.guild-product-card__delete-btn {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    background: rgba(224, 85, 85, 0.15);
    color: #e05555;
    border: none;
    border-radius: 4px;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s ease;
    padding: 0;
}
.guild-product-card__delete-btn:hover {
    background: rgba(224, 85, 85, 0.3);
}
.guild-product-card__edit-btn {
    position: absolute;
    top: 0.35rem;
    right: 2rem;
    background: rgba(238, 180, 75, 0.15);
    color: var(--color-tuscan-yellow, #eeb44b);
    border: none;
    border-radius: 4px;
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s ease;
}
.guild-product-card__edit-btn:hover {
    background: rgba(238, 180, 75, 0.3);
}

/* Viewing-as popover */
.pl-view-as-popover {
    position: relative;
}

.pl-view-as-popover__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--hub-dropdown-bg);
    border: 1px solid var(--hub-dropdown-border);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    z-index: 50;
}

.pl-view-as-popover__header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.6;
    padding: 4px 8px 8px;
}

.pl-view-as-popover__row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border: none;
    background: none;
    color: inherit;
    text-align: left;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

.pl-view-as-popover__row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.pl-view-as-popover__row--selected {
    background: rgba(255, 255, 255, 0.04);
    font-weight: 600;
}

.pl-view-as-popover__check {
    opacity: 0.7;
    font-size: 12px;
}

.pl-view-as-popover__hint {
    font-size: 11px;
    opacity: 0.55;
    padding: 8px;
    border-top: 1px solid var(--hub-dropdown-border);
    margin-top: 4px;
}

.hub-sidebar__icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.75rem 0.625rem;
}

.hub-sidebar__icon-link {
    display: inline-flex;
    align-items: center;
    color: rgba(244, 239, 221, 0.4);
    text-decoration: none;
    transition: color 0.15s ease;
    line-height: 0;
}

.hub-sidebar__icon-link:hover {
    color: var(--color-tuscan-yellow);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   Public Top Bar (anonymous visitors)
   Used on Classes & Workshops, register, etc. when no user is logged in.
   ======================================== */
.pl-public-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-height);
    background-color: rgba(6, 31, 51, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(238, 180, 75, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    gap: 1rem;
}
.pl-public-topbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-cream, #f4efdd);
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    font-size: 16px;
    text-decoration: none;
}
.pl-public-topbar__brand:hover { text-decoration: none; opacity: 0.9; }
.pl-public-topbar__nav {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}
.pl-public-topbar__link {
    color: var(--color-steel, #96acbb);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pl-public-topbar__link:hover { color: var(--color-tuscan-yellow, #EEB44B); text-decoration: none; }
.pl-public-topbar__signup {
    background: var(--color-tuscan-yellow, #EEB44B);
    color: #061f33;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
}
.pl-public-topbar__signup:hover { background: #f5ca6e; text-decoration: none; }
.pl-public-topbar__login {
    color: var(--color-tuscan-yellow, #EEB44B);
    padding: 8px 14px;
    border-radius: 4px;
    border: 1px solid rgba(238, 180, 75, 0.45);
    background: rgba(238, 180, 75, 0.06);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
}
.pl-public-topbar__login:hover {
    background: rgba(238, 180, 75, 0.18);
    text-decoration: none;
}
.pl-public-topbar__exit-preview {
    background: rgba(238, 180, 75, 0.12);
    color: var(--color-tuscan-yellow, #EEB44B);
    border: 1px solid rgba(238, 180, 75, 0.4);
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    white-space: nowrap;
}
.pl-public-topbar__exit-preview:hover {
    background: rgba(238, 180, 75, 0.22);
    text-decoration: none;
}

.pl-public-topbar__ext {
    color: var(--color-tuscan-yellow, #EEB44B);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pl-public-topbar__ext:hover { background: rgba(238, 180, 75, 0.08); text-decoration: none; }

.pl-public-topbar__pill {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(238, 180, 75, 0.12);
    border: 1px solid rgba(238, 180, 75, 0.4);
    color: var(--color-tuscan-yellow, #EEB44B);
}

.pl-public-topbar__logout {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 7px 14px;
    border-radius: 4px;
    border: 1px solid rgba(26, 69, 104, 0.6);
    background: rgba(255, 255, 255, 0.02);
    color: var(--color-steel, #96acbb);
    text-decoration: none;
}
.pl-public-topbar__logout:hover {
    border-color: rgba(238, 180, 75, 0.35);
    color: var(--color-cream, #f4efdd);
    text-decoration: none;
}

/* When no sidebar (anonymous), the wrapper occupies the full viewport. */
.hub-main-wrapper--public { margin-left: 0; }

/* ──────────────────────────────────────────────────────────────
   Profile Settings — visibility-aware redesign
   ────────────────────────────────────────────────────────────── */

.pl-profile-edit { display: flex; flex-direction: column; gap: 1.25rem; }

/* Master "Listed/Hidden" panel */
.pl-profile-master {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1.5rem;
    row-gap: 0.625rem;
    background: var(--hub-card-bg);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}
[data-theme="light"] .pl-profile-master { border-color: rgba(0,0,0,0.08); }
.pl-profile-master__copy { min-width: 0; }
.pl-profile-master__title { margin: 0 0 0.125rem; font-size: 1rem; font-weight: 700; color: var(--hub-text); }
.pl-profile-master__sub { margin: 0; font-size: 0.8125rem; color: var(--hub-text-muted); line-height: 1.45; }

.pl-profile-master__seg {
    display: inline-flex;
    align-items: stretch;
    justify-self: end;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}
[data-theme="light"] .pl-profile-master__seg {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
}
.pl-profile-master__seg-input {
    position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0;
}
.pl-profile-master__seg-btn {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.4375rem 0.875rem;
    border: 0;
    background: transparent;
    color: var(--hub-text-muted);
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    line-height: 1;
}
.pl-profile-master__seg-btn:hover:not(.pl-profile-master__seg-btn--active):not(:disabled) {
    color: var(--hub-text);
}
.pl-profile-master__seg-btn--active {
    background: var(--color-tuscan-yellow, #EEB44B);
    color: #1a1a2e;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.pl-profile-master__seg--locked .pl-profile-master__seg-btn { cursor: not-allowed; }
.pl-profile-master__seg--locked .pl-profile-master__seg-btn:not(.pl-profile-master__seg-btn--active) {
    opacity: 0.4;
}
.pl-profile-master__locked-note {
    grid-column: 1 / -1;
    margin: 0; font-size: 0.75rem; color: var(--hub-text-muted); line-height: 1.45;
}

@media (max-width: 560px) {
    .pl-profile-master { grid-template-columns: 1fr; }
    .pl-profile-master__seg { justify-self: start; }
}

/* Two-column grid */
.pl-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.5rem;
    align-items: start;
}
.pl-profile-edit__col { display: flex; flex-direction: column; gap: 1rem; }

@media (max-width: 900px) {
    .pl-profile-grid { grid-template-columns: 1fr; }
    .pl-profile-preview { order: -1; }
    .pl-profile-preview__sticky { position: static !important; }
}

/* Each row */
.pl-profile-row {
    background: var(--hub-card-bg);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    display: flex; flex-direction: column; gap: 0.4375rem;
}
[data-theme="light"] .pl-profile-row { border-color: rgba(0,0,0,0.08); }
.pl-profile-row__head {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.pl-profile-row__label {
    font-size: 0.8125rem; font-weight: 600; color: var(--hub-text);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.pl-profile-row input[type="text"],
.pl-profile-row input[type="email"],
.pl-profile-row input[type="tel"],
.pl-profile-row input[type="url"],
.pl-profile-row select,
.pl-profile-row textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--hub-text);
    background-color: var(--hub-input-bg);
    border: 1px solid var(--hub-input-border);
    border-radius: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pl-profile-row textarea { resize: vertical; min-height: 96px; }

.pl-profile-row input:focus,
.pl-profile-row select:focus,
.pl-profile-row textarea:focus {
    outline: none;
    border-color: var(--color-tuscan-yellow);
    box-shadow: 0 0 0 3px rgba(238, 180, 75, 0.15);
}

.pl-profile-row input:disabled { opacity: 0.5; cursor: not-allowed; }

/* Visibility toggle pill */
.pl-vis-toggle {
    display: inline-flex; align-items: center; gap: 0.3125rem;
    padding: 3px 9px 3px 8px;
    border-radius: 999px;
    border: 1px solid currentColor;
    background: transparent;
    font-size: 0.6875rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.pl-vis-toggle--on { color: #4ade80; background: rgba(74, 222, 128, 0.10); }
.pl-vis-toggle--on:hover { background: rgba(74, 222, 128, 0.18); }
.pl-vis-toggle--off { color: var(--hub-text-muted); background: transparent; }
.pl-vis-toggle--off:hover { background: rgba(255,255,255,0.05); }
.pl-vis-toggle--disabled { opacity: 0.4; cursor: not-allowed; }
[data-theme="light"] .pl-vis-toggle--on { color: #16a34a; background: rgba(22, 163, 74, 0.10); }

/* iOS-style toggle switch — applied to a checkbox <input class="hub-switch-input">.
   Reusable: any boolean form field can render as a switch by adding this class. */
.hub-switch-input {
    appearance: none; -webkit-appearance: none;
    flex: none; position: relative;
    width: 2.5rem; height: 1.375rem;
    border-radius: 999px;
    background: var(--hub-border);
    cursor: pointer;
    transition: background 0.15s ease;
    margin: 0;
}
.hub-switch-input::before {
    content: ""; position: absolute; top: 2px; left: 2px;
    width: 1.125rem; height: 1.125rem;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s ease;
}
.hub-switch-input:checked { background: var(--hub-accent, #c46a1b); }
.hub-switch-input:checked::before { transform: translateX(1.125rem); }
.hub-switch-input:focus-visible { outline: 2px solid var(--hub-accent, #c46a1b); outline-offset: 2px; }
.hub-switch-input:disabled { opacity: 0.4; cursor: not-allowed; }

/* Always-shown badge */
.pl-vis-static {
    display: inline-flex; align-items: center; gap: 0.3125rem;
    padding: 3px 9px;
    font-size: 0.625rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--hub-text-muted);
}

/* Reassurance panel */
.pl-profile-never {
    margin-top: 0.5rem;
    padding: 0.875rem 1rem;
    background: rgba(255,255,255,0.025);
    border: 1px dashed rgba(255,255,255,0.14);
    border-radius: 10px;
}
[data-theme="light"] .pl-profile-never { background: rgba(0,0,0,0.025); border-color: rgba(0,0,0,0.14); }
.pl-profile-never__title {
    display: flex; align-items: center; gap: 0.4375rem;
    margin: 0 0 0.5rem;
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--hub-text-muted);
}
.pl-profile-never__list {
    margin: 0; padding-left: 1.25rem;
    font-size: 0.8125rem; color: var(--hub-text-muted);
    line-height: 1.7;
}

/* Live preview */
.pl-profile-preview__sticky { position: sticky; top: 1rem; }
.pl-profile-preview__heading {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--hub-text-muted);
}
.pl-profile-preview__card {
    background: var(--hub-card-bg);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: opacity 0.18s;
}
[data-theme="light"] .pl-profile-preview__card { border-color: rgba(0,0,0,0.1); }
.pl-profile-preview__card--hidden {
    border-style: dashed;
    background: transparent;
}
.pl-profile-preview__hidden {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    color: var(--hub-text-muted);
    padding: 1.5rem 0.5rem;
}
.pl-profile-preview__hidden p { margin: 0; font-size: 0.875rem; }
.pl-profile-preview__hidden-sub { font-size: 0.75rem !important; opacity: 0.7; }
.pl-profile-preview__avatar-wrap {
    display: flex; justify-content: center; margin-bottom: 0.75rem;
}
.pl-profile-preview__avatar {
    width: 84px; height: 84px;
    background: rgba(255,255,255,0.08);
    color: var(--hub-text);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.875rem; font-weight: 700;
}
.pl-profile-preview__avatar--photo { object-fit: cover; background: none; }
.pl-profile-preview__name { font-size: 1rem; font-weight: 700; color: var(--hub-text); }
.pl-profile-preview__meta {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0.375rem;
    margin: 0.5rem 0;
}
.pl-profile-preview__pill {
    display: inline-block;
    padding: 2px 9px;
    background: var(--color-tuscan-yellow, #EEB44B);
    color: #1a1a2e;
    font-size: 0.6875rem; font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.pl-profile-preview__pill--soft {
    background: rgba(255,255,255,0.08);
    color: var(--hub-text-muted);
}
[data-theme="light"] .pl-profile-preview__pill--soft { background: rgba(0,0,0,0.06); }
.pl-profile-preview__about {
    margin: 0.625rem 0;
    font-size: 0.8125rem; color: var(--hub-text-muted); line-height: 1.5;
    text-align: left;
}
.pl-profile-preview__contact {
    margin-top: 0.75rem;
    display: flex; flex-direction: column; gap: 0.3125rem;
    text-align: left;
}
.pl-profile-preview__contact-row {
    display: flex; gap: 0.5rem; font-size: 0.8125rem;
}
.pl-profile-preview__contact-row > span:first-child {
    flex-shrink: 0; min-width: 56px;
    color: var(--hub-text-muted);
    font-size: 0.6875rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    line-height: 1.45;
}
.pl-profile-preview__contact-row > span:last-child {
    color: var(--hub-text); word-break: break-word;
}
.pl-profile-preview__caption {
    margin: 0.5rem 0 0;
    font-size: 0.6875rem; color: var(--hub-text-muted); text-align: center;
}

.pl-profile-actionbar {
    margin-top: 0.5rem;
    display: flex; justify-content: flex-end; gap: 0.5rem;
}

/* ──────────────────────────────────────────────────────────────
   Floating Feedback button (mobile)
   ────────────────────────────────────────────────────────────── */
.hub-feedback-fab {
    display: none;
    position: fixed;
    right: calc(env(safe-area-inset-right, 0px) + 1rem);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-tuscan-yellow, #EEB44B);
    color: #1a1a2e;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32), 0 2px 4px rgba(0, 0, 0, 0.18);
    z-index: 95;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.hub-feedback-fab:hover,
.hub-feedback-fab:focus-visible {
    background: #f5ca6e;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35), 0 3px 6px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.hub-feedback-fab.active {
    background: #1a1a2e;
    color: var(--color-tuscan-yellow, #EEB44B);
}

@media (max-width: 768px) {
    .hub-feedback-fab { display: inline-flex; }
    /* Hide the in-sidebar feedback link on mobile — the FAB replaces it. */
    .hub-sidebar__link--feedback { display: none; }
}

/* ========================================
   Admin table toolkit
   ======================================== */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.admin-filters {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.75rem;
}

.admin-table-wrap {
    border: 1px solid var(--hub-border);
    border-radius: 8px;
    overflow: hidden;
}

.admin-table-wrap table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table-wrap thead {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .admin-table-wrap thead,
html:not(.dark) .admin-table-wrap thead {
    background: rgba(0, 0, 0, 0.03);
}

.admin-table-wrap thead th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hub-text-muted);
    border-bottom: 1px solid var(--hub-border);
}

.admin-table-wrap thead th a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.admin-table-wrap thead th a:hover {
    color: var(--hub-text);
    text-decoration: none;
}

.admin-table-wrap tbody td {
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
}

.admin-table-wrap tbody tr {
    border-bottom: 1px solid var(--hub-border);
}

/* Zebra striping for readability — subtle, theme-aware. */
.admin-table-wrap tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.025);
}

[data-theme="light"] .admin-table-wrap tbody tr:nth-child(even),
html:not(.dark) .admin-table-wrap tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.025);
}

.admin-table-wrap tbody tr:last-child {
    border-bottom: none;
}

/* Hover wins over stripes — defined last so equal-specificity source order favors it. */
.admin-table-wrap tbody tr:hover {
    background: rgba(238, 180, 75, 0.07);
}

.admin-table-wrap .admin-actions {
    display: flex;
    gap: 0.375rem;
    justify-content: flex-end;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* Guild-tagging per-row category picker — theme-aware input tokens so the
   select and its native option popup stay legible on both themes (FRONTEND
   Rule 13). */
.pl-guild-tag-select {
    width: 100%;
    max-width: 22rem;
    padding: 0.4rem 0.6rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--hub-text);
    background-color: var(--hub-input-bg);
    border: 1px solid var(--hub-input-border);
    border-radius: 6px;
}

.pl-guild-tag-select:focus {
    outline: none;
    border-color: var(--color-tuscan-yellow);
    box-shadow: 0 0 0 3px rgba(238, 180, 75, 0.15);
}

.pl-guild-tag-select option {
    background: var(--hub-input-bg);
    color: var(--hub-text);
}

.admin-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--hub-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: var(--hub-card-bg);
    font-size: 0.8rem;
    color: var(--hub-text-muted);
}

.admin-table-footer nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Classes-admin Overview: section titles — accent bar + stronger weight so
   headings read as section headers, not body text. */
.cms-overview .overview-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.9rem;
    padding-left: 0.6rem;
    border-left: 3px solid var(--color-tuscan-yellow, #EEB44B);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--hub-text);
}

.cms-overview .overview-title__count {
    color: var(--hub-text-muted);
    font-weight: 600;
    font-size: 0.9em;
}

/* Subordinate heading for a block nested inside an Overview card (e.g. Recent
   sign-ups within "At a glance"). Lighter than .overview-title to signal nesting. */
.cms-overview .overview-subtitle {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--hub-text);
}

/* Topbar notification bell — a plain link to the Notifications page (no dropdown). */
.pl-bell__btn { position: relative; background: none; border: none; color: var(--hub-text); cursor: pointer; padding: 0.4rem; border-radius: 6px; text-decoration: none; }
.pl-bell__btn:hover { background: rgba(255,255,255,0.06); }
[data-theme="light"] .pl-bell__btn:hover { background: rgba(0,0,0,0.06); }
.pl-bell__badge { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #ef4444; color: #fff; font-size: 0.625rem; line-height: 16px; text-align: center; font-weight: 700; }

/* Notifications page (hub/notifications.html) — responsive header + pager. */
.pl-notes__header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pl-notes__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.pl-notes__pager { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; align-items: center; margin-top: 1.5rem; }

/* Notification rows. */
.pl-note { border-bottom: 1px solid var(--hub-border); }
.pl-note__btn { display: flex; flex-direction: column; gap: 0.15rem; width: 100%; min-width: 0; text-align: left; background: none; border: none; padding: 0.75rem 1rem; cursor: pointer; color: var(--hub-text); }
.pl-note__btn:hover { background: rgba(255,255,255,0.04); }
[data-theme="light"] .pl-note__btn:hover { background: rgba(0,0,0,0.04); }
.pl-note--unread .pl-note__btn { background: rgba(238,180,75,0.08); }
[data-theme="light"] .pl-note--unread .pl-note__btn { background: rgba(238,180,75,0.16); }
.pl-note__title { font-weight: 600; font-size: 0.875rem; overflow-wrap: anywhere; }
.pl-note__body { font-size: 0.8125rem; color: var(--hub-text-muted); overflow-wrap: anywhere; }
.pl-note__time { font-size: 0.6875rem; color: var(--hub-text-muted); }

/* ── Guild detail page redesign (pl-guild-*) ──────────────────────────── */
.pl-guild-hero { position: relative; min-height: clamp(220px, 32vw, 380px); border-radius: 8px; overflow: hidden; margin-bottom: 1.5rem; display: flex; align-items: flex-end; }
.pl-guild-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pl-guild-hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,46,76,0) 0%, rgba(9,46,76,0.85) 100%); }
.pl-guild-hero--noimg { background: linear-gradient(120deg, var(--hub-hero-from) 0%, var(--hub-hero-mid) 46%, var(--hub-hero-to) 100%); }
.pl-guild-hero__content { position: relative; z-index: 1; padding: 1.5rem; color: #F4EFDD; }
.pl-guild-hero__title { font-family: Lato, sans-serif; font-weight: 900; font-size: clamp(1.75rem, 4vw, 2.75rem); margin: 0; color: #F4EFDD; }
[data-theme="light"] .pl-guild-hero--noimg .pl-guild-hero__title { color: var(--hub-text); }
[data-theme="light"] .pl-guild-hero--noimg .pl-guild-hero__lead { color: var(--hub-text-muted); opacity: 1; }
.pl-guild-hero__lead { font-size: 0.9375rem; opacity: 0.9; margin-top: 0.25rem; }
/* Hero placement adjuster toolbar (x-show target — display lives in the class, never inline, per FRONTEND.md Rule 12). */
.pl-hero-adjust { display: flex; align-items: center; gap: 1rem; }
.pl-guild-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.pl-guild-grid aside { display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 1024px) { .pl-guild-grid { grid-template-columns: 1fr 340px; } }
.pl-guild-section { padding: 1.25rem 0; border-top: 1px solid var(--hub-border); }
.pl-guild-section:first-child { border-top: none; padding-top: 0; }
.pl-guild-section__h2 { font-family: Lato, sans-serif; font-weight: 700; font-size: 1.375rem; margin: 0 0 0.75rem; }
.pl-guild-video { position: relative; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; background: #000; }
.pl-guild-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pl-guild-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.5rem; }
.pl-guild-gallery__item { aspect-ratio: 1; border-radius: 6px; overflow: hidden; cursor: pointer; border: none; padding: 0; background: none; }
.pl-guild-gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.pl-guild-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.9); display: flex; align-items: center; justify-content: center; z-index: 100; }
.pl-guild-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 6px; }

/* Space & Org Info — annotated floor plan / map. Reuses .pl-guild-lightbox for zoom. */
.pl-org-map { margin: 0; }
.pl-org-map__btn { display: block; width: 100%; padding: 0; border: 1px solid var(--hub-border); border-radius: 8px; overflow: hidden; background: var(--hub-surface); cursor: zoom-in; position: relative; }
.pl-org-map__btn img { display: block; width: 100%; height: auto; }
.pl-org-map__zoom { position: absolute; bottom: 0.75rem; right: 0.75rem; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.6rem; border-radius: 6px; background: rgba(0,0,0,0.6); color: #F4EFDD; font-size: 0.75rem; }
.pl-org-map__caption { margin: 0.6rem 0 0; color: var(--hub-text-muted); font-size: 0.85rem; }
.pl-org-map--empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0; padding: 2rem 1.25rem; border: 1px dashed var(--hub-border); border-radius: 8px; background: var(--hub-surface); color: var(--hub-text-muted); }

.pl-guild-faq__q { font-weight: 600; cursor: pointer; padding: 0.75rem 0; border-top: 1px solid var(--hub-border); }
.pl-guild-faq__a { padding-bottom: 0.75rem; color: var(--hub-text-muted); }
.pl-guild-roster { display: flex; flex-direction: column; gap: 0.5rem; }
.pl-guild-links a { display: block; padding: 0.5rem 0; color: var(--color-tuscan-yellow); }

/* Rendered-Markdown body (guild meeting notes). Theme-tokened — no --surface (not a token). */
.pl-md { color: var(--hub-text); line-height: 1.55; }
.pl-md p { margin: 0 0 0.75rem; }
.pl-md p:last-child { margin-bottom: 0; }
.pl-md h1, .pl-md h2, .pl-md h3, .pl-md h4 { margin: 1rem 0 0.5rem; font-weight: 700; }
.pl-md ul, .pl-md ol { margin: 0 0 0.75rem; padding-left: 1.5rem; }
.pl-md li { margin-bottom: 0.25rem; }
.pl-md a { color: var(--color-tuscan-yellow); text-decoration: underline; }
.pl-md hr { border: 0; border-top: 1px solid var(--hub-border); margin: 1rem 0; }
.pl-md code { background: var(--hub-surface); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.9em; }
.pl-md pre { background: var(--hub-surface); padding: 0.75rem; border-radius: 6px; overflow-x: auto; }
.pl-md pre code { background: none; padding: 0; }
.pl-md blockquote { margin: 0 0 0.75rem; padding: 0.25rem 0 0.25rem 1rem; border-left: 3px solid var(--hub-border-strong); background: var(--hub-surface); color: var(--hub-text-muted); }

/* Orientation slot booking table. Layout lives in classes (not inline) so Alpine's
   x-show — which strips inline `display` when it reveals a row — can't break the columns. */
.pl-orient-slots__head,
.pl-orient-slots__row { display: flex; align-items: center; gap: 1rem; }
.pl-orient-slots__head {
    padding: 0 0 0.4rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hub-text-muted);
}
.pl-orient-slots__row { padding: 0.55rem 0; border-top: 1px solid var(--hub-border); }
.pl-orient-slots__date { flex: 0 0 6rem; font-weight: 500; }
.pl-orient-slots__time { flex: 1; color: var(--hub-text-muted); font-size: 0.9rem; }
.pl-orient-slots__action { flex: 0 0 7rem; text-align: right; }
.pl-orient-slots__action .hub-btn { width: 100%; }
.pl-orient-slots__pager { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.75rem; }

/* ============================================================
   Skills directory — filter bar, chips, commission badge, editor
   ============================================================ */

/* Member directory filters */
.pl-directory-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.pl-filter-field { display: flex; flex-direction: column; gap: 0.25rem; }
.pl-filter-label { font-size: 0.75rem; color: var(--hub-text-muted); }
.pl-filter-control {
    background: var(--hub-input-bg);
    color: var(--hub-text);
    border: 1px solid var(--hub-input-border);
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
}
.pl-filter-control option { background: var(--hub-elevated); color: var(--hub-text); }
.pl-filter-checkbox { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.875rem; color: var(--hub-text); }

/* Skill chips */
.pl-skill-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.pl-skill-chip {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: var(--hub-surface); color: var(--hub-text);
    border: 1px solid var(--hub-input-border);
    border-radius: 12px; padding: 2px 10px; font-size: 0.8125rem;
}
.pl-skill-chip__years { color: var(--hub-text-muted); font-size: 0.75rem; }
.pl-skill-chip__pending {
    color: var(--hub-text-muted); font-size: 0.7rem; font-style: italic;
    border: 1px solid var(--hub-input-border); border-radius: 8px; padding: 0 6px;
}

/* Open for commissions */
.pl-commission { margin-top: 0.75rem; }
.pl-commission__badge {
    display: inline-flex; align-items: center;
    background: rgba(238, 180, 75, 0.14); color: var(--color-tuscan-yellow);
    border: 1px solid rgba(238, 180, 75, 0.35);
    border-radius: 12px; padding: 2px 10px; font-size: 0.8125rem; font-weight: 700;
}
.pl-commission__note { margin: 0.4rem 0 0; font-size: 0.85rem; color: var(--hub-text-muted); }

/* Skill editor (profile settings) */
.pl-skill-editor { display: flex; flex-direction: column; gap: 0.85rem; }
.pl-skill-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.pl-skill-suggest { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.pl-skill-chip__remove { margin-left: 0.15rem; }

/* Profile settings — skills & commissions sections */
.pl-profile-section { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--hub-border); }
.pl-profile-section__title { font-size: 1rem; font-weight: 700; margin: 0 0 0.5rem; }
.pl-commission-note { display: block; margin-top: 0.5rem; }

/* Profile settings — "Edit your profile" heading + Member/Instructor sub-tabs */
.pl-profile-heading { font-size: 1.25rem; font-weight: 700; margin: 0 0 1rem; color: var(--hub-text); }
.pl-subtabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }

/* ========================================
   Member Home / Dashboard
   ======================================== */

/* Shared section heading + card spacing for the home blocks. */
.pl-home-heading {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 1rem;
}
.pl-home-block { margin-bottom: 1.5rem; }

/* Empty-state line inside a home block. */
.pl-home-empty {
    color: var(--hub-text-muted);
    font-size: 0.9375rem;
    margin: 0;
}
.pl-home-empty a { color: var(--hub-link); font-weight: 500; }
.pl-home-empty a:hover { color: var(--hub-link-hover); }

/* --- Finish-your-profile nudge --- */
.pl-nudge {
    position: relative;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--color-tuscan-yellow);
}
.pl-nudge__lead { margin: 0 0 0.75rem; max-width: 60ch; }
.pl-nudge__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--hub-text-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.pl-nudge__close:hover { background: var(--hub-surface); color: var(--hub-text); }
.pl-nudge__progress {
    height: 6px;
    border-radius: 999px;
    background: var(--hub-surface);
    overflow: hidden;
    margin-bottom: 0.75rem;
    max-width: 320px;
}
.pl-nudge__bar { height: 100%; background: var(--color-tuscan-yellow); border-radius: 999px; }
.pl-nudge__list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0;
}
.pl-nudge__list li {
    font-size: 0.8125rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--hub-surface);
    color: var(--hub-text-muted);
}
.pl-nudge__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* --- Get started onboarding checklist --- */
.pl-onboarding {
    position: relative;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--color-tuscan-yellow);
}
.pl-onboarding__title { margin-bottom: 0.35rem; padding-right: 2.25rem; }
.pl-onboarding__lead { margin: 0 0 1rem; max-width: 60ch; }
.pl-onboarding__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--hub-text-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.pl-onboarding__close:hover { background: var(--hub-surface); color: var(--hub-text); }
.pl-onboarding__steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.pl-onboarding-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--hub-card-border);
    border-radius: 10px;
    color: var(--hub-text);
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.pl-onboarding-step:hover { border-color: var(--color-tuscan-yellow); background: var(--hub-surface); }
.pl-onboarding-step__status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--hub-text-muted);
}
.pl-onboarding-step--done .pl-onboarding-step__status { color: var(--color-tuscan-yellow); }
.pl-onboarding-step__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.pl-onboarding-step__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-weight: 500;
}
.pl-onboarding-step__note { font-size: 0.8125rem; }
.pl-onboarding-step__tag {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: var(--hub-surface);
    color: var(--hub-text-muted);
}
.pl-onboarding-step__go { flex: 0 0 auto; display: inline-flex; color: var(--hub-text-muted); }
.pl-onboarding__progress { margin: 0; font-size: 0.875rem; }

/* --- Quick links --- */
.pl-quicklinks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.pl-quicklink {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--hub-card-border);
    border-radius: 10px;
    background: var(--hub-card-bg);
    color: var(--hub-text);
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.1s ease, background-color 0.15s ease;
}
.pl-quicklink:hover {
    border-color: var(--color-tuscan-yellow);
    background: var(--hub-surface);
    transform: translateY(-1px);
}
.pl-quicklink__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(238, 180, 75, 0.15);
    color: var(--color-tuscan-yellow);
}
.pl-quicklink__label { font-size: 0.9375rem; font-weight: 500; }

/* --- Your upcoming --- */
.pl-upcoming { list-style: none; margin: 0; padding: 0; }
.pl-upcoming__item + .pl-upcoming__item { border-top: 1px solid var(--hub-border); }
.pl-upcoming__link {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.75rem 0;
    text-decoration: none;
    color: var(--hub-text);
}
.pl-upcoming__link:hover .pl-upcoming__title { color: var(--hub-link); }
.pl-upcoming__when {
    flex-shrink: 0;
    width: 6.5rem;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.pl-upcoming__date { font-size: 0.875rem; font-weight: 700; }
.pl-upcoming__time { font-size: 0.8125rem; color: var(--hub-text-muted); }
.pl-upcoming__body { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.pl-upcoming__title { font-size: 0.9375rem; font-weight: 500; }
.pl-upcoming__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
}
.pl-upcoming__kind {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    background: var(--hub-blue-soft);
    color: var(--hub-blue);
}

/* --- Latest announcements --- */
.pl-ann-list { list-style: none; margin: 0; padding: 0; }
.pl-ann { padding: 0.85rem 0; }
.pl-ann + .pl-ann { border-top: 1px solid var(--hub-border); }
.pl-ann__title { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.2rem; }
.pl-ann__meta { font-size: 0.8125rem; margin-bottom: 0.4rem; }
.pl-ann__meta a { color: var(--hub-link); font-weight: 500; }
.pl-ann__meta a:hover { color: var(--hub-link-hover); }
.pl-ann__body { font-size: 0.875rem; color: var(--hub-text-muted); margin: 0; }

/* --- Your guilds (chips) --- */
.pl-guild-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pl-guild-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--hub-card-border);
    border-radius: 999px;
    background: var(--hub-surface);
    color: var(--hub-text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.pl-guild-chip:hover { border-color: var(--color-tuscan-yellow); background: var(--hub-card-bg); }
.pl-guild-chip__logo { flex-shrink: 0; }
.pl-guild-chip__name { font-weight: 500; }
.pl-guild-chip__badge {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    background: rgba(238, 180, 75, 0.15);
    color: var(--color-tuscan-yellow);
}

/* Home blocks stack their date column on narrow screens. */
@media (max-width: 520px) {
    .pl-upcoming__link { flex-direction: column; gap: 0.25rem; }
    .pl-upcoming__when { flex-direction: row; gap: 0.5rem; width: auto; }
}

/* Guild editor "Share & Print" QR preview. The QR SVG (segno, scale=1) is tiny
   at intrinsic size, so scale it up to a fixed preview box. */
.pl-qr-preview {
    flex: 0 0 auto;
    width: 140px;
    height: 140px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--hub-border);
    border-radius: 6px;
}

.pl-qr-preview svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* "Share & Print" QR card — a vertical card shared by the class edit split (right half)
   and the community-event edit form (full width). Layout only; every color is a theme
   token, so it reads correctly on both Obsidian (dark) and Slate (light). */
.pl-qr-share__title {
    margin: 0 0 0.35rem;
}

.pl-qr-share__hint {
    font-size: 0.8125rem;
    margin: 0 0 1.25rem;
}

.pl-qr-share__qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.pl-qr-share .pl-qr-preview {
    width: 168px;
    height: 168px;
}

.pl-qr-share__qr-caption {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hub-text-muted);
}

.pl-qr-share__field {
    margin-bottom: 1rem;
}

.pl-qr-share__link {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pl-qr-share__link input {
    flex: 1 1 auto;
    min-width: 0;
}

.pl-qr-share__link .hub-btn {
    flex: 0 0 auto;
    min-width: 4.75rem;
}

.pl-qr-share__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Printable-flyer button sits just below the Share & Print card in the edit-page aside. */
.pl-qr-share__flyer {
    margin-top: 0.75rem;
}

/* "Sale" fieldset on the class edit forms (teach + admin twins). Layout only —
   the .hub-card base and .pl-form-group controls supply every theme color, so
   the section reads correctly on both Obsidian (dark) and Slate (light). The
   1.75rem top margin matches the "Dates & sessions" / "Gallery images" headings
   so the card clears the Member-discount field above it. */
.pl-sale-fields {
    margin-top: 1.75rem;
    margin-bottom: 1rem;
    padding: 1.25rem 1.5rem 1.5rem;
}

.pl-sale-fields__title {
    margin: 0 0 0.25rem;
}

.pl-sale-fields__hint {
    font-size: 0.85rem;
    margin: 0 0 1rem;
}

/* Class-edit 6/6 split: identity fields (title, slug, category, instructor) on the left,
   the Share & Print card on the right. Stacks on narrow screens with the QR card on top. */
.pl-edit-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 0.5rem;
}

.pl-edit-split__main {
    min-width: 0;
}

@media (max-width: 800px) {
    .pl-edit-split {
        grid-template-columns: 1fr;
    }
    .pl-edit-split__side {
        order: -1;
    }
}

/* ========================================
   Public event detail page (/events/<pk>/) — a centered single column of cards.
   Layout + theme tokens only, so it reads correctly on both Obsidian (dark) and
   Slate (light) and for the anonymous public-topbar view. Reused by templates/404.html.
   ======================================== */
.pl-event-detail {
    max-width: 640px;
    margin: 0 auto;
}

.pl-event-detail__card {
    padding: 1.75rem;
}

.pl-event-detail__kind {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.pl-event-detail__guild {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--hub-surface);
    color: var(--color-tuscan-yellow);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
}

.pl-event-detail__guild:hover {
    background: var(--hub-elevated);
}

.pl-event-detail__type {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hub-text-muted);
}

.pl-event-detail__badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--hub-border);
    color: var(--hub-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.pl-event-detail__title {
    margin: 0 0 1rem;
}

.pl-event-detail__row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.6rem;
    color: var(--hub-text);
}

.pl-event-detail__icon {
    flex: 0 0 auto;
    color: var(--hub-text-muted);
}

.pl-event-detail__past {
    margin: 0.75rem 0 0;
    color: var(--hub-text-muted);
    font-style: italic;
}

.pl-event-detail__description {
    margin-top: 1.25rem;
    color: var(--hub-text);
    line-height: 1.6;
}

.pl-event-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

/* ========================================
   My Guilds settings tab — per-guild join/leave toggle list.
   Layout only; every color comes from theme tokens (hub-card wrapper, --hub-text,
   --hub-text-muted, --hub-border) and the switch is the already-themed pl-toggle,
   so this reads correctly on both Obsidian (dark) and Slate (light) with no rules
   of its own. Reflows to a single column; no table, no fixed widths, no h-scroll.
   ======================================== */
.pl-guild-toggle-list {
    display: flex;
    flex-direction: column;
}

.pl-guild-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--hub-border);
    transition: opacity 0.15s ease;
}

.pl-guild-toggle-row:first-child {
    border-top: 0;
}

/* In-flight: the whole row dims and locks while its join/leave POST is on the wire.
   htmx tags only the firing element with .htmx-request, so the toggle carries
   hx-indicator="closest .pl-guild-toggle-row" to lift the class up to the row. */
.pl-guild-toggle-row.htmx-request {
    opacity: 0.5;
    pointer-events: none;
}

.pl-guild-toggle-row__info {
    /* min-width:0 lets the hint truncate instead of stretching the flex row. */
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pl-guild-toggle-row__name {
    color: var(--hub-text);
    font-weight: 500;
}

.pl-guild-toggle-row__hint {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Guild-announcement Discord channel picker ─────────────────────────────
   A single-choice radio group (one-of-N destination). Theme tokens only — no
   inline background/color, no --surface. Verified on dark (Obsidian) + light
   (Slate). See templates/hub/partials/_announcement_channel_picker.html. */
.pl-channel-picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.pl-channel-option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--hub-text);
}

.pl-channel-option input[type="radio"] {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    accent-color: var(--color-tuscan-yellow);
    cursor: pointer;
}

.pl-channel-option__label {
    flex: 1 1 auto;
}

.pl-channel-option__hint {
    flex: 0 0 auto;
    font-size: 0.8125rem;
    color: var(--hub-text-muted);
}

/* :checked lives on the input; style the enclosing label via :has (option card). */
.pl-channel-option:has(input:checked) {
    border-color: var(--color-tuscan-yellow);
    background: var(--hub-elevated);
}

.pl-channel-option--disabled,
.pl-channel-option:has(input:disabled) {
    opacity: 0.55;
    cursor: not-allowed;
}

.pl-channel-option--disabled input[type="radio"] {
    cursor: not-allowed;
}

.pl-channel-picker__empty {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: var(--hub-text-muted);
}

/* ============================================================================
   Release-update email composer + preview  (Site Settings → Announcements)
   Admin-page chrome only — the iframe content is the email itself.
   ========================================================================== */
.pl-announce-tab {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 760px;
}

.pl-release-form__error {
    background: var(--color-error-bg);
    border: 1px solid var(--color-error);
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    color: var(--color-error);
    font-size: 0.875rem;
}
.pl-release-form__warn {
    margin: 0;
    color: var(--hub-text-muted);
    font-size: 0.875rem;
    font-style: italic;
}
.pl-release-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.pl-release-cards__title {
    margin: 0;
    font-size: 0.95rem;
    color: var(--hub-text);
}
.pl-release-cards__hint {
    margin: -0.25rem 0 0.25rem;
    font-size: 0.8125rem;
    color: var(--hub-text-muted);
}
.pl-release-card {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1rem;
    align-items: start;
    padding: 0.9rem 1rem;
    border: 1px solid var(--hub-border);
    border-radius: 8px;
    background: var(--hub-surface);
}
.pl-release-card__name {
    display: block;
    color: var(--hub-text);
    font-size: 0.9375rem;
}
.pl-release-card__bullets {
    margin: 0.4rem 0 0;
    padding-left: 1.1rem;
    color: var(--hub-text-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
}
.pl-release-card__bullets li { margin-bottom: 0.2rem; }
.pl-release-card__note {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: var(--hub-link);
}
.pl-release-card__controls {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.pl-release-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

/* --- The upgraded preview (device frame, inbox row, HTML/plain-text toggle) --- */
.pl-email-preview__title {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    color: var(--hub-text);
}
.pl-email-preview__lead {
    margin: 0 0 0.9rem;
    color: var(--hub-text-muted);
    font-size: 0.875rem;
}
.pl-email-preview__inbox {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--hub-border);
    border-radius: 8px 8px 0 0;
    background: var(--hub-elevated);
}
.pl-email-preview__from { font-size: 0.75rem; color: var(--hub-text-muted); font-weight: 700; }
.pl-email-preview__subject { font-size: 0.9375rem; color: var(--hub-text); font-weight: 700; }
.pl-email-preview__preheader { font-size: 0.8125rem; color: var(--hub-text-muted); }
.pl-email-preview__toolbar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--hub-border);
    border-top: none;
    background: var(--hub-surface);
}
.pl-seg {
    display: inline-flex;
    border: 1px solid var(--hub-border-strong);
    border-radius: 6px;
    overflow: hidden;
}
.pl-seg__btn {
    border: none;
    background: transparent;
    color: var(--hub-text-muted);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
}
.pl-seg__btn + .pl-seg__btn { border-left: 1px solid var(--hub-border-strong); }
.pl-seg__btn--active {
    background: var(--color-tuscan-yellow);
    color: var(--color-navy);
}
.pl-email-preview__pane { display: block; }
.pl-email-preview__frame {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding: 1rem;
    border: 1px solid var(--hub-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: var(--hub-surface);
}
.pl-email-preview__iframe {
    height: 620px;
    max-width: 100%;
    border: 1px solid var(--hub-border-strong);
    border-radius: 8px;
    background: #fff;
}
.pl-email-preview__text {
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--hub-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: var(--hub-input-bg);
    color: var(--hub-text);
    font-size: 0.8125rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 620px;
    overflow-y: auto;
}

@media (max-width: 640px) {
    .pl-release-card { grid-template-columns: 1fr; }
}

/* ── Announcement compose wizard (/announcements/compose/) ───────────────────
   One Alpine-stepper page. Every step gets its display from a class (never inline
   on an x-show element — Rule 12); every color is a theme token. */
.pl-wizard-lead {
    color: var(--hub-text-muted);
    margin: -0.5rem 0 1.25rem;
    max-width: 60ch;
}
.pl-wizard { display: flex; flex-direction: column; gap: 1.5rem; }
.pl-wizard-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pl-wizard-nav__step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--hub-border);
    background: var(--hub-surface);
    color: var(--hub-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
}
.pl-wizard-nav__n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: var(--hub-elevated);
    color: var(--hub-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
}
.pl-wizard-nav__step.is-active {
    border-color: var(--color-tuscan-yellow);
    color: var(--hub-text);
}
.pl-wizard-nav__step.is-active .pl-wizard-nav__n {
    background: var(--color-tuscan-yellow);
    color: var(--color-navy);
}
.pl-wizard-nav__step.is-done .pl-wizard-nav__n {
    background: var(--hub-blue);
    color: #fff;
}
.pl-wizard-step { display: block; }
.pl-wizard-field { display: block; }
.pl-wizard-errors { margin-bottom: 1rem; }
.pl-wizard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--hub-border);
}
.pl-wizard-preview {
    display: block;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--hub-border);
    border-radius: 10px;
    background: var(--hub-surface);
}
.pl-wizard-preview__bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.pl-wizard-preview__pane { min-height: 200px; }
.pl-wizard-preview__loading {
    color: var(--hub-text-muted);
    font-size: 0.875rem;
    padding: 2rem 1rem;
    text-align: center;
}
.pl-wizard-preview__frame {
    max-height: 520px;
    overflow: auto;
}
.pl-wizard-preview__iframe {
    width: 100%;
    height: 520px;
    max-width: 100%;
    border: 1px solid var(--hub-border-strong);
    border-radius: 0 0 8px 8px;
    background: #fff;
}
.pl-wizard-reach {
    margin: 1.25rem 0 0;
    color: var(--hub-text);
    font-size: 0.9375rem;
}
.pl-mention-picker { display: block; margin-top: 1.25rem; }
.pl-field-hint--warn {
    color: var(--color-tuscan-yellow);
    font-weight: 600;
    margin-top: 0.35rem;
}
.pl-spin {
    display: none;
    width: 13px;
    height: 13px;
    vertical-align: -2px;
    margin-right: 4px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: pl-spin 0.7s linear infinite;
}
.htmx-request .pl-spin, .pl-spin.htmx-request { display: inline-block; }
@keyframes pl-spin { to { transform: rotate(360deg); } }

/* "Your drafts" list (below the wizard) */
.pl-drafts { margin-top: 1.5rem; }
.pl-drafts__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.pl-drafts__title { margin: 0; font-size: 1.05rem; }
.pl-drafts__empty { color: var(--hub-text-muted); margin: 0; }
.pl-draft-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.85rem 0;
    border-top: 1px solid var(--hub-border);
}
.pl-draft-row__meta { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.pl-draft-row__title { color: var(--hub-text); }
.pl-draft-row__sub { color: var(--hub-text-muted); font-size: 0.8125rem; }
.pl-draft-row__actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.pl-draft-row__delete { margin-left: 0.25rem; }

@media (max-width: 480px) {
    .pl-draft-row { align-items: flex-start; }
    .pl-draft-row__actions { width: 100%; }
    .pl-wizard-actions .hub-btn { flex: 1 1 auto; }
}

/* ── Slideshow admin tab (Site Settings) ─────────────────────────────────────
   Editor UI for the signage slideshow. Renders under hub/base.html (hub.css +
   components.css), NOT signage.css. Layout lives in classes, never inline on an
   x-show element (Rule 12). Controls theme via .site-settings-form / .pl-form-group. */
.pl-slideshow-tab-a,
.pl-slideshow-tab-b {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}


.pl-slideshow-rows {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pl-slideshow-row {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

/* Kind-switching field groups — display is in the class so Alpine's x-show only
   toggles display:none (Rule 12), never stripping an inline display. */
.pl-slide-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pl-slideshow-daterow {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.pl-slideshow-daterow > * {
    flex: 1;
    min-width: 160px;
}

.pl-slideshow-empty {
    color: var(--hub-text-muted);
    font-style: italic;
    padding: 0.75rem 0;
}

/* Compact slide card: a collapsed summary row that expands to the full editor. The
   summary reads at a glance — thumbnail, title, kind, screen, on/off. */
.pl-slide-card {
    padding: 0;
    overflow: hidden;
}

.pl-slide-summary {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    padding: 0.75rem 0.875rem;
    color: var(--hub-text);
    flex-wrap: wrap;
}

/* Drag-to-reorder grip. Hidden on touch (native DnD is unreliable there) — the up/down
   buttons drive reordering on a phone/tablet. */
.pl-slide-grip {
    flex: 0 0 auto;
    cursor: grab;
    color: var(--hub-text-muted);
    font-size: 1.05rem;
    line-height: 1;
    padding: 0.25rem 0.15rem;
    user-select: none;
    touch-action: none;
}

.pl-slide-grip:active {
    cursor: grabbing;
}

.pl-slide-card--dragging {
    opacity: 0.4;
}

.pl-slide-card--drag-over {
    box-shadow: inset 0 3px 0 0 var(--color-tuscan-yellow);
}

.pl-slide-summary__actions {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pl-slide-move {
    display: inline-flex;
    gap: 0.25rem;
}

.pl-slide-move__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid var(--hub-border);
    background: var(--hub-surface);
    color: var(--hub-text);
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    transition: background 0.15s ease;
}

.pl-slide-move__btn:hover {
    background: var(--hub-elevated);
}

@media (hover: none) {
    .pl-slide-grip {
        display: none;
    }
}

.pl-slide-summary__thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid var(--hub-border);
    background: var(--hub-surface);
}

.pl-slide-summary__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pl-slide-summary__thumb--placeholder {
    color: var(--hub-text-muted);
}

.pl-slide-summary__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pl-slide-summary__title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--hub-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-slide-summary__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--hub-text-muted);
}

.pl-slide-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--hub-border);
    background: var(--hub-surface);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--hub-text-muted);
}

.pl-slide-summary__state {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.pl-slide-summary__state::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.pl-slide-summary__state--on {
    color: #4ade80;
}

.pl-slide-summary__state--off {
    color: var(--hub-text-muted);
}

/* Editor panel the Edit button reveals. Display lives in the class, never inline on
   the x-show element (Rule 12). */
.pl-slide-editor {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0.875rem 0.875rem;
    border-top: 1px solid var(--hub-border);
}

.pl-slide-image__label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.pl-slide-image-preview {
    margin: 0.25rem 0;
}

.pl-slide-image-preview img {
    max-width: 240px;
    max-height: 135px;
    border-radius: 8px;
    border: 1px solid var(--hub-border);
    display: block;
}

/* Per-saved-zone setup helpers: the copyable URL, QR, copy + preview buttons. */
.pl-slideshow-zone__setup {
    margin-top: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid var(--hub-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.pl-slideshow-zone__url {
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 0.9375rem;
    color: var(--hub-text);
    word-break: break-all;
    user-select: all;
}

.pl-slideshow-zone__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pl-slideshow-zone__qr {
    width: 128px;
    height: 128px;
    padding: 0.5rem;
    background: #ffffff;
    border-radius: 8px;
}

.pl-slideshow-zone__qr svg {
    display: block;
    width: 100%;
    height: 100%;
}

@media (max-width: 640px) {
    .pl-slideshow-daterow { flex-direction: column; }
}

/* Guild announcement reach — collapsible recipient list (guild edit → Announcements tab) */
.pl-recipient-list {
  margin-top: 0.75rem;
  max-height: 14rem;
  overflow-y: auto;
  overflow-x: auto;
  padding: 0.75rem 1rem;
  border: 1px solid var(--hub-input-border);
  border-radius: 6px;
  background: var(--hub-surface);
  color: var(--hub-text);
}
.pl-recipient-list ul { margin: 0; padding-left: 1.1rem; }
.pl-recipient-list li { overflow-wrap: anywhere; word-break: break-all; line-height: 1.5; }

/* Per-announcement email recipient checklist (compose wizard → Step 2). Collapsible card with a
   real, styled checkbox per member + custom address. Themed via tokens (both light + dark). */
.pl-recipient-card {
  margin: 0.85rem 0 0.25rem;
  padding: 0.9rem 1rem;
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: 10px;
}
.pl-recipient-card__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.pl-recipient-card__title { margin: 0; }
.pl-recipient-card__summary {
  margin: 0.35rem 0 0.6rem;
  font-size: 0.9375rem;
  color: var(--hub-text-muted);
}
.pl-recipient-card__toggle { margin: 0; }
.pl-recipient-card__body { margin-top: 0.75rem; }

.pl-recipient-checklist__tools {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.pl-recipient-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 18rem;
  overflow-y: auto;
  padding: 0.15rem;
}
.pl-recipient-checklist__row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.7rem;
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--hub-text);
}
/* Reset the global full-width input rule + colour the tick with the tuscan accent (light + dark). */
.pl-recipient-checklist__row input[type="checkbox"] {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: var(--color-tuscan-yellow);
  cursor: pointer;
}
.pl-recipient-checklist__label {
  flex: 1 1 auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* :checked lives on the input; light up the enclosing row via :has (like .pl-channel-option). */
.pl-recipient-checklist__row:has(input:checked) {
  border-color: var(--color-tuscan-yellow);
  background: var(--hub-elevated);
}
.pl-recipient-checklist__empty {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--hub-text-muted);
}
