/* ═════════════════════════════════════════════════════════════════════
   BRETHREN v2 — "Covenant HUD" design system (production layer)

   Ported from mockups/royal-couture-v2.css, which the owner approved.
   Everything here is namespaced so it cannot collide with legacy page
   CSS or with the inline :root variables branding-loader.js injects:
     • tokens     --v2-*
     • classes    .v2-*
     • base skin  only under html.v2 (set by wr-header.js or the page)

   House rules: deep blue + gold only (never grey or black backgrounds),
   Sora for display, Plus Jakarta Sans for body, profile photos are
   always circular. Mobile first: base styles are the phone layout,
   the desktop rail and wider grids switch on at 900px.
   ═════════════════════════════════════════════════════════════════════ */

:root {
    --v2-font-display: 'Sora', system-ui, sans-serif;
    --v2-font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --v2-bg: #060c2e;
    --v2-bg-2: #0a1442;
    --v2-bg-3: #0f1d5a;
    --v2-bg-4: #16277a;

    --v2-ink: #f0f2ff;
    --v2-ink-2: #b8c4e8;
    --v2-ink-3: #7a8ec0;

    --v2-gold: #f5a623;
    --v2-gold-hi: #ffc964;
    --v2-gold-lo: #c47f0e;
    --v2-gold-wash: rgba(245, 166, 35, 0.12);
    /* Highlight fill for chamfers: stays blue, because gold mixed into navy turns muddy */
    --v2-gold-wash-fill: linear-gradient(90deg, var(--v2-bg-4), var(--v2-bg-3));

    --v2-edge: rgba(122, 142, 192, 0.26);
    --v2-edge-gold: rgba(245, 166, 35, 0.55);

    --v2-live: #3ddc97;
    --v2-alert: #ff5d6c;

    --v2-cut: 14px;
    --v2-cut-sm: 8px;
    --v2-rail-w: 76px;
    --v2-top-h: 60px;
    --v2-dock-h: 66px;
    --v2-gutter: 16px;
    --v2-safe-top: env(safe-area-inset-top, 0px);
    --v2-safe-bottom: env(safe-area-inset-bottom, 0px);
    --v2-ease: cubic-bezier(0.16, 1, 0.3, 1);

    --v2-octagon: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
@media (min-width: 900px) {
    :root { --v2-cut: 18px; --v2-gutter: 40px; }
}

/* ── Base skin (opt-in via html.v2) ── */
html.v2 { -webkit-text-size-adjust: 100%; }
html.v2 body {
    margin: 0;
    background-color: var(--v2-bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 60% -10%, rgba(32, 64, 200, 0.45), transparent 70%),
        linear-gradient(rgba(122, 142, 192, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(122, 142, 192, 0.05) 1px, transparent 1px);
    background-size: 100% 100%, 56px 56px, 56px 56px;
    background-attachment: fixed;
    color: var(--v2-ink);
    font-family: var(--v2-font-body);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
html.v2 h1, html.v2 h2, html.v2 h3, html.v2 h4, html.v2 h5, html.v2 h6 { font-family: var(--v2-font-display); }
/* Form controls don't inherit the page font by default (they fall back to Arial) */
html.v2 button, html.v2 input, html.v2 select, html.v2 textarea { font-family: inherit; }
html.v2 ::selection { background: rgba(245, 166, 35, 0.35); color: #fff; }
html.v2 :focus-visible { outline: 2px solid var(--v2-gold-hi); outline-offset: 3px; }
html.v2 ::-webkit-scrollbar { width: 8px; height: 8px; }
html.v2 ::-webkit-scrollbar-track { background: var(--v2-bg); }
html.v2 ::-webkit-scrollbar-thumb { background: var(--v2-bg-4); }
html.v2 ::-webkit-scrollbar-thumb:hover { background: var(--v2-ink-3); }
html.v2 [hidden] { display: none !important; }

/* Page frame when the shared chrome (wr-header.js) is present:
   phones get room for the top bar and dock, desktop for the rail. */
html.v2-chrome body {
    padding-top: calc(var(--v2-top-h) + var(--v2-safe-top)) !important;
    padding-bottom: calc(var(--v2-dock-h) + var(--v2-safe-bottom)) !important;
}
@media (min-width: 900px) {
    html.v2-chrome body {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        padding-left: var(--v2-rail-w) !important;
    }
}
.v2-page { padding: 16px var(--v2-gutter) 32px; max-width: 1440px; margin: 0 auto; }
@media (min-width: 900px) { .v2-page { padding: 28px var(--v2-gutter) 64px; } }

.v2-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Chamfer primitive ──────────────────────────────────────────────
   The box is the 1px edge colour; ::before paints the fill 1px inside
   with the same cut, so the border follows the angled corners.
   NOTE: clip-path clips overflow — don't use it on boxes that host
   dropdowns or popovers; use .v2-panel instead. */
.v2-chamfer {
    --c: var(--v2-cut);
    --fill: var(--v2-bg-2);
    --line: var(--v2-edge);
    position: relative;
    isolation: isolate;
    background: var(--line);
    clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
}
.v2-chamfer::before {
    content: '';
    position: absolute;
    inset: 1px;
    z-index: -1;
    background: var(--fill);
    clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
}
.v2-chamfer.v2-accent::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: var(--c);
    height: var(--c);
    background: linear-gradient(to bottom left, transparent calc(50% - 2px), var(--v2-gold) calc(50% - 2px), var(--v2-gold) calc(50% + 1px), transparent calc(50% + 1px));
    pointer-events: none;
}
.v2-chamfer.v2-gold-edge { --line: var(--v2-edge-gold); }

/* Unclipped panel for containers with dropdowns/popovers: straight
   border + a gold corner tick, so it still reads as the same family. */
.v2-panel {
    position: relative;
    background: var(--v2-bg-2);
    border: 1px solid var(--v2-edge);
}
.v2-panel.v2-accent::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 14px;
    height: 14px;
    border-top: 2px solid var(--v2-gold);
    border-right: 2px solid var(--v2-gold);
    pointer-events: none;
}

/* ── Type ── */
.v2-eyebrow {
    font-family: var(--v2-font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--v2-gold);
}
.v2-display {
    font-family: var(--v2-font-display);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    font-size: clamp(28px, 7.5vw, 52px);
    color: var(--v2-ink);
}
.v2-display .v2-gold, .v2-gold-text { color: var(--v2-gold); }
.v2-title { font-family: var(--v2-font-display); font-weight: 700; font-size: 18px; line-height: 1.3; color: var(--v2-ink); }
.v2-lede { color: var(--v2-ink-2); font-size: 15.5px; line-height: 1.65; max-width: 640px; }
.v2-muted { color: var(--v2-ink-3); }

.v2-section { margin-bottom: 32px; }
@media (min-width: 900px) { .v2-section { margin-bottom: 44px; } }
.v2-section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.v2-section-head h2, .v2-section-head .v2-h {
    font-family: var(--v2-font-display);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--v2-ink);
    margin: 0;
}
.v2-section-head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--v2-edge), transparent);
    order: 1;
}
.v2-section-head .v2-more {
    order: 2;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--v2-gold);
    text-decoration: none;
    white-space: nowrap;
    background: none;
    border: 0;
    cursor: pointer;
}

/* ── Buttons: flat edges, one notched corner, 44px tall ── */
.v2-btn {
    --n: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 0;
    font-family: var(--v2-font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    isolation: isolate;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--n)), calc(100% - var(--n)) 100%, 0 100%);
    transition: transform 0.2s var(--v2-ease), filter 0.2s ease, opacity 0.2s ease;
}
.v2-btn:active { transform: translateY(1px); }
.v2-btn:disabled, .v2-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.v2-btn-gold { background: linear-gradient(180deg, var(--v2-gold-hi), var(--v2-gold)); color: var(--v2-bg-2); }
.v2-btn-gold:hover { filter: brightness(1.08); color: var(--v2-bg-2); }
.v2-btn-line { background: var(--v2-edge-gold); color: var(--v2-ink); }
.v2-btn-line::before {
    content: '';
    position: absolute;
    inset: 1px;
    z-index: -1;
    background: var(--v2-bg-3);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--n) + 0.5px), calc(100% - var(--n) + 0.5px) 100%, 0 100%);
    transition: background 0.2s ease;
}
.v2-btn-line:hover { color: var(--v2-ink); }
.v2-btn-line:hover::before { background: var(--v2-bg-4); }
.v2-btn-line i { color: var(--v2-gold); }
.v2-btn-ghost { background: transparent; color: var(--v2-ink-2); clip-path: none; }
.v2-btn-ghost:hover { color: var(--v2-gold); background: var(--v2-bg-3); }
.v2-btn-live { background: var(--v2-alert); color: #fff; }
.v2-btn-danger { background: transparent; color: var(--v2-alert); box-shadow: inset 0 0 0 1px rgba(255, 93, 108, 0.6); clip-path: none; }
.v2-btn-sm { min-height: 38px; padding: 0 14px; font-size: 12px; --n: 8px; }
.v2-btn-block { width: 100%; }
@media (max-width: 899px) { .v2-btn-sm { min-height: 44px; } }

.v2-icon-btn {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    position: relative;
    padding: 0;
    border: 0;
    background: none;
    color: var(--v2-ink-2);
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease;
}
.v2-icon-btn:hover, .v2-icon-btn.is-active { color: var(--v2-gold); }
.v2-badge {
    position: absolute;
    top: 6px;
    right: 4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--v2-alert);
    color: #fff;
    font-family: var(--v2-font-body);
    font-size: 10px;
    font-weight: 800;
    line-height: 17px;
    text-align: center;
    pointer-events: none;
}
.v2-badge[hidden] { display: none !important; }

/* ── Profile photos: always circles ── */
.v2-av {
    --s: 40px;
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--v2-bg-3);
}
.v2-av-ring {
    --s: 48px;
    position: relative;
    width: var(--s);
    height: var(--s);
    flex-shrink: 0;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(160deg, var(--v2-gold-hi), var(--v2-gold-lo));
}
.v2-av-ring > img, .v2-av-ring > .v2-av-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--v2-bg-2);
    display: block;
}
.v2-av-initials {
    display: grid !important;
    place-items: center;
    background: linear-gradient(160deg, var(--v2-bg-4), var(--v2-bg-3));
    color: var(--v2-gold-hi);
    font-family: var(--v2-font-display);
    font-weight: 800;
    font-size: calc(var(--s, 40px) * 0.34);
}
.v2-av-dot {
    position: absolute;
    right: 4%;
    bottom: 4%;
    width: 26%;
    height: 26%;
    min-width: 10px;
    min-height: 10px;
    max-width: 22px;
    max-height: 22px;
    border-radius: 50%;
    background: var(--v2-live);
    border: 3px solid var(--v2-bg-2);
}

/* ── Horizontal scroller (chip rows, carousels) ── */
.v2-scroller {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    margin: 0 calc(var(--v2-gutter) * -1);
    padding: 0 var(--v2-gutter);
    scroll-padding: 0 var(--v2-gutter);
}
.v2-scroller::-webkit-scrollbar { display: none; }
.v2-scroller > * { scroll-snap-align: start; flex-shrink: 0; }
@media (min-width: 900px) { .v2-scroller { margin: 0; padding: 0; scroll-padding: 0; } }

/* ── Chips ── */
.v2-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--v2-edge);
    border-radius: 0;
    background: var(--v2-bg-2);
    color: var(--v2-ink-2);
    font-family: var(--v2-font-body);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}
.v2-chip i { color: var(--v2-gold); font-size: 11px; }
.v2-chip:hover { color: var(--v2-ink); border-color: var(--v2-ink-3); }
.v2-chip[aria-pressed="true"], .v2-chip.is-active, .v2-chip.active { color: var(--v2-bg-2); background: var(--v2-gold); border-color: var(--v2-gold); }
.v2-chip[aria-pressed="true"] i, .v2-chip.is-active i, .v2-chip.active i { color: var(--v2-bg-2); }
.v2-chip .v2-n { font-size: 11px; opacity: 0.75; }
@media (max-width: 899px) { .v2-chip { min-height: 44px; } }

/* ── Tabs (sticky under the phone top bar) ── */
.v2-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--v2-edge);
    margin: 0 calc(var(--v2-gutter) * -1) 22px;
    padding: 0 var(--v2-gutter);
    overflow-x: auto;
    scrollbar-width: none;
    position: sticky;
    top: calc(var(--v2-top-h) + var(--v2-safe-top));
    background: rgba(6, 12, 46, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    z-index: 40;
}
.v2-tabs::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
    .v2-tabs { margin: 0 0 28px; padding: 0; top: 0; }
}
.v2-tab {
    position: relative;
    min-height: 48px;
    padding: 0 14px;
    border: 0;
    background: none;
    font-family: var(--v2-font-display);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--v2-ink-3);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: color 0.2s ease;
}
.v2-tab:hover { color: var(--v2-ink); }
.v2-tab .v2-count { margin-left: 6px; padding: 1px 7px; background: var(--v2-bg-3); color: var(--v2-ink-2); font-size: 11px; letter-spacing: 0; }
.v2-tab[aria-selected="true"], .v2-tab.is-active, .v2-tab.active { color: var(--v2-ink); }
.v2-tab[aria-selected="true"] .v2-count, .v2-tab.is-active .v2-count, .v2-tab.active .v2-count { background: var(--v2-gold); color: var(--v2-bg); }
.v2-tab[aria-selected="true"]::after, .v2-tab.is-active::after, .v2-tab.active::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 3px;
    background: var(--v2-gold);
    box-shadow: 0 0 12px rgba(245, 166, 35, 0.7);
}

/* ── Stat strip ── */
.v2-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    padding: 1px;
    background: var(--v2-edge);
    clip-path: polygon(0 0, calc(100% - var(--v2-cut)) 0, 100% var(--v2-cut), 100% 100%, var(--v2-cut) 100%, 0 calc(100% - var(--v2-cut)));
}
.v2-stats > .v2-stat:nth-child(3n+2):last-child { grid-column: span 2; }
.v2-stats > .v2-stat:nth-child(3n+1):last-child { grid-column: span 3; }
.v2-stat { background: var(--v2-bg-2); padding: 16px 14px; min-width: 0; }
.v2-stat-num {
    font-family: var(--v2-font-display);
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--v2-ink);
}
.v2-stat-num.v2-gold { color: var(--v2-gold); }
.v2-stat-num.v2-live { color: var(--v2-live); }
.v2-stat-label {
    margin-top: 7px;
    font-family: var(--v2-font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--v2-ink-3);
}
@media (min-width: 900px) {
    .v2-stats { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
    .v2-stats > .v2-stat:nth-child(n):last-child { grid-column: auto; }
    .v2-stat { padding: 20px 24px 18px; }
    .v2-stat-num { font-size: 34px; }
    .v2-stat-label { font-size: 10.5px; letter-spacing: 0.14em; }
}

/* ── Kind label & tags ── */
.v2-kind {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--v2-font-display);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--v2-gold);
}
.v2-kind i { font-size: 12px; }
.v2-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    font-family: var(--v2-font-display);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--v2-bg-4);
    color: var(--v2-ink);
    white-space: nowrap;
}
.v2-tag.v2-live-tag { background: var(--v2-alert); color: #fff; }
.v2-tag.v2-gold-tag { background: var(--v2-gold); color: var(--v2-bg); }
.v2-tag.v2-green-tag { background: var(--v2-live); color: var(--v2-bg); }
.v2-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--v2-live);
    box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6);
    animation: v2-pulse 2s infinite;
    flex-shrink: 0;
    display: inline-block;
}
.v2-pulse.v2-red { background: #fff; }
@keyframes v2-pulse {
    70% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); }
    100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

/* ── Timeline rail ── */
.v2-timeline { position: relative; list-style: none; margin: 0; padding: 0; }
.v2-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--v2-gold) 0%, var(--v2-gold) 55%, rgba(245, 166, 35, 0.15) 100%);
}
.v2-t-day { position: relative; padding-left: 30px; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; }
.v2-t-day::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--v2-gold);
    box-shadow: 0 0 0 4px var(--v2-bg), 0 0 18px var(--v2-gold);
}
.v2-t-day h3 { font-family: var(--v2-font-display); font-size: 20px; font-weight: 800; color: var(--v2-gold); margin: 0; }
.v2-t-day span { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--v2-ink-3); }
.v2-t-item { padding-left: 30px; margin-bottom: 16px; }
@media (min-width: 900px) {
    .v2-timeline::before { left: 7px; }
    .v2-t-day, .v2-t-item { padding-left: 40px; }
    .v2-t-day::before { width: 16px; height: 16px; top: 5px; box-shadow: 0 0 0 5px var(--v2-bg), 0 0 18px var(--v2-gold); }
}

/* ── Posts ── */
.v2-post { padding: 18px 16px 0; }
.v2-post-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.v2-post-author { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: inherit; }
.v2-post-author strong { display: block; font-family: var(--v2-font-display); font-size: 14px; font-weight: 700; color: var(--v2-ink); }
.v2-post-where { font-size: 12px; color: var(--v2-ink-3); }
.v2-post-title { font-family: var(--v2-font-display); font-size: 19px; font-weight: 700; line-height: 1.28; margin: 0 0 8px; color: var(--v2-ink); }
.v2-post-body { color: var(--v2-ink-2); line-height: 1.7; overflow-wrap: anywhere; }
.v2-quote {
    margin: 4px 0 14px;
    padding: 4px 0 4px 16px;
    border-left: 3px solid var(--v2-gold);
    font-style: italic;
    font-weight: 500;
    font-size: 17px;
    color: var(--v2-ink);
}
.v2-quote cite { display: block; margin-top: 6px; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--v2-gold); }
.v2-post-media { margin: 14px -16px 0; background: var(--v2-bg-3); overflow: hidden; }
.v2-post-media img, .v2-post-media video { display: block; width: 100%; max-height: 70vh; object-fit: cover; }
.v2-post-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px -16px 0;
    padding: 0 6px;
    min-height: 52px;
    border-top: 1px solid var(--v2-edge);
}
@media (min-width: 900px) {
    .v2-post { padding: 24px 26px 0; }
    .v2-post-title { font-size: 21px; }
    .v2-post-media { margin: 16px -26px 0; }
    .v2-post-foot { margin: 18px -26px 0; padding: 0 14px; }
}
.v2-reacts { display: flex; gap: 2px; }
.v2-react {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    background: none;
    font-family: var(--v2-font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--v2-ink-3);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}
.v2-react:hover { color: var(--v2-ink); background: var(--v2-bg-3); }
.v2-react[aria-pressed="true"], .v2-react.active, .v2-react.is-active { color: var(--v2-gold); }
.v2-react[aria-pressed="true"] i, .v2-react.active i { animation: v2-pop 0.35s var(--v2-ease); }
@keyframes v2-pop { 50% { transform: scale(1.35); } }
@media (max-width: 599px) { .v2-react .v2-lbl { display: none; } }

/* ── Tiles & grids ── */
.v2-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 600px) { .v2-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .v2-grid.v2-g3 { grid-template-columns: repeat(3, 1fr); } .v2-grid.v2-g4 { grid-template-columns: repeat(4, 1fr); } }

.v2-tile { display: flex; flex-direction: column; text-decoration: none; color: inherit; min-width: 0; }
.v2-tile-img { aspect-ratio: 16 / 9; background: var(--v2-bg-3) center / cover; position: relative; margin: 1px 1px 0; overflow: hidden; }
.v2-tile-img > img, .v2-tile-img > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.v2-tile-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--v2-bg-2), transparent 55%); pointer-events: none; }
.v2-tile-img .v2-tag { position: absolute; left: 12px; top: 12px; z-index: 1; }
.v2-tile-img .v2-tag.v2-br { left: auto; right: 12px; top: auto; bottom: 12px; }
.v2-tile-body { padding: 6px 18px 18px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.v2-tile-body h3, .v2-tile-body h4, .v2-tile-title { font-family: var(--v2-font-display); font-size: 16.5px; font-weight: 700; line-height: 1.3; margin: 0; color: var(--v2-ink); }
.v2-tile-body p, .v2-tile-sub { font-size: 13px; color: var(--v2-ink-3); margin: 0; }
.v2-tile-body .v2-btn { margin-top: 10px; align-self: flex-start; }
.v2-play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    background: rgba(245, 166, 35, 0.92);
    color: var(--v2-bg);
    font-size: 17px;
    clip-path: var(--v2-octagon);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.v2-tile:hover .v2-play-badge, .v2-tile:focus-visible .v2-play-badge { opacity: 1; }
@media (hover: none) { .v2-play-badge { opacity: 1; width: 44px; height: 44px; font-size: 14px; } }
.v2-row-rail { gap: 12px; }
.v2-row-rail > .v2-tile { width: 78vw; max-width: 320px; }
@media (min-width: 900px) { .v2-row-rail > .v2-tile { width: 300px; } }

/* ── Cards ── */
.v2-card { padding: 20px 18px; }
@media (min-width: 900px) { .v2-card { padding: 24px; } }

/* ── Rows (people, notifications, conversations) ── */
.v2-rows { list-style: none; margin: 0; padding: 0; }
.v2-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 8px 0;
    border-bottom: 1px solid var(--v2-edge);
    text-decoration: none;
    color: inherit;
}
.v2-row:last-child { border-bottom: 0; }
.v2-row .v2-grow { flex: 1; min-width: 0; }
.v2-row strong { display: block; font-family: var(--v2-font-display); font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--v2-ink); }
.v2-row small { display: block; font-size: 12px; color: var(--v2-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Meter ── */
.v2-meter-track { height: 6px; background: var(--v2-bg-4); position: relative; }
.v2-meter-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--v2-gold-lo), var(--v2-gold-hi)); }
.v2-seg { display: flex; gap: 3px; }
.v2-seg span { flex: 1; height: 4px; background: var(--v2-bg-4); }
.v2-seg span.on { background: var(--v2-gold); }

/* ── Layout: main + side ── */
.v2-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.v2-side { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 700px) and (max-width: 1179px) { .v2-side { display: grid; grid-template-columns: 1fr 1fr; } }
@media (min-width: 1180px) { .v2-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; } }

/* ── Forms (composers, editors, settings) ── */
.v2-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.v2-label {
    font-family: var(--v2-font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--v2-ink-2);
}
.v2-help { font-size: 12px; color: var(--v2-ink-3); }
.v2-input, .v2-select, .v2-textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid var(--v2-edge);
    border-radius: 0;
    background: var(--v2-bg);
    color: var(--v2-ink);
    font-family: var(--v2-font-body);
    font-size: 16px; /* 16px stops iOS zooming on focus */
    line-height: 1.4;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.v2-textarea { min-height: 110px; resize: vertical; }
.v2-input::placeholder, .v2-textarea::placeholder { color: var(--v2-ink-3); }
.v2-input:focus, .v2-select:focus, .v2-textarea:focus { border-color: var(--v2-gold); box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18); }
.v2-select {
    padding-right: 38px;
    background-image: linear-gradient(45deg, transparent 50%, var(--v2-gold) 50%), linear-gradient(135deg, var(--v2-gold) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
}
.v2-select option { background: var(--v2-bg-2); color: var(--v2-ink); }
.v2-switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.v2-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.v2-switch span { position: absolute; inset: 0; background: var(--v2-bg-4); border: 1px solid var(--v2-edge); transition: background 0.2s ease; }
.v2-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: var(--v2-ink-2); transition: transform 0.2s var(--v2-ease), background 0.2s ease; }
.v2-switch input:checked + span { background: var(--v2-gold); border-color: var(--v2-gold); }
.v2-switch input:checked + span::after { transform: translateX(20px); background: var(--v2-bg-2); }
.v2-switch input:focus-visible + span { outline: 2px solid var(--v2-gold-hi); outline-offset: 2px; }

/* ── Toast ── */
.v2-toast {
    --c: 10px;
    --fill: var(--v2-bg-3);
    --line: var(--v2-edge-gold);
    position: fixed;
    left: 50%;
    bottom: calc(var(--v2-dock-h) + var(--v2-safe-bottom) + 14px);
    z-index: 2147483000;
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 14px 20px;
    color: var(--v2-ink);
    font-family: var(--v2-font-body);
    font-size: 14px;
    font-weight: 600;
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.35s var(--v2-ease);
}
.v2-toast i { color: var(--v2-gold); }
.v2-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .v2-toast { bottom: 28px; } }

/* ── Sheet / modal: bottom sheet on phones, centred on desktop ── */
.v2-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(6, 12, 46, 0.82);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.v2-sheet-backdrop[hidden] { display: none !important; }
.v2-sheet {
    position: relative;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 22px 18px calc(22px + var(--v2-safe-bottom));
    background: var(--v2-bg-2);
    border-top: 1px solid var(--v2-edge-gold);
    color: var(--v2-ink);
    animation: v2-rise 0.3s var(--v2-ease);
}
.v2-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.v2-sheet-head h2, .v2-sheet-head h3 { font-family: var(--v2-font-display); font-size: 18px; font-weight: 800; margin: 0; }
@media (min-width: 700px) {
    .v2-sheet-backdrop { align-items: center; padding: 24px; }
    .v2-sheet { width: min(720px, 100%); padding: 26px; border: 1px solid var(--v2-edge-gold); }
}
@keyframes v2-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Empty / loading states ── */
.v2-empty { text-align: center; padding: 40px 20px; color: var(--v2-ink-3); }
.v2-empty i { font-size: 28px; color: var(--v2-gold); opacity: 0.8; margin-bottom: 10px; display: block; }
.v2-empty strong { display: block; font-family: var(--v2-font-display); color: var(--v2-ink); font-size: 16px; margin-bottom: 4px; }
.v2-skel { background: linear-gradient(90deg, var(--v2-bg-3) 0%, var(--v2-bg-4) 50%, var(--v2-bg-3) 100%); background-size: 200% 100%; animation: v2-shimmer 1.4s infinite; }
@keyframes v2-shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
    html.v2 *, html.v2 *::before, html.v2 *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
