/* =====================================================================
   TRADEDESK ACADEMY — Design System
   Dark-first, charcoal base with green / blue / red market accents.
   All colour pairs used for text meet WCAG AA (>= 4.5:1) on their
   background; large text and non-text UI meet >= 3:1.
   ===================================================================== */

/* ------------------------------ Tokens ----------------------------- */
:root {
  /* Surfaces — charcoal ramp */
  --bg-0:      #0b0e13;   /* page */
  --bg-1:      #121720;   /* panel */
  --bg-2:      #171d28;   /* card */
  --bg-3:      #1e2633;   /* raised / hover */
  --bg-4:      #27303f;   /* input, border-ish fill */
  --bg-inset:  #0d1117;

  /* Lines */
  --line:      #222b38;
  --line-soft: #1a2230;
  --line-hard: #324055;

  /* Text */
  --text:      #e6edf6;
  --text-dim:  #9fb0c6;
  --text-mute: #6f829c;
  --text-ink:  #06090f;

  /* Market accents */
  --up:        #26a69a;   /* TradingView teal-green */
  --up-soft:   rgba(38,166,154,.14);
  --up-line:   rgba(38,166,154,.45);
  --down:      #ef5350;
  --down-soft: rgba(239,83,80,.14);
  --down-line: rgba(239,83,80,.45);

  --blue:      #3b82f6;
  --blue-soft: rgba(59,130,246,.14);
  --blue-line: rgba(59,130,246,.45);
  --amber:     #f0a93b;
  --amber-soft:rgba(240,169,59,.14);
  --violet:    #8b7cf6;
  --violet-soft:rgba(139,124,246,.14);

  --accent:      var(--blue);
  --accent-text: #eaf2ff;

  /* Effects */
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 24px 64px -24px rgba(0,0,0,.85);
  --ring:      0 0 0 2px var(--bg-0), 0 0 0 4px var(--blue);

  /* Type */
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --sidebar-w: 254px;
  --topbar-h: 60px;
}

/* Light theme (toggle adds [data-theme="light"] to <html>) */
[data-theme="light"] {
  --bg-0: #f4f6fa;  --bg-1: #ffffff;  --bg-2: #ffffff;  --bg-3: #eef1f7;
  --bg-4: #e4e9f2;  --bg-inset: #f8fafc;
  --line: #dde3ec;  --line-soft: #e8edf4; --line-hard: #c3cddd;
  --text: #0f1726;  --text-dim: #45556c; --text-mute: #64748b; --text-ink: #ffffff;
  --up: #0f8a7e;    --down: #d93a37;     --blue: #2563eb;
  /* On a light surface the active-nav text must be dark, not near-white:
     #eaf2ff on a 14%-opacity blue tint is about 1.2:1 and unreadable. */
  --accent-text: #11306b;
  --up-soft:   rgba(15,138,126,.13);  --up-line:   rgba(15,138,126,.5);
  --down-soft: rgba(217,58,55,.12);   --down-line: rgba(217,58,55,.5);
  --blue-soft: rgba(37,99,235,.11);   --blue-line: rgba(37,99,235,.5);
  --amber: #b4740a;  --amber-soft: rgba(180,116,10,.13);
  --violet: #6d4fe0; --violet-soft: rgba(109,79,224,.12);
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 8px 24px -16px rgba(16,24,40,.24);
}

/* ------------------------------ Reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5 { margin: 0 0 .4em; line-height: 1.2; font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.1rem; } h4 { font-size: .98rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg, canvas { max-width: 100%; display: block; }
small { font-size: .82rem; }
code, kbd, pre, .mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code { background: var(--bg-3); padding: .12em .4em; border-radius: 5px; font-size: .88em; color: #c5d4ea; }
pre { background: var(--bg-inset); border: 1px solid var(--line); border-radius: var(--radius-sm);
      padding: 14px; overflow: auto; font-size: .84rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .35em; }

/* --------------------------- Accessibility ------------------------- */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 999;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { left: 8px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ----------------------------- Layout ------------------------------ */
.container { width: min(1240px, 100% - 40px); margin-inline: auto; }
.stack      { display: flex; flex-direction: column; gap: 16px; }
.row        { display: flex; align-items: center; gap: 10px; }
.row-between{ display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wrap       { flex-wrap: wrap; }
.grow       { flex: 1 1 auto; min-width: 0; }
.grid       { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.g-wide { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.split-2  { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.hide { display: none !important; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .split-2 { grid-template-columns: 1fr; } }
@media (max-width: 760px)  { .g2,.g3,.g4 { grid-template-columns: 1fr; } .container { width: calc(100% - 28px); } }

/* ------------------------------ Cards ------------------------------ */
.card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
}
.card.pad-0 { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.card-head h3, .card-head h2 { margin: 0; }
.card-body { padding: 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--bg-1); }
.card.interactive { transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; cursor: pointer; }
.card.interactive:hover { transform: translateY(-2px); border-color: var(--line-hard); box-shadow: var(--shadow-lg); }
.card.interactive:focus-visible { transform: translateY(-2px); }
.card-accent::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  border-radius: var(--radius) 0 0 var(--radius); background: var(--accent);
}

/* Stat tiles */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-mute); font-weight: 650; }
.stat .value { font-size: 1.85rem; font-weight: 680; font-family: var(--mono); letter-spacing: -.02em; line-height: 1.1; }
.stat .sub   { font-size: .8rem; color: var(--text-dim); }
.stat-icon {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); flex: none;
}

/* ----------------------------- Buttons ----------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 15px; border-radius: 9px; border: 1px solid var(--line-hard);
  background: var(--bg-3); color: var(--text);
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
  transition: background .13s, border-color .13s, transform .08s, opacity .13s;
  white-space: nowrap; text-decoration: none; line-height: 1.3;
}
.btn:hover { background: var(--bg-4); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: #2f74e0; border-color: #2f74e0; }
.btn-success { background: var(--up); border-color: var(--up); color: #04120f; }
.btn-success:hover { filter: brightness(1.08); }
.btn-danger  { background: var(--down); border-color: var(--down); color: #fff; }
.btn-danger:hover { filter: brightness(1.06); }
.btn-ghost   { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn-ghost:hover { background: var(--bg-3); color: var(--text); }
.btn-outline { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: .79rem; border-radius: 7px; }
.btn-lg { padding: 12px 22px; font-size: .97rem; border-radius: 11px; }
.btn-block { width: 100%; }
.btn.is-loading::after {
  content: ""; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; border: 1px solid var(--line-hard); border-radius: 9px; overflow: hidden; }
.btn-group .btn { border: 0; border-radius: 0; border-right: 1px solid var(--line); }
.btn-group .btn:last-child { border-right: 0; }
.btn-group .btn.active { background: var(--blue); color: #fff; }

/* ------------------------------ Forms ------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label {
  font-size: .79rem; font-weight: 650; color: var(--text-dim);
  letter-spacing: .02em; display: flex; align-items: center; gap: 6px;
}
.req { color: var(--down); }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=datetime-local], input[type=search], input[type=time],
select, textarea {
  width: 100%; padding: 9px 12px; font: inherit; font-size: .9rem;
  color: var(--text); background: var(--bg-inset);
  border: 1px solid var(--line-hard); border-radius: var(--radius-sm);
  transition: border-color .13s, box-shadow .13s, background .13s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
input:hover, select:hover, textarea:hover { border-color: #3d4d66; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue); background: var(--bg-1);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
input::placeholder, textarea::placeholder { color: var(--text-mute); }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--down); box-shadow: 0 0 0 3px var(--down-soft);
}
input[disabled], select[disabled], textarea[disabled] { opacity: .6; cursor: not-allowed; }
select {
  appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239fb0c6' stroke-width='2.4' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center;
}
.hint { font-size: .78rem; color: var(--text-mute); }
.error-text { font-size: .78rem; color: var(--down); display: flex; gap: 5px; align-items: center; }
.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: .88rem; }
.check input[type=checkbox], .check input[type=radio] {
  width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--blue); cursor: pointer; flex: none;
}
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin: 0 0 14px; }
legend { font-size: .79rem; font-weight: 650; color: var(--text-dim); padding: 0 6px; }

/* Search box with icon */
.search { position: relative; }
.search input { padding-left: 34px; }
.search::before {
  content: ""; position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; opacity: .6;
  background: currentColor; color: var(--text-mute);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>") center/contain no-repeat;
}

/* ------------------------------ Badges ----------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2.5px 9px; border-radius: 999px;
  font-size: .72rem; font-weight: 680; letter-spacing: .025em;
  background: var(--bg-4); color: var(--text-dim); border: 1px solid transparent;
  white-space: nowrap;
}
.badge-up     { background: var(--up-soft);     color: var(--up);     border-color: var(--up-line); }
.badge-down   { background: var(--down-soft);   color: var(--down);   border-color: var(--down-line); }
.badge-blue   { background: var(--blue-soft);   color: var(--blue);   border-color: var(--blue-line); }
.badge-amber  { background: var(--amber-soft);  color: var(--amber);  border-color: rgba(240,169,59,.4); }
.badge-violet { background: var(--violet-soft); color: var(--violet); border-color: rgba(139,124,246,.4); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill { padding: 4px 11px; border-radius: 999px; background: var(--bg-3); font-size: .78rem; border: 1px solid var(--line); }

.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--text-dim); }
.muted { color: var(--text-mute); } .dim { color: var(--text-dim); }
.text-sm { font-size: .82rem; } .text-xs { font-size: .74rem; }
.bold { font-weight: 650; } .center { text-align: center; } .right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uppercase { text-transform: uppercase; letter-spacing: .08em; }

/* ------------------------------ Tables ----------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: .87rem; }
table.data th, table.data td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg-1); color: var(--text-mute);
  font-size: .71rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data tbody tr { transition: background .1s; }
table.data tbody tr:hover { background: var(--bg-3); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th.sortable::after { content: "↕"; opacity: .3; margin-left: 5px; font-size: .9em; }
th.sortable.asc::after  { content: "↑"; opacity: 1; color: var(--blue); }
th.sortable.desc::after { content: "↓"; opacity: 1; color: var(--blue); }

/* ---------------------------- Progress ----------------------------- */
.bar { height: 7px; border-radius: 99px; background: var(--bg-4); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--blue); transition: width .45s cubic-bezier(.4,0,.2,1); }
.bar.up > i { background: var(--up); } .bar.amber > i { background: var(--amber); } .bar.down > i { background: var(--down); }
.bar-lg { height: 11px; }

.ring { --p: 0; --size: 68px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--blue) calc(var(--p) * 1%), var(--bg-4) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--bg-2); }
.ring > span { position: relative; font-family: var(--mono); font-size: .84rem; font-weight: 680; }

/* ------------------------------ States ----------------------------- */
.empty, .error-state, .loading-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 44px 24px; text-align: center; color: var(--text-dim);
}
.empty .icon, .error-state .icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--bg-3); color: var(--text-mute); font-size: 22px;
}
.empty h4, .error-state h4 { margin: 0; color: var(--text); }
.empty p, .error-state p { margin: 0; max-width: 46ch; font-size: .87rem; }
.error-state .icon { background: var(--down-soft); color: var(--down); }

.skeleton { background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-4) 50%, var(--bg-3) 75%);
  background-size: 200% 100%; animation: sheen 1.3s ease-in-out infinite; border-radius: 6px; }
@keyframes sheen { to { background-position: -200% 0; } }
.sk-line { height: 11px; margin-bottom: 9px; } .sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; } .sk-line.w80 { width: 80%; }
.sk-card { height: 96px; border-radius: var(--radius); }

.spinner { width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--line-hard);
  border-top-color: var(--blue); animation: spin .7s linear infinite; }

/* ------------------------------ Alerts ----------------------------- */
.alert {
  display: flex; gap: 11px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg-3); font-size: .87rem; align-items: flex-start;
}
.alert .ic { flex: none; font-size: 1rem; line-height: 1.4; }
.alert-info    { background: var(--blue-soft);   border-color: var(--blue-line);  color: #cfe0fb; }
.alert-success { background: var(--up-soft);     border-color: var(--up-line);    color: #bdeae4; }
.alert-warn    { background: var(--amber-soft);  border-color: rgba(240,169,59,.4); color: #f6dcae; }
.alert-danger  { background: var(--down-soft);   border-color: var(--down-line);  color: #f8c9c8; }
[data-theme="light"] .alert-info{color:#17408f}[data-theme="light"] .alert-success{color:#0b5a51}
[data-theme="light"] .alert-warn{color:#7a4c08}[data-theme="light"] .alert-danger{color:#8f1d1b}

/* ------------------------------ Toasts ----------------------------- */
#toasts {
  position: fixed; bottom: 20px; right: 20px; z-index: 9000;
  display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 32px));
}
.toast {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--bg-2); border: 1px solid var(--line-hard);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow-lg);
  animation: toastIn .22s cubic-bezier(.2,.9,.3,1.3); font-size: .87rem;
}
.toast.success { border-left-color: var(--up); }
.toast.error   { border-left-color: var(--down); }
.toast.warn    { border-left-color: var(--amber); }
.toast .t-title { font-weight: 650; margin-bottom: 1px; }
.toast .t-close { margin-left: auto; background: none; border: 0; color: var(--text-mute); cursor: pointer; font-size: 17px; line-height: 1; padding: 0 2px; }
.toast.leaving { animation: toastOut .18s ease forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(28px) scale(.97); } }
@keyframes toastOut { to   { opacity: 0; transform: translateX(28px) scale(.97); } }

/* ------------------------------ Modal ------------------------------ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(4,7,12,.72); backdrop-filter: blur(3px);
  z-index: 8000; display: grid; place-items: center; padding: 20px; overflow-y: auto;
  animation: fade .14s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--bg-1); border: 1px solid var(--line-hard); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); width: min(620px, 100%); max-height: calc(100vh - 40px);
  display: flex; flex-direction: column; animation: pop .18s cubic-bezier(.2,.9,.3,1.2);
}
.modal.wide  { width: min(900px, 100%); }
.modal.xwide { width: min(1120px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; background: var(--bg-1);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.modal-close { background: none; border: 0; color: var(--text-mute); font-size: 22px; line-height: 1;
  cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.modal-close:hover { color: var(--text); background: var(--bg-3); }

/* ------------------------------- Tabs ------------------------------ */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 9px 15px; background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--text-mute); font: inherit; font-size: .87rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: color .12s, border-color .12s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--blue); }

/* ------------------------------ Misc ------------------------------- */
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: .76rem; font-weight: 700;
  color: #fff; background: hsl(var(--hue, 210) 55% 42%); letter-spacing: .02em;
}
.avatar.lg { width: 44px; height: 44px; font-size: .95rem; }
.avatar.sm { width: 24px; height: 24px; font-size: .64rem; }
.kbd { display: inline-block; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-hard);
  border-bottom-width: 2px; background: var(--bg-3); font-family: var(--mono); font-size: .76rem; }
.divider-v { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.scroll-y { overflow-y: auto; }
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 99px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: var(--line-hard); }

.data-badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px; border: 1px dashed var(--amber);
  color: var(--amber); background: var(--amber-soft);
}
