/* ============================================================
   CUSTODIA — Privacy Governance Console
   Design tokens: sober / institutional / trust-blue
   ============================================================ */

:root {
  /* Surfaces — cool off-white, low chroma */
  --bg:           #EEF1F5;
  --surface:      #FFFFFF;
  --surface-2:    #F8FAFC;
  --surface-3:    #F1F4F8;

  /* Ink */
  --ink:          #14171D;
  --ink-2:        #353B45;
  --muted:        #59616E;
  --faint:        #8B93A1;

  /* Lines */
  --border:       #E2E6EC;
  --border-2:     #D2D8E1;
  --border-3:     #C2C9D4;

  /* Brand — Luxgap navy + teal */
  --navy:         #162765;
  --navy-deep:    #0D1840;
  --blue:         #1C7BA4;
  --blue-2:       #2FACC4;
  --blue-tint:    #E5F4F8;
  --blue-tint-2:  #D3ECF2;
  --teal:         #1C7BA4;
  --teal-bright:  #33BAC6;
  --teal-tint:    #E5F4F8;

  /* AI accent — deliberately distinct indigo/violet (machine, not human) */
  --ai:           #6346A8;
  --ai-2:         #7A5DC2;
  --ai-tint:      #F0ECF9;
  --ai-tint-2:    #E6DEF5;
  --ai-line:      #D8CDEE;

  /* Status */
  --ok:           #1E7A50;
  --ok-tint:      #E4F1EA;
  --warn:         #A86B12;
  --warn-tint:    #FAEFD8;
  --crit:         #B4271C;
  --crit-tint:    #FBE7E4;
  --crit-line:    #F0C2BC;

  /* Type */
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radius */
  --r-sm: 4px;
  --r:    6px;
  --r-lg: 9px;
  --r-xl: 14px;

  /* Shadow — restrained, institutional */
  --sh-1: 0 1px 2px rgba(16, 30, 54, 0.06), 0 1px 1px rgba(16, 30, 54, 0.04);
  --sh-2: 0 2px 6px rgba(16, 30, 54, 0.07), 0 1px 2px rgba(16, 30, 54, 0.05);
  --sh-3: 0 10px 30px rgba(16, 30, 54, 0.12), 0 3px 8px rgba(16, 30, 54, 0.08);
  --sh-pop: 0 16px 48px rgba(16, 30, 54, 0.18);

  /* Layout */
  --rail: 244px;
  --copilot: 360px;
  --topbar: 56px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { height: 100vh; overflow-x: auto; overflow-y: hidden; }

::selection { background: var(--blue-tint-2); }

/* Scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #CBD2DC; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #B4BDCA; background-clip: padding-box; border: 2px solid transparent; }
*::-webkit-scrollbar-track { background: transparent; }

/* Type helpers */
.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow {
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--faint);
}
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); }

/* ---- App frame ---- */
.app { display: grid; grid-template-columns: var(--rail) 1fr; height: 100vh; min-width: 1080px; }
.app.copilot-open { grid-template-columns: var(--rail) 1fr var(--copilot); min-width: 1320px; }

/* ===================== SIDEBAR ===================== */
.rail {
  background: var(--navy-deep);
  color: #C5D2E4;
  display: flex; flex-direction: column;
  height: 100vh; overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.rail-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: #fff;
  display: grid; place-items: center; flex: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  padding: 3px;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { color: #fff; font-weight: 750; letter-spacing: .02em; font-size: 15px; }
.brand-sub { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: #6E84A6; margin-top: 1px; }

.rail-scroll { flex: 1; overflow-y: auto; padding: 8px 8px 16px; }
.rail-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }

.nav-group-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #5C708C;
  padding: 14px 10px 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: var(--r);
  color: #B7C5D9; cursor: pointer; font-size: 12.8px; font-weight: 500;
  position: relative; user-select: none;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #E6EDF6; }
.nav-item.active { background: rgba(51,186,198,0.16); color: #fff; font-weight: 600; }
.nav-item.active::before {
  content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--teal-bright);
}
.nav-item.disabled { opacity: 0.42; cursor: default; }
.nav-item.disabled:hover { background: transparent; color: #B7C5D9; }
.nav-ico { width: 16px; height: 16px; flex: none; opacity: .9; }
.nav-item .count {
  margin-left: auto; font-size: 10.5px; font-weight: 700; font-family: var(--mono);
  padding: 1px 6px; border-radius: 20px; background: rgba(255,255,255,0.1); color: #CBD8E8;
}
.nav-item .count.crit { background: var(--crit); color: #fff; }
.nav-item .count.warn { background: var(--warn); color: #fff; }

.rail-foot {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 10px 12px; display: flex; align-items: center; gap: 9px;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg,#3A6FC0,#234d8a); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 11.5px;
}
.rail-foot .who { font-size: 12px; color: #E6EDF6; font-weight: 600; line-height: 1.2; }
.rail-foot .role { font-size: 10px; color: #7E92AE; }

/* ===================== MAIN ===================== */
.main { display: flex; flex-direction: column; height: 100vh; overflow: hidden; min-width: 0; }

.topbar {
  height: var(--topbar); flex: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px;
}
.entity-switch {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 11px 5px 8px; border: 1px solid var(--border-2);
  border-radius: var(--r); cursor: pointer; background: var(--surface-2);
}
.entity-switch:hover { border-color: var(--border-3); }
.entity-logo {
  width: 24px; height: 24px; border-radius: 5px; flex: none;
  background: var(--navy); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 11px;
}
.entity-switch .nm { font-weight: 650; font-size: 12.5px; }
.entity-switch .sub { font-size: 10px; color: var(--faint); }

.topsearch {
  flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r);
  color: var(--faint);
}
.topsearch input {
  border: none; background: none; outline: none; flex: 1;
  font-family: var(--sans); font-size: 12.5px; color: var(--ink);
}
.topsearch kbd {
  font-family: var(--mono); font-size: 10px; color: var(--faint);
  border: 1px solid var(--border-2); border-radius: 4px; padding: 1px 5px; background: #fff;
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: var(--r); border: 1px solid var(--border-2);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; position: relative;
  color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--border-3); }
.icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--crit); border: 1.5px solid #fff; }
.lang-pill { font-size: 11px; font-weight: 700; font-family: var(--mono); color: var(--muted); padding: 6px 9px; border:1px solid var(--border-2); border-radius: var(--r); }
.lang-seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: var(--r); overflow: hidden; background: var(--surface-2); }
.lang-seg button {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .03em;
  padding: 5px 9px; border: none; background: transparent; color: var(--muted); cursor: pointer;
}
.lang-seg button:hover { background: var(--surface-3); color: var(--ink); }
.lang-seg button.on { background: var(--navy); color: #fff; }

/* ---- Luxgap demo banner ---- */
.lux-banner {
  flex: none; display: flex; align-items: center; gap: 16px;
  padding: 9px 18px;
  background: linear-gradient(100deg, var(--navy-deep) 0%, var(--navy) 52%, #1a4a72 100%);
  color: #EAF1F8; border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative; overflow: hidden;
}
.lux-banner::after {
  content: ""; position: absolute; right: -40px; top: 0; bottom: 0; width: 260px;
  background: radial-gradient(circle at 70% 50%, rgba(51,186,198,0.28), transparent 70%);
  pointer-events: none;
}
.lux-mark {
  width: 30px; height: 30px; border-radius: 7px; background: #fff; flex: none;
  display: grid; place-items: center; padding: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.lux-mark img { width: 100%; height: 100%; object-fit: contain; }
.lux-lead { display: flex; align-items: center; gap: 10px; flex: none; }
.lux-tag {
  font-size: 9.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--navy-deep); background: var(--teal-bright); padding: 3px 8px; border-radius: 5px; white-space: nowrap;
}
.lux-head { font-size: 12.5px; font-weight: 650; color: #fff; max-width: 360px; line-height: 1.3; }
.lux-points { display: flex; align-items: center; gap: 18px; margin-left: auto; flex-wrap: wrap; z-index: 1; }
.lux-point { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 550; color: #CFE0EF; white-space: nowrap; }
.lux-point svg { color: var(--teal-bright); flex: none; }
.lux-close {
  flex: none; width: 26px; height: 26px; border-radius: 6px; border: none; cursor: pointer; z-index: 1;
  background: rgba(255,255,255,0.1); color: #BBD0E4; display: grid; place-items: center;
}
.lux-close:hover { background: rgba(255,255,255,0.18); color: #fff; }
@media (max-width: 1480px) { .lux-head { display: none; } }

.copilot-toggle {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 11px 6px 9px; border-radius: var(--r);
  background: var(--ai-tint); border: 1px solid var(--ai-line); color: var(--ai);
  cursor: pointer; font-weight: 650; font-size: 12px;
}
.copilot-toggle:hover { background: var(--ai-tint-2); }
.copilot-toggle.on { background: var(--ai); color: #fff; border-color: var(--ai); }

/* Content scroll area */
.content { flex: 1; overflow-y: auto; }
.page { padding: 22px 26px 64px; max-width: 1320px; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.page-head .titles h1 { font-size: 21px; }
.page-head .titles p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; max-width: 640px; }
.page-head .ph-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: 12.5px;
  padding: 7px 13px; border-radius: var(--r); border: 1px solid var(--border-2);
  background: var(--surface); color: var(--ink-2); white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-3); }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.primary:hover { background: var(--navy-deep); }
.btn.ai { background: var(--ai); border-color: var(--ai); color: #fff; }
.btn.ai:hover { background: #553a96; }
.btn.ai-ghost { background: var(--ai-tint); border-color: var(--ai-line); color: var(--ai); }
.btn.ai-ghost:hover { background: var(--ai-tint-2); }
.btn.sm { padding: 5px 10px; font-size: 11.5px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn svg { width: 15px; height: 15px; }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-1);
}
.card-pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 13.5px; }
.card-head .sub { font-size: 11px; color: var(--faint); }
.card-head .ch-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }

/* Pills / badges */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 20px;
  border: 1px solid transparent; white-space: nowrap;
}
.pill .pdot { width: 6px; height: 6px; border-radius: 50%; }
.pill.ok   { background: var(--ok-tint);   color: var(--ok);   }
.pill.ok .pdot { background: var(--ok); }
.pill.warn { background: var(--warn-tint); color: var(--warn); }
.pill.warn .pdot { background: var(--warn); }
.pill.crit { background: var(--crit-tint); color: var(--crit); }
.pill.crit .pdot { background: var(--crit); }
.pill.info { background: var(--blue-tint); color: var(--blue); }
.pill.info .pdot { background: var(--blue); }
.pill.neutral { background: var(--surface-3); color: var(--muted); }
.pill.neutral .pdot { background: var(--faint); }
.pill.ai { background: var(--ai-tint); color: var(--ai); border-color: var(--ai-line); }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 4px;
  background: var(--surface-3); color: var(--muted); border: 1px solid var(--border);
}
.tag.sensitive { background: var(--crit-tint); color: var(--crit); border-color: var(--crit-line); }
.tag.legal { font-family: var(--mono); font-size: 10px; }

/* AI flag chip — the inline coherence signal */
.aiflag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 650; padding: 2px 7px 2px 5px; border-radius: 5px;
  background: var(--ai-tint); color: var(--ai); border: 1px solid var(--ai-line);
  cursor: pointer; white-space: nowrap;
}
.aiflag:hover { background: var(--ai-tint-2); }
.aiflag svg { width: 12px; height: 12px; }
.aiflag.warn { background: var(--warn-tint); color: var(--warn); border-color: #E9CF9C; }
.aiflag.crit { background: var(--crit-tint); color: var(--crit); border-color: var(--crit-line); }

.ai-spark { width: 13px; height: 13px; flex: none; color: var(--ai); }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl thead th {
  text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint);
  padding: 9px 12px; border-bottom: 1px solid var(--border-2); white-space: nowrap;
  position: sticky; top: 0; background: var(--surface-2); z-index: 1;
}
.tbl tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr.sel { background: var(--blue-tint); }
.tbl .nm { font-weight: 650; color: var(--ink); }
.tbl .muted { color: var(--muted); }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-2); margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 8px 13px; font-size: 12.5px; font-weight: 600; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  display: flex; align-items: center; gap: 7px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--navy); border-bottom-color: var(--navy); }
.tab .tcount { font-family: var(--mono); font-size: 10.5px; color: var(--faint); background: var(--surface-3); padding: 0 6px; border-radius: 10px; }

/* Grids */
.grid { display: grid; gap: 16px; }
.row { display: flex; gap: 16px; }

/* Meters */
.meter { height: 7px; border-radius: 20px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 20px; }

/* Misc */
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv .k { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.kv .v { font-size: 13px; color: var(--ink); }

.empty { text-align: center; color: var(--faint); padding: 40px; font-size: 12.5px; }

/* Drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgba(15,28,53,0.34); z-index: 40; animation: fade .15s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 540px; max-width: 92vw;
  background: var(--surface); z-index: 41; box-shadow: var(--sh-pop);
  display: flex; flex-direction: column; animation: slidein .22s cubic-bezier(.2,.7,.3,1);
  border-left: 1px solid var(--border);
}
@keyframes slidein { from { transform: translateX(28px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 12px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: center; background: var(--surface-2); }

/* ===================== COPILOT ===================== */
.copilot {
  background: var(--surface); border-left: 1px solid var(--border);
  height: 100vh; display: flex; flex-direction: column; overflow: hidden;
}
.copilot-head {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 9px;
  background: linear-gradient(180deg, var(--ai-tint), #fff);
}
.copilot-orb {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(145deg, var(--ai-2), var(--ai)); color: #fff;
  display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.copilot-head .ct { font-weight: 700; font-size: 13px; color: var(--ink); }
.copilot-head .cs { font-size: 10px; color: var(--ai); font-weight: 600; }
.copilot-ctx {
  margin: 10px 12px 0; padding: 7px 10px; border-radius: var(--r);
  background: var(--surface-3); font-size: 11px; color: var(--muted);
  display: flex; align-items: center; gap: 7px;
}
.copilot-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }

.sg {
  border: 1px solid var(--ai-line); border-radius: var(--r-lg); overflow: hidden; background: #fff;
  box-shadow: var(--sh-1);
}
.sg-top { padding: 9px 11px; display: flex; align-items: center; gap: 8px; background: var(--ai-tint); border-bottom: 1px solid var(--ai-line); }
.sg-top .sg-kind { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ai); }
.sg-top .sev { margin-left: auto; }
.sg-body { padding: 11px; }
.sg-body .sg-title { font-weight: 650; font-size: 12.5px; margin-bottom: 4px; }
.sg-body .sg-txt { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.sg-cite {
  margin-top: 8px; font-size: 10px; font-family: var(--mono); color: var(--ai);
  display: flex; flex-wrap: wrap; gap: 5px;
}
.sg-cite .src { background: var(--ai-tint); border: 1px solid var(--ai-line); padding: 1px 6px; border-radius: 4px; }
.sg-actions { padding: 9px 11px; border-top: 1px solid var(--border); display: flex; gap: 6px; background: var(--surface-2); }

.chip-btn {
  font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 20px;
  border: 1px solid var(--border-2); background: #fff; cursor: pointer; color: var(--ink-2);
}
.chip-btn:hover { background: var(--surface-2); }
.chip-btn.accept { background: var(--ok-tint); border-color: #B6DCC4; color: var(--ok); }
.chip-btn.accept:hover { background: #D6EADD; }
.chip-btn.dismiss:hover { background: var(--crit-tint); border-color: var(--crit-line); color: var(--crit); }

.copilot-foot { border-top: 1px solid var(--border); padding: 10px 12px; background: var(--surface-2); }
.copilot-input {
  display: flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid var(--border-2); border-radius: var(--r-lg); padding: 8px 10px;
}
.copilot-input input { flex: 1; border: none; outline: none; font-family: var(--sans); font-size: 12px; background: none; }
.copilot-input .send { width: 26px; height: 26px; border-radius: 6px; background: var(--ai); color: #fff; display: grid; place-items: center; cursor: pointer; border: none; }
.guardrail {
  margin-top: 8px; font-size: 10px; color: var(--faint); display: flex; align-items: center; gap: 6px; line-height: 1.4;
}

/* Chat bubbles (assistant module) */
.msg { display: flex; gap: 10px; max-width: 760px; }
.msg.user { margin-left: auto; flex-direction: row-reverse; }
.msg-av { width: 28px; height: 28px; border-radius: 8px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 11px; }
.msg-av.ai { background: linear-gradient(145deg,var(--ai-2),var(--ai)); color: #fff; }
.msg-av.me { background: var(--navy); color: #fff; }
.bubble { padding: 12px 15px; border-radius: 12px; font-size: 13px; line-height: 1.55; }
.msg.ai .bubble { background: var(--surface); border: 1px solid var(--border); border-top-left-radius: 4px; }
.msg.user .bubble { background: var(--navy); color: #fff; border-top-right-radius: 4px; }

/* Coherence/score ring helper handled inline via conic-gradient */

/* Flow map */
.flowmap { position: relative; }
.flow-node {
  position: absolute; border-radius: var(--r-lg); border: 1px solid var(--border-2);
  background: #fff; box-shadow: var(--sh-1); padding: 9px 11px; width: 150px; cursor: pointer;
  transition: box-shadow .12s, border-color .12s, transform .12s;
}
.flow-node:hover { box-shadow: var(--sh-2); border-color: var(--border-3); transform: translateY(-1px); }
.flow-node.sel { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.flow-node .fn-nm { font-weight: 650; font-size: 12px; }
.flow-node .fn-meta { font-size: 10px; color: var(--faint); margin-top: 1px; }
.flow-node.extl { border-style: dashed; }
.flow-node.risk { border-color: var(--crit-line); }

.animate-in { animation: rise .3s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
