/* ==========================================================================
   ETF Orders — Calastone redesign
   Desktop web app · designed at 1920, fluid down to ~1280.
   ========================================================================== */

:root {
  /* text */
  --text-primary: #1d1f22;
  --text-tertiary: #646973;
  --text-link: #0072c6;
  --text-inverse: #ffffff;
  --text-muted: #6d6d6d;

  /* brand / signal */
  --brand: #007cb6;
  --action: #0072c6;
  --action-hover: #005ea3;
  --text-link-on-tint: #0062aa;  /* link blue on the light-blue fills: #0072c6 is 4.38:1 there, this is 5.6:1 */
  --success-strong: #108448;
  --signal-success: #5da35c;
  --signal-success-hover: #4b8f4a;
  --accent-orange: #e9621d;
  --error: #c4211b;
  --status-ok: #3aa463;
  --status-pending: #ff6415;

  /* order accent (page frame, card accent, key details) */
  --accent: #258ff2;            /* Accepted: card accent, 3 dots hover */
  --accent-bg: #edf6ff;         /* key details + top of the page gradient */
  --line: #258ff2;              /* page line under the tabs */
  --hover-fill: #cbe4fd;        /* tab X + card 3 dots hover */

  /* surfaces */
  --white: #ffffff;
  --surface-header: #f8f8f8;
  --surface-key: #f5fdf8;
  --surface-info: #f2f9ff;
  --surface-info-strong: #e2f3ff;
  --segment: #e9eaed;
  --disabled: #d9dadb;

  /* lines */
  --border: #ededed;
  --row-line: #e3e7ed;
  --grid-text: #262729;
  --border-control: #898c92;
  --border-tab: #c4c4c4;
  --border-mint: #87e4b6;
  --mint-bg: #f0fff7;

  /* masthead */
  --mast-bg: rgba(38, 39, 41, 0.85);
  --mast-divider: #4b4d51;

  /* motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --t-fast: 140ms;
  --t-med: 220ms;
  --t-slow: 420ms;

  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mast: "Nunito Sans", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-width: 1348px;            /* desktop-only: the order card stops shrinking at 1322px (+ 2 × 13px gutter) */
  background: var(--white);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  line-height: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum" 1;    /* tabular figures everywhere — columns of money must line up */
}

::selection { background: var(--action); color: var(--white); }

img { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; }
b { font-weight: 600; }
[hidden] { display: none !important; }   /* `hidden` always wins over component display rules */

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Hover-only tooltip used by icon buttons (data-tip="…") */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translate(-50%, -4px);
  padding: 4px 8px;
  border-radius: 6px;
  background: #1d1f22;
  color: #fff;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease-out), transform var(--t-med) var(--ease-out);
  z-index: 20;
}
[data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); transition-delay: 250ms; }

/* ==========================================================================
   Masthead
   ========================================================================== */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  height: 60px;
  padding-left: 20px;
  background: #262729;             /* solid at the top of the page */
  transition: background-color var(--t-slow) var(--ease-out), -webkit-backdrop-filter var(--t-slow) var(--ease-out), backdrop-filter var(--t-slow) var(--ease-out);
  color: var(--white);
  font-family: var(--font-mast);
  font-weight: 600;
}
/* once the page scrolls, content shows through: translucent + blurred */
.masthead.is-scrolled {
  background: var(--mast-bg);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.masthead__logo { flex: none; width: 156px; height: 60px; }

.masthead__nav { display: flex; align-items: stretch; margin-left: 28px; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 16px;
  font-size: 13px;
  line-height: 16px;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
  cursor: default;
  transition: color var(--t-fast) var(--ease-out), background-color var(--t-med) var(--ease-out);
}
.nav-item img { width: 13px; height: 7px; margin: 0 5px 0 1px; transition: transform var(--t-med) var(--ease-out); }
.nav-item::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--t-med) var(--ease-out);
}
.nav-item.is-active::after { transform: scaleX(1); }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.nav-item:hover::after { transform: scaleX(1); }
.nav-item:not(.is-active):hover::after { background: rgba(0, 124, 182, 0.6); }

.masthead__addons { display: flex; align-items: stretch; margin-left: auto; }

.clocks { display: flex; align-items: center; gap: 17px; padding: 0 20px 0 24px; }
.clock { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.clock__time { font-size: 13px; line-height: 16px; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.clock__zone { font-size: 11px; line-height: 12px; white-space: nowrap; }
.zone-short { display: none; }

.mast-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  border-left: 1px solid var(--mast-divider);
  cursor: default;
  transition: background-color var(--t-med) var(--ease-out);
}
.mast-icon img { transition: transform var(--t-med) var(--ease-spring); }
.mast-icon:hover { background: rgba(255, 255, 255, 0.07); }
@keyframes bell-ring {
  0% { transform: rotate(0); }
  20% { transform: rotate(14deg); }
  40% { transform: rotate(-11deg); }
  60% { transform: rotate(7deg); }
  80% { transform: rotate(-3deg); }
  100% { transform: rotate(0); }
}

.profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 25px 0 19px;
  border-left: 1px solid var(--mast-divider);
  cursor: default;
  transition: background-color var(--t-med) var(--ease-out);
}
.profile__text { display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.profile__name { font-size: 13px; line-height: 16px; }
.profile__org { font-size: 11px; line-height: 12px; }
.profile img { width: 13px; height: 7px; margin: 0 5px; transition: transform var(--t-med) var(--ease-out); }
.profile:hover { background: rgba(255, 255, 255, 0.07); }

/* ==========================================================================
   Page head + tabs
   ========================================================================== */

.page__title {
  margin: 36px 0 0 13px;
  font-size: 28px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.tabs {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 43px;
  margin-top: 36px;
  padding-left: 13px;
}

.tab {
  display: flex;
  align-items: center;
  height: 43px;                  /* 42px tab + 1px over the workspace line, all tops aligned */
  padding: 0 20px;
  border: 1px solid var(--border-tab);
  border-bottom: 1px solid var(--line);   /* the page line runs under every tab but the current one */
  border-radius: 8px 8px 0 0;
  background: #fbfbfb;
  font-weight: 600;
  white-space: nowrap;
  cursor: default;               /* "Orders" tab is intentionally locked */
  user-select: none;
}

/* order tabs: each order keeps its own colour; the current one opens into the workspace.
   Both orders are interactive; the cross is decorative (order tabs cannot be closed). */
.tab--order {
  position: relative;
  gap: 4px;
  height: 43px;
  padding: 0 16px;
  border-color: var(--tab);
  border-bottom-color: var(--line);
  background: var(--tab-bg);
  color: var(--text-primary);
}
.tab--order.is-selected {
  border-bottom-color: transparent;   /* opens into the page: tab and workspace read as one surface */
}
.tab__indicator {
  position: absolute;
  top: -1px; left: 16px; right: 16px;
  height: 4px;
  border-radius: 0 0 8px 8px;
  background: var(--tab-ind, var(--tab));
}
/* close cross: hover state on the current tab only (closing stays disabled) */
.tab__x {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 6px;
  transition: background-color var(--t-fast) var(--ease-out);
}
.tab--order .tab__x:hover { background: var(--tab-x); }   /* any order tab, active or not */
.tab__close {           /* order tabs cannot be closed: the cross is shown but inert */
  width: 10px; height: 10px;
  margin: 0;
  opacity: 0.85;
}

/* ==========================================================================
   Workspace
   ========================================================================== */

.workspace {
  min-height: calc(100vh - 60px - 56px - 45px - 34px);
  margin-top: -1px;
  padding: 24px 13px 48px;
  border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, var(--accent-bg) 0, #f5f5f5 13.462%);   /* Figma Rectangle 155 */
}

/* ==========================================================================
   Order card
   ========================================================================== */

/* the order block is as wide as its content (1512 / 1596px in the designs), centred */
.order { width: fit-content; max-width: 100%; margin: 0 auto; }
.order.is-current { animation: order-in 320ms var(--ease-out) both; }
@keyframes order-in { from { opacity: 0; } to { opacity: 1; } }

.card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 12px 16px;
  border-radius: 12px;
  background: var(--white);
}

.card__top { display: flex; flex-direction: column; gap: 12px; }

.status-accent {
  height: 6px;
  border-radius: 0 0 8px 8px;
  background: var(--accent);
}

/* key details strip */
.key-details {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 16px;
  border-radius: 8px;             /* Figma: all four corners */
  background: var(--accent-bg);
}
.key-details__list {
  display: flex;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  margin: 0;
}
.kd {
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
}
.kd:first-child { padding-left: 16px; padding-right: 16px; }
.kd:last-child { padding-right: 0; padding-left: 16px; }
.kd dt { font-size: 12px; line-height: 16px; color: var(--text-tertiary); white-space: nowrap; }
.kd dd { display: flex; flex-direction: column; margin: 0; white-space: nowrap; }
.kd dd b { font-size: 14px; line-height: 18px; }
.kd dd small { font-size: 12px; line-height: 16px; font-weight: 600; }
.kd .dot { margin: 0 1px; }
.kd u { text-underline-offset: 2px; text-decoration-thickness: 1px; }

/* more-actions (3 dots) — hover only */
.more-actions {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  margin-top: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: default;
  transition:
    background-color var(--t-med) var(--ease-out),
    border-color var(--t-med) var(--ease-out);
}
.more-actions img { transition: transform var(--t-med) var(--ease-spring); }
.more-actions:hover { background: var(--hover-fill); }   /* same as the tab X: Accepted #cbe4fd, Confirmed #dac9ff */
.more-actions[data-tip]::after { left: auto; right: 0; transform: translate(0, -4px); }
.more-actions[data-tip]:hover::after { transform: translate(0, 0); }

/* metrics grid */
.metrics {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.mgroup { padding: 16px clamp(16px, 1.5vw, 28px); background: var(--surface-header); }
.mgroup + .mgroup { border-left: 1px solid var(--border); }
.ml { font-size: 12px; line-height: 16px; color: var(--text-tertiary); white-space: nowrap; }
.est { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-link); }

/* label | EST. | value | unit — values right-aligned on a shared column */
.mgroup--order,
.mgroup--investor {
  display: grid;
  grid-template-columns: auto auto auto;
  align-content: start;
  column-gap: 4px;
  row-gap: 12px;
}
.mv .est { margin-right: 4px; vertical-align: 1px; }
.mgroup--order { padding-left: 16px; padding-right: clamp(16px, 1.5vw, 28px); }
.mgroup--investor { flex: 1; padding-left: clamp(16px, 1.5vw, 28px); padding-right: clamp(24px, 3.5vw, 68px); }
.mrow { display: contents; }
.mrow .ml { padding-right: 4px; align-self: center; }
.mv { justify-self: end; font-size: 14px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.mu { align-self: center; font-size: 12px; line-height: 16px; white-space: nowrap; }
.mgroup--order, .mgroup--investor { justify-content: start; }
.mgroup--investor .ml { min-width: 110px; }

/* stacked rows: amount + bps */
.mgroup--stack { display: flex; flex-direction: column; gap: 12px; }
.srow { display: flex; align-items: flex-start; gap: 8px; }
.srow .ml { width: var(--lw); flex: none; white-space: normal; }
.sv {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 85px;
  margin-left: auto;
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}
.sv > span { display: flex; align-items: center; gap: 4px; }
.sv b { font-size: 14px; line-height: 18px; }
.sv .is-error { color: var(--error); }
.sv .is-error img { margin: 0 2px; }

/* actions row */
.card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.actions-group { display: flex; align-items: center; gap: 12px; }
.status-pair { display: flex; align-items: flex-start; gap: 8px; white-space: nowrap; }
.status-pair__val { display: flex; flex-direction: column; align-items: flex-end; font-weight: 600; }
.status-pair__val b { margin-bottom: -2px; }
.status-pair__val small { font-size: 12px; line-height: 16px; color: var(--text-link); }
.status-pair__dash { font-size: 12px; line-height: 16px; font-weight: 600; }
.btn-row { display: flex; gap: 8px; }

/* ==========================================================================
   Buttons — hover-only (non-clickable) by request. Cursor stays default.
   ========================================================================== */

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 700;
  white-space: nowrap;
  cursor: default;
  user-select: none;
  transition:
    transform var(--t-med) var(--ease-out),
    box-shadow var(--t-med) var(--ease-out),
    background-color var(--t-med) var(--ease-out),
    border-color var(--t-med) var(--ease-out),
    color var(--t-med) var(--ease-out);
}
.btn--primary { background: var(--action); color: var(--text-inverse); }
.btn--primary:hover {
  background: var(--action-hover);
}

.btn--outline {
  height: 32px;
  border: 1px solid var(--action);
  background: var(--white);
  color: var(--action);
}
.btn--outline:hover {
  background: var(--surface-info);
  border-color: var(--action-hover);
  color: var(--action-hover);
}

.btn--success { width: 100%; padding: 0 16px; background: var(--signal-success); color: var(--white); }
.btn--success:hover {
  background: var(--signal-success-hover);
}

.btn--disabled { background: var(--disabled); color: var(--white); cursor: not-allowed; }
.capprove .btn--disabled { width: 100%; padding: 0 16px; }

.btn--ghost { color: var(--text-link); }
.btn--ghost:hover { background: var(--surface-info); color: var(--action-hover); }

/* small square icon buttons (edit pencils) */
.icon-btn {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: default;
  transition: background-color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.icon-btn img { transition: transform var(--t-med) var(--ease-spring); }
.icon-btn:hover { background: var(--surface-info); }

/* ==========================================================================
   Charges drawer
   ========================================================================== */

.charges {
  position: relative;
  margin: 0 12px;
  border-radius: 0 0 8px 8px;
  background: var(--white);
  transition: margin var(--t-slow) var(--ease-out), border-radius var(--t-slow) var(--ease-out), box-shadow var(--t-slow) var(--ease-out);
}
.charges { border-radius: 0 0 12px 12px; }

.charges__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-slow) var(--ease-out);
}
.charges.is-open .charges__body { grid-template-rows: 1fr; }
.charges__inner { min-height: 0; overflow: hidden; }

.charges__panel {
  padding: 24px 24px 12px;
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--t-med) var(--ease-out), transform var(--t-slow) var(--ease-out);
}
.charges.is-open .charges__panel { opacity: 1; transform: none; transition-delay: 80ms; }

.charges__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: color var(--t-med) var(--ease-out), gap var(--t-med) var(--ease-out);
}
.charges__toggle { border-radius: 0 0 12px 12px; font-weight: 600; }
.charges.is-open .charges__toggle { gap: 4px; border-top-color: transparent; }
.charges__bar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.charges__bar .btn { height: 30px; }
/* chevron is the Figma asset used as a mask, so it follows the text colour */
.charges__chevron {
  width: 9px; height: 5px;
  background: currentColor;
  -webkit-mask: url(assets/chevron.svg) center / 9px 5px no-repeat;
          mask: url(assets/chevron.svg) center / 9px 5px no-repeat;
  transform: rotate(180deg);
  transition: transform var(--t-slow) var(--ease-spring);
}
.charges.is-open .charges__chevron { transform: rotate(0deg); }
.charges__toggle:hover { color: var(--action); }
.charges__toggle:focus-visible { outline-offset: -2px; }

/* charges table */
.ctable {
  --ccols:
    minmax(72px, 84px) minmax(104px, 148px) minmax(176px, 1fr) minmax(108px, 120px)
    minmax(124px, 160px) minmax(124px, 160px) minmax(120px, 140px) minmax(112px, 160px) minmax(0, 116px) 40px;
  display: flex;
  flex-direction: column;
}
.ctable__head,
.ctable__row {
  display: grid;
  grid-template-columns: var(--ccols);
  column-gap: 2px;
}
.ctable__head { margin-bottom: 0; }
.ctable__head > span {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 12px;
  background: var(--surface-header);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}
.ctable__head > span:first-child { border-radius: 8px 0 0 8px; }
.ctable__head > span:last-child { border-radius: 0 8px 8px 0; }
.ctable__head .r { justify-content: flex-end; text-align: right; }
.ctable .span2 { grid-column: span 2; }
.ctable .span3 { grid-column: span 3; }
.ctable .span4 { grid-column: span 4; }

.ctable__row > span {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 48px;
  padding: 0 12px;
  white-space: nowrap;
}
.ctable__row .r { justify-content: flex-end; }
.ctable__row > span:not([class]) { display: block; min-width: 0; line-height: 48px; overflow: hidden; text-overflow: ellipsis; }
.ctable__row i,
.ctotal-est i { font-style: normal; font-size: 12px; line-height: 16px; color: var(--text-tertiary); }
.ctable__row:not(.ctable__total) { border-bottom: 1px solid var(--row-line); transition: background-color var(--t-fast) var(--ease-out); }
.ctable__row:not(.ctable__total):hover { background: #fafcff; }
/* hovering the edit pencil highlights only the pencil, not the whole row */
.ctable__row:not(.ctable__total):has(.icon-btn:hover) { background: transparent; }

.ctable__row > .cstatus {
  position: relative;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 0 12px 0 12px;
}
.cstatus::before {
  content: "";
  position: absolute;
  left: 0; top: 2px; bottom: 2px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--ind);
}
.cstatus small { font-size: 12px; line-height: 16px; color: var(--text-tertiary); }
.ctable__row > .capprove { justify-content: flex-end; padding: 8px 4px; }
.ctable__row > .cedit { justify-content: center; padding: 0 4px; }

.ctotal-est { justify-content: space-between; }
.ctable__total b { font-weight: 600; }

.add-charge {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  margin-top: 8px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-info);
  color: var(--action);
  font-weight: 700;
  cursor: default;
  transition: background-color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out), color var(--t-med) var(--ease-out);
}
.add-charge img { transition: transform var(--t-slow) var(--ease-spring); }
.add-charge:hover { background: #cfe8fb; color: var(--action-hover); }   /* same as Load Next */

/* ==========================================================================
   Monitoring table
   ========================================================================== */

.monitor { margin-top: 24px; }

.monitor__panel {
  padding: 12px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(29, 31, 34, 0.04);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.toolbar__left,
.toolbar__right { display: flex; align-items: center; gap: 12px; }
.toolbar__left { flex: 1; min-width: 0; }

/* segmented control */
.segments { display: flex; gap: 8px; flex: none; }
.segment {
  display: flex;
  align-items: baseline;          /* label and count share one baseline */
  gap: 4px;
  height: 32px;
  padding: 7px 28px 0;            /* (32 - 18) / 2: keeps the 18px label line centred */
  border-radius: 8px;
  background: var(--segment);
  font-size: 14px;
  line-height: 18px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-med) var(--ease-out), color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.segment small { font-size: 12px; line-height: 16px; font-weight: 600; }
.segment:not(.is-selected):hover { background: #dfe1e5; }
.segment.is-selected {
  background: var(--surface-info-strong);
  color: var(--text-link-on-tint);
  cursor: default;
}

/* search */
.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 468px;
  max-width: 100%;
  min-width: 260px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-control);
  border-radius: 8px;
  background: var(--white);
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.search:hover { border-color: var(--action); }
.search[hidden] { display: none; }
.search:focus-within { border-color: var(--action); box-shadow: 0 0 0 3px rgba(0, 114, 198, 0.16); }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-primary);
}
.search input::placeholder { color: var(--text-tertiary); opacity: 1; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search__icon { width: 18px; height: 18px; margin: 3px; flex: none; }
.search__clear {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out);
}
.search__clear:hover { background: var(--segment); }
.search__clear[hidden] { display: none; }

/* page-size select */
.select { position: relative; }
.select__trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 3px 4px 3px 12px;
  border: 1px solid #878d96;
  border-radius: 8px;
  background: var(--white);
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.select__value { min-width: 17px; text-align: left; }
.select__trigger img { margin: 0 5.5px; transition: transform var(--t-med) var(--ease-out); }
.select__trigger:hover { border-color: var(--action); }
.select.is-open .select__trigger { border-color: var(--action); box-shadow: 0 0 0 3px rgba(0, 114, 198, 0.16); }
.select.is-open .select__trigger img { transform: rotate(180deg); }
.select__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 100%;
  margin: 0;
  padding: 4px;
  list-style: none;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(29, 31, 34, 0.08), 0 12px 28px -10px rgba(29, 31, 34, 0.3);
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.select.is-open .select__menu { opacity: 1; transform: none; pointer-events: auto; }
.select__menu li {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 18px;
  cursor: pointer;
  position: relative;
}
.select__menu li:hover,
.select__menu li.is-active { background: var(--surface-info); }
.select__menu li[aria-selected="true"] { background: #e2f3ff; color: var(--text-link); font-weight: 700; }

/* the grid itself */
.grid-scroll { overflow: hidden; }

.grid {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.grid.is-swapping { opacity: 0; transform: translateY(4px); }

.grid th {
  height: 48px;
  padding: 0 12px;
  border-left: 2px solid var(--white);      /* the 2px gutters between header cells */
  background: var(--surface-header);
  color: var(--grid-text);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  text-align: left;
  vertical-align: middle;
}
.grid th:first-child { border-left: 0; border-radius: 8px 0 0 8px; }
.grid th:last-child { border-radius: 0 8px 8px 0; padding: 0; }
.th { display: flex; align-items: center; gap: 4px; }
.th__label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th--r .th__label { text-align: right; }

/* column menu affordance (hover only) */
.col-menu {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  margin: 0 -4px;
  border-radius: 6px;
  cursor: default;
  opacity: 0.85;
  transition: background-color var(--t-fast) var(--ease-out), opacity var(--t-fast) var(--ease-out);
}
.col-menu img { width: 2px; height: 10.67px; }
.col-menu:hover { background: rgba(29, 31, 34, 0.07); opacity: 1; }
.grid th:last-child .col-menu { margin: 0 auto; }

.grid .spacer { display: none; }

.grid td {
  height: 49px;
  padding: 0 12px;
  border-bottom: 1px solid var(--row-line);
  color: var(--grid-text);
  font-size: 14px;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  transition: background-color var(--t-fast) var(--ease-out);
}
.grid td.r { text-align: right; }
.grid td.wrap { white-space: normal; line-height: 18px; }
.grid td.x { padding: 0; text-align: center; }
.grid td.a { padding: 0; }

.grid tbody tr.row > td { position: relative; }
.grid tbody tr.row:hover > td { background: #f5f9fd; }
.grid tbody tr.row.is-open > td { background: #f2f8fd; }
.grid tbody tr.row > td:first-child::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--action);
  transform: scaleY(0);
  transition: transform var(--t-med) var(--ease-out);
}


/* expand toggle */
.expand {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  margin: 0 auto;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.expand .ico { transition: transform var(--t-med) var(--ease-out), background-color var(--t-fast) var(--ease-out); }
.expand:hover { background: var(--surface-info-strong); }
.row.is-open .expand .ico { transform: rotate(180deg); }

/* status cell (FX view) */
/* same anatomy as the charges status: 4px indicator bar, label + who/what */
.grid td.cst { padding-left: 12px; }
.grid td.cst::before { content: ""; position: absolute; left: 2px; top: 2px; bottom: 3px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ind); }
.st { display: flex; flex-direction: column; gap: 2px; }
.st > span, .st small { overflow: hidden; text-overflow: ellipsis; }
.st small { font-family: var(--font); font-size: 12px; line-height: 16px; font-weight: 400; color: var(--text-tertiary); }
.unit { font-family: var(--font); font-weight: 400; }

.dir { color: var(--text-primary); }
.unit { font-size: 12px; line-height: 16px; color: var(--text-tertiary); margin-left: 4px; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

/* reconciliation break */
.brk { color: var(--error); font-weight: 600; }
.brk::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  vertical-align: 2px;
  background: var(--error);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* row detail */
.grid tr.detail > td { height: auto; padding: 0; border-bottom: 0; white-space: normal; }
.grid tr.detail.is-open > td { border-bottom: 1px solid var(--row-line); }
.detail__wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-slow) var(--ease-out); }
.detail.is-open .detail__wrap { grid-template-rows: 1fr; }
.detail__clip { min-height: 0; overflow: hidden; }
.detail__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, max-content));
  gap: 8px 48px;
  margin: 4px 0 8px 50px;
  padding: 14px 20px;
  border-radius: 8px;
  background: #fafcfe;
}
.detail__grid dt { font-size: 12px; line-height: 16px; color: var(--text-tertiary); }
.detail__grid dt { font-family: var(--font); font-weight: 400; }
.detail__grid dd { margin: 0; font-weight: 600; white-space: nowrap; }

.grid .empty td { height: 120px; text-align: center; color: var(--text-tertiary); white-space: normal; }
.grid .empty b { color: var(--text-primary); }

/* rows that arrive via "load more" */
.row.is-entering { animation: row-in 420ms var(--ease-out) both; animation-delay: calc(var(--i) * 18ms); }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* load more bar */
.load-more {
  position: relative;
  margin: 0 20px;
  border-radius: 0 0 12px 12px;
  background: var(--surface-info-strong);
  text-align: center;
  overflow: hidden;
}
/* the whole bar is the button: hover darkens the entire light-blue strip */
.load-more__btn {
  position: relative;
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 44px;
  border-radius: 0 0 12px 12px;
  color: var(--text-link-on-tint);
  font-size: 14px;
  line-height: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--t-med) var(--ease-out), color var(--t-med) var(--ease-out);
}
.load-more__btn:hover:not(:disabled) {
  background: #cfe8fb;
  color: var(--action-hover);
}
.load-more__btn:disabled { color: var(--text-tertiary); font-weight: 600; cursor: default; }
.load-more__btn.is-loading { color: var(--action); }
.load-more__btn.is-loading::before {
  content: "";
  display: inline-block;
  width: 12px; height: 12px;
  margin-right: 8px;
  vertical-align: -1px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Fluid adjustments between 1920 and ~1280
   ========================================================================== */

/* ==========================================================================
   Card "more actions" menu (3 dots)
   ========================================================================== */

.more { position: relative; flex: none; }
.more-actions { cursor: pointer; }
.more.is-open .more-actions { background: var(--hover-fill); }
.more.is-open .more-actions[data-tip]::after { display: none; }   /* no tooltip over the open menu */

.menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: max-content;
  min-width: 233px;
  padding: 4px 1px;
  border: 1px solid var(--disabled);
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);   /* elevation from the Figma component */
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top right;
  transition: opacity 140ms var(--ease-out), transform 180ms var(--ease-out);
}
.menu.is-open { opacity: 1; transform: none; }
.menu[hidden] { display: none; }   /* a closed menu must not sit over (and swallow hovers from) the buttons below */
.menu:focus { outline: none; }

.menu__group { display: flex; flex-direction: column; gap: 4px; padding: 4px 8px; }
.menu__divider { height: 1px; margin: 0 20px; background: var(--disabled); }   /* spans the label column: group 8px + item 12px insets */

.menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 32px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 18px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  outline: none;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.menu__item--switch { min-height: 36px; }
.menu__item[data-action="none"] { cursor: default; }           /* hover state only, not wired yet */
.menu__item:not([aria-disabled]):focus,
.menu__item:not([aria-disabled]):hover {
  background: var(--surface-info-strong);
  color: var(--text-link);
}
.menu__item:focus-visible { box-shadow: inset 0 0 0 2px var(--action); }
.menu__item[aria-disabled="true"] { color: #a7a7a7; line-height: 16px; cursor: not-allowed; }

/* toggle switch — the Figma "Toggle Switch Atom" in both states (off: grey + cross, on: blue + tick).
   The two states crossfade. */
.switch {
  position: relative;
  flex: none;
  width: 36px; height: 20px;
  background: url(assets/toggle-off.svg) center / 36px 20px no-repeat;
}
.switch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url(assets/toggle-on.svg) center / 36px 20px no-repeat;
  opacity: 0;
  transition: opacity 160ms var(--ease-out);
}
[aria-checked="true"] > .switch::after { opacity: 1; }

/* "Show Basis Points" off: the bps lines under the figures go away */
/* "Show Basis Points" off: bps lines read as percent; a quick fade marks the swap */
.bps.is-swapped { animation: value-swap 220ms var(--ease-out); }
@keyframes value-swap { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   Pinned strip — the card's key details dock under the masthead while the
   (pinned) card is scrolled out of view
   ========================================================================== */

.pinbar {
  position: fixed;
  z-index: 45;
  padding: 0 12px 12px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: var(--white);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out);
}
.pinbar.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.pinbar__inner { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 1679px) {
  .grid th, .grid td { padding: 0 6px; }
  /* header menus float over the label edge and appear on hover, so labels get the full width */
  .grid th { position: relative; }
  .th .col-menu {
    position: absolute; top: 12px; right: 2px;
    margin: 0;
    background: var(--surface-header);
    opacity: 0;
  }
  .th--r .col-menu { right: auto; left: 2px; }
  .grid th:hover .th .col-menu { opacity: 1; }
  .th .col-menu:hover { background: #e9ebee; }

  .order { width: auto; }
}

@media (max-width: 1599px) {
  .zone-long { display: none; }
  .zone-short { display: inline; }
  .masthead__nav { margin-left: 16px; }
  .nav-item { padding: 0 12px; }

}

@media (max-width: 1439px) {
  .segment { padding: 7px 18px 0; }
  .clocks { padding: 0 16px; }
  .profile { padding: 0 16px 0 16px; }
  .detail__grid { grid-template-columns: repeat(3, minmax(0, max-content)); }
  .charges.is-open { margin: 0 16px; }
  .charges__panel { padding: 20px 16px 0; }
}

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

/* ==========================================================================
   v23 — second order (YWT) + Order Change Log
   ========================================================================== */

/* the page frame, card accent and key-details tint follow the current order */
:root[data-order="ywt"] { --accent: #926ef2; --accent-bg: #f7f4ff; --line: #9f7bff; --hover-fill: #dac9ff; }

/* the other order's tab is a real tab now: pointer + a slight darken on hover */
.tab--order:not(.is-selected) {
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out);
}
.tab--order:focus-visible { outline: 2px solid var(--action); outline-offset: -2px; }

/* investor group: a link-coloured note under a value (Settlement Amount → Estimated) */
.msub {
  grid-column: 2 / 4;
  justify-self: end;
  margin-top: -12px;          /* sits right under its value, cancelling the row gap */
  font-size: 12px;
  line-height: 16px;
  color: var(--text-link);
}

/* status pair with a timestamp + sub-status */
.status-pair__val b { font-size: 14px; line-height: 18px; }
.status-pair__val u { text-underline-offset: 2px; text-decoration-thickness: 1px; }

/* ---------- Order Change Log (modal) ---------- */
.log {
  width: min(1040px, calc(100vw - 64px));
  max-height: calc(100vh - 96px);
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--white);
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms var(--ease-out), transform 200ms var(--ease-out);
}
.log.is-open { opacity: 1; transform: none; }
.log::backdrop { background: rgba(29, 31, 34, 0); transition: background-color 160ms var(--ease-out); }
.log.is-open::backdrop { background: rgba(29, 31, 34, 0.45); }
.log__inner { display: flex; flex-direction: column; max-height: calc(100vh - 96px); }

.log__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
}
.log__title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; }
.log__meta { margin: 2px 0 0; font-size: 12px; line-height: 16px; color: var(--text-tertiary); }
.log__meta b { color: var(--text-primary); font-weight: 600; }
.log__x {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out);
}
.log__x:hover { background: var(--surface-info-strong); }
.log__x:focus-visible { outline: 2px solid var(--action); outline-offset: 0; }

.log__body { overflow: auto; padding: 0 24px; }
.log__table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 18px; }
.log__table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 48px;
  padding: 0 12px;
  background: var(--surface-header);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.log__table th:first-child { border-radius: 8px 0 0 8px; }
.log__table th:last-child { border-radius: 0 8px 8px 0; }
.log__table td {
  height: 48px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--row-line);
  vertical-align: middle;
}
.log__table tbody tr { transition: background-color var(--t-fast) var(--ease-out); }
.log__table tbody tr:hover { background: #fafcff; }
.log__table td small { display: block; font-size: 12px; line-height: 16px; color: var(--text-tertiary); }
.log__when { white-space: nowrap; }
.log__prev { color: var(--text-tertiary); }
.log__arrow { width: 24px; padding: 0 !important; color: var(--text-tertiary); text-align: center; }

.log__foot { display: flex; justify-content: flex-end; padding: 16px 24px 20px; }
.log__close { cursor: pointer; border: 0; font-family: inherit; }
.log__close:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }

/* ==========================================================================
   v25 — Figma colour update, Orders tab indicator, responsive card
   ========================================================================== */

/* "Orders" tab: grey indicator (Figma 55px, 16px from the left) */
.tab--home { position: relative; }
.tab--home .tab__indicator { left: 16px; right: 18px; background: #737373; }

/* The card stays on one row and shrinks with the window down to 1322px:
   key details keep their order and long values (instrument, instructing
   party) wrap inside their own column instead of breaking onto a second row. */
.order { min-width: 1322px; }
.key-details__list { gap: 0; }
.kd {
  flex: 0 1 auto;
  min-width: min-content;
  padding-left: clamp(8px, calc((100vw - 1348px) * 0.0279 + 8px), 24px);    /* 8px at 1348 → 24px at 1920 */
  padding-right: clamp(8px, calc((100vw - 1348px) * 0.0279 + 8px), 24px);
}
.kd:first-child { padding-left: 16px; padding-right: clamp(8px, calc((100vw - 1348px) * 0.014 + 8px), 16px); }
.kd:last-child { padding-left: clamp(8px, calc((100vw - 1348px) * 0.014 + 8px), 16px); padding-right: 0; }
.kd dd { white-space: normal; }
.kd dd b, .kd dd small { overflow-wrap: normal; }

/* ==========================================================================
   v26 — tab hovers, Figma masthead
   ========================================================================== */

/* tab hover: a vertical gradient fades in over the fill; the border stays.
   (an overlay so the gradient can fade — gradients themselves don't transition) */
.tab { position: relative; isolation: isolate; }
.tab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(to bottom, var(--tab-h1, #dfdfdf), var(--tab-h2, #fbfbfb));
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease-out);
  pointer-events: none;
}
.tab:not(.is-selected):hover::before { opacity: 1; }   /* the active tab has no hover */
.tab--order:not(.is-selected) { cursor: pointer; }

/* masthead (Figma Masthead_HSBC): white 1px base line, Open Sans 14/18 menu,
   16px chevrons, #258ff2 active indicator with rounded top corners */
.masthead { border-bottom: 2px solid var(--white); }
.masthead__nav { margin-left: 28px; }
.nav-item {
  gap: 4px;
  padding: 0 16px;
  font-family: var(--font);
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  color: var(--white);
}
.nav-item__ico { display: grid; place-items: center; width: 16px; height: 16px; }
.nav-item__ico img { width: 9px; height: 5px; margin: 0; }
.nav-item::after {
  height: 4px;
  border-radius: 8px 8px 0 0;
  background: #258ff2;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.06); }
.nav-item:not(.is-active):hover::after { background: rgba(37, 143, 242, 0.55); }

/* ==========================================================================
   v28 — icon hovers, header dots, expanded rows, Add Manual Charge, page size
   ========================================================================== */

/* single-colour icons drawn as masks so hover can recolour them */
.ico { display: block; flex: none; background: #63666b; }
.ico--chevron {
  width: 24px; height: 24px;
  -webkit-mask: url(assets/expand-chevron.svg) center / 24px 24px no-repeat;
          mask: url(assets/expand-chevron.svg) center / 24px 24px no-repeat;
}
.ico--edit {
  width: 14px; height: 14px;
  -webkit-mask: url(assets/edit-form.svg) center / 14px 14px no-repeat;
          mask: url(assets/edit-form.svg) center / 14px 14px no-repeat;
  transition: background-color var(--t-fast) var(--ease-out);
}
.expand:hover .ico,
.icon-btn:hover .ico { background: #0072c6; }

/* Add Manual Charge: resting fill #f2f9ff */
.add-charge { background: #f2f9ff; }

/* ==========================================================================
   v29 — table header 3 dots
   ========================================================================== */
.ico--dots {
  width: 3px; height: 16px;
  background: #1d1f22;
  -webkit-mask: url(assets/meatballs-table.svg) center / 3px 16px no-repeat;
          mask: url(assets/meatballs-table.svg) center / 3px 16px no-repeat;
  transition: background-color var(--t-fast) var(--ease-out);
}
.col-menu { opacity: 1; }
.col-menu:hover,
.th .col-menu:hover { background: #e2f3ff; }
.col-menu:hover .ico--dots { background: #0072c6; }

/* ==========================================================================
   v30 — search filled state, control borders
   ========================================================================== */
/* once there is text, the clear X takes the magnifier's place */
.search:has(.search__clear:not([hidden])) .search__icon { display: none; }
.search__clear { width: 24px; height: 24px; }
/* page-size trigger: keyboard focus gets the same blue border + glow as when open */
.select__trigger:focus-visible { outline: 0; border-color: var(--action); box-shadow: 0 0 0 3px rgba(0, 114, 198, 0.16); }
/* page-size chevron = the Charges toggle chevron (same asset, 9×5, follows the text colour) */
.select__chevron {
  width: 9px; height: 5px;
  margin: 0 5.5px;
  background: currentColor;
  -webkit-mask: url(assets/chevron.svg) center / 9px 5px no-repeat;
          mask: url(assets/chevron.svg) center / 9px 5px no-repeat;
  transform: rotate(180deg);
  transition: transform var(--t-med) var(--ease-out);
}
.select.is-open .select__chevron { transform: rotate(0deg); }

/* ==========================================================================
   v32 — search clear X, header 3 dots size
   ========================================================================== */
/* search clear: rounded square like the tab Xs */
.search__clear { width: 24px; height: 24px; border-radius: 6px; }
.search__clear:hover { background: #e2f3ff; }
.ico--cross {
  width: 10px; height: 10px;
  background: #252525;
  -webkit-mask: url(assets/cross.svg) center / 10px 10px no-repeat;
          mask: url(assets/cross.svg) center / 10px 10px no-repeat;
  transition: background-color var(--t-fast) var(--ease-out);
}
.search__clear:hover .ico--cross { background: #0072c6; }

/* header 3 dots back to their earlier size (2 × 10.67), colours unchanged */
.ico--dots {
  width: 2px; height: 10.67px;
  -webkit-mask-size: 2px 10.67px;
          mask-size: 2px 10.67px;
}

/* v34 — only the clear X moves in: its 24px box sits 3px from the right edge, matching its 3px top/bottom gap.
   The magnifier keeps its original 8px inset. */
.search:has(.search__clear:not([hidden])) { padding-right: 3px; }

/* metrics: every text in a row sits on the baseline of the 14px value */
.mgroup--order,
.mgroup--investor { align-items: baseline; }
.mrow .ml,
.mu { align-self: baseline; }
.mv .est { vertical-align: baseline; }
.srow { align-items: baseline; }
.sv > span { align-items: baseline; }

/* ==========================================================================
   v35 — stacked metric groups: label column = widest label, then exactly 8px
   ========================================================================== */
.mgroup--stack {
  display: grid;
  grid-template-columns: max-content max-content;
  column-gap: 8px;
  row-gap: 12px;
  align-content: start;
  align-items: baseline;
}
.srow { display: contents; }
.srow .ml { width: auto; white-space: nowrap; }
.srow .ml--wrap { width: 0; min-width: 100%; white-space: normal; }   /* wraps inside the column the other labels set (Figma: 2 lines) */
.sv { min-width: 0; margin-left: 0; justify-self: end; }
