.bvma-hq {
    --hq-bg: #0a1022;
    --hq-panel: #141e36;
    --hq-text: #f4f7ff;
    --hq-muted: #b8c7e1;
    --hq-line: #354661;
    --hq-accent: #9eeaff;
    --hq-violet: #c6b4ff;
    max-width: 1020px;
    margin: 24px auto;
    overflow: hidden;
    border: 1px solid var(--hq-line);
    border-radius: 22px;
    background: var(--hq-bg);
    color: var(--hq-text);
    font: 16px/1.5 system-ui, sans-serif;
    color-scheme: dark;
}
.bvma-hq *, .bvma-hq *::before, .bvma-hq *::after { box-sizing: border-box; }
.bvma-hq [hidden] { display: none !important; }
.bvma-hq h1, .bvma-hq h2, .bvma-hq h3 {
    color: var(--hq-text);
    font-family: inherit;
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.15;
    margin: 0 0 8px;
}
.bvma-hq h1 { font-size: clamp(2.5rem, 7vw, 4.65rem); }
.bvma-hq h2 { font-size: clamp(1.55rem, 4.4vw, 2.35rem); }
.bvma-hq h3 { font-size: 1.22rem; }
.bvma-hq p { margin: 0 0 12px; }
.bvma-hq a { color: var(--hq-accent); }
.bvma-hq .hq-hero {
    padding: clamp(24px, 6vw, 58px);
    background: radial-gradient(ellipse at 95% 0%, #46317c 0, transparent 52%),
        linear-gradient(125deg, #14284d, #10182d 65%);
    border-bottom: 1px solid var(--hq-line);
}
.bvma-hq .hq-hero p:last-child { max-width: 38rem; margin-bottom: 0; color: var(--hq-muted); }
.bvma-hq .hq-kicker { color: var(--hq-accent); font-size: .75rem; letter-spacing: .16em; font-weight: 800; text-transform: uppercase; }
.bvma-hq .hq-screen { padding: clamp(16px, 4.2vw, 38px); }
.bvma-hq .hq-screen[aria-busy="true"] { cursor: progress; }
.bvma-hq .hq-muted { color: var(--hq-muted); }
.bvma-hq .hq-account, .bvma-hq .hq-card-title, .bvma-hq .hq-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.bvma-hq .hq-account { margin: 0 0 22px; font-size: .91rem; color: var(--hq-muted); }
.bvma-hq .hq-account strong { color: var(--hq-text); }
.bvma-hq .hq-switch { margin-bottom: 18px; max-width: 26rem; }
.bvma-hq .hq-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0;
}
.bvma-hq .hq-stats > div, .bvma-hq .hq-brief, .bvma-hq .hq-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--hq-line);
    border-radius: 14px;
    background: var(--hq-panel);
}
.bvma-hq .hq-stats span, .bvma-hq .hq-stats small { display: block; color: var(--hq-muted); font-size: .82rem; }
.bvma-hq .hq-stats strong { display: block; color: var(--hq-violet); font-size: 1.9rem; line-height: 1.2; }
.bvma-hq .hq-weeks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bvma-hq .hq-weeks button, .bvma-hq .hq-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid var(--hq-line);
    border-radius: 9px;
    background: var(--hq-panel);
    color: var(--hq-text);
    font: inherit;
    font-weight: 700;
    text-transform: none;
    text-decoration: none;
    cursor: pointer;
}
.bvma-hq .hq-button, .bvma-hq .hq-weeks button[aria-current="true"] {
    background: var(--hq-accent);
    color: #07172a;
    border-color: var(--hq-accent);
}
.bvma-hq :is(a,button,input,select,textarea):focus-visible { outline: 2px solid var(--hq-violet); outline-offset: 3px; }
.bvma-hq .hq-brief, .bvma-hq .hq-card { margin-bottom: 14px; }
.bvma-hq .hq-card h3 { margin: 0; }
.bvma-hq .hq-card > p { margin-top: 8px; }
.bvma-hq .hq-brief p:last-child { margin-bottom: 0; }
.bvma-hq .hq-alert { color: #ffe19a; }
.bvma-hq .hq-pill { color: var(--hq-violet); border: 1px solid var(--hq-line); padding: 3px 10px; border-radius: 20px; font-size: .82rem; }
.bvma-hq .hq-pill[data-done="yes"] { color: #a6f6cb; border-color: #558b70; }
.bvma-hq form, .bvma-hq fieldset { margin: 0; }
.bvma-hq fieldset { border: 0; padding: 0; min-width: 0; }
.bvma-hq fieldset:disabled :is(input,select,textarea,button) { opacity: .6; cursor: not-allowed; }
.bvma-hq .hq-exercise {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--hq-line);
}
.bvma-hq .hq-exercises { margin-bottom: 12px; }
.bvma-hq .hq-exercise p { margin: 3px 0 0; font-size: .89rem; }
.bvma-hq .hq-dose { color: var(--hq-accent); }
.bvma-hq label { display: block; color: var(--hq-text); font-size: .9rem; }
.bvma-hq :is(input[type="text"], select, textarea) {
    display: block;
    width: 100%;
    margin: 4px 0 0;
    padding: 8px 10px;
    min-height: 42px;
    border: 1px solid var(--hq-line);
    border-radius: 8px;
    background: var(--hq-bg);
    color: var(--hq-text);
    font: inherit;
    font-size: 16px;
}
.bvma-hq .hq-ratings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.bvma-hq .hq-actions { justify-content: flex-start; margin-top: 10px; }
.bvma-hq .hq-check { display: inline-flex; align-items: center; gap: 6px; }
.bvma-hq input[type="checkbox"] { accent-color: var(--hq-accent); }
.bvma-hq [data-hq-status] { color: var(--hq-muted); }
.bvma-hq .hq-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    clip-path: inset(50%);
    white-space: nowrap;
    overflow: hidden;
}
@media (max-width: 640px) {
    .bvma-hq .hq-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bvma-hq .hq-exercise { grid-template-columns: 1fr; }
}

.bvma-hq .hq-mission {
    background: linear-gradient(105deg, #172943, #26204a);
    border-color: #6c65a5;
}
.bvma-hq details > summary {
    cursor: pointer;
    color: var(--hq-text);
    font-weight: 750;
}
.bvma-hq summary > span {
    display: inline-block;
    margin-left: 8px;
    font-size: .82rem;
    font-weight: 550;
    color: var(--hq-muted);
}
.bvma-hq details[open] > summary {
    margin-bottom: 12px;
}
.bvma-hq .hq-workout { scroll-margin-top: 70px; }
.bvma-hq .hq-set-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.bvma-hq :is(input[type="date"],input[type="url"]) {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    margin: 4px 0 0;
    border: 1px solid var(--hq-line);
    border-radius: 8px;
    background: var(--hq-bg);
    color: var(--hq-text);
    font: inherit;
    font-size: 16px;
}
.bvma-hq .hq-timer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.bvma-hq .hq-timer button {
    min-height: 36px;
    border: 1px solid var(--hq-line);
    border-radius: 8px;
    background: var(--hq-bg);
    color: var(--hq-accent);
    font: inherit;
    font-size: .82rem;
    padding: 5px 10px;
    cursor: pointer;
}
.bvma-hq .hq-timer output {
    color: var(--hq-violet);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}
.bvma-hq .hq-profile {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}
.bvma-hq .hq-profile > div {
    padding: 10px;
    background: var(--hq-bg);
    border-radius: 8px;
    border: 1px solid var(--hq-line);
    min-width: 0;
}
.bvma-hq .hq-profile span { display: block; color: var(--hq-muted); font-size: .85rem; }
.bvma-hq .hq-profile strong { overflow-wrap: anywhere; }
.bvma-hq .hq-subpanel { padding: 10px 0; border-top: 1px solid var(--hq-line); }
.bvma-hq .hq-banner {
    margin: 0 0 14px;
    padding: 10px 15px;
    border: 1px solid #a296e2;
    border-radius: 9px;
    background: #322558;
    color: #fff;
    font-weight: 750;
}
@media (prefers-reduced-motion: no-preference) {
    .bvma-hq .hq-banner:not([hidden]) { animation: hq-enter .3s ease-out; }
    @keyframes hq-enter {
        from { opacity: 0; transform: translateY(5px); }
        to { opacity: 1; transform: translateY(0); }
    }
}
@media (max-width: 420px) {
    .bvma-hq .hq-ratings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Dedicated system screen */
body.bvma-hq-fullscreen {
    min-height: 100vh;
    margin: 0 !important;
    background: #050b19 !important;
    color: #eaf4ff;
}
.bvma-hq-fullscreen .hq-standalone {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0 clamp(12px, 4vw, 64px) 54px;
    background:
        radial-gradient(ellipse at 80% 0, #0b3051 0%, transparent 37%),
        radial-gradient(ellipse at 2% 65%, #1b1748 0%, transparent 32%),
        #060b19;
}
.bvma-hq-fullscreen .hq-standalone::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    pointer-events: none;
    background-image: linear-gradient(#8ad6ff0b 1px, transparent 1px), linear-gradient(90deg, #8ad6ff0b 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(black, transparent 85%);
}
.hq-standalone-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 1400px;
    min-height: 52px;
    margin: 0 auto;
    color: #b2cced;
    font: 700 .75rem/1.3 system-ui, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.hq-standalone-bar a {
    color: #9de5ff;
    text-decoration: underline;
    text-underline-offset: .2em;
}
.bvma-hq-fullscreen .bvma-hq {
    --hq-bg: #09152b;
    --hq-panel: #0d1b34;
    --hq-line: #284765;
    --hq-accent: #8fedff;
    max-width: 1400px;
    margin: 0 auto;
    border-radius: 8px;
    background: #071021e8;
    box-shadow: 0 30px 90px #0006;
}
.bvma-hq .hq-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: radial-gradient(ellipse at 83% 30%, #123d70 0%, transparent 51%),
        linear-gradient(130deg, #0b1b36 0%, #090f26 72%);
    border-bottom-color: #3c668c;
}
.bvma-hq-fullscreen .bvma-hq .hq-hero {
    min-height: clamp(216px, 28vw, 330px);
    display: flex;
    align-items: end;
}
.bvma-hq .hq-hero h1 {
    font-size: clamp(2.65rem, 8vw, 6.2rem);
    color: #e3f6ff;
    letter-spacing: -.065em;
    line-height: 1;
    text-shadow: 0 0 32px #68b6ff5e;
}
.bvma-hq .hq-hero-text { position: relative; z-index: 1; }
.bvma-hq .hq-hero .hq-kicker { letter-spacing: .24em; }
.bvma-hq .hq-hero .hq-kicker span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #83f6ff;
    box-shadow: 0 0 12px #53f5ff;
    margin: 0 7px 1px 0;
}
.bvma-hq .hq-hero-sigil {
    position: absolute;
    right: clamp(-65px, 2vw, 42px);
    top: 50%;
    width: clamp(190px, 36vw, 380px);
    aspect-ratio: 1;
    transform: translateY(-50%) rotate(20deg);
    opacity: .65;
    pointer-events: none;
}
.bvma-hq .hq-hero-sigil span, .bvma-hq .hq-hero-sigil i {
    position: absolute;
    inset: 5%;
    border-radius: 50%;
    border: 1px solid #85deff80;
    box-shadow: inset 0 0 32px #227cbe2b, 0 0 23px #227cbe4d;
}
.bvma-hq .hq-hero-sigil span:nth-child(2) { inset: 13%; border-style: dashed; }
.bvma-hq .hq-hero-sigil span:nth-child(3) { inset: 23%; border-radius: 8px; transform: rotate(25deg); }
.bvma-hq .hq-hero-sigil i { inset: 34%; border-radius: 1px; transform: rotate(25deg); border-color: #a2e3ff; }
.bvma-hq .hq-rank-section { margin: 24px 0; }
.bvma-hq .hq-rank-section .hq-stats { margin: 0 0 8px; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); }
.bvma-hq .hq-rank-section .hq-stats > div {
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.bvma-hq .hq-rank-section .hq-stats .hq-rank-current {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    background: linear-gradient(116deg, #162b49, #121a36);
}
.bvma-hq .hq-rank-current img { width: min(42%, 96px); height: auto; filter: drop-shadow(0 0 12px #85c4fb50); }
.bvma-hq .hq-rank-current strong { font-size: 2.7rem; }
.bvma-hq .hq-rank-track {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.bvma-hq .hq-rank-track li {
    min-width: 0;
    text-align: center;
    background: #0b192c;
    border: 1px solid #29405c;
    border-radius: 7px;
    padding: 3px 2px 7px;
    color: #abc4e4;
    font-size: clamp(.65rem, 2vw, .8rem);
    font-weight: 650;
}
.bvma-hq .hq-rank-track img { display: block; width: min(100%, 66px); height: auto; margin: 0 auto; }
.bvma-hq .hq-rank-track li[data-rank-state="locked"] img { opacity: .58; }
.bvma-hq .hq-rank-track li[data-rank-state="current"] { border-color: #93eeff; color: #e5faff; box-shadow: inset 0 0 18px #4fbbff30; }
.bvma-hq .hq-system-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.bvma-hq .hq-system-nav button {
    appearance: none;
    min-height: 42px;
    padding: 5px 12px;
    border: 1px solid #2f5474;
    border-radius: 5px;
    background: #0a2039;
    color: #bbecff;
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
}
.bvma-hq .hq-system-nav button:hover { background: #153956; }
.bvma-hq [data-hq-section] { scroll-margin-top: 28px; }
@media (max-width: 760px) {
    .bvma-hq .hq-rank-section .hq-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bvma-hq .hq-hero-sigil { opacity: .4; }
}
@media (max-width: 420px) {
    .bvma-hq .hq-rank-section .hq-stats > div { padding: 10px; }
    .bvma-hq .hq-rank-current img { width: 34%; }
    .hq-standalone-bar { font-size: .65rem; letter-spacing: .08em; }
}

.bvma-hq .hq-selectors {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}
.bvma-hq .hq-week-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.bvma-hq .hq-day {
    min-width: 0;
    border: 1px solid var(--hq-line);
    border-radius: 8px;
    padding: 8px;
    background: var(--hq-bg);
}
.bvma-hq .hq-day span, .bvma-hq .hq-day small { display: block; color: var(--hq-muted); font-size: .8rem; }
.bvma-hq .hq-day span { color: var(--hq-accent); font-weight: 750; margin-bottom: 5px; }
.bvma-hq .hq-day-mission {
    appearance: none;
    display: block;
    width: 100%;
    min-height: 38px;
    margin: 4px 0;
    padding: 5px;
    text-align: left;
    border: 1px solid var(--hq-line);
    border-radius: 5px;
    color: var(--hq-text);
    background: var(--hq-panel);
    font: inherit;
    font-size: .79rem;
    line-height: 1.25;
    cursor: pointer;
}
.bvma-hq .hq-phase-list { margin: 10px 0 0; padding-left: 23px; }
.bvma-hq .hq-phase-list p { color: var(--hq-muted); }
@media (max-width: 800px) {
    .bvma-hq .hq-week-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.bvma-hq .hq-build { display: block; margin-top: 9px; color: var(--hq-muted); font-size: .73rem; }
.bvma-hq .hq-discipline-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.bvma-hq .hq-discipline-grid small { min-height: 2.4em; margin: 4px 0 8px; }
.bvma-hq [data-hq-start-year] { margin: 0 0 10px; }
.bvma-hq [data-hq-start-year] [data-hq-status] { margin-left: 6px; }
@media (max-width: 800px) {
    .bvma-hq .hq-discipline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
    .bvma-hq .hq-discipline-grid { grid-template-columns: 1fr; }
    .bvma-hq .hq-discipline-grid small { min-height: auto; }
}
