:root {
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: #20262d;
  background: #f3f5f7;
  --ink: #20262d;
  --background: #f3f5f7;
  --brand: #941f2c;
  --brand-strong: #731721;
  --gold: #b88a36;
  --success: #23745d;
  --warning: #b56a16;
  --danger: #b33939;
  --muted: #667382;
  --line: #dfe4e8;
  --surface: #fff;
  --surface-soft: #f7f8fa;
  --context-text: #52606e;
  --text-secondary: #536171;
  --text-tertiary: #5f6d7b;
  --attention-text: #674b16;
  --attention-surface: #fff9eb;
  --chart-axis: #cbd3da;
  --student-success-text: #175b48;
  --student-success-surface: #f0f8f5;
  --student-success-border: #a9c9bd;
  --student-control-border: #aeb8c1;
  --student-error-text: #9f2727;
  --radius: 6px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--background);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  min-height: 40px;
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  color: var(--surface);
  background: var(--brand);
  cursor: pointer;
}

button:active {
  background: var(--brand-strong);
  transform: translateY(1px);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--surface);
  background: var(--brand-strong);
  transform: translateY(-150%);
}

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

.app-shell {
  width: min(100% - 32px, 1120px);
  margin: 0 auto;
  padding: 56px 0;
}

.app-shell__intro {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.app-shell h1 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.35;
}

.app-shell p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.dashboard {
  width: min(100% - 40px, 1240px);
  margin: 0 auto;
  padding: 36px 0 56px;
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 24px;
}

.dashboard-header__copy {
  max-width: 70ch;
}

.dashboard-header__context {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--context-text);
  font-size: 0.8125rem;
  font-weight: 600;
}

.demo-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid #d7c08e;
  border-radius: 999px;
  color: var(--attention-text);
  background: var(--attention-surface);
}

.dashboard-header h1 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.3;
  text-wrap: balance;
}

.dashboard-header__copy > p {
  max-width: 62ch;
  margin: 10px 0 0;
  color: var(--text-secondary);
  line-height: 1.65;
  text-wrap: pretty;
}

.dashboard-header__scope {
  display: grid;
  flex: 0 0 auto;
  gap: 4px;
  margin: 0;
  color: var(--context-text);
  font-size: 0.8125rem;
  text-align: right;
}

.dashboard-header__scope strong {
  color: var(--ink);
  font-size: 0.875rem;
}

.metric-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.metric-grid {
  margin-bottom: 16px;
}

.metric-panel,
.dashboard-panel,
.governance-insight {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric-panel {
  grid-column: span 3;
  min-width: 0;
  padding: 20px;
}

.metric-panel p {
  margin: 0;
}

.metric-panel__label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
}

.metric-panel__value {
  margin-top: 10px !important;
  color: var(--ink);
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.metric-panel__comparison {
  margin-top: 8px !important;
  color: #596777;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.dashboard-panel,
.governance-insight {
  min-width: 0;
  padding: 20px;
}

.dashboard-panel--trend {
  grid-column: span 7;
}

.dashboard-panel--categories {
  grid-column: span 5;
}

.dashboard-panel--departments {
  grid-column: span 7;
}

.dashboard-panel--priority {
  grid-column: span 5;
}

.governance-insight {
  grid-column: 1 / -1;
  background: #fbf8f1;
}

.dashboard-panel__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.dashboard-panel__eyebrow {
  margin: 0 0 5px;
  color: #775b25;
  font-size: 0.75rem;
  font-weight: 700;
}

.dashboard-panel h2,
.governance-insight h2 {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.4;
  text-wrap: balance;
}

.dashboard-panel__note {
  flex: 0 0 auto;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  line-height: 1.5;
}

.trend-figure {
  margin: 0;
}

.trend-chart {
  position: relative;
  min-height: 260px;
  padding: 24px 0 30px 40px;
}

.trend-chart::before {
  position: absolute;
  inset: 24px 0 30px 40px;
  border-bottom: 1px solid var(--chart-axis);
  border-left: 1px solid var(--chart-axis);
  content: "";
}

.trend-chart__plot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(30, minmax(8px, 1fr));
  align-items: end;
  gap: 3px;
  height: 206px;
  margin: 0;
  padding: 0 72px 0 8px;
  list-style: none;
}

.trend-chart__point {
  display: grid;
  grid-template-rows: 18px 1fr 20px;
  align-items: end;
  min-width: 0;
  height: 226px;
  color: #4f5d6b;
  font-size: 0.6875rem;
  text-align: center;
}

.trend-chart__value {
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}

.trend-chart__bar {
  width: min(100%, 22px);
  height: var(--bar-size);
  min-height: 4px;
  margin: 0 auto;
  border-radius: 2px 2px 0 0;
  background: #a13a47;
}

.trend-chart__date {
  padding-top: 6px;
  white-space: nowrap;
}

.trend-chart__axis-label {
  position: absolute;
  color: var(--text-tertiary);
  font-size: 0.6875rem;
}

.trend-chart__axis-label--y {
  top: 0;
  left: 0;
}

.trend-chart__axis-label--x {
  right: 0;
  bottom: 0;
}

.category-ranking {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-ranking__line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 7px;
  font-size: 0.875rem;
}

.category-ranking__name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  font-weight: 600;
}

.category-ranking__rank {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #5d6874;
  background: #eef1f3;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.category-ranking__value {
  flex: 0 0 auto;
  color: #34414e;
  font-variant-numeric: tabular-nums;
}

.category-ranking__value span {
  color: #657280;
}

.category-ranking__track {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 3px;
  background: #edf0f2;
}

.category-ranking__bar {
  display: block;
  width: var(--bar-size);
  height: 100%;
  border-radius: inherit;
  background: #866d3b;
}

.department-table-wrap {
  overflow-x: auto;
}

.department-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.department-table th,
.department-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e7eaed;
  text-align: right;
  white-space: nowrap;
}

.department-table thead th {
  color: var(--text-secondary);
  background: var(--surface-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.department-table th:first-child {
  text-align: left;
}

.department-table tbody th {
  color: #2c3742;
  font-weight: 600;
}

.department-table tbody tr:last-child th,
.department-table tbody tr:last-child td {
  border-bottom: 0;
}

.status-label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid #dbc38f;
  border-radius: 999px;
  color: var(--attention-text);
  background: var(--attention-surface);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-label--resolved {
  border-color: #a9c9bd;
  color: #175b48;
  background: #f0f8f5;
}

.priority-item__id {
  margin: 0 0 8px;
  color: #64717f;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.priority-item h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.priority-item__location,
.priority-item__owner,
.priority-item__empty {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.priority-item__action {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 4px;
  color: #3f321b;
  background: #f8f1e1;
  font-size: 0.875rem;
  line-height: 1.55;
}

.governance-insight p:last-child {
  max-width: 75ch;
  margin: 10px 0 0;
  color: #3e4852;
  line-height: 1.7;
  text-wrap: pretty;
}

.student-stage {
  min-height: 100vh;
  padding: 32px 16px;
  background: #e9edf0;
}

.phone-surface {
  width: 100%;
  max-width: 390px;
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 4px 8px rgb(32 38 45 / 12%);
}

.student-header {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}

.student-brand p,
.student-brand h1,
.student-login-status,
.student-identity {
  margin: 0;
}

.student-brand p {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
}

.student-brand h1 {
  margin-top: 4px;
  font-size: 1.375rem;
  line-height: 1.35;
  text-wrap: balance;
}

.student-login-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--student-success-text);
  font-size: 0.8125rem;
  font-weight: 600;
}

.student-login-status span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
}

.student-identity {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e8ebee;
}

.student-identity div {
  display: grid;
  gap: 3px;
}

.student-identity dt {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.student-identity dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.student-content {
  padding: 24px 20px 28px;
}

.student-section-heading {
  margin-bottom: 22px;
}

.student-section-heading--split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.student-section-heading h2,
.student-result h2,
.student-reply h3 {
  margin: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.student-section-heading h2,
.student-result h2 {
  font-size: 1.25rem;
}

.student-section-heading p,
.student-result > p,
.student-reply p {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.student-field {
  min-width: 0;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.student-required-note {
  margin: -10px 0 18px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.student-error-summary {
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  background: #fff7f7;
}

.student-error-summary h3 {
  margin: 0;
  color: var(--student-error-text);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.student-error-summary ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.student-error-summary a {
  color: var(--student-error-text);
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.student-field label,
.student-field legend {
  display: block;
  margin-bottom: 7px;
  color: #303a44;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
}

.student-field__optional {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 400;
}

.student-stage button,
.student-stage input,
.student-stage select,
.student-stage textarea {
  min-height: 44px;
}

.student-field input,
.student-field select,
.student-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--student-control-border);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.5;
}

.student-field textarea {
  min-height: 92px;
  resize: vertical;
}

.student-field input::placeholder,
.student-field textarea::placeholder {
  color: #5c6976;
  opacity: 1;
}

.student-field [aria-invalid="true"] {
  border-color: var(--danger);
}

.student-field__error,
.student-field__hint,
.student-upload__status {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.student-field__error {
  color: var(--student-error-text);
  font-weight: 600;
}

.student-field__hint,
.student-upload__status {
  color: var(--text-secondary);
}

.student-upload--success {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.student-upload__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 786 / 258;
}

.student-upload__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.student-upload__meta p {
  min-width: 0;
  margin: 0;
  color: var(--student-success-text);
  font-size: 0.8125rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.student-button {
  padding: 10px 15px;
  font-weight: 600;
  line-height: 1.4;
}

.student-button--primary,
.student-button--full {
  width: 100%;
}

.student-button--secondary {
  border-color: #9aa6b1;
  color: #313c47;
  background: var(--surface);
}

.student-button--secondary:hover {
  background: #f1f3f5;
}

.student-button--text {
  min-height: 44px;
  padding: 7px 4px;
  border: 0;
  color: var(--brand-strong);
  background: transparent;
}

.student-button:disabled {
  border-color: #cbd2d8;
  color: #596572;
  background: #e9edf0;
  cursor: wait;
}

.student-result {
  text-align: center;
}

.student-result__mark {
  display: inline-grid;
  min-height: 34px;
  margin: 0 0 14px !important;
  padding: 6px 12px;
  place-items: center;
  border: 1px solid var(--student-success-border);
  border-radius: 999px;
  color: var(--student-success-text) !important;
  background: var(--student-success-surface);
  font-weight: 700;
}

.student-summary {
  margin: 24px 0;
  border-top: 1px solid var(--line);
  text-align: left;
}

.student-summary div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.student-summary dt {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.student-summary dd {
  min-width: 0;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.student-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid #dbc38f;
  border-radius: 999px;
  color: var(--attention-text);
  background: var(--attention-surface);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.student-status--review,
.student-status--resolved {
  border-color: var(--student-success-border);
  color: var(--student-success-text);
  background: var(--student-success-surface);
}

.student-actions {
  display: grid;
  gap: 10px;
}

.student-guided-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  color: var(--context-text);
  background: var(--surface-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.student-timeline {
  display: grid;
  gap: 0;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.student-timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  min-height: 68px;
}

.student-timeline__item:not(:last-child)::after {
  position: absolute;
  top: 30px;
  bottom: 0;
  left: 14px;
  width: 2px;
  background: #cbd2d8;
  content: "";
}

.student-timeline__item--completed:not(:last-child)::after {
  background: var(--success);
}

.student-timeline__marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid var(--student-control-border);
  border-radius: 50%;
  color: #4d5a67;
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 700;
}

.student-timeline__item--completed .student-timeline__marker {
  border-color: var(--success);
  color: var(--student-success-text);
}

.student-timeline__item--current .student-timeline__marker {
  border-color: var(--brand);
  color: var(--surface);
  background: var(--brand);
}

.student-timeline__item div {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  padding-top: 4px;
}

.student-timeline__item strong {
  font-size: 0.875rem;
}

.student-timeline__item div span {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.student-timeline__item--current div span {
  color: var(--brand-strong);
  font-weight: 700;
}

.student-reply {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.student-reply h3 {
  font-size: 0.9375rem;
}

.student-sms {
  margin: 0 0 18px;
  color: #3f4b56;
  font-size: 0.8125rem;
  line-height: 1.55;
  text-align: left;
  overflow-wrap: anywhere;
}

.student-rating {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin: 24px 0;
}

.student-rating__button {
  min-width: 0;
  padding: 7px 3px;
  border-color: #9aa6b1;
  color: var(--ink);
  background: var(--surface);
  font-size: 1rem;
  font-weight: 700;
}

.student-rating__button:hover,
.student-rating__button:focus-visible {
  border-color: var(--brand);
  color: var(--brand-strong);
  background: #fbf3f4;
}

.student-rating-result {
  color: var(--ink) !important;
  font-size: 1rem !important;
  font-weight: 700;
}

.workbench {
  width: min(100% - 40px, 1320px);
  margin: 0 auto;
  padding: 28px 0 48px;
}

.workbench button,
.workbench input,
.workbench select,
.workbench textarea {
  min-height: 40px;
  border-radius: var(--radius);
}

.workbench-header,
.workbench-toolbar__summary,
.workbench-detail__heading,
.workbench-row__top,
.workbench-row__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.workbench-header {
  margin-bottom: 18px;
}

.workbench-header p,
.workbench-header h1,
.workbench-detail__heading h2,
.workbench-detail__heading p,
.workbench-detail h3,
.workbench-detail__copy p,
.workbench-responsibility p,
.workbench-closure p {
  margin: 0;
}

.workbench-header > div > p,
.workbench-header > p,
.workbench-row__category,
.workbench-row__meta,
.workbench-row__sla,
.workbench-detail__muted {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.workbench-header h1 {
  margin-top: 4px;
  font-size: 1.625rem;
  line-height: 1.3;
}

.workbench-notice,
.workbench-error-summary {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--student-success-border);
  border-radius: var(--radius);
  color: var(--student-success-text);
  background: var(--student-success-surface);
}

.workbench-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(132px, 1fr));
  gap: 10px 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.workbench-field,
.workbench-reply {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.workbench-field label,
.workbench-reply label {
  color: var(--context-text);
  font-size: 0.8125rem;
  font-weight: 700;
}

.workbench-field input,
.workbench-field select,
.workbench-reply textarea {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--student-control-border);
  color: var(--ink);
  background: var(--surface);
}

.workbench-toolbar__summary {
  grid-column: 1 / -1;
  min-height: 40px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.workbench-toolbar__summary p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 700;
}

.workbench-button {
  min-height: 40px;
  padding: 8px 14px;
  font-weight: 700;
}

.workbench-button--quiet,
.workbench-button--secondary {
  border-color: var(--student-control-border);
  color: var(--ink);
  background: var(--surface);
}

.workbench-button--quiet:hover,
.workbench-button--secondary:hover {
  border-color: var(--brand);
  color: var(--brand-strong);
  background: #fbf5f6;
}

.workbench-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.7fr);
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}

.workbench-list-panel,
.workbench-detail,
.workbench-empty {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.workbench-list-panel {
  min-width: 0;
}

.workbench-list {
  max-height: clamp(240px, calc(100dvh - 250px), 680px);
  padding: 8px;
  margin: 0;
  overflow-y: auto;
  list-style: none;
}

.workbench-list li + li {
  margin-top: 6px;
}

.workbench-row {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 7px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.workbench-row:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.workbench-row[aria-current="true"] {
  border: 1px solid #c4979c;
  color: var(--ink);
  background: #fbf3f4;
}

.workbench-row:active {
  color: var(--ink);
  background: #f6eaec;
}

.workbench-row__top strong {
  font-size: 0.875rem;
}

.workbench-row__top > span,
.workbench-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--context-text);
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 700;
}

.workbench-row__description {
  overflow: hidden;
  font-size: 0.875rem;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-row__meta {
  align-items: flex-start;
}

.workbench-row__sla {
  font-weight: 700;
}

.workbench-detail {
  min-width: 0;
  padding: 20px;
}

.workbench-detail__heading {
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.workbench-detail__heading h2 {
  font-size: 1.25rem;
}

.workbench-detail__heading p {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.workbench-status--review,
.workbench-status--resolved {
  border-color: var(--student-success-border);
  color: var(--student-success-text);
  background: var(--student-success-surface);
}

.workbench-detail__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 18px;
  padding: 16px 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.workbench-detail__meta div {
  min-width: 0;
}

.workbench-detail__meta dt {
  margin-bottom: 4px;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.workbench-detail__meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.875rem;
  font-weight: 700;
}

.workbench-detail__copy,
.workbench-attachment,
.workbench-process,
.workbench-responsibility,
.workbench-detail__actions {
  padding-top: 18px;
}

.workbench-detail h3 {
  margin-bottom: 8px;
  font-size: 0.9375rem;
}

.workbench-detail__copy p,
.workbench-closure p {
  max-width: 72ch;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.workbench-detail__copy p + h3 {
  margin-top: 14px;
}

.workbench-detail__muted,
.workbench-field-error {
  margin: 6px 0 0;
  line-height: 1.5;
}

.workbench-field-error {
  color: var(--student-error-text);
  font-size: 0.75rem;
  font-weight: 700;
}

.workbench-attachment img {
  display: block;
  width: min(100%, 786px);
  height: auto;
  aspect-ratio: 786 / 258;
  border-radius: var(--radius);
}

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

.workbench-timeline__item {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.workbench-timeline__item > span {
  display: inline-grid;
  flex: 0 0 26px;
  width: 26px;
  min-height: 26px;
  place-items: center;
  border: 1px solid var(--student-control-border);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.workbench-timeline__item div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.workbench-timeline__item strong,
.workbench-timeline__item small {
  overflow-wrap: anywhere;
  font-size: 0.75rem;
}

.workbench-timeline__item small,
.workbench-responsibility span {
  color: var(--text-secondary);
}

.workbench-responsibility p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px;
  background: var(--surface-soft);
  font-size: 0.875rem;
}

.workbench-reply textarea {
  resize: vertical;
}

.workbench-error-summary {
  border-color: #d8a4a4;
  color: var(--student-error-text);
  background: #fff5f5;
}

.workbench-error-summary p {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.workbench-button:disabled {
  border-color: #c8cfd5;
  color: #667382;
  background: #e8ecef;
  cursor: not-allowed;
  transform: none;
}

.workbench-closure {
  padding: 14px;
  background: var(--surface-soft);
}

.workbench-closure__state {
  margin-top: 8px !important;
  color: var(--student-success-text) !important;
  font-weight: 700;
}

.workbench-empty {
  margin-top: 16px;
  padding: 48px 20px;
  text-align: center;
}

.workbench-empty h2,
.workbench-empty p {
  margin: 0;
}

.workbench-empty h2 {
  font-size: 1.125rem;
}

.workbench-empty p {
  margin: 8px 0 18px;
  color: var(--text-secondary);
}

@media (max-width: 1000px) {
  .workbench-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workbench-field--search {
    grid-column: span 2;
  }

  .workbench-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .workbench-list {
    max-height: clamp(260px, calc(100dvh - 280px), 430px);
  }

  .metric-panel {
    grid-column: span 6;
  }

  .dashboard-panel--trend,
  .dashboard-panel--categories,
  .dashboard-panel--departments,
  .dashboard-panel--priority {
    grid-column: span 6;
  }

  .trend-chart__plot {
    gap: 4px;
  }

  .trend-chart__date {
    font-size: 0.625rem;
  }
}

@media (max-width: 900px) {
  .dashboard-panel--trend,
  .dashboard-panel--categories,
  .dashboard-panel--departments,
  .dashboard-panel--priority {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .dashboard {
    width: min(100% - 24px, 1240px);
    padding: 24px 0 40px;
  }

  .dashboard-header {
    display: block;
  }

  .dashboard-header__scope {
    margin-top: 16px;
    text-align: left;
  }

  .metric-panel {
    grid-column: 1 / -1;
  }

  .dashboard-panel,
  .governance-insight,
  .metric-panel {
    padding: 16px;
  }

  .trend-chart {
    min-height: 250px;
    padding-left: 30px;
    overflow-x: auto;
  }

  .trend-chart::before {
    width: 520px;
    inset: 24px auto 30px 30px;
  }

  .trend-chart__plot {
    width: 520px;
    padding-right: 8px;
  }

  .trend-chart__axis-label--x {
    display: none;
  }

  .department-table {
    min-width: 520px;
  }
}

@media (max-width: 600px) {
  .workbench {
    width: min(100% - 24px, 1320px);
    padding-top: 20px;
  }

  .workbench-header,
  .workbench-toolbar__summary,
  .workbench-row__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

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

  .workbench-field--search,
  .workbench-toolbar__summary {
    grid-column: auto;
  }

  .workbench-detail {
    padding: 16px;
  }

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

  .workbench-timeline {
    grid-template-columns: minmax(0, 1fr);
  }

  .student-stage {
    min-height: 100vh;
    padding: 0;
    background: var(--surface);
  }

  .phone-surface {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .app-shell {
    width: min(100% - 24px, 1120px);
    padding: 32px 0;
  }

  .app-shell__intro {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.app-root {
  min-height: 100vh;
  background: var(--background);
}

.app-root--tour {
  --tour-dock-fallback: 154px;
  padding-bottom: var(--tour-dock-space, var(--tour-dock-fallback));
}

.app-root--tour .product-content :is(button, input, select, textarea, [id]) {
  scroll-margin-bottom: var(--tour-dock-space, var(--tour-dock-fallback));
}

.product-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  width: 100%;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.product-brand,
.product-commands,
.product-layout,
.product-nav,
.tour-controls__actions {
  display: flex;
  align-items: center;
}

.product-brand {
  min-width: 0;
  gap: 13px;
}

.product-brand strong {
  color: var(--brand-strong);
  font-size: 1rem;
  white-space: nowrap;
}

.product-brand span {
  padding-left: 13px;
  border-left: 1px solid var(--line);
  font-size: 0.9375rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.product-commands {
  flex: 0 0 auto;
  gap: 10px;
}

.product-commands button,
.tour-button {
  padding: 8px 13px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.command-quiet,
.tour-button--quiet {
  border-color: var(--student-control-border);
  color: var(--ink);
  background: var(--surface);
}

.product-user {
  margin-left: 6px;
  color: var(--context-text);
  font-size: 0.8125rem;
  font-weight: 700;
}

.product-layout {
  min-height: calc(100vh - 64px);
  align-items: stretch;
}

.product-sidebar {
  width: 220px;
  flex: 0 0 220px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.product-nav {
  position: sticky;
  top: 64px;
  display: grid;
  gap: 4px;
  padding: 20px 12px;
}

.product-nav__item {
  width: 100%;
  padding: 10px 14px;
  border-color: transparent;
  color: var(--context-text);
  text-align: left;
  background: transparent;
}

.product-nav__item:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.product-nav__item[aria-current="page"] {
  border-color: #d7bdc0;
  color: var(--brand-strong);
  background: #fbf3f4;
  font-weight: 700;
}

.product-content {
  min-width: 0;
  flex: 1 1 auto;
}

.product-content .dashboard,
.product-content .workbench {
  width: min(100% - 40px, 1240px);
}

.support-view {
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
  padding: 32px 0 56px;
}

.support-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.support-header h1,
.support-header p,
.support-section h2,
.analysis-note p {
  margin: 0;
}

.support-header h1 {
  margin-top: 4px;
  font-size: 1.625rem;
  line-height: 1.35;
}

.support-header h1 + p {
  margin-top: 8px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.support-eyebrow {
  color: var(--brand-strong);
  font-size: 0.75rem;
  font-weight: 700;
}

.readonly-label {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--context-text);
  background: var(--surface-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.support-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  background: var(--line);
}

.support-metrics div {
  padding: 18px;
  background: var(--surface);
}

.support-metrics dt {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.support-metrics dd {
  margin: 7px 0 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.support-section {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.support-section h2 {
  margin-bottom: 16px;
  font-size: 1.0625rem;
}

.support-table-wrap {
  overflow-x: auto;
}

.support-table-wrap table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.support-table-wrap caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.support-table-wrap th,
.support-table-wrap td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
  text-align: left;
}

.support-table-wrap td:last-child {
  width: 72px;
  text-align: right;
}

.analysis-bar {
  display: flex;
  width: var(--bar-size);
  min-width: 54px;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  color: var(--brand-strong);
  background: #f4e8e9;
  font-weight: 700;
  white-space: nowrap;
}

.analysis-note {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid #dbcda9;
  background: #fbf8ef;
}

.analysis-note p {
  margin-top: 6px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.config-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.config-list li {
  min-width: 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.config-list li:last-child {
  border-bottom: 0;
}

.config-list strong,
.config-list span {
  display: block;
}

.config-list span,
.config-list p {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.config-list span {
  margin-top: 3px;
}

.config-list--status li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.config-list--status p {
  flex: 0 0 230px;
  margin: 0;
}

.config-list--status b {
  margin-right: 8px;
  color: var(--ink);
}

.tour-controls {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(170px, 0.65fr) minmax(440px, 1.8fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 136px;
  padding: 12px 20px;
  border-top: 2px solid var(--brand);
  background: var(--surface);
  box-shadow: 0 -3px 12px rgb(32 38 45 / 10%);
}

.tour-controls__story p {
  max-width: 40ch;
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.tour-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(76px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tour-progress__item {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 7px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.tour-progress__item > span {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
}

.tour-progress__item strong,
.tour-progress__item small {
  overflow-wrap: anywhere;
}

.tour-progress__item strong {
  font-size: 0.8125rem;
}

.tour-progress__item small {
  color: var(--text-secondary);
  font-size: 0.6875rem;
}

.tour-progress__item--completed {
  border-color: #a9c9bd;
  background: var(--student-success-surface);
}

.tour-progress__item--current {
  border-color: var(--brand);
  outline: 2px solid #ead4d6;
  background: #fbf3f4;
}

.tour-controls__actions {
  max-width: 270px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tour-button:disabled,
.product-commands button:disabled {
  border-color: #cbd2d8;
  color: #667382;
  background: #e9edf0;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .product-layout {
    display: block;
  }

  .product-sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .product-nav {
    position: static;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 8px 12px;
  }

  .product-nav__item {
    text-align: center;
  }

  .app-root--tour {
    --tour-dock-fallback: 166px;
  }

  .tour-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 16px;
    min-height: 150px;
  }

  .tour-progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .tour-controls__actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
  }
}

@media (max-width: 600px) {
  .product-topbar {
    height: auto;
    min-height: 64px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .product-brand,
  .product-commands {
    width: 100%;
    flex-wrap: wrap;
  }

  .product-user {
    margin-left: auto;
  }

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

  .support-view {
    width: min(100% - 24px, 1120px);
    padding-top: 24px;
  }

  .support-header,
  .config-list--status li {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .support-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .config-list--status p {
    flex-basis: auto;
  }

  .app-root--tour {
    --tour-dock-fallback: 184px;
  }

  .tour-controls {
    grid-template-columns: minmax(0, 1fr);
    max-height: none;
    min-height: 170px;
    gap: 8px;
    padding: 8px 12px;
  }

  .tour-controls__story p {
    display: none;
  }

  .tour-progress {
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .tour-progress__item {
    gap: 1px;
    padding: 4px 2px;
    text-align: center;
  }

  .tour-progress__item strong {
    font-size: 0.6875rem;
    line-height: 1.3;
  }

  .tour-progress__item small,
  .tour-progress__item > span {
    font-size: 0.625rem;
    line-height: 1.25;
  }

  .tour-controls__actions {
    gap: 4px;
  }

  .tour-button {
    min-width: 0;
    min-height: 44px;
    padding: 6px 3px;
    font-size: 0.75rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
}
