:root {
  color-scheme: light;
  --page-bg: #f7f8fa;
  --surface: #ffffff;
  --surface-muted: #f4f5f7;
  --border: #e8ebf0;
  --border-strong: #d8dde5;
  --text: #20242c;
  --text-muted: #747b87;
  --text-soft: #969daa;
  --orange: #ff6427;
  --orange-dark: #e84f16;
  --orange-soft: #fff0e9;
  --success: #25a66f;
  --success-soft: #eaf8f2;
  --warning: #b87616;
  --warning-soft: #fff5df;
  --danger: #d94c45;
  --danger-soft: #fff0ef;
  --info: #397be8;
  --info-soft: #edf4ff;
  --radius: 8px;
  --shadow-modal: 0 18px 48px rgb(32 36 44 / 18%);
  font-family: Inter, "HarmonyOS Sans SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}

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

button,
select {
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: inherit;
}

p,
h1,
h2,
h3,
dl,
dd,
fieldset {
  margin: 0;
}

h1,
h2,
h3,
strong {
  font-weight: 650;
}

[hidden] {
  display: none !important;
}

.workflow-action-button {
  min-height: 44px;
}

:focus-visible {
  outline: 3px solid #c2410c;
  outline-offset: 2px;
}

.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;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--orange);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-frame {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 210px minmax(0, 1fr);
}

.module-sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 18px 14px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.module-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 6px 16px;
  border-bottom: 1px solid var(--border);
}

.module-brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--orange);
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
}

.module-brand strong,
.module-brand span {
  display: block;
}

.module-brand strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.module-brand div > span {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.module-nav__label {
  padding: 20px 10px 8px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
}

.module-nav {
  display: grid;
  gap: 4px;
}

.module-nav__item {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #4f5662;
  font-size: 13px;
  font-weight: 560;
  text-decoration: none;
}

.module-nav__item:hover:not(.is-disabled) {
  background: var(--surface-muted);
  color: var(--text);
}

.module-nav__item.is-active {
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-weight: 650;
}

.module-nav__item.is-disabled {
  color: #a2a8b2;
  cursor: default;
}

.module-nav__item small {
  margin-left: auto;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 500;
}

.module-nav__dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #c4c9d1;
}

.module-nav__item.is-active .module-nav__dot {
  background: var(--orange);
}

.module-scope {
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--page-bg);
}

.module-scope span,
.module-scope strong {
  display: block;
}

.module-scope span {
  color: var(--text-soft);
  font-size: 11px;
}

.module-scope strong {
  margin-top: 4px;
  font-size: 12px;
}

.module-scope p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.55;
}

.app-surface {
  min-width: 0;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 96%);
}

.topbar-title {
  min-width: 0;
}

.breadcrumb,
.section-kicker {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.title-line h1 {
  font-size: 22px;
  line-height: 1.3;
}

.context-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 650;
}

.header-copy {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.connection-state {
  display: inline-flex;
  min-height: 32px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
}

.connection-state__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-soft);
}

.connection-state.is-connected .connection-state__dot {
  background: var(--success);
}

.connection-state.is-error {
  border-color: #f2caca;
  color: var(--danger);
}

.connection-state.is-error .connection-state__dot {
  background: var(--danger);
}

.connection-state.is-success .connection-state__dot {
  background: var(--success);
}

.connection-state.is-demo {
  border-color: #f0d59b;
  background: var(--warning-soft);
  color: #8a5500;
}

.connection-state.is-demo .connection-state__dot {
  background: var(--warning);
}

.page-shell {
  display: grid;
  width: 100%;
  gap: 18px;
  padding: 20px 24px 36px;
}

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--surface);
}

.notice strong {
  display: block;
  font-size: 13px;
}

.notice p,
.notice span {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.notice code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgb(32 36 44 / 6%);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.notice--demo {
  border-color: #f0d59b;
  border-left-color: var(--warning);
  background: var(--warning-soft);
}

.notice--success {
  border-color: #9fd2bd;
  border-left-color: var(--success);
  background: var(--success-soft);
}

.notice--snapshot {
  border-color: #b7d8ed;
  border-left-color: #2f7aa5;
  background: #edf7fc;
}

.notice--danger {
  border-color: #f2caca;
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.sync-section,
.workspace-card {
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.section-heading h2,
.analysis-intro h2 {
  margin-top: 1px;
  font-size: 18px;
  line-height: 1.35;
}

.section-heading p:not(.section-kicker),
.analysis-intro > div > p:not(.section-kicker) {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.status-updated {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 11px;
}

.sync-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sync-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.sync-card.is-running {
  border-top-color: var(--info);
}

.sync-card.is-warning {
  border-top-color: var(--warning);
}

.sync-card.is-error {
  border-top-color: var(--danger);
}

.sync-card__heading,
.sync-card__heading > div {
  display: flex;
  align-items: center;
}

.sync-card__heading {
  justify-content: space-between;
  gap: 12px;
}

.sync-card__heading > div {
  min-width: 0;
  gap: 8px;
}

.sync-card__name {
  font-size: 14px;
  font-weight: 650;
}

.state-pill {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.state-pill--loading,
.state-pill--running {
  background: var(--info-soft);
  color: var(--info);
}

.state-pill--success {
  background: var(--success-soft);
  color: var(--success);
}

.state-pill--warning,
.state-pill--stale {
  background: var(--warning-soft);
  color: #8a5500;
}

.state-pill--error {
  background: var(--danger-soft);
  color: var(--danger);
}

.sync-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
  border-top: 1px solid var(--border);
}

.sync-card__meta div {
  min-width: 0;
  padding-top: 9px;
}

.sync-card__meta div + div {
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.sync-card__meta dt {
  color: var(--text-soft);
  font-size: 10px;
}

.sync-card__meta dd {
  margin-top: 2px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-card__message {
  min-height: 34px;
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.55;
}

.workspace-card {
  display: grid;
  gap: 12px;
  scroll-margin-top: 98px;
}

.workspace-head,
.analysis-intro,
.filter-bar,
.analysis-panel,
.narrative {
  border: 1px solid var(--border);
  background: var(--surface);
}

.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 9px 12px;
  border-radius: var(--radius);
}

.workspace-actions,
.tab-list {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-list {
  padding: 3px;
  border-radius: 7px;
  background: var(--surface-muted);
}

.tab-button {
  min-height: 34px;
  padding: 6px 16px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 620;
}

.tab-button:hover {
  color: var(--text);
}

.tab-button.is-active {
  background: var(--surface);
  color: var(--orange-dark);
  box-shadow: 0 1px 3px rgb(32 36 44 / 8%);
}

.analysis-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 16px;
  border-radius: var(--radius);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(430px, 1.8fr) minmax(120px, 0.7fr) minmax(140px, 0.9fr) minmax(190px, 1.2fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
}

.date-filter-group {
  display: grid;
  grid-template-columns: 132px 132px minmax(180px, 1fr);
  align-items: end;
  gap: 10px;
  min-width: 0;
}

.date-filter-note {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.45;
}

.date-presets {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.date-presets > span,
.field small {
  color: #555d69;
  font-size: 10px;
  font-weight: 600;
}

.date-presets__buttons {
  display: flex;
  gap: 4px;
}

.date-presets button {
  min-height: 34px;
  flex: 1 1 auto;
  padding: 6px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.date-presets button:hover:not(:disabled),
.date-presets button.is-active {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.date-presets button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.field small {
  min-height: 28px;
  line-height: 1.4;
}

.field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.field > span,
.choice-group legend,
.export-fields legend {
  color: #555d69;
  font-size: 11px;
  font-weight: 650;
}

.field b {
  color: var(--danger);
  font-weight: 650;
}

.field input,
.field select,
.field textarea,
.page-size select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.field input,
.field select,
.page-size select {
  height: 36px;
  padding: 0 9px;
}

.field textarea {
  min-height: 76px;
  padding: 9px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a6acb5;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.page-size select:hover {
  border-color: #bfc5cf;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.page-size select:focus {
  border-color: var(--orange);
  outline: 3px solid rgb(255 100 39 / 12%);
}

.field--full {
  width: 100%;
}

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.button--primary {
  border-color: var(--orange);
  background: var(--orange);
  color: #ffffff;
}

.button--primary:hover:not(:disabled) {
  border-color: var(--orange-dark);
  background: var(--orange-dark);
}

.button--secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: #4e5662;
}

.button--secondary:hover:not(:disabled) {
  border-color: #c2c8d1;
  background: var(--surface-muted);
  color: var(--text);
}

.button--small {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}

.filter-submit {
  min-width: 84px;
}

.inline-notice {
  padding: 10px 12px;
  border: 1px solid #f0d59b;
  border-left: 4px solid var(--warning);
  border-radius: var(--radius);
  background: var(--warning-soft);
  color: #7c510c;
  font-size: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary-card {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.summary-card__label {
  color: var(--text-muted);
  font-size: 11px;
}

.summary-card__value {
  margin-top: 4px;
  overflow: hidden;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-card__hint {
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-panel {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.industry-panel {
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.industry-panel[hidden] {
  display: none;
}

.industry-empty-state {
  padding: 30px;
  border: 1px solid #f0d7ca;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff9f5 0%, #fff 72%);
}

.industry-empty-state h2 {
  margin-top: 12px;
  font-size: 22px;
}

.industry-empty-state p {
  max-width: 760px;
  margin-top: 8px;
  color: var(--text-soft);
  line-height: 1.7;
}

.industry-readiness {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.readiness-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.readiness-card > span {
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
}

.readiness-card h3 {
  margin-top: 10px;
  font-size: 15px;
}

.readiness-card p {
  min-height: 72px;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.readiness-card strong {
  display: inline-block;
  margin-top: 12px;
  color: #9a5b20;
  font-size: 11px;
}

.industry-governance {
  display: grid;
  grid-template-columns: minmax(190px, 0.45fr) minmax(0, 1fr);
  gap: 28px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.industry-governance h3 {
  margin-top: 6px;
  font-size: 17px;
}

.industry-governance ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.rules-page {
  display: grid;
  gap: 16px;
}

.rules-version {
  border-color: var(--border);
  background: var(--surface-muted);
  color: var(--text-soft);
}

.rules-hero,
.rules-toolbar,
.rules-integration-note,
.rule-parameters,
.rule-governance,
.rule-change-flow {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.rules-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
}

.rules-hero h2,
.rules-integration-note h2,
.rule-parameters h2,
.rule-governance h2,
.rule-change-flow h2 {
  margin-top: 6px;
  font-size: 18px;
}

.rules-hero p:not(.section-kicker) {
  max-width: 850px;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.7;
}

.rule-parameters {
  scroll-margin-top: 98px;
  overflow: hidden;
}

.rule-parameters__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.rule-parameters__head p:not(.section-kicker),
.rule-governance > div:first-child > p:not(.section-kicker) {
  max-width: 820px;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.65;
}

.rule-parameter-count {
  display: grid;
  min-width: 112px;
  place-content: center;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  text-align: center;
}

.rule-parameter-count strong,
.rule-parameter-count span {
  display: block;
}

.rule-parameter-count strong {
  color: var(--orange-dark);
  font-size: 24px;
}

.rule-parameter-count span {
  color: var(--text-muted);
  font-size: 10px;
}

.rule-parameter-groups {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.rule-constraint-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.26fr) minmax(0, 1fr);
  gap: 20px;
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  background: var(--info-soft);
}

.rule-constraint-panel h3 {
  margin-top: 5px;
  font-size: 13px;
}

.rule-constraint-panel ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 24px;
  margin: 0;
  padding-left: 18px;
  color: #385d8d;
  font-size: 10px;
  line-height: 1.55;
}

.rule-parameter-group h3 {
  margin: 0 0 9px;
  font-size: 13px;
}

.rule-parameter-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rule-parameter-card {
  display: grid;
  gap: 7px;
  align-content: start;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
}

.rule-parameter-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.rule-parameter-card__meta code {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-parameter-card__meta strong {
  flex: 0 0 auto;
  color: var(--orange-dark);
  font-size: 17px;
}

.rule-parameter-card h4 {
  margin: 0;
  font-size: 12px;
}

.rule-parameter-card p {
  color: var(--text-muted);
  font-size: 10px;
}

.rule-parameter-card .button {
  width: 100%;
  margin-top: 3px;
}

.rule-governance {
  display: grid;
  grid-template-columns: minmax(230px, 0.38fr) minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
  background: var(--warning-soft);
  border-color: #efd4a4;
}

.rule-guardrail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rule-guardrail-list article {
  padding: 12px;
  border: 1px solid #edd29e;
  border-radius: 6px;
  background: rgb(255 255 255 / 62%);
}

.rule-guardrail-list strong {
  font-size: 11px;
}

.rule-guardrail-list p {
  margin-top: 4px;
  color: #765624;
  font-size: 10px;
  line-height: 1.55;
}

.rule-change-flow {
  display: grid;
  grid-template-columns: minmax(190px, 0.28fr) minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
}

.rule-change-flow ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-change-flow li {
  display: grid;
  gap: 5px;
  min-height: 66px;
  align-content: start;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
}

.rule-change-flow li span {
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 750;
}

.rule-change-flow li strong {
  font-size: 10px;
  line-height: 1.5;
}

.rules-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
}

.rule-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rule-filter {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
}

.rule-filter:hover,
.rule-filter.is-active {
  border-color: #f0b294;
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.rules-search {
  width: min(280px, 100%);
}

.rules-search input {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
}

.rules-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.rules-summary article {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.rules-summary p {
  color: var(--text-soft);
  font-size: 11px;
}

.rules-summary strong {
  font-size: 20px;
}

.rule-groups {
  display: grid;
  gap: 14px;
}

.rule-group {
  display: grid;
  grid-template-columns: minmax(190px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.rule-group__heading h2 {
  font-size: 16px;
}

.rule-group__heading p {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.6;
}

.rule-list {
  display: grid;
  gap: 8px;
}

.rule-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
}

.rule-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rule-card__meta code {
  color: var(--text-muted);
  font-size: 10px;
}

.rule-card h3 {
  margin-top: 9px;
  font-size: 13px;
}

.rule-card > p {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.65;
}

.rule-status {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.rule-status.is-confirmed {
  background: var(--success-soft);
  color: var(--success);
}

.rule-status.is-assumption {
  background: #f2f0ff;
  color: #6152a0;
}

.rule-status.is-recommendation {
  background: #eaf4ff;
  color: #2e6592;
}

.rule-status.is-pending {
  background: var(--warning-soft);
  color: #8b5c10;
}

.rules-empty {
  padding: 30px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-soft);
  text-align: center;
}

.rules-integration-note {
  display: grid;
  grid-template-columns: minmax(190px, 0.35fr) minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
  background: var(--surface-muted);
}

.rules-integration-note ul {
  display: grid;
  gap: 7px;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.6;
}

.transfer-page {
  display: grid;
  gap: 14px;
}

.transfer-boundary,
.transfer-toolbar,
.transfer-table-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.transfer-boundary {
  display: grid;
  grid-template-columns: minmax(210px, 0.38fr) minmax(0, 1fr);
  gap: 24px;
  padding: 18px;
  background: var(--surface-muted);
}

.transfer-boundary h2 {
  margin-top: 6px;
  font-size: 17px;
}

.transfer-boundary ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.6;
}

.transfer-toolbar {
  display: grid;
  grid-template-columns: 130px 130px 130px 130px minmax(190px, 1fr) auto;
  align-items: end;
  gap: 9px;
  padding: 12px;
}

.transfer-table-card {
  min-width: 0;
  overflow: hidden;
}

.transfer-table {
  min-width: 1120px;
}

.transfer-table th:nth-child(1) { min-width: 210px; }
.transfer-table th:nth-child(2) { min-width: 170px; }
.transfer-table th:nth-child(3) { min-width: 180px; }
.transfer-table th:nth-child(4) { min-width: 90px; }
.transfer-table th:nth-child(5) { min-width: 300px; }
.transfer-table th:nth-child(6) { min-width: 90px; }

.transfer-table td {
  line-height: 1.55;
  white-space: normal;
}

.transfer-quantity {
  color: var(--orange-dark);
  font-weight: 750;
}

.transfer-decision-state {
  font-weight: 700;
}

.transfer-decision-state.is-pending {
  color: #8b5c10;
}

.transfer-decision-state.is-decided {
  color: var(--success);
}

.action-center-page {
  display: grid;
  gap: 14px;
}

.todo-page {
  display: grid;
  gap: 14px;
}

.todo-page-state {
  border-color: #f0d59b;
  background: var(--warning-soft);
  color: #8a5500;
}

.todo-page-state .connection-state__dot {
  background: var(--warning);
}

.todo-hold,
.todo-scope,
.todo-boundary,
.todo-readiness {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.todo-hold {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 22px;
  border-color: #efd4a4;
  background: var(--warning-soft);
}

.todo-hold h2,
.todo-scope h2,
.todo-boundary h2,
.todo-readiness h2 {
  margin-top: 6px;
  font-size: 18px;
}

.todo-hold p:not(.section-kicker),
.todo-scope .section-heading p:not(.section-kicker) {
  max-width: 860px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.7;
}

.todo-scope,
.todo-boundary,
.todo-readiness {
  padding: 20px;
}

.todo-scope-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.todo-scope-grid article,
.todo-boundary-grid article {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.todo-scope-grid article > span {
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 700;
}

.todo-scope-grid h3 {
  margin-top: 8px;
  font-size: 15px;
}

.todo-scope-grid p,
.todo-boundary-grid p,
.todo-readiness li {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.65;
}

.todo-scope-grid p,
.todo-boundary-grid p {
  margin-top: 7px;
}

.todo-scope-card--pending {
  border-color: #efd4a4 !important;
  background: var(--warning-soft) !important;
}

.todo-boundary {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 20px;
}

.todo-boundary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.todo-boundary-grid strong {
  font-size: 13px;
}

.todo-readiness {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 20px;
}

.todo-readiness ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.merchandising-app.is-todo-demo .todo-static-info {
  display: none;
}

.todo-task-card__evidence {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text-muted);
}

.todo-demo-workspace {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.todo-demo-workspace__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.todo-demo-workspace__head h2 {
  margin-top: 5px;
  font-size: 18px;
}

.todo-demo-workspace__head p:not(.section-kicker) {
  max-width: 760px;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.65;
}

.todo-demo-counts {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.todo-demo-counts span {
  display: grid;
  min-width: 72px;
  gap: 2px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 9px;
  text-align: center;
}

.todo-demo-counts strong {
  color: var(--text);
  font-size: 18px;
}

.todo-demo-filters {
  display: grid;
  grid-template-columns: 140px 130px 130px minmax(180px, 1fr) auto;
  align-items: end;
  gap: 9px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.todo-task-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

.todo-task-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.todo-task-card__head,
.todo-task-card__foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.todo-task-card__head h3 {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.todo-task-card__head p,
.todo-task-card__foot {
  color: var(--text-muted);
  font-size: 10px;
}

.todo-task-card__product {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.todo-task-card__product span {
  min-width: 0;
  padding: 8px;
  border-radius: 5px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.todo-task-card__product strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 11px;
}

.todo-task-card__reason {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.6;
}

.todo-task-card__foot {
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

#todo-demo-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.action-readiness,
.action-workspace,
.action-flow {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.action-readiness {
  display: grid;
  grid-template-columns: minmax(260px, 0.52fr) minmax(0, 1fr);
  gap: 24px;
  padding: 18px;
  background: var(--surface-muted);
}

.action-readiness.is-blocked {
  border-color: #efd4a4;
  background: var(--warning-soft);
}

.action-readiness.is-ready {
  border-color: #bde5d4;
  background: var(--success-soft);
}

.action-readiness h2,
.action-flow h2,
.action-topic-intro h2 {
  margin-top: 6px;
  font-size: 17px;
}

.action-readiness p:not(.section-kicker),
.action-topic-intro > p,
.action-flow > p {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.65;
}

.action-readiness ul {
  display: grid;
  align-content: start;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #72501b;
  font-size: 11px;
  line-height: 1.55;
}

.action-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.action-summary article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.action-summary p {
  color: var(--text-muted);
  font-size: 11px;
}

.action-summary strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--text);
  font-size: 23px;
}

.action-summary span {
  color: var(--text-soft);
  font-size: 10px;
}

.action-workspace {
  min-width: 0;
  overflow: hidden;
}

.action-workspace__head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.action-workspace .tab-button span {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  margin-left: 5px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 10px;
}

.action-workspace .tab-button.is-active span {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.action-topic-intro {
  display: grid;
  grid-template-columns: minmax(250px, 0.45fr) minmax(0, 1fr);
  gap: 24px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.action-filters {
  display: grid;
  grid-template-columns: 170px 150px minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.action-empty {
  padding: 44px 20px;
  text-align: center;
}

.action-empty h3 {
  margin-top: 12px;
  font-size: 16px;
}

.action-empty p {
  max-width: 620px;
  margin: 7px auto 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.6;
}

.action-table {
  min-width: 1380px;
}

.action-table th:nth-child(1) { min-width: 170px; }
.action-table th:nth-child(2) { min-width: 210px; }
.action-table th:nth-child(3) { min-width: 180px; }
.action-table th:nth-child(4) { min-width: 270px; }
.action-table th:nth-child(5) { min-width: 240px; }
.action-table th:nth-child(6) { min-width: 150px; }
.action-table th:nth-child(7) { min-width: 150px; }
.action-table th:nth-child(8) { min-width: 100px; }

.action-table td {
  line-height: 1.55;
  vertical-align: top;
  white-space: normal;
}

.action-product,
.action-metric-list,
.action-evidence-list,
.action-owner {
  display: grid;
  gap: 3px;
}

.action-product strong {
  color: var(--text);
}

.action-product span,
.action-product small,
.action-evidence-list,
.action-owner {
  color: var(--text-muted);
  font-size: 10px;
}

.action-status {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 11px;
}

.action-card-list {
  display: none;
}

.action-flow {
  display: grid;
  grid-template-columns: minmax(220px, 0.3fr) minmax(0, 1fr);
  gap: 12px 24px;
  padding: 18px;
}

.action-flow ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.action-flow li {
  display: grid;
  gap: 5px;
  min-height: 74px;
  align-content: start;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
}

.action-flow li span {
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 750;
}

.action-flow li strong {
  font-size: 11px;
  line-height: 1.45;
}

.action-flow > p {
  grid-column: 2;
}

.action-detail__content {
  display: grid;
  gap: 10px;
  max-height: 58vh;
  padding: 0 18px 18px;
  overflow-y: auto;
}

.action-detail__content section {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
}

.action-detail__content h3 {
  margin-bottom: 6px;
  font-size: 12px;
}

.action-detail__list {
  display: grid;
  gap: 4px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.55;
}

.modal.modal--workflow {
  width: min(940px, calc(100vw - 32px));
}

.modal--workflow .modal__card--wide {
  width: 100%;
}

.workflow-demo {
  gap: 16px;
}

.workflow-demo__warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #efd4a4;
  border-radius: 6px;
  background: var(--warning-soft);
  color: #72501b;
  font-size: 11px;
  line-height: 1.55;
}

.workflow-demo__warning strong {
  flex: 0 0 auto;
}

.workflow-stepper {
  display: grid;
  grid-auto-columns: minmax(116px, 1fr);
  grid-auto-flow: column;
  gap: 7px;
  margin: 0;
  padding: 0 0 5px;
  overflow-x: auto;
  list-style: none;
}

.workflow-stepper li {
  display: grid;
  min-height: 58px;
  align-content: center;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 10px;
}

.workflow-stepper li span {
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.workflow-stepper li strong {
  color: inherit;
  font-size: 11px;
}

.workflow-stepper li.is-current {
  border-color: #f1b798;
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.workflow-stepper li.is-complete {
  border-color: #bde5d4;
  background: var(--success-soft);
  color: var(--success);
}

.workflow-demo__content {
  display: grid;
  gap: 12px;
}

.workflow-stage-head,
.workflow-card,
.workflow-summary,
.workflow-receipt {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.workflow-stage-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  background: var(--surface-muted);
}

.workflow-stage-head h3 {
  margin-top: 4px;
  font-size: 16px;
}

.workflow-stage-head p,
.workflow-card p,
.workflow-summary p,
.workflow-receipt p {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.6;
}

.workflow-card h4,
.workflow-summary h4,
.workflow-receipt h4,
.workflow-timeline h3 {
  font-size: 12px;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.workflow-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.workflow-facts div {
  min-width: 0;
  padding: 9px;
  border-radius: 5px;
  background: var(--surface-muted);
}

.workflow-facts dt {
  color: var(--text-soft);
  font-size: 9px;
}

.workflow-facts dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 11px;
  font-weight: 680;
}

.workflow-checks,
.workflow-options,
.workflow-channel-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.workflow-checks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workflow-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-checks label,
.workflow-options label,
.workflow-channel-list article {
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
}

.workflow-options label {
  display: grid;
  cursor: pointer;
}

.workflow-options label:has(input:checked) {
  border-color: #f1b798;
  background: var(--orange-soft);
}

.workflow-options label span {
  color: var(--text-muted);
  font-size: 10px;
}

.workflow-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.workflow-form-grid .field--full {
  grid-column: 1 / -1;
}

.workflow-summary {
  border-color: #bde5d4;
  background: var(--success-soft);
}

.workflow-summary.is-warning {
  border-color: #efd4a4;
  background: var(--warning-soft);
}

.workflow-receipt {
  border-style: dashed;
  border-color: #c7d7ef;
  background: var(--info-soft);
}

.workflow-timeline {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
}

.workflow-timeline__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.workflow-timeline__head > span {
  color: var(--text-soft);
  font-size: 10px;
}

.workflow-timeline ol {
  display: grid;
  max-height: 150px;
  gap: 6px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.workflow-timeline li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.5;
}

.workflow-timeline li strong {
  color: var(--text);
  font-size: 10px;
}

.workflow-demo__actions {
  position: sticky;
  bottom: -20px;
  z-index: 4;
  align-items: center;
  margin: 0 -20px -20px;
  padding: 12px 20px;
  background: rgb(255 255 255 / 98%);
}

#action-demo-primary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.table-meta {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
}

.table-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

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

.legend-swatch--company {
  background: var(--orange);
}

.legend-swatch--franchise {
  background: var(--info);
}

.table-shell {
  width: 100%;
  max-height: 610px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #c8cdd5 #f3f4f6;
}

.table-shell:focus-visible {
  outline-offset: -3px;
}

.data-table {
  width: max-content;
  min-width: 1780px;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.data-table.table--top {
  min-width: 2360px;
}

.data-table th,
.data-table td {
  height: 42px;
  padding: 7px 9px;
  border-right: 1px solid #f0f2f5;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-size: 11px;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 38px;
  background: #f3f5f7;
  color: #4f5662;
  font-weight: 650;
}

.data-table tbody tr:hover td {
  background: #fffaf7;
}

.data-table tbody tr.row--target-missing td {
  background: var(--danger-soft);
}

.data-table tbody tr.row--target-missing td:first-child {
  box-shadow: inset 4px 0 var(--danger);
}

.data-table tbody tr.row--target-missing:hover td {
  background: #ffe7e5;
}

.data-table tbody tr.row--target-missing .action-column {
  color: var(--danger);
}

.data-table th:first-child,
.data-table td:first-child {
  padding-left: 12px;
}

.data-table th:last-child,
.data-table td:last-child {
  border-right: 0;
}

.data-table .text-cell,
.data-table .suggestion-cell,
.data-table .decision-cell,
.data-table .action-column,
.sort-button.is-text {
  text-align: left;
}

.data-table .text-cell {
  min-width: 112px;
}

.data-table .suggestion-cell {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  line-height: 1.45;
  white-space: normal;
}

.data-table .decision-cell {
  min-width: 120px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table .company-cell {
  background: #fffaf7;
}

.data-table .franchise-cell {
  background: #f8faff;
}

.data-table tbody tr:hover .company-cell {
  background: #fff5ef;
}

.data-table tbody tr:hover .franchise-cell {
  background: #f1f5ff;
}

.data-table .action-column {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 128px;
  border-left: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: -6px 0 9px rgb(32 36 44 / 4%);
}

.data-table th.action-column {
  z-index: 5;
  background: #f3f5f7;
}

.sort-button {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 650;
}

.sort-button.is-text {
  justify-content: flex-start;
}

.sort-button::after {
  color: #a1a7b0;
  content: "↕";
  font-size: 10px;
}

.sort-button[data-direction="asc"]::after {
  color: var(--orange-dark);
  content: "↑";
}

.sort-button[data-direction="desc"]::after {
  color: var(--orange-dark);
  content: "↓";
}

.metric-positive {
  color: var(--success);
  font-weight: 650;
}

.metric-negative {
  color: var(--danger);
  font-weight: 650;
}

.metric-missing {
  color: var(--warning);
  font-size: 10px;
}

.decision-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 650;
}

.product-image,
.product-image--missing {
  width: 34px;
  height: 34px;
  border-radius: 5px;
}

.product-image {
  display: block;
  border: 1px solid var(--border);
  object-fit: cover;
}

.product-image--missing {
  display: inline-grid;
  place-items: center;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 9px;
}

.table-message {
  width: 100%;
  height: 180px !important;
  text-align: center !important;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 36px;
}

.empty-state strong {
  font-size: 14px;
}

.empty-state span {
  color: var(--text-muted);
  font-size: 12px;
}

.pagination {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 11px;
}

.page-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.page-size select {
  width: 82px;
  height: 30px;
}

.pagination__buttons {
  display: flex;
  gap: 6px;
}

.narrative {
  padding: 14px 16px;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
}

.narrative__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.narrative__heading h3 {
  margin-top: 2px;
  font-size: 15px;
}

.narrative__content {
  margin-top: 10px;
  color: #3f4651;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.narrative__footnote {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
}

.modal {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  box-shadow: var(--shadow-modal);
}

.modal::backdrop {
  background: rgb(32 36 44 / 44%);
}

.modal__card {
  display: grid;
  max-height: calc(100vh - 48px);
  gap: 14px;
  padding: 20px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.modal__card--wide {
  width: min(720px, calc(100vw - 32px));
}

.modal__head,
.modal__actions,
.fieldset-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal__head h2 {
  margin-top: 2px;
  font-size: 18px;
}

.modal__head p:not(.section-kicker) {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.icon-button,
.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.icon-button:hover,
.text-button:hover {
  color: var(--orange-dark);
}

.suggestion-box {
  padding: 12px 14px;
  border-left: 4px solid var(--info);
  background: var(--info-soft);
}

.suggestion-box h3 {
  color: #2757ad;
  font-size: 12px;
}

.suggestion-box > p {
  margin-top: 6px;
  color: #35425a;
  font-size: 13px;
}

.suggestion-box .suggestion-box__note {
  color: #697690;
  font-size: 11px;
}

.choice-group,
.export-fields {
  padding: 0;
  border: 0;
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-group legend {
  width: 100%;
  margin-bottom: 6px;
}

.choice-group label,
.checkbox-grid label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 12px;
}

.choice-group label:hover,
.checkbox-grid label:hover {
  border-color: #ffc1a8;
  background: #fffaf7;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--orange);
}

.fieldset-heading {
  align-items: center;
  margin-bottom: 8px;
}

.fieldset-heading > div {
  display: flex;
  gap: 10px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.checkbox-grid label {
  min-width: 0;
  overflow: hidden;
}

.checkbox-grid span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-note {
  padding: 10px 12px;
  border-left: 4px solid var(--warning);
  background: var(--warning-soft);
  color: #765018;
  font-size: 11px;
  line-height: 1.6;
}

.form-error {
  padding: 9px 11px;
  border-radius: 6px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12px;
}

.modal__actions {
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px;
  border: 1px solid #bfe3d0;
  border-radius: var(--radius);
  background: var(--success-soft);
  color: #176c48;
  box-shadow: 0 10px 30px rgb(32 36 44 / 14%);
  font-size: 12px;
}

.toast.is-error {
  border-color: #f2caca;
  background: var(--danger-soft);
  color: var(--danger);
}

@media (max-width: 1080px) {
  .todo-scope-grid {
    grid-template-columns: 1fr 1fr;
  }

  .industry-readiness {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transfer-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .action-summary {
    grid-template-columns: 1fr 1fr;
  }

  .action-flow ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rule-parameter-list {
    grid-template-columns: 1fr 1fr;
  }

  .app-frame {
    grid-template-columns: 190px minmax(0, 1fr);
  }

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

  .sync-card {
    display: grid;
    grid-template-columns: minmax(230px, 0.7fr) minmax(300px, 1fr);
    align-items: center;
    gap: 14px;
  }

  .sync-card__meta,
  .sync-card__message {
    margin-top: 0;
  }

  .sync-card__message {
    grid-column: 2;
  }

  .filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .date-filter-group {
    grid-column: 1 / -1;
  }

  .filter-submit {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .button,
  .tab-button,
  .date-presets button,
  .field input,
  .field select,
  .page-size select {
    min-height: 44px;
  }

  .industry-readiness,
  .industry-governance {
    grid-template-columns: 1fr;
  }

  .todo-hold,
  .todo-scope-grid,
  .todo-boundary,
  .todo-boundary-grid,
  .todo-readiness {
    grid-template-columns: 1fr;
  }

  .todo-demo-workspace__head {
    align-items: stretch;
    flex-direction: column;
  }

  .todo-demo-counts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .todo-demo-filters {
    grid-template-columns: 1fr 1fr;
  }

  .todo-demo-filters .field--search,
  .todo-demo-filters > .button {
    grid-column: 1 / -1;
  }

  .todo-task-list {
    grid-template-columns: 1fr;
  }

  #todo-demo-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    margin-left: 0;
  }

  .industry-panel,
  .industry-empty-state {
    padding: 18px;
  }

  .readiness-card p {
    min-height: 0;
  }

  .rules-hero,
  .rules-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .rules-search {
    width: 100%;
  }

  .rule-group,
  .rules-integration-note,
  .rule-governance,
  .rule-change-flow,
  .rule-constraint-panel {
    grid-template-columns: 1fr;
  }

  .rule-change-flow ol {
    grid-template-columns: 1fr 1fr;
  }

  .transfer-boundary {
    grid-template-columns: 1fr;
  }

  .transfer-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .action-readiness,
  .action-topic-intro,
  .action-flow {
    grid-template-columns: 1fr;
  }

  .action-workspace__head {
    align-items: stretch;
    flex-direction: column;
  }

  .action-workspace__head .tab-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .action-filters {
    grid-template-columns: 1fr 1fr;
  }

  .action-table-shell {
    display: none;
  }

  .action-card-list:not([hidden]) {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .action-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .action-card__head,
  .action-card__foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .action-card__head .action-product,
  .action-card__foot > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .action-card__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .action-card__metrics span {
    padding: 8px;
    border-radius: 5px;
    background: var(--surface-muted);
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.45;
  }

  .action-card__suggestion {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .action-card__foot {
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 10px;
  }

  .action-card .button--small {
    min-height: 44px;
    flex: 0 0 auto;
  }

  .action-flow > p {
    grid-column: auto;
  }

  .modal--workflow {
    width: 100vw;
  }

  .workflow-demo__warning,
  .workflow-stage-head {
    grid-template-columns: 1fr;
  }

  .workflow-demo__warning {
    display: grid;
  }

  .workflow-facts,
  .workflow-grid,
  .workflow-grid--three,
  .workflow-options {
    grid-template-columns: 1fr 1fr;
  }

  .workflow-demo__actions {
    bottom: -16px;
    flex-wrap: wrap;
    margin: 0 -12px -16px;
    padding: 12px;
  }

  #action-demo-primary-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    margin-left: 0;
  }

  .workflow-timeline li {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .workflow-timeline li span:last-child {
    grid-column: 2;
  }

  .app-frame {
    display: block;
  }

  .module-sidebar {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    padding: 10px 12px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .module-brand {
    min-height: 38px;
    padding: 0 0 9px;
  }

  .module-brand__mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .module-nav__label,
  .module-scope {
    display: none;
  }

  .module-nav {
    display: flex;
    gap: 6px;
    padding-top: 9px;
    overflow-x: auto;
  }

  .module-nav__item {
    min-height: 34px;
    flex: 0 0 auto;
    padding: 6px 10px;
  }

  .module-nav__item.is-disabled {
    display: none;
  }

  .app-topbar {
    position: static;
    min-height: 0;
    align-items: flex-start;
    padding: 12px;
  }

  .title-line {
    flex-wrap: wrap;
    gap: 6px;
  }

  .title-line h1 {
    width: 100%;
    font-size: 18px;
  }

  .header-copy {
    display: none;
  }

  .connection-state {
    max-width: 132px;
    min-height: 28px;
    padding: 5px 8px;
  }

  .connection-state span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-shell {
    gap: 14px;
    padding: 12px 12px 28px;
  }

  .notice,
  .section-heading,
  .workspace-head,
  .analysis-intro,
  .narrative__heading {
    align-items: stretch;
    flex-direction: column;
  }

  .notice .button {
    width: 100%;
  }

  .status-updated {
    align-self: flex-start;
  }

  .sync-card {
    display: block;
  }

  .sync-card__meta,
  .sync-card__message {
    margin-top: 10px;
  }

  .workspace-actions,
  .tab-list {
    width: 100%;
  }

  .tab-button,
  .workspace-actions .button {
    flex: 1 1 0;
  }

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .date-filter-group {
    grid-template-columns: 1fr 1fr;
  }

  .date-presets,
  .date-filter-note {
    grid-column: 1 / -1;
  }

  .field--search,
  .filter-submit {
    grid-column: 1 / -1;
  }

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

  .summary-card {
    padding: 10px 11px;
  }

  .summary-card__value {
    font-size: 18px;
  }

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

  .table-legend {
    justify-content: flex-start;
  }

  .table-shell {
    max-height: 520px;
  }

  .data-table th,
  .data-table td {
    height: 40px;
    padding: 6px 8px;
  }

  .pagination {
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .pagination__buttons {
    width: 100%;
  }

  .pagination__buttons .button {
    flex: 1 1 0;
  }

  .narrative__heading .button {
    width: 100%;
  }

  .modal {
    width: 100vw;
    max-width: 100vw;
    max-height: calc(100vh - 12px);
    margin: auto 0 0;
    border-radius: 8px 8px 0 0;
  }

  .modal__card,
  .modal__card--wide {
    width: 100%;
    max-height: calc(100vh - 12px);
    padding: 16px 12px;
    border-radius: 8px 8px 0 0;
  }

  .choice-group,
  .checkbox-grid {
    grid-template-columns: 1fr 1fr;
  }

  .choice-group {
    display: grid;
  }

  .choice-group legend {
    grid-column: 1 / -1;
  }

  .modal__actions .button {
    flex: 1 1 0;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
  }
}

@media (max-width: 420px) {
  .industry-panel,
  .industry-empty-state,
  .industry-governance {
    padding: 14px;
  }

  .industry-empty-state h2 {
    font-size: 18px;
  }

  .rules-hero,
  .rules-toolbar,
  .rule-group,
  .rules-integration-note,
  .rule-parameters__head,
  .rule-parameter-groups,
  .rule-governance,
  .rule-change-flow {
    padding: 14px;
  }

  .rules-summary {
    grid-template-columns: 1fr 1fr;
  }

  .rule-parameters__head,
  .rule-parameter-list,
  .rule-guardrail-list,
  .rule-change-flow ol,
  .rule-constraint-panel ul {
    grid-template-columns: 1fr;
  }

  .rule-parameter-count {
    min-width: 0;
  }

  .transfer-boundary,
  .transfer-toolbar {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .action-readiness,
  .action-topic-intro,
  .action-flow {
    padding: 14px;
  }

  .action-summary {
    gap: 8px;
  }

  .action-summary article {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .action-summary strong {
    grid-row: auto;
    grid-column: auto;
    font-size: 20px;
  }

  .action-filters,
  .action-flow ol {
    grid-template-columns: 1fr;
  }

  .action-card__metrics {
    grid-template-columns: 1fr;
  }

  .workflow-facts,
  .workflow-grid,
  .workflow-grid--three,
  .workflow-checks,
  .workflow-options,
  .workflow-form-grid,
  #action-demo-primary-actions {
    grid-template-columns: 1fr;
  }

  .workflow-form-grid .field--full {
    grid-column: auto;
  }

  .workflow-demo__actions > .button {
    flex: 1 1 calc(50% - 4px);
  }

  .todo-demo-filters,
  .todo-task-card__product,
  #todo-demo-actions {
    grid-template-columns: 1fr;
  }

  .todo-demo-filters .field--search,
  .todo-demo-filters > .button {
    grid-column: auto;
  }

  .app-topbar {
    gap: 8px;
  }

  .breadcrumb,
  .context-badge {
    font-size: 10px;
  }

  .connection-state {
    max-width: 112px;
  }

  .workspace-head,
  .analysis-intro,
  .filter-bar,
  .analysis-panel,
  .narrative,
  .sync-card,
  .summary-card,
  .notice {
    border-radius: 6px;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .date-filter-group {
    grid-template-columns: 1fr;
  }

  .date-presets,
  .date-filter-note {
    grid-column: auto;
  }

  .field--search,
  .filter-submit {
    grid-column: auto;
  }

  .workspace-actions {
    flex-direction: column;
  }

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgb(238 118 56 / 10%), transparent 34rem),
    var(--surface-muted);
}

.auth-shell,
.account-shell {
  width: min(100% - 32px, 1080px);
  margin: 0 auto;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 0;
}

.auth-card {
  width: min(100%, 440px);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-modal);
}

.auth-card h1 {
  margin-top: 7px;
  font-size: 28px;
}

.auth-card h2 {
  font-size: 20px;
}

.auth-brand {
  width: fit-content;
  margin-bottom: 28px;
  padding: 7px 10px;
  border-radius: 4px;
  background: var(--text);
  color: white;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.auth-copy,
.account-header p,
.initial-password p {
  color: var(--text-muted);
  line-height: 1.65;
}

.auth-copy {
  margin-top: 8px;
}

.site-filing {
  color: #686f7b;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.site-filing a {
  color: inherit;
  text-underline-offset: 3px;
}

.site-filing a:hover,
.site-filing a:focus-visible {
  color: var(--text);
}

.site-filing--auth {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.site-filing--sidebar {
  margin-top: auto;
  padding: 18px 4px 2px;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.auth-form .field {
  display: grid;
  gap: 7px;
}

.auth-form .field input,
.auth-form .field select {
  width: 100%;
  min-height: 46px;
}

.auth-submit {
  width: 100%;
  min-height: 46px;
}

.auth-notice,
.initial-password {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border-left: 4px solid var(--orange);
  background: var(--orange-soft);
}

.auth-notice span,
.initial-password p {
  font-size: 12px;
}

.account-shell {
  padding: 32px 0 56px;
}

.account-header,
.account-list-heading,
.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.account-header {
  margin-bottom: 24px;
}

.account-header h1 {
  margin: 5px 0;
  font-size: 28px;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
  gap: 20px;
  align-items: start;
}

.account-grid .auth-card {
  width: 100%;
}

.account-list-card {
  min-height: 380px;
}

.account-list {
  display: grid;
  margin-top: 18px;
  border-top: 1px solid var(--border);
}

.account-row {
  min-height: 68px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.account-row > div {
  display: grid;
  gap: 5px;
}

.account-row span {
  color: var(--text-muted);
  font-size: 12px;
}

.initial-password {
  margin-top: 18px;
  overflow-wrap: anywhere;
}

.initial-password code {
  padding: 8px;
  border-radius: 4px;
  background: rgb(255 255 255 / 70%);
  font-size: 16px;
  user-select: all;
}

@media (max-width: 760px) {
  .auth-shell,
  .account-shell {
    width: min(100% - 24px, 1080px);
  }

  .auth-card {
    padding: 20px;
  }

  .account-header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .account-header .button,
  .account-row .button {
    min-height: 44px;
  }
}

.workday-page {
  display: grid;
  gap: 16px;
}

.workday-hero,
.workday-source,
.workday-insight,
.workday-boundary {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.workday-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  background: linear-gradient(135deg, #fffaf4 0%, #f8f3eb 100%);
}

.workday-hero h2,
.workday-source h2,
.workday-insight h2,
.workday-queue h2 {
  margin-top: 5px;
  font-size: 20px;
}

.workday-hero p:not(.section-kicker),
.workday-source p:not(.section-kicker),
.workday-queue .section-heading > p,
.workday-insight > p {
  margin-top: 7px;
  color: var(--text-muted);
  line-height: 1.65;
}

.workday-source {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  padding: 18px;
}

.workday-datasets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.workday-datasets article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
}

.workday-datasets span,
.workday-datasets small,
.workday-metrics span,
.workday-metrics small,
.workday-queue-grid span,
.workday-highlights span,
.workday-highlights small {
  color: var(--text-muted);
  font-size: 11px;
}

.workday-datasets strong {
  font-size: 13px;
}

.workday-datasets strong.is-success {
  color: var(--success);
}

.workday-datasets strong.is-warning {
  color: var(--warning);
}

.workday-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.workday-metrics article {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.workday-metrics strong {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  font-size: 24px;
}

.workday-queue {
  display: grid;
  gap: 14px;
}

.workday-queue .section-heading {
  align-items: end;
}

.workday-queue .section-heading > p {
  max-width: 520px;
  text-align: right;
}

.workday-queue-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.workday-queue-grid a {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.workday-queue-grid a:hover,
.workday-queue-grid a:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgb(84 60 38 / 10%);
  transform: translateY(-1px);
}

.workday-queue-grid strong {
  position: absolute;
  top: 14px;
  right: 14px;
  font-variant-numeric: tabular-nums;
  font-size: 24px;
  color: var(--orange-dark);
}

.workday-queue-grid h3 {
  margin-top: 13px;
  font-size: 16px;
}

.workday-queue-grid p {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.6;
}

.workday-insight {
  display: grid;
  grid-template-columns: minmax(200px, 0.35fr) minmax(240px, 0.65fr) minmax(340px, 1fr);
  gap: 20px;
  align-items: start;
  padding: 18px;
}

.workday-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.workday-highlights article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
}

.workday-highlights strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.workday-boundary {
  padding: 14px 16px;
}

.workday-boundary summary {
  cursor: pointer;
  font-weight: 700;
}

.workday-boundary ul {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 1050px) {
  .workday-metrics,
  .workday-queue-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workday-insight {
    grid-template-columns: 1fr 1fr;
  }

  .workday-insight > p {
    grid-column: 2;
  }

  .workday-highlights {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .workday-hero,
  .workday-source,
  .workday-insight {
    grid-template-columns: 1fr;
  }

  .workday-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .workday-source,
  .workday-insight {
    gap: 14px;
    padding: 14px;
  }

  .workday-datasets,
  .workday-metrics,
  .workday-queue-grid,
  .workday-highlights {
    grid-template-columns: 1fr;
  }

  .workday-queue .section-heading {
    align-items: start;
  }

  .workday-queue .section-heading > p {
    text-align: left;
  }

  .workday-insight > p,
  .workday-highlights {
    grid-column: auto;
  }
}
