
/* Radar Panel - Claude Architecture */
.radar {
  flex: 0 0 312px !important;
  width: 312px !important;
  max-width: 312px !important;
  min-width: 312px !important;
  background: var(--surface);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: flex-basis 0.2s ease, max-width 0.2s ease, width 0.2s ease;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 35;
  margin-left: auto;
  flex-shrink: 0 !important;
}
.radar.rail {
  flex: 0 0 64px !important;
  width: 64px !important;
  max-width: 64px !important;
  min-width: 64px !important;
  align-items: center;
  padding: 10px 0;
  gap: 8px;
  overflow: visible;
  flex-shrink: 0 !important;
}
.radar .ro { display: none; }
.radar.rail .ro { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.radar.rail .fo { display: none !important; }

.rdhd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 16px;
  border-bottom: 1px solid var(--line);
  font: 700 14px Manrope, sans-serif;
  min-height: 52px;
}
.rdhd .ic { color: var(--accent); }
.rsec { border-bottom: 1px solid var(--line); }
.rsh {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: 0;
  color: var(--muted);
  font: 600 11px Inter, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  min-height: 40px;
}
.rsh:hover { color: var(--text); }
.rsh .cv { margin-left: auto; transition: transform 0.15s ease; }
.rsh[aria-expanded="true"] .cv { transform: rotate(90deg); }
.rsh[aria-expanded="false"] .cv { transform: rotate(0deg); }
.rsh .cnt { margin-left: 4px; }
.rbd {
  padding: 0 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}
.rbd.hidden { display: none !important; }
.rrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text2);
  min-height: 32px;
  text-decoration: none;
}
.rrow:hover { background: var(--hover); color: var(--text); }
.rrow .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow .m { font: 11.5px ui-monospace, monospace; color: var(--muted); white-space: nowrap; }
.ring {
  width: 20px;
  height: 20px;
  border-radius: 99px;
  background: conic-gradient(var(--primary) calc(var(--p, 38) * 1%), var(--line2) 0);
  -webkit-mask: radial-gradient(circle, transparent 5.5px, #000 6px);
  mask: radial-gradient(circle, transparent 5.5px, #000 6px);
}
.cdot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--ok);
}

/* Zynovyz UI Design System — Claude Visual Direction Integration
 * Approved Dark Workspace: #14121e | Panels/Elevated: #1a1924 | Borders: #2b2938
 * Approved baseline token: --surface: #172438
 * Zero external font runtime dependencies; strictly self-contained CSP compliant.
 */

:root, body.charcoal, .z.charcoal {
  color-scheme: dark;
  --surface-approved-baseline: #172438; /* Approved dark surface token: --surface: #172438 */
  --canvas: #14121e;
  --chrome: #1a1924;
  --surface: #1a1924;
  --raised: #23212e;
  --hover: #2a2835;
  --line: #2a2835;
  --line2: #605e67;
  --ctl: #77757F;
  --text: #FFFFFF;
  --text2: #D7D5DF;
  --muted: #A9A7B3;
  --primary: #0AAECF;
  --onprimary: #14121e;
  --accent: #0AAECF;
  --em: #17AC80;
  --ok: #67D9BB;
  --okbg: rgba(23, 172, 128, 0.14);
  --warn: #FCD38D;
  --warnbg: rgba(252, 211, 141, 0.12);
  --bad: #FFB4AB;
  --badbg: rgba(255, 180, 171, 0.12);
  --info: #7FD8EC;
  --infobg: rgba(10, 174, 207, 0.13);
  --focus: #0AAECF;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--line2);
  --r-xs: 5px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-xl: 12px;
  --h-sm: 28px;
  --h-md: 32px;
  --h-lg: 40px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --fast: 0.12s;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.navy, .z.navy {
  color-scheme: dark;
  --surface-approved-baseline: #172438; /* Approved dark surface token: --surface: #172438 */
  --canvas: #0E1624;
  --chrome: #101928;
  --surface: #172438;
  --raised: #1D2C44;
  --hover: #22334D;
  --line: #22324A;
  --line2: #2D405C;
  --ctl: #71839A;
  --text: #FFFFFF;
  --text2: #D3DEEB;
  --muted: #A7B8CC;
  --primary: #0AAECF;
  --onprimary: #101928;
  --accent: #0AAECF;
  --em: #17AC80;
  --ok: #67D9BB;
  --okbg: rgba(23, 172, 128, 0.14);
  --warn: #FCD38D;
  --warnbg: rgba(252, 211, 141, 0.12);
  --bad: #FFB4AB;
  --badbg: rgba(255, 180, 171, 0.12);
  --info: #7FD8EC;
  --infobg: rgba(10, 174, 207, 0.13);
  --focus: #0AAECF;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--line2);
}

body.light, .light {
  color-scheme: light;
  --surface-approved-baseline: #172438; /* Approved dark surface token: --surface: #172438 */
  --canvas: #F6FAFD;
  --chrome: #FFFFFF;
  --surface: #FFFFFF;
  --raised: #FFFFFF;
  --hover: #EEF4F9;
  --line: #E1E9F1;
  --line2: #CBD7E3;
  --ctl: #64748B;
  --text: #101928;
  --text2: #24344A;
  --muted: #536477;
  --primary: #096B83;
  --onprimary: #FFFFFF;
  --accent: #096B83;
  --ok: #0A7256;
  --okbg: #E3F5EE;
  --warn: #92400E;
  --warnbg: #FDF1DE;
  --bad: #B42318;
  --badbg: #FCE9E7;
  --info: #096B83;
  --infobg: #E2F4F8;
  --focus: #096B83;
  --shadow: 0 1px 2px rgba(16, 25, 40, 0.05);
  --shadow-pop: 0 16px 40px rgba(16, 25, 40, 0.16), 0 0 0 1px var(--line);
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--line2) transparent;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line2);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--text);
  overflow-x: hidden;
  min-width: 320px;
}

h1, h2, h3, h4 {
  font-family: Manrope, Inter, system-ui, sans-serif;
  margin: 0;
  letter-spacing: -0.015em;
  color: var(--text);
}

h1 { font-size: 26px; font-weight: 700; line-height: 1.25; }
h2 { font-size: 18px; font-weight: 700; line-height: 1.3; }
h3 { font-size: 14px; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(10, 174, 207, 0.18);
  border-radius: 6px;
}

/* Icons via CSS Masking */
.ic {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: none;
  background: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.ic.s { width: 14px; height: 14px; }
.ic.l { width: 20px; height: 20px; }
.ic.xl { width: 24px; height: 24px; }

.i-activity { -webkit-mask-image: url(/icons/activity.svg); mask-image: url(/icons/activity.svg); }
.i-alert { -webkit-mask-image: url(/icons/alert.svg); mask-image: url(/icons/alert.svg); }
.i-arrow { -webkit-mask-image: url(/icons/arrow.svg); mask-image: url(/icons/arrow.svg); }
.i-bag { -webkit-mask-image: url(/icons/bag.svg); mask-image: url(/icons/bag.svg); }
.i-bell { -webkit-mask-image: url(/icons/bell.svg); mask-image: url(/icons/bell.svg); }
.i-bolt { -webkit-mask-image: url(/icons/bolt.svg); mask-image: url(/icons/bolt.svg); }
.i-chat { -webkit-mask-image: url(/icons/chat.svg); mask-image: url(/icons/chat.svg); }
.i-check { -webkit-mask-image: url(/icons/check.svg); mask-image: url(/icons/check.svg); }
.i-chev { -webkit-mask-image: url(/icons/chev.svg); mask-image: url(/icons/chev.svg); }
.i-chevd { -webkit-mask-image: url(/icons/chevd.svg); mask-image: url(/icons/chevd.svg); }
.i-clock { -webkit-mask-image: url(/icons/clock.svg); mask-image: url(/icons/clock.svg); }
.i-cloudoff { -webkit-mask-image: url(/icons/cloudoff.svg); mask-image: url(/icons/cloudoff.svg); }
.i-columns { -webkit-mask-image: url(/icons/columns.svg); mask-image: url(/icons/columns.svg); }
.i-copy { -webkit-mask-image: url(/icons/copy.svg); mask-image: url(/icons/copy.svg); }
.i-eye { -webkit-mask-image: url(/icons/eye.svg); mask-image: url(/icons/eye.svg); }
.i-file { -webkit-mask-image: url(/icons/file.svg); mask-image: url(/icons/file.svg); }
.i-filter { -webkit-mask-image: url(/icons/filter.svg); mask-image: url(/icons/filter.svg); }
.i-gear { -webkit-mask-image: url(/icons/gear.svg); mask-image: url(/icons/gear.svg); }
.i-help { -webkit-mask-image: url(/icons/help.svg); mask-image: url(/icons/help.svg); }
.i-home { -webkit-mask-image: url(/icons/home.svg); mask-image: url(/icons/home.svg); }
.i-inbox { -webkit-mask-image: url(/icons/inbox.svg); mask-image: url(/icons/inbox.svg); }
.i-key { -webkit-mask-image: url(/icons/key.svg); mask-image: url(/icons/key.svg); }
.i-lock { -webkit-mask-image: url(/icons/lock.svg); mask-image: url(/icons/lock.svg); }
.i-meter { -webkit-mask-image: url(/icons/meter.svg); mask-image: url(/icons/meter.svg); }
.i-nodes { -webkit-mask-image: url(/icons/nodes.svg); mask-image: url(/icons/nodes.svg); }
.i-play { -webkit-mask-image: url(/icons/play.svg); mask-image: url(/icons/play.svg); }
.i-plug { -webkit-mask-image: url(/icons/plug.svg); mask-image: url(/icons/plug.svg); }
.i-plus { -webkit-mask-image: url(/icons/plus.svg); mask-image: url(/icons/plus.svg); }
.i-radar { -webkit-mask-image: url(/icons/radar.svg); mask-image: url(/icons/radar.svg); }
.i-refresh { -webkit-mask-image: url(/icons/refresh.svg); mask-image: url(/icons/refresh.svg); }
.i-search { -webkit-mask-image: url(/icons/search.svg); mask-image: url(/icons/search.svg); }
.i-server { -webkit-mask-image: url(/icons/server.svg); mask-image: url(/icons/server.svg); }
.i-shield { -webkit-mask-image: url(/icons/shield.svg); mask-image: url(/icons/shield.svg); }
.i-sidebar { -webkit-mask-image: url(/icons/sidebar.svg); mask-image: url(/icons/sidebar.svg); }
.i-sidebarr { -webkit-mask-image: url(/icons/sidebarr.svg); mask-image: url(/icons/sidebarr.svg); }
.i-table { -webkit-mask-image: url(/icons/table.svg); mask-image: url(/icons/table.svg); }
.i-upload { -webkit-mask-image: url(/icons/upload.svg); mask-image: url(/icons/upload.svg); }
.i-wand { -webkit-mask-image: url(/icons/wand.svg); mask-image: url(/icons/wand.svg); }
.i-x { -webkit-mask-image: url(/icons/x.svg); mask-image: url(/icons/x.svg); }

/* App Shell Structure */
.app {
  display: flex;
  min-height: 100vh;
  background: var(--canvas);
  position: relative;
}

/* Nav Drawer Backdrop (Mobile) */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 25, 40, 0.65);
  backdrop-filter: blur(2px);
  z-index: 90;
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.nav-backdrop.active {
  display: block;
  opacity: 1;
}

/* Nav Sidebar */
.nav {
  flex: 0 0 240px;
  max-width: 240px;
  min-width: 0;
  background: var(--chrome);
  border-right: 1px solid var(--line);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: flex-basis 0.2s ease, max-width 0.2s ease, padding 0.2s ease;
  z-index: 95;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 2px;
  min-height: 36px;
}
.wm {
  height: 22px;
  width: auto;
  display: block;
}
.light .wm.d { display: none; }
body:not(.light) .wm.l { display: none; }
.wm-ic {
  display: none;
  height: 22px;
  width: 22px;
}

/* Workspace selector pill */
.ws {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  position: relative;
}
.ws:hover {
  background: var(--hover);
}
.ws b {
  display: block;
  font-size: 13px;
  color: var(--text);
}
.ws small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.ws .ic {
  margin-left: auto;
  color: var(--muted);
}
.wsav {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font: 700 12px Manrope, sans-serif;
  color: #101928;
  background: linear-gradient(180deg, #0AAECF 0 50%, #17AC80 50% 100%);
  flex: none;
}

.srch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 13px;
  background: var(--canvas);
  cursor: pointer;
}
.srch:hover {
  color: var(--text);
  border-color: var(--line2);
}
.srch .kbd {
  margin-left: auto;
}

.nl {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nh {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 10px 4px;
}
.nl button, .nl a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--text2);
  font-size: 13.5px;
  font-weight: 500;
  min-height: 36px;
  width: 100%;
  text-align: left;
  position: relative;
  transition: background 100ms ease, color 100ms ease, transform 60ms ease;
}
.nl button:hover:not(.disabled), .nl a:hover:not(.disabled) {
  background: var(--hover);
  color: var(--text);
}
.nl button:active:not(.disabled), .nl a:active:not(.disabled) {
  transform: scale(0.985);
  transition: transform 40ms ease;
}
.nl button.active, .nl a.active {
  background: var(--raised);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--primary);
  font-weight: 600;
}
.nl button.disabled {
  color: var(--ctl);
  cursor: not-allowed;
  opacity: 0.6;
}
.nl button.sub, .nl a.sub {
  padding-left: 28px;
}

.cnt {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--warnbg);
  color: var(--warn);
}
.cnt-neutral {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--raised);
  border: 1px solid var(--line2);
  color: var(--muted);
}

.nf {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.health {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  padding: 4px 10px;
}

/* Tooltip (Fixed visibility bug from Claude PR #5) */
.tip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-3px);
  background: var(--text);
  color: var(--canvas);
  font: 600 11.5px Inter, sans-serif;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 100ms ease, transform 100ms ease, visibility 100ms ease;
  z-index: 100;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.tip.lft {
  left: auto;
  right: calc(100% + 10px);
  transform: translateY(-50%) translateX(3px);
}
.tip .kbd {
  margin-left: 6px;
  background: transparent;
  color: inherit;
  border-color: currentColor;
  opacity: 0.7;
}
a:hover > .tip, a:focus-visible > .tip,
button:hover > .tip, button:focus-visible > .tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Collapsible Rail Nav */
.nav.rail {
  flex: 0 0 64px;
  max-width: 64px;
  padding: 14px 10px;
  align-items: center;
}
.nav.rail .brand {
  flex-direction: column;
  gap: 12px;
  padding: 0;
  width: 100%;
  align-items: center;
}
.nav.rail .brand .navtg {
  margin: 0 auto;
}
.nav.rail .wm { display: none !important; }
.nav.rail .wm-ic { display: block; margin: 0 auto; }
.nav.rail .lbl,
.nav.rail .ws > span:not(.wsav),
.nav.rail .ws > .ic,
.nav.rail .srch .kbd,
.nav.rail .srch .lbl,
.nav.rail .nh,
.nav.rail .health .t,
.nav.rail .cnt-neutral {
  display: none !important;
}
.nav.rail .ws {
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  border-radius: 8px;
}
.nav.rail .ws:hover {
  background: var(--hover);
  border-color: var(--line);
}
.nav.rail .ws .wsav {
  margin: 0;
}
.nav.rail .srch {
  width: 44px;
  height: 38px;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  border-radius: 8px;
}
.nav.rail .srch .ic {
  margin: 0;
}
.nav.rail .nl {
  align-items: center;
  width: 100%;
}
.nav.rail .nl button, .nav.rail .nl a {
  width: 44px;
  height: 40px;
  padding: 0;
  justify-content: center;
  align-items: center;
  min-height: 0;
  margin: 0 auto;
}
.nav.rail .nl button.sub, .nav.rail .nl a.sub {
  padding-left: 0;
}
.nav.rail .cnt {
  position: absolute;
  top: 1px;
  right: 0;
  padding: 0 5px;
  font-size: 10px;
  line-height: 16px;
}
.nav.rail .nf {
  width: 100%;
  align-items: center;
}
.nav.rail .health {
  padding: 4px 0;
  justify-content: center;
  width: 100%;
}
.nav:not(.rail) .nl .tip,
.nav:not(.rail) .ws .tip,
.nav:not(.rail) .srch .tip {
  display: none;
}

/* Main Content Area */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Topbar & Identity Lens */
.top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--chrome);
  min-height: 52px;
  position: sticky;
  top: 0;
  z-index: 40;
  flex-wrap: nowrap;
}
.menu-btn {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.menu-btn:hover {
  background: var(--hover);
  color: var(--text);
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.crumbs b {
  color: var(--text);
  font-weight: 600;
}

.lens {
  display: flex;
  align-items: center;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 12px;
  background: var(--surface);
  height: 34px;
  flex-shrink: 0;
}
.lens span {
  padding: 0 10px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.lens span:last-child {
  border-right: 0;
}
.lens b {
  color: var(--text);
  font-weight: 600;
  margin-left: 4px;
}

/* Workspace Switcher in Header */
.ws-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  height: 34px;
}
.ws-switcher-lbl {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  line-height: 1;
  user-select: none;
}
.ws-switcher-select {
  height: 34px;
  min-height: 34px;
  padding: 0 28px 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A7B8CC' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  color: var(--text);
  font: 500 12.5px Inter, sans-serif;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  white-space: nowrap;
  outline: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.ws-switcher-select:hover {
  background-color: var(--hover);
  border-color: var(--line2);
  color: var(--text);
}
.ws-switcher-select:focus-visible {
  border-color: var(--primary);
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.ws-switcher-select option {
  background: var(--surface);
  color: var(--text);
}
body.light .ws-switcher-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23536477' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.av {
  width: 32px;
  height: 32px;
  border-radius: 99px;
  background: var(--raised);
  border: 1px solid var(--line2);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

/* Main Row: Page + Radar */
.mainrow {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  align-items: stretch;
}

/* Page Layout */
.page {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  max-width: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 28px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* No overflow here: the window must be the scroll container, or the sticky
     bottom bar (.flowbar) sticks to this box and starts below the fold. */
}
.page.hidden {
  display: none !important;
}

.col-hidden {
  display: none !important;
}

.ph {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}
.ph .act {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.sub {
  color: var(--muted);
  margin-top: 6px;
  max-width: 720px;
  font-size: 14px;
}

/* Cards & Layout Grids */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 2px 10px rgba(0, 0, 0, 0.14);
  position: relative;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.card.p {
  padding: 20px;
}
.card .hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.card .bd {
  padding: 20px;
}
.card[role="button"] {
  cursor: pointer;
  user-select: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 60ms ease;
}
.card[role="button"]:hover {
  border-color: var(--line2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 4px 16px rgba(0, 0, 0, 0.22);
}
.card[role="button"]:hover .row.b.color-primary .ic {
  transform: translateX(4px);
}
.card[role="button"]:active {
  transform: scale(0.992);
  transition: transform 40ms ease;
}
.row.b.color-primary .ic {
  transition: transform 120ms ease;
}

/* Signature Z-cap Motif */
.zcap::before {
  content: "";
  position: absolute;
  left: 18px;
  top: -1px;
  width: 44px;
  height: 2px;
  background: #0AAECF;
  border-radius: 0 0 2px 2px;
}
.zcap::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -1px;
  width: 44px;
  height: 2px;
  background: #17AC80;
  border-radius: 2px 2px 0 0;
}

.g4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.g3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.g2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* Metric & Stat Cards */
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.col.stat {
  gap: 8px;
}
.stat .v {
  font-family: Manrope, Inter, system-ui, sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.stat .k {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.card.p.stat {
  padding: 16px 18px;
}
.card.flat, .flat {
  box-shadow: none;
}
.split {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}
.split > .l {
  flex: 999 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.split > .r {
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Utility Flex & Typography */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.sp { margin-left: auto; }
.muted { color: var(--muted); }
.t2 { color: var(--text2); }
.sm { font-size: 12.5px; }
.xs { font-size: 11px; }
.b { font-weight: 600; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12.5px; }
.text-strike { text-decoration: line-through; opacity: 0.7; }

.ava {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font: 700 12px Manrope, sans-serif;
  background: var(--raised);
  border: 1px solid var(--line2);
  color: var(--text);
  flex: none;
}
.ava-accent { color: var(--primary); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font: 600 13px Inter, sans-serif;
  border: 1px solid var(--line2);
  background: var(--raised);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: background 100ms ease, border-color 100ms ease, transform 60ms ease, box-shadow 100ms ease;
  user-select: none;
}
.btn:hover:not(:disabled) {
  background: var(--hover);
  border-color: var(--ctl);
}
.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
  box-shadow: none;
  transition: transform 40ms ease-out;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn.p {
  background: var(--primary);
  color: var(--onprimary);
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn.p:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 2px 8px rgba(10, 174, 207, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn.p:active:not(:disabled) {
  filter: brightness(0.96);
  transform: translateY(1px) scale(0.985);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}
.btn.g {
  background: transparent;
  border-color: transparent;
  color: var(--text2);
  box-shadow: none;
}
.btn.g:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text);
}
.btn.d {
  background: transparent;
  color: var(--bad);
  border-color: rgba(255, 180, 171, 0.35);
  box-shadow: none;
}
.btn.d:hover:not(:disabled) {
  background: var(--badbg);
  border-color: var(--bad);
}
.btn.sm {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 6px;
}
.btn.lg {
  min-height: 42px;
  padding: 0 20px;
  font-size: 14px;
}
.btn.ico {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  flex-shrink: 0;
}

.kbd {
  display: inline-flex;
  align-items: center;
  font: 600 11px ui-monospace, monospace;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--line2);
  color: var(--muted);
  background: var(--canvas);
}
.btn.p .kbd {
  background: rgba(16, 25, 40, 0.18);
  border-color: rgba(16, 25, 40, 0.25);
  color: inherit;
}

/* Pills & Badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 99px;
  border: 1px solid var(--line2);
  color: var(--text2);
  white-space: nowrap;
}
.pill.ok { color: var(--ok); background: var(--okbg); border-color: transparent; }
.pill.warn { color: var(--warn); background: var(--warnbg); border-color: transparent; }
.pill.bad { color: var(--bad); background: var(--badbg); border-color: transparent; }
.pill.info { color: var(--info); background: var(--infobg); border-color: transparent; }
.dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: currentColor;
  flex: none;
}
.dot-ok { color: var(--ok); }
.dot-bad { color: var(--bad); }
.dot-warn { color: var(--warn); }

/* Risk Badges (distinct shapes for accessibility) */
.rk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 11px ui-monospace, monospace;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.rk::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  background: currentColor;
}
.rk.read { color: var(--ok); }
.rk.read::before { border-radius: 99px; }
.rk.write { color: var(--warn); }
.rk.write::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 9px; height: 8px; }
.rk.del { color: var(--bad); }
.rk.del::before { border-radius: 1px; }
.rk.admin { color: var(--bad); }
.rk.admin::before { transform: rotate(45deg); }
.rk.fin { color: var(--warn); }
.rk.fin::before { content: "$"; background: none; width: auto; height: auto; }

/* Tables & Lists */
.scroll {
  overflow-x: auto;
  max-width: 100%;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.tbl th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: var(--raised);
}
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  transition: background 80ms ease;
}
.tbl tr:last-child td {
  border-bottom: 0;
}
.tbl tr:hover td {
  background: var(--hover);
}

.li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  transition: background 100ms ease;
}
.li:last-child {
  border-bottom: 0;
}
.li:hover {
  background: rgba(255, 255, 255, 0.02);
}
.li.highlight {
  background: var(--raised);
  box-shadow: inset 3px 0 0 var(--primary);
}

/* Cascading Policy Gate Stack */
.gate-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.gate-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 9px;
  transition: background 120ms ease, border-color 120ms ease;
}
.gate-num {
  width: 24px;
  height: 24px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--line2);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}
.gate-content {
  flex: 1;
  min-width: 0;
}
.gate-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.gate-desc {
  font-size: 11.5px;
  color: var(--muted);
}
.gate-status {
  flex-shrink: 0;
}
.gate-item.blocked {
  border-color: rgba(220, 53, 69, 0.35);
  background: rgba(220, 53, 69, 0.04);
}
.gate-item.blocked .gate-num {
  color: var(--bad);
  border-color: var(--bad);
}

.gov-status-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--raised);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.divider {
  height: 1px;
  background: var(--line);
  width: 100%;
}
.w-full {
  width: 100%;
}
.space-between {
  justify-content: space-between;
}
.wrap-gap-8 {
  flex-wrap: wrap;
  gap: 8px;
}
.tracking {
  letter-spacing: 0.06em;
}

/* Lean Operational Summary Strip (Activity & Audit) */
.audit-summary-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 18px;
  flex-wrap: wrap;
}
.audit-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.audit-summary-divider {
  width: 1px;
  height: 32px;
  background: var(--line);
}

/* Radar Attention & Quiet States */
.radar-alert-card {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.radar-alert-card.bad {
  border-color: rgba(220, 53, 69, 0.4);
  background: rgba(220, 53, 69, 0.06);
}
.radar-quiet-state {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.radar-quiet-state .dot {
  margin-top: 4px;
  flex-shrink: 0;
}

/* Effective-permission chain (legacy compatibility) */
.chain {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.lnk {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
}
.lnk .bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}
.lnk .bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #0AAECF, #17AC80);
  transition: width 200ms ease;
}
.lnk .n {
  font: 600 12px ui-monospace, monospace;
  text-align: right;
  color: var(--text2);
}
.lnk.eff {
  padding-top: 10px;
  border-top: 1px dashed var(--line2);
  font-weight: 700;
}
.lnk.eff .bar {
  height: 10px;
}

/* Width utilities for meters */
.w-100 { width: 100%; }
.w-80 { width: 80%; }
.w-60 { width: 60%; }
.w-40 { width: 40%; }
.w-38 { width: 38%; }
.w-33 { width: 33.33%; }
.w-22 { width: 22%; }
.w-14 { width: 14%; }
.w-0 { width: 0%; }

/* Form Controls */
.fld {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.fld label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text2);
}
.inp {
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line2);
  background: var(--canvas);
  color: var(--text);
  font: 13.5px Inter, sans-serif;
  width: 100%;
  outline: none;
  box-sizing: border-box;
  transition: border-color 100ms ease, box-shadow 100ms ease;
}
.inp:hover:not(:disabled) {
  border-color: var(--ctl);
}
.inp:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 174, 207, 0.16);
}
.inp:disabled {
  background: rgba(16, 25, 40, 0.45);
  color: var(--muted);
  border-color: var(--line);
  cursor: default;
}
.hint {
  font-size: 12px;
  color: var(--muted);
}
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: var(--canvas);
  border: 1px solid var(--line);
  user-select: none;
}
.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 12px Inter, sans-serif;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 100ms ease, color 100ms ease, transform 60ms ease;
}
.seg button:hover:not(.on) {
  color: var(--text);
}
.seg button.on {
  background: var(--raised);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.seg button:active {
  transform: scale(0.97);
}

/* Code Block */
.code {
  font: 12px/1.65 ui-monospace, "SF Mono", Consolas, monospace;
  background: #0B121E;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text2);
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
  margin: 0;
  max-height: 260px;
  transition: border-color 100ms ease;
}
.code:focus-visible {
  border-color: var(--primary);
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

/* Banners */
.ban {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: var(--raised);
}
.ban.warn { background: var(--warnbg); border-color: rgba(252, 211, 141, 0.3); }
.ban.warn .ic { color: var(--warn); }
.ban.bad { background: var(--badbg); border-color: rgba(255, 180, 171, 0.3); }
.ban.bad .ic { color: var(--bad); }
.ban.info { background: var(--infobg); border-color: rgba(10, 174, 207, 0.3); }
.ban.info .ic { color: var(--info); }

.tag {
  font: 600 11px ui-monospace, monospace;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--raised);
  border: 1px solid var(--line);
  color: var(--text2);
}
.kv {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 14px;
  font-size: 13px;
}
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); font-weight: 500; }

/* Radar Glance Panel */


.rdhd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid var(--line);
  font: 700 14px Manrope, sans-serif;
  min-height: 52px;
}
.rdhd .ic { color: var(--accent); }

.rsec { border-bottom: 1px solid var(--line); }
.rsh {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: 0;
  color: var(--muted);
  font: 600 11px Inter, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  min-height: 40px;
}
.rsh:hover { color: var(--text); }
.rsh .cv {
  margin-left: auto;
  transition: transform 0.15s ease;
}
.rsh.open .cv {
  transform: rotate(90deg);
}

.rbd {
  padding: 0 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.rbd.hidden { display: none !important; }

.rrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text2);
  min-height: 32px;
  cursor: pointer;
}
.rrow:hover { background: var(--hover); color: var(--text); }
.rrow .t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rrow .m {
  font: 11.5px ui-monospace, monospace;
  color: var(--muted);
  white-space: nowrap;
}

.ptg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  position: relative;
}
.ptg:hover { background: var(--hover); color: var(--text); }

.railbtn {
  position: relative;
  width: 44px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text2);
  font: 700 11px ui-monospace, monospace;
  cursor: pointer;
  padding: 5px 0;
  transition: background 100ms ease, border-color 100ms ease, transform 60ms ease;
  user-select: none;
}
.railbtn:hover { background: var(--hover); border-color: var(--line2); color: var(--text); }
.railbtn:active { transform: scale(0.96); transition: transform 40ms ease; }
.railbtn.bad { color: var(--bad); border-color: var(--bad); background: var(--badbg); }
.railbtn.warn { color: var(--warn); border-color: var(--warn); background: var(--warnbg); }
.railbtn .cdot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--ok);
}
.ring {
  width: 18px;
  height: 18px;
  border-radius: 99px;
  background: conic-gradient(var(--primary) calc(var(--p, 20) * 1%), var(--line2) 0);
  -webkit-mask: radial-gradient(circle, transparent 5px, #000 5.5px);
  mask: radial-gradient(circle, transparent 5px, #000 5.5px);
}

.meter {
  height: 6px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  width: 100%;
}
.meter i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
}
.meter.warn i {
  background: var(--warn);
}

/* Utility Classes for strict CSP compliance (no inline styles) */
.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-14 { margin-top: 14px; }
.mt-auto { margin-top: auto; }
.mb-8 { margin-bottom: 8px; }
.ml-4 { margin-left: 4px; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-14 { gap: 14px; }
.gap-16 { gap: 16px; }
.p-0 { padding: 0; }
.p-4-0 { padding: 4px 0; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }
.w-32-px { width: 32px; }
.w-55-px { width: 55px; }
.w-full { width: 100%; }
.h-1-px { height: 1px; }
.ava-sm { width: 22px; height: 22px; font-size: 11px; }
.ava-lg { width: 44px; height: 44px; font-size: 16px; }
.ava-xl { width: 64px; height: 64px; font-size: 28px; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-30-auto { margin: 30px auto; }
.max-w-480 { max-width: 480px; }
.max-w-680 { max-width: 680px; }
.flex-center { justify-content: center; }
.color-ok { color: var(--ok); }
.color-bad { color: var(--bad); }
.color-primary { color: var(--primary); }
.bg-line { background: var(--line); }
.border-0 { border: 0; }
.border-bad { border-color: var(--bad); }
.highlight-row { background: var(--raised); box-shadow: inset 2px 0 0 var(--primary); }
.split-l-fixed { flex-basis: 360px; }
.split-r-flex { flex: 999 1 480px; }
.h1-mono { font-size: 22px; }
.d-none { display: none; }

/* Responsive Media Queries */
@media (max-width: 1200px) {
  /* Default initial state for mid-sized screens is initialized to rail via JS state */
}

@media (max-width: 992px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr; }
  .g2 { grid-template-columns: 1fr; }
  .page { padding: 22px 20px 40px; }
  .split > .l { flex: 1 1 100%; }
  .split > .r { flex: 1 1 100%; }
}

@media (max-width: 860px) {
  .nav {
    flex: 0 0 64px;
    max-width: 64px;
    padding: 14px 10px;
    align-items: center;
    position: relative;
    left: 0;
    z-index: 10;
  }
  .nav .brand { flex-direction: column; gap: 12px; padding: 0; }
  .nav .wm { display: none !important; }
  .nav .wm-ic { display: block !important; }
  .nav .lbl,
  .nav .ws > span:not(.wsav),
  .nav .ws > .ic,
  .nav .srch .kbd,
  .nav .srch .lbl,
  .nav .nh,
  .nav .health .t {
    display: none !important;
  }
  .nav .ws { padding: 4px; border-color: transparent; background: none; }
  .nav .srch { width: 44px; height: 36px; padding: 0; justify-content: center; }
  .nav .nl { align-items: center; }
  .nav .nl button, .nav .nl a {
    width: 44px;
    height: 40px;
    padding: 0;
    justify-content: center;
    min-height: 0;
  }
  .lens { display: none; }
  .page { padding: 18px 16px 36px; }
}

@media (max-width: 640px) {
  .top {
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .crumbs {
    display: none;
  }
  .ws-switcher-lbl {
    display: none;
  }
  .ws-switcher-select {
    max-width: 140px;
    font-size: 11px;
    padding: 0 20px 0 6px;
    height: 30px;
    min-height: 30px;
  }
  .g4, .g3, .g2 {
    grid-template-columns: 1fr;
  }
  .ph .act {
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
  }
  .ph .act button, .ph .act .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .top { padding: 8px 10px; gap: 6px; }
  .page { padding: 14px 10px 32px; }
  .card.p { padding: 14px 12px; }
  .card .hd { padding: 12px 14px; }
  .card .bd { padding: 14px 12px; }
  .lnk { grid-template-columns: 90px minmax(0, 1fr) 45px; gap: 6px; font-size: 11px; }
  .ws-switcher-select { max-width: 120px; }
}

/* Toast Notification System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--chrome);
  border: 1px solid var(--line2);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 380px;
}
.toast.toast-out {
  animation: toastOut 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.toast .dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  flex-shrink: 0;
}
.toast.info .dot { background: var(--primary); box-shadow: 0 0 6px rgba(10, 174, 207, 0.5); }
.toast.ok .dot { background: var(--ok); box-shadow: 0 0 6px rgba(23, 172, 128, 0.5); }
.toast.warn .dot { background: var(--warn); box-shadow: 0 0 6px rgba(217, 155, 38, 0.5); }
.toast.bad .dot { background: var(--bad); box-shadow: 0 0 6px rgba(220, 53, 69, 0.5); }

/* Quick Jump Command Palette (⌘K) */
.palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 25, 40, 0.72);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  opacity: 1;
  transition: opacity 0.15s ease;
}
.palette-backdrop.hidden {
  display: none;
  opacity: 0;
}
.palette-modal {
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 12px;
  width: 540px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.palette-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--chrome);
}
.palette-input-row .ic {
  color: var(--muted);
  flex-shrink: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.palette-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: Inter, sans-serif;
  font-size: 14px;
}
.palette-input::placeholder {
  color: var(--muted);
}
.palette-list {
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.palette-group-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 10px 4px;
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  font-size: 13.5px;
  transition: background 100ms ease;
}
.palette-item:hover, .palette-item.active {
  background: var(--raised);
}
.palette-item .ic {
  color: var(--muted);
}
.palette-item:hover .ic, .palette-item.active .ic {
  color: var(--primary);
}
.palette-item-text {
  font-weight: 500;
}
.palette-item-meta {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted);
}
.palette-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Breadcrumb links */
.crumb-link {
  cursor: pointer;
  color: var(--muted);
  border-radius: 4px;
  padding: 2px 4px;
  transition: color 120ms ease, background 120ms ease;
}
.crumb-link:hover {
  color: var(--text);
  background: var(--hover);
}
.crumb-link:focus-visible {
  outline: 2px solid var(--focus);
}

/* Checklist item dynamic states */
.li.done {
  opacity: 0.85;
}
.li.highlight {
  background: rgba(10, 174, 207, 0.05);
  border: 1px solid rgba(10, 174, 207, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
}
.li.action-needed {
  background: rgba(220, 53, 69, 0.06);
  border: 1px solid rgba(220, 53, 69, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
}

/* Input validation */
.inp.err {
  border-color: var(--bad) !important;
  box-shadow: 0 0 0 1px var(--bad) inset;
}
.fld .hint.err {
  color: var(--bad);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(8px) scale(0.96); }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   22-SCREEN INVENTORY COMPONENTS & DESIGN SYSTEM UTILITIES
   Strictly compliant with CSP style-src 'self' (zero inline style attributes)
   ========================================================================== */

/* Stepper Component (Import, Consent, ClientAccess, DataStudio) */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  counter-reset: s;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.steps li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 12px 6px 6px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.steps li::before {
  counter-increment: s;
  content: counter(s);
  width: 20px;
  height: 20px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  font-size: 11px;
  background: var(--raised);
  border: 1px solid var(--line2);
}
.steps li.done {
  color: var(--text2);
}
.steps li.done::before {
  content: "✓";
  background: var(--okbg);
  color: var(--ok);
  border-color: transparent;
}
.steps li.cur {
  color: var(--text);
  border-color: var(--accent);
}
.steps li.cur::before {
  background: var(--primary);
  color: var(--onprimary);
  border-color: transparent;
}

/* Custom Checkbox & Radio Helpers */
.chk {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.chk input {
  margin-top: 3px;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* In-API Column Switcher */
.sw {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 700 10.5px ui-monospace, monospace;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 99px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--okbg);
  color: var(--ok);
}
.sw::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: currentColor;
}
.sw.off {
  background: transparent;
  color: var(--muted);
  border-color: var(--line2);
}
.sw.off::before {
  background: transparent;
  border: 1.5px solid currentColor;
  width: 4px;
  height: 4px;
}

/* Column Popover & Filter Chips */
.popw {
  position: relative;
}
.pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 320px;
  z-index: 30;
  background: var(--raised);
  border: 1px solid var(--line2);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  padding: 8px;
}
body.light .pop {
  box-shadow: 0 16px 40px rgba(16, 25, 40, 0.16);
}
.popi {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}
.popi:hover {
  background: var(--hover);
}
.popi input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  margin: 0;
}
.chipbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--text2);
  font: 600 12px Inter, sans-serif;
  cursor: pointer;
}
.chipbtn.on {
  background: var(--infobg);
  color: var(--info);
  border-color: transparent;
}

/* Table Column Headers & Excluded Cell Dimming */
.tbl th .hcell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}
.tbl th .hname {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  gap: 6px;
  align-items: center;
}
.tbl td.ex {
  opacity: 0.45;
  filter: grayscale(40%);
}
.tbl.fit {
  table-layout: auto;
}
.tbl td.num,
.tbl th.num {
  text-align: right;
}
.tbl th.num .hcell {
  align-items: flex-end;
}

/* Chat Layout & Components */
.chat-layout {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  min-height: 720px;
}
.chat-convos {
  flex: 0 0 250px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.chat-messages {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}
.chat-bubble-user {
  align-self: flex-end;
  padding: 10px 14px;
  max-width: 70%;
  background: var(--hover);
  border-radius: 10px;
}
.chat-bubble-asst {
  align-self: flex-start;
  max-width: 85%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-disclosure {
  padding: 14px;
  max-width: 620px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.chat-input-bar {
  padding: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
}
.chat-input-pill {
  padding: 8px 8px 8px 14px;
  background: var(--canvas);
  border-radius: 8px;
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Billing Daily Usage Chart */
.usage-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 160px;
  padding: 10px 0 0;
  border-bottom: 1px solid var(--line);
}
.usage-bar {
  flex: 1;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  transition: height 0.2s ease;
}
.usage-bar.idle {
  background: var(--line2);
}
.bar-h-0 { height: 4px; }
.bar-h-12 { height: 12%; }
.bar-h-18 { height: 18%; }
.bar-h-20 { height: 20%; }
.bar-h-22 { height: 22%; }
.bar-h-28 { height: 28%; }
.bar-h-30 { height: 30%; }
.bar-h-33 { height: 33%; }
.bar-h-35 { height: 35%; }
.bar-h-38 { height: 38%; }
.bar-h-40 { height: 40%; }
.bar-h-41 { height: 41%; }
.bar-h-44 { height: 44%; }
.bar-h-47 { height: 47%; }
.bar-h-48 { height: 48%; }
.bar-h-52 { height: 52%; }
.bar-h-55 { height: 55%; }
.bar-h-58 { height: 58%; }
.bar-h-60 { height: 60%; }
.bar-h-62 { height: 62%; }
.bar-h-64 { height: 64%; }
.bar-h-70 { height: 70%; }
.bar-h-81 { height: 81%; }

/* Data Health Sources & Clocks */
.source-row {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s ease;
}
.source-row:hover {
  background: var(--hover);
}
.source-row.active {
  background: var(--raised);
  box-shadow: inset 3px 0 0 var(--accent);
}
.source-row.active-warn {
  background: var(--raised);
  box-shadow: inset 3px 0 0 var(--warn);
}
.source-row.active-bad {
  background: var(--raised);
  box-shadow: inset 3px 0 0 var(--bad);
}

/* Trace Timeline Nodes */
.trace-node {
  width: 26px;
  height: 26px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  border: 1.5px solid currentColor;
}
.trace-node-ok {
  color: var(--ok);
  border-color: var(--ok);
}
.trace-node-warn {
  color: var(--warn);
  border-color: var(--warn);
}
.trace-node-idle {
  color: var(--line2);
  border-color: var(--line2);
}

/* Precision Layout Utility Classes (Zero-Inline-Styles Compliance) */
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-14 { gap: 14px; }
.gap-16 { gap: 16px; }
.gap-18 { gap: 18px; }

.flex-1 { flex: 1; }
.flex-none { flex: none; }
.flex-auto { flex: 1 1 auto; }
.flex-col { display: flex; flex-direction: column; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-stretch { align-items: stretch; }
.justify-end { justify-content: flex-end; }
.wrap-nowrap { flex-wrap: nowrap; }

.basis-250 { flex: 0 0 250px; }
.basis-300 { flex: 1 1 300px; }
.basis-320 { flex-basis: 320px; }
.basis-360 { flex: 1 1 360px; }
.basis-400 { flex-basis: 400px; }
.basis-480 { flex: 999 1 480px; }

.w-100 { width: 100%; }
.w-auto { width: auto; }
.w-32 { width: 32px; }
.w-150 { width: 150px; }
.w-pct-12 { width: 12%; }
.w-pct-38 { width: 38%; }
.w-pct-42 { width: 42%; }
.w-pct-81 { width: 81%; }
.max-w-280 { max-width: 280px; }
.max-w-520 { max-width: 520px; }
.max-w-620 { max-width: 620px; }
.max-w-680 { max-width: 680px; }
.min-w-0 { min-width: 0; }
.min-w-110 { min-width: 110px; }
.min-h-32 { min-height: 32px; }
.min-h-760 { min-height: 760px; }

.border-0 { border: 0 !important; }
.border-accent { border-color: var(--accent) !important; }
.border-primary { border-color: var(--primary) !important; }
.border-warn { border-color: var(--warn) !important; }
.border-bad { border-color: var(--bad) !important; }
.border-line2 { border-color: var(--line2) !important; }
.border-t-line { border-top: 1px solid var(--line); }
.border-b-line { border-bottom: 1px solid var(--line); }

.bg-transparent { background: transparent !important; }
.bg-raised { background: var(--raised) !important; }
.bg-canvas { background: var(--canvas) !important; }
.bg-surface { background: var(--surface) !important; }

.shadow-raised-accent {
  background: var(--raised) !important;
  box-shadow: inset 2px 0 0 var(--accent);
}
.shadow-modal {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.p-0 { padding: 0 !important; }
.p-0-7 { padding: 0 7px; }
.p-0-12 { padding: 0 12px; }
.p-6-8-10 { padding: 6px 8px 10px; }
.p-6-16 { padding: 6px 6px 6px 16px; }
.p-8-10 { padding: 8px 10px; }
.p-10-12 { padding: 10px 12px; }
.p-10-14 { padding: 10px 14px; }
.p-10-18 { padding: 10px 18px; }
.p-12-14 { padding: 12px 14px; }
.p-12-18 { padding: 12px 18px; }
.p-14 { padding: 14px; }
.p-14-18 { padding: 14px 18px; }
.p-24 { padding: 24px; }
.p-48-56 { padding: 48px 56px; }

.mt-auto { margin-top: auto; }
.mt-8 { margin-top: 8px; }
.mb-8 { margin-bottom: 8px; }
.my-4 { margin: 4px 0; }
.my-10 { margin: 10px 0; }
.self-start { align-self: flex-start; }
.self-center { align-self: center; }

.color-ok { color: var(--ok) !important; }
.color-bad { color: var(--bad) !important; }
.color-warn { color: var(--warn) !important; }
.color-muted { color: var(--muted) !important; }
.color-text { color: var(--text) !important; }
.color-primary { color: var(--primary) !important; }
.color-accent { color: var(--accent) !important; }

.fs-11 { font-size: 11px; }
.fs-13 { font-size: 13px; }
.fs-17 { font-size: 17px; }
.fs-18 { font-size: 18px; }
.fs-20 { font-size: 20px; }
.fs-44 { font-size: 44px; line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; }

.opacity-60 { opacity: 0.6; }
.opacity-65 { opacity: 0.65; }
.opacity-80 { opacity: 0.8; }
.text-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Grid definitions */
.grid-define-spec {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
}

/* == GENERATED UTILITY CLASSES == */
.zy-u1 { gap: 14px; min-height: 196px; }
.zy-u2 { color: var(--accent); }
.zy-u3 { margin-top: 6px; }
.zy-u4 { margin-top: auto; color: var(--accent); }
.zy-u5 { text-decoration: line-through; }
.zy-u6 { background: var(--raised); }
.zy-u7 { width: 22px; height: 22px; font-size: 11px; }
.zy-u8 { padding: 0 12px; flex: 1 1 360px; gap: 8px; }
.zy-u9 { border: 0; background: transparent; }
.zy-u10 { gap: 12px; }
.zy-u11 { margin-top: auto; }
.zy-u12 { gap: 14px; }
.zy-u13 { width: 44px; height: 44px; font-size: 14px; }
.zy-u14 { margin-left: 4px; }
.zy-u15 { background: var(--raised); box-shadow: inset 2px 0 0 var(--accent); }
.zy-u16 { width: 100%; }
.zy-u17 { width: 33%; }
.zy-u18 { width: 22%; }
.zy-u19 { width: 14%; }
.zy-u20 { text-decoration: line-through; opacity: .7; }
.zy-u21 { padding: 12px 18px; border-top: 1px solid var(--line); }
.zy-u22 { gap: 8px; }
.zy-u23 { color: var(--ok); }
.zy-u24 { color: var(--bad); }
.zy-u25 { border-color: var(--accent); }
.zy-u26 { font-size: 22px; }
.zy-u27 { flex-basis: 380px; }
.zy-u28 { flex: 999 1 520px; }
.zy-u29 { margin-bottom: 8px; }
.zy-u30 { gap: 6px; }
.zy-u31 { width: 60px; }
.zy-u32 { color: var(--info); }
.zy-u33 { border-color: var(--bad); }
.zy-u34 { gap: 10px; }
.zy-u35 { border-color: var(--accent); background: var(--raised); }
.zy-u36 { padding: 8px 10px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zy-u37 { color: var(--warn); }
.zy-u38 { gap: 4px; min-width: 110px; }
.zy-u39 { width: 42%; }
.zy-u40 { flex-basis: 320px; }
.zy-u41 { gap: 16px; }
.zy-u42 { align-items: flex-start; gap: 14px; }
.zy-u43 { align-items: center; gap: 0; }
.zy-u44 { width: 26px; height: 26px; font-size: 11px; color: var(--ok); border-color: var(--ok); }
.zy-u45 { flex: 1; }
.zy-u46 { width: 26px; height: 26px; font-size: 11px; color: var(--warn); border-color: var(--warn); }
.zy-u47 { width: 26px; height: 26px; font-size: 11px; color: var(--line2); border-color: var(--line2); }
.zy-u48 { flex: 1 1 300px; align-self: flex-start; }
.zy-u49 { align-items: flex-start; }
.zy-u50 { flex: 1; min-width: 0; }
.zy-u51 { opacity: .65; }
.zy-u52 { flex: 999 1 480px; }
.zy-u53 { font-size: 17px; }
.zy-u54 { gap: 18px; }
.zy-u55 { flex-wrap: nowrap; gap: 16px; min-height: 760px; }
.zy-u56 { flex: 0 0 250px; }
.zy-u57 { padding: 10px 12px; }
.zy-u58 { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.zy-u59 { padding: 24px; gap: 18px; flex: 1; }
.zy-u60 { justify-content: flex-end; }
.zy-u61 { padding: 10px 14px; max-width: 70%; }
.zy-u62 { padding: 14px; max-width: 620px; background: var(--raised); }
.zy-u63 { margin-top: 8px; }
.zy-u64 { max-width: 680px; }
.zy-u65 { margin: 10px 0; }
.zy-u66 { padding: 14px; border-top: 1px solid var(--line); }
.zy-u67 { padding: 8px 8px 8px 14px; background: var(--canvas); }
.zy-u68 { border: 0; background: transparent; padding: 0; }
.zy-u69 { padding: 0 12px; flex: 1; gap: 8px; }
.zy-u70 { border-color: var(--accent); box-shadow: 0 0 0 3px var(--infobg); }
.zy-u71 { width: 38%; }
.zy-u72 { width: 12%; }
.zy-u73 { width: 81%; }
.zy-u74 { display: flex; align-items: flex-end; gap: 4px; height: 160px; }
.zy-u75 { flex: 1; height: 22%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u76 { flex: 1; height: 30%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u77 { flex: 1; height: 18%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u78 { flex: 1; height: 40%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u79 { flex: 1; height: 35%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u80 { flex: 1; height: 28%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u81 { flex: 1; height: 12%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u82 { flex: 1; height: 44%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u83 { flex: 1; height: 52%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u84 { flex: 1; height: 38%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u85 { flex: 1; height: 47%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u86 { flex: 1; height: 60%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u87 { flex: 1; height: 33%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u88 { flex: 1; height: 20%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u89 { flex: 1; height: 48%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u90 { flex: 1; height: 55%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u91 { flex: 1; height: 62%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u92 { flex: 1; height: 41%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u93 { flex: 1; height: 58%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u94 { flex: 1; height: 70%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u95 { flex: 1; height: 64%; background: var(--primary); border-radius: 3px 3px 0 0; }
.zy-u96 { flex: 1; height: 0%; background: var(--line2); border-radius: 3px 3px 0 0; }
.zy-u97 { font-size: 18px; }
.zy-u98 { flex-basis: 400px; }
.zy-u99 { align-items: center; }
.zy-u100 { font-size: 20px; }
.zy-u101 { width: 26px; height: 26px; }
.zy-u102 { padding: 6px 6px 6px 16px; gap: 10px; }
.zy-u103 { max-width: 280px; }
.zy-u104 { max-width: 680px; align-self: center; width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.zy-u105 { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.zy-u106 { border: 0; background: transparent; padding: 0; min-height: 28px; }
.zy-u107 { padding: 10px 18px 4px; }
.zy-u108 { padding: 10px 18px; border-top: 1px solid var(--line); gap: 16px; }
.zy-u109 { opacity: .6; }
.zy-u110 { padding: 10px 14px; gap: 12px; }
.zy-u111 { border: 0; background: transparent; padding: 0; min-height: 30px; flex: 1; }
.zy-u112 { flex-wrap: nowrap; gap: 16px; align-items: stretch; }
.zy-u113 { gap: 10px; align-items: center; }
.zy-u114 { width: 100%; align-self: stretch; }
.zy-u115 { padding: 8px 8px 8px 12px; }
.zy-u116 { padding: 8px 12px; }
.zy-u117 { width: 22px; height: 22px; font-size: 9px; }
.zy-u118 { flex: 1 1 auto; min-width: 0; overflow: auto; background: var(--canvas); background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 20px 20px; }
.zy-u119 { position: relative; width: 1080px; height: 440px; }
.zy-u120 { position: absolute; left: 0; top: 0; pointer-events: none; }
.zy-u121 { position: absolute; left: 24px; top: 150px; width: 190px; border-color: var(--line2); }
.zy-u122 { padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--muted); letter-spacing: .06em; font-weight: 600; }
.zy-u123 { position: absolute; left: 280px; top: 40px; width: 230px; border-color: var(--line2); }
.zy-u124 { position: absolute; left: 280px; top: 270px; width: 230px; border-color: var(--line2); }
.zy-u125 { position: absolute; left: 576px; top: 150px; width: 210px; border-color: var(--line2); }
.zy-u126 { position: absolute; left: 576px; top: 330px; width: 210px; border-color: var(--warn); }
.zy-u127 { position: absolute; left: 852px; top: 150px; width: 200px; border-color: var(--accent); box-shadow: 0 0 0 3px var(--infobg); }
.zy-u128 { position: absolute; left: 700px; top: 262px; }
.zy-u129 { flex-basis: 300px; }
.zy-u130 { padding: 0; border: 0; }
.zy-u131 { align-items: stretch; }
.zy-u132 { min-width: 0; }
.zy-u133 { padding: 10px 18px; border-bottom: 1px solid var(--line); gap: 8px; color: var(--warn); }
.zy-u134 { padding: 10px 18px; border-bottom: 1px solid var(--line); gap: 12px; }
.zy-u135 { width: 150px; min-height: 32px; font-size: 13px; padding: 4px 10px; }
.zy-u136 { position: relative; }
.zy-u137 { opacity: .8; }
.zy-u138 { padding: 6px 8px 10px; }
.zy-u139 { padding: 0 8px 8px; gap: 6px; }
.zy-u140 { padding: 6px 0; max-height: 300px; overflow-y: auto; }
.zy-u141 { color: var(--text); }
.zy-u142 { padding: 10px 8px 4px; gap: 10px; flex-wrap: nowrap; }
.zy-u143 { padding: 0 7px; }
.zy-u144 { gap: 4px; text-align: left; color: inherit; font: inherit; cursor: pointer; border-color: var(--line); background: var(--surface); }
.zy-u145 { gap: 4px; text-align: left; color: inherit; font: inherit; cursor: pointer; border-color: var(--accent); background: var(--infobg); }
.zy-u146 { padding: 12px 14px; gap: 18px; }
.zy-u147 { grid-template-columns: 96px minmax(0, 1fr); }
.zy-u148 { flex-basis: 240px; }
.zy-u149 { width: 100%; text-align: left; font: inherit; color: inherit; border: 0; border-bottom: 1px solid var(--line); background: var(--hover); cursor: pointer; }
.zy-u150 { display: block; }
.zy-u151 { width: 100%; text-align: left; font: inherit; color: inherit; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; }
.zy-u152 { padding: 12px 18px; }
.zy-u153 { width: 63%; }
.zy-u154 { margin-bottom: 20px; }
.zy-u155 { gap: 14px; flex-wrap: wrap; align-items: center; }
.zy-u156 { flex: 1 1 240px; min-width: 200px; }
.zy-u157 { border: 0; background: transparent; padding: 0; min-height: 28px; width: 100%; }
.zy-u158 { margin-bottom: 24px; }
.zy-u159 { background: #101928; border-radius: 8px; padding: 5px; height: auto; }
.zy-u160 { height: 18px; width: 18px; display: block; }
.zy-u161 { position: absolute; top: 4px; right: 4px; }
.zy-u162 { gap: 8px; align-items: center; }
.zy-u163 { padding: 0; width: 44px; justify-content: center; }
.zy-u164 { width: 32px; }
.zy-u165 { --p: 38; }
.zy-u166 { gap: 0; width: 100%; }
.zy-u167 { padding: 0; width: 36px; justify-content: center; }
.zy-u168 { flex-direction: column; align-items: stretch; gap: 6px; }
.zy-u169 { font-size: 12px; }
.zy-u170 { color: var(--primary); font-weight: 500; margin-top: 4px; }

/* ==========================================================================
   Shared Components from Claude Canvas v1795386413 (assets/z.css)
   ========================================================================== */

/* Theme Switcher */
.theme-switcher-seg {
  padding: 2px;
  gap: 2px;
  display: inline-flex;
  align-items: center;
}
.theme-btn {
  position: relative;
  min-height: 28px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease);
}
.theme-btn:hover {
  background: var(--hover);
}
.theme-btn.on {
  background: var(--raised);
  box-shadow: 0 0 0 1px var(--line2);
}
.theme-swatch {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 99px;
  box-shadow: inset 0 0 0 1px rgba(127, 127, 140, 0.6);
}
.theme-swatch.charcoal {
  background: #1a1924;
}
.theme-swatch.navy {
  background: #172438;
}
.theme-swatch.light {
  background: #F6FAFD;
}
.theme-btn .tip {
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
}

/* Permission ladder: each layer states what it allows and what it removes */
.ladder {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.ladder li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: start;
  padding: 10px 0;
  position: relative;
}
.ladder li::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 28px;
  bottom: -10px;
  width: 1px;
  background: var(--line2);
}
.ladder li:last-child::before {
  display: none;
}
.ladder .k {
  width: 20px;
  height: 20px;
  border-radius: 99px;
  border: 1px solid var(--line2);
  background: var(--surface);
  display: grid;
  place-items: center;
  font: 700 10.5px Inter, sans-serif;
  color: var(--muted);
  margin-top: 1px;
}
.ladder .n {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.ladder .d {
  font-size: 12.5px;
  color: var(--text2);
  margin-top: 2px;
}
.ladder .cut {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.ladder .c {
  font: 600 12.5px ui-monospace, monospace;
  color: var(--text2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}
.ladder li.eff {
  margin-top: 4px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--raised);
  border: 1px solid var(--line);
}
.ladder li.eff .k {
  border-color: var(--accent);
  color: var(--accent);
}
.ladder li.eff .c {
  color: var(--text);
}

/* Danger actions separator */
.act .sep {
  width: 1px;
  align-self: stretch;
  background: var(--line);
  margin: 4px 4px;
}

/* Flow bar & Context bar: pinned to bottom of page column */
.flowbar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin: 4px -32px -48px;
  padding: 12px 32px;
  background: var(--chrome);
  border-top: 1px solid var(--line);
}
.page > .flowbar {
  margin-top: auto;
}
.flowbar .step {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}
.flowbar .step b {
  color: var(--text2);
  font-weight: 600;
}
.flowbar .go {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.flowbar .go .hint {
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flowbar .what {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 13px;
  color: var(--text2);
}
.flowbar .what b {
  color: var(--text);
  font-weight: 600;
}
.flowbar .what .t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flowbar.ctx {
  animation: barin 0.16s var(--ease);
}
.flowbar.ctx.confirm {
  border-top-color: color-mix(in srgb, var(--bad) 55%, var(--line));
}
.flowbar .sep {
  width: 1px;
  align-self: stretch;
  background: var(--line);
  margin: 4px 2px;
}
@keyframes barin {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
html:has(.flowbar) {
  scroll-padding-bottom: 88px;
}
@media (max-width: 1279px) {
  .flowbar .step { display: none; }
  .flowbar .go { flex: 1; justify-content: flex-end; }
}
@media (max-width: 640px) {
  .flowbar { margin: 4px -14px -28px; padding: 10px 14px; }
  .flowbar .step { display: none; }
  .flowbar .go { flex: 1; justify-content: flex-end; }
  .flowbar .go .hint { display: none; }
  .flowbar .what .t { white-space: normal; }
  .flowbar.ctx .go .btn.g { display: none; }
}

/* One-line search field */
.sfield {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  height: var(--h-md);
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--ctl);
  border-radius: var(--r-md);
  background: var(--canvas);
  color: var(--muted);
  cursor: text;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.sfield:hover {
  border-color: var(--line2);
}
.sfield:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.sfield input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 13.5px Inter, Arial, sans-serif;
}
.sfield input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.sfield input::-webkit-search-cancel-button {
  display: none;
}
.sfield .kbd {
  flex: none;
}
.sfield.lg {
  height: var(--h-lg);
  padding: 0 6px 0 14px;
}
.sfield input:focus, .sfield input:focus-visible {
  outline: none;
  box-shadow: none;
  border: 0;
}

/* Switch toggle */
.swt {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 99px;
  border: 1px solid var(--line2);
  background: var(--canvas);
  cursor: pointer;
  flex: none;
  padding: 0;
  transition: background var(--fast) var(--ease);
}
.swt::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: var(--muted);
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease);
}
.swt[aria-checked="true"] {
  background: color-mix(in srgb, var(--ok) 30%, transparent);
  border-color: color-mix(in srgb, var(--ok) 60%, transparent);
}
.swt[aria-checked="true"]::after {
  transform: translateX(14px);
  background: var(--ok);
}
.swt:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Table selection checkboxes */
.tbl td.ck, .tbl th.ck {
  width: 36px;
  padding-right: 0 !important;
}
.tbl input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  vertical-align: middle;
}
.tbl tr.picked td {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

/* Empty state */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 40px 24px;
  color: var(--muted);
}
.empty .ic {
  width: 20px;
  height: 20px;
  color: var(--muted);
}
.empty h3 {
  margin-top: 4px;
}
.empty p {
  max-width: 360px;
  font-size: 13px;
}

/* Loading skeleton */
.skel {
  display: block;
  height: 12px;
  border-radius: var(--r-xs);
  background: linear-gradient(90deg, var(--line) 0, var(--hover) 50%, var(--line) 100%);
  background-size: 200% 100%;
  animation: zsk 1.2s linear infinite;
}
@keyframes zsk {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* Utilities for zero inline styles across all screens */
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-14 { gap: 14px; }
.gap-16 { gap: 16px; }
.fb-300 { flex-basis: 300px; }
.fb-320 { flex-basis: 320px; }
.fb-340 { flex-basis: 340px; }
.mb-6 { margin-bottom: 6px; }
.nowrap { white-space: nowrap; }
.al-top { align-items: flex-start; }
.fx1 { flex: 1; min-width: 0; }
.bullet-list { margin: 0; padding-left: 18px; line-height: 1.7; }
.c-ok { color: var(--ok); }
.c-warn { color: var(--warn); }
.c-muted { color: var(--muted); }
.c-bad { color: var(--bad); }
.clickable { cursor: pointer; }
.hidden { display: none !important; }



/* Collapsible context panel & Studio Library/Inspector -> status rail */
.side {
  flex: 0 0 340px;
  max-width: 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: flex-basis 0.2s ease, width 0.2s ease, max-width 0.2s ease;
}
.side.libp:not(.rail) {
  flex: 0 0 232px !important;
  max-width: 232px !important;
  width: 232px !important;
}
.side.rail {
  flex: 0 0 64px !important;
  max-width: 64px !important;
  width: 64px !important;
  min-width: 64px !important;
  align-items: center;
}
.side .ro {
  display: none !important;
}
.side.rail .ro {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.side.rail .fo {
  display: none !important;
}
.side.rail .sidehd {
  justify-content: center;
}
.sidehd {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* NOV-190 review fixes */
.zy-mt10 { margin-top: 10px; }
.zy-grow { flex: 1 1 320px; }
.zy-center { justify-content: center; }
/* Connection: a removed output field is struck through; restoring it widens access. */
.tag.tog { cursor: pointer; font: 600 11.5px ui-monospace, monospace; }
.tag.tog[aria-pressed="false"] { text-decoration: line-through; opacity: .7; }
.inp[aria-invalid="true"] { border-color: var(--bad); }
.row.nw { flex-wrap: nowrap; }
.row.nw > .inp { flex: 1 1 auto; min-width: 0; width: auto; }

/* Sign in (UX-01): brand panel stays dark in every theme; the form follows the theme. */
.si { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r-lg, 10px); overflow: hidden; background: var(--surface); }
.si-brand { flex: 1 1 420px; min-width: 0; background: #101928; color: #FFFFFF; padding: 40px 44px; display: flex; flex-direction: column; gap: 32px; }
.si-wm { height: 28px; width: auto; align-self: flex-start; }
.si-pitch { margin-top: auto; display: flex; flex-direction: column; gap: 16px; max-width: 520px; }
.si-pitch h1 { color: #FFFFFF; font-size: 40px; line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; }
.si-pitch h1 span { color: #0AAECF; }
.si-pitch p { color: #C9D6E6; font-size: 16px; margin: 0; }
.si-ex { background: #152133; border: 1px solid #22324A; border-radius: 10px; padding: 18px; max-width: 520px; }
.si-ex-h { margin-bottom: 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: #A7B8CC; }
.si-ex ol { list-style: none; margin: 0; padding: 0; }
.si-ex li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid #22324A; font-size: 13px; color: #C9D6E6; }
.si-ex li .n { font-family: ui-monospace, monospace; color: #A7B8CC; }
.si-ex li.eff { color: #FFFFFF; font-weight: 700; }
.si-ex li.eff .n { color: #0AAECF; }
.si-legal { font-size: 12px; color: #A7B8CC; margin: 0; }
.si-form { flex: 1 1 400px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.si-inner { width: 100%; max-width: 380px; }
.si-h { font-size: 24px; margin-bottom: 6px; }
.si-or { gap: 12px; } .si-or .hr { flex: 1; height: 1px; background: var(--line); }
.si-ok { width: 40px; height: 40px; color: var(--ok); }
.gap-16 { gap: 16px; }
@media (max-width: 640px) { .si-brand { padding: 28px 22px; } .si-pitch h1 { font-size: 30px; } .si-form { padding: 28px 16px; } }

/* Phones (BUILD-GUIDE §3): Radar moves below the page instead of squeezing it; tabs scroll
   sideways inside themselves; card headers and pill rows wrap; side panels take full width. */
@media (max-width: 640px) {
  .mainrow { flex-direction: column !important; }
  .page { width: 100% !important; }
  .radar, .radar.rail {
    flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; max-width: none !important;
    position: static; height: auto; margin-left: 0; border-left: 0; border-top: 1px solid var(--line);
  }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
  .seg::-webkit-scrollbar { display: none; }
  .seg > button { flex: none; }
  .card > .hd, .hd { flex-wrap: wrap; row-gap: 6px; }
  .page .row { flex-wrap: wrap; }
  .page .row.nw { flex-wrap: nowrap; }
  .pill { max-width: 100%; white-space: normal; }
  .side, .side.rail { flex: 1 1 100% !important; width: auto !important; max-width: 100% !important; }
}
@media (max-width: 640px) {
  .page > .flowbar { margin-left: -10px; margin-right: -10px; padding-left: 10px; padding-right: 10px; }
  .li { flex-wrap: wrap; }
  .hd > .row { min-width: 0; flex: 1 1 100%; }
  .tip { display: none !important; } /* no hover on touch; hidden tooltips must not widen the page */
}
@media (max-width: 640px) {
  /* Chat: the conversation list stacks above the conversation instead of sitting beside it. */
  .zy-u55 { flex-wrap: wrap; min-height: 0; }
  .zy-u56 { flex: 1 1 100%; }
  .zy-u58 { flex: 1 1 100%; }
  .zy-u59 { padding: 14px; }
}
