/* MyVPN interface.
   One stylesheet for the admin console, the personal editor and the
   public subscription pages. Class names and data-* attributes are a
   contract with app.js: keep them when changing markup. */

@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-500.ttf") format("truetype"); font-weight: 500 600; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #121315;
  --side: #16171a;
  --surface: #1a1b1e;
  --raised: #202226;
  --hover: #26282c;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #ececee;
  --text-2: #c2c3c7;
  --muted: #8e9097;
  --faint: #66686f;
  --accent: #44c08a;
  --accent-hover: #52cd97;
  --accent-ink: #07170f;
  --accent-soft: rgba(68, 192, 138, .12);
  --accent-line: rgba(68, 192, 138, .45);
  --ok: #4cc38e;
  --warn: #e0ae4f;
  --danger: #ef7568;
  --danger-soft: rgba(239, 117, 104, .12);
  --warn-soft: rgba(224, 174, 79, .13);
  --idle: #74767d;
  --scroll: rgba(255, 255, 255, .16);
  --scroll-hover: rgba(255, 255, 255, .28);
  --overlay: rgba(0, 0, 0, .55);
  --shadow: 0 12px 32px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .06);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 8px;
  --r-lg: 12px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f5f5f6;
    --side: #fbfbfb;
    --surface: #ffffff;
    --raised: #f7f7f8;
    --hover: #efeff1;
    --line: rgba(0, 0, 0, .075);
    --line-2: rgba(0, 0, 0, .13);
    --text: #1b1c1f;
    --text-2: #3c3e44;
    --muted: #6c6e75;
    --faint: #9a9ca2;
    --accent: #14945f;
    --accent-hover: #10824f;
    --accent-ink: #ffffff;
    --accent-soft: rgba(20, 148, 95, .1);
    --accent-line: rgba(20, 148, 95, .45);
    --ok: #13915c;
    --warn: #a86d00;
    --danger: #cf3d2e;
    --danger-soft: rgba(207, 61, 46, .08);
    --warn-soft: rgba(168, 109, 0, .1);
    --idle: #a3a5ab;
    --scroll: rgba(0, 0, 0, .18);
    --scroll-hover: rgba(0, 0, 0, .32);
    --overlay: rgba(20, 20, 24, .35);
    --shadow: 0 12px 32px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .06);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font: 400 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
code { font-family: var(--mono); font-size: 12.5px; }
small { font-size: 12.5px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Scrollbars: thin, no arrow buttons, follow the theme */
* { scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll); background-clip: padding-box; border: 3px solid transparent; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); background-clip: padding-box; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

.ui-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ui-arrow { width: 15px; height: 15px; flex: none; }
.ui-arrow-left { transform: rotate(180deg); }
.ui-arrow-up { transform: rotate(-90deg); }
.ui-arrow-down { transform: rotate(90deg); }
.ui-arrow-up-right { transform: rotate(-45deg); }

/* ---------- Buttons & fields ---------- */
.primary, .secondary, .action-confirm-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 0 14px; border-radius: var(--r);
  font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s;
}
.primary { border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); }
.primary:hover { background: var(--accent-hover); }
.primary .ui-icon { width: 16px; height: 16px; }
.secondary { border: 1px solid var(--line-2); background: var(--surface); color: var(--text); }
.secondary:hover { background: var(--hover); }
.compact { min-height: 30px; padding: 0 11px; font-size: 13px; }
.wide { width: 100%; }
.text-button, .text-action, .danger-link {
  border: 0; background: none; padding: 5px 8px; border-radius: 6px;
  color: var(--muted); font-size: 13px;
}
.text-button:hover, .text-action:hover { color: var(--text); background: var(--hover); }
.danger-link:hover { color: var(--danger); background: var(--danger-soft); }
.danger-text { color: var(--danger) !important; }

input:not([type="checkbox"]):not([type="hidden"]), select, textarea {
  width: 100%; min-height: 36px; padding: 0 11px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); color: var(--text);
}
input::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="search"]::-webkit-search-cancel-button { filter: grayscale(1); opacity: .6; }

/* Select enhanced by app.js; the native element stays the source of truth */
.custom-select { position: relative; }
.custom-select-native { position: absolute !important; inset: 0; opacity: 0; pointer-events: none; }
.custom-select-trigger {
  width: 100%; height: var(--custom-select-height, 36px); padding: 0 8px 0 11px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--text); text-align: left;
}
.custom-select-trigger:hover { background: var(--hover); }
.custom-select-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-trigger svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.custom-select.is-open .custom-select-trigger { border-color: var(--accent-line); }
.custom-select-menu {
  position: absolute; z-index: 40; left: 0; min-width: 100%; top: calc(100% + 4px);
  max-height: 280px; overflow: auto; padding: 4px; border-radius: 10px; background: var(--raised); box-shadow: var(--shadow);
}
.custom-select-menu.opens-up { top: auto; bottom: calc(100% + 4px); }
.custom-select-menu button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 9px; border: 0; border-radius: 6px; background: none; text-align: left; white-space: nowrap;
}
.custom-select-menu button:hover, .custom-select-menu button:focus-visible { background: var(--hover); outline: none; }
.custom-select-menu button svg { width: 15px; height: 15px; fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0; }
.custom-select-menu button[aria-selected="true"] svg { opacity: 1; }

/* ---------- Status ---------- */
.status-label {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 13px; color: var(--muted); white-space: nowrap;
}
.status-label i { display: none; }
.status-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--idle); }
.status-label.ok, .status-label.online { color: var(--text-2); }
.status-label.ok::before, .status-label.online::before { background: var(--ok); }
.status-label.off, .status-label.offline { color: var(--danger); }
.status-label.off::before, .status-label.offline::before { background: var(--danger); }

.health, .flow-health { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.health i, .flow-health i { width: 7px; height: 7px; border-radius: 50%; background: var(--idle); flex: none; }
.health.online i, .flow-health.online i { background: var(--ok); }
.health.slow, .flow-health.slow { color: var(--warn); } .health.slow i, .flow-health.slow i { background: var(--warn); }
.health.offline, .flow-health.offline { color: var(--danger); } .health.offline i, .flow-health.offline i { background: var(--danger); }
.health.checking i, .flow-health.checking i { background: var(--muted); animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

.protocol, .flow-card-type {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px;
  background: var(--hover); color: var(--muted); font: 500 11px/1 var(--mono); text-transform: lowercase;
}

/* ---------- Dialogs ---------- */
dialog {
  width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--r-lg);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
dialog::backdrop { background: var(--overlay); }
.dialog-form { display: grid; gap: 14px; padding: 20px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-head h2 { font-size: 17px; }
.dialog-head button { width: 30px; height: 30px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 20px; line-height: 1; }
.dialog-head button:hover { background: var(--hover); color: var(--text); }
.dialog-form label { display: grid; gap: 5px; font-size: 13px; color: var(--text-2); }
.dialog-form label small { color: var(--faint); }
.dialog-note { color: var(--muted); font-size: 13px; }
.dialog-form .primary { margin-top: 4px; }

.action-confirm-card { display: grid; gap: 8px; padding: 20px; }
.action-confirm-symbol { display: none; }
.action-confirm-card h2 { font-size: 17px; }
.action-confirm-card p { color: var(--muted); }
.action-confirm-buttons { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.action-confirm-submit { border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); }
.action-confirm-dialog.is-danger .action-confirm-submit { background: var(--danger); color: #fff; }
.action-confirm-dialog.is-warning .action-confirm-submit { background: var(--warn); color: #1d1300; }

/* ---------- Console layout ---------- */
.app-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.console-sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 14px 10px; border-right: 1px solid var(--line); background: var(--side);
}
.console-brand, .mobile-brand, .access-brand, .simple-access-brand, .public-editor-brand, .brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; }
.console-brand span, .mobile-brand span, .access-brand span, .simple-access-brand span, .public-editor-brand span, .brand-mark {
  width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px;
  background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700;
}
.console-brand { padding: 4px 8px 16px; }
.console-nav { display: grid; gap: 1px; }
.console-nav a, .sidebar-logout {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px;
  border: 0; border-radius: 7px; background: none; color: var(--muted); text-align: left;
}
.console-nav a:hover, .sidebar-logout:hover { background: var(--hover); color: var(--text); }
.console-nav a.active { background: var(--hover); color: var(--text); font-weight: 500; }
.console-nav .ui-icon { width: 17px; height: 17px; }
.console-sidebar-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.sidebar-role { display: flex; align-items: center; gap: 9px; padding: 6px 9px; color: var(--muted); font-size: 13px; }
.sidebar-role span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); color: var(--text-2); font-size: 11px; font-weight: 600; }
.sidebar-role b { font-weight: 400; }

.console-frame { min-width: 0; display: flex; flex-direction: column; }
.console-topbar { display: flex; align-items: center; height: 48px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.mobile-brand { display: none; }
.topbar-context { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 13px; }
.topbar-context b { color: var(--text-2); font-weight: 500; }
.topbar-context i { font-style: normal; }
.topbar-health { display: none; }

.console-page { width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px 28px 80px; display: grid; gap: 18px; align-content: start; }
.product-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.product-page-head h1 { font-size: 22px; }
.product-page-head p { margin-top: 3px; color: var(--muted); }
.product-page-head p b { color: var(--text); font-weight: 600; }
.product-page-head form { margin: 0; }
.editor-head { align-items: flex-end; }
.back-link { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.back-link:hover { color: var(--text); }

.data-surface, .builder-console, .user-console { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.data-surface { overflow: hidden; }
.surface-head, .list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.surface-head h2, .list-toolbar h2 { font-size: 14px; }
.surface-head p, .list-toolbar p { color: var(--faint); font-size: 12.5px; }
.surface-head > a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.surface-head > a:hover { color: var(--text); }
.list-toolbar > div { display: flex; align-items: center; gap: 8px; }
.list-toolbar > div span { color: var(--faint); font-size: 13px; }

.empty-state { display: grid; justify-items: center; gap: 4px; padding: 40px 20px; text-align: center; }
.empty-state strong { font-weight: 500; }
.empty-state small { color: var(--muted); }
.empty-state a, .empty-state button { margin-top: 10px; }
.empty-state a:not(.primary) { color: var(--accent); }
.quiet-state { display: grid; gap: 2px; padding: 16px; }
.quiet-state strong { font-weight: 500; }
.quiet-state small { color: var(--muted); }

.error-banner, .checking-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); background: var(--raised); border: 1px solid var(--line); font-size: 13.5px; }
.error-banner { background: var(--danger-soft); border-color: transparent; }
.error-banner strong { color: var(--danger); font-weight: 600; }
.checking-banner small { display: block; color: var(--muted); }
.live-health-banner { color: var(--text-2); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--text); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.inline-error, .inline-action-error { display: block; margin-top: 3px; color: var(--danger); font-size: 12.5px; }

/* ---------- Overview ---------- */
.stat-row { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 10px; }
.stat { display: grid; align-content: start; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.stat:hover { border-color: var(--line-2); }
.stat-label { color: var(--muted); font-size: 13px; }
.stat strong { font-size: 24px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat strong small { font-size: 14px; font-weight: 400; color: var(--muted); }
.meter { display: block; height: 4px; margin-top: 6px; border-radius: 4px; background: var(--hover); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.attention-row, .recent-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.attention-row:last-child, .recent-row:last-child { border-bottom: 0; }
.attention-row:hover, .recent-row:hover { background: var(--raised); }
.attention-row strong, .recent-row strong { display: block; font-weight: 500; }
.attention-row small, .recent-row small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-row > .ui-icon { color: var(--faint); width: 16px; height: 16px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--idle); }
.status-dot.critical { background: var(--danger); }
.status-dot.warning { background: var(--warn); }
.compact-avatar, .user-avatar, .source-mark, .bundle-symbol, .bundle-option-mark, .bundle-picker-mark {
  width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--hover); color: var(--text-2); font-size: 13px; font-weight: 600;
}

/* ---------- Sources ---------- */
.source-record, .bundle-record { display: grid; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.source-record { grid-template-columns: auto minmax(0, 1.3fr) minmax(0, 1fr) 120px auto; }
.source-record:last-child, .bundle-record:last-child { border-bottom: 0; }
.source-record:hover, .bundle-record:hover { background: var(--raised); }
.source-mark, .bundle-symbol { border-radius: 8px; }
.source-record h3, .bundle-record h3 { font-size: 14px; font-weight: 500; }
.source-record-main p { color: var(--muted); font-size: 12.5px; text-transform: none; }
.source-sync { display: grid; }
.source-sync span { color: var(--faint); font-size: 12px; }
.source-sync strong { font-weight: 400; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.source-static { color: var(--faint); font-size: 13px; }
.source-record form { margin: 0; }

/* ---------- Servers ---------- */
.data-toolbar, .composer-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.data-toolbar label, .composer-controls label { display: grid; gap: 4px; min-width: 170px; }
.data-toolbar label > span, .composer-controls label > span { color: var(--muted); font-size: 12.5px; }
.search-control { flex: 1 1 220px; }
.toolbar-count { margin-left: auto; align-self: center; color: var(--faint); font-size: 13px; }
.server-table-wrap { overflow: auto; max-height: calc(100vh - 230px); }
.server-table { width: 100%; border-collapse: collapse; }
.server-table th { position: sticky; top: 0; z-index: 1; padding: 9px 14px; text-align: left; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12.5px; font-weight: 500; }
.server-table td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.server-table tbody tr:hover { background: var(--raised); }
.server-table tbody tr:last-child td { border-bottom: 0; }
.server-table td strong { display: block; font-weight: 500; }
.server-table td small { display: block; margin-top: 1px; color: var(--faint); font-size: 12px; }
.server-table code { color: var(--muted); }
.server-table .disabled-row td { color: var(--faint); }
.server-table .disabled-row td strong { color: var(--muted); }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.row-actions form { margin: 0; }
.icon-button, .server-toggle {
  min-width: 40px; height: 24px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line-2);
  background: none; color: var(--muted); font-size: 11.5px; font-weight: 600;
}
tr:not(.disabled-row) .server-toggle { color: var(--ok); border-color: var(--accent-line); }
.server-toggle:hover { background: var(--hover); }

/* ---------- Bundles list ---------- */
.bundle-record { grid-template-columns: minmax(0, 1fr) auto auto; }
.bundle-record-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bundle-record-main p { display: flex; flex-wrap: wrap; gap: 8px; color: var(--faint); font-size: 12.5px; }
.bundle-record-main p span { color: var(--muted); }
.bundle-record dl, .user-facts { display: flex; gap: 24px; margin: 0; }
.bundle-record dt, .user-facts dt { color: var(--faint); font-size: 12px; }
.bundle-record dd, .user-facts dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.bundle-record-actions { display: flex; align-items: center; gap: 4px; }
.bundle-record-actions form { margin: 0; }

/* ---------- Bundle editor ---------- */
.builder-console { overflow: visible; }
.builder-console-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.builder-console-head h2 { font-size: 14px; }
.builder-mode-switch { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--hover); }
.builder-mode-switch button { padding: 5px 12px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 13px; }
.builder-mode-switch button b, .builder-mode-switch button small { display: none; }
.builder-mode-switch button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.composer-actions { display: flex; align-items: center; gap: 4px; }
.status-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 8px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.status-legend span { display: inline-flex; align-items: center; gap: 6px; }
.status-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--idle); }
.status-legend i.online { background: var(--ok); } .status-legend i.slow { background: var(--warn); } .status-legend i.offline { background: var(--danger); }
.builder-view { display: none; }
.builder-view.active { display: block; }
.builder-summary { display: none; }

.selection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; padding: 14px 16px 16px; }
.select-card { position: relative; display: grid; gap: 6px; padding: 12px; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.select-card:hover { background: var(--raised); }
.select-card input { position: absolute; opacity: 0; pointer-events: none; }
.select-card .checkmark { position: absolute; top: 11px; right: 11px; width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; border: 1.5px solid var(--line-2); color: transparent; font-size: 11px; font-weight: 700; }
.select-card:has(input:checked) { border-color: var(--accent-line); }
.select-card:has(input:checked) .checkmark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.select-card-top { display: flex; align-items: center; gap: 8px; padding-right: 26px; }
.select-card h3 { font-size: 13.5px; font-weight: 500; }
.server-meta { display: grid; color: var(--muted); font-size: 12.5px; }
.server-meta code { color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-card.text-server, .flow-card.text-server { border-style: dashed; }
.health-alert { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); font-size: 10.5px; font-weight: 700; }
.select-card > .health-alert { position: absolute; right: 36px; top: 12px; }
.empty { grid-column: 1 / -1; padding: 28px; color: var(--muted); text-align: center; }

.flow-builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.flow-palette { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.flow-workspace { display: flex; flex-direction: column; min-width: 0; }
.flow-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.flow-panel-head strong { font-size: 13.5px; font-weight: 500; }
.flow-panel-head small { color: var(--faint); }
.text-block-button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 13px; }
.text-block-button:hover { background: var(--hover); color: var(--text); }
.text-block-button .ui-icon { width: 15px; height: 15px; }
.flow-list { display: grid; align-content: start; gap: 4px; padding: 8px; }
.flow-catalog { max-height: 620px; overflow: auto; }
.flow-sequence { flex: 1; min-height: 260px; transition: background .12s; }
.flow-sequence.drag-active { background: var(--accent-soft); }
.flow-sequence.remove-ready { background: var(--danger-soft); }
.sequence-ruler { display: none; }

.flow-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 8px 7px 10px; border-radius: 8px; border: 1px solid transparent; }
.flow-card:hover { background: var(--raised); border-color: var(--line); }
.flow-card[draggable="true"] { cursor: grab; }
.flow-card > div, .sequence-copy { min-width: 0; }
.flow-card strong { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-card small { display: block; color: var(--faint); font-size: 12px; }
.palette-card > div small, .sequence-copy small { display: inline; margin-right: 10px; }
.palette-card > div .flow-health, .sequence-copy .flow-health { vertical-align: middle; font-size: 12px; }
.palette-card > button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; border: 0; background: none; color: var(--muted); }
.palette-card > button:hover { background: var(--accent); color: var(--accent-ink); }
.palette-card > button .ui-icon { width: 16px; height: 16px; }
.palette-card.is-selected { opacity: .4; }

.sequence-card { grid-template-columns: auto 24px minmax(0, 1fr) auto; border-color: var(--line); background: var(--surface); }
.sequence-card .flow-card-type { display: none; }
.drag-handle { width: 22px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 5px; background: none; color: var(--faint); cursor: grab; touch-action: none; font-size: 14px; }
.drag-handle:hover { background: var(--hover); color: var(--text); }
.drag-handle .ui-icon { width: 15px; height: 15px; }
.sequence-number { text-align: right; color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sequence-copy { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sequence-copy .health-alert { margin-left: 2px; }
.sequence-name-editor { display: none; }
.sequence-card.is-renaming [data-server-title] { display: none; }
.sequence-card.is-renaming .sequence-name-editor { display: block; min-height: 30px; height: 30px; margin: 0 0 2px; }
.sequence-actions { display: flex; gap: 1px; opacity: .55; transition: opacity .12s; }
.sequence-card:hover .sequence-actions, .sequence-card:focus-within .sequence-actions { opacity: 1; }
.sequence-actions button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--muted); }
.sequence-actions button:hover { background: var(--hover); color: var(--text); }
.sequence-actions [data-remove-server]:hover { background: var(--danger-soft); color: var(--danger); }
.sequence-actions .ui-icon, .sequence-actions .ui-arrow { width: 15px; height: 15px; }
.sequence-card.is-auto-excluded { border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.flow-card.dragging { opacity: .35; }
.sequence-card.just-dropped { animation: dropped .6s ease-out; }
@keyframes dropped { from { background: var(--accent-soft); } }
.sequence-card.is-removing { opacity: 0; transition: opacity .15s; }
.drop-placeholder { height: 44px; border: 1.5px dashed var(--accent-line); border-radius: 8px; display: grid; place-items: center; color: var(--accent); font-size: 12.5px; }
.drop-placeholder i { display: none; }
.flow-empty { display: none; padding: 32px 16px; border: 1.5px dashed var(--line-2); border-radius: 10px; color: var(--muted); text-align: center; }
.flow-empty.visible { display: block; }
.touch-drag-source { opacity: .35; }
.touch-dragging { position: fixed; z-index: 100; pointer-events: none; background: var(--raised); box-shadow: var(--shadow); }
.touch-drop-dock {
  position: fixed; z-index: 90; left: 50%; bottom: 16px; transform: translate(-50%, 160%);
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: var(--raised); box-shadow: var(--shadow); transition: transform .2s ease;
}
.touch-drop-dock.visible { transform: translate(-50%, 0); }
.touch-drop-dock.is-target { outline: 2px solid var(--accent); }
.touch-drop-dock.remove-mode.is-target { outline-color: var(--danger); }
.touch-drop-dock i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.touch-drop-dock.remove-mode i { background: var(--danger); }
.touch-drop-dock span { display: grid; }
.touch-drop-dock small { color: var(--muted); }

.sticky-save {
  position: sticky; bottom: 14px; z-index: 15; margin: 4px 12px 12px auto; width: max-content; max-width: calc(100% - 24px);
  display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 14px; border-radius: 10px; background: var(--raised); box-shadow: var(--shadow);
}
.sticky-save strong { display: none; }
.sticky-save span { color: var(--muted); font-size: 13px; }

/* ---------- Users ---------- */
.user-console { display: grid; grid-template-columns: 270px minmax(0, 1fr); overflow: hidden; min-height: 540px; }
.user-directory { display: flex; flex-direction: column; min-width: 0; max-height: calc(100vh - 150px); position: sticky; top: 0; border-right: 1px solid var(--line); }
.directory-search { position: relative; padding: 10px; border-bottom: 1px solid var(--line); }
.directory-search input { padding-right: 38px; }
.directory-search span { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.directory-list { display: grid; align-content: start; gap: 1px; padding: 6px; overflow: auto; flex: 1; }
.directory-user { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 7px; background: none; text-align: left; }
.directory-user:hover { background: var(--hover); }
.directory-user.active { background: var(--hover); }
.directory-user.active b { color: var(--text); }
.directory-user > span:nth-child(2) { display: grid; min-width: 0; }
.directory-user b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.directory-user small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.directory-user .compact-avatar { width: 28px; height: 28px; font-size: 12px; }
.directory-user > i { width: 7px; height: 7px; border-radius: 50%; background: var(--idle); }
.directory-user > i.ok { background: var(--ok); }
.directory-user > i.off { background: var(--danger); }
.directory-user > i.stale-user { background: var(--warn) !important; }

.user-detail-stack { min-width: 0; }
.user-detail { display: grid; align-content: start; gap: 18px; padding: 20px 22px 24px; max-width: 760px; }
.user-detail.is-updating { opacity: .6; }
.user-profile-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.user-avatar { width: 40px; height: 40px; font-size: 16px; }
.user-name-line { display: flex; align-items: center; gap: 4px; }
.user-name-line h2 { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-rename-open { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--faint); }
.user-rename-open:hover { background: var(--hover); color: var(--text); }
.user-rename-open svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.user-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.user-badges span + span::before { content: "·"; margin-right: 6px; color: var(--faint); }
.user-rename-form { display: flex; align-items: flex-end; gap: 8px; }
.user-rename-form label { flex: 1; display: grid; gap: 4px; color: var(--muted); font-size: 12.5px; }
.user-rename-save, .bundle-assign-save { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--r); background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.user-rename-save:hover, .bundle-assign-save:hover { background: var(--accent-hover); }
.user-rename-cancel { min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: none; color: var(--text-2); }

.access-summary { display: grid; gap: 10px; }
.user-link { display: grid; gap: 4px; min-width: 0; }
.user-link > span { color: var(--muted); font-size: 12.5px; }
.user-link > div { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 4px 4px 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--raised); }
.user-link code, .access-link-row code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.user-link button, .access-link-row button { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: var(--hover); color: var(--text); font-size: 13px; }
.user-link button:hover, .access-link-row button:hover { background: var(--line-2); }
.user-link button .ui-icon, .access-link-row button .ui-icon { width: 15px; height: 15px; }
[data-copy].is-copied { color: var(--ok) !important; }
.user-facts { gap: 28px; }

.settings-surface { display: grid; gap: 8px; }
.settings-surface > header { display: none; }
.user-action-list { display: grid; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: visible; }
.user-action-list > form, .user-action-list > .destructive-actions { margin: 0; border-bottom: 1px solid var(--line); }
.user-action-list > :last-child { border-bottom: 0; }
.bundle-assign { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; padding: 12px 14px; }
.bundle-picker { position: relative; display: grid; gap: 4px; }
.bundle-picker-label { color: var(--muted); font-size: 12.5px; }
.bundle-picker-trigger { display: flex; align-items: center; gap: 9px; width: 100%; height: 36px; padding: 0 10px 0 6px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); text-align: left; }
.bundle-picker-trigger:hover { background: var(--hover); }
.bundle-picker-trigger > span[data-bundle-label] { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bundle-picker-mark, .bundle-option-mark { width: 24px; height: 24px; border-radius: 6px; font-size: 11px; }
.bundle-picker-options { display: none; position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: 280px; overflow: auto; padding: 4px; border-radius: 10px; background: var(--raised); box-shadow: var(--shadow); }
.bundle-picker.is-open .bundle-picker-options { display: grid; gap: 1px; }
.bundle-picker-options button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 6px 8px; border: 0; border-radius: 6px; background: none; text-align: left; }
.bundle-picker-options button:hover { background: var(--hover); }
.bundle-picker-options button span:nth-child(2) { display: grid; }
.bundle-picker-options button small { color: var(--faint); }
.bundle-picker-options button i { width: 7px; height: 7px; border-radius: 50%; }
.bundle-picker-options button[aria-selected="true"] i { background: var(--accent); }

.role-control { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; }
.role-control-copy { display: flex; align-items: center; gap: 12px; min-width: 0; }
.role-control-copy > span:last-child { display: grid; }
.role-control-copy b { font-weight: 500; }
.role-control-copy small { color: var(--muted); }
.role-control-icon { color: var(--muted); display: grid; }
.role-switch { display: inline-flex; align-items: center; gap: 10px; padding: 2px; border: 0; background: none; }
.role-switch > span { display: none; }
.role-switch i { position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--line-2); transition: background .15s; }
.role-switch i b { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s ease; }
.role-switch[aria-checked="true"] i { background: var(--accent); }
.role-switch[aria-checked="true"] i b { transform: translateX(16px); }

.destructive-actions { display: flex; gap: 4px; padding: 8px 10px; }
.destructive-actions form { margin: 0; }
.user-action-button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 0; border-radius: 6px; background: none; color: var(--text-2); text-align: left; }
.user-action-button:hover { background: var(--hover); }
.user-action-button small, .user-action-button > .ui-arrow { display: none; }
.user-action-button b { font-weight: 500; }
.action-glyph { display: grid; color: var(--muted); }
.action-glyph .ui-icon { width: 16px; height: 16px; }
.delete-action, .delete-action .action-glyph { color: var(--danger); }
.delete-action:hover { background: var(--danger-soft); }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; }
.login-layout { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(360px, 100%); display: grid; gap: 16px; }
.login-card .brand { justify-self: center; }
.login-panel { display: grid; gap: 14px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.login-panel h1 { font-size: 20px; }
.login-panel > p { margin-top: -8px; color: var(--muted); }
.login-form { display: grid; gap: 12px; }
.login-form label { display: grid; gap: 5px; color: var(--text-2); font-size: 13px; }
.login-submit { min-height: 38px; margin-top: 4px; }
.login-error { padding: 9px 11px; border-radius: var(--r); background: var(--danger-soft); color: var(--danger); font-size: 13px; }
.login-note { color: var(--faint); text-align: center; }

/* ---------- Personal editor shell ---------- */
.public-editor-shell { max-width: 1200px; margin: 0 auto; padding: 18px 24px 80px; display: grid; gap: 18px; }
.public-editor-brand small { color: var(--muted); font-weight: 400; font-size: 13px; }

/* ---------- Public subscription page ---------- */
.access-shell { width: min(860px, 100%); min-height: 100vh; margin: 0 auto; padding: 20px; display: grid; grid-template-rows: auto 1fr auto; gap: 20px; }
.access-header, .simple-access-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.access-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.access-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.access-state.is-disabled { color: var(--danger); } .access-state.is-disabled i { background: var(--danger); }
.access-panel { align-self: center; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.access-content { display: grid; gap: 16px; padding: 28px; }
.access-content h1 { font-size: 30px; line-height: 1.15; overflow-wrap: anywhere; }
.access-lead { color: var(--muted); max-width: 440px; }
.access-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.access-primary { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: var(--r); background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.access-primary:hover { background: var(--accent-hover); }
.access-primary.is-disabled { background: var(--hover); color: var(--muted); }
.access-settings { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); }
.access-settings:hover { background: var(--hover); }
.access-settings .ui-icon:last-child { display: none; }
.access-app-download, .simple-access-download { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.access-app-download:hover, .simple-access-download:hover { background: var(--raised); }
.access-app-mark, .simple-access-app-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--hover); }
.access-app-mark svg, .simple-access-app-mark svg { width: 17px; height: 17px; fill: currentColor; }
.access-app-mark i, .simple-access-app-mark i { width: 0; height: 0; margin-left: 3px; border-left: 11px solid var(--accent); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.access-app-copy, .simple-access-app-copy { display: grid; min-width: 0; }
.access-app-copy small, .simple-access-app-copy small { color: var(--muted); }
.access-app-copy b, .simple-access-app-copy b { font-weight: 500; }
.access-app-download > .ui-arrow, .simple-access-download > .ui-arrow { color: var(--faint); }
.access-link-block { display: grid; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.access-link-label { color: var(--muted); font-size: 13px; }
.access-link-row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 4px 4px 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--raised); }
.access-link-block > small { color: var(--faint); }
.access-details { display: flex; flex-direction: column; gap: 14px; padding: 28px 24px; border-left: 1px solid var(--line); background: var(--raised); }
.access-details header span { color: var(--muted); font-size: 13px; }
.access-details header strong { display: block; font-size: 17px; font-weight: 600; }
.access-details dl { display: grid; margin: 0; }
.access-details dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.access-details dt { color: var(--muted); }
.access-details dd { margin: 0; font-weight: 500; }
.access-details dd.online { color: var(--ok); } .access-details dd.offline { color: var(--danger); }
.access-raw { margin-top: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }
.access-raw:hover { color: var(--text); }
.access-footer { text-align: center; color: var(--faint); font-size: 12.5px; }

.simple-access-shell { width: min(400px, 100%); min-height: 100vh; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom)); display: grid; grid-template-rows: auto 1fr; gap: 20px; }
.simple-access-settings { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r); color: var(--muted); }
.simple-access-settings:hover { background: var(--hover); color: var(--text); }
.simple-access-panel { align-self: center; display: grid; gap: 12px; }
.simple-access-identity h1 { margin-bottom: 8px; font-size: 26px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simple-access-connect { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-size: 16px; font-weight: 600; }
.simple-access-connect:hover { background: var(--accent-hover); }
.simple-access-connect.is-disabled { background: var(--hover); color: var(--muted); }
.simple-access-power { display: grid; }
.simple-access-copy { display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 8px; border: 0; background: none; color: var(--muted); font-size: 13px; }
.simple-access-copy:hover { color: var(--text); }
.simple-access-copy .ui-icon { width: 15px; height: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stat-row { grid-template-columns: repeat(4, 1fr); }
  .stat-wide { grid-column: 1 / -1; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .source-record { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .source-record .source-sync { display: none; }
}
@media (max-width: 860px) {
  .app-body { grid-template-columns: 1fr; }
  .console-sidebar {
    position: fixed; z-index: 50; inset: auto 0 0 0; height: auto; flex-direction: row; gap: 0;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line);
  }
  .console-brand, .sidebar-role { display: none; }
  .console-nav { flex: 1; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .console-nav a, .sidebar-logout { flex-direction: column; justify-content: center; gap: 2px; padding: 6px 2px; font-size: 11px; }
  .console-sidebar-foot { margin: 0; padding: 0; border: 0; }
  .console-topbar { padding: 0 16px; }
  .mobile-brand { display: inline-flex; }
  .topbar-context { display: none; }
  .console-page { padding: 18px 14px 96px; }
  .product-page-head { flex-wrap: wrap; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .bundle-record { grid-template-columns: 1fr; }
  .user-console { grid-template-columns: 1fr; }
  .user-directory { position: static; max-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .user-detail { padding: 16px; }
  .bundle-assign { grid-template-columns: 1fr; }
  .flow-builder { grid-template-columns: 1fr; }
  .flow-palette { border-right: 0; border-bottom: 1px solid var(--line); }
  .flow-catalog { max-height: 300px; }
  .sequence-actions { opacity: 1; }
  .sticky-save { bottom: 72px; }
  .server-table-wrap { max-height: none; }
  .access-panel { grid-template-columns: 1fr; }
  .access-details { border-left: 0; border-top: 1px solid var(--line); padding: 20px; }
  .access-content { padding: 22px 18px; }
}
@media (max-width: 560px) {
  .source-record { grid-template-columns: auto minmax(0, 1fr) auto; }
  .source-record > .status-label { display: none; }
  .data-toolbar label, .composer-controls label { min-width: 0; flex: 1 1 100%; }
  .user-facts { flex-wrap: wrap; gap: 16px; }
  .destructive-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
