@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/jetbrains-mono-500.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/jetbrains-mono-600.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/jetbrains-mono-700.woff2') format('woff2'); }

:root {
  
  
  
  --c-accent:     var(--c-green, #22c55e);
  --c-bg:         #080b11;
  --c-bg-0:       #000000;   
  --c-bg-1:       #0b1018;
  --c-bg-2:       #0d131d;
  --c-bg-3:       #131b27;
  --c-surface:    #0d131d;
  --c-surface-hi: #131b27;
  --c-glass:      #0d131d;

  
  --c-blue:       var(--c-green);
  --c-blue-dim:   rgba(34, 197, 94, 0.14);
  --c-blue-glow:  rgba(34, 197, 94, 0.22);
  --c-green:      #22c55e;
  --c-green-dim:  rgba(34, 197, 94, 0.13);
  --c-green-glow: rgba(34, 197, 94, 0.20);
  --c-purple:     #a98bff;
  --c-red:        #ff5f72;
  --c-amber:      #ffb84d;
  --c-premium:    #a07830; 

  --c-text:       #eef2f7;
  --c-muted:      #7b879b;
  --c-dim:        #4b556a;
  --c-text-dim:   #9aa6b6;   

  --c-border:     #161e2b;
  --c-border-hi:  #232f44;
  --c-line:       #141c28;
  --c-line-hi:    #1f2a3c;

  --shadow-sm:  0 4px 16px rgba(0,0,0,.42);
  --shadow-md:  0 10px 34px rgba(0,0,0,.52);
  --shadow-lg:  0 22px 60px rgba(0,0,0,.62);
  
  --glow-blue:  0 0 0 0 transparent;
  --glow-green: 0 0 0 0 transparent;
  --glow-btn:   0 0 0 0 transparent;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
  --spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --fast:    0.14s;
  --med:     0.26s;
  --slow:    0.44s;

  
  --accent-primary:   var(--c-green);
  --accent-secondary: var(--c-blue);
  --accent-soft:      var(--c-blue-dim);
  --bg-main:          var(--c-bg);
  --bg-card:          var(--c-glass);
  --bg:               var(--c-bg);
  --bg-elev:          var(--c-bg-1);
  --bg-elev-2:        var(--c-bg-2);
  --bg-soft:          var(--c-bg-3);
  --line:             var(--c-line);
  --line-strong:      var(--c-line-hi);
  --text:             var(--c-text);
  --text-muted:       var(--c-muted);
  --text-dim:         var(--c-dim);
  --accent:           var(--c-blue);
  --accent-strong:    #8db0ff;
  --success:          var(--c-green);
  --danger:           var(--c-red);
  --warn:             var(--c-amber);
  --radius-lg:        var(--r-lg);
  --radius-md:        var(--r-md);
  --radius-sm:        var(--r-sm);
  --shadow-1:         var(--shadow-md);
  --shadow-2:         var(--shadow-lg);

  
  --op-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  
  --fs-display: 22px; --fs-h1: 18px; --fs-h2: 15px; --fs-h3: 13.5px;
  --fs-body: 13px; --fs-label: 10px; --fs-data: 13px;
  --lh-tight: 1.15; --lh-snug: 1.35; --lh-body: 1.55;
  
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-7: 32px;
  
  --dur-pulse: 2.4s; --dur-expand: var(--med); --dur-toggle: var(--fast);
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }


[hidden] { display: none !important; }

html, body {
  width: 100%;
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--ui-font, "IBM Plex Sans", "Segoe UI", "SF Pro Text", "Helvetica Neue", Arial, sans-serif);
  font-size: calc(13px * var(--ui-font-scale, 1));
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
  overflow: hidden;
  padding: 10px;
  -webkit-font-smoothing: antialiased;
}


body::before, body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
body::before {
  background: var(--c-bg-0);
  animation: ambientDrift 18s ease-in-out infinite alternate;
}
body::after {
  background: var(--c-bg-0);
  animation: ambientDrift2 24s ease-in-out infinite alternate;
}
@keyframes ambientDrift {
  0%   { transform: scale(1) translate(0,0); opacity:.92; }
  50%  { transform: scale(1.04) translate(-10px, 6px); opacity:1; }
  100% { transform: scale(1.02) translate(8px, -4px); opacity:.96; }
}
@keyframes ambientDrift2 {
  0%   { opacity:.7; transform: scale(1); }
  100% { opacity:1; transform: scale(1.06) translate(12px,-8px); }
}



.app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);   
  height: calc(100vh - 20px);
  min-height: 0;
  
  max-width: 1680px;
  margin-inline: auto;
  border-radius: var(--r-xl);
  border: 1px solid rgba(34,197,94,.14);
  overflow: hidden;
  background: var(--c-bg-0);
  box-shadow: 0 32px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.03);
  animation: appReveal .5s var(--ease) both;
}
@keyframes appReveal {
  from { opacity:0; transform: scale(.97) translateY(10px); }
  to   { opacity:1; transform: none; }
}



.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-3);
  background: var(--c-bg-0);
  border-right: 1px solid rgba(34,197,94,.08);
  overflow-y: auto;
  overscroll-behavior: contain;
}


.brand-block {
  display: block;
  padding: 2px 2px 0;
}
.sidebar-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }

.brand-logo {
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  position: relative;
  background: linear-gradient(155deg, rgba(34,197,94,.16), rgba(34,197,94,.06));
  border: 1px solid rgba(34,197,94,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 12px rgba(34,197,94,.12);
}
.brand-logo-mark {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
  pointer-events: none;
  user-select: none;
}
.brand-logo::before { content: none; }

.brand-copy { display: grid; gap: 1px; min-width: 0; }
.brand-eyebrow {
  display: inline-flex; align-items: center;
  font-family: var(--op-mono);
  font-size: 8px; font-weight: 600; letter-spacing: .14em;
  color: var(--c-accent); text-transform: uppercase;
}
.brand-copy h1 {
  font-family: var(--op-mono);
  font-size: 16px; font-weight: 600; letter-spacing: -.01em;
  line-height: 1.1; margin: 0; text-transform: lowercase;
  color: var(--c-green);
}
.brand-copy p {
  font-size: 11px; color: var(--c-muted); font-weight: 400;
  letter-spacing: .01em;
}

.brand-runtime-pill {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(34,197,94,.24);
  background: var(--c-bg-0);
  color: #d8fff2; font-size: 12px; font-weight: 600;
  letter-spacing: .01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: border-color var(--med) ease, background var(--med) ease;
}
.brand-runtime-text { flex: 0 1 auto; text-align: center; }
.brand-runtime-meta {
  flex: 0 0 auto;
  font-size: 9px; font-weight: 800; letter-spacing: .06em;
  color: var(--c-green);
  padding: 2px 7px; border-radius: 999px;
  background: rgba(34,197,94,.14);
  border: 1px solid rgba(34,197,94,.22);
}

.brand-runtime-pill.is-off {
  border-color: rgba(255,95,114,.28);
  background: var(--c-bg-0);
  color: #ffd3d9;
}
.brand-runtime-pill.is-off .brand-runtime-dot { background: var(--c-red); box-shadow: 0 0 0 3px rgba(255,95,114,.16), 0 0 10px rgba(255,95,114,.5); animation: none; }
.brand-runtime-pill.is-off .brand-runtime-meta { color: var(--c-red); background: rgba(255,95,114,.14); border-color: rgba(255,95,114,.22); }
.brand-runtime-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px;
  background: var(--c-green);
  box-shadow: 0 0 0 3px rgba(34,197,94,.18), 0 0 10px rgba(34,197,94,.5);
  animation: statusPulse 2.4s ease-in-out infinite;
}


.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-height: 0;
}

.nav-divider {
  height: 1px;
  margin: var(--sp-4) 6px auto;
  background: var(--c-line);
  border: 0;
  opacity: .7;
  flex: 0 0 auto;
}

.nav-item {
  position: relative;
  display: flex; align-items: center; gap: var(--sp-3);
  height: 36px; padding: 0 var(--sp-3);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-muted);
  font: inherit; font-size: 13px; font-weight: 500;
  text-align: left; cursor: pointer;
  transition: color var(--fast) ease, background var(--fast) ease, border-color var(--fast) ease;
  overflow: hidden;
}
.nav-item:hover {
  color: var(--c-text);
  background: rgba(255,255,255,.045);
  border-color: var(--c-line);
}
.nav-item:active { background: rgba(255,255,255,.07); }

.nav-item.is-active {
  color: var(--c-text); font-weight: 600;
  background: linear-gradient(90deg, rgba(34,197,94,.14), rgba(34,197,94,.05) 70%, transparent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.nav-item.is-active:hover { border-color: transparent; }
.nav-item.is-active::after {
  content: '';
  position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 2px; border-radius: 0 2px 2px 0;
  background: var(--c-accent);
}
.nav-item:focus-visible { outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-accent) 50%, transparent); }


.nav-item.nav-premium { color: color-mix(in srgb, var(--c-muted) 88%, transparent); }
.nav-item.nav-premium:hover { color: var(--c-text); }
.nav-premium-badge {
  margin-left: auto;
  font-family: var(--op-mono);
  font-size: 9px; font-weight: 700; letter-spacing: .06em;
  color: var(--c-accent);
  padding: 1px 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--c-accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-accent) 24%, transparent);
  text-transform: uppercase;
}
.nav-item.nav-premium.is-premium .nav-premium-badge {
  color: #0a0f0a;
  background: color-mix(in srgb, var(--c-accent) 70%, transparent);
  border-color: transparent;
}
@media (prefers-reduced-motion: reduce) {
  .nav-item:hover { background: rgba(255,255,255,.045); }
}


.side-card {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-bg-2);
  padding: 14px;
  box-shadow: none;
  transition: border-color var(--med) ease;
}
.side-card:hover { border-color: var(--c-border-hi); }
.side-card-soft { background: var(--c-bg-1); }

.side-card h3 {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  color: var(--c-dim); margin-bottom: 12px;
}
.side-card p { font-size: 12px; color: var(--c-muted); line-height: 1.5; }

.snapshot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.snapshot-grid div {
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--c-bg-0) 92%, transparent);
  padding: 10px;
  transition: border-color var(--med) ease;
}
.snapshot-grid div:hover {
  border-color: var(--c-border-hi);
  background: color-mix(in srgb, var(--c-accent) 4%, transparent);
}
.snapshot-grid span {
  display: block; font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--c-dim); margin-bottom: 4px;
}
.snapshot-grid strong {
  display: block; font-size: 20px; font-weight: 700; letter-spacing: -.03em;
  color: var(--c-text);
}



.workspace {
  
  display: flex;
  flex-direction: column;
  min-width: 0; min-height: 0; height: 100%;
  overflow: hidden;
  background: var(--c-bg-0);
}



.topbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--c-line);
  background: color-mix(in srgb, var(--c-bg-0) 60%, transparent);
  position: relative;
}

.topbar-main { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; min-width: 0; }
.topbar-copy { min-width: 0; display: inline-flex; align-items: baseline; gap: 7px; flex-wrap: nowrap; }

.topbar h2 {
  font-size: 16px; font-weight: 700; letter-spacing: -.01em;
  color: var(--c-text); line-height: 1.2; white-space: nowrap;
}
.topbar-sub-sep { color: var(--c-dim); font-size: 13px; flex: 0 0 auto; }
.topbar p {
  margin: 0; font-size: 11.5px; color: var(--c-muted); line-height: 1.3;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}


.topbar-insights {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
}
.insight-pill {
  min-width: 0; min-height: 0;
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 0; border: 0; background: none; box-shadow: none;
}
.insight-pill span {
  font-size: 9.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--c-dim);
}
.insight-pill strong {
  font-family: var(--op-mono);
  font-size: 12.5px; font-weight: 500; letter-spacing: 0; color: var(--c-text);
  font-variant-numeric: tabular-nums;
}

.top-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-self: center; }

@keyframes statusPulse {
  0%,100% { transform: scale(1); opacity:1; }
  50%      { transform: scale(1.5); opacity:.4; }
}


.top-actions .btn { gap: 7px; padding: 0 13px; min-height: 32px; transition: border-color var(--fast) ease, color var(--fast) ease, background var(--fast) ease, transform var(--fast) ease; }
.top-actions .btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.top-actions .btn.icon-only { padding: 0; width: 32px; min-width: 32px; justify-content: center; }
.top-actions .btn.icon-only:active,
.top-actions .btn#commandHintBtn:active { transform: translateY(1px); }
.top-actions .btn.icon-only.is-active { border-color: rgba(34,197,94,.45); color: #cdfff0; }




#panelHost {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  
  overflow-anchor: none;
}
.panel {
  display: none;
  position: relative;
  padding: 10px 18px 18px;
}
.panel.is-active {
  display: block;
  animation: panelIn .3s var(--ease) both;
}
@keyframes panelIn {
  from { opacity:0; transform: translateY(8px); }
  to   { opacity:1; transform: none; }
}

.panel-grid { display: grid; gap: 12px; margin-bottom: 12px; }
.panel-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }



.card {
  position: relative; overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-bg-2);
  padding: 15px;
  box-shadow: none;
  transition: border-color var(--med) ease, background var(--med) ease;
}
.card::before { content: none; }
.card:hover {
  border-color: var(--c-border-hi);
  background: var(--c-bg-3);
}

.card h3 {
  font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  color: var(--c-text); margin-bottom: 10px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.card-head h3 { margin: 0; }
.card-head-stack { align-items: start; }
.card-head-stack > div { display: grid; gap: 8px; }


.card-collapse-btn {
  flex: 0 0 auto;
  display: inline-grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  border: 1px solid var(--c-border-hi);
  background: color-mix(in srgb, var(--c-bg-0) 70%, transparent);
  color: var(--c-muted); cursor: pointer;
  transition: background var(--fast) ease, color var(--fast) ease, border-color var(--fast) ease;
}
.card-collapse-btn:hover { background: var(--c-bg-2); color: var(--c-text); border-color: var(--c-line-hi); }
.card-collapse-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(34,197,94,.4); }
.card-collapse-btn svg { width: 16px; height: 16px; transition: transform var(--med) var(--ease); }
.settings-card.is-collapsed .card-collapse-btn svg { transform: rotate(-90deg); }

.bypass-sec-head .card-collapse-btn { align-self: center; flex-shrink: 0; margin-left: auto; }


.settings-card.is-collapsed { padding-bottom: 16px; }
.settings-card.is-collapsed > *:not(.card-head):not(.card-head-stack):not(.bypass-sec-head) { display: none; }
.settings-card.is-collapsed .card-head,
.settings-card.is-collapsed .card-head-stack,
.settings-card.is-collapsed .bypass-sec-head { margin-bottom: 0; }

.settings-grid > .settings-card.is-collapsed { align-self: start; }


.settings-card.is-search-hidden { display: none !important; }
.settings-card.is-search-hit {
  border-color: var(--c-border-hi);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--c-border-hi) inset;
  animation: searchHitIn .22s var(--ease) both;
}
@keyframes searchHitIn {
  from { opacity: .4; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

.card-copy { font-size: 13px; color: var(--c-muted); line-height: 1.5; max-width: 64ch; }


.section-chip {
  display: inline-flex; align-items: center;
  min-height: 0; padding: 0;
  border: 0; background: none;
  font-family: var(--op-mono);
  color: var(--c-dim); font-size: 10px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
}


.settings-card {
  border-color: var(--c-border);
  background: var(--c-bg-2);
  border-radius: var(--r-md);
  padding: 14px;
  box-shadow: none;
  transition: border-color var(--med) ease, background var(--med) ease;
}
.settings-card:hover {
  border-color: var(--c-border-hi);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05);
}



input, select, button, textarea { font: inherit; }

input, select, textarea {
  width: 100%;
  height: 44px;
  border: 1px solid var(--c-line-hi);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--c-bg-0) 96%, transparent);
  color: var(--c-text);
  padding: 0 12px;
  outline: none;
  transition: border-color var(--fast) ease, box-shadow var(--fast) ease;
}
textarea {
  height: auto;
  min-height: 72px;
  padding: 10px 12px;
  resize: vertical;
}
input::placeholder { color: var(--c-dim); }
input:hover, select:hover, textarea:hover { border-color: var(--c-border-hi); }
input:focus, select:focus, textarea:focus {
  border-color: color-mix(in srgb, var(--c-accent) 60%, var(--c-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 18%, transparent);
}

.form-grid, .feature-col, .toggle-stack { display: grid; gap: 10px; }

.input-group { position: relative; }
.input-group input, .input-group textarea {
  padding: 18px 12px 8px;
}
.input-group label {
  position: absolute; top: 50%; left: 12px;
  transform: translateY(-50%);
  font-size: 12px; color: var(--c-dim);
  pointer-events: none;
  transition: all var(--fast) ease;
  padding: 0 4px; border-radius: 4px;
}
.input-group textarea ~ label { top: 18px; transform: none; }
.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group textarea:focus + label,
.input-group textarea:not(:placeholder-shown) + label {
  top: 0; transform: translateY(-50%);
  font-size: 10px; font-weight: 700;
  color: var(--c-blue);
  background: color-mix(in srgb, var(--c-bg-0) 96%, transparent);
  letter-spacing: .02em;
}
.input-group input:focus { border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-border)); }


.input-group select + label {
  top: 0; transform: translateY(-50%);
  font-size: 10px; font-weight: 700;
  color: var(--c-blue);
  background: color-mix(in srgb, var(--c-bg-0) 96%, transparent);
  letter-spacing: .02em;
}


select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6880' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
select:focus { border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-border)); }



.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  border: 1px solid var(--c-line-hi);
  background: var(--c-bg-0);
  color: var(--c-text);
  border-radius: var(--r-md);
  min-height: 38px; padding: 0 16px;
  font: inherit; font-size: 13px; font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer; white-space: nowrap;
  position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  transition: background var(--fast) ease, border-color var(--fast) ease,
              transform var(--fast) var(--ease), box-shadow var(--fast) ease, filter var(--fast) ease;
}

.btn::after { content: none; }
.btn:hover {
  border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-border));
  background: color-mix(in srgb, var(--c-accent) 8%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transform: translateY(-1px);
}
.btn.primary {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}
.btn.primary:hover {
  background: color-mix(in srgb, var(--c-accent) 85%, #fff);
  border-color: color-mix(in srgb, var(--c-accent) 85%, #fff);
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: translateY(0) scale(.98); filter: brightness(.96); transition-duration: .05s; }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34,197,94,.35);
}
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.btn.ghost {
  border-color: var(--c-line-hi);
  background: color-mix(in srgb, var(--c-bg-0) 88%, transparent);
  color: var(--c-muted);
}
.btn.ghost:hover {
  border-color: color-mix(in srgb, var(--c-accent) 38%, var(--c-border));
  background: color-mix(in srgb, var(--c-accent) 10%, transparent);
  color: var(--c-text);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05);
}

.btn.danger {
  border-color: rgba(255,95,114,.34);
  background: var(--c-bg-0);
  color: #ffd6db;
}
.btn.danger:hover {
  border-color: rgba(255,95,114,.6);
  background: var(--c-bg-0);
  box-shadow: 0 0 22px rgba(255,95,114,.22), var(--shadow-sm);
}


.btn.sm {
  min-height: 26px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: var(--r-xs);
}


.btn.chip {
  min-height: 32px; padding: 0 14px;
  font-size: 12px;
}
.btn.chip.is-active {
  border-color: color-mix(in srgb, var(--c-accent) 50%, var(--c-border));
  background: color-mix(in srgb, var(--c-accent) 14%, transparent);
  color: var(--c-text);
}


@keyframes buttonSweep {
  from { left: -130%; }
  to   { left: 150%; }
}
@keyframes savePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.35); }
  50%      { box-shadow: 0 0 0 8px rgba(34,197,94,.0); }
}

#gwSaveBtn.is-loading, #binSaveBtn.is-loading {
  pointer-events: none; opacity: .9;
  animation: savePulse .9s ease-in-out infinite;
}
#gwSaveBtn.is-success, #binSaveBtn.is-success {
  border-color: rgba(34,197,94,.5);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05);
}



.toggle {
  position: relative;
  width: 54px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; cursor: pointer; user-select: none;
}
.toggle-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 0;
}
.toggle-slider {
  width: 100%; height: 100%;
  border-radius: 999px;
  border: 1px solid var(--c-line-hi);
  background: #11192480;
  position: relative;
  transition: background var(--fast) ease, border-color var(--fast) ease, box-shadow var(--fast) ease;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #5a6478;
  box-shadow: 0 1px 2px rgba(0,0,0,.45);
  transition: transform var(--med) var(--ease), background var(--fast) ease;
}
.toggle-slider::after { display: none; }
.toggle-input:checked + .toggle-slider,
.toggle.active .toggle-slider {
  background: var(--c-switch, var(--c-accent));
  border-color: var(--c-switch, var(--c-accent));
}
.toggle-input:checked + .toggle-slider::before,
.toggle.active .toggle-slider::before {
  transform: translateX(28px);
  background: #06140c;
}
.toggle-input:checked + .toggle-slider::after,
.toggle.active .toggle-slider::after {
  content: 'ON'; left: 7px; right: auto;
  color: rgba(220,235,255,.9);
}
.toggle-input:focus-visible + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(34,197,94,.35);
}



.pill {
  display: inline-flex; align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(34,197,94,.24);
  background: rgba(34,197,94,.1);
  color: #c8d8ff;
  font-size: 11px; font-weight: 600;
  padding: 5px 11px;
}
.pill.off {
  border-color: var(--c-line-hi);
  background: rgba(100,120,160,.1);
  color: var(--c-muted);
}

.pill.is-drift {
  border-color: rgba(255,184,77,.4);
  background: rgba(255,184,77,.12);
  color: #ffd591;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--c-line);
  background: transparent;
  color: var(--c-muted); font-size: 11px; font-weight: 600;
}
.status-pill.off {
  border-color: color-mix(in srgb, var(--c-red) 28%, var(--c-line));
  color: color-mix(in srgb, var(--c-red) 72%, var(--c-muted));
}



.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
.kpi-grid > div {
  min-height: 88px; padding: 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-bg-0);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--med) ease, box-shadow var(--med) ease;
}
.kpi-grid > div:hover {
  border-color: var(--c-border-hi);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05);
}
.kpi-grid span {
  display: block; font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--c-dim);
}
.kpi-grid strong {
  display: block; margin-top: 10px;
  font-size: 26px; font-weight: 700; letter-spacing: -.04em; color: var(--c-text);
}



.perf-widget {
  display: grid; gap: 10px; margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--c-bg-0) 72%, transparent);
}
.perf-row {
  display: grid;
  grid-template-columns: 132px 1fr;
  align-items: center; gap: 12px;
}
.perf-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--c-dim);
}
.perf-track {
  position: relative; height: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(100,130,180,.14);
  border: 1px solid rgba(100,130,180,.16);
}
.perf-fill {
  width: 0; height: 100%; border-radius: inherit;
  background: var(--c-bg-0);
  position: relative; overflow: hidden;
  transition: width .6s var(--ease);
}
.perf-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--c-bg-0);
  animation: shimmer 2.2s linear infinite;
  transform: translateX(-100%);
}
@keyframes shimmer { to { transform: translateX(100%); } }



.list-card .list {
  display: grid; gap: 8px;
  max-height: 300px;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
  min-height: 220px;
}
.list-item {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-bg-0);
  padding: 12px;
  display: grid; gap: 8px;
  transition: border-color var(--med) ease, box-shadow var(--med) ease;
  animation: itemIn .22s var(--ease) both;
}
.list-item:hover {
  border-color: var(--c-border-hi);
  box-shadow: var(--shadow-sm);
}
@keyframes itemIn {
  from { opacity:0; transform: translateY(6px); }
  to   { opacity:1; transform: none; }
}
.list-item-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
}
.item-title { font-size: 13px; font-weight: 600; color: var(--c-text); }
.item-sub { font-size: 11px; color: var(--c-muted); line-height: 1.4; word-break: break-word; }
.item-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.empty-state {
  display: grid; gap: 6px; padding: 16px;
  border-radius: var(--r-md);
  border: 1px dashed rgba(100,130,180,.2);
  background: color-mix(in srgb, var(--c-bg-0) 65%, transparent);
  color: var(--c-muted); text-align: center;
}
.empty-state strong { font-size: 12px; color: var(--c-text); }
.empty-state span   { font-size: 11px; color: var(--c-dim); }



.panel[data-panel="dashboard"] .panel-grid.two {
  grid-template-columns: minmax(0,1.25fr) minmax(0,0.85fr);
  gap: 14px;
}
.quick-actions-grid {
  grid-template-columns: 1fr;
  gap: 9px;
}
.quick-actions-grid .btn {
  min-height: 44px;
  justify-content: flex-start;
  padding-left: 16px;
}
.panel[data-panel="dashboard"] .list-card {
  min-height: 340px;
}
.panel[data-panel="dashboard"] .kpi-grid.dashboard-summary-grid {
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
.panel[data-panel="dashboard"] .kpi-grid.dashboard-summary-grid > div {
  min-height: 80px; padding: 12px;
}
.panel[data-panel="dashboard"] .kpi-grid.dashboard-summary-grid strong {
  font-size: 20px; margin-top: 8px;
  word-break: break-word;
}
.panel[data-panel="dashboard"] .dash-soft-meters {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--c-line);
  opacity: .9;
}
.panel[data-panel="dashboard"] .dash-soft-meters .perf-track { height: 6px; }


#dashActivity {
  position: relative; padding-left: 22px; display: grid; gap: 8px;
}
#dashActivity::before {
  content: '';
  position: absolute; top: 4px; bottom: 4px; left: 8px;
  width: 1px;
  background: var(--c-bg-0);
}
#dashActivity .list-item::before {
  content: '';
  position: absolute;
  width: 5px; height: 5px; border-radius: 50%;
  left: -16px; top: 15px;
  background: var(--c-dim);
}
#dashActivity .list-item { position: relative; }
.dash-activity-filters { margin-top: 0; margin-bottom: 6px; }
.dash-activity-filters .chip.is-active {
  border-color: color-mix(in srgb, var(--c-accent) 50%, var(--c-border));
  background: color-mix(in srgb, var(--c-accent) 14%, transparent);
  color: var(--c-text);
}
.dash-action-rail { margin-top: 6px; }
.dash-action-rail .btn { min-height: 34px; }



.container-gateways {
  display: grid;
  grid-template-columns: minmax(0,1.45fr) minmax(320px,.95fr);
  gap: 16px;
  align-items: start; 
}

.gateway-editor-layout { display: grid; gap: 14px; counter-reset: gw-section; }
.gateway-section {
  position: relative;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-bg-0);
  padding: 15px; display: grid; gap: 11px;
  transition: border-color var(--med) ease;
}
.gateway-section:hover { border-color: var(--c-border-hi); }
.gateway-section-head {
  display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
}

.gateway-section-head h4 {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; color: var(--c-text); margin: 0;
}
.gateway-section-head h4::before {
  counter-increment: gw-section;
  content: counter(gw-section);
  flex: 0 0 22px; width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 7px;
  font-size: 11px; font-weight: 800;
  color: var(--c-blue);
  background: var(--c-blue-dim);
  border: 1px solid var(--c-border-hi);
}
.gateway-rules-head { align-items: flex-start; }

.rule-controls { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rule-controls select { min-width: 160px; }


.gw-rule-chips { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.gw-rule-chip {
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  padding: 3px 8px; border-radius: var(--r-xs, 6px);
  color: var(--c-dim, #7b879b);
  background: color-mix(in srgb, var(--c-bg-3, #1a1f29) 70%, transparent);
  border: 1px solid var(--c-line, #2a2f3a);
  transition: color var(--fast, .12s) var(--ease, ease), background var(--fast, .12s) var(--ease, ease), border-color var(--fast, .12s) var(--ease, ease);
}
.gw-rule-chip.is-active {
  color: var(--c-accent, #22c55e);
  background: color-mix(in srgb, var(--c-accent, #22c55e) 12%, transparent);
  border-color: color-mix(in srgb, var(--c-accent, #22c55e) 28%, transparent);
}

.field-help { font-size: 11px; color: var(--c-dim); line-height: 1.45; }
.field-help code {
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 10px;
  background: color-mix(in srgb, var(--c-bg-0) 88%, transparent);
  border: 1px solid var(--c-line-hi);
  border-radius: 5px; padding: 1px 5px; color: #c4d8ff;
}

.gateway-rule-cards { display: grid; gap: 10px; }
.rule-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--c-bg-0) 82%, transparent);
  padding: 12px 12px 12px 15px; display: grid; gap: 8px;
  transition: border-color var(--med) ease, box-shadow var(--med) ease;
  animation: itemIn .2s var(--ease) both;
}
.rule-card:hover { border-color: var(--c-border-hi); box-shadow: var(--shadow-sm); }

.rule-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--c-blue);
}
#gwRequireCard::before { background: var(--c-amber); }
#gwInjectCard::before  { background: var(--c-green); }
#gwRemoveCard::before  { background: var(--c-red); }
.rule-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rule-card-head h5 { margin: 0; font-size: 12px; font-weight: 700; color: var(--c-text); }
.rule-remove-btn { height: 28px; padding: 0 10px; font-size: 11px; }
.rule-inline-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }

.gateway-advanced {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--c-bg-0) 70%, transparent);
  overflow: hidden;
}
.gateway-advanced summary {
  list-style: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--c-muted);
  padding: 12px 14px; user-select: none;
  transition: color var(--fast) ease;
}
.gateway-advanced summary::-webkit-details-marker { display: none; }
.gateway-advanced summary:hover { color: var(--c-text); }
.gateway-advanced[open] summary {
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
}
.gateway-advanced-grid { padding: 12px 14px 14px; }

.gateway-toolbar { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }



.gw-head-actions { display: inline-flex; align-items: center; gap: 8px; }
.gw-overview-btn.is-active {
  border-color: color-mix(in srgb, var(--c-accent) 50%, var(--c-border));
  background: color-mix(in srgb, var(--c-accent) 12%, transparent);
  color: var(--c-text);
}
.gw-overview {
  margin: 4px 0 14px;
  border: 1px solid var(--c-border-hi);
  border-radius: var(--r-md);
  background: var(--c-bg-0);
  padding: 14px;
  display: grid; gap: 14px;
  animation: itemIn .2s var(--ease) both;
}
.gw-overview-summary {
  display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px;
}
.gw-ov-stat {
  display: grid; gap: 3px; justify-items: center; text-align: center;
  padding: 12px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-line-hi);
  background: color-mix(in srgb, var(--c-bg-0) 60%, transparent);
}
.gw-ov-stat-val { font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.gw-ov-stat-label {
  font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--c-dim);
}
.gw-ov-stat.tone-blue   .gw-ov-stat-val { color: var(--c-blue); }
.gw-ov-stat.tone-green  .gw-ov-stat-val { color: var(--c-text); }
.gw-ov-stat.tone-purple .gw-ov-stat-val { color: var(--c-purple); }
.gw-ov-stat.tone-red    .gw-ov-stat-val { color: var(--c-red); }
.gw-ov-stat.tone-dim    .gw-ov-stat-val { color: var(--c-muted); }

.gw-overview-section-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.gw-overview-section-head h4 { margin: 0; font-size: 13px; font-weight: 700; }
.gw-overview-sub { font-size: 11px; }
.gw-overview-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
}
.gw-ov-provider {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-line-hi);
  background: color-mix(in srgb, var(--c-bg-0) 70%, transparent);
  transition: border-color var(--fast) ease, transform var(--fast) ease;
}
.gw-ov-provider:hover { border-color: var(--c-border-hi); transform: translateY(-1px); }
.gw-ov-provider.is-off { opacity: .55; }
.gw-ov-avatar {
  flex: 0 0 26px; width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 8px; font-size: 12px; font-weight: 800; color: #fff;
  background: var(--c-bg-0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.gw-ov-provider-name {
  flex: 1 1 auto; min-width: 0;
  font-size: 12px; font-weight: 600; color: var(--c-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gw-ov-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; }
.gw-ov-dot.on  { background: var(--c-muted); }
.gw-ov-dot.off { background: var(--c-dim); opacity: .5; }
.gw-overview-foot { font-size: 11px; line-height: 1.55; margin: 0; }
@media (max-width: 560px) {
  .gw-overview-summary { grid-template-columns: repeat(3, minmax(0,1fr)); }
}


.gateway-card {
  position: relative;
  padding: 13px 15px 13px 18px;
  border-radius: var(--r-md);
  background: var(--c-bg-0);
  border: 1px solid var(--c-border);
  overflow: hidden;
  transition: border-color var(--med) ease, box-shadow var(--med) ease, transform var(--fast) ease;
}
.gateway-card:hover {
  border-color: var(--c-border-hi);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.05);
  transform: translateY(-1px);
}
.gateway-card.is-selected {
  border-color: var(--c-border-hi);
  box-shadow: var(--shadow-md), inset 0 0 0 1px var(--c-line-hi);
}

.gateway-card.is-disabled { background: var(--c-bg-0); }
.gateway-card.is-disabled .gateway-id .item-title { color: var(--c-muted); }
.gateway-card.is-disabled .gateway-chip-soft,
.gateway-card.is-disabled .gateway-pattern { opacity: .7; }


.gateway-accent {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--c-bg-0);
  border-radius: 0 3px 3px 0;
}
.gateway-card.is-disabled .gateway-accent {
  background: var(--c-bg-0);
}

.gateway-head {
  display: flex; align-items: center; gap: 11px;
}
.gateway-avatar {
  flex: 0 0 34px; width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 15px; font-weight: 800; color: #fff;
  
  background: color-mix(in srgb, var(--c-accent) 32%, #000);
  border: 1px solid color-mix(in srgb, var(--c-accent) 55%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.gateway-card.is-disabled .gateway-avatar { filter: saturate(.4) brightness(.8); }
.gateway-id { display: grid; gap: 4px; min-width: 0; flex: 1 1 auto; }
.gateway-id .item-title { font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; }
.gateway-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.gateway-state-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid transparent;
}
.gateway-state-tag.is-on {
  color: var(--c-muted); background: transparent; border-color: var(--c-line);
}
.gateway-state-tag.is-off {
  color: color-mix(in srgb, var(--c-red) 72%, var(--c-muted));
  background: transparent;
  border-color: color-mix(in srgb, var(--c-red) 26%, var(--c-line));
}
.gateway-chip-soft {
  font-size: 10px; font-weight: 600; color: var(--c-muted);
  padding: 2px 8px; border-radius: 999px;
  background: rgba(100,120,160,.1); border: 1px solid var(--c-line-hi);
}

.gateway-pattern {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  background: color-mix(in srgb, var(--c-bg-0) 85%, transparent);
  border: 1px solid var(--c-line-hi);
  border-radius: var(--r-sm); padding: 6px 8px;
}
.gateway-pattern-kind {
  flex: 0 0 auto;
  font-size: 8.5px; font-weight: 800; letter-spacing: .08em;
  color: var(--c-blue);
  padding: 2px 6px; border-radius: 5px;
  background: var(--c-blue-dim); border: 1px solid var(--c-border-hi);
}
.gateway-pattern code {
  min-width: 0; flex: 1 1 auto;
  color: #b4caff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gateway-actions { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--c-line); }

.gateway-act-edit:hover:not(:disabled)  { border-color: var(--c-border-hi); box-shadow: var(--shadow-sm); color: var(--c-text); }
.gateway-act-toggle:hover:not(:disabled) { border-color: rgba(255,184,77,.5); box-shadow: 0 0 12px rgba(255,184,77,.22); color: #ffe9c0; }
.gateway-act-remove:hover:not(:disabled) { border-color: rgba(255,95,114,.5); box-shadow: 0 0 12px rgba(255,95,114,.22); color: #ffd6db; }
.gateway-act-toggle, .gateway-act-edit, .gateway-act-remove {
  transition: box-shadow var(--med) ease, border-color var(--med) ease, color var(--med) ease;
}


.gw-v2-toolbar { display: grid; gap: 11px; margin: 2px 0 13px; }

.gw-step-strip {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 0; counter-reset: gw-step;
  border-radius: var(--r-md);
  border: 1px solid var(--c-line-hi);
  background: color-mix(in srgb, var(--c-bg-0) 60%, transparent);
  padding: 4px;
}
.gw-step-pill {
  position: relative;
  justify-content: center; align-items: center; gap: 7px;
  min-height: 32px; border: 0 !important; border-radius: var(--r-sm);
  color: var(--c-dim); background: transparent;
  font-size: 11.5px; font-weight: 600;
  transition: color var(--med) ease, background var(--med) ease;
}
.gw-step-pill::before {
  counter-increment: gw-step;
  content: counter(gw-step);
  width: 18px; height: 18px; flex: 0 0 18px;
  display: grid; place-items: center;
  border-radius: 50%; font-size: 10px; font-weight: 800;
  background: rgba(100,120,160,.16); color: var(--c-muted);
  transition: background var(--med) ease, color var(--med) ease;
}

.gw-step-pill:not(:last-child)::after {
  content: ''; position: absolute; right: -1px; top: 50%;
  width: 1px; height: 14px; transform: translateY(-50%);
  background: var(--c-line-hi);
}
.gw-step-pill.is-ready {
  color: #c7f5e4; background: rgba(34,197,94,.1);
}
.gw-step-pill.is-ready::before {
  background: var(--c-green); color: #04140d;
}
.gw-step-pill.is-active {
  color: #dbe8ff; background: var(--c-blue-dim);
  box-shadow: inset 0 0 0 1px var(--c-border-hi);
}
.gw-step-pill.is-active::before {
  background: var(--c-blue); color: #fff;
  box-shadow: 0 0 0 3px var(--c-blue-dim);
}
.gw-template-item {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0; flex: 1 1 160px; max-width: 240px;
  padding: 8px 10px; border: 1px solid var(--c-border); border-radius: 8px;
  background: color-mix(in srgb, var(--c-bg-0) 60%, transparent);
}
.gw-template-item:hover { border-color: var(--c-border-hi); background: var(--c-bg-0); }
.gw-template-item .btn { align-self: flex-start; min-height: 0; padding: 5px 9px; font-size: 11.5px; }
.gw-template-desc { font: 11px/1.4 system-ui, sans-serif; color: var(--c-muted); }
.gw-assist-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gw-assist-row .muted { margin: 0; font-size: 11px; }
.gw-filter-chip-row, .gw-library-chip-row, .gw-library-bulk-row { margin-top: 0; }
.gw-filter-chip-row .chip, .gw-library-chip-row .chip { min-height: 30px; }
.chip.is-active {
  border-color: color-mix(in srgb, var(--c-accent) 50%, var(--c-border));
  background: color-mix(in srgb, var(--c-accent) 14%, transparent);
  color: var(--c-text);
}
.gw-library-bulk-row .btn { min-height: 30px; }




.gw-builder-sec.is-high { padding: var(--sp-5) var(--sp-4); }
.gw-builder-sec .gw-v2-toolbar { margin: 4px 0 var(--sp-4); }


.gw-divider {
  height: 1px; margin: var(--sp-5) 0;
  background: linear-gradient(90deg, transparent, var(--c-line-hi) 18%, var(--c-line-hi) 82%, transparent);
  border: 0;
}


.gw-block-head {
  display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap;
  margin: var(--sp-4) 0 var(--sp-3);
}
.gw-block-head:first-child { margin-top: 0; }
.gw-block-eyebrow {
  font-family: var(--op-mono, monospace);
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-dim);
}
.gw-block-hint { font-size: 11.5px; color: var(--c-muted); }
.gw-saved-sec .bypass-sec-head .gw-head-actions { margin-left: auto; }


.gw-saved-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 var(--sp-3); }
.gw-saved-toolbar .gw-search-group { flex: 1 1 220px; min-width: 160px; }
.gw-saved-toolbar #gwFilter { flex: 0 0 auto; min-width: 130px; }
.gw-saved-toolbar .gw-count-text { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--c-dim); font-family: var(--op-mono, ui-monospace, monospace); }


.gw-overview-strip { margin-bottom: var(--sp-3); border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden; }
.gw-overview-strip > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; cursor: pointer; list-style: none;
  font-size: 11.5px; font-weight: 600; color: var(--c-dim); letter-spacing: .02em;
}
.gw-overview-strip > summary::-webkit-details-marker { display: none; }
.gw-overview-strip > summary::after { content: '▾'; font-size: 10px; transition: transform var(--fast) ease; }
.gw-overview-strip[open] > summary::after { transform: rotate(180deg); }
.gw-overview-strip > summary:hover { color: var(--c-text); }
.gw-overview-strip[open] > summary { border-bottom: 1px solid var(--c-line); }
.gw-overview-strip .gw-overview-link { font-size: 10.5px; font-weight: 600; }
.gw-overview-strip .gw-overview { border: 0; border-radius: 0; margin: 0; }


.gw-step-strip { padding: 5px; gap: 2px; }
.gw-step-pill {
  min-height: 34px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
}
.gw-step-pill.is-active {
  background: color-mix(in srgb, var(--c-accent) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-accent) 32%, transparent);
}
.gw-step-pill.is-active::before { color: var(--c-accent); }
.gw-template-item .btn { min-height: 0; font-size: 11.5px; opacity: .92; }
.gw-template-item:hover .btn { opacity: 1; }


.gateway-section {
  border-color: var(--c-line);
  background: color-mix(in srgb, var(--c-bg-0) 40%, transparent);
  padding: var(--sp-4);
}
.gateway-section:hover { border-color: var(--c-line-hi); }
.gateway-section-head h4 { font-size: 12.5px; }
.gateway-section-head h4::before {
  flex: 0 0 20px; width: 20px; height: 20px;
  border-radius: var(--r-xs);
  color: var(--c-muted); background: var(--c-bg-2);
  border-color: var(--c-line);
}
.gateway-advanced { border-color: var(--c-line); background: transparent; }
.gateway-advanced[open] summary { border-bottom-color: var(--c-line); }



.gw-editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.gw-builder-sec #gwSaveBtn {
  background: var(--c-accent); color: #fff; border-color: var(--c-accent);
  min-height: 40px; font-weight: 700;
}
.gw-builder-sec #gwSaveBtn:hover {
  background: color-mix(in srgb, var(--c-accent) 88%, #fff);
  border-color: color-mix(in srgb, var(--c-accent) 88%, #fff);
}
#gwBulkRemoveBtn { box-shadow: none; }
#gwBulkRemoveBtn:hover { background: rgba(255,95,114,.08); box-shadow: none; }


.rule-card {
  padding: var(--sp-3) var(--sp-3) var(--sp-3) 15px;
  border-color: var(--c-line);
  background: color-mix(in srgb, var(--c-bg-0) 50%, transparent);
}
.rule-card:hover { border-color: var(--c-line-hi); box-shadow: 0 6px 16px -10px rgba(0,0,0,.6); }
.rule-card-head h5 { font-size: 11.5px; letter-spacing: .02em; }
.rule-remove-btn { opacity: .7; }
.rule-remove-btn:hover { opacity: 1; }


.gw-overview-summary {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: color-mix(in srgb, var(--c-bg-0) 40%, transparent);
}
.gw-ov-stat {
  border: 0; border-right: 1px solid var(--c-line);
  border-radius: 0; background: transparent;
  padding: var(--sp-4) var(--sp-3);
  text-align: left; justify-items: start;
  position: relative;
}
.gw-ov-stat:last-child { border-right: 0; }
.gw-ov-stat-val { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.gw-ov-stat-label { font-size: 9.5px; letter-spacing: .08em; }
.gw-overview { border-color: var(--c-line); background: transparent; padding: var(--sp-4); }


.gw-overview-grid { gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.gw-ov-provider {
  padding: 10px 12px; border-color: var(--c-line);
  background: color-mix(in srgb, var(--c-bg-0) 50%, transparent);
  transition: border-color var(--fast) ease, transform var(--fast) var(--ease), box-shadow var(--fast) ease;
}
.gw-ov-provider:hover {
  border-color: var(--c-line-hi); transform: translateY(-2px);
  box-shadow: 0 8px 18px -12px rgba(0,0,0,.7);
}
.gw-ov-avatar { flex: 0 0 28px; width: 28px; height: 28px; border-radius: var(--r-sm); font-size: 12.5px; }
.gw-ov-provider-name { font-size: 12px; }


.gw-saved-sec .list {
  max-height: 420px; overflow-y: auto; scrollbar-width: thin;
  scrollbar-color: var(--c-line-hi) transparent;
  padding-right: 2px;
}
.gw-saved-sec .empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; min-height: 150px; max-width: 36ch; margin: 0 auto;
  padding: var(--sp-5) var(--sp-4); text-align: center;
}
.gw-saved-sec .empty-state::before {
  content: ''; width: 42px; height: 42px; flex: 0 0 auto; border-radius: var(--r-md);
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%238a93a3'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%207h18M3%2012h18M3%2017h12'/%3E%3C/svg%3E") center / 20px no-repeat,
    var(--c-bg-2);
  border: 1px solid var(--c-line);
}


.gw-review-sec .analyzer-console { margin-top: var(--sp-3); }

@media (prefers-reduced-motion: reduce) {
  .gw-ov-provider:hover, .rule-card:hover, .gateway-section:hover { transform: none; }
}
@media (max-width: 760px) {
  .container-gateways { grid-template-columns: 1fr; }
  .gw-overview-summary { grid-template-columns: repeat(2, 1fr); }
  .gw-ov-stat { border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
}




.gw-divider { display: none; }
.gw-filter-chip-row { display: none !important; }  
.compact-toggle-row .info-btn { display: none; }   


.gw-step-pill { opacity: .4; transition: opacity var(--fast) ease; }
.gw-step-pill.is-active,
.gw-step-pill.is-ready { opacity: 1; }


.gw-tools-rail {
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: transparent;
  overflow: hidden;
}
.gw-tools-rail > summary {
  list-style: none; cursor: pointer;
  padding: 8px 12px; font-size: 11.5px; font-weight: 600; color: var(--c-muted);
  display: flex; align-items: center; gap: 6px;
  transition: color var(--fast) ease, background var(--fast) ease;
}
.gw-tools-rail > summary::after { content: '▾'; margin-left: auto; font-size: 10px; transition: transform var(--fast) ease; }
.gw-tools-rail[open] > summary::after { transform: rotate(180deg); }
.gw-tools-rail > summary::-webkit-details-marker { display: none; }
.gw-tools-rail > summary:hover { color: var(--c-text); background: rgba(255,255,255,.025); }
.gw-tools-rail[open] > summary { border-bottom: 1px solid var(--c-line); color: var(--c-text); }
.gateway-toolbar { padding: 10px 12px; }

.gw-tools-rail .gateway-toolbar { gap: var(--sp-2); }
.gw-tools-rail .btn { min-height: 30px; font-size: 11.5px; }

.gw-tools-rail { margin-top: var(--sp-3); }


.gw-assist-row { gap: var(--sp-3); }
.gw-assist-status {
  font: 600 11px/1 var(--op-mono, monospace); letter-spacing: .04em;
  color: var(--c-dim); padding: 0;
}
.gw-assist-conflict { color: var(--c-muted); }
.gw-assist-conflict::before { content: '· '; }

.gw-assist-conflict:not([data-active]) { display: none; }


.gw-review-sec .form-grid { grid-template-columns: 1fr; gap: var(--sp-2); }
.gw-review-sec #gwTestBtn { align-self: flex-start; min-height: 34px; }

.gw-review-sec #gwTestUrl:not(:placeholder-shown) ~ #gwTestBtn,
.gw-review-sec #gwTestUrl:valid ~ #gwTestBtn {
  background: color-mix(in srgb, var(--c-accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--c-accent) 40%, var(--c-border));
  color: var(--c-text);
}
.gw-console { margin-top: var(--sp-2); border: 1px solid var(--c-line); border-radius: var(--r-sm); overflow: hidden; }
.gw-console > summary {
  list-style: none; cursor: pointer; padding: 8px 12px;
  font-size: 11.5px; font-weight: 600; color: var(--c-muted);
  display: flex; align-items: center; gap: 6px;
  transition: color var(--fast) ease;
}
.gw-console > summary::after { content: '▾'; margin-left: auto; font-size: 10px; transition: transform var(--fast) ease; }
.gw-console[open] > summary::after { transform: rotate(180deg); }
.gw-console > summary::-webkit-details-marker { display: none; }
.gw-console > summary:hover { color: var(--c-text); }
.gw-console[open] > summary { border-bottom: 1px solid var(--c-line); }
.gw-console .analyzer-console { padding: 10px 12px; }


.gw-overview-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: 600 11px/1 var(--op-mono, monospace); letter-spacing: .04em;
  color: var(--c-muted); text-decoration: underline dotted rgba(255,255,255,.18);
  transition: color var(--fast) ease;
}
.gw-overview-link:hover { color: var(--c-text); }
.gw-overview-link[aria-expanded="true"] { color: var(--c-text); }
.gw-count-text {
  font: 600 11px/1 var(--op-mono, monospace); letter-spacing: .03em;
  color: var(--c-dim); padding: 0; background: none; border: 0;
}

.gw-saved-sec .gw-library-bulk-row { display: none; }
.gw-saved-sec:has(#gatewayList .gw-select-input:checked) .gw-library-bulk-row { display: inline-flex; }
.gw-saved-sec:has(#gatewayList .gw-select-input:checked) .gw-library-chip-row { margin-bottom: var(--sp-2); }

.gw-library-chip-row { gap: 0; }
.gw-library-chip-row .btn.chip {
  min-height: 28px; border-radius: 0; border-color: transparent;
  background: transparent; color: var(--c-muted);
  box-shadow: none; padding: 0 12px;
}
.gw-library-chip-row .btn.chip:hover { color: var(--c-text); background: rgba(255,255,255,.03); }
.gw-library-chip-row .btn.chip.is-active {
  color: var(--c-text); background: transparent;
  box-shadow: inset 0 -2px 0 var(--c-accent);
}


.gateway-card {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr) minmax(0,32%) auto;
  align-items: center; gap: 10px;
  padding: 6px 12px; min-height: 36px;
  border-radius: var(--r-sm);
  border-color: var(--c-line);
  background: color-mix(in srgb, var(--c-bg-0) 40%, transparent);
  transition: border-color var(--fast) ease, background var(--fast) ease;
}
.gateway-card:hover { border-color: var(--c-line-hi); background: color-mix(in srgb, var(--c-bg-0) 55%, transparent); }
.gateway-card.is-selected {
  border-color: color-mix(in srgb, var(--c-accent) 40%, var(--c-line-hi));
  background: color-mix(in srgb, var(--c-accent) 7%, rgba(13,19,29,.55));
}
.gateway-card.is-disabled { opacity: .55; }
.gateway-accent { display: none; }
.gw-select-wrap { margin-right: 0; }
.gateway-head { flex: 1 1 auto; min-width: 0; gap: 6px; display: flex; align-items: center; }
.gateway-avatar { display: none; }                  
.gateway-id { gap: 2px; min-width: 0; }
.gateway-id .item-title { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gateway-meta-line { flex: 0 0 auto; gap: 5px; }
.gateway-state-tag { font-size: 9px; padding: 1px 6px; text-transform: uppercase; }

.gateway-chip-soft { font-size: 9px; padding: 1px 6px; }
.gateway-card .gw-rule-chip { font-size: 9px; padding: 1px 6px; }

.gateway-pattern {
  margin: 0; min-width: 0;
  font-size: 11px; background: transparent; border: 0; border-radius: 0; padding: 0;
  display: flex; align-items: center;
}
.gateway-pattern-kind { display: none; }            
.gateway-pattern code { color: var(--c-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gw-host {
  display: inline-flex; align-items: center; gap: 5px;
  min-width: 0; max-width: 100%;
  font-family: var(--op-mono, ui-monospace, monospace);
  font-size: 11px; color: var(--c-dim, #8a9cb8);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gw-host::before {
  content: ''; flex: 0 0 auto;
  width: 5px; height: 5px; border-radius: 50%;
  background: color-mix(in srgb, var(--c-accent, #22c55e) 70%, transparent);
  box-shadow: 0 0 6px color-mix(in srgb, var(--c-accent, #22c55e) 55%, transparent);
}
.gateway-actions {
  margin-top: 0; padding-top: 0; border-top: 0;
  opacity: 0; pointer-events: none;
  transition: opacity var(--fast) ease;
  flex: 0 0 auto; gap: 4px;
}
.gateway-card:hover .gateway-actions,
.gateway-card:focus-within .gateway-actions,
.gateway-card.is-selected .gateway-actions { opacity: 1; pointer-events: auto; }
.gateway-card.is-disabled .gateway-actions { opacity: 1; pointer-events: auto; } 

@media (prefers-reduced-motion: reduce) {
  .gw-step-pill, .gateway-card, .gw-overview-link { transition: none; }
}


.gw-chip-readonly { pointer-events: none; cursor: default; user-select: none; }


.gateway-card.is-encgw {
  border-color: color-mix(in srgb, var(--c-amber, #ffb84d) 50%, var(--c-border, #1b2433));
  background: linear-gradient(90deg, color-mix(in srgb, var(--c-amber, #ffb84d) 6%, rgba(10,15,24,.4)) 0%, rgba(10,15,24,.4) 40%);
}
.gateway-card.is-encgw:hover { border-color: var(--c-amber, #ffb84d);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c-amber, #ffb84d) 10%, rgba(13,19,29,.55)) 0%, rgba(13,19,29,.55) 40%); }
.gateway-card.is-encgw .gateway-accent { display: block; background: var(--c-amber, #ffb84d); }
.gateway-card.is-encgw .gw-encgw-placeholder { width: 22px; flex: 0 0 22px; }
.gateway-card.is-encgw .gateway-actions { opacity: 1; pointer-events: auto; } 
.gw-chip-premium { color: var(--c-amber, #ffb84d); border-color: color-mix(in srgb, var(--c-amber, #ffb84d) 35%, var(--c-line-hi, #2a2f3a)); background: color-mix(in srgb, var(--c-amber, #ffb84d) 8%, transparent); }

.gw-chip-free-site {
  color: var(--c-accent, #22c55e);
  border-color: color-mix(in srgb, var(--c-accent, #22c55e) 35%, var(--c-line-hi, #2a2f3a));
  background: color-mix(in srgb, var(--c-accent, #22c55e) 9%, transparent);
}


.gw-chip-bypassable {
  color: var(--c-cyan, #38bdf8);
  border-color: color-mix(in srgb, var(--c-cyan, #38bdf8) 38%, var(--c-line-hi, #2a2f3a));
  background: color-mix(in srgb, var(--c-cyan, #38bdf8) 9%, transparent);
}


.gw-chip-cvvonly {
  color: var(--c-text-dim, #9aa6b6);
  border-color: color-mix(in srgb, var(--c-text-dim, #9aa6b6) 30%, var(--c-line-hi, #2a2f3a));
  background: color-mix(in srgb, var(--c-text-dim, #9aa6b6) 7%, transparent);
  letter-spacing: .04em;
}


.gateway-card.is-premium-gate {
  border-color: color-mix(in srgb, var(--c-amber, #ffb84d) 55%, var(--c-border, #1b2433));
  background: linear-gradient(90deg, color-mix(in srgb, var(--c-amber, #ffb84d) 9%, rgba(10,15,24,.4)) 0%, rgba(10,15,24,.4) 45%);
}
.gateway-card.is-premium-gate:hover {
  border-color: var(--c-amber, #ffb84d);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c-amber, #ffb84d) 14%, rgba(13,19,29,.55)) 0%, rgba(13,19,29,.55) 45%);
}
.gateway-card.is-premium-gate .gateway-accent { display: block; background: var(--c-amber, #ffb84d); }


.gw-select-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex: 0 0 22px; margin-right: 2px;
  cursor: pointer;
}

.gw-select-input {
  appearance: none; -webkit-appearance: none;
  margin: 0; cursor: pointer; position: relative;
  width: 20px; height: 20px;
  border-radius: 7px;
  border: 1.5px solid var(--c-border-hi);
  background: color-mix(in srgb, var(--c-bg-0) 85%, transparent);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.3);
  transition: border-color var(--fast) ease, background var(--fast) ease,
              box-shadow var(--fast) ease, transform var(--fast) var(--spring);
}
.gw-select-input::after {
  content: '';
  position: absolute; left: 6px; top: 2.5px;
  width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  opacity: 0;
  transition: transform var(--fast) var(--spring), opacity var(--fast) ease;
}
.gw-select-wrap:hover .gw-select-input {
  border-color: var(--c-blue);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.3), 0 0 0 3px var(--c-blue-dim);
}
.gw-select-input:checked {
  border-color: var(--c-blue);
  background: var(--c-bg-0);
  box-shadow: 0 2px 8px var(--c-blue-glow), inset 0 1px 0 rgba(255,255,255,.3);
}
.gw-select-input:checked::after { transform: rotate(45deg) scale(1); opacity: 1; }
.gw-select-input:active { transform: scale(.9); }
.gw-select-input:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(34,197,94,.45); }


.analyzer-panel { position: relative; }
.analyzer-console {
  margin-top: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-line-hi);
  background: var(--c-bg-0);
  box-shadow: inset 0 0 20px rgba(0,0,0,.45);
  padding: 12px;
}
.analyzer-result {
  margin: 0;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 11px; line-height: 1.5;
}
.analyzer-result + .analyzer-result { margin-top: 8px; }
.analyzer-result.success { color: var(--c-green); }
.analyzer-result.error   { color: var(--c-red); }
.analyzer-result.is-updated { animation: analyzerFlash .3s ease; }
@keyframes analyzerFlash { from { filter: brightness(1.5); } to { filter: brightness(1); } }


.rules-collection-card .list { min-height: 260px; gap: 8px; }



.bin-shell { display: grid; gap: 16px; }
.bin-top-row {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: start;
}
.bin-toolkit-card, .bin-data-card { align-self: start; }


.panel[data-panel="bins"] .bin-top-row {
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, .82fr);
  gap: var(--sp-4);
  align-items: start;
}
.bin-gen-sec { order: -1; }
.bin-saved-sec {
  border-color: var(--c-line);
  background: color-mix(in srgb, var(--c-bg-0) 35%, transparent);
}
.bin-saved-sec .bypass-sec-head { align-items: center; }
.bin-saved-clear { margin-left: auto; }


.bin-section-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 10px;
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: #44556e;
}
.bin-section-divider::before,
.bin-section-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--c-line);
}



.bin-history-subtitle {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.5;
}

.bin-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--c-line-hi) transparent;
}


.bin-history-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  min-height: 150px;
  margin: 0 auto; padding: 24px 18px; max-width: 30ch;
  text-align: center;
  font-size: 12.5px; line-height: 1.55; color: var(--c-dim);
}
.bin-history-empty::before {
  content: '';
  width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: var(--r-md);
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%238a93a3'%20stroke-width='1.7'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='2.5'%20y='5'%20width='19'%20height='14'%20rx='2.5'/%3E%3Cpath%20d='M2.5%209.5h19'/%3E%3Cpath%20d='M6%2014.5h4'/%3E%3C/svg%3E") center / 22px no-repeat,
    var(--c-bg-2);
  border: 1px solid var(--c-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.bin-history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-line);
  background: var(--c-bg-0);
  transition: border-color var(--fast) ease;
}
.bin-history-item:hover { border-color: var(--c-border-hi); }

.bin-history-meta {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bin-history-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: .04em;
  font-family: "Consolas", "SF Mono", monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bin-history-sub {
  font-size: 10px;
  color: var(--c-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bin-history-time {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--c-dim);
  white-space: nowrap;
}


.bin-history-actions {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.bin-history-actions .btn.sm {
  min-height: 28px;
  padding: 0 9px;
  font-size: 11px;
}
.bin-history-del {
  width: 28px; padding: 0 !important;
  color: var(--c-dim);
}
.bin-history-del:hover { color: var(--c-red); border-color: rgba(255,95,114,.4); }


.bin-history-item.is-active {
  border-color: var(--c-border-hi);
  background: var(--c-bg-0);
}
.bin-history-item.is-active .bin-history-number { color: var(--c-text); }

.bin-history-card { align-self: start; }

.bin-metrics {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 12px;
}
.bin-metric {
  padding: 12px; border-radius: var(--r-md);
  border: 1px solid var(--c-line);
  background: var(--c-bg-0);
  transition: border-color var(--med) ease;
}
.bin-metric:hover { border-color: var(--c-border-hi); }
.bin-metric span {
  display: block; font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--c-dim); margin-bottom: 6px;
}
.bin-metric strong { display: block; font-size: 18px; font-weight: 700; color: var(--c-text); }

.bin-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bin-filter-chips .chip { min-width: 98px; }
.bin-filter-chips .chip.is-active {
  border-color: color-mix(in srgb, var(--c-accent) 50%, var(--c-border));
  background: color-mix(in srgb, var(--c-accent) 14%, transparent);
  color: var(--c-text);
}

.bin-list-card .list { max-height: 360px; min-height: 180px; }

.bin-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center; gap: 12px;
  padding: 14px; border-radius: var(--r-md);
  background: var(--c-bg-0);
  border: 1px solid var(--c-border);
  transition: all var(--med) ease;
}
.bin-card:hover {
  border-color: var(--c-border-hi);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05);
}
.bin-card.active {
  border-color: var(--c-border-hi);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05);
}
.bin-meta { display: grid; gap: 5px; min-width: 0; }
.bin-number { font-weight: 700; letter-spacing: .04em; font-family: ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace; }
.bin-issuer { color: var(--c-muted); font-size: 12px; word-break: break-word; }
.bin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }

.button-action { min-width: 62px; height: 34px; opacity: 1; }
.button-action.use:hover  { box-shadow: var(--shadow-sm); }
.button-action.edit:hover { box-shadow: var(--shadow-sm); }
.button-action.remove:hover { box-shadow: var(--shadow-sm); }

.bin-mark {
  color: var(--c-text); background: var(--c-bg-2);
  border: 1px solid var(--c-line);
  border-radius: 4px; padding: 0 4px;
}

.inline-check {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; color: #c0d0e8; font-size: 12px; cursor: pointer;
}
.inline-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--c-blue);
}

.secure-head .muted { margin: 0; }



.bypass-shell { display: grid; gap: var(--sp-4); }


.bypass-v2-grid { display: contents; }
.bypass-controls-card, .bypass-insights-card { grid-column: auto; }



.bypass-hero { display: grid; }


.bypass-cols {
  column-count: 2;
  column-gap: var(--sp-4);
}
.bypass-col { display: contents; }


.bypass-sec {
  display: grid; gap: var(--sp-3);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  border: 1px solid transparent;
  background: transparent;
  transition: border-color var(--med) ease, background var(--med) ease, box-shadow var(--med) ease;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: var(--sp-4);
}

.appearance-panel .bypass-sec.app-zone { margin-bottom: var(--sp-5); }
.appearance-panel .bypass-sec.app-zone:last-child { margin-bottom: 0; }
.bypass-sec > .algo-mode-panel:first-of-type,
.bypass-sec > .card:first-of-type { margin-top: 0; }

.bypass-sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--sp-3); flex-wrap: wrap;
  margin: 0;
}
.bypass-sec-eyebrow {
  font-family: var(--op-mono, monospace);
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-dim);
  display: inline-flex; align-items: center; gap: 6px;
}
.bypass-sec-hint { font-size: 11.5px; color: var(--c-muted); }
.bypass-sec-actions { margin-left: auto; }

.bypass-sec-titles { display: grid; gap: 1px; min-width: 0; align-content: center; }
.bypass-sec-head-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }


.bypass-sec.is-high {
  border-color: var(--c-line-hi);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c-bg-1) 50%, transparent), color-mix(in srgb, var(--c-bg-2) 40%, transparent));
  padding: var(--sp-5) var(--sp-4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
.bypass-sec.is-high:hover { border-color: var(--c-border-hi); }


.bypass-sec.is-med {
  border-color: transparent;
  border-top: 1px solid var(--c-line);
  background: transparent;
  border-radius: 0;
  padding: var(--sp-4) var(--sp-1);
}
.bypass-sec.is-med:hover { border-top-color: var(--c-line-hi); }
.bypass-sec.is-med .algo-mode-panel,
.bypass-sec.is-med .card { background: color-mix(in srgb, var(--c-bg-0) 32%, transparent); }


.bypass-sec.is-premium {
  border: 1px solid rgba(232,183,101,.22);
  background:
    linear-gradient(155deg, rgba(232,183,101,.07) 0%, transparent 50%),
    color-mix(in srgb, var(--c-bg-0) 50%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  position: relative;
  overflow: hidden;
  column-span: all; -webkit-column-span: all; break-inside: avoid;
}
.bypass-sec.is-premium::before {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246,217,138,.5), transparent);
  pointer-events: none;
}
.bypass-sec.is-premium:hover { border-color: rgba(232,183,101,.34); }

.bypass-sec.is-premium .bypass-sec-head {
  position: relative;
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  margin-bottom: 12px; padding: 8px 12px;
  border: 1px solid rgba(232,183,101,.26);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(232,183,101,.14), rgba(232,183,101,.03) 70%),
    rgba(232,183,101,.04);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.bypass-sec.is-premium .bypass-sec-eyebrow {
  color: #f3cd7e; font-size: 11.5px; letter-spacing: .14em; line-height: 1.1;
}
.bypass-sec.is-premium .bypass-sec-hint { color: #e8c079; font-weight: 600; font-size: 12px; line-height: 1.15; }
.bypass-premium-pill { align-self: center; }

.bypass-sec.is-premium .bypass-sec-titles { min-width: 0; }
.bypass-sec.is-premium .bypass-sec-hint { min-width: 0; overflow-wrap: anywhere; }
.bypass-sec.is-premium .card {
  background: color-mix(in srgb, var(--c-bg-0) 42%, transparent);
  border: 1px solid rgba(232,183,101,.12);
}
.bypass-sec.is-premium .card:hover { border-color: rgba(232,183,101,.24); }
.bypass-premium-marker {
  color: #f3cd7e; font-size: 12px; line-height: 1;
}
.bypass-unit-title { font-size: 12px; font-weight: 700; color: #d8e8ff; letter-spacing: .01em; }


.bypass-sec .card {
  margin: 0;
  border: 0;
  border-radius: var(--r-sm);
  padding: var(--sp-3);
}
.bypass-sec .card:hover { border-color: transparent; }
.bypass-sec .algo-mode-panel { margin-top: 0; }
.bypass-sec .algo-mode-panel + .algo-mode-panel,
.bypass-sec .card + .card { margin-top: var(--sp-3); }


.bypass-master {
  display: flex; align-items: center; gap: var(--sp-5);
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--r-xl);
  border: 1px solid var(--c-line-hi);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255,255,255,.035), transparent 60%),
    #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  transition: border-color var(--med) ease, background var(--med) ease, box-shadow var(--med) ease;
}
.bypass-master.is-on {
  border-color: color-mix(in srgb, var(--c-accent) 42%, var(--c-line-hi));
  background:
    radial-gradient(130% 180% at 0% 0%, color-mix(in srgb, var(--c-accent) 9%, transparent), transparent 55%),
    #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.bypass-master-icon {
  flex: 0 0 56px; width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  color: var(--c-dim);
  background: rgba(100,120,160,.1);
  border: 1px solid var(--c-line-hi);
  transition: color var(--med) ease, background var(--med) ease, border-color var(--med) ease, box-shadow var(--med) ease;
}
.bypass-master-icon svg { width: 25px; height: 25px; }
.bypass-master.is-on .bypass-master-icon {
  color: var(--c-accent);
  background: color-mix(in srgb, var(--c-accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--c-accent) 40%, transparent);
}
.bypass-master-copy { flex: 1 1 auto; min-width: 0; display: grid; gap: 5px; }
.bypass-master-copy strong {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: var(--c-text); letter-spacing: -.01em;
}
.bypass-master-copy small { font-size: 12px; color: var(--c-muted); line-height: 1.45; }
.bypass-master-toggle { flex: 0 0 auto; }


.bypass-control-group { display: grid; gap: 8px; }
.bypass-control-group-title {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-dim); margin-top: 2px;
}

.bypass-tools-group { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--c-line); }

.bypass-log-toolbar {
  margin: 4px 0 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
}
.bypass-log-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.bypass-log-filters .chip {
  min-width: 64px; min-height: 30px;
  display: inline-flex; align-items: center; gap: 7px;
}
.bypass-log-filters .chip.is-active {
  border-color: rgba(34,197,94,.52);
  background: rgba(67,107,208,.2);
  color: #d4e4ff;
}

.chip-count {
  font-size: 10.5px; font-weight: 700; line-height: 1;
  min-width: 18px; padding: 3px 6px; border-radius: 999px;
  background: rgba(120,140,180,.16); color: var(--c-dim);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--med) ease, color var(--med) ease;
}
.bypass-log-filters .chip.is-active .chip-count { background: rgba(34,197,94,.32); color: #eaf1ff; }
#bypassLogFilterHits.is-active .chip-count { background: rgba(34,197,94,.3); color: #cdfff0; }
#bypassLogFilterDeclines.is-active .chip-count { background: rgba(255,95,114,.3); color: #ffdbe0; }


.bypass-log-actions { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; gap: 6px; position: relative; }
.bypass-log-actions .btn[hidden] { display: none; }
#logsExportBtn { transition: border-color var(--fast) ease, color var(--fast) ease, background var(--fast) ease, transform var(--fast) ease; }
#logsExportBtn:hover { border-color: rgba(34,197,94,.45); color: #cdfff0; }
#logsExportBtn:active { transform: translateY(1px); }
#logsClearScopedBtn { transition: border-color var(--fast) ease, color var(--fast) ease, transform var(--fast) ease; }
#logsClearScopedBtn:hover { border-color: rgba(255,95,114,.4); color: #ffd3d9; }
#logsClearScopedBtn:active { transform: translateY(1px); }
.bypass-insights-card .console-box { min-height: 180px; max-height: 320px; }

#bypasserLogs {
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 12px;
  scroll-padding-bottom: 8px;
}
#bypasserLogs .log-row + .log-row { margin-top: 8px; }



.console-box {
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  background: var(--c-bg-0);
  border-radius: var(--r-md);
  padding: 12px; height: 100%;
  min-height: 260px;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; scrollbar-gutter: stable;
  border: 1px solid rgba(100,130,180,.1);
  box-shadow: inset 0 0 30px rgba(0,0,0,.5);
}
.console-box .log-item {
  border: 1px solid rgba(34,197,94,.08);
  background: color-mix(in srgb, var(--c-bg-0) 72%, transparent);
}
.log-item.success { color: var(--c-green); }
.log-item.error   { color: var(--c-red); }
.log-item.info    { color: var(--c-blue); }


.console-box .log-row {
  display: flex; align-items: stretch; gap: 0;
  padding: 0; border-radius: 10px; overflow: hidden;
  background: color-mix(in srgb, var(--c-bg-0) 78%, transparent);
  border: 1px solid rgba(120,150,190,.1);
  transition: background var(--fast) ease, border-color var(--fast) ease, transform var(--fast) ease;
}

.log-row-rail { flex: 0 0 3px; align-self: stretch; }
.log-row.tone-hit     .log-row-rail { background: linear-gradient(rgba(34,197,94,.9), rgba(34,197,94,.5)); }
.log-row.tone-decline .log-row-rail { background: linear-gradient(rgba(255,95,114,.9), rgba(255,95,114,.5)); }
.log-row.tone-info    .log-row-rail { background: linear-gradient(rgba(120,150,190,.7), rgba(120,150,190,.4)); }

.log-row .log-row-body { flex: 1 1 auto; min-width: 0; display: grid; gap: 7px; padding: 9px 12px; }


.log-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.log-gw { flex: 0 1 auto; min-width: 0; font-weight: 700; font-size: 12.5px; color: var(--c-text); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-row-meta { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }


.log-status {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 2px 7px; border-radius: 999px; line-height: 1.4;
  font-family: var(--font-ui, inherit);
}
.log-status-hit     { color: #b8ffe4; background: rgba(34,197,94,.16); }
.log-status-decline { color: #ffd3d9; background: rgba(255,95,114,.16); }
.log-status-info    { color: #d4e4ff; background: rgba(120,150,190,.16); }

.log-time { color: var(--c-dim); font-variant-numeric: tabular-nums; font-size: 11px; flex: 0 0 auto; white-space: nowrap; }
.log-card-saved {
  font-size: 10px; line-height: 1; color: #cdfff0;
  display: inline-grid; place-items: center;
  width: 16px; height: 16px; border-radius: 4px;
  background: rgba(34,197,94,.18); border: 1px solid rgba(34,197,94,.3);
}


.log-card {
  display: flex; align-items: center; gap: 6px;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 13px; line-height: 1.3; color: var(--c-text);
  padding: 5px 8px; border-radius: 7px;
  background: rgba(10,14,20,.5); border: 1px solid rgba(120,150,190,.12);
  transition: background var(--fast) ease, border-color var(--fast) ease;
}
.log-card-body {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  cursor: pointer; user-select: none; flex: 1 1 auto; min-width: 0;
  padding: 2px 0;
}
.log-card-body:hover {  }
.log-card:hover, .log-card:focus-within {
  background: rgba(67,107,208,.12);
  border-color: color-mix(in srgb, var(--c-line-hi) 55%, transparent);
  outline: none;
}
.log-card-copy-btn {
  flex: 0 0 auto;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 5px; padding: 3px 7px;
  font-size: 11px; line-height: 1; cursor: pointer;
  opacity: .40; transition: opacity .12s ease, background .12s ease;
}
.log-card-copy-btn:hover { opacity: .85; background: rgba(255,255,255,.07); }
.log-card-pan { font-weight: 700; letter-spacing: .04em; color: var(--c-text); white-space: nowrap; }
.log-card-sep { color: var(--c-dim); opacity: .5; }
.log-card-exp { color: var(--c-muted); font-variant-numeric: tabular-nums; }
.log-card-cvv { color: var(--c-muted); font-variant-numeric: tabular-nums; }
.log-card.is-copied { background: rgba(34,197,94,.18); border-color: rgba(34,197,94,.4); }
.log-card.is-copied .log-card-body::after {
  content: " ✓ copied"; font-size: 10px; font-weight: 600; color: #b8ffe4; letter-spacing: normal;
}


.log-msg { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--c-muted); word-break: break-word; }
.log-row.tone-decline .log-msg { color: #ffbfc7; }
.log-msg-muted { color: var(--c-dim); font-style: italic; }


.log-row.is-jumpable { cursor: pointer; }
.log-row.is-jumpable:hover,
.log-row.is-jumpable:focus-visible {
  background: rgba(67,107,208,.14);
  border-color: color-mix(in srgb, var(--c-line-hi) 60%, transparent);
  outline: none;
}
.log-row.is-jumpable:active { transform: translateY(1px); }
.log-row.is-jumpable:focus-visible { box-shadow: 0 0 0 2px rgba(67,107,208,.4); }

.log-row.is-no-rule { opacity: .82; cursor: default; }


.gateway-card.is-flash {
  animation: gwFlash 1.4s ease;
  outline: 2px solid rgba(34,197,94,.55);
  outline-offset: 2px;
}
@keyframes gwFlash {
  0%   { background: rgba(34,197,94,.22); }
  100% { background: var(--card-bg, rgba(8,12,18,.72)); }
}

.log-item.is-fresh { animation: logFlash .4s ease; }
@keyframes logFlash { from { filter: brightness(1.4); } to { filter: brightness(1); } }


.console-box .log-empty {
  display: grid; gap: 5px; justify-items: center; text-align: center;
  padding: 22px 16px; color: var(--c-muted);
}
.log-empty-glyph {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: var(--r-sm); font-size: 16px;
  color: var(--c-dim); background: rgba(100,120,160,.1);
  border: 1px solid var(--c-line-hi);
}
.log-empty strong { font-size: 13.5px; color: var(--c-text); }
.log-empty span { font-size: 11.5px; line-height: 1.5; max-width: 280px; }


.log-empty-glyph svg { display: block; margin: 0 auto; opacity: .45; }
.log-empty .log-empty-glyph { width: auto; height: auto; background: none; border: none; }


.log-skeleton { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.log-skel-row { height: 40px; border-radius: 8px; background: linear-gradient(90deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,.06) 50%, rgba(255,255,255,.03) 100%); background-size: 200% 100%; animation: skelPulse 1.5s ease-in-out infinite; }
@keyframes skelPulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }


.activity-log-footer { text-align: center; font-size: 10.5px; color: var(--c-text-dim); padding: 6px 0 2px; opacity: .6; }
.activity-log-footer[hidden] { display: none; }


.activity-log-scroll-top { position: sticky; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 11px; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--c-border-hi); background: var(--c-bg-1); color: var(--c-text); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); transition: opacity .15s ease, transform .15s ease; }
.activity-log-scroll-top:hover { transform: translateX(-50%) translateY(-1px); }
.activity-log-scroll-top[hidden] { display: none; }


.console-box .log-row:hover { background: rgba(255,255,255,.03); border-color: rgba(120,150,190,.18); }


#logsExportBtn:disabled { opacity: .4; cursor: default; }

@media (prefers-reduced-motion: reduce) {
  .log-item.is-fresh { animation: none; }
  .log-row.is-jumpable:active { transform: none; }
  .gateway-card.is-flash { animation: none; }
}



.settings-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}

.settings-summary-bar { margin-bottom: 16px; padding: 20px; }
.summary-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  color: var(--c-muted); font-size: 12px; margin-top: 10px;
  padding-bottom: 14px; border-bottom: 1px solid var(--c-line);
}
.summary-meta strong { color: var(--c-text); }


.deck-zone { margin-top: 14px; display: grid; gap: 9px; }
.deck-zone-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.deck-zone-title {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--c-muted);
}
.deck-zone-sub { font-size: 11px; color: var(--c-dim); }

.settings-preset-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-preset-btn { min-width: 120px; }
.settings-preset-btn.is-active {
  border-color: rgba(34,197,94,.65);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05);
  color: #dce8ff;
}


.deck-zone-staged {
  position: static !important;
  padding: 13px 14px;
  border: 1px solid var(--c-line-hi);
  border-radius: var(--r-md);
  background: var(--c-bg-0);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.deck-pending-badge { font-size: 11px; }
.deck-pending-badge.is-drift {
  border-color: rgba(255,184,77,.4);
  background: rgba(255,184,77,.12);
  color: #ffd591;
}
.deck-pending-hint { margin: 0; font-size: 11px; }
.deck-action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.deck-action-row .btn { min-height: 32px; }
.deck-restore-btn { margin-left: auto; }


.adv-hero-card { margin-bottom: 16px; }
.adv-hero-card > .muted { margin: 4px 0 14px; }

.adv-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.adv-preset-grid .settings-preset-btn {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 3px;
  height: auto;
  min-height: 66px;
  min-width: 0;
  padding: 12px 14px;
  text-align: left;
  white-space: normal;
  line-height: 1.3;
}
.adv-preset-grid .adv-preset-name { font-size: 13px; font-weight: 700; color: var(--c-text); }
.adv-preset-grid .adv-preset-desc { font-size: 11px; font-weight: 500; color: var(--c-muted); }
.adv-preset-grid .settings-preset-btn.is-active {
  border-color: rgba(34,197,94,.7);
  background: color-mix(in srgb, var(--c-accent) 12%, transparent);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05), var(--glow-btn);
}
.adv-preset-grid .settings-preset-btn.is-active .adv-preset-desc { color: #c8d8f0; }

.adv-hero-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--c-line);
}
.adv-hero-meta { font-size: 11.5px; color: var(--c-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.adv-hero-meta strong { color: var(--c-text); font-weight: 600; }
.adv-hero-meta .adv-dot { color: var(--c-dim); }


.adv-update-card { margin-bottom: 16px; }


.adv-subfold { margin-top: 14px; border-top: 1px solid var(--c-line); padding-top: 10px; }
.adv-subfold > summary {
  cursor: pointer; list-style: none; font-size: 12px; color: var(--c-muted);
  display: inline-flex; align-items: center; gap: 7px;
}
.adv-subfold > summary::-webkit-details-marker { display: none; }
.adv-subfold > summary::before { content: "+"; font-weight: 700; color: var(--c-dim); }
.adv-subfold[open] > summary::before { content: "\2212"; }
.adv-subfold[open] > summary { color: var(--c-text); margin-bottom: 8px; }
.adv-subfold .update-input { margin: 6px 0; }


.adv-fold {
  border: 1px solid var(--c-line-hi);
  border-radius: var(--r-lg);
  background: var(--c-glass);
  overflow: hidden;
}
.adv-fold[open] { background: transparent; }
.adv-fold-summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  transition: background var(--fast) var(--ease);
}
.adv-fold-summary::-webkit-details-marker { display: none; }
.adv-fold-summary:hover { background: color-mix(in srgb, var(--c-accent) 6%, transparent); }
.adv-fold-summary:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(34,197,94,.45); }
.adv-fold-chevron { display: inline-flex; flex-shrink: 0; color: var(--c-muted); transition: transform var(--med) var(--ease); }
.adv-fold[open] .adv-fold-chevron { transform: rotate(180deg); }
.adv-fold-text { display: flex; flex-direction: column; gap: 2px; margin-right: auto; }
.adv-fold-text strong { font-size: 14px; color: var(--c-text); }
.adv-fold-text small { font-size: 11.5px; color: var(--c-muted); }
.adv-fold-pill { flex-shrink: 0; }
.adv-fold-body { padding: 4px 4px 6px; display: grid; gap: 16px; }
.adv-fold-body .settings-control-toolbar { margin-top: 2px; }

@media (max-width: 560px) {
  .adv-preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .adv-fold-chevron, .adv-fold-summary { transition: none; }
}


.settings-panel .v2-control-row { padding: 9px 0; }
.settings-panel .v2-control-row .setting-copy { display: flex; align-items: center; min-width: 0; }
.settings-panel .v2-control-row .setting-copy strong {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--c-text);
}


.is-premium-locked { opacity: .66; transition: opacity var(--fast) var(--ease); }
.is-premium-locked:hover { opacity: .9; }
.card.is-premium-locked { position: relative; }

.card.is-premium-locked::after { content: none; }
.card.is-premium-locked .card-head h3 { display: inline-flex; align-items: center; }


.adv-fold-body .settings-control-toolbar { gap: 8px; }
.adv-fold-body .settings-control-toolbar input[type="search"] { height: 38px; border-radius: var(--r-md); }
.adv-fold-body .settings-filter-chips { gap: 6px; }
.adv-fold-body .settings-filter-chips .chip { min-width: 0; height: 30px; padding: 0 14px; font-size: 11.5px; }


.adv-fold-body .settings-card .card-head,
.adv-fold-body .settings-card .card-head-stack { border-radius: var(--r-sm); }
.adv-fold-body .settings-card.is-collapsed { cursor: pointer; transition: border-color var(--fast) var(--ease); }
.adv-fold-body .settings-card.is-collapsed:hover { border-color: var(--c-border-hi); }


.adv-fold-body .settings-grid { grid-template-columns: 1fr !important; gap: 12px; }
.adv-fold-body .settings-grid > .settings-card { grid-column: 1 / -1 !important; align-self: start; }


.home-logs-card .console-box { min-height: 230px; max-height: 380px; }


.acc-status {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: auto;
  padding: 0; border: 0; background: none;
  font-size: 11px; font-weight: 600; color: var(--c-dim);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.acc-status[data-tone="on"] { color: var(--c-muted); }
.acc-status[data-tone="attn"] { color: var(--c-amber); }

.settings-control-card .card-head .card-collapse-btn { margin-left: 10px; }




.settings-panel .adv-fold-body .settings-grid { gap: 16px; }
.settings-panel > .card + .card,
.settings-panel .adv-fold-body + .card { margin-top: 4px; }


.adv-overview-card { padding: var(--sp-4); }
.adv-overview-card .bypass-sec-head h3 { margin: 2px 0 0; }
.adv-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.adv-overview-tile {
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--c-bg-1) 60%, transparent);
  transition: border-color var(--med) ease, background var(--med) ease;
}
.adv-overview-tile:hover { border-color: var(--c-line-hi); }
.adv-overview-tile--health {
  grid-column: span 2;
  flex-direction: row; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
}
.adv-overview-tile--health .pill { margin: 0; }
.adv-overview-label {
  font-family: var(--op-mono, monospace);
  font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-dim);
}
.adv-overview-tile strong {
  font-size: 14px; font-weight: 700; color: var(--c-text);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.adv-overview-tile small { font-size: 10px; color: var(--c-muted); }
.adv-overview-foot {
  margin-top: var(--sp-3); padding-top: var(--sp-3);
  border-top: 1px solid var(--c-line);
  display: flex; gap: var(--sp-2);
}


.adv-preset-strip-wrap {
  margin-top: var(--sp-4); padding-top: var(--sp-4);
  border-top: 1px solid var(--c-line);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.adv-preset-strip-label {
  font-family: var(--op-mono, monospace);
  font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-dim);
}
.adv-overview-restore { display: flex; justify-content: flex-end; }


.adv-card-summary {
  margin: 4px 0 0;
  font-size: 11.5px; color: var(--c-muted); line-height: 1.45;
  max-width: 560px;
}

.settings-card.is-collapsed .adv-card-summary { color: var(--c-muted); }


.adv-control-body {
  display: flex; flex-direction: column; gap: 0;
  padding-top: var(--sp-3);
  margin-top: var(--sp-3);
  border-top: 1px solid var(--c-line);
}
.settings-card.is-collapsed .adv-control-body { display: none; }


.adv-control-body .v2-control-row {
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--c-line);
}
.adv-control-body .v2-control-row:first-child { border-top: 0; }
.adv-row-desc {
  display: block;
  font-size: 11px; color: var(--c-muted); line-height: 1.4;
  margin-top: 2px;
}
.adv-impact {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 5px;
  padding: 1px 7px;
  border-radius: 999px;
  font-family: var(--op-mono, monospace);
  font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid transparent;
}
.adv-impact::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; flex: 0 0 auto;
}
.adv-impact--high { color: var(--c-red); border-color: color-mix(in srgb, var(--c-red) 30%, transparent); }
.adv-impact--med  { color: var(--c-amber); border-color: color-mix(in srgb, var(--c-amber) 30%, transparent); }
.adv-impact--low  { color: var(--c-dim); border-color: var(--c-line-hi); }
.adv-depends {
  display: inline-flex; align-items: center; gap: 3px;
  margin-top: 5px; margin-left: 6px;
  font-size: 10px; font-weight: 600; color: var(--c-dim);
  font-family: var(--op-mono, monospace);
}

.v2-control-row[data-warning] .setting-copy::after {
  content: '⚠ ' attr(data-warning);
  display: block;
  margin-top: 4px;
  font-size: 10.5px; font-weight: 500; color: var(--c-amber);
  line-height: 1.35;
}

body.theme-light .adv-impact--high { color: #c43a3a; }
body.theme-light .adv-impact--med  { color: #b9791a; }
body.theme-light .v2-control-row[data-warning] .setting-copy::after { color: #a36a12; }


.settings-control-card .card-head .card-collapse-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: var(--r-sm);
}

.settings-control-card .card-head .card-collapse-btn::before { content: none; }

.settings-control-card .card-head .card-collapse-btn svg { width: 13px; height: 13px; }

@media (max-width: 680px) {
  .adv-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adv-overview-tile--health { grid-column: span 2; }
  .adv-card-summary { max-width: 100%; }
  .settings-control-card .card-head .card-collapse-btn::before { display: none; }
}


.home-kpi-value { font-family: var(--op-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}


.cmd-kbd {
  font-family: var(--op-mono); font-size: 10px;
  border: 1px solid var(--c-line-hi); border-radius: 4px;
  padding: 1px 5px; color: var(--c-muted); line-height: 1.4;
}
.top-actions #commandHintBtn .cmd-kbd { margin-left: 6px; }
.cmd-palette-overlay {
  position: fixed; inset: 0; z-index: 220;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  background: color-mix(in srgb, var(--c-bg-0) 62%, transparent);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.cmd-palette {
  width: min(540px, 92vw);
  background: var(--c-bg-2);
  border: 1px solid var(--c-border-hi);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.cmd-palette-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 15px; border-bottom: 1px solid var(--c-line);
}
.cmd-palette-ico { width: 18px; height: 18px; color: var(--c-muted); flex: 0 0 auto; }


.update-modal-overlay {
  position: fixed; inset: 0; z-index: 240;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: color-mix(in srgb, var(--c-bg-0) 62%, transparent);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.update-modal {
  width: min(400px, 92vw);
  background: var(--c-bg-2);
  border: 1px solid var(--c-border-hi);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.update-modal-head {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 15px; border-bottom: 1px solid var(--c-line);
}
.update-modal-title {
  margin: 0; padding: 0; flex: 0 1 auto;
  font-size: 14px; font-weight: 600; color: var(--c-text);
}
.update-modal-ver {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 11px; color: var(--c-accent);
  padding: 2px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--c-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-accent) 28%, transparent);
}
.update-modal-req {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--c-amber);
  padding: 2px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--c-amber) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-amber) 34%, transparent);
}
.update-modal-x {
  margin-left: auto; flex: 0 0 auto;
  background: none; border: none; cursor: pointer;
  color: var(--c-muted); font-size: 19px; line-height: 1; padding: 0 4px;
  border-radius: var(--r-xs); transition: color var(--fast) ease;
}
.update-modal-x:hover { color: var(--c-text); }
.update-modal-body { padding: 14px 15px; max-height: 40vh; overflow-y: auto; }
.update-modal-current {
  margin: 0 0 10px; font-size: 12px; color: var(--c-text-dim);
  font-family: ui-monospace, "JetBrains Mono", monospace;
}
.update-modal-noteline {
  margin: 0; color: var(--c-text-dim); font-size: 13px; line-height: 1.55;
}
.update-modal-notelist {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.update-modal-notelist li {
  position: relative; padding-left: 16px;
  color: var(--c-text-dim); font-size: 13px; line-height: 1.5;
}
.update-modal-notelist li::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--c-accent);
}
.update-modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 15px; border-top: 1px solid var(--c-line);
}
.update-modal-foot .btn { min-height: 34px; }


.update-banner { cursor: pointer; }



.theme-gallery-section {
  border-top: 1px solid var(--c-line);
  padding: 12px 0 4px;
  margin: 0;
}
.theme-gallery-section[hidden] { display: none; }


.theme-gallery-tabs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px;
  width: 100%;
}
.theme-gallery-label {
  font-size: 11px; font-weight: 600; color: var(--c-text-dim);
  text-transform: uppercase; letter-spacing: .06em;
  margin-right: 6px;
}
.theme-gallery-tab {
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-text-dim);
  font-family: inherit; font-size: 10.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}
.theme-gallery-tab:hover {
  border-color: var(--c-border-hi);
  color: var(--c-text);
}
.theme-gallery-tab.is-active {
  border-color: var(--c-accent);
  background: color-mix(in srgb, var(--c-accent) 14%, transparent);
  color: var(--c-accent);
}


.theme-gallery-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 380px; overflow-y: auto;
  width: 100%;
}


.theme-gallery-card {
  display: flex; align-items: stretch; gap: 0;
  width: 100%;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-bg-0);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  padding: 0; margin: 0;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
  min-height: 68px;
}
.theme-gallery-card:hover {
  border-color: var(--c-border-hi);
  box-shadow: 0 2px 10px rgba(0,0,0,.22);
}
.theme-gallery-card:focus-visible {
  outline: none; box-shadow: 0 0 0 2px var(--c-accent);
}
.theme-gallery-card.is-active {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 1px var(--c-accent) inset;
  background: color-mix(in srgb, var(--c-accent) 5%, var(--c-bg-0));
}


.theme-gallery-card-bar {
  width: 4px; flex: 0 0 4px; align-self: stretch;
  background: var(--gbar-color);
  position: relative;
}


.theme-gallery-card-body {
  flex: 1; min-width: 0;
  padding: 11px 14px;
  display: flex; flex-direction: column; gap: 4px;
  justify-content: center;
}
.theme-gallery-card-top {
  display: flex; align-items: baseline; gap: 7px;
}
.theme-gallery-card-name {
  font-size: 12.5px; font-weight: 600; color: var(--c-text);
  white-space: nowrap; line-height: 1.2;
}
.theme-gallery-card-cat {
  font-size: 8.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em;
  color: var(--c-muted); flex: 0 0 auto;
  padding: 1.5px 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--c-muted) 10%, transparent);
}
.theme-gallery-card-desc {
  font-size: 10.5px; color: var(--c-text-dim); line-height: 1.35;
}
.theme-gallery-card-pills {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.theme-gallery-card-pill {
  font-size: 9.5px; font-weight: 500;
  padding: 2px 7px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c-accent) 18%, transparent);
  background: color-mix(in srgb, var(--c-accent) 7%, transparent);
  color: var(--c-accent);
  line-height: 1.35;
}


.theme-gallery-card.is-active .theme-gallery-card-bar::after {
  content: "\2713";
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-size: 7px; font-weight: 700; color: #fff;
  line-height: 1;
}


@media (max-width: 420px) {
  .theme-gallery-card-body { padding: 9px 11px; }
  .theme-gallery-card-name { font-size: 11.5px; }
  .theme-gallery-card-desc { font-size: 10px; }
  .theme-gallery-card-pill { font-size: 9px; padding: 1px 5px; }
}



button.is-busy {
  opacity: .72; cursor: progress; position: relative; pointer-events: none;
}
button.is-busy::after {
  content: ""; position: absolute; right: 9px; top: 50%;
  width: 12px; height: 12px; margin-top: -6px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: asheo-spin .6s linear infinite;
  opacity: .85;
}
@keyframes asheo-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  button.is-busy::after { animation: none; }
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--c-green, #3ecf8e);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
#cmdPaletteInput {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none;
  color: var(--c-text); font: inherit; font-size: 14px;
}
.cmd-palette-list { list-style: none; margin: 0; padding: 6px; max-height: 320px; overflow-y: auto; }
.cmd-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer;
  font-size: 13px; color: var(--c-text);
}
.cmd-item.is-active, .cmd-item:hover { background: color-mix(in srgb, var(--c-accent) 15%, transparent); }
.cmd-hint { font-size: 11px; color: var(--c-dim); flex: 0 0 auto; }
.cmd-empty { padding: 18px; text-align: center; color: var(--c-muted); font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
  .cmd-palette-overlay { backdrop-filter: none; -webkit-backdrop-filter: none; }
}



.bin-top-row { align-items: stretch; }
.bin-top-row > .card { align-self: stretch; }


.bin-shell .algo-cc-count,
.bin-shell .pill strong,
.bypass-panel .algo-cc-count,
.bypass-panel .pill strong {
  font-family: var(--op-mono);
  font-variant-numeric: tabular-nums;
}


.bin-shell .section-chip, .bypass-panel .section-chip { letter-spacing: .09em; }
.bin-top-row { gap: var(--sp-4); }


.bypass-panel .pill.is-on, .bin-shell .pill.is-on { border-color: rgba(34,197,94,.3); }

.settings-control-toolbar { display: grid; gap: 10px; }
.settings-control-toolbar input[type="search"] { width: 100%; }
.settings-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.settings-panel .chip { min-width: 108px; height: 32px; font-size: 12px; }
.settings-panel .chip.is-active {
  border-color: rgba(34,197,94,.56);
  background: rgba(34,197,94,.2);
  color: #d4e4ff;
}

.settings-panel .settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.settings-panel .settings-control-card { display: grid; gap: 0; }
.settings-panel .settings-control-card[data-control-group="runtime"],
.settings-panel .settings-control-card[data-control-group="observability"] { grid-column: 1 / -1; }

.settings-panel .v2-control-row { border-bottom: 1px solid var(--c-line); padding: 10px 6px; margin: 0 -6px; transition: background var(--fast) ease; }
.settings-panel .v2-control-row:hover { background: rgba(255,255,255,.02); }
.settings-panel .settings-control-card .v2-control-row:last-child { border-bottom: 0; }
.settings-panel .v2-control-row.is-filtered-out { display: none; }

.settings-panel .setting-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.settings-panel .control-impact {
  display: inline-flex; align-items: center;
  border-radius: 999px; border: 1px solid var(--c-line-hi);
  padding: 2px 8px; font-size: 10px; color: #c8d8f0;
}
.settings-panel .control-impact.impact-high   { border-color: rgba(255,95,114,.4);  color: #ffc4ca; }
.settings-panel .control-impact.impact-medium { border-color: rgba(255,184,77,.38); color: #ffdeb8; }
.settings-panel .control-impact.impact-low    { border-color: rgba(34,197,94,.36); color: #c4ffe0; }
.settings-panel .control-state { font-size: 10px; color: var(--c-dim); letter-spacing: .04em; text-transform: uppercase; }
.settings-panel .control-state.is-on { color: #d0e8ff; }




.settings-panel .settings-card.bypass-sec {
  border-color: var(--c-line);
  background: color-mix(in srgb, var(--c-bg-0) 40%, transparent);
  padding: var(--sp-5) var(--sp-4);
}
.settings-panel .settings-card.bypass-sec.is-high {
  border-color: var(--c-line-hi);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c-bg-1) 50%, transparent), color-mix(in srgb, var(--c-bg-2) 40%, transparent));
  padding: var(--sp-5) var(--sp-4);
}
.settings-panel .settings-card.bypass-sec .bypass-sec-head { margin-bottom: var(--sp-4); }
.settings-panel .settings-card.bypass-sec .bypass-sec-head .status-pill { margin-left: auto; }


.adv-hero-card.is-high .adv-preset-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-2);
}
.adv-hero-card .settings-preset-btn {
  flex-direction: column; align-items: flex-start; text-align: left;
  min-height: 56px; padding: 10px 12px;
  border: 1px solid var(--c-line); background: transparent;
  border-radius: var(--r-sm);
  transition: border-color var(--fast) ease, background var(--fast) ease, box-shadow var(--fast) ease, transform var(--fast) var(--ease);
}
.adv-hero-card .settings-preset-btn:hover { border-color: var(--c-line-hi); background: rgba(255,255,255,.02); transform: translateY(-1px); }
.adv-hero-card .settings-preset-btn.is-active {
  border-color: rgba(34,197,94,.4);
  background: rgba(34,197,94,.08);
  box-shadow: inset 0 0 0 1px rgba(34,197,94,.2), 0 0 16px rgba(34,197,94,.08);
}
.adv-hero-card .adv-preset-name { font-size: 12.5px; }
.adv-hero-card .adv-preset-desc { font-size: 10.5px; }
.adv-hero-card .adv-hero-foot { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--c-line); }
.adv-hero-card .adv-hero-meta { font-size: 11px; }


.update-card.bypass-sec .update-version-line { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: var(--c-text); font-weight: 500; }
.update-card.bypass-sec .update-status-sub { margin: 2px 0 0; font-size: 11.5px; line-height: 1.4; color: var(--c-text-dim, #9aa6b6); }
.update-card.bypass-sec .update-status-sub[hidden] { display: none; }
.update-card.bypass-sec .update-btn-row { margin: 10px 0 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.update-card.bypass-sec .adv-subfold { margin-top: var(--sp-2); border-color: var(--c-line); background: transparent; }
.update-card.bypass-sec .adv-subfold[open] > summary { border-bottom-color: var(--c-line); }


.update-card .status-pill.is-off { color: #8a8f9a; background: rgba(130,140,160,.12); border-color: rgba(130,140,160,.2); }
.update-card .status-pill.is-error { color: #ff8a7d; background: rgba(255,95,114,.14); border-color: rgba(255,95,114,.25); }
.update-card .status-pill.is-update { color: #f3cd7e; background: rgba(232,183,101,.18); border-color: rgba(232,183,101,.3); }


.update-feed-indicator { font-size: 10.5px; color: #9a8f76; font-weight: 500; }
.update-feed-indicator[hidden] { display: none; }


.adv-subfold-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #e8b765; margin-left: 6px; vertical-align: middle; }
.adv-subfold-dot[hidden] { display: none; }


.adv-subfold-summary-text { pointer-events: none; }


.update-privacy-note { font-size: 10.5px; margin-top: 8px; }


.update-url-clear-btn { color: #ff8a7d; }
.update-url-clear-btn:hover { background: rgba(255,138,125,.08); }


.settings-panel .settings-control-card {
  border-color: var(--c-line); background: color-mix(in srgb, var(--c-bg-0) 40%, transparent);
  transition: border-color var(--fast) ease;
}
.settings-panel .settings-control-card:hover { border-color: var(--c-line-hi); }

.settings-panel .settings-control-card .card-head { padding: var(--sp-3) var(--sp-3) var(--sp-2); border-bottom: 1px solid var(--c-line); margin-bottom: 0; }
.settings-panel .settings-control-card .card-head h3 { font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.settings-panel .settings-control-card .section-chip {
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-dim); background: transparent; border: 0; padding: 0;
}

.settings-panel .v2-control-row { padding: 11px var(--sp-3); margin: 0; border-bottom: 1px solid var(--c-line); }
.settings-panel .v2-control-row:hover { background: rgba(255,255,255,.018); }
.settings-panel .settings-control-card .v2-control-row:last-child { border-bottom: 0; }

.settings-panel .settings-control-toolbar {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--c-bg-0) 92%, transparent); backdrop-filter: blur(8px);
  padding: var(--sp-3) 0; margin: 0 0 var(--sp-3);
  border-bottom: 1px solid var(--c-line);
}
.settings-panel .settings-control-toolbar input[type="search"] {
  min-height: 36px; border-color: var(--c-line-hi);
  transition: border-color var(--fast) ease, box-shadow var(--fast) ease;
}
.settings-panel .settings-control-toolbar input[type="search"]:focus {
  border-color: rgba(34,197,94,.5);
  box-shadow: 0 0 0 3px rgba(34,197,94,.18);
}


.settings-panel .runtime-overview-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0; border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden;
  background: color-mix(in srgb, var(--c-bg-0) 40%, transparent);
}
.settings-panel .runtime-overview-item {
  border: 0; border-right: 1px solid var(--c-line); border-radius: 0; background: transparent;
  padding: var(--sp-4) var(--sp-3); display: grid; gap: 4px;
}
.settings-panel .runtime-overview-item:last-child { border-right: 0; }
.settings-panel .runtime-overview-item span { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-dim); }
.settings-panel .runtime-overview-item strong { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--c-text); }


.settings-panel .settings-card .card-head { margin-bottom: var(--sp-3); }
.settings-panel .adv-fold { border-color: var(--c-line); }
.settings-panel .adv-fold-summary { padding: var(--sp-3) var(--sp-4); }
.settings-panel .adv-fold-body { padding: 0 var(--sp-4) var(--sp-4); }

@media (prefers-reduced-motion: reduce) {
  .settings-panel .settings-preset-btn, .settings-panel .settings-control-card,
  .settings-panel .v2-control-row, .settings-panel .settings-control-toolbar input[type="search"] { transition: none; }
  .adv-hero-card .settings-preset-btn:hover { transform: none; }
}



.settings-panel .compact-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.settings-panel .settings-vault-card .feature-row,
.settings-panel .settings-lab-card .feature-row { flex-wrap: wrap; }
.settings-panel .settings-vault-card .status-pill { min-width: 88px; justify-content: center; }
.settings-panel .settings-lab-card.is-disabled { opacity: .72; }
.settings-panel .settings-lab-card.is-disabled .muted::after {
  content: " Enable Control Lab to use these actions.";
  color: #9ab0cc;
}


.lab-test-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.lab-test-grid .lab-test-tile.btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; padding: 16px 10px;
  border-radius: var(--r-md);
  text-align: center;
}
.lab-test-tile .lab-test-emoji { font-size: 20px; line-height: 1; }
.lab-test-tile .lab-test-label { font-size: 12px; font-weight: 600; }
.lab-test-tile:hover:not(:disabled) {
  border-color: var(--c-blue);
  background: rgba(34,197,94,.1);
  transform: translateY(-1px);
}


.vault-explainer {
  border: 1px solid var(--c-line-hi);
  border-left: 3px solid var(--c-blue);
  border-radius: var(--r-sm);
  background: rgba(34,197,94,.06);
  padding: 11px 13px; margin: 0 0 4px;
  font-size: 12px; line-height: 1.55;
}
.vault-explainer strong { color: #d6e4ff; }
.vault-explainer em { color: #b8c8e0; font-style: normal; font-weight: 600; }


.settings-panel .settings-ruleops-card { border-color: rgba(34,197,94,.2); }
.settings-panel .settings-ruleops-preset-row { margin-top: 0; align-items: stretch; flex-wrap: wrap; gap: 8px; }
.settings-panel .settings-ruleops-preset-row .gw-template-item .btn { min-height: 0; }
.settings-panel .settings-ruleops-preset-row .btn { min-height: 30px; }
.settings-panel .settings-ruleops-preset-row .btn.is-active {
  border-color: rgba(34,197,94,.65);
  background: rgba(34,197,94,.22);
  color: #d8eaff;
}
.settings-panel .settings-ruleops-group {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--c-bg-0) 60%, transparent);
  padding: 12px; display: grid; gap: 8px;
}
.settings-panel .settings-ruleops-group h4 {
  margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-dim);
}
.settings-panel .settings-ruleops-action-row { margin-top: 2px; }
.settings-panel .gateway-editor-layout,
.settings-panel .gateway-rule-cards,
.settings-panel .diagnostics-shell { gap: 16px; }
.settings-panel .gateway-section,
.settings-panel .rule-card,
.settings-panel .gateway-advanced,
.settings-panel .diag-block { padding: 16px; }


.settings-panel .advanced-telemetry-card {
  border-color: rgba(34,197,94,.2);
  background: var(--c-bg-0);
}
.settings-panel .advanced-telemetry-card .diagnostics-shell {
  padding: 12px; border-radius: var(--r-md);
  border: 1px solid rgba(34,197,94,.14);
  background: color-mix(in srgb, var(--c-bg-0) 55%, transparent);
}
.settings-panel .advanced-analytics-panel {
  margin-top: 14px;
  border-style: dashed;
  border-color: rgba(34,197,94,.2);
  background: var(--c-bg-0);
}
.settings-panel .bypass-console-card {
  border-color: var(--c-border);
  background: var(--c-bg-0);
}
.settings-panel .bypass-console-card .console-box { max-height: 280px; }


.version-tag {
  display: inline-block;
  font-size: 9px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-blue);
  background: var(--c-blue-dim);
  border: 1px solid var(--c-border-hi);
  padding: 2px 7px; border-radius: 999px;
  vertical-align: middle; margin-left: 7px;
  position: relative; top: -1px;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}



.theme-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 0;
}

.theme-section {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-line);
}
.theme-section:last-of-type { border-bottom: none; padding-bottom: 4px; }
.theme-section:first-of-type { padding-top: 4px; }

.theme-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--c-dim);
}


.theme-swatches {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}

.theme-swatch {
  width: 34px; height: 34px;
  border-radius: 50%;
  background-color: var(--sw-color, #5b8cff);
  border: 2.5px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: transform .16s var(--ease), border-color .16s ease, box-shadow .16s ease;
}
.theme-swatch::after {
  content: '';
  position: absolute; inset: -5px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color .16s ease;
  pointer-events: none;
}
.theme-swatch:hover {
  transform: scale(1.12);
  border-color: rgba(255,255,255,.35);
}
.theme-swatch.is-active {
  border-color: rgba(255,255,255,.8);
  transform: scale(1.1);
  box-shadow: 0 0 0 3px rgba(255,255,255,.1), 0 0 16px var(--sw-color, #5b8cff);
}
.theme-swatch.is-active::after {
  border-color: rgba(255,255,255,.18);
}

.theme-swatch.is-theme-active {
  border-color: rgba(255,255,255,.55);
  box-shadow: 0 0 0 2px rgba(255,255,255,.12), 0 0 12px var(--sw-color, var(--c-accent));
}

.theme-swatch-names {
  font-size: 11px; color: var(--c-muted);
  font-weight: 500; letter-spacing: .02em;
}


.theme-density-row {
  display: flex; flex-wrap: wrap; gap: 7px;
}


body.density-compact .card             { padding: 14px 16px; }
body.density-compact .setting-row      { padding: 8px 0; }
body.density-compact .settings-grid    { gap: 10px; }
body.density-compact .card-head        { margin-bottom: 10px; }
body.density-compact .feature-row      { gap: 7px; }
body.density-compact .section-chip     { font-size: 9px; padding: 2px 8px; }
body.density-compact .card-head h3     { font-size: 16px; }

body.density-relaxed .card             { padding: 26px; }
body.density-relaxed .setting-row      { padding: 15px 0; }
body.density-relaxed .settings-grid    { gap: 24px; }
body.density-relaxed .card-head        { margin-bottom: 20px; }
body.density-relaxed .feature-row      { gap: 14px; }
body.density-relaxed .card-head h3     { font-size: 20px; }


.settings-panel .settings-summary-bar {
  display: grid; gap: 12px;
  background: var(--c-bg-0);
}



.appearance-panel { display: block; }


.appearance-hero-card.bypass-sec { padding: var(--sp-5) var(--sp-4); }
.appearance-hero-card .bypass-sec-head h3 { margin: 2px 0 0; }
.appearance-hero-right { margin-left: auto; }


.apv {
  display: flex;
  margin-top: var(--sp-4);
  border: 1px solid var(--c-line-hi);
  border-radius: var(--r-md);
  overflow: hidden;
  min-height: 188px;
  background: var(--c-bg);
  font-family: var(--ui-font, "IBM Plex Sans", system-ui, sans-serif);
  box-shadow: var(--shadow-sm);
  transition: border-radius var(--med) var(--ease), box-shadow var(--med) ease, background var(--med) ease;
}
body.bg-ambient .apv {
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--c-accent) 10%, transparent), transparent 60%),
    radial-gradient(120% 80% at 100% 100%, color-mix(in srgb, var(--c-accent) 6%, transparent), transparent 60%),
    var(--c-bg);
}
body.bg-grid .apv {
  background:
    linear-gradient(color-mix(in srgb, var(--c-text) 5%, transparent) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(90deg, color-mix(in srgb, var(--c-text) 5%, transparent) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--c-bg);
}
body.density-compact .apv { min-height: 168px; }
body.density-relaxed .apv { min-height: 208px; }


.apv-sidebar {
  flex: 0 0 44px;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  padding: 14px 0;
  background: var(--c-bg-1);
  border-right: 1px solid var(--c-line);
  transition: background var(--med) ease, border-color var(--med) ease;
}
.apv-brand {
  width: 22px; height: 22px;
  border-radius: var(--r-sm);
  background: linear-gradient(140deg, var(--c-accent), color-mix(in srgb, var(--c-accent) 60%, #000));
  box-shadow: 0 0 10px color-mix(in srgb, var(--c-accent) 40%, transparent);
  transition: border-radius var(--med) var(--ease), background var(--med) ease;
}
.apv-nav {
  width: 7px; height: 7px; border-radius: 50%;
  background: color-mix(in srgb, var(--c-text) 22%, transparent);
  transition: background var(--med) ease, transform var(--fast) var(--ease);
}
.apv-nav.is-active {
  background: var(--c-accent);
  transform: scale(1.25);
  box-shadow: 0 0 8px color-mix(in srgb, var(--c-accent) 60%, transparent);
}


.apv-main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.apv-header {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--c-line);
  background: var(--c-bg-2);
  transition: background var(--med) ease, border-color var(--med) ease;
}
.apv-title {
  font-size: 13px; font-weight: 700; color: var(--c-text);
  letter-spacing: -.01em;
}
.apv-pill {
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c-accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-accent) 30%, transparent);
  color: var(--c-accent);
  font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  transition: background var(--med) ease, color var(--med) ease;
}
.apv-body { flex: 1 1 auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }


.apv-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 13px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-bg-1);
  box-shadow: var(--shadow-sm);
  transition: border-radius var(--med) var(--ease), box-shadow var(--med) ease, background var(--med) ease, border-color var(--med) ease;
}
body.cardstyle-flat .apv-card { box-shadow: none; border-color: var(--c-line); }
body.cardstyle-bordered .apv-card { border-color: var(--c-border-hi); box-shadow: none; }
body.cardstyle-elevated .apv-card {
  border-color: var(--c-border-hi);
  box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in srgb, var(--c-accent) 12%, transparent);
}
body.surface-glass .apv-card {
  background: color-mix(in srgb, var(--c-accent) 8%, var(--c-bg-1));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
body.surface-frosted .apv-card { backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
body.border-hairline .apv-card { border-width: 1px; }
body.border-bold .apv-card { border-width: 2px; }

.apv-card-head {
  height: 9px; width: 42%; border-radius: 999px;
  background: var(--c-accent);
  transition: background var(--med) ease;
}
.apv-line {
  height: 5px; border-radius: 999px;
  background: color-mix(in srgb, var(--c-text) 16%, transparent);
  width: 88%;
  transition: background var(--med) ease;
}
.apv-line-short { width: 60%; }


.apv-card-foot {
  display: flex; align-items: center; gap: 9px;
  margin-top: 3px;
}
.apv-toggle {
  flex: 0 0 auto;
  width: 32px; height: 18px; border-radius: 999px;
  background: var(--c-switch, var(--c-accent));
  border: 1px solid color-mix(in srgb, var(--c-switch, var(--c-accent)) 40%, transparent);
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.25);
  transition: background var(--med) ease, border-color var(--med) ease, border-radius var(--med) var(--ease);
}
.apv-toggle::after {
  content: ''; position: absolute; top: 1px; left: 14px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
  transition: transform var(--med) var(--ease), border-radius var(--med) var(--ease);
}
.apv-input {
  flex: 1 1 auto; min-width: 0;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--c-border-hi);
  border-radius: var(--r-sm);
  background: var(--c-bg-2);
  color: var(--c-text);
  font: inherit; font-size: 10.5px; font-family: var(--op-mono, "JetBrains Mono", monospace);
  letter-spacing: .02em;
  transition: border-color var(--med) ease, border-radius var(--med) var(--ease), background var(--med) ease;
}
.apv-input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-accent) 22%, transparent); }
body.border-hairline .apv-input { border-width: 1px; }
body.border-bold .apv-input { border-width: 2px; }


.apv-button {
  flex: 0 0 auto;
  height: 26px; padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid color-mix(in srgb, var(--c-accent) 38%, transparent);
  background: color-mix(in srgb, var(--c-accent) 20%, transparent);
  color: var(--c-text);
  font: inherit; font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
  cursor: default;
  transition: background var(--med) ease, border-radius var(--med) var(--ease), box-shadow var(--med) ease, border-color var(--med) ease;
}
body.btn-style-flat .apv-button {
  background: color-mix(in srgb, var(--c-accent) 26%, transparent);
  box-shadow: none;
}
body.btn-style-glass .apv-button {
  background: color-mix(in srgb, var(--c-accent) 12%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
body.glow-subtle .apv-button { box-shadow: 0 0 10px color-mix(in srgb, var(--c-accent) 24%, transparent); }
body.glow-normal .apv-button { box-shadow: 0 0 16px color-mix(in srgb, var(--c-accent) 34%, transparent); }
body.glow-strong .apv-button { box-shadow: 0 0 26px color-mix(in srgb, var(--c-accent) 52%, transparent); }
body.glow-strong .apv-card { box-shadow: var(--shadow-md), 0 0 0 1px color-mix(in srgb, var(--c-accent) 14%, transparent); }


.apv-type {
  font-size: calc(13px * var(--ui-font-scale, 1));
  font-weight: 600; color: var(--c-text);
  letter-spacing: -.01em;
  transition: color var(--med) ease;
}
body.contrast-high .apv-type { color: #fff; }
body.theme-light.contrast-high .apv-type { color: #000; }

@media (max-width: 560px) {
  .apv { flex-wrap: wrap; }
  .apv-sidebar { flex-direction: row; flex: 1 1 100%; width: 100%; border-right: 0; border-bottom: 1px solid var(--c-line); padding: 8px 12px; }
}


.app-zone { display: grid; gap: 0; }

.appearance-panel .app-zone > .bypass-sec-head { margin-bottom: var(--sp-2); }
.appearance-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: var(--sp-4);
  align-items: center;
  padding: calc(var(--sp-3) * 1.2) 0;
  border-top: 1px solid var(--c-line);
}
.app-zone .appearance-row:first-of-type { border-top: 0; padding-top: 0; }
.appearance-row-label {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.appearance-row-title { font-size: 12.5px; font-weight: 700; color: var(--c-text); line-height: 1.3; }
.appearance-row-sub { font-size: 11px; color: var(--c-muted); line-height: 1.4; }
.appearance-row-ctrl {
  display: flex; align-items: center; gap: var(--sp-3);
  justify-content: flex-end;
  min-width: 0;
}
.appearance-row-ctrl--wrap { flex-wrap: wrap; justify-content: flex-start; }
.appearance-row--nested { padding: var(--sp-3) 0 0; border-top: 0; }
.app-zone .appearance-row--nested:first-of-type { padding-top: var(--sp-3); }


.app-fold {
  margin-top: var(--sp-2);
  border-top: 1px solid var(--c-line);
  padding-top: var(--sp-2);
}
.app-fold > summary {
  cursor: pointer;
  list-style: none;
  display: flex; align-items: baseline; gap: var(--sp-2);
  padding: var(--sp-2) 0;
  font-size: 12px; font-weight: 700; color: var(--c-text);
  transition: color var(--fast) ease;
}
.app-fold > summary::-webkit-details-marker { display: none; }
.app-fold > summary::after {
  content: '▾'; margin-left: auto; font-size: 10px; color: var(--c-dim);
  transition: transform var(--fast) ease;
}
.app-fold[open] > summary::after { transform: rotate(180deg); }
.app-fold-hint { font-size: 11px; font-weight: 400; color: var(--c-muted); }
.app-fold > summary:hover { color: var(--c-accent); }

@media (max-width: 680px) {
  .appearance-row { grid-template-columns: 1fr; gap: var(--sp-2); }
  .appearance-row-ctrl { justify-content: flex-start; }
}


.theme-swatches {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.theme-swatch {
  width: 30px; height: 30px;
  border-radius: 50%;
  background-color: var(--sw-color, #5b8cff);
  border: 2.5px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: transform .16s var(--ease), border-color .16s ease, box-shadow .16s ease;
}
.theme-swatch::after {
  content: '';
  position: absolute; inset: -5px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color .16s ease;
  pointer-events: none;
}
.theme-swatch:hover {
  transform: scale(1.12);
  border-color: rgba(255,255,255,.35);
}
.theme-swatch.is-active {
  border-color: rgba(255,255,255,.8);
  transform: scale(1.1);
  box-shadow: 0 0 0 3px rgba(255,255,255,.1), 0 0 16px var(--sw-color, #5b8cff);
}
.theme-swatch.is-active::after {
  border-color: rgba(255,255,255,.18);
}

.theme-swatch.is-theme-active {
  border-color: rgba(255,255,255,.55);
  box-shadow: 0 0 0 2px rgba(255,255,255,.12), 0 0 12px var(--sw-color, var(--c-accent));
}


.appearance-options {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.appearance-opt {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-line-hi);
  background: color-mix(in srgb, var(--c-bg-0) 60%, transparent);
  color: var(--c-muted);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: all var(--fast) ease;
  white-space: nowrap;
}


.appearance-options--visual { gap: 8px; }
.appearance-opt.opt-shape {
  flex-direction: column; gap: 6px;
  height: auto; min-width: 60px;
  padding: 8px 10px 7px;
}
.appearance-opt.opt-shape .opt-glyph {
  width: 26px; height: 20px;
  display: block;
  transition: border-radius var(--med) var(--ease), box-shadow var(--med) ease,
              background var(--med) ease, border-color var(--med) ease;
}
.appearance-opt.opt-shape .opt-label {
  font-size: 10px; font-weight: 600; letter-spacing: .02em;
  color: var(--c-muted);
  transition: color var(--fast) ease;
}
.appearance-opt.opt-shape.is-active .opt-label { color: var(--c-text); }


.opt-glyph--r-sharp  { border-radius: 1px;  background: color-mix(in srgb, var(--c-accent) 30%, transparent); border: 1px solid color-mix(in srgb, var(--c-accent) 50%, transparent); }
.opt-glyph--r-soft   { border-radius: var(--r-sm); background: color-mix(in srgb, var(--c-accent) 30%, transparent); border: 1px solid color-mix(in srgb, var(--c-accent) 50%, transparent); }
.opt-glyph--r-round  { border-radius: var(--r-md); background: color-mix(in srgb, var(--c-accent) 30%, transparent); border: 1px solid color-mix(in srgb, var(--c-accent) 50%, transparent); }
.opt-glyph--r-pill   { border-radius: 999px; background: color-mix(in srgb, var(--c-accent) 30%, transparent); border: 1px solid color-mix(in srgb, var(--c-accent) 50%, transparent); }


.opt-glyph--c-flat     { background: var(--c-bg-2); border: 1px solid var(--c-line); box-shadow: none; }
.opt-glyph--c-bordered { background: var(--c-bg-2); border: 1px solid var(--c-border-hi); box-shadow: none; }
.opt-glyph--c-elevated { background: var(--c-bg-2); border: 1px solid var(--c-border-hi); box-shadow: 0 4px 10px rgba(0,0,0,.5); }


.opt-glyph--s-solid   { background: var(--c-bg-2); border: 1px solid var(--c-line); }
.opt-glyph--s-frosted { background: color-mix(in srgb, var(--c-bg-2) 70%, transparent); backdrop-filter: blur(3px); border: 1px solid var(--c-line); }
.opt-glyph--s-glass   { background: color-mix(in srgb, var(--c-accent) 14%, transparent); backdrop-filter: blur(4px); border: 1px solid color-mix(in srgb, var(--c-accent) 30%, transparent); }


.opt-glyph--b-hairline { background: transparent; border: 1px solid var(--c-border-hi); }
.opt-glyph--b-normal   { background: transparent; border: 1px solid var(--c-border-hi); border-width: 1.5px; }
.opt-glyph--b-bold     { background: transparent; border: 2px solid var(--c-border-hi); }


.opt-glyph--f-flat  { background: color-mix(in srgb, var(--c-accent) 26%, transparent); border: 1px solid color-mix(in srgb, var(--c-accent) 40%, transparent); border-radius: var(--r-xs); box-shadow: none; }
.opt-glyph--f-glass { background: color-mix(in srgb, var(--c-accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c-accent) 30%, transparent); border-radius: var(--r-xs); box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }


.appearance-opt.opt-shape.is-active .opt-glyph { border-color: var(--c-accent); }
.appearance-opt.opt-shape.is-active .opt-glyph--c-elevated { box-shadow: 0 4px 12px color-mix(in srgb, var(--c-accent) 30%, transparent); }


.toast-pos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  max-width: 240px;
}
.toast-pos-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  padding: 10px 6px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-line-hi);
  background: color-mix(in srgb, var(--c-bg-0) 60%, transparent);
  color: var(--c-muted);
  cursor: pointer;
  transition: all var(--fast) ease;
}
.toast-pos-btn span { font-size: 18px; line-height: 1; }
.toast-pos-btn small { font-size: 9px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.toast-pos-btn:hover {
  border-color: var(--c-border-hi); background: color-mix(in srgb, var(--c-accent) 10%, transparent); color: var(--c-text);
}
.toast-pos-btn.is-active {
  border-color: var(--c-accent);
  background: color-mix(in srgb, var(--c-accent) 18%, transparent);
  color: var(--c-text);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-accent) 14%, transparent);
}


.appearance-shortcut-card { grid-column: 1 / -1; }


body.theme-light {
  
  --c-bg:      #faf9f7;   
  --c-bg-0:    #f3f1ed;   
  --c-bg-1:    #ffffff;   
  --c-bg-2:    #f3f1ed;   
  --c-bg-3:    #eceae5;   
  --c-surface: #ffffff;
  --c-surface-hi: #faf9f7;
  --c-glass:   #ffffff;

  
  --c-text:    #1c1a17;   
  --c-muted:   #5c5852;   
  --c-dim:     #8a857c;   
  --c-text-dim:#8a857c;   

  
  --c-line:      #ece9e4;
  --c-line-hi:   #e0ddd6;
  
  --c-border:    #e2dfd8;
  --c-border-hi: #d4d0c7;

  
  --shadow-sm: 0 1px 2px rgba(60,50,40,.06), 0 1px 3px rgba(60,50,40,.05);
  --shadow-md: 0 4px 12px rgba(60,50,40,.08), 0 2px 4px rgba(60,50,40,.05);
  --shadow-lg: 0 12px 28px rgba(60,50,40,.12), 0 4px 8px rgba(60,50,40,.06);

  
  --glow-blue:  0 0 0 0 transparent;
  --glow-green: 0 0 0 0 transparent;
  --glow-btn:   0 0 0 0 transparent;
}

body.theme-light .card::before { display: none; }
body.theme-light .card {
  background: var(--c-bg-1);
  border-color: var(--c-border);
}

body.theme-light .appearance-opt,
body.theme-light .toast-pos-btn {
  background: rgba(60,50,40,.04);
  border-color: var(--c-line-hi);
  color: var(--c-muted);
}
body.theme-light .appearance-opt:hover,
body.theme-light .toast-pos-btn:hover {
  background: color-mix(in srgb, var(--c-accent) 10%, transparent);
  color: var(--c-text);
}
body.theme-light .appearance-opt.is-active,
body.theme-light .toast-pos-btn.is-active {
  background: color-mix(in srgb, var(--c-accent) 14%, transparent);
  border-color: var(--c-accent);
  color: var(--c-text);
}

body.theme-light .opt-glyph--c-flat,
body.theme-light .opt-glyph--c-bordered,
body.theme-light .opt-glyph--c-elevated,
body.theme-light .opt-glyph--s-solid,
body.theme-light .opt-glyph--s-frosted { background: var(--c-bg-2); border-color: var(--c-border-hi); }
body.theme-light .opt-glyph--c-elevated { box-shadow: 0 4px 10px rgba(60,50,40,.14); }
body.theme-light .opt-glyph--s-glass { background: color-mix(in srgb, var(--c-accent) 14%, var(--c-bg-1)); }
body.theme-light .opt-glyph--b-hairline,
body.theme-light .opt-glyph--b-normal,
body.theme-light .opt-glyph--b-bold { border-color: var(--c-border-hi); }

body.theme-light .theme-preset-btn {
  background: var(--c-bg-1);
  border-color: var(--c-border);
  color: var(--c-text);
}

body.theme-light .apv {
  background: var(--c-bg);
  border-color: var(--c-line-hi);
  box-shadow: var(--shadow-md);
}
body.theme-light .apv-sidebar { background: var(--c-bg-1); border-right-color: var(--c-line); }
body.theme-light .apv-header { background: var(--c-bg-2); border-bottom-color: var(--c-line); }
body.theme-light .apv-card { background: var(--c-bg-1); border-color: var(--c-border); box-shadow: var(--shadow-sm); }
body.theme-light.density-default .apv-card,
body.theme-light .apv-card { box-shadow: 0 1px 2px rgba(60,50,40,.06); }
body.theme-light.cardstyle-elevated .apv-card { box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in srgb, var(--c-accent) 12%, transparent); }
body.theme-light .apv-line { background: color-mix(in srgb, var(--c-text) 14%, transparent); }
body.theme-light .apv-input { background: var(--c-bg-2); border-color: var(--c-border-hi); color: var(--c-text); }
body.theme-light .apv-button { color: var(--c-text); }
body.theme-light.bg-ambient .apv {
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--c-accent) 8%, transparent), transparent 60%),
    radial-gradient(120% 80% at 100% 100%, color-mix(in srgb, var(--c-accent) 5%, transparent), transparent 60%),
    var(--c-bg);
}
body.theme-light.bg-grid .apv {
  background:
    linear-gradient(color-mix(in srgb, var(--c-text) 6%, transparent) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(90deg, color-mix(in srgb, var(--c-text) 6%, transparent) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--c-bg);
}

body.theme-light .bypass-sec.is-high {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(243,241,237,.6));
  border-color: var(--c-line-hi);
}
body.theme-light .bypass-sec.is-med .algo-mode-panel,
body.theme-light .bypass-sec.is-med .card { background: rgba(255,255,255,.55); }

body.theme-light .theme-swatch:hover { border-color: rgba(28,26,23,.4); }
body.theme-light .theme-swatch.is-active {
  border-color: rgba(28,26,23,.8);
  box-shadow: 0 0 0 3px rgba(28,26,23,.08), 0 0 16px var(--sw-color, var(--c-accent));
}



body.theme-light .card { background: color-mix(in srgb, var(--c-accent) 5%, var(--c-bg-1)); }
body.theme-light .card:hover { background: color-mix(in srgb, var(--c-accent) 9%, var(--c-bg-1)); }
body.theme-light .side-card { background: color-mix(in srgb, var(--c-accent) 4%, var(--c-bg-1)); }
body.theme-light .rule-card,
body.theme-light .gateway-card {
  background: color-mix(in srgb, var(--c-accent) 5%, var(--c-bg-1));
  border-color: color-mix(in srgb, var(--c-accent) 22%, var(--c-border));
}
body.theme-light .rule-card:hover,
body.theme-light .gateway-card:hover { background: color-mix(in srgb, var(--c-accent) 10%, var(--c-bg-1)); }
body.theme-light .gateway-card.is-disabled { background: var(--c-bg-2); }
body.theme-light .list-item,
body.theme-light .snapshot-grid > div { background: color-mix(in srgb, var(--c-accent) 4%, var(--c-bg-1)); }

body.theme-light .insight-pill { background: none; }
body.theme-light .kpi-grid > .card { background: color-mix(in srgb, var(--c-accent) 5%, var(--c-bg-1)); }


body.theme-light .bypass-master { background: var(--c-bg-1); }
body.theme-light .bypass-master.is-on {
  background:
    radial-gradient(130% 180% at 0% 0%, color-mix(in srgb, var(--c-accent) 12%, transparent), transparent 55%),
    var(--c-bg-1);
}
body.theme-light .bypass-master-icon { background: color-mix(in srgb, var(--c-accent) 8%, var(--c-bg-2)); }


body.theme-light .gw-step-pill.is-ready {
  color: color-mix(in srgb, var(--c-green) 55%, var(--c-text));
  background: color-mix(in srgb, var(--c-green) 12%, transparent);
}
body.theme-light .gw-step-pill.is-active {
  color: color-mix(in srgb, var(--c-blue) 62%, var(--c-text));
  background: color-mix(in srgb, var(--c-blue) 12%, transparent);
}


body.theme-light .bypass-sec.is-premium {
  background:
    linear-gradient(155deg, rgba(232,183,101,.16) 0%, transparent 55%),
    var(--c-bg-1);
  border-color: rgba(176,132,42,.42);
}
body.theme-light .bypass-sec.is-premium .bypass-sec-head {
  border-color: rgba(176,132,42,.40);
  background:
    linear-gradient(135deg, rgba(232,183,101,.26), rgba(232,183,101,.08) 70%),
    rgba(255,255,255,.5);
}
body.theme-light .bypass-sec.is-premium .bypass-sec-eyebrow,
body.theme-light .bypass-premium-marker { color: #8a641a; }
body.theme-light .bypass-sec.is-premium .bypass-sec-hint { color: #7a5713; }
body.theme-light .bypass-sec.is-premium .card {
  background: rgba(255,255,255,.6);
  border-color: rgba(176,132,42,.2);
}




body.btn-style-flat .btn:not(.ghost):not(.danger) {
  background: color-mix(in srgb, var(--c-accent) 22%, transparent);
  box-shadow: none;
  border-color: color-mix(in srgb, var(--c-accent) 35%, transparent);
}
body.btn-style-flat .btn:not(.ghost):not(.danger):hover {
  background: color-mix(in srgb, var(--c-accent) 32%, transparent);
  box-shadow: none;
  transform: none;
}
body.btn-style-glass .btn:not(.ghost):not(.danger) {
  background: color-mix(in srgb, var(--c-accent) 10%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: color-mix(in srgb, var(--c-accent) 35%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
body.btn-style-glass .btn:not(.ghost):not(.danger):hover {
  background: color-mix(in srgb, var(--c-accent) 20%, transparent);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05);
}


body.cardstyle-flat .card {
  background: var(--c-bg-1);
  border-color: rgba(255,255,255,.06);
  box-shadow: none;
}
body.cardstyle-flat .card::before { display: none; }
body.cardstyle-flat .card:hover {
  border-color: rgba(255,255,255,.12);
  box-shadow: none;
}
body.cardstyle-bordered .card {
  border-color: var(--c-border-hi);
}
body.cardstyle-elevated .card {
  border-color: var(--c-border-hi);
  box-shadow: var(--shadow-lg, 0 14px 40px rgba(0,0,0,.56)), 0 0 0 1px color-mix(in srgb, var(--c-accent) 14%, transparent);
}
body.cardstyle-elevated .card:hover {
  border-color: var(--c-accent);
  box-shadow: var(--shadow-lg, 0 18px 50px rgba(0,0,0,.62)), 0 0 0 1px color-mix(in srgb, var(--c-accent) 28%, transparent);
}


body.glow-none   .btn:not(.ghost):not(.danger) { box-shadow: none; }
body.glow-subtle .btn:not(.ghost):not(.danger) { box-shadow: 0 0 10px color-mix(in srgb, var(--c-accent) 18%, transparent); }
body.glow-normal .btn:not(.ghost):not(.danger) { box-shadow: 0 0 16px color-mix(in srgb, var(--c-accent) 30%, transparent); }
body.glow-strong .btn:not(.ghost):not(.danger) { box-shadow: 0 0 26px color-mix(in srgb, var(--c-accent) 50%, transparent); }
body.glow-strong .card { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c-accent) 14%, transparent), var(--shadow-md, 0 10px 34px rgba(0,0,0,.52)); }



.diagnostics-panel {
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  background: var(--c-bg-0);
  padding: 12px; border-radius: var(--r-md);
  overflow-y: auto; max-height: 220px;
  line-height: 1.6; color: #b0d8c4;
  text-shadow: 0 0 6px rgba(34,197,94,.15);
  border: 1px solid rgba(100,130,180,.08);
  overscroll-behavior: contain; scrollbar-gutter: stable;
}

.diagnostics-shell { display: grid; gap: 14px; }
.diag-block {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--c-bg-0) 72%, transparent);
  padding: 14px;
}
.diag-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.diag-head strong { font-size: 12px; letter-spacing: .03em; color: var(--c-text); }
.diagnostics-grid { display: grid; gap: 8px; }
.diag-metric {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 9px 12px;
  border-radius: var(--r-sm); border: 1px solid var(--c-border);
  background: color-mix(in srgb, var(--c-bg-0) 88%, transparent);
}
.diag-metric span { color: var(--c-dim); font-size: 11px; }
.diag-metric strong { color: var(--c-text); font-size: 12px; }

.diag-feed { display: grid; gap: 8px; max-height: 220px; overflow-y: auto; padding-right: 2px; min-height: 220px; }
.diag-feed-item {
  display: grid; gap: 4px; padding: 10px; border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: color-mix(in srgb, var(--c-bg-0) 88%, transparent);
}
.diag-feed-item strong { font-size: 12px; color: var(--c-text); }
.diag-feed-item span  { font-size: 11px; color: var(--c-muted); word-break: break-word; }
.diag-feed-item code  {
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 10px; color: #c4d8ff;
}



.analytics-panel {
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 18px; margin-bottom: 18px;
  background: var(--c-bg-0);
}
.analytics-header { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--c-text); letter-spacing: .01em; }
.analytics-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.stat { flex: 1; min-width: 80px; text-align: center; }
.stat span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--c-dim); }
.stat strong { display: block; font-size: 22px; font-weight: 700; margin-top: 8px; color: var(--c-text); letter-spacing: -.03em; }

.analytics-list { display: grid; gap: 0; }
.analytics-item {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; padding: 9px 10px;
  border-bottom: 1px solid var(--c-line);
  font-size: 12px;
  border-radius: var(--r-sm);
  transition: background var(--fast) ease;
}
.analytics-item:hover { background: rgba(34,197,94,.05); }
.analytics-item:last-child { border-bottom: 1px solid var(--c-line); }
.analytics-item > div { display: grid; gap: 3px; min-width: 0; }
.analytics-item strong { color: var(--c-text); font-size: 12px; }
.analytics-item .item-sub { font-size: 11px; color: var(--c-muted); }

.analytics-band { display: grid; gap: 12px; margin-bottom: 16px; }
.analytics-meter {
  position: relative; height: 10px; border-radius: 999px; overflow: hidden;
  background: rgba(100,130,180,.14);
  border: 1px solid rgba(100,130,180,.14);
}
.analytics-meter-bar {
  width: 0; height: 100%; border-radius: inherit;
  background: var(--c-bg-0);
  box-shadow: 0 0 20px rgba(34,197,94,.22);
  transition: width .4s var(--ease);
}

.analytics-highlights {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px;
}
.analytics-highlight {
  padding: 10px 12px; border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-bg-0);
}
.analytics-highlight span { display: block; color: var(--c-dim); font-size: 10px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.analytics-highlight strong { display: block; color: var(--c-text); font-size: 14px; }

.analytics-columns { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.analytics-section { min-width: 0; display: grid; gap: 10px; }
.analytics-subhead { color: var(--c-dim); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }

.analytics-suggestions, .analytics-list, .diag-feed { display: grid; gap: 10px; }
.analytics-suggestions > * {
  min-height: 52px; padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-bg-0);
  display: flex; align-items: center;
  color: var(--c-muted); font-size: 12px;
}

.suggestion { padding: 8px; margin-bottom: 6px; border-radius: 6px; font-size: 12px; border: 1px solid rgba(255,255,255,.08); color: var(--c-muted); }
.suggestion.error   { background: rgba(255,80,80,.08); }
.suggestion.warning { background: rgba(255,165,0,.08); }
.suggestion.info    { background: rgba(34,197,94,.08); }



.runtime-toggle-row, .setting-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--c-line);
  transition: background var(--fast) ease;
}
.runtime-toggle-row:last-child, .setting-row:last-child { border-bottom: 0; }
.setting-row:hover,
.runtime-toggle-row:hover {
  background: rgba(34,197,94,.04);
  box-shadow: inset 0 0 0 1px rgba(34,197,94,.07);
  border-radius: var(--r-sm);
}
.compact-toggle-row { margin-top: 2px; }
.toggle-stack { gap: 0; }
.toggle-stack-label { display: block; font: 700 9.5px/1 var(--op-mono, ui-monospace, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--c-dim); padding: 14px 0 4px 2px; }
.toggle-stack-label:first-child { padding-top: 2px; }


.panel[data-panel="bypasser"] .runtime-toggle-row {
  padding: var(--sp-3) 2px;
  margin: 0 -2px;
}
.panel[data-panel="bypasser"] .runtime-toggle-row:hover {
  background: rgba(34,197,94,.05);
}
@media (prefers-reduced-motion: no-preference) {
  .panel[data-panel="bypasser"] .runtime-toggle-row,
  .panel[data-panel="bypasser"] .toggle-slider,
  .panel[data-panel="bypasser"] .input-group input,
  .panel[data-panel="bypasser"] .input-group textarea {
    transition-duration: .15s;
  }
}

.setting-copy { display: grid; gap: 4px; min-width: 0; }
.setting-copy strong { font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--c-text); }
.setting-copy small  { color: var(--c-dim); font-size: 11px; line-height: 1.4; }

.runtime-overview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 10px; }
.runtime-overview-item {
  padding: 12px; border-radius: var(--r-md);
  border: 1px solid var(--c-line);
  background: var(--c-bg-0);
}
.runtime-overview-item span { display: block; color: var(--c-dim); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.runtime-overview-item strong { display: block; font-size: 18px; font-weight: 700; color: var(--c-text); }



.feature-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}

.group { display: grid; gap: 12px; margin-bottom: 14px; }
.group-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  opacity: .7; color: var(--c-text);
}

.muted { margin: 10px 0 0; color: var(--c-muted); font-size: 12px; }

.footer-note {
  border-top: 1px solid var(--c-line);
  padding: 12px 26px;
  color: var(--c-muted); font-size: 12px;
  background: color-mix(in srgb, var(--c-bg-0) 96%, transparent);
}

pre {
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--c-bg-0) 96%, transparent);
  color: var(--c-muted); padding: 10px;
  white-space: pre-wrap;
  max-height: 260px; overflow: auto;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
}




@media (min-width: 1200px) {
  .app { grid-template-columns: 276px minmax(0, 1fr); }
  .panel { padding-left: 30px; padding-right: 30px; }
  .topbar { padding-left: 30px; padding-right: 30px; }
}


@media (min-width: 1440px) {
  .app { grid-template-columns: 288px minmax(0, 1fr); }
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .snapshot-grid { grid-template-columns: 1fr 1fr; }
}


@media (min-width: 1700px) {
  .panel { padding-left: 40px; padding-right: 40px; }
  .topbar { padding-left: 40px; padding-right: 40px; }
  .settings-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.button-group { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }


.settings-recovery-card { display: grid; gap: 12px; }
.settings-recovery-card .recovery-grid {
  display: grid; grid-template-columns: minmax(0,1fr); gap: 12px;
}
@media (min-width: 980px) {
  .settings-recovery-card .recovery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.settings-recovery-card .recovery-lane {
  border: 1px solid var(--c-line-hi);
  border-radius: var(--r-md);
  background: var(--c-bg-0);
  padding: 14px; display: grid; gap: 10px;
}
.settings-recovery-card .recovery-lane-danger {
  border-color: rgba(255,95,114,.28);
  background: var(--c-bg-0);
}
.settings-recovery-card .recovery-lane-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.settings-recovery-card .recovery-lane-head h4 { margin: 0; font-size: 13px; font-weight: 700; }
.settings-recovery-card .recovery-primary-actions .btn { flex: 1 1 160px; }
.settings-recovery-card .settings-reset-list { gap: 9px; }
.settings-recovery-card .settings-reset-list .btn.danger { width: 100%; justify-content: center; }
.settings-recovery-card .recovery-footnote { margin: -2px 0 0; font-size: 11px; }


.bin-metric + .bin-metric { margin-top: 0; }


.algo-mode-panel {
  margin-top: 10px; padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(34,197,94,.18);
  background: var(--c-bg-0);
  display: grid; gap: 8px;
}
.algo-mode-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.algo-mode-head strong { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #d8e8ff; }
.algo-mode-switch { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.algo-mode-btn { min-height: 34px; }
.algo-mode-btn.is-active {
  border-color: rgba(34,197,94,.5);
  background: rgba(34,197,94,.16);
  color: #cdfff0;
}

.algo-bin-route {
  display: grid; gap: 8px; padding: 8px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(34,197,94,.16);
  background: color-mix(in srgb, var(--c-bg-0) 56%, transparent);
}
.algo-bin-route-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.algo-bin-route-head strong { font-size: 11px; font-weight: 700; letter-spacing: .03em; color: #ccd8f0; }
.algo-bin-route-switch { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.algo-bin-route-btn { min-height: 30px; font-size: 12px; }
.algo-bin-route-btn.is-active {
  border-color: rgba(34,197,94,.5);
  background: rgba(34,197,94,.16);
  color: #cdfff0;
}
.algo-bin-route-hint { margin: 0; font-size: 11px; }

.algo-bin-tray {
  display: grid; gap: 8px; padding: 8px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(34,197,94,.14);
  background: color-mix(in srgb, var(--c-bg-0) 58%, transparent);
}
.algo-bin-row { display: grid; gap: 8px; }
.algo-bin-actions .btn { min-height: 30px; }
.algo-bin-actions .algo-bin-count { margin-left: auto; white-space: nowrap; }
.algo-bin-list { display: grid; gap: 6px; }
.algo-bin-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; border: 1px solid rgba(34,197,94,.18);
  background: color-mix(in srgb, var(--c-bg-0) 58%, transparent);
  border-radius: var(--r-sm); padding: 6px 10px; font-size: 11px;
}
.algo-bin-item-label { color: #8096b8; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }
.algo-bin-empty { margin: 0; font-size: 11px; }

.algo-cc-tray { display: grid; gap: 8px; }
.algo-cc-tray .input-group textarea, .algo-bin-tray .input-group textarea {
  min-height: 70px; max-height: 130px; resize: vertical;
}
.algo-cc-actions .btn { min-height: 30px; }
.algo-cc-actions .algo-cc-count { margin-left: auto; white-space: nowrap; }
.algo-cc-queue { display: grid; gap: 6px; }
.algo-cc-item {
  display: grid;
  grid-template-columns: 3px auto 1fr auto auto auto;
  align-items: center; gap: 9px;
  border: 1px solid rgba(120,150,190,.14);
  background: color-mix(in srgb, var(--c-bg-0) 60%, transparent);
  border-radius: var(--r-sm); padding: 7px 9px 7px 0; font-size: 11px;
  transition: border-color var(--fast) ease, background var(--fast) ease;
}
.algo-cc-item:hover { border-color: rgba(120,150,190,.28); background: color-mix(in srgb, var(--c-bg-1) 60%, transparent); }
.algo-cc-item-rail { width: 3px; align-self: stretch; border-radius: 3px; background: rgba(120,150,190,.25); }
.algo-cc-item.is-next {
  border-color: rgba(34,197,94,.4);
  background: rgba(14,46,54,.46);
}
.algo-cc-item.is-next .algo-cc-item-rail { background: linear-gradient(rgba(34,197,94,.9), rgba(34,197,94,.4)); }
.algo-cc-item-meta { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.algo-cc-item-label { color: #8096b8; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; font-weight: 600; }
.algo-cc-item-chip {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: #22c55e; background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.25);
  border-radius: 999px; padding: 1px 6px;
}
.algo-cc-item-pan { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 12px; color: var(--c-text); letter-spacing: .02em; }
.algo-cc-item-exp { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 10.5px; color: var(--c-dim); }
.algo-cc-item-cvv { font-size: 9.5px; color: var(--c-dim); letter-spacing: .03em; }
.algo-cc-item-del {
  cursor: pointer; flex: 0 0 auto; width: 18px; height: 18px; line-height: 1;
  border-radius: 5px; border: 0; background: transparent; color: var(--c-dim);
  font-size: 15px; transition: color var(--fast) ease, background var(--fast) ease;
}
.algo-cc-item-del:hover { color: var(--c-red); background: rgba(255,95,114,.12); }
.algo-cc-empty { margin: 0; font-size: 11px; }
.algo-mode-hint { margin: 0; font-size: 11px; }
@media (max-width: 480px) {
  .algo-cc-item { grid-template-columns: 3px auto 1fr auto auto; gap: 7px; }
  .algo-cc-item-cvv { display: none; }
}



.panel[data-panel="bypasser"] .input-group input,
.panel[data-panel="bypasser"] .input-group select {
  height: 34px;
  padding: 14px 12px 4px;
  border-color: var(--c-line-hi);
}
.panel[data-panel="bypasser"] .input-group input:hover,
.panel[data-panel="bypasser"] .input-group select:hover {
  border-color: var(--c-border-hi);
}
.panel[data-panel="bypasser"] .input-group input:focus,
.panel[data-panel="bypasser"] .input-group select:focus,
.panel[data-panel="bypasser"] .input-group textarea:focus {
  border-color: rgba(34,197,94,.55);
  box-shadow: 0 0 0 3px rgba(34,197,94,.1);
}
.panel[data-panel="bypasser"] .input-group label {
  font-size: 11px;
}

.panel[data-panel="bypasser"] .info-btn {
  transform: translateY(-1px);
}


.panel[data-panel="bypasser"] .bypass-sec {
  transition: border-color var(--med) ease, background var(--med) ease, box-shadow var(--med) ease, transform var(--fast) ease;
}

@media (prefers-reduced-motion: reduce) {
  .panel[data-panel="bypasser"] .runtime-toggle-row,
  .panel[data-panel="bypasser"] .toggle-slider,
  .panel[data-panel="bypasser"] .input-group input,
  .panel[data-panel="bypasser"] .input-group textarea,
  .panel[data-panel="bypasser"] .bypass-sec,
  .panel[data-panel="bypasser"] .bypass-master,
  .panel[data-panel="bypasser"] .bypass-master-icon {
    transition: none !important;
    animation: none !important;
  }
}




:where(.list-card .list, .console-box, .diagnostics-panel) {
  --sf: rgba(6,10,17,.92);
  position: relative;
}
:where(.list-card .list, .console-box, .diagnostics-panel)::before,
:where(.list-card .list, .console-box, .diagnostics-panel)::after {
  content: ''; position: absolute; left: 0; right: 0; height: 12px;
  pointer-events: none; z-index: 2;
}
:where(.list-card .list, .console-box, .diagnostics-panel)::before {
  top: 0; background: linear-gradient(var(--c-bg-0), transparent);
}
:where(.list-card .list, .console-box, .diagnostics-panel)::after {
  bottom: 0; background: linear-gradient(transparent, var(--c-bg-0));
}



* { scrollbar-width: thin; scrollbar-color: rgba(34,197,94,.18) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  min-height: 24px; border-radius: 999px;
  border: 1px solid transparent;
  background-clip: padding-box;
  background-color: rgba(34,197,94,.18);
}
*::-webkit-scrollbar-thumb:hover { background-color: rgba(34,197,94,.38); }



.sidebar-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.mobile-menu-btn, .sidebar-close, .mobile-nav-overlay { display: none; }
.mobile-menu-btn, .sidebar-close {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--c-line-hi);
  background: color-mix(in srgb, var(--c-bg-0) 92%, transparent);
  color: var(--c-text);
  border-radius: var(--r-md);
  min-height: 42px; padding: 0 14px;
  font: inherit; font-weight: 600;
  gap: 10px; align-items: center; justify-content: center; cursor: pointer;
}
.mobile-menu-icon,
.mobile-menu-icon::before,
.mobile-menu-icon::after {
  display: block; width: 16px; height: 2px;
  border-radius: 999px; background: currentColor; content: '';
}
.mobile-menu-icon { position: relative; }
.mobile-menu-icon::before, .mobile-menu-icon::after { position: absolute; left: 0; }
.mobile-menu-icon::before { top: -5px; }
.mobile-menu-icon::after  { top:  5px; }



.panel[data-panel="gateways"] .gateway-section,
.panel[data-panel="gateways"] .analyzer-panel,
.panel[data-panel="gateways"] .rules-collection-card {
  border-color: var(--c-border);
  background: var(--c-bg-0);
}
.panel[data-panel="gateways"] .gateway-pattern-help { color: #8a9cb8; }
.panel[data-panel="gateways"] .rules-collection-card .list { margin-top: 4px; min-height: 260px; gap: 9px; }
.panel[data-panel="gateways"] .gateway-card .gateway-pattern code { color: #9ab0cc; }
.panel[data-panel="gateways"] #gwPreviewResult { margin-top: 8px; }

.panel[data-panel="bins"] .bin-toolkit-card,
.panel[data-panel="bins"] .bin-data-card,
.panel[data-panel="bins"] .bin-history-card {
  border-color: var(--c-border);
  background: var(--c-bg-0);
}
.panel[data-panel="bins"] #activeBinLabel { color: #a4b8d0; }

.panel[data-panel="bypasser"] .bypass-summary-card {
  border-color: var(--c-border);
  background: var(--c-bg-0);
}
.panel[data-panel="bypasser"] .group-title { color: #c8d8f0; }
.panel[data-panel="bypasser"] .setting-copy small { color: #8a9cb8; }



body[data-section="dashboard"] .topbar {
  padding: 10px 22px;
  background: color-mix(in srgb, var(--c-bg-0) 60%, transparent);
}

body[data-section="dashboard"] .topbar-copy .topbar-sub-sep,
body[data-section="dashboard"] .topbar-copy #sectionSubtitle { display: none; }
.panel[data-panel="dashboard"] .card { border-radius: var(--r-lg); }
.panel[data-panel="dashboard"] .card::before { display: none; }
.panel[data-panel="dashboard"] .card-head h3 { font-size: 20px; letter-spacing: -.01em; }
.panel[data-panel="dashboard"] .card-copy { max-width: 48ch; color: #9ab0cc; }
.panel[data-panel="dashboard"] .dash-activity-card {
  margin-top: 14px;
  border-color: var(--c-border);
  background: var(--c-bg-0);
}
.panel[data-panel="dashboard"] #dashActivity {
  padding-left: 22px; display: grid; gap: 8px;
}
.panel[data-panel="dashboard"] #dashActivity .list-item {
  padding: 10px 12px;
  background: color-mix(in srgb, var(--c-bg-0) 65%, transparent);
}
.panel[data-panel="dashboard"] #dashActivity .item-title { font-size: 12px; font-weight: 500; color: #b8c8e0; }
.panel[data-panel="dashboard"] #dashActivity .pill { font-size: 10px; padding: 3px 8px; }



body .card { position: relative; overflow: hidden; }



body .topbar { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 10px 22px; }
body .topbar h2 { font-size: 16px; }
body .topbar p   { font-size: 11.5px; }
body .panel { padding: 8px 26px 24px; }

body .settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }

.panel[data-panel="dashboard"] .panel-grid.two {
  grid-template-columns: minmax(0,1.2fr) minmax(0,.85fr);
  gap: 14px;
}
.panel[data-panel="gateways"] .container-gateways {
  grid-template-columns: minmax(0,1.45fr) minmax(340px,.95fr);
}



.gateway-readonly-note { margin: 0; font-size: 12px; color: rgba(255,255,255,.48); }
.gateway-editor-layout.is-readonly .gateway-readonly-hidden { display: none !important; }



.bin-toolkit-card .btn.is-active,
.settings-panel .settings-ruleops-preset-row .btn.is-active { border-color: rgba(34,197,94,.65); background: rgba(34,197,94,.22); color: #d8eaff; }



html.has-anime #dashActivity .list-item {
  position: relative;
  transform: translateY(10px); opacity: 0;
}



@media (max-width: 1280px) {
  .topbar-insights { gap: 7px; }
  .quick-actions-grid { grid-template-columns: 1fr; }
  .panel[data-panel="gateways"] .container-gateways,
  .panel[data-panel="bins"] .bin-top-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  
  .panel[data-panel="bypasser"] .bypass-cols { column-count: 1; }
}

@media (max-width: 980px) {
  body { padding: 0; overflow: hidden; }
  body .app {
    grid-template-columns: 1fr;
    width: 100%; min-height: 100svh; height: 100svh;
    border: 0; border-radius: 0; box-shadow: none;
    background: var(--c-bg-1);
  }
  body .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: min(88vw, 320px); max-width: 320px;
    z-index: 70;
    transform: translateX(-108%);
    transition: transform .24s var(--ease), box-shadow .24s ease;
    pointer-events: none; visibility: hidden;
    border-right: 1px solid var(--c-border);
    border-bottom: 0;
    padding: calc(16px + env(safe-area-inset-top)) 16px calc(22px + env(safe-area-inset-bottom));
    overflow-y: auto; overscroll-behavior: contain;
  }
  body.mobile-nav-open .sidebar {
    transform: translateX(0);
    pointer-events: auto; visibility: visible;
    box-shadow: 28px 0 72px rgba(0,0,0,.5);
  }
  body .sidebar-header {
    position: sticky;
    top: calc(-16px - env(safe-area-inset-top));
    z-index: 2;
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-bottom: 10px;
    background: var(--c-bg-0);
  }
  body .mobile-nav-overlay {
    display: block; position: fixed; inset: 0; z-index: 60;
    border: 0; background: color-mix(in srgb, var(--c-bg-0) 60%, transparent);
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  body.mobile-nav-open .mobile-nav-overlay { opacity: 1; pointer-events: auto; }
  body .mobile-menu-btn, body .sidebar-close { display: inline-flex; }
  body .workspace {
    min-width: 0; min-height: 100svh; height: 100svh; border-left: 0;
    grid-template-rows: auto minmax(0,1fr) auto;
  }
  body .topbar {
    grid-template-columns: 1fr; gap: 10px; align-items: stretch;
    padding: calc(12px + env(safe-area-inset-top)) 16px 10px;
  }
  body .topbar-main {
    flex-wrap: wrap; align-items: center; column-gap: 11px; row-gap: 8px;
  }
  body .mobile-menu-btn { align-self: center; min-height: 36px; padding: 0 12px; }
  body .topbar-copy h2 { font-size: clamp(15px,4.5vw,17px); line-height: 1.15; }
  body .topbar-copy p,
  body .topbar-copy .topbar-sub-sep  { display: none; }            
  body .topbar-insights {
    display: flex; flex-wrap: wrap; gap: 4px 12px;
  }
  body .insight-pill { min-width: 0; min-height: 0; padding: 0; border-radius: 0; } 
  body .insight-pill strong { font-size: 12px; }
  body .top-actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: 7px; width: 100%; justify-content: flex-start;
  }
  body .top-actions > * { width: auto; }
  body .top-actions .btn { min-height: 34px; padding: 0 12px; }
  body .panel { padding: 10px 16px calc(24px + env(safe-area-inset-bottom)); }
  body .panel-grid.two, body .container-gateways,
  body .bin-top-row, body .bypass-top-row,
  body .settings-grid, body .analytics-columns,
  body .diagnostics-shell { grid-template-columns: 1fr; }
  
  body .panel[data-panel="dashboard"] .panel-grid.two,
  body .panel[data-panel="gateways"] .container-gateways { grid-template-columns: 1fr; }
  body .card { padding: 15px; border-radius: var(--r-lg); }
  body .quick-actions-grid { grid-template-columns: 1fr; }
  body .kpi-grid, body .bin-metrics, body .runtime-overview-grid, body .analytics-stats {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  body .settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  body .settings-grid > .settings-card:first-child,
  body .settings-grid > .settings-card:last-child { grid-column: 1 / -1; }
  body .footer-note { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  .settings-panel .settings-grid { grid-template-columns: 1fr; }
  .settings-panel .settings-control-card[data-control-group="runtime"],
  .settings-panel .settings-control-card[data-control-group="observability"] { grid-column: auto; }
  .deck-restore-btn { margin-left: 0; }
  .analytics-panel .analytics-columns { grid-template-columns: 1fr; }
  .algo-mode-switch { grid-template-columns: 1fr; }
  .panel[data-panel="gateways"] .gw-step-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-panel .compact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body .topbar { padding: calc(10px + env(safe-area-inset-top)) 14px 8px; gap: 8px; }
  body .topbar-copy h2 { font-size: clamp(15px,5vw,17px); }
  body .topbar-insights { gap: 4px 12px; }
  body .panel { padding: 8px 14px calc(20px + env(safe-area-inset-bottom)); }
  body .panel-grid.two, body .container-gateways,
  body .bin-top-row, body .bypass-top-row,
  body .settings-grid, body .analytics-columns,
  body .diagnostics-shell { grid-template-columns: 1fr; }
  body .settings-grid > .settings-card:first-child,
  body .settings-grid > .settings-card:last-child { grid-column: auto; }
  body .card, body .settings-card { padding: 14px; }
  body .setting-row, body .runtime-toggle-row { padding: 10px 0; }
  body .feature-row, body .button-group, body .gateway-toolbar, body .bin-toolbar, body .bin-actions { gap: 7px; }
}

@media (max-width: 560px) {
  body .topbar { gap: 9px; }
  body .topbar-copy h2 { font-size: clamp(15px,5vw,17px); }
  body .topbar-insights { display: flex; flex-wrap: wrap; gap: 4px 12px; }
  body .insight-pill { flex: 0 0 auto; min-height: 0; padding: 0; border-radius: 0; } 
  body .insight-pill strong { font-size: 12px; }
  body .top-actions { display: flex; flex-wrap: wrap; gap: 7px; }
  body .kpi-grid, body .snapshot-grid, body .bin-metrics, body .runtime-overview-grid, body .analytics-stats {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  
  body .gateway-card {
    grid-template-columns: 22px minmax(0,1fr);
    grid-auto-rows: min-content;
    gap: 8px 10px;
    padding: 10px 12px;
    align-items: start;
  }
  body .gateway-card .gw-select-wrap { grid-row: 1; grid-column: 1; margin-top: 2px; }
  body .gateway-card .gateway-head   { grid-row: 1; grid-column: 2; }
  
  body .gateway-card .gateway-pattern { grid-row: 2; grid-column: 1 / -1; }
  body .gateway-card .gateway-pattern code,
  body .gateway-card .gateway-pattern .gw-host {
    white-space: normal; word-break: break-all; overflow: visible;
  }
  
  body .gateway-card .gateway-meta-line { flex-wrap: wrap; gap: 5px; }
  body .gateway-card .gateway-id { white-space: normal; }
  body .gateway-card .gateway-id .item-title { white-space: normal; }
  
  body .gateway-card .gateway-actions {
    grid-row: 3; grid-column: 1 / -1;
    opacity: 1 !important; pointer-events: auto !important;
    display: flex; flex-wrap: wrap; gap: 6px;
    padding-top: 8px; margin-top: 2px;
    border-top: 1px solid var(--c-line, #1a2330);
  }
  body .gateway-card .gateway-actions .btn {
    flex: 1 1 auto; min-height: 34px; min-width: 72px;
  }
}

@media (max-width: 420px) {
  body .topbar { padding-left: 12px; padding-right: 12px; }
  body .panel { padding-left: 12px; padding-right: 12px; }
  body .snapshot-grid, body .kpi-grid, body .bin-metrics,
  body .runtime-overview-grid, body .analytics-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .setting-row, body .runtime-toggle-row { flex-direction: column; align-items: stretch; }
  body .setting-row .toggle, body .runtime-toggle-row .toggle { align-self: flex-end; }
}

@media (max-width: 360px) {
  body .kpi-grid, body .snapshot-grid, body .bin-metrics,
  body .runtime-overview-grid, body .analytics-stats { grid-template-columns: 1fr; }
}


.disclaimer-body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  padding: 24px;
  background: var(--c-bg, #03050a);
  color: var(--c-text, #e9eef7);
}
.disclaimer-shell { width: 100%; max-width: 560px; }
.disclaimer-card {
  display: grid; gap: 18px;
  padding: 26px;
  border-radius: var(--r-lg, 18px);
  border: 1px solid color-mix(in srgb, var(--c-accent) 22%, var(--c-line, #1a2330));
  background: color-mix(in srgb, var(--c-accent) 4%, #05080f);
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
.disclaimer-head { display: flex; align-items: center; gap: 16px; }

.disclaimer-logo { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 14px; overflow: hidden; }
.disclaimer-head-copy { display: grid; gap: 3px; min-width: 0; }
.disclaimer-kicker {
  justify-self: start;
  font: 700 9.5px/1 ui-monospace, "JetBrains Mono", monospace; letter-spacing: .16em; text-transform: uppercase;
  color: var(--c-accent, #22c55e);
  background: color-mix(in srgb, var(--c-accent, #22c55e) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-accent, #22c55e) 30%, transparent);
  padding: 4px 8px; border-radius: 6px; margin-bottom: 3px;
}
.disclaimer-head h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.disclaimer-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--c-muted, #93a4bd); }
.disclaimer-scroll {
  max-height: 46vh; overflow-y: auto;
  display: grid; gap: 12px;
  padding: 16px; border-radius: var(--r-md, 12px);
  border: 1px solid var(--c-line, #1a2330);
  background: color-mix(in srgb, var(--c-bg-0) 35%, transparent);
  font-size: 13px; line-height: 1.55; color: #c3d0e2;
}
.disclaimer-scroll p { margin: 0; }
.disclaimer-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.disclaimer-list li { font-size: 12.5px; line-height: 1.5; }
.disclaimer-fine { font-size: 12px; color: var(--c-muted, #93a4bd); }
.disclaimer-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.disclaimer-actions .btn { min-height: 40px; padding: 0 18px; }
.disclaimer-status { margin: 0; font-size: 12px; color: var(--c-muted, #93a4bd); text-align: right; min-height: 16px; }
.disclaimer-status.is-error { color: #ff8090; }
@media (max-width: 560px) {
  .disclaimer-card { padding: 18px; }
  .disclaimer-actions { justify-content: stretch; }
  .disclaimer-actions .btn { flex: 1 1 auto; }
  .disclaimer-scroll { max-height: 52vh; }
}


.ie-body {
  --ie-danger: #ff5c6c;
  background:
    radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--ie-danger) 12%, transparent), transparent 60%),
    var(--c-bg, #03050a);
}
.ie-card {
  border: 1px solid color-mix(in srgb, var(--ie-danger) 30%, var(--c-line, #1a2330));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ie-danger) 7%, transparent), transparent 40%),
    color-mix(in srgb, var(--ie-danger) 3%, #05080f);
  box-shadow: 0 24px 70px rgba(0,0,0,.6), inset 0 1px 0 color-mix(in srgb, var(--ie-danger) 14%, transparent);
}
.ie-logo {
  border: 1px solid color-mix(in srgb, var(--ie-danger) 42%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ie-danger) 22%, transparent), 0 0 22px -6px color-mix(in srgb, var(--ie-danger) 60%, transparent);
}
.ie-kicker {
  color: var(--ie-danger);
  background: color-mix(in srgb, var(--ie-danger) 12%, transparent);
  border-color: color-mix(in srgb, var(--ie-danger) 32%, transparent);
}
.ie-card #ieTitle { color: color-mix(in srgb, var(--ie-danger) 70%, var(--c-text, #e9eef7)); }
.ie-steps {
  margin: 2px 0 0;
  padding: 14px; border-radius: var(--r-md, 12px);
  border: 1px solid color-mix(in srgb, var(--ie-danger) 18%, var(--c-line, #1a2330));
  background: color-mix(in srgb, var(--ie-danger) 5%, transparent);
}
.ie-steps-title {
  margin: 0 0 10px; font: 700 10px/1 ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted, #93a4bd);
}
.ie-steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ie-steps-list li { display: flex; align-items: flex-start; gap: 11px; font-size: 12.5px; line-height: 1.5; color: #c3d0e2; }
.ie-step-n {
  flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px;
  display: grid; place-items: center; border-radius: 999px;
  font: 700 11px/1 ui-monospace, monospace;
  color: var(--ie-danger);
  background: color-mix(in srgb, var(--ie-danger) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--ie-danger) 34%, transparent);
}
.ie-steps-list code {
  font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 11.5px;
  padding: 1px 5px; border-radius: 5px;
  background: color-mix(in srgb, var(--ie-danger) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ie-danger) 22%, transparent);
}
.ie-warn {
  margin: 2px 0 0; padding: 12px 14px; border-radius: var(--r-md, 12px);
  font-size: 12.5px; line-height: 1.55; color: #e9d3d6;
  border: 1px solid color-mix(in srgb, var(--ie-danger) 40%, transparent);
  border-left: 3px solid var(--ie-danger);
  background: color-mix(in srgb, var(--ie-danger) 9%, transparent);
}
.ie-warn strong { color: color-mix(in srgb, var(--ie-danger) 75%, #fff); }


html, body { max-width: 100%; overflow-x: hidden; }
.app { max-width: 100vw; }
.workspace { min-width: 0; max-width: 100%; }
.topbar, .topbar-main, .topbar-copy, .panel { min-width: 0; }
.topbar-insights { min-width: 0; max-width: 100%; }
.insight-pill { min-width: 0; max-width: 100%; }
.insight-pill > span, .insight-pill > strong {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
@media (max-width: 980px) {
  
  body .topbar-insights {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  body .topbar-insights::-webkit-scrollbar { display: none; }
  body .insight-pill { flex: 0 0 auto; }
  
  body .card, body .settings-card, body .home-kpi,
  body .gateway-card, body .list-item { max-width: 100%; min-width: 0; }
  body .home-kpi-value, body .home-kpi-label, body .home-kpi-sub {
    overflow: hidden; text-overflow: ellipsis;
  }
  
  body .theme-swatches, body .theme-preset-rail, body .appearance-options { flex-wrap: wrap; }
  body .appearance-row-ctrl, body .appearance-row-ctrl > * { min-width: 0; max-width: 100%; }
}

@media (max-width: 680px) {
  .panel[data-panel="bypasser"] .bypass-master { flex-wrap: wrap; }
  .panel[data-panel="bypasser"] .bypass-log-filters .chip { min-width: 0; flex: 1 1 0; }
}



@keyframes pulse {
  0%   { transform: scale(1); opacity: 1; }
  70%  { transform: scale(1.7); opacity: 0; }
  100% { opacity: 0; }
}


:focus-visible { outline: 2px solid rgba(34,197,94,.55); outline-offset: 2px; }
button:focus-visible, a:focus-visible { outline: 2px solid rgba(34,197,94,.55); }


.gateway-engine-card { border-color: var(--c-border-hi); }

.gateway-log {
  margin-top: 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--c-bg-0) 50%, transparent);
  overflow: hidden;
}
.gateway-log-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--c-line);
  background: color-mix(in srgb, var(--c-bg-0) 55%, transparent);
}
.gateway-log-title {
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--c-muted);
}
.gateway-log-actions { display: flex; align-items: center; gap: 8px; }
.gateway-log-count {
  font-size: 10px; color: var(--c-dim);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.gateway-log-list {
  list-style: none; margin: 0; padding: 6px;
  display: grid; gap: 4px;
  max-height: 220px; overflow-y: auto;
}
.gateway-log-empty {
  margin: 0; padding: 14px 10px;
  font-size: 12px; color: var(--c-dim); text-align: center; line-height: 1.5;
}
.gateway-log-item {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 7px 9px;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--c-bg-0) 55%, transparent);
  border: 1px solid transparent;
  transition: background var(--fast) ease, border-color var(--fast) ease;
}
.gateway-log-item:hover { background: color-mix(in srgb, var(--c-bg-1) 70%, transparent); }
.gateway-log-dot {
  flex: 0 0 auto; width: 8px; height: 8px; margin-top: 5px;
  border-radius: 50%; background: var(--c-muted);
}
.gateway-log-item.level-error  { border-color: rgba(255, 95, 114, 0.28); }
.gateway-log-item.level-error  .gateway-log-dot { background: var(--c-red);   box-shadow: 0 0 8px rgba(255,95,114,.5); }
.gateway-log-item.level-warn   .gateway-log-dot { background: var(--c-amber); box-shadow: 0 0 8px rgba(255,184,77,.45); }
.gateway-log-item.level-info   .gateway-log-dot { background: var(--c-blue); }
.gateway-log-item.level-debug  .gateway-log-dot { background: var(--c-dim); }
.gateway-log-body { min-width: 0; flex: 1 1 auto; }
.gateway-log-msg {
  font-size: 12px; color: var(--c-text); line-height: 1.4;
  word-break: break-word;
}
.gateway-log-meta {
  margin-top: 2px;
  font-size: 10px; color: var(--c-dim);
  letter-spacing: .03em; font-variant-numeric: tabular-nums;
}




.appearance-presets-card { margin-bottom: 14px; }
.theme-preset-rail { display: flex; flex-wrap: wrap; gap: 9px; }
.theme-preset-btn {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 40px; padding: 0 14px 0 11px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border-hi);
  background: color-mix(in srgb, var(--c-bg-0) 70%, transparent);
  color: var(--c-text); font: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  transition: border-color var(--fast) ease, background var(--fast) ease, transform var(--fast) ease;
}
.theme-preset-btn:hover { border-color: var(--c-blue); background: rgba(34,197,94,.1); transform: translateY(-1px); }
.theme-preset-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(34,197,94,.4); }
.theme-preset-btn.is-active { border-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 14%, var(--c-bg-0)); box-shadow: 0 0 0 1px var(--c-accent) inset; }
.theme-preset-btn .tp-dot {
  width: 18px; height: 18px; border-radius: 50%; flex: 0 0 18px;
  background:
    radial-gradient(circle at 33% 28%, color-mix(in srgb, var(--tp-a) 90%, #fff), var(--tp-a) 52%, var(--tp-b));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 0 8px -1px color-mix(in srgb, var(--tp-a) 72%, transparent), 0 1px 3px rgba(0,0,0,.5);
}


.theme-more-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 16px;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--c-border-hi);
  background: transparent;
  color: var(--c-text-dim);
  font-family: inherit; font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: border-color .18s, color .18s, transform .15s, box-shadow .18s;
}
.theme-more-btn:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  transform: translateY(-1px);
  box-shadow: 0 0 14px -2px var(--c-blue-glow);
}
.theme-more-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34,197,94,.4);
}


.appearance-custom-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px;
}
.appearance-custom-color {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--c-muted); cursor: pointer;
}
.appearance-custom-color input[type="color"] {
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--c-border-hi); border-radius: 9px;
  background: transparent; cursor: pointer;
}
.appearance-custom-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
.appearance-custom-color input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }
.appearance-selected-label { font-size: 12px; color: var(--c-muted); margin-left: auto; }
.appearance-selected-label strong { color: var(--c-text); }


body.bg-solid::before, body.bg-solid::after { display: none; }
body.bg-solid { background: var(--c-bg); }
body.bg-gradient::before {
  background: var(--c-bg-0);
  animation: none !important;
}
body.bg-gradient::after { display: none; }
body.bg-grid::before {
  background: var(--c-bg-0);
  background-size: 28px 28px, 28px 28px, 100% 100% !important;
  animation: none !important;
}
body.bg-grid::after { display: none; }


body.surface-solid .card,
body.surface-solid .settings-card {
  background: var(--c-bg-0);
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
body.surface-glass .card,
body.surface-glass .settings-card {
  background: var(--c-bg-0);
  backdrop-filter: blur(20px) saturate(1.3) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.3) !important;
}


body.border-bold .card,
body.border-bold .settings-card,
body.border-bold .input-group input,
body.border-bold .input-group textarea,
body.border-bold .input-group select { border-width: 2px !important; }
body.border-hairline .card,
body.border-hairline .settings-card { border-color: rgba(34,197,94,.06) !important; }


body.contrast-high .muted,
body.contrast-high .card-copy { color: #c8d6ee !important; }
body.contrast-high .section-chip,
body.contrast-high .pill { border-width: 1.5px; }
body.contrast-high .btn { font-weight: 700; }


body.scrollbar-neutral * { scrollbar-color: rgba(140,160,190,.3) transparent; }
body.scrollbar-neutral *::-webkit-scrollbar-thumb { background: rgba(140,160,190,.3); }
body.scrollbar-hidden * { scrollbar-width: none; }
body.scrollbar-hidden *::-webkit-scrollbar { width: 0; height: 0; display: none; }




.home-kpi-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4); margin-bottom: var(--sp-5);
  align-items: stretch;
}
.home-kpi {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4);
  min-height: 76px;
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  background: var(--c-bg-0);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--fast) ease, transform var(--fast) var(--ease), box-shadow var(--med) ease;
}
.home-kpi:hover { border-color: var(--c-border-hi); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.home-kpi:active { transform: translateY(0); }
.home-kpi-icon {
  flex: 0 0 36px; width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: var(--r-sm);
  color: var(--c-muted); background: rgba(255,255,255,.03);
  border: 1px solid var(--c-border);
}

.home-kpi[data-tone="green"] .home-kpi-icon { color: var(--c-green); background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.28); }
.home-kpi-body { min-width: 0; display: grid; gap: var(--sp-1); }
.home-kpi-label { font-family: var(--op-mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--c-dim); }
.home-kpi-value { font-family: var(--op-mono); font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: var(--c-text); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-kpi-sub { font-size: 10px; color: color-mix(in srgb, var(--c-muted) 72%, transparent); }

.home-kpi.is-protected { border-color: rgba(34,197,94,.34); }
.home-kpi.is-protected .home-kpi-value { color: #c7f5e4; }

.home-main-grid { align-items: start; gap: var(--sp-5); }


.home-action-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-bottom: var(--sp-3);
}
.home-action {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: var(--c-bg-2);
  color: var(--c-text); font: inherit; cursor: pointer; text-align: left;
  transition: border-color var(--fast) ease, background var(--fast) ease, transform var(--fast) var(--ease);
}
.home-action:hover { border-color: var(--c-border-hi); background: var(--c-bg-3); transform: translateY(-1px); }
.home-action:active { transform: translateY(0); }
.home-action:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(34,197,94,.4); }
.home-action-ico {
  flex: 0 0 32px; width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: var(--r-xs);
  color: var(--c-muted); background: rgba(255,255,255,.03); border: 1px solid var(--c-border);
}
.home-action-text { display: grid; gap: var(--sp-1); min-width: 0; }
.home-action-text strong { font-size: 13px; font-weight: 600; }
.home-action-text small { font-size: 11px; color: color-mix(in srgb, var(--c-muted) 75%, transparent); }


.home-bin-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 4px;
}
.home-bin-head-left { min-width: 0; flex: 1 1 auto; }
.home-bin-head-right {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.home-bin-current {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-xs);
  border: 1px solid var(--c-line-hi);
  background: color-mix(in srgb, var(--c-bg-0) 50%, transparent);
}
.home-bin-current-label { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-dim); }
.home-bin-current-value { font-size: 12.5px; font-weight: 500; color: var(--c-text); font-family: var(--op-mono); }
.home-bin-body {
  display: flex; flex-direction: column; gap: 10px;
}
.home-bin-body .input-group { max-width: 480px; }
.home-bin-set { display: grid; gap: var(--sp-3); }
.home-mode-switch { display: flex; gap: 2px; background: var(--c-bg-2); border-radius: var(--r-xs); padding: 2px; border: 1px solid var(--c-border); }
.home-mode-switch .btn {
  padding: 5px 12px; font-size: 11.5px; border-radius: calc(var(--r-xs) - 1px);
  font-weight: 600; min-width: 36px; text-align: center;
}
.home-mode-switch .btn.is-active {
  background: rgb(var(--cmp-accent, 122,162,255));
  color: #0b0f17;
  border-color: transparent;
}


.panel[data-panel="dashboard"] > .home-kpi-row { margin-bottom: var(--sp-6); }
.panel[data-panel="dashboard"] > .home-logs-card { margin-bottom: var(--sp-6); }
.panel[data-panel="dashboard"] > .home-main-grid { margin-bottom: 0; }

@media (max-width: 980px) {
  .home-kpi-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .home-kpi-row { grid-template-columns: 1fr; }
  .home-action-grid { grid-template-columns: 1fr; }

  
  .home-bin-head {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .home-bin-head-left { flex: 1 1 auto; }
  .home-bin-head-right {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .home-bin-current {
    flex: 1 1 auto;
    min-width: 0;
    padding: 5px 10px;
  }
  .home-bin-current-value { font-size: 11px; }
  .home-mode-switch .btn { padding: 4px 10px; font-size: 10.5px; min-width: 32px; }
  .home-bin-body .input-group { max-width: none; }
}


.identity-filler-panel { margin-top: 14px; }
.identity-filler-form {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}
.identity-filler-form[hidden] { display: none; }
.identity-filler-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.identity-filler-grid .identity-span-2 { grid-column: 1 / -1; }
.identity-filler-actions { align-items: center; gap: 10px; flex-wrap: wrap; }
.identity-random-toggle { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.identity-random-label { font-size: 11.5px; color: var(--c-muted); white-space: nowrap; }
.identity-filler-status { margin-left: auto; }
.identity-filler-status.is-saved {
  color: #c7f5e4;
  border-color: rgba(34,197,94,.34);
  background: rgba(34,197,94,.12);
}
.identity-filler-note { margin: 0; font-size: 11px; line-height: 1.5; }

@media (max-width: 560px) {
  .identity-filler-grid { grid-template-columns: 1fr; }
}


.card-filler-panel { margin-top: 14px; }
.card-filler-form {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}
.card-filler-form[hidden] { display: none; }
.card-scope-btn.is-active {
  border-color: var(--c-blue);
  background: rgba(34,197,94,.16);
  color: var(--c-text);
}


.proxy-card { margin-top: 14px; }

.proxy-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.proxy-card-head-title { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.proxy-card-head-title strong { font: 700 13px/1.2 ui-sans-serif, system-ui, sans-serif; color: var(--c-text); }
.proxy-head-ico {
  flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 8px; color: var(--c-green);
  border: 1px solid color-mix(in srgb, var(--c-green) 30%, var(--c-border-hi));
  background: color-mix(in srgb, var(--c-green) 10%, transparent);
}
.proxy-head-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.proxy-card-body { display: grid; gap: 8px; margin-top: 6px; }
.proxy-card-body > [hidden] { display: none !important; }
.proxy-card.is-collapsed .proxy-card-body { display: none; }
.proxy-card .card-collapse-btn {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--c-border-hi);
  background: color-mix(in srgb, var(--c-bg-0) 60%, transparent); color: var(--c-muted); cursor: pointer;
  transition: transform var(--fast) ease, color var(--fast) ease, border-color var(--fast) ease;
}
.proxy-card .card-collapse-btn:hover { color: var(--c-text); border-color: var(--c-blue); }
.proxy-card .card-collapse-btn:focus-visible { outline: 2px solid var(--c-green); outline-offset: 2px; }
.proxy-card.is-collapsed .card-collapse-btn svg { transform: rotate(-90deg); }
.proxy-card .card-collapse-btn svg { width: 16px; height: 16px; transition: transform var(--fast) ease; }
.proxy-actions { display: flex; gap: 10px; flex-wrap: wrap; }


.proxy-health-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.proxy-health-dot.is-live { background: var(--c-green); box-shadow: 0 0 6px rgba(34,197,94,.5); }
.proxy-health-dot.is-dead { background: #ff5f72; box-shadow: 0 0 6px rgba(255,95,114,.5); }
.proxy-health-dot.is-unknown { background: #f3cd7e; }
.pill.is-live { color: var(--c-green); border-color: color-mix(in srgb, var(--c-green) 45%, transparent); }
.pill.is-dead { color: #ff5f72; border-color: rgba(255,95,114,.4); }

.proxy-parsed { margin: 0; font-size: 11px; font-variant-numeric: tabular-nums; }
.proxy-parsed.is-ok { color: var(--c-blue); }
.proxy-parsed.is-error { color: var(--c-amber); }


.proxy-rotate-row { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.proxy-rotate-row[hidden] { display: none; }
.proxy-rotate-toggle-row { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--c-muted); cursor: pointer; }
.proxy-rotate-toggle-row input { width: 13px; height: 13px; accent-color: #e8b765; margin: 0; cursor: pointer; }
.proxy-rotate-interval { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--c-muted); }
.proxy-rotate-interval input { width: 36px; padding: 2px 4px; font-size: 11px; border: 1px solid var(--c-border-hi); border-radius: 4px; background: var(--c-bg-0); color: var(--c-text); text-align: center; }
.proxy-rotate-interval input:focus { outline: none; border-color: #e8b765; }

.proxy-status-line { margin: 0; font-size: 11px; }
.proxy-status-line:empty, .proxy-status-line[hidden] { display: none; }
.proxy-status-line.is-on { color: var(--c-green); }
.proxy-status-line.is-error { color: var(--c-amber); }
.proxy-note { margin: 0; font-size: 10.5px; line-height: 1.4; color: var(--c-text-dim); opacity: .75; }


.proxy-field { display: grid; gap: 6px; }

.proxy-field-label { font: 700 9.5px/1 var(--op-mono, ui-monospace, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--c-dim); }

.seg-control { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 3px; border: 1px solid var(--c-border-hi); border-radius: 9px; background: var(--c-bg-0); }
.seg-control.seg-sm { grid-template-columns: repeat(2, 1fr); }
.seg-control.seg-sm .seg-btn { padding: 6px 10px; font-size: 11px; }
.seg-btn { padding: 7px 8px; font-size: 11px; font-weight: 600; color: var(--c-muted); background: transparent; border: 1px solid transparent; border-radius: 7px; cursor: pointer; text-align: center; transition: color var(--fast) ease, background var(--fast) ease; }
.seg-btn:hover { color: var(--c-text); }
.seg-btn.is-active { color: var(--c-green); background: var(--c-green-dim); }
.proxy-mode-hint { font-size: 11px; color: var(--c-text-dim); line-height: 1.45; margin: 0; }
.proxy-mode-hint:empty { display: none; }
.proxy-domain-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 11px; border: 1px solid var(--c-border-hi); border-radius: 9px; background: var(--c-bg-0); }
.proxy-domain-info { display: grid; gap: 1px; min-width: 0; flex: 1 1 auto; }
.proxy-domain-info small { font-size: 10px; color: var(--c-muted); }
.proxy-domain-info strong { font-size: 12.5px; color: var(--c-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.proxy-now-pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--c-border-hi); color: var(--c-muted); flex: 0 0 auto; }
.proxy-now-pill.is-on { color: var(--c-green); border-color: color-mix(in srgb, var(--c-green) 50%, transparent); background: var(--c-green-dim); }
.proxy-now-pill.is-off { color: var(--c-text-dim); }

.proxy-this-site-btn { font-size: 11.5px; padding: 6px 12px; flex: 0 0 auto; transition: background .15s ease, filter .15s ease; }
.proxy-this-site-btn:hover { filter: brightness(1.15); }
.proxy-this-site-btn:focus-visible { outline: 2px solid var(--c-green); outline-offset: 2px; border-radius: 6px; }
.proxy-this-site-btn[hidden] { display: none; }
.proxy-advanced { margin-top: 6px; }
.proxy-advanced > summary { cursor: pointer; font-size: 11.5px; color: var(--c-muted); font-weight: 600; list-style: none; transition: color .15s ease; padding: 3px 0; }
.proxy-advanced > summary:hover { color: var(--c-text); }
.proxy-advanced > summary:focus-visible { outline: 2px solid var(--c-green); outline-offset: 2px; border-radius: 4px; }
.proxy-advanced > summary::-webkit-details-marker { display: none; }
.proxy-advanced[open] > summary { color: var(--c-text); margin-bottom: 8px; }
.proxy-advanced .input-group { margin-bottom: 6px; }
.proxy-advanced .input-group input { padding: 10px 10px 6px; font-size: 12px; }

.proxy-advanced:not([open]) .proxy-auth-indicator { font-size: 10px; color: #e8b765; margin-left: 4px; }
.proxy-rules { display: grid; gap: 8px; }
.proxy-rules-input { display: flex; gap: 8px; }

.proxy-input { width: 100%; box-sizing: border-box; background: var(--c-bg-1, var(--c-bg-0)); color: var(--c-text); border: 1px solid var(--c-border-hi); border-radius: 8px; padding: 8px 11px; font: 500 12px/1.5 system-ui, sans-serif; transition: border-color var(--fast) ease, box-shadow var(--fast) ease; resize: vertical; min-height: 72px; }
.proxy-rules-input input { flex: 1; min-width: 0; background: var(--c-bg-1, var(--c-bg-0)); color: var(--c-text); border: 1px solid var(--c-border-hi); border-radius: 8px; padding: 6px 10px; font: 500 12px/1.2 system-ui, sans-serif; transition: border-color var(--fast) ease, box-shadow var(--fast) ease; }
.proxy-input:focus, .proxy-rules-input input:focus { outline: none; border-color: var(--c-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-green) 16%, transparent); }
.proxy-rules-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 4px; }
.proxy-rules-list:empty { display: none; }
.proxy-rule-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 3px 4px 3px 10px; border-radius: 999px; border: 1px solid var(--c-border-hi); background: var(--c-bg-0); color: var(--c-text); }
.proxy-rule-chip.is-allow { border-color: color-mix(in srgb, var(--c-green) 35%, transparent); }
.proxy-rule-chip.is-block { border-color: color-mix(in srgb, var(--c-amber) 35%, transparent); }
.proxy-rule-chip button { border: none; background: transparent; color: var(--c-muted); cursor: pointer; font-size: 13px; line-height: 1; padding: 0 4px; border-radius: 999px; }
.proxy-rule-chip button:hover { color: var(--c-amber); }
.proxy-groups { display: grid; gap: 8px; }
.proxy-groups-head { display: flex; align-items: center; justify-content: space-between; }
.proxy-groups-head small { font-size: 11px; color: var(--c-muted); }
.proxy-groups-list { display: grid; gap: 6px; }
.proxy-groups-list:empty { display: none; }

.proxy-group-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: center; padding: 9px 11px; border: 1px solid var(--c-border-hi); border-radius: 9px; background: var(--c-bg-0); }
.proxy-group-row.is-active { border-color: color-mix(in srgb, var(--c-green) 45%, transparent); background: var(--c-green-dim); }
.proxy-group-main { min-width: 0; }
.proxy-group-name { font-size: 12px; font-weight: 600; color: var(--c-text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proxy-group-meta { font-size: 10.5px; color: var(--c-muted); }
.proxy-group-actions { display: inline-flex; align-items: center; gap: 6px; }
.proxy-group-actions button { font-size: 11px; padding: 5px 10px; }

.proxy-group-rotate { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding-top: 7px; border-top: 1px solid color-mix(in srgb, var(--c-border-hi) 60%, transparent); }


.proxy-group-members { margin-top: 4px; }
.proxy-group-members-toggle { font-size: 10.5px; color: var(--c-muted); background: none; border: none; cursor: pointer; padding: 2px 0; transition: color .15s ease; }
.proxy-group-members-toggle:hover { color: var(--c-text); }
.proxy-group-members-body { display: none; margin-top: 4px; padding: 6px 8px; border: 1px solid var(--c-border-hi); border-radius: 7px; background: var(--c-bg-0); }
.proxy-group-members.is-open .proxy-group-members-body { display: grid; gap: 3px; }
.proxy-group-member-row { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--c-text-dim); font-family: ui-monospace, monospace; }
.proxy-group-member-info { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proxy-group-member-remove { flex: 0 0 auto; background: none; border: none; color: var(--c-muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 3px; border-radius: 3px; transition: color .15s ease; }
.proxy-group-member-remove:hover { color: #ff8a7d; }
.proxy-rotate-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--c-muted); cursor: pointer; }
.proxy-rotate-toggle input { margin: 0; }
.proxy-rotate-interval-input { width: 72px; padding: 6px 8px; font-size: 11.5px; background: var(--c-bg-1, var(--c-bg-0)); color: var(--c-text); border: 1px solid var(--c-border-hi); border-radius: 7px; }
.proxy-rotate-interval-input:focus { outline: none; border-color: var(--c-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-green) 16%, transparent); }
.proxy-empty { font-size: 11px; color: var(--c-muted); padding: 4px 2px; }


.asheo-ac-modal-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--c-border-hi); }
.asheo-ac-modal .asheo-proxy-tab { cursor: pointer; }
.asheo-ac-modal .asheo-proxy-tab-check { width: 16px; height: 16px; margin-left: auto; flex: 0 0 auto; cursor: pointer; accent-color: var(--c-green); }


.insight-pill.proxy-pill strong { color: var(--c-muted); }
.insight-pill.proxy-pill.is-on strong { color: var(--c-green); }
.insight-pill.proxy-pill.is-error strong { color: var(--c-amber); }


.browsermod-card { margin-top: 14px; }
.browsermod-body { display: grid; gap: 12px; margin-top: 4px; }
.browsermod-card.is-collapsed .browsermod-body { display: none; }
.browsermod-card .card-collapse-btn {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--c-border-hi);
  background: color-mix(in srgb, var(--c-bg-0) 60%, transparent); color: var(--c-muted); cursor: pointer;
  transition: transform var(--fast) ease, color var(--fast) ease, border-color var(--fast) ease;
}
.browsermod-card .card-collapse-btn:hover { color: var(--c-text); border-color: var(--c-blue); }
.browsermod-card.is-collapsed .card-collapse-btn svg { transform: rotate(-90deg); }
.browsermod-card .card-collapse-btn svg { width: 16px; height: 16px; transition: transform var(--fast) ease; }
.bm-block { display: grid; gap: 8px; }

.bm-uamode-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; border: 1px solid var(--c-border-hi); border-radius: 9px; background: var(--c-bg-0); }
.bm-uamode-btn {
  padding: 7px 8px; font: 600 11.5px/1 system-ui, sans-serif; text-align: center;
  color: var(--c-muted); background: transparent; border: 1px solid transparent; border-radius: 7px;
  cursor: pointer; transition: color var(--fast) ease, background var(--fast) ease;
}
.bm-uamode-btn:hover { color: var(--c-text); }
.bm-uamode-btn.is-active {
  border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-line));
  background: color-mix(in srgb, var(--c-accent) 16%, transparent);
  color: var(--c-text);
}
.bm-custom-block[hidden], .bm-rotate-block[hidden] { display: none; }
.bm-custom-block, .bm-rotate-block { display: grid; gap: 10px; }

.bm-list-row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.bm-list-row .pill { flex: 0 0 auto; }
.bm-list-row .btn { flex: 1 1 auto; }
.bm-active-ua {
  margin: 0; font-size: 11px; line-height: 1.4;
  font-family: Consolas, "SF Mono", monospace;
  color: var(--c-blue); word-break: break-all;
  max-height: 3.2em; overflow: hidden;
}
.bm-experimental {
  border: 1px solid var(--c-line); border-radius: var(--r-md);
  padding: 8px 12px; background: color-mix(in srgb, var(--c-bg-0) 40%, transparent);
}
.bm-experimental > summary {
  cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--c-amber); list-style: revert;
}
.bm-experimental[open] > summary { margin-bottom: 10px; }
.bm-experimental > .input-group,
.bm-experimental > .runtime-toggle-row,
.bm-experimental > .bm-webgl-fields { margin-top: 10px; }
.bm-webgl-fields { display: grid; gap: 10px; padding: 10px; border-radius: var(--r-md); background: color-mix(in srgb, var(--c-accent) 6%, transparent); border: 1px solid color-mix(in srgb, var(--c-accent) 12%, var(--c-line)); }
.bm-webgl-fields[hidden] { display: none; }
.bm-note { margin: 0; font-size: 11px; line-height: 1.5; }


.bm-persona-row { display: flex; gap: 8px; align-items: center; }
.bm-persona-select { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--c-border-hi); border-radius: 7px; background: var(--c-bg-0); color: var(--c-text); font: 500 12px/1.2 system-ui, sans-serif; }
.bm-persona-select:focus { outline: none; border-color: var(--c-green); }

.bm-persona-card { display: grid; gap: 2px; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--c-border-hi); border-radius: 7px; background: var(--c-bg-0); }
.bm-persona-card-label { font-size: 12px; font-weight: 600; color: var(--c-text); }
.bm-persona-card-detail { font-size: 10.5px; color: var(--c-text-dim); line-height: 1.4; }


.bm-custom-block { margin-top: 10px; }
.bm-custom-block > summary { cursor: pointer; font-size: 11.5px; color: var(--c-muted); font-weight: 600; list-style: none; }
.bm-custom-block > summary::-webkit-details-marker { display: none; }
.bm-custom-block[open] > summary { color: var(--c-text); margin-bottom: 10px; }
.bm-custom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.bm-custom-grid .input-group input { padding: 10px 10px 6px; font-size: 11.5px; }
.bm-custom-toggles { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.bm-custom-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--c-muted); cursor: pointer; }
.bm-custom-toggle input { width: 13px; height: 13px; accent-color: #e8b765; margin: 0; cursor: pointer; }


#bmScopeRules { margin-top: 6px; }
#bmScopeRules[hidden] { display: none; }


.bm-status-strip {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: var(--r-md);
  border: 1px solid var(--c-line);
  background: color-mix(in srgb, var(--c-bg-0) 50%, transparent);
  font-size: 12px; color: var(--c-muted);
  transition: border-color var(--fast) ease, background var(--fast) ease, color var(--fast) ease;
}
.bm-status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  background: var(--c-muted);
  box-shadow: 0 0 0 0 transparent;
  transition: background var(--fast) ease, box-shadow var(--fast) ease;
}
.bm-status-text { font-weight: 600; letter-spacing: .01em; word-break: break-word; }
.bm-status-strip.is-active {
  border-color: color-mix(in srgb, var(--c-accent) 40%, var(--c-line));
  background: color-mix(in srgb, var(--c-accent) 9%, rgba(6,11,22,.5));
  color: var(--c-text);
}
.bm-status-strip.is-active .bm-status-dot {
  background: var(--c-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-accent) 22%, transparent);
}

.bm-controls { display: grid; gap: 12px; transition: opacity var(--fast) ease, filter var(--fast) ease; }
.bm-controls.is-locked {
  opacity: .42;
  filter: saturate(.55);
  pointer-events: none;
}
.bm-controls.is-locked * { cursor: default; }

.bm-footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bm-footer .bm-note { flex: 1 1 220px; order: 2; }
.bm-saved-tag {
  order: 1; margin-left: auto;
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  color: var(--c-accent);
  opacity: 0; transform: translateY(2px);
  transition: opacity var(--fast) ease, transform var(--fast) ease;
  pointer-events: none; white-space: nowrap;
}
.bm-saved-tag.is-visible { opacity: 1; transform: translateY(0); }


.info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px; margin-left: 4px; padding: 0;
  border-radius: 50%; vertical-align: middle;
  border: 1px solid var(--c-text-dim);
  background: transparent;
  color: var(--c-text-dim); font-size: 8px; font-weight: 600; line-height: 1;
  font-style: normal; cursor: help; flex: 0 0 auto; opacity: .45;
  transition: opacity var(--fast) ease, border-color var(--fast) ease, color var(--fast) ease;
}
.info-btn:hover { opacity: .8; border-color: var(--c-text); color: var(--c-text); background: transparent; }
.info-btn:focus-visible { opacity: 1; outline: 1.5px solid var(--c-text-dim); outline-offset: 2px; }
.info-pop {
  position: fixed; z-index: 9999;
  padding: 10px 12px; border-radius: 10px; max-width: 280px;
  background: var(--c-bg-1);
  border: 1px solid color-mix(in srgb, var(--c-accent) 30%, var(--c-line));
  box-shadow: 0 12px 36px rgba(0,0,0,.55);
  font-size: 12px; line-height: 1.5; color: #d6e2f2;
}
.info-pop[hidden] { display: none; }


.chip.is-active,
.btn.ghost.chip.is-active,
.btn.ghost.is-active {
  background: color-mix(in srgb, var(--c-accent) 18%, #000);
  border-color: var(--c-accent);
  color: #fff;
}


body[data-radius="sharp"] { --c-radius: 4px; }
body[data-radius="soft"]  { --c-radius: 8px; }
body[data-radius="round"] { --c-radius: 14px; }
body[data-radius="pill"]  { --c-radius: 999px; }

body[data-btnstyle="flat"] .btn { backdrop-filter: none; }
body[data-btnstyle="glass"] .btn { backdrop-filter: blur(8px); background: rgba(255,255,255,.04); }

body[data-btnshape="ghost"] .btn.primary { background: transparent; color: var(--c-accent); }


body[data-cardstyle="flat"] .card { border-color: transparent; box-shadow: none; }
body[data-cardstyle="bordered"] .card { border-color: var(--c-border); box-shadow: none; }
body[data-cardstyle="elevated"] .card { border-color: var(--c-border); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }


.appearance-opt:hover {
  background: color-mix(in srgb, var(--c-accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--c-accent) 35%, var(--c-border));
}
.appearance-opt.is-active,
.appearance-opt[aria-pressed="true"] {
  background: color-mix(in srgb, var(--c-accent) 18%, #000);
  border-color: var(--c-accent);
  color: #fff;
}


body[data-preset="carbon"]  { --c-accent: #9aa6b8; }
body[data-preset="inferno"] { --c-accent: #ff4f4f; }
body[data-preset="forest"]  { --c-accent: #3ddc8e; }
body[data-preset="tide"]    { --c-accent: #3b82f6; }
body[data-preset="slate"]   { --c-accent: #7c93ad; }
body[data-preset="cyber"]   { --c-accent: #ff37c6; }
body[data-preset="citrus"]  { --c-accent: #ffb521; }
body[data-preset="royal"]   { --c-accent: #a06bff; }
body[data-preset="ice"]     { --c-accent: #7fe5ff; }
body[data-preset="mono"]    { --c-accent: #f5f5f7; }




.card {
  background: color-mix(in srgb, var(--c-accent) 4%, #000);
  border-color: color-mix(in srgb, var(--c-accent) 18%, var(--c-border));
}
.card:hover { background: color-mix(in srgb, var(--c-accent) 8%, #000); }


.side-card { background: color-mix(in srgb, var(--c-accent) 3%, #000); }


.rule-card,
.gateway-card {
  background: color-mix(in srgb, var(--c-accent) 5%, #050810);
  border-color: color-mix(in srgb, var(--c-accent) 22%, var(--c-border));
}
.rule-card:hover,
.gateway-card:hover { background: color-mix(in srgb, var(--c-accent) 9%, #050810); }
.gateway-card.is-disabled {
  background: color-mix(in srgb, var(--c-accent) 2%, #000);
  opacity: .72;
}


.list-item,
.snapshot-grid > div {
  background: color-mix(in srgb, var(--c-accent) 3%, #000);
}


.gateway-card .brand-chip,
.gateway-card [class*="-icon"],
.list-item .brand-chip,
.list-item [class*="-icon"][class*="chip"] {
  background: color-mix(in srgb, var(--c-accent) 22%, #000);
  border-color: color-mix(in srgb, var(--c-accent) 45%, transparent);
  color: #fff;
}


.insight-pill { background: color-mix(in srgb, var(--c-accent) 3%, #000); }
.kpi-grid > .card { background: color-mix(in srgb, var(--c-accent) 5%, #000); }


.brand-runtime-pill {
  background: color-mix(in srgb, var(--c-accent) 12%, #000);
  border-color: color-mix(in srgb, var(--c-accent) 35%, transparent);
  color: #fff;
}
.brand-runtime-dot { background: var(--c-accent); }


body.panels-min .panel.is-active .card:has(> .card-head) > :not(.card-head) {
  display: none !important;
}
body.panels-min .panel.is-active .card:has(> .card-head) {
  padding-top: 12px;
  padding-bottom: 12px;
}
body.panels-min .panel.is-active .card:has(> .card-head) > .card-head {
  margin-bottom: 0;
}
#panelsMinBtn[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--c-accent) 45%, transparent);
  color: var(--c-accent);
}


.nav-premium {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 6px; padding-top: 12px;
  border-top: 1px solid rgba(232,183,101,.12);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.nav-premium:hover { color: #f3cd7e; }
.nav-premium-badge, .pro-pill {
  font-size: 10px; font-weight: 600; line-height: 1;
  padding: 3px 8px; border-radius: 999px;
  letter-spacing: .04em;
  background: rgba(232, 183, 101, 0.16); color: #f3cd7e;
  border: 1px solid rgba(232,183,101,.24);
}
.nav-premium.is-founder .nav-premium-badge {
  background: linear-gradient(90deg, #e8b765, #f6d98a); color: #1a1205;
}

.premium-modal-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c-bg-0) 66%, transparent); padding: 20px;
}
.premium-modal-overlay[hidden] { display: none; }
.premium-modal-overlay:not([hidden]) { animation: premiumFade 0.2s ease both; }

.premium-modal {
  position: relative; overflow: hidden;
  width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto;
  background: #000;
  border: 1px solid rgba(232, 183, 101, 0.2);
  border-radius: 16px; padding: 20px; color: #e7e8ec;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.72);
}
.premium-modal-overlay:not([hidden]) .premium-modal {
  animation: premiumIn 0.34s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.premium-modal::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #7a5a1e, #e8b765, #f6d98a, #e8b765, #7a5a1e);
}

.premium-modal-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.premium-modal-icon {
  width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(246, 217, 138, 0.42), rgba(232, 183, 101, 0.1));
  border: 1px solid rgba(232, 183, 101, 0.36); color: #f3cd7e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.premium-modal-titles { flex: 1; }
.premium-modal-titles h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: 0.3px; color: #f6d98a; }
.premium-modal-titles p { margin: 0; font-size: 12px; color: #9a8f76; }
.premium-modal-close { background: none; border: none; color: #8b8f9a; font-size: 22px; line-height: 1; cursor: pointer; transition: color 0.15s; }
.premium-modal-close:hover { color: #e7e8ec; }

.premium-beta-banner {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  padding: 9px 12px; border-radius: 9px; margin-bottom: 12px;
  background: rgba(232, 183, 101, 0.10); color: #f3cd7e;
  border: 1px solid rgba(232, 183, 101, 0.18);
}

.premium-feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.premium-feature {
  display: flex; align-items: center; gap: 11px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 2px solid #e8b765; border-radius: 0 9px 9px 0;
  padding: 10px 12px; transition: background 0.16s, border-color 0.16s;
}
.premium-feature:hover { background: rgba(232, 183, 101, 0.07); border-color: rgba(232, 183, 101, 0.22); }
.premium-feature-ico { flex: 0 0 auto; color: #c9b182; display: flex; }
.premium-feature-text { flex: 1; }
.premium-feature-name { font-size: 13.5px; font-weight: 500; color: #ece8df; display: flex; align-items: center; gap: 8px; }
.premium-feature-desc { font-size: 11.5px; color: #8f8a7e; margin-top: 2px; }
.premium-feature-on { color: #46c46a; flex: 0 0 auto; display: flex; }
.premium-feature-off { color: #6b6f78; flex: 0 0 auto; display: flex; }

.premium-founder {
  margin-top: 14px; padding: 13px 15px; border-radius: 11px;
  background: linear-gradient(180deg, rgba(232, 183, 101, 0.12), rgba(232, 183, 101, 0.05));
  border: 1px solid rgba(232, 183, 101, 0.2);
}
.premium-founder.just-claimed { animation: premiumPop 0.4s ease; }
.premium-founder-head { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; color: #f3cd7e; }
.premium-founder p { margin: 6px 0 11px; font-size: 12.5px; color: #b6ac96; }
.premium-founder-btn {
  position: relative; overflow: hidden; width: 100%;
  background: linear-gradient(90deg, #e8b765, #f6d98a); color: #1a1205;
  border: none; font-weight: 600; padding: 10px 14px; border-radius: 9px;
  font-size: 13px; cursor: pointer; transition: filter 0.15s;
}
.premium-founder-btn:hover { filter: brightness(1.06); }
.premium-founder-btn::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
}
.premium-founder-btn:hover::after { animation: premiumShine 0.7s ease; }
.premium-founder-btn:disabled { background: rgba(232, 183, 101, 0.18); color: #c9b182; cursor: default; }
.premium-founder-btn:disabled::after { display: none; }

.premium-modal-foot { margin-top: 14px; display: flex; justify-content: flex-end; }
.premium-modal-gotit {
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.16); color: #cfd2d8;
  padding: 8px 18px; border-radius: 9px; font-size: 13px; cursor: pointer; transition: background 0.15s;
}
.premium-modal-gotit:hover { background: rgba(255, 255, 255, 0.05); }



.premium-panel { padding: 0 18px 22px; }

.premium-panel-hero { display: block; width: 100%; margin: 0 0 14px; }

.pro-pill[hidden], .bypass-premium-pill[hidden] { display: none !important; }
.premium-hero-minimize { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--c-border); background: var(--c-bg-2); color: var(--c-muted); cursor: pointer; font-size: 15px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: color var(--fast) ease, border-color var(--fast) ease; }
.bypass-sec-head-actions .premium-hero-minimize { margin-left: 0; }
.premium-hero-minimize:hover { color: var(--c-text); border-color: var(--c-border-hi); }
.premium-panel-hero[data-minimized] .premium-panel-status { display: none; }
.premium-panel-hero[data-minimized] { padding: 10px 12px; margin-bottom: 10px; }
.premium-panel-status { display: grid; gap: 14px; padding: 16px; }

.premium-panel-status .premium-modal-close,
.premium-panel-status .premium-modal-foot,
.premium-panel-status .premium-modal-head { display: none !important; }

@keyframes premiumFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes premiumIn { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes premiumPop { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes premiumShine { from { left: -60%; } to { left: 130%; } }
@media (prefers-reduced-motion: reduce) {
  .premium-modal-overlay:not([hidden]),
  .premium-modal-overlay:not([hidden]) .premium-modal,
  .premium-founder.just-claimed,
  .premium-founder-btn:hover::after { animation: none; }
}


.update-banner {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px; padding: 10px 14px; border-radius: 10px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c-accent) 18%, transparent), color-mix(in srgb, var(--c-accent) 6%, transparent) 70%);
  border: 1px solid color-mix(in srgb, var(--c-accent) 28%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c-accent) 6%, transparent), 0 4px 16px -10px color-mix(in srgb, var(--c-accent) 30%, transparent);
  color: var(--c-accent); font-size: 13px;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.update-banner:hover {
  border-color: color-mix(in srgb, var(--c-accent) 45%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c-accent) 12%, transparent), 0 6px 22px -10px color-mix(in srgb, var(--c-accent) 40%, transparent);
}
.update-banner.is-mandatory {
  border-color: #ff6b5e;
  box-shadow: 0 0 0 1px rgba(255, 107, 94, .25), 0 4px 18px -10px rgba(255, 107, 94, .4);
  background: linear-gradient(135deg, rgba(255, 107, 94, .16), rgba(255, 107, 94, .04) 70%);
  color: #ff8a7e;
}
.update-banner[hidden] { display: none; }
.update-banner-ico { flex: 0 0 auto; display: flex; opacity: .85; }
.update-banner-text { flex: 1; font-weight: 500; color: var(--c-text, inherit); font-size: 12.5px; line-height: 1.35; }
.update-banner-download {
  flex: 0 0 auto; background: var(--c-accent); color: #0b0d10; border: none;
  font-weight: 600; font-size: 11.5px; padding: 6px 14px; border-radius: 7px; cursor: pointer;
  letter-spacing: .02em;
  transition: filter .12s ease, transform .12s ease;
}
.update-banner-download:hover { filter: brightness(1.12); transform: translateY(-1px); }
.update-banner-dismiss {
  flex: 0 0 auto; background: none; border: none; color: inherit;
  font-size: 18px; line-height: 1; cursor: pointer; opacity: 0.6; padding: 2px 4px;
  border-radius: 4px;
  transition: opacity .12s ease;
}
.update-banner-dismiss:hover { opacity: 1; }

.nav-update-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-accent); margin-left: 4px; vertical-align: middle;
  box-shadow: 0 0 6px color-mix(in srgb, var(--c-accent) 60%, transparent);
}
.nav-update-dot[hidden] { display: none; }

.update-field-label { display: block; font-size: 12px; opacity: 0.75; margin: 4px 0 5px; }
.update-input {
  width: 100%; box-sizing: border-box; padding: 9px 11px; font-size: 13px;
  background: rgba(255, 255, 255, 0.03); color: inherit;
  border: 1px solid var(--c-border, rgba(255, 255, 255, 0.12)); border-radius: 8px;
}
.update-input:focus { outline: none; border-color: color-mix(in srgb, var(--c-accent) 55%, transparent); }
.update-btn-row { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.update-version-line { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: var(--c-text, inherit); font-weight: 500; }
.update-card .status-pill { flex: 0 0 auto; }

#updateStatusPillText { font-weight: 600; }

.status-pill:has(#updateStatusPillText) { transition: background .2s ease, border-color .2s ease, color .2s ease; }


.premium-license { margin: 14px 0 6px; }
.premium-license-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--c-text-dim, #9aa6b6); margin-bottom: 6px; }
.premium-license-row { display: flex; gap: 8px; }
.premium-license-input { flex: 1; min-width: 0; padding: 9px 11px; border-radius: 9px; border: 1px solid rgba(232,183,101,.35); background: rgba(255,255,255,.04); color: var(--c-text, #e8edf6); font: 600 12px/1.2 ui-monospace, monospace; letter-spacing: .05em; }
.premium-license-input::placeholder { color: rgba(154,166,182,.55); letter-spacing: .04em; }
.premium-license-input:focus { outline: none; border-color: #e8b765; box-shadow: 0 0 0 2px rgba(232,183,101,.22); }
.premium-license-btn { padding: 9px 16px; border-radius: 9px; border: none; cursor: pointer; font-weight: 700; font-size: 12px; color: #1a1408; background: linear-gradient(180deg, #f6d98a, #e8b765); transition: filter .15s ease; }
.premium-license-btn:hover { filter: brightness(1.06); }
.premium-license-msg { margin: 8px 0 0; font-size: 12px; min-height: 15px; color: var(--c-text-dim, #9aa6b6); }
.premium-license-msg.is-ok  { color: #f6d98a; }
.premium-license-msg.is-err { color: #ff8a7d; }
.premium-beta-banner.is-premium { color: #f6d98a; }


.premium-license-info { margin: 14px 0 6px; padding: 12px 13px; border-radius: 11px; border: 1px solid rgba(232,183,101,.28); background: rgba(232,183,101,.05); box-sizing: border-box; }
.premium-license-info-label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--c-text-dim, #9aa6b6); margin-bottom: 7px; }
.premium-license-info-row { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.premium-license-key { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--c-bg-0) 22%, transparent); color: var(--c-text, #e8edf6); font: 600 12px/1.2 ui-monospace, monospace; letter-spacing: .06em; }
.premium-license-icon-btn { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(232,183,101,.28); background: rgba(255,255,255,.03); color: #f3cd7e; cursor: pointer; transition: filter .15s ease, border-color .15s ease; }
.premium-license-icon-btn:hover { filter: brightness(1.15); border-color: #e8b765; }
.premium-license-info-status { margin-top: 10px; font: 600 11.5px/1.3 ui-monospace, monospace; letter-spacing: .03em; color: #7ee0a3; }
.premium-license-change { margin-top: 11px; width: 100%; padding: 8px 12px; border-radius: 9px; border: 1px solid rgba(232,183,101,.3); background: transparent; color: #f3cd7e; font-weight: 600; font-size: 12px; cursor: pointer; transition: background .15s ease; }
.premium-license-change:hover { background: rgba(232,183,101,.1); }


.premium-seat-meta {
  display: flex; align-items: center; gap: 7px;
  margin: -4px 0 12px; padding: 7px 11px; border-radius: 8px;
  font: 600 11.5px/1.3 ui-monospace, monospace; letter-spacing: .03em;
  color: #f3cd7e; background: rgba(232, 183, 101, 0.08);
  border: 1px solid rgba(232, 183, 101, 0.16);
  --seat-lock-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='5' y='10.5' width='14' height='9' rx='1.5' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 10.5V8a4 4 0 0 1 8 0v2.5' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
}
.premium-seat-meta::before {
  content: ""; flex: none; width: 12px; height: 12px;
  background: currentColor;
  -webkit-mask: var(--seat-lock-ico) center / contain no-repeat;
  mask: var(--seat-lock-ico) center / contain no-repeat;
}

.campaign-banner {
  flex: 0 0 auto;
  position: relative; overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-rows: auto;
  align-items: start;
  margin: 0 0 10px;
  padding: 16px 20px 14px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(var(--cmp-accent, 122,162,255), .04), transparent 50%),
    var(--c-bg-1, #0b1018);
  border: 1px solid rgba(var(--cmp-accent, 122,162,255), .22);
  box-shadow:
    0 2px 16px -6px rgba(0, 0, 0, .5),
    0 1px 0 rgba(var(--cmp-accent, 122,162,255), .05) inset;
  animation:
    cmp-enter .42s cubic-bezier(.2, .8, .2, 1) both,
    cmp-border-breathe 8s ease-in-out infinite;
  transition:
    transform .22s ease,
    border-color .22s ease,
    box-shadow .22s ease;
}
.campaign-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--cmp-accent, 122,162,255), .42);
  box-shadow:
    0 6px 24px -10px rgba(var(--cmp-accent, 122,162,255), .25),
    0 3px 10px -2px rgba(0, 0, 0, .5);
}
.campaign-banner[hidden] { animation: none; }
.campaign-banner::after { display: none; }
@keyframes cmp-border-breathe {
  0%, 100% { border-color: rgba(var(--cmp-accent, 122,162,255), .3); }
  50%      { border-color: rgba(var(--cmp-accent, 122,162,255), .6); }
}

@property --cmp-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.campaign-banner::before {
  content: "";
  position: absolute; inset: -1px; border-radius: inherit;
  background: conic-gradient(
    from var(--cmp-angle, 0deg),
    transparent 0deg,
    rgba(var(--cmp-accent, 122,162,255), .55) 42deg,
    transparent 84deg,
    transparent 360deg
  );
  z-index: 0; pointer-events: none;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  animation: cmp-edge-spin 14s linear infinite;
}

.campaign-banner-glow {
  display: block;
  position: absolute; top: -30%; left: -10%;
  width: 55%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--cmp-accent, 122,162,255), .1) 0%, transparent 70%);
  filter: blur(28px);
  pointer-events: none; z-index: 0;
  animation: cmp-orb-drift 16s ease-in-out infinite;
}


.campaign-banner-main,
.campaign-banner-titles,
.campaign-banner-nameline { display: contents; }


.campaign-banner-logo { display: none; }
@keyframes cmp-edge-spin {
  from { --cmp-angle: 0deg; }
  to   { --cmp-angle: 360deg; }
}
@keyframes cmp-orb-drift {
  0%   { transform: translate(0%, 0%); opacity: .7; }
  33%  { transform: translate(80%, 30%); opacity: .5; }
  66%  { transform: translate(50%, -20%); opacity: .8; }
  100% { transform: translate(0%, 0%); opacity: .7; }
}

body[data-campaign-banner="minimal"] .campaign-banner-main,
body[data-campaign-banner="minimal"] .campaign-banner-titles,
body[data-campaign-banner="minimal"] .campaign-banner-nameline { display: flex; }

body[data-campaign-banner="minimal"] .campaign-banner {
  display: flex; flex-direction: row; align-items: center;
  padding: 7px 14px 7px 18px;
  border-radius: 12px;
  gap: 10px;
}
body[data-campaign-banner="minimal"] .campaign-banner-glow { display: none; }
body[data-campaign-banner="minimal"] .campaign-banner-main { flex: 1 1 auto; gap: 10px; }
body[data-campaign-banner="minimal"] .campaign-banner-titles strong,
body[data-campaign-banner="minimal"] #campaignName {
  font-size: 13.5px;
  margin-top: 0;
}
body[data-campaign-banner="minimal"] .campaign-banner-kicker,
body[data-campaign-banner="minimal"] .campaign-banner-tag,
body[data-campaign-banner="minimal"] .campaign-banner-blurb,
body[data-campaign-banner="minimal"] .campaign-banner-bullets { display: none; }
body[data-campaign-banner="minimal"] .campaign-banner-actions { gap: 8px; grid-column: auto; grid-row: auto; }
body[data-campaign-banner="minimal"] .campaign-banner-dismiss { grid-column: auto; grid-row: auto; position: relative; }

.campaign-banner-spine { display: none; }
.campaign-banner-tag { display: none; }


.campaign-banner-kicker {
  grid-column: 1; grid-row: 1;
  justify-self: start; align-self: baseline;
  font: 600 10px/1 ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-text-dim, #9aa6b6);
  background: none; border: 0; padding: 0;
  position: relative; z-index: 1;
}
.campaign-banner-kicker::before {
  content: "✦\00a0";
  color: rgba(var(--cmp-accent, 122,162,255), .7);
}


.campaign-banner-titles strong,
#campaignName {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--c-text, #e8edf6);
  letter-spacing: -.01em;
  position: relative; z-index: 1;
}
.campaign-banner-tag::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: rgb(var(--cmp-accent, 122,162,255)); animation: cmp-pulse 2.2s infinite;
}
@keyframes cmp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--cmp-accent, 122,162,255), .55); }
  70% { box-shadow: 0 0 0 5px rgba(var(--cmp-accent, 122,162,255), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--cmp-accent, 122,162,255), 0); }
}
@keyframes cmp-enter {
  from { opacity: 0; transform: translateY(-6px) scale(.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.campaign-cta { display: none; } 


.campaign-banner-blurb {
  grid-column: 1 / -1;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--c-text-dim, #9aa6b6);
  max-width: 68ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative; z-index: 1;
}


.campaign-banner-bullets {
  grid-column: 1 / -1;
  margin-top: 5px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow: hidden;
  position: relative; z-index: 1;
}
.campaign-banner-bullets:empty { display: none; }
.campaign-banner-bullets li {
  flex: 0 0 auto;
  padding: 3px 8px; border-radius: 5px;
  font: 500 11px/1.4 ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: .02em;
  color: var(--c-text-dim, #9aa6b6);
  background: rgba(var(--cmp-accent, 122,162,255), .06);
  border: 1px solid rgba(var(--cmp-accent, 122,162,255), .25);
  white-space: nowrap;
  transition: border-color .14s ease, color .14s ease, background .14s ease;
}
.campaign-banner-bullets li:nth-child(n+5) { display: none; }
.campaign-banner-bullets li::before { display: none; }
.campaign-banner-bullets li:hover { border-color: rgba(var(--cmp-accent, 122,162,255), .5); color: var(--c-text, #e8edf6); background: rgba(var(--cmp-accent, 122,162,255), .1); }


.campaign-banner-actions {
  grid-column: 2; grid-row: 1;
  justify-self: end; align-self: baseline;
  display: flex; align-items: center; gap: 0;
  position: relative; z-index: 1;
}
.campaign-banner-actions::before {
  content: "Explore Story \2192";
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  color: rgba(var(--cmp-accent, 122,162,255), .78);
  letter-spacing: .02em;
}


.campaign-banner-open {
  display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap; cursor: pointer;
  padding: 5px 0;
  font: 600 12.5px/1 ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: .02em;
  color: rgb(var(--cmp-accent, 122,162,255));
  background: none;
  border: none;
  transition: color .2s ease;
}
.campaign-banner-open::before {
  content: "Explore";
  margin-right: 4px;
}
.campaign-banner-open span { font-size: 0; } 
.campaign-banner-open-arrow { transition: transform .2s ease; }
.campaign-banner-open:hover {
  background: none; border: none; box-shadow: none;
  color: rgb(var(--cmp-accent, 122,162,255));
  filter: brightness(1.2);
  transform: none;
}
.campaign-banner-open:hover .campaign-banner-open-arrow { transform: translateX(3px); }
.campaign-banner-open:active { transform: none; }
.campaign-banner-open:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--cmp-accent, 122,162,255), .5);
  border-radius: 4px;
}


#campaignExpand {
  position: absolute; inset: 0; z-index: 2;
  background: transparent; border: none; padding: 0;
  cursor: pointer; color: transparent; font: 0/0 a;
  border-radius: inherit;
}


.campaign-banner-dismiss {
  grid-column: 3; grid-row: 1;
  justify-self: end; align-self: baseline;
  position: relative;
  width: 22px; height: 22px; padding: 0; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: none;
  border-radius: 50%; color: var(--c-text-dim, #9aa6b6);
  opacity: .35; margin-left: 10px;
  transition: opacity .2s ease, color .2s ease;
}
.campaign-banner-dismiss::before, .campaign-banner-dismiss::after {
  content: ""; position: absolute; width: 10px; height: 1.5px; border-radius: 1px;
  background: currentColor; transform: rotate(45deg);
}
.campaign-banner-dismiss::after { transform: rotate(-45deg); }
.campaign-banner-dismiss:hover {
  opacity: .75; background: none; color: var(--c-text, #e8edf6); transform: none;
}
.campaign-banner-dismiss:focus-visible { outline: none; opacity: 1; box-shadow: 0 0 0 2px rgba(var(--cmp-accent, 122,162,255), .6); }


.campaign-banner.is-collapsing { animation: cmp-collapse .26s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes cmp-collapse {
  from { opacity: 1; transform: translateY(0) scale(1); max-height: 240px; margin-bottom: 16px; }
  to   { opacity: 0; transform: translateY(-6px) scale(.98); max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }
}


@media (max-width: 480px) {
  
  .campaign-banner {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 18px;
    margin: 0 0 12px;
    border-radius: 18px;
    cursor: pointer;
    background: var(--c-bg-1, #0b1018);
    border: 1px solid rgba(var(--cmp-accent, 122,162,255), .18);
    border-left: none;
    box-shadow:
      0 2px 12px -4px rgba(0, 0, 0, .4),
      0 1px 0 rgba(var(--cmp-accent, 122,162,255), .06) inset;
    animation: cmp-card-enter .38s cubic-bezier(.2, .8, .2, 1) both;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  }
  @keyframes cmp-card-enter {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  
  .campaign-banner:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--cmp-accent, 122,162,255), .42);
    box-shadow:
      0 6px 22px -8px rgba(var(--cmp-accent, 122,162,255), .3),
      0 3px 8px -2px rgba(0, 0, 0, .5),
      0 1px 0 rgba(var(--cmp-accent, 122,162,255), .1) inset;
  }

  
  .campaign-banner::before,
  .campaign-banner-spine,
  .campaign-banner-glow,
  .campaign-banner-logo,
  .campaign-banner-tag,
  .campaign-banner-bullets,
  .campaign-cta { display: none !important; }

  
  .campaign-banner::after {
    content: "";
    position: absolute;
    top: -45%; right: -15%;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--cmp-accent, 122,162,255), .06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
  }

  
  .campaign-banner-main,
  .campaign-banner-titles,
  .campaign-banner-nameline { display: contents; }

  
  .campaign-banner-kicker {
    display: block;
    order: 1;
    font: 600 11px/1 ui-monospace, "JetBrains Mono", monospace;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--c-text-dim, #9aa6b6);
    position: relative;
    z-index: 1;
  }
  .campaign-banner-kicker::before {
    content: "✦\00a0";
    color: rgba(var(--cmp-accent, 122,162,255), .75);
  }

  
  .campaign-banner-titles strong,
  #campaignName {
    display: block;
    order: 2;
    margin-top: 10px;
    padding-right: 32px;  
    font-family: "IBM Plex Sans", system-ui, sans-serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--c-text, #e8edf6);
    letter-spacing: -.01em;
    position: relative;
    z-index: 1;
  }

  
  .campaign-banner-blurb {
    order: 3;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--c-text-dim, #9aa6b6);
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    z-index: 1;
  }

  
  .campaign-banner-actions {
    order: 4;
    display: flex;
    margin-top: 14px;
    position: relative;
    z-index: 1;
    pointer-events: none;
  }
  .campaign-banner-actions::before {
    content: "Explore Story \2192";
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 13px;
    font-weight: 500;
    color: rgba(var(--cmp-accent, 122,162,255), .78);
    letter-spacing: .02em;
  }
  .campaign-banner-open {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    font: 0/0 a;
    color: transparent;
    gap: 0;
    cursor: default;
    transform: none !important;
  }

  
  #campaignExpand {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: transparent;
    border: none !important;
    padding: 0;
    cursor: pointer;
    color: transparent;
    font: 0/0 a;
    border-radius: inherit;
    pointer-events: auto;
  }

  
  .campaign-banner-dismiss {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 4;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    opacity: .3;
    background: rgba(255, 255, 255, .02);
  }
  .campaign-banner-dismiss:hover { opacity: .6; background: rgba(255, 255, 255, .06); }
}


@media (max-width: 480px) {
  body[data-campaign-banner="minimal"] .campaign-banner-main,
  body[data-campaign-banner="minimal"] .campaign-banner-titles,
  body[data-campaign-banner="minimal"] .campaign-banner-nameline { display: flex; }

  body[data-campaign-banner="minimal"] .campaign-banner {
    padding: 10px 14px;
    border-radius: 14px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  body[data-campaign-banner="minimal"] .campaign-banner::after { display: none; }
  body[data-campaign-banner="minimal"] .campaign-banner-main { flex: 1 1 auto; }
  body[data-campaign-banner="minimal"] .campaign-banner-kicker { font-size: 9px; }
  body[data-campaign-banner="minimal"] .campaign-banner-titles strong,
  body[data-campaign-banner="minimal"] #campaignName {
    font-size: 13px;
    margin-top: 0;
    padding-right: 0;
    line-height: 1.2;
  }
  body[data-campaign-banner="minimal"] .campaign-banner-blurb,
  body[data-campaign-banner="minimal"] .campaign-banner-bullets,
  body[data-campaign-banner="minimal"] .campaign-banner-actions { display: none; }
}


@media (prefers-reduced-motion: reduce) {
  .campaign-banner, .campaign-banner-glow, .campaign-banner-tag::before, .campaign-banner-spine,
  .campaign-banner::before, .campaign-banner::after, .campaign-banner-logo { animation: none !important; }
  .campaign-banner { animation: none; }
}


.campaign-page { padding: 0 0 40px; }

.campaign-page.is-active {
  position: fixed; inset: 0; z-index: 40;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; scrollbar-gutter: stable;
  padding: 14px 22px 48px;
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(var(--cmp-accent, 122,162,255), .12), transparent 58%),
    radial-gradient(90% 50% at 0% 100%, rgba(var(--cmp-accent, 122,162,255), .06), transparent 60%),
    var(--c-bg-0);
  animation: cmp-page-enter .34s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes cmp-page-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.campaign-page-topbar {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; gap: 14px;
  margin: 0 -6px 22px; padding: 6px 6px 12px;
  background: color-mix(in srgb, var(--c-bg-0) 78%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.campaign-page-back {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 8px 14px; border-radius: 9px;
  font: 700 12px/1 ui-monospace, "JetBrains Mono", monospace;
  color: var(--c-text, #e8edf6);
  background: var(--c-bg-2); border: 1px solid var(--c-border);
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.campaign-page-back:hover { background: var(--c-bg-3); border-color: rgba(var(--cmp-accent, 122,162,255), .4); transform: translateX(-2px); }
.campaign-page-back:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(var(--cmp-accent, 122,162,255), .6); }
.campaign-page-crumbs { display: flex; align-items: center; gap: 8px; font: 500 11.5px/1 ui-monospace, monospace; color: var(--c-text-dim, #9aa6b6); }
.campaign-page-crumb-home { background: none; border: 0; padding: 0; cursor: pointer; color: var(--c-text-dim, #9aa6b6); font: inherit; }
.campaign-page-crumb-home:hover { color: rgb(var(--cmp-accent, 122,162,255)); }
.campaign-page-crumb-sep { opacity: .5; }
.campaign-page-crumb-current { color: rgb(var(--cmp-accent, 122,162,255)); }

.campaign-page-hero {
  position: relative; overflow: hidden;
  border-radius: 10px; padding: 14px 16px; margin: 0 0 10px;
  background: var(--c-bg-1, #0b1018);
  border: 1px solid var(--c-border, rgba(255,255,255,.07));
}
.campaign-page-hero-art {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center; opacity: .28;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
  mask-image: linear-gradient(90deg, transparent, #000 45%);
}
.campaign-page-hero-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.campaign-page-logo {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  background-size: cover; background-position: center;
  display: inline-flex; align-items: center; justify-content: center;
  background-color: rgba(var(--cmp-accent, 122,162,255), .14);
  color: rgb(var(--cmp-accent, 122,162,255));
  font: 800 18px/1 ui-monospace, "JetBrains Mono", monospace;
  border: 1px solid rgba(var(--cmp-accent, 122,162,255), .30);
}
.campaign-page-hero-copy { min-width: 0; flex: 1 1 240px; }
.campaign-page-hero-topline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.campaign-page-kicker { display: inline-block; font: 700 9px/1 ui-monospace, monospace; letter-spacing: .18em; text-transform: uppercase; color: rgb(var(--cmp-accent, 122,162,255)); background: rgba(var(--cmp-accent, 122,162,255), .12); border: 1px solid rgba(var(--cmp-accent, 122,162,255), .28); padding: 3px 7px; border-radius: 5px; }
.campaign-page-status { display: inline-flex; align-items: center; gap: 4px; font: 600 9px/1 ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: #6ee7b7; }
.campaign-page-hero-nameline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 0; }
.campaign-page-name { margin: 0; font: 800 17px/1.1 "IBM Plex Sans", system-ui, sans-serif; letter-spacing: -.01em; color: var(--c-text, #e8edf6); }
.campaign-page-tag { font: 600 9.5px/1 ui-monospace, monospace; letter-spacing: .11em; text-transform: uppercase; color: rgb(var(--cmp-accent, 122,162,255)); background: rgba(var(--cmp-accent, 122,162,255), .13); border: 1px solid rgba(var(--cmp-accent, 122,162,255), .3); padding: 4px 9px; border-radius: 999px; }
.campaign-page-version { font: 600 10px/1 ui-monospace, "JetBrains Mono", monospace; letter-spacing: .04em; color: var(--c-text-dim, #9aa6b6); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); padding: 3px 8px; border-radius: 5px; }
.campaign-page-channel { font: 600 9px/1 ui-monospace, "JetBrains Mono", monospace; letter-spacing: .06em; text-transform: uppercase; color: #68c8ff; background: rgba(104,200,255,.08); border: 1px solid rgba(104,200,255,.2); padding: 3px 8px; border-radius: 5px; }
.campaign-page-blurb { margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--c-text-dim, #9aa6b6); max-width: 64ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.campaign-page-hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.campaign-page-hero-btn {
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: 8px;
  font: 600 11.5px/1 ui-monospace, "JetBrains Mono", monospace;
  text-decoration: none;
  color: rgb(var(--cmp-accent, 122,162,255));
  background: rgba(var(--cmp-accent, 122,162,255), .08);
  border: 1px solid rgba(var(--cmp-accent, 122,162,255), .25);
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.campaign-page-hero-btn:hover { background: rgba(var(--cmp-accent, 122,162,255), .16); border-color: rgba(var(--cmp-accent, 122,162,255), .5); }
.campaign-page-hero-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(var(--cmp-accent, 122,162,255), .6); }
.campaign-page-hero-btn--primary { color: #0b0f17; background: rgb(var(--cmp-accent, 122,162,255)); border-color: rgb(var(--cmp-accent, 122,162,255)); font-weight: 700; }
#campaignPageHeroActivate { display: none; } 
.campaign-page-hero-btn--primary:hover { filter: brightness(1.15); }
.campaign-page-hero-btn--ghost { color: var(--c-text-dim, #9aa6b6); background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.09); }
.campaign-page-hero-btn--ghost:hover { color: var(--c-text, #e8edf6); background: rgba(255,255,255,.07); }


.campaign-page-grid {
  display: grid;
  grid-template-columns: 5fr 3fr;
  gap: 12px;
  margin: 0 0 12px;
}
.campaign-page-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.campaign-page-offer {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin: 0; padding: 14px 16px; border-radius: 14px;
  border: 1px dashed rgba(var(--cmp-accent, 122,162,255), .5);
  background: rgba(var(--cmp-accent, 122,162,255), .06);
}
.campaign-page-offer-copy { min-width: 0; }
.campaign-page-offer-headline { display: block; margin: 0; font: 800 16px/1.2 "IBM Plex Sans", system-ui, sans-serif; color: var(--c-text, #e8edf6); }
.campaign-page-offer-detail { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--c-text-dim, #9aa6b6); }
.campaign-page-offer-code { display: inline-block; margin: 10px 0 0; padding: 5px 10px; border-radius: 7px; font: 700 12px/1 ui-monospace, "JetBrains Mono", monospace; letter-spacing: .08em; color: rgb(var(--cmp-accent, 122,162,255)); background: rgba(var(--cmp-accent, 122,162,255), .1); border: 1px solid rgba(var(--cmp-accent, 122,162,255), .3); }

.campaign-page-body { margin: 0; }
.campaign-page-description { margin: 0; font-size: 13px; line-height: 1.6; color: var(--c-text, #d7dee8); max-width: 68ch; }
.campaign-page-description:empty { display: none; }

.campaign-page-features { margin: 0; }
.campaign-page-feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.campaign-page-feature-grid:empty { display: none; }
.campaign-page-feature-card {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--c-border);
  background: var(--c-bg-1);
  transition: border-color .14s ease, box-shadow .14s ease;
}
.campaign-page-feature-card:hover {
  border-color: rgba(var(--cmp-accent, 122,162,255), .4);
  box-shadow: 0 0 14px -6px rgba(var(--cmp-accent, 122,162,255), .2);
}
.campaign-page-feature-card-icon { flex: 0 0 auto; font-size: 15px; line-height: 1.3; margin-top: 1px; }
.campaign-page-feature-card-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.campaign-page-feature-card-title { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--c-text, #e8edf6); }
.campaign-page-feature-card-subtitle { font-size: 11.5px; line-height: 1.4; color: var(--c-text-dim, #9aa6b6); }


.campaign-page-changelog { margin: 0 0 10px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--c-border); background: var(--c-bg-1); box-shadow: var(--shadow-sm); }
.campaign-page-changelog-content { display: flex; flex-direction: column; gap: 12px; }
.campaign-page-changelog-flat { margin: 0; font-size: 13px; line-height: 1.6; color: var(--c-text, #d7dee8); max-width: 80ch; }
.campaign-page-changelog-block { }
.campaign-page-changelog-head { margin: 0 0 6px; font: 700 12px/1 ui-monospace, "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: rgb(var(--cmp-accent, 122,162,255)); }
.campaign-page-changelog-list { margin: 0; padding: 0 0 0 18px; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.campaign-page-changelog-list li { font-size: 13px; line-height: 1.5; color: var(--c-text-dim, #9aa6b6); position: relative; }
.campaign-page-changelog-list li::before { content: "›"; position: absolute; left: -14px; color: rgba(var(--cmp-accent, 122,162,255), .5); font-weight: 700; }

.campaign-page-section-title { margin: 0 0 8px; font: 700 10.5px/1 ui-monospace, "JetBrains Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--c-text-dim, #9aa6b6); }

.campaign-page-license { margin: 0; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--c-border); background: var(--c-bg-1); box-shadow: var(--shadow-sm); }
.campaign-page-license-live { display: grid; gap: 2px; }
.campaign-page-license-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--c-line); }
.campaign-page-license-row:last-child { border-bottom: 0; }
.campaign-page-license-key { font: 600 10.5px/1 ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-dim, #9aa6b6); }
.campaign-page-license-val { font: 700 12.5px/1 ui-monospace, "JetBrains Mono", monospace; color: var(--c-text, #e8edf6); }
.campaign-page-license-locked { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.campaign-page-license-note { margin: 0; font-size: 13px; color: var(--c-text-dim, #9aa6b6); }
.campaign-page-license-actions { display: flex; align-items: center; gap: 10px; }
.campaign-page-activate, .campaign-page-footer-activate, .campaign-page-footer-dismiss {
  cursor: pointer; padding: 9px 15px; border-radius: 10px;
  font: 700 12px/1 ui-monospace, "JetBrains Mono", monospace;
  color: rgb(var(--cmp-accent, 122,162,255)); background: rgba(var(--cmp-accent, 122,162,255), .08);
  border: 1px solid rgba(var(--cmp-accent, 122,162,255), .3);
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.campaign-page-activate:hover, .campaign-page-footer-activate:hover { background: rgba(var(--cmp-accent, 122,162,255), .16); border-color: rgba(var(--cmp-accent, 122,162,255), .5); }
.campaign-page-footer-dismiss { color: var(--c-text-dim, #9aa6b6); background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .09); }
.campaign-page-footer-dismiss:hover { color: var(--c-text, #e8edf6); background: rgba(255, 255, 255, .07); }
.campaign-page-activate:focus-visible, .campaign-page-footer-activate:focus-visible, .campaign-page-footer-dismiss:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(var(--cmp-accent, 122,162,255), .6); }

.campaign-page-faq { margin: 0; }
.campaign-page-faq-list { display: grid; gap: 8px; }
.campaign-page-faq-list details { border: 1px solid var(--c-border); border-radius: 11px; background: var(--c-bg-1); overflow: hidden; }
.campaign-page-faq-list summary { cursor: pointer; list-style: none; padding: 13px 16px; font-weight: 600; font-size: 13.5px; color: var(--c-text, #e8edf6); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.campaign-page-faq-list summary::-webkit-details-marker { display: none; }
.campaign-page-faq-list summary::after { content: "+"; color: rgb(var(--cmp-accent, 122,162,255)); font: 700 16px/1 ui-monospace, monospace; }
.campaign-page-faq-list details[open] summary::after { content: "\2212"; }
.campaign-page-faq-a { margin: 0; padding: 0 16px 14px; font-size: 13px; line-height: 1.6; color: var(--c-text-dim, #9aa6b6); }

.campaign-page-related { margin: 0; }
.campaign-page-related-rail { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; }
.campaign-page-related-item { flex: 0 0 auto; min-width: 170px; max-width: 220px; padding: 12px 14px; border-radius: 11px; text-decoration: none; border: 1px solid var(--c-border); background: var(--c-bg-1); transition: border-color .14s ease, transform .14s ease; }
.campaign-page-related-item:hover { border-color: rgba(var(--cmp-accent, 122,162,255), .45); transform: translateY(-2px); }
.campaign-page-related-name { display: block; font-weight: 700; font-size: 13px; color: var(--c-text, #e8edf6); }
.campaign-page-related-note { display: block; margin: 4px 0 0; font-size: 11.5px; color: var(--c-text-dim, #9aa6b6); }

.campaign-page-footer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 0 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.campaign-page-cta, .campaign-page-footer-cta { text-decoration: none; }


.campaign-page-logo.is-flip-morph, .campaign-page-hero-copy.is-flip-morph { transition: transform .42s cubic-bezier(.2, .8, .2, 1); will-change: transform; }
.campaign-page.is-entering .campaign-page-topbar,
.campaign-page.is-entering .campaign-page-grid,
.campaign-page.is-entering .campaign-page-changelog,
.campaign-page.is-entering .campaign-page-footer { animation: cmp-page-rise .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes cmp-page-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.campaign-banner.is-flip-out { animation: cmp-banner-fade .3s ease forwards; }
@keyframes cmp-banner-fade { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .campaign-page-logo.is-flip-morph, .campaign-page-hero-copy.is-flip-morph { transition: none !important; }
  .campaign-page.is-entering .campaign-page-topbar,
  .campaign-page.is-entering .campaign-page-grid,
  .campaign-page.is-entering .campaign-page-changelog,
  .campaign-page.is-entering .campaign-page-footer { animation: none !important; }
  .campaign-banner.is-flip-out { animation: none !important; }
}


@media (max-width: 480px) {
  
  .campaign-page.is-active {
    display: flex;
    flex-direction: column;
    padding: 12px 16px 28px;
    background:
      radial-gradient(100% 55% at 100% 0%, rgba(var(--cmp-accent, 122,162,255), .10), transparent 60%),
      radial-gradient(80% 35% at 0% 100%, rgba(var(--cmp-accent, 122,162,255), .04), transparent 55%),
      var(--c-bg-0);
  }

  
  .campaign-page-topbar    { order: 0; }
  .campaign-page-hero      { order: 1; }
  .campaign-page-features  { order: 2; }
  .campaign-page-changelog { order: 3; } 
  .campaign-page-grid      { order: 4; }
  .campaign-page-footer    { order: 5; }

  
  .campaign-page-topbar {
    margin: 0 -4px 10px;
    padding: 6px 4px 10px;
    gap: 10px;
  }
  .campaign-page-back {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 8px;
  }
  .campaign-page-crumbs { font-size: 10.5px; gap: 6px; }

  
  .campaign-page-hero {
    padding: 8px 0 12px;
    margin: 0 0 12px;
    border-radius: 0;
    background: none;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,.06);
    overflow: visible;
  }
  .campaign-page-hero::after { display: none; }
  .campaign-page-hero-art { display: none; }

  
  .campaign-page-hero-inner {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .campaign-page-logo {
    width: 36px; height: 36px;
    border-radius: 8px;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: none;
    border-width: 1px;
  }

  .campaign-page-hero-copy {
    min-width: 0;
    flex: 1 1 auto;
  }

  .campaign-page-hero-topline { gap: 6px; }
  .campaign-page-hero-nameline {
    margin: 2px 0 0;
    gap: 6px;
    flex-wrap: wrap;
  }
  .campaign-page-name { font-size: 16px; line-height: 1.15; }

  
  .campaign-page-blurb {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.45;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  
  .campaign-page-kicker  { font-size: 7.5px; padding: 2px 5px; letter-spacing: .14em; }
  .campaign-page-status  { font-size: 7.5px; }
  .campaign-page-tag     { font-size: 7.5px; padding: 2px 7px; }
  .campaign-page-version { font-size: 8px;   padding: 2px 6px; }
  .campaign-page-channel { font-size: 7px;   padding: 2px 6px; }

  
  .campaign-page-hero-actions {
    margin-top: 8px;
    gap: 6px;
    width: 100%;
  }
  .campaign-page-hero-btn { padding: 6px 11px; font-size: 10.5px; border-radius: 7px; }

  
  .campaign-page-features { margin: 0 0 12px; }
  .campaign-page-feature-grid { grid-template-columns: 1fr; gap: 6px; }
  .campaign-page-feature-card { padding: 10px 12px; }
  .campaign-page-feature-card-title { font-size: 12.5px; }
  .campaign-page-feature-card-subtitle { font-size: 11px; }

  
  .campaign-page-changelog {
    margin: 0 0 12px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  .campaign-page-changelog-head { font-size: 11px; }
  .campaign-page-changelog-list li { font-size: 12.5px; }
  .campaign-page-changelog-flat { font-size: 12.5px; }

  
  .campaign-page-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 14px;
  }
  .campaign-page-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .campaign-page-col--side { order: -1; }

  
  .campaign-page-license {
    margin: 0;
    padding: 14px 16px;
    border-radius: 12px;
  }
  .campaign-page-license-row { padding: 7px 0; }
  .campaign-page-license-key { font-size: 10px; }
  .campaign-page-license-val { font-size: 12px; }
  .campaign-page-license-locked { flex-direction: column; align-items: flex-start; gap: 12px; }
  .campaign-page-license-actions { width: 100%; }

  
  .campaign-page-offer {
    margin: 0;
    padding: 14px 16px;
    border-radius: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .campaign-page-offer-headline { font-size: 15px; }
  .campaign-page-offer-detail { font-size: 12px; }

  
  .campaign-page-body { margin: 0; }
  .campaign-page-description { font-size: 13px; line-height: 1.6; }

  
  .campaign-page-faq { margin: 0; }
  .campaign-page-faq-list summary { padding: 11px 14px; font-size: 13px; }
  .campaign-page-faq-a { padding: 0 14px 12px; font-size: 12.5px; }

  
  .campaign-page-related { margin: 0; }
  .campaign-page-related-item { min-width: 140px; max-width: 180px; padding: 10px 12px; }

  
  .campaign-page-section-title {
    margin: 0 0 8px;
    font-size: 10px;
    letter-spacing: .14em;
  }

  
  .campaign-page-footer {
    padding: 12px 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .campaign-page-footer .campaign-page-footer-activate,
  .campaign-page-footer .campaign-page-footer-dismiss,
  .campaign-page-footer .campaign-page-footer-cta {
    width: 100%;
    justify-content: center;
  }
  .campaign-page-activate,
  .campaign-page-footer-activate,
  .campaign-page-footer-dismiss {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }

  
  .campaign-page.is-entering .campaign-page-topbar     { animation-delay: 0s; }
  .campaign-page.is-entering .campaign-page-hero       { animation-delay: .04s; }
  .campaign-page.is-entering .campaign-page-features   { animation-delay: .06s; }
  .campaign-page.is-entering .campaign-page-changelog  { animation-delay: .08s; }
  .campaign-page.is-entering .campaign-page-grid       { animation-delay: .10s; }
  .campaign-page.is-entering .campaign-page-footer     { animation-delay: .12s; }
}


@media (min-width: 1200px) {
  
  .campaign-page.is-active {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 0 16px;
    padding: 20px 28px 32px;
  }

  
  .campaign-page-topbar {
    grid-column: 1 / -1;
    margin: 0 0 8px;
  }

  
  .campaign-page-hero {
    grid-column: 1 / -1;
    margin: 0 0 14px;
    padding: 10px 0;
    background: none;
    border-bottom: 1px solid rgba(255,255,255,.06);
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }
  .campaign-page-hero::before,
  .campaign-page-hero::after {
    display: none; 
  }

  
  .campaign-page-hero-art { display: none; }

  
  .campaign-page-hero-inner {
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
  }

  .campaign-page-logo {
    width: 32px; height: 32px;
    border-radius: 8px;
    font-size: 15px;
    flex-shrink: 0;
  }

  .campaign-page-hero-copy {
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    flex-wrap: nowrap;
  }

  .campaign-page-hero-topline { gap: 8px; }
  .campaign-page-hero-nameline {
    margin: 0;
    flex-shrink: 0;
    gap: 6px;
  }

  .campaign-page-name { font-size: 15px; }
  .campaign-page-blurb { display: none; } 

  
  .campaign-page-hero-actions {
    margin-top: 0;
    flex-shrink: 0;
    gap: 6px;
  }

  
  .campaign-page-features {
    grid-column: 1;
    margin: 0 0 10px;
  }
  .campaign-page-feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .campaign-page-feature-card { padding: 10px 12px; }

  .campaign-page-changelog {
    grid-column: 1;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  .campaign-page-changelog-content {
    display: block; 
  }
  .campaign-page-changelog-block + .campaign-page-changelog-block {
    margin-top: 14px;
  }

  
  .campaign-page-grid {
    grid-column: 2;
    grid-row: 3 / 7; 
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
  }
  .campaign-page-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .campaign-page-col--main {
    order: 1; 
  }
  .campaign-page-col--side {
    order: 0; 
  }

  
  .campaign-page-body { margin: 0; }

  .campaign-page-faq, .campaign-page-related { margin: 0; }
  .campaign-page-related-rail {
    flex-direction: column;
    overflow-x: visible;
  }
  .campaign-page-related-item { min-width: 0; max-width: none; }

  
  .campaign-page-license,
  .campaign-page-offer {
    background: var(--c-bg-1, rgba(255,255,255,.04));
    border: 1px solid var(--c-border, rgba(255,255,255,.07));
    border-radius: 10px;
    padding: 12px 14px;
  }
  
  .campaign-page-faq,
  .campaign-page-related {
    background: none;
    border: none;
    padding: 0;
  }

  
  .campaign-page-section-title {
    font-size: 10px;
    letter-spacing: .12em;
    margin: 0 0 7px;
    color: rgb(var(--cmp-accent, 122,162,255));
  }
  .campaign-page-description {
    max-width: none;
    font-size: 12.5px;
    line-height: 1.55;
  }
  .campaign-page-offer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .campaign-page-offer-headline { font-size: 14px; }
  .campaign-page-offer-detail { font-size: 11.5px; }

  
  .campaign-page-footer {
    grid-column: 1 / -1;
    margin: 10px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid rgba(255,255,255,.06);
    justify-content: flex-end;
  }
}


.gw-test-results{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.gw-test-head{font-weight:600;margin:0}
.gw-test-head.ok{color:var(--c-accent,#22c55e)}
.gw-test-row{border:1px solid var(--c-border,#1b2433);border-radius:8px;padding:8px 10px;display:flex;flex-direction:column;gap:2px}
.gw-test-name{font-weight:600;display:flex;align-items:center;gap:8px}
.gw-test-badge{font-family:ui-monospace,"JetBrains Mono",monospace;font-size:9px;text-transform:uppercase;letter-spacing:.05em;border:1px solid var(--c-accent,#22c55e);color:var(--c-accent,#22c55e);border-radius:999px;padding:1px 7px}
.gw-test-badge.off{border-color:var(--c-muted,#7b879b);color:var(--c-muted,#7b879b)}
.gw-test-badge.name{border-color:color-mix(in srgb,var(--c-amber,#ffb84d) 60%,var(--c-border-hi,#2a2f3a));color:var(--c-amber,#ffb84d);font-size:8.5px}
.gw-test-meta{font-family:ui-monospace,"JetBrains Mono",monospace;font-size:11px;color:var(--c-muted,#7b879b)}
.gw-test-mut{font-size:11px;color:var(--c-muted,#7b879b)}
.gw-test-warn{margin:4px 0 0;font-size:12px;color:var(--c-warn,#d68a8a)}
.gw-test-tip{margin:2px 0 0;font-size:11px;color:var(--c-muted,#7b879b)}

.gw-test-break{margin-top:4px;display:flex;flex-direction:column;gap:1px}
.gw-test-break-row{display:flex;gap:6px;font-size:11px;line-height:1.4}
.gw-test-break-label{flex:0 0 auto;color:var(--c-muted,#7b879b);font-weight:600;text-transform:uppercase;letter-spacing:.03em;font-size:9.5px;padding-top:1px}
.gw-test-break-val{flex:1 1 auto;min-width:0;font-family:ui-monospace,"JetBrains Mono",monospace;color:var(--c-text,#e6edf3);word-break:break-all}


.gw-card-rows{display:flex;flex-direction:column;gap:8px;margin:8px 0;width:100%;max-width:100%;box-sizing:border-box}
.gw-card-row{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;box-sizing:border-box}
.gw-card-row select,.gw-card-row input{box-sizing:border-box;max-width:100%}
.gw-card-row .gw-card-part{flex:1 1 44%;min-width:0}
.gw-card-row .gw-card-path{flex:1 1 56%;min-width:0}
.gw-card-arrow{flex:0 0 auto;color:var(--c-muted,#7b879b)}
.gw-card-del{flex:0 0 auto;padding:4px 9px;line-height:1}
.gw-inject-row .gw-inject-key{flex:1 1 44%;min-width:0}
.gw-inject-row .gw-inject-value{flex:1 1 56%;min-width:0}

.gw-inject-row.is-duplicate .gw-inject-key{
  border-color: color-mix(in srgb, var(--c-amber, #ffb84d) 70%, var(--c-border-hi, #2a2f3a));
  background: color-mix(in srgb, var(--c-amber, #ffb84d) 10%, transparent);
}

.gw-inject-row.is-incomplete .gw-inject-key{
  border-color: color-mix(in srgb, var(--c-amber, #ffb84d) 70%, var(--c-border-hi, #2a2f3a));
  background: color-mix(in srgb, var(--c-amber, #ffb84d) 10%, transparent);
}


.lic-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.lic-plan-id { display: flex; align-items: center; gap: 8px; }
.lic-plan-name { font: 600 15px/1.2 ui-sans-serif, system-ui, sans-serif; color: #f4ead4; letter-spacing: .2px; }
.lic-key-name { font: 600 10px/1 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(122,162,255,.4); color: rgb(var(--cmp-accent, 122,162,255)); background: rgba(122,162,255,.08); }
.lic-plan-badge { font: 600 10px/1 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(126,224,163,.4); color: #7ee0a3; background: rgba(126,224,163,.08); }
.lic-plan-badge.is-expired, .lic-plan-badge.is-revoked, .lic-plan-badge.is-suspended, .lic-plan-badge.is-inactive { border-color: rgba(255,138,125,.4); color: #ff8a7d; background: rgba(255,138,125,.08); }
.lic-plan-price { font: 600 13px/1.2 ui-monospace, monospace; color: #f3cd7e; }
.lic-fact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 4px; }
.lic-fact { padding: 9px 11px; border-radius: 10px; border: 1px solid rgba(232,183,101,.16); background: rgba(255,255,255,.02); }
.lic-fact dt { font: 600 9.5px/1 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; color: #9a8f76; margin-bottom: 4px; }
.lic-fact dd { margin: 0; font: 600 12.5px/1.25 ui-sans-serif, system-ui, sans-serif; color: #ece8df; word-break: break-word; }
.lic-includes-label { margin: 14px 0 7px; font: 600 11px/1 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .07em; color: #9a8f76; }
.lic-includes { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lic-inc { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #cdd3dc; }
.lic-inc .lic-inc-ico { flex: 0 0 auto; display: flex; }
.lic-inc.is-on .lic-inc-ico { color: #46c46a; }
.lic-inc.is-off { color: #6b6f78; }
.lic-inc.is-off .lic-inc-ico { color: #4b515c; }
@media (max-width: 360px) { .lic-fact-grid { grid-template-columns: 1fr; } }



.encgw-card {
  position: relative; overflow: hidden;
  border: 1px solid rgba(232,183,101,.24);
  background:
    linear-gradient(160deg, rgba(232,183,101,.06) 0%, transparent 46%),
    var(--c-bg-2);
}
.encgw-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246,217,138,.55), transparent);
  pointer-events: none;
}
.encgw-card:hover { border-color: rgba(232,183,101,.36); background: linear-gradient(160deg, rgba(232,183,101,.08) 0%, transparent 46%), var(--c-bg-2); }
.encgw-head { display: flex; align-items: center; gap: 11px; }
.encgw-head-mark {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; color: #f3cd7e;
  border: 1px solid rgba(232,183,101,.3);
  background: linear-gradient(160deg, rgba(232,183,101,.16), rgba(232,183,101,.05));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.encgw-head-titles { display: grid; gap: 2px; min-width: 0; }
.encgw-head-eyebrow {
  font: 700 9.5px/1 var(--op-mono, ui-monospace, monospace);
  letter-spacing: .13em; text-transform: uppercase; color: #c9a86a;
}
.encgw-head-title { font: 700 14px/1.2 ui-sans-serif, system-ui, sans-serif; color: #f4ead4; display: inline-flex; align-items: center; gap: 6px; }
.encgw-lede { margin: 11px 0 2px; font-size: 12px; line-height: 1.55; color: var(--c-muted, #93a4bd); }
.encgw-field { display: grid; gap: 4px; }
.encgw-field-label {
  font: 700 9.5px/1 var(--op-mono, ui-monospace, monospace);
  letter-spacing: .1em; text-transform: uppercase; color: #9a8f76;
}
.encgw-manage-btn { padding: 5px 11px; border-radius: 8px; border: 1px solid rgba(232,183,101,.4); background: rgba(232,183,101,.08); color: #f3cd7e; font: 600 11px/1 ui-sans-serif, system-ui, sans-serif; cursor: pointer; transition: filter .15s ease; }
.encgw-manage-btn:hover { filter: brightness(1.12); }
.encgw-manage-btn[hidden] { display: none; }
.encgw-panel { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(232,183,101,.16); }
.encgw-panel[hidden] { display: none; }
.encgw-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.encgw-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; border: 1px solid rgba(232,183,101,.16); background: rgba(255,255,255,.02); }
.encgw-item-main { flex: 1; min-width: 0; }
.encgw-item-name { font: 600 12.5px/1.2 ui-sans-serif, system-ui, sans-serif; color: #ece8df; }
.encgw-item-sub { font: 500 10.5px/1.3 ui-monospace, monospace; color: #9a8f76; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.encgw-item-edit { flex: 0 0 auto; padding: 4px 7px; border-radius: 7px; border: 1px solid rgba(232,183,101,.35); background: transparent; color: #e8b765; font: 600 11px/1 ui-sans-serif, system-ui, sans-serif; cursor: pointer; transition: background .15s ease, filter .15s ease; }
.encgw-item-edit:hover { background: rgba(232,183,101,.1); filter: brightness(1.1); }
.encgw-item-remove { flex: 0 0 auto; padding: 4px 9px; border-radius: 7px; border: 1px solid rgba(255,138,125,.35); background: transparent; color: #ff8a7d; font: 600 11px/1 ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.encgw-item-remove:hover { background: rgba(255,138,125,.1); }
.encgw-item.is-editing { border-color: rgba(232,183,101,.5); background: rgba(232,183,101,.07); box-shadow: 0 0 0 2px rgba(232,183,101,.08); }
.encgw-empty { color: #6b6f78; font-size: 11.5px; padding: 4px 2px; }
.encgw-form { display: flex; flex-direction: column; gap: 8px; }
.encgw-input { padding: 9px 11px; border-radius: 8px; border: 1px solid var(--c-border); background: var(--c-bg-1); color: var(--c-text); font: 500 12px/1.2 ui-monospace, monospace; transition: border-color var(--fast) ease, box-shadow var(--fast) ease; }
.encgw-input::placeholder { color: var(--c-dim); }
.encgw-input:focus { outline: none; border-color: #e8b765; box-shadow: 0 0 0 3px rgba(232,183,101,.16); }
.encgw-form-row { display: flex; align-items: center; gap: 10px; }
.encgw-save-btn { padding: 9px 18px; border-radius: 8px; border: none; cursor: pointer; font-weight: 700; font-size: 12px; color: #1a1408; background: linear-gradient(180deg, #f6d98a, #e8b765); transition: filter var(--fast) ease; }
.encgw-save-btn:hover { filter: brightness(1.08); }
.encgw-msg { font-size: 11.5px; color: #9a8f76; }
.encgw-msg.is-err { color: #ff8a7d; }

.encgw-toggle-row { display: flex; align-items: center; gap: 8px; padding: 6px 2px; cursor: pointer; color: #cbb78f; font-size: 11.5px; }
.encgw-toggle { width: 14px; height: 14px; accent-color: var(--c-amber, #ffb84d); margin: 0; cursor: pointer; }
.encgw-toggle-label em { color: #9a8f76; font-style: normal; font-size: 10.5px; margin-left: 4px; }

.gw-chip-server-forward {
  color: #1a1408 !important;
  background: linear-gradient(180deg, #f6d98a, #e8b765) !important;
  border-color: #e8b765 !important;
  font-weight: 700;
}


.asheo-ac-card { margin-top: 10px; }
.asheo-ac-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.asheo-ac-card-btn {
  flex: 1; min-width: 130px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c-bg-0) 82%, var(--c-border-hi)), var(--c-bg-0));
  color: var(--c-text); border: 1px solid var(--c-border-hi); border-radius: 10px;
  padding: 10px 14px; font: 600 12.5px/1 system-ui, sans-serif; cursor: pointer;
  transition: border-color .15s ease, transform .05s ease, box-shadow .15s ease, background .15s ease;
}
.asheo-ac-card-btn:hover { border-color: var(--c-green); box-shadow: 0 4px 14px -8px color-mix(in srgb, var(--c-green) 70%, transparent); }
.asheo-ac-card-btn:active { transform: scale(.98); }
.asheo-ac-card-btn.ghost { background: var(--c-bg-0); color: var(--c-muted); }
.asheo-ac-card-btn.ghost:hover { color: var(--c-text); }

.asheo-ac-card-btn.is-primary {
  background: linear-gradient(135deg, color-mix(in srgb, var(--c-green) 22%, var(--c-bg-0)), var(--c-bg-0));
  border-color: color-mix(in srgb, var(--c-green) 45%, var(--c-border-hi)); color: var(--c-text);
}
.asheo-ac-card-btn.is-primary:hover { border-color: var(--c-green); }
.asheo-ac-card-btn.asheo-ac-stop-btn:hover { border-color: var(--c-amber, #ffb84d); box-shadow: 0 4px 14px -8px color-mix(in srgb, var(--c-amber, #ffb84d) 70%, transparent); }
.asheo-ac-card-btn.is-record .asheo-ac-btn-ico { color: var(--c-red, #ff5f72); }
.asheo-ac-btn-ico { display: inline-flex; align-items: center; line-height: 1; }
.asheo-ac-btn-label { line-height: 1; }
.asheo-ac-macros { border-top: 1px solid var(--c-border-hi); padding-top: 12px; margin-top: 2px; }
.asheo-ac-macros-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 600 11px/1 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); margin-bottom: 8px; }
.asheo-ac-macros-tools { display: inline-flex; gap: 6px; }
.asheo-ac-tool-btn {
  border: 1px solid var(--c-border-hi); background: var(--c-bg-0); color: var(--c-muted);
  border-radius: 7px; padding: 5px 10px; font: 600 10.5px/1 system-ui, sans-serif; letter-spacing: .04em;
  text-transform: none; cursor: pointer; transition: color .14s ease, border-color .14s ease;
}
.asheo-ac-tool-btn:hover { color: var(--c-text); border-color: var(--c-green); }
.asheo-ac-search-wrap { position: relative; display: flex; align-items: center; margin-bottom: 8px; }
.asheo-ac-search-ico { position: absolute; left: 11px; display: inline-flex; color: var(--c-dim); pointer-events: none; }
.asheo-ac-search {
  flex: 1; min-width: 0;
  background: var(--c-bg-0); border: 1px solid var(--c-border-hi); color: var(--c-text);
  border-radius: 8px; padding: 8px 11px 8px 32px; font: 12px/1 system-ui, sans-serif;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.asheo-ac-search::placeholder { color: var(--c-dim); }
.asheo-ac-search:focus { outline: none; border-color: var(--c-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-green) 16%, transparent); }

.asheo-ac-macro-row {
  display: grid; grid-template-rows: auto auto; gap: 8px;
  padding: 10px 12px; background: var(--c-bg-0);
  border: 1px solid var(--c-border-hi); border-radius: 10px;
  margin-bottom: 6px; transition: border-color .14s ease;
}
.asheo-ac-macro-row:hover { border-color: color-mix(in srgb, var(--c-green) 32%, var(--c-border-hi)); }

.asheo-ac-macro-info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.asheo-ac-macro-namecol { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.asheo-ac-macro-name { min-width: 0; font: 600 12.5px/1.3 system-ui, sans-serif; color: var(--c-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asheo-ac-macro-meta { font: 10.5px/1.3 system-ui, sans-serif; color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asheo-ac-pin {
  flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  color: var(--c-dim); font-size: 14px; line-height: 1; cursor: pointer;
  transition: color .14s ease, border-color .14s ease, background .14s ease;
}
.asheo-ac-pin:hover { color: var(--c-amber, #ffb84d); background: color-mix(in srgb, var(--c-amber, #ffb84d) 8%, transparent); }
.asheo-ac-pin.is-pinned { color: var(--c-amber, #ffb84d); }

.asheo-ac-macro-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: nowrap; }
.asheo-ac-macro-cfg { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.asheo-ac-field { display: flex; align-items: center; gap: 4px; }
.asheo-ac-field-label { font: 700 8px/1 var(--op-mono, ui-monospace, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--c-dim); }
.asheo-ac-input { background: var(--c-bg-1, var(--c-bg-0)); color: var(--c-text); border: 1px solid var(--c-border-hi); border-radius: 6px; padding: 5px 7px; font: 600 11px/1 system-ui, sans-serif; }
.asheo-ac-input:focus { outline: none; border-color: var(--c-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-green) 16%, transparent); }
.asheo-ac-input-speed { min-width: 54px; }
.asheo-ac-input-loops { width: 50px; text-align: center; }

.asheo-ac-macro-verbs { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.asheo-ac-rename-input { width: 100%; background: var(--c-bg-1, var(--c-bg-0)); border: 1px solid var(--c-green); color: var(--c-text); border-radius: 6px; padding: 4px 7px; font: 600 12px/1.2 system-ui, sans-serif; }
.asheo-ac-rename-input:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-green) 16%, transparent); }

.asheo-ac-macro-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
@keyframes asheo-cmd-flash { 0% { box-shadow: 0 0 0 0 var(--c-blue, #4f8cff); } 30% { box-shadow: 0 0 0 3px var(--c-blue, #4f8cff); } 100% { box-shadow: 0 0 0 0 transparent; } }
.asheo-cmd-flash { animation: asheo-cmd-flash 1.4s ease-out; border-radius: 8px; position: relative; z-index: 5; }



@keyframes asheo-pro-shimmer { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.3); } }
body.is-premium .brand-logo { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c-gold, #d4a64a) 45%, transparent), 0 0 20px -5px color-mix(in srgb, var(--c-gold, #d4a64a) 55%, transparent); }
body.is-premium .brand-logo-mark { background: none; }
body.is-premium #appNav .nav-item.is-active { box-shadow: inset 2px 0 0 var(--c-gold, #d4a64a); }
body.is-premium #appNav .nav-item.is-active .nav-item-label { color: var(--c-gold, #d4a64a); }
body.is-premium .nav-premium-badge { background: linear-gradient(135deg, var(--c-gold, #d4a64a), color-mix(in srgb, var(--c-gold, #d4a64a) 60%, #fff 35%)); color: #1a1408; animation: asheo-pro-shimmer 3.4s ease-in-out infinite; }
body.is-premium .pro-pill { background: linear-gradient(135deg, var(--c-gold, #d4a64a), color-mix(in srgb, var(--c-gold, #d4a64a) 60%, #fff 35%)); color: #1a1408; }
body.is-premium .gateway-card.is-premium-gate { border-color: color-mix(in srgb, var(--c-gold, #d4a64a) 45%, var(--c-border-hi)); box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-gold, #d4a64a) 0%, transparent); }
body.is-premium .gw-chip-premium { background: color-mix(in srgb, var(--c-gold, #d4a64a) 20%, var(--c-bg-0)); color: var(--c-gold, #d4a64a); border: 1px solid color-mix(in srgb, var(--c-gold, #d4a64a) 50%, transparent); }
body.is-premium .brand-runtime-pill:not(.is-off) { color: var(--c-gold, #d4a64a); }
.asheo-ac-mini-btn {
  border: 1px solid var(--c-border-hi); background: var(--c-bg-1, var(--c-bg-0)); color: var(--c-muted);
  border-radius: 6px; padding: 5px 10px; font: 600 10.5px/1 system-ui, sans-serif; cursor: pointer;
  min-width: 52px; text-align: center;
  transition: color .14s ease, border-color .14s ease, background .14s ease;
}
.asheo-ac-mini-btn:hover { color: var(--c-text); border-color: var(--c-border-hi); }
.asheo-ac-mini-btn.ghost { background: color-mix(in srgb, var(--c-text) 6%, var(--c-bg-0)); color: var(--c-text); }
.asheo-ac-mini-btn.ghost:hover { background: color-mix(in srgb, var(--c-text) 12%, var(--c-bg-0)); }
.asheo-ac-mini-btn.run { background: var(--c-green); color: #06231b; border-color: var(--c-green); min-width: 48px; }
.asheo-ac-mini-btn.run:hover { filter: brightness(1.08); }
.asheo-ac-mini-btn.del { background: color-mix(in srgb, var(--c-amber) 14%, var(--c-bg-0)); color: var(--c-amber); border-color: color-mix(in srgb, var(--c-amber) 30%, transparent); min-width: 70px; }
.asheo-ac-mini-btn.del:hover { background: color-mix(in srgb, var(--c-amber) 22%, var(--c-bg-0)); }
.asheo-ac-mini-btn.del.is-confirming { background: color-mix(in srgb, var(--c-amber) 28%, var(--c-bg-0)); }
.asheo-ac-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(6,9,14,.72); display: flex; align-items: center; justify-content: center; padding: 24px; }
.asheo-ac-modal-card { width: 100%; max-width: 520px; max-height: 80vh; display: flex; flex-direction: column; background: #0e1117; border: 1px solid #2a3342; border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.6); overflow: hidden; }
.asheo-ac-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #232a36; }
.asheo-ac-modal-head strong { color: #e7ecf3; font: 600 14px/1 system-ui, sans-serif; }
.asheo-ac-modal-x { background: none; border: 0; color: var(--c-muted); font-size: 20px; cursor: pointer; min-width: 36px; min-height: 36px; }
.asheo-ac-tab-list { overflow: auto; padding: 8px; }
.asheo-ac-tab { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; min-height: 44px; }
.asheo-ac-tab:hover { background: #161b24; border-color: #2a3342; }
.asheo-ac-tab img { width: 18px; height: 18px; border-radius: 3px; flex-shrink: 0; }
.asheo-ac-tab-title { flex: 1; min-width: 0; }
.asheo-ac-tab-title strong { display: block; font: 600 12px/1.3 system-ui, sans-serif; color: #e7ecf3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asheo-ac-tab-title small { display: block; font: 11px/1.3 system-ui, sans-serif; color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asheo-ac-empty { padding: 14px; text-align: center; color: var(--c-muted); font: 12px system-ui, sans-serif; }


.bm-profile-block { margin-bottom: 6px; }

.bm-profile-row { display: flex; gap: 8px; align-items: center; }
.bm-profile-row .btn { flex: 0 0 auto; }
.bm-profile-select { flex: 1 1 auto; min-width: 0; background: var(--c-bg-0); border: 1px solid var(--c-border-hi); color: var(--c-text); border-radius: 8px; padding: 8px 10px; font: 600 12px system-ui, sans-serif; }
.bm-siterules-block { margin-top: 10px; }

.bm-siterule-add { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); gap: 8px; }
.bm-siterule-add input { min-width: 0; }
.bm-siterule-add .btn { grid-column: 1 / -1; }
.bm-siterules-list { display: grid; gap: 6px; margin-top: 8px; }
.bm-siterule-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--c-border-hi); border-radius: 9px; background: var(--c-bg-0); }
.bm-siterule-info { flex: 1; min-width: 0; display: grid; gap: 1px; }
.bm-siterule-info strong { font-size: 12px; color: var(--c-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-siterule-info small { font-size: 10.5px; color: var(--c-muted); }
.bm-siterule-empty { font-size: 11px; color: var(--c-muted); padding: 6px 2px; }
.topbar-action-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; min-width: 36px; border: 1px solid var(--c-border-hi); border-radius: 9px; background: var(--c-bg-0); color: var(--c-muted); cursor: pointer; transition: color .15s, border-color .15s; flex-shrink: 0; }
.topbar-action-btn:hover { color: var(--c-text); border-color: var(--c-green); }


@media (max-width: 480px) {
  .seg-btn { padding: 9px 12px; font-size: 12px; min-height: 36px; flex: 1 1 auto; }
  .seg-control.seg-sm .seg-btn { padding: 8px 11px; min-height: 34px; }
  .proxy-group-actions button { min-height: 32px; padding: 7px 11px; font-size: 12px; }
  .proxy-rotate-interval-input { min-width: 64px; min-height: 36px; font-size: 13px; padding: 5px 7px; }
  .proxy-rotate-toggle { font-size: 11px; }
  .proxy-rule-chip button { min-width: 28px; min-height: 28px; padding: 4px 6px; }
  .proxy-domain-info strong { max-width: 60vw; }
  .proxy-group-name { flex: 1 1 100%; }
  .proxy-this-site-btn { margin-left: 0; flex: 1 1 100%; min-height: 38px; }
  .asheo-ac-card-btn { min-width: 120px; }
  .asheo-ac-card-btn, .asheo-ac-actions .asheo-ac-card-btn { flex: 1 1 100%; }
  .asheo-ac-mini-btn { padding: 8px 12px; font-size: 11px; min-height: 34px; min-width: 48px; }
  .asheo-ac-mini-btn.del { min-width: 64px; }
  
  .asheo-ac-macro-controls { flex-direction: column; align-items: stretch; }
  .asheo-ac-macro-cfg { justify-content: flex-start; }
  .asheo-ac-macro-verbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .asheo-ac-macro-verbs .asheo-ac-mini-btn { min-height: 38px; }
  .asheo-ac-input { min-height: 38px; }
  .asheo-ac-input-speed, .asheo-ac-input-loops { min-height: 38px; }
  .bm-profile-row .btn, .bm-siterule-add .btn { min-height: 38px; }
  .bm-siterule-add input, .bm-profile-select { min-height: 40px; }
  .bm-uamode-btn { min-height: 38px; }
  .bm-list-row .btn { min-height: 38px; }
  .card-collapse-btn { min-width: 36px; min-height: 36px; }
  .info-btn { min-width: 32px; min-height: 32px; }
  .btn.sm { min-height: 36px; padding: 0 12px; }
  
  .asheo-ac-modal { align-items: flex-end; padding: 0; }
  .asheo-ac-modal-card { max-width: none; max-height: 86svh; border-radius: 16px 16px 0 0; }
}
  


.premium-panel .premium-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 4px 12px; border-bottom: 1px solid var(--c-border);
}
.premium-panel .premium-head .premium-modal-icon { color: var(--c-premium); display: inline-flex; }
.premium-panel .premium-head h2 { font-size: 15px; margin: 0; letter-spacing: .01em; color: var(--c-text); }
.premium-panel .premium-head p { margin: 0; font-size: 11px; color: var(--c-text-dim); }
.premium-panel .premium-head .premium-close { margin-left: auto; background: none; border: 0; color: var(--c-text-dim); font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.premium-panel .premium-head .premium-close:hover { color: var(--c-text); }

.premium-status-zone {
  margin: 12px 0; padding: 12px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--c-premium);
  background: color-mix(in srgb, var(--c-premium) 8%, transparent);
}
.premium-status-zone .psz-tier { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: .08em; color: var(--c-premium); font-weight: 600; }
.premium-status-zone .psz-sub { font-size: 12px; color: var(--c-text-dim); margin-top: 3px; }
.premium-status-zone.is-active { border-color: var(--c-green); background: color-mix(in srgb, var(--c-green) 8%, transparent); }
.premium-status-zone.is-active .psz-tier { color: var(--c-green); }

.premium-buy-zone { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--c-border); border-radius: var(--r-sm); }
.premium-buy-zone h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .04em; color: var(--c-text); }
.premium-buy-zone ol { margin: 0 0 12px; padding-left: 18px; }
.premium-buy-zone li { font-size: 12px; color: var(--c-text-dim); margin: 4px 0; }
.premium-buy-tg-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-xs); cursor: pointer;
  border: 1px solid var(--c-premium); color: var(--c-premium);
  background: transparent; font-size: 12px; font-weight: 600;
  transition: background var(--fast) var(--ease);
}
.premium-buy-tg-btn:hover { background: color-mix(in srgb, var(--c-premium) 14%, transparent); }

.premium-feature-head { font-size: 11px; letter-spacing: .06em; color: var(--c-text-dim); text-transform: uppercase; margin: 16px 0 8px; }
.premium-foot { margin-top: 16px; }


.bm-section { border-top: 1px solid var(--c-border); }
.bm-section > .bm-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; cursor: pointer; user-select: none;
  border-left: 2px solid var(--c-premium);
  font-size: 11px; letter-spacing: .06em; font-weight: 600; color: var(--c-text);
  list-style: none;
}
.bm-section > .bm-section-head::-webkit-details-marker { display: none; }
.bm-section > .bm-section-head:hover { background: color-mix(in srgb, var(--c-premium) 6%, transparent); }
.bm-section-chevron { transition: transform var(--fast) var(--ease); font-style: normal; color: var(--c-text-dim); }
.bm-section[open] > .bm-section-head .bm-section-chevron { transform: rotate(90deg); }
.bm-section-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.bm-inline-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bm-select { background: var(--c-bg-1); color: var(--c-text); border: 1px solid var(--c-border); border-radius: var(--r-xs); padding: 6px 8px; font-size: 12px; }

/* ── Gateway Import: Shared modal overlay ──────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 250;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: color-mix(in srgb, var(--c-bg-0) 62%, transparent);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.modal-content {
  width: min(520px, 92vw);
  max-height: 80vh;
  background: var(--c-bg-2);
  border: 1px solid var(--c-border-hi);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.modal-head {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 13px 15px; border-bottom: 1px solid var(--c-line);
}
.modal-title {
  margin: 0; padding: 0;
  font-size: 14px; font-weight: 600; color: var(--c-text);
}
.modal-subtitle {
  font-size: 11px; color: var(--c-text-dim);
  font-family: ui-monospace, "JetBrains Mono", monospace;
}
.modal-close {
  margin-left: auto; flex: 0 0 auto;
  background: none; border: none; cursor: pointer;
  color: var(--c-muted); font-size: 19px; line-height: 1; padding: 0 4px;
  border-radius: var(--r-xs); transition: color var(--fast) ease;
}
.modal-close:hover { color: var(--c-text); }
.modal-body {
  padding: 14px 15px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 15px; border-top: 1px solid var(--c-line);
}
.modal-foot .btn { min-height: 34px; }

/* ── Gateway Import: Preview modal (redesigned) ───────────────────── */
.gw-import-preview-content {
  width: min(640px, 95vw);
  max-height: 92vh;
}
.gw-import-preview-content .modal-body {
  display: flex; flex-direction: column; gap: 10px;
  overflow: hidden; /* body itself does not scroll — only the fields table does */
}

.gw-import-pattern-line {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 2px; padding: 6px 10px;
  background: color-mix(in srgb, var(--c-accent) 8%, transparent);
  border-radius: var(--r-xs);
  border: 1px solid color-mix(in srgb, var(--c-accent) 18%, transparent);
}
.gw-import-pattern-label {
  font-size: 11px; font-weight: 600; color: var(--c-text-dim);
  letter-spacing: .04em; text-transform: uppercase;
}
.gw-import-pattern-value {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 12px; color: var(--c-accent);
  word-break: break-all;
}

/* Name input */
.gw-import-name-group { margin-top: 2px; }
.gw-import-name-group input {
  font-family: ui-monospace, "JetBrains Mono", monospace;
}

/* Required tags */
.gw-import-required-tags {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.gw-import-required-tags-label {
  font-size: 11px; font-weight: 600; color: var(--c-text-dim);
}
.gw-import-required-tags-list {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.gw-import-req-tag {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--c-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-accent) 24%, transparent);
  font-size: 10px; font-weight: 600;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  color: var(--c-accent);
  line-height: 1.4;
}
.gw-import-req-tag-x {
  background: none; border: none; cursor: pointer;
  color: var(--c-text-dim); font-size: 12px; line-height: 1;
  padding: 0 1px; margin-left: 2px;
  border-radius: 50%;
}
.gw-import-req-tag-x:hover { color: var(--c-danger); background: color-mix(in srgb, var(--c-danger) 16%, transparent); }

/* Field head */
.gw-import-field-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 2px;
}
.gw-import-field-head-label {
  font-size: 11px; font-weight: 700; color: var(--c-text-dim);
  text-transform: uppercase; letter-spacing: .04em;
}
.gw-import-field-head-toggles {
  display: flex; align-items: center; gap: 3px;
}
.gw-import-legend-dot {
  width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto;
}
.gw-import-legend-dot--card { background: var(--c-accent); }
.gw-import-legend-dot--req { background: var(--c-warning); }
.gw-import-legend-dot--rem { background: var(--c-danger); }
.gw-import-legend-dot--ign { background: var(--c-text-dim); }
.gw-import-legend-label {
  font-size: 9px; font-weight: 600; color: var(--c-text-dim);
  margin-right: 6px;
}

/* Fields table */
.gw-import-fields-table {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  overflow-y: auto; overflow-x: auto;  /* scroll both axes for long paths */
  max-height: 40vh;
  min-width: 0;
}
.gw-import-field-row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--c-border);
  background: color-mix(in srgb, var(--c-bg-0) 0%, var(--c-bg-1)); /* odd row */
  font-size: 12px;
  transition: background var(--fast) ease, border-left-color var(--fast) ease;
  border-left: 2px solid transparent;
}
.gw-import-field-row:nth-child(even) { background: color-mix(in srgb, var(--c-bg-0) 30%, var(--c-bg-1)); }
.gw-import-field-row:last-child { border-bottom: none; }
.gw-import-field-row:hover {
  background: color-mix(in srgb, var(--c-accent) 6%, var(--c-bg-1));
  border-left-color: var(--c-accent);
}

.gw-import-field-path {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  color: var(--c-text);
  flex: 1 1 auto;
  min-width: 160px;
  max-width: none;
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;      /* allow wrapping for long paths */
  font-size: 11px;
  line-height: 1.35;
}
.gw-import-field-arrow {
  color: var(--c-text-dim); flex: 0 0 auto; font-size: 11px;
  min-width: 16px; text-align: center;
}
.gw-import-field-type {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  color: var(--c-accent); font-size: 11px; flex: 0 0 auto;
  min-width: 60px; text-align: right;
  white-space: nowrap;
}
.gw-import-field-conf {
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  font-weight: 600; flex: 0 0 auto;
  min-width: 32px; text-align: center;
  white-space: nowrap;
  letter-spacing: .03em;
}
.gw-import-field-conf--high {
  background: color-mix(in srgb, var(--c-success) 18%, transparent);
  color: var(--c-success);
}
.gw-import-field-conf--mid {
  background: color-mix(in srgb, var(--c-warning) 18%, transparent);
  color: var(--c-warning);
}
.gw-import-field-conf--low {
  background: color-mix(in srgb, var(--c-danger) 16%, transparent);
  color: var(--c-danger);
}

/* Subtype selector (shown when Card is selected) */
.gw-import-field-subtype-wrap { margin-left: 2px; flex: 0 0 auto; }
.gw-import-field-subtype {
  background: var(--c-bg-0); color: var(--c-accent);
  border: 1px solid var(--c-border); border-radius: var(--r-xs);
  padding: 1px 4px; font-size: 10px;
  font-family: ui-monospace, "JetBrains Mono", monospace;
}
.gw-import-field-subtype:focus { border-color: var(--c-accent); outline: none; }

/* Radio toggles (segmented pill buttons) */
.gw-import-field-toggles {
  display: flex; gap: 2px; flex: 0 0 auto;
}
.gw-import-field-toggle {
  display: flex; align-items: center; justify-content: center;
  padding: 2px 7px; border-radius: var(--r-xs);
  background: var(--c-bg-0); border: 1px solid var(--c-border);
  cursor: pointer; font-size: 10px; font-weight: 600;
  color: var(--c-text-dim);
  transition: background var(--fast) ease, color var(--fast) ease, border-color var(--fast) ease;
  user-select: none;
}
.gw-import-field-toggle:hover {
  border-color: var(--c-border-hi);
  color: var(--c-text);
}
.gw-import-field-toggle.is-active {
  background: color-mix(in srgb, var(--c-accent) 20%, transparent);
  border-color: var(--c-accent);
  color: var(--c-accent);
}
.gw-import-field-toggle-label {
  pointer-events: none;
}

/* Warnings */
.gw-import-warnings {
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px 10px;
  border-left: 3px solid var(--c-warning);
  background: color-mix(in srgb, var(--c-warning) 8%, transparent);
  border-radius: var(--r-xs);
  margin: 2px 0;
}
.gw-import-warning {
  font-size: 11px; color: var(--c-warning);
  line-height: 1.45;
}

/* Summary */
.gw-import-summary {
  font-size: 11px; font-weight: 600; color: var(--c-text);
  padding: 7px 10px;
  background: var(--c-bg-1);
  border-radius: var(--r-xs);
  border: 1px solid var(--c-border);
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.gw-import-summary-count { color: var(--c-accent); font-weight: 700; }

/* Bulk actions row at top of field table */
.gw-import-bulk-actions {
  display: flex; align-items: center; gap: 6px;
  margin-top: 2px;
}
.gw-import-bulk-actions-label {
  font-size: 10px; font-weight: 600; color: var(--c-text-dim);
  text-transform: uppercase; letter-spacing: .04em;
  margin-right: 2px;
}
.gw-import-bulk-btn {
  padding: 3px 10px; border-radius: var(--r-xs);
  border: 1px solid var(--c-border);
  background: var(--c-bg-1);
  cursor: pointer;
  font-size: 10px; font-weight: 600; color: var(--c-text-dim);
  transition: background var(--fast) ease, border-color var(--fast) ease, color var(--fast) ease;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
}
.gw-import-bulk-btn:hover {
  background: color-mix(in srgb, var(--c-accent) 12%, transparent);
  border-color: var(--c-accent);
  color: var(--c-accent);
}

/* Smooth animation on modal open */
.gw-import-preview-content {
  animation: importPreviewIn 200ms ease-out both;
}
@keyframes importPreviewIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Make the preview modal body lay out as a flex column with sticky head/foot */
.gw-import-preview-content {
  display: flex; flex-direction: column;
  overflow: hidden;
}
.gw-import-preview-content .modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
}
.gw-import-preview-content .modal-head {
  flex: 0 0 auto;
}
.gw-import-preview-content .modal-foot {
  flex: 0 0 auto;
}

/* Field type badge inside the type cell */
.gw-import-field-type-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.gw-import-field-type-badge--number { background: color-mix(in srgb, var(--c-accent) 14%, transparent); color: var(--c-accent); }
.gw-import-field-type-badge--cvv    { background: color-mix(in srgb, var(--c-warning) 16%, transparent); color: var(--c-warning); }
.gw-import-field-type-badge--date   { background: color-mix(in srgb, var(--c-success) 14%, transparent); color: var(--c-success); }
.gw-import-field-type-badge--holder { background: color-mix(in srgb, var(--c-text-dim) 12%, transparent); color: var(--c-text-dim); }

/* Dropped section */
.gw-import-dropped { margin-top: 2px; }
.gw-import-dropped summary {
  font-size: 11px; color: var(--c-text-dim);
  cursor: pointer; padding: 4px 0;
}
.gw-import-dropped-list {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 4px 0 4px 12px;
}
.gw-import-dropped-tag {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 10px; color: var(--c-text-dim);
  background: var(--c-bg-1);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xs);
  padding: 1px 6px;
}

/* ── Gateway Import: Picker modal ──────────────────────────────────── */
.gw-import-picker-content .modal-body {
  display: flex; flex-direction: column; gap: 4px;
}
.gw-import-picker-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  cursor: pointer;
  border: 1px solid var(--c-border);
  background: var(--c-bg-1);
  transition: background var(--fast) ease, border-color var(--fast) ease;
}
.gw-import-picker-row:hover {
  background: color-mix(in srgb, var(--c-accent) 8%, transparent);
  border-color: color-mix(in srgb, var(--c-accent) 28%, var(--c-border));
}
.gw-import-picker-method {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 11px; font-weight: 600; color: var(--c-accent);
  flex: 0 0 auto;
  padding: 1px 5px; border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--c-accent) 12%, transparent);
}
.gw-import-picker-detail {
  font-size: 11px; color: var(--c-text-dim);
  flex: 1 1 auto;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gw-import-picker-count {
  font-size: 10px; color: var(--c-accent);
  font-weight: 600; flex: 0 0 auto;
  white-space: nowrap;
}

/* ── Gateway Type Templates modal ──────────────────────────────────── */
.gw-templates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.gw-tmpl-card {
  display: flex; flex-direction: column; gap: 5px;
  padding: 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-bg-1);
  transition: border-color var(--fast) ease, background var(--fast) ease;
}
.gw-tmpl-card:hover {
  border-color: var(--c-border-hi);
  background: var(--c-bg-2);
}
.gw-tmpl-card-icon {
  font-size: 20px; line-height: 1;
}
.gw-tmpl-card-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.gw-tmpl-card-name {
  font-size: 13px; font-weight: 600; color: var(--c-text);
}
.gw-tmpl-card-desc {
  font-size: 11px; color: var(--c-text-dim); line-height: 1.45;
  margin: 0;
}
.gw-tmpl-card-example {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 10px; color: var(--c-accent);
  background: color-mix(in srgb, var(--c-accent) 8%, transparent);
  padding: 1px 5px; border-radius: var(--r-xs);
  align-self: flex-start;
}
.gw-tmpl-card-apply {
  align-self: flex-end; min-height: 28px; font-size: 11px;
}

/* ── Gateway Import: Clipboard banner ──────────────────────────────── */
.gw-clipboard-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: color-mix(in srgb, var(--c-accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-accent) 22%, var(--c-border));
  border-radius: var(--r-md);
  margin-bottom: 10px;
  position: sticky; top: 0; z-index: 10;
}
.gw-clipboard-banner-emoji {
  font-size: 16px; flex: 0 0 auto;
}
.gw-clipboard-banner-text {
  font-size: 12px; color: var(--c-text);
  flex: 1 1 auto;
}
.gw-clipboard-banner-import {
  flex: 0 0 auto;
}
.gw-clipboard-banner-dismiss {
  flex: 0 0 auto;
  background: none; border: none; cursor: pointer;
  color: var(--c-muted); font-size: 16px; line-height: 1; padding: 0 4px;
  border-radius: var(--r-xs);
}
.gw-clipboard-banner-dismiss:hover { color: var(--c-text); }

/* ── Gateway Import: Pattern preview ───────────────────────────────── */
.gw-pattern-preview {
  display: flex; flex-direction: column; gap: 3px;
  padding: 6px 0 2px;
  margin-top: -2px;
}
.gw-pattern-preview-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; padding: 2px 0;
}
.gw-pattern-preview-icon {
  flex: 0 0 auto; font-size: 12px;
}
.gw-pattern-preview-icon--ok { color: var(--c-success); }
.gw-pattern-preview-icon--fail { color: var(--c-text-dim); }
.gw-pattern-preview-url {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  color: var(--c-text-dim);
  font-size: 11px;
  word-break: break-all;
}

/* 3DS Status box — title-row pill layout + upcoming (coming-soon) rows */
.three-ds-titlerow { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.three-ds-eu,
.three-ds-soon {
  font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  line-height: 1; padding: 3px 6px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  color: color-mix(in srgb, currentColor 72%, transparent);
  background: color-mix(in srgb, currentColor 6%, transparent);
}
.runtime-toggle-row.is-upcoming { opacity: .55; }
.runtime-toggle-row.is-upcoming .toggle-input { cursor: not-allowed; }

/* 3DS Status — normal-size box (in the column flow) with a subtle premium sparkle,
   NOT the full-width is-premium banner. Faint gold tint + a gently twinkling marker. */
.bypass-sec.three-ds-lite {
  border-color: color-mix(in srgb, #e8c079 22%, var(--c-border-hi, rgba(255,255,255,.12)));
  background: linear-gradient(155deg, color-mix(in srgb, #e8c079 6%, transparent), transparent 55%);
}
.three-ds-lite .bypass-sec-eyebrow { color: color-mix(in srgb, #f3cd7e 80%, currentColor); }
.three-ds-lite .bypass-premium-marker {
  display: inline-block;
  animation: threeDsSparkle 2.6s ease-in-out infinite;
  will-change: opacity, transform;
}
@keyframes threeDsSparkle {
  0%, 100% { opacity: .5; transform: scale(.85); }
  50%      { opacity: 1; transform: scale(1.15); text-shadow: 0 0 6px rgba(243,205,126,.75); }
}
@media (prefers-reduced-motion: reduce) {
  .three-ds-lite .bypass-premium-marker { animation: none; }
}
