:root {
      --ink: #16212E;
      --ink-2: #3C4A5A;
      --muted: #7C8A99;
      --faint: #AEB9C4;
      --line: #E5E2DA;
      --line-2: #EEEDE7;
      --surface: #FBFAF7;
      --panel: #FFFFFF;
      --panel-2: #F6F4EF;
      --brand: #1F4FE0;
      --brand-bg: #EAF0FF;
      --signal: #DE8412;
      --signal-bg: #FCF3E4;
      --lead: #7A52C7;
      --lead-bg: #F2ECFB;
      --strong: #0E8F5E;
      --strong-bg: #E4F4EC;
      --healthy: #3FA66A;
      --healthy-bg: #E9F5EE;
      --steady: #5B6B82;
      --steady-bg: #EEF1F5;
      --attn: #D8862B;
      --attn-bg: #FBF1E1;
      --risk: #D83A3F;
      --risk-bg: #FBE7E7;
      --radius: 13px;
      --shadow: 0 1px 2px rgba(20, 33, 46, .04), 0 8px 24px -16px rgba(20, 33, 46, .22);
      --shadow-lg: 0 24px 60px -28px rgba(20, 33, 46, .38);
    }

    * {
      box-sizing: border-box
    }

    html,
    body {
      margin: 0;
      padding: 0
    }

    body {
      font-family: 'Inter', system-ui, sans-serif;
      background: var(--surface);
      color: var(--ink);
      font-size: 14px;
      line-height: 1.5;
      -webkit-font-smoothing: antialiased
    }

    .mono {
      font-family: 'Spline Sans Mono', monospace;
      font-variant-numeric: tabular-nums
    }

    h1,
    h2,
    h3 {
      font-family: 'Space Grotesk', sans-serif;
      margin: 0;
      letter-spacing: -.01em
    }

    a {
      color: inherit
    }

    button {
      font-family: inherit;
      cursor: pointer
    }

    ::-webkit-scrollbar {
      width: 10px;
      height: 10px
    }

    ::-webkit-scrollbar-thumb {
      background: #d9d5cc;
      border-radius: 6px;
      border: 2px solid var(--surface)
    }

    .app {
      display: flex;
      min-height: 100vh
    }

    .sidebar {
      width: 248px;
      flex: none;
      background: var(--ink);
      color: #C5D0DC;
      display: flex;
      flex-direction: column;
      position: sticky;
      top: 0;
      height: 100vh;
      padding: 18px 14px;
      gap: 2px;
      z-index: 40
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 11px;
      padding: 4px 8px 16px
    }

    .logo {
      width: 34px;
      height: 34px;
      border-radius: 9px;
      background: linear-gradient(135deg, #2D5BD0, #5B86F0);
      display: grid;
      place-items: center;
      font-family: 'Space Grotesk';
      font-weight: 700;
      color: #fff;
      font-size: 19px;
      box-shadow: 0 4px 14px -4px rgba(45, 91, 208, .7)
    }

    .brand .bn {
      font-family: 'Space Grotesk';
      font-weight: 700;
      color: #fff;
      font-size: 15px;
      line-height: 1.1
    }

    .brand .bs {
      font-size: 10.5px;
      color: #7E8EA0
    }

    .nav-label {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .09em;
      text-transform: uppercase;
      color: #5E6E80;
      padding: 14px 10px 6px
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8.5px 10px;
      border-radius: 9px;
      font-size: 13.5px;
      font-weight: 500;
      color: #B7C3CF;
      cursor: pointer;
      transition: background .12s, color .12s;
      position: relative;
      white-space: nowrap
    }

    .nav-item:hover {
      background: rgba(255, 255, 255, .05);
      color: #EAF0F6
    }

    .nav-item.active {
      background: rgba(45, 91, 208, .18);
      color: #fff
    }

    .nav-item.active::before {
      content: "";
      position: absolute;
      left: -14px;
      top: 8px;
      bottom: 8px;
      width: 3px;
      border-radius: 0 3px 3px 0;
      background: #5B86F0
    }

    .nav-item .ic {
      width: 17px;
      height: 17px;
      flex: none;
      opacity: .9
    }

    .nav-item .pri {
      margin-left: auto;
      font-size: 9.5px;
      font-weight: 700;
      padding: 1px 6px;
      border-radius: 20px;
      background: rgba(255, 255, 255, .1);
      color: #9FB0C0
    }

    .nav-item.active .pri {
      background: rgba(91, 134, 240, .3);
      color: #DCE7FF
    }

    .sidebar .foot {
      margin-top: auto;
      font-size: 11px;
      color: #6C7C8E;
      padding: 12px 10px 2px;
      line-height: 1.6;
      border-top: 1px solid rgba(255, 255, 255, .07)
    }

    .sidebar .foot b {
      color: #9FB0C0;
      font-weight: 600
    }

    .main {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column
    }

    .topbar {
      height: 60px;
      background: rgba(251, 250, 247, .85);
      backdrop-filter: blur(8px);
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 0 24px;
      position: sticky;
      top: 0;
      z-index: 30
    }

    .crumb b {
      font-family: 'Space Grotesk';
      font-size: 15px;
      font-weight: 600;
      display: block;
      line-height: 1.1
    }

    .crumb span {
      font-size: 11.5px;
      color: var(--muted)
    }

    .spacer {
      flex: 1
    }

    .menu-btn {
      display: none;
      background: none;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 7px;
      color: var(--ink-2)
    }

    .src-pill {
      display: flex;
      align-items: center;
      gap: 7px;
      font-size: 11.5px;
      color: var(--ink-2);
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 20px;
      padding: 5px 11px;
      font-weight: 500
    }

    .src-pill .dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--strong);
      box-shadow: 0 0 0 3px var(--strong-bg)
    }

    .src-pill.sample .dot {
      background: var(--signal);
      box-shadow: 0 0 0 3px var(--signal-bg)
    }

    .seg-tabs {
      display: flex;
      background: var(--panel-2);
      border: 1px solid var(--line);
      border-radius: 9px;
      padding: 3px;
      gap: 2px
    }

    .seg-tabs button {
      border: none;
      background: none;
      font-size: 12px;
      font-weight: 600;
      color: var(--muted);
      padding: 5px 11px;
      border-radius: 7px
    }

    .seg-tabs button.on {
      background: var(--panel);
      color: var(--ink);
      box-shadow: var(--shadow)
    }

    .repsel {
      display: flex;
      align-items: center;
      gap: 7px
    }

    .repsel label {
      font-size: 11px;
      color: var(--muted);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .04em
    }

    .repsel select {
      font-family: inherit;
      font-size: 13px;
      font-weight: 500;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 6px 9px;
      background: var(--panel);
      color: var(--ink)
    }

    .content {
      padding: 26px 28px 60px;
      max-width: 1320px;
      width: 100%;
      margin: 0 auto
    }

    .page-head {
      margin-bottom: 18px
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .06em;
      color: var(--muted);
      margin-bottom: 7px
    }

    .eyebrow .prio {
      background: var(--ink);
      color: #fff;
      padding: 2px 7px;
      border-radius: 5px;
      font-size: 9.5px;
      letter-spacing: .04em
    }

    .page-head h2 {
      font-size: 26px;
      font-weight: 700;
      letter-spacing: -.02em
    }

    .page-head p {
      margin: 6px 0 0;
      color: var(--ink-2);
      font-size: 13.5px;
      max-width: 740px;
      line-height: 1.6
    }

    .lens-tag {
      font-size: 11px;
      font-weight: 600;
      color: var(--brand);
      background: var(--brand-bg);
      border-radius: 6px;
      padding: 3px 9px;
      display: inline-block;
      margin-top: 8px
    }

    .grid {
      display: grid;
      gap: 14px
    }

    .g-2 {
      grid-template-columns: repeat(2, 1fr)
    }

    .g-3 {
      grid-template-columns: repeat(3, 1fr)
    }

    .g-4 {
      grid-template-columns: repeat(4, 1fr)
    }

    .card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow: hidden
    }

    .card-h {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 14px 16px 0
    }

    .card-h h3 {
      font-size: 14px;
      font-weight: 600
    }

    .card-h .sub {
      font-size: 11.5px;
      color: var(--muted)
    }

    .card-h .sub.r {
      margin-left: auto
    }

    .card-b {
      padding: 14px 16px
    }

    .kpi {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 15px 16px;
      box-shadow: var(--shadow);
      position: relative;
      cursor: pointer;
      transition: transform .12s, box-shadow .12s;
      overflow: hidden
    }

    .kpi.click:hover,
    .kpi.click:focus-visible {
      transform: translateY(-2px);
      box-shadow: var(--shadow-lg);
      outline: 2px solid var(--brand);
      outline-offset: 2px
    }

    .kpi .stripe {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 4px;
      background: var(--brand)
    }

    .kpi .ic {
      font-size: 17px;
      margin-bottom: 6px;
      display: block
    }

    .kpi .lab {
      font-size: 11.5px;
      color: var(--muted);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .03em
    }

    .kpi .val {
      font-family: 'Space Grotesk';
      font-size: 27px;
      font-weight: 700;
      letter-spacing: -.02em;
      line-height: 1.15;
      margin-top: 3px
    }

    .kpi .val small {
      font-size: 13px;
      color: var(--muted);
      font-weight: 500;
      font-family: 'Inter'
    }

    .kpi .meta {
      font-size: 11.5px;
      color: var(--ink-2);
      margin-top: 3px
    }

    .kpi .delta {
      font-size: 11.5px;
      font-weight: 700;
      display: inline-flex;
      gap: 3px;
      align-items: center;
      margin-top: 5px;
      padding: 2px 7px;
      border-radius: 6px
    }

    .kpi .delta.up {
      color: var(--strong);
      background: var(--strong-bg)
    }

    .kpi .delta.down {
      color: var(--risk);
      background: var(--risk-bg)
    }

    .kpi .delta.flat {
      color: var(--steady);
      background: var(--steady-bg)
    }

    .kpi .filt {
      position: absolute;
      top: 11px;
      right: 12px;
      font-size: 10px;
      color: var(--faint);
      opacity: 0;
      transition: opacity .12s
    }

    .kpi.click:hover .filt {
      opacity: 1
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      font-weight: 600;
      padding: 2.5px 8px;
      border-radius: 20px;
      white-space: nowrap
    }

    .badge .bd {
      width: 6px;
      height: 6px;
      border-radius: 50%
    }

    .b-strong {
      background: var(--strong-bg);
      color: var(--strong)
    }

    .b-strong .bd {
      background: var(--strong)
    }

    .b-healthy {
      background: var(--healthy-bg);
      color: var(--healthy)
    }

    .b-healthy .bd {
      background: var(--healthy)
    }

    .b-steady {
      background: var(--steady-bg);
      color: var(--steady)
    }

    .b-steady .bd {
      background: var(--steady)
    }

    .b-attn {
      background: var(--attn-bg);
      color: var(--attn)
    }

    .b-attn .bd {
      background: var(--attn)
    }

    .b-risk {
      background: var(--risk-bg);
      color: var(--risk)
    }

    .b-risk .bd {
      background: var(--risk)
    }

    .tb {
      display: inline-flex;
      font-size: 10.5px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 5px;
      text-transform: uppercase;
      letter-spacing: .03em
    }

    .tb.cust {
      background: var(--brand-bg);
      color: var(--brand)
    }

    .tb.lead {
      background: var(--lead-bg);
      color: var(--lead)
    }

    .chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 11.5px;
      font-weight: 500;
      border: 1px solid var(--line);
      border-radius: 20px;
      padding: 3px 9px;
      color: var(--ink-2);
      background: var(--panel)
    }

    .chip.clk {
      cursor: pointer
    }

    .chip.clk:hover {
      border-color: var(--brand);
      color: var(--brand)
    }

    .vip {
      color: #B8860B
    }

    .pin {
      color: var(--risk)
    }

    .tbl-tools {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      padding: 12px 16px;
      border-bottom: 1px solid var(--line-2)
    }

    .search {
      display: flex;
      align-items: center;
      gap: 8px;
      border: 1px solid var(--line);
      border-radius: 9px;
      padding: 7px 12px;
      background: var(--panel);
      width: 100%;
      max-width: 240px;
      transition: border-color .15s
    }

    .search input {
      border: none;
      outline: none;
      font-family: inherit;
      font-size: 13px;
      width: 100%;
      background: none;
      color: var(--ink)
    }

    .search svg {
      color: var(--muted);
      flex: none
    }

    @keyframes spin {
      to {
        transform: rotate(360deg)
      }
    }

    .search.loading .s-ic {
      display: none
    }

    .search.loading .spin-ic {
      display: block;
      animation: spin .8s linear infinite
    }

    .fbtn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border: 1px solid var(--line);
      background: var(--panel);
      border-radius: 9px;
      padding: 7px 11px;
      font-size: 12.5px;
      font-weight: 500;
      color: var(--ink-2)
    }

    .fbtn:hover {
      border-color: var(--brand);
      color: var(--brand)
    }

    .fbtn select {
      border: none;
      background: none;
      font-family: inherit;
      font-size: 12.5px;
      font-weight: 600;
      color: var(--ink);
      outline: none
    }

    .fbtn .lb {
      color: var(--muted);
      font-weight: 600
    }

    .active-filters {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      align-items: center
    }

    .afilt {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 11.5px;
      font-weight: 600;
      background: var(--brand-bg);
      color: var(--brand);
      border-radius: 20px;
      padding: 3px 6px 3px 10px
    }

    .afilt .x {
      cursor: pointer;
      width: 15px;
      height: 15px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: rgba(31, 79, 224, .15);
      font-size: 11px;
      line-height: 1
    }

    .tbl-wrap {
      overflow-x: auto
    }

    table.dt {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px
    }

    table.dt th {
      text-align: left;
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .05em;
      color: var(--muted);
      padding: 12px 16px;
      border-bottom: 1px solid var(--line);
      white-space: nowrap;
      cursor: pointer;
      user-select: none
    }

    table.dt th.no-sort {
      cursor: default
    }

    table.dt th .ar {
      opacity: .4;
      font-size: 9px;
      margin-left: 3px
    }

    table.dt th.sorted .ar {
      opacity: 1;
      color: var(--brand)
    }

    table.dt td {
      padding: 14px 16px;
      border-bottom: 1px solid var(--line-2);
      vertical-align: middle;
      line-height: 1.4
    }

    table.dt th:first-child,
    table.dt td:first-child {
      position: sticky;
      left: 0;
      background: var(--panel);
      z-index: 2;
    }

    table.dt th:first-child {
      z-index: 3;
      border-right: 1px solid var(--line);
    }

    table.dt td:first-child {
      border-right: 1px solid var(--line-2);
    }

    table.dt tbody tr {
      transition: background .1s
    }

    table.dt tbody tr.click {
      cursor: pointer
    }

    table.dt tbody tr.click:hover {
      background: var(--panel-2)
    }

    .acctname {
      font-weight: 600;
      font-size: 13px;
      line-height: 1.2
    }

    .acctcode {
      font-size: 10.5px;
      color: var(--muted)
    }

    .tbl-foot {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 11px 16px;
      border-top: 1px solid var(--line-2);
      font-size: 12px;
      color: var(--muted)
    }

    .pager {
      margin-left: auto;
      display: flex;
      gap: 4px;
      align-items: center
    }

    .pager button {
      border: 1px solid var(--line);
      background: var(--panel);
      border-radius: 7px;
      min-width: 30px;
      height: 30px;
      font-size: 12.5px;
      font-weight: 600;
      color: var(--ink-2);
      padding: 0 7px
    }

    .pager button:disabled {
      opacity: .4;
      cursor: default
    }

    .pager button.on {
      background: var(--ink);
      color: #fff;
      border-color: var(--ink)
    }

    .empty {
      text-align: center;
      padding: 42px 20px;
      color: var(--muted)
    }

    .empty .big {
      font-size: 15px;
      font-weight: 600;
      color: var(--ink-2);
      margin-bottom: 4px
    }

    .bar {
      height: 6px;
      border-radius: 4px;
      background: var(--line-2);
      overflow: hidden;
      min-width: 46px
    }

    .bar span {
      display: block;
      height: 100%;
      border-radius: 4px
    }

    .hbar {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 6px 0
    }

    .hbar .hl {
      flex: none;
      font-size: 12.5px;
      color: var(--ink-2)
    }

    .hbar .ht {
      flex: 1;
      height: 22px;
      background: var(--panel-2);
      border-radius: 6px;
      overflow: hidden;
      cursor: pointer;
      position: relative
    }

    .hbar .ht span {
      display: block;
      height: 100%;
      border-radius: 6px;
      transition: width .4s cubic-bezier(.2, .7, .2, 1)
    }

    .hbar .ht:hover span {
      filter: brightness(1.06)
    }

    .hbar .hv {
      flex: none;
      font-family: 'Spline Sans Mono';
      font-size: 12.5px;
      font-weight: 600;
      width: 42px;
      text-align: right
    }

    .donut-wrap {
      display: flex;
      align-items: center;
      gap: 20px;
      flex-wrap: wrap
    }

    .legend {
      display: flex;
      flex-direction: column;
      gap: 7px
    }

    .legend span {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12.5px;
      color: var(--ink-2);
      cursor: pointer
    }

    .legend span:hover {
      color: var(--ink)
    }

    .legend i {
      width: 11px;
      height: 11px;
      border-radius: 3px;
      flex: none
    }

    .legend b {
      font-family: 'Spline Sans Mono';
      margin-left: auto
    }

    .funnel-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 7px 0;
      cursor: pointer
    }

    .funnel-row:hover .fb {
      filter: brightness(1.05)
    }

    .funnel-lab {
      flex: none;
      width: 120px;
      font-size: 12.5px;
      font-weight: 600
    }

    .funnel-lab small {
      display: block;
      font-weight: 400;
      font-size: 10.5px;
      color: var(--muted)
    }

    .fb {
      height: 30px;
      border-radius: 7px;
      display: flex;
      align-items: center;
      padding: 0 11px;
      color: #fff;
      font-weight: 700;
      font-family: 'Spline Sans Mono';
      font-size: 13px;
      min-width: 38px;
      transition: filter .12s
    }

    .hero {
      background: linear-gradient(120deg, #16212E, #1E3350);
      color: #fff;
      border-radius: var(--radius);
      padding: 20px 22px;
      margin-bottom: 16px;
      display: flex;
      justify-content: space-between;
      gap: 24px;
      flex-wrap: wrap;
      align-items: flex-end;
      box-shadow: var(--shadow-lg);
      position: relative;
      overflow: hidden
    }

    .hero::after {
      content: "";
      position: absolute;
      right: -60px;
      top: -60px;
      width: 240px;
      height: 240px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(91, 134, 240, .35), transparent 70%)
    }

    .hero .greet {
      font-size: 12px;
      color: #9FB6D4;
      font-weight: 600;
      letter-spacing: .03em
    }

    .hero h2 {
      font-size: 23px;
      color: #fff;
      margin: 5px 0 0
    }

    .hero .sub {
      font-size: 12.5px;
      color: #AFC2D8;
      margin-top: 7px;
      max-width: 420px;
      line-height: 1.55
    }

    .hero .money {
      text-align: right;
      position: relative;
      z-index: 1
    }

    .hero .money .n {
      font-family: 'Space Grotesk';
      font-size: 38px;
      font-weight: 700;
      letter-spacing: -.02em;
      line-height: 1;
      background: linear-gradient(90deg, #fff, #BFD3F2);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent
    }

    .hero .money .l {
      font-size: 11.5px;
      color: #9FB6D4;
      margin-top: 5px
    }

    .queue-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 12px;
      flex-wrap: wrap
    }

    .queue-bar .lbl {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .05em;
      color: var(--muted)
    }

    .qsort {
      display: flex;
      background: var(--panel-2);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 3px
    }

    .qsort button {
      border: none;
      background: none;
      font-size: 12px;
      font-weight: 600;
      color: var(--muted);
      padding: 4px 10px;
      border-radius: 6px
    }

    .qsort button.on {
      background: var(--panel);
      color: var(--ink);
      box-shadow: var(--shadow)
    }

    .qcard {
      display: flex;
      gap: 14px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 14px 16px;
      margin-bottom: 10px;
      box-shadow: var(--shadow);
      cursor: pointer;
      transition: transform .12s, box-shadow .12s;
      position: relative
    }

    .qcard:hover {
      transform: translateY(-1px);
      box-shadow: var(--shadow-lg)
    }

    .qcard.first {
      border-color: #cdd9ef;
      box-shadow: 0 0 0 2px var(--brand-bg), var(--shadow)
    }

    .qcard .rk {
      flex: none;
      width: 30px;
      height: 30px;
      border-radius: 8px;
      display: grid;
      place-items: center;
      color: #fff;
      font-family: 'Space Grotesk';
      font-weight: 700;
      font-size: 14px
    }

    .qcard .body {
      flex: 1;
      min-width: 0
    }

    .qcard .top {
      display: flex;
      align-items: center;
      gap: 7px;
      flex-wrap: wrap
    }

    .qcard .nm {
      font-family: 'Space Grotesk';
      font-weight: 600;
      font-size: 15px
    }

    .qcard .who {
      font-size: 12px;
      color: var(--muted);
      margin-top: 3px
    }

    .qcard .who a {
      color: var(--brand);
      font-weight: 600;
      text-decoration: none
    }

    .qcard .why {
      font-size: 13px;
      color: var(--ink-2);
      margin-top: 6px;
      line-height: 1.5
    }

    .qcard .why .tag {
      font-weight: 700;
      color: var(--signal)
    }

    .qcard .say {
      margin-top: 8px;
      background: var(--ink);
      color: #E7EEF5;
      border-radius: 9px;
      padding: 8px 12px;
      font-size: 12.5px;
      line-height: 1.5
    }

    .qcard .say b {
      color: #8FB4DD;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: .05em;
      margin-right: 6px;
      font-weight: 700
    }

    .qcard .act {
      flex: none;
      display: flex;
      flex-direction: column;
      gap: 6px;
      align-items: flex-end
    }

    .qcard .opp {
      font-family: 'Space Grotesk';
      font-size: 18px;
      font-weight: 700
    }

    .qcard .opl {
      font-size: 10.5px;
      color: var(--muted);
      text-align: right
    }

    .btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border: 1px solid var(--line);
      background: var(--panel);
      border-radius: 9px;
      padding: 7px 12px;
      font-size: 12.5px;
      font-weight: 600;
      color: var(--ink-2);
      white-space: nowrap;
      transition: .12s
    }

    .btn:hover {
      border-color: var(--brand);
      color: var(--brand)
    }

    .btn.pri {
      background: var(--brand);
      border-color: var(--brand);
      color: #fff
    }

    .btn.pri:hover {
      background: #1A45C8;
      color: #fff
    }

    .btn.ok {
      background: var(--strong);
      border-color: var(--strong);
      color: #fff
    }

    .btn.ok:hover {
      filter: brightness(1.05);
      color: #fff
    }

    .btn.sm {
      padding: 5px 10px;
      font-size: 11.5px
    }

    .btn.ghost {
      background: none;
      border-color: transparent;
      color: var(--muted)
    }

    .btn.ghost:hover {
      background: var(--panel-2);
      color: var(--ink)
    }

    .dd-menu {
      position: relative;
      display: inline-block;
      margin-left: 6px;
      vertical-align: middle;
    }

    .dd-btn {
      border: 1px solid var(--line);
      background: var(--panel);
      border-radius: 9px;
      padding: 5px 8px;
      font-size: 14px;
      font-weight: bold;
      color: var(--ink-2);
      cursor: pointer;
      line-height: 1;
    }

    .dd-btn:hover {
      border-color: var(--brand);
      color: var(--brand);
    }

    .dd-content {
      display: none;
      position: absolute;
      right: 0;
      bottom: 120%;
      background: var(--panel);
      min-width: 130px;
      box-shadow: var(--shadow-lg);
      border-radius: 9px;
      border: 1px solid var(--line);
      z-index: 50;
      padding: 6px;
      flex-direction: column;
      gap: 4px;
    }

    .dd-menu:hover .dd-content,
    .dd-menu:focus-within .dd-content {
      display: flex;
    }

    /* ---- Modern 4-button action row (Batch 4) ---- */
    .card-action-buttons {
      display: flex;
      flex-direction: column;
      gap: 5px;
      margin-top: 6px;
    }
    .act-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 5px 10px;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--ink-2);
      text-decoration: none;
      transition: background .15s, border-color .15s, color .15s;
      width: 100%;
      justify-content: center;
    }
    .act-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
    .act-btn:hover { background: var(--panel-2); border-color: var(--brand); color: var(--brand); }
    .act-btn.btn-call { background: #EAF0FF; border-color: #bed0f8; color: #1F4FE0; }
    .act-btn.btn-call:hover { background: #d1dffd; }
    .act-btn.btn-email { background: var(--panel); }
    .act-btn.btn-log { background: var(--panel); }
    .act-btn.btn-skip { background: var(--panel); color: var(--muted); }
    .act-btn.btn-skip:hover { background: var(--risk-bg); border-color: var(--risk); color: var(--risk); }
    .act-btn.btn-undo { background: var(--strong-bg); border-color: #8fddc0; color: var(--strong); width: 100%; justify-content: center; }

    /* Compact mode */
    .qcard.compact { padding: 8px 10px; }
    .qcard.compact .why, .qcard.compact .why-rank, .qcard.compact .say, .qcard.compact .sigs { display: none; }
    .qcard.compact .act { flex-direction: row; gap: 4px; }
    .qcard.compact .card-action-buttons { flex-direction: row; }
    .qcard.compact .act-btn span { display: none; }
    .qcard.compact .act-btn { width: 28px; height: 28px; padding: 0; justify-content: center; }

    /* Pagination bar */
    .pagination-bar button:disabled { opacity: .4; cursor: default; }

    .dd-content button {
      width: 100%;
      text-align: left;
      justify-content: flex-start;
    }

    .undo-toast-btn {
      margin-left: 12px;
      background: rgba(255, 255, 255, 0.2);
      border: none;
      color: #fff;
      padding: 4px 8px;
      border-radius: 6px;
      font-weight: bold;
      cursor: pointer;
      font-size: 11px;
    }

    .undo-toast-btn:hover {
      background: rgba(255, 255, 255, 0.3);
    }

    .note {
      display: flex;
      gap: 9px;
      align-items: flex-start;
      background: var(--brand-bg);
      border: 1px solid #cfddfb;
      border-radius: 10px;
      padding: 10px 13px;
      font-size: 12.5px;
      color: #2a4a8f;
      line-height: 1.55
    }

    .note svg {
      flex: none;
      margin-top: 1px;
      color: var(--brand)
    }

    .note.warn {
      background: var(--signal-bg);
      border-color: #f0d6a8;
      color: #8a5a10
    }

    .note.warn svg {
      color: var(--signal)
    }

    .psum {
      background: var(--panel);
      border: 1px solid var(--line);
      border-left: 3px solid var(--brand);
      border-radius: 9px;
      padding: 11px 14px;
      font-size: 13px;
      color: var(--ink-2);
      margin-bottom: 16px;
      line-height: 1.5
    }

    .overlay {
      position: fixed;
      inset: 0;
      background: rgba(20, 33, 46, .5);
      backdrop-filter: blur(3px);
      display: none;
      align-items: flex-start;
      justify-content: center;
      padding: 40px 20px;
      z-index: 80;
      overflow-y: auto
    }

    .overlay.open {
      display: flex
    }

    .modal {
      background: var(--panel);
      border-radius: 16px;
      width: 100%;
      max-width: 860px;
      box-shadow: var(--shadow-lg);
      animation: pop .18s cubic-bezier(.2, .8, .2, 1)
    }

    .modal.wide {
      max-width: 1040px
    }

    @keyframes pop {
      from {
        opacity: 0;
        transform: translateY(10px) scale(.98)
      }

      to {
        opacity: 1;
        transform: none
      }
    }

    .modal-h {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 16px 20px;
      border-bottom: 1px solid var(--line)
    }

    .modal-h h3 {
      font-size: 16px;
      font-weight: 600
    }

    .modal-h .x {
      margin-left: auto;
      border: none;
      background: var(--panel-2);
      width: 30px;
      height: 30px;
      border-radius: 8px;
      font-size: 16px;
      color: var(--ink-2)
    }

    .modal-b {
      padding: 18px 20px;
      max-height: 70vh;
      overflow-y: auto
    }

    .ws-head {
      display: flex;
      justify-content: space-between;
      gap: 18px;
      flex-wrap: wrap;
      margin-bottom: 14px
    }

    .ws-title {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap
    }

    .ws-title h2 {
      font-size: 22px
    }

    .ws-meta {
      display: flex;
      gap: 14px;
      flex-wrap: wrap;
      font-size: 12.5px;
      color: var(--ink-2);
      margin-top: 7px
    }

    .ws-meta b {
      color: var(--ink)
    }

    .ws-btns {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: flex-start
    }

    .ws {
      display: grid;
      grid-template-columns: 1fr 320px;
      gap: 16px;
      align-items: start
    }

    .tldr {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 16px;
      margin-bottom: 14px
    }

    .tldr .row {
      display: flex;
      gap: 16px;
      flex-wrap: wrap;
      align-items: flex-start
    }

    .tldr .big {
      font-family: 'Space Grotesk';
      font-size: 26px;
      font-weight: 700;
      letter-spacing: -.02em
    }

    .tldr .lab {
      font-size: 10.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .03em;
      color: var(--muted)
    }

    .say-strip {
      margin-top: 12px;
      background: var(--ink);
      color: #E7EEF5;
      border-radius: 9px;
      padding: 9px 13px;
      font-size: 13px;
      line-height: 1.5
    }

    .say-strip b {
      color: #8FB4DD;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: .05em;
      margin-right: 6px
    }

    .ws-tabs {
      display: flex;
      gap: 3px;
      background: var(--panel-2);
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 3px;
      margin-bottom: 14px;
      overflow-x: auto
    }

    .ws-tabs button {
      border: none;
      background: none;
      font-size: 12.5px;
      font-weight: 600;
      color: var(--muted);
      padding: 7px 13px;
      border-radius: 7px;
      white-space: nowrap
    }

    .ws-tabs button.on {
      background: var(--panel);
      color: var(--ink);
      box-shadow: var(--shadow)
    }

    .an-sec {
      margin-bottom: 18px
    }

    .an-h {
      display: flex;
      align-items: center;
      gap: 9px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .04em;
      color: var(--muted);
      margin-bottom: 9px
    }

    .an-h .ln {
      flex: 1;
      height: 1px;
      background: var(--line-2)
    }

    /* ---- account 360 section cards ---- */
    .acard {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 15px 17px;
      margin-bottom: 14px;
      box-shadow: var(--shadow)
    }

    .acard .an-h {
      margin-bottom: 11px
    }

    .sub-note {
      color: var(--faint);
      font-weight: 500;
      text-transform: none;
      letter-spacing: 0;
      font-size: 10.5px
    }

    .why-lead {
      display: flex;
      gap: 10px;
      font-size: 14px;
      line-height: 1.6;
      color: var(--ink);
      align-items: flex-start
    }

    .why-lead .tag {
      font-weight: 700;
      color: var(--signal)
    }

    .why-foot {
      font-size: 11px;
      color: var(--muted);
      margin-top: 11px;
      padding-top: 11px;
      border-top: 1px dashed var(--line-2)
    }

    .chart-kpis {
      display: flex;
      gap: 26px;
      margin-bottom: 12px;
      flex-wrap: wrap
    }

    .chart-kpis .ck-l {
      display: block;
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .03em;
      color: var(--muted);
      margin-bottom: 2px
    }

    .chart-kpis .ck-v {
      font-family: 'Space Grotesk';
      font-size: 19px;
      font-weight: 700;
      letter-spacing: -.01em
    }

    .acard .playbook li {
      padding: 9px 0;
      border-bottom: 1px solid var(--line-2)
    }

    .acard .playbook li:last-child {
      border-bottom: none;
      padding-bottom: 0
    }

    .acard .playbook li:first-child {
      padding-top: 0
    }

    .acard .tl {
      margin: 0
    }

    .acard table.dt {
      margin: 0
    }

    .offrow {
      padding: 10px 0;
      border-bottom: 1px solid var(--line-2);
      font-size: 13px;
      line-height: 1.55
    }

    .offrow:last-child {
      border-bottom: none;
      padding-bottom: 0
    }

    .offrow:first-child {
      padding-top: 0
    }

    .tldr .row>div {
      padding-right: 22px;
      margin-right: 2px;
      border-right: 1px solid var(--line-2);
      min-width: 96px
    }

    .tldr .row>div:last-child {
      border-right: none
    }

    .precheck {
      list-style: none;
      margin: 0;
      padding: 0
    }

    .precheck li {
      padding: 6px 0;
      border-bottom: 1px solid var(--line-2)
    }

    .precheck label {
      display: flex;
      gap: 9px;
      align-items: flex-start;
      cursor: pointer;
      font-size: 13px;
      color: var(--ink-2)
    }

    .precheck input {
      margin-top: 2px;
      accent-color: var(--brand)
    }

    .precheck li.done label {
      color: var(--muted);
      text-decoration: line-through
    }

    .playbook {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 9px
    }

    .playbook li {
      display: flex;
      gap: 11px
    }

    .playbook .pn {
      flex: none;
      width: 22px;
      height: 22px;
      border-radius: 6px;
      background: var(--brand-bg);
      color: var(--brand);
      font-family: 'Space Grotesk';
      font-weight: 700;
      font-size: 12px;
      display: grid;
      place-items: center
    }

    .playbook .pt {
      font-weight: 600;
      font-size: 13px
    }

    .playbook .pd {
      font-size: 12.5px;
      color: var(--ink-2);
      margin-top: 2px;
      line-height: 1.5
    }

    /* ---- queue card signals ---- */
    .sigs {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 7px
    }

    .sig {
      font-size: 11px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 6px;
      border: 1px solid var(--line);
      background: var(--panel-2);
      color: var(--ink-2);
      line-height: 1.5
    }

    .sig.sp {
      color: #7A52C7;
      border-color: #7A52C733;
      background: #7A52C70f
    }

    .sig.ch {
      color: #1F4FE0;
      border-color: #1F4FE033;
      background: #1F4FE00f
    }

    .sig.q {
      color: #B5670C;
      border-color: #DE841233;
      background: #DE84120f
    }

    .sig.out {
      color: #D83A3F;
      border-color: #D83A3F33;
      background: #D83A3F0f
    }

    .sig.nw {
      color: #0E8F5E;
      border-color: #0E8F5E33;
      background: #0E8F5E0f
    }

    /* ---- redesigned pre-call checklist ---- */
    .pcl-prog {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px
    }

    .pcl-count {
      font-size: 12px;
      font-weight: 700;
      color: var(--muted);
      white-space: nowrap;
      font-family: 'Spline Sans Mono', monospace
    }

    .pcl-bar {
      flex: 1;
      height: 6px;
      background: var(--line-2);
      border-radius: 3px;
      overflow: hidden
    }

    .pcl-bar i {
      display: block;
      height: 100%;
      background: #0E8F5E;
      width: 0;
      border-radius: 3px;
      transition: width .25s ease
    }

    .pcl {
      display: flex;
      flex-direction: column;
      gap: 8px
    }

    .pcl-item {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 11px 13px;
      border: 1px solid var(--line);
      border-radius: 11px;
      background: var(--panel);
      cursor: pointer;
      transition: border-color .12s, background .12s, transform .12s
    }

    .pcl-item:hover {
      border-color: #cdd9ef;
      background: var(--panel-2);
      transform: translateX(2px)
    }

    .pcl-item.done {
      background: #0E8F5E0a;
      border-color: #0E8F5E40
    }

    .pcl-check {
      flex: none;
      width: 20px;
      height: 20px;
      border-radius: 6px;
      border: 1.5px solid var(--line-2);
      display: grid;
      place-items: center;
      margin-top: 2px;
      color: transparent;
      font-size: 12px;
      font-weight: 800;
      transition: .12s
    }

    .pcl-item:hover .pcl-check {
      border-color: #0E8F5E80
    }

    .pcl-item.done .pcl-check {
      background: #0E8F5E;
      border-color: #0E8F5E;
      color: #fff
    }

    .pcl-ic {
      flex: none;
      width: 32px;
      height: 32px;
      border-radius: 9px;
      background: var(--brand-bg);
      display: grid;
      place-items: center;
      font-size: 16px
    }

    .pcl-item.done .pcl-ic {
      filter: grayscale(.4);
      opacity: .7
    }

    .pcl-main {
      flex: 1;
      min-width: 0
    }

    .pcl-t {
      font-weight: 600;
      font-size: 13px;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap
    }

    .pcl-item.done .pcl-t {
      color: var(--muted);
      text-decoration: line-through
    }

    .pcl-src {
      font-size: 9.5px;
      font-weight: 600;
      color: var(--faint);
      background: var(--panel-2);
      border: 1px solid var(--line);
      border-radius: 5px;
      padding: 1px 6px;
      text-transform: none;
      font-family: 'Spline Sans Mono', monospace;
      letter-spacing: 0
    }

    .pcl-d {
      font-size: 12px;
      color: var(--ink-2);
      margin-top: 3px;
      line-height: 1.55
    }

    .pcl-item.done .pcl-d {
      color: var(--faint)
    }

    .tl {
      list-style: none;
      margin: 0;
      padding: 0
    }

    .tl li {
      position: relative;
      padding: 0 0 14px 20px;
      border-left: 2px solid var(--line-2);
      margin-left: 5px
    }

    .tl li:last-child {
      border-color: transparent
    }

    .tl .dot {
      position: absolute;
      left: -6px;
      top: 3px;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--brand);
      border: 2px solid var(--panel)
    }

    .tl .th {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
      font-size: 11.5px
    }

    .tl .tt {
      font-weight: 700;
      color: var(--ink)
    }

    .tl .tdt {
      color: var(--muted)
    }

    .tl .tn {
      font-size: 12.5px;
      color: var(--ink-2);
      margin-top: 3px;
      line-height: 1.5
    }

    .ask {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      position: sticky;
      top: 76px
    }

    .ask-top {
      display: flex;
      gap: 10px;
      align-items: center;
      padding: 13px 15px;
      border-bottom: 1px solid var(--line-2)
    }

    .ask-top .av {
      width: 30px;
      height: 30px;
      border-radius: 8px;
      background: linear-gradient(135deg, #2D5BD0, #5B86F0);
      display: grid;
      place-items: center
    }

    .ask-top b {
      font-size: 13px
    }

    .ask-top .st {
      font-size: 11px;
      color: var(--muted)
    }

    .ask-msgs {
      padding: 13px 15px;
      display: flex;
      flex-direction: column;
      gap: 9px;
      max-height: 300px;
      overflow-y: auto;
      font-size: 12.5px
    }

    .msg {
      display: flex;
      gap: 8px
    }

    .msg .ava {
      width: 22px;
      height: 22px;
      border-radius: 6px;
      flex: none;
      display: grid;
      place-items: center;
      font-size: 10px;
      font-weight: 700
    }

    .msg.bot .ava {
      background: var(--ink);
      color: #fff
    }

    .msg.user {
      flex-direction: row-reverse
    }

    .msg.user .ava {
      background: var(--brand-bg);
      color: var(--brand)
    }

    .bubble {
      background: var(--panel-2);
      border-radius: 10px;
      padding: 8px 11px;
      line-height: 1.5;
      max-width: 85%
    }

    .msg.user .bubble {
      background: var(--brand);
      color: #fff
    }

    .qchips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      padding: 0 15px 11px
    }

    .qchip {
      font-size: 11.5px;
      border: 1px solid var(--line);
      border-radius: 20px;
      padding: 4px 10px;
      color: var(--ink-2);
      cursor: pointer
    }

    .qchip:hover {
      border-color: var(--brand);
      color: var(--brand)
    }

    .ask-in {
      display: flex;
      gap: 7px;
      padding: 11px 13px;
      border-top: 1px solid var(--line-2)
    }

    .ask-in input {
      flex: 1;
      border: 1px solid var(--line);
      border-radius: 9px;
      padding: 8px 11px;
      font-family: inherit;
      font-size: 13px;
      outline: none
    }

    .mismatch {
      display: flex;
      gap: 10px;
      background: var(--signal-bg);
      border: 1px solid #f0d6a8;
      border-radius: 11px;
      padding: 11px 14px;
      margin-bottom: 12px;
      font-size: 12.5px;
      color: #8a5a10
    }

    .mismatch svg {
      flex: none;
      color: var(--signal)
    }

    table.heat {
      border-collapse: collapse;
      width: 100%;
      font-size: 11px
    }

    table.heat th {
      padding: 5px 4px;
      font-size: 10px;
      color: var(--muted);
      font-weight: 600;
      text-align: center
    }

    table.heat td.seg {
      text-align: left;
      font-weight: 600;
      font-size: 12px;
      padding: 6px 10px 6px 0;
      cursor: pointer;
      white-space: nowrap
    }

    table.heat td.seg.on {
      color: var(--brand)
    }

    table.heat td.cell {
      width: 38px;
      height: 26px;
      text-align: center;
      font-size: 9px;
      font-weight: 700;
      color: #fff;
      border-radius: 5px
    }

    .toast {
      position: fixed;
      bottom: 22px;
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: var(--ink);
      color: #fff;
      font-size: 12.5px;
      padding: 12px 20px;
      border-radius: 30px;
      box-shadow: 0 12px 24px rgba(0, 0, 0, .3);
      opacity: 0;
      pointer-events: none;
      transition: transform .2s, opacity .2s;
      z-index: 9999
    }

    .toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0)
    }

    .toast.error {
      background: var(--risk);
      color: #fff
    }

    @media(max-width:1080px) {
      .ws {
        grid-template-columns: 1fr
      }

      .ask {
        position: static
      }
    }

    @media(max-width:920px) {
      .g-4 {
        grid-template-columns: repeat(2, 1fr)
      }

      .g-3 {
        grid-template-columns: 1fr
      }

      .hero .money {
        text-align: left
      }
    }

    /* ---- FAB global find-items ---- */
    .fab {
      position: fixed;
      right: 22px;
      bottom: 22px;
      z-index: 70;
      display: inline-flex;
      align-items: center;
      gap: 9px;
      background: var(--ink);
      color: #fff;
      border: none;
      border-radius: 30px;
      padding: 13px 19px;
      font-weight: 600;
      font-size: 13.5px;
      box-shadow: var(--shadow-lg);
      transition: transform .14s
    }

    .fab:hover {
      transform: translateY(-2px)
    }

    .fab svg {
      flex: none
    }

    @media(max-width:780px) {
      .fab span {
        display: none
      }

      .fab {
        padding: 14px;
        border-radius: 50%
      }
    }

    /* ---- transparent priority breakdown ---- */
    .ppart {
      display: inline-block;
      font-size: 10.5px;
      font-weight: 600;
      color: var(--ink-2);
      background: var(--panel-2);
      border: 1px solid var(--line);
      border-radius: 5px;
      padding: 1px 6px;
      margin: 2px 3px 0 0
    }

    .ppart.neg {
      color: #9AA8B6
    }

    .why-rank {
      display: flex;
      flex-wrap: wrap;
      gap: 0;
      margin-top: 8px;
      align-items: center
    }

    .why-rank .wl {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .04em;
      color: var(--muted);
      margin-right: 6px
    }

    /* ---- New leads ---- */
    .lead-form {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px
    }

    .lead-form .full {
      grid-column: 1/-1
    }

    .field {
      display: flex;
      flex-direction: column;
      gap: 5px
    }

    .field label {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .03em;
      color: var(--muted)
    }

    .field input,
    .field select,
    .field textarea {
      border: 1px solid var(--line);
      border-radius: 9px;
      padding: 9px 11px;
      font-family: inherit;
      font-size: 13px;
      outline: none;
      background: var(--panel);
      color: var(--ink)
    }

    .field input:focus,
    .field textarea:focus {
      border-color: var(--brand)
    }

    .fit-ring {
      display: flex;
      align-items: center;
      gap: 14px
    }

    .fitbar {
      flex: 1;
      height: 9px;
      border-radius: 6px;
      background: var(--line-2);
      overflow: hidden
    }

    .fitbar span {
      display: block;
      height: 100%;
      border-radius: 6px
    }

    .analyzing {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--brand);
      font-weight: 600;
      font-size: 13px
    }

    .spin {
      width: 16px;
      height: 16px;
      border: 2px solid var(--brand-bg);
      border-top-color: var(--brand);
      border-radius: 50%;
      animation: sp .7s linear infinite
    }

    @keyframes sp {
      to {
        transform: rotate(360deg)
      }
    }

    .src-tag {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 10.5px;
      font-weight: 600;
      color: var(--lead);
      background: var(--lead-bg);
      border-radius: 20px;
      padding: 2px 9px
    }

    /* ---- Performance ---- */
    .cmp {
      font-size: 11px;
      font-weight: 700;
      padding: 1px 6px;
      border-radius: 5px;
      margin-left: 6px
    }

    .cmp.up {
      color: var(--strong);
      background: var(--strong-bg)
    }

    .cmp.down {
      color: var(--risk);
      background: var(--risk-bg)
    }

    .forecast-bar {
      height: 30px;
      border-radius: 8px;
      background: var(--panel-2);
      overflow: hidden;
      display: flex
    }

    .forecast-bar i {
      display: block;
      height: 100%
    }

    /* ---- Email composer ---- */
    .angle-tabs {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-bottom: 12px
    }

    .angle-tabs button {
      border: 1px solid var(--line);
      background: var(--panel);
      border-radius: 9px;
      padding: 8px 12px;
      font-size: 12px;
      font-weight: 600;
      color: var(--ink-2);
      text-align: left;
      flex: 1;
      min-width: 150px
    }

    .angle-tabs button.on {
      border-color: var(--brand);
      background: var(--brand-bg);
      color: var(--brand)
    }

    .angle-tabs button small {
      display: block;
      font-weight: 400;
      color: var(--muted);
      font-size: 10.5px;
      margin-top: 2px
    }

    .mailpaper {
      border: 1px solid var(--line);
      border-radius: 11px;
      overflow: hidden
    }

    .mailpaper .mh {
      background: var(--panel-2);
      padding: 10px 14px;
      font-size: 12px;
      color: var(--ink-2);
      border-bottom: 1px solid var(--line-2)
    }

    .mailpaper .mb {
      padding: 14px;
      font-size: 13px;
      line-height: 1.6;
      white-space: pre-wrap;
      color: var(--ink)
    }

    .mailpaper textarea {
      width: 100%;
      border: none;
      outline: none;
      font-family: inherit;
      font-size: 13px;
      line-height: 1.6;
      resize: vertical;
      min-height: 230px;
      color: var(--ink)
    }

    /* ---- Calendar redesign ---- */
    .calwrap {
      overflow-x: auto;
      padding-bottom: 4px
    }

    table.cal2 {
      border-collapse: separate;
      border-spacing: 5px;
      width: 100%;
      min-width: 760px
    }

    table.cal2 th {
      font-size: 10.5px;
      font-weight: 700;
      color: var(--muted);
      text-align: center;
      padding-bottom: 2px
    }

    table.cal2 th.now {
      color: var(--brand)
    }

    table.cal2 td.seg {
      text-align: left;
      font-weight: 600;
      font-size: 12.5px;
      padding-right: 12px;
      white-space: nowrap;
      cursor: pointer;
      min-width: 150px
    }

    table.cal2 td.seg:hover {
      color: var(--brand)
    }

    table.cal2 td.seg.on {
      color: var(--brand)
    }

    table.cal2 td.cell {
      height: 40px;
      border-radius: 8px;
      text-align: center;
      font-size: 9.5px;
      font-weight: 700;
      cursor: pointer;
      transition: transform .1s
    }

    table.cal2 td.cell:hover {
      transform: scale(1.07)
    }

    .cal-now-col {
      box-shadow: inset 0 0 0 2px rgba(31, 79, 224, .25);
      border-radius: 8px
    }

    .cal-legend {
      display: flex;
      gap: 18px;
      flex-wrap: wrap;
      margin-top: 14px;
      font-size: 11.5px;
      color: var(--ink-2)
    }

    /* ---- grounding info tooltip ---- */
    .info {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 15px;
      height: 15px;
      border-radius: 50%;
      border: 1px solid var(--line);
      color: var(--muted);
      font-size: 10px;
      font-weight: 700;
      font-style: normal;
      cursor: help;
      position: relative;
      margin-left: 5px;
      vertical-align: middle;
      font-family: Georgia, serif
    }

    .info:hover {
      border-color: var(--brand);
      color: var(--brand)
    }

    .info .tip {
      display: none;
      position: absolute;
      bottom: 140%;
      left: 50%;
      transform: translateX(-50%);
      width: 268px;
      background: var(--ink);
      color: #EAF0F7;
      border-radius: 10px;
      padding: 11px 13px;
      font-size: 11.5px;
      line-height: 1.55;
      font-weight: 400;
      z-index: 95;
      box-shadow: var(--shadow-lg);
      text-align: left;
      font-family: Inter, sans-serif
    }

    .info .tip::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      border: 6px solid transparent;
      border-top-color: var(--ink)
    }

    .info:hover .tip {
      display: block
    }

    .info .tip b {
      color: #8FB6FF;
      font-weight: 700
    }

    .info .tip .s {
      display: block;
      font-size: 10px;
      color: #8593A4;
      margin-top: 6px;
      font-family: 'Spline Sans Mono', monospace
    }

    #gtip {
      position: fixed;
      z-index: 9999;
      max-width: 280px;
      background: var(--ink);
      color: #EAF0F7;
      border-radius: 10px;
      padding: 11px 13px;
      font-size: 11.5px;
      line-height: 1.55;
      box-shadow: var(--shadow-lg);
      display: none;
      pointer-events: none;
      font-family: Inter, sans-serif
    }

    #gtip b {
      color: #8FB6FF;
      font-weight: 700
    }

    #gtip .s {
      display: block;
      font-size: 10px;
      color: #8593A4;
      margin-top: 6px;
      font-family: 'Spline Sans Mono', monospace
    }

    @media(max-width:780px) {
      .info .tip {
        width: 210px;
        left: auto;
        right: 0;
        transform: none
      }

      .info .tip::after {
        left: auto;
        right: 6px
      }
    }

    /* ---- recency chips ---- */
    .rec {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 20px
    }

    .rec .rd {
      width: 6px;
      height: 6px;
      border-radius: 50%
    }

    /* ---- confidence tier badges (§4.1): neutral, not warning ---- */
    .conf-badge {
      display: inline-block;
      font-size: 10px;
      font-weight: 600;
      padding: 1px 6px;
      border-radius: 99px;
      letter-spacing: 0.01em;
      vertical-align: middle;
      margin-left: 5px;
    }
    .conf-blended { background: #EEF3FF; color: #3E7CC0; border: 1px solid #C4D6F5; }
    .conf-segment { background: #FFF8EC; color: #C68A2E; border: 1px solid #F5DFA0; }

    .cal-legend span {
      display: flex;
      align-items: center;
      gap: 7px
    }

    .cal-legend i {
      width: 14px;
      height: 14px;
      border-radius: 4px;
      display: inline-block
    }

    /* ===== v13 daily-engine: triggers, day progress, worked state, focus, calibration ===== */
    .trigwrap {
      margin: 2px 0 16px
    }

    .trig-h {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 9px
    }

    .trig-h .tt {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .06em;
      color: var(--muted)
    }

    .trig-h .pulse {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--risk);
      box-shadow: 0 0 0 0 rgba(216, 58, 63, .5);
      animation: pl 2s infinite
    }

    @keyframes pl {
      0% {
        box-shadow: 0 0 0 0 rgba(216, 58, 63, .45)
      }

      70% {
        box-shadow: 0 0 0 7px rgba(216, 58, 63, 0)
      }

      100% {
        box-shadow: 0 0 0 0 rgba(216, 58, 63, 0)
      }
    }

    .trigs {
      display: flex;
      gap: 10px;
      flex-wrap: wrap
    }

    .trig {
      flex: 1 1 200px;
      min-width: 190px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-left: 3px solid var(--steady);
      border-radius: 11px;
      padding: 11px 13px;
      cursor: pointer;
      transition: transform .12s, box-shadow .12s;
      box-shadow: var(--shadow);
      position: relative
    }

    .trig:hover {
      transform: translateY(-2px);
      box-shadow: var(--shadow-lg)
    }

    .trig.on {
      box-shadow: 0 0 0 2px var(--brand-bg), var(--shadow)
    }

    .trig .ic {
      font-size: 15px
    }

    .trig .n {
      font-family: 'Space Grotesk';
      font-weight: 700;
      font-size: 22px;
      letter-spacing: -.02em;
      line-height: 1.1;
      margin-top: 2px
    }

    .trig .lb {
      font-size: 12px;
      color: var(--ink-2);
      font-weight: 600;
      margin-top: 1px
    }

    .trig .mny {
      font-size: 11.5px;
      color: var(--muted);
      margin-top: 3px;
      font-variant-numeric: tabular-nums
    }

    .trig .go {
      position: absolute;
      right: 11px;
      top: 11px;
      font-size: 11px;
      color: var(--faint);
      opacity: 0;
      transition: opacity .12s
    }

    .trig:hover .go {
      opacity: 1
    }

    .trig.empty {
      opacity: .55;
      cursor: default;
      border-left-color: var(--healthy)
    }

    .trig.empty:hover {
      transform: none;
      box-shadow: var(--shadow)
    }

    .dayprog {
      display: flex;
      align-items: center;
      gap: 14px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 11px;
      padding: 11px 15px;
      margin-bottom: 12px;
      flex-wrap: wrap
    }

    .dayprog .pwrap {
      flex: 1;
      min-width: 160px
    }

    .dayprog .ptop {
      display: flex;
      justify-content: space-between;
      font-size: 12px;
      color: var(--ink-2);
      margin-bottom: 6px;
      font-weight: 600
    }

    .dayprog .ptrack {
      height: 8px;
      border-radius: 5px;
      background: var(--panel-2);
      overflow: hidden;
      border: 1px solid var(--line-2)
    }

    .dayprog .ptrack i {
      display: block;
      height: 100%;
      background: linear-gradient(90deg, #0E8F5E, #3FA66A);
      transition: width .35s
    }

    .dayprog .pstat {
      display: flex;
      gap: 18px;
      align-items: center
    }

    .dayprog .ps {
      font-size: 11.5px;
      color: var(--muted)
    }

    .dayprog .ps b {
      font-family: 'Space Grotesk';
      font-size: 16px;
      color: var(--ink);
      display: block;
      font-weight: 700
    }

    .dayprog .ps b.green {
      color: var(--strong)
    }

    .focuschip {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      background: var(--brand-bg);
      color: var(--brand);
      border: 1px solid #cdd9ef;
      border-radius: 20px;
      padding: 3px 6px 3px 11px;
      font-size: 12px;
      font-weight: 600
    }

    .focuschip .x {
      cursor: pointer;
      width: 17px;
      height: 17px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      background: #fff;
      color: var(--brand);
      font-size: 11px
    }

    .qcard.worked {
      opacity: .62;
      background: var(--panel-2)
    }

    .qcard.worked .rk {
      background: var(--healthy) !important
    }

    .qcard .donerib {
      position: absolute;
      top: 10px;
      right: 14px;
      font-size: 10.5px;
      font-weight: 700;
      color: var(--strong);
      background: var(--strong-bg);
      border-radius: 6px;
      padding: 2px 8px;
      display: flex;
      align-items: center;
      gap: 4px
    }

    .qcard .primary {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      font-weight: 700;
      padding: 3px 9px;
      border-radius: 7px;
      margin-top: 7px
    }

    .qcard .moresig {
      font-size: 11px;
      color: var(--muted);
      cursor: pointer;
      border: 1px dashed var(--line);
      border-radius: 6px;
      padding: 2px 7px;
      background: transparent;
      font-weight: 600
    }

    .qcard .skip {
      font-size: 11px;
      color: var(--muted);
      background: transparent;
      border: 1px solid var(--line);
      border-radius: 7px;
      padding: 4px 9px
    }

    .qcard .skip:hover {
      color: var(--ink-2);
      border-color: var(--faint)
    }

    .calib {
      background: var(--signal-bg);
      border: 1px solid #f0dcae;
      border-left: 3px solid var(--signal);
      border-radius: 10px;
      padding: 10px 14px;
      font-size: 12.5px;
      color: #7a541a;
      margin-bottom: 14px;
      display: flex;
      gap: 10px;
      align-items: flex-start;
      line-height: 1.5
    }

    .calib .x {
      margin-left: auto;
      cursor: pointer;
      color: #b5882f;
      font-weight: 700;
      flex: none
    }

    .calib b {
      color: #5e4111
    }

    @media(max-width:920px) {
      .trig {
        flex: 1 1 100%
      }

      .dayprog .pstat {
        width: 100%;
        justify-content: space-between
      }
    }

    /* ===== v13 reason pill ===== */
    .qcard .reason {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      font-weight: 700;
      padding: 2px 9px;
      border-radius: 7px;
      white-space: nowrap
    }

    .nav-sec {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .09em;
      text-transform: uppercase;
      color: #5E6E80;
      padding: 14px 10px 6px
    }

    .nav-menu { flex: 1; overflow-y: auto; padding-bottom: 8px; }
    .nav-menu::-webkit-scrollbar { width: 3px; }
    .nav-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 2px; }
    .workspace-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
    .workspace-body .content { flex: 1; overflow-y: auto; }

    .loading-container { position: fixed; inset: 0; background: #0D1117; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; z-index: 9999; }
    .loading-spinner-wrapper { margin-bottom: 4px; }
    .loading-spinner { width: 44px; height: 44px; border: 3px solid rgba(91,134,240,.2); border-top-color: #5B86F0; border-radius: 50%; animation: spin .8s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .loading-pct { font-family: 'Spline Sans Mono', monospace; font-size: 13px; color: #5B86F0; letter-spacing: .05em; }
    .loading-bar-track { width: 240px; height: 3px; background: rgba(91,134,240,.15); border-radius: 2px; overflow: hidden; }
    .loading-bar-fill { height: 100%; background: #5B86F0; border-radius: 2px; transition: width .3s ease; }
    .loading-text { font-size: 13px; color: #8A9BB0; margin-top: 4px; }
    .loading-subtext { font-size: 11px; color: #4A5568; letter-spacing: .06em; text-transform: uppercase; }

    /* ===== v13 responsive / mobile ===== */
    .scrim {
      display: none
    }

    @media(max-width:860px) {
      .menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center
      }

      .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .5);
        width: 264px
      }

      .sidebar.open {
        transform: translateX(0)
      }

      .scrim {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(10, 16, 24, .5);
        z-index: 35;
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s
      }

      .scrim.show {
        opacity: 1;
        pointer-events: auto
      }

      .topbar {
        padding: 0 14px;
        gap: 10px;
        height: 56px
      }

      .src-pill {
        display: none
      }

      .content {
        padding: 16px 14px 56px
      }

      .page-head h2 {
        font-size: 21px
      }

      .hero {
        padding: 16px;
        gap: 14px
      }

      .hero h2 {
        font-size: 19px
      }

      .hero .money .n {
        font-size: 30px
      }

      .g-4 {
        grid-template-columns: repeat(2, 1fr)
      }

      .g-2,
      .g-3 {
        grid-template-columns: 1fr !important
      }

      .qcard {
        flex-wrap: wrap
      }

      .qcard .act {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        width: 100%;
        border-top: 1px solid var(--line-2);
        margin-top: 10px;
        padding-top: 10px;
        justify-content: flex-start
      }

      .qcard .act .opp,
      .qcard .act .opl {
        margin-right: auto
      }

      .ws {
        grid-template-columns: 1fr
      }

      .tldr .row {
        flex-wrap: wrap;
        gap: 14px
      }

      .ws-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px
      }

      .ws-btns {
        width: 100%
      }

      .modal {
        width: 94vw;
        max-height: 90vh
      }

      .seg-tabs button {
        padding: 5px 9px
      }

      .repsel label {
        display: none
      }

      .fab {
        bottom: 16px;
        right: 16px
      }

      .trig-h .tt {
        font-size: 10px
      }

      .dayprog {
        gap: 10px
      }
    }

    @media(max-width:520px) {
      .g-4 {
        grid-template-columns: 1fr
      }

      .qcard .body .why-rank {
        display: none
      }

      .qcard .reason {
        font-size: 10px
      }

      .hero .money {
        text-align: left
      }

      .page-head p {
        font-size: 12.5px
      }
    }