/* ============================================================
   Pane OS — design system
   A Pane in the Glass · Spokane Valley, WA
   ============================================================ */

:root {
  /* brand */
  --ink:        #0B1B2B;
  --ink-2:      #14293D;
  --ink-3:      #24405A;
  --primary:    #0E6BA8;
  --primary-6:  #0A5688;
  --primary-1:  #E8F2F9;
  --primary-2:  #CFE4F2;
  --accent:     #22B8CF;
  --accent-1:   #E6F8FB;

  /* status */
  --success:    #128A5F;
  --success-1:  #E6F5EF;
  --warn:       #B4780A;
  --warn-1:     #FDF3E0;
  --danger:     #C4432B;
  --danger-1:   #FBEBE8;
  --violet:     #6A4FCB;
  --violet-1:   #EFEBFB;

  /* neutrals */
  --canvas:     #F6F8FB;
  --surface:    #FFFFFF;
  --surface-2:  #FBFCFE;
  --border:     #E3E9F0;
  --border-2:   #EEF2F7;
  --text:       #10202F;
  --text-2:     #52667A;
  --text-3:     #8093A5;

  /* rail */
  --rail-bg:    #0B1B2B;
  --rail-hover: #16293B;
  --rail-active:#17304A;
  --rail-text:  #9FB3C6;
  --rail-text-2:#5D7488;

  /* system */
  --r-sm: 6px;
  --r:    9px;
  --r-lg: 13px;
  --r-xl: 18px;
  --sh-1: 0 1px 2px rgba(11,27,43,.06), 0 1px 1px rgba(11,27,43,.04);
  --sh-2: 0 2px 6px rgba(11,27,43,.07), 0 1px 2px rgba(11,27,43,.05);
  --sh-3: 0 12px 32px rgba(11,27,43,.12), 0 2px 8px rgba(11,27,43,.06);
  --sh-4: 0 24px 64px rgba(11,27,43,.20);
  --rail-w: 15rem;
  --rail-w-collapsed: 4.25rem;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* Base size for every inline icon. Component rules below are more specific and win. */
.ic { width: 15px; height: 15px; flex: 0 0 auto; vertical-align: -2px; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5 { margin: 0; font-weight: 620; letter-spacing: -.012em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--primary-2); }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD6E2; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #AEBECD; background-clip: content-box; border: 3px solid transparent; }

/* ============================================================ shell */
.app { display: flex; height: 100vh; overflow: hidden; }

.rail {
  width: var(--rail-w);
  flex: 0 0 var(--rail-w);
  background: var(--rail-bg);
  display: flex; flex-direction: column;
  transition: width .18s ease, flex-basis .18s ease;
  position: relative; z-index: 40;
}
.app.rail-collapsed .rail { width: var(--rail-w-collapsed); flex-basis: var(--rail-w-collapsed); }

.rail-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 14px 14px; margin-bottom: 2px;
}
.brandmark {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px;
  background: linear-gradient(145deg, var(--accent) 0%, var(--primary) 78%);
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(34,184,207,.28);
}
.brandmark svg { width: 17px; height: 17px; }
.brand-text { min-width: 0; }
.brand-text .bt-1 { color: #fff; font-weight: 640; font-size: 13.5px; letter-spacing: -.01em; line-height: 1.15; white-space: nowrap; }
.brand-text .bt-2 { color: var(--rail-text-2); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; margin-top: 2px; white-space: nowrap; }
.app.rail-collapsed .brand-text { display: none; }
.app.rail-collapsed .rail-brand { justify-content: center; padding-left: 0; padding-right: 0; }

.rail-nav { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.rail-nav::-webkit-scrollbar-thumb { background: #2A4155; background-clip: content-box; border: 3px solid transparent; }
.nav-group-label {
  color: var(--rail-text-2); font-size: 10px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; padding: 14px 10px 6px;
}
.app.rail-collapsed .nav-group-label { opacity: 0; height: 18px; padding: 0; overflow: hidden; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 8px 10px; border-radius: var(--r-sm); color: var(--rail-text);
  font-size: 13.5px; font-weight: 500; position: relative; margin-bottom: 1px;
  transition: background .12s ease, color .12s ease;
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; stroke-width: 1.7; }
.nav-item:hover { background: var(--rail-hover); color: #DCE7F1; }
.nav-item.active { background: var(--rail-active); color: #fff; font-weight: 570; }
.nav-item.active::before {
  content: ""; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 3px;
  background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-item .nav-label { white-space: nowrap; overflow: hidden; }
.app.rail-collapsed .nav-item .nav-label { display: none; }
.app.rail-collapsed .nav-item { justify-content: center; padding-left: 0; padding-right: 0; }
.app.rail-collapsed .nav-item .pill { display: none; }
.nav-item .pill {
  margin-left: auto; background: #24405A; color: #C8D8E6; font-size: 10.5px;
  font-weight: 660; padding: 1px 6px; border-radius: 20px; min-width: 19px; text-align: center;
}
.nav-item .pill.hot { background: var(--accent); color: #04303A; }

.rail-foot { padding: 10px 8px 12px; border-top: 1px solid #1B2E41; }
.rail-user { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm); width: 100%; }
.rail-user:hover { background: var(--rail-hover); }
.rail-user .avatar { flex: 0 0 28px; }
.rail-user .ru-t { min-width: 0; text-align: left; }
.rail-user .ru-1 { color: #E4EDF5; font-size: 12.5px; font-weight: 570; white-space: nowrap; }
.rail-user .ru-2 { color: var(--rail-text-2); font-size: 11px; white-space: nowrap; }
.app.rail-collapsed .rail-user .ru-t { display: none; }
.app.rail-collapsed .rail-user { justify-content: center; }

/* ============================================================ main */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

.topbar {
  height: 58px; flex: 0 0 58px; background: var(--surface);
  border-bottom: 1px solid var(--border); display: flex; align-items: center;
  gap: 12px; padding: 0 20px; z-index: 30;
}
.icon-btn {
  width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center;
  color: var(--text-2); transition: background .12s, color .12s; position: relative; flex: 0 0 32px;
}
.icon-btn:hover { background: var(--border-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; stroke-width: 1.75; }
.icon-btn .dot { position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); border: 1.5px solid #fff; }

.omnibox {
  flex: 1; max-width: 460px; height: 34px; border: 1px solid var(--border);
  border-radius: var(--r); background: var(--surface-2); display: flex; align-items: center;
  gap: 9px; padding: 0 11px; color: var(--text-3); transition: border-color .12s, background .12s;
}
.omnibox:hover { border-color: #CFDAE6; background: #fff; }
.omnibox svg { width: 15px; height: 15px; flex: 0 0 15px; }
.omnibox span { font-size: 13px; }
.omnibox kbd {
  margin-left: auto; font-family: var(--font); font-size: 10.5px; font-weight: 600;
  border: 1px solid var(--border); background: #fff; border-radius: 4px; padding: 1px 5px; color: var(--text-3);
}
.topbar-spacer { flex: 1; }

.page { flex: 1; overflow-y: auto; overflow-x: hidden; }
.page-inner { padding: 22px 24px 56px; max-width: 1560px; margin: 0 auto; animation: pageIn .24s cubic-bezier(.22,.8,.3,1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .page-inner { animation: none; } * { transition-duration: .01ms !important; } }

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; letter-spacing: -.02em; }
.page-head .sub { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ============================================================ atoms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: var(--r-sm); font-size: 13px; font-weight: 570;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  transition: background .12s, border-color .12s, box-shadow .12s, transform .06s;
  white-space: nowrap; box-shadow: var(--sh-1);
}
.btn:hover { background: var(--surface-2); border-color: #CFDAE6; }
.btn:active { transform: translateY(.5px); }
.btn svg { width: 15px; height: 15px; stroke-width: 1.9; flex: 0 0 15px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(14,107,168,.28); }
.btn-primary:hover { background: var(--primary-6); border-color: var(--primary-6); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--border-2); color: var(--text); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-1); border-color: #EFC8C0; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-sm svg { width: 13px; height: 13px; flex: 0 0 13px; }
.btn-lg { height: 40px; padding: 0 18px; font-size: 14px; }
.btn:disabled { opacity: .45; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px;
  border-radius: 20px; font-size: 11.5px; font-weight: 600; letter-spacing: .005em;
  background: var(--border-2); color: var(--text-2); white-space: nowrap;
}
.chip svg { width: 12px; height: 12px; stroke-width: 2.1; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-blue    { background: var(--primary-1); color: var(--primary-6); }
.chip-cyan    { background: var(--accent-1); color: #0B6C7C; }
.chip-green   { background: var(--success-1); color: var(--success); }
.chip-amber   { background: var(--warn-1); color: var(--warn); }
.chip-red     { background: var(--danger-1); color: var(--danger); }
.chip-violet  { background: var(--violet-1); color: var(--violet); }
.chip-ink     { background: #E9EEF4; color: #3B5063; }
.chip-outline { background: #fff; border: 1px solid var(--border); color: var(--text-2); }

.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 680; color: #fff; letter-spacing: .02em; flex: 0 0 auto;
  background: var(--primary);
}
.avatar.sm { width: 24px; height: 24px; font-size: 9.5px; }
.avatar.lg { width: 42px; height: 42px; font-size: 14px; }
.avatar.xl { width: 56px; height: 56px; font-size: 18px; }
.avatar.a1 { background: #0E6BA8; } .avatar.a2 { background: #128A5F; }
.avatar.a3 { background: #6A4FCB; } .avatar.a4 { background: #B4780A; }
.avatar.a5 { background: #C4432B; } .avatar.a6 { background: #0B6C7C; }
.avatar.a7 { background: #3B5063; } .avatar.a8 { background: #A0489B; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid #fff; margin-left: -7px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.card-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--border-2);
}
.card-head h3 { font-size: 14px; letter-spacing: -.008em; }
.card-head .sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 11px 16px; border-top: 1px solid var(--border-2); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }

.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.g-main { grid-template-columns: minmax(0,1fr) 340px; }
.g-main-l { grid-template-columns: 300px minmax(0,1fr); }

/* stat tile */
.stat { padding: 15px 16px 14px; }
.stat .lbl { font-size: 11.5px; font-weight: 640; color: var(--text-3); text-transform: uppercase; letter-spacing: .055em; display: flex; align-items: center; gap: 6px; }
.stat .val { font-size: 25px; font-weight: 660; letter-spacing: -.028em; margin-top: 7px; font-variant-numeric: tabular-nums; }
.stat .val small { font-size: 14px; font-weight: 570; color: var(--text-2); letter-spacing: 0; }
.stat .meta { margin-top: 6px; font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 620; font-size: 12px; }
.trend.up { color: var(--success); } .trend.down { color: var(--danger); }
.trend svg { width: 12px; height: 12px; stroke-width: 2.4; }
.spark { height: 30px; margin-top: 8px; }

/* table */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 660; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .06em; padding: 9px 14px;
  border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap;
}
.tbl th:first-child, .tbl td:first-child { padding-left: 16px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 16px; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border-2); font-size: 13px; vertical-align: middle; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--primary-1); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .t-main { font-weight: 570; }
.tbl .t-sub { color: var(--text-3); font-size: 12px; margin-top: 1px; }

/* list row */
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--border-2); transition: background .1s;
}
.row:last-child { border-bottom: 0; }
.row.click { cursor: pointer; }
.row.click:hover { background: var(--surface-2); }
.row .rmain { min-width: 0; flex: 1; }
.row .r1 { font-size: 13.5px; font-weight: 560; }
.row .r2 { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.row .rright { margin-left: auto; text-align: right; display: flex; align-items: center; gap: 10px; }

/* segmented / tabs */
.seg { display: inline-flex; background: var(--border-2); border-radius: var(--r); padding: 3px; gap: 2px; }
.seg button {
  height: 27px; padding: 0 12px; border-radius: 6px; font-size: 12.5px; font-weight: 570; color: var(--text-2);
  transition: background .12s, color .12s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: #fff; color: var(--text); box-shadow: var(--sh-1); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  padding: 10px 13px; font-size: 13.5px; font-weight: 550; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px; transition: color .12s, border-color .12s;
}
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tabs button .pill { background: var(--border-2); color: var(--text-2); font-size: 10.5px; font-weight: 660; padding: 1px 6px; border-radius: 20px; }
.tabs button.on .pill { background: var(--primary-1); color: var(--primary-6); }

/* progress / meter */
.meter { height: 6px; border-radius: 20px; background: var(--border-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 20px; background: var(--primary); transition: width .5s cubic-bezier(.22,.8,.3,1); }
.meter.green i { background: var(--success); }
.meter.amber i { background: var(--warn); }
.meter.red i { background: var(--danger); }
.meter.cyan i { background: var(--accent); }

/* empty */
.empty { padding: 40px 20px; text-align: center; color: var(--text-3); }
.empty svg { width: 34px; height: 34px; stroke-width: 1.4; opacity: .5; margin-bottom: 10px; }
.empty h4 { font-size: 14px; color: var(--text-2); margin-bottom: 4px; }
.empty p { font-size: 12.5px; max-width: 320px; margin: 0 auto; }

/* ai surfaces */
.ai-mark {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: 0 0 22px;
  background: linear-gradient(145deg, var(--accent) 0%, var(--primary) 85%); color: #fff;
}
.ai-mark svg { width: 13px; height: 13px; stroke-width: 2; }
.ai-mark.lg { width: 30px; height: 30px; flex-basis: 30px; border-radius: 8px; }
.ai-mark.lg svg { width: 17px; height: 17px; }

.ai-panel {
  border: 1px solid var(--primary-2); border-radius: var(--r-lg);
  background: linear-gradient(168deg, #F4FAFD 0%, #FFFFFF 62%);
  box-shadow: var(--sh-1);
}
.ai-panel .card-head { border-bottom-color: #DDEBF5; }

.evidence {
  border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2);
  padding: 11px 13px; font-size: 12.5px; color: var(--text-2);
}
.evidence .e-t { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 7px; }
.evidence li { display: flex; gap: 8px; padding: 3px 0; }
.evidence li svg { width: 13px; height: 13px; flex: 0 0 13px; margin-top: 3px; color: var(--accent); stroke-width: 2.2; }

.conf {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--text-2);
}
.conf .bar { width: 54px; height: 5px; border-radius: 20px; background: var(--border-2); overflow: hidden; }
.conf .bar i { display: block; height: 100%; background: var(--success); }
.conf.med .bar i { background: var(--warn); }
.conf.low .bar i { background: var(--danger); }

.gate {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--r);
  background: var(--warn-1); border: 1px solid #F0DEB8; color: #7A5205; font-size: 12.5px; font-weight: 540;
}
.gate svg { width: 15px; height: 15px; flex: 0 0 15px; stroke-width: 2; }
.gate.ok { background: var(--success-1); border-color: #C4E5D6; color: #0B6547; }

/* drawer */
.scrim {
  position: fixed; inset: 0; background: rgba(11,27,43,.42); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .2s ease; backdrop-filter: blur(1.5px);
}
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(660px, 94vw);
  background: var(--surface); z-index: 91; box-shadow: var(--sh-4);
  display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform .26s cubic-bezier(.32,.72,.28,1);
}
.drawer.on { transform: translateX(0); }
.drawer.wide { width: min(880px, 96vw); }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 17px; letter-spacing: -.018em; }
.drawer-head .sub { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 28px; }
.drawer-foot { padding: 13px 20px; border-top: 1px solid var(--border); background: var(--surface-2); display: flex; gap: 8px; align-items: center; }

/* modal */
.modal {
  position: fixed; z-index: 92; top: 50%; left: 50%; transform: translate(-50%,-48%) scale(.98);
  width: min(560px, 94vw); max-height: 88vh; background: #fff; border-radius: var(--r-xl);
  box-shadow: var(--sh-4); display: flex; flex-direction: column; opacity: 0; pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.modal.on { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.modal-head { padding: 18px 20px 12px; }
.modal-head h2 { font-size: 16.5px; }
.modal-head .sub { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.modal-body { padding: 4px 20px 18px; overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--border-2); display: flex; gap: 8px; justify-content: flex-end; }

/* toast */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 9px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 15px; border-radius: var(--r-lg);
  background: var(--ink); color: #EAF2F8; font-size: 13px; font-weight: 520; box-shadow: var(--sh-3);
  max-width: 460px;
}
.toast svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--accent); stroke-width: 2.2; }
.toast .t-sub { color: #8FA6B9; font-size: 12px; }

/* form */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 620; color: var(--text-2); margin-bottom: 5px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 11px;
  background: #fff; font-size: 13.5px; transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-1); }
.textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
.hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }

.toggle { position: relative; width: 36px; height: 20px; border-radius: 20px; background: #CBD6E2; transition: background .16s; flex: 0 0 36px; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform .16s; }
.toggle.on { background: var(--success); }
.toggle.on::after { transform: translateX(16px); }

/* misc utilities */
.mut { color: var(--text-2); }
.mut-3 { color: var(--text-3); }
.tiny { font-size: 11.5px; }
.sm { font-size: 12.5px; }
.b { font-weight: 620; }
.num { font-variant-numeric: tabular-nums; }
.flex { display: flex; }
.ac { align-items: center; }
.jb { justify-content: space-between; }
.gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.mt4{margin-top:4px}.mt6{margin-top:6px}.mt8{margin-top:8px}.mt10{margin-top:10px}.mt12{margin-top:12px}.mt14{margin-top:14px}.mt16{margin-top:16px}.mt20{margin-top:20px}.mt24{margin-top:24px}
.mb6{margin-bottom:6px}.mb8{margin-bottom:8px}.mb10{margin-bottom:10px}.mb12{margin-bottom:12px}.mb14{margin-bottom:14px}.mb16{margin-bottom:16px}.mb20{margin-bottom:20px}
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--border-2); margin: 14px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tooltip */
.tip { position: relative; display: inline-flex; }
.tip[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #E8F1F8; font-size: 11.5px; font-weight: 500; padding: 6px 9px;
  border-radius: 6px; white-space: normal; width: max-content; max-width: 240px; z-index: 60;
  box-shadow: var(--sh-2); line-height: 1.45; pointer-events: none;
}
.info-i {
  width: 14px; height: 14px; border-radius: 50%; background: var(--border-2); color: var(--text-3);
  font-size: 9.5px; font-weight: 800; display: inline-grid; place-items: center; cursor: help; flex: 0 0 14px;
}
.info-i:hover { background: var(--primary-1); color: var(--primary); }

/* schedule */
.cal {
  display: grid;
  grid-template-columns: 58px repeat(12, minmax(84px,1fr));
  grid-template-rows: auto auto;
  grid-auto-rows: 52px;
  border-top: 1px solid var(--border-2);
  min-width: 100%;
}
.cal-corner { grid-column: 1; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cal-h { padding: 8px 8px 5px; text-align: center; border-left: 1.5px solid var(--border); background: var(--surface-2); }
.cal-h .d1 { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.cal-h .d2 { font-size: 16px; font-weight: 640; margin-top: 1px; letter-spacing: -.02em; }
.cal-h.today .d2 { color: var(--primary); }
.cal-h.risk { background: var(--warn-1); }
.cal-crew {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-align: center; color: var(--text-3);
  background: var(--surface-2); border-bottom: 1px solid var(--border); border-left: 1px solid var(--border-2);
  padding: 2px 0 5px;
}
.cal-crew.risk { background: var(--warn-1); }
.cal-t { font-size: 10.5px; color: var(--text-3); text-align: right; padding: 3px 8px 0; font-weight: 600; }
.cal-c { border-left: 1px solid var(--border-2); border-bottom: 1px solid var(--border-2); }
.cal-c.lane { border-left: 1.5px solid var(--border); }
.cal-c.wknd { background: #FCFDFE; }
.cal-v { padding: 2px; z-index: 2; min-width: 0; }
.visit {
  border-radius: 6px; padding: 4px 7px; font-size: 11.5px; line-height: 1.3; cursor: pointer;
  border-left: 3px solid var(--primary); background: var(--primary-1); color: #0A4A76; height: 100%;
  overflow: hidden; transition: box-shadow .12s, transform .08s;
}
.visit:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
.visit .v1 { font-weight: 640; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit .v2 { opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.visit.ext { border-left-color: var(--accent); background: var(--accent-1); color: #08606F; }
.visit.int { border-left-color: var(--violet); background: var(--violet-1); color: #4A34A0; }
.visit.done { border-left-color: var(--success); background: var(--success-1); color: #0B6547; }
.visit.risk { border-left-color: var(--warn); background: var(--warn-1); color: #7A5205; }
.visit.moved { outline: 2px dashed var(--success); outline-offset: -1px; animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(.94); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }

/* route map */
.routemap { background: #EDF3F8; border-radius: var(--r-lg); position: relative; overflow: hidden; border: 1px solid var(--border); }
.routemap svg { display: block; width: 100%; height: auto; }
.map-legend { position: absolute; left: 12px; bottom: 12px; background: rgba(255,255,255,.94); border: 1px solid var(--border); border-radius: var(--r); padding: 9px 11px; font-size: 11.5px; box-shadow: var(--sh-2); backdrop-filter: blur(4px); }
.map-legend .lg { display: flex; align-items: center; gap: 7px; padding: 2px 0; }
.map-legend .sw { width: 9px; height: 9px; border-radius: 50%; }

/* pipeline */
.pipe { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.pipe-col { flex: 0 0 268px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); display: flex; flex-direction: column; max-height: 620px; }
.pipe-h { padding: 11px 12px; border-bottom: 1px solid var(--border-2); display: flex; align-items: center; gap: 8px; }
.pipe-h .ph1 { font-size: 12.5px; font-weight: 660; }
.pipe-h .ph2 { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bolt { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--warn); background: var(--warn-1); margin-left: auto; transition: transform .1s, background .12s; flex: 0 0 24px; }
.bolt:hover { background: #F8E7C4; transform: scale(1.06); }
.bolt svg { width: 13px; height: 13px; stroke-width: 2.1; }
.pipe-b { padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; }
.pcard { background: #fff; border: 1px solid var(--border); border-radius: var(--r); padding: 10px 11px; box-shadow: var(--sh-1); cursor: pointer; transition: box-shadow .12s, transform .08s, border-color .12s; }
.pcard:hover { box-shadow: var(--sh-2); transform: translateY(-1px); border-color: #CFDAE6; }
.pcard .p1 { font-size: 12.5px; font-weight: 600; }
.pcard .p2 { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
.pcard .p3 { display: flex; align-items: center; gap: 6px; margin-top: 8px; }

/* inbox */
.inbox-grid { display: grid; grid-template-columns: 300px minmax(0,1fr); min-height: 560px; }
.thread-list { border-right: 1px solid var(--border); overflow-y: auto; }
.thread-item { padding: 12px 14px; border-bottom: 1px solid var(--border-2); cursor: pointer; transition: background .1s; }
.thread-item:hover { background: var(--surface-2); }
.thread-item.on { background: var(--primary-1); box-shadow: inset 3px 0 0 var(--primary); }
.bubble { max-width: 78%; padding: 9px 12px; border-radius: 14px; font-size: 13px; line-height: 1.5; }
.bubble.them { background: var(--border-2); border-bottom-left-radius: 4px; }
.bubble.us { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; margin-left: auto; }
.bubble.ai { background: linear-gradient(150deg,#0E6BA8,#1690B8); color: #fff; border-bottom-right-radius: 4px; margin-left: auto; }

/* portal preview */
.phone {
  width: 340px; border: 9px solid #0B1B2B; border-radius: 34px; overflow: hidden;
  box-shadow: var(--sh-3); background: #fff; flex: 0 0 340px;
}
.phone-inner { height: 620px; overflow-y: auto; background: var(--canvas); }

/* academy */
.sop { border: 1px solid var(--border); border-radius: var(--r); padding: 13px 14px; background: #fff; transition: box-shadow .12s, border-color .12s; }
.sop:hover { box-shadow: var(--sh-2); border-color: #CFDAE6; }

/* timeline */
.tl { position: relative; padding-left: 26px; }
.tl::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 1.5px; background: var(--border); }
.tl-i { position: relative; padding-bottom: 16px; }
.tl-i:last-child { padding-bottom: 0; }
.tl-i::before {
  content: ""; position: absolute; left: -22px; top: 4px; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary);
}
.tl-i.ai::before { border-color: var(--accent); background: var(--accent); }
.tl-i.ok::before { border-color: var(--success); background: var(--success); }
.tl-i .t1 { font-size: 13px; font-weight: 550; }
.tl-i .t2 { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.tl-i .t3 { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

/* ============================================================
   CUSTOM COMPONENTS
   Purpose-built for the things this business actually does.
   Each one replaces a generic card that was hiding the meaning.
   ============================================================ */

/* section label — replaces the repeated inline uppercase style */
.slab {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 8px; display: flex; align-items: center; gap: 7px;
}
.slab .n { background: var(--border-2); color: var(--text-2); border-radius: 20px; padding: 0 6px; letter-spacing: 0; }

/* ---------------------------------------------------------- metric band
   One strip instead of a row of four identical cards. Same numbers,
   a quarter of the visual weight. */
.mband {
  display: flex; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden;
}
.mband > div { flex: 1 1 0; padding: 13px 16px 14px; border-left: 1px solid var(--border-2); min-width: 0; }
.mband > div:first-child { border-left: 0; }
.mb-l { font-size: 10.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; }
.mb-v { font-size: 23px; font-weight: 660; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.mb-v small { font-size: 13px; font-weight: 560; color: var(--text-2); letter-spacing: 0; }
.mb-m { margin-top: 5px; font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------------------------------------------------------- desk
   Master/detail. Triage on the left, the one decision you are making
   on the right. Used by the AI Desk and Requests. */
.desk { display: grid; grid-template-columns: 336px minmax(0, 1fr); gap: 16px; align-items: start; }
.desk-list {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden;
}
.desk-list-h {
  padding: 10px 14px; border-bottom: 1px solid var(--border-2); background: var(--surface-2);
  display: flex; align-items: center; gap: 8px;
}
.desk-list-h .t { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.desk-list-h .r { margin-left: auto; font-size: 11px; color: var(--text-3); font-weight: 600; }
.desk-scroll { max-height: 620px; overflow-y: auto; }
.desk-detail { position: sticky; top: 0; }

/* triage row */
.qrow {
  display: flex; gap: 11px; align-items: flex-start; width: 100%; text-align: left;
  padding: 12px 13px 12px 11px; border-bottom: 1px solid var(--border-2);
  border-left: 3px solid transparent; transition: background .12s, border-color .12s;
}
.qrow:last-child { border-bottom: 0; }
.qrow:hover { background: var(--surface-2); }
.qrow.on { background: var(--primary-1); border-left-color: var(--primary); }
.qrow .qb { flex: 1; min-width: 0; }
.qrow .qt { font-size: 12.8px; font-weight: 620; line-height: 1.35; }
.qrow .qm { font-size: 11.5px; color: var(--text-2); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.qrow .qv { font-size: 13px; font-weight: 680; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qrow .qtag { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }

/* confidence ring — reads at a glance, unlike a 54px bar */
.ring { position: relative; width: 40px; height: 40px; flex: 0 0 40px; }
.ring svg { display: block; transform: rotate(-90deg); }
.ring .rv {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 720; font-variant-numeric: tabular-nums; color: var(--text);
}
.ring.lg { width: 62px; height: 62px; flex-basis: 62px; }
.ring.lg .rv { font-size: 15px; }
.ring-cap { font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); text-align: center; margin-top: 4px; }

/* ---------------------------------------------------------- shift bar
   Seven agents as one workforce strip instead of seven tall cards. */
.shift { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.shift-h { display: flex; align-items: center; gap: 9px; padding: 9px 14px; border-bottom: 1px solid var(--border-2); background: var(--surface-2); flex-wrap: wrap; }
.shift-h .t { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.shift-h .r { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shift-b { display: flex; }
.shift-a { flex: 1 1 0; min-width: 0; padding: 10px 12px 11px; border-left: 1px solid var(--border-2); transition: background .12s; }
/* .tip forces inline-flex; a shift cell has to stay a block */
.shift-a.tip { display: block; position: relative; }
.shift-a:first-child { border-left: 0; }
.shift-a:hover { background: var(--surface-2); }
.shift-a .sa-h { display: flex; align-items: center; gap: 7px; }
.shift-a .sa-n { font-size: 12px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shift-a .sa-m { font-size: 11px; color: var(--text-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
.shift-a .load { height: 4px; border-radius: 20px; background: var(--border-2); margin-top: 8px; overflow: hidden; }
.shift-a .load i { display: block; height: 100%; border-radius: 20px; background: var(--accent); }
.dotlive { width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex: 0 0 6px; box-shadow: 0 0 0 3px var(--success-1); }

/* ---------------------------------------------------------- boundary ledger
   The trust story as one readable artifact: what each agent may do,
   and the hard line it will not cross. */
.led-row { display: grid; grid-template-columns: 272px minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--border-2); }
.led-row:last-child { border-bottom: 0; }
.led-row.head { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.led-row.head > div { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); padding: 9px 14px; }
.led-row.head .h-never { color: #9E5340; }
.led-row.head .h-can { color: #12775A; }
.led-a { padding: 13px 14px; }
.led-a .la-n { font-size: 13px; font-weight: 620; }
.led-a .la-j { font-size: 11.5px; color: var(--text-2); margin-top: 3px; line-height: 1.45; }
.led-a .la-s { font-size: 11px; color: var(--text-3); margin-top: 6px; font-variant-numeric: tabular-nums; }
.led-can, .led-cant { padding: 13px 14px; font-size: 12.5px; }
.led-can { border-left: 1px solid var(--border-2); background: linear-gradient(90deg, rgba(18,138,95,.05), rgba(18,138,95,0) 55%); }
.led-cant { border-left: 1px dashed #E0B4A9; background: linear-gradient(90deg, rgba(196,67,43,.055), rgba(196,67,43,0) 55%); }
.led-can li, .led-cant li { display: flex; gap: 8px; padding: 2.5px 0; line-height: 1.45; }
.led-can li svg, .led-cant li svg { width: 13px; height: 13px; flex: 0 0 13px; margin-top: 3px; stroke-width: 2.4; }
.led-can li svg { color: var(--success); }
.led-cant li { color: #8C3520; }
.led-cant li svg { color: var(--danger); }

/* ---------------------------------------------------------- workflow chain
   Inputs → processing → output → the gate. Shows how the thing works
   instead of just asserting that it does. */
.wfx { display: flex; align-items: stretch; margin: 2px 0 14px; }
.wfx-s {
  flex: 1 1 0; min-width: 0; padding: 9px 10px 10px 17px; background: var(--surface-2);
  border: 1px solid var(--border-2); border-left: 0; position: relative;
}
.wfx-s:first-child { border-left: 1px solid var(--border-2); border-radius: var(--r-sm) 0 0 var(--r-sm); padding-left: 11px; }
.wfx-s:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.wfx-s::after {
  content: ""; position: absolute; right: -7.5px; top: 50%; z-index: 2;
  transform: translateY(-50%) rotate(45deg); width: 13px; height: 13px;
  background: var(--surface-2); border-top: 1px solid var(--border-2); border-right: 1px solid var(--border-2);
}
.wfx-s:last-child::after { display: none; }
.wfx-k { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.wfx-v { font-size: 11.5px; font-weight: 560; margin-top: 3px; line-height: 1.4; }
.wfx-s.wfx-stop { background: var(--warn-1); border-color: #F0DEB8; }
.wfx-s.wfx-stop::after { background: var(--warn-1); border-color: #F0DEB8; }
.wfx-s.wfx-stop .wfx-k { color: #8A6208; }
.wfx-s.wfx-stop .wfx-v { color: #7A5205; }

/* ---------------------------------------------------------- weather strip
   Six days of exterior go / no-go read in one glance. */
.wx { display: flex; }
.wx-d { flex: 1 1 0; min-width: 0; padding: 10px 6px 11px; border-left: 1px solid var(--border-2); text-align: center; }
.wx-d:first-child { border-left: 0; }
.wx-d.today { background: var(--primary-1); }
.wx-d.no { background: var(--danger-1); }
.wx-d .wd { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.wx-d .wt { font-size: 15px; font-weight: 660; letter-spacing: -.02em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.wx-d .wc { font-size: 10.5px; color: var(--text-2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-bar { height: 44px; display: flex; align-items: flex-end; justify-content: center; margin-top: 9px; position: relative; }
/* your AQI 100 exterior ceiling, drawn straight across the week */
.wx-bar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 22px; border-top: 1px dashed rgba(196,67,43,.5); }
.wx-bar i { width: 62%; border-radius: 3px 3px 0 0; display: block; min-height: 4px; position: relative; }
.wx-d .waq { font-size: 10px; color: var(--text-3); margin-top: 4px; font-variant-numeric: tabular-nums; font-weight: 600; }
.wx-d .wl { font-size: 9.5px; font-weight: 750; margin-top: 6px; letter-spacing: .05em; text-transform: uppercase; }
.wx-ceiling { position: relative; }

/* ---------------------------------------------------------- stop list
   Today's route as a route, with the drive time between stops visible. */
.stops { padding: 4px 0 0; }
.stop { display: flex; gap: 12px; padding: 0 16px; cursor: pointer; }
.stop:hover .stop-b { background: var(--surface-2); }
.stop-n { flex: 0 0 26px; display: flex; flex-direction: column; align-items: center; }
.stop-n .dotn {
  width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 720; background: #fff; color: var(--primary-6);
  border: 1.5px solid var(--primary-2); flex: 0 0 25px; margin-top: 10px;
}
.stop-n .line { flex: 1; width: 1.5px; background: var(--border); }
.stop:last-child .stop-n .line { display: none; }
.stop.done .dotn { background: var(--success-1); color: var(--success); border-color: #C4E5D6; }
.stop.now .dotn { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-1); }
.stop-b { flex: 1; min-width: 0; padding: 10px 10px 12px; margin-left: -4px; border-radius: var(--r-sm); transition: background .1s; }
.stop-t { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.stop-t .h { font-size: 11.5px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.stop-t .n { font-size: 13.5px; font-weight: 600; }
.stop-m { font-size: 12px; color: var(--text-2); margin-top: 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stop-m .drv { color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; }

/* ---------------------------------------------------------- collection ladder dots */
.dots { display: inline-flex; gap: 3px; align-items: center; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #DCE4EC; display: block; }
.dots i.on { background: var(--warn); }
.dots i.stopped { background: var(--danger); box-shadow: 0 0 0 2px var(--danger-1); }

/* ---------------------------------------------------------- cadence bar
   Where a property sits inside its own service cycle. */
.duebar { height: 5px; border-radius: 20px; background: #E7EDF3; width: 76px; overflow: hidden; }
.duebar i { display: block; height: 100%; border-radius: 20px; background: var(--success); }
.duebar.due i { background: var(--warn); }
.duebar.over i { background: var(--danger); }

/* ---------------------------------------------------------- time spine
   The activity log on an actual clock. */
.spine-g { display: grid; grid-template-columns: 72px minmax(0, 1fr); }
.spine-t {
  padding: 13px 13px 13px 0; text-align: right; font-size: 11px; font-weight: 680;
  color: var(--text-3); font-variant-numeric: tabular-nums; border-right: 1px solid var(--border);
}
.spine-b { padding: 13px 16px 13px 18px; position: relative; }
.spine-b::before {
  content: ""; position: absolute; left: -5px; top: 17px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--accent);
}
.spine-g.human .spine-b::before { background: var(--text-3); box-shadow: 0 0 0 1px var(--text-3); }
.spine-g:hover .spine-b { background: var(--surface-2); }
.spine-b .s1 { font-size: 13px; font-weight: 570; }
.spine-b .s2 { font-size: 12px; color: var(--text-2); margin-top: 2px; line-height: 1.5; }
.spine-b .s3 { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* ---------------------------------------------------------- impact block
   "What actually changes if you say yes." */
.impact { border: 1px solid var(--primary-2); border-radius: var(--r); background: linear-gradient(168deg, #F3F9FD, #FFFFFF 68%); padding: 11px 13px; }
.impact .e-t { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--primary-6); margin-bottom: 7px; }
.impact li { display: flex; gap: 8px; padding: 3px 0; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.impact li svg { width: 13px; height: 13px; flex: 0 0 13px; margin-top: 3px; color: var(--primary); stroke-width: 2.2; }

/* ---------------------------------------------------------- request parse card */
.parse { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 10px; font-size: 12.5px; }
.parse dt { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding-top: 2px; }
.parse dd { margin: 0; color: var(--text-2); }
.quoteblock {
  border-left: 3px solid var(--primary-2); background: var(--surface-2); padding: 11px 14px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 13px; line-height: 1.6; color: var(--text-2);
}

/* ---------------------------------------------------------- pipeline stage value bar */
.pipe-bar { height: 3px; background: var(--border-2); }
.pipe-bar i { display: block; height: 100%; background: var(--primary); }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .desk { grid-template-columns: minmax(0, 1fr); }
  .desk-detail { position: static; }
  .desk-scroll { max-height: 340px; }
  .shift-b { flex-wrap: wrap; }
  .shift-a { flex: 1 1 25%; border-top: 1px solid var(--border-2); }
  .shift-a:nth-child(-n+4) { border-top: 0; }
  .shift-a:nth-child(4n+1) { border-left: 0; }
}
@media (max-width: 1000px) {
  .mband { flex-wrap: wrap; }
  .mband > div { flex: 1 1 50%; border-top: 1px solid var(--border-2); }
  .mband > div:nth-child(-n+2) { border-top: 0; }
  .mband > div:nth-child(odd) { border-left: 0; }
  .led-row { grid-template-columns: minmax(0, 1fr); }
  .led-can, .led-cant { border-left: 0; border-top: 1px solid var(--border-2); }
  .led-cant { border-top: 1px dashed #E0B4A9; }
  .led-row.head { display: none; }
  .wfx { flex-direction: column; }
  .wfx-s { border-left: 1px solid var(--border-2) !important; border-radius: 0 !important; padding-left: 11px; }
  .wfx-s:first-child { border-radius: var(--r-sm) var(--r-sm) 0 0 !important; }
  .wfx-s:last-child { border-radius: 0 0 var(--r-sm) var(--r-sm) !important; }
  .wfx-s::after { display: none; }
  .wfx-s + .wfx-s { border-top: 0; }
}
@media (max-width: 720px) {
  .shift-a { flex: 1 1 50%; }
  .shift-a:nth-child(-n+4) { border-top: 1px solid var(--border-2); }
  .shift-a:nth-child(-n+2) { border-top: 0; }
  .shift-a:nth-child(4n+1) { border-left: 1px solid var(--border-2); }
  .shift-a:nth-child(odd) { border-left: 0; }
  .wx { overflow-x: auto; }
  .wx-d { flex: 0 0 88px; }
  .parse { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .parse dd { margin-bottom: 7px; }
}
@media (max-width: 560px) {
  .mband > div { flex: 1 1 100%; border-left: 0; border-top: 1px solid var(--border-2); }
  .mband > div:first-child { border-top: 0; }
  .spine-g { grid-template-columns: 58px minmax(0, 1fr); }
}

/* demo banner */
.demo-flag {
  background: var(--ink); color: #B9CCDC; font-size: 11.5px; font-weight: 540;
  padding: 6px 20px; display: flex; align-items: center; gap: 8px; justify-content: center;
}
.demo-flag b { color: #fff; font-weight: 640; }
.demo-flag svg { width: 13px; height: 13px; color: var(--accent); stroke-width: 2.2; }

/* mobile nav */
.rail-toggle { display: none; }
.mobile-scrim { display: none; }

@media (max-width: 1240px) {
  .g-main, .g-main-l { grid-template-columns: minmax(0,1fr); }
  .g-5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 1000px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .phone { width: 100%; flex-basis: auto; }
}
@media (max-width: 860px) {
  .rail {
    position: fixed; top: 0; bottom: 0; left: 0; transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.32,.72,.28,1); width: 15rem; flex-basis: 15rem;
  }
  .app.nav-open .rail { transform: translateX(0); }
  .app.rail-collapsed .rail { width: 15rem; flex-basis: 15rem; }
  .app.rail-collapsed .brand-text, .app.rail-collapsed .nav-item .nav-label,
  .app.rail-collapsed .rail-user .ru-t, .app.rail-collapsed .nav-group-label { display: block; opacity: 1; height: auto; padding: revert; }
  .app.rail-collapsed .nav-item { justify-content: flex-start; padding-left: 10px; padding-right: 10px; }
  .app.rail-collapsed .rail-brand { justify-content: flex-start; padding-left: 14px; }
  .mobile-scrim { display: block; position: fixed; inset: 0; background: rgba(11,27,43,.4); z-index: 39; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .app.nav-open .mobile-scrim { opacity: 1; pointer-events: auto; }
  .rail-toggle { display: grid; }
  .page-inner { padding: 16px 14px 48px; }
  .g-2, .g-3, .g-4, .g-5 { grid-template-columns: minmax(0,1fr); }
  .omnibox { max-width: none; }
  .omnibox kbd, .omnibox span { display: none; }
  .omnibox { flex: 0 0 34px; width: 34px; justify-content: center; padding: 0; }
  .topbar { padding: 0 12px; gap: 8px; }
  .page-head h1 { font-size: 18px; }
  /* stop the head's right-hand actions from crushing the title into a column */
  .card-head { flex-wrap: wrap; row-gap: 9px; }
  .card-head > div:not(.right):not(.ai-mark):not(.brandmark) { flex: 1 1 auto; min-width: 0; }
  .card-head .right { margin-left: 0; flex: 1 0 100%; }
  .drawer-head { flex-wrap: wrap; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .page-head .actions { max-width: 100%; min-width: 0; }
  .page-head .actions .seg { flex: 1 1 100%; min-width: 0; }
  .card-head .right .seg { flex: 1 1 100%; min-width: 0; }
  .inbox-grid { grid-template-columns: minmax(0,1fr); min-height: 0; }
  .inbox-grid .thread-list { border-right: 0; border-bottom: 1px solid var(--border); max-height: 250px; }
  .row { flex-wrap: wrap; row-gap: 8px; }
  .row .rright { margin-left: 0; flex: 1 0 100%; justify-content: flex-start; text-align: left; }
  .stat .val { font-size: 22px; }
  .cal { grid-template-columns: 42px repeat(12, minmax(78px,1fr)) !important; }
  .drawer { width: 100%; }
  .tbl-wrap { overflow-x: auto; }
  .tbl { min-width: 640px; }
}
@media print { .rail, .topbar { display: none; } }
