:root {
  --workbench-gutter: clamp(12px, calc(5vw - 26px), 24px);
  --workbench-width: min(1440px, calc(100% - var(--workbench-gutter) - var(--workbench-gutter)));
  --workbench-navy: #16355d;
  --workbench-blue: #135cae;
  --workbench-divider: #cbd9e5;
  --workbench-deep: #133460;
  --workbench-middle: #124d9a;
  --workbench-end: #1468ae;
  --workbench-ink: #174d8f;
  --workbench-tint: #e6efff;
  --workbench-rgb: 27 85 158;
  --workbench-art: none;
  --text: #192e47;
  --muted: #4c6073;
  --blue: #135cae;
  --glass: #fff;
  --line: #d7e1e9;
  --radius: 17px;
  --shadow: 0 3px 12px #16355d0a;
}

body[data-workbench-view="duties"],
body[data-workbench-view="admin"] {
  --workbench-art: url("/workbench-art-duties.svg?v=2");
}

body[data-workbench-view="learning"],
body[data-workbench-view="admin-courses"] {
  --workbench-deep: #1e376a;
  --workbench-middle: #304b9a;
  --workbench-end: #425eb4;
  --workbench-ink: #354d95;
  --workbench-tint: #e9edff;
  --workbench-rgb: 56 78 151;
  --workbench-art: url("/workbench-art-learning.svg?v=2");
}

body[data-workbench-view="sentiment"],
body[data-workbench-view="admin-reports"] {
  --workbench-deep: #23394e;
  --workbench-middle: #255575;
  --workbench-end: #2b707f;
  --workbench-ink: #245d75;
  --workbench-tint: #e0eff3;
  --workbench-rgb: 36 93 117;
  --workbench-art: url("/workbench-art-sentiment.svg?v=2");
}

body[data-workbench-view="industry"] {
  --workbench-deep: #163b68;
  --workbench-middle: #0b5b82;
  --workbench-end: #0e7491;
  --workbench-ink: #125c81;
  --workbench-tint: #dff2f9;
  --workbench-rgb: 18 92 129;
  --workbench-art: url("/workbench-art-industry.svg?v=2");
}

body[data-workbench-view="ai"] {
  --workbench-deep: #302957;
  --workbench-middle: #51408c;
  --workbench-end: #6a50a3;
  --workbench-ink: #5a4296;
  --workbench-tint: #eee8fa;
  --workbench-rgb: 90 66 150;
  --workbench-art: url("/workbench-art-ai.svg?v=2");
}

body[data-workbench-view="esg"] {
  --workbench-deep: #124b43;
  --workbench-middle: #096351;
  --workbench-end: #177861;
  --workbench-ink: #15664f;
  --workbench-tint: #def2e9;
  --workbench-rgb: 21 102 79;
  --workbench-art: url("/workbench-art-esg.svg?v=2");
}

body {
  min-width: 0;
  color: var(--text);
}

.ambient {
  background: linear-gradient(115deg, #eff4f8, #e8f0f7 57%, #edf3f3);
}

.ambient i {
  display: none;
}

.glass {
  border-color: var(--workbench-divider);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* The painted navigation bar, page content and footer use the same outer edges. */
.topbar-wrap,
#main:not(.gate-main),
#footer {
  width: var(--workbench-width);
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
}

.topbar {
  width: 100%;
  max-width: none;
  gap: clamp(12px, 1.3vw, 22px);
  min-height: 66px;
  border: 1px solid #c9d8e5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 17px #213e6412;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.brand-title {
  color: var(--workbench-navy);
  font-weight: 700;
}

#footer {
  color: #52677b;
  border-color: #bfcfdd;
}

#main:not(.gate-main) {
  padding-top: clamp(16px, 2vw, 28px);
}

.nav-link,
.admin-entry,
.logout-button {
  color: #435a70;
}

.nav-link {
  display: grid;
  align-items: center;
  padding-inline: clamp(8px, .85vw, 16px);
  border-radius: 9px;
  font-size: .875rem;
}

.nav-link:hover,
.logout-button:hover {
  color: var(--workbench-ink);
  background: var(--workbench-tint);
}

.nav-link.active {
  color: #fff;
  background: var(--workbench-deep);
  box-shadow: none;
  font-weight: 650;
}

.btn.primary {
  background: var(--workbench-blue);
  border-color: var(--workbench-blue);
  box-shadow: none;
}

.btn.primary:hover {
  background: #104984;
  border-color: #104984;
}

:is(.nav-link, .chip, .btn, .play-button, .calendar-day, .week-cell, .segmented button):focus-visible {
  outline: 3px solid #2176c4;
  outline-offset: 2px;
}

/* Each introduction pairs a full-colour section illustration with a reading area. */
.page > .page-head,
.monitor-heading {
  --art-width: clamp(220px, 29vw, 435px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(162px, 15vw, 195px);
  padding: 25px calc(var(--art-width) + 42px) 25px clamp(24px, 3.1vw, 48px);
  margin-bottom: clamp(16px, 1.8vw, 26px);
  color: #fff;
  border: 0;
  border-radius: 19px;
  background: linear-gradient(106deg, var(--workbench-deep), var(--workbench-middle) 57%, var(--workbench-end));
  box-shadow: 0 4px 15px #1b355714;
}

.page > .page-head::before,
.monitor-heading::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 42%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 59% 150% at 94% 13%, #b9e6ff18 46%, transparent 46.3%),
    radial-gradient(ellipse 80% 205% at 92% 93%, transparent 48.8%, #def0ff38 49%, transparent 49.25%),
    radial-gradient(ellipse 82% 160% at 99% 26%, transparent 63.5%, #b7deff35 63.7%, transparent 64%);
}

.page > .page-head::after,
.monitor-heading::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block-start: 50%;
  inset-inline-end: clamp(8px, 2vw, 34px);
  width: var(--art-width);
  aspect-ratio: 360 / 156;
  transform: translateY(-50%);
  background: var(--workbench-art) center / contain no-repeat;
  pointer-events: none;
}

.page > .page-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
}

.page-head h1 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(1.8rem, 2.8vw, 2.75rem);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: .015em;
}

.page-head .description {
  color: #e9f4ff;
  font-size: .9375rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.page-head .head-actions {
  padding-bottom: 0;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 7px;
}

.page-head .select,
.page-head .head-actions .btn {
  min-height: 40px;
  border: 1px solid #fff;
  border-radius: 8px;
  color: var(--workbench-ink);
  background-color: #fff;
  font-size: .875rem;
}

.page-head .head-actions .btn:hover { background-color: var(--workbench-tint); }
.page-head .head-actions :is(.select, .btn):focus-visible { outline-color: #ffe3a5; }
.page-head .head-actions .pill { color: #fff; background: #ffffff1f; border: 1px solid #ffffff67; font-size: .8125rem; }

.monitor-heading {
  --art-width: clamp(168px, 25vw, 360px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--art-width);
  grid-template-areas: "intro art" "cadence art";
  gap: 10px clamp(16px, 2.5vw, 36px);
  align-items: center;
  padding: clamp(19px, 2vw, 29px) clamp(24px, 3.1vw, 48px);
}

.monitor-heading::before { grid-area: 1 / 1 / -1 / -1; }

.monitor-heading::after {
  position: static;
  grid-area: art;
  justify-self: end;
  width: 100%;
  max-height: 145px;
  transform: none;
}

.monitor-heading .page-head {
  grid-area: intro;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px 18px;
  margin: 0;
}

.monitor-heading .monitor-cadence {
  grid-area: cadence;
  min-width: 0;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 5px 16px;
}

.monitor-heading .cadence-main,
.monitor-heading .cadence-main strong { color: #fff; }

.monitor-heading .cadence-main > span,
.monitor-heading .monitor-cadence > p { color: #e5f1fc; }

.monitor-heading .monitor-cadence > p { text-align: start; }

.monitor-focus-body dl,
.monitor-focus-body > p {
  margin: 0;
}

.monitor-focus-body dl > div + div {
  margin-block-start: 16px;
  padding-block-start: 16px;
  border-block-start: 1px solid var(--line);
}

.monitor-focus-body dt {
  color: var(--workbench-ink);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.5;
}

.monitor-focus-body dd,
.monitor-focus-body > p {
  color: var(--text);
  font-size: .9375rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.monitor-focus-body dd { margin: 4px 0 0; }

.monitor-focus-body > .monitor-focus-note {
  margin-block-start: 16px;
  padding: 10px 14px;
  border-inline-start: 3px solid var(--workbench-ink);
  background: var(--workbench-tint);
}

/* Keep reading surfaces white and carry the section colour into functional controls. */
.segmented {
  background: #dce6f0;
}

.duty-toolbar { align-items: flex-start; flex-wrap: wrap; }
.duty-view-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  margin-inline-start: auto;
}
.duty-tabs { max-width: 100%; }
.duty-tabs button { white-space: nowrap; }
.duty-guide-choices { display: grid; gap: 10px; }

@media (max-width: 600px) {
  .duty-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }
  .duty-tabs button { min-width: 0; padding-inline: 4px; }
  .duty-view-tools { width: 100%; margin-inline-start: 0; }
  .duty-view-tools .select { flex: 1 1 7rem; min-width: 0; }
  .duty-view-tools .search { flex: 1 1 14rem; min-width: 0; }
}

.segmented button,
.chip {
  font-size: .8125rem;
  color: #3e566d;
}

.segmented button.active,
.chip.active {
  color: #fff;
  background: var(--workbench-ink);
  border-color: transparent;
  box-shadow: none;
}

.chip:not(.active):hover { color: var(--workbench-ink); background: #d9e5ef; }

.search {
  border-color: #c3d4e2;
  background: #fff;
}

.search input { font-size: .875rem; }
.search input::placeholder { color: #587086; }
.search:focus-within { outline: 2px solid var(--workbench-blue); outline-offset: 1px; }

.stat-card {
  --stat-ink: #194c95;
  --stat-bg: #e3edff;
  --stat-line: #4a76c8;
  --stat-icon: #245aa1;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--stat-line) 30%, white);
  border-top: 3px solid var(--stat-line);
  background: linear-gradient(110deg, var(--stat-bg), color-mix(in srgb, var(--stat-bg) 48%, white));
  box-shadow: none;
}

.stat-card:nth-child(2) {
  --stat-ink: #135f5c;
  --stat-bg: #d9f2eb;
  --stat-line: #389784;
  --stat-icon: #1f7366;
}

.stat-card:nth-child(3) {
  --stat-ink: #834b22;
  --stat-bg: #fff0da;
  --stat-line: #cb8840;
  --stat-icon: #96551f;
}

.stat-card:nth-child(4) {
  --stat-ink: #57458b;
  --stat-bg: #eee7fb;
  --stat-line: #8d74bb;
  --stat-icon: #69559a;
}

.stat-top {
  gap: 8px;
  color: var(--stat-ink);
  font-size: .875rem;
  font-weight: 650;
}

.stat-top .icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 9px;
  opacity: 1;
  color: #fff;
  background: var(--stat-icon);
}

.stat-value {
  color: var(--stat-ink);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.stat-value small,
.stat-note { color: #4c6072; }
.stat-note { font-size: .8125rem; }

.panel-heading {
  background: linear-gradient(95deg, var(--workbench-tint), #f8fbfe 75%);
}

.panel-heading h2,
.insight-title,
.calendar-top h2,
.rights-group h2 {
  color: var(--workbench-navy);
  font-size: 1rem;
  font-weight: 650;
}

.panel-heading small,
.data-table th { color: #4b6278; font-size: .8125rem; }

.data-table th {
  background: #f1f5f9;
  font-weight: 600;
}

.data-table td { color: #42586c; font-size: .875rem; }
.insight-title .icon { color: var(--workbench-ink); }
.onsite-ring { border-color: #79aacf; background: #ebf4fb; box-shadow: none; }
.onsite-ring strong { color: var(--workbench-ink); }
.onsite-ring span, .insight-line, .fine-print, .learning-note { color: #4c6378; }

.duty-notes { background: #edf4fb; }
.duty-notes .rules-list li::before { background: #4c87b7; }

.empty-art {
  color: var(--workbench-ink);
  border-color: rgb(var(--workbench-rgb) / .2);
  background: var(--workbench-tint);
  box-shadow: none;
}

.empty-state h3, .brief-empty-body h3 { color: var(--workbench-navy); }
.empty-state p, .brief-empty-body p { color: #546b7f; }

.brief-paper, .monitor-calendar, .course-card { border-color: var(--workbench-divider); }
.brief-overview { border-inline-start: 4px solid var(--workbench-ink); background: var(--workbench-tint); }
.brief-overview h3, .brief-overview li::marker { color: var(--workbench-ink); }
.brief-action { background: color-mix(in srgb, var(--workbench-tint) 63%, white); }

.monitor-calendar {
  border-top: 3px solid var(--workbench-ink);
}

.calendar-top .icon-btn,
.report-toolbar button:not(:disabled),
.report-toolbar a {
  color: var(--workbench-ink);
  background: #fff;
  border: 1px solid #c2d4e2;
}

.calendar-top .icon-btn:hover,
.report-toolbar button:not(:disabled):hover,
.report-toolbar a:hover {
  color: var(--workbench-ink);
  background: var(--workbench-tint);
  border-color: var(--workbench-ink);
}

.calendar-day, .week-cell { background: #f0f5f8; }
.calendar-day.selected, .week-cell.selected { color: var(--workbench-ink); border: 2px solid var(--workbench-ink); background: var(--workbench-tint); box-shadow: none; }
.calendar-day.today > span { color: var(--workbench-ink); }

.course-art {
  height: 105px;
  overflow: hidden;
  border: 0;
  background: linear-gradient(110deg, color-mix(in srgb, rgb(var(--rgb)) 50%, #122e48), rgb(var(--rgb)));
}

.course-art::before,
.course-art::after {
  top: -96px;
  right: -35px;
  width: 240px;
  height: 240px;
  border: 1px solid #ffffff55;
  border-radius: 33%;
  transform: rotate(-30deg);
}

.course-art::after {
  top: -143px;
  right: 17px;
  background: #ffffff0a;
}

.course-art .course-kicker,
.course-art .course-index { display: none; }

.course-art .icon {
  z-index: 1;
  inset: auto auto 21px 23px;
  width: 41px;
  height: 41px;
  color: #fff;
  stroke-width: 1.45;
}

.course-category { color: #425d73; font-size: .8125rem; }
.course-required {
  display: inline-block;
  padding: .2em .72em;
  border-radius: .38rem;
  background: #ac2336;
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.course-card > .course-required {
  position: absolute;
  z-index: 1;
  inset-block-start: .75rem;
  inset-inline-end: .75rem;
}
.course-admin-description .course-required { margin-inline-start: .4rem; }
.check-label input:not(:checked) + .course-required { background: #e9eff2; color: #425d73; }
.play-button { background: var(--workbench-tint); color: var(--workbench-ink); font-weight: 600; }
.play-button:hover { background: var(--workbench-ink); color: #fff; }

/* Allow the full set of navigation links to retain its labels and hit areas at medium widths. */
@media (max-width: 1100px) {
  .topbar { min-height: 0; flex-wrap: wrap; gap: 0; padding: 9px 15px 6px; }
  .brand { flex: 1; }
  .top-actions { order: 1; }
  .main-nav {
    order: 2;
    width: 100%;
    justify-content: space-between;
    gap: 4px;
    border-top: 1px solid #e2eaf0;
    padding-top: 5px;
    margin: 7px 0 0;
  }
  .nav-link { flex: 1; min-width: 0; text-align: center; min-height: 38px; padding: 8px 5px; }
  .monitor-calendar { top: 123px; }
}

@media (max-width: 760px) {
  .topbar { padding: 7px 10px 6px; border-radius: 13px; }
  .main-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    margin-top: 5px;
  }
  .main-nav:has(> .nav-link:nth-child(7)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav-link {
    display: grid;
    justify-items: center;
    min-height: 38px;
    padding: 7px 1px;
    font-size: clamp(.75rem, 2.9vw, .875rem);
  }

  .page > .page-head,
  .monitor-heading {
    --art-width: clamp(94px, 27vw, 175px);
    min-height: 0;
    padding: 18px;
    gap: 12px;
    border-radius: 15px;
  }
  .page > .page-head::before,
  .monitor-heading::before { inset-inline-start: 58%; }
  .page > .page-head::after,
  .monitor-heading::after {
    inset-block-start: 12px;
    inset-inline-end: 6px;
    transform: none;
  }
  .page > .page-head > :first-child {
    width: 100%;
    min-width: 0;
    min-height: calc(var(--art-width) * .36);
    padding-inline-end: calc(var(--art-width) - 9px);
  }
  .page-head h1,
  .monitor-heading .page-head h1 { margin-bottom: 6px; font-size: clamp(1.5rem, 4.7vw, 1.95rem); }
  .page-head .description { font-size: .875rem; }
  .monitor-heading {
    --art-width: clamp(78px, 23vw, 155px);
    grid-template-areas: "intro art" "actions actions" "cadence cadence";
    gap: 10px 12px;
  }
  .monitor-heading .page-head { display: contents; }
  .monitor-heading .page-head > :first-child { grid-area: intro; min-width: 0; }
  .monitor-heading .head-actions { grid-area: actions; }
  .monitor-heading .monitor-cadence > p { margin-top: 3px; }
  .page-head .head-actions { max-width: 100%; gap: 6px; }
  .page-head .head-actions .select,
  .page-head .head-actions .btn { max-width: 100%; min-height: 38px; font-size: .8125rem; }
  .stat-top { font-size: .8125rem; }
  .stat-top .icon { width: 28px; height: 28px; padding: 5px; }
  .stat-note { font-size: .75rem; }
  .course-art { height: 84px; }
  .course-art .icon { width: 35px; height: 35px; inset: auto auto 17px 18px; }
}

@media (min-width: 701px) and (max-width: 760px) {
  .monitor-calendar { top: 155px; }
}

@media (max-width: 390px) {
  .stat-card { padding-inline: 12px; }
  .stat-top { gap: 4px; }
}

@media (max-width: 359px) {
  .main-nav:has(> .nav-link:nth-child(7)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.brand-admin-title { display: inline-flex; align-items: baseline; gap: .3em; }
.brand-admin-title > span { white-space: nowrap; }
.admin-duty-tools { flex-wrap: wrap; }
.admin-duty-tabs { max-width: 100%; }
.admin-scope-panel { margin-bottom: 1.15rem; }
.admin-scope-list { display: grid; }
.admin-scope-row {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(10rem, 1fr) auto;
  align-items: center;
  gap: .75rem 1.25rem;
  padding: .75rem 0;
  border-top: 1px solid #dbe4eb;
}
.admin-scope-title { display: inline-flex; align-items: center; gap: .6rem; width: fit-content; color: #17486a; font-weight: 650; text-decoration: none; }
.admin-scope-title:hover { text-decoration: underline; text-underline-offset: .2em; }
.admin-scope-title .icon { flex: none; width: 1.15rem; height: 1.15rem; }
.admin-scope-cadence { color: #50667b; font-size: .875rem; }
.admin-scope-actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.admin-scope-actions .btn { min-height: 2.75rem; }
@media (max-width: 760px) {
  .main-nav:has(> .nav-link:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .admin-scope-row { grid-template-columns: auto 1fr; gap: .5rem 1rem; padding: .85rem 0; }
  .admin-scope-cadence { text-align: end; }
  .admin-scope-actions { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .brand-admin-title { display: grid; gap: .1em; line-height: 1.2; }
  .brand-admin-title .brand-admin-dot { display: none; }
  .brand-admin-title > :last-child { font-weight: 500; color: #486079; }
  .admin-duty-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
  .admin-duty-tabs button { min-height: 2.75rem; }
  .admin-duty-tools .search { width: 100%; }
  .admin-scope-panel .panel-heading { flex-wrap: wrap; gap: .35rem .8rem; }
}
@media (max-width: 359px) {
  .admin-scope-row { grid-template-columns: 1fr; }
  .admin-scope-cadence { text-align: start; }
}

@media print {
  #main:not(.gate-main) { width: 100%; padding: 0; }
  .page > .page-head, .monitor-heading {
    min-height: 0;
    padding: 0 0 10px;
    color: #182d43;
    background: none;
    box-shadow: none;
    border-radius: 0;
    border-bottom: 1px solid #aaa;
  }
  .page > .page-head::before, .page > .page-head::after,
  .monitor-heading::before, .monitor-heading::after { content: none; }
  .page > .page-head > :first-child,
  .monitor-heading .page-head > :first-child { min-height: 0; padding: 0; }
  .page-head h1, .page-head .description, .monitor-heading .cadence-main,
  .monitor-heading .cadence-main strong, .monitor-heading .cadence-main > span,
  .monitor-heading .monitor-cadence > p { color: #182d43; }
  .monitor-heading { display: block; }
}

@media (forced-colors: active) {
  .nav-link.active, .segmented button.active, .chip.active, .calendar-day.selected, .week-cell.selected {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}
