:root {
  --wf-ink: #17384b;
  --wf-action: #146370;
  --wf-focus: #007687;
  --wf-interface: system-ui, -apple-system, sans-serif;
}

body .wf-header {
  min-height: 64px;
  background: var(--wf-ink);
  color: white;
  padding-block: var(--cds-spacing-03);
}
.wf-header :is(a, button, .wf-username, .wf-account-identity strong, .wf-account-identity span) { color: white; }
.wf-header nav a:hover { text-decoration-thickness: 2px; }
body :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--wf-focus);
  outline-offset: 2px;
}
body .wf-header :focus-visible, body .wf-footer :focus-visible { outline-color: #9ce4e9; }
body .wf-sidebar { background: var(--cds-layer-01); padding-inline: var(--cds-spacing-03); }
.wf-sidebar .wf-sidebar-label { font: 600 18px/1.4 var(--wf-interface); }
body .wf-sidebar a { border-radius: 0; padding-block: var(--cds-spacing-03); }
body .wf-sidebar a[aria-current="page"] { background: #dcebec; border-color: transparent; }
.wf-sidebar-signature { display: none; }

body :is(.platform-main, .account-main, .login-shell) { font-family: var(--wf-interface); color: var(--wf-ink); }
body :is(.platform-main, .account-main, .login-shell) :is(h1, h2, h3) {
  font-family: var(--wf-interface);
  letter-spacing: -.02em;
  line-height: 1.25;
}
body :is(.platform-main, .account-main, .login-shell) h1 { font-size: clamp(26px, 3vw, 36px); }
body :is(.platform-main, .account-main) h2 { font-size: clamp(20px, 2vw, 25px); }
body :is(.platform-card, .weekly-card, .branch-editor form, .lesson-table-scroll, .report-filter) {
  border-radius: 0;
  box-shadow: none;
  border-color: var(--cds-border-subtle-01);
}
body main form :is(input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="time"], input[type="date"], input[type="number"], input[type="tel"], input[type="url"], select, textarea) {
  box-sizing: border-box;
  max-width: 100%;
  min-height: 40px;
  background-color: var(--cds-field-01);
  color: var(--cds-text-primary);
  border: 0;
  border-bottom: 1px solid var(--cds-border-strong-01);
  border-radius: 0;
  font-family: var(--wf-interface);
}
body main form :is(button[type="submit"], button:not([type])), body main .primary-link {
  border-radius: 0;
}
body main :is(.branch-editor-actions, .management-filter, .login-shell, .report-dates) button[type="submit"],
body main :is(.branch-editor-actions, .management-filter) button:not([type]) {
  background: var(--wf-action);
  color: white;
  border: 0;
  padding: 10px var(--cds-spacing-05);
  min-height: 40px;
}
body main .lesson-table { font: 15px/1.45 var(--wf-interface); color: var(--wf-ink); }
body main table :is(td, th) { font-variant-numeric: tabular-nums; }
body main .lesson-table :is(td, th) {
  padding: var(--cds-spacing-04) var(--cds-spacing-05);
  border-bottom: 1px solid var(--cds-border-subtle-01);
}
body main .lesson-table th { background: #e4eaea; color: var(--wf-ink); font-weight: 600; }
body main .lesson-table tbody tr:hover { background: var(--cds-layer-hover-01); }
body main .lesson-table th[aria-sort="ascending"], body main .lesson-table th[aria-sort="descending"] { background: #d1e4e5; }
body main .errorlist { color: var(--cds-support-error); }
body .wf-footer { background: var(--wf-ink); }
body #header { --header-bg: var(--wf-ink); --branding-fg: white; }
body #changelist table thead th { font-family: var(--wf-interface); }

/* Keep discovery controls outside the scrolling results on wider screens. */
@media (min-width: 761px) and (min-height: 520px) {
  .results-area { min-width: 0; }
  .results-area #trainer-cards {
    max-height: 70vh;
    max-height: min(72dvh, 54rem);
    overflow-y: auto;
    scrollbar-gutter: stable;
    scrollbar-color: #668890 #e9eeee;
    padding: 3px;
    align-content: start;
  }
  .results-area #trainer-cards:focus-visible {
    outline: 2px solid var(--wf-focus);
    outline-offset: 2px;
  }
}

/* Carbon medium form actions, using Worfact's primary color. */
body main :is(a, button).wf-action-cancel,
body main .branch-editor-actions a.wf-action-delete,
body main button.wf-action-save,
body main .branch-editor-actions button.wf-action-delete-confirm,
body main .branch-editor-actions button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 0;
  font: 400 14px/20px var(--wf-interface);
  text-align: start;
  text-decoration: none;
}
body main button.wf-action-save,
body main .branch-editor-actions button[type="submit"] {
  background: var(--wf-action);
  color: white;
}
body main :is(a, button).wf-action-cancel {
  border-color: var(--wf-action);
  background: transparent;
  color: var(--wf-action);
}
body main :is(a, button).wf-action-cancel:hover {
  background: #edf4f4;
}
body main .branch-editor-actions a.wf-action-delete {
  border-color: #da1e28;
  background: transparent;
  color: #a2191f;
}
body main .branch-editor-actions a.wf-action-delete:hover {
  background: #fff1f1;
}
body main .branch-editor-actions button.wf-action-delete-confirm {
  background: #da1e28;
  color: white;
}
body main .branch-editor-actions button.wf-action-delete-confirm:hover {
  background: #b81921;
}
body main :is(.wf-action-cancel, .wf-action-save, .wf-action-delete, .wf-action-delete-confirm, .branch-editor-actions button):focus-visible {
  outline: 2px solid var(--wf-focus);
  outline-offset: 2px;
}
body main .branch-editor-actions {
  flex-wrap: wrap;
  gap: 8px;
}
