/* Shared type scale for the panel. The replay simulator keeps its own type scale. */
.experience-brand {
  --panel-caption: .875rem;
  --panel-label: .9375rem;
  --panel-body: 1rem;
  --panel-subtitle: 1.125rem;
  --panel-section: clamp(1.25rem, 1.1rem + .35vw, 1.4375rem);
  --panel-title: clamp(1.5rem, 1.25rem + .9vw, 2.125rem);
  --panel-number: clamp(1.75rem, 1.5rem + .9vw, 2.5rem);
  --panel-gutter: clamp(.75rem, 2vw, 2.25rem);
  --panel-card-padding: clamp(.875rem, 1.8vw, 1.5rem);
}

.experience-brand :is(.manager-shell, #dialog, .report-help-popup, .report-handle-menu, .persian-date-popover, #manager-toast) {
  font-size: var(--panel-body);
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

/* Reset old component sizes before applying the roles below. */
.experience-brand :is(#main, #manager-sidebar, #manager-account, .manager-header, #dialog, .report-help-popup, .persian-date-popover)
  :where(*):not(:where(svg, svg *, .recorded-surface, .recorded-surface *)) {
  font-size: inherit;
}
.experience-brand :is(#main, #manager-sidebar, #manager-account, .manager-header, #dialog, .report-help-popup, .persian-date-popover)
  :where(small, time, .note, .card-heading p, .breadcrumb, .eyebrow, .metric-note, .study-chip, .sidebar-credit,
    .chart-legend, .decision-legend, .dataset-chip, .priority, .pagination, .brief-tags, .brief-count,
    .kpi small, .calm-caption, .form-error, .table-note, .summary-limit, .rg-hint, .rg-legend,
    .access-chip, .outcome-ease-legend, .brief-savebar > div, #live-status, .manager-account-name small) {
  font-size: var(--panel-caption);
}
.experience-brand :is(#main, #manager-sidebar, #manager-account, .manager-header, #dialog, .persian-date-popover)
  :where(label, button, .secondary, .primary, .sidebar-action, .report-section-nav a, .decision-link,
    .metric-label, .study-card-stats, .kpi > span, .study-availability, .manager-page-title, table):not(:where(.recorded-surface *)) {
  font-size: var(--panel-label);
}
.experience-brand :is(#main, #dialog, .persian-date-popover)
  :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]), select, textarea):not(:where(.recorded-surface *)) {
  font-size: var(--panel-body);
}
.experience-brand :is(#main, #dialog)
  :where(h1, h2, h3, h4):not(:where(.recorded-surface *)) {
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.experience-brand #main :where(h1) { font-size: var(--panel-title); }
.experience-brand :is(#main, #dialog) :where(h2) { font-size: var(--panel-section); }
.experience-brand :is(#main, #dialog) :where(h3, h4) { font-size: var(--panel-subtitle); }
.experience-brand #main :where(.decision-metric > strong, .kpi > strong, .stopwatch-reading strong, .rv-metrics strong) {
  font-size: var(--panel-number);
  line-height: 1.35;
}
.experience-brand #main :where(.decision-metric > .metric-word, .study-card-stats strong,
  .outcome-ease-value strong, .decision-two-numbers strong, .signal-grid b, .decision-quality-summary strong) {
  font-size: var(--panel-section);
}
.experience-brand #main :where(.decision-metric > strong small, .kpi > strong em, .rv-metrics strong small) {
  font-size: var(--panel-caption);
}
.experience-brand :is(#main, #dialog) :where(.pagination button, .quality-flag, .small-sample, .review-actions .plain, .finding summary) {
  font-size: var(--panel-caption) !important; /* Overrides fixed sizes in the original manager sheet. */
}
.experience-brand #main :where(.report-filters select, .report-filters input) {
  font-size: var(--panel-body) !important;
}
.experience-brand #main #live-status { font-size: var(--panel-caption); }
.experience-brand #main #toggle-filters { font-size: var(--panel-label); }
.experience-brand #main #calm-filter-state { font-size: var(--panel-caption); }

.experience-brand #main .report-page-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-block-end: 8px;
}
.experience-brand #main .report-page-heading #executive {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.experience-brand #main .report-statusbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-block-end: 12px;
  padding: 0 4px 6px;
  border-block-end: 1px solid var(--panel-border);
  color: var(--panel-muted);
}
.experience-brand #main .report-status-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
  font-size: var(--panel-caption);
}
.experience-brand #main .report-public-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #255e55;
}
.experience-brand #main .report-public-status.is-closed { color: #8b421d; }
.experience-brand #main .report-header-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  border: 0;
  padding: 0 4px;
  background: transparent;
  color: var(--identity-action);
  cursor: pointer;
}
.experience-brand #main .report-header-action:not(:disabled):hover { text-decoration: underline; }
.experience-brand #main .report-header-action:disabled { cursor: wait; opacity: .55; }
.experience-brand #main .report-statusbar svg { width: 16px; height: 16px; }
.experience-brand #main .report-statusbar .availability-error { flex-basis: 100%; margin: 0 0 6px; }

@media (max-width: 700px) {
  .experience-brand #main .report-page-heading { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .experience-brand #main .report-statusbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
  .experience-brand #main .report-status-group { justify-content: space-between; }
}
@media print {
  .report-statusbar { display: none !important; }
}
.experience-brand :is(.report-help-popup, .persian-date-popover) {
  font-size: var(--panel-caption);
}

.experience-brand .workspace-shell { --workspace-sidebar-width: 15rem; }
.experience-brand .workspace-shell.sidebar-collapsed { --workspace-sidebar-width: 4.5rem; }
.experience-brand .workspace-shell :is(.manager-header, #main) { padding-inline: var(--panel-gutter); }
.experience-brand .workspace-shell .manager-header { height: auto; min-height: 4.5rem; }
.experience-brand .workspace-shell #main { padding-block-start: clamp(1rem, 2.2vw, 2rem); }
.experience-brand .manager-shell :is(.page-heading, .card-heading, .page-actions, .study-card-meta,
  .decision-section-title, .brief-heading, .rg-chart-title, .study-card-actions, .calm-tools, .export-actions) {
  flex-wrap: wrap;
}
.experience-brand .manager-shell :is(.page-heading, .card-heading) > div { min-width: 0; }
.experience-brand #main :where(.decision-metric, .kpi, .study-card, .chart-card, .report-block-frame,
  .study-search label, .rg-controls label, .rv-metrics article, .method-card dd) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.experience-brand #main :where(.chart-card, .study-card, .executive-summary) { padding: var(--panel-card-padding); }
.experience-brand #main :where(.report-two-col, .overview-charts, .decision-grid, .study-list,
  .report-summary-grid, .executive-recognition-grid) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr));
}
.experience-brand #main :where(.calm-metrics, .kpi-grid, .rv-metrics, .signal-grid) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.75rem), 1fr));
}
.experience-brand #main .decision-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.experience-brand #main :where(.decision-reason-grid, .decision-approved .calm-approved-list) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.experience-brand #main :where(.report-filters, .study-search, .quality-rule-fields) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}
.experience-brand #main :where(.study-search, .report-filters) :is(input, select) {
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
}
.experience-brand #main .report-filters .persian-date-control input { block-size: auto; }
.experience-brand #main :where(.report-section-nav a, .calm-tools button, .study-card-actions a,
  .study-availability, .report-search-field, .pagination button, .chart-download, .report-help-trigger),
.experience-brand :is(.manager-header, .manager-sidebar, #dialog) :where(.sidebar-toggle, .manager-account-menu button, #close) {
  min-height: 44px;
}
.experience-brand #main :where(.chart-download, .report-help-trigger),
.experience-brand :is(.manager-header, .manager-sidebar, #dialog) :where(.sidebar-toggle, #close) { min-width: 44px; }
.experience-brand #main .report-section-nav a { white-space: normal; }
.experience-brand #main .report-layout { grid-template-columns: 12rem minmax(0, 1fr); gap: clamp(.875rem, 1.6vw, 1.5rem); }
.experience-brand #main .report-section-custom-title { font-size: var(--panel-section); }
.experience-brand #main :where(.table-scroll, .rg-table-scroll, .rv-svg, .rg-time, .rg-flow),
.experience-brand #dialog .table-scroll {
  max-inline-size: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.experience-brand :is(#main, #dialog) .table-scroll:has(th:nth-child(5)) table { min-width: 42rem; }
.experience-brand #main :where(.rv-svg, .rg-time, .rg-flow) svg {
  min-inline-size: var(--chart-width, 720px);
  max-height: none;
}
.experience-brand #main :where(.rv-svg, .rg-time, .rg-flow) svg text {
  font-size: 14px;
}
.experience-brand #main .rv-histogram { grid-template-columns: minmax(0, 1fr); }
.experience-brand #main :where(.study-card-stats, .response-controls, .stat-strip,
  .decision-two-numbers, .rg-bar-options label, .pagination, .review-actions) { flex-wrap: wrap; }
.experience-brand #main :where(.rg-bar-options label, .page-actions .study-availability) { white-space: normal; }
.experience-brand #main .rg-bar-options select { min-width: 0; max-width: 100%; }
.experience-brand #main .panel-chart-list { display: grid; gap: .875rem; margin: 1rem 0; padding: 0; list-style: none; }
.experience-brand #main .panel-chart-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; }
.experience-brand #main .panel-chart-track { background: #edf3f7; block-size: .625rem; border-radius: .4rem; margin-block-start: .35rem; overflow: hidden; }
.experience-brand #main .panel-chart-track i { display: block; block-size: 100%; border-radius: inherit; }
.experience-brand #main .panel-chart-note { display: block; color: var(--panel-muted); }
.experience-brand #main .panel-rating { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .375rem; direction: ltr; margin-block: 1rem; text-align: center; }
.experience-brand #main .panel-rating-bar { height: 6rem; display: flex; align-items: end; justify-content: center; background: #edf3f7; border-radius: .4rem; overflow: hidden; }
.experience-brand #main .panel-rating-bar i { width: 100%; background: #007eb6; }
.experience-brand #main .panel-rating-key { display: flex; justify-content: space-between; gap: .75rem; direction: ltr; }
.experience-brand #main .panel-rating-key span { direction: rtl; }
.experience-brand #main .panel-ring { display: grid; place-items: center; width: 9rem; aspect-ratio: 1; margin: 1rem auto; border-radius: 50%; }
.experience-brand #main .panel-ring > div { display: grid; place-content: center; width: 72%; aspect-ratio: 1; border-radius: 50%; background: white; text-align: center; }
.experience-brand #main .panel-ring strong { font-size: var(--panel-number); line-height: 1.2; }
.experience-brand #main .panel-chart-dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; margin-inline-end: .375rem; }
.experience-brand #main .panel-timeline { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .375rem .5rem; direction: ltr; margin-block: 1rem; }
.experience-brand #main .panel-timeline-axis { display: flex; flex-direction: column; justify-content: space-between; text-align: end; }
.experience-brand #main .panel-timeline-plot { display: block; width: 100%; height: 9rem; stroke: none; overflow: visible; }
.experience-brand #main .panel-timeline-dates { grid-column: 2; display: flex; justify-content: space-between; gap: .25rem; }
.experience-brand #main .panel-timeline-dates small { white-space: nowrap; }
.experience-brand #main .touch-map-visual .touch-map-badge {
  position: absolute; transform: translate(-50%, -50%); padding: .1rem .3rem;
  border: 1px solid white; border-radius: 1rem; color: white; background: var(--touch-fill);
  font-size: var(--panel-caption); font-weight: 700; line-height: 1.45; pointer-events: none;
}

@media screen and (max-width: 1279px) {
  .experience-brand #main .report-layout { grid-template-columns: minmax(0, 1fr); }
  .experience-brand #main .report-section-nav { position: static; max-height: none; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
}
@media screen and (max-width: 1024px) {
  .experience-brand .workspace-shell :is(.manager-header, #main) { margin-inline-start: 0; }
  .experience-brand .workspace-shell .manager-header { min-height: 4rem; }
  .experience-brand #main .report-section-grip { inset-inline-end: 0; }
}
@media screen and (max-width: 700px) {
  .experience-brand #main .decision-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 560px) {
  .experience-brand #main :where(.report-discovery, .report-filters, .study-search, .method-card dl) {
    grid-template-columns: minmax(0, 1fr);
  }
  .experience-brand #main .report-section-nav:not(.report-nav-sorting) {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: #b7d3e3 transparent;
  }
  .experience-brand #main .report-section-nav:not(.report-nav-sorting) a { flex: none; }
  .experience-brand #main .report-section-nav.report-nav-sorting { grid-template-columns: minmax(0, 1fr); }
  .experience-brand #main .calm-tools { width: 100%; }
  .experience-brand #main .calm-tools #toggle-filters { flex: 1; white-space: normal; }
  .experience-brand #main .report-layout #report-content > [data-panel] + [data-panel] { margin-top: 1.5rem; padding-top: 1.25rem; }
  .experience-brand #main .touch-map-list dd { flex-wrap: wrap; justify-content: end; }
  .experience-brand #main :where(.brief-read-title, .brief-question-settings, .brief-add) { flex-wrap: wrap; }
  .experience-brand #main .brief-add .brief-field { flex-basis: 100%; }
  .experience-brand #main .brief-add button { width: 100%; }
  .experience-brand #dialog { max-inline-size: calc(100vw - 1rem); max-block-size: calc(100dvh - 1rem); }
}
@media screen and (max-width: 374px) {
  .experience-brand #main .decision-metrics { grid-template-columns: minmax(0, 1fr); }
}

/* Visual cues are tied to the measure or outcome, with the label kept alongside. */
.experience-brand .manager-shell .report-mark {
  --report-mark-bg: #e8f5fb;
  --report-mark-ink: #00729c;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  inline-size: 1.875rem;
  block-size: 1.875rem;
  border-radius: .55rem;
  background: var(--report-mark-bg);
  color: var(--report-mark-ink);
  vertical-align: middle;
}
.experience-brand .manager-shell .report-mark[data-mark-tone="warm"] {
  --report-mark-bg: #fff1e8;
  --report-mark-ink: #9b441f;
}
.experience-brand .manager-shell .report-mark[data-mark-tone="slate"] {
  --report-mark-bg: #edf2f6;
  --report-mark-ink: #486379;
}
.experience-brand .manager-shell .report-mark svg {
  width: 1.125rem;
  height: 1.125rem;
  padding: 0;
  color: inherit;
  background: none;
  border-radius: 0;
}
.experience-brand #main :is(.kpi, .decision-metric) {
  isolation: isolate;
  overflow: clip;
}
.experience-brand #main .kpi {
  gap: 9px;
}
.experience-brand #main .kpi > :is(.metric-label, small) {
  margin: 0;
}
.experience-brand #main .kpi > .metric-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #496478;
  text-align: start;
}
.experience-brand #main .report-block-frame > .kpi { height: 100%; }
.experience-brand #main :is(.kpi, .decision-metric) > strong:not(.metric-word) {
  font-size: clamp(2rem, 1.6rem + 1.35vw, 2.625rem);
  letter-spacing: normal;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .experience-brand #main :is(.kpi, .decision-metric) .metric-label > .report-mark {
    position: relative;
  }
  .experience-brand #main :is(.kpi, .decision-metric) .metric-label > .report-mark::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, var(--report-mark-bg) 24%, transparent 71%);
    opacity: 0;
    transform: scale(1);
    transition: transform 580ms cubic-bezier(.2, .7, .3, 1), opacity 460ms ease;
    pointer-events: none;
  }
  .experience-brand #main :is(.kpi, .decision-metric):hover .metric-label > .report-mark::before {
    opacity: .9;
    transform: scale(29);
  }
  .experience-brand #main .decision-metric:hover { background: white; }
}
.experience-brand #main :where(.report-mark-heading, .report-label-line) {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}
.experience-brand .manager-shell .report-mark-heading .report-mark {
  inline-size: 2.125rem;
  block-size: 2.125rem;
}
.experience-brand .manager-shell :is(.decision-legend, .report-series-row, .panel-rating-key) .report-mark {
  inline-size: 1.5rem;
  block-size: 1.5rem;
}
.experience-brand .manager-shell :is(.decision-legend, .report-series-row, .panel-rating-key) .report-mark svg {
  width: .9375rem;
  height: .9375rem;
}
.experience-brand #main .report-rate-track {
  display: block;
  height: .3125rem;
  background: #e5eef4;
  border-radius: 1rem;
  overflow: hidden;
  margin-block-start: auto;
}
.experience-brand #main .report-rate-track i {
  display: block;
  height: 100%;
  background: #007eaf;
  border-radius: inherit;
}
.experience-brand #main .report-series-card { padding-block: .375rem; border-block-end: 1px solid #e6edf2; }
.experience-brand #main .report-series-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .5rem;
  margin-block: .375rem;
  font-variant-numeric: tabular-nums;
}
.experience-brand #main .report-series-row .panel-chart-track { margin: 0; }
.experience-brand #main .report-series-row strong { min-inline-size: 3.25rem; text-align: end; white-space: nowrap; }
.experience-brand #main [data-report-block="quick-outcome"] { align-self: start; }
.experience-brand #main .report-rating-hard .panel-rating-bar i { background: #b9582b; }
.experience-brand #main .report-rating-medium .panel-rating-bar i { background: #607d92; }
.experience-brand #main .outcome-ease-legend > span { align-items: center; }
.experience-brand #main .decision-two-numbers .report-label-line { display: flex; }

@media screen and (max-width: 560px) {
  .experience-brand #main .calm-outcome-key > div { flex-wrap: wrap; }
  .experience-brand #main .panel-rating-key { flex-wrap: wrap; }
  .experience-brand #main .rv-metrics article > .report-label-line { flex-wrap: wrap; }
}
