/* ==========================================================================
   PBRP V2 — Design Tokens & Components
   --------------------------------------------------------------------------
   The single source of truth for the V2 look. Everything here is static and
   cacheable; the only values that stay inline in header.php are the accent
   tokens, because those come from the database (Admin > Settings > Accent).

   Component classes are prefixed `pbrp-` because the legacy style.css already
   claims .section, .section-title and .hero. .glass-card keeps its original
   name since existing pages already use it.
   ========================================================================== */

:root {
    /* ── Surfaces ─────────────────────────────────────────────────────────
       Raised steps rather than distinct colours, so cards stack on any bg. */
    --pbrp-bg:            #0a0a0b;
    --pbrp-surface-1:     rgba(255, 255, 255, 0.04);
    --pbrp-surface-2:     rgba(255, 255, 255, 0.06);
    --pbrp-surface-3:     rgba(255, 255, 255, 0.10);

    /* ── Borders ───────────────────────────────────────────────────────── */
    --pbrp-border:        rgba(255, 255, 255, 0.08);
    --pbrp-border-mid:    rgba(255, 255, 255, 0.12);
    --pbrp-border-strong: rgba(255, 255, 255, 0.16);

    /* ── Text ramp ─────────────────────────────────────────────────────── */
    --pbrp-text:          #ffffff;
    --pbrp-text-2:        rgba(255, 255, 255, 0.60);
    --pbrp-text-3:        rgba(255, 255, 255, 0.45);
    --pbrp-text-4:        rgba(255, 255, 255, 0.30);

    /* ── Semantic (separate from the configurable accent) ──────────────── */
    --pbrp-warn:          #ffc107;
    --pbrp-good:          #2ecc71;
    --pbrp-bad:           #e74c3c;
    --pbrp-discord:       #7289da;
    --pbrp-good-rgb:      46, 204, 113;
    --pbrp-bad-rgb:       231, 76, 60;

    /* Changelog entry types — same hues changelog.php already uses. */
    --pbrp-added:         #2ecc71;
    --pbrp-changed:       #3498db;
    --pbrp-fixed:         #e74c3c;
    --pbrp-removed:       #95a5a6;

    /* ── Radii ─────────────────────────────────────────────────────────── */
    --pbrp-r-sm:   8px;
    --pbrp-r-md:  10px;
    --pbrp-r-lg:  16px;
    --pbrp-r-xl:  24px;
    --pbrp-r-pill: 99px;

    /* ── Layout ────────────────────────────────────────────────────────── */
    --pbrp-maxw:      1200px;
    --pbrp-page-x:    24px;
    --pbrp-section-y: 72px;
    --pbrp-gap:       16px;

    /* ── Motion ────────────────────────────────────────────────────────── */
    --pbrp-t:      0.2s;
    --pbrp-t-slow: 0.25s;

    /* ── Elevation ─────────────────────────────────────────────────────── */
    --pbrp-shadow-card:   0 8px 32px rgba(0, 0, 0, 0.4);
    --pbrp-shadow-menu:   0 8px 32px rgba(0, 0, 0, 0.5);
    --pbrp-shadow-accent: 0 4px 20px rgba(var(--accent-rgb), 0.35);
    --pbrp-shadow-accent-hi: 0 8px 28px rgba(var(--accent-rgb), 0.5);
}

/* ==========================================================================
   Base
   --------------------------------------------------------------------------
   Loaded after style.css so these win over the legacy sheet.
   ========================================================================== */

html,
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--pbrp-bg);
    color: var(--pbrp-text);
}

a {
    color: var(--accent-color);
    transition: color var(--pbrp-t);
}
a:hover { color: var(--accent-hover); }

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.pbrp-section {
    max-width: var(--pbrp-maxw);
    margin: 0 auto;
    padding: var(--pbrp-section-y) var(--pbrp-page-x) 0;
}

/* Last section on a page needs its bottom padding back. */
.pbrp-section--end { padding-bottom: var(--pbrp-section-y); }
.pbrp-section--tight { padding-top: 64px; }

.pbrp-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.pbrp-section-head--center {
    display: block;
    text-align: center;
    margin-bottom: 40px;
}

.pbrp-h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--pbrp-text);
    letter-spacing: -0.02em;
    margin: 0 0 4px;
}

.pbrp-sub {
    color: var(--pbrp-text-4);
    font-size: 14px;
    margin: 0;
}

.pbrp-section-head--center .pbrp-sub { font-size: 15px; }

/* Card grids. --cards for content, --features for the equal-weight row. */
.pbrp-grid {
    display: grid;
    gap: var(--pbrp-gap);
}
.pbrp-grid--cards    { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.pbrp-grid--features { grid-template-columns: repeat(auto-fit,  minmax(240px, 1fr)); }

/* ==========================================================================
   Surfaces
   ========================================================================== */

.glass-card {
    background: var(--pbrp-surface-1);
    border: 1px solid var(--pbrp-border);
    border-radius: var(--pbrp-r-lg);
    transition: background var(--pbrp-t-slow) ease,
                border-color var(--pbrp-t-slow) ease,
                transform var(--pbrp-t-slow) ease,
                box-shadow var(--pbrp-t-slow) ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(var(--accent-rgb), 0.3);
    transform: translateY(-2px);
    box-shadow: var(--pbrp-shadow-card);
}

/* Opt out of lift for cards that are containers, not link targets. */
.glass-card--static:hover {
    transform: none;
    background: var(--pbrp-surface-1);
    border-color: var(--pbrp-border);
    box-shadow: none;
}

.pbrp-card-body { padding: 24px 28px; }
.pbrp-card-body--lg { padding: 28px; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.pbrp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--pbrp-r-md);
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform var(--pbrp-t) ease,
                background var(--pbrp-t) ease,
                color var(--pbrp-t) ease,
                box-shadow var(--pbrp-t) ease;
}

.pbrp-btn--accent {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: var(--pbrp-shadow-accent);
}
.pbrp-btn--accent:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--pbrp-shadow-accent-hi);
}

.pbrp-btn--ghost {
    background: var(--pbrp-surface-2);
    border-color: var(--pbrp-border-mid);
    color: rgba(255, 255, 255, 0.8);
}
.pbrp-btn--ghost:hover {
    background: var(--pbrp-surface-3);
    color: #fff;
}

/* Small tertiary action, e.g. the "View All" beside a section heading. */
.pbrp-btn--sm {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    gap: 6px;
    border-radius: var(--pbrp-r-sm);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--pbrp-text-2);
}
.pbrp-btn--sm:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Quiet accent-tinted action. */
.pbrp-btn--accent-soft {
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--pbrp-r-sm);
    background: rgba(var(--accent-rgb), 0.1);
    border-color: rgba(var(--accent-rgb), 0.25);
    color: var(--accent-color);
    white-space: nowrap;
}
.pbrp-btn--accent-soft:hover {
    background: rgba(var(--accent-rgb), 0.2);
    color: var(--accent-color);
}

/* ==========================================================================
   Chips & indicators
   ========================================================================== */

.pbrp-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--pbrp-r-pill);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.pbrp-chip--warn {
    background: rgba(255, 193, 7, 0.12);
    border-color: rgba(255, 193, 7, 0.25);
    color: var(--pbrp-warn);
}

/* Larger status pill used in the hero. */
.pbrp-chip--status {
    gap: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(var(--accent-rgb), 0.1);
    border-color: rgba(var(--accent-rgb), 0.25);
}

.pbrp-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-color);
    animation: pbrp-pulse 2s infinite;
    flex-shrink: 0;
}

.pbrp-dot--lg { width: 12px; height: 12px; }

/* Neutral resting state before a status check resolves. */
.pbrp-dot--idle {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: none;
    animation: none;
}

/* Resolved states, applied by the status poller. */
.pbrp-dot--good {
    background: var(--pbrp-good);
    box-shadow: 0 0 12px rgba(var(--pbrp-good-rgb), 0.7);
    animation: none;
}
.pbrp-dot--bad {
    background: var(--pbrp-bad);
    box-shadow: 0 0 12px rgba(var(--pbrp-bad-rgb), 0.7);
    animation: none;
}

.is-online  { color: var(--pbrp-good); }
.is-offline { color: var(--pbrp-bad); }

/* Muted inline value for an unavailable live stat. */
.pbrp-stat-empty { color: var(--pbrp-text-4); }

.pbrp-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--pbrp-text-4);
    font-size: 12px;
}

/* ==========================================================================
   Stat pills
   ========================================================================== */

.pbrp-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pbrp-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--pbrp-r-md);
}

.pbrp-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--pbrp-text);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.pbrp-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* Placeholder bar shown while a live value is still loading. */
.pbrp-skeleton {
    display: inline-block;
    width: 40px;
    height: 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    animation: pbrp-shimmer 1.5s infinite;
}
.pbrp-skeleton--wide { width: 50px; }

/* ==========================================================================
   Icon tile (feature cards)
   ========================================================================== */

.pbrp-icon-tile {
    width: 44px;
    height: 44px;
    background: rgba(var(--accent-rgb), 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 22px;
    color: var(--accent-color);
}

.pbrp-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pbrp-text);
    margin: 0 0 8px;
}

.pbrp-card-text {
    font-size: 14px;
    color: var(--pbrp-text-3);
    margin: 0;
    line-height: 1.6;
}

/* ==========================================================================
   Announcement card
   ========================================================================== */

.pbrp-ann-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--pbrp-text);
    margin: 0 0 10px;
    line-height: 1.4;
}

.pbrp-ann-excerpt {
    font-size: 13.5px;
    color: var(--pbrp-text-3);
    margin: 0 0 16px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.pbrp-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0f0f10 0%, #1a1a1c 100%);
}

/* Applied when an admin has uploaded a hero background image. */
.pbrp-hero--image {
    background-size: cover;
    background-position: center;
}

.pbrp-hero-scrim,
.pbrp-hero-fade,
.pbrp-hero-glow {
    position: absolute;
    pointer-events: none;
}

.pbrp-hero-scrim {
    inset: 0;
    background: linear-gradient(to right,
        rgba(10, 10, 11, 0.95) 0%,
        rgba(10, 10, 11, 0.75) 50%,
        rgba(10, 10, 11, 0.30) 100%);
}

.pbrp-hero-fade {
    bottom: 0;
    left: 0;
    right: 0;
    height: 160px;
    background: linear-gradient(to top, var(--pbrp-bg) 0%, transparent 100%);
}

.pbrp-hero-glow {
    top: 20%;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.12) 0%, transparent 70%);
}

.pbrp-hero-inner {
    position: relative;
    z-index: 1;
    max-width: var(--pbrp-maxw);
    margin: 0 auto;
    padding: 80px var(--pbrp-page-x);
    width: 100%;
}

.pbrp-hero-content { max-width: 640px; }

.pbrp-hero-title {
    font-size: clamp(2.2rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--pbrp-text);
    margin: 0 0 20px;
    text-wrap: balance;
}

.pbrp-hero-text {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--pbrp-text-2);
    line-height: 1.65;
    margin: 0 0 36px;
    max-width: 520px;
}

.pbrp-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.pbrp-hero .pbrp-stat-row { margin-top: 40px; }

/* Version badge + status chip sit on one line above the headline. */
.pbrp-hero-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

/* ==========================================================================
   Server status bar
   ========================================================================== */

.pbrp-statusbar {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 32px 40px;
}

.pbrp-statusbar-main { flex: 1; min-width: 200px; }

.pbrp-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 4px;
}

.pbrp-statusbar-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pbrp-text);
}

.pbrp-player-badge {
    padding: 8px 20px;
    background: var(--pbrp-surface-2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--pbrp-r-sm);
}

.pbrp-player-badge-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pbrp-text);
    font-variant-numeric: tabular-nums;
}

.pbrp-player-badge-label {
    font-size: 13px;
    color: var(--pbrp-text-3);
    margin-left: 4px;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.pbrp-faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pbrp-faq {
    overflow: hidden;
    cursor: pointer;
}

.pbrp-faq-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
}

.pbrp-faq-q {
    font-size: 15px;
    font-weight: 600;
    color: var(--pbrp-text);
    margin: 0;
    line-height: 1.4;
}

.pbrp-faq-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--pbrp-r-sm);
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--pbrp-t) ease;
    color: var(--accent-color);
    font-size: 16px;
}

/* The icon glyph itself is swapped plus/minus by the accordion script,
   so no rotation here — rotating a minus sign just reads as a bug. */

.pbrp-faq-answer {
    display: none;
    padding: 0 24px 20px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 14.5px;
    line-height: 1.75;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.pbrp-faq.is-open .pbrp-faq-answer { display: block; }
.pbrp-faq-answer-inner { padding-top: 16px; }

/* ==========================================================================
   Version badge & "What's New"
   --------------------------------------------------------------------------
   The version string is set in Admin > Settings > Version & Launch. When it is
   blank these components are not rendered at all, so the site reads as
   unversioned rather than showing an empty badge.
   ========================================================================== */

.pbrp-version {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--pbrp-r-sm);
    background: rgba(var(--accent-rgb), 0.14);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Compact variant for the navbar.
   .navbar-logo is a flex row with its own gap, so no margin is needed here. */
.pbrp-version--nav {
    padding: 2px 7px;
    font-size: 10.5px;
    border-radius: 6px;
}

/* .navbar-logo span paints the wordmark with a gradient clipped to the text
   (-webkit-text-fill-color: transparent). That rule would otherwise swallow
   this badge, since it is also a span inside the logo link. Two classes beat
   one class + one element, so these win it back. */
.navbar-logo .pbrp-version--nav {
    background: rgba(var(--accent-rgb), 0.14);
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: var(--accent-color);
    color: var(--accent-color);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pbrp-whatsnew { padding: 28px 32px; }

.pbrp-whatsnew-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.pbrp-whatsnew-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--pbrp-text);
    margin: 0;
    letter-spacing: -0.01em;
}

.pbrp-whatsnew-desc {
    color: var(--pbrp-text-2);
    font-size: 14.5px;
    line-height: 1.7;
    margin: 0 0 24px;
    max-width: 68ch;
}

/* Change groups — one column per populated type. */
.pbrp-change-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding-top: 22px;
    border-top: 1px solid var(--pbrp-border);
}

.pbrp-change-head {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    color: var(--pbrp-change-color, var(--pbrp-text-2));
}

.pbrp-change-count {
    font-variant-numeric: tabular-nums;
    opacity: 0.7;
    font-weight: 600;
}

.pbrp-change-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pbrp-change-list li {
    position: relative;
    padding-left: 16px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--pbrp-text-3);
}

/* Small square bullet tinted to the group's type colour. */
.pbrp-change-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 5px;
    height: 5px;
    border-radius: 1px;
    background: var(--pbrp-change-color, var(--pbrp-text-4));
}

.pbrp-change-more {
    font-size: 12.5px;
    color: var(--pbrp-text-4);
    padding-left: 16px;
    margin-top: 2px;
}

/* Type scoping — each group sets the colour its children inherit. */
.pbrp-change-group--added   { --pbrp-change-color: var(--pbrp-added); }
.pbrp-change-group--changed { --pbrp-change-color: var(--pbrp-changed); }
.pbrp-change-group--fixed   { --pbrp-change-color: var(--pbrp-fixed); }
.pbrp-change-group--removed { --pbrp-change-color: var(--pbrp-removed); }

/* ==========================================================================
   Charts
   --------------------------------------------------------------------------
   Two single-series charts: population over 24h (line/area) and population by
   hour of day (bars). Single series means no legend — each chart's title names
   what it shows. Data marks carry the accent; all text stays on text tokens.
   ========================================================================== */

.pbrp-chart-card { padding: 24px 28px; }

.pbrp-chart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.pbrp-chart-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--pbrp-text);
    margin: 0;
}

.pbrp-chart-note {
    font-size: 12px;
    color: var(--pbrp-text-4);
}

.pbrp-chart-sub {
    font-size: 12.5px;
    color: var(--pbrp-text-4);
    margin: 0 0 18px;
}

.pbrp-chart-wrap {
    position: relative;
    width: 100%;
    overflow-x: auto;
}

.pbrp-chart-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

/* Recessive grid and axis text — present, never competing with the data. */
.pbrp-grid-line {
    stroke: rgba(255, 255, 255, 0.07);
    stroke-width: 1;
}

.pbrp-axis-text {
    fill: var(--pbrp-text-4);
    font-size: 10px;
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
}

/* 2px line, soft area beneath, emphasised final point. */
.pbrp-line {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.pbrp-area { fill: url(#pbrpAreaFill); }

/* Gradient stops are styled here rather than via presentation attributes,
   because var() resolves reliably in CSS on every engine. */
.pbrp-area-stop-top    { stop-color: var(--accent-color); stop-opacity: 0.28; }
.pbrp-area-stop-bottom { stop-color: var(--accent-color); stop-opacity: 0; }

.pbrp-endpoint {
    fill: var(--accent-color);
    stroke: var(--pbrp-bg);
    stroke-width: 2;
}

/* Bars: muted by default so the peak can carry the emphasis. */
.pbrp-bar {
    fill: rgba(var(--accent-rgb), 0.35);
    transition: fill var(--pbrp-t) ease;
}
.pbrp-bar--peak { fill: var(--accent-color); }
.pbrp-bar-hit { fill: transparent; cursor: pointer; }
.pbrp-bar-hit:hover + .pbrp-bar,
.pbrp-bar-hit:focus-visible + .pbrp-bar { fill: var(--accent-color); }

.pbrp-peak-label {
    fill: var(--pbrp-text-2);
    font-size: 10px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
}

/* Crosshair + tooltip for the time series. */
.pbrp-crosshair {
    stroke: rgba(255, 255, 255, 0.25);
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.pbrp-tooltip {
    position: absolute;
    pointer-events: none;
    z-index: 5;
    padding: 8px 11px;
    background: #161618;
    border: 1px solid var(--pbrp-border-mid);
    border-radius: var(--pbrp-r-sm);
    box-shadow: var(--pbrp-shadow-menu);
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.12s ease;
}
.pbrp-tooltip.is-visible { opacity: 1; }
.pbrp-tooltip-value {
    font-weight: 700;
    color: var(--pbrp-text);
    font-variant-numeric: tabular-nums;
}
.pbrp-tooltip-label { color: var(--pbrp-text-4); }

/* Shown until the cron job has collected enough samples to plot. */
.pbrp-chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 140px;
    text-align: center;
    color: var(--pbrp-text-4);
    font-size: 13px;
}
.pbrp-chart-empty i { font-size: 26px; opacity: 0.5; }

.pbrp-chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--pbrp-gap);
}

/* Accessible table alternative to the charts. */
.pbrp-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    margin-top: 14px;
}
.pbrp-data-table th,
.pbrp-data-table td {
    text-align: left;
    padding: 6px 10px;
    border-bottom: 1px solid var(--pbrp-border);
    font-variant-numeric: tabular-nums;
}
.pbrp-data-table th { color: var(--pbrp-text-3); font-weight: 600; }
.pbrp-data-table td { color: var(--pbrp-text-2); }

.pbrp-table-toggle {
    background: none;
    border: none;
    padding: 0;
    margin-top: 12px;
    color: var(--pbrp-text-4);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
}
.pbrp-table-toggle:hover { color: var(--pbrp-text-2); }

@media (prefers-reduced-motion: reduce) {
    .pbrp-bar, .pbrp-tooltip { transition: none; }
}

/* ==========================================================================
   Store
   ========================================================================== */

.pbrp-store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.pbrp-product {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Featured items get an accent top edge rather than a different card style,
   so the grid stays visually even. */
.pbrp-product--featured { border-color: rgba(var(--accent-rgb), 0.35); }
.pbrp-product--featured::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-gradient);
    z-index: 1;
}

/* Row holding the type chip and, when present, the featured badge. */
.pbrp-product-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Solid accent fill so the badge carries real emphasis — this is the one
   element on the card allowed to shout. */
.pbrp-chip--featured {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.35);
}

.pbrp-chip--featured i { font-size: 12px; }

.pbrp-product-media {
    aspect-ratio: 16 / 9;
    width: 100%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--pbrp-border);
}

.pbrp-product-body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.pbrp-product-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.pbrp-product-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pbrp-text);
    margin: 0;
    letter-spacing: -0.01em;
}

.pbrp-product-desc {
    font-size: 13.5px;
    color: var(--pbrp-text-3);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.pbrp-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

.pbrp-price-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pbrp-text);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.pbrp-price-interval {
    font-size: 13px;
    color: var(--pbrp-text-4);
    font-weight: 500;
}

/* What the buyer actually receives. */
.pbrp-perks {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.pbrp-perks li {
    position: relative;
    padding-left: 22px;
    font-size: 13px;
    color: var(--pbrp-text-2);
    line-height: 1.5;
}

.pbrp-perks li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 12px;
}

.pbrp-product-foot {
    padding: 0 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pbrp-product-foot .pbrp-btn { justify-content: center; width: 100%; }

/* Owned state — deliberately quiet, and not a button, so it cannot be clicked. */
.pbrp-owned {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--pbrp-r-md);
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.25);
    color: var(--pbrp-good);
    font-size: 14px;
    font-weight: 600;
}

.pbrp-store-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--pbrp-r-md);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.pbrp-store-notice i { font-size: 20px; flex-shrink: 0; margin-top: 1px; }

.pbrp-store-notice--info {
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    color: var(--pbrp-text-2);
}
.pbrp-store-notice--info i { color: var(--accent-color); }

.pbrp-store-notice--good {
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.22);
    color: var(--pbrp-text-2);
}
.pbrp-store-notice--good i { color: var(--pbrp-good); }

.pbrp-store-notice--bad {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.22);
    color: var(--pbrp-text-2);
}
.pbrp-store-notice--bad i { color: var(--pbrp-bad); }

/* Sandbox warning, so nobody mistakes a test store for a live one. */
.pbrp-store-notice--test {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.28);
    color: var(--pbrp-text-2);
}
.pbrp-store-notice--test i { color: var(--pbrp-warn); }

@media (max-width: 640px) {
    .pbrp-store-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Bottom CTA panel
   ========================================================================== */

.pbrp-cta {
    background: linear-gradient(135deg,
        rgba(var(--accent-rgb), 0.10) 0%,
        rgba(var(--accent-rgb), 0.04) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: var(--pbrp-r-xl);
    padding: 56px 40px;
    text-align: center;
}

.pbrp-cta-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--pbrp-text);
    letter-spacing: -0.03em;
    margin: 0 0 14px;
    text-wrap: balance;
}

.pbrp-cta-text {
    color: var(--pbrp-text-2);
    font-size: 16px;
    margin: 0 auto 32px;
    max-width: 420px;
}

.pbrp-cta .pbrp-btn-row { justify-content: center; }

/* ==========================================================================
   Legacy bridges — keep Bootstrap-era pages on the accent system
   ========================================================================== */

.btn-primary,
.default-btn {
    background: var(--accent-gradient) !important;
    border-color: var(--accent-color) !important;
    font-family: 'Inter', sans-serif !important;
}
.btn-primary:hover,
.default-btn:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.35) !important;
}

.text-accent   { color: var(--accent-color) !important; }
.bg-accent     { background: var(--accent-color) !important; }
.border-accent { border-color: var(--accent-color) !important; }

.bg-primary,
.badge-primary { background-color: var(--accent-color) !important; }
.text-primary  { color: var(--accent-color) !important; }
.border-primary { border-color: var(--accent-color) !important; }

.navbar .dropdown-menu {
    background: #161618 !important;
    border: 1px solid var(--pbrp-border) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    box-shadow: var(--pbrp-shadow-menu) !important;
}
.navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.8) !important;
    border-radius: var(--pbrp-r-sm) !important;
    padding: 9px 14px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.navbar .dropdown-item:hover {
    background: rgba(var(--accent-rgb), 0.12) !important;
    color: var(--accent-color) !important;
}
.navbar .dropdown-divider {
    border-color: var(--pbrp-border) !important;
    opacity: 1 !important;
}

/* ==========================================================================
   Motion
   ========================================================================== */

@keyframes pbrp-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

@keyframes pbrp-shimmer {
    0%   { opacity: 0.3; }
    50%  { opacity: 0.6; }
    100% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
    .pbrp-dot,
    .pbrp-skeleton { animation: none; }

    .glass-card,
    .pbrp-btn {
        transition: none;
    }
    .glass-card:hover,
    .pbrp-btn--accent:hover {
        transform: none;
    }
}

/* ==========================================================================
   Focus visibility — keyboard users need to see where they are
   ========================================================================== */

.pbrp-btn:focus-visible,
.pbrp-faq:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: var(--pbrp-r-sm);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --pbrp-section-y: 48px;
        --pbrp-page-x: 16px;
    }

    .pbrp-hero-inner { padding: 56px var(--pbrp-page-x); }
    .pbrp-statusbar  { padding: 24px; gap: 16px; }
    .pbrp-cta        { padding: 40px 24px; }
    .pbrp-grid--cards { grid-template-columns: 1fr; }
    .pbrp-btn        { padding: 12px 20px; font-size: 14px; }
}
