

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/inter-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/inter-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jetbrains-mono-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root, body {
  color-scheme: light;


  --bg:        #F5F5F6;  
  --surface-1: #FFFFFF;  
  --surface-2: #F4F4F5;  
  --surface-3: #FFFFFF;  

  --row-hover:          rgba(24,24,27,0.04); 
  --row-hover-floating: rgba(24,24,27,0.05);

  --border:        #E4E4E7; 
  --border-bright: #D4D4D8; 

  --text:       #18181B; 
  --text-soft:  #52525B; 
  --text-faint: #6B6B74; 

  --accent:            #C2410C; 
  --accent-fill:       #D63F17; 
  --accent-fill-hover: #C43812; 
  --accent-dim:        rgba(232,69,26,0.08);

  --green:      #166534; 
  --green-dim:  rgba(22,101,52,0.08);
  --yellow:     #92400E; 
  --yellow-dim: rgba(146,64,14,0.08);
  --red:        #DC2626; 
  --red-dim:    rgba(220,38,38,0.07);
  --text-red:   #B91C1C; 

  --rail-bg:         #111113;
  --rail-surface:    #1C1C1F;               
  --rail-surface-2:  #26262A;               
  --rail-border:     rgba(255,255,255,0.10); 
  --rail-hover:      rgba(255,255,255,0.06);
  --rail-active:     rgba(255,255,255,0.09); 
  --rail-text:       #F4F4F5;               
  --rail-text-soft:  #A1A1AA;               
  --rail-text-faint: #8F8F98;               
  --rail-accent:     #F0683E;               

  --card:        var(--surface-1);
  --surface-0:   var(--bg);
  --text-strong: var(--text);
  --text2:       var(--text-soft);
  --muted:       var(--text-soft);

  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-15: 0.9375rem; 
  --fs-16: 1rem;
  --fs-17: 1.0625rem;
  --fs-20: 1.25rem;
  --fs-22: 1.375rem;  
  --fs-28: 1.75rem;

  --font-heading: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --radius-sm:   6px;  
  --radius:      8px;  
  --radius-lg:   12px; 
  --radius-pill: 999px;

  --rail-w:    248px;
  --nav-w:     248px;
  --main-x:    var(--space-6); 
  --drawer-w:  480px;
  --actions-w: 340px;
  --topbar-h:  64px;
  --acting-h:  32px; 

  --t-fast: 150ms ease-out;
}

:root, body {
  --purple:     var(--text-soft);    
  --purple-dim: var(--surface-2);    
  --blue:       var(--text-soft);    
  --blue-dim:   var(--surface-2);    
  --teal:       var(--text-soft);    
  --teal-dim:   var(--surface-2);    
  --accent-mid: var(--accent-dim);   
  --accent-hover: var(--accent-fill-hover); 
  --border-accent: var(--border-bright);    
  --bg2:        var(--bg);           
  --bg3:        var(--surface-1);    
  --card2:      var(--surface-2);    
  --card-bg:    var(--surface-1);    
}

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

html {
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-14);
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

[hidden] { display: none !important; }

* { scrollbar-width: thin; scrollbar-color: rgba(24,24,27,0.18) transparent; }
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(24,24,27,0.18); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(24,24,27,0.28); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.btn:focus-visible, .btn-icon:focus-visible, .nav-link:focus-visible, .actions-badge:focus-visible { outline-offset: 2px; }
.input:focus-visible, textarea.input:focus-visible, select.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

h1, h2, h3, .heading {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
}
h1 { font-size: var(--fs-20); line-height: 1.2; }
h2 { font-size: var(--fs-16); line-height: 1.25; }
h3 { font-size: var(--fs-14); line-height: 1.3; }

.page-title {
  font-family: var(--font-body);
  font-size: var(--fs-17);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
}
.page-sub {
  font-size: var(--fs-13);
  color: var(--text-soft);
  font-family: var(--font-body);
}
.section-label {
  font-family: var(--font-body);
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.hero-figure {
  font-family: var(--font-heading);
  font-size: var(--fs-28);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.mono { font-family: var(--font-mono); }
.tabular { font-variant-numeric: tabular-nums; }
.text-soft { color: var(--text-soft); }
.text-faint { color: var(--text-faint); }
.empty-val { color: var(--text-faint); }

.app-shell {
  display: flex;
  min-height: 100vh;
}
.main {
  margin-left: var(--nav-w);
  --main-x: var(--space-6);   
  padding: 0 var(--main-x) var(--space-7);
  min-height: 100vh;
  min-width: 0;
  flex: 1;
}

.sidebar {
  width: var(--rail-w);
  height: 100vh;
  background: var(--rail-bg);
  border-right: 1px solid var(--rail-bg);
  color: var(--rail-text);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: var(--space-3);
  position: fixed;
  left: 0; top: 0;
  z-index: 200;
  overflow: visible;
}
.swm-rail.is-inflow {
  position: sticky;
  top: 0;
  flex: 0 0 var(--rail-w);
}
.rail-brand {
  grid-row: 1;
  position: relative;
  padding-bottom: var(--space-2);
  min-width: 0;
}
.rail-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--rail-text);
  border-radius: var(--radius-sm);
  min-width: 0;
}
.rail-wordmark-text {
  font-family: var(--font-body);
  font-size: var(--fs-13);
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rail-mark {
  width: 24px; height: 24px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-soft);
}
.rail-mark svg { width: 16px; height: 16px; display: block; }

.rail-groups {
  grid-row: 3;
  overflow-y: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.rail-group { display: flex; flex-direction: column; gap: 2px; }
.rail-group + .rail-group { margin-top: var(--space-3); }
.rail-group-label {
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--rail-text-faint);
  padding: var(--space-2) 10px var(--space-1);
}
.rail-group.is-creator .rail-group-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logo { display: none; }
.sidebar-spacer { height: 1px; background: var(--rail-border); margin: var(--space-2) 0; }
.sidebar-bottom { display: flex; flex-direction: column; gap: var(--space-1); }

.nav-link {
  display: flex; align-items: center; gap: 12px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--rail-text-soft);
  font-size: var(--fs-14);
  font-weight: 500;
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
  position: relative;
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.75; }
.nav-link .nav-label { overflow: hidden; text-overflow: ellipsis; }
.nav-link:hover { color: var(--rail-text); background: var(--rail-hover); }
.nav-link.active, .nav-link[aria-current="page"] {
  color: var(--rail-text);
  background: var(--rail-active);
  box-shadow: none;
}
.nav-link.active svg, .nav-link[aria-current="page"] svg { color: var(--rail-accent); }
.nav-link::after { content: none; }

.rail-search {
  grid-row: 2;
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  min-height: 36px;
  margin: 0 0 var(--space-3);
  padding: 0 10px;
  border: 1px solid var(--rail-border);
  border-radius: var(--radius);
  background: none;
  color: var(--rail-text-faint);
  font-family: var(--font-body);
  font-size: var(--fs-13);
  text-align: left;
  cursor: pointer;
}
.rail-search:hover { color: var(--rail-text); background: var(--rail-hover); }
.rail-search svg { width: 16px; height: 16px; flex-shrink: 0; }
.rail-search .nav-label { flex: 1; min-width: 0; }
.rail-search-key { font-size: var(--fs-12); color: var(--rail-text-faint); border: 1px solid var(--rail-border); border-radius: var(--radius-sm); padding: 0 5px; line-height: 18px; }

.rail-footer {
  grid-row: 4;
  padding-top: var(--space-3);
  border-top: 1px solid var(--rail-border);
  display: flex; flex-direction: column; gap: var(--space-1);
}
.rail-user {
  display: flex; flex-direction: column;
  padding: 2px 10px 4px;
  min-width: 0;
}
.rail-user-text { min-width: 0; display: flex; flex-direction: column; }
.rail-user-name { font-size: var(--fs-13); font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-user-role { font-size: var(--fs-12); color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .rail-user-name { color: var(--rail-text); }
.sidebar .rail-user-role { color: var(--rail-text-faint); }
.rail-signout {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--text-faint);
  font-size: var(--fs-12);
  text-decoration: none;
  transition: color var(--t-fast), background var(--t-fast);
}
.rail-signout:hover { color: var(--text); background: var(--row-hover); }
.sidebar .rail-signout { color: var(--rail-text-faint); }
.sidebar .rail-signout:hover { color: var(--rail-text); background: var(--rail-hover); }
.rail-signout svg { width: 14px; height: 14px; }
.rail-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(16,16,20,0.40);
  z-index: 199;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 700;
  display: inline-flex; align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--surface-3);
  border: 1px solid var(--border-bright);
  color: var(--text);
  font-size: var(--fs-13);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(calc(-100% - 20px));
}
.skip-link:focus-visible { transform: none; }

.rail-switch {
  display: flex; align-items: center; gap: var(--space-2);
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--rail-text);
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.rail-switch:not(.is-static) {
  background: var(--rail-surface);
  border: 1px solid var(--rail-border);
}
.rail-switch:not(.is-static):hover { background: var(--rail-surface-2); border-color: rgba(255,255,255,0.18); }
.rail-switch[aria-expanded="true"] { background: var(--rail-surface-2); border-color: rgba(255,255,255,0.18); }
.rail-switch[aria-busy="true"] { cursor: progress; }
.rail-switch.is-static { cursor: default; }
.rail-switch.is-static:hover { background: none; }
.rail-switch-name {
  flex: 1; min-width: 0;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--rail-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rail-switch-chevron { display: inline-flex; flex-shrink: 0; color: var(--rail-text-faint); }
.rail-switch-chevron svg { width: 16px; height: 16px; display: block; }
.rail-switch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rail-switch-text .rail-switch-name { flex: none; }
.rail-switch-sub { font-size: var(--fs-12); color: var(--rail-text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .rail-switch .rail-mark { width: 32px; height: 32px; border-radius: var(--radius); background: var(--rail-surface-2); border-color: var(--rail-border); color: var(--rail-text); font-size: var(--fs-13); }
.sidebar .rail-switch .rail-mark svg { width: 18px; height: 18px; }

.rail-switch-menu, .client-pick-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: min(260px, calc(100vw - 24px));
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(16,16,20,0.14), 0 2px 6px rgba(16,16,20,0.06);
  padding: 6px;
  z-index: 450;
  color: var(--text);
}
.client-pick-menu { left: auto; right: 0; }
.rail-switch-menu { top: calc(100% - var(--space-1)); }
.rail-switch-menu [role="menuitem"],
.rail-switch-menu [role="menuitemradio"],
.client-pick-menu [role="menuitem"],
.client-pick-menu [role="menuitemradio"] {
  display: flex; align-items: center; gap: var(--space-2);
  width: 100%;
  min-height: 36px;
  padding: 4px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-13);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.rail-switch-menu [role="menuitem"]:hover,
.rail-switch-menu [role="menuitemradio"]:hover,
.rail-switch-menu [role="menuitem"]:focus,
.rail-switch-menu [role="menuitemradio"]:focus,
.client-pick-menu [role="menuitem"]:hover,
.client-pick-menu [role="menuitemradio"]:hover,
.client-pick-menu [role="menuitem"]:focus,
.client-pick-menu [role="menuitemradio"]:focus {
  background: var(--row-hover-floating);
  outline: none;
}
.rail-switch-menu [aria-disabled="true"],
.client-pick-menu [aria-disabled="true"] {
  color: var(--text-faint);
  cursor: default;
}
.rail-switch-menu [aria-disabled="true"]:hover,
.client-pick-menu [aria-disabled="true"]:hover { background: none; }
.rail-switch-menu [role="separator"],
.client-pick-menu [role="separator"] {
  height: 1px;
  margin: var(--space-1) 4px;
  background: var(--border);
}
.rail-switch-row.is-disabled { color: var(--text-faint); cursor: default; }
.rail-switch-row.is-disabled:hover { background: none; }
.rail-switch-row-mark { display: inline-flex; flex-shrink: 0; }
.rail-switch-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rail-switch-row-name { font-size: var(--fs-13); color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-switch-row-sub { font-size: var(--fs-12); color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-switch-row.is-disabled .rail-switch-row-sub { color: var(--text-faint); }
.rail-switch-row[disabled] { cursor: default; }
.rail-switch-row[disabled]:hover { background: none; }
.rail-switch-row[disabled] .rail-switch-row-name { color: var(--text-soft); }

.rail-switch-check { display: inline-flex; flex-shrink: 0; color: var(--accent); }
.rail-switch-check svg { width: 14px; height: 14px; display: block; }
.rail-switch-sep { height: 1px; margin: var(--space-1) 4px; background: var(--border); }
.rail-switch-label { font-size: var(--fs-12); color: var(--text-faint); padding: var(--space-2) 10px var(--space-1); }
.rail-switch-note  { font-size: var(--fs-12); color: var(--text-soft); padding: 0 10px var(--space-1); }
.rail-switch-find  { padding: 2px 4px var(--space-1); }
.rail-switch-find .input { min-height: 32px; }
.rail-mark.is-initials { font-size: var(--fs-12); font-weight: 600; color: var(--text-soft); letter-spacing: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--topbar-h);
  margin: 0 calc(-1 * var(--main-x, var(--space-6))) var(--space-6);
  padding: var(--space-3) var(--main-x, var(--space-6));
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}
.topbar-left { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }
.topbar-menu {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border-bright);
  background: var(--surface-1);
  color: var(--text-soft);
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topbar-menu svg { width: 16px; height: 16px; }
.topbar-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.topbar-eyebrow { font-size: var(--fs-12); color: var(--text-faint); display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.topbar-eyebrow a {
  display: inline-flex; align-items: center;
  min-height: 28px;
  padding: 0 4px;
  margin: -5px -4px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  text-decoration: underline;
  text-decoration-color: var(--border-bright);
  text-underline-offset: 2px;
}
.topbar-eyebrow a:hover { color: var(--text); text-decoration-color: currentColor; background: var(--row-hover); }
.topbar-eyebrow .crumb-sep { color: var(--text-faint); }
.topbar-eyebrow .topbar-ws { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar-lede { display: none; margin: 0; max-width: 420px; font-size: var(--fs-12); line-height: 12px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 861px) {
  .topbar-heading:has(> .topbar-lede:not([data-off])) { gap: 0; }
  .topbar-lede:not([data-off]) { display: block; }
  .topbar[data-tabs] .topbar-lede { max-width: 320px; }
}
.topbar-title {
  font-family: var(--font-heading);
  font-size: var(--fs-22);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.actions-badge {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: var(--radius);
  background: var(--surface-1);
  border: 1px solid var(--border-bright);
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
  user-select: none;
  font-family: var(--font-body);
}
.actions-badge:hover { border-color: var(--border-bright); color: var(--text); }
.actions-badge svg { width: 18px; height: 18px; }
.actions-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.actions-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--accent-fill); color: #fff;
  font-size: var(--fs-12); font-weight: 600; line-height: 18px; text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--surface-1);
}

.client-pick { position: relative; display: inline-flex; }
.btn.client-pick-btn { min-height: 36px; max-width: 280px; }
.client-pick-btn[aria-expanded="true"] { border-color: var(--border-bright); background: var(--surface-2); color: var(--text); }
.client-pick-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-pick-btn svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--text-faint); }
.btn.client-pick-btn.is-offroster { border-color: rgba(146,64,14,0.45); }
.client-pick-warn { display: inline-flex; align-items: center; flex-shrink: 0; }
.btn.client-pick-btn .client-pick-warn svg { color: var(--yellow); }
.client-pick-initials { display: none; }

.shell-pop-item.shell-acct-help { display: none; }

.btn.help-btn { min-height: 36px; width: 36px; padding: 0; justify-content: center; }
.help-btn svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-soft); }
.help-word { display: none; }
.help-list { margin: 0; }
.help-list dt { font-size: var(--fs-12); color: var(--text-faint); }
.help-list dt:not(:first-child), .help-list dd.skeleton:not(:first-child) { margin-top: var(--space-4); }
.help-list dd { margin: 2px 0 0; font-size: var(--fs-14); line-height: 1.5; color: var(--text); }
.help-list dd.skeleton { height: 41px; margin-left: 0; }
.help-fail { margin: 0; font-size: var(--fs-14); color: var(--text-soft); }
.help-ex {
  margin: var(--space-5) 0 var(--space-3); padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: var(--fs-13); font-weight: 600; color: var(--text);
}
.btn.help-btn { position: relative; }
.help-tip {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  width: max-content; max-width: 240px; padding: 8px 10px;
  border-radius: var(--radius); background: var(--text); color: var(--surface-1);
  font-size: var(--fs-12); font-weight: 500; line-height: 1.4; text-align: left; white-space: normal;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16); pointer-events: none;
}
.help-tip::before { content: ""; position: absolute; top: -4px; right: 14px; width: 8px; height: 8px; background: inherit; transform: rotate(45deg); }
#swm-acct-btn .help-tip { display: none; }

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(16,16,20,0.04);
}
.card-body { padding: 24px; }
.card-body.is-table { padding: 0; }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-3);
  min-width: 0;
}
.card-head-main { min-width: 0; }
.card-head-title { font-size: var(--fs-15); font-weight: 600; color: var(--text); }
.card-head-sub { font-size: var(--fs-13); color: var(--text-soft); margin-top: 2px; }
.card-body > .card-head:first-child {
  margin: -24px -24px 20px;
  padding: 14px 24px;
  min-height: 56px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.card-body.is-table > .card-head:first-child { margin: 0; }
.card-elevated {
  background: var(--surface-1);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(16,16,20,0.04);
}

.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: var(--fs-12);
  color: var(--text-soft);
  letter-spacing: 0;
  text-transform: none;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-weight: 600;
}
.data-table td {
  height: 44px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  vertical-align: middle;
}
.data-table td:first-child { color: var(--text); }
.data-table tr:last-child td { border-bottom: none; }
.card-body.is-table .data-table th:first-child,
.card-body.is-table .data-table td:first-child { padding-left: 24px; }
.card-body.is-table .data-table th:last-child,
.card-body.is-table .data-table td:last-child { padding-right: 24px; }
.data-table tbody tr.is-link { cursor: pointer; }
.data-table tbody tr.is-link:hover td { background: var(--row-hover); color: var(--text); }
.data-table tbody tr.is-link:hover td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.table-wrap { overflow-x: auto; max-width: 100%; scrollbar-width: thin; }
.scroll-hint { font-size: var(--fs-12); color: var(--text-faint); display: inline-flex; align-items: center; gap: 6px; }
.scroll-hint svg { width: 12px; height: 12px; }

.num {
  font-family: var(--font-body);
  font-size: var(--fs-14);
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text);
  white-space: nowrap;
}

.stat { display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; }
.stat-label  { font-size: var(--fs-12); color: var(--text-faint); white-space: nowrap; }
.stat-figure { font-size: var(--fs-16); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-meta   { font-size: var(--fs-12); color: var(--text-faint); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.stat-row {
  display: flex; flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 22px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  line-height: 1.5;
  background: var(--surface-2);
  color: var(--text-soft);           
  border: 1px solid var(--border);
}
.badge-success { background: var(--green-dim);  color: var(--green);    border-color: rgba(22,101,52,0.22); }  
.badge-warning { background: var(--yellow-dim); color: var(--yellow);   border-color: rgba(146,64,14,0.22); }  
.badge-error   { background: var(--red-dim);    color: var(--text-red); border-color: rgba(220,38,38,0.22); }  
.badge-accent  { background: var(--accent-dim); color: var(--text);     border-color: var(--accent); }         
.badge-idle, .badge-nodata { background: var(--surface-2); color: var(--text-soft); border-color: var(--border); }
.badge-live    { background: var(--green-dim);  color: var(--green);    border-color: rgba(22,101,52,0.22); }
.badge-running { background: var(--accent-dim); color: var(--text);     border-color: var(--accent); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-soft);
  font-size: var(--fs-13);
}
.empty-state .empty-icon { color: var(--text-faint); margin-bottom: 10px; display: flex; justify-content: center; }
.empty-state .empty-icon svg { width: 20px; height: 20px; }
.empty-state .empty-title { color: var(--text); font-size: var(--fs-15); font-weight: 600; margin-bottom: 6px; }
.empty-state .empty-line { font-size: var(--fs-14); color: var(--text-soft); max-width: 48ch; margin: 0 auto; line-height: 1.55; overflow-wrap: anywhere; }
.empty-state .empty-actions { display: flex; justify-content: center; gap: var(--space-2); margin-top: var(--space-3); }
.empty-state.is-compact { padding: 24px 20px; }

.notice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--fs-14);
  line-height: 1.5;
}
.notice + .notice { margin-top: var(--space-2); }
#swm-offline { margin-bottom: var(--space-4); }
.notice-icon { flex-shrink: 0; margin-top: 1px; color: var(--text-faint); display: inline-flex; }
.notice-icon svg { width: 16px; height: 16px; }
.notice > svg { flex-shrink: 0; margin-top: 1px; color: var(--text-faint); }
.notice > .notice-text,
.notice > span:not([class]) { flex: 1; min-width: 0; }
.notice > .notice-text ~ *,
.notice > .notice-body ~ *,
.notice > span:not([class]) ~ * { flex: 0 0 auto; }
.notice > .notice-text + *,
.notice > .notice-body + *,
.notice > span:not([class]) + * { margin-left: auto; margin-top: -4px; }
.notice-body { flex: 1; min-width: 0; }
.notice-title { display: block; font-size: var(--fs-14); font-weight: 600; color: var(--text); }
.notice-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.notice.is-info    { border-left-color: var(--border-bright); }
.notice.is-warning { border-left-color: var(--yellow); }
.notice.is-warning .notice-icon, .notice.is-warning > svg { color: var(--yellow); }
.notice.is-error   { border-left-color: var(--red); }
.notice.is-error .notice-icon, .notice.is-error > svg { color: var(--red); }
.notice.is-error .notice-title { color: var(--text-red); }
.notice.is-success { border-left-color: var(--green); }
.notice.is-success .notice-icon, .notice.is-success > svg { color: var(--green); }

.status-line {
  display: inline-flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
  font-size: var(--fs-12);
  color: var(--text-faint);
}
.status-line .status-sep { color: var(--text-faint); }
.status-line.is-row { display: flex; }

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  color: var(--text-faint);
  background: currentColor;
}
.status-dot.good, .status-dot.live, .status-dot.online { color: var(--green); }
.status-dot.stale, .status-dot.warning { color: var(--yellow); }
.status-dot.bad, .status-dot.error     { color: var(--red); }
.status-dot.idle, .status-dot.none, .status-dot.offline, .status-dot.manual { color: var(--text-faint); }
.status-dot:has(svg) {
  width: 12px; height: 12px;
  border-radius: 0;
  background: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.status-dot svg { width: 12px; height: 12px; display: block; }

.freshness {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-12);
  color: var(--text-faint);
  cursor: default;
  position: relative;
}
.freshness .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: var(--text-faint); }
.freshness.fresh  .dot { background: var(--green); }
.freshness.stale  .dot { background: var(--yellow); }
.freshness.old    .dot { background: var(--red); }
.freshness.manual .dot { background: var(--text-faint); }

.input {
  background: var(--surface-1);
  border: 1px solid var(--border-bright);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-14);
  line-height: 1.4;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: var(--radius);
  width: 100%;
  transition: border-color var(--t-fast);
}
.input::placeholder { color: var(--text-faint); }
.input:hover { border-color: #A1A1AA; }
.input:focus { border-color: var(--accent); }
.input:focus::placeholder { color: var(--text-soft); }
.input[aria-invalid="true"] { border-color: var(--red); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 32px; 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='%236B6B74' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
select.input { max-width: 100%; text-overflow: ellipsis; }
select.input option { background: var(--surface-2); color: var(--text); }
textarea.input { resize: vertical; min-height: 88px; line-height: 1.5; }
.drawer .input, .rail-switch-menu .input, .client-pick-menu .input, .palette .input {
  background: var(--surface-2);
  border-color: transparent;
}
.field-label { display: block; font-size: var(--fs-14); font-weight: 500; color: var(--text); margin-bottom: 6px; }
.field-hint  { font-size: var(--fs-13); color: var(--text-soft); margin-top: 6px; line-height: 1.45; }
.field-error { font-size: var(--fs-13); color: var(--text-red); margin-top: 6px; line-height: 1.45; }

.confirm-strip {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--fs-13);
  color: var(--text);
}
.confirm-strip .confirm-text { min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--fs-14);
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
}
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.45; pointer-events: none; cursor: not-allowed; }

.btn-primary {
  background: var(--accent-fill);
  color: #fff;
  border-color: var(--accent-fill);
  font-size: var(--fs-14);
  box-shadow: none;
}
.btn-primary:hover { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); box-shadow: none; }

.btn-ghost {
  background: var(--surface-1);
  color: var(--text);
  border-color: var(--border-bright);
  box-shadow: 0 1px 1px rgba(16,16,20,0.03);
}
.btn-ghost:hover { border-color: #A1A1AA; color: var(--text); background: var(--surface-2); }


.btn-green { background: var(--green-dim); color: var(--green); border-color: rgba(22,101,52,0.25); }
.btn-green:hover { background: rgba(22,101,52,0.14); border-color: rgba(22,101,52,0.40); }

.btn-red { background: var(--red-dim); color: var(--text-red); border-color: rgba(220,38,38,0.30); } 
.btn-red:hover { background: rgba(220,38,38,0.12); border-color: rgba(220,38,38,0.50); }

.btn-sm { min-height: 32px; padding: 5px 12px; font-size: var(--fs-13); border-radius: var(--radius); }
.btn-primary.btn-sm { font-size: var(--fs-13); }
.btn-lg { min-height: 44px; padding: 10px 20px; font-size: var(--fs-15); }
.btn-full { width: 100%; }

.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: var(--radius);
  background: var(--surface-1);
  border: 1px solid var(--border-bright);
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.btn-icon:hover { border-color: var(--border-bright); color: var(--text); }
.btn-icon:disabled { opacity: 0.45; pointer-events: none; cursor: not-allowed; }
.btn-icon svg { width: 16px; height: 16px; }

.btn-inline {
  display: inline-flex; align-items: center;
  min-height: 24px;
  padding: 0 2px;
  margin: -2px 0;
  background: none;
  border: 0;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: inherit;
  cursor: pointer;
  text-decoration: none;
}
.btn-inline:hover { text-decoration: underline; text-underline-offset: 2px; }

:is(.field-hint, .notice-text, .notice-body) a[href]:not(.btn):not(.btn-sm):not(.btn-lg):not(.btn-inline):not(.section-action):not(.badge) {
  padding: 5px 2px;
}

.icon { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; flex-shrink: 0; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 20px; height: 20px; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.section-title {
  font-family: var(--font-body);
  font-size: var(--fs-16);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
}
.section-action {
  display: inline-flex; align-items: center;
  min-height: 24px;
  padding: 0 2px;
  margin: -2px 0;
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  text-decoration: none;
}
.section-action:hover { text-decoration: underline; text-underline-offset: 2px; }

.toast-stack {
  position: fixed;
  top: calc(var(--space-4) + var(--topbar-h) + var(--space-2)); right: 20px;
  display: flex; flex-direction: column; gap: var(--space-2);
  z-index: 9999;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  min-width: 280px; max-width: 400px;
  padding: 12px 14px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(16,16,20,0.14), 0 2px 6px rgba(16,16,20,0.06);
  pointer-events: all;
  animation: toastIn var(--t-fast) forwards;
  color: var(--text);
}
.toast.hide { animation: toastOut var(--t-fast) forwards; }
.toast-icon { flex-shrink: 0; margin-top: 1px; width: 16px; height: 16px; display: inline-flex; color: var(--text-soft); }
.toast-icon svg { width: 16px; height: 16px; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: var(--fs-13); font-weight: 600; color: var(--text); line-height: 1.35; overflow-wrap: anywhere; }
.toast-msg   { font-size: var(--fs-13); color: var(--text-soft); margin-top: 2px; line-height: 1.45; overflow-wrap: anywhere; }
.toast-action {
  display: inline-flex; align-items: center;
  min-height: 28px;
  margin-top: 6px;
  padding: 0 2px;
  background: none;
  border: 0;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: var(--fs-13);
  font-weight: 500;
  cursor: pointer;
}
.toast-action:hover { text-decoration: underline; text-underline-offset: 2px; }
.toast-close {
  width: 28px; height: 28px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.toast-close:hover { color: var(--text); background: var(--row-hover-floating); }
.toast-close svg { width: 12px; height: 12px; }
.toast.success .toast-icon { color: var(--green); }
.toast.error   .toast-icon { color: var(--red); }
.toast.error   .toast-title { color: var(--text-red); }
.toast.warning .toast-icon { color: var(--yellow); }
.toast.info    .toast-icon { color: var(--accent); }

.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(16,16,20,0.40);
  z-index: 400;
  animation: fadeIn var(--t-fast) forwards;
}
.drawer-backdrop.closing { animation: fadeOut var(--t-fast) forwards; }

.drawer {
  position: fixed; top: 0; right: 0;
  width: min(var(--drawer-w), 100vw);
  height: 100vh;
  background: var(--surface-3);
  border-left: 1px solid var(--border);
  z-index: 401;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: slideInRight var(--t-fast) forwards;
  box-shadow: -12px 0 32px rgba(16,16,20,0.16);
}
.drawer.closing { animation: slideOutRight var(--t-fast) forwards; }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  padding: 16px 20px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-title { font-family: var(--font-body); font-size: var(--fs-16); font-weight: 600; color: var(--text); letter-spacing: 0; }
.drawer-sub   { font-size: var(--fs-13); color: var(--text-faint); margin-top: 2px; }
.drawer-body  { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex; gap: var(--space-2);
  justify-content: flex-end;
  flex-shrink: 0;
}

body.palette-open { overflow: hidden; }
.palette-backdrop {
  position: fixed; inset: 0;
  background: rgba(16,16,20,0.40);
  z-index: 600;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh var(--space-4) var(--space-4);
  animation: fadeIn var(--t-fast) forwards;
}
.palette {
  width: min(560px, 100%);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px rgba(16,16,20,0.18), 0 2px 6px rgba(16,16,20,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}
.palette-input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
}
.palette-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: var(--fs-16);
}
.palette-input::placeholder { color: var(--text-faint); }
.palette-list { overflow-y: auto; padding: var(--space-2); }
.palette-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  text-decoration: none;
  font-size: var(--fs-14);
}
.palette-item.is-active, .palette-item:hover { background: var(--row-hover-floating); color: var(--text); }
.palette-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.palette-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.palette-hint { color: var(--text-faint); font-size: var(--fs-12); }
.palette-empty { padding: 24px; text-align: center; color: var(--text-faint); font-size: var(--fs-13); }
.palette-foot {
  display: flex; justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: var(--fs-12);
  color: var(--text-faint);
}

.topbar-menu.is-floating {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 401;
  background: var(--surface-2);
}

.log-wrap { max-height: 380px; overflow-y: auto; }
.log-row {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  border-left: 2px solid transparent;
  font-size: var(--fs-13);
}
.log-row:last-child { border-bottom: none; }
.log-row.agent   { border-left-color: var(--accent); }
.log-row.success { border-left-color: var(--green); }
.log-row.error   { border-left-color: var(--red); }
.log-row.system  { border-left-color: var(--border-bright); }
.log-row.warning { border-left-color: var(--yellow); }
.log-row.info    { border-left-color: var(--border-bright); }
.log-time { font-size: var(--fs-12); color: var(--text-faint); white-space: nowrap; flex-shrink: 0; padding-top: 2px; font-variant-numeric: tabular-nums; }
.log-msg  { color: var(--text-soft); flex: 1; line-height: 1.5; min-width: 0; overflow-wrap: anywhere; }
.log-msg .log-detail { display: block; color: var(--text-faint); font-size: var(--fs-12); margin-top: 2px; }
.log-empty { text-align: center; padding: 40px 20px; color: var(--text-faint); font-size: var(--fs-13); }

.progress-wrap { background: var(--surface-2); border-radius: var(--radius-pill); height: 4px; overflow: hidden; }
.progress-bar  { height: 100%; border-radius: var(--radius-pill); transition: width var(--t-fast); width: 0%; }
.progress-bar.accent { background: var(--accent); }
.progress-bar.green  { background: var(--green); }


nav.sidebar:empty::before {
  content: ""; display: block;
  margin: 20px 16px 0; height: 520px;
  background:
    linear-gradient(var(--surface-2), var(--surface-2)) 0 0 / 120px 16px no-repeat,
    repeating-linear-gradient(to bottom, transparent 0 40px, var(--surface-2) 40px 52px, transparent 52px 68px) 0 24px / 100% 100% no-repeat;
  border-radius: var(--radius-sm);
}

.nav-progress {
  position: fixed; top: 0; left: 0; z-index: 800;
  height: 2px; width: 8%;
  background: var(--accent);
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  pointer-events: none;
  transition: width 600ms cubic-bezier(.2,.7,.2,1);
}
body.is-navigating .nav-progress { width: 80%; }
body.is-navigating .nav-progress.is-complete { width: 100%; transition: width 120ms linear; }
body.is-navigating { cursor: progress; }

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(24,24,27,0.05) 0%, rgba(24,24,27,0.09) 50%, rgba(24,24,27,0.05) 100%);
  background-size: 200% auto;
  animation: shimmer 1.4s linear infinite;
}
.skeleton-line  { height: 12px; }
.skeleton-title { height: 20px; }
.skeleton-block { height: 80px; border-radius: var(--radius-lg); }
.skeleton-row   { height: 36px; border-radius: var(--radius-sm); }
.skeleton-row.is-tall { height: 44px; }
.skeleton-text  { height: 13px; }
.skeleton-stack { display: flex; flex-direction: column; gap: 8px; }
.skeleton-stack.is-loose { gap: var(--space-3); }
.skeleton-card {
  min-height: var(--sk-h, 120px);
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
}
.skeleton-card .skeleton-line:nth-child(1) { width: 60%; }
.skeleton-card .skeleton-line:nth-child(2) { width: 90%; }
.skeleton-card .skeleton-line:nth-child(3) { width: 40%; }
.skeleton-stat { display: flex; flex-direction: column; gap: 6px; }
.skeleton-stat .skeleton-stat-num { height: 28px; width: 72px; }
.skeleton-stat .skeleton-stat-lab { height: 12px; width: 56%; }
[aria-busy="true"].is-skeleton { pointer-events: none; }

.inline-progress {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; vertical-align: middle; color: currentColor;
}
.inline-progress svg { display: block; animation: spin 0.8s linear infinite; }
.btn .inline-progress { margin-right: 6px; }

.run-strip {
  display: flex; align-items: center; gap: var(--space-3);
  flex-wrap: wrap; min-width: 0;
}
.run-strip-track {
  flex: 1 1 160px; min-width: 96px; height: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.run-strip-bar {
  display: block; height: 100%;
  width: calc(var(--pct, 0) * 1%);
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width 300ms ease-out;
}
.run-strip.is-indeterminate .run-strip-bar {
  width: 30%;
  animation: run-slide 1.4s ease-in-out infinite;
}
@keyframes run-slide {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(370%); }
}
.run-strip-label {
  font-size: var(--fs-12); color: var(--text-soft);
  min-width: 0; overflow-wrap: anywhere;
}
.run-strip-cancel { flex: none; }

.actions-drawer { width: var(--actions-w); }

.action-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: var(--space-2);
  transition: border-color var(--t-fast);
}
.action-item:hover { border-color: var(--border-bright); }
.action-item.high   { border-left: 3px solid var(--red); }
.action-item.medium { border-left: 3px solid var(--yellow); }
.action-item.low    { border-left: 3px solid var(--green); }
.action-title { font-size: var(--fs-13); font-weight: 500; color: var(--text); line-height: 1.4; display: flex; align-items: flex-start; gap: 8px; }
.action-priority { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; background: var(--text-faint); }
.action-priority.high { background: var(--red); }
.action-priority.medium { background: var(--yellow); }
.action-priority.low { background: var(--green); }
.action-meta  { font-size: var(--fs-12); color: var(--text-faint); margin-top: 4px; }
.action-btns  { display: flex; gap: 6px; margin-top: 10px; }
.action-item.completing { animation: markDone var(--t-fast) forwards; }

.grid-2, .grid-3, .grid-4, .grid-5 { align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); }

.stagger-in > * { opacity: 1; animation: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

@keyframes slideInRight {
  from { transform: translateX(24px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(24px); opacity: 0; }
}

@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position:  200% center; }
}

@keyframes live-pulse  { from { opacity: 1; } to { opacity: 1; } }
@keyframes pulse-badge { from { opacity: 1; } to { opacity: 1; } }
@keyframes badge-bump  { from { transform: none; } to { transform: none; } }

@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.25; }
  40%           { opacity: 1; }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-4px); }
}

@keyframes markDone {
  0%   { opacity: 1; }
  100% { opacity: 0; transform: scaleY(0.6); max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: 0; overflow: hidden; }
}

@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin 0.8s linear infinite; }

.thinking-dots { display: inline-flex; gap: 4px; align-items: center; }
.thinking-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
}
.thinking-dots span:nth-child(1) { animation: dot-pulse 1.2s ease-in-out infinite 0.0s; }
.thinking-dots span:nth-child(2) { animation: dot-pulse 1.2s ease-in-out infinite 0.2s; }
.thinking-dots span:nth-child(3) { animation: dot-pulse 1.2s ease-in-out infinite 0.4s; }

.kpi-card {
  padding: 20px;
  display: flex; align-items: center; gap: var(--space-4);
}
.kpi-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--surface-2);
  color: var(--text-soft);
}
.kpi-icon svg { width: 18px; height: 18px; }
.kpi-label { font-size: var(--fs-12); color: var(--text-faint); text-transform: none; letter-spacing: 0; font-weight: 500; }
.kpi-val   { font-family: var(--font-body); font-size: var(--fs-16); font-weight: 600; color: var(--text); line-height: 1.2; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: var(--fs-12); margin-top: 4px; font-weight: 500; }
.kpi-delta.up   { color: var(--green); }
.kpi-delta.down { color: var(--red); }
.kpi-delta.flat { color: var(--text-faint); }
.kpi-source { font-size: var(--fs-12); color: var(--text-faint); margin-top: 4px; }

.agent-card {
  padding: 20px;
  display: flex; flex-direction: column; gap: var(--space-3);
  cursor: pointer;
}
.agent-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--surface-2);
  color: var(--text-soft);
}
.agent-icon svg { width: 18px; height: 18px; }

.agent-name  { font-family: var(--font-body); font-size: var(--fs-14); font-weight: 600; color: var(--text); letter-spacing: 0; }
.agent-scope { font-size: var(--fs-12); color: var(--text-faint); margin-top: 2px; }
.agent-desc  { font-size: var(--fs-13); color: var(--text-soft); line-height: 1.55; }

.agent-sources { display: flex; flex-wrap: wrap; gap: 6px; }
.source-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: var(--fs-12); color: var(--text-soft);
  font-family: var(--font-body);
}
.source-pill .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; }
.source-pill.connected .dot { background: var(--green); }
.source-pill.stale .dot     { background: var(--yellow); }
.source-pill.error .dot     { background: var(--red); }

.mini-kanban-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-4); }
.mini-col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  min-width: 0;
}
.mini-col-header {
  font-size: var(--fs-12); font-weight: 500;
  text-transform: none; letter-spacing: 0;
  color: var(--text-faint);
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.mini-col-count {
  font-size: var(--fs-12); font-weight: 600; color: var(--text-soft);
  background: var(--row-hover); padding: 0 7px; border-radius: var(--radius-pill);
}
.mini-col-item {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: var(--fs-12); color: var(--text-soft);
  margin-bottom: 5px;
  transition: border-color var(--t-fast);
  overflow-wrap: anywhere;
}
.mini-col-item:hover { border-color: var(--border-bright); color: var(--text); }

@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;
  }
  .nav-progress,
  .inline-progress,
  .spin,
  .tn-spinner,
  .thinking-dots { display: none !important; }
  .run-strip.is-indeterminate .run-strip-track { display: none !important; }
  .skeleton {
    animation: none !important;
    background: var(--surface-2) !important;
  }
}

@media (max-width: 1180px) {
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  :root, body { --nav-w: 0px; --acting-h: 40px; }
  .main { --main-x: var(--space-4); padding: 0 var(--main-x) var(--space-6); }
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { flex-wrap: wrap; gap: var(--space-3); min-height: 0; margin-bottom: var(--space-4); }
  .topbar-right { flex-wrap: wrap; justify-content: flex-start; }
  .topbar-menu { display: inline-flex; z-index: 401; }
  .mini-kanban-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .card-body { padding: 16px; }
  .card-body.is-table .data-table th:first-child,
  .card-body.is-table .data-table td:first-child { padding-left: 16px; }
  .card-body.is-table .data-table th:last-child,
  .card-body.is-table .data-table td:last-child { padding-right: 16px; }

  .stat-row { flex-direction: column; gap: var(--space-3); }
  .stat { flex-wrap: wrap; }

  .card-head { flex-wrap: wrap; justify-content: flex-start; }
  .card-head .card-head-main { width: 100%; flex: 0 0 100%; }
  .card-body > .card-head:first-child { margin: -16px -16px 16px; padding: 12px 16px; }
  .card-body.is-table > .card-head:first-child { margin: 0; }

  .btn, .btn-sm, .btn-lg, .btn-primary.btn-sm { min-height: 44px; }
  .btn-icon { width: 44px; height: 44px; }
  .actions-badge, .rail-signout, .nav-link, .rail-switch { min-height: 44px; }
  .btn.client-pick-btn { min-height: 44px; }
  .btn.help-btn { min-height: 44px; min-width: 44px; width: 44px; padding: 0; justify-content: center; }
  .actions-badge { width: 44px; }
  .client-pick-menu { left: 0; right: auto; width: min(260px, calc(100vw - 32px)); }
  .btn-inline, .section-action { min-height: 32px; }
  .input { font-size: var(--fs-16); }
  .notice { flex-wrap: wrap; }
  .notice.notice > .notice-text,
  .notice.notice > .notice-body,
  .notice.notice > span:not([class]) { flex-basis: calc(100% - 27px); }
  .notice > .notice-text + *,
  .notice > .notice-body + *,
  .notice > span:not([class]) + * {
    margin-left: 26px;
    margin-top: var(--space-2);
  }

  .sidebar, .swm-rail, .swm-rail.is-inflow {
    position: fixed;
    left: 0; top: 0;
    height: 100vh;
    width: min(280px, 86vw);
    transform: translateX(-100%);
    z-index: 400;
    flex: none;
    box-shadow: none;
  }
  body:not(.rail-open) .sidebar,
  body:not(.rail-open) .swm-rail,
  body:not(.rail-open) .swm-rail.is-inflow {
    visibility: hidden;
    transition: transform var(--t-fast), visibility 0s var(--t-fast);
  }
  body.rail-open .sidebar,
  body.rail-open .swm-rail,
  body.rail-open .swm-rail.is-inflow {
    transform: none;
    visibility: visible;
    transition: transform var(--t-fast), visibility 0s;
    box-shadow: 12px 0 32px rgba(16,16,20,0.28);
  }
  body.rail-open .rail-backdrop { display: block; z-index: 399; }
  body.rail-open { overflow: hidden; }
  body.rail-open .rail-brand { padding-left: 0; }
  body.rail-open .rail-logo { padding-left: 52px; min-height: 44px; }

  .rail-search {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid var(--rail-border);
    border-radius: var(--radius);
    background: none;
    color: var(--rail-text-faint);
    font-family: var(--font-body);
    font-size: var(--fs-14);
    font-weight: 500;
    text-align: left;
    cursor: pointer;
  }
  .rail-search:hover { color: var(--rail-text); background: var(--rail-hover); }
  .rail-search-key { display: none; }
  .rail-search svg { width: 16px; height: 16px; flex-shrink: 0; }

  .rail-switch-menu {
    position: static;
    width: auto;
    padding: var(--space-1) 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: none;
  }
  .rail-switch-menu [role="menuitem"],
  .rail-switch-menu [role="menuitemradio"],
  .client-pick-menu [role="menuitem"],
  .client-pick-menu [role="menuitemradio"] { min-height: 44px; }
  .palette-item { min-height: 44px; }
}
@media (max-width: 560px) {
  .main { --main-x: var(--space-3); padding: 0 var(--main-x) var(--space-6); }
  .topbar { margin-bottom: var(--space-3); }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: minmax(0, 1fr); }
  .kpi-card { padding: 14px; }
  .mini-kanban-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toast { min-width: 0; width: calc(100vw - 40px); }
}

@media (prefers-contrast: more) {
  :root, body {
    --border: #A1A1AA;            
    --border-bright: #71717A;     
    --text-faint: #52525B;        
    --text-soft: #3F3F46;         
    --accent: #9A3412;            
    --rail-border: rgba(255,255,255,0.28);
    --rail-text-soft: #D4D4D8;
    --rail-text-faint: #A1A1AA;
  }
  .btn-primary { background: #9A3412; border-color: #9A3412; color: #fff; } 
}
@media (forced-colors: active) {
  .card, .badge, .nav-link, .input, .status-dot, .notice, .rail-switch { border: 1px solid CanvasText; }
  .nav-link[aria-current="page"] { outline: 2px solid Highlight; }
}





.adv-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-12);
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
}
.adv-pill .adv-pill-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: currentColor; }
.adv-pill.is-yellow { color: var(--yellow); background: var(--yellow-dim); border-color: rgba(234,179,8,0.28); }
.adv-pill.is-green  { color: var(--green);  background: var(--green-dim);  border-color: rgba(34,197,94,0.28); }
.adv-pill.is-red    { color: var(--text-red); background: var(--red-dim);   border-color: rgba(239,68,68,0.28); }  
.adv-pill.is-accent { color: var(--text);   background: var(--accent-dim); border-color: var(--accent); }

.adv-src {
  display: inline-flex; align-items: center; gap: 7px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: var(--fs-12);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.adv-src:hover { border-color: var(--border-bright); color: var(--text); }
.adv-src[aria-expanded="true"] { border-color: var(--accent); color: var(--text); background: var(--accent-dim); }
.adv-src svg { width: 13px; height: 13px; flex-shrink: 0; }
.adv-src .adv-src-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adv-src .adv-src-date { color: var(--text-faint); flex-shrink: 0; }
.adv-src-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 12px 14px;
  margin-top: var(--space-2);
  font-size: var(--fs-13);
  color: var(--text-soft);
}
.adv-src-field { margin-top: 10px; }
.adv-src-field:first-child { margin-top: 0; }
.adv-src-field-label { font-size: var(--fs-12); color: var(--text-faint); margin-bottom: 4px; }
.adv-src-field ul { margin: 0; padding-left: 18px; }
.adv-src-field li { margin: 2px 0; line-height: 1.5; }

.adv-cite {
  display: inline-flex; align-items: center;
  padding: 0 6px;
  margin: 0 1px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-faint);
  font-family: var(--font-body);
  font-size: var(--fs-12);
  line-height: 1.5;
  cursor: pointer;
  vertical-align: baseline;
}
.adv-cite:hover, .adv-cite.is-hot { border-color: var(--accent); color: var(--text); background: var(--accent-dim); }

.adv-redact {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  background: repeating-linear-gradient(135deg, rgba(24,24,27,0.06) 0 5px, rgba(24,24,27,0.02) 5px 10px);
  border: 1px dashed var(--border-bright);
  color: var(--text-faint);
  font-size: var(--fs-12);
  font-family: var(--font-body);
  letter-spacing: 0;
  white-space: nowrap;
}

.adv-owner-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--text);
  font-size: var(--fs-12);
  font-weight: 500;
}

.md { color: var(--text); font-size: var(--fs-14); line-height: 1.62; overflow-wrap: anywhere; }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md p { margin: 0 0 10px; }
.md h3, .md h4, .md h5 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
  margin: 18px 0 8px;
}
.md h3 { font-size: var(--fs-16); }
.md h4 { font-size: var(--fs-14); }
.md h5 { font-size: var(--fs-13); color: var(--text); }
.md ul, .md ol { margin: 0 0 10px; padding-left: 20px; }
.md li { margin: 4px 0; }
.md li::marker { color: var(--text-faint); }
.md strong { color: var(--text); font-weight: 600; }
.md em { font-style: italic; color: var(--text); }
.md a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.md code {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
}
.md pre {
  font-family: var(--font-mono);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0 0 12px;
  overflow-x: auto;
}
.md pre code { background: none; border: none; padding: 0; font-size: var(--fs-12); line-height: 1.6; }
.md blockquote {
  margin: 0 0 12px;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--accent);
  color: var(--text-soft);
}
.md hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.md table { border-collapse: collapse; font-size: var(--fs-13); margin: 0 0 12px; }
.md th, .md td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }


.radar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--space-4); align-items: start; }
.radar-card { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.radar-acc { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.radar-handle { font-family: var(--font-body); font-size: var(--fs-14); font-weight: 600; color: var(--text); text-decoration: none; word-break: break-all; }
.radar-handle:hover { color: var(--accent); }
.radar-stats { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.radar-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.radar-stat .rv { font-size: var(--fs-16); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.radar-stat .rl { font-size: var(--fs-12); color: var(--text-faint); }
.outlier { border-top: 1px solid var(--border); padding-top: var(--space-3); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.outlier-head { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.nx-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--radius-pill); background: var(--accent-dim); color: var(--text); border: 1px solid var(--accent); font-size: var(--fs-12); font-weight: 500; white-space: nowrap; }
.outlier-meta { font-size: var(--fs-12); color: var(--text-faint); font-variant-numeric: tabular-nums; }
.outlier-caption { font-size: var(--fs-13); color: var(--text-soft); line-height: 1.5; overflow-wrap: anywhere; }
.outlier-actions { display: flex; flex-wrap: wrap; gap: 6px; }



.tool-banner {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--fs-14);
  line-height: 1.5;
}
.tool-banner + .tool-banner { margin-top: var(--space-2); }
.tool-banner-icon { flex-shrink: 0; margin-top: 1px; color: var(--text-faint); display: inline-flex; }
.tool-banner-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tool-banner-title { font-size: var(--fs-13); font-weight: 600; color: var(--text); }
.tool-banner-fix { font-size: var(--fs-12); color: var(--text-faint); }
.tool-banner-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tool-banner.is-red   { border-left-color: var(--red); }
.tool-banner.is-red   .tool-banner-title { color: var(--text-red); }
.tool-banner.is-red   .tool-banner-icon  { color: var(--red); }
.tool-banner.is-amber { border-left-color: var(--yellow); }
.tool-banner.is-amber .tool-banner-title { color: var(--text); }
.tool-banner.is-amber .tool-banner-icon  { color: var(--yellow); }
.tool-banner.is-green { border-left-color: var(--green); }
.tool-banner.is-green .tool-banner-title { color: var(--text); }
.tool-banner.is-green .tool-banner-icon  { color: var(--green); }

.lint-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  max-width: 100%;
  padding: 0 9px;
  min-height: 22px;
  border-radius: var(--radius-pill);
  background: var(--yellow-dim);
  border: 1px solid rgba(234,179,8,0.30);
  color: var(--yellow);
  font-size: var(--fs-12);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.lint-chip .lint-code { color: var(--text-soft); flex-shrink: 0; }
.lint-row { display: flex; flex-wrap: wrap; gap: 6px; }


.segmented {
  display: flex; flex-wrap: nowrap; flex-shrink: 0; gap: 2px; padding: 2px; max-width: 100%;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
}
.segmented button {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  min-height: 28px; padding: 0 12px;
  background: none; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: var(--fs-13); font-weight: 500; color: var(--text-soft);
  cursor: pointer;
}
.segmented button:hover { color: var(--text); background: var(--row-hover); }
.seg-n { font-variant-numeric: tabular-nums; color: var(--text-faint); }
.segmented button[aria-pressed="true"] .seg-n { color: var(--text-soft); }

.segmented button[aria-pressed="true"],
.choice[aria-pressed="true"],
.choice[aria-selected="true"],
.choice[aria-current="true"],
.choice:has(input:checked) { background: var(--surface-2); border-color: var(--border-bright); color: var(--text); }
.choice { border: 1px solid transparent; }
.segmented-field { display: none; flex-direction: column; gap: 6px; width: 100%; min-width: 0; }
.segmented-field select { width: 100%; }
@media (max-width: 720px) {
  .segmented.has-field { display: none; }
  .segmented.has-field + .segmented-field { display: flex; }
}

@media (min-width: 861px) {
  :is(
    button, summary, select,
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    [role="button"], [role="tab"], [role="switch"],
    [role="menuitem"], [role="menuitemradio"], [role="option"],
    a.badge, button.badge, .badge[role="button"]
  ):not(.btn):not(.btn-sm):not(.btn-lg):not(.btn-icon):not(.btn-inline):not(.section-action):not(.actions-badge):not(.nav-link):not(.rail-switch):not(.rail-search):not(.rail-signout):not(.palette-item):not(.topbar-menu):not(.input):not(.segmented button):not(.hit-square):not(.hit-row):not([hidden]) {
    min-height: 20px !important;
  }
}

@media (max-width: 860px) {
  :is(
    button:not([aria-pressed]), summary,
    [role="button"], [role="tab"], [role="switch"],
    [role="menuitem"], [role="menuitemradio"], [role="option"],
    a.badge, button.badge, .badge[role="button"]
  ):not(.btn):not(.btn-sm):not(.btn-lg):not(.btn-icon):not(.btn-inline):not(.section-action):not(.actions-badge):not(.nav-link):not(.rail-switch):not(.rail-search):not(.rail-signout):not(.palette-item):not(.topbar-menu):not(.input):not(.segmented button):not(.hit-square):not(.hit-row):not([hidden]) {
    min-height: 32px !important;
    min-width: 32px !important;
  }
  :is(.toast-close, .btn-icon):not([hidden]) { min-width: 32px !important; }
  :is(
    .btn, .btn-sm, .btn-lg, .btn-icon, .btn-full,
    .input, select,
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    button[aria-pressed], .segmented button,
    .nav-link, .rail-switch, .rail-signout, .rail-search, .actions-badge, .palette-item,
    .topbar-menu, .topbar-eyebrow a, .hit-row, .sk-control
  ):not(textarea):not(.hit-square):not([hidden]) { min-height: 44px !important; }
  :is(.btn-inline, .section-action):not([hidden]) { min-height: 32px !important; }
  :is(.field-hint, .notice-text, .notice-body) a[href]:not(.btn):not(.btn-sm):not(.btn-lg):not(.btn-inline):not(.section-action):not(.badge) { padding: 9px 2px; }
  .hit-square { min-height: 28px !important; min-width: 28px !important; }
  :is(
    .input, select, textarea,
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not([type="file"])
  ) { font-size: var(--fs-16) !important; }
  .topbar-eyebrow a { margin: -13px -4px; }
}

.rail-user-link {
  display: flex; flex-direction: column; min-width: 0;
  margin: -2px -10px -4px; padding: 2px 10px 4px;
  border-radius: var(--radius);
  color: inherit; text-decoration: none;
  transition: background var(--t-fast);
}
.rail-user-link:hover { background: var(--row-hover); }
.rail-user-link:hover .rail-user-role { color: var(--text-soft); }

:root, body { --due-h: 36px; }
.swm-due {
  position: fixed; top: 0; left: 0; right: 0; z-index: 650; box-sizing: border-box;
  display: flex; align-items: center; gap: var(--space-3);
  height: var(--due-h); padding: 0 var(--space-4);
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-bright);
  box-shadow: inset 3px 0 0 var(--yellow);
  color: var(--text); font-size: var(--fs-13); line-height: 18px;
}
.swm-due-text { flex: 1; min-width: 0; }
.swm-due-act { flex: none; font-size: var(--fs-13); font-weight: 500; }
body.is-due { padding-top: var(--due-h); }
body.is-due .toast-stack { top: calc(var(--due-h) + var(--space-4) + var(--topbar-h) + var(--space-2)); }
body.is-due .swm-rail:not(.is-inflow) { top: var(--due-h); height: calc(100vh - var(--due-h)); }
@media (max-width: 860px) {
  :root, body { --due-h: 64px; }
  .swm-due { align-items: center; padding: var(--space-2) var(--space-4); }
}

html.is-acting body { padding-top: 32px; }
html.is-acting .sidebar:not(.is-inflow) { top: 32px; height: calc(100vh - 32px); }
@media (max-width: 860px) {
  html.is-acting body { padding-top: 40px; }
  html.is-acting .sidebar:not(.is-inflow) { top: 40px; height: calc(100vh - 40px); }
}


.main:not(:has(> .topbar)) { padding-top: var(--space-5); }

@media (min-width: 861px) {
  .topbar-eyebrow:has(> .topbar-group:only-child) { display: none; }
}
.topbar-group { min-width: 0; }

.rail-brand { padding-bottom: var(--space-3); }
.rail-logo {
  display: flex; align-items: center; gap: 10px;
  min-height: 40px;
  padding: 0 6px var(--space-3);
  color: var(--rail-text);
  text-decoration: none;
  font-size: var(--fs-16);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.rail-logo svg { width: 22px; height: 22px; flex-shrink: 0; }

.rail-new-wrap { position: relative; margin-top: var(--space-3); }
.rail-new {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--accent-fill);
  border-radius: var(--radius);
  background: var(--accent-fill);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--fs-14);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.rail-new:hover, .rail-new[aria-expanded="true"] { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); }
.rail-new svg { width: 18px; height: 18px; }

.shell-pop {
  position: absolute;
  z-index: 460;
  width: min(280px, calc(100vw - 24px));
  padding: 6px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(16,16,20,0.14), 0 2px 6px rgba(16,16,20,0.06);
  color: var(--text);
}
.rail-new-wrap .shell-pop { top: calc(100% + 6px); left: 0; width: 100%; min-width: 248px; }
.shell-pop-label { padding: 8px 10px 4px; font-size: var(--fs-12); font-weight: 500; color: var(--text-faint); }
.shell-pop-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-14);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.shell-pop-item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-soft); }
.shell-pop-item:hover, .shell-pop-item:focus-visible { background: var(--row-hover-floating); outline: none; }
.shell-pop-sep { height: 1px; margin: 6px 4px; background: var(--border); }

.rail-plan {
  display: block;
  padding: 12px;
  margin-bottom: var(--space-2);
  border: 1px solid var(--rail-border);
  border-radius: var(--radius);
  background: var(--rail-surface);
  color: var(--rail-text-soft);
  text-decoration: none;
  font-size: var(--fs-13);
}
.rail-plan:hover { border-color: rgba(255,255,255,0.18); }
.rail-plan-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: var(--fs-12); color: var(--rail-text-faint); }
.rail-plan-name { color: var(--rail-text); font-weight: 600; font-size: var(--fs-13); }
.rail-plan-track { display: block; height: 4px; margin: 8px 0; border-radius: var(--radius-pill); background: rgba(255,255,255,0.10); overflow: hidden; }
.rail-plan-fill { display: block; height: 100%; width: 0; border-radius: var(--radius-pill); background: var(--rail-accent); }
.rail-plan-line { display: block; min-height: 20px; color: var(--rail-text-soft); }
.rail-plan-link { display: inline-block; margin-top: 4px; color: var(--rail-accent); font-weight: 500; }

.shell-acct { position: relative; display: inline-flex; }
.shell-acct-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--fs-13);
  font-weight: 600;
  cursor: pointer;
}
.shell-acct-btn:hover, .shell-acct-btn[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--surface-2); }
.shell-acct .shell-pop { top: calc(100% + 8px); right: 0; }
.shell-acct-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.shell-acct-who .rail-user { padding: 0; }
.shell-acct-who .rail-user-name { font-size: var(--fs-14); }
.shell-acct-who .rail-user-role { font-size: var(--fs-13); color: var(--text-soft); }
.shell-pop .rail-signout { width: 100%; min-height: 36px; padding: 6px 10px; font-size: var(--fs-14); color: var(--text); gap: 10px; }
.shell-pop .rail-signout:hover { background: var(--row-hover-floating); color: var(--text); }
.shell-pop .rail-signout svg { width: 16px; height: 16px; color: var(--text-soft); }

.rail-acct-host { display: block; }
.rail-acct { position: relative; }
.rail-acct .shell-acct-btn { width: 100%; height: auto; min-height: 44px; justify-content: flex-start; gap: 10px; padding: 6px 8px; border-radius: var(--radius); background: none; color: var(--rail-text); font-weight: 500; text-align: left; }
.rail-acct .shell-acct-btn:hover, .rail-acct .shell-acct-btn[aria-expanded="true"] { background: var(--rail-hover); box-shadow: none; }
.rail-acct .shell-acct-initials { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: var(--radius); background: var(--rail-surface-2); font-size: var(--fs-13); font-weight: 600; }
.rail-acct .shell-acct-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-acct .shell-pop { bottom: calc(100% + 6px); left: 0; top: auto; }

.rail-group-label { font-size: var(--fs-12); font-weight: 600; line-height: 18px; padding: 0 10px; color: var(--rail-text-faint); }
.rail-group + .rail-group { margin-top: 10px; padding-top: 0; border-top: 0; }
.nav-link { min-height: 32px; }
@media (min-width: 861px) and (max-height: 899px) { .nav-link { min-height: 30px; } }
@media (min-width: 861px) and (max-height: 939px) { .swm-rail:has(.rail-plan) .nav-link { min-height: 30px; } }
.rail-logo { min-height: 32px; padding-bottom: var(--space-2); }
.rail-new-wrap { margin-top: var(--space-2); }
.rail-new { min-height: 36px; }
.rail-search { min-height: 34px; margin-bottom: var(--space-2); }

@media (max-width: 860px) {
  .rail-new, .shell-pop-item, .shell-pop .rail-signout { min-height: 44px; }
  .shell-acct-btn { width: 44px; height: 44px; }
  .sidebar .rail-switch-menu {
    background: transparent;
    color: var(--rail-text);
    --text: var(--rail-text); --text-soft: var(--rail-text-soft); --text-faint: var(--rail-text-faint);
    --border: var(--rail-border); --row-hover-floating: var(--rail-hover); --surface-2: var(--rail-surface-2);
    --accent: var(--rail-accent);
  }
}

.topbar[data-tabs] { position: relative; }
.topbar[data-tabs] > .topbar-left, .topbar[data-tabs] > .topbar-right { flex-shrink: 0; }
.topbar[data-tabs] > .topbar-right { flex-wrap: nowrap; }
.shell-tabs {
  position: relative;
  display: flex; align-self: stretch; flex: 1 1 auto; min-width: 0;
  gap: var(--space-1);
  margin: calc(-1 * var(--space-3)) 0 calc(-1 * var(--space-3) - 1px);
  overflow-x: auto; scrollbar-width: none;
}
.shell-tabs::-webkit-scrollbar, .shell-subtabs::-webkit-scrollbar { display: none; }
.shell-tab {
  display: inline-flex; align-items: center; flex-shrink: 0;
  padding: 0 var(--space-3);
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: none;
  font-family: var(--font-body); font-size: var(--fs-14); font-weight: 500; line-height: 1.2;
  color: var(--text-soft); text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.shell-tab:hover { color: var(--text); }
.shell-tab:focus-visible { outline-offset: -2px; }
.shell-tab[aria-current="page"], .shell-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent-fill); }
[data-tab-panel][hidden], [data-subtab-panel][hidden] { display: none !important; }
[role="tabpanel"]:focus-visible { outline-offset: 4px; }

.topbar-title > .skeleton { display: inline-block; width: 9em; height: 0.8em; vertical-align: middle; }
.topbar[data-tabs] .topbar-title { max-width: 320px; }

.topbar[data-subtabs] { min-height: calc(var(--topbar-h) + 44px); padding-bottom: calc(var(--space-3) + 44px); }
.topbar[data-subtabs] > .shell-tabs { margin-bottom: calc(-1 * var(--space-3)); }
.shell-subtabs {
  position: absolute; left: 0; right: 0; bottom: 0; height: 44px;
  display: flex; align-items: center; gap: var(--space-1);
  padding: 0 var(--main-x, var(--space-6));
  border-top: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.shell-subtabs .shell-tab {
  min-height: 32px; padding: 0 10px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: var(--fs-13);
}
.shell-subtabs .shell-tab[aria-current="page"], .shell-subtabs .shell-tab[aria-selected="true"] {
  background: var(--surface-2); border-color: var(--border-bright); color: var(--text);
}
.shell-subtabs [data-subtabs-action] { margin-left: var(--space-2); flex-shrink: 0; }

.shell-tabs-end { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
#swm-tabs-end { align-self: stretch; align-items: stretch; margin: calc(-1 * var(--space-3)) auto calc(-1 * var(--space-3) - 1px) calc(var(--space-1) - var(--space-4)); }
.topbar > .shell-tabs.has-more { flex-grow: 0; }
.shell-more { position: relative; display: flex; align-items: stretch; }
.shell-more[hidden] { display: flex !important; }
.shell-more[hidden] { width: 0; overflow: hidden; visibility: hidden; }
.shell-tabs-end > * + .shell-more[hidden], .shell-tabs-end > .shell-more[hidden] + * { margin-left: calc(-1 * var(--space-2)); }
.shell-more-btn { gap: 4px; }
.shell-more-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
.shell-more-btn[aria-expanded="true"] { color: var(--text); }
.shell-more-menu { top: calc(100% + 4px); right: 0; }
.shell-more-menu .shell-tab-count { margin-left: auto; }
.shell-tabs-end [data-overflowed] { display: none !important; }
#swm-subtabs-end { position: absolute; right: var(--main-x, var(--space-6)); bottom: 0; height: 44px; }
.topbar[data-subtabs] > .shell-subtabs { padding-right: calc(var(--main-x, var(--space-6)) + var(--swm-end, 0px)); }
#swm-subtabs-end .shell-more-btn {
  min-height: 32px; padding: 0 10px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: var(--fs-13);
}
#swm-subtabs-end .shell-more { align-items: center; }
#swm-subtabs-end .shell-more-menu { top: calc(100% + 4px); }

.shell-tab-count {
  display: inline-block; min-width: 3ch; margin-left: 6px;
  color: var(--text-faint); font-variant-numeric: tabular-nums; text-align: left;
}

@media (max-width: 860px) {
  .topbar[data-tabs] { flex-wrap: nowrap; min-height: 115.4px; padding-bottom: calc(var(--space-3) + 44px); }
  .topbar[data-tabs] > .topbar-left { flex: 1 1 auto; min-width: 0; }
  .shell-tabs { position: absolute; left: 0; right: 0; bottom: -1px; height: 45px; margin: 0; padding: 0 var(--main-x, var(--space-4)); }
  #swm-tabs .shell-tab, #swm-subtabs .shell-tab { min-height: 44px !important; }
  .topbar[data-subtabs] { min-height: 159.4px; padding-bottom: calc(var(--space-3) + 88px); }
  .topbar[data-subtabs] > .shell-tabs { bottom: 43px; margin: 0; }
  .topbar[data-tabs] .topbar-title { max-width: none; }
  #swm-tabs-act { width: 44px; padding: 0; }
  #swm-tabs-act > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .topbar[data-tabs] > .shell-tabs { padding-right: calc(var(--main-x, var(--space-4)) + var(--swm-end, 0px)); }
  #swm-tabs .shell-tab, #swm-tabs-end .shell-tab { padding: 0 10px; }
  .shell-more-btn > svg { display: none; }
  #swm-tabs-end { position: absolute; right: var(--main-x, var(--space-4)); bottom: -1px; height: 45px; margin: 0; }
  .topbar[data-subtabs] > #swm-tabs-end { bottom: 43px; }
  #swm-tabs-end .shell-tab, #swm-subtabs-end .shell-tab { min-height: 44px !important; }
  .topbar #swm-help-btn { display: none; }
  .shell-pop-item.shell-acct-help { display: flex; }
  #swm-acct-btn .help-tip { display: block; }
  .btn.client-pick-btn { min-width: 44px; max-width: none; padding: 0 6px; gap: 2px; }
  .client-pick-btn .client-pick-label { display: none; }
  .client-pick-initials {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 24px; height: 24px; padding: 0 3px;
    border-radius: var(--radius-sm); background: var(--surface-2);
    color: var(--text); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.02em;
  }
}
@media (max-width: 360px) {
  .topbar[data-tabs] { gap: var(--space-2); }
  .topbar[data-tabs] > .topbar-left { gap: var(--space-2); }
  .topbar[data-tabs] > .topbar-right { gap: var(--space-1); }
}

.rail-pick { position: relative; min-width: 0; margin-bottom: var(--space-1); }
.rail-pick > .rail-switch { min-height: 48px; }
@media (min-width: 861px) { .rail-pick > .rail-switch-menu { position: fixed; top: auto; overflow-y: auto; } }
.rail-pick .rail-switch-name > .skeleton { display: inline-block; width: 7em; height: 0.8em; vertical-align: middle; background: var(--rail-surface-2); }
.rail-group.is-foot { margin-top: auto; padding-top: 10px; }
.shell-tab.is-named { max-width: min(20em, 45vw); min-width: 0; }
.shell-tab-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-ws > .skeleton { display: inline-block; width: 8em; height: 0.8em; vertical-align: middle; }
.topbar[data-subtabs] { position: relative; }
@media (max-width: 860px) {
  .topbar[data-subtabs]:not([data-tabs]) { flex-wrap: nowrap; min-height: 115.4px; padding-bottom: calc(var(--space-3) + 44px); }
  .topbar[data-subtabs]:not([data-tabs]) > .topbar-left { flex: 1 1 auto; min-width: 0; }
  .topbar[data-subtabs]:not([data-tabs]) > .topbar-right { flex-wrap: nowrap; flex-shrink: 0; }
  .topbar[data-client-level]:not([data-tabs]):not([data-subtabs]):not(:has(> .topbar-right > :not(#swm-help-btn, #actions-badge, #swm-acct))) { flex-wrap: nowrap; }
  .topbar[data-client-level]:not([data-tabs]):not([data-subtabs]):not(:has(> .topbar-right > :not(#swm-help-btn, #actions-badge, #swm-acct))) > .topbar-right { flex-wrap: nowrap; flex-shrink: 0; }
  .topbar[data-client-level]:not([data-tabs]):not([data-subtabs]) > .topbar-left { flex: 1 1 auto; min-width: 0; }
}
