/* ============ Acronix — global theme ============ */
:root {
  --bg:        #08080b;
  --bg-app:    #0a0a0e;
  --bg-side:   #0c0c11;
  --panel:     #121217;
  --panel-2:   #16161d;
  --panel-3:   #1c1c24;
  --border:    rgba(255,255,255,0.07);
  --border-2:  rgba(255,255,255,0.12);
  --text:      #f5f5f7;
  --text-2:    #9a9aa6;
  --text-3:    #62626d;
  --accent:    #8b5cf6;
  --accent-2:  #a78bfa;
  --accent-3:  #7c3aed;
  --accent-soft: rgba(139,92,246,0.14);
  --accent-glow: rgba(139,92,246,0.40);
  --green:     #34d399;
  --green-soft:rgba(52,211,153,0.13);
  --amber:     #fbbf24;
  --amber-soft:rgba(251,191,36,0.13);
  --red:       #f87171;
  --red-soft:  rgba(248,113,113,0.13);
  --blue:      #60a5fa;
  --radius:    14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --ease:      cubic-bezier(.22,.61,.36,1);
  --ease-out:  cubic-bezier(.16,1,.3,1);
  --ease-spring: cubic-bezier(.34,1.4,.5,1);
  --shadow:    0 1px 2px rgba(0,0,0,0.4), 0 12px 32px -12px rgba(0,0,0,0.6);
  --shadow-lg: 0 24px 64px -16px rgba(0,0,0,0.7);
  --font:  'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;
  --team-civ:    #8b8b97;
  --team-police: #5b9dff;
  --team-sheriff:#d9a455;
  --team-fire:   #ff7a59;
  --team-dot:    #ffd24a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
#root { min-height: 100vh; }
::selection { background: var(--accent-glow); color: #fff; }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); background-clip: padding-box; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }
.mono { font-family: var(--mono); font-variant-ligatures: none; }
.tnum { font-variant-numeric: tabular-nums; }

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 16px; height: 40px; border-radius: var(--radius-xs);
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  transition: transform .2s var(--ease-spring), background .22s var(--ease), box-shadow .25s var(--ease), border-color .22s var(--ease), color .2s var(--ease), filter .22s var(--ease);
  white-space: nowrap; user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .08s; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 22px -8px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.22) inset, 0 12px 30px -8px var(--accent-glow); filter: brightness(1.06); }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--border-2); }
.btn-ghost:hover { background: var(--panel-3); border-color: rgba(255,255,255,0.2); }
.btn-subtle { background: transparent; color: var(--text-2); }
.btn-subtle:hover { background: var(--panel-2); color: var(--text); }
.btn-discord { background: #5865F2; color: #fff; box-shadow: 0 8px 22px -8px rgba(88,101,242,0.6); }
.btn-discord:hover { background: #4752e0; filter: brightness(1.04); }
.btn-danger { background: var(--red-soft); color: var(--red); border: 1px solid rgba(248,113,113,0.25); }
.btn-danger:hover { background: rgba(248,113,113,0.2); }

/* ---- button micro-interactions (shine sweep + icon motion), same feel as the Access chip ---- */
.btn { position: relative; overflow: hidden; }
.btn svg { transition: transform .2s var(--ease-out); }
.btn:hover svg { transform: scale(1.1); }
.btn:active svg { transform: scale(.94); }
/* diagonal gloss sweep — solid/filled buttons only */
.btn-primary::before, .btn-discord::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 55%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.24), transparent);
  transform: translateX(-200%) skewX(-14deg); transition: transform .6s var(--ease-out);
}
.btn-primary:hover::before, .btn-discord:hover::before { transform: translateX(360%) skewX(-14deg); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(248,113,113,0.45); }
.btn-discord:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(88,101,242,0.6); }

/* server-card CAD chip — subtle lift + icon pop */
.sh-chip svg { transition: transform .18s var(--ease-out); }
.sh-chip:hover { transform: translateY(-1px); }
.sh-chip:hover svg { transform: scale(1.12); }
.sh-chip:active { transform: translateY(0) scale(.97); }

/* ============ cards ============ */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-hover { transition: transform .35s var(--ease-out), border-color .3s var(--ease), box-shadow .35s var(--ease-out); }
.card-hover:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--shadow-lg); }

/* ============ badges / pills ============ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: -0.01em;
  border: 1px solid var(--border-2);
}
.dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.badge-green { background: var(--green-soft); color: var(--green); border-color: rgba(52,211,153,0.25); }
.badge-amber { background: var(--amber-soft); color: var(--amber); border-color: rgba(251,191,36,0.25); }
.badge-red   { background: var(--red-soft);   color: var(--red);   border-color: rgba(248,113,113,0.25); }
.badge-violet{ background: var(--accent-soft); color: var(--accent-2); border-color: rgba(139,92,246,0.3); }
.badge-blue  { background: rgba(96,165,250,0.12); color: var(--blue); border-color: rgba(96,165,250,0.28); }
.badge-gray  { background: var(--panel-3); color: var(--text-2); }

/* ============ inputs ============ */
.input {
  display: flex; align-items: center; gap: 9px;
  height: 40px; padding: 0 12px; border-radius: var(--radius-xs);
  background: var(--panel-2); border: 1px solid var(--border-2); color: var(--text);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--panel); }
.input input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 14px; }
.input input::placeholder { color: var(--text-3); }
.kbd {
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  border: 1px solid var(--border-2); border-radius: 5px; padding: 2px 5px; line-height: 1;
  background: var(--panel-3);
}

/* ============ animations ============ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes pingRing { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes shimmer { 100% { background-position: 200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes gridmove { to { background-position: 40px 40px; } }
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes dashflow { to { stroke-dashoffset: -1000; } }
@keyframes viewEnter { from { opacity: 0; transform: translateY(12px) scale(.992); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes pageEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes progressBar { 0% { transform: scaleX(0); } 60% { transform: scaleX(.7); } 100% { transform: scaleX(1); } }

.anim-fadeup { animation: fadeUp .5s cubic-bezier(.2,.7,.2,1) both; }
.anim-fadein { animation: fadeIn .5s ease both; }
.anim-scalein { animation: scaleIn .4s cubic-bezier(.2,.7,.2,1) both; }
.live-dot { position: relative; }
.live-dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: inherit; animation: pingRing 1.8s ease-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============ route transition wrapper ============ */
/* fill-mode is `backwards`, NOT `both`, and that matters a lot: `both` holds the final keyframe
   forever, which left `filter: blur(0)` permanently applied. A filtered element becomes the
   containing block for its `position: fixed` descendants — so every modal/drawer inside a view was
   centring on the content pane (right of the sidebar, below the topbar) instead of the viewport.
   `backwards` still applies the `from` state before the run, and afterwards the element reverts to
   its base styles — which already equal the `to` values, so it looks identical. */
.route { animation: viewEnter .55s var(--ease-out) backwards; }
.page-enter { animation: pageEnter .5s var(--ease-out) both; }

/* scroll reveal */
[data-reveal] {
  opacity: 0; transform: translateY(30px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1 !important; transform: none !important; } }

/* route progress bar */
.route-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2.5px; z-index: 300; pointer-events: none;
  transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-glow);
  animation: progressBar .55s var(--ease-out) forwards, fadeIn .15s ease;
}
.route-progress.done { animation: fadeOut .35s ease .1s forwards; }
@keyframes fadeOut { to { opacity: 0; } }

/* ============ demo sandbox banner ============
   Same bar as the CAD's (.cad-demo-banner in cad.css) so the two sandboxes read as one product.
   Fixed, 44px — the dashboard shell pads itself down by exactly that. */
.demo-banner { position: fixed; top: 0; left: 0; right: 0; height: 44px; z-index: 210; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: linear-gradient(90deg, var(--accent-soft), var(--panel) 70%); border-bottom: 1px solid var(--border); backdrop-filter: blur(6px); }
.demo-badge { flex: none; font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; background: var(--accent); color: #fff; }
.demo-text { min-width: 0; flex: 1; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-act { height: 30px !important; padding: 0 12px !important; font-size: 12px !important; flex: none; }
@media (max-width: 760px) { .demo-text { display: none; } .demo-banner { gap: 8px; padding: 0 10px; } }

/* ============ utility ============ */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.spread { justify-content: space-between; }
.center { align-items: center; justify-content: center; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--text-2); }
.muted-3 { color: var(--text-3); }
.grow { flex: 1; }
.txt-green { color: var(--green); } .txt-amber { color: var(--amber); } .txt-red { color: var(--red); }
.txt-accent { color: var(--accent-2); }
.hide-scroll::-webkit-scrollbar { display: none; }

/* gradient text */
.grad-text {
  background: linear-gradient(120deg, #fff 18%, var(--accent-2) 42%, #fff 64%, var(--accent-2) 86%, #fff 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradShift 7s ease-in-out infinite;
}
@keyframes gradShift { 0%,100% { background-position: 0% center; } 50% { background-position: 100% center; } }

/* icon button */
.iconbtn {
  width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center;
  color: var(--text-3); transition: background .15s var(--ease), color .15s var(--ease), transform .2s var(--ease-spring);
}
.iconbtn:hover { background: var(--panel-3); color: var(--text); transform: translateY(-1px) scale(1.08); }
.iconbtn:active { transform: scale(.92); }

/* nav item */
.navitem {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 9px 11px; border-radius: 9px; font-size: 14px; font-weight: 600;
  color: var(--text-2); transition: all .16s; position: relative;
}
.navitem:hover { background: var(--panel-2); color: var(--text); }
.navitem:hover { transform: translateX(2px); }
.navitem:active { transform: translateX(2px) scale(.985); }
.navitem.active { background: var(--panel-2); color: var(--text); transform: none; }
.navitem { transition: background .22s var(--ease), color .2s var(--ease), transform .22s var(--ease-spring); }
.navitem.active::before {
  content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 2px; background: var(--accent);
  animation: navbar .4s var(--ease-spring) both;
}
@keyframes navbar { from { transform: translateY(-50%) scaleY(0); } to { transform: translateY(-50%) scaleY(1); } }

/* ===== collapsible nav group + tree connectors ===== */
.nav-group-head {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 9px 11px; border-radius: 9px; font-size: 14px; font-weight: 600;
  color: var(--text-2); transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-group-head:hover { background: var(--panel-2); color: var(--text); }
.nav-group-chev { transition: transform .35s var(--ease-out); color: var(--text-3); }
.nav-group.open .nav-group-chev { transform: rotate(180deg); }
.nav-collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .38s var(--ease-out); }
.nav-group.open .nav-collapse { grid-template-rows: 1fr; }
.nav-collapse > div { overflow: hidden; }

.nav-tree { position: relative; margin: 4px 0 2px 21px; padding-left: 14px; display: flex; flex-direction: column; gap: 2px; }
.nav-tree::before { content: ''; position: absolute; left: 0; top: 0; bottom: 16px; width: 1.5px; background: var(--border-2); border-radius: 2px; }
.nav-sub {
  position: relative; display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 8px 11px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2);
  transition: background .18s var(--ease), color .18s var(--ease), transform .2s var(--ease-spring);
}
.nav-sub::before {
  content: ''; position: absolute; left: -14px; top: 50%; width: 12px; height: 12px;
  border-left: 1.5px solid var(--border-2); border-bottom: 1.5px solid var(--border-2);
  border-bottom-left-radius: 8px; transform: translateY(-100%);
  transition: border-color .2s var(--ease);
}
.nav-sub:hover { background: var(--panel-2); color: var(--text); transform: translateX(2px); }
.nav-sub.active { background: var(--panel-2); color: var(--text); }
.nav-sub.active::before { border-color: var(--accent); }

/* ===== immersive ER:LC live widget ===== */
.erlc-widget {
  flex: none;
  border-radius: 14px; border: 1px solid var(--border);
  background:
    radial-gradient(130% 90% at 0% 0%, rgba(139,92,246,0.10), transparent 58%),
    linear-gradient(180deg, var(--panel), var(--panel-2));
  overflow: hidden; transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.erlc-widget.open { border-color: rgba(139,92,246,0.28); box-shadow: 0 0 0 1px rgba(139,92,246,0.10), 0 18px 44px -24px rgba(139,92,246,0.55); }
.erlc-head { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 13px; text-align: left; }
.erlc-emblem {
  width: 36px; height: 36px; border-radius: 11px; flex: none; display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, var(--accent-2), var(--accent-3));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.30), 0 6px 16px -6px var(--accent-glow); position: relative;
}
.erlc-emblem::after {
  content: ''; position: absolute; inset: 0; border-radius: 11px;
  background: linear-gradient(155deg, rgba(255,255,255,0.28), transparent 52%); pointer-events: none;
}
.erlc-emblem-dot {
  position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--green); border: 2.5px solid var(--bg-side); box-shadow: 0 0 8px var(--green);
}
.erlc-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 17px; padding: 0 7px; border-radius: 999px;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em; color: var(--green);
  background: var(--green-soft); border: 1px solid rgba(52,211,153,0.28);
}
.erlc-livedot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); position: relative; flex: none; }
.erlc-livedot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: pingRing 1.8s ease-out infinite; }
.erlc-chev { transition: transform .4s var(--ease-out); color: var(--text-3); flex: none; }
.erlc-widget.open .erlc-chev { transform: rotate(180deg); }

.erlc-cap { padding: 0 13px 12px; }
.erlc-cap-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; }
.erlc-cap-label { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.erlc-cap-num { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); }
.erlc-cap-num b { color: var(--text); font-weight: 700; }
.erlc-cap-bar { height: 5px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.erlc-cap-fill {
  height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-3), var(--accent-2));
  box-shadow: 0 0 10px var(--accent-glow); transform-origin: left; animation: barGrow 1s var(--ease-out) both;
}

.erlc-collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .42s var(--ease-out); }
.erlc-widget.open .erlc-collapse { grid-template-rows: 1fr; }
.erlc-collapse > div { overflow: hidden; }

.erlc-tree { position: relative; margin: 2px 8px 10px 16px; padding-left: 8px; display: flex; flex-direction: column; gap: 2px; }
.erlc-tree::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 8px; width: 1.5px; background: var(--border); border-radius: 2px; }
.erlc-tree-fill { display: none; }
.erlc-ind {
  position: absolute; left: 4px; right: 0; border-radius: 9px;
  background: var(--panel-2);
  transition: top .4s var(--ease-out), height .4s var(--ease-out), opacity .25s var(--ease); pointer-events: none; z-index: 0;
}
.erlc-ind::before {
  content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 2.5px; height: 60%; border-radius: 2px; background: var(--accent);
}
.erlc-sub {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 9px; color: var(--text-2);
  transition: color .2s var(--ease);
}
.erlc-sub:hover { color: var(--text); }
.erlc-sub:hover .erlc-chip { color: var(--text-2); }
.erlc-sub.active { color: var(--text); }
.erlc-chip {
  width: 22px; height: 22px; flex: none; display: grid; place-items: center; color: var(--text-3);
  transition: color .22s var(--ease), transform .35s var(--ease-spring);
}
.erlc-sub.active .erlc-chip {
  color: var(--accent-2);
  filter: drop-shadow(0 2px 6px var(--accent-glow));
  animation: erlcChipPop .45s var(--ease-spring) both;
}
@keyframes erlcChipPop {
  0% { transform: scale(0.85); }
  55% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
.erlc-count {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
  background: var(--panel-3); color: var(--text-3); border: 1px solid var(--border); flex: none;
  transition: all .25s var(--ease);
}
.erlc-sub.active .erlc-count { background: var(--accent-soft); color: var(--accent-2); border-color: rgba(139,92,246,0.3); }

/* ===== Auto roles — advanced controls ===== */
.ar-select {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--border-2); transition: border-color .18s var(--ease), background .18s var(--ease);
  cursor: pointer; width: 100%; text-align: left;
}
.ar-select:hover { border-color: rgba(255,255,255,0.2); background: var(--panel-3); }
.ar-pop {
  position: absolute; z-index: 40; margin-top: 6px; min-width: 240px;
  background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; animation: scaleIn .18s var(--ease-out) both; transform-origin: top left;
  max-height: 320px; overflow-y: auto;
}
.ar-pop-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 8px; transition: background .14s var(--ease); cursor: pointer;
}
.ar-pop-item:hover { background: var(--panel-3); }
.ctx-row { transition: background .14s var(--ease); }
.ctx-row:hover { background: var(--panel-2); }
.role-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 11px 0 currentColor, 0 0 2px 0 currentColor; }
.role-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 8px;
  font-size: 13px; font-weight: 600; border: 1px solid var(--border-2); background: var(--panel-2);
  transition: border-color .16s var(--ease), background .16s var(--ease); cursor: pointer; max-width: 100%;
}
.role-pill:hover { border-color: rgba(255,255,255,0.22); background: var(--panel-3); }
.ar-rule { position: relative; transition: background .16s var(--ease); }
.ar-rule:focus-within { z-index: 30; }
.ar-rule:hover { background: var(--panel-2); }
.ar-rolerow { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; transition: background .14s var(--ease); }
.ar-rolerow:hover { background: var(--panel-2); }
@keyframes shimmerbar { 100% { background-position: 200% 0; } }
.ar-skeleton {
  height: 14px; border-radius: 6px;
  background: linear-gradient(90deg, var(--panel-3) 25%, var(--panel-2) 37%, var(--panel-3) 63%);
  background-size: 200% 100%; animation: shimmerbar 1.3s ease infinite;
}

/* glow blob */
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; pointer-events: none; }

/* ============ marquee ============ */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-rev .marquee-track { animation-direction: reverse; }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ============ FAQ accordion ============ */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel); overflow: hidden; transition: border-color .2s var(--ease), background .2s var(--ease); }
.faq-item:hover { border-color: var(--border-2); }
.faq-item.open { border-color: var(--border-2); background: var(--panel-2); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; text-align: left; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.faq-chevron { transition: transform .35s var(--ease-out); color: var(--text-3); flex: none; }
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--accent-2); }
.faq-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease-out); }
.faq-item.open .faq-body { grid-template-rows: 1fr; }
.faq-body > div { overflow: hidden; }
.faq-answer { padding: 0 20px 20px; color: var(--text-2); font-size: 14.5px; line-height: 1.65; }

/* ============ comparison table ============ */
.cmp { width: 100%; border-collapse: collapse; }
.cmp th, .cmp td { padding: 15px 18px; text-align: center; border-bottom: 1px solid var(--border); }
.cmp th:first-child, .cmp td:first-child { text-align: left; }
.cmp .hl { position: relative; background: linear-gradient(180deg, rgba(139,92,246,0.10), rgba(139,92,246,0.04)); }
.cmp thead .hl { border-radius: 12px 12px 0 0; }
.cmp tbody tr:last-child .hl { border-radius: 0 0 12px 12px; }
.cmp-tick { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.cmp-dash { color: var(--text-3); }

/* ============ drawer / modal ============ */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  z-index: 80; animation: fadeIn .25s ease both;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 96vw);
  background: var(--panel); border-left: 1px solid var(--border-2);
  z-index: 90; box-shadow: -24px 0 70px -24px rgba(0,0,0,0.75);
  display: flex; flex-direction: column; animation: drawerIn .42s var(--ease-out) both;
}
@keyframes drawerIn { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer { animation: drawerIn .5s var(--ease-spring) both; }
.drawer-overlay { animation: fadeIn .35s ease both; }
/* cascading fields */
.stagger > * { animation: fadeUp .5s var(--ease-out) both; }
.stagger > *:nth-child(1){animation-delay:.06s}
.stagger > *:nth-child(2){animation-delay:.10s}
.stagger > *:nth-child(3){animation-delay:.14s}
.stagger > *:nth-child(4){animation-delay:.18s}
.stagger > *:nth-child(5){animation-delay:.21s}
.stagger > *:nth-child(6){animation-delay:.24s}
.stagger > *:nth-child(7){animation-delay:.27s}
.stagger > *:nth-child(8){animation-delay:.30s}
.stagger > *:nth-child(9){animation-delay:.32s}
.stagger > *:nth-child(n+10){animation-delay:.34s}

/* checkbox */
.cbx {
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-2);
  display: grid; place-items: center; transition: all .15s var(--ease); flex: none; cursor: pointer; color: transparent;
}
.cbx.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cbx:hover { border-color: var(--accent); }

/* admin badge */
.admin-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 19px; padding: 0 8px; border-radius: 6px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em;
  background: linear-gradient(180deg, var(--accent-2), var(--accent-3)); color: #fff;
  box-shadow: 0 2px 8px -2px var(--accent-glow);
}

/* platform-wide banners (maintenance + read-only impersonation) */
.gb-wrap { position: fixed; top: 0; left: 0; right: 0; z-index: 400; display: flex; flex-direction: column; pointer-events: none; }
.gb { pointer-events: auto; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 16px; font-size: 13px; font-weight: 600; box-shadow: 0 6px 20px -8px rgba(0,0,0,0.6); }
.gb-amber { background: linear-gradient(90deg, #8a5a12, #c98a1f); color: #fff; }
.gb-violet { background: linear-gradient(90deg, #5b21b6, #7c3aed); color: #fff; }
.gb button { margin-left: 4px; padding: 3px 12px; border-radius: 7px; background: rgba(255,255,255,0.22); color: #fff; font-weight: 700; font-size: 12px; transition: background .15s ease; }
.gb button:hover { background: rgba(255,255,255,0.34); }

/* staff quota rows + horizontal number stepper */
.quota-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.quota-row:last-child { border-bottom: none; }
.num-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-2); border-radius: 9px; overflow: hidden; background: var(--panel-2); height: 38px; }
.num-stepper button { width: 34px; height: 100%; display: grid; place-items: center; color: var(--text-2); transition: background .14s ease, color .14s ease; }
.num-stepper button:hover:not(:disabled) { background: rgba(255,255,255,0.06); color: var(--accent-2); }
.num-stepper button:disabled { opacity: .35; cursor: default; }
.num-stepper input { width: 56px; height: 100%; text-align: center; border: none; background: transparent; color: var(--text); font-family: var(--mono); font-weight: 700; font-size: 14px; -moz-appearance: textfield; appearance: textfield; }
.num-stepper input::-webkit-outer-spin-button, .num-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* server-card icon: refined, softly-animated glow on card hover */
.srv-ico { transition: box-shadow .4s var(--ease), transform .4s var(--ease); border-radius: 12px; will-change: box-shadow, transform; }
.srv-card:hover .srv-ico { transform: translateY(-1px) scale(1.05); animation: srvGlow 2.6s ease-in-out infinite; }
@keyframes srvGlow {
  0%, 100% { box-shadow: 0 6px 18px -8px rgba(139,92,246,0.40), 0 0 18px -5px rgba(139,92,246,0.26); }
  50%      { box-shadow: 0 10px 26px -8px rgba(139,92,246,0.55), 0 0 30px -3px rgba(139,92,246,0.42); }
}
@media (prefers-reduced-motion: reduce) {
  .srv-card:hover .srv-ico { animation: none; box-shadow: 0 8px 22px -8px rgba(139,92,246,0.45); }
}

/* ===== Analytics view: settings panel + live states ===== */
.an-seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; height: 30px; }
.an-seg button { padding: 0 12px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--text-3); transition: color .15s var(--ease), background .15s var(--ease); }
.an-seg button:hover { color: var(--text-2); }
.an-seg button.on { background: var(--accent); color: #fff; box-shadow: 0 2px 10px -3px var(--accent-glow); }
.an-swatch { width: 22px; height: 22px; border-radius: 7px; cursor: pointer; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--border), 0 1px 4px rgba(0,0,0,.3); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.an-swatch:hover { transform: scale(1.12); }
.an-swatch.on { border-color: var(--bg); box-shadow: 0 0 0 2px #fff, 0 0 10px -1px var(--accent-glow); }
/* settings bar */
.an-settings { background: linear-gradient(135deg, var(--accent-soft), transparent 58%); padding: 14px 18px; }
.an-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.an-ctl { display: flex; flex-direction: column; }
.an-vrule { width: 1px; align-self: stretch; min-height: 40px; background: var(--border); flex: none; }
.an-status { display: flex; align-items: center; gap: 12px; }
@media (max-width: 768px) { .an-vrule { display: none; } .an-status { margin-top: 4px; } }
/* empty states inside chart cards */
.an-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 190px; padding: 28px 24px; }
.an-empty-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); margin-bottom: 12px; }
.an-empty-title { font-weight: 700; font-size: 14px; color: var(--text); }
.an-empty-text { font-size: 12.5px; color: var(--text-3); max-width: 320px; line-height: 1.55; margin-top: 3px; }
.an-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.5); animation: anPulse 2.2s infinite; }
@keyframes anPulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.5); } 70% { box-shadow: 0 0 0 6px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.an-skel { background: linear-gradient(90deg, var(--panel-2), rgba(255,255,255,.05), var(--panel-2)); background-size: 200% 100%; animation: anSkel 1.4s ease infinite; border-radius: 14px; border: 1px solid var(--border); }
@keyframes anSkel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
/* motion setting */
.dash-anim-off .an-live-dot { animation: none; }
.dash-anim-off *, .dash-anim-off *::before, .dash-anim-off *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .05s !important; }
.dash-anim-lively .card { animation-duration: .38s !important; }
/* density setting */
.an-compact { gap: 12px !important; }
.an-compact .card { padding: 15px !important; }

/* ============ Servers Home — aurora glass (variant 5) ============ */
.sh-root{position:relative;min-height:100vh;background:var(--bg-app);padding:44px clamp(18px,4vw,48px) 90px;overflow:hidden}
.sh-aurora{display:none}
.sh-wrap{position:relative;z-index:1;max-width:1240px}
.sh-greet{display:flex;align-items:center;gap:15px;margin-bottom:22px}
.sh-avwrap{position:relative;width:54px;height:54px;flex:none}
.sh-greet .av{width:54px;height:54px;border-radius:50%;flex:none;object-fit:cover;display:grid;place-items:center;font-weight:800;font-size:19px;color:#fff;background:linear-gradient(135deg,#3a3a52,#20202c);box-shadow:0 10px 26px -10px rgba(0,0,0,.6);border:2px solid rgba(255,255,255,.14)}
/* Discord avatar decoration — the animated frame that sits around the profile pic (~1.35× the avatar). */
.sh-avdeco{position:absolute;top:50%;left:50%;width:73px;height:73px;transform:translate(-50%,-50%);pointer-events:none;object-fit:contain;z-index:1}
.sh-hello{font-size:27px;font-weight:800;letter-spacing:-.03em;line-height:1.15;background:linear-gradient(92deg,#fff 32%,var(--accent-2));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.sh-sub{font-size:13.5px;color:var(--text-2);margin-top:3px}
.sh-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:28px}
.sh-glassbtn{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px;border-radius:11px;font-size:13.5px;font-weight:700;
  background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);color:var(--text);transition:.18s var(--ease)}
.sh-glassbtn:hover{background:rgba(255,255,255,.09);transform:translateY(-1px)}
.sh-glassbtn svg{width:16px;height:16px}
.sh-sect{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:16px}
.sh-sect h2{font-size:17px;font-weight:800;letter-spacing:-.02em}
.sh-sect p{font-size:12.5px;color:var(--text-3);margin-top:3px}
.sh-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:18px}
.sh-glass{background:rgba(20,20,27,.55);backdrop-filter:blur(22px) saturate(1.4);-webkit-backdrop-filter:blur(22px) saturate(1.4);
  border:1px solid rgba(255,255,255,.09);box-shadow:0 22px 60px -28px rgba(0,0,0,.75),inset 0 1px 0 rgba(255,255,255,.09)}
.sh-card{border-radius:20px;padding:18px;display:flex;flex-direction:column;gap:16px;cursor:pointer;position:relative;
  transition:transform .2s var(--ease),box-shadow .2s var(--ease),border-color .2s}
.sh-card:hover{border-color:rgba(255,255,255,.18);box-shadow:0 24px 60px -30px rgba(0,0,0,.7)}
/* hero banner (owner image / gif) — fades to the card via a bottom scrim, name overlaid */
.sh-hero{position:relative;height:138px;margin:-18px -18px 0;border-radius:20px 20px 0 0;overflow:hidden}
.sh-hero-img{position:absolute;inset:0;background-size:cover;background-position:center;background-repeat:no-repeat;transition:transform .45s var(--ease)}
.sh-card.has-banner:hover .sh-hero-img{transform:scale(1.055)}
.sh-hero::after{content:'';position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(to bottom,rgba(10,10,14,0) 24%,rgba(11,11,16,.68) 68%,rgba(11,11,16,.95) 100%)}
.sh-hero-top{position:absolute;left:16px;right:16px;bottom:12px;z-index:1;display:flex;align-items:flex-end;gap:12px}
.sh-hero-top .sh-av{width:46px;height:46px;border-radius:50%;border:2px solid rgba(255,255,255,.92);box-shadow:0 4px 16px rgba(0,0,0,.6)}
.sh-hero-top .sh-name{color:#fff;text-shadow:0 2px 10px rgba(0,0,0,.8)}
.sh-hero-top .sh-role{background:rgba(255,255,255,.14);color:#fff;border-color:rgba(255,255,255,.28);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.sh-cardtop{display:flex;align-items:center;gap:13px;position:relative}
.sh-av{width:50px;height:50px;border-radius:15px;flex:none;object-fit:cover;display:grid;place-items:center;font-weight:800;font-size:18px;color:#fff;
  background:linear-gradient(135deg,var(--c,#8b5cf6),color-mix(in srgb,var(--c,#8b5cf6) 55%,#000));box-shadow:0 6px 16px -8px rgba(0,0,0,.5)}
.sh-name{font-size:15.5px;font-weight:800;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sh-role{display:inline-flex;align-items:center;gap:5px;margin-top:4px;height:20px;padding:0 8px;border-radius:999px;font-size:11px;font-weight:700;
  background:color-mix(in srgb,var(--c,#8b5cf6) 16%,transparent);color:var(--c,#a78bfa);border:1px solid color-mix(in srgb,var(--c,#8b5cf6) 32%,transparent)}
.sh-chips{display:flex;gap:9px;position:relative}
.sh-chip{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:38px;border-radius:12px;font-size:12.5px;font-weight:700;
  background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.08);color:var(--text-2);transition:.16s var(--ease)}
.sh-chip:hover{background:rgba(255,255,255,.09);color:var(--text)}
.sh-chip svg{width:15px;height:15px}
.sh-chip.pri{background:color-mix(in srgb,var(--c,#8b5cf6) 20%,transparent);color:#fff;border-color:color-mix(in srgb,var(--c,#8b5cf6) 40%,transparent)}
/* ---- Access dropdown chip ---- */
.sh-access{position:relative;overflow:hidden;justify-content:flex-start;padding:0 13px;gap:9px;
  background:linear-gradient(135deg,color-mix(in srgb,var(--c,#8b5cf6) 30%,transparent),color-mix(in srgb,var(--c,#8b5cf6) 12%,transparent));
  border-color:color-mix(in srgb,var(--c,#8b5cf6) 46%,transparent);
  transition:transform .18s var(--ease-out),box-shadow .25s var(--ease),border-color .2s var(--ease),background .2s var(--ease)}
.sh-access-ico{display:inline-flex;color:#fff;filter:drop-shadow(0 0 7px color-mix(in srgb,var(--c,#8b5cf6) 75%,transparent));transition:transform .2s var(--ease-out)}
.sh-access-lbl{letter-spacing:.01em;position:relative;z-index:1}
.sh-caret{margin-left:auto;display:inline-flex;opacity:.8;transition:transform .3s var(--ease-out),opacity .2s}
.sh-access:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--c,#8b5cf6) 66%,transparent);
  box-shadow:0 8px 22px -8px color-mix(in srgb,var(--c,#8b5cf6) 60%,transparent),inset 0 0 0 1px color-mix(in srgb,var(--c,#8b5cf6) 26%,transparent)}
.sh-access:hover .sh-access-ico{transform:scale(1.08) rotate(-3deg)}
.sh-access:hover .sh-caret{opacity:1}
.sh-access:active{transform:translateY(0) scale(.985)}
.sh-access.open{transform:translateY(0);border-color:color-mix(in srgb,var(--c,#8b5cf6) 70%,transparent);
  box-shadow:0 6px 20px -8px color-mix(in srgb,var(--c,#8b5cf6) 60%,transparent)}
.sh-access.open .sh-caret{transform:rotate(180deg);opacity:1}
/* shine sweep on hover */
.sh-access::before{content:'';position:absolute;top:0;bottom:0;left:0;width:60%;pointer-events:none;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.24),transparent);
  transform:translateX(-180%) skewX(-14deg);transition:transform .65s var(--ease-out)}
.sh-access:hover::before{transform:translateX(320%) skewX(-14deg)}
.sh-menu{position:absolute;top:calc(100% + 10px);left:0;right:0;z-index:20;background:var(--panel);border:1px solid var(--border-2);border-radius:13px;padding:6px;
  box-shadow:var(--shadow-lg),0 0 0 1px color-mix(in srgb,var(--c,#8b5cf6) 14%,transparent);transform-origin:top center;animation:shMenuIn .2s var(--ease-out) both}
@keyframes shMenuIn{from{opacity:0;transform:translateY(-8px) scale(.95)}to{opacity:1;transform:none}}
.sh-menu::after{content:'';position:absolute;top:-6px;left:22px;width:11px;height:11px;background:var(--panel);border-left:1px solid var(--border-2);border-top:1px solid var(--border-2);transform:rotate(45deg)}
.sh-menu-item{display:flex;align-items:center;gap:10px;width:100%;padding:9px 10px;border-radius:9px;font-size:13px;font-weight:600;color:var(--text-2);
  transition:background .14s,color .14s,transform .14s var(--ease-out);animation:shItemIn .26s var(--ease-out) both}
.sh-menu-item:nth-child(1){animation-delay:.03s}
.sh-menu-item:nth-child(2){animation-delay:.07s}
.sh-menu-item:nth-child(3){animation-delay:.11s}
@keyframes shItemIn{from{opacity:0;transform:translateX(-7px)}to{opacity:1;transform:none}}
.sh-menu-item:hover{background:var(--panel-3);color:var(--text);transform:translateX(3px)}
.sh-menu-item svg{color:var(--text-3);transition:color .14s}
.sh-menu-item:hover svg{color:color-mix(in srgb,var(--c,#8b5cf6) 90%,#fff)}
.sh-add{border:1px dashed rgba(255,255,255,.16)!important;align-items:stretch;justify-content:center}
.sh-modal-ov{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:20px;background:rgba(6,7,10,.66);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);animation:fadeIn .2s ease both}
.sh-modal{width:min(420px,94vw);border-radius:20px;padding:22px;animation:scaleIn .28s var(--ease-out) both}
.sh-toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);z-index:300;display:flex;align-items:center;gap:11px;padding:12px 18px;border-radius:14px;background:var(--panel);border:1px solid var(--border-2);box-shadow:var(--shadow-lg);font-size:13.5px;font-weight:600;animation:fadeUp .3s var(--ease-out) both}
.sh-spin{width:16px;height:16px;flex:none;border-radius:50%;border:2px solid rgba(255,255,255,.18);border-top-color:var(--accent-2);animation:spin .7s linear infinite}

/* ===== custom confirm dialog ===== */
.acx-ov{position:fixed;inset:0;z-index:9000;display:grid;place-items:center;padding:20px;background:rgba(6,7,10,.66);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);animation:fadeIn .18s ease both}
.acx-dialog{width:min(400px,94vw);background:var(--panel);border:1px solid var(--border-2);border-radius:16px;padding:22px;box-shadow:var(--shadow-lg);animation:scaleIn .22s var(--ease-out) both}
.acx-ico{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent-2);margin-bottom:14px}
.acx-ico.danger{background:var(--red-soft);color:var(--red)}
.acx-title{font-size:16.5px;font-weight:800;letter-spacing:-.02em}
.acx-msg{font-size:13.5px;color:var(--text-2);line-height:1.55;margin-top:7px}
.acx-foot{display:flex;gap:9px;justify-content:flex-end;margin-top:20px}
.acx-del{background:linear-gradient(180deg,#fb7185,#e11d48);color:#fff;box-shadow:0 8px 20px -8px rgba(225,29,72,.5)}
.acx-del:hover{filter:brightness(1.07)}
@media (max-width:640px){ .sh-hello{font-size:23px} .sh-grid{grid-template-columns:1fr} }

/* ==================================================================
   ============  RESPONSIVE / MOBILE SUPPORT  =======================
   Canonical breakpoints — @media (max-width: N):
     1024  large tablet / small laptop
     768   PRIMARY stack point — multi-col grids collapse, drawers engage
     640   small tablet / large phone
     480   phone
     430   small phone
   (.fluid-sm collapses at 600; drawer-scrim / mobile-only guard at 769;
    CAD forms/modals additionally use 620 / 700 — see cad.css)
   Desktop (>768px) appearance is never changed: every rule below lives
   inside a max-width query or only overrides at a breakpoint.
   ================================================================== */

/* ===== show / hide helpers ===== */
.mobile-only { display: none !important; }
@media (max-width: 768px) {
  .mobile-only  { display: revert !important; }
  .desktop-only { display: none !important; }
}

/* ===== hamburger toggle — mobile-only 40x40 button ===== */
.nav-toggle {
  display: none; flex: none;
  width: 40px; height: 40px; border-radius: var(--radius-xs);
  place-items: center; color: var(--text-2);
  background: var(--panel-2); border: 1px solid var(--border-2);
  transition: background .15s var(--ease), color .15s var(--ease), transform .2s var(--ease-spring);
}
.nav-toggle:hover { background: var(--panel-3); color: var(--text); }
.nav-toggle:active { transform: scale(.92); }
/* NB: this @768 rule sits AFTER .mobile-only above so its !important wins the
   tie when an element carries both classes (button stays a centered grid). */
@media (max-width: 768px) { .nav-toggle { display: grid !important; } }

/* ===== responsive grid collapse (override inline gridTemplateColumns) ===== */
@media (max-width: 768px) {
  .stack-2-md { grid-template-columns: repeat(2, 1fr) !important; }
  .stack-md   { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .stack-2-md { grid-template-columns: 1fr !important; }
  .stack-sm   { grid-template-columns: 1fr !important; }
}

/* ===== horizontal scroll wrapper for wide tables ===== */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table-scroll > table { min-width: 600px; }

/* ===== fixed-width blocks → fluid ===== */
@media (max-width: 600px) {
  .fluid-sm { width: 100% !important; max-width: 100% !important; }
}
@media (max-width: 480px) {
  .search-input { width: 100% !important; }
}

/* ===== marketing top nav ===== */
.site-nav {}   /* header wrapper — JSX layout hook, no desktop change */
.nav-links {}  /* absolute-centered links */
@media (max-width: 768px) { .nav-links { display: none; } }
.cta-row {}    /* hero CTA button row */
@media (max-width: 480px) {
  .cta-row { flex-wrap: wrap; }
  .cta-row .btn-lg { width: 100%; }
}

/* ===== dashboard + admin off-canvas drawer shell ===== */
@media (max-width: 768px) {
  .dash-shell, .admin-shell { grid-template-columns: 1fr !important; }
  .dash-sidebar {
    position: fixed !important; top: 0 !important; left: 0 !important;
    height: 100dvh !important; width: min(86vw, 300px) !important;
    transform: translateX(-100%); transition: transform .28s var(--ease);
    z-index: 200; overflow-y: auto;
  }
  .dash-sidebar.open { transform: none; }
}
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 190; animation: fadeIn .25s ease both;
}
@media (min-width: 769px) { .drawer-scrim { display: none; } }

/* ===== touch-target + component polish (audit) ===== */
@media (max-width: 768px) {
  .iconbtn { width: 40px; height: 40px; }
  .navitem, .nav-group-head, .erlc-sub { min-height: 44px; padding: 12px; }
}
@media (max-width: 640px) {
  .an-seg { height: 38px; }
  .an-seg button { padding: 0 14px; }
  .num-stepper button { width: 40px; }
  .quota-row { flex-wrap: wrap; gap: 10px; }
  .ar-pop { min-width: min(240px, calc(100vw - 24px)); max-width: calc(100vw - 24px); }
  .cmp th, .cmp td { padding: 11px 12px; font-size: 13px; }
}
@media (max-width: 480px) {
  .gb { flex-wrap: wrap; text-align: center; }
  .faq-q { padding: 15px 16px; font-size: 14.5px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   APPLICATIONS — form builder (drag) + public form theme engine
   ═══════════════════════════════════════════════════════════════════════════ */

/* ---------- builder: save bar ----------
   Only mounted while there are unsaved edits, so it announces itself (slides up, pulses) instead
   of sitting there permanently saying "All changes saved" — which is noise, not information. */
.f-savebar-wrap { position: sticky; bottom: 16px; display: flex; justify-content: center; pointer-events: none; z-index: 20; }
.f-savebar {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 16px; border-radius: 999px;
  background: rgba(20, 20, 28, 0.82); backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border-2);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  animation: fSaveIn .28s cubic-bezier(.2, .9, .3, 1) both;
}
.f-savebar-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--amber);
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.55); animation: fSavePulse 1.9s ease-out infinite;
}
.f-savebar-txt { font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.f-savebar-btn { height: 32px !important; border-radius: 999px !important; padding: 0 14px !important; }
.f-spin {
  width: 13px; height: 13px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: fSaveSpin .7s linear infinite;
}
@keyframes fSaveIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fSavePulse { 0% { box-shadow: 0 0 0 0 rgba(251,191,36,.5); } 70% { box-shadow: 0 0 0 7px rgba(251,191,36,0); } 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); } }
@keyframes fSaveSpin { to { transform: rotate(360deg); } }
@media (max-width: 480px) { .f-savebar-txt { display: none; } .f-savebar { padding-left: 14px; } }

/* ---------- builder: draggable question cards ---------- */
.fq-list { display: flex; flex-direction: column; gap: 12px; position: relative; }

.fq-card {
  position: relative; background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 14px 14px 40px;
  transition: border-color .18s var(--ease), box-shadow .22s var(--ease), background .18s var(--ease);
  will-change: transform;
}
.fq-card:hover { border-color: var(--border-2); box-shadow: 0 8px 26px -14px rgba(0,0,0,.55); }
.fq-card.sel { border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 12px 34px -18px var(--accent-glow); }

/* FLIP: JS sets a transform to the OLD position, then removes it with this transition on,
   so the card glides from where it was to where it now is. */
.fq-card.flip { transition: transform .32s cubic-bezier(.22,1,.36,1); }

/* the lifted card follows the cursor — tilt + scale + deep shadow reads as "picked up" */
.fq-card.dragging {
  z-index: 30; cursor: grabbing;
  transform: scale(1.022) rotate(-.5deg);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 26px 60px -18px rgba(0,0,0,.75), 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--panel-2);
}
/* everything else dims so the dragged card visually wins */
.fq-list.is-dragging .fq-card:not(.dragging) { opacity: .72; }

/* grab handle — the dot rail */
.fq-handle {
  position: absolute; left: 10px; top: 14px; width: 20px; height: 26px;
  display: grid; place-items: center; border-radius: 7px; cursor: grab;
  color: var(--text-3); opacity: 0; transform: translateX(-3px);
  transition: opacity .18s var(--ease), transform .18s var(--ease-out), background .15s, color .15s;
}
.fq-card:hover .fq-handle, .fq-card.sel .fq-handle, .fq-card.dragging .fq-handle { opacity: 1; transform: none; }
.fq-handle:hover { background: var(--panel-3); color: var(--text); }
.fq-handle:active { cursor: grabbing; }
.fq-dots { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.fq-dots i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; display: block; }

/* the gap that opens where the card will land */
.fq-drop {
  height: 3px; border-radius: 3px; margin: -6px 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 14px 1px var(--accent-glow);
  animation: fqDrop .18s var(--ease-out) both;
}
@keyframes fqDrop { from { transform: scaleX(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* add / remove */
.fq-card.enter { animation: fqIn .34s var(--ease-spring) both; }
@keyframes fqIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: none; } }
.fq-card.leave { animation: fqOut .2s var(--ease) both; pointer-events: none; }
@keyframes fqOut { to { opacity: 0; transform: translateX(14px) scale(.96); } }

.fq-type { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-2);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent); }

/* ---------- builder: theme picker ---------- */
.fm-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-sw { width: 30px; height: 30px; border-radius: 9px; border: 2px solid transparent; cursor: pointer;
  transition: transform .16s var(--ease-spring), border-color .16s; }
.fm-sw:hover { transform: scale(1.12) translateY(-1px); }
.fm-sw.on { border-color: #fff; transform: scale(1.08); }
.fm-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.fm-font { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel);
  text-align: left; font-size: 15px; transition: border-color .16s, background .16s, transform .16s var(--ease-out); }
.fm-font:hover { border-color: var(--border-2); transform: translateY(-1px); }
.fm-font.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.fm-font small { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; font-family: var(--font); }
.fm-seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--panel); border: 1px solid var(--border); border-radius: 11px; }
.fm-seg button { padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-3);
  transition: background .16s, color .16s; }
.fm-seg button.on { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--text); }
.fm-preview { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; position: sticky; top: 16px;
  max-height: calc(100vh - 140px); overflow-y: auto; }

/* ═══════════════ PUBLIC FORM — themed by CSS vars set inline from form.theme ═══════════════ */
.apf {
  --apf-accent: #8b5cf6; --apf-bg: #0a0a0e; --apf-radius: 18px;
  --apf-font: 'Plus Jakarta Sans', system-ui, sans-serif; --apf-hfont: var(--apf-font);
  --apf-text: #f2f3f7; --apf-text-2: #a9b0c0; --apf-text-3: #6f7686;
  --apf-card: rgba(22,22,30,.72); --apf-line: rgba(255,255,255,.10); --apf-field: rgba(255,255,255,.045);
  position: relative; min-height: 100vh; background: var(--apf-bg);
  font-family: var(--apf-font); color: var(--apf-text);
  padding: 40px 20px 80px; overflow-x: hidden;
  /* UA widgets (the native <select> popup above all) must follow the form's mode — without this the
     option list renders on a white surface while inheriting the near-white --apf-text = unreadable. */
  color-scheme: dark;
}
.apf.light {
  --apf-text: #14161c; --apf-text-2: #4d5563; --apf-text-3: #858c9a;
  --apf-card: rgba(255,255,255,.86); --apf-line: rgba(0,0,0,.10); --apf-field: rgba(0,0,0,.035);
  color-scheme: light;
}
.apf-bgimg { position: fixed; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.apf-bgimg::after { content: ''; position: absolute; inset: 0; background: var(--apf-bg); opacity: calc(var(--apf-dim, 55) / 100); }
.apf-wrap { position: relative; z-index: 1; width: 100%; max-width: 720px; margin: 0 auto;
  animation: apfIn .5s var(--ease-out) both; }
@keyframes apfIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.apf.center .apf-wrap { text-align: center; }
.apf.center .apf-opt { text-align: left; }

.apf-card { border-radius: var(--apf-radius); overflow: hidden; margin-bottom: 18px; }
.apf-card.glass { background: var(--apf-card); border: 1px solid var(--apf-line);
  backdrop-filter: blur(22px) saturate(1.35); -webkit-backdrop-filter: blur(22px) saturate(1.35);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.07); }
.apf-card.solid { background: var(--apf-card); border: 1px solid var(--apf-line); box-shadow: 0 24px 60px -30px rgba(0,0,0,.6); }
.apf-card.flat { background: transparent; border: none; box-shadow: none; }

.apf-hero { position: relative; background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 18px 28px; }
.apf-hero::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 30%, color-mix(in srgb, var(--apf-bg) 92%, transparent)); }
.apf-logo { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 16px; object-fit: cover;
  border: 2px solid rgba(255,255,255,.9); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.apf-head { padding: 26px 28px; }
.apf-title { font-family: var(--apf-hfont); font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.apf-desc { color: var(--apf-text-2); font-size: 15px; line-height: 1.6; margin-top: 10px; white-space: pre-wrap; }
.apf-body { padding: 8px 28px 28px; display: flex; flex-direction: column; gap: 22px; }

/* questions stagger in — delay set inline per index via --d */
.apf-q { animation: apfQ .45s var(--ease-out) both; animation-delay: var(--d, 0ms); }
@keyframes apfQ { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.apf-label { font-size: 15px; font-weight: 700; letter-spacing: -.01em; display: block; }
.apf-req { color: var(--apf-accent); margin-left: 4px; }
.apf-help { color: var(--apf-text-3); font-size: 13px; margin-top: 4px; line-height: 1.5; }
.apf-err { color: #f87171; font-size: 12.5px; margin-top: 6px; display: flex; align-items: center; gap: 5px;
  animation: apfShake .32s var(--ease); }
@keyframes apfShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }

.apf-input, .apf-textarea, .apf-select {
  width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: calc(var(--apf-radius) * .55);
  background: var(--apf-field); border: 1px solid var(--apf-line); color: var(--apf-text);
  font-family: var(--apf-font); font-size: 14.5px; outline: none;
  transition: border-color .18s, box-shadow .22s, background .18s;
}
.apf-textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.apf-input::placeholder, .apf-textarea::placeholder { color: var(--apf-text-3); }
.apf-input:focus, .apf-textarea:focus, .apf-select:focus {
  border-color: var(--apf-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--apf-accent) 18%, transparent);
  background: color-mix(in srgb, var(--apf-accent) 5%, var(--apf-field));
}
.apf-input.bad, .apf-textarea.bad, .apf-select.bad { border-color: #f87171; box-shadow: 0 0 0 4px rgba(248,113,113,.14); }

/* radio / checkbox rows with a real animated control */
.apf-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.apf-opt { display: flex; align-items: center; gap: 11px; padding: 12px 14px; cursor: pointer;
  border-radius: calc(var(--apf-radius) * .5); background: var(--apf-field); border: 1px solid var(--apf-line);
  font-size: 14.5px; transition: border-color .16s, background .16s, transform .16s var(--ease-out); }
.apf-opt:hover { border-color: color-mix(in srgb, var(--apf-accent) 45%, transparent); transform: translateX(2px); }
.apf-opt.on { border-color: var(--apf-accent); background: color-mix(in srgb, var(--apf-accent) 11%, transparent); }
.apf-box { width: 20px; height: 20px; flex: none; border-radius: 6px; border: 2px solid var(--apf-line);
  display: grid; place-items: center; transition: border-color .16s, background .16s; }
.apf-box.round { border-radius: 50%; }
.apf-opt.on .apf-box { border-color: var(--apf-accent); background: var(--apf-accent); }
.apf-box svg { opacity: 0; transform: scale(.4); transition: opacity .16s, transform .2s var(--ease-spring); color: #fff; }
.apf-opt.on .apf-box svg { opacity: 1; transform: none; }

.apf-file { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 16px;
  border: 1.5px dashed var(--apf-line); border-radius: calc(var(--apf-radius) * .55); cursor: pointer;
  transition: border-color .18s, background .18s; }
.apf-file:hover { border-color: var(--apf-accent); background: color-mix(in srgb, var(--apf-accent) 6%, transparent); }

/* submit — style variants */
.apf-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 50px; padding: 0 30px; border-radius: calc(var(--apf-radius) * .55); cursor: pointer;
  font-family: var(--apf-font); font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  background: var(--apf-accent); color: #fff; border: 1px solid transparent;
  transition: transform .18s var(--ease-out), box-shadow .25s var(--ease), filter .2s, background .2s; }
.apf-btn:hover { transform: translateY(-2px); filter: brightness(1.08);
  box-shadow: 0 16px 36px -12px color-mix(in srgb, var(--apf-accent) 70%, transparent); }
.apf-btn:active { transform: translateY(0) scale(.98); }
.apf-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.apf-btn.pill { border-radius: 999px; }
.apf-btn.outline { background: transparent; color: var(--apf-accent); border-color: var(--apf-accent); }
.apf-btn.outline:hover { background: color-mix(in srgb, var(--apf-accent) 12%, transparent); }
.apf-btn.glow { box-shadow: 0 0 26px -4px color-mix(in srgb, var(--apf-accent) 75%, transparent); }
.apf-btn.glow:hover { box-shadow: 0 0 44px -2px var(--apf-accent); }
.apf-btn::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 55%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.26), transparent);
  transform: translateX(-200%) skewX(-14deg); transition: transform .65s var(--ease-out); }
.apf-btn:hover::before { transform: translateX(360%) skewX(-14deg); }

/* success */
.apf-done { text-align: center; padding: 54px 28px; }
.apf-tick { width: 74px; height: 74px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--apf-accent) 16%, transparent); color: var(--apf-accent);
  animation: apfPop .5s var(--ease-spring) both; }
@keyframes apfPop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.apf-tick svg { stroke-dasharray: 40; stroke-dashoffset: 40; animation: apfDraw .5s .22s var(--ease-out) forwards; }
@keyframes apfDraw { to { stroke-dashoffset: 0; } }

.apf-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700; border: 1px solid var(--apf-line); background: var(--apf-field); color: var(--apf-text-2); }
.apf-pill.ok  { color: #34d399; border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.12); }
.apf-pill.no  { color: #f87171; border-color: rgba(248,113,113,.35); background: rgba(248,113,113,.12); }
.apf-pill.pend{ color: #f5b13d; border-color: rgba(245,177,61,.35); background: rgba(245,177,61,.12); }

@media (max-width: 640px) {
  .apf { padding: 0 0 60px; }
  .apf-card { border-radius: 0; margin-bottom: 0; }
  .apf-head, .apf-body { padding-left: 18px; padding-right: 18px; }
  .apf-title { font-size: 24px; }
  .apf-btn { width: 100%; }
}

/* ═══════════════ FLOW FOCUS ═══════════════
   Scrolling the flow canvas up to the top of the screen pins it there, grows it to fill the
   viewport, and fades the form header + dashboard topbar out of the way. --fz (0→1) is written by
   forms.jsx on each scroll frame, so every step below tracks the scroll instead of snapping.
   Desktop only: on a phone the canvas already hands vertical scrolling back to the page, and
   pinning it would trap the user inside a canvas they can't scroll past. */
.fb-root { --fz: 0; --fzpre: 0; }
.dash-topbar { transition: opacity .3s ease, transform .3s ease; }

@media (min-width: 769px) {
  .fb-fade {
    opacity: calc(1 - var(--fz));
    transform: translateY(calc(var(--fz) * -10px));
    will-change: opacity, transform;
  }
  body.flow-zen .fb-fade { pointer-events: none; }
  body.flow-zen .dash-topbar { opacity: 0; transform: translateY(-100%); pointer-events: none; }

  /* The zone is the canvas plus a runway, so the pinned canvas has somewhere to stay stuck.
     --fzpre opens that runway on approach (see forms.jsx); --fz then grows the canvas itself. */
  .fb-flowzone { height: calc(620px + var(--fzpre) * 26vh + var(--fz) * (100vh - 620px)); }
  .fb-flowpin {
    position: sticky;
    top: calc(72px * (1 - var(--fz)));   /* rests under the topbar, rises as the topbar leaves */
    z-index: 5;
  }
  .fb-flowpin .ff-wrap {
    height: calc(620px + var(--fz) * (100vh - 620px - 28px));
    box-shadow: 0 calc(var(--fz) * 40px) calc(var(--fz) * 90px) rgba(0, 0, 0, calc(var(--fz) * 0.5));
    border-color: rgba(139, 92, 246, calc(0.1 + var(--fz) * 0.28));
  }
  /* Only reachable once the toggle above has scrolled away — so it appears with the focus. */
  .fb-zenout {
    position: absolute; top: 14px; right: 14px; z-index: 6;
    display: flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 12px; border-radius: 999px;
    font-size: 12px; font-weight: 600; color: var(--text-2);
    background: rgba(20, 20, 28, 0.8); backdrop-filter: blur(10px);
    border: 1px solid var(--border-2);
    opacity: var(--fz); pointer-events: none;
    transition: color .15s, border-color .15s;
  }
  body.flow-zen .fb-zenout { pointer-events: auto; }
  .fb-zenout:hover { color: var(--text); border-color: var(--accent); }
}
@media (max-width: 768px) { .fb-zenout { display: none; } }

/* ═══════════════ FORM FLOW CANVAS — nodes + animated connector lines ═══════════════ */
.ff-wrap {
  position: relative; height: 620px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border); background: #0a0a0e;
  /* the dot grid */
  background-image: radial-gradient(circle, rgba(255,255,255,.075) 1px, transparent 1px);
  background-size: 22px 22px;
  cursor: grab; user-select: none; touch-action: none;
}
.ff-wrap.panning { cursor: grabbing; }
.ff-wrap::after { /* vignette so nodes read against the grid */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, transparent 40%, rgba(0,0,0,.45));
}
.ff-canvas { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; }

/* --- edges --- */
.ff-edges { position: absolute; top: 0; left: 0; overflow: visible; pointer-events: none; z-index: 1; }
.ff-edge { fill: none; stroke-linecap: round; }
/* sequence: solid accent with a travelling dash on top (the "flowing" line) */
.ff-edge.seq { stroke: color-mix(in srgb, var(--accent) 55%, transparent); stroke-width: 2; }
.ff-edge.seq-flow {
  stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 12;
  animation: ffFlow 1.1s linear infinite;
  filter: drop-shadow(0 0 5px var(--accent-glow));
}
@keyframes ffFlow { to { stroke-dashoffset: -18; } }
/* conditional (showIf): amber, marching dashes, curves out to the side */
.ff-edge.cond { stroke: #f5b13d; stroke-width: 1.8; stroke-dasharray: 5 6; opacity: .85;
  animation: ffFlow 1.4s linear infinite reverse; }
.ff-edge.dim { opacity: .18; }
.ff-edge.hot { stroke-width: 2.6; }

.ff-dot { fill: var(--accent); }
.ff-dot.cond { fill: #f5b13d; }
.ff-arrow { fill: var(--accent); }

/* --- nodes --- */
.ff-node {
  position: absolute; top: 0; left: 0; width: var(--ffw, 300px); z-index: 2;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border-2); border-radius: 12px; overflow: hidden;
  box-shadow: 0 10px 30px -14px rgba(0,0,0,.7);
  will-change: transform; cursor: grab;
  transition: border-color .16s, box-shadow .2s;
}
.ff-node:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.ff-node.sel { border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 16px 40px -16px var(--accent-glow); }
.ff-node.dragging {
  cursor: grabbing; z-index: 10;
  border-color: var(--accent);
  box-shadow: 0 34px 70px -20px rgba(0,0,0,.85), 0 0 0 1px var(--accent), 0 0 40px -8px var(--accent-glow);
}
.ff-node.ghost { opacity: .35; }

.ff-nhead { display: flex; align-items: center; gap: 8px; padding: 9px 11px;
  background: rgba(255,255,255,.035); border-bottom: 1px solid var(--border); }
.ff-nidx { width: 20px; height: 20px; border-radius: 6px; flex: none; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 800; font-family: var(--mono);
  background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-2); }
.ff-ntype { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.ff-nreq { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.ff-nbody { padding: 10px 12px 12px; }
.ff-nlabel { font-size: 13.5px; font-weight: 700; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ff-nlabel.empty { color: var(--text-3); font-weight: 600; font-style: italic; }
.ff-nmeta { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ff-chip { display: inline-flex; align-items: center; gap: 4px; height: 19px; padding: 0 7px; border-radius: 999px;
  font-size: 10px; font-weight: 700; background: var(--panel-3); color: var(--text-3); border: 1px solid var(--border); }
.ff-chip.cond { color: #f5b13d; border-color: rgba(245,177,61,.3); background: rgba(245,177,61,.1); }

/* connection ports */
.ff-port { position: absolute; left: 50%; width: 9px; height: 9px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--accent); transform: translateX(-50%); z-index: 3; }
.ff-port.in  { top: -5px; }
.ff-port.out { bottom: -5px; }

/* insertion marker between nodes while dragging */
.ff-slot { position: absolute; left: 0; height: 3px; border-radius: 3px; z-index: 1;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 16px 2px var(--accent-glow);
  animation: ffSlot .2s var(--ease-out) both; }
@keyframes ffSlot { from { opacity: 0; transform: scaleX(.3); } to { opacity: 1; transform: none; } }

/* toolbar overlay */
.ff-bar { position: absolute; top: 12px; left: 12px; z-index: 20; display: flex; gap: 6px;
  padding: 5px; border-radius: 11px; background: rgba(16,16,22,.9); border: 1px solid var(--border-2);
  backdrop-filter: blur(10px); }
.ff-bar button { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  color: var(--text-3); transition: background .15s, color .15s; }
.ff-bar button:hover { background: var(--panel-3); color: var(--text); }
.ff-hint { position: absolute; bottom: 12px; left: 12px; z-index: 20; font-size: 11.5px; color: var(--text-3);
  background: rgba(16,16,22,.85); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
  backdrop-filter: blur(8px); }
.ff-legend { position: absolute; bottom: 12px; right: 12px; z-index: 20; display: flex; gap: 12px;
  font-size: 11px; color: var(--text-3);
  background: rgba(16,16,22,.85); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
  backdrop-filter: blur(8px); }
.ff-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ff-legend i { width: 14px; height: 2px; border-radius: 2px; display: block; }
.ff-legend i.s { background: var(--accent); }
.ff-legend i.c { background: #f5b13d; }
.ff-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); font-size: 13.5px; z-index: 5; }

/* ═══════════════ custom dropdown (replaces the OS <select> popup) ═══════════════ */
.fs { position: relative; display: inline-block; }
.fs-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 10px;
  border-radius: 9px; background: var(--panel-2); border: 1px solid var(--border-2);
  color: var(--text); font-size: 13px; font-weight: 600; text-align: left; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .18s;
}
.fs-btn:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: var(--panel-3); }
.fs.open .fs-btn { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.fs-btn .fs-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-btn .fs-val.ph { color: var(--text-3); font-weight: 500; }
.fs-caret { flex: none; color: var(--text-3); transition: transform .22s var(--ease-out); }
.fs.open .fs-caret { transform: rotate(180deg); color: var(--accent); }

.fs-pop {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; min-width: 100%;
  padding: 5px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border-2);
  box-shadow: 0 22px 50px -18px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.03);
  max-height: 260px; overflow-y: auto; transform-origin: top center;
  animation: fsIn .16s var(--ease-out) both;
}
.fs-pop.up { top: auto; bottom: calc(100% + 6px); transform-origin: bottom center; }
@keyframes fsIn { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }

.fs-opt {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 9px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-2); text-align: left; cursor: pointer;
  transition: background .12s, color .12s, transform .12s var(--ease-out);
}
.fs-opt:hover, .fs-opt.cur { background: var(--panel-3); color: var(--text); }
.fs-opt.cur { transform: translateX(2px); }
.fs-opt.on { color: var(--text); }
.fs-opt.on .fs-tick { opacity: 1; transform: none; }
.fs-tick { margin-left: auto; flex: none; color: var(--accent); opacity: 0; transform: scale(.6);
  transition: opacity .14s, transform .18s var(--ease-spring); }
.fs-oico { flex: none; color: var(--text-3); }
.fs-opt.on .fs-oico, .fs-opt.cur .fs-oico { color: var(--accent-2); }
.fs-sub { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-3); margin-top: 1px; }

/* ---- small banner thumbnail (was a giant 16:6 slab) ---- */
.f-thumb {
  width: 190px; height: 72px; flex: none; border-radius: 10px; overflow: hidden;
  background: var(--panel-2); border: 1px solid var(--border);
  display: grid; place-items: center; position: relative;
}
.f-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.f-thumb span { font-size: 11px; color: var(--text-3); }

/* themed dropdown on the public form — inherits the form's accent / font / radius */
.apf-sel { position: relative; margin-top: 10px; }
.apf-selbtn {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 14px; cursor: pointer;
  border-radius: calc(var(--apf-radius) * .55);
  background: var(--apf-field); border: 1px solid var(--apf-line); color: var(--apf-text);
  font-family: var(--apf-font); font-size: 14.5px; text-align: left;
  transition: border-color .18s, box-shadow .22s, background .18s;
}
.apf-selbtn:hover { border-color: color-mix(in srgb, var(--apf-accent) 45%, transparent); }
.apf-sel.open .apf-selbtn {
  border-color: var(--apf-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--apf-accent) 18%, transparent);
  background: color-mix(in srgb, var(--apf-accent) 5%, var(--apf-field));
}
.apf-selbtn.bad { border-color: #f87171; box-shadow: 0 0 0 4px rgba(248,113,113,.14); }
.apf-selbtn:disabled { opacity: .55; cursor: not-allowed; }
.apf-selval { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apf-selval.ph { color: var(--apf-text-3); }
.apf-selcaret { flex: none; color: var(--apf-text-3); transition: transform .22s var(--ease-out); }
.apf-sel.open .apf-selcaret { transform: rotate(180deg); color: var(--apf-accent); }

.apf-selpop {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0;
  padding: 5px; border-radius: calc(var(--apf-radius) * .55);
  background: var(--apf-card); border: 1px solid var(--apf-line);
  backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 26px 60px -20px rgba(0,0,0,.75);
  max-height: 260px; overflow-y: auto; transform-origin: top center;
  animation: fsIn .16s var(--ease-out) both;
}
.apf-selpop.up { top: auto; bottom: calc(100% + 6px); transform-origin: bottom center; }
.apf-selopt {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 11px;
  border-radius: calc(var(--apf-radius) * .4);
  font-family: var(--apf-font); font-size: 14px; color: var(--apf-text-2);
  text-align: left; cursor: pointer; transition: background .12s, color .12s, transform .12s var(--ease-out);
}
.apf-selopt:hover, .apf-selopt.cur { background: color-mix(in srgb, var(--apf-accent) 12%, transparent); color: var(--apf-text); transform: translateX(2px); }
.apf-selopt.on { color: var(--apf-text); }
.apf-seltick { margin-left: auto; flex: none; color: var(--apf-accent); opacity: 0; transform: scale(.6);
  transition: opacity .14s, transform .18s var(--ease-spring); }
.apf-selopt.on .apf-seltick { opacity: 1; transform: none; }

/* ---- response review drawer ---- */
.fr-drawer { width: min(580px, 100vw); }
.fr-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); flex: none; }
.fr-name { font-size: 16px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; flex: none;
  background: var(--border); border-bottom: 1px solid var(--border); }
.fr-stat { background: var(--panel-2); padding: 11px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fr-k { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.fr-v { font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fr-body { flex: 1; overflow-y: auto; padding: 18px 20px 24px; }
.fr-q { padding: 12px 14px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--border); margin-bottom: 10px;
  transition: border-color .16s; }
.fr-q:hover { border-color: var(--border-2); }
.fr-qhead { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.fr-qn { width: 18px; height: 18px; border-radius: 5px; flex: none; display: grid; place-items: center;
  font-size: 10px; font-weight: 800; font-family: var(--mono);
  background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent-2); }
.fr-qlabel { font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-req { color: var(--accent); font-weight: 800; }
.fr-a { font-size: 13.5px; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.fr-a.none { color: var(--text-3); font-style: italic; font-size: 12.5px; }
.fr-file { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-2); font-weight: 600; }
.fr-file:hover { text-decoration: underline; }

.fr-foot { display: flex; align-items: center; gap: 8px; padding: 14px 16px; flex: none;
  border-top: 1px solid var(--border); background: var(--panel-2); }

@media (max-width: 560px) { .fr-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---- image drop zone (banner / logo / background) ---- */
.fdz {
  position: relative; overflow: hidden; cursor: pointer; outline: none;
  min-height: 96px; border-radius: 13px;
  background: var(--panel-2); border: 1.5px dashed var(--border-2);
  display: grid; place-items: center;
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .16s var(--ease-out), box-shadow .2s;
}
.fdz:hover, .fdz:focus-visible { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--panel-3); }
.fdz.over {
  border-color: var(--accent); border-style: solid;
  background: color-mix(in srgb, var(--accent) 10%, var(--panel-2));
  transform: scale(1.005);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent), 0 18px 44px -20px var(--accent-glow);
}
.fdz.busy { cursor: progress; }
.fdz-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* the label plate — always legible, scrim only when an image sits behind it */
.fdz-face { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 14px 18px; text-align: center; transition: opacity .18s; }
.fdz.has .fdz-face { opacity: 0; border-radius: 12px; padding: 16px 22px;
  background: rgba(10,10,14,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.fdz.has:hover .fdz-face, .fdz.has.over .fdz-face, .fdz.has.busy .fdz-face { opacity: 1; }
.fdz-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-2);
  transition: transform .2s var(--ease-spring); }
.fdz.over .fdz-ico { transform: translateY(-2px) scale(1.1); }
.fdz-t { font-size: 13px; font-weight: 700; color: var(--text); }
.fdz-s { font-size: 11.5px; color: var(--text-3); }
.fdz-x { position: absolute; top: 8px; right: 8px; z-index: 2; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; color: #fff; background: rgba(10,10,14,.72);
  border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .16s, background .16s; }
.fdz:hover .fdz-x { opacity: 1; }
.fdz-x:hover { background: var(--red); }
.fdz-spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--border-2);
  border-top-color: var(--accent); animation: fdzSpin .7s linear infinite; }
@keyframes fdzSpin { to { transform: rotate(360deg); } }

/* ---- "name your form" row: it appears far from the button that revealed it, so pull the eye over ---- */
.f-namerow { animation: fNameIn .32s var(--ease-spring) both; }
@keyframes fNameIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
/* a couple of attention pulses, then it settles into a normal focused field */
.f-hl { border-color: var(--accent) !important; animation: fHl 1.5s var(--ease-out) 2; }
@keyframes fHl {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  55%  { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
}
.f-hl:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent) !important; }

/* banner row: a compact tile beside its field, instead of a full-width slab */
.f-bannerrow { display: flex; gap: 18px; align-items: flex-start; margin-top: 18px;
  padding-top: 18px; border-top: 1px solid var(--border); }
.f-bannerrow .fdz { flex: none; }
@media (max-width: 720px) { .f-bannerrow { flex-direction: column; } .f-bannerrow .fdz { width: 100% !important; } }
/* the drop zone is always an explicit size now — never let it inherit a runaway width */
.fdz { max-width: 100%; }

/* Centred modal entrance. A modal that centres itself with `transform: translate(-50%,-50%)`
   CANNOT use .anim-scalein: that animation also drives `transform`, and an animation beats an
   inline style in the cascade — so its `to { transform: scale(1) }` wiped the centring translate
   and the modal drifted to the bottom-right by half its own size. The translate has to live
   INSIDE the keyframes. */
@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.anim-modal { animation: modalIn .4s cubic-bezier(.2,.7,.2,1) both; }

/* a card can carry several role facets at once (staff + CAD + civilian) */
.sh-roles { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.sh-roles .sh-role { margin-top: 0; }
.sh-role.staff { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent); }
.sh-role.civ { background: rgba(148,163,184,.12); color: #94a3b8; border-color: rgba(148,163,184,.28); }
.sh-role.own { background: rgba(245,177,61,.14); color: #f5b13d; border-color: rgba(245,177,61,.32); }

/* ==================================================================
   MOBILE — Applications workspace, flow canvas, drop-zones, dropdowns
   Extends the canonical system above (768 = primary stack point).
   Desktop (>768px) appearance is never changed.
   ================================================================== */

/* ---- SYSTEMIC: an <input> refuses to shrink below its intrinsic size ----
   .input input is flex:1 with flex-basis 0, but min-width stays `auto`, so its
   min-content width is ~197px. That single default is what made half the rows in
   the app overflow on a phone. */
@media (max-width: 768px) {
  .input input, .input textarea { min-width: 0; }
  .cad-input input { min-width: 0; }
}

/* ---- Tabs: scroll instead of overflowing (Build/Design/Settings/Responses ≈327px) ---- */
@media (max-width: 768px) {
  .ui-tabs {
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    justify-content: flex-start;
  }
  .ui-tabs::-webkit-scrollbar { display: none; }
}

/* ---- form builder: question cards ---- */
@media (max-width: 768px) {
  /* the drag handle is hover-revealed on desktop — there is no hover on touch, so the ONLY way to
     reorder was invisible. Pin it open and give it a real 40px target. */
  .fq-handle {
    opacity: 1 !important; transform: none !important;
    width: 34px; height: 40px; left: 3px; top: 10px;
  }
  .fq-card { padding: 14px 12px 14px 44px; }

  .fq-head { flex-wrap: wrap; row-gap: 10px; }
  .fq-head > .row { min-width: 0; }
  .fq-head .fs { width: 100% !important; }          /* the type dropdown gets its own line */

  .fq-optrow { flex-wrap: wrap; row-gap: 8px; }
  .fq-optrow .input { flex: 1 1 100%; }
}
@media (max-width: 480px) {
  .fq-scorelbl { display: none; }                    /* the field is self-evident; the word isn't */
}

/* ---- settings rows: label and control stack instead of squeezing the label to ~96px ---- */
@media (max-width: 640px) {
  .f-row { flex-wrap: wrap; row-gap: 10px; }
  .f-row > * { flex: 1 1 100% !important; min-width: 0; }
  .f-row input[type="datetime-local"], .f-row input[type="date"] { width: 100% !important; }
}

/* ---- custom dropdown popup must never render off-screen ---- */
@media (max-width: 768px) {
  .fs-pop { max-width: calc(100vw - 24px); }
  .fs-opt { padding: 11px 10px; }                    /* touch target */
  .apf-selopt { padding: 13px 12px; }
}

/* ---- image drop-zone: the remove/replace affordances were hover-only ---- */
@media (hover: none) {
  .fdz-x { opacity: 1; }                             /* ✕ was invisible on touch — undiscoverable */
  .fdz.has .fdz-face { opacity: 0; }                 /* keep the image clean… */
  .fdz.has:active .fdz-face { opacity: 1; }          /* …but reveal "Replace" on press */
}
@media (max-width: 768px) {
  .fdz { width: 100% !important; }                   /* the fixed 280px tile goes fluid */
  .fdz-x { width: 36px; height: 36px; }
  .f-bannerrow { gap: 12px; }
}

/* ---- Design tab: the sticky preview becomes a nested scroll trap once stacked ---- */
@media (max-width: 768px) {
  .fm-preview { position: static; max-height: none; }
  .fm-fonts { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .fm-seg { flex-wrap: wrap; }
}

/* ---- flow canvas ----
   .ff-wrap had `touch-action: none` + a fixed 620px height: a swipe anywhere on it panned the
   canvas instead of scrolling the PAGE, so everything below it (including Save) was unreachable.
   pan-y hands vertical scrolling back to the browser; the node itself keeps touch-action:none so
   dragging a card still works. */
@media (max-width: 768px) {
  .ff-wrap { height: 58vh; min-height: 320px; touch-action: pan-y; }
  .ff-node { touch-action: none; }
  .ff-bar button { width: 40px; height: 40px; }
  .ff-hint { display: none; }                        /* it said "scroll to zoom" — untrue on touch */
  .ff-legend { font-size: 10.5px; padding: 5px 8px; }
}
/* node width is published by the JS as --ffw so the two can't drift apart */
.ff-node { width: var(--ffw, 300px); }

/* ---- response review drawer ---- */
@media (max-width: 768px) {
  .fr-head { padding: 14px 16px; }
  .fr-body { padding: 14px 16px 20px; }
  .fr-foot { padding: 12px 14px; flex-wrap: wrap; }
  .fr-foot .btn { flex: 1; }
}

/* ---- CAD: .cad-editrow > * { flex: 1 } cancelled the children's explicit widths, so a 6-item
   rank row gave every control an equal ~55px share — name and role both unreadable. ---- */
.cad-editrow > .iconbtn { flex: 0 0 auto; }
@media (max-width: 640px) {
  .cad-editrow > input, .cad-editrow > label, .cad-editrow > .cad-input { flex: 1 1 100%; }
}

/* ---- public application page (applicants are overwhelmingly on phones) ---- */
.apf { min-height: 100dvh; }                          /* avoid the iOS address-bar jump */
@media (max-width: 640px) {
  .apf-hero { max-height: 34vh; }                     /* bannerHeight can be set up to 420px */
}
@media (hover: none) {
  .apf-opt:hover { transform: none; }                 /* the hover transform sticks after a tap on iOS */
  .fq-card:hover .fq-handle { opacity: 1; }
}

/* ---- misc rows that overflow ---- */
@media (max-width: 640px) {
  .f-namerow { flex-wrap: wrap; row-gap: 8px; }
  .f-namerow .btn { flex: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMBED BUILDER — the composer, the Discord-faithful preview, and the SDK scope
   ═══════════════════════════════════════════════════════════════════════════ */
/* A dotted canvas with a soft purple glow behind the whole builder — same energy as the flow
   canvas. The two glow layers are viewport-anchored (background-attachment: fixed) so they sit
   behind the top of the tab and don't scroll away; the dot grid rides with the content. min-height
   keeps the canvas visible even for a short message. The background is on .emb-root itself (not a
   pseudo) so no ancestor's solid background can paint over it. */
.emb-root {
  display: flex; flex-direction: column; gap: 16px; position: relative;
  min-height: calc(100vh - 220px);
  margin: -8px; padding: 8px;   /* let the canvas bleed to the edges of the view area */
  background-image:
    radial-gradient(50% 46% at 72% -2%, rgba(139, 92, 246, 0.28), transparent 62%),
    radial-gradient(38% 40% at 4% 4%, rgba(167, 139, 250, 0.16), transparent 60%),
    radial-gradient(circle, rgba(150, 120, 255, 0.16) 1.4px, transparent 1.4px);
  background-attachment: fixed, fixed, local;
  background-size: 100% 100%, 100% 100%, 24px 24px;
  background-repeat: no-repeat, no-repeat, repeat;
}
.emb-top { gap: 12px; }
.emb-name { flex: 1; min-width: 220px; max-width: 420px; }
.emb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.emb-left { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.emb-right { min-width: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }

.emb-editor { display: flex; flex-direction: column; gap: 14px; }
.emb-sec { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.emb-sec-head { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.emb-field { display: flex; flex-direction: column; gap: 6px; }
.emb-label { font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); }
.emb-input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 11px; color: var(--text); font: inherit; font-size: 13.5px; line-height: 1.5;
  resize: vertical; outline: none; transition: border-color .15s;
}
.emb-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.emb-colorin { width: 42px; height: 38px; padding: 0; border: 1px solid var(--border); border-radius: 9px; background: none; cursor: pointer; }
.emb-inline { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.emb-fields { display: flex; flex-direction: column; gap: 10px; }
.emb-fieldrow { background: var(--panel-2); border: 1px solid var(--border); border-radius: 11px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }

/* the character budgets — Discord rejects the whole message if any are broken, so this is loud */
.emb-count { font-size: 11px; font-weight: 700; color: var(--text-3); font-family: var(--mono); }
.emb-count.near { color: var(--amber); }
.emb-count.over { color: var(--red); }

.emb-via { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 11px; }
.emb-viabtn {
  display: flex; align-items: center; justify-content: center; gap: 7px; height: 34px; border-radius: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--text-3); transition: all .18s var(--ease);
}
.emb-viabtn:hover { color: var(--text-2); }
.emb-viabtn.on { background: var(--accent-soft); color: var(--accent-2); box-shadow: 0 0 16px -6px var(--accent); }
.emb-send { padding: 16px; display: flex; flex-direction: column; }
.emb-errs { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--amber); }
.emb-result { margin-top: 10px; display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; line-height: 1.45; }
.emb-result.ok { color: var(--green); }
.emb-result.bad { color: var(--red); }

.emb-templates { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.emb-tpl { display: flex; align-items: center; gap: 6px; }
.emb-tpl-main {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0;
  padding: 9px 11px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border);
  transition: all .15s var(--ease);
}
.emb-tpl-main:hover { border-color: var(--border-2); transform: translateX(2px); }
.emb-tpl.on .emb-tpl-main { border-color: var(--accent); background: var(--accent-soft); }
.emb-tpl-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- the preview ----------
   Discord's real values, so what people see is what actually gets posted. The colour bar is a left
   border — that is how Discord builds it, and it stays aligned when the content reflows. */
.embp { background: #313338; border-radius: 10px; padding: 14px; overflow-x: auto; }
.embp-msg { display: flex; gap: 12px; font-family: 'gg sans', 'Noto Sans', Helvetica, Arial, sans-serif; }
.embp-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.embp-head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.embp-author { font-size: 15px; font-weight: 600; color: #f2f3f5; }
.embp-bot { font-size: 10px; font-weight: 600; color: #fff; background: #5865f2; border-radius: 3px; padding: 1px 4px; }
.embp-time { font-size: 12px; color: #949ba4; }
.embp-content { font-size: 15px; color: #dbdee1; line-height: 1.375; margin-bottom: 6px; }

.embp-embed {
  max-width: 432px; background: #2b2d31; border-left: 4px solid #4f545c; border-radius: 4px;
  padding: 8px 16px 16px 12px; margin-top: 2px;
}
.embp-embed-grid { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.embp-arow { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.embp-aicon { width: 24px; height: 24px; border-radius: 50%; }
.embp-aname { font-size: 14px; font-weight: 600; color: #f2f3f5; }
.embp-title { font-size: 16px; font-weight: 600; color: #f2f3f5; margin-top: 8px; }
.embp-title.link { color: #00a8fc; }
.embp-desc { font-size: 14px; color: #dbdee1; line-height: 1.375; margin-top: 8px; }
.embp-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; margin-top: 8px; }
.embp-image { display: block; width: 100%; border-radius: 4px; margin-top: 16px; }
.embp-fields { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; margin-top: 8px; }
.embp-field { min-width: 0; }
.embp-fname { font-size: 14px; font-weight: 600; color: #f2f3f5; margin-bottom: 2px; }
.embp-fval { font-size: 14px; color: #dbdee1; line-height: 1.375; }
.embp-footer { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: #949ba4; }
.embp-ficon { width: 20px; height: 20px; border-radius: 50%; }
.embp-dot { padding: 0 2px; }
.embp-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; max-width: 432px; }
.embp-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 16px; border-radius: 3px;
  background: #4e5058; color: #fff; font-size: 14px; font-weight: 500; text-decoration: none;
}
.embp-btn:hover { background: #6d6f78; }

.emb-md { white-space: pre-wrap; word-break: break-word; }
.emb-md h1 { font-size: 20px; font-weight: 700; margin: 6px 0 2px; }
.emb-md h2 { font-size: 17px; font-weight: 700; margin: 6px 0 2px; }
.emb-md h3 { font-size: 15px; font-weight: 700; margin: 6px 0 2px; }
.emb-md code { background: #1e1f22; border-radius: 3px; padding: 1px 3px; font-family: var(--mono); font-size: 12.5px; }
.emb-md pre { background: #1e1f22; border: 1px solid #2b2d31; border-radius: 4px; padding: 8px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; }
.emb-md blockquote { border-left: 4px solid #4f545c; padding-left: 8px; margin: 2px 0; }
.emb-md a { color: #00a8fc; text-decoration: none; }
.emb-md a:hover { text-decoration: underline; }

/* ---------- the vendored SDK's scope ----------
   Its CSS-module class names are hashed, so none of ITS styling can leak into Acronix. The leak runs
   the other way: our global element selectors (button, input, textarea) land inside the SDK's DOM
   and wreck a layout that was written against browser defaults. Neutralise them here, once. */
/* The SDK sizes everything in rem against a ~10px root; our document root is 16px, so it renders
   oversized. zoom shrinks the whole editor uniformly AND reflows (unlike transform: scale), and it
   scales the absolutely-positioned menus with it so nothing drifts. */
.emb-sdk-scope { color-scheme: dark; zoom: 0.82; }
.emb-sdk-scope button, .emb-sdk-scope input, .emb-sdk-scope textarea, .emb-sdk-scope select {
  font: inherit; color: inherit;
}
.emb-sdk-scope .emb-input { background: #1e1f22; border-color: #3f4147; }
.emb-emoji {
  padding: 10px; width: 250px;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(139, 92, 246, 0.1);
  animation: embMenuPop .16s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes embMenuPop { from { opacity: 0; transform: translateY(-6px) scale(.96); } to { opacity: 1; transform: none; } }
.emb-emoji-q {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 11px; color: var(--text); font-size: 13px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.emb-emoji-q:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.emb-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; margin-top: 10px; }
.emb-emoji-grid button {
  aspect-ratio: 1; display: grid; place-items: center; font-size: 18px; line-height: 1;
  border-radius: 8px; transition: background .12s, transform .12s cubic-bezier(.2, 1.4, .5, 1);
}
.emb-emoji-grid button:hover { background: var(--accent-soft); transform: scale(1.18); }
.emb-emoji-use {
  margin-top: 10px; width: 100%; height: 32px; border-radius: 9px; font-size: 12.5px; font-weight: 700;
  color: var(--accent-2); background: var(--accent-soft); border: 1px solid rgba(139, 92, 246, 0.25);
  transition: background .14s;
}
.emb-emoji-use:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.emb-emoji-img { width: 20px; height: 20px; vertical-align: -4px; }
.emb-emoji-native { font-size: 16px; }
.emb-color {
  padding: 12px; width: 236px; display: flex; flex-direction: column; gap: 12px;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(139, 92, 246, 0.1);
  animation: embMenuPop .17s cubic-bezier(.2, .9, .3, 1) both;
}
.emb-color-row { display: flex; align-items: center; gap: 8px; }
.emb-color-row:first-child { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; }
.emb-swatch {
  width: 100%; aspect-ratio: 1; border-radius: 7px; border: 2px solid transparent; position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  transition: transform .14s cubic-bezier(.2, 1.5, .5, 1), box-shadow .14s;
}
.emb-swatch:hover { transform: scale(1.16); }
.emb-swatch.on { transform: scale(1.08); box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent-2); }
.emb-swatch.on::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 7px; height: 7px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 4px rgba(0, 0, 0, .5); animation: embDot .2s cubic-bezier(.2, 1.6, .5, 1) both;
}
@keyframes embDot { from { transform: scale(0); } to { transform: scale(1); } }

/* the native colour square — styled to match the fields around it */
.emb-color input[type="color"] {
  width: 38px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 9px;
  background: none; cursor: pointer; flex: none; transition: border-color .14s, transform .12s;
}
.emb-color input[type="color"]:hover { border-color: var(--accent); transform: translateY(-1px); }
.emb-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
.emb-color input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }

.emb-hex { flex: 1; font-family: var(--mono); font-size: 12.5px; height: 34px; }
.emb-clear {
  flex: none; height: 34px; padding: 0 12px; border-radius: 9px; font-size: 12px; font-weight: 600;
  color: var(--text-3); background: var(--panel-2); border: 1px solid var(--border);
  transition: color .14s, border-color .14s, background .14s;
}
.emb-clear:hover { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.emb-actionmenu { padding: 10px; width: 240px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.emb-actionmenu button { margin-top: 8px; font-size: 12.5px; color: var(--accent-2); }

@media (max-width: 1100px) {
  .emb-grid { grid-template-columns: 1fr; }
  .emb-right { position: static; }
}

/* embed send panel: sync button + the not-set-up notice */
.emb-syncbtn { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 11.5px; font-weight: 700; color: var(--text-3); background: var(--panel-2); border: 1px solid var(--border); transition: color .14s, border-color .14s; }
.emb-syncbtn:hover { color: var(--accent-2); border-color: var(--accent); }
.emb-syncbtn:disabled { opacity: .6; }
.emb-notice { display: flex; gap: 9px; align-items: flex-start; margin-top: 8px; padding: 11px 12px; border-radius: 10px; background: var(--amber-soft); border: 1px solid rgba(251,191,36,0.25); font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.emb-notice svg { color: var(--amber); flex: none; margin-top: 1px; }

/* embed builder — add-block editor (the friendlier classic mode) */
.emb-titlerow { display: flex; align-items: center; gap: 8px; }
.emb-colorwrap { flex: none; display: block; }
.emb-colorin { width: 40px; height: 40px; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: none; cursor: pointer; transition: border-color .14s, transform .12s; display: block; }
.emb-colorin:hover { border-color: var(--accent); transform: translateY(-1px); }
.emb-colorin::-webkit-color-swatch-wrapper { padding: 3px; }
.emb-colorin::-webkit-color-swatch { border: none; border-radius: 7px; }

.emb-block {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px;
  animation: embBlockIn .22s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes embBlockIn { from { opacity: 0; transform: translateY(-6px) scale(.99); } to { opacity: 1; transform: none; } }
.emb-block-head { display: flex; align-items: center; gap: 9px; }
.emb-block-ico { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent-2); }
.emb-block-name { font-size: 13px; font-weight: 700; flex: 1; }
.emb-block-x { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 7px; color: var(--text-3); transition: color .14s, background .14s; }
.emb-block-x:hover { color: var(--red); background: var(--red-soft); }
.emb-block-hint { font-size: 11.5px; color: var(--text-3); margin: 6px 0 0; line-height: 1.5; }
.emb-block-body { margin-top: 11px; display: flex; flex-direction: column; gap: 8px; }

.emb-fmove { display: flex; flex-direction: column; gap: 2px; flex: none; }
.emb-fmove-b { width: 22px; height: 18px; display: grid; place-items: center; border-radius: 5px; color: var(--text-3); background: var(--panel-2); border: 1px solid var(--border); transition: color .12s, border-color .12s; }
.emb-fmove-b:hover:not(:disabled) { color: var(--accent-2); border-color: var(--accent); }
.emb-fmove-b:disabled { opacity: .35; }
.emb-addrow { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; height: 32px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--accent-2); background: var(--accent-soft); border: 1px solid rgba(139, 92, 246, .22); transition: background .14s, transform .12s; }
.emb-addrow:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.emb-addrow:active { transform: scale(.98); }

.emb-palette { background: var(--panel-2); border: 1px dashed var(--border-2); border-radius: 14px; padding: 12px 14px; }
.emb-palette-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.emb-palette-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.emb-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 10px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--panel); border: 1px solid var(--border);
  transition: color .14s, border-color .14s, transform .12s, box-shadow .14s;
}
.emb-chip svg { color: var(--text-3); transition: color .14s; }
.emb-chip:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 18px -8px var(--accent); }
.emb-chip:hover svg { color: var(--accent-2); }
.emb-chip:active { transform: translateY(0); }

/* ===== Form sections — a non-input heading that groups the questions under it ===== */
/* Public apply page + Design-tab preview (scoped to .apf, uses --apf-* vars) */
.apf-section { animation: apfQ .45s var(--ease-out) both; animation-delay: var(--d, 0ms); margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--apf-line); }
.apf-body > .apf-section:first-child { border-top: none; padding-top: 2px; margin-top: 0; }
.apf-section-title { font-family: var(--apf-hfont); font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--apf-text); }
.apf-section-desc { color: var(--apf-text-2); font-size: 14px; line-height: 1.6; margin-top: 6px; white-space: pre-wrap; }
/* Builder card variant (dashboard scope, --accent available) */
.fq-section-card { background: color-mix(in srgb, var(--accent) 6%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 32%, var(--border)); }
.fq-section-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
/* Staff response drawer */
.fr-section { margin: 18px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.fr-body > .fr-section:first-child { margin-top: 0; }
.fr-section-title { font-size: 14px; font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.fr-section-desc { font-size: 12.5px; color: var(--text-3); margin-top: 3px; line-height: 1.5; }

/* ===== Apply page: sticky top bar ("always on top") + section pagination ===== */
.apf-topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; transform: translateY(-102%); opacity: 0; pointer-events: none;
  transition: transform .42s var(--ease-spring), opacity .3s var(--ease-out);
  background: color-mix(in srgb, var(--apf-bg) 76%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.25); backdrop-filter: blur(16px) saturate(1.25);
  border-bottom: 1px solid var(--apf-line); }
.apf-topbar.on, .apf-topbar.always { transform: translateY(0); opacity: 1; pointer-events: auto; }
.apf-topbar-in { max-width: 720px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 14px; }
.apf-topbar-title { flex: 1; min-width: 0; font-family: var(--apf-hfont); font-weight: 800; font-size: 15px; letter-spacing: -.01em;
  color: var(--apf-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apf.center .apf-topbar-in { justify-content: center; }
.apf.center .apf-topbar-title { flex: none; }
.apf-topbar-step { flex: none; font-size: 12px; font-weight: 700; color: var(--apf-text-2); font-variant-numeric: tabular-nums; }
.apf-topbar-prog { height: 3px; background: color-mix(in srgb, var(--apf-text-3) 20%, transparent); }
.apf-topbar-prog > span { display: block; height: 100%; background: var(--apf-accent); transform-origin: left center;
  transition: transform .55s var(--ease-spring); border-radius: 0 3px 3px 0; }

/* page swap: the container fades, and its remounted questions re-run their own stagger */
.apf-page.anim { animation: apfPageFade .32s var(--ease-out) both; }
@keyframes apfPageFade { from { opacity: 0; } to { opacity: 1; } }

.apf-pagenav { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--apf-line); }
.apf-pagenav-l, .apf-pagenav-r { flex: 1; display: flex; min-width: 0; }
.apf-pagenav-r { justify-content: flex-end; }
.apf-pageind { flex: none; font-size: 12.5px; font-weight: 700; color: var(--apf-text-3); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
@media (max-width: 560px) { .apf-topbar-in { padding: 11px 18px; } }
