:root {
  --blue: #0066cc;
  --blue-focus: #0071e3;
  --blue-dark: #2997ff;
  --ink: #1d1d1f;
  --muted: #7a7a7a;
  --line: #e0e0e0;
  --soft-line: #f0f0f0;
  --paper: #ffffff;
  --pearl: #f5f5f7;
  --pearl-2: #fafafc;
  --dark: #000000;
  --tile-dark: #272729;
  --tile-dark-2: #2a2a2c;
  --on-dark: #ffffff;
  --on-dark-muted: #cccccc;
  --bad: #bf1d1d;
  --good: #147a4d;
  --scroll-track: #e8e8ed;
  --scroll-thumb: #8e8e93;
  --scroll-thumb-hover: #636366;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--pearl);
  scrollbar-width: auto;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

html::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

html::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

html::-webkit-scrollbar-thumb {
  border: 3px solid var(--scroll-track);
  border-radius: 999px;
  background: var(--scroll-thumb);
}

html::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--pearl);
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  letter-spacing: -0.224px;
}

body.auth-locked {
  overflow: hidden;
}

body.auth-locked :is(.global-nav, .sub-nav, main) {
  filter: blur(18px);
  pointer-events: none;
  user-select: none;
}

a { color: inherit; text-decoration: none; }

.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;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.96), rgba(245, 245, 247, 0.82) 42%, rgba(235, 235, 239, 0.94) 100%);
  backdrop-filter: blur(26px) saturate(150%);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.auth-gate.is-unlocked {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.auth-card {
  width: min(100%, 420px);
  padding: 34px 28px 30px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  text-align: center;
}

.auth-card.is-shaking {
  animation: auth-shake 280ms ease;
}

@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

.auth-logo {
  display: block;
  width: min(242px, 88%);
  height: auto;
  margin: 0 auto 24px;
}

.auth-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 0 0 8px;
  max-width: none;
  color: var(--ink);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-copy {
  max-width: 290px;
  margin: 0 auto 22px;
  color: #5f5f63;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
}

.pin-field {
  position: relative;
  width: 176px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 10px 24px rgba(0, 0, 0, 0.06);
  cursor: text;
}

.pin-field:focus-within {
  border-color: rgba(0, 102, 204, 0.65);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.12), 0 10px 24px rgba(0, 0, 0, 0.06);
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  min-height: 18px;
  margin: 0;
}

.pin-dots span {
  width: 12px;
  height: 12px;
  border: 1px solid #b5b5bd;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.pin-dots span.is-filled {
  border-color: var(--ink);
  background: var(--ink);
  transform: scale(1.08);
}

.pin-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 18px;
  background: transparent;
  opacity: 0;
  pointer-events: auto;
  cursor: text;
}

.auth-error {
  min-height: 18px;
  margin: 0 0 16px;
  color: var(--bad);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.auth-submit {
  width: 100%;
  min-height: 46px;
}

.global-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  background: var(--dark);
  color: var(--on-dark);
}

.brand {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.12px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  letter-spacing: -0.12px;
}

.topnav a:hover { color: var(--on-dark); }

.sub-nav {
  position: sticky;
  top: 44px;
  z-index: 40;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 42px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(245, 245, 247, 0.9);
  backdrop-filter: blur(18px);
}

.sub-nav > div:first-child {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.sub-nav strong {
  font-size: 21px;
  line-height: 1.19;
  letter-spacing: 0.231px;
  white-space: nowrap;
}

.sub-nav span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-error {
  color: var(--bad) !important;
}

.sub-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.2;
}

.button.primary {
  background: var(--blue);
  color: #fff;
}

.button.primary:hover { background: var(--blue-focus); }

.button.secondary {
  background: #fff;
  color: var(--blue);
}

.download-menu {
  position: relative;
}

.download-menu summary {
  list-style: none;
  user-select: none;
}

.download-menu summary::-webkit-details-marker {
  display: none;
}

.download-menu summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 10px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.download-menu[open] summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.download-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 90;
  min-width: 172px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.14);
}

.download-options a,
.download-options button {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.download-options a:hover,
.download-options button:hover {
  background: var(--pearl);
}

.button.utility {
  min-height: 32px;
  padding: 7px 15px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
}

main {
  overflow: visible;
}

section[id] {
  scroll-margin-top: 190px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(410px, 0.82fr) minmax(660px, 1.18fr);
  gap: 56px;
  align-items: center;
  max-width: 1360px;
  margin: 0 auto;
  padding: 56px 42px 54px;
}

.hero-copy {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.eyebrow.on-dark {
  color: var(--blue-dark);
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 18px;
  max-width: 540px;
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 48px;
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.28px;
}

.hero-lede {
  max-width: 520px;
  color: #333;
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.196px;
}

.hero-board {
  align-self: center;
  width: 100%;
  padding: 24px;
  border-radius: 24px;
  background: var(--paper);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 20px;
  background: var(--soft-line);
}

.kpi {
  min-width: 0;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 20px;
  background: #fff;
}

.kpi .label {
  order: 1;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.kpi .value {
  min-width: 0;
  color: var(--ink);
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.374px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.kpi .note {
  order: 2;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.control-deck-sentinel {
  display: block;
  width: 100%;
  height: 0;
  overflow: hidden;
}

.control-deck {
  position: sticky;
  top: 96px;
  z-index: 42;
  display: block;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 42px 44px;
  transition: background 120ms ease, box-shadow 120ms ease;
  will-change: background, box-shadow;
  overflow-anchor: none;
}

.control-panel {
  padding: 18px 22px 20px;
  border: 1px solid var(--soft-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(16, 24, 40, 0.04);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.control-deck.is-stuck {
  max-width: none;
  padding: 8px 42px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(245, 245, 247, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
}

.control-deck.is-stuck .control-panel {
  max-width: 1360px;
  margin: 0 auto;
  min-height: 54px;
  padding: 8px 12px;
  border-radius: 18px;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: visible;
}

.control-deck.is-stuck .control-panel-head {
  order: 4;
  flex: 0 0 auto;
  margin-bottom: 0;
  gap: 0;
}

.control-deck.is-stuck .control-panel-head > div {
  display: none;
}

.control-deck.is-stuck .control-panel-head small {
  display: none;
}

.control-deck.is-stuck .button.utility {
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
}

.control-deck.is-stuck .filter-block + .filter-block {
  margin-top: 0;
}

.control-deck.is-stuck .filter-block {
  min-width: 0;
}

.control-deck.is-stuck .filter-block-presets {
  order: 1;
  flex: 0 0 auto;
  max-width: 380px;
}

.control-deck.is-stuck .filter-block-core {
  order: 2;
  flex: 1 1 auto;
}

.control-deck.is-stuck .filter-block-title {
  display: none;
}

.control-deck.is-stuck .extended-filters {
  order: 3;
  flex: 0 0 auto;
  position: relative;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.control-deck.is-stuck .extended-filters summary {
  height: 34px;
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  white-space: nowrap;
}

.control-deck.is-stuck .advanced-filter-grid {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: min(860px, calc(100vw - 84px));
  max-height: min(560px, calc(100vh - 180px));
  overflow: auto;
  scrollbar-width: auto;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-gutter: stable;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(16, 24, 40, 0.16);
}

.control-deck.is-stuck .preset-chip {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  flex: 0 0 auto;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-deck.is-stuck .multi-trigger,
.control-deck.is-stuck .filter input,
.control-deck.is-stuck .filter select {
  height: 34px;
  min-height: 34px;
  max-height: 34px;
  font-size: 12px;
}

.control-deck.is-stuck .preset-views {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: auto;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  max-width: 100%;
  padding-bottom: 6px;
  scrollbar-gutter: stable;
}

.control-deck.is-stuck #filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: auto;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  max-width: 100%;
  padding-bottom: 6px;
  scrollbar-gutter: stable;
}

.control-deck.is-stuck #filters .filter {
  flex: 0 0 132px;
}

.control-deck.is-stuck #filters .filter:has(#f-fundSearch),
.control-deck.is-stuck #filters .filter:has(#f-search) {
  display: none;
}

.control-deck.is-stuck #filters .filter:nth-child(n+6) {
  display: none;
}

.control-deck.is-stuck #filters .filter label {
  display: none;
}

.control-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}

.control-panel-head div {
  min-width: 0;
}

.control-panel-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.preset-views {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-block {
  min-width: 0;
}

.filter-block + .filter-block {
  margin-top: 14px;
}

.filter-block-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preset-chip {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.preset-chip.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.filter label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.filter input,
.filter select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--pearl-2);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.multi-filter {
  position: relative;
}

.multi-trigger {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--pearl-2);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.multi-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-trigger strong {
  color: var(--blue);
  font-weight: 600;
  font-size: 12px;
}

.multi-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: none;
  width: min(320px, 88vw);
  max-height: 280px;
  overflow: auto;
  scrollbar-width: auto;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-gutter: stable;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.multi-filter.open .multi-menu {
  display: block;
}

.multi-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.multi-option:hover {
  background: var(--pearl);
}

.multi-option input {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.multi-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.extended-filters {
  margin-top: 14px;
  border-top: 1px solid var(--soft-line);
  padding-top: 12px;
}

.extended-filters summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.extended-filters .filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.advanced-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.filter input {
  height: 40px;
  padding: 0 12px;
}

.filter select {
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 0 34px 0 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.filter input:focus,
.filter select:focus,
.multi-trigger:focus {
  border-color: var(--blue);
  background: #fff;
}

.report-section {
  padding: 72px 42px;
}

.product-section {
  background: #fff;
}

.product-kpi-grid,
.product-month-card {
  max-width: 1360px;
  margin-right: auto;
  margin-left: auto;
}

.product-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.product-card {
  min-width: 0;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  background: var(--pearl-2);
}

.product-card-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-card strong {
  margin-top: 16px;
  color: var(--ink);
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 31px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.product-card span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.product-card.blue {
  border-color: #d7e8ff;
  background: #f5faff;
}

.product-card.purple {
  border-color: #eadfff;
  background: #fbf8ff;
}

.product-card.good {
  border-color: #d7f0e2;
  background: #f5fbf8;
}

.product-card.bad {
  border-color: #ffdeda;
  background: #fff7f6;
}

.product-card.dark {
  border-color: #d9d9de;
  background: #f4f4f6;
}

.product-month-card {
  min-height: 0;
  margin-top: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 18px;
}

.product-table-wrap {
  max-height: 430px;
  overflow: auto;
  scrollbar-width: auto;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-gutter: stable both-edges;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: #fff;
}

.product-table-wrap::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.advanced-filter-grid::-webkit-scrollbar,
.multi-menu::-webkit-scrollbar,
.control-deck.is-stuck .preset-views::-webkit-scrollbar,
.control-deck.is-stuck #filters::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.product-table-wrap::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track,
.advanced-filter-grid::-webkit-scrollbar-track,
.multi-menu::-webkit-scrollbar-track,
.control-deck.is-stuck .preset-views::-webkit-scrollbar-track,
.control-deck.is-stuck #filters::-webkit-scrollbar-track {
  border-radius: 999px;
  background: var(--scroll-track);
}

.product-table-wrap::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.advanced-filter-grid::-webkit-scrollbar-thumb,
.multi-menu::-webkit-scrollbar-thumb,
.control-deck.is-stuck .preset-views::-webkit-scrollbar-thumb,
.control-deck.is-stuck #filters::-webkit-scrollbar-thumb {
  border: 3px solid var(--scroll-track);
  border-radius: 999px;
  background: var(--scroll-thumb);
}

.product-table-wrap::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb:hover,
.advanced-filter-grid::-webkit-scrollbar-thumb:hover,
.multi-menu::-webkit-scrollbar-thumb:hover,
.control-deck.is-stuck .preset-views::-webkit-scrollbar-thumb:hover,
.control-deck.is-stuck #filters::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}

#monthlyProductTable,
#weeklyProductTable,
#weeklyDemographicTable,
#monthlyMandateImpactTable,
#monthlyMandateTable,
#weeklyMandateTable {
  min-width: 980px;
  table-layout: fixed;
}

#monthlyProductTable th,
#weeklyProductTable th,
#weeklyDemographicTable th,
#monthlyMandateImpactTable th,
#monthlyMandateTable th,
#weeklyMandateTable th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  white-space: nowrap;
}

#monthlyProductTable th:first-child,
#monthlyProductTable td:first-child,
#weeklyProductTable th:first-child,
#weeklyProductTable td:first-child,
#weeklyDemographicTable th:first-child,
#weeklyDemographicTable td:first-child,
#monthlyMandateImpactTable th:first-child,
#monthlyMandateImpactTable td:first-child,
#monthlyMandateTable th:first-child,
#monthlyMandateTable td:first-child,
#weeklyMandateTable th:first-child,
#weeklyMandateTable td:first-child {
  width: 90px;
  white-space: nowrap;
}

#monthlyProductTable td:not(:first-child),
#monthlyProductTable th:not(:first-child),
#weeklyProductTable td:not(:first-child),
#weeklyProductTable th:not(:first-child),
#weeklyDemographicTable td:not(:first-child),
#weeklyDemographicTable th:not(:first-child),
#monthlyMandateImpactTable td:not(:first-child),
#monthlyMandateImpactTable th:not(:first-child),
#monthlyMandateTable td:not(:first-child),
#monthlyMandateTable th:not(:first-child),
#weeklyMandateTable td:not(:first-child),
#weeklyMandateTable th:not(:first-child) {
  text-align: left;
}

.month-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.month-metrics span {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 10px;
  background: var(--pearl-2);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
}

.month-metrics b {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
}

.month-metrics .good {
  background: #f2fbf6;
  color: var(--good);
}

.month-metrics .bad {
  background: #fff6f5;
  color: var(--bad);
}

.mandate-metrics {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.mandate-metrics span {
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 8px;
  border-radius: 10px;
  background: var(--pearl-2);
  color: var(--muted);
}

.mandate-metrics b,
.mandate-metrics em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mandate-metrics b {
  color: var(--ink);
  font-size: 13px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.05;
}

.mandate-metrics em {
  margin-top: 3px;
  font-size: 11px;
  font-style: normal;
  line-height: 1.1;
}

.mandate-metrics .good {
  background: #f2fbf6;
  color: var(--good);
}

.mandate-metrics .bad {
  background: #fff6f5;
  color: var(--bad);
}

.segment-section.report-section {
  padding-top: 56px;
}

.segment-section .section-title h2 {
  max-width: 760px;
  font-size: 34px;
}

.segment-section .gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.segment-section .tile {
  min-height: 0;
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.segment-section .tile:nth-child(-n+4) {
  min-height: auto;
  padding: 24px 26px;
}

.segment-section #genderBars,
.segment-section #riskBars,
.segment-section #ageBars,
.segment-section #roleBars {
  min-height: 0;
}

.segment-section .tile:nth-child(n+5) {
  grid-column: 1 / -1;
  min-height: auto;
}

.segment-section .bar-row {
  grid-template-columns: minmax(150px, 220px) minmax(160px, 1fr) 70px;
}

.segment-section .heatmap,
.segment-section .table-lite {
  max-height: none;
  overflow: visible;
}

.segment-section .heatmap table {
  table-layout: fixed;
}

.segment-section .heatmap th,
.segment-section .heatmap td {
  padding: 16px 18px;
}

.segment-section .heatmap td {
  min-height: 58px;
  font-size: 14px;
}

.risk-business-report {
  display: grid;
  gap: 12px;
}

.risk-report-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(360px, 1.6fr) minmax(280px, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  background: var(--pearl-2);
}

.risk-segment-card {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border-radius: 13px;
  background: #fff;
}

.risk-segment-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.risk-segment-card strong {
  color: var(--ink);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.1;
}

.risk-segment-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.risk-txn-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.risk-txn-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--soft-line);
  border-radius: 13px;
  background: #fff;
}

.risk-txn-top,
.risk-counts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.risk-txn-top strong {
  font-size: 14px;
  font-weight: 650;
}

.risk-txn-top span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--pearl);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.risk-rate {
  margin-top: 14px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 650;
  line-height: 1;
}

.risk-progress {
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  background: #ececf1;
  overflow: hidden;
}

.risk-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--good);
}

.risk-txn-card.watch .risk-progress i {
  background: #d97706;
}

.risk-txn-card.critical .risk-progress i {
  background: var(--bad);
}

.risk-txn-card.low-volume .risk-progress i,
.risk-txn-card.none .risk-progress i {
  background: #9ca3af;
}

.risk-txn-card.watch .risk-txn-top span {
  background: #fff7ed;
  color: #9a3412;
}

.risk-txn-card.critical .risk-txn-top span {
  background: #fff1f0;
  color: var(--bad);
}

.risk-txn-card.stable .risk-txn-top span {
  background: #effaf4;
  color: var(--good);
}

.risk-counts {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.risk-business-note {
  min-width: 0;
  margin: 0;
  align-self: center;
  color: #333;
  font-size: 14px;
  line-height: 1.45;
}

.segment-section #accountMix {
  max-height: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
  overflow: visible;
}

.demographic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.demographic-block {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  background: var(--pearl-2);
}

.demographic-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.demographic-block h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.demographic-block-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.demographic-cards {
  display: grid;
  gap: 8px;
}

.demographic-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: #fff;
}

.demographic-metric.stable {
  border-color: #d8f3e3;
  background: #f5fcf8;
}

.demographic-metric.watch {
  border-color: #fdecc8;
  background: #fffaf1;
}

.demographic-metric.critical {
  border-color: #ffdeda;
  background: #fffafa;
}

.demographic-metric-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.demographic-metric-main strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
}

.demographic-metric-main span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #effaf4;
  color: var(--good);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.demographic-metric.watch .demographic-metric-main span {
  background: #fff7ed;
  color: #9a3412;
}

.demographic-metric.critical .demographic-metric-main span {
  background: #fff1f0;
  color: var(--bad);
}

.demographic-metric-rate {
  margin-top: 10px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 650;
  line-height: 1;
}

.demographic-progress {
  height: 7px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.demographic-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--good);
}

.demographic-metric.watch .demographic-progress i {
  background: #d97706;
}

.demographic-metric.critical .demographic-progress i {
  background: var(--bad);
}

.demographic-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.demographic-metric-grid span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.demographic-metric-grid b {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.demographic-period {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-block {
  min-width: 0;
  height: max-content;
  padding: 16px;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  background: var(--pearl-2);
}

.account-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.account-block h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.account-block-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.account-metrics {
  display: grid;
  gap: 8px;
}

.account-metric {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(78px, auto) minmax(92px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
}

.account-metric strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

.account-metric span,
.account-metric b {
  display: block;
}

.account-metric span {
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
}

.account-metric b {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
}

.account-metric.watch {
  border-color: #fdecc8;
}

.account-metric.critical {
  border-color: #ffdeda;
  background: #fffafa;
}

#funds .gallery-grid {
  grid-template-columns: 1fr;
}

#funds .tile {
  grid-column: 1 / -1;
  min-height: auto;
  width: 100%;
  background: var(--pearl-2);
}

#funds .viz,
#funds .viz.tall {
  min-height: 0;
}

#funds .tile-head {
  margin-bottom: 26px;
}

#funds .bar-row {
  grid-template-columns: minmax(260px, 360px) minmax(260px, 1fr) 80px;
}

#funds .bar-list {
  gap: 12px;
}

.mandate-section {
  background: var(--pearl);
}

.mandate-section .gallery-grid {
  align-items: start;
}

.mandate-section .tile {
  min-height: 0;
  padding: 24px 28px;
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  background: #fff;
}

.mandate-section .tile:nth-child(even) {
  background: var(--pearl-2);
}

.mandate-section .tile:nth-child(6) {
  grid-column: 1 / -1;
}

.mandate-section .tile-head {
  margin-bottom: 20px;
}

.mandate-section .viz {
  min-height: 0;
}

.mandate-section .bar-list {
  gap: 10px;
}

.mandate-section .bar-row {
  grid-template-columns: minmax(220px, 280px) minmax(170px, 1fr) 58px;
  min-height: 26px;
}

.mandate-section .bar-track {
  height: 13px;
}

.mandate-section .bar-name {
  font-size: 13px;
}

#mandateRejectionBars.bar-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 34px;
  row-gap: 10px;
}

#mandateRejectionBars .bar-row {
  grid-template-columns: minmax(250px, 1fr) minmax(130px, 0.9fr) 34px;
}

.mandate-section .gallery-grid .tile:nth-child(5) {
  grid-column: 1 / -1;
}

.mandate-section .gallery-grid .tile:nth-child(5) .bar-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 34px;
}

.mandate-section .product-month-card {
  border: 1px solid var(--soft-line);
  background: #fff;
}

.mandate-section .product-month-card.pearl-tile {
  background: var(--pearl-2);
}

.mandate-section .product-table-wrap {
  max-height: 360px;
}

#monthlyMandateImpactTable,
#monthlyMandateTable,
#weeklyMandateTable {
  min-width: 1120px;
}

.report-section > .section-title,
.notes-section > .section-title {
  max-width: 1360px;
  margin: 0 auto 30px;
}

.section-title h2 {
  max-width: 820px;
  margin-bottom: 0;
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.47;
}

.dark-section {
  background: #fff;
  color: var(--ink);
}

.dark-section .section-title h2 {
  color: var(--ink);
}

.dark-section .tile {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--soft-line);
}

.dark-section .tile:nth-child(odd) {
  background: var(--pearl-2);
}

.dark-section .eyebrow.on-dark {
  color: var(--blue);
}

.gallery-grid {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tile {
  min-width: 0;
  min-height: 340px;
  padding: 26px;
  overflow: hidden;
}

.tile.wide {
  grid-column: span 1;
}

.light-tile {
  background: #fff;
  color: var(--ink);
}

.pearl-tile {
  background: var(--pearl);
  color: var(--ink);
}

.dark-tile {
  background: var(--pearl);
  color: var(--ink);
}

.dark-tile:nth-child(2n) {
  background: #fff;
}

.tile-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.tile h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.19;
}

.tile-head span {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.dark-tile .tile-head span {
  color: var(--muted);
}

.viz {
  min-height: 260px;
}

.viz.tall {
  min-height: 350px;
}

.viz svg {
  display: block;
  width: 100%;
  height: auto;
}

#monthlyTrend,
#weeklyTrend {
  min-height: 420px;
}

#monthlyTrend svg,
#weeklyTrend svg {
  height: 360px;
}

.chart-legend {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

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

.legend-line,
.legend-bar {
  display: inline-block;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: var(--blue);
}

.legend-bar {
  width: 10px;
  height: 14px;
  background: #d7e8ff;
}

.bar-list {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(160px, 230px) minmax(120px, 1fr) 70px;
  gap: 12px;
  align-items: center;
  min-height: 22px;
}

.bar-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
}

.bar-number {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.empty-state {
  color: var(--muted);
  font-size: 14px;
}

.bar-label {
  fill: currentColor;
  font-size: 12px;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

.bar-value {
  fill: currentColor;
  font-size: 12px;
  font-weight: 600;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

.axis-label {
  fill: #7a7a7a;
  opacity: 0.55;
  font-size: 11px;
}

.heatmap,
.table-lite {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

#ordersTable {
  min-width: 3800px;
}

#ordersTable th:nth-child(1),
#ordersTable td:nth-child(1),
#ordersTable th:nth-child(2),
#ordersTable td:nth-child(2),
#ordersTable th:nth-child(3),
#ordersTable td:nth-child(3),
#ordersTable th:nth-child(7),
#ordersTable td:nth-child(7),
#ordersTable th:nth-child(8),
#ordersTable td:nth-child(8),
#ordersTable th:nth-child(9),
#ordersTable td:nth-child(9),
#ordersTable th:nth-child(10),
#ordersTable td:nth-child(10),
#ordersTable th:nth-child(11),
#ordersTable td:nth-child(11) {
  white-space: nowrap;
}

th,
td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 12px 10px;
  text-align: left;
  font-size: 13px;
  line-height: 1.25;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.sensitive-cell {
  min-width: 150px;
  white-space: nowrap;
}

.sensitive-cell span {
  display: inline-block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.reveal-button {
  min-height: 0;
  margin-left: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  padding: 3px 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.dark-tile th,
.dark-tile td {
  border-color: rgba(0, 0, 0, 0.08);
}

.dark-tile th {
  color: var(--muted);
}

.dark-tile td {
  color: var(--ink);
}

.split-section {
  background: #fff;
}

.explorer-section {
  background: var(--pearl);
}

.table-wrap {
  max-width: 1360px;
  max-height: 620px;
  margin: 0 auto;
  overflow: auto;
  scrollbar-width: auto;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-gutter: stable both-edges;
  border-radius: 18px;
  background: #fff;
}

.table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.chip.ok {
  background: #e4f7ec;
  color: var(--good);
}

.chip.bad {
  background: #ffe8e6;
  color: var(--bad);
}

.chip.neutral {
  background: var(--pearl);
  color: var(--muted);
}

.notes-section {
  padding: 80px 42px 96px;
  background: #fff;
}

.section-title.compact h2 {
  font-size: 34px;
  line-height: 1.18;
}

.notes {
  max-width: 1360px;
  margin: 0 auto;
  padding: 26px 34px;
  border-radius: 18px;
  background: var(--pearl);
  color: #333;
}

.notes li {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.43;
}

@media (max-width: 1500px) {
  .hero,
  .control-deck,
  .report-section > .section-title,
  .product-kpi-grid,
  .product-month-card,
  .notes-section > .section-title,
  .gallery-grid,
  .table-wrap,
  .notes {
    max-width: 1220px;
  }

  .hero {
    grid-template-columns: minmax(360px, 0.75fr) minmax(620px, 1.25fr);
  }

  .filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .product-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .extended-filters .filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .advanced-filter-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  main {
    min-width: 0;
  }

  .hero,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 42px;
  }

  .tile.wide {
    grid-column: span 1;
  }

  .filters,
  .extended-filters .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .risk-report-row {
    grid-template-columns: 1fr;
  }

  .mandate-metrics {
    flex-wrap: wrap;
  }

  .mandate-metrics span {
    flex-basis: calc(50% - 4px);
  }

  .control-deck.is-stuck .control-panel {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .control-deck {
    padding: 0 16px 32px;
  }

  .control-deck.is-stuck {
    padding: 8px 12px;
  }

  .control-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .control-panel-head {
    align-items: flex-start;
  }

  .preset-views {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .preset-chip {
    flex: 0 0 auto;
  }

  .filters,
  .extended-filters .filters {
    grid-template-columns: 1fr;
  }

  .product-kpi-grid {
    grid-template-columns: 1fr;
  }

  .risk-txn-grid {
    grid-template-columns: 1fr;
  }

  .advanced-filter-grid {
    grid-template-columns: 1fr;
  }

  .control-deck.is-stuck {
    overflow-x: auto;
  }

  .control-deck.is-stuck .control-panel {
    min-width: 860px;
  }

  .control-deck.is-stuck .advanced-filter-grid {
    width: min(560px, calc(100vw - 24px));
    right: auto;
    left: 0;
  }
}
