:root {
  --header: #39466f;
  --nav: #433d70;
  --nav-border: #342f5b;
  --navy: #4d365f;
  --navy-deep: #40304d;
  --purple: #654a7b;
  --purple-dark: #4d365f;
  --purple-light: #f0ebf3;
  --link: #40566e;
  --link-hover: #654a7b;
  --teal: #087e8b;
  --ink: #2f3340;
  --muted: #626778;
  --line: #dddce1;
  --paper: #fcfbfd;
  --canvas: #f5f4f7;
  --warning: #9a5b00;
  --warning-bg: #fff4d6;
  --danger: #a6202b;
  --danger-bg: #fff0f1;
  --success: #246b44;
  --gantt-track: #f0f1f3;
  --gantt-grid: #dfe2e7;
  --gantt-today: #d93025;
  --gantt-upcoming: #2878b5;
  --gantt-drt: #2878b5;
  --gantt-applicant: #d0aa00;
  --gantt-hearing: #39466f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

.case-party-panel {
  border: 1px solid var(--border, #d7d1de);
  border-radius: 0.55rem;
  padding: 1rem;
}
.case-party-panel > legend {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0 0.35rem;
}
.case-party-role {
  border-top: 1px solid var(--border, #d7d1de);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 2fr) minmax(14rem, 1fr);
  margin-top: 1rem;
  padding-top: 1rem;
}
.case-party-role-heading {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  grid-column: 1 / -1;
  justify-content: space-between;
}
.case-party-role-heading h2 {
  font-size: 1rem;
  margin: 0;
}
.case-party-picker-tools {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.case-party-picker-tools input[type="search"] {
  flex: 1 1 18rem;
  min-width: 0;
}
.case-party-picker-tools span {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.85rem;
  font-weight: 700;
}
.case-party-checklist {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  max-height: 19rem;
  overflow: auto;
  padding: 0.6rem 0.75rem;
}
.case-party-checklist > div:not(.case-party-quick-added) {
  margin-bottom: 0.65rem;
}
.case-party-checklist > div > label:first-child {
  color: var(--navy);
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  margin: 0.15rem 0 0.35rem;
  text-transform: uppercase;
}
.case-party-checklist label:has(input[type="checkbox"]) {
  align-items: flex-start;
  border-radius: 0.3rem;
  cursor: pointer;
  display: flex;
  gap: 0.55rem;
  line-height: 1.35;
  padding: 0.4rem 0.45rem;
}
.case-party-checklist label:has(input[type="checkbox"]):hover {
  background: var(--purple-light);
}
.case-party-checklist input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 0.17rem;
}
.case-party-quick-added:empty { display: none; }
.case-party-quick-added:not(:empty) {
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}
.case-party-quick-added::before {
  color: var(--navy);
  content: "Just added";
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  margin: 0.15rem 0 0.35rem;
  text-transform: uppercase;
}
.case-party-dialog {
  border: 0;
  border-radius: 0.65rem;
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 30%);
  max-height: 90vh;
  max-width: 58rem;
  overflow: auto;
  padding: 1.25rem;
  width: calc(100% - 2rem);
}
.case-party-dialog::backdrop { background: rgb(20 17 26 / 65%); }
.case-party-dialog-header {
  position: sticky;
  z-index: 5;
  top: -1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: -1.25rem -1.25rem 0;
  padding: 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.case-party-dialog-header h2,
.case-party-dialog-header p { margin-top: 0; }
.case-party-dialog-header h2 { margin-bottom: 0; }
.case-party-dialog-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}
.case-party-dialog-actions .button { width: auto; }
.dialog-close-form { margin: 0; }
.compact-form {
  clear: both;
  margin-top: 1rem;
}
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .case-party-role { grid-template-columns: 1fr; }
  .case-party-role-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .case-party-picker-tools {
    align-items: stretch;
    flex-direction: column;
  }
  .case-party-dialog-header {
    align-items: stretch;
    flex-direction: column;
  }
  .case-party-dialog-actions { justify-content: flex-start; }
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
a { color: var(--link); text-underline-offset: 0.16em; }
a:hover { color: var(--link-hover); }
button, input, select, textarea { font: inherit; }
button, .button { min-height: 2.5rem; }

.skip-link {
  position: absolute; left: -10000px; top: 0; z-index: 100;
  background: var(--paper); padding: 0.75rem;
}
.skip-link:focus { left: 0; }
.sr-only,
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.site-header {
  min-height: 4.5rem; background: var(--header); color: white;
  display: flex; align-items: center; gap: 2rem; padding: 0.75rem 2rem;
}
.brand { min-width: 18rem; }
.brand a { color: white; text-decoration: none; display: flex; gap: 0.75rem; align-items: center; }
.brand-mark {
  width: 2.5rem; height: 2.5rem; display: grid; place-items: center;
  background: var(--purple); border-radius: 0.45rem; font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand small { color: #ddd7ea; margin-top: 0.1rem; }
.global-search { display: flex; flex: 1; max-width: 48rem; }
.global-search input {
  flex: 1; min-width: 10rem; border: 0; border-radius: 0.4rem 0 0 0.4rem;
  padding: 0.7rem 0.8rem;
}
.global-search button {
  border: 0; border-radius: 0 0.4rem 0.4rem 0; background: var(--purple);
  color: white; padding: 0.6rem 1rem; font-weight: 700;
}
.user-menu { margin-left: auto; display: flex; align-items: center; gap: 1rem; font-size: 0.9rem; }
.user-menu form { margin: 0; }
.user-menu a { color: #f3eef7; }
.button-link { border: 0; padding: 0; min-height: 0; background: none; color: #eee8f5; text-decoration: underline; cursor: pointer; }

.primary-nav-toggle { display: none; }
.primary-nav {
  display: flex; flex-wrap: wrap; background: var(--nav); padding: 0 2rem;
  border-bottom: 1px solid var(--nav-border);
}
.primary-nav a { color: white; text-decoration: none; padding: 0.8rem 0.85rem; font-size: 0.9rem; }
.primary-nav a:hover, .primary-nav a:focus { background: rgba(255,255,255,0.12); }
.primary-nav a.active {
  background: var(--canvas);
  color: var(--purple-dark);
  box-shadow: inset 0 -4px 0 var(--purple);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3rem;
}

@media (min-width: 901px) {
  .primary-nav {
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 0.2rem 0.65rem rgb(20 18 36 / 18%);
  }
}

.page-shell { max-width: 1560px; margin: 0 auto; padding: 2rem; min-height: calc(100vh - 11rem); }
footer { padding: 1.5rem 2rem; color: var(--muted); text-align: center; font-size: 0.88rem; }

.module-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin: 1rem 0 2rem;
  padding: 1.6rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
}
.module-hero h1 {
  margin: 0.15rem 0 0.45rem;
  color: var(--purple-dark);
  font-size: clamp(2rem, 4vw, 3.1rem);
}
.module-hero p { margin: 0; color: var(--muted); max-width: 50rem; }
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.module-card {
  min-height: 13rem;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  align-items: start;
  gap: 1.1rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 2px 7px rgba(47,51,64,0.06);
}
a.module-card {
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
a.module-card:hover,
a.module-card:focus {
  color: var(--ink);
  transform: translateY(-2px);
  border-color: #aaa1b3;
  box-shadow: 0 7px 18px rgba(47,51,64,0.1);
}
.module-card.planned { background: #f8f7f9; }
.module-mark {
  width: 4.5rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 0.8rem;
  background: var(--purple);
  color: white;
  font-size: 1.3rem;
  font-weight: 850;
  letter-spacing: 0.03em;
}
.module-card.planned .module-mark {
  background: #e7e4e9;
  color: #65616b;
}
.module-card-body { min-width: 0; display: grid; gap: 0.8rem; }
.module-card-body > span:not(.module-card-heading) {
  color: var(--muted);
  line-height: 1.55;
}
.module-card-body small { color: var(--link); font-weight: 750; }
.module-card.planned .module-card-body small { color: var(--muted); }
.module-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.module-card-heading strong {
  color: var(--purple-dark);
  font-size: 1.35rem;
}
.module-status {
  display: inline-flex;
  width: max-content;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #ece9ef;
  color: #615d67;
  font-size: 0.76rem;
  font-weight: 800;
}
.module-status.available { background: #e9f5ee; color: var(--success); }
.module-access-note {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.no-module-access { max-width: 46rem; }
.no-module-access h2 { margin-top: 0; color: var(--purple-dark); }
.access-denied { max-width: 48rem; margin: 2rem auto; padding: 2rem; }
.access-denied h1 { color: var(--purple-dark); }

.page-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: start; margin-bottom: 1.5rem; }
.page-heading h1 { margin: 0.1rem 0 0.35rem; font-size: clamp(1.65rem, 3vw, 2.35rem); color: var(--purple-dark); }
.page-heading p { margin: 0; color: var(--muted); max-width: 60rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.76rem; font-weight: 800; color: #70737d !important; }
.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.button, button {
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid #b8b6be;
  border-radius: 0.35rem; background: var(--paper); color: var(--ink); padding: 0.55rem 0.9rem;
  text-decoration: none; font-weight: 700; cursor: pointer;
}
.button:hover, button:hover { background: #efedf1; color: var(--ink); }
.button.primary, button.primary { background: var(--purple); color: white; border-color: var(--purple-dark); }
.button.primary:hover, button.primary:hover { background: var(--purple-dark); color: white; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.metrics-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metrics article, .metrics .metric-card { background: var(--paper); border: 1px solid var(--line); border-radius: 0.5rem; padding: 1rem 1.2rem; box-shadow: 0 1px 3px rgba(47,51,64,0.05); }
.metric-card {
  color: var(--ink);
  text-decoration: none;
  display: block;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.metric-card:hover, .metric-card:focus {
  color: var(--ink);
  border-color: #b9b6c0;
  box-shadow: 0 4px 10px rgba(47,51,64,0.09);
  transform: translateY(-2px);
}
.metrics strong { display: block; font-size: 1.9rem; color: var(--ink); }
.metrics span { color: var(--muted); }
.metrics small { display: block; color: var(--link); margin-top: 0.4rem; font-weight: 700; }
.dashboard-grid, .content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: 0.5rem;
  padding: 1rem 1.2rem; box-shadow: 0 1px 3px rgba(47,51,64,0.05); min-width: 0;
}
.panel.wide { grid-column: 1 / -1; }
.panel-danger { border-left: 3px solid #c85a63; }
.panel-warning { border-left: 3px solid #c98a2e; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.panel-danger > .panel-heading,
.panel-warning > .panel-heading {
  margin: -1rem -1.2rem 0.75rem;
  padding: 0.8rem 1.2rem;
}
.panel-danger > .panel-heading { background: #fff6f7; }
.panel-warning > .panel-heading { background: #fff9ed; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.8rem;
}
.alert-card {
  border: 1px solid #e2a3a9;
  border-left: 4px solid #b93845;
  border-radius: 0.45rem;
  background: #fff6f7;
  padding: 0.9rem;
}
.alert-card h3 { margin: 0.55rem 0 0.35rem; font-size: 1rem; }
.alert-card p { margin: 0.35rem 0; }
.alert-card form { margin: 0; }
.management-action-card {
  background: #fff0f1;
  border-color: #d86d77;
  box-shadow: 0 2px 5px rgba(142, 29, 42, 0.08);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.management-action-card:hover,
.management-action-card:focus-within {
  border-color: #a71f2d;
  box-shadow: 0 5px 14px rgba(142, 29, 42, 0.16);
  transform: translateY(-2px);
}
.management-action-card-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
  border-radius: 0.3rem;
}
.management-action-card-link:hover,
.management-action-card-link:focus {
  color: var(--ink);
  outline: 2px solid rgba(167, 31, 45, 0.22);
  outline-offset: 0.25rem;
}
.management-action-card-link h3 {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14rem;
}
.management-action-card .actions {
  border-top: 1px solid #efc4c8;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}
.intervention-alert-panel,
.deadline-alert-panel {
  margin-bottom: 1rem;
}
.intervention-alert-panel > summary,
.deadline-alert-panel > summary {
  cursor: pointer;
  list-style-position: outside;
}
.intervention-alert-panel > summary h2 {
  color: #8f1d2a;
}
.deadline-alert-panel > summary h2 {
  color: #8a5a00;
}
.intervention-alert-panel[open] > summary,
.deadline-alert-panel[open] > summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
}
.intervention-alert-content,
.deadline-alert-content {
  display: grid;
  gap: 1rem;
}
.intervention-alert-content > section + section {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}
.intervention-alert-content h3 {
  color: var(--purple-dark);
  margin: 0 0 0.65rem;
}
.management-response-form {
  border-top: 1px solid #efc4c8;
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
}
.management-response-form .field select,
.management-response-form .field textarea,
.management-response-form .field input {
  width: 100%;
}
.management-response-form .field small {
  color: var(--muted);
  display: block;
  margin-top: 0.25rem;
}
.management-receipt-list li p {
  margin: 0.25rem 0;
}
.management-receipt-list li form {
  margin-top: 0.35rem;
}
.management-routing-note {
  border-left: 3px solid #c85a63;
  padding-left: 0.6rem;
  font-weight: 650;
}
.management-routing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.routing-action-block {
  background: #faf9fc;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 1rem;
}
.routing-action-block .field + .field { margin-top: 0.9rem; }
.routing-ready-choice {
  background: #f0ebf5;
  border-radius: 0.35rem;
  padding: 0.75rem;
}
.routing-targets ul {
  list-style: none;
  margin: 0.45rem 0;
  padding: 0;
}
.routing-targets li { margin: 0.35rem 0; }
.routing-targets label { font-weight: 650; }
.routing-unavailable-note {
  background: #fff9ed;
  border-left: 3px solid #c98a2e;
  padding: 0.7rem 0.9rem;
}
.routing-history { margin-top: 1rem; }
.routing-history summary {
  cursor: pointer;
  font-weight: 750;
  padding: 0.65rem 0;
}
.routing-history summary span {
  color: var(--muted);
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
}
.routing-history-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.6rem;
}
.routing-history-entry {
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.8rem;
}
.routing-history-entry > div {
  align-items: center;
  display: flex;
  gap: 0.55rem;
  justify-content: space-between;
}
.routing-history-entry p { margin: 0.35rem 0; }
.record-list.compact li { padding: 0.45rem 0; }
.panel-heading h2 { margin: 0; font-size: 1.15rem; color: var(--purple-dark); }
.panel-heading .eyebrow { margin: 0 0 0.15rem; }
.record-list { list-style: none; padding: 0; margin: 0; }
.record-list li { padding: 0.65rem 0; border-top: 1px solid var(--line); display: grid; gap: 0.2rem; }
.record-list li:first-child { border-top: 0; }
.record-list a { font-weight: 750; color: var(--link); }
.record-list a:hover { color: var(--link-hover); }
.record-list span { color: var(--muted); font-size: 0.92rem; }
.empty { color: var(--muted); font-style: italic; }
.status { display: inline-block; width: max-content; border-radius: 999px; background: #eceef1; color: #44515e; padding: 0.2rem 0.55rem; font-size: 0.8rem; line-height: 1.3; }
.status.warning, .status.target_missed, .status.urgent { background: var(--warning-bg); color: var(--warning); }
.status.danger, .status.deadline_missed { background: var(--danger-bg); color: var(--danger); }
.status.complete { background: #e9f5ee; color: var(--success); }
.status.completed { background: #e9f5ee; color: var(--success); }
.status.active { background: #fde0dd; color: #9f1c13; }
.status.cancelled { background: #eceef1; color: #44515e; }
.status.none { background: #eceef1; color: #44515e; }
.status.low { background: #e9f5ee; color: #17633a; }
.status.moderate { background: #fff5cc; color: #755900; }
.status.high { background: #ffe2c6; color: #8a3f00; }
.status.critical { background: #fde0dd; color: #9f1c13; }
.status.staff-role { background: #eceef1; color: #44515e; font-weight: 700; }
.status.staff-role.manager { background: #e8eef7; color: #39466f; }
.status.staff-role.director { background: #eee7f4; color: #56366f; }
.status.staff-role.online {
  background: #166534;
  border: 2px solid #4ade80;
  box-shadow: 0 0 0 2px rgb(74 222 128 / 20%);
  color: #fff;
}
.status.staff-role.online::before {
  background: #86efac;
  border-radius: 50%;
  content: "";
  display: inline-block;
  height: 0.48rem;
  margin-right: 0.35rem;
  vertical-align: 0.04rem;
  width: 0.48rem;
}
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.two-column h3 { font-size: 0.95rem; margin: 0 0 0.5rem; }
.two-column p { margin: 0.45rem 0; }
.panel-description { color: var(--muted); margin: 0.3rem 0 0; font-size: 0.9rem; }
.appointment-alert-panel {
  border: 2px solid #b42318;
  background: #fff4f2;
}
.appointment-alert-panel > summary {
  cursor: pointer;
  list-style-position: outside;
  color: #8f1d14;
}
.appointment-alert-panel > summary h2 { color: #8f1d14; }
.appointment-alert-panel[open] > summary {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e7aaa4;
}
.appointment-alert-heading-actions {
  margin: 0 0 0.85rem;
}
.appointment-alert-panel .record-list > li {
  align-items: start;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(0, 1fr) auto;
}
.appointment-alert-record {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}
.appointment-alert-actions {
  justify-content: end;
  margin: 0;
}
.appointment-alert-actions .button {
  white-space: normal;
}
.status.draft,
.status.archived {
  background: #eceef1;
  color: #44515e;
}
.status.awaiting_approval {
  background: var(--warning-bg);
  color: var(--warning);
}
.status.approved {
  background: #e9f5ee;
  color: #17633a;
}
.status.not_approved,
.status.withdrawn {
  background: var(--danger-bg);
  color: var(--danger);
}
.contact-group-panel > summary,
.organization-contact-group > summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
}
.organization-contact-group { margin: 0.75rem 0; }
.milestone-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding-left: 1.5rem;
}
.milestone-list li { padding-left: 0.35rem; }
.milestone-list strong,
.milestone-list span { display: block; }
.milestone-list span { margin-top: 0.15rem; color: var(--muted); }
.inline-risk-form { margin: 0; }

.workload-panel, .employee-group { margin-bottom: 1rem; }
.workload-ring-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.8rem;
}
.workload-ring-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.ring-key {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #2f9e44;
}
.ring-key.capacity-green { background: #2f9e44; }
.ring-key.capacity-yellow { background: #d0aa00; }
.ring-key.capacity-orange { background: #e67e22; }
.ring-key.capacity-red { background: #d93025; }
.ring-key.capacity-on-leave { background: #7b8794; }
.ring-key.hearing { background: #7a2bbd; }
.ring-key.administrative { background: #007b83; }
.ring-key.remaining { background: #f1f3f5; border: 1px solid #c9ced6; }
.workload-ring-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}
.workload-ring-card {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.4rem;
  padding: 0.75rem 0.55rem;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(47,51,64,0.04);
}
.workload-ring-card:hover, .workload-ring-card:focus {
  color: var(--ink);
  border-color: #b9b6c0;
  background: #ffffff;
  box-shadow: 0 4px 9px rgba(47,51,64,0.08);
}
.workload-ring-name { color: var(--ink); }
.capacity-ring {
  --capacity-color: #2f9e44;
  width: 7.5rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0.42rem;
  border-radius: 50%;
  background: conic-gradient(
    var(--capacity-color) 0 var(--overall),
    #f1f3f5 var(--overall) 100%
  );
}
.capacity-ring.capacity-green { --capacity-color: #2f9e44; }
.capacity-ring.capacity-yellow { --capacity-color: #d0aa00; }
.capacity-ring.capacity-orange { --capacity-color: #e67e22; }
.capacity-ring.capacity-red { --capacity-color: #d93025; }
.capacity-ring.capacity-on-leave { --capacity-color: #7b8794; }
.capacity-mix {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0.72rem;
  border-radius: 50%;
  background: conic-gradient(
    #7a2bbd 0 var(--hearing),
    #007b83 var(--hearing) var(--overall),
    #f1f3f5 var(--overall) 100%
  );
}
.capacity-center {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: var(--paper);
}
.capacity-center strong {
  color: var(--ink);
  font-size: 1.25rem;
}
.workload-ring-status {
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.workload-ring-breakdown { display: grid; gap: 0.2rem; }
.workload-ring-breakdown small { color: var(--muted); line-height: 1.3; }
.workload-ring-breakdown strong { color: var(--ink); }
.workload-bars { display: grid; gap: 0.45rem; }
.workload-row {
  display: grid;
  grid-template-columns: minmax(13rem, 0.8fr) minmax(18rem, 2fr) minmax(8rem, auto);
  gap: 1rem;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  padding: 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.4rem;
}
.workload-row:hover, .workload-row:focus {
  color: var(--ink);
  border-color: #b9b6c0;
  background: #f8f7f9;
}
.workload-person, .workload-visual { display: grid; gap: 0.18rem; }
.workload-person small, .workload-visual small { color: var(--muted); }
.workload-visual {
  grid-template-columns: minmax(12rem, 1fr) 4rem;
  align-items: center;
}
.workload-visual small { grid-column: 1 / -1; }
.workload-track {
  display: block;
  height: 1.7rem;
  background: #dfe2e7;
  border: 1px solid #bdc8d0;
  border-radius: 0.25rem;
  overflow: hidden;
}
.workload-track.large { height: 2.25rem; width: 100%; }
.workload-percent { color: var(--ink); font-size: 1.15rem; text-align: right; }
.workload-status { text-align: right; color: var(--link); font-weight: 700; }
.workload-note { color: var(--muted); font-size: 0.86rem; margin: 0.8rem 0 0; }
.workload-composition {
  display: grid;
  gap: 0.65rem;
}
.workload-composition-track {
  display: flex;
  position: relative;
  background: #dfe2e7;
}
.workload-segment {
  display: block;
  flex: 0 0 auto;
  height: 100%;
}
.workload-segment.public-hearing { background: #8b5cc7; }
.workload-segment.administrative { background: var(--teal); }
.workload-capacity-marker {
  --capacity-color: #2f9e44;
  position: absolute;
  left: 0;
  bottom: 0;
  height: 0.34rem;
  max-width: 100%;
  background: var(--capacity-color);
  pointer-events: none;
}
.workload-composition-track.capacity-green .workload-capacity-marker {
  --capacity-color: #2f9e44;
}
.workload-composition-track.capacity-yellow .workload-capacity-marker {
  --capacity-color: #d0aa00;
}
.workload-composition-track.capacity-orange .workload-capacity-marker {
  --capacity-color: #e67e22;
}
.workload-composition-track.capacity-red .workload-capacity-marker {
  --capacity-color: #d93025;
}
.workload-composition-track.capacity-on-leave .workload-capacity-marker {
  --capacity-color: #7b8794;
}
.workload-row-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.workload-level-dot {
  width: 0.7rem;
  height: 0.7rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #9eb7c5;
}
.workload-level-dot.substantially-available,
.workload-level-dot.available-capacity,
.workload-level-dot.balanced { background: #2f9e44; }
.workload-level-dot.on-leave { background: #7b8794; }
.workload-level-dot.high { background: #d0aa00; }
.workload-level-dot.near-capacity { background: #e67e22; }
.workload-level-dot.at-capacity,
.workload-level-dot.over-capacity { background: #d93025; }
.workload-composition-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.workload-composition-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.workload-composition-legend strong { color: var(--ink); }

.employee-load-summary {
  display: grid;
  grid-template-columns: 12rem minmax(18rem, 1fr);
  gap: 1rem 1.5rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 6px solid var(--purple);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(47,51,64,0.05);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}
.employee-load-summary.substantially-available,
.employee-load-summary.available-capacity,
.employee-load-summary.balanced { border-left-color: #2f9e44; }
.employee-load-summary.on-leave { border-left-color: #7b8794; }
.employee-load-summary.high { border-left-color: #d0aa00; }
.employee-load-summary.near-capacity { border-left-color: #e67e22; }
.employee-load-summary.at-capacity,
.employee-load-summary.over-capacity { border-left-color: #d93025; }
.employee-load-summary > div:first-child { display: grid; }
.employee-load-summary > div:first-child span,
.employee-load-summary > div:first-child small { color: var(--muted); }
.employee-load-summary > div:first-child strong { font-size: 2rem; color: var(--ink); }
.employee-load-summary dl {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}
.employee-load-summary dl div {
  background: var(--canvas);
  border-radius: 0.35rem;
  padding: 0.65rem 0.8rem;
}
.employee-load-summary dt { margin: 0; }
.employee-load-summary dd { font-weight: 800; color: var(--ink); }
.button.small { min-height: 2rem; padding: 0.35rem 0.65rem; font-size: 0.82rem; }

.employee-profile-theme.profile-theme-light,
.employee-profile-theme.profile-theme-dark,
.employee-profile-theme.profile-theme-rainbow,
.employee-profile-theme.profile-theme-custom {
  border-radius: 0.75rem;
  margin: -0.75rem;
  padding: 1.25rem;
}
.employee-profile-theme.profile-theme-light {
  --paper: #ffffff;
  --canvas: #f8f9fc;
  --ink: #252832;
  --muted: #606675;
  --line: #d9dce5;
  --purple: #67507d;
  --purple-dark: #49365c;
  --link: #365b7a;
  --link-hover: #49365c;
  background: var(--canvas);
}
.employee-profile-theme.profile-theme-dark {
  --paper: #252936;
  --canvas: #171a23;
  --ink: #f5f7fb;
  --muted: #c4c9d4;
  --line: #454b5c;
  --purple: #9b72b0;
  --purple-dark: #eadcf1;
  --purple-light: #373040;
  --link: #9ec9ff;
  --link-hover: #d1e6ff;
  color-scheme: dark;
  background: var(--canvas);
}
.employee-profile-theme.profile-theme-dark th {
  background: #303543;
  color: #eef0f5;
}
.employee-profile-theme.profile-theme-dark tbody tr:hover {
  background: #2c303d;
}
.employee-profile-theme.profile-theme-rainbow {
  --paper: #ffffff;
  --canvas: #faf8fc;
  --ink: #292632;
  --muted: #625d6d;
  --line: #ded8e4;
  --purple: #7b3f92;
  --purple-dark: #532963;
  --link: #315c7a;
  --link-hover: #7b3f92;
  border: 4px solid transparent;
  background:
    linear-gradient(var(--canvas), var(--canvas)) padding-box,
    linear-gradient(
      90deg,
      #e40303 0 16.66%,
      #ff8c00 16.66% 33.32%,
      #ffed00 33.32% 49.98%,
      #008026 49.98% 66.64%,
      #004dff 66.64% 83.3%,
      #750787 83.3% 100%
    ) border-box;
}
.employee-profile-theme.profile-theme-rainbow::before {
  content: "";
  display: block;
  height: 0.45rem;
  margin: -0.45rem -0.25rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #e40303,
    #ff8c00,
    #ffed00,
    #008026,
    #004dff,
    #750787
  );
}
.employee-profile-theme.profile-theme-custom {
  --paper: var(--profile-surface);
  --canvas: var(--profile-background);
  --ink: var(--profile-text);
  --muted: var(--profile-muted);
  --line: color-mix(in srgb, var(--profile-text) 24%, var(--profile-surface));
  --purple: var(--profile-accent);
  --purple-dark: var(--profile-text);
  --link: var(--profile-text);
  --link-hover: var(--profile-accent);
  background: var(--canvas);
}
.employee-profile-theme.profile-theme-custom .button.primary {
  background: var(--profile-accent);
  border-color: var(--profile-accent);
  color: var(--profile-accent-text);
}
.employee-profile-theme.profile-theme-custom th {
  background: color-mix(
    in srgb,
    var(--profile-text) 10%,
    var(--profile-surface)
  );
  color: var(--profile-text);
}
.employee-profile-theme.profile-theme-custom tbody tr:hover {
  background: color-mix(
    in srgb,
    var(--profile-accent) 10%,
    var(--profile-surface)
  );
}

body.user-profile-theme {
  color: var(--ink);
  background: var(--canvas);
}
body.user-profile-theme.profile-theme-light {
  --header: #43547d;
  --nav: #554373;
  --nav-border: #423259;
  --paper: #ffffff;
  --canvas: #f8f9fc;
  --ink: #252832;
  --muted: #606675;
  --line: #d9dce5;
  --purple: #67507d;
  --purple-dark: #49365c;
  --link: #365b7a;
  --link-hover: #49365c;
}
body.user-profile-theme.profile-theme-dark {
  --header: #20283f;
  --nav: #2f2949;
  --nav-border: #1b2030;
  --paper: #252936;
  --canvas: #171a23;
  --ink: #f5f7fb;
  --muted: #c4c9d4;
  --line: #454b5c;
  --purple: #9b72b0;
  --purple-dark: #eadcf1;
  --purple-light: #373040;
  --link: #9ec9ff;
  --link-hover: #d1e6ff;
  --warning: #ffd88a;
  --warning-bg: #4a3812;
  --danger: #ffadb3;
  --danger-bg: #4b2429;
  --success: #83d6a7;
  color-scheme: dark;
}
body.user-profile-theme.profile-theme-dark .eyebrow,
body.user-profile-theme.profile-theme-custom .eyebrow {
  color: var(--muted) !important;
}
body.user-profile-theme.profile-theme-dark th {
  background: #303543;
  color: #eef0f5;
}
body.user-profile-theme.profile-theme-dark tbody tr:hover {
  background: #2c303d;
}
body.user-profile-theme.profile-theme-dark .button:hover,
body.user-profile-theme.profile-theme-dark button:hover {
  background: #343948;
}
body.user-profile-theme.profile-theme-dark .button.primary:hover,
body.user-profile-theme.profile-theme-dark button.primary:hover {
  background: #7e5d91;
}
body.user-profile-theme.profile-theme-dark .global-search input {
  background: #303543;
  color: var(--ink);
}
body.user-profile-theme.profile-theme-dark .field input:not([type=checkbox]),
body.user-profile-theme.profile-theme-dark .field select,
body.user-profile-theme.profile-theme-dark .field textarea,
body.user-profile-theme.profile-theme-dark .stacked-form input,
body.user-profile-theme.profile-theme-dark .stacked-form select,
body.user-profile-theme.profile-theme-dark .filter-bar select,
body.user-profile-theme.profile-theme-dark .filter-bar input:not([type=checkbox]),
body.user-profile-theme.profile-theme-dark .case-party-checklist,
body.user-profile-theme.profile-theme-dark .checkbox-list {
  background: #303543;
  border-color: #596174;
  color: var(--ink);
}
body.user-profile-theme.profile-theme-dark .field label,
body.user-profile-theme.profile-theme-dark .stacked-form label,
body.user-profile-theme.profile-theme-dark .field-label,
body.user-profile-theme.profile-theme-dark .filter-bar label {
  color: var(--ink);
}
body.user-profile-theme.profile-theme-dark .routing-action-block,
body.user-profile-theme.profile-theme-dark .feedback-comments .note {
  background: #2c303d;
}
body.user-profile-theme.profile-theme-dark .case-date-grid article,
body.user-profile-theme.profile-theme-dark .case-progress-details div,
body.user-profile-theme.profile-theme-dark .decision-route-grid article,
body.user-profile-theme.profile-theme-dark .routing-ready-choice {
  background: #303543;
  border-color: #596174;
}
body.user-profile-theme.profile-theme-dark .timeline-guidance {
  background: #263442;
  border-color: #557a9b;
}
body.user-profile-theme.profile-theme-dark .gantt-track {
  border-color: #596174;
  background:
    repeating-linear-gradient(
      90deg,
      #303543 0,
      #303543 calc(10% - 1px),
      #454b5c calc(10% - 1px),
      #454b5c 10%
    );
}
body.user-profile-theme.profile-theme-dark .help-card > summary:hover,
body.user-profile-theme.profile-theme-dark .help-admin-model > summary:hover,
body.user-profile-theme.profile-theme-dark .recipient-result:hover,
body.user-profile-theme.profile-theme-dark .recipient-result:focus-visible {
  background: #303543;
  color: #f5f7fb;
}
body.user-profile-theme.profile-theme-dark .workload-ring-card:hover,
body.user-profile-theme.profile-theme-dark .workload-ring-card:focus,
body.user-profile-theme.profile-theme-dark .workload-row:hover,
body.user-profile-theme.profile-theme-dark .workload-row:focus {
  --ink: #20242e;
  --muted: #59616f;
  --link: #40566e;
  --link-hover: #654a7b;
  --paper: #fcfbfd;
  background: #ffffff;
  color: #20242e;
}
body.user-profile-theme.profile-theme-dark .workload-ring-card:hover *,
body.user-profile-theme.profile-theme-dark .workload-ring-card:focus *,
body.user-profile-theme.profile-theme-dark .workload-row:hover *,
body.user-profile-theme.profile-theme-dark .workload-row:focus * {
  color: inherit;
}
body.user-profile-theme.profile-theme-dark .workload-ring-card:hover a,
body.user-profile-theme.profile-theme-dark .workload-ring-card:focus a,
body.user-profile-theme.profile-theme-dark .workload-row:hover a,
body.user-profile-theme.profile-theme-dark .workload-row:focus a {
  color: #40566e;
}
body.user-profile-theme.profile-theme-dark .workload-ring-card:hover .status.warning,
body.user-profile-theme.profile-theme-dark .workload-ring-card:focus .status.warning {
  background: #785300;
  color: #ffffff;
}
body.user-profile-theme.profile-theme-dark .workload-ring-card:hover .status.staff-role.online,
body.user-profile-theme.profile-theme-dark .workload-ring-card:focus .status.staff-role.online,
body.user-profile-theme.profile-theme-dark .workload-row:hover .status.staff-role.online,
body.user-profile-theme.profile-theme-dark .workload-row:focus .status.staff-role.online {
  background: #166534;
  color: #ffffff;
}
body.user-profile-theme.profile-theme-dark .status.timeline-unscheduled,
body.user-profile-theme.profile-theme-dark .status.timeline-upcoming {
  background: #343948;
  color: #eef0f5;
}
body.user-profile-theme.profile-theme-dark .panel-danger > .panel-heading,
body.user-profile-theme.profile-theme-dark .management-action-card,
body.user-profile-theme.profile-theme-dark .alert-card {
  background: #3f2a2e;
}
body.user-profile-theme.profile-theme-dark .panel-warning > .panel-heading,
body.user-profile-theme.profile-theme-dark .routing-unavailable-note {
  background: #40371f;
}
body.user-profile-theme.profile-theme-dark .appointment-alert-panel {
  background: #3f2a2e;
  border-color: #c85a63;
  border-left-color: #d0aa00;
}
body.user-profile-theme.profile-theme-dark .intervention-alert-panel > summary h2,
body.user-profile-theme.profile-theme-dark .appointment-alert-panel > summary,
body.user-profile-theme.profile-theme-dark .appointment-alert-panel > summary h2 {
  color: #ffb3ba;
}
body.user-profile-theme.profile-theme-dark .appointment-alert-panel[open] > summary {
  border-bottom-color: #725058;
}
body.user-profile-theme.profile-theme-dark .deadline-alert-panel > summary h2 {
  color: #ffd58a;
}
body.user-profile-theme.profile-theme-rainbow {
  --profile-rainbow-card-strength: 10%;
  --profile-rainbow-card-background: linear-gradient(
    110deg,
    #FCE6E6 0%,
    #FFF1E2 19%,
    #FDF8E2 38%,
    #E2F1E6 57%,
    #E2E9FF 77%,
    #F0E2F2 100%
  );
  --header: linear-gradient(
    110deg,
    #74293d 0%,
    #8a4b25 18%,
    #756817 36%,
    #176146 54%,
    #24588b 73%,
    #573a83 100%
  );
  --nav: linear-gradient(
    110deg,
    #5e2032 0%,
    #70401f 18%,
    #5d5518 36%,
    #124f3a 54%,
    #1e4773 73%,
    #49306d 100%
  );
  --nav-border: #492842;
  --paper: #ffffff;
  --canvas: #fbf9fc;
  --ink: #292632;
  --muted: #625d6d;
  --line: #ded7e5;
  --purple: #7b3f92;
  --purple-dark: #532963;
  --link: #315c7a;
  --link-hover: #7b3f92;
  background:
    radial-gradient(circle at 4% 12%, rgb(228 3 3 / 7%), transparent 24rem),
    radial-gradient(circle at 95% 18%, rgb(0 77 255 / 7%), transparent 26rem),
    radial-gradient(circle at 20% 96%, rgb(255 140 0 / 7%), transparent 24rem),
    radial-gradient(circle at 82% 92%, rgb(0 128 38 / 7%), transparent 25rem),
    var(--canvas);
}
body.user-profile-theme.profile-theme-rainbow .page-shell::before {
  content: "";
  display: block;
  height: 0.45rem;
  margin: -0.6rem 0 1.4rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #e40303,
    #ff8c00,
    #ffed00,
    #008026,
    #004dff,
    #750787
  );
}
body.user-profile-theme.profile-theme-rainbow .brand-mark,
body.user-profile-theme.profile-theme-rainbow .global-search button,
body.user-profile-theme.profile-theme-rainbow .button.primary,
body.user-profile-theme.profile-theme-rainbow button.primary {
  background: linear-gradient(120deg, #a52f48, #7b3f92 50%, #315c7a);
  border-color: #532963;
  color: #ffffff;
}
body.user-profile-theme.profile-theme-rainbow .global-search input {
  background: #fffdf9;
  color: var(--ink);
}
body.user-profile-theme.profile-theme-rainbow .primary-nav a.active {
  background: #fffdf9;
  box-shadow:
    inset 0 -4px 0 #7b3f92,
    inset 4px 0 0 rgb(228 3 3 / 55%);
}
body.user-profile-theme.profile-theme-rainbow
  .panel:not(.panel-danger):not(.panel-warning):not(.appointment-alert-panel),
body.user-profile-theme.profile-theme-rainbow .metrics article,
body.user-profile-theme.profile-theme-rainbow .metrics .metric-card {
  border: 1px solid transparent;
  background:
    var(--profile-rainbow-card-background) padding-box,
    linear-gradient(
      105deg,
      rgb(228 3 3 / 55%),
      rgb(255 140 0 / 50%),
      rgb(255 237 0 / 45%),
      rgb(0 128 38 / 45%),
      rgb(0 77 255 / 45%),
      rgb(117 7 135 / 55%)
    ) border-box;
}
body.user-profile-theme.profile-theme-rainbow .metrics .metric-card:nth-child(6n + 1) {
  border-top: 4px solid #c93e50;
}
body.user-profile-theme.profile-theme-rainbow .metrics .metric-card:nth-child(6n + 2) {
  border-top: 4px solid #bf7c19;
}
body.user-profile-theme.profile-theme-rainbow .metrics .metric-card:nth-child(6n + 3) {
  border-top: 4px solid #347b52;
}
body.user-profile-theme.profile-theme-rainbow .metrics .metric-card:nth-child(6n + 4) {
  border-top: 4px solid #315c8d;
}
body.user-profile-theme.profile-theme-rainbow .metrics .metric-card:nth-child(6n + 5) {
  border-top: 4px solid #68418a;
}
body.user-profile-theme.profile-theme-rainbow .workload-ring-card {
  --rainbow-card-accent: #c93e50;
  border: 1px solid color-mix(
    in srgb,
    var(--rainbow-card-accent) 48%,
    var(--line)
  );
  border-top: 4px solid var(--rainbow-card-accent);
  background: color-mix(
    in srgb,
    var(--rainbow-card-accent) var(--profile-rainbow-card-strength),
    #ffffff
  );
}
body.user-profile-theme.profile-theme-rainbow .workload-ring-card:nth-child(6n + 2) {
  --rainbow-card-accent: #bf7c19;
}
body.user-profile-theme.profile-theme-rainbow .workload-ring-card:nth-child(6n + 3) {
  --rainbow-card-accent: #7a771b;
}
body.user-profile-theme.profile-theme-rainbow .workload-ring-card:nth-child(6n + 4) {
  --rainbow-card-accent: #347b52;
}
body.user-profile-theme.profile-theme-rainbow .workload-ring-card:nth-child(6n + 5) {
  --rainbow-card-accent: #315c8d;
}
body.user-profile-theme.profile-theme-rainbow .workload-ring-card:nth-child(6n + 6) {
  --rainbow-card-accent: #68418a;
}
body.user-profile-theme.profile-theme-rainbow .workload-ring-card:hover,
body.user-profile-theme.profile-theme-rainbow .workload-ring-card:focus {
  background: color-mix(
    in srgb,
    var(--rainbow-card-accent) var(--profile-rainbow-card-strength),
    #ffffff
  );
  border-color: var(--rainbow-card-accent);
}
body.user-profile-theme.profile-theme-rainbow footer {
  border-top: 1px solid rgb(117 7 135 / 22%);
  background: linear-gradient(
    90deg,
    rgb(228 3 3 / 5%),
    rgb(255 237 0 / 5%),
    rgb(0 128 38 / 5%),
    rgb(0 77 255 / 5%),
    rgb(117 7 135 / 5%)
  );
}
body.user-profile-theme.profile-theme-custom {
  --header: var(--profile-header);
  --nav: var(--profile-navigation);
  --nav-border: color-mix(in srgb, var(--profile-navigation) 70%, #111827);
  --paper: var(--profile-surface);
  --canvas: var(--profile-background);
  --ink: var(--profile-text);
  --muted: var(--profile-muted);
  --line: var(--profile-border);
  --purple: var(--profile-accent);
  --purple-dark: var(--profile-text);
  --purple-light: color-mix(
    in srgb,
    var(--profile-accent) 12%,
    var(--profile-surface)
  );
  --link: var(--profile-link);
  --link-hover: var(--profile-accent);
  --success: var(--profile-success);
  --warning: var(--profile-warning);
  --danger: var(--profile-danger);
  --gantt-track: var(--profile-gantt-track);
  --gantt-grid: var(--profile-gantt-grid);
  --gantt-today: var(--profile-gantt-today);
  --gantt-upcoming: var(--profile-gantt-upcoming);
  --gantt-drt: var(--profile-gantt-drt);
  --gantt-applicant: var(--profile-gantt-applicant);
  --gantt-hearing: var(--profile-gantt-hearing);
}
body.user-profile-theme.profile-theme-custom .button.primary,
body.user-profile-theme.profile-theme-custom button.primary {
  background: var(--profile-accent);
  border-color: var(--profile-accent);
  color: var(--profile-accent-text);
}
body.user-profile-theme.profile-theme-custom .brand-mark,
body.user-profile-theme.profile-theme-custom .global-search button {
  background: var(--profile-accent);
  color: var(--profile-accent-text);
}
body.user-profile-theme.profile-theme-custom .global-search input {
  background: var(--profile-surface);
  color: var(--profile-text);
}
body.user-profile-theme.profile-theme-custom .primary-nav a.active {
  background: var(--profile-background);
  box-shadow: inset 0 -4px 0 var(--profile-accent);
}
body.user-profile-theme.profile-theme-custom
  .panel:not(.panel-danger):not(.panel-warning):not(.appointment-alert-panel),
body.user-profile-theme.profile-theme-custom .metrics article,
body.user-profile-theme.profile-theme-custom .metrics .metric-card,
body.user-profile-theme.profile-theme-custom .workload-ring-card {
  border-color: color-mix(
    in srgb,
    var(--profile-accent) 36%,
    var(--line)
  );
  background: var(--profile-surface);
}
body.user-profile-theme.profile-theme-custom .metrics .metric-card,
body.user-profile-theme.profile-theme-custom .workload-ring-card {
  border-top: 4px solid var(--profile-accent);
}
body.user-profile-theme.profile-theme-custom .workload-ring-card:hover,
body.user-profile-theme.profile-theme-custom .workload-ring-card:focus {
  background: color-mix(
    in srgb,
    var(--profile-accent) 9%,
    var(--profile-surface)
  );
  border-color: var(--profile-accent);
}
body.user-profile-theme.profile-theme-custom footer {
  border-top: 1px solid color-mix(
    in srgb,
    var(--profile-accent) 35%,
    var(--profile-background)
  );
  background: color-mix(
    in srgb,
    var(--profile-accent) 5%,
    var(--profile-background)
  );
}
body.user-profile-theme.profile-theme-custom th {
  background: color-mix(
    in srgb,
    var(--profile-text) 10%,
    var(--profile-surface)
  );
  color: var(--profile-text);
}
body.user-profile-theme.profile-theme-custom tbody tr:hover,
body.user-profile-theme.profile-theme-custom .button:hover,
body.user-profile-theme.profile-theme-custom button:hover {
  background: color-mix(
    in srgb,
    var(--profile-accent) 10%,
    var(--profile-surface)
  );
}
body.user-profile-theme.profile-theme-custom .field input:not([type=checkbox]),
body.user-profile-theme.profile-theme-custom .field select,
body.user-profile-theme.profile-theme-custom .field textarea,
body.user-profile-theme.profile-theme-custom .stacked-form input,
body.user-profile-theme.profile-theme-custom .stacked-form select,
body.user-profile-theme.profile-theme-custom .filter-bar select,
body.user-profile-theme.profile-theme-custom .filter-bar input:not([type=checkbox]),
body.user-profile-theme.profile-theme-custom .case-party-checklist,
body.user-profile-theme.profile-theme-custom .checkbox-list {
  background: var(--profile-surface);
  border-color: var(--line);
  color: var(--profile-text);
}
body.user-profile-theme.profile-theme-custom .field label,
body.user-profile-theme.profile-theme-custom .stacked-form label,
body.user-profile-theme.profile-theme-custom .field-label,
body.user-profile-theme.profile-theme-custom .filter-bar label {
  color: var(--profile-text);
}
body.user-profile-theme.profile-background-override {
  --canvas: var(--profile-user-background);
}

.profile-appearance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(19rem, 0.65fr);
  gap: 1rem;
  align-items: start;
}
.profile-appearance-layout .form-panel { max-width: none; }
.profile-appearance-form { grid-template-columns: 1fr; }
.profile-background-choice,
.profile-custom-colors,
.profile-card-colors {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 1rem;
}
.profile-custom-palette {
  display: grid;
  gap: 1rem;
}
.profile-custom-palette[hidden] { display: none !important; }
.profile-custom-colors[hidden],
.profile-card-colors[hidden] { display: none !important; }
.profile-background-choice legend,
.profile-custom-colors legend,
.profile-card-colors legend {
  color: var(--purple-dark);
  font-weight: 800;
  padding: 0 0.35rem;
}
.profile-background-choice > p,
.profile-custom-colors > p,
.profile-card-colors > p {
  color: var(--muted);
  margin: 0 0 1rem;
}
.profile-background-controls {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(12rem, 0.45fr) minmax(16rem, 1fr);
}
.profile-background-toggle {
  align-items: flex-start;
  display: flex;
  gap: 0.65rem;
  grid-column: 1 / -1;
}
.profile-background-toggle input {
  flex: 0 0 auto;
  margin-top: 0.2rem;
}
.profile-background-toggle label {
  color: var(--ink);
  font-weight: 750;
}
.profile-background-toggle small {
  display: block;
  margin-top: 0.25rem;
}
.profile-color-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.profile-strength-heading {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}
.profile-strength-heading output {
  background: color-mix(in srgb, var(--purple) 10%, var(--paper));
  border-radius: 999px;
  color: var(--purple-dark);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
}
.profile-strength-control input[type="range"] {
  accent-color: var(--purple);
  cursor: pointer;
  margin: 0.65rem 0 0.1rem;
  padding: 0;
  width: 100%;
}
.profile-strength-scale {
  color: var(--muted);
  display: flex;
  font-size: 0.78rem;
  font-weight: 700;
  justify-content: space-between;
}
.profile-background-choice input[type="color"],
.profile-color-fields input[type="color"] {
  cursor: pointer;
  min-height: 3.2rem;
  padding: 0.2rem;
}
.profile-contrast-report {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 1rem;
}
.profile-contrast-report h3,
.profile-contrast-report p { margin-top: 0; }
.profile-contrast-report ul {
  display: grid;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.profile-contrast-report li {
  border-radius: 0.35rem;
  font-size: 0.85rem;
  font-weight: 750;
  padding: 0.4rem 0.55rem;
}
.profile-contrast-report .contrast-pass {
  background: #e9f5ee;
  color: #17633a;
}
.profile-contrast-report .contrast-warning {
  background: #fff0f1;
  color: #8f1d2a;
}
.profile-appearance-preview {
  --profile-accent: #654a7b;
  --profile-background: #f5f4f7;
  --profile-surface: #fcfbfd;
  --profile-text: #242731;
  --profile-muted: #5d6270;
  --profile-accent-text: #ffffff;
  --profile-header: #39466f;
  --profile-navigation: #433d70;
  --profile-link: #40566e;
  --profile-border: #dddce1;
  --profile-success: #2f9e44;
  --profile-warning: #d0aa00;
  --profile-danger: #d93025;
  --profile-gantt-track: #f0f1f3;
  --profile-gantt-grid: #dfe2e7;
  --profile-gantt-today: #d93025;
  --profile-gantt-upcoming: #2878b5;
  --profile-gantt-drt: #2878b5;
  --profile-gantt-applicant: #d0aa00;
  --profile-gantt-hearing: #39466f;
  min-height: 20rem;
  border: 1px solid #d9dce5;
  border-radius: 0.65rem;
  background: var(--profile-background);
  color: var(--profile-text);
  overflow: hidden;
}
.profile-preview-window { min-height: 20rem; }
.profile-preview-header {
  align-items: center;
  background: var(--profile-header);
  color: #ffffff;
  display: flex;
  gap: 0.55rem;
  padding: 0.75rem;
}
.profile-preview-header > strong {
  background: var(--profile-accent);
  border-radius: 0.3rem;
  color: var(--profile-accent-text);
  padding: 0.35rem;
}
.profile-preview-header > span:not(.profile-preview-search) {
  font-size: 0.78rem;
  font-weight: 800;
}
.profile-preview-search {
  background: var(--profile-surface);
  border-radius: 0.25rem;
  color: var(--profile-muted);
  font-size: 0.68rem;
  margin-left: auto;
  padding: 0.35rem 0.75rem;
}
.profile-preview-nav {
  align-items: center;
  background: var(--profile-navigation);
  color: #ffffff;
  display: flex;
  font-size: 0.68rem;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
}
.profile-preview-nav strong {
  background: var(--profile-background);
  border-bottom: 3px solid var(--profile-accent);
  color: var(--profile-text);
  margin: -0.5rem 0;
  padding: 0.5rem;
}
.profile-preview-workspace {
  background:
    radial-gradient(
      circle at 92% 8%,
      color-mix(in srgb, var(--profile-accent) 8%, transparent),
      transparent 11rem
    ),
    var(--profile-background);
  min-height: 15rem;
  padding: 1rem;
}
.profile-appearance-preview h2 { margin: 0.25rem 0 0.7rem; }
.profile-preview-alert {
  background: #fff0f1;
  border-left: 3px solid #c85a63;
  border-radius: 0.35rem;
  color: #8f1d2a;
  font-size: 0.72rem;
  font-weight: 750;
  margin-bottom: 0.65rem;
  padding: 0.55rem;
}
.profile-preview-metrics {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0.65rem;
}
.profile-preview-metrics span {
  background: var(--profile-surface);
  border: 1px solid color-mix(
    in srgb,
    var(--profile-accent) 35%,
    var(--profile-surface)
  );
  border-top: 3px solid var(--profile-accent);
  border-radius: 0.35rem;
  color: var(--profile-muted);
  display: grid;
  font-size: 0.6rem;
  padding: 0.45rem;
}
.profile-preview-metrics strong {
  color: var(--profile-text);
  font-size: 1rem;
}
.profile-preview-card {
  display: grid;
  gap: 0.7rem;
  border: 1px solid color-mix(
    in srgb,
    var(--profile-text) 22%,
    var(--profile-surface)
  );
  border-radius: 0.5rem;
  background: var(--profile-surface);
  color: var(--profile-text);
  padding: 1rem;
}
.profile-preview-card span { color: var(--profile-muted); }
.profile-preview-card a { color: var(--profile-link); }
.profile-preview-card .button { justify-self: start; }
.profile-appearance-preview .button.primary {
  background: var(--profile-accent);
  border-color: var(--profile-accent);
  color: var(--profile-accent-text);
}
.profile-appearance-preview.profile-theme-light {
  --profile-accent: #67507d;
  --profile-background: #f8f9fc;
  --profile-surface: #ffffff;
  --profile-text: #252832;
  --profile-muted: #606675;
  --profile-header: #43547d;
  --profile-navigation: #554373;
}
.profile-appearance-preview.profile-theme-dark {
  --profile-accent: #9b72b0;
  --profile-background: #171a23;
  --profile-surface: #252936;
  --profile-text: #f5f7fb;
  --profile-muted: #c4c9d4;
  --profile-accent-text: #ffffff;
  --profile-header: #20283f;
  --profile-navigation: #2f2949;
  color-scheme: dark;
}
.profile-appearance-preview.profile-theme-dark .profile-preview-alert {
  background: #3f2a2e;
  color: #ffb3ba;
}
.profile-appearance-preview.profile-theme-rainbow {
  --profile-rainbow-card-strength: 10%;
  --profile-rainbow-card-background: linear-gradient(
    110deg,
    #FCE6E6,
    #FFF1E2,
    #FDF8E2,
    #E2F1E6,
    #E2E9FF,
    #F0E2F2
  );
  --profile-header: linear-gradient(
    110deg,
    #74293d,
    #8a4b25,
    #756817,
    #176146,
    #24588b,
    #573a83
  );
  --profile-navigation: linear-gradient(
    110deg,
    #5e2032,
    #70401f,
    #5d5518,
    #124f3a,
    #1e4773,
    #49306d
  );
}
.profile-rainbow-stripe {
  display: none;
  height: 0.45rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #e40303,
    #ff8c00,
    #ffed00,
    #008026,
    #004dff,
    #750787
  );
}
.profile-theme-rainbow .profile-rainbow-stripe { display: block; }
.profile-appearance-preview.profile-theme-rainbow .profile-preview-card,
.profile-appearance-preview.profile-theme-rainbow .profile-preview-metrics span {
  border: 1px solid transparent;
  border-top: 3px solid #7b3f92;
  background:
    var(--profile-rainbow-card-background) padding-box,
    linear-gradient(
      90deg,
      #e40303,
      #ff8c00,
      #ffed00,
      #008026,
      #004dff,
      #750787
    ) border-box;
}
.profile-appearance-preview.profile-theme-rainbow
  .profile-preview-metrics span:nth-child(1) {
  border-top-color: #c93e50;
}
.profile-appearance-preview.profile-theme-rainbow
  .profile-preview-metrics span:nth-child(2) {
  border-top-color: #347b52;
}
.profile-appearance-preview.profile-theme-rainbow
  .profile-preview-metrics span:nth-child(3) {
  border-top-color: #315c8d;
}
.profile-appearance-preview.profile-theme-custom { background: var(--profile-background); }
.profile-preview-gantt {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.7rem;
}
.profile-preview-gantt > div {
  position: relative;
  height: 1rem;
  overflow: hidden;
  border: 1px solid var(--profile-border);
  border-radius: 0.25rem;
  background: repeating-linear-gradient(
    90deg,
    var(--profile-gantt-track) 0,
    var(--profile-gantt-track) calc(20% - 1px),
    var(--profile-gantt-grid) calc(20% - 1px),
    var(--profile-gantt-grid) 20%
  );
}
.preview-gantt-bar {
  position: absolute;
  inset-block: 0.14rem;
  left: 12%;
  width: 45%;
  border-radius: 0.2rem;
}
.preview-gantt-staff { background: var(--profile-accent); }
.preview-gantt-drt {
  left: 38%;
  width: 38%;
  background: var(--profile-gantt-drt);
}
.preview-gantt-point {
  position: absolute;
  top: 50%;
  left: 72%;
  width: 0.72rem;
  height: 0.72rem;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--profile-success);
  border: 1px solid var(--profile-surface);
}
.preview-gantt-today {
  position: absolute;
  inset-block: 0;
  left: 44%;
  width: 2px;
  background: var(--profile-gantt-today);
}
.profile-preview-gantt small { color: var(--profile-muted); }
.profile-reset-panel {
  max-width: 980px;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.profile-reset-panel h2 { margin: 0 0 0.25rem; color: var(--purple-dark); }
.profile-reset-panel p { margin: 0; color: var(--muted); }
.profile-reset-panel form { margin: 0; }
@media (max-width: 760px) {
  .profile-background-controls,
  .profile-color-fields {
    grid-template-columns: 1fr;
  }
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; background: var(--paper); }
th, td { text-align: left; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f0eff2; color: #4a4e59; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
tbody tr:hover { background: #f7f6f8; }
td small { color: var(--muted); }
.filter-bar {
  display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: end; background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.8rem; margin-bottom: 1rem; border-radius: 0.45rem;
}
.filter-bar label { font-size: 0.86rem; font-weight: 700; color: #404552; }
.filter-bar select,
.filter-bar input:not([type=checkbox]) {
  display: block;
  min-width: 12rem;
  margin-top: 0.25rem;
  padding: 0.5rem;
  border: 1px solid #aab6c0;
  border-radius: 0.3rem;
}
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1rem; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; margin-bottom: 1rem; }
.summary-grid article { background: var(--paper); border: 1px solid var(--line); border-radius: 0.45rem; padding: 0.8rem 1rem; }
.summary-grid span, .deadline-banner span { display: block; color: var(--muted); font-size: 0.82rem; margin-bottom: 0.2rem; }
.summary-grid strong { color: var(--ink); }
.case-date-panel { margin-bottom: 1rem; }
.case-date-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}
.case-date-grid article {
  background: #f8f7f9;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.8rem 1rem;
}
.case-date-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}
.case-date-grid strong { color: var(--ink); }
.case-progress-panel { margin-bottom: 1rem; }
.case-progress-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
}
.case-progress-ring {
  --case-progress-color: #2878b5;
  --case-progress: 0%;
  width: 8rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0.62rem;
  border-radius: 50%;
  background: conic-gradient(
    var(--case-progress-color) 0 var(--case-progress),
    #e7e8ec var(--case-progress) 100%
  );
}
.case-progress-ring.on-track { --case-progress-color: #2878b5; }
.case-progress-ring.applicant-delay { --case-progress-color: #d0aa00; }
.case-progress-ring.overdue { --case-progress-color: #d93025; }
.case-progress-ring.complete { --case-progress-color: #2f9e44; }
.case-progress-ring.not-started { --case-progress-color: #9eb7c5; }
.case-progress-ring > div,
.case-progress-ring > span {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: var(--paper);
}
.case-progress-ring strong { color: var(--ink); font-size: 1.45rem; }
.case-progress-ring span { color: var(--muted); font-size: 0.75rem; }
.case-progress-ring.compact {
  width: 3.25rem;
  padding: 0.32rem;
  flex: 0 0 auto;
}
.case-progress-ring.compact > span {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
}
.case-progress-copy h2 { margin: 0.1rem 0 0.25rem; color: var(--purple-dark); }
.case-progress-copy > p { margin: 0.2rem 0; }
.case-progress-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.55rem;
}
.case-progress-details div {
  padding: 0.55rem 0.7rem;
  border-radius: 0.35rem;
  background: #f5f4f7;
}
.case-progress-details dt { margin: 0; }
.case-progress-details dd { color: var(--ink); font-weight: 750; }
.timeline-delay-note {
  max-width: 58rem;
  margin: 0.7rem 0 0 !important;
  padding: 0.55rem 0.7rem;
  color: #684d00;
  background: #fff7d8;
  border-left: 4px solid #d0aa00;
}
.case-progress-table {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
}
.case-progress-table > span:last-child { display: grid; gap: 0.15rem; }
.case-progress-table small { color: var(--muted); }
.deadline-banner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 1rem; border-radius: 0.45rem; overflow: hidden; }
.deadline-banner > div { background: var(--paper); padding: 0.9rem 1rem; }
.deadline-banner.target_overdue { border-left: 5px solid #c77a0a; }
.deadline-banner.controlling_overdue { border-left: 5px solid var(--danger); }
.deadline-banner.urgent { border-left: 5px solid #c77a0a; }
dl { margin: 0; }
dt { color: var(--muted); font-size: 0.82rem; margin-top: 0.8rem; }
dd { margin: 0.2rem 0 0; }
.compact-record, .note { display: grid; gap: 0.2rem; padding: 0.65rem 0; border-top: 1px solid var(--line); }
.compact-record:first-of-type, .note:first-of-type { border-top: 0; }
.compact-record span, .compact-record small, .note small { color: var(--muted); }
.note p { margin: 0.25rem 0; }
.alert { border: 1px solid var(--line); border-left-width: 3px; padding: 0.8rem 1rem; margin: 0 0 1rem; background: var(--paper); }
.alert.danger { border-left-color: var(--danger); background: var(--danger-bg); }
.alert.notice-guidance { border-left-color: var(--purple); background: #faf7fc; }
.message { background: #e9f5ee; color: var(--success); border: 1px solid #b9d8c6; padding: 0.7rem 1rem; border-radius: 0.4rem; }

.notice-compliance-panel { margin-bottom: 1rem; }
.notice-legal-guidance {
  background: #faf7fc;
  border: 1px solid var(--line);
  border-left: 5px solid var(--purple);
  border-radius: 0.4rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.notice-legal-guidance p { margin: 0.25rem 0; }
.notice-receipt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}
.notice-receipt-card, .notice-review-card {
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.9rem;
  background: var(--paper);
}
.notice-receipt-card { display: flex; flex-direction: column; gap: 0.65rem; }
.notice-receipt-card .button { margin-top: auto; align-self: start; }
.notice-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  color: var(--ink);
  font-weight: 800;
}
.notice-check input { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; }
.notice-receipt-card dl { display: grid; gap: 0.35rem; }
.notice-review-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 0.9rem;
  border-left: 5px solid var(--purple);
}
.notice-review-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.notice-history { margin-top: 1rem; }
.notice-history summary {
  cursor: pointer;
  color: var(--link);
  font-weight: 800;
  padding: 0.5rem 0;
}

.case-history-panel { margin-bottom: 1rem; }
.case-history-panel .panel-heading .actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}
.decision-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.decision-route-grid article {
  display: grid;
  gap: 0.25rem;
  min-height: 7rem;
  align-content: start;
  background: #f8f7f9;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.85rem 1rem;
}
.decision-route-grid article:first-child { border-top: 4px solid var(--purple); }
.decision-route-grid article:nth-child(2) { border-top: 4px solid #7b8794; }
.decision-route-grid article:last-child { border-top: 4px solid var(--header); }
.decision-route-grid span,
.decision-route-grid small {
  color: var(--muted);
}
.decision-route-grid strong {
  color: var(--ink);
  font-size: 1rem;
}
.application-history {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-top: 1rem;
}
.application-history h3,
.application-history h4 {
  color: var(--ink);
  margin-top: 0;
}
.application-history h3 { margin-bottom: 0.25rem; }
.application-history h4 { font-size: 0.95rem; }
.application-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.timeline-guidance {
  border-left-color: #2878b5;
  background: #f3f7fb;
}
.timeline-chart-panel { margin-bottom: 1rem; }
.timeline-chart-range {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.timeline-not-started-note,
.gantt-today-outside {
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.8rem;
  border-left: 0.3rem solid var(--purple);
  background: color-mix(in srgb, var(--purple) 8%, var(--paper));
  color: var(--ink);
}
.timeline-not-started-note strong { display: block; margin-bottom: 0.2rem; }
.gantt-chart { display: grid; gap: 0.45rem; }
.gantt-axis {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(8rem, 1.1fr);
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.gantt-axis-range {
  display: flex;
  grid-column: 2;
  justify-content: space-between;
  min-width: 0;
}
.gantt-axis-range > span {
  display: grid;
  gap: 0.1rem;
  white-space: nowrap;
}
.gantt-axis-range > span:last-child { text-align: right; }
.gantt-axis-range small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.gantt-axis-range strong { color: var(--ink); font-size: 0.82rem; }
.gantt-today-key {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.8rem;
  gap: 0.4rem;
  justify-content: flex-end;
  margin: -0.15rem 0 0;
}
.gantt-today-key > span {
  background: var(--gantt-today);
  display: inline-block;
  height: 1rem;
  width: 2px;
}
.gantt-row {
  display: grid;
  grid-template-columns: minmax(15rem, 0.9fr) minmax(24rem, 2fr) minmax(9rem, 0.6fr);
  gap: 0.8rem;
  align-items: center;
  min-height: 3.3rem;
  padding: 0.35rem 0;
  border-top: 1px solid var(--line);
}
.gantt-row:first-child { border-top: 0; }
.gantt-label,
.gantt-date { display: grid; gap: 0.12rem; }
.gantt-label span,
.gantt-date span { color: var(--muted); font-size: 0.8rem; }
.gantt-track {
  position: relative;
  height: 1.55rem;
  overflow: hidden;
  border: 1px solid #ccd1d7;
  border-radius: 0.3rem;
  background:
    repeating-linear-gradient(
      90deg,
      var(--gantt-track) 0,
      var(--gantt-track) calc(10% - 1px),
      var(--gantt-grid) calc(10% - 1px),
      var(--gantt-grid) 10%
    );
}
.gantt-bar {
  position: absolute;
  inset-block: 0.18rem;
  min-width: 0.4rem;
  border-radius: 0.22rem;
  background: var(--purple);
}
.gantt-today {
  position: absolute;
  z-index: 2;
  inset-block: -0.2rem;
  width: 2px;
  background: var(--gantt-today);
}
.gantt-point {
  position: absolute;
  z-index: 3;
  top: 50%;
  bottom: auto;
  width: 1rem;
  height: 1rem;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 2px solid var(--paper);
  background: var(--purple);
}
.gantt-point.completed,
.gantt-point.completed-late { background: var(--success); }
.gantt-point.overdue { background: var(--danger); }
.gantt-point.upcoming { background: var(--gantt-upcoming); }
.gantt-bar.responsibility-intake { background: #7b8794; }
.gantt-bar.responsibility-drt { background: var(--gantt-drt); }
.gantt-bar.responsibility-staff { background: var(--purple); }
.gantt-bar.responsibility-applicant { background: var(--gantt-applicant); }
.gantt-bar.responsibility-hearing_body { background: var(--gantt-hearing); }
.gantt-bar.completed { box-shadow: inset 0 0 0 2px #246b44; }
.gantt-bar.applicant-delay,
.gantt-bar.overdue { animation: none; box-shadow: inset 0 0 0 2px #a6202b; }
.gantt-bar.case-status-on-track { background: #2878b5; }
.gantt-bar.case-status-applicant-delay { background: #d0aa00; }
.gantt-bar.case-status-overdue { background: #d93025; }
.gantt-bar.case-status-complete { background: #2f9e44; }
.gantt-bar.case-status-not-started { background: #9eb7c5; }
.status.timeline-completed { background: #e9f5ee; color: var(--success); }
.status.timeline-completed-late,
.status.timeline-applicant-delay { background: var(--warning-bg); color: var(--warning); }
.status.timeline-overdue { background: var(--danger-bg); color: var(--danger); }
.status.timeline-upcoming { background: #edf4fa; color: #2f5f85; }
.status.timeline-unscheduled { background: #eceef1; color: #44515e; }
.status.timeline-not-applicable { background: #eceef1; color: #44515e; }
.deadline-alert-actions {
  display: grid;
  grid-template-columns: auto auto minmax(18rem, 1fr);
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
}
.deadline-alert-actions form,
.deadline-snooze-form,
.deadline-resolve-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}
.deadline-resolve-form { display: grid !important; grid-template-columns: minmax(12rem, 1fr) auto; }
.deadline-alert-actions select,
.deadline-alert-actions input[type="text"] {
  min-height: 2.2rem;
}
.deadline-alert-actions input[type="text"] { width: 100%; }
.deadline-alert-history .record-list form { margin-top: 0.35rem; }
.review-cycle-list {
  display: grid;
  gap: 0.8rem;
}
.review-cycle-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 0.5rem;
  padding: 0.9rem;
  background: var(--panel-muted, var(--panel));
}
.review-cycle-card.current { border-left-color: var(--success); }
.review-cycle-card h3,
.review-cycle-card h4 { margin: 0; }
.review-cycle-card p { overflow-wrap: anywhere; }
.review-cycle-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.7rem;
}
.review-cycle-snapshot-grid > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.7rem;
}
.project-progress-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}
.project-progress-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
  text-decoration: none;
}
.project-progress-card > span:last-child { display: grid; gap: 0.2rem; }
.project-progress-card small { color: var(--muted); }
.timeline-update-form { display: grid; gap: 0.8rem; }
.timeline-update-row {
  display: grid;
  grid-template-columns:
    minmax(16rem, 1.2fr)
    minmax(10rem, 0.55fr)
    minmax(10rem, 0.55fr)
    minmax(16rem, 1fr);
  gap: 1rem;
  align-items: start;
}
.timeline-update-row h2 {
  margin: 0.15rem 0 0.25rem;
  color: var(--purple-dark);
  font-size: 1.05rem;
}
.timeline-update-row p { margin: 0; color: var(--muted); }

.timeline-graph-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}
.timeline-graph-grid .timeline-chart-panel { margin-bottom: 1rem; }
.timeline-graph-grid .gantt-row {
  grid-template-columns: minmax(9rem, 1fr) minmax(8rem, 1.1fr);
}
.timeline-graph-grid .gantt-date {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}
.hearing-status-summary {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.hearing-status-summary small { color: var(--muted); }
.timeline-chart-actions { margin-top: 0.8rem; }
.gantt-bar.hearing-green { background: #2f9e44; }
.gantt-bar.hearing-yellow { background: #d0aa00; }
.gantt-bar.hearing-red { background: #d93025; }
.gantt-bar.hearing-completed {
  background: #3f5f78;
  box-shadow: inset 0 0 0 2px #243d50;
}
.status.hearing-green { background: #e9f5ee; color: #246b44; }
.status.hearing-yellow { background: var(--warning-bg); color: var(--warning); }
.status.hearing-red { background: var(--danger-bg); color: var(--danger); }
.status.hearing-completed { background: #e8eef3; color: #29465d; }
.status.hearing-not-started { background: #eceef1; color: #44515e; }
.hearing-checklist-row {
  display: grid;
  grid-template-columns: minmax(15rem, 1.2fr) minmax(10rem, 0.55fr) minmax(16rem, 1fr);
  gap: 1rem;
  align-items: center;
}
.hearing-checklist-row h2,
.hearing-checklist-row p { margin: 0; }
.hearing-checkbox label {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-weight: 800;
  color: var(--ink);
}
.hearing-checkbox input {
  width: 1.35rem;
  height: 1.35rem;
  accent-color: var(--purple);
}
.hearing-checkbox small {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
}
.schedule-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.schedule-title-block {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}
.schedule-logo {
  flex: 0 0 auto;
  width: 3.1rem;
  max-height: 4rem;
  object-fit: contain;
  height: auto;
}
.annual-schedule-panel { padding: 0; overflow: hidden; }
.annual-schedule-table {
  min-width: 72rem;
  table-layout: fixed;
}
.annual-schedule-table th {
  background: var(--purple);
  color: white;
  text-align: center;
  font-size: 0.76rem;
}
.annual-schedule-table .schedule-group-headings th {
  background: #236272;
  font-size: 0.84rem;
}
.annual-schedule-table .schedule-group-headings th:last-child {
  background: var(--purple);
}
.annual-schedule-table td {
  text-align: center;
  vertical-align: middle;
  font-size: 0.8rem;
}
.annual-schedule-table .restricted-session td { background: #e4e5e9; }
.annual-schedule-table .canceled-session td { background: #f8dde0; }
.schedule-footnote {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0.55rem 0;
}
.hearing-alert-panel {
  border-left: 0.35rem solid #d93025;
  margin-bottom: 1rem;
}
.appointment-alert-panel {
  border-left: 0.35rem solid #d0aa00;
  margin-bottom: 1rem;
}

.form-panel, .login-panel {
  max-width: 980px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 1.4rem;
  box-shadow: 0 1px 4px rgba(47,51,64,0.06);
}
.login-panel { max-width: 34rem; margin: 4rem auto; }
.login-panel h1 { color: var(--purple-dark); }
.record-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.record-form .field-wide { grid-column: 1 / -1; }
.record-form .actions { grid-column: 1 / -1; }
.form-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.form-grid .full { grid-column: 1 / -1; }
.field { min-width: 0; }
.field label, .stacked-form label { display: block; font-weight: 750; color: #404552; margin-bottom: 0.3rem; }
.field input:not([type=checkbox]), .field select, .field textarea,
.stacked-form input, .stacked-form select {
  width: 100%; border: 1px solid #b9adc4; border-radius: 0.3rem; padding: 0.55rem 0.6rem; background: white;
}
.field textarea { min-height: 6rem; resize: vertical; }
.case-title-character-count {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}
.beta-feedback-dashboard-card {
  border-left: 0.35rem solid var(--purple);
  margin-bottom: 1rem;
}
.beta-feedback-board {
  display: grid;
  gap: 1rem;
}
.beta-feedback-card {
  border-left: 0.35rem solid #7c6aa6;
  margin: 0;
}
.beta-feedback-card.priority-minor { border-left-color: #4f8a62; }
.beta-feedback-card.priority-important { border-left-color: #d0aa00; }
.beta-feedback-card.priority-prevents_work { border-left-color: #c3342c; }
.beta-feedback-statuses,
.feedback-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.feedback-card-metrics {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
}
.feedback-card-metrics a { margin-left: auto; font-weight: 750; }
.status.minor { background: #e9f5ee; color: #17633a; }
.status.important { background: #fff5cc; color: #755900; }
.status.prevents_work { background: var(--danger-bg); color: var(--danger); }
.beta-feedback-owner-response {
  border-left: 0.35rem solid var(--purple);
}
.feedback-comments {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.feedback-comments .note {
  background: #f8f7f9;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.85rem 1rem;
}
.feedback-comments .note p { margin-top: 0; }
.beta-feedback-discussion .compact-form > button {
  align-self: end;
  justify-self: start;
}
.beta-feedback-owner-form #id_related_feedback {
  max-height: 18rem;
  overflow: auto;
}
.field-label {
  display: block;
  font-weight: 750;
  color: #404552;
  margin-bottom: 0.4rem;
}
.checkbox-list {
  max-height: 18rem;
  overflow: auto;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: white;
}
.checkbox-list > div,
.checkbox-list ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.checkbox-list label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  font-weight: 600;
}
.checkbox-list input[type=checkbox] {
  margin-top: 0.2rem;
  flex: 0 0 auto;
}
.field input:focus, .field select:focus, .field textarea:focus, .stacked-form input:focus {
  outline: 3px solid rgba(111,74,142,0.22); border-color: var(--purple);
}
.contact-filter-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.contact-filter-radios > div { flex: 1 1 10rem; }
.contact-filter-radios label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  cursor: pointer;
}
.contact-filter-radios label:has(input:checked) {
  color: var(--ink);
  background: color-mix(in srgb, var(--purple) 14%, var(--paper));
  border-color: var(--purple);
  box-shadow: inset 0 0 0 1px var(--purple);
}
.contact-filter-radios input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}
.contact-list-options {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1rem;
  margin: 0;
  padding: 0.9rem 1rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: var(--paper);
}
.contact-list-options legend {
  padding: 0 0.35rem;
  color: var(--purple-dark);
  font-weight: 800;
}
.contact-list-options > p {
  grid-column: 1 / -1;
  margin: 0 0 0.15rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.task-contact-information {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 1rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--paper);
}
.task-contact-information legend {
  padding: 0 0.35rem;
  color: var(--purple-dark);
  font-weight: 800;
}
.task-contact-information-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}
.task-contact-information-heading p { margin: 0; color: var(--muted); }
.task-contact-information-heading a { white-space: nowrap; }
.check-row { display: flex !important; align-items: center; gap: 0.55rem; min-height: 2.5rem; }
.check-row input { width: 1.2rem; height: 1.2rem; }
.field small { color: var(--muted); }
.error-text { display: block; color: var(--danger); margin-top: 0.25rem; }
.field-error input, .field-error select, .field-error textarea { border-color: var(--danger); }
.task-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.65rem;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.task-contact > strong,
.task-contact-name { flex-basis: 100%; color: var(--ink); }
.task-contact a { color: var(--link); }
.task-contact-name strong { color: inherit; }
.task-title-line {
  display: grid;
  gap: 0.35rem;
}
.task-complete-form { margin: 0; }
.task-complete-form label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}
.task-complete-form input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--green);
}
.task-complete-form.is-saving { opacity: 0.6; pointer-events: none; }
.task-scheduling-workspace {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--purple) 7%, var(--paper));
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
.task-scheduling-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}
.task-scheduling-heading .eyebrow { margin: 0 0 0.15rem; }
.task-scheduling-heading h2 {
  margin: 0;
  color: var(--purple-dark);
}
.task-scheduling-heading > p {
  max-width: 32rem;
  margin: 0;
  color: var(--muted);
}
.task-scheduling-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 0.85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
}
.task-scheduling-workspace > .alert[hidden] { display: none; }
.task-schedule-panel {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
.task-schedule-panel > summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  cursor: pointer;
  padding: 0.85rem 1rem;
  color: var(--purple-dark);
}
.task-schedule-panel > summary small { color: var(--muted); }
.task-schedule-panel[open] > summary {
  border-bottom: 1px solid var(--line);
}
.task-schedule-content { padding: 0.85rem 1rem 1rem; }
.task-schedule-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.task-schedule-heading p { margin: 0; color: var(--muted); }
.task-schedule-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  max-height: 20rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.task-schedule-item {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--purple);
  border-radius: 0.35rem;
}
.task-schedule-item time { color: var(--purple-dark); font-weight: 800; }
.task-schedule-item small { color: var(--muted); }

.queue-disclosures {
  display: grid;
  gap: 0.65rem;
}
.queue-disclosure {
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #f8f7f9;
}
.queue-disclosure summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 750;
  padding: 0.75rem 0.85rem;
}
.queue-disclosure summary:hover { color: var(--link-hover); }
.queue-count {
  display: inline-grid;
  min-width: 1.7rem;
  min-height: 1.7rem;
  place-items: center;
  margin-left: 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 12%, var(--paper));
  color: var(--ink);
  font-size: 0.8rem;
}
.queue-content {
  padding: 0 0.85rem 0.8rem;
  border-top: 1px solid var(--line);
}
.queue-content p { margin: 0.65rem 0 0; }

.help-heading { align-items: center; }
.help-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 2rem;
  align-items: end;
  margin-bottom: 1.25rem;
  border-left: 5px solid var(--purple);
}
.help-search-panel h2 { margin: 0 0 0.65rem; color: var(--purple-dark); }
.help-search-panel label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 800;
}
.help-search-panel input[type="search"] {
  width: min(100%, 54rem);
  font-size: 1rem;
}
.help-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.help-search-result {
  grid-column: 1 / -1;
  min-height: 1.25rem;
  margin: 0;
  color: var(--purple-dark);
  font-weight: 800;
}
.help-introduction { margin: 1.5rem 0; }
.help-introduction > h2 { color: var(--purple-dark); }
.help-callout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.help-callout-grid h3 { margin: 0 0 0.45rem; color: var(--purple-dark); }
.help-callout-grid p { margin: 0; color: var(--muted); }
.help-index {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 1.5rem 0;
  padding: 0.85rem 1rem;
  background: #f1edf5;
  border: 1px solid #d9cfe2;
  border-radius: 0.45rem;
}
.help-index a { font-weight: 800; }
.help-directory {
  display: grid;
  gap: 0.75rem;
  margin: 2.25rem 0;
  scroll-margin-top: 1rem;
}
.help-directory > .section-heading {
  margin-bottom: 0.35rem;
}
.help-directory > .section-heading h2 {
  margin: 0.1rem 0 0.35rem;
  color: var(--purple-dark);
}
.help-directory > .section-heading p:last-child {
  max-width: 68rem;
  margin: 0;
  color: var(--muted);
}
.help-card {
  padding: 0;
  overflow: clip;
}
.help-card[hidden],
.help-admin-model[hidden] { display: none; }
.help-card > summary,
.help-admin-model > summary {
  display: grid;
  grid-template-columns: minmax(12rem, 0.45fr) minmax(18rem, 1fr) auto;
  gap: 1rem;
  align-items: center;
  cursor: pointer;
  padding: 1rem 1.15rem;
  list-style: none;
}
.help-card > summary::-webkit-details-marker,
.help-admin-model > summary::-webkit-details-marker { display: none; }
.help-card > summary::after,
.help-admin-model > summary::after {
  content: "+";
  grid-column: 3;
  color: var(--purple);
  font-size: 1.45rem;
  font-weight: 900;
}
.help-card[open] > summary::after,
.help-admin-model[open] > summary::after { content: "−"; }
.help-card > summary:hover,
.help-admin-model > summary:hover { background: #f7f4fa; }
.help-card > summary span,
.help-admin-model > summary span {
  color: var(--purple-dark);
  font-size: 1.04rem;
  font-weight: 850;
}
.help-card > summary small,
.help-admin-model > summary small {
  color: var(--muted);
  line-height: 1.45;
}
.help-card[open] > summary,
.help-admin-model[open] > summary {
  border-bottom: 1px solid var(--line);
}
.help-card-body { padding: 1rem 1.15rem 1.25rem; }
.help-card-body > h3 {
  margin: 0.25rem 0 0.65rem;
  color: var(--purple-dark);
  font-size: 1rem;
}
.help-card-body > h3:not(:first-child) { margin-top: 1.2rem; }
.help-table { width: 100%; }
.help-table th,
.help-table td {
  vertical-align: top;
  line-height: 1.45;
}
.help-table tbody th {
  width: 22%;
  color: var(--purple-dark);
}
.field-reference-table { min-width: 64rem; }
.field-reference-table th:nth-child(1) { width: 19%; }
.field-reference-table th:nth-child(2) { width: 14%; }
.field-reference-table th:nth-child(3) { width: 14%; }
.technical-name {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.help-notes {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding-left: 1.25rem;
}
.help-choices { margin-top: 0.45rem; }
.help-choices summary {
  cursor: pointer;
  color: var(--link);
  font-weight: 750;
}
.help-choices p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}
.administration-directory > summary {
  grid-template-columns: minmax(18rem, 0.6fr) minmax(18rem, 1fr) auto;
}
.admin-help-models {
  display: grid;
  gap: 0.65rem;
}
.help-admin-model {
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #fbfafc;
  overflow: clip;
}
.help-admin-model-body { padding: 1rem; }
.admin-help-guidance {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 1rem;
}
.admin-help-guidance > div {
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: color-mix(in srgb, var(--purple) 5%, var(--paper));
  padding: 0.7rem;
}
.admin-help-guidance dt { margin: 0 0 0.25rem; font-weight: 800; color: var(--purple-dark); }
.admin-help-guidance dd { margin: 0; color: var(--ink); }
.help-admin-model-body > p {
  max-width: 70rem;
  margin: 0 0 0.85rem;
  color: var(--muted);
}
.help-footer-note {
  margin: 2rem 0 0;
  padding: 1rem;
  color: var(--muted);
  background: #f7f4fa;
  border-left: 4px solid var(--purple);
}

@media (max-width: 900px) {
  .site-header { flex-wrap: wrap; padding: 0.75rem 1rem; gap: 0.75rem; }
  .brand { min-width: auto; }
  .global-search { order: 3; flex-basis: 100%; }
  .user-menu { margin-left: auto; }
  .primary-nav { padding: 0 0.5rem; }
  html.mobile-navigation-ready .primary-nav-toggle {
    align-items: center;
    background: var(--nav);
    border: 0;
    border-bottom: 1px solid var(--nav-border);
    color: white;
    cursor: pointer;
    display: flex;
    font-weight: 800;
    gap: 0.55rem;
    justify-content: flex-start;
    min-height: 3rem;
    padding: 0.65rem 1rem;
    width: 100%;
  }
  html.mobile-navigation-ready .primary-nav-toggle:hover,
  html.mobile-navigation-ready .primary-nav-toggle:focus {
    background: color-mix(in srgb, var(--nav) 88%, white);
  }
  html.mobile-navigation-ready .primary-nav {
    display: none;
    flex-direction: column;
    overflow: visible;
    padding: 0;
  }
  html.mobile-navigation-ready .primary-nav.is-open { display: flex; }
  html.mobile-navigation-ready .primary-nav a {
    border-bottom: 1px solid rgb(255 255 255 / 14%);
    min-height: 2.85rem;
    padding: 0.8rem 1rem;
    white-space: normal;
    width: 100%;
  }
  .page-shell { padding: 1.1rem; }
  .metrics, .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .content-grid { grid-template-columns: 1fr; }
  .panel.wide { grid-column: auto; }
  .deadline-banner { grid-template-columns: 1fr; }
  .workload-row { grid-template-columns: minmax(12rem, 0.8fr) minmax(16rem, 2fr); }
  .workload-ring-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workload-status { display: none; }
  .employee-load-summary dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notice-receipt-grid { grid-template-columns: 1fr; }
  .notice-review-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decision-route-grid { grid-template-columns: 1fr; }
  .case-date-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-progress-summary { grid-template-columns: auto minmax(0, 1fr); }
  .case-progress-summary > .actions { grid-column: 1 / -1; }
  .case-progress-details { grid-template-columns: 1fr; }
  .gantt-row { grid-template-columns: minmax(11rem, 0.8fr) minmax(18rem, 1.5fr); }
  .gantt-date { grid-column: 1 / -1; display: flex; gap: 0.5rem; }
  .project-progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline-update-row { grid-template-columns: 1fr 1fr; }
  .timeline-update-row > div:first-of-type { grid-column: 1 / -1; }
  .timeline-graph-grid { grid-template-columns: 1fr; }
  .hearing-checklist-row { grid-template-columns: 1fr 1fr; }
  .hearing-checklist-row > div:first-of-type { grid-column: 1 / -1; }
  .task-schedule-list { grid-template-columns: 1fr; }
  .help-search-panel { grid-template-columns: 1fr; }
  .help-search-result { grid-column: auto; }
  .help-callout-grid { grid-template-columns: 1fr; }
  .help-card > summary,
  .help-admin-model > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .help-card > summary small,
  .help-admin-model > summary small {
    grid-column: 1;
  }
  .help-card > summary::after,
  .help-admin-model > summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .deadline-alert-actions { grid-template-columns: 1fr; align-items: stretch; }
  .deadline-alert-actions form { justify-content: flex-start; }
  .deadline-resolve-form { grid-template-columns: minmax(0, 1fr) auto !important; }
  .review-cycle-snapshot-grid { grid-template-columns: 1fr; }
  .admin-help-guidance { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .brand { width: 100%; }
  .user-menu {
    justify-content: flex-start;
    margin-left: 0;
    row-gap: 0.6rem;
    flex-wrap: wrap;
    width: 100%;
  }
  .global-search input { min-width: 0; }
  .module-hero { display: block; }
  .module-hero .button { margin-top: 1rem; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card { grid-template-columns: 3.5rem minmax(0, 1fr); padding: 1rem; }
  .module-mark { width: 3.5rem; }
  .module-card-heading { align-items: start; flex-direction: column; gap: 0.5rem; }
  .page-heading { display: block; }
  .page-heading .actions, .page-heading > .button { margin-top: 1rem; }
  .metrics,
  .summary-grid,
  .two-column,
  .record-form,
  .management-routing-grid { grid-template-columns: 1fr; }
  .profile-appearance-layout,
  .profile-color-fields { grid-template-columns: 1fr; }
  .profile-reset-panel { align-items: stretch; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .feedback-card-metrics a { margin-left: 0; width: 100%; }
  html:not(.mobile-navigation-ready) .primary-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  html:not(.mobile-navigation-ready) .primary-nav a { white-space: nowrap; }
  .workload-row { grid-template-columns: 1fr; gap: 0.45rem; }
  .workload-ring-grid { grid-template-columns: 1fr; }
  .workload-visual { grid-template-columns: minmax(8rem, 1fr) 3.5rem; }
  .employee-load-summary { grid-template-columns: 1fr; }
  .employee-load-summary dl { grid-template-columns: 1fr 1fr; }
  .notice-review-card { display: grid; }
  .notice-review-details { grid-template-columns: 1fr; }
  .application-history-grid { grid-template-columns: 1fr; }
  .case-date-grid { grid-template-columns: 1fr; }
  .case-progress-summary { grid-template-columns: 1fr; justify-items: start; }
  .case-progress-summary > .actions { grid-column: auto; }
  .gantt-row,
  .timeline-graph-grid .gantt-row { grid-template-columns: minmax(0, 1fr); }
  .gantt-date { grid-column: auto; }
  .timeline-graph-grid .gantt-axis { grid-template-columns: minmax(0, 1fr); }
  .timeline-graph-grid .gantt-axis-range { grid-column: 1; }
  .gantt-today-key { justify-content: flex-start; }
  .project-progress-grid,
  .timeline-update-row { grid-template-columns: 1fr; }
  .timeline-update-row > div:first-of-type { grid-column: auto; }
  .hearing-checklist-row { grid-template-columns: 1fr; }
  .hearing-checklist-row > div:first-of-type { grid-column: auto; }
  .contact-list-options,
  .task-contact-information { grid-template-columns: 1fr; }
  .contact-filter-radios {
    display: grid;
    grid-template-columns: 1fr;
  }
  .contact-filter-radios > div { min-width: 0; }
  .contact-filter-radios label { width: 100%; }
  .task-contact-information-heading { align-items: start; flex-direction: column; }
  .task-scheduling-heading { align-items: start; flex-direction: column; }
  .task-scheduling-controls { grid-template-columns: 1fr; }
  .help-search-actions { display: grid; grid-template-columns: 1fr; }
}

.project-case-membership-panel {
  max-width: 980px;
}

.project-case-membership-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 1.25rem 0;
  max-height: 34rem;
  overflow-y: auto;
  padding: 1rem;
}

.project-case-membership-list legend {
  color: var(--heading);
  font-weight: 700;
  padding: 0 0.35rem;
}

.project-case-membership-option {
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  gap: 0.75rem;
  padding: 0.8rem 0.4rem;
}

.project-case-membership-option:last-of-type {
  border-bottom: 0;
}

.project-case-membership-option:hover {
  background: var(--surface-muted);
}

.project-case-membership-option input {
  flex: 0 0 auto;
  margin-top: 0.2rem;
}

.field-management-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.field-management-links a {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.42rem 0.65rem;
  text-decoration: none;
}

.field-management-links a:hover,
.field-management-links a:focus {
  border-color: var(--brand);
  color: var(--brand);
}

@media print {
  .site-header,
  .primary-nav,
  .no-print,
  footer,
  .messages { display: none !important; }
  body { background: white; }
  .page-shell { max-width: none; margin: 0; padding: 0; }
  .hearing-schedule-heading { margin-bottom: 0.5rem; }
  .schedule-logo { width: 0.48in; }
  .annual-schedule-panel { border: 0; box-shadow: none; }
  .annual-schedule-table {
    min-width: 0;
    width: 100%;
    font-size: 7pt;
  }
  .annual-schedule-table th,
  .annual-schedule-table td {
    padding: 3pt;
    font-size: 6.5pt;
  }
  .help-directory { display: block; margin: 0.2in 0; }
  .help-card,
  .help-admin-model {
    display: block;
    break-inside: avoid;
    margin-bottom: 0.12in;
    box-shadow: none;
  }
  .help-card > summary,
  .help-admin-model > summary {
    display: block;
    padding: 6pt;
  }
  .help-card > summary::after,
  .help-admin-model > summary::after { display: none; }
  .help-card > summary small,
  .help-admin-model > summary small {
    display: block;
    margin-top: 2pt;
  }
  .help-card > :not(summary),
  .help-admin-model > :not(summary) { display: block !important; }
  .help-card-body,
  .help-admin-model-body { padding: 6pt; }
  .help-table,
  .field-reference-table {
    min-width: 0;
    font-size: 7pt;
  }
  .help-table th,
  .help-table td { padding: 3pt; }
  @page { size: landscape; margin: 0.35in; }
}
.certificate-workflow-summary {
  border-left: 0.35rem solid var(--purple);
}

.certificate-status-grid,
.certificate-signature-list {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.certificate-status-grid > div,
.certificate-signature-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--ink);
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem;
}

.certificate-status-grid span {
  display: block;
}

.certificate-signature-card h3 {
  margin: 0.1rem 0 0.4rem;
}

.communication-composer,
.communication-recipient-field {
  position: relative;
}

.communication-composer {
  max-width: none;
}

.recipient-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 2.4rem;
  margin-bottom: 0.55rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--paper);
}

.recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.5rem 0.32rem 0.65rem;
  border-radius: 999px;
  background: var(--purple-light);
  color: var(--ink);
  font-weight: 700;
}

.recipient-chip button {
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.recipient-chip button:hover,
.recipient-chip button:focus-visible {
  background: rgb(101 74 123 / 18%);
}

.recipient-search-results {
  position: absolute;
  z-index: 20;
  right: 0;
  left: 0;
  max-height: 24rem;
  overflow-y: auto;
  margin-top: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--paper);
  box-shadow: 0 0.8rem 2rem rgb(20 22 32 / 18%);
}

.recipient-result {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0.85rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.recipient-result:last-child {
  border-bottom: 0;
}

.recipient-result:hover,
.recipient-result:focus-visible {
  background: var(--purple-light);
}

.recipient-result span,
.recipient-result-empty {
  color: var(--muted);
}

.recipient-result-empty {
  margin: 0;
  padding: 0.9rem;
}

.communication-action-groups {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.communication-action-groups > div,
.personal-group-save {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--canvas);
}

.communication-action-groups .actions {
  margin-top: 0.65rem;
}

.dashboard-alert-action {
  border-left: 0.3rem solid var(--danger) !important;
}

.dashboard-alert-action p {
  color: var(--muted);
  margin: 0.45rem 0 0;
}

.communication-status {
  grid-column: 1 / -1;
  min-height: 1.5rem;
  margin: 0;
}

.personal-group-save summary {
  cursor: pointer;
  font-weight: 800;
}

.personal-group-save {
  grid-column: 1 / -1;
}

.saved-recipient-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.8rem;
}

.targeted-dashboard-alert {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.targeted-dashboard-alert h3,
.targeted-dashboard-alert p,
.targeted-dashboard-alert small,
.targeted-dashboard-alert a,
.management-action-card,
.management-action-card-link,
.management-routing-note,
.management-receipt-list li,
.management-receipt-list li p,
.management-receipt-list li a,
.management-receipt-list li span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.targeted-dashboard-alert h3,
.targeted-dashboard-alert p {
  margin: 0;
}

.targeted-dashboard-alert form {
  margin-top: 0.25rem;
}

.targeted-dashboard-alert .button,
.management-action-card .button {
  max-width: 100%;
  white-space: normal;
}

.intervention-alert-panel.dashboard-alert-refresh-highlight {
  box-shadow: 0 0 0 3px rgb(200 90 99 / 28%);
}

@media (max-width: 760px) {
  .communication-action-groups {
    grid-template-columns: 1fr;
  }

  .appointment-alert-panel .record-list > li {
    grid-template-columns: 1fr;
  }

  .appointment-alert-actions {
    justify-content: start;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .intervention-alert-panel.dashboard-alert-refresh-highlight {
    transition: box-shadow 0.3s ease;
  }
}
