/* ════════════════════════════════════════════════════════════════
   GREN · Recovery Desk
   Palette and type taken from grenfinance.com: deep navy, gold,
   cream, Poppins. Figures are set in mono because this is a ledger —
   money and references have to align and read digit by digit.
   ════════════════════════════════════════════════════════════════ */

:root {
  --navy-950: #00081A;
  --navy-900: #000E28;
  --navy-800: #001233;
  --navy-700: #0A1E46;
  --navy-600: #12294F;
  --navy-500: #1B3560;

  --gold:     #D8B057;
  --gold-dim: #C89B3C;
  --gold-wash: rgba(216, 176, 87, .10);

  --cream:  #F5EFE2;
  --mist:   #AAB6CD;
  --slate:  #8290AC;
  --rust:   #C4695A;
  --sage:   #7FA88C;

  --bg:          var(--navy-950);
  --surface:     var(--navy-900);
  --surface-up:  var(--navy-800);
  --line:        rgba(170, 182, 205, .13);
  --line-strong: rgba(170, 182, 205, .26);
  --text:        var(--cream);
  --text-dim:    var(--mist);
  --text-faint:  var(--slate);

  --sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --micro: .6875rem;
  --sm:    .8125rem;
  --base:  .9375rem;
  --lg:    1.0625rem;

  --r: 2px;
  --gut: 28px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

/* The UA rule for [hidden] is display:none, but any author rule that sets a
   display value outruns it — .console { display:flex } would leave the whole
   signed-in shell rendering behind the login gate. Make hidden mean hidden. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--base);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: var(--navy-900); }

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 2px;
}

button, input, select { font: inherit; color: inherit; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.eyebrow {
  font-size: var(--micro);
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.panel__title {
  font-size: var(--micro);
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.panel__note { font-size: var(--sm); color: var(--text-faint); font-weight: 300; }


/* ─────────────────────────── Buttons ─────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: none;
  font-size: var(--sm);
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn--gold { background: var(--gold); color: var(--navy-900); font-weight: 500; }
.btn--gold:hover:not(:disabled) { background: var(--cream); }

.btn--ghost { border-color: var(--line-strong); color: var(--text-dim); }
.btn--ghost:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }

.btn--danger { border-color: rgba(196, 105, 90, .5); color: var(--rust); }
.btn--danger:hover:not(:disabled) { background: var(--rust); color: var(--navy-900); border-color: var(--rust); }

.btn--sm { padding: 8px 16px; }
.btn--xs { padding: 5px 11px; font-size: var(--micro); }

.btn__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}


/* ─────────────────────────── Fields ─────────────────────────── */

.field { display: block; margin-bottom: 18px; }
.field__label {
  display: block; margin-bottom: 7px;
  font-size: var(--micro); font-weight: 400;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-faint);
}
.field input, .select select, .kb-search input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 8, 26, .55);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  font-size: var(--base);
  font-weight: 300;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.field input:focus, .select select:focus, .kb-search input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(0, 8, 26, .8);
}
.field__error {
  margin: -6px 0 16px;
  font-size: var(--sm);
  color: var(--rust);
}

.select { display: flex; flex-direction: column; gap: 6px; }
.select select {
  padding: 8px 12px; font-size: var(--sm);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--slate) 50%),
                    linear-gradient(135deg, var(--slate) 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.select select option { background: var(--navy-800); }

.chip {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  font-size: var(--micro);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.chip--gold { border-color: var(--gold); color: var(--gold); }


/* ═══════════════════════════ GATE ═══════════════════════════ */

.gate {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  padding: 32px;
  background: radial-gradient(120% 90% at 50% -10%, var(--navy-700) 0%, var(--navy-900) 45%, var(--navy-950) 100%);
  overflow: hidden;
}

/* Ledger rules — the one ambient motion, drifting slowly like ruled
   lines on a page. Quiet enough to sit behind a sign-in form. */
.gate__rules {
  position: absolute; inset: -20%;
  background-image: repeating-linear-gradient(
    122deg,
    transparent 0 76px,
    rgba(216, 176, 87, .055) 76px 77px
  );
  animation: drift 44s linear infinite;
  pointer-events: none;
}
@keyframes drift { to { transform: translate3d(-154px, 96px, 0); } }

.gate__inner {
  position: relative;
  width: 100%; max-width: 452px;
  animation: rise .7s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.gate__brand { text-align: center; margin-bottom: 34px; }
.gate__sub {
  font-size: 1.125rem; font-weight: 300; letter-spacing: .42em;
  text-transform: uppercase; color: var(--gold);
  /* The tracking pushes the visual centre right; pull it back. */
  text-indent: .42em;
}

.gate__card {
  padding: 38px;
  background: rgba(0, 14, 40, .74);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.gate__card .btn--gold { width: 100%; justify-content: center; margin-top: 8px; }


/* ═══════════════════════════ SHELL ═══════════════════════════ */

.console { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: var(--gut);
  padding: 0 var(--gut);
  height: 62px;
  background: rgba(0, 8, 26, .93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent 62%);
  opacity: .55;
}

.topbar__brand { display: flex; align-items: center; }
/* Fortcall carries the brand slot on its own, so it is set larger and in
   cream rather than the muted unit-label treatment it had beside a wordmark. */
.topbar__unit {
  font-size: var(--sm); font-weight: 400; letter-spacing: .26em;
  text-transform: uppercase; color: var(--cream);
}

.tabs { display: flex; gap: 2px; margin-left: auto; }
.tab {
  padding: 8px 16px;
  border: none; border-bottom: 1px solid transparent;
  background: none;
  font-size: var(--sm); font-weight: 300; color: var(--text-faint);
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.tab:hover { color: var(--text-dim); }
.tab.is-active { color: var(--gold); border-bottom-color: var(--gold); }

.topbar__right { display: flex; align-items: center; gap: 16px; }
.topbar__op { display: flex; flex-direction: column; line-height: 1.15; text-align: right; }
.topbar__op b { font-size: var(--sm); font-weight: 400; }
.topbar__op small { font-size: var(--micro); letter-spacing: .12em; text-transform: uppercase; color: var(--slate); }

.view { display: none; flex: 1; }
.view.is-active { display: block; }

.wrapper { max-width: 1080px; margin: 0 auto; padding: 52px var(--gut) 80px; }

.page-head { margin-bottom: 36px; }
.page-head h1 {
  margin: 10px 0 8px;
  font-size: 2rem; font-weight: 200; letter-spacing: -.025em;
}
.page-head__blurb { font-size: var(--sm); color: var(--text-faint); max-width: 60ch; }


/* ═══════════════════════════ DESK ═══════════════════════════ */

.desk {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
  min-height: calc(100vh - 62px);
}

/* ── The book ── */
.book {
  position: sticky; top: 62px;
  max-height: calc(100vh - 62px);
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.book__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gut) 14px;
}

.stats {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}
.stats > div {
  padding: 13px var(--gut);
  border-bottom: 1px solid var(--line);
}
.stats > div:nth-child(odd) { border-right: 1px solid var(--line); }
.stats dt {
  font-size: var(--micro); letter-spacing: .13em;
  text-transform: uppercase; color: var(--slate);
}
.stats dd {
  margin-top: 3px;
  font-family: var(--mono); font-size: var(--lg); font-weight: 300;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}

.acct-list { overflow-y: auto; flex: 1; }

.acct {
  position: relative;
  width: 100%;
  display: block; text-align: left;
  padding: 16px var(--gut);
  border: none; border-bottom: 1px solid var(--line);
  background: none;
  cursor: pointer;
  transition: background .18s var(--ease);
}
.acct::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--gold);
  transform: scaleY(0); transform-origin: top;
  transition: transform .24s var(--ease);
}
.acct:hover { background: rgba(216, 176, 87, .035); }
.acct.is-active { background: rgba(216, 176, 87, .07); }
.acct.is-active::before { transform: scaleY(1); }

.acct__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.acct__ref { font-family: var(--mono); font-size: var(--micro); color: var(--slate); letter-spacing: .02em; }
.acct__dpd { font-family: var(--mono); font-size: var(--micro); color: var(--text-faint); white-space: nowrap; }
.acct__name { margin: 4px 0 2px; font-size: var(--base); font-weight: 400; color: var(--cream); }
.acct__bal {
  font-family: var(--mono); font-size: var(--base); font-weight: 400;
  font-variant-numeric: tabular-nums; color: var(--gold);
}
.acct__seg { margin-top: 5px; font-size: var(--micro); color: var(--text-faint); }
.acct__tags { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.tag {
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: var(--r);
  font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
}
.tag--warn { color: var(--gold-dim); }
.tag--stop { color: var(--rust); }
.tag--ok   { color: var(--sage); }


/* ── Stage ── */
.stage { padding: 0 var(--gut) 64px; min-width: 0; }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 62vh; text-align: center; color: var(--text-faint);
}
.empty__mark { color: var(--gold); opacity: .3; margin-bottom: 22px; }
.empty h2 { font-size: 1.25rem; font-weight: 200; color: var(--text-dim); }
.empty p { margin-top: 8px; font-size: var(--sm); max-width: 42ch; }

.acct-head {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 32px; align-items: end;
  padding: 30px 0 24px;
  border-bottom: 1px solid var(--line-strong);
}
.acct-head__ref { font-size: var(--sm); color: var(--text-dim); margin-top: 5px; }
.acct-head__who h2 { font-size: 1.75rem; font-weight: 200; letter-spacing: -.025em; }
.acct-head__meta { font-size: var(--sm); color: var(--text-faint); margin-top: 3px; }
.acct-head__bal { text-align: right; }
.figure {
  font-size: 2rem; font-weight: 300; letter-spacing: -.02em;
  color: var(--gold); line-height: 1.15; margin-top: 5px;
}
.acct-head__dpd { font-size: var(--micro); color: var(--text-faint); letter-spacing: .06em; }

.flags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.flag {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 10px 14px;
  border-left: 2px solid currentColor;
  background: rgba(216, 176, 87, .05);
  font-size: var(--sm);
}
.flag b { font-weight: 500; letter-spacing: .04em; text-transform: uppercase; font-size: var(--micro); }
.flag span { color: var(--text-dim); }
.flag--warn { color: var(--gold); }
.flag--stop { color: var(--rust); background: rgba(196, 105, 90, .06); }


/* ── Controls ── */
.controls {
  display: flex; flex-wrap: wrap; gap: 20px;
  align-items: flex-end; justify-content: space-between;
  padding: 24px 0 16px;
}
.controls__left  { display: flex; align-items: center; gap: 18px; }
.controls__right { display: flex; align-items: flex-end; gap: 20px; }

.level {
  width: 130px; height: 2px;
  background: var(--line-strong);
  overflow: hidden;
}
.level i {
  display: block; height: 100%; width: 0;
  background: var(--gold);
  transition: width .09s linear;
}

.timer { display: flex; flex-direction: column; gap: 5px; }
.timer .mono { font-size: 1.25rem; font-weight: 300; letter-spacing: .04em; }

.status-line {
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: var(--sm); color: var(--text-faint);
}
.status-line.is-live { color: var(--gold); }
.status-line.is-error { color: var(--rust); }
.status-line.is-live::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); margin-right: 9px; vertical-align: middle;
  animation: pulse 1.7s var(--ease) infinite;
}
@keyframes pulse { 50% { opacity: .25; } }


/* ═══ SIGNATURE: the negotiating room ═══
   A vertical scale from the full balance down to the deepest
   settlement the desk may authorise. Every rung sits at its true
   height, so the space between two offers is literally the money
   between them. When a deal lands, a gold marker settles onto it. */

.room { margin-top: 34px; }
.room__head { margin-bottom: 26px; }
.room__head .panel__note { margin-top: 5px; max-width: 62ch; }

/* Geometry shared by the plot and its absolutely-positioned children. */
.ladder { --rail: 128px; }
.ladder__plot { position: relative; }

.ladder__track {
  position: absolute; left: var(--rail); top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--gold) 0%, rgba(216, 176, 87, .22) 100%);
}

/* The tick is the honest mark: always at the amount's true height, even when
   its label has been nudged aside to stay legible. */
.ladder__tick {
  position: absolute; left: var(--rail);
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  border: 1px solid var(--slate); border-radius: 50%;
  background: var(--bg);
}
.ladder__tick.rung--cap { border-color: var(--gold); }
.ladder__tick.rung--floor { border-color: var(--gold-dim); }
.ladder__tick.rung--agreed {
  background: var(--gold); border-color: var(--gold);
  width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  box-shadow: 0 0 0 5px rgba(216, 176, 87, .16);
  animation: land .6s var(--ease) both;
  z-index: 3;
}
@keyframes land {
  0%   { transform: scale(2.6); box-shadow: 0 0 0 0 rgba(216, 176, 87, .4); }
  100% { transform: scale(1);   box-shadow: 0 0 0 5px rgba(216, 176, 87, .16); }
}

/* Leader line from a displaced label back to its true tick. */
.rung__link {
  position: absolute; left: calc(var(--rail) + 11px);
  width: 1px; background: var(--line-strong);
}

.rung {
  position: absolute; left: 0; right: 0;
  display: grid; grid-template-columns: var(--rail) 1fr;
  align-items: center;
  transform: translateY(-50%);
  animation: rungIn .5s var(--ease) both;
}
@keyframes rungIn { from { opacity: 0; transform: translateY(-50%) translateX(-8px); } }

.rung__amt {
  padding-right: 18px; text-align: right;
  font-family: var(--mono); font-size: var(--sm); font-weight: 400;
  font-variant-numeric: tabular-nums; color: var(--cream);
}
.rung__body { position: relative; padding-left: 22px; }
.rung__body::before {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 11px; height: 1px; background: var(--line-strong);
}
.rung__label { font-size: var(--sm); color: var(--text-dim); line-height: 1.35; }
.rung__sub {
  font-size: var(--micro); color: var(--text-faint);
  letter-spacing: .04em; line-height: 1.45;
}

.rung--cap .rung__amt { color: var(--gold); font-size: var(--base); }
.rung--cap .rung__label { color: var(--cream); }

.rung--agreed { z-index: 3; }
.rung--agreed .rung__amt { color: var(--gold); font-weight: 500; }
.rung--agreed .rung__label { color: var(--gold); }

.ladder__note {
  margin-top: 22px; padding-left: var(--rail);
  font-size: var(--micro); color: var(--slate); letter-spacing: .04em;
}


/* ── Live: transcript + activity ── */
.live {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 1px;
  margin-top: 40px;
  background: var(--line);
  border: 1px solid var(--line);
}
.live__col { background: var(--bg); min-width: 0; }
.live__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.legend { display: flex; gap: 16px; font-size: var(--micro); letter-spacing: .1em; text-transform: uppercase; }
.legend__c { color: var(--mist); }
.legend__a { color: var(--gold); }

.transcript, .activity {
  height: 400px; overflow-y: auto;
  padding: 20px;
  scroll-behavior: smooth;
}
.transcript__idle { font-size: var(--sm); color: var(--slate); font-style: italic; }

/* Two-lane call sheet: customer left of the spine, agent right. */
.transcript { position: relative; }
.transcript.has-lines::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; background: var(--line);
}
.line { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 16px; }
.line__body {
  font-size: var(--sm); line-height: 1.62;
  animation: fadeIn .3s var(--ease) both;
}
@keyframes fadeIn { from { opacity: 0; } }

.line--customer .line__body {
  grid-column: 1; padding-right: 20px; text-align: right;
  color: var(--mist);
}
.line--agent .line__body {
  grid-column: 2; padding-left: 20px;
  color: var(--cream);
}
.line__who {
  display: block; margin-bottom: 3px;
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
}
.line--customer .line__who { color: var(--slate); }
.line--agent .line__who { color: var(--gold); }

.act {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  animation: fadeIn .3s var(--ease) both;
}
.act:last-child { border-bottom: none; }
.act__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.act__name { font-size: var(--sm); color: var(--cream); }
.act__time { font-family: var(--mono); font-size: 10px; color: var(--slate); }
.act__detail { margin-top: 4px; font-size: var(--micro); color: var(--text-faint); line-height: 1.55; word-break: break-word; }
.act__detail b { color: var(--gold); font-weight: 400; font-family: var(--mono); }
.act--running .act__name::after {
  content: '…'; color: var(--gold); margin-left: 4px;
}
.act--fail .act__name { color: var(--rust); }


/* ── Wrap-up ── */
.wrap {
  margin-top: 34px;
  border: 1px solid var(--gold);
  background: var(--gold-wash);
  animation: rise .5s var(--ease) both;
}
.wrap__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(216, 176, 87, .3);
}
.wrap__body { padding: 22px; }

.chip--plain { border-color: var(--line-strong); color: var(--text-dim); }
.chip--bad { border-color: var(--rust); color: var(--rust); }

.kpi-head {
  margin: 30px 0 14px;
  font-size: var(--micro); font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold-dim);
}
.kpi-head:first-child { margin-top: 0; }

.kpi-band {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 1px;
  background: rgba(216, 176, 87, .16);
  border: 1px solid rgba(216, 176, 87, .16);
}
.tile { padding: 14px 16px; background: var(--navy-950); }
.tile dt {
  font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--slate);
}
.tile dd {
  margin-top: 5px;
  font-size: 1.1rem; font-weight: 300; color: var(--cream);
  font-variant-numeric: tabular-nums; line-height: 1.25;
}
.tile p { margin-top: 3px; font-size: 10px; color: var(--text-faint); }

.verdict { font-family: var(--sans); font-size: var(--sm); }
.verdict--ok  { color: var(--sage); }
.verdict--bad { color: var(--rust); }
.verdict--na  { color: var(--slate); }

.tool-tally {
  list-style: none; margin-top: 12px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 24px;
}
.tool-tally li {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 7px 0; border-bottom: 1px solid rgba(216, 176, 87, .12);
  font-size: var(--sm); color: var(--text-dim);
}
.tool-tally b { color: var(--gold); font-weight: 400; }

.kpi-prose { font-size: var(--sm); color: var(--text-dim); line-height: 1.72; max-width: 78ch; }
.kpi-prose + .kpi-prose { margin-top: 10px; }
.kpi-prose--dim { color: var(--slate); font-style: italic; }
.kpi-prose b { color: var(--cream); font-weight: 400; }

.kpi-coach {
  margin-top: 16px; padding: 13px 16px;
  border-left: 2px solid var(--gold);
  background: rgba(216, 176, 87, .07);
  font-size: var(--sm); color: var(--text-dim); line-height: 1.66;
}
.kpi-coach b {
  display: block; margin-bottom: 3px;
  font-size: var(--micro); font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold);
}

.scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; margin-bottom: 22px; }
.score__top {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 7px;
  font-size: var(--sm); color: var(--text-dim);
}
.score__top b { font-size: var(--lg); font-weight: 300; color: var(--gold); }
.score__track { height: 2px; background: var(--line-strong); overflow: hidden; }
.score__track i {
  display: block; height: 100%; background: var(--gold);
  animation: fill .7s var(--ease) both;
}
@keyframes fill { from { width: 0 !important; } }

.score-detail {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px; margin: 22px 0;
}
.score-group ul { list-style: none; margin-top: 9px; }
.score-group li {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 6px 0; border-bottom: 1px solid rgba(216, 176, 87, .1);
  font-size: var(--sm); color: var(--text-faint);
}
.score-group li b { color: var(--cream); font-weight: 400; }


/* ═══════════════════════ KNOWLEDGE ═══════════════════════ */

.kb-search { display: flex; gap: 12px; margin-bottom: 34px; }
.kb-search input { flex: 1; }

.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }

.kb-card {
  padding: 24px;
  background: var(--bg);
  transition: background .2s var(--ease);
}
.kb-card:hover { background: var(--surface); }
.kb-card__top { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.kb-card__page { font-family: var(--mono); font-size: var(--micro); color: var(--gold-dim); }
.kb-card__score { font-family: var(--mono); font-size: 10px; color: var(--slate); }
.kb-card h3 { font-size: var(--lg); font-weight: 400; letter-spacing: -.01em; margin-bottom: 8px; }
.kb-card p { font-size: var(--sm); color: var(--text-faint); line-height: 1.68; }
.kb-card__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.kb-card__tags span {
  padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: var(--r);
  font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--slate);
}


/* ═══════════════════════ PLAYBOOK ═══════════════════════ */

.policy { margin-bottom: 52px; }
.policy__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px; margin-top: 18px;
  background: var(--line); border: 1px solid var(--line);
}
.policy__cell { padding: 20px; background: var(--bg); }
.policy__cell dt { font-size: var(--micro); letter-spacing: .13em; text-transform: uppercase; color: var(--slate); }
.policy__cell dd {
  margin-top: 6px;
  font-family: var(--mono); font-size: 1.4rem; font-weight: 300;
  color: var(--gold); font-variant-numeric: tabular-nums;
}
.policy__cell p { margin-top: 4px; font-size: var(--micro); color: var(--text-faint); }

.rules { margin-bottom: 48px; }
.rules__list { margin-top: 18px; padding-left: 0; list-style: none; counter-reset: r; }
.rules__list li {
  position: relative;
  padding: 14px 0 14px 52px;
  border-bottom: 1px solid var(--line);
  font-size: var(--sm); color: var(--text-dim); line-height: 1.7;
  counter-increment: r;
}
.rules__list li::before {
  content: counter(r, decimal-leading-zero);
  position: absolute; left: 0; top: 15px;
  font-family: var(--mono); font-size: var(--micro);
  color: var(--gold); letter-spacing: .08em;
}
.rules__list li b { color: var(--cream); font-weight: 500; }
.rules__list--tight li { padding-top: 11px; padding-bottom: 11px; }
.rules + .panel__note, .rules__list + .panel__note { margin-top: 14px; }


/* ═══════════════════════ Scrollbars ═══════════════════════ */

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--slate); }


/* ═══════════════════════ Responsive ═══════════════════════ */

@media (max-width: 1180px) {
  .live { grid-template-columns: minmax(0, 1fr); }
  .live__col--narrow .activity { height: 260px; }
}

@media (max-width: 940px) {
  :root { --gut: 20px; }
  .desk { grid-template-columns: minmax(0, 1fr); }
  .book { position: static; max-height: none; border-right: none; border-bottom: 1px solid var(--line); }
  .acct-list { max-height: 320px; }
  .acct-head { grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
  .acct-head__bal { text-align: left; }
  .topbar { flex-wrap: wrap; height: auto; padding: 12px var(--gut); gap: 14px; }
  .tabs { order: 3; width: 100%; margin-left: 0; }
  .book { position: static; }
}

@media (max-width: 640px) {
  .ladder { --rail: 92px; }
  .rung__amt { padding-right: 12px; font-size: var(--micro); }
  .transcript.has-lines::before { display: none; }
  .line { grid-template-columns: minmax(0, 1fr); }
  .line--customer .line__body { grid-column: 1; text-align: left; padding-right: 0; }
  .line--agent .line__body { grid-column: 1; padding-left: 14px; border-left: 1px solid var(--gold); }
  .controls { flex-direction: column; align-items: stretch; }
  .controls__right { flex-wrap: wrap; }
  .wrap__body > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .gate__card { padding: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
