/* System readability overlay - 2026-08-09.
   Visual-only: no business data, controls, or behavior are removed. */

/* Readable typography baseline - v250.
   Visual-only: keep every route, permission, data field, and action unchanged. */
body.page-hub {
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

.page-hub :is(
  button,
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select,
  textarea
) {
  font-size: 16px !important;
  line-height: 1.4;
}

.page-hub label {
  font-size: 15px !important;
  line-height: 1.5;
}

.page-hub :is(small, .muted, .sub, .hint, .helper, .eyebrow) {
  font-size: 14px !important;
  line-height: 1.5;
}

.page-hub :is(.badge, .pill, .chip, .tag) {
  font-size: 13px !important;
  line-height: 1.35;
}

/* The company workboard has wide rows, so use the available space for readable type. */
.page-hub .hub-company-head-meta-v245,
.page-hub .hub-company-legend-v245 {
  font-size: 14px;
  line-height: 1.45;
}

.page-hub #hub-company-refresh-v245,
.page-hub .hub-company-filters-v245 :is(input, select) {
  font-size: 16px !important;
}

.page-hub #hub-company-clear-v245 {
  font-size: 15px !important;
}

.page-hub .hub-company-metric-v245 {
  min-height: 116px;
}

.page-hub .hub-company-metric-v245 small {
  font-size: 14px !important;
}

.page-hub .hub-company-metric-v245 b {
  font-size: 32px;
}

.page-hub .hub-company-metric-v245 span {
  font-size: 13px;
  line-height: 1.4;
}

.page-hub .hub-company-results-head-v245 h4 {
  font-size: 20px;
}

.page-hub .hub-company-results-head-v245 span,
.page-hub .hub-company-list-labels-v245 {
  font-size: 13px;
  line-height: 1.45;
}

.page-hub .hub-company-job-v245 {
  min-height: 102px;
}

.page-hub .hub-company-job-identity-v245 strong {
  font-size: 16px;
  line-height: 1.4;
}

.page-hub :is(.hub-company-job-identity-v245, .hub-company-job-field-v245) small,
.page-hub .hub-company-original-owner-v245 {
  font-size: 13px;
  line-height: 1.45;
}

.page-hub .hub-company-job-field-v245 > b {
  font-size: 15px;
  line-height: 1.4;
}

.page-hub :is(.hub-company-department-v245, .hub-company-urgency-v245) {
  padding: 5px 9px;
  font-size: 13px !important;
  line-height: 1.35;
}

.page-hub .hub-company-open-v245 {
  min-width: 138px;
  padding: 9px 14px;
  font-size: 14px !important;
  line-height: 1.35;
  white-space: normal;
}

.page-hub :is(
  .hub-company-loading-v245,
  .hub-company-error-v245,
  .hub-company-empty-v245,
  .hub-company-limit-v245,
  .hub-company-permission-v245
) {
  font-size: 14px;
  line-height: 1.55;
}

.page-hub .hub-company-permission-v245 b {
  font-size: 15px;
}

/* Dark workboard colors: these replace light-theme blues that were below WCAG AA. */
html[data-dark="true"] .page-hub #hub-company-refresh-v245 {
  border-color: #6eaefa;
  background: #142d4a;
  color: #e8f3ff;
}

html[data-dark="true"] .page-hub #hub-company-refresh-v245[aria-busy="true"] {
  opacity: .8;
}

html[data-dark="true"] .page-hub .hub-company-metric-v245 b {
  color: #8fc5ff;
}

html[data-dark="true"] .page-hub .hub-company-metric-v245 span {
  color: #c4d8f1;
}

html[data-dark="true"] .page-hub .hub-company-metric-v245[data-tone="urgent"] b {
  color: #ffbc74;
}

html[data-dark="true"] .page-hub .hub-company-metric-v245[data-tone="soon"] b {
  color: #ffe27a;
}

html[data-dark="true"] .page-hub .hub-company-metric-v245[data-tone="overdue"] b {
  color: #ff9fb0;
}

html[data-dark="true"] .page-hub .hub-company-metric-v245[data-tone="complete"] b {
  color: #7be3be;
}

html[data-dark="true"] .page-hub .hub-company-results-head-v245 span,
html[data-dark="true"] .page-hub .hub-company-permission-v245 b {
  color: #9dccff;
}

html[data-dark="true"] .page-hub .hub-company-open-v245 {
  border-color: #75b5ff;
  background: #173d67;
  color: #f2f8ff;
}

html[data-dark="true"] .page-hub .hub-company-open-v245:hover,
html[data-dark="true"] .page-hub .hub-company-open-v245:focus-visible {
  border-color: #a8d1ff;
  background: #225180;
  color: #ffffff;
}

html[data-dark="true"] .page-hub ::placeholder {
  color: #aebdd1;
  opacity: 1;
}

html[data-dark="true"] .page-hub .hub-company-filters-v245 :is(input, select) {
  color-scheme: dark;
}

/* Office-map cards and live bubbles were 7-11px. Enlarge their frames with the type. */
@media (min-width: 1024px) {
  html.hub-office-simulation-ready-v235 .hub-department-floor-v228:not(.is-map-hidden) .primary-card {
    width: 180px;
    max-width: 180px;
    height: 62px;
    max-height: 62px;
    padding: 9px 9px 9px 50px;
  }

  html.hub-office-simulation-ready-v235 .hub-department-floor-v228:not(.is-map-hidden) .primary-card > .primary-icon {
    top: 13px;
    left: 9px;
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  html.hub-office-simulation-ready-v235 .hub-department-floor-v228:not(.is-map-hidden) .primary-card > h3 {
    margin-top: 3px;
    font-size: 14px;
    line-height: 1.35;
  }

  html.hub-office-simulation-ready-v235 .hub-department-floor-v228:not(.is-map-hidden) .primary-revenue-partner {
    width: 180px;
    max-width: 180px;
    height: 62px;
    max-height: 62px;
    padding-right: 80px;
  }

  html.hub-office-simulation-ready-v235 .hub-department-floor-v228:not(.is-map-hidden) .primary-revenue-partner > h3 {
    font-size: 12px;
  }

  html.hub-office-simulation-ready-v235 .hub-department-floor-v228:not(.is-map-hidden) .primary-revenue-partner .revenue-partner-links {
    width: 72px;
    gap: 4px;
  }

  html.hub-office-simulation-ready-v235 .hub-department-floor-v228:not(.is-map-hidden) .primary-revenue-partner .revenue-partner-links a {
    height: 24px;
    padding: 3px 5px;
  }

  html.hub-office-simulation-ready-v235 .hub-department-floor-v228:not(.is-map-hidden) .primary-revenue-partner .revenue-partner-links strong {
    font-size: 11px;
  }

  .page-hub .hub-office-marker-v235 {
    width: 64px;
    max-width: 64px;
    height: 34px;
    max-height: 34px;
    padding: 4px;
    gap: 3px;
  }

  .page-hub .hub-office-marker-icon-v235 {
    flex-basis: 22px;
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .page-hub .hub-office-marker-label-v235 {
    font-size: 11px;
    line-height: 1.15;
  }

  .page-hub .hub-office-speech-v235 {
    width: 180px;
    min-height: 62px;
    padding: 8px 10px;
    column-gap: 5px;
  }

  .page-hub .hub-office-courier-v235[data-flow="customer-wait-meeting"] .hub-office-speech-v235 {
    width: 180px;
  }

  .page-hub .hub-office-speech-kicker-v235 {
    font-size: 11px;
    line-height: 1.35;
  }

  .page-hub .hub-office-speech-label-v235 {
    font-size: 13px;
    line-height: 1.3;
  }

  .page-hub .hub-office-speech-count-v235 {
    min-width: 24px;
    padding: 3px 6px;
    font-size: 15px;
  }

  .page-hub .hub-office-speech-unit-v235 {
    font-size: 11px;
  }

  .page-hub .hub-office-live-status-v235 {
    min-height: 38px;
    font-size: 13px;
  }

  .page-hub .hub-office-motion-toggle-v235 {
    font-size: 14px !important;
  }

  /* JS sets the readiness class on <html>; the old descendant selector never matched. */
  html[data-dark="true"].hub-office-simulation-ready-v235 .hub-department-floor-v228:not(.is-map-hidden) .primary-card,
  html[data-dark="true"].hub-office-simulation-ready-v235 .hub-office-speech-v235,
  html[data-dark="true"].hub-office-simulation-ready-v235 .hub-office-marker-v235 {
    border-color: rgba(155, 201, 243, .58);
    background: rgba(11, 30, 51, .94);
    color: #f4f9ff;
  }

  html[data-dark="true"].hub-office-simulation-ready-v235 .hub-department-floor-v228:not(.is-map-hidden) .primary-card > h3 {
    color: #ffffff !important;
  }

  html[data-dark="true"].hub-office-simulation-ready-v235 .hub-department-floor-v228:not(.is-map-hidden) .primary-card > .primary-icon {
    border-color: #b9d9f7;
    background: #e9f4ff;
    color: #173a61;
  }

  html[data-dark="true"].hub-office-simulation-ready-v235 .hub-office-speech-kicker-v235,
  html[data-dark="true"].hub-office-simulation-ready-v235 .hub-office-speech-unit-v235 {
    color: #c5d9ec;
  }

  html[data-dark="true"].hub-office-simulation-ready-v235 .hub-office-speech-kicker-v235 {
    color: color-mix(in srgb, var(--courier-accent-v235) 45%, #ffffff);
  }

  html[data-dark="true"].hub-office-simulation-ready-v235 .hub-office-speech-label-v235 {
    color: #ffffff;
  }

  html[data-dark="true"].hub-office-simulation-ready-v235 .hub-office-speech-v235[data-tone="unavailable"] {
    opacity: 1;
  }

  html[data-dark="true"].hub-office-simulation-ready-v235 .hub-office-delivered-v235 {
    background: #126b50;
    color: #ffffff;
    font-size: 10px;
  }

  html[data-dark="true"].hub-office-simulation-ready-v235 .hub-office-motion-toggle-v235 {
    border-color: #5f8fb9;
    background: #142d4a;
    color: #9bd2ff;
  }

  html[data-dark="true"].hub-office-simulation-ready-v235 .hub-office-motion-toggle-v235[aria-pressed="true"] {
    border-color: #5fb996;
    background: #173d45;
    color: #78e2bd;
  }
}

@media (max-width: 700px) {
  body.page-hub {
    max-width: 100%;
  }

  .page-hub .hub-access-gate {
    padding-top: max(16px, env(safe-area-inset-top));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    padding-left: max(16px, env(safe-area-inset-left));
  }

  .page-hub .shell {
    width: 100%;
    max-width: 100%;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .page-hub .topbar {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 12px;
  }

  .page-hub .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 8px;
  }

  .page-hub .news-form-actions,
  .page-hub .news-admin-actions {
    display: grid;
    width: 100%;
    gap: 8px;
  }

  .page-hub .top-actions > *,
  .page-hub .news-form-actions > *,
  .page-hub .news-admin-actions > * {
    width: 100%;
    min-width: 0;
  }

  .page-hub button,
  .page-hub input:not([type="checkbox"]):not([type="radio"]),
  .page-hub select,
  .page-hub .ghost,
  .page-hub .owner-panel nav a,
  .page-hub .revenue-partner-links a,
  .page-hub .hub-company-open-v245,
  .page-hub .hub-department-restricted-v228 > a {
    min-height: 44px;
    touch-action: manipulation;
  }

  .page-hub button[aria-label],
  .page-hub .dialog-close {
    min-width: 44px;
  }

  .page-hub .app-grid,
  .page-hub .admin-grid,
  .page-hub .owner-panel,
  .page-hub .owner-panel nav,
  .page-hub .news-form-grid,
  .page-hub .news-form-actions,
  .page-hub .news-admin-actions,
  .page-hub .news-admin-row,
  .page-hub .hub-company-filters-v245 {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-hub .app-card,
  .page-hub .admin-card,
  .page-hub .primary-card,
  .page-hub .owner-panel,
  .page-hub .hub-command-dashboard-v228,
  .page-hub .hub-command-priority-v228,
  .page-hub .hub-command-pipeline-v228,
  .page-hub .hub-company-dashboard-v245,
  .page-hub .hub-company-job-v245,
  .page-hub .hub-company-job-field-v245,
  .page-hub .hub-company-job-identity-v245 {
    min-width: 0;
    max-width: 100%;
  }

  .page-hub .app-card,
  .page-hub .admin-card,
  .page-hub .primary-card {
    min-height: 0;
  }

  .page-hub .hub-workspace-news .news-list {
    grid-auto-flow: row;
    grid-template-columns: minmax(0, 1fr);
    overflow-x: visible;
  }

  .page-hub .hub-command-history-v239 .shipping-daily-days,
  .page-hub .news-list,
  .page-hub .hub-company-list-v245 {
    max-width: 100%;
    overscroll-behavior-inline: contain;
  }

  .page-hub .hub-command-history-v239 .shipping-daily-days {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
  }

  .page-hub .app-card,
  .page-hub .primary-card,
  .page-hub .hub-command-priority-row-v228,
  .page-hub .hub-company-job-v245 {
    overflow-wrap: anywhere;
  }

  .page-hub .hub-theme-dialog,
  .page-hub .news-dialog {
    width: calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));
    max-width: 100%;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    padding-left: max(16px, env(safe-area-inset-left));
    overflow: auto;
    overscroll-behavior: contain;
  }
}

/* Visible-role typography floor.
   These compact legacy roles were still rendered below 13px on desktop.
   Typography only: preserve every card, marker, control, and grid dimension. */
.page-hub :is(
  footer,
  .news-empty,
  .hub-clock-label,
  .hub-clock-date,
  .primary-heading > span,
  .secondary-heading > span,
  .hub-command-priority-v228 > header > span,
  .hub-command-pipeline-v228 > header > span,
  .hub-command-pipeline-list-v228 > button > span,
  .hub-command-pipeline-list-v228 > button > strong,
  .hub-command-loading-v228,
  .hub-command-partial-v228,
  .hub-command-clear-v228,
  .hub-access-owner-setup > span,
  .primary-access-label,
  .primary-card > .primary-icon,
  .primary-revenue-partner .revenue-partner-links > a > span
) {
  font-size: 13px !important;
}

/* The command error state reuses `.hub-command-partial-v228`; its empty state
   reuses `.hub-command-clear-v228`. Keep their nested empty-state copy and the
   visible workspace-news description at the normal supporting-copy size. */
.page-hub .hub-workspace-news .news-board-head > div > p:last-child,
.page-hub .hub-command-clear-v228 > strong,
.page-hub .hub-command-clear-v228 > small {
  font-size: 14px !important;
}

.page-hub #hub-department-floor-v228 :is(
  .secondary-grid > a > span,
  .secondary-grid > a strong,
  .secondary-grid > a i,
  .hub-department-restricted-v228 > span,
  .hub-department-restricted-v228 > a,
  .hub-department-restricted-v228 > a small
) {
  font-size: 13px !important;
}

@media (min-width: 1024px) {
  html.hub-office-simulation-ready-v235 .hub-department-floor-v228:not(.is-map-hidden) .primary-revenue-partner > h3,
  html.hub-office-simulation-ready-v235 .hub-department-floor-v228:not(.is-map-hidden) .primary-revenue-partner .revenue-partner-links strong,
  .page-hub .hub-office-marker-icon-v235,
  .page-hub .hub-office-marker-label-v235,
  .page-hub .hub-office-delivered-v235 {
    font-size: 13px !important;
  }
}
