/* Shared navigation is visible without JavaScript on desktop and mobile. */
body>.topbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px 24px;padding:16px 24px}
body>.topbar>.brand{flex:0 0 auto;max-width:100%;font-size:16px}
body>.topbar>nav{display:flex;flex:1 1 760px;flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px 10px;min-width:0}
body>.topbar>nav>a{padding:8px 7px;font-size:13px;line-height:1.3;border-radius:6px}
body>.topbar>nav>a:hover{background:var(--bg);text-decoration:underline}
body>.topbar>nav form{margin:0}body>.topbar>nav button{font-size:13px;padding:8px 14px}
.appearance-settings{margin:16px 0 28px;padding:22px;border:1px solid var(--line);border-radius:14px;background:var(--panel);max-width:680px}
.appearance-settings h3{margin:0 0 10px;font-size:20px}.appearance-settings p{line-height:1.5}
.appearance-options{border:0;margin:22px 0 18px;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:14px;min-width:0}
.appearance-legend{font-weight:700;margin-bottom:12px;color:var(--text)}
.appearance-option{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:12px;padding:16px;border:2px solid var(--line);border-radius:12px;cursor:pointer;color:var(--text);font-weight:600;min-width:0}
.appearance-option:has(input:checked){border-color:var(--accent)}.appearance-option:focus-within{outline:2px solid var(--accent);outline-offset:3px}
.appearance-option input[type=radio]{width:20px;height:20px;margin:0;padding:0;accent-color:var(--accent)}
.appearance-option>span:last-child{grid-column:2}.appearance-sample{display:block;position:relative;border:1px solid #a2afb9;border-radius:7px;height:64px;overflow:hidden}
.appearance-sample i{display:block;height:14px;margin-bottom:10px}.appearance-sample b{display:block;height:18px;margin:0 10px;border-radius:4px}
.appearance-light{background:#f1f4f7}.appearance-light i{background:white}.appearance-light b{background:#d3e8e4}
.appearance-dark{background:#101a22}.appearance-dark i{background:#21323e}.appearance-dark b{background:#24534d}
.appearance-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.appearance-actions p{margin:0;font-size:14px;color:var(--muted);flex:1 1 240px}
.appearance-actions button{min-height:44px}.appearance-settings form{margin:0}
@media(max-width:760px){body>.topbar{padding:12px 16px}body>.topbar>nav{flex-basis:100%;gap:5px 8px}body>.topbar>nav>a{font-size:12px;padding:8px 5px}body>.topbar>.brand{font-size:15px}.appearance-settings{padding:18px 14px}.appearance-options{gap:10px}.appearance-option{padding:12px 9px;gap:8px}.appearance-actions button{width:100%}}

html[data-site-theme=dark]{color-scheme:dark;--bg:#101a22;--panel:#182630;--text:#e5edf2;--muted:#acbdc9;--line:#364957;--accent:#7ad8c8;--accent-dark:#a1e8dc;--danger:#f5a5a5;--surface-alt:#20323e;--success-bg:#183c31;--success-text:#a1e2bd;--warning-bg:#3d3221;--warning-text:#f2d099;--error-bg:#42282c;--error-text:#ffc0ba;--info-bg:#20364b;--info-text:#b5d8fa}
html[data-site-theme=dark] body{background:var(--bg);color:var(--text)}
html[data-site-theme=dark] :is(a,.auth-brand){color:var(--accent)}
html[data-site-theme=dark] .topbar nav a{color:var(--text)}
html[data-site-theme=dark] :is(input,select,textarea){background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-site-theme=dark] input::placeholder,html[data-site-theme=dark] textarea::placeholder{color:#a4b6c4;opacity:1}
html[data-site-theme=dark] :is(button,input[type=submit],.button,.btn,.login-link,.app-download-button,.modal-primary-close){background:#176b62;color:#fff;border-color:#368e83}
html[data-site-theme=dark] :is(button,input[type=submit],.button,.btn,.login-link,.app-download-button,.modal-primary-close):hover{background:#205c56;color:#fff}
html[data-site-theme=dark] :is(button.danger,.button.danger){background:#783b40;color:#fff;border-color:#a95e65}
html[data-site-theme=dark] :is(button.secondary,.button.secondary,.password-eye-button,.visibility-button){background:var(--surface-alt);color:var(--text);border-color:var(--line)}
html[data-site-theme=dark] :is(button:disabled,input:disabled,select:disabled){opacity:.6}
html[data-site-theme=dark] :is(.modal-card,.form-panel,.settings,.obs-android-page .panel-section){background:var(--panel);color:var(--text)}
html[data-site-theme=dark] :is(.modal-x-close,.password-eye-button):hover{background:var(--surface-alt);color:var(--text)}
html[data-site-theme=dark] :is(.health-metrics div,.key-request-panel,.history-periods,.metric,.operator-cell,.server-hidden-row,.obs-config-preview>div,.obs-relay-status>div){background:var(--surface-alt);color:var(--text);border-color:var(--line)}
html[data-site-theme=dark] :is(.account-tabs a,.subtabs a){background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-site-theme=dark] :is(.account-tabs a.active,.subtabs a.active,.history-period.active){background:#254c46;color:#b0ede2;border-color:#519d90}
html[data-site-theme=dark] :is(.health-metrics dd,.metric span,.metric strong){color:var(--text)}
html[data-site-theme=dark] :is(.notice,.probe-card,.load-row.warning,.server-card.stale,.public-status-card.unstable){background:var(--warning-bg);color:var(--warning-text)}
html[data-site-theme=dark] :is(.notice.success,.load-row.ok,.server-card.online,.public-status-card.online,.new-key-row){background:var(--success-bg);color:var(--success-text)}
html[data-site-theme=dark] :is(.notice.danger,.danger-panel,.load-row.danger,.server-card.offline,.public-status-card.offline){background:var(--error-bg);color:var(--error-text)}
html[data-site-theme=dark] :is(.key-instruction,.reboot-progress,.consent-field,.reboot-key-info){background:var(--info-bg);color:var(--info-text);border-color:#3b5974}
html[data-site-theme=dark] :is(.health-badge,.load-row.offline,.public-status-card.checking){background:var(--surface-alt);color:var(--muted)}
html[data-site-theme=dark] :is(.health-badge.online,.server-visible-badge,.server-card.selected){background:var(--success-bg);color:var(--success-text)}
html[data-site-theme=dark] :is(.health-badge.offline,.server-hidden-badge,.server-card.selected.offline){background:var(--error-bg);color:var(--error-text)}
html[data-site-theme=dark] :is(.health-badge.unstable,.server-stale-badge,.server-card.selected.stale,.server-status-stale){background:var(--warning-bg);color:var(--warning-text)}
html[data-site-theme=dark] :is(.public-status-card.online span,.server-card.online .server-card-status,.site-check-list li.ok strong,.password-match-hint.is-ok,.vpn-peers .active,.server-card.selected::after){color:var(--success-text)}
html[data-site-theme=dark] :is(.public-status-card.offline span,.server-card.offline .server-card-status,.site-check-list li.failed strong,.password-match-hint.is-error,.server-status-detail,.error-detail,.app-download-error){color:var(--error-text)}
html[data-site-theme=dark] :is(.public-status-card.unstable span,.server-card.stale .server-card-status,.server-card-lock){color:var(--warning-text)}
html[data-site-theme=dark] :is(.public-status-card.checking span,.vpn-peers small,.vpn-peers .idle,.key-request-hint,.app-keys-hint,.form-hint,.field-hint,.server-hidden-row td){color:var(--muted)}
html[data-site-theme=dark] .log-view{background:#0c141d;color:var(--text)}
html[data-site-theme=dark] .history-card{--chart-color:#a9b8c8}
html[data-site-theme=dark] .history-card.online{--chart-color:#72d9a4}html[data-site-theme=dark] .history-card.speed{--chart-color:#72ceda}html[data-site-theme=dark] .history-card.load{--chart-color:#e8b66e}html[data-site-theme=dark] .history-card.ram{--chart-color:#b5a0ed}

/* Account download banner and settings. */
html[data-site-theme=dark] :is(.awg-announcement,.awg-preview-card,.telegram-binding-card){background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-site-theme=dark] .awg-announcement :is(details,summary){background:var(--surface-alt);color:var(--text);border-color:var(--line)}
html[data-site-theme=dark] .appearance-settings{background:var(--panel)}
html[data-site-theme=dark] :is(.app-logo,.app-platform-choice,.windows-download-group){background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-site-theme=dark] .app-platform-choice.is-active{background:var(--success-bg);color:var(--success-text)}
html[data-site-theme=dark] .app-platform-prompt{color:var(--muted)}html[data-site-theme=dark] .windows-download-group-body{border-color:var(--line)}
html[data-site-theme=dark] .app-download-missing{background:var(--error-bg);color:var(--error-text)}

/* Connection charts and diagnostics. Status colour is always paired with text. */
html[data-site-theme=dark] .bvo-admin{--bvo-line:var(--line);--bvo-muted:var(--muted);--bvo-accent:var(--accent);color:var(--text)}
html[data-site-theme=dark] .bvo-admin :is(section,.stat,details,td,.button,button,input,select,textarea,.periods a,.quick-filters a,.empty,.table-wrap tbody tr){background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-site-theme=dark] .bvo-admin :is(.intro,.server-bar b,.device,.person){color:var(--text)}
html[data-site-theme=dark] .bvo-admin :is(.stat b,.button,button,.chart-values summary){color:var(--accent)}
html[data-site-theme=dark] .bvo-admin :is(.primary,.periods [aria-current=page],.quick-filters [aria-current=page]){background:#176b62;color:#fff;border-color:#368e83}
html[data-site-theme=dark] .bvo-admin :is(th,pre,.timezone,.chart-empty,.status,.badge){background:var(--surface-alt);color:var(--muted);border-color:var(--line)}
html[data-site-theme=dark] .bvo-admin :is(.traffic,.selected,.review-fixed,.retention,.nav-links a.active){background:var(--success-bg);color:var(--success-text);border-color:#356450}
html[data-site-theme=dark] .bvo-admin :is(.recent,.severity-low){background:var(--info-bg);color:var(--info-text)}
html[data-site-theme=dark] .bvo-admin :is(.unknown,.missing,.notice,.severity-medium,.review-needs_info){background:var(--warning-bg);color:var(--warning-text);border-color:#6f5934}
html[data-site-theme=dark] .bvo-admin :is(.revoked,.severity-critical){background:var(--error-bg);color:var(--error-text);border-color:#7e5053}
html[data-site-theme=dark] .bvo-admin .review-new{background:var(--surface-alt);color:var(--muted)}
html[data-site-theme=dark] .bvo-admin .review-in_progress{background:#352d4c;color:#d7c1ff}
html[data-site-theme=dark] .bvo-admin .coverage-note{color:var(--warning-text)}html[data-site-theme=dark] .bvo-admin .refresh-error{color:var(--error-text)}
html[data-site-theme=dark] .bvo-admin .chart-gridline{stroke:#354955}
html[data-site-theme=dark] .bvo-admin .series-0{stroke:#72d5bf;fill:#72d5bf}html[data-site-theme=dark] .bvo-admin .series-1{stroke:#b3a4f1;fill:#b3a4f1}
html[data-site-theme=dark] .bvo-admin .chart-line{fill:none}html[data-site-theme=dark] .bvo-admin .chart-dot.partial{fill:var(--panel)}
html[data-site-theme=dark] .bvo-admin .legend-dot{background:#72d5bf}html[data-site-theme=dark] .bvo-admin .legend-dot.series-1{background:#b3a4f1}
html[data-site-theme=dark] .bvo-admin meter,html[data-site-theme=dark] .bvo-admin meter::-webkit-meter-bar{background:#2e424d}

/* Subscription overview, forms and payment history. */
html[data-site-theme=dark] .billing-shell{color:var(--text)}
html[data-site-theme=dark] .billing-shell :is(.b-card,.b-metric,input,select,.b-secondary){background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-site-theme=dark] .billing-shell :is(.b-muted,.b-help,.b-metric small,.b-table small,.b-audit span,.b-member-list span){color:var(--muted)}
html[data-site-theme=dark] .billing-shell :is(a,.b-eyebrow,.b-metric strong,summary,.b-schedule b){color:var(--accent)}
html[data-site-theme=dark] .billing-shell :is(.b-table th,.b-tabs a,.b-preview,.b-status){background:var(--surface-alt);color:var(--text)}
html[data-site-theme=dark] .billing-shell :is(.b-table td,.b-table th,.b-table tr,.b-member-list li){border-color:var(--line)}
html[data-site-theme=dark] .billing-shell .b-table td[data-label]::before{color:var(--muted)}
html[data-site-theme=dark] .billing-shell :is(.b-notice){background:var(--info-bg);border-color:#3b5974;color:var(--info-text)}
html[data-site-theme=dark] .billing-shell :is(.b-success,.b-status-paid,.b-enable,.b-schedule div){background:var(--success-bg);color:var(--success-text);border-color:#356450}
html[data-site-theme=dark] .billing-shell :is(.b-error){background:var(--error-bg);color:var(--error-text);border-color:#7e5053}
html[data-site-theme=dark] .billing-shell :is(.b-status-overdue,.b-status-due){background:var(--warning-bg);color:var(--warning-text)}
html[data-site-theme=dark] .billing-shell .b-attention strong{color:var(--warning-text)}
html[data-site-theme=dark] .billing-shell :is(button,.b-button,.b-tabs a[aria-current]){background:#176b62;color:#fff;border-color:#368e83}
html[data-site-theme=dark] .billing-shell .b-secondary{background:var(--panel);color:var(--accent);border-color:var(--line)}

/* Filled links need a foreground independent of the generic dark-theme link colour. */
html[data-site-theme=dark] .large-green-action{background:#147a3c;border-color:#368e61;color:#fff}
html[data-site-theme=dark] .large-green-action:hover{background:#116534;color:#fff}
html[data-site-theme=dark] .app-download-button:hover{filter:none}
html[data-site-theme=dark] :is(.button,.btn,.login-link,.app-download-button,.large-green-action,.modal-primary-close):focus-visible{outline:3px solid var(--accent);outline-offset:3px}
