:root {
  color-scheme: light;
  --bg: #f6f6f2;
  --panel: #ffffff;
  --panel-soft: #fafbf8;
  --ink: #17201d;
  --muted: #68736f;
  --line: #d7ddd5;
  --line-strong: #b9c3bd;
  --accent: #145f59;
  --accent-2: #a94d2a;
  --accent-3: #385f9f;
  --soft: #e7eee9;
  --warn: #8b2e1f;
  --good: #1f6f4a;
  font-family: Arial, "Noto Sans Hebrew", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: #f8f8f5;
  color: var(--ink);
  direction: rtl;
}

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

button {
  cursor: pointer;
}

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

.app-shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 3;
}

.brand-block {
  display: grid;
  gap: 3px;
}

h1 {
  font-size: 23px;
  font-weight: 780;
  letter-spacing: 0;
}

h2 {
  font-size: 24px;
  font-weight: 760;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  font-size: 13px;
  font-weight: 800;
}

.topbar p,
.kicker,
.message,
.table-title p,
.control-hint {
  color: var(--muted);
  font-size: 13px;
}

.row-count {
  display: none;
}

.toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
}

.topbar button,
.controls button {
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: white;
  min-height: 36px;
  padding: 0 13px;
}

.topbar button:hover,
.controls button:hover {
  background: #0e514c;
}

.toggle {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  gap: 8px;
  min-height: 36px;
  white-space: nowrap;
}

.toggle input {
  height: 16px;
  width: 16px;
}

.layout {
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  min-height: calc(100vh - 68px);
}

.sidebar {
  border-left: 1px solid var(--line);
  direction: rtl;
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
}

.workspace {
  direction: rtl;
  grid-column: 1;
  grid-row: 1;
}

.nav {
  align-content: start;
  display: grid;
  gap: 14px;
  padding: 14px;
  position: sticky;
  top: 69px;
}

.nav-group {
  display: grid;
  gap: 5px;
}

.nav-group-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  padding: 0 8px;
}

.nav button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink);
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 7px 8px;
  text-align: right;
  width: 100%;
}

.nav button strong {
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
}

.nav button span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.nav button[data-priority="primary"] {
  background: #fff4ea;
  border-color: #d98b58;
  box-shadow: inset 3px 0 0 var(--accent-2);
  color: #7f351e;
}

.nav button[data-priority="primary"] strong {
  font-size: 14px;
  font-weight: 850;
}

.nav button[data-priority="primary"] span {
  color: #7c5a4a;
  font-weight: 700;
}

.nav button[data-priority="primary"]:hover {
  background: #ffeadb;
  border-color: var(--accent-2);
}

.nav button[aria-current="page"] {
  background: var(--soft);
  border-color: var(--line);
  color: var(--accent);
}

.nav button[data-priority="primary"][aria-current="page"] {
  background: var(--accent-2);
  border-color: #843b20;
  box-shadow: inset 3px 0 0 #5f2716;
  color: #ffffff;
}

.nav button[data-priority="primary"][aria-current="page"] span {
  color: #ffe4d5;
}

.workspace {
  align-content: start;
  display: grid;
  gap: 20px;
  min-width: 0;
  padding: 28px 30px 48px;
}

.view-heading {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.kicker {
  font-weight: 760;
  margin-bottom: 4px;
}

.takeaway {
  color: #28433d;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.45;
  margin-top: 8px;
  max-width: 760px;
}

.controls {
  align-items: end;
  background: #ffffff;
  border: 1px solid #dfe4dd;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-start;
  padding: 14px 16px;
}

.controls[data-view="commission-drag"] {
  align-items: start;
}

.controls[data-view="independent"] {
  align-items: start;
}

.controls[data-view="kupat-gemel"] {
  align-items: start;
}

.controls[data-view="trinity"] {
  align-items: start;
}

.story-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  padding: 0;
}

.story-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.story-section {
  display: grid;
  gap: 10px;
}

.story-section-separated {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 22px;
}

.story-copy h3 {
  color: var(--warn);
  font-size: 22px;
  line-height: 1.25;
}

.story-copy h4 {
  color: var(--warn);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  margin: 10px 0 0;
}

.story-copy h4.story-intro-subheading {
  font-size: 23px;
  margin-top: 28px;
}

.story-copy p,
.story-copy li {
  color: #1f52a0;
  font-size: 18px;
  line-height: 1.75;
}

.story-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 24px 0 0;
}

.story-copy strong {
  color: var(--warn);
}

.story-copy a {
  color: #1748d8;
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.story-extra {
  display: grid;
  gap: 12px;
}

.story-toggle {
  align-self: start;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 820;
  min-height: 34px;
  padding: 0 13px;
}

.story-toggle:hover {
  background: var(--soft);
  border-color: var(--accent);
}

.story-bottom-line {
  color: var(--warn) !important;
  font-weight: 800;
}

.story-emphasis {
  color: var(--warn) !important;
  font-weight: 800;
}

.story-panel-after {
  border-color: #cfd7cf;
}

.story-media {
  border-top: 1px solid #dde3dc;
  margin: 8px 0 0;
  min-width: 0;
  padding-top: 18px;
}

.story-image {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
  max-height: none;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
  width: min(90%, 1500px);
}

.field {
  flex: 0 1 220px;
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.field.wide {
  flex-basis: 360px;
}

.field.xwide {
  flex-basis: 520px;
}

.field.run-field {
  align-self: end;
  flex-basis: 120px;
}

.trinity-draw-summary {
  align-self: start;
  color: var(--ink);
  display: grid;
  flex: 1 1 100%;
  gap: 4px;
  min-height: 40px;
  padding: 2px 0 0;
}

.trinity-draw-summary p {
  color: #1f52a0;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.25;
}

.controls[data-view="trinity"] .field,
.controls[data-view="trinity"] .field.wide {
  flex-basis: 240px;
  grid-template-rows: auto 46px minmax(18px, auto);
}

.field label,
.portfolio-picker legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.field input,
.field select,
.field textarea {
  background: #fff;
  border: 1px solid #cfd8d2;
  border-radius: 6px;
  color: var(--ink);
  min-height: 40px;
  padding: 0 11px;
  width: 100%;
  direction: ltr;
  text-align: right;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 95, 89, .13);
  outline: 0;
}

.field textarea {
  line-height: 1.35;
  min-height: 62px;
  padding: 7px 9px;
  resize: vertical;
}

.field.checkbox {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  display: flex;
  gap: 8px;
  min-height: 40px;
  padding: 19px 0 0;
}

.field.checkbox input {
  height: 16px;
  width: 16px;
}

.field.checkbox label {
  color: var(--ink);
  font-size: 13px;
}

.portfolio-picker {
  border: 0;
  display: grid;
  flex: 1 1 620px;
  gap: 7px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.fee-matrix {
  border: 0;
  display: grid;
  flex: 1 1 720px;
  gap: 8px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.fee-matrix legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.fee-grid {
  align-items: center;
  background: #fbfcfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0;
  grid-template-columns: minmax(130px, 1.2fr) repeat(2, minmax(105px, 1fr));
  overflow: hidden;
}

.fee-grid > span,
.fee-grid > b,
.fee-grid > label {
  border-bottom: 1px solid #e4e9e3;
  min-height: 38px;
  padding: 7px 9px;
}

.fee-grid > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.fee-grid > b {
  font-size: 12px;
  font-weight: 820;
}

.fee-grid > label {
  align-items: center;
  display: flex;
  gap: 6px;
}

.fee-grid > :nth-last-child(-n+3) {
  border-bottom: 0;
}

.fee-grid input {
  background: #ffffff;
  border: 1px solid #cfd8d2;
  border-radius: 6px;
  color: var(--ink);
  min-height: 28px;
  padding: 0 7px;
  width: 100%;
}

.fee-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.date-range-control {
  border: 0;
  display: grid;
  flex: 1 1 100%;
  gap: 8px;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  padding: 0;
}

.controls[data-view="commission-drag"] .date-range-control {
  flex-basis: 100%;
}

.controls[data-view="commission-drag"] .field.wide {
  flex-basis: 300px;
}

.controls[data-view="commission-drag"] .field.checkbox {
  flex-basis: 180px;
  padding-top: 22px;
}

.controls[data-view="independent"] .date-range-control {
  flex-basis: 100%;
}

.controls[data-view="independent"] .field.wide {
  flex-basis: 320px;
}

.controls[data-view="independent"] .field {
  flex-basis: 210px;
}

.date-range-control legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.date-range-tracks {
  direction: ltr;
  height: 52px;
  position: relative;
  --range-start: 0%;
  --range-end: 100%;
  unicode-bidi: isolate;
}

.date-range-thumb-labels span {
  background: var(--accent);
  border-radius: 4px;
  color: #ffffff;
  direction: ltr;
  font-size: 12px;
  font-weight: 800;
  min-width: 60px;
  padding: 3px 6px;
  position: absolute;
  text-align: center;
  top: 0;
  transform: translateX(-50%);
  z-index: 2;
}

.date-range-tracks.labels-overlap .date-range-thumb-labels span:first-child {
  transform: translate(-100%, -2px);
}

.date-range-tracks.labels-overlap .date-range-thumb-labels span:last-child {
  transform: translate(0, -2px);
}

.date-range-rail {
  background:
    linear-gradient(
      90deg,
      #d6ded7 0,
      #d6ded7 var(--range-start),
      var(--accent) var(--range-start),
      var(--accent) var(--range-end),
      #d6ded7 var(--range-end),
      #d6ded7 100%
    );
  border-radius: 999px;
  height: 5px;
  left: 0;
  position: absolute;
  right: 0;
  top: 25px;
}

.date-range-tracks input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  direction: ltr;
  height: 26px;
  left: 0;
  margin: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 16px;
  width: 100%;
}

.date-range-tracks input[type="range"]::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  background: transparent;
  height: 6px;
}

.date-range-tracks input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  background: #ffffff;
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(23, 32, 29, .18);
  cursor: grab;
  height: 18px;
  margin-top: -6px;
  pointer-events: auto;
  width: 18px;
}

.date-range-tracks input[type="range"]::-moz-range-track {
  background: transparent;
  height: 6px;
}

.date-range-tracks input[type="range"]::-moz-range-thumb {
  background: #ffffff;
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(23, 32, 29, .2);
  cursor: grab;
  height: 18px;
  pointer-events: auto;
  width: 18px;
}

.date-range-tracks input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 3px solid rgba(20, 95, 89, .22);
  outline-offset: 2px;
}

.date-range-ticks {
  color: var(--muted);
  direction: ltr;
  font-size: 10px;
  font-weight: 760;
  left: 0;
  position: absolute;
  right: 0;
  top: 40px;
}

.date-range-ticks span {
  position: absolute;
  transform: translateX(-50%);
}

.date-range-ticks span:first-child {
  transform: translateX(0);
}

.date-range-ticks span:last-child {
  transform: translateX(-100%);
}

.date-range-summary {
  display: flex;
  gap: 6px;
}

.date-range-summary span {
  align-items: baseline;
  background: #f4f7f4;
  border: 1px solid #dfe6df;
  border-radius: 6px;
  display: inline-flex;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
}

.date-range-summary b {
  color: var(--ink);
  direction: ltr;
  font-size: 13px;
  font-weight: 850;
}

.date-range-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}


.portfolio-options {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.portfolio-option {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 8px;
  min-height: 32px;
  padding: 5px 7px;
}

.portfolio-option input {
  height: 15px;
  width: 15px;
}

.portfolio-option span {
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.message {
  min-height: 18px;
}

.message.error {
  color: var(--warn);
}

.skeleton-line,
.skeleton-axis,
.skeleton-grid-line,
.skeleton-series,
.skeleton-dot {
  background: linear-gradient(90deg, #eef2ed 0%, #dfe7df 45%, #eef2ed 90%);
  background-size: 220% 100%;
  border-radius: 999px;
  display: block;
  overflow: hidden;
  position: relative;
  width: var(--skeleton-width, 100%);
}

.skeleton-line,
.skeleton-axis,
.skeleton-grid-line,
.skeleton-series,
.skeleton-dot {
  animation: skeleton-shimmer 1.35s ease-in-out infinite;
}

.skeleton-line {
  height: 10px;
}

.skeleton-line-label {
  height: 9px;
}

.skeleton-line-value {
  height: 22px;
}

.skeleton-title {
  height: 18px;
}

.skeleton-metric {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfa 100%);
}

.skeleton-chart {
  display: grid;
  gap: 18px;
  min-height: 312px;
  padding: 8px;
  width: 100%;
}

.skeleton-chart-head,
.skeleton-chart-foot {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.skeleton-chart-foot {
  justify-content: flex-start;
  padding-inline: 4px;
}

.skeleton-plot {
  background:
    linear-gradient(180deg, rgba(250, 251, 248, .92), rgba(255, 255, 255, .8));
  border: 1px solid #e5eae4;
  border-radius: 8px;
  min-height: 260px;
  overflow: hidden;
  position: relative;
}

.skeleton-axis,
.skeleton-grid-line,
.skeleton-series {
  position: absolute;
}

.skeleton-axis-y {
  bottom: 34px;
  height: calc(100% - 62px);
  right: 58px;
  width: 2px;
}

.skeleton-axis-x {
  bottom: 34px;
  height: 2px;
  left: 36px;
  right: 58px;
  width: auto;
}

.skeleton-grid-line {
  height: 1px;
  left: 36px;
  right: 58px;
  width: auto;
}

.skeleton-grid-line-a {
  top: 28%;
}

.skeleton-grid-line-b {
  top: 49%;
}

.skeleton-grid-line-c {
  top: 70%;
}

.skeleton-series {
  height: 6px;
  transform-origin: center;
}

.skeleton-series-a {
  left: 16%;
  top: 50%;
  transform: rotate(-12deg);
  width: 58%;
}

.skeleton-series-b {
  left: 24%;
  top: 62%;
  transform: rotate(9deg);
  width: 48%;
}

.skeleton-dot {
  height: 14px;
  position: absolute;
  width: 14px;
}

.skeleton-dot-a {
  right: 22%;
  top: 37%;
}

.skeleton-dot-b {
  right: 42%;
  top: 58%;
}

.skeleton-dot-c {
  right: 63%;
  top: 44%;
}

.skeleton-table {
  display: grid;
  gap: 0;
  padding: 8px 10px 14px;
}

.skeleton-table-row {
  align-items: center;
  border-bottom: 1px solid #edf1eb;
  display: grid;
  gap: 16px;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  min-height: 36px;
}

.skeleton-table-row:first-child .skeleton-line {
  height: 12px;
}

.skeleton-table-compact {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 320px;
}

.skeleton-table-row-compact {
  grid-template-columns: 1.4fr 1fr 1fr;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 110% 0;
  }
  100% {
    background-position: -110% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-line,
  .skeleton-axis,
  .skeleton-grid-line,
  .skeleton-series,
  .skeleton-dot {
    animation: none;
  }
}

.metrics {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  flex: 0 1 260px;
  gap: 3px;
  min-height: 70px;
  max-width: 300px;
  min-width: 190px;
  padding: 10px 12px;
}

.metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.metric strong {
  font-size: 19px;
  font-weight: 780;
  line-height: 1.15;
}

.metric small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.chart-panel,
.table-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}

.chart-panel {
  min-height: 340px;
  padding: 12px;
}

.chart {
  min-height: 312px;
  width: 100%;
}

.multi-chart-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding: 18px 4px 22px;
}

.multi-chart-section:first-child {
  border-top: 0;
  padding-top: 4px;
}

.multi-chart-section-no-top-border {
  border-top: 0;
}

.lazy-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 18px;
  padding: 22px 4px 26px;
}

.lazy-section:first-child {
  border-top: 0;
  padding-top: 4px;
}

.lazy-controls {
  align-items: start;
  direction: ltr;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(260px, 1.15fr) minmax(250px, 1fr) minmax(250px, 1fr) minmax(110px, .45fr) minmax(280px, 1.1fr) minmax(150px, .55fr);
}

.lazy-time-controls {
  align-items: end;
  direction: ltr;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(420px, 1fr) minmax(120px, .25fr);
  justify-content: center;
  margin-top: 8px;
  max-width: 760px;
}

.lazy-time-mode span {
  min-width: 90px;
}

.lazy-picker .panel-picker-menu {
  max-height: 330px;
}

.lazy-picker .panel-picker-options {
  max-height: 248px;
}

.lazy-number input {
  text-align: center;
}

.lazy-checkbox {
  align-items: center;
  color: var(--ink);
  direction: rtl;
  display: flex;
  font-size: 13px;
  font-weight: 760;
  gap: 8px;
  min-height: 38px;
  padding-top: 21px;
}

.lazy-checkbox input {
  height: 16px;
  width: 16px;
}

.lazy-chart {
  min-height: 520px;
}

.lazy-copy {
  margin: 4px 0;
}

.story-inline-title {
  color: var(--warn);
  display: block;
  font-size: 17px;
}

.lazy-table-wrap {
  max-height: 560px;
  overflow: auto;
}

.lazy-table-narrow {
  max-width: 520px;
}

.lazy-table-section {
  align-items: start;
}

.multi-chart-header {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.multi-chart-header h3 {
  color: var(--warn);
  font-size: 19px;
  line-height: 1.25;
}

.multi-chart-header p {
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.multi-chart-header p.error {
  color: var(--warn);
}

.panel-metrics {
  gap: 7px;
  justify-content: center;
}

.panel-metrics .metric {
  flex-basis: 220px;
  max-width: 260px;
  min-width: 160px;
}

.multi-chart {
  display: grid;
  justify-items: center;
  min-height: 360px;
}

.multi-chart svg:not(.faceted-chart-svg):not(.heatmap-svg) {
  max-width: 1180px;
}

.panel-story {
  margin-top: 6px;
}

.panel-intro {
  margin-bottom: 2px;
}

.panel-controls {
  align-items: start;
  direction: ltr;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(270px, 1.2fr) minmax(240px, 1fr) minmax(260px, 1fr) minmax(360px, 1.5fr);
  margin: 4px 0 20px;
}

.chart[data-view="scv"] .multi-chart-section:first-child .panel-controls {
  gap: 26px;
  grid-template-columns: minmax(260px, 1.05fr) minmax(300px, 1.25fr) minmax(250px, .95fr) minmax(360px, 1.35fr) minmax(230px, .9fr);
}

.chart[data-view="scv"] .multi-chart-section:first-child .panel-segmented span {
  min-height: 34px;
  padding-inline: 10px;
}

.chart[data-view="scv"] .multi-chart-section:first-child .panel-date-range .date-range-thumb-labels span {
  font-size: 11px;
  min-width: 48px;
}

.panel-segmented {
  border: 0;
  direction: rtl;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.panel-segmented legend,
.panel-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.panel-segmented div {
  border: 1px solid #2d9ee8;
  border-radius: 6px;
  display: flex;
  overflow: hidden;
}

.panel-segmented label {
  flex: 1 1 0;
}

.panel-segmented input {
  position: absolute;
  opacity: 0;
}

.panel-segmented span {
  color: #157cc4;
  display: block;
  font-size: 12px;
  min-height: 36px;
  padding: 9px 12px;
  text-align: center;
}

.panel-segmented label + label span {
  border-right: 1px solid #2d9ee8;
}

.panel-segmented input:checked + span {
  background: #2d9ee8;
  color: #ffffff;
  font-weight: 800;
}

.panel-field {
  direction: rtl;
  display: grid;
  gap: 7px;
  min-width: 0;
}

.panel-field input,
.panel-field select {
  background: linear-gradient(#ffffff, #f4f6f5);
  border: 1px solid #e3e8e5;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(23, 32, 29, .06);
  color: var(--ink);
  direction: ltr;
  min-height: 36px;
  padding: 0 12px;
  text-align: right;
  width: 100%;
}

.panel-field select[multiple] {
  direction: ltr;
  min-height: 134px;
  padding: 6px 8px;
  text-align: left;
}

.panel-field-wide {
  min-width: 240px;
}

.panel-picker {
  direction: rtl;
  display: grid;
  gap: 7px;
  min-width: 0;
  position: relative;
}

.panel-picker summary {
  display: grid;
  gap: 7px;
  list-style: none;
}

.panel-picker summary::-webkit-details-marker {
  display: none;
}

.panel-picker summary > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.panel-picker summary b {
  background: linear-gradient(#ffffff, #f4f6f5);
  border: 1px solid #e3e8e5;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(23, 32, 29, .06);
  color: var(--ink);
  direction: ltr;
  display: block;
  font-size: 12px;
  font-weight: 520;
  min-height: 36px;
  overflow: hidden;
  padding: 10px 28px 9px 12px;
  position: relative;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-picker summary b::after {
  content: "▾";
  color: #52605b;
  position: absolute;
  right: 10px;
}

.panel-picker-menu {
  background: #ffffff;
  border: 1px solid #cfd8d2;
  border-radius: 6px;
  box-shadow: 0 18px 38px rgba(23, 32, 29, .16);
  direction: ltr;
  display: grid;
  gap: 0;
  left: 0;
  max-height: 280px;
  min-width: 100%;
  overflow: hidden;
  padding: 6px;
  position: absolute;
  top: calc(100% + 4px);
  z-index: 4;
}

.panel-picker-tools {
  border-bottom: 1px solid #eef2ef;
  display: grid;
  gap: 6px;
  padding: 2px 2px 7px;
}

.panel-picker-search {
  border: 1px solid #d9e1dc;
  border-radius: 5px;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  min-height: 30px;
  padding: 6px 9px;
  width: 100%;
}

.panel-picker-actions {
  display: flex;
  gap: 6px;
}

.panel-picker-actions button {
  background: #f4f8f6;
  border: 1px solid #d9e1dc;
  border-radius: 5px;
  color: #245d89;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 760;
  min-height: 26px;
  padding: 4px 8px;
}

.panel-picker-actions button:hover {
  background: #e9f3ee;
}

.panel-picker-options {
  max-height: 198px;
  overflow: auto;
  padding-top: 6px;
}

.panel-picker-options label {
  align-items: center;
  border-radius: 4px;
  display: flex;
  gap: 8px;
  min-height: 28px;
  padding: 5px 7px;
}

.panel-picker-options label:hover {
  background: #eef5f2;
}

.panel-picker-options input {
  height: 14px;
  width: 14px;
}

.panel-picker-options span {
  font-size: 12px;
}

.panel-picker-empty {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 4px 4px;
}

.panel-slider {
  direction: ltr;
  display: grid;
  gap: 8px;
  min-width: 0;
  position: relative;
}

.panel-slider-head {
  align-items: end;
  direction: rtl;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 28px;
  position: relative;
}

.panel-slider-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.panel-slider output {
  background: #2f8fdb;
  border-radius: 4px;
  color: #ffffff;
  direction: ltr;
  font-size: 11px;
  font-weight: 850;
  min-width: 34px;
  padding: 3px 7px;
  position: absolute;
  text-align: center;
  top: 0;
  transform: translateX(-50%);
}

.panel-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, #2f8fdb, #2f8fdb);
  border-radius: 999px;
  height: 6px;
  margin: 10px 0 4px;
  width: 100%;
}

.panel-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  background: #d9d9d9;
  border: 1px solid #9aa4a0;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(23, 32, 29, .28);
  height: 21px;
  width: 21px;
}

.panel-slider input[type="range"]::-moz-range-thumb {
  background: #d9d9d9;
  border: 1px solid #9aa4a0;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(23, 32, 29, .28);
  height: 21px;
  width: 21px;
}

.panel-slider-ticks {
  color: #2c3a36;
  font-size: 10px;
  height: 12px;
  line-height: 1;
  position: relative;
}

.panel-slider-ticks span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}

.panel-date-range {
  border: 0;
  direction: rtl;
  display: grid;
  gap: 8px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.panel-date-range legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.panel-date-range .date-range-tracks {
  height: 58px;
}

.panel-range-pair {
  --range-start: 42%;
  --range-end: 100%;
}

.panel-range-stack {
  background:
    linear-gradient(
      90deg,
      #d7dcda 0,
      #d7dcda var(--range-start),
      #2f8fdb var(--range-start),
      #2f8fdb var(--range-end),
      #d7dcda var(--range-end),
      #d7dcda 100%
    );
  border-radius: 999px;
  height: 30px;
  position: relative;
}

.panel-range-stack input[type="range"] {
  background: transparent;
  left: 0;
  margin: 0;
  position: absolute;
  right: 0;
  top: 12px;
}

.chart svg {
  display: block;
  height: 300px;
  margin-inline: auto;
  overflow: visible;
  width: 100%;
  direction: ltr;
}

.chart svg.tax-chart-svg {
  aspect-ratio: 940 / 520;
  height: auto;
  max-width: 1175px;
  min-height: 0;
}

.chart svg.faceted-chart-svg {
  aspect-ratio: 1160 / 630;
  height: auto;
  max-width: 1325px;
  min-height: 0;
}

.chart svg.kupat-chart-svg {
  aspect-ratio: 1540 / 620;
  height: auto;
  max-width: 1788px;
  min-height: 0;
}

.chart svg.risk-chart-svg {
  aspect-ratio: 940 / 520;
  height: auto;
  max-width: 1373px;
  min-height: 0;
}

.chart svg.trinity-chart-svg {
  aspect-ratio: 940 / 620;
  height: auto;
  max-width: 1152px;
  min-height: 0;
}

.chart svg.rolling-bars-svg {
  aspect-ratio: 1160 / 650;
  height: auto;
  max-width: 1356px;
  min-height: 0;
}

.chart svg.portfolio-cagr-svg {
  aspect-ratio: 1160 / 650;
  height: auto;
  max-width: 1356px;
  min-height: 0;
}

.chart svg.lazy-scatter-svg,
.chart svg.lazy-time-svg {
  height: auto;
  min-height: 0;
}

.chart svg.lazy-scatter-svg {
  aspect-ratio: 1120 / 720;
  max-width: 1213px;
}

.chart svg.lazy-time-svg {
  aspect-ratio: auto;
  max-width: 1293px;
}

.chart-title {
  fill: #49638f;
  font-size: 15px;
  font-weight: 760;
}

.risk-title {
  fill: #111;
  font-size: 20px;
}

.chart-caption {
  color: #48534f;
  direction: rtl;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 4px 12px;
  justify-content: flex-end;
  line-height: 1.5;
  margin: 6px auto 0;
  text-align: right;
  direction: rtl;
  unicode-bidi: plaintext;
}

.chart-caption span {
  unicode-bidi: plaintext;
}

.chart-caption a {
  color: #1748d8;
  font-weight: 760;
  text-decoration: none;
}

.chart-caption a:hover {
  text-decoration: underline;
}

.chart-caption-rolling {
  color: #111;
  direction: ltr;
  display: grid;
  font-size: 14px;
  font-weight: 800;
  gap: 0;
  justify-content: start;
  line-height: 1.25;
  max-width: 78%;
  text-align: left;
}

.chart-caption-tax {
  max-width: 72%;
  padding-left: 25%;
}

.chart-caption-faceted {
  max-width: 82%;
}

.chart-caption-risk {
  max-width: 80%;
}

.grid-line {
  stroke: #e4e8e3;
  stroke-width: 1;
}

.risk-zero-line {
  stroke: #111;
  stroke-width: 1.2;
}

.risk-median-line {
  stroke: #111;
  stroke-dasharray: 5 5;
  stroke-width: 1.4;
}

.trinity-title {
  fill: #49638f;
  font-size: 20px;
  font-weight: 760;
}

.trinity-subtitle {
  fill: #49638f;
  font-size: 13px;
  font-weight: 620;
}

.trinity-base-line {
  stroke: #111111;
  stroke-dasharray: 2 4;
  stroke-width: 1.2;
}

.trinity-zero-line {
  stroke: #111111;
  stroke-width: 1.2;
}

.trinity-annotation text {
  fill: #111111;
  font-size: 10px;
}

.trinity-note {
  fill: #111111;
  font-size: 15px;
}

.trinity-x-label,
.trinity-y-label {
  fill: #111111;
  font-size: 13px;
}

.trinity-point {
  fill: #111111;
  stroke: #111111;
  stroke-width: 1;
}

.trinity-point.hit-point {
  fill: #111111;
  stroke: #111111;
  stroke-width: 1;
}

.baseline-line {
  stroke: #7e8581;
  stroke-dasharray: 2 3;
  stroke-width: 1.2;
}

.line-end-label {
  direction: rtl;
  dominant-baseline: middle;
  font-size: 13px;
  font-weight: 850;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-linejoin: round;
  stroke-width: 4px;
}

.facet-strip {
  fill: #050505;
}

.facet-strip-text {
  fill: #ffffff;
  font-size: 14px;
}

.facet-end-label {
  dominant-baseline: middle;
  font-size: 10px;
  font-weight: 850;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-linejoin: round;
  stroke-width: 3px;
  white-space: pre-line;
}

.facet-legend {
  justify-content: center;
}

.rolling-title {
  fill: #385f9f;
  font-size: 24px;
  font-weight: 500;
}

.rolling-strip {
  fill: #050505;
}

.rolling-strip-text {
  fill: #ffffff;
  font-size: 14px;
  font-weight: 760;
}

.rolling-bar {
  fill: #415d94;
}

.rolling-bar:hover {
  fill: #2d497e;
}

.portfolio-cagr-title {
  fill: #385f9f;
  font-size: 28px;
  font-weight: 520;
}

.portfolio-zero-line {
  stroke: #111;
  stroke-dasharray: 2 3;
  stroke-width: 1.5;
}

.portfolio-cagr-bar {
  stroke: none;
}

.portfolio-cagr-bar:hover {
  filter: brightness(.88);
}

.portfolio-cagr-line {
  paint-order: stroke;
  stroke-linejoin: round;
}

.portfolio-cagr-point {
  stroke: #ffffff;
  stroke-width: 1.2;
}

.portfolio-y-label {
  fill: #111;
  font-size: 18px;
  font-weight: 800;
}

.lazy-scatter-title {
  fill: #385f9f;
  font-size: 24px;
  font-weight: 520;
}

.lazy-scatter-subtitle {
  fill: #385f9f;
  font-size: 16px;
  font-weight: 620;
}

.lazy-axis-title {
  fill: #111;
  font-size: 15px;
  font-weight: 800;
}

.lazy-scatter-point {
  fill: #5a5f93;
  fill-opacity: .78;
  stroke: #ffffff;
  stroke-width: 1.2;
}

.lazy-scatter-point.highlighted {
  fill: orange;
  fill-opacity: .95;
}

.lazy-scatter-label,
.lazy-time-end-label {
  dominant-baseline: middle;
  font-size: 11px;
  font-weight: 800;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-linejoin: round;
  stroke-width: 4px;
}

.lazy-scatter-label.highlighted {
  fill: #d87900;
}

.lazy-time-line {
  paint-order: stroke;
  stroke-linejoin: round;
}

.lazy-box {
  fill-opacity: .78;
  stroke: #222;
  stroke-width: 1;
}

.lazy-highlight-bar {
  fill: #49638f;
}

.lazy-highlight-bar:hover,
.lazy-box:hover {
  filter: brightness(.9);
}

.kupat-title {
  fill: #49638f;
  font-size: 22px;
  font-weight: 820;
}

.kupat-subtitle,
.kupat-note {
  fill: #2f4f88;
  font-size: 13px;
}

.age-60-line {
  stroke: #565f5b;
  stroke-dasharray: 2 3;
  stroke-width: 1.2;
}

.kupat-inline-label,
.kupat-end-label {
  dominant-baseline: middle;
  font-size: 14px;
  font-weight: 850;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-linejoin: round;
  stroke-width: 4px;
  unicode-bidi: plaintext;
}

.kupat-legend {
  justify-content: flex-end;
}

.chart-help {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.chart-reading {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  margin: 10px auto 0;
  max-width: 1180px;
  padding: 12px 14px;
  width: 100%;
}

.chart:has(svg.tax-chart-svg) .chart-reading {
  max-width: 1175px;
}

.chart:has(svg.faceted-chart-svg) .chart-reading {
  max-width: 1325px;
}

.chart:has(svg.kupat-chart-svg) .chart-reading {
  max-width: 1788px;
}

.chart:has(svg.risk-chart-svg) .chart-reading {
  max-width: 1373px;
}

.chart:has(svg.trinity-chart-svg) .chart-reading {
  max-width: 1152px;
}

.chart:has(svg.rolling-bars-svg) .chart-reading,
.chart:has(svg.portfolio-cagr-svg) .chart-reading {
  max-width: 1356px;
}

.chart:has(svg.lazy-scatter-svg) .chart-reading {
  max-width: 1213px;
}

.chart:has(svg.lazy-time-svg) .chart-reading {
  max-width: 1293px;
}

.chart:has(svg.heatmap-svg) .chart-reading {
  max-width: 1500px;
}

.chart-reading h4 {
  font-size: 14px;
  font-weight: 850;
  margin: 0 0 6px;
}

.chart-reading p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 8px;
}

.chart-reading ul {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  padding-inline-start: 20px;
}

.chart-reading li + li {
  margin-top: 4px;
}

.chart-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-top: 8px;
}

.chart-actions button {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  min-height: 30px;
  padding: 0 10px;
}

.legend button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  gap: 5px;
  padding: 0;
}

.legend button[aria-pressed="false"] {
  opacity: .45;
}

.plot-area {
  cursor: crosshair;
  pointer-events: all;
}

.zoom-box {
  fill: rgba(20, 95, 89, .12);
  pointer-events: none;
  stroke: var(--accent);
  stroke-dasharray: 4 3;
}

.hit-point {
  cursor: default;
  fill: transparent;
  pointer-events: all;
  stroke: transparent;
}

.hit-bar,
.heatmap-cell[data-tooltip] {
  cursor: default;
}

.hit-point:hover {
  fill: rgba(20, 95, 89, .2);
  stroke: var(--accent);
}

.chart-tooltip {
  background: rgba(23, 32, 29, .94);
  border-radius: 6px;
  color: white;
  direction: rtl;
  display: none;
  font-size: 12px;
  line-height: 1.45;
  max-width: 280px;
  padding: 8px 9px;
  pointer-events: none;
  position: fixed;
  text-align: right;
  unicode-bidi: plaintext;
  white-space: pre-line;
  z-index: 10;
}

.chart-tooltip.visible {
  display: block;
}

.chart-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  min-height: 300px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
}

.legend span {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  gap: 5px;
}

.swatch {
  border-radius: 2px;
  height: 10px;
  width: 10px;
}

.table-title {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}

.table-wrap {
  max-height: 540px;
  overflow: auto;
}

table {
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 7px 9px;
  text-align: right;
  white-space: nowrap;
}

thead th {
  background: #fbfcfa;
  color: var(--muted);
  font-weight: 820;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:hover {
  background: #f8faf6;
}

.heatmap-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(var(--cols), minmax(18px, 1fr));
  min-width: 620px;
}

.heatmap-cell {
  align-items: center;
  color: #11201d;
  display: flex;
  font-size: 10px;
  justify-content: center;
  min-height: 21px;
  padding: 2px;
}

.heatmap-label {
  background: var(--panel-soft);
  color: var(--muted);
  font-weight: 780;
}

.heatmap-chart {
  overflow-x: auto;
  padding: 4px 0 2px;
}

.heatmap-chart svg {
  display: block;
  margin: 0 auto;
  max-width: none;
  min-width: 1320px;
  width: 1500px;
}

.chart svg.heatmap-svg {
  height: 774px;
  max-height: none;
  max-width: none;
  min-width: 1320px;
  width: 1500px;
}

.heatmap-title {
  color: #385f9f;
  direction: ltr;
  font-size: 28px;
  font-weight: 520;
  line-height: 1.2;
  margin: 0 0 2px;
  text-align: center;
}

.heatmap-subtitle {
  color: #0b55b8;
  direction: rtl;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.45;
  margin: 0 auto -2px;
  max-width: 980px;
  text-align: center;
}

.heatmap-chart .chart-caption {
  direction: rtl;
  display: block;
  font-size: 12px;
  line-height: 1.45;
  margin: -10px auto 0;
  max-width: 1040px;
  text-align: center;
}

.heatmap-tile {
  cursor: default;
  shape-rendering: crispEdges;
}

.heatmap-tile:hover {
  stroke: #17201d;
  stroke-width: 1.4;
}

.heatmap-grid-line {
  stroke: rgba(74, 85, 80, .13);
  stroke-width: 1;
}

.heatmap-axis-text,
.heatmap-legend-title {
  fill: #1e2925;
  font-size: 14px;
}

.heatmap-axis-title {
  fill: #111;
  font-size: 18px;
  font-weight: 820;
}

.heatmap-legend-title {
  direction: rtl;
  font-size: 14px;
  white-space: pre-line;
}

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 245px;
  }

  .field,
  .field.wide {
    grid-column: span 3;
  }

  .field.xwide,
  .portfolio-picker,
  .fee-matrix,
  .date-range-control,
  .trinity-draw-summary {
    grid-column: span 6;
  }

  .panel-controls {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .lazy-controls {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .lazy-time-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: 10px 14px;
  }

  .toolbar {
    width: 100%;
  }

  h1 {
    font-size: 20px;
    line-height: 1.2;
  }

  h2 {
    font-size: 22px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-bottom: 1px solid var(--line);
    border-left: 0;
    grid-column: auto;
    grid-row: auto;
  }

  .workspace {
    grid-column: auto;
    grid-row: auto;
    gap: 16px;
    padding: 20px 16px 36px;
  }

  .nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 14px;
    position: static;
    scroll-padding-inline: 14px;
  }

  .nav-group {
    flex: 0 0 210px;
    min-width: 0;
  }

  .view-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .controls {
    gap: 12px;
    padding: 12px;
  }

  .story-panel {
    grid-template-columns: 1fr;
  }

  .story-image {
    width: 100%;
  }

  .field,
  .field.wide,
  .field.xwide,
  .portfolio-picker,
  .fee-matrix,
  .date-range-control {
    grid-column: span 6;
  }

  .fee-grid {
    grid-template-columns: minmax(112px, 1fr) repeat(2, minmax(82px, 1fr));
  }

  .chart-panel {
    padding: 10px;
  }

  .chart-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .chart-actions button {
    align-self: flex-start;
  }

  .panel-controls {
    grid-template-columns: 1fr;
  }

  .lazy-controls {
    grid-template-columns: 1fr;
  }

  .lazy-time-mode div {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding-inline: 12px;
  }

  .workspace {
    padding: 18px 12px 32px;
  }

  .story-copy {
    gap: 10px;
  }

  .story-copy h3 {
    font-size: 20px;
  }

  .story-copy h4,
  .story-copy h4.story-intro-subheading {
    font-size: 18px;
    margin-top: 16px;
  }

  .story-copy p,
  .story-copy li {
    font-size: 16px;
    line-height: 1.65;
  }

  .field,
  .field.wide,
  .field.xwide,
  .field.run-field,
  .portfolio-picker,
  .fee-matrix,
  .date-range-control,
  .controls[data-view="trinity"] .field,
  .controls[data-view="trinity"] .field.wide,
  .controls[data-view="commission-drag"] .date-range-control,
  .controls[data-view="commission-drag"] .field.wide,
  .controls[data-view="commission-drag"] .field.checkbox,
  .controls[data-view="independent"] .date-range-control,
  .controls[data-view="independent"] .field.wide,
  .controls[data-view="independent"] .field {
    flex-basis: 100%;
  }

  .metric,
  .panel-metrics .metric {
    flex-basis: 100%;
    max-width: none;
    min-width: 0;
  }

  .date-range-summary {
    flex-wrap: wrap;
  }

  .date-range-thumb-labels span {
    font-size: 11px;
    min-width: 48px;
  }

  .portfolio-options {
    grid-template-columns: 1fr;
  }

  .panel-picker[open] .panel-picker-menu {
    box-shadow: none;
    left: auto;
    margin-top: 4px;
    max-height: 260px;
    position: static;
    top: auto;
  }

  .skeleton-chart {
    gap: 12px;
    min-height: 250px;
    padding: 2px;
  }

  .skeleton-plot {
    min-height: 220px;
  }

  .skeleton-table {
    padding-inline: 8px;
  }

  .skeleton-table-row {
    gap: 10px;
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .skeleton-table-row .skeleton-line:nth-child(4) {
    display: none;
  }

  .table-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-tooltip {
    max-width: calc(100vw - 24px);
  }
}
