/* Live-site-aligned typography for the local UI preview. */
/* Login: theme changes color only, never type size. */
html:root[data-theme][data-shx-theme] body #login-view {
  --shot-heading: 20px !important;
  --shot-copy: 14px !important;
}
html:root[data-theme][data-shx-theme] body #login-view :is(#login-title,.login-card-heading h2) {
  font-size: 20px !important;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}
html:root[data-theme][data-shx-theme] body #login-view .login-card-heading>p {
  font-size: 13px !important;
  font-weight: 400;
  line-height: 1.6;
}
html:root[data-theme][data-shx-theme] body #login-view #login-form>label {
  font-size: 14px !important;
  font-weight: 400;
  line-height: 1.5;
}
html:root[data-theme][data-shx-theme] body #login-view .login-box input:not([type="hidden"]):not([type="range"]):not([type="checkbox"]):not([type="radio"]) {
  font-size: 14px !important;
  font-weight: 400;
  line-height: 1.5;
}
html:root[data-theme][data-shx-theme] body #login-view #login-form .login-submit {
  font-size: 14px !important;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .04em;
}
html:root[data-theme][data-shx-theme] body #login-view :is(.login-note,#login-status173,#login-error) {
  font-size: 12px !important;
  font-weight: 400;
  line-height: 1.6;
}
html:root[data-theme][data-shx-theme] body #login-view .brand-top {
  font-size: 16px !important;
  line-height: 1.4;
}
html:root[data-theme][data-shx-theme] body #login-view .brand-top small {
  font-size: 10px !important;
  line-height: 1.4;
}

/* Entry cards keep the same hierarchy as the working screens. */
html:root[data-theme][data-shx-theme] body #choice-view h1 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}
html:root[data-theme][data-shx-theme] body #choice-view .workspace-card h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
}
html:root[data-theme][data-shx-theme] body #choice-view :is(main>.muted,.workspace-card>p,.space-description,.space-enter,.user-actions) {
  font-size: 13px;
  line-height: 1.6;
}
html:root[data-theme][data-shx-theme] body #choice-view>footer {
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .08em;
}

/* Match the current public site's business type scale while keeping both
   palettes identical. Login and workspace choice are styled above. */
html:root[data-theme][data-shx-theme] body #app-view #page-content :is(.page-heading h1,.support-page-summary h1) {
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content .support-page-summary h1 {
  font-size: 16px !important;
  line-height: 1.6 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content thead th {
  font-size: 13px !important;
  line-height: 1.4 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content tbody td {
  line-height: 1.5 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content .panel-toolbar h3 {
  font-size: 16px !important;
  line-height: 1.5 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content .raw-focus-fixed thead th {
  line-height: 1.5 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content.tt-workspace199 .page-heading h1 {
  line-height: 1.25 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content :is(.terminal-filters,.terminal-grid-footer) label {
  line-height: 1.65 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content .px-dashboard-switch {
  line-height: 1.6 !important;
}
/* The screenshot dashboard originally enlarged figures only in dark mode.
   Match the current site's compact summaries in both palettes. */
html:root[data-theme][data-shx-theme] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) :is(.dashboard-card-header h3,.wb-cockpit-disclosure>summary h3) {
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) .wb-cockpit-summary,
html:root[data-theme][data-shx-theme] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) .wb-cockpit-summary>span {
  font-size: 13px !important;
  line-height: 1.8 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) [data-cockpit-panel="metrics"] .wb-cockpit-summary>span>b {
  font-size: 14px !important;
  line-height: 1.8 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) .dashboard-action-grid .button {
  font-size: 13px !important;
  line-height: 1.5 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) .dashboard-metric>strong {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.6 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) :is(.dashboard-health-card strong,.dashboard-risk-row strong,.dashboard-ranking-row,.dashboard-ranking-row>b,.dashboard-risk-row>b) {
  font-size: 14px !important;
  line-height: 1.6 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) :is(.dashboard-health-card small,.dashboard-health-card .health-status,.dashboard-risk-row small,.dashboard-ranking-row small) {
  font-size: 13px !important;
  line-height: 1.6 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) .dashboard-health-card .health-status {
  line-height: 1.5 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) .dashboard-metric>div {
  font-size: 12px !important;
  line-height: 1.6 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content .wb-cockpit-receivables tbody td {
  font-size: 13px !important;
  line-height: 1.5 !important;
}
/* Detail dialogs retain the production font scale while using readable theme ink. */
html:root[data-theme="dark"][data-shx-theme] body #form-dialog :is(.dialog-detail,.account-live-detail,#order-detail121) {
  color: var(--text-primary);
}
html:root[data-theme="dark"][data-shx-theme] body #form-dialog :is(.dialog-detail dt,.account-detail-fields dt,#order-detail121 .order-detail121-value dt,#order-detail121 .order-detail121-history dt,.account-balance-card>span,.account-read-status,.account-balance-explanation) {
  color: var(--text-secondary) !important;
}
html:root[data-theme="dark"][data-shx-theme] body #form-dialog :is(.dialog-detail dd,.account-detail-fields dd,#order-detail121 .order-detail121-value dd,#order-detail121 .order-detail121-history dd) {
  color: var(--text-primary) !important;
}
html:root[data-theme="dark"][data-shx-theme] body #form-dialog :is(.order-detail121-history,.account-detail-fields,.account-balance-card,.dialog-actions) {
  background-color: var(--bg-elevated) !important;
  border-color: var(--border-strong) !important;
}
html:root[data-theme="dark"][data-shx-theme] body #form-dialog .account-detail-fields :is(dt,dd) {
  border-color: var(--border-strong) !important;
}

/* Keep order detail guidance legible within the dark dialog. */
html:root[data-theme="dark"][data-shx-theme] body #form-dialog #order-detail121 .order-detail121-intro,
html:root[data-theme="dark"][data-shx-theme] body #form-dialog #order-detail121 .order-detail121-note {
  color: var(--text-secondary) !important;
}
html:root[data-theme="dark"][data-shx-theme] body #form-dialog #order-detail121 .order-detail121-note {
  background-color: var(--bg-elevated) !important;
  border-color: var(--border-strong) !important;
}

/* Keep the six closed business metrics as compact label-value pairs. */
html:root[data-theme][data-shx-theme] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) [data-cockpit-panel="metrics"] .wb-cockpit-summary > span {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
  font-size: 13px !important;
  line-height: 1.8 !important;
}
html:root[data-theme][data-shx-theme] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) [data-cockpit-panel="metrics"] .wb-cockpit-summary > span > b {
  display: inline;
  margin: 0;
  font-size: 13px !important;
  line-height: inherit !important;
  font-weight: 700;
}
@media (min-width: 1151px) {
  html:root[data-theme][data-shx-theme] body #app-view #page-content :is(#dashboard-original,.wb-cockpit-board) [data-cockpit-panel="metrics"] .wb-cockpit-summary {
    grid-template-columns: repeat(6, max-content);
    justify-content: space-between;
    gap: 4px;
  }
}
