/* Analytics: compact comparisons first, detailed evidence on drill-down. */
.analytics-page,
.property-analytics,
.audit-analytics {
  font-variant-numeric: tabular-nums;
}
.analytics-page .page-head h1 {
  font-size: 32px;
  letter-spacing: -1.15px;
}
.analytics-page .page-head p {
  font-size: 13px;
  max-width: 620px;
  line-height: 1.65;
}
:is([data-overview-work], [data-overview-actions]) table {
  table-layout: fixed;
  white-space: normal;
}
:is([data-overview-work], [data-overview-actions]) td {
  padding: 17px 22px;
}
:is([data-overview-work], [data-overview-actions]) td:first-child {
  overflow-wrap: anywhere;
}
:is([data-overview-work], [data-overview-actions]) td:last-child {
  width: 144px;
  padding-left: 12px;
  text-align: right;
  white-space: nowrap;
}
:is([data-overview-work], [data-overview-actions]) td .button {
  width: 110px;
  min-height: 44px;
}
.queue-more > summary {
  padding: 16px 22px;
  border-top: 1px solid #edf0e9;
  font-size: 12px;
  cursor: pointer;
  color: #365f51;
}
.urgent-work {
  margin-bottom: 22px;
  border-color: #e9cec5;
  background: #fffaf7;
}
.urgent-work .visual-overline {
  color: #a14e3e;
}
.urgent-work-list {
  margin-top: 14px;
}
.urgent-work-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid #ecdcd5;
  color: inherit;
}
.urgent-work-item > div {
  min-width: 0;
}
.urgent-work-item p,
.queue-issue {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.urgent-work-item p {
  font-size: 13px;
  margin: 5px 0;
}
.urgent-work-item small {
  color: #7d655b;
}
.daily-work {
  margin-bottom: 22px;
}
.missing-assignments {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}
.missing-assignments p {
  margin: 5px 0 0;
}
.daily-work h2,
.urgent-work h2,
.overview-ratings h2 {
  margin: 0;
  font-size: 18px;
}
.daily-work > .visual-panel-head > small {
  color: #71816e;
}
.daily-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 15px;
}
/* Admin with student feedback has five tiles. */
@media (min-width: 1101px) {
  .daily-metrics:has(> :nth-child(5)) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.daily-metric {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  text-align: left;
  padding: 18px;
  border-radius: 12px;
}
.daily-metric > span {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: #52675a;
}
.daily-metric strong {
  font-size: 32px;
  font-weight: 600;
  margin: 12px 0 6px;
}
.daily-metric small {
  color: #71816e;
  font-size: 11px;
  font-weight: 400;
  margin-top: auto;
  line-height: 1.6;
}
.overview-work-queues {
  margin-bottom: 22px;
  align-items: start;
}
.overview-work-queues .card-head > div,
.overview-work-queues .card-head h2 {
  min-width: 0;
}
.overview-work-queues .card-head > button {
  flex-shrink: 0;
}
.overview-work-queues .card-head small {
  display: block;
  margin-top: 5px;
}
.overview-work-queues .card-head h2 {
  font-size: 16px;
}
.overview-ratings {
  margin-top: 22px;
}
.overview-rating-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 12px;
  gap: 18px;
}
.overview-rating-values > div > span:first-child {
  display: block;
  color: #71816e;
  font-size: 12px;
}
.overview-rating-values .stat-value {
  font-size: 30px;
  margin: 7px 0;
  display: block;
}
.audit-filters select {
  max-width: 100%;
}
.staff-only-property .property-rating-cards,
.staff-only-property .property-category-grid {
  grid-template-columns: minmax(0, 1fr);
}
.staff-only-property .stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.analytics-view-nav {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid #dfe6d9;
  margin: -4px 0 20px;
}
.analytics-view-nav a {
  padding: 11px 15px;
  color: #7b8874;
  border-bottom: 2px solid transparent;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.analytics-view-nav a:hover {
  text-decoration: none;
  color: #365f51;
}
.analytics-view-nav a.is-active {
  border-color: #365f51;
  color: #294d3a;
}
.monthly-trend-panel {
  margin-bottom: 22px;
}
.monthly-trend-svg {
  display: block;
  width: 100%;
  height: 220px;
  margin-top: 14px;
}
.trend-grid {
  stroke: #e9eee4;
  stroke-width: 1;
}
.trend-axis {
  fill: #819078;
  font:
    12px Inter,
    sans-serif;
}
.trend-value {
  fill: #365f51;
  font:
    600 14px Inter,
    sans-serif;
}
.trend-line {
  fill: none;
  stroke: #668d6b;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trend-dot {
  fill: #365f51;
  stroke: #fff;
  stroke-width: 2;
}
.trend-missing {
  fill: #a4afa0;
  font:
    13px Inter,
    sans-serif;
}
.report-category-details {
  margin: 0 0 22px;
  padding: 0 18px;
  background: #fff;
}
.report-category-details td,
.report-category-details th {
  font-size: 11px;
}
.report-category-details td small {
  display: block;
  font-size: 10px;
}
.report-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  padding: 14px 16px;
  margin: 0 0 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.report-filter {
  min-width: 140px;
}
.report-filter:first-child {
  min-width: 215px;
}
.report-filter label {
  font-size: 11px;
  color: #71816e;
  margin-bottom: 5px;
}
.report-filter input,
.report-filter select {
  background-color: #f4f6f2;
  border-color: transparent;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 12px;
}
.compare-scope {
  font-size: 11px;
  min-height: 44px;
  padding: 9px 12px;
}
.compare-scope .icon {
  width: 15px;
  height: 15px;
}
.report-period-state {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
}
.report-period-state .tag {
  white-space: nowrap;
}
.report-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -5px 0 20px;
  padding: 11px 14px;
  color: #576d5d;
  background: #eaf0e7;
  border-radius: 8px;
  font-size: 11px;
}
.report-setup-notice {
  margin-bottom: 20px;
}
.portfolio-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.portfolio-kpi {
  min-height: 159px;
  padding: 20px;
  border: 1px solid #e0e6df;
  border-radius: 13px;
  background: #fff;
}
.portfolio-kpi-primary {
  background: #224b3d;
  color: #fff;
  border-color: #224b3d;
}
.kpi-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #6d7b71;
  font-size: 11px;
}
.kpi-caption .icon {
  width: 16px;
  height: 16px;
  opacity: 0.75;
}
.portfolio-kpi-primary .kpi-caption {
  color: #c9dbca;
}
.kpi-number {
  font-size: 38px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -1.5px;
  margin: 17px 0 8px;
}
.kpi-number > span {
  font-size: 13px;
  letter-spacing: 0;
  color: #71816e;
  font-weight: 400;
  margin-left: 5px;
}
.portfolio-kpi-primary .kpi-number > span {
  color: #b4cbb7;
}
.kpi-number.negative {
  color: #ae584a;
}
.kpi-foot {
  color: #7a867c;
  font-size: 11px;
  line-height: 1.6;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.portfolio-kpi-primary .kpi-foot {
  color: #d2e2d0;
}
.partial-chip {
  font-size: 11px;
  padding: 1px 6px;
  border: 1px solid #b8d1ac52;
  border-radius: 4px;
  color: #deedcc;
}
.kpi-scale,
.kpi-progress {
  margin-top: 12px;
  height: 4px;
  border-radius: 5px;
  overflow: hidden;
  background: #edf1e9;
}
.kpi-scale {
  background: #ffffff1a;
}
.kpi-scale span,
.kpi-progress span {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: #adc985;
}
.kpi-progress span {
  background: #6f9678;
}
.kpi-note {
  font-size: 11px;
  color: #9aa39a;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}
.live-indicator {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #7f9c7b;
  border-radius: 50%;
}
.portfolio-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 22px;
}
.visual-panel {
  padding: 22px;
  border-color: #e0e6df;
  border-radius: 13px;
}
.visual-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.visual-overline {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #71816e;
  margin: 0 0 5px;
}
.visual-panel h2 {
  font-size: 17px;
  letter-spacing: -0.35px;
  margin: 0;
}
.visual-subtitle {
  font-size: 11px;
  color: #71816e;
  margin: 12px 0 18px;
  line-height: 1.7;
}
.audit-type-panel {
  margin-bottom: 22px;
}
.audit-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.audit-type-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #e0e6df;
  border-radius: 10px;
  background: #f7f9f5;
  display: flex;
  flex-direction: column;
}
.audit-type-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #365f51;
}
.audit-type-title h3 {
  margin: 0;
  font-size: 14px;
}
.audit-type-title .icon {
  width: 19px;
  height: 19px;
}
.audit-type-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 13px;
}
.audit-type-count strong {
  font-size: 36px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -1px;
}
.audit-type-count span,
.audit-type-description,
.audit-type-scheduled {
  color: #637266;
  font-size: 12px;
  line-height: 1.6;
}
.audit-type-description {
  margin: 10px 0 16px;
}
.audit-type-scheduled {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #e0e6df;
}
.segmented-control {
  display: inline-flex;
  padding: 3px;
  gap: 1px;
  background: #f0f3ee;
  border-radius: 8px;
}
.segmented-control button {
  min-height: 29px;
  border: 0;
  border-radius: 6px;
  padding: 5px 9px;
  background: none;
  font-size: 11px;
  color: #829080;
  white-space: nowrap;
}
.segmented-control button.is-active {
  background: #fff;
  box-shadow: 0 1px 4px #203b3210;
  color: #294d38;
  font-weight: 600;
}
.ranking-row,
.ranking-axis {
  display: grid;
  grid-template-columns: 22px minmax(100px, 1.3fr) minmax(70px, 1.7fr) 45px;
  gap: 12px;
  align-items: center;
}
.ranking-row {
  min-height: 61px;
  border-bottom: 1px solid #edf0e9;
  color: var(--ink);
  text-decoration: none;
}
.ranking-row:hover {
  background: #f8faf5;
  text-decoration: none;
}
.ranking-position {
  font-size: 11px;
  color: #71816e;
}
.ranking-name {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ranking-name small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: #71816e;
  margin-top: 3px;
}
.ranking-row > strong {
  font-size: 17px;
  font-weight: 600;
  text-align: right;
  letter-spacing: -0.5px;
}
.ranking-track {
  display: block;
  height: 10px;
  background: repeating-linear-gradient(
    90deg,
    #f0f3ed 0%,
    #f0f3ed calc(20% - 1px),
    #dce4d8 calc(20% - 1px),
    #dce4d8 20%
  );
  border-radius: 4px;
  overflow: hidden;
}
.ranking-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  transition: width 0.2s;
}
.ranking-axis {
  margin-top: 11px;
  font-size: 11px;
  color: #71816e;
}
.ranking-axis > div {
  display: flex;
  justify-content: space-between;
}
.ranking-axis > span:last-child {
  text-align: right;
}
.score-wow {
  background: #365f51;
}
.score-good {
  background: #8eaf95;
}
.score-regular {
  background: #d2ae61;
}
.score-bad {
  background: #ca8878;
}
.score-missing {
  background: #e4eae2;
}
.text-wow {
  color: #2c5c47;
}
.text-good {
  color: #5e8563;
}
.text-regular {
  color: #a17a2f;
}
.text-bad {
  color: #ad6152;
}
.text-missing {
  color: #9aa49a;
}
.live-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #8a9989;
  font-size: 11px;
}
.action-health-body {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  min-height: 236px;
  padding: 22px 0;
}
.status-donut {
  width: 148px;
  height: 148px;
  flex: 0 0 148px;
  border-radius: 50%;
  background: conic-gradient(var(--donut));
  position: relative;
  display: grid;
  place-items: center;
}
.status-donut:before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: #fff;
}
.status-donut > div {
  position: relative;
  text-align: center;
}
.status-donut strong {
  font-size: 31px;
  font-weight: 600;
  letter-spacing: -1px;
  display: block;
  line-height: 1.2;
}
.status-donut > div > span {
  display: block;
  color: #71816e;
  font-size: 11px;
  margin-top: 3px;
}
.status-legend {
  flex: 1 1 165px;
  display: grid;
  gap: 16px;
}
.status-legend > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}
.status-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #778679;
}
.status-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  flex-shrink: 0;
}
.status-legend strong {
  font-size: 13px;
  font-weight: 600;
}
.action-health-footer {
  border-top: 1px solid #e9ede6;
  padding-top: 15px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 11px;
  color: #83907f;
  line-height: 1.7;
}
.action-health-footer strong {
  color: #a76857;
  font-weight: 500;
}
.action-health-footer a {
  white-space: nowrap;
  font-weight: 500;
}
.action-health-footer .icon {
  width: 12px;
  height: 12px;
}
.attention-marker,
.positive-marker {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c38272;
  flex-shrink: 0;
  margin-top: 5px;
}
.positive-marker {
  background: #799b7e;
}
.visual-footnote {
  font-size: 11px;
  color: #5f6d5c;
  margin: 15px 0 0;
  line-height: 1.7;
}
.category-overview,
.coverage-panel {
  margin-bottom: 22px;
}
.category-heatmap {
  border-collapse: separate;
  border-spacing: 7px;
  width: 100%;
  min-width: 620px;
  table-layout: fixed;
}
.category-heatmap th {
  background: none;
  border: 0;
  padding: 9px 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: #7f8b80;
  font-size: 11px;
  vertical-align: bottom;
  white-space: normal;
  text-align: center;
}
.category-heatmap th:first-child {
  width: 155px;
  text-align: left;
}
.category-heatmap tbody th {
  font-size: 11px;
  color: #536959;
  vertical-align: middle;
  line-height: 1.4;
}
.category-heatmap th a {
  display: block;
  color: #6d7d6f;
  padding: 0 4px;
  line-height: 1.5;
}
.category-heatmap td {
  border: 0;
  padding: 0;
}
.heatmap-cell {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 46px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  transition: filter 0.15s;
  border: 1px solid transparent;
}
/* Text band so ratings do not rely on colour alone (#28). */
.heatmap-cell small {
  font-size: 11px;
  font-weight: 500;
}
.heatmap-cell:hover {
  filter: brightness(0.96);
  text-decoration: none;
  outline: 1px solid #456a56;
}
.tone-wow {
  background: #365f51;
  color: #fff;
}
.tone-good {
  background: #d8e8d9;
  color: #35583d;
}
.tone-regular {
  background: #f3e7c9;
  color: #6e4f12;
}
.tone-bad {
  background: #f2dcd5;
  color: #86402f;
}
.tone-missing {
  background: #f1f4ee;
  color: #646e61;
  border-color: #e4e9df;
  border-style: dashed;
}
.heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  border-top: 1px solid #edf0e8;
  padding-top: 15px;
  margin-top: 12px;
  font-size: 11px;
  color: #71816e;
}
.heatmap-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.heatmap-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.coverage-panel .visual-panel-head {
  margin-bottom: 14px;
}
.coverage-month {
  color: #71816e;
  font-size: 11px;
}
.coverage-table {
  min-width: 680px;
}
.coverage-table th {
  font-size: 11px;
  padding: 12px 10px;
  background: #f7f9f4;
  color: #71816e;
  letter-spacing: 0.6px;
}
.coverage-table td {
  padding: 16px 10px;
  font-size: 11px;
}
.coverage-table td > a {
  font-size: 12px;
  font-weight: 500;
}
.coverage-table td > small {
  font-size: 11px;
  color: #71816e;
  margin-top: 4px;
}
.coverage-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #71816e;
}
.coverage-status > i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c7d0c0;
  flex-shrink: 0;
}
.coverage-complete {
  color: #567c57;
}
.coverage-complete > i {
  background: #81a57b;
}
.coverage-review {
  color: #ad8341;
}
.coverage-review > i {
  background: #d6b66b;
}
.coverage-progress {
  color: #7b90a4;
}
.coverage-progress > i {
  background: #9aacbe;
}
.coverage-missed {
  color: #a4493d;
}
.coverage-missed > i {
  background: #c9675a;
}
.mini-coverage {
  display: flex;
  gap: 3px;
  width: 75px;
}
.mini-coverage > i {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: #e9eee2;
}
.mini-coverage > i.done {
  background: #8aac7d;
}
.analytics-method-note {
  color: #71816e;
  font-size: 11px;
  margin: 20px 0 0;
}
.chart-empty {
  padding: 30px 10px;
  text-align: center;
  font-size: 12px;
  color: #71816e;
}
.chart-scroll-hint {
  display: 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;
}
.property-rating-cards .stat-value {
  display: block;
  font-size: 44px;
  font-weight: 600;
  margin: 14px 0 9px;
}
.property-rating-cards .stat-top {
  font-size: 11px;
  font-weight: 500;
}
.property-rating-cards .stat-sub {
  font-size: 11px;
}
.property-rating-overall {
  background: #224b3d;
  border-color: #224b3d;
}
.property-rating-overall .stat-top,
.property-rating-overall .stat-sub {
  color: #c5d6c1;
}
.property-rating-overall .stat-value {
  color: #fff;
}
.property-rating-overall .stat-value small {
  color: #b2c7ae;
}
.property-category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 22px;
}
.category-column {
  min-width: 0;
}
.category-column + .category-column {
  border-left: 1px solid #e7ece1;
  padding-left: 28px;
}
.category-column-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}
.category-column-head h3 {
  font-size: 14px;
  margin: 0 0 2px;
}
.category-column-head > div > span {
  color: #71816e;
  font-size: 11px;
}
.category-audience-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  background: #eef3e9;
  border-radius: 8px;
  color: #7c9a72;
}
.category-audience-icon .icon {
  width: 17px;
  height: 17px;
}
.category-focus {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  background: #f7f8f3;
  border-radius: 6px;
  padding: 9px 10px;
  color: #71816e;
  font-size: 11px;
  margin-bottom: 19px;
}
.category-focus strong {
  color: #708167;
  font-weight: 500;
}
.category-focus > b {
  margin-left: auto;
  font-size: 12px;
}
.category-score-list {
  display: grid;
  gap: 17px;
}
.category-score-row > .row > span {
  font-size: 11px;
  color: #62765c;
}
.category-score-row > .row > strong {
  font-size: 14px;
  font-weight: 600;
}
.category-score-track {
  height: 7px;
  border-radius: 3px;
  background: repeating-linear-gradient(
    90deg,
    #f1f4ed 0%,
    #f1f4ed calc(20% - 1px),
    #e2e9d9 calc(20% - 1px),
    #e2e9d9 20%
  );
  overflow: hidden;
  margin: 7px 0 5px;
}
.category-score-track > span {
  display: block;
  height: 100%;
  border-radius: 3px;
}
.category-score-row > small {
  color: #71816e;
  font-size: 11px;
}
.audit-analytics .analytics-metrics {
  margin-top: 18px;
  gap: 12px;
}
.audit-analytics .analytics-metrics > div {
  background: #f8faf5;
  border-color: #e9ede3;
  border-radius: 8px;
  padding: 16px;
}
.audit-analytics .analytics-metrics strong {
  font-size: 28px;
  letter-spacing: -0.8px;
}
.audit-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.audit-category-grid .audit-category-chart {
  border: 1px solid #e5ebde;
  border-radius: 9px;
  padding: 15px;
}
.audit-category-grid .audit-category-chart a {
  font-size: 12px;
  font-weight: 500;
}
.audit-category-grid .audit-category-chart .answer-bar {
  height: 8px;
  margin: 13px 0 8px;
}
.audit-category-grid .audit-category-chart small {
  font-size: 11px;
}
.audit-category-card-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 10px;
}
.audit-category-card-score strong {
  font-size: 25px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.7px;
}
.audit-category-card-score span {
  color: #71816e;
  font-size: 11px;
}
.audit-summary-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 11px;
  color: #71816e;
  margin-top: 17px;
}
.audit-summary-strip b {
  color: #58704c;
  font-weight: 500;
}
.score-table-details {
  margin-top: 24px;
  border: 1px solid #e4eadc;
  border-radius: 8px;
  padding: 0 15px;
}
.score-table-details > summary {
  padding: 14px 0;
  font-size: 12px;
  color: #5e7650;
}
.score-table-details .analytics-table {
  font-size: 11px;
  margin-bottom: 15px;
}
.score-table-details .analytics-table caption {
  font-size: 13px;
}
.audit-analytics > .form-note {
  font-size: 11px;
  line-height: 1.7;
}
@media (max-width: 1100px) {
  .portfolio-visual-grid {
    grid-template-columns: 1fr;
  }
  .action-health-body {
    min-height: 0;
    justify-content: flex-start;
    gap: 40px;
  }
  .status-legend {
    max-width: 340px;
  }
  .portfolio-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-period-state {
    margin-left: 0;
  }
  .audit-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .staff-only-property .stats {
    grid-template-columns: minmax(0, 1fr);
  }
  .daily-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .daily-metric {
    padding: 14px;
  }
  .daily-metric .icon {
    display: none;
  }
  .overview-rating-values {
    gap: 12px;
  }
  .overview-rating-values .stat-value {
    font-size: 23px;
  }
  .overview-rating-values .stat-value small {
    font-size: 11px;
  }
  .audit-filters select {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }
  :is([data-overview-work], [data-overview-actions]) td {
    padding: 16px;
  }
  :is([data-overview-work], [data-overview-actions]) td:last-child {
    width: 132px;
    padding-left: 6px;
  }
  :is([data-overview-work], [data-overview-actions]) td .button {
    min-height: 44px;
  }
  .audit-type-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .audit-type-card {
    padding: 16px;
  }
  .analytics-view-nav {
    gap: 0;
    min-width: 0;
  }
  .analytics-view-nav a {
    padding: 10px 4px;
    min-height: 44px;
    font-size: 12px;
    flex: 1 1 0;
    min-width: 0;
    white-space: normal;
    text-align: center;
  }
  /* Wide tables scroll sideways; keep the row label in view (#28). */
  .analytics-page .table-wrap :is(th, td):first-child,
  .property-analytics .table-wrap :is(th, td):first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: white;
  }
  .category-heatmap :is(th, td):first-child {
    box-shadow: 0 0 0 7px white; /* hides cells scrolling under the border-spacing */
  }
  .chart-scroll-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0 5px;
    color: #5f6d5c;
    font-size: 11px;
  }
  .chart-scroll-hint .icon {
    width: 13px;
    height: 13px;
  }
  .report-filterbar {
    padding: 12px;
    gap: 10px;
  }
  .report-filter {
    min-width: 0;
    flex: 1 1 130px;
  }
  .report-filter:first-child {
    min-width: 0;
    flex-basis: 100%;
  }
  .report-filter input,
  .report-filter select {
    width: 100%;
    min-width: 0;
  }
  .report-period-state {
    margin-left: auto;
  }
  .portfolio-kpis {
    gap: 10px;
  }
  .portfolio-kpi {
    padding: 16px;
    min-height: 152px;
  }
  .kpi-caption {
    font-size: 11px;
  }
  .kpi-caption .icon {
    display: none;
  }
  .kpi-number {
    font-size: 32px;
  }
  .kpi-number > span {
    font-size: 11px;
  }
  .kpi-foot {
    font-size: 11px;
  }
  .visual-panel {
    padding: 17px;
  }
  .visual-panel-head {
    gap: 10px;
  }
  .visual-panel h2 {
    font-size: 16px;
  }
  .segmented-control button {
    font-size: 11px;
    padding: 5px 8px;
  }
  .ranking-row,
  .ranking-axis {
    grid-template-columns: 18px minmax(96px, 1.3fr) minmax(55px, 1fr) 35px;
    gap: 8px;
  }
  .ranking-name {
    font-size: 11px;
  }
  .ranking-name small {
    font-size: 10px;
  }
  .ranking-row > strong {
    font-size: 14px;
  }
  .status-legend {
    max-width: none;
  }
  .action-health-body {
    gap: 18px;
  }
  .property-category-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .category-column + .category-column {
    border-left: 0;
    border-top: 1px solid #e7ece1;
    padding: 22px 0 0;
  }
  .property-rating-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .property-rating-cards .stat {
    padding: 15px 11px;
  }
  .property-rating-cards .stat-top {
    font-size: 11px;
  }
  .property-rating-cards .stat-value {
    font-size: 26px;
    letter-spacing: -0.6px;
  }
  .property-rating-cards .stat-value small {
    font-size: 11px;
  }
  .property-rating-cards .stat-sub {
    display: none;
  }
  .property-rating-cards .tag {
    padding: 3px 5px;
  }
  .audit-category-grid {
    gap: 9px;
  }
  .audit-category-grid .audit-category-chart {
    padding: 12px;
  }
  .audit-category-grid .audit-category-chart a {
    font-size: 11px;
  }
  .audit-category-card-score strong {
    font-size: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ranking-fill {
    transition: none;
  }
}

/* Fixed control geometry avoids browser-native month/select height differences. */
.report-filterbar {
  display: grid;
  grid-template-columns:
    minmax(190px, 1.4fr) minmax(155px, 1fr) minmax(155px, 1fr)
    auto auto;
  align-items: end;
  gap: 14px;
  padding: 16px;
}
.report-filterbar .report-filter,
.report-filterbar .report-filter:first-child {
  min-width: 0;
}
.report-filterbar-overview {
  grid-template-columns: minmax(190px, 1.4fr) minmax(155px, 1fr) auto;
}
.report-filterbar .report-filter label {
  display: block;
  min-height: 16px;
  line-height: 16px;
  margin: 0 0 6px;
  font-size: 12px;
}
.report-filterbar input,
.report-filterbar select,
.report-filterbar > button,
.property-analytics .toolbar input,
.property-analytics .toolbar select {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  line-height: 22px;
  font-size: 13px;
  border: 1px solid #dfe6d9;
  border-radius: 8px;
  background-color: #f6f8f2;
  color: #294335;
}
.report-filterbar input[type="month"],
.property-analytics .toolbar input[type="month"] {
  display: block;
}
.report-filterbar select,
.property-analytics .toolbar select {
  padding-right: 36px;
}
.report-filterbar > button {
  width: auto;
  white-space: nowrap;
  background: #fff;
}
.report-filterbar .report-period-state {
  min-height: 42px;
  margin: 0;
  justify-content: flex-end;
}
.property-analytics .toolbar input,
.property-analytics .toolbar select {
  width: auto;
  min-width: 150px;
}
@media (max-width: 1100px) {
  .report-filterbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .report-filterbar .report-period-state {
    grid-column: 2 / -1;
  }
}
@media (max-width: 720px) {
  .report-filterbar,
  .report-filterbar-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 13px;
  }
  .report-filterbar .report-filter:first-child {
    grid-column: 1 / -1;
  }
  .report-filterbar .report-period-state {
    grid-column: auto;
  }
  .report-filterbar > button {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 11px;
  }
}
@media (max-width: 380px) {
  .report-filterbar,
  .report-filterbar-overview {
    grid-template-columns: minmax(0, 1fr);
  }
  .report-filterbar .report-period-state {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
/* Close / reopen month: a separate, deliberate step at the end of Reports (#29). */
.month-lock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.month-lock h2 {
  margin: 0 0 4px;
}
.month-lock p {
  margin: 0;
  max-width: 640px;
}
.overview-rating-values .tag,
.overview-rating-values > div > small {
  margin-top: 6px;
}
