/* TUGS Orchestration. Hand-written CSS in the Maersk Design System (MDS) look.
   Colours, radii and fonts come from the MDS design tokens (static/mds/design-tokens.css,
   maersk brand, light; design-tokens-dark.css, dark, under html[data-theme="dark"], set by theme.js). Component measurements follow the mc-* components. */

@font-face { font-family: "Maersk Text"; font-weight: 300; font-style: normal; font-display: swap; src: url("/static/fonts/MaerskText-Light.woff2") format("woff2"); }
@font-face { font-family: "Maersk Text"; font-weight: 400; font-style: normal; font-display: swap; src: url("/static/fonts/MaerskText-Regular.woff2") format("woff2"); }
@font-face { font-family: "Maersk Text"; font-weight: 500; font-style: normal; font-display: swap; src: url("/static/fonts/MaerskText-Medium.woff2") format("woff2"); }
@font-face { font-family: "Maersk Text"; font-weight: 600; font-style: normal; font-display: swap; src: url("/static/fonts/MaerskText-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Maersk Text"; font-weight: 700; font-style: normal; font-display: swap; src: url("/static/fonts/MaerskText-Bold.woff2") format("woff2"); }
@font-face { font-family: "Maersk Headline"; font-weight: 400; font-style: normal; font-display: swap; src: url("/static/fonts/MaerskHeadline-Regular.woff2") format("woff2"); }

:root {
  color-scheme: light;
  /* Short aliases for the MDS tokens used here. */
  --bg: var(--mds_brand_appearance_neutral_weakest_background-color);
  --surface: var(--mds_brand_appearance_neutral_default_background-color);
  --surface-weak: var(--mds_brand_appearance_neutral_weakest_background-color);
  --fill-weak: var(--mds_brand_appearance_neutral_weak_background-color);
  --line: var(--mds_brand_appearance_neutral_default_border-color);
  --line-weak: var(--mds_brand_appearance_neutral_weak_border-color);
  --line-strong: var(--mds_brand_appearance_neutral_strong_border-color);
  --text: var(--mds_brand_appearance_neutral_default_text-color);
  --text-weak: var(--mds_brand_appearance_neutral_weak_text-color);
  --text-hint: var(--mds_brand_appearance_neutral_weakest_text-color);
  --link: var(--mds_brand_appearance_primary_default_link-color);

  --primary: var(--mds_brand_appearance_primary_default_background-color);
  --on-primary: var(--mds_brand_appearance_primary_default_on-background-color);
  --primary-hover: var(--mds_brand_appearance_state_primary_default_hover_background-color);
  --hover-fill: var(--mds_brand_appearance_neutral_weak_opacity_background-color);
  --outline: var(--mds_brand_appearance_neutral_default_opacity_border-color);

  --blue: var(--mds_brand_appearance_secondary_default_background-color);
  --blue-weak: var(--mds_brand_appearance_secondary_weak_background-color);
  --on-blue: var(--mds_brand_appearance_secondary_default_on-background-color);
  --focus-ring: 0 0 0 3px var(--mds_brand_appearance_state_focus_default_shadow_color);
  --field-line: #8a8a8a; /* resting border of form fields: 3:1 against white */
  --field-line-hover: #545454;

  --ok-bg: var(--mds_brand_appearance_success_weak_background-color);
  --ok-text: var(--mds_brand_appearance_success_weak_on-background-color);
  --warn-bg: var(--mds_brand_appearance_warning_weak_background-color);
  --warn-text: var(--mds_brand_appearance_warning_weak_on-background-color);
  --err: var(--mds_brand_appearance_error_default_background-color);
  --err-bg: var(--mds_brand_appearance_error_weak_background-color);
  --err-text: var(--mds_brand_appearance_error_weak_on-background-color);
  --info-bg: var(--mds_brand_appearance_info_weak_background-color);
  --info-text: var(--mds_brand_appearance_info_weak_on-background-color);

  --radius-s: var(--mds_brand_border_small_radius);
  --radius: var(--mds_brand_border_medium_radius);
  --radius-l: var(--mds_brand_border_large_radius);
  --radius-xl: var(--mds_brand_border_x-large_radius);
  --shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.04), 0 1px 18px 0 rgba(0, 0, 0, 0.03), 0 6px 10px 0 rgba(0, 0, 0, 0.03);
  --font: "Maersk Text", Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-head: "Maersk Headline", "Maersk Text", Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Dark theme (theme.js sets data-theme="dark" while design-tokens-dark.css is in force). The MDS
   dark tokens drive text, lines, buttons and notices; these are the surface steps (cards, panels,
   inputs 33; page, table heads, dialog footers, code boxes 20; columns, fills 54, all MDS tokens)
   and the colours that are not MDS tokens. Every text pair is at least 4.5:1, field borders at
   least 3:1. */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--mds_brand_appearance_neutral_default_background-color);
  --surface: var(--mds_brand_appearance_neutral_weakest_background-color);
  --surface-weak: var(--mds_brand_appearance_neutral_default_background-color);
  --text-hint: rgb(166, 166, 166);
  --field-line: rgb(138, 138, 138);
  --field-line-hover: rgb(212, 212, 212);
  --shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.4), 0 1px 18px 0 rgba(0, 0, 0, 0.3), 0 6px 10px 0 rgba(0, 0, 0, 0.3);
}
html[data-theme="dark"] .tag-prioritised, html[data-theme="dark"] .tag-task-remove, html[data-theme="dark"] .tag-access-task { background: #4c4c4c; color: #f0f0f0; }
html[data-theme="dark"] .tag-access, html[data-theme="dark"] .tag-task-grant { background: #5c4a0a; color: #ffe37a; }
html[data-theme="dark"] .tag-ready { background: #6b2145; color: #f7b9d3; }
html[data-theme="dark"] .tag-assigned { background: #0b4a66; color: #bfe6f5; }
html[data-theme="dark"] .tag-done { background: #1f5a1a; color: #bfe8b8; }
html[data-theme="dark"] .tag-shared_done { background: #14503f; color: #b5ecd9; }
html[data-theme="dark"] .tag-support { background: #4a3490; color: #e0d6fa; }
html[data-theme="dark"] .tag-tooling { background: #6b3406; color: #ffd2a8; }
html[data-theme="dark"] .tag-dependency { background: #0d4a43; color: #b3f0e6; }
html[data-theme="dark"] .tag-label-blue { background: #0f3d66; color: #cfe6ff; }
html[data-theme="dark"] .tag-label-green { background: #1f5a1a; color: #c8eec3; }
html[data-theme="dark"] .tag-label-yellow { background: #5c4a0a; color: #ffe99a; }
html[data-theme="dark"] .tag-label-orange { background: #6b3406; color: #ffd2a8; }
html[data-theme="dark"] .tag-label-red { background: #6e1c1c; color: #ffd0d0; }
html[data-theme="dark"] .tag-label-purple { background: #4a3490; color: #e6dcfb; }
html[data-theme="dark"] mark { background: #6e5800; color: #fff4c2; }
html[data-theme="dark"] dialog.modal { border: 1px solid var(--line); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] dialog.modal::backdrop { background: rgba(0, 0, 0, 0.7); }
/* One FDE's days: on and off must differ by more than the barely different dark fills, so an
   on day gets the MDS info fill and a blue edge. */
html[data-theme="dark"] .cal-on:not(.cal-past) { background: var(--mds_brand_appearance_info_default_background-color); border-color: var(--blue); }
html[data-theme="dark"] .day-on { background: var(--mds_brand_appearance_info_default_background-color); box-shadow: inset 3px 0 0 var(--blue); }
html[data-theme="dark"] .drag-ghost.lifted > table { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 3px 8px rgba(0, 0, 0, 0.5); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/20px var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, fieldset, figure { margin: 0; padding: 0; }
h1 { font: 400 26px/32px var(--font-head); }
h2 { font: 400 20px/24px var(--font-head); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .small { font-size: 12px; line-height: 16px; }
.muted { color: var(--text-weak); }
.right { text-align: right; }
.center { text-align: center; }
.pre { white-space: pre-wrap; }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; box-shadow: var(--focus-ring); }
/* Hidden from view, still read by screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* Why the Person field is unavailable: announced always, shown on narrow screens where the
   disabled select would clip it. */
.role-empty-note {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 600px) {
  .role-empty-note:not(:empty) {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }
}

/* ---------- shell: mc-top-bar + mc-tab-bar ---------- */
.top-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 64px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line-weak);
}
.top-bar-home { display: flex; align-items: center; color: var(--text); border-radius: var(--radius); }
.top-bar-home:hover { text-decoration: none; }
.logo {
  width: var(--mds_brand_appearance_static_logo_width, 123px);
  height: 48px;
  background: var(--mds_brand_appearance_static_logo_url) left center / contain no-repeat;
}
.product { display: flex; align-items: center; padding-left: 20px; font: 300 18px/28px var(--font); white-space: nowrap; }
.product::before { content: ""; height: 26px; border-right: 1px solid var(--line); margin-right: 16px; }
.product-icon { margin-right: 10px; }
.top-bar-actions { grid-column: 3; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
/* The theme toggle (base.html, theme.js): one MDS icon for the mode that is on. */
.theme-toggle { width: 32px; padding: 0; color: var(--text); }
.theme-toggle .theme-icon { display: none; width: 20px; height: 20px; flex: none; }
html:not([data-theme-mode]) .theme-toggle .theme-icon-light,
html[data-theme-mode="light"] .theme-toggle .theme-icon-light,
html[data-theme-mode="dark"] .theme-toggle .theme-icon-dark,
html[data-theme-mode="auto"] .theme-toggle .theme-icon-auto { display: block; }
.me-email { color: var(--text-weak); }
/* The top bar's role box (base.html): the role the pages are for. A menu to pick another one
   for admins and people with more than one role. */
.role-box {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  font: 600 13px/16px var(--font); color: var(--text);
}
.role-switch { position: relative; }
.role-switch > summary { list-style: none; cursor: pointer; }
.role-switch > summary::-webkit-details-marker { display: none; }
.role-switch > summary::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
}
.role-switch[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.role-switch > summary:hover { background: var(--hover-fill); }
.role-switch-panel {
  position: absolute; right: 0; top: 100%; z-index: 40; margin-top: 4px;
  width: max-content; min-width: 240px; max-width: min(320px, calc(100vw - 32px));
  display: grid; gap: 2px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow);
  white-space: normal;
}
.role-switch-panel h2 { margin: 4px 8px 6px; font: 600 12px/16px var(--font); color: var(--text-weak); text-transform: uppercase; letter-spacing: 0.04em; }
.role-switch-panel h3 { margin: 6px 8px 2px; font: 600 12px/16px var(--font); color: var(--text-weak); text-transform: uppercase; letter-spacing: 0.04em; }
.role-switch-group { display: grid; gap: 2px; }
.role-switch-panel .role-switch-group button { padding-left: 16px; }
.role-switch-plain { display: grid; gap: 2px; }
.role-switch-plain:not(:first-of-type) { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-weak); }
.role-switch-panel button {
  width: 100%; display: grid; text-align: left; padding: 6px 8px; border: 0; border-radius: var(--radius);
  background: none; color: var(--text); font: inherit; cursor: pointer;
}
.role-switch-panel button:hover { background: var(--hover-fill); }
.role-switch-panel button[aria-current] { cursor: default; font-weight: 600; background: var(--hover-fill); }
.role-switch-panel p { margin: 6px 8px 2px; }
/* The ⋯ menu of a role's tab (fdes.html): a compact button opening a few actions. */
.action-menu { position: relative; }
.action-menu > summary { list-style: none; cursor: pointer; }
.action-menu > summary::-webkit-details-marker { display: none; }
.btn.action-menu-trigger { min-width: 34px; padding-inline: 10px; font-size: 16px; line-height: 1; justify-content: center; }
.action-menu[open] > summary { background: var(--hover-fill); border-color: var(--line); }
.action-menu-panel {
  position: absolute; right: 0; top: 100%; z-index: 40; margin-top: 4px;
  width: max-content; min-width: 160px; max-width: calc(100vw - 32px);
  display: grid; gap: 2px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow);
}
.action-menu-panel.action-menu-flip { left: 0; right: auto; }
.action-menu-panel form { margin: 0; }
.action-menu-panel button {
  width: 100%; text-align: left; padding: 6px 8px; border: 0; border-radius: var(--radius);
  background: none; color: var(--text); font: inherit; cursor: pointer;
}
.action-menu-panel button:hover { background: var(--hover-fill); }
.action-menu-panel .action-menu-danger { color: var(--err); }
/* A short confirmation (base.html, flash level "toast"), bottom right until app.js fades it. */
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 60; max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: var(--radius-l); box-shadow: var(--shadow);
  background: var(--text); color: var(--surface); font: 400 14px/20px var(--font);
  transition: opacity 0.3s ease-in-out;
}
.toast.is-gone { opacity: 0; }
.tab-bar {
  display: flex;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line-weak);
  overflow-x: auto;
  position: sticky;
  top: 0;
  z-index: 20;
}
.tab-bar a {
  padding: 12px 20px 9px;
  color: var(--text);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  font-size: 16px;
  line-height: 24px;
}
.tab-bar a:hover { text-decoration: none; background: var(--hover-fill); }
.tab-bar a[aria-current="page"] { border-bottom-color: var(--blue); font-weight: 500; }
.tab-bar a:focus-visible { box-shadow: inset var(--focus-ring); outline-offset: -2px; }
.url-banner { display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--info-bg); color: var(--info-text); padding: 8px 24px; font-size: 14px; line-height: 20px; text-align: center; }
.url-banner a { color: inherit; font-weight: bold; text-decoration: underline; text-underline-offset: 2px; }
.url-banner a:hover { text-decoration-thickness: 2px; }
html[data-url-banner="hidden"] .url-banner { display: none; }
.devbar { background: var(--warn-bg); color: var(--warn-text); padding: 6px 24px; font-size: 12px; line-height: 16px; }
.page { max-width: 1680px; margin: 0 auto; padding: 24px; display: grid; gap: 16px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 + p, .page-head p + p { margin-top: 4px; }
.crumb { font-size: 12px; margin-bottom: 4px; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.actions.left { justify-content: flex-start; }

/* ---------- surfaces ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  --panel-inset: 24px; /* its side padding; .panel.flush.inset lines a table up with it */
  --panel-inset-top: 20px; /* its top padding; likewise */
  padding: var(--panel-inset-top) var(--panel-inset);
}
/* A box that scrolls sideways is also the containing block of what it holds: a visually-hidden
   label (position: absolute) in a cell beyond its right edge is clipped with it, instead of
   making the whole page wider (and scroll sideways) than the window. */
.panel.flush { padding: 0; overflow-x: auto; border-radius: var(--radius-l); position: relative; }
.panel.narrow { max-width: 520px; width: 100%; margin: 32px auto; padding: 24px; display: grid; gap: 12px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head.padded { padding: 16px 16px 0; }
.panel-body-padded { padding: 0 16px 16px; }
.panel-head .panel-title { margin: 0; }
.panel-head .actions { justify-content: flex-end; margin-left: auto; }
.panel-title { font: 600 16px/24px var(--font); margin-bottom: 12px; }
.panel-title.spaced { margin-top: 16px; }
.panel-subtitle { font: 600 14px/20px var(--font); color: var(--text-weak); margin: 8px 0; }
.stack { display: grid; gap: 12px; align-content: start; }
.stack > .panel-title { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: span 2; }
.scroll-x { overflow-x: auto; position: relative; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 400 16px/24px var(--font);
  cursor: pointer;
  white-space: nowrap;
  background: transparent;
  color: var(--text);
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.btn:hover { text-decoration: none; }
/* appearance="primary" */
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
/* appearance="neutral" variant="outlined" */
.btn-secondary { border-color: var(--outline); }
.btn-secondary:hover { background: var(--hover-fill); border-color: var(--line); }
/* appearance="neutral" variant="plain" */
.btn-ghost:hover { background: var(--hover-fill); }
/* appearance="error" variant="outlined" */
.btn-danger { border-color: var(--err); }
.btn-danger:hover { background: var(--err-bg); }
/* fit="small" */
.btn-small { height: 32px; padding: 0 11px; font-size: 14px; line-height: 20px; }
/* Stage moves: back points left, forward points right. Decorative, so screen readers skip it. */
.btn-back::before { content: "\2190" / ""; margin-right: 8px; }
.btn-next::after { content: "\2192" / ""; margin-left: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* Sent, waiting for the server (app.js). */
.btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }

/* ---------- forms ---------- */
.field { display: grid; gap: 4px; align-content: start; }
.field > span, .field > label { font-size: 14px; color: var(--text); }
.field > span em { font-style: normal; font-size: 12px; color: var(--text-weak); margin-left: 6px; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: 400 16px/22px var(--font);
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--text-hint); }
input:hover, select:hover, textarea:hover { border-color: var(--field-line-hover); }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { outline: 2px solid var(--text); outline-offset: -1px; border-color: var(--blue); box-shadow: var(--focus-ring); }
.field > .field-error { color: var(--err); font-size: 14px; line-height: 20px; }
[aria-invalid="true"], [aria-invalid="true"]:hover { border-color: var(--err) !important; }
.inline-form { display: flex; align-items: flex-end; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.filters { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.filters .check { height: 40px; }
/* The board's and the priority page's search, in the page head next to its actions: one line. */
.page-head > .actions { gap: 8px 12px; }
.head-search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.head-search .field { width: 280px; }
.head-search .head-label { width: 200px; }
.head-search .check { height: 40px; white-space: nowrap; }
@media (max-width: 720px) {
  .page-head > .actions, .head-search { width: 100%; }
  .head-search .field, .head-search .head-label { width: auto; flex: 1 1 200px; }
}
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 20px; height: 20px; flex: none; accent-color: var(--primary); margin: 0; }
.checks { border: 0; display: grid; gap: 8px; }
.checks legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* "Set the stage": one choice per stage, its tag and what setting it does. */
.stage-choices { border: 0; display: grid; gap: 4px; }
.stage-choices legend { padding: 0; margin-bottom: 4px; font-size: 14px; }
.stage-choice { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px; border-radius: var(--radius); cursor: pointer; }
.stage-choice:hover { background: var(--hover-fill); }
.stage-choice input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary); }
.stage-choice-text { display: grid; gap: 4px; justify-items: start; }
.stage-choice:has(input:disabled) { cursor: not-allowed; }
.stage-choice:has(input:disabled):hover { background: none; }
.stage-choice:has(input:disabled) .tag, .stage-choice:has(input:disabled) .muted { opacity: 0.5; }
.stage-choice [data-text]:empty { display: none; }
.stage-choice .field-error { color: var(--err); line-height: 20px; }

/* ---------- tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--fill-weak);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}
/* Stage colours: one hue per stage, and no two neighbouring stages alike.
   Used by the tags everywhere, including the board's column headers. */
.tag-prioritised { background: #d4d4d4; color: #141414; }
/* In board order: the second lane (waiting for access) keeps the yellow, the third (waiting for FDE) the pink. */
.tag-access { background: #ffe37a; color: #4d3e0c; }
.tag-ready { background: #f7b9d3; color: #5a0f33; }
.tag-assigned { background: #8fd0e8; color: #00243d; }
.tag-done { background: #a9dfa2; color: #133310; }
.tag-shared_done { background: #8fdcc2; color: #0b3326; }
.tag-free { background: var(--ok-bg); color: var(--ok-text); }
.tag-blocked { background: var(--err-bg); color: var(--err-text); }
.tag-busy { background: var(--warn-bg); color: var(--warn-text); }
.tag-off { background: var(--fill-weak); color: var(--text-weak); }
.tag-orch { background: var(--primary); color: var(--on-primary); }
.tag-fde { background: var(--blue); color: var(--on-blue); }
.tag-mine { background: var(--blue-weak); color: var(--text); }
/* A support person on an application in their support role: not its FDE. */
.tag-support { background: #d3c4f3; color: #33206e; }
/* A access team member on an application as support. */
.tag-tooling { background: #ffd2a8; color: #5a2a00; }
/* A shared service the application needs support from, on its board card. */
.tag-dependency { background: #b3e8e0; color: #00463d; }
/* A label the orchestration team keeps (Label.COLOURS), picked on the application form and shown on
   the card. Squarer than the pills of stage, team and dependency. Neutral is the default; a retired
   label is muted whatever its colour: outlined, no fill. Every text/background pair is 4.5:1 or more. */
.tag-label { border-radius: 4px; border: 1px solid transparent; }
.tag-label-blue { background: #cfe4fb; color: #0b3a6b; }
.tag-label-green { background: #cdeccf; color: #124a17; }
.tag-label-yellow { background: #fbeaa4; color: #5a4300; }
.tag-label-orange { background: #ffd9b8; color: #6a3000; }
.tag-label-red { background: #fbd0d0; color: #7a1010; }
.tag-label-purple { background: #e3d8f8; color: #3f2582; }
.tag-label-retired { background: transparent; color: var(--text-weak); border: 1px dashed var(--text-weak); }
/* Readiness data of an application, while prioritising: complete goes ahead once ranked. */
.tag-data-complete { background: var(--ok-bg); color: var(--ok-text); }
.tag-data-incomplete { background: var(--warn-bg); color: var(--warn-text); }
.tag-cluster { background: var(--warn-bg); color: var(--warn-text); }
.cluster-differs { color: var(--warn-text); font-weight: 600; }
.cluster-sync { align-items: center; }
.cluster-search { align-items: center; }
.cluster-search input[type=search] { min-width: 220px; }
.sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-link:hover, .sort-link:focus-visible { text-decoration: underline; }
.cluster-sync form { margin-left: auto; }
/* A stage tag the orchestration team can click to set the stage by hand: the tag as it is,
   with a small caret and a hover outline in its own colour. */
.tag-button { border: 0; margin: 0; font: inherit; font-size: 14px; line-height: 20px; gap: 6px; padding-right: 8px; cursor: pointer; }
.tag-button::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0.75;
}
.tag-button:hover { box-shadow: inset 0 0 0 1px currentColor; }
/* Tooling tasks: what kind. */
.tag-task-grant { background: #ffe37a; color: #4d3e0c; }
.tag-task-remove { background: #d4d4d4; color: #141414; }
/* Who has a task: initials in a circle, then the name. */
.assignee { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.avatar { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 10px; font-weight: 600; line-height: 1; }
.rank { display: inline-block; min-width: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-none { font-weight: 400; color: var(--text-weak); font-size: 12px; }
.mac { font-size: 12px; color: var(--text-weak); font-weight: 400; font-family: var(--font); }

/* ---------- notifications ---------- */
.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: var(--radius-l);
  background: var(--ok-bg);
  color: var(--ok-text);
}
/* A sign besides the colour: a tick for done, "!" for a problem. Info notices have none. */
.notice::before { content: "\2713"; content: "\2713" / ""; flex: none; font-weight: 700; }
.notice-error { background: var(--err-bg); color: var(--err-text); }
.notice-error::before { content: "!"; content: "!" / ""; }
/* Something to check, not something wrong. */
.notice-warning { background: var(--warn-bg); color: var(--warn-text); }
.notice-warning::before { content: "!"; content: "!" / ""; }
/* The text takes the line next to its sign; a button in the notice may wrap below. */
.notice > span { flex: 1 1 240px; min-width: 0; }
.notice.compact { padding: 8px 12px; font-size: 14px; line-height: 20px; margin-top: 4px; flex-wrap: nowrap; align-items: flex-start; gap: 8px; }
.notice a { color: inherit; text-decoration: underline; }
.notice form { margin-left: auto; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table thead td {
  text-align: left;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 16px;
  background: var(--surface-weak);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
/* A header that sorts the table (?sort=&dir=): reads as header text, the arrow marks the active column. */
.table .sort-link { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.table .sort-link:hover { text-decoration: underline; }
.table .sort-arrow { font-size: 10px; color: var(--text-weak); }
.table tbody td, .table tbody th { padding: 8px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; height: 48px; }
/* Row headers (the application or person a row is about) look like ordinary cells. */
.table tbody th { background: transparent; font-weight: 400; white-space: normal; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table .row-done { color: var(--text-weak); }
.table .row-done b { font-weight: 400; }
.row-actions { white-space: nowrap; }
.row-actions form { display: inline-flex; vertical-align: middle; margin-left: 4px; }
.grip-col { width: 32px; }
.grip { cursor: grab; color: var(--line-strong); user-select: none; letter-spacing: -2px; }
tr.dragging { opacity: 0.4; background: var(--blue-weak); }

/* ---------- priority page: the list and the unprioritised applications side by side ---------- */
/* The list has more columns than the right-hand table: it takes at least what its columns need
   (so Move stays inside the panel), otherwise half; the right-hand column gets the rest. */
.prio-columns { display: grid; grid-template-columns: minmax(min-content, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.prio-col { display: flex; flex-direction: column; min-width: 0; overflow: hidden; transition: box-shadow 0.15s, border-color 0.15s; }
.prio-col .panel-head { margin-bottom: 12px; }
/* Each column scrolls on its own, its header row stays in view. */
.prio-scroll { max-height: calc(100vh - 260px); min-height: 200px; overflow: auto; border-top: 1px solid var(--line); }
.prio-scroll thead th, .prio-scroll thead td { position: sticky; top: 0; z-index: 1; }
.table-compact th, .table-compact thead td { padding: 8px 12px; }
.table-compact tbody td, .table-compact tbody th { padding: 6px 12px; height: 44px; }
.table-compact .grip-col, .table-compact .grip { width: 28px; padding-right: 0; }
.prio-col tbody th[scope="row"] { min-width: 180px; }
/* Dragging (app.js): the whole row is the handle for the orchestration team. The grip only shows it. */
.prio-columns[data-drop-url] tbody tr[data-id] { cursor: grab; touch-action: manipulation; }
.prio-columns[data-drop-url] tbody tr[data-id]:hover { background: var(--hover-fill); }
.prio-columns[data-drop-url] tbody tr[data-id] :is(a, button, .mac) { cursor: pointer; }
.prio-columns[data-drop-url] tbody tr[data-id] .mac { cursor: text; }
.prio-columns .grip { color: var(--text-weak); font-size: 16px; touch-action: none; }
html.is-grabbing, html.is-grabbing * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
/* The dragged row: its place becomes the gap (app.js); a floating copy follows the pointer. */
.prio-columns tr.dragging { opacity: 0; }
.prio-columns.is-dragging tbody tr[data-id] { transition: transform 180ms cubic-bezier(0.2, 0, 0, 1); }
.prio-columns.is-dragging tbody tr[data-id]:hover { background: transparent; }
/* The column that changes: a tint and its whole outline, no accent stripe. */
.prio-col.drop-target { border-color: var(--link); }
.prio-col.drop-target .prio-scroll { background: var(--info-bg); }
/* The gap where it lands: a solid 3px line on top and what the drop does. */
.prio-scroll { position: relative; }
.drop-slot {
  position: absolute; left: 0; right: 0; z-index: 0; pointer-events: none; display: flex; align-items: center;
  padding: 0 12px; border-top: 3px solid var(--link); background: var(--info-bg);
  font: 600 12px/16px var(--font); color: var(--link);
}
.drop-slot.filled span { visibility: hidden; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; will-change: transform; }
.drag-ghost > table {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transform-origin: 24px 50%; transition: transform 140ms ease-out, box-shadow 140ms ease-out;
}
.drag-ghost > table td, .drag-ghost > table th { border-bottom: 0; }
.drag-ghost.lifted > table {
  transform: scale(1.02);
  box-shadow:
    var(--mds_brand_appearance_shadow_high_first-layer_offset-x) var(--mds_brand_appearance_shadow_high_first-layer_offset-y) var(--mds_brand_appearance_shadow_high_first-layer_blur-radius) var(--mds_brand_appearance_shadow_high_first-layer_spread-radius) var(--mds_brand_appearance_shadow_high_first-layer_color),
    var(--mds_brand_appearance_shadow_high_second-layer_offset-x) var(--mds_brand_appearance_shadow_high_second-layer_offset-y) var(--mds_brand_appearance_shadow_high_second-layer_blur-radius) var(--mds_brand_appearance_shadow_high_second-layer_spread-radius) var(--mds_brand_appearance_shadow_high_second-layer_color),
    var(--mds_brand_appearance_shadow_high_third-layer_offset-x) var(--mds_brand_appearance_shadow_high_third-layer_offset-y) var(--mds_brand_appearance_shadow_high_third-layer_blur-radius) var(--mds_brand_appearance_shadow_high_third-layer_spread-radius) var(--mds_brand_appearance_shadow_high_third-layer_color),
    0 8px 24px rgba(0, 0, 0, 0.12);
}
.drag-ghost.settling { transition: transform 180ms cubic-bezier(0.2, 0, 0, 1); }
/* After a move: the row that moved, briefly. */
@keyframes row-moved { from { background: var(--info-bg); } to { background: transparent; } }
.prio-columns tr.row-moved > * { animation: row-moved 1.6s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .prio-columns.is-dragging tbody tr[data-id], .drag-ghost > table, .drag-ghost.settling { transition: none; }
  .drag-ghost.lifted > table { transform: none; }
  .prio-columns tr.row-moved > * { animation: none; background: var(--info-bg); }
}
@media (max-width: 1100px) {
  .prio-columns { grid-template-columns: minmax(0, 1fr); }
  .prio-scroll { max-height: none; min-height: 0; }
}

/* ---------- facts and timelines ---------- */
.facts { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 16px; }
.facts-narrow { grid-template-columns: 130px minmax(0, 1fr); }
.facts dt { color: var(--text-weak); }
.timeline { list-style: none; display: grid; gap: 8px; }
.timeline li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; }
.timeline time { color: var(--text-weak); font-size: 12px; font-variant-numeric: tabular-nums; }
.timeline .muted { font-size: 12px; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.steps li {
  padding: 8px 12px;
  background: var(--fill-weak);
  color: var(--text-weak);
  font-size: 14px;
  border-radius: var(--radius);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.steps li.past { background: var(--blue-weak); color: var(--text); }
.steps li.current { background: var(--primary); color: var(--on-primary); font-weight: 500; }

/* ---------- board ---------- */

.board { display: grid; grid-template-columns: repeat(6, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; }
.board-three { grid-template-columns: repeat(3, minmax(200px, 1fr)); }
/* In a narrow three-lane board the counts go under the lane's title rather than past its edge. */
@media (max-width: 900px) {
  .board-three .col-head { grid-template-columns: minmax(0, 1fr); }
}
/* Each column scrolls its own cards and the page stays put: a column is at most the room left
   in the window below the board's top (--board-room, set by app.js from wherever the notices
   above end; without the script, a guess), and the wheel over a column at its end does not
   scroll the page on. The scrolling list is positioned so that the cards' screen-reader texts
   (.visually-hidden, position: absolute) scroll and clip with it: otherwise they stay where an
   unscrolled column would put them, below the window, and the page scrolls down to them. */
.col { background: var(--fill-weak); border-radius: var(--radius-l); min-width: 0; display: flex; flex-direction: column; max-height: var(--board-room, calc(100vh - 230px)); }
.col-head { padding: 12px 12px 8px; display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: center; }
.col-head h2 { display: flex; font: inherit; margin: 0; }
.col-head .tag { font-weight: 600; cursor: help; }
.col-counts { display: flex; gap: 4px; white-space: nowrap; }
.count { font-size: 12px; background: var(--surface); border-radius: 12px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.col-body { position: relative; display: grid; gap: 8px; margin: 0; padding: 4px 8px 8px; list-style: none; flex: 0 1 auto; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; align-content: start; grid-template-columns: minmax(0, 1fr); }
.col-body > li { min-width: 0; }
.col-empty { padding: 16px 8px; text-align: center; color: var(--text-weak); font-size: 12px; }
.card {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* a long dependency name shrinks to the card instead of widening it */
  gap: 4px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  color: var(--text);
}
.card:hover { text-decoration: none; border-color: var(--field-line); box-shadow: var(--shadow); }
/* Pick up / Join on a TUGS FDE's card: after the card's link in the markup, shown over its
   bottom right, with room kept for it at the bottom of the card. */
.has-card-action { position: relative; }
.has-card-action .card { padding-bottom: 52px; }
/* One button per row (32px, 4px apart), as many rows kept free as there are buttons. */
.card-actions-2 .card { padding-bottom: 88px; }
.card-actions-3 .card { padding-bottom: 124px; }
.card-actions-4 .card { padding-bottom: 160px; }
.card-action { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.card-blocked { border-color: var(--err); background: var(--err-bg); }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-name { font-weight: 600; overflow-wrap: anywhere; }
.card-line { font-size: 12px; line-height: 16px; }
.card-flag { color: var(--err); }
.card-counts { display: flex; flex-wrap: wrap; column-gap: 4px; }
.card-count-group { display: inline-flex; column-gap: 4px; white-space: nowrap; }
.card-count-icon { margin-right: 4px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; line-height: 16px; color: var(--text-weak); }
.card-meta .tag { height: 20px; padding: 0 8px; font-size: 12px; line-height: 16px; }
/* An open access task on the card's application: a neutral tag, for the tooling and orchestration teams. */
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.card-tags .tag { height: 20px; padding: 0 8px; font-size: 12px; line-height: 16px; }
/* Shared-service dependency tags: a right-aligned row that wraps. A name pill is never shrunk or cut:
   when it does not fit beside the others it flows onto the next line. A name stays on one line unless
   it is wider than the card's column, and then it wraps inside its pill. */
.card-dependencies { justify-content: flex-end; min-width: 0; gap: 3px; }
.card-dependencies .tag { max-width: 100%; height: auto; min-height: 20px; padding: 2px 6px; border-radius: 10px; flex-shrink: 0; white-space: normal; overflow-wrap: anywhere; }
.card-dependencies .tag-more { white-space: nowrap; }
/* Label tags: a left-aligned row that wraps, like the dependencies: never cut, never wider than the card. */
.card-labels { min-width: 0; gap: 3px; }
.card-labels .tag { max-width: 100%; height: auto; min-height: 20px; padding: 1px 6px; flex-shrink: 0; white-space: normal; overflow-wrap: anywhere; }
.card-labels .tag-more { white-space: nowrap; }
/* People on an application (_fde_groups.html): one block above the facts, a light line under
   it. Each group: its name as a small label with an Add icon button on the same row, then the
   names, one per line, each with a Remove icon button. */
.people { display: grid; gap: 16px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line-weak); }
.people-group { display: grid; gap: 4px; }
.people-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* Two classes: beats ".modal-body h3", which sizes a dialog's section titles. */
.people .people-label { font: 400 12px/16px var(--font); color: var(--text-weak); margin: 0; }
.people-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.people-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; overflow-wrap: anywhere; }
.people-head form, .people-list form { flex: none; display: inline-flex; }
.people-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.people-action { background: none; border: 0; padding: 0 2px; font: 400 12px/16px var(--font); color: var(--link); cursor: pointer; border-radius: var(--radius-s); }
.people-action:hover { text-decoration: underline; }
.people-add, .people-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0; flex: none;
  border: 1px solid transparent; border-radius: var(--radius);
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out;
}
.people-add { color: var(--link); border-color: var(--outline); }
.people-add:hover { text-decoration: none; background: var(--hover-fill); border-color: var(--line); }
.people-remove { color: var(--text-weak); }
.people-remove:hover { text-decoration: none; background: var(--err-bg); color: var(--err-text); }
/* Join buttons under a group's names: real buttons, wrapping on a narrow card. */
.people-joins { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.people-joins form { display: contents; }
.people + .panel-head { margin-top: 0; }
.card-platform { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* A support person's role tag in the People block: as small as on a board card. */
.tag-small { height: 20px; padding: 0 8px; font-size: 12px; line-height: 16px; }
/* Support checklists (_fde_groups.checklists): one block per role, its name and how far it
   is, then its items with a checkbox each and who ticked them. */
.support-role { display: grid; gap: 4px; }
.support-role + .support-role { padding-top: 12px; border-top: 1px solid var(--line-weak); }
.support-role-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.support-role .support-role-title { font: 500 14px/20px var(--font); margin: 0; }
.support-role p { margin: 0; }
/* An open grant in the access team block: who it is for, its checklist, then the task card. */
.access-grant { gap: 12px; }
/* Item text wraps inside its column, a URL too: `anywhere` (not break-word) lowers the min-content
   width the auto grid columns around a checklist size to. */
.checklist { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; overflow-wrap: anywhere; }
.checklist-item { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }
.checklist-item .check { align-items: flex-start; min-width: 0; }
.checklist-item .check input:disabled { cursor: not-allowed; }
.checklist-item .check:has(input:disabled) { cursor: default; }
/* The checklist editor's rows: a drag handle, the text, the ID (after "Show IDs") and Remove. */
.checklist-editor { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist-editor > p { margin: 0; }
.checklist-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checklist-editor-head p { margin: 0; }
.checklist-editor-head .btn, .checklist-editor > [data-checklist-add] { flex-shrink: 0; justify-self: start; }
.checklist-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checklist-row { display: flex; align-items: center; gap: 6px; border-radius: var(--radius); }
.checklist-row > input[name=item_text] { flex: 1 1 auto; min-width: 120px; }
.checklist-row > input.checklist-key { flex: 0 0 150px; }
.checklist-row > input.checklist-key[readonly] { background: transparent; border-style: dashed; }
.field-error[data-checklist-key-error] { color: var(--err); margin: 0; }
.field-error[data-checklist-key-error][hidden] { display: none; }
.checklist-editor:not(.show-keys) :is(.checklist-key, .checklist-key-help) { display: none; }
.checklist-row > .icon-btn { margin-left: 0; flex-shrink: 0; }
.checklist-handle {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 24px; height: 32px; padding: 0; border: 0; border-radius: var(--radius);
  background: none; color: var(--text-weak); cursor: grab; touch-action: none;
}
.checklist-handle:hover { background: var(--hover-fill); }
.checklist-handle:active { cursor: grabbing; }
.checklist-row.dragging { opacity: 0.5; outline: 1px dashed var(--outline); }
.role-tab-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.role-tab-head > p { flex: 1 1 360px; margin: 0; }
.role-tab-head .actions { margin-left: auto; flex-shrink: 0; }
.support-tab { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.plain-numbered { margin: 0; padding-left: 20px; display: grid; gap: 4px; overflow-wrap: anywhere; }
form.inline { display: inline; }
.card-platform .tag { height: 20px; padding: 0 8px; font-size: 12px; line-height: 16px; }
.tag-access-task { background: #d4d4d4; color: #141414; }
/* Prioritised cards: whether the readiness data is complete, and what is missing. */
.card-data { display: grid; gap: 2px; justify-items: start; }
.card-data .tag { height: 20px; padding: 0 8px; font-size: 12px; line-height: 16px; }
.task h2 a { color: var(--text); }
/* My tasks: the panel reads top to bottom; parts below the "now" sentence are set off by a hairline. */
.task .now { padding: 4px 0; }
.task .part, details.more { border-top: 1px solid var(--line-weak); padding-top: 12px; }
.task .part > .panel-title { margin-bottom: 8px; }
/* The FDE's board: the next application to pick up, then the rest of the list. */
details.more > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius);
}
details.more > summary::-webkit-details-marker { display: none; }
/* A chevron: right when closed, down when open. */
details.more > summary::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin: 0 3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease-in-out;
}
details.more[open] > summary::before { transform: rotate(45deg); }
details.more > summary:hover { color: var(--link); }
details.more > .facts { margin-top: 8px; }
/* An access card folded away in the board's dialog (out of Waiting for access). */
details.access-fold > .stack { margin-top: 12px; }

/* ---------- application catalogue: search ---------- */
.notice-info { background: var(--info-bg); color: var(--info-text); }
.notice-info::before { content: none; }

.results { list-style: none; display: grid; margin: 0; padding: 0; }
.result { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-weak); }
.result:first-child { border-top: 0; }
.result-body { display: grid; gap: 2px; min-width: 0; }
.result-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.result-snippet { color: var(--text-weak); overflow-wrap: anywhere; }
.result-data { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0; }
.result-data .tag { height: 20px; padding: 0 8px; font-size: 12px; line-height: 16px; }
.result form { flex: none; }
mark { background: #ffe37a; color: inherit; border-radius: 2px; padding: 0 1px; }
.search-box { display: grid; gap: 8px; }
.search-results { min-height: 240px; max-height: 52vh; overflow-y: auto; }

/* ---------- registration form: picking the application ---------- */
.picker { display: grid; gap: 12px; }
.picker-results { min-height: 0; max-height: 360px; border: 1px solid var(--line-weak); border-radius: var(--radius-l); }
.picker-results:empty { display: none; }
.result-pick { border-top: 1px solid var(--line-weak); }
.result-pick:first-child { border-top: 0; }
.result-choice {
  display: block; width: 100%; padding: 10px 12px; border: 0; background: transparent;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.result-choice:hover { background: var(--hover-fill); }
.result-choice:focus-visible { outline-offset: -2px; }
/* The picked application: what the form registers. */
.picked {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface-weak);
}

/* ---------- registration form: recovery engineers ---------- */
.engineers { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.engineers legend { padding: 0; margin-bottom: 4px; font-size: 14px; }
.engineers legend em { font-style: normal; font-size: 12px; color: var(--text-weak); margin-left: 6px; }
.engineer-head, .engineer-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 80px; gap: 8px 16px; align-items: start; }
.engineer-head { font-size: 12px; line-height: 16px; color: var(--text-weak); }
.engineer-rows { list-style: none; display: grid; gap: 8px; }
.engineer-row > .btn { margin-top: 4px; }
.engineer-was { grid-column: 1 / -1; }
.repository-row { grid-template-columns: minmax(0, 1fr) 80px; }
.repo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.rows-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }

/* ---------- registration form: multi-select (details with checkboxes) ---------- */
details.multi { position: relative; }
.multi-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 40px; padding: 6px 12px; cursor: pointer; list-style: none;
  border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--surface);
}
.multi-summary::-webkit-details-marker { display: none; }
.multi-summary:hover { border-color: var(--field-line-hover); }
/* A chevron on the right, as on a select: down when closed, up when open. */
.multi-summary::after {
  content: ""; flex: none; width: 7px; height: 7px; margin: 0 4px 4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform 0.2s ease-in-out;
}
details.multi[open] > .multi-summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
details.multi[open] > .multi-summary { border-color: var(--blue); box-shadow: var(--focus-ring); }
.multi-values { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.multi-panel {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: 4px;
  display: grid; gap: 12px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow);
}
/* The label editor of the card dialog and application page sits in the facts column: its list opens in the flow (an overlay would be cut off by the dialog's scroll area). */
.label-editor .multi-panel { position: static; }
.multi-options { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.multi-add { display: flex; align-items: flex-end; gap: 8px; border-top: 1px solid var(--line-weak); padding-top: 12px; }
/* The same in a filter bar (the applications list's stages): as tall as the selects beside it,
   one line of text in the summary, and a list as wide as its longest option. */
.filter-multi { min-width: 200px; }
.filter-multi .multi-summary { height: 40px; padding: 8px 12px; white-space: nowrap; }
.filter-multi .multi-panel { right: auto; min-width: 100%; width: max-content; }
/* A long list of options (the toolkit's clusters) scrolls; the search box above it stays in view. */
.filter-multi .multi-options { max-height: min(320px, 50vh); overflow-y: auto; }
/* A line under the last visible pinned (chosen) option when unchosen ones follow it in view. */
.filter-multi .check.is-pinned:not([hidden]):not(:has(~ .is-pinned:not([hidden]))):has(~ .check:not(.is-pinned):not([hidden])) {
  border-bottom: 1px solid var(--line-weak); padding-bottom: 8px;
}
.cluster-find { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cluster-find input[type=search] { flex: 1 1 160px; min-width: 0; }
.cluster-multi .multi-panel { max-width: calc(100vw - 32px); }
/* Wider than a phone, the field takes the room Apply and Clear leave and a long choice is cut with
   an ellipsis, so they stay in the dropdown's row whatever the width and the panel opens below
   all three. */
@media (min-width: 721px) {
  .toolkit-filters { flex-wrap: nowrap; max-width: 100%; }
  .toolkit-filters > .field { flex: 1 1 auto; min-width: 0; }
  .toolkit-filters > .btn { flex: none; }
  /* The toolbar sits at the page's right edge, so the panel grows leftwards from the field's right edge
     (a panel growing rightwards ran off the screen), is never wider than the room it has, and its search
     row wraps rather than pushing "Tick all shown" out. */
  .cluster-multi .multi-panel { left: auto; right: 0; max-width: min(480px, calc(100vw - 32px)); }
}
/* At any width the field, the dropdown and its summary can shrink, and a long chosen id is cut with an
   ellipsis, so the chevron stays on screen and the page does not grow wider than the screen. */
.toolkit-filters > .field { grid-template-columns: minmax(0, 1fr); min-width: 0; max-width: 100%; }
.cluster-multi { min-width: 0; }
.cluster-multi .multi-summary { min-width: 0; }
.cluster-multi [data-multi-values] { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* On a narrow screen the panel is part of the page, not over it: it pushes Apply and Clear down
   instead of covering them, and nothing in it can lie outside the screen. */
@media (max-width: 720px) {
  .cluster-multi { width: 100%; }
  .cluster-multi .multi-panel { position: static; width: auto; max-width: none; min-width: 0; }
}

/* ---------- a small table inside a fact (recovery engineers) ---------- */
.mini-table { border-collapse: collapse; width: 100%; }
.mini-table th { text-align: left; font-weight: 400; font-size: 12px; line-height: 16px; color: var(--text-weak); padding: 0 16px 2px 0; }
.mini-table td { padding: 2px 16px 2px 0; vertical-align: top; overflow-wrap: anywhere; }

/* ---------- compact lists inside a fact (the board's card, the FDE's panel) ---------- */
/* A line each (recovery engineers): the secondary part small and muted after the name. */
.compact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
/* Names that wrap like a sentence (repositories), comma-separated. */
.repo-compact { display: grid; gap: 2px; overflow-wrap: anywhere; }
.inline-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 6px; }
.inline-list li:not(:last-child)::after { content: ","; color: var(--text-weak); }

/* ---------- dialogs (mc-modal) ---------- */
dialog.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--mds_brand_border_2x-large_radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.04), 0 1px 18px 8px rgba(0, 0, 0, 0.03), 0 6px 10px 8px rgba(0, 0, 0, 0.03);
  overflow: auto;
}
dialog.modal.modal-wide { width: min(760px, calc(100vw - 32px)); }
/* The board's card dialog: an application at a glance (app.js sets it from data-modal-size). */
dialog.modal.modal-card { width: min(1280px, 96vw); max-height: 92vh; }
/* On a wide screen it is one height whatever the stage: the header, the stages and the bottom
   bar stay put and the lanes scroll between them. */
@media (min-width: 901px) {
  dialog.modal.modal-card[open] { display: flex; flex-direction: column; height: 92vh; overflow: hidden; }
  dialog.modal.modal-card > :is(.modal-head, .card-steps, .modal-foot) { flex: none; }
  dialog.modal.modal-card > .modal-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
}
@media (max-width: 720px) { dialog.modal.modal-card { width: calc(100vw - 32px); } }
/* The main column (access card, FDE task, stage) gets about 60%, the facts about 40%. */
.card-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 24px 32px; }
/* A message moved into a reopened card (app.js, data-reopen) spans both columns, above them. */
.card-columns > .notice { grid-column: 1 / -1; }
.card-columns .card-side { border-left: 1px solid var(--line-weak); padding-left: 24px; }
/* With checklists, three lanes: the checklists, the context (access task cards, Now), the
   application. The dialog widens to hold them. */
dialog.modal.modal-card:has(.card-checklists) { width: min(1680px, 96vw); }
.card-columns:has(> .card-checklists) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); }
/* No lane can be pushed wider than its track by a long word or URL: it wraps instead. A lane never
   clips (overflow: hidden would cut focus rings and hide content). */
.card-columns > :is(.card-checklists, .card-main, .card-side) { min-width: 0; overflow-wrap: anywhere; }
.card-columns .card-checklists ~ .card-main { border-left: 1px solid var(--line-weak); padding-left: 24px; }
/* The lanes' widths by drag (app.js, [data-lane-handle]): with the script the handles show
   between the lanes and take the place of their dividers, and --card-lanes holds the widths
   (the lanes in fr, a handle's 48px between them). Without it, the widths above. */
.card-columns.is-resizable { column-gap: 0; grid-template-columns: var(--card-lanes, minmax(0, 1fr) 48px minmax(0, 1fr)); }
.card-columns.is-resizable:has(> .card-checklists) { grid-template-columns: var(--card-lanes, minmax(0, 1fr) 48px minmax(0, 1.2fr) 48px minmax(0, 1fr)); }
.card-columns.is-resizable :is(.card-side, .card-main) { border-left: 0; padding-left: 0; }
.lane-handle {
  align-self: stretch;
  position: relative;
  cursor: col-resize;
  touch-action: none;
}
.lane-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 1px;
  background: var(--line-weak);
}
.lane-handle:hover::before, .lane-handle:focus-visible::before, .lane-handle.is-dragging::before { left: 23px; width: 3px; border-radius: 2px; background: var(--line-strong); }
.lane-handle:focus-visible { outline-offset: -2px; border-radius: var(--radius); }
.card-columns.is-dragging { cursor: col-resize; user-select: none; }
/* In the side column a label sits above its value, so tables get the column's whole width. */
/* The facts sit beside their labels, so the About column stays about as tall as the Now column. */
.card-columns .card-facts { grid-template-columns: 150px minmax(0, 1fr); gap: 18px 16px; }
.card-columns .card-facts dd { min-width: 0; overflow-wrap: anywhere; }
/* The stages in a row, under the card dialog's header, the full width. */
.card-steps { padding: 4px 24px 8px; }
/* The same height in every stage, so the dialog does not jump as the application moves. */
@media (min-width: 901px) { dialog.modal-card .card-columns { min-height: 440px; } }
@media (max-width: 900px) {
  .card-columns, .card-columns:has(> .card-checklists),
  .card-columns.is-resizable, .card-columns.is-resizable:has(> .card-checklists) { grid-template-columns: minmax(0, 1fr); column-gap: 32px; }
  .card-columns .card-side, .card-columns .card-checklists ~ .card-main { border-left: 0; padding-left: 0; }
  .card-columns .lane-handle { display: none; }
}
.plain-list { list-style: none; margin: 0; padding: 0; overflow-wrap: anywhere; }
/* A link in checklist text is underlined at rest: the shared link style only underlines on hover, and in the
   dark theme the colour alone sets it little apart from the text around it. */
.checklist a, .plain-numbered a, .plain-list:not(.catalogue-repo-list) a { text-decoration: underline; }
dialog.modal::backdrop { background: rgba(20, 20, 20, 0.5); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 24px 12px; }
.modal-head h2 { font: 400 20px/24px var(--font-head); }
.modal-head p { margin-top: 4px; }
.modal-x { border: 0; background: transparent; font-size: 24px; line-height: 24px; width: 32px; height: 32px; border-radius: var(--radius); cursor: pointer; color: var(--text-weak); flex: none; }
.modal-x:hover { background: var(--hover-fill); }
.modal-body { display: grid; gap: 16px; padding: 12px 24px 24px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 24px; background: var(--surface-weak); position: sticky; bottom: 0; }
.modal-foot .spacer { margin-right: auto; }
/* The board's dialogs: on a phone the bottom bar's actions stack, full width, and a long label
   ("Mark grant for … as done") wraps. */
@media (max-width: 640px) {
  :is(#remote-dialog, #removed-access) .modal-foot > * { flex: 1 1 100%; margin-right: 0; }
  :is(#remote-dialog, #removed-access) .modal-foot > form > .btn { width: 100%; }
  :is(#remote-dialog, #removed-access) .modal-foot .btn { white-space: normal; height: auto; min-height: 40px; padding-top: 8px; padding-bottom: 8px; text-align: center; }
}
.modal-section { border-top: 1px solid var(--line-weak); padding-top: 16px; display: grid; gap: 12px; }
.modal-section h3, .modal-body h3 { font: 600 16px/24px var(--font); margin: 0; }
.modal .timeline li { grid-template-columns: 96px minmax(0, 1fr); }
.modal .timeline li > .muted { grid-column: 2; }
.history-events { gap: calc(12 * var(--mds-unit)); }
.modal .history-events li {
  column-gap: calc(12 * var(--mds-unit));
  padding-bottom: calc(12 * var(--mds-unit));
  border-bottom: 1px solid var(--line-weak);
}
.history-events li:last-child { padding-bottom: 0; border-bottom: 0; }
.history-event { display: grid; gap: calc(2 * var(--mds-unit)); min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .modal .history-events li { grid-template-columns: minmax(0, 1fr); row-gap: calc(2 * var(--mds-unit)); }
}

/* ---------- small layout helpers ---------- */
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.spacer { margin-right: auto; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--text-weak); }
.stats b { color: var(--text); font-weight: 600; }
.stats .alert, .stats .alert b { color: var(--err); }
.lead { font-size: 16px; line-height: 24px; }
.empty { padding: 32px 16px; text-align: center; color: var(--text-weak); }

/* segmented switch between two views of one area (mc-segmented-control) */
.segmented { display: inline-flex; flex-wrap: wrap; padding: 2px; background: var(--fill-weak); border-radius: var(--radius); }
.segmented a { padding: 5px 16px; border-radius: var(--radius-s); color: var(--text); white-space: nowrap; }
.segmented a:hover { text-decoration: none; background: var(--hover-fill); }
.segmented a[aria-current="page"], .segmented a[aria-current="true"] { background: var(--surface); box-shadow: var(--shadow); font-weight: 500; }

.page-head .stats { margin-top: 4px; }
.page-head h1 + .segmented { margin-top: 8px; }
/* A tab toggle under the page header, ending in a quiet button that adds a tab (fdes.html). */
.page-head.tab-head { margin-top: -8px; align-items: flex-end; justify-content: flex-start; gap: 8px 24px; flex-wrap: wrap; }
/* The labelled tab groups of the FDEs page: TUGS, Shared Services, Leadership, Cyber (#206). */
.tab-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tab-group-label { flex-basis: 100%; font: 600 12px/16px var(--font); color: var(--text-weak); text-transform: uppercase; letter-spacing: 0.04em; }
/* A group without tabs: its hint takes a row of tabs' height, so its label lines up with the others. */
.tab-group-empty { display: inline-flex; align-items: center; min-height: 34px; }
.tab-add { color: var(--text-weak); }
.tab-add:hover { color: var(--text); }
/* A muted count after a panel heading. */
.panel-title .head-count { font-weight: 400; margin-left: 4px; }
/* A panel heading with its action, inside a .stack panel: the stack's gap does the spacing. */
.stack > .panel-head { margin-bottom: 0; }
/* A flush table panel inset like a normal .panel, so its heading, first column and right-hand
   buttons line up with the panels beside or under it (fdes.html). */
.panel.flush.inset > .panel-head.padded { padding: var(--panel-inset-top) var(--panel-inset) 0; }
.panel.flush.inset > .table :is(th, td):first-child { padding-left: var(--panel-inset); }
.panel.flush.inset > .table :is(th, td):last-child { padding-right: var(--panel-inset); }
/* A flush panel's table scrolls sideways in a wrapper (the panel itself clips its corners). */
.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius-l) var(--radius-l); position: relative; }
.panel.flush.inset > .table-wrap > .table :is(th, td):first-child { padding-left: var(--panel-inset); }
.panel.flush.inset > .table-wrap > .table :is(th, td):last-child { padding-right: var(--panel-inset); }
.panel-head .stats { margin: 0; }

/* ---------- availability: shared ---------- */
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; line-height: 16px; color: var(--text-weak); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; border: 1px solid var(--line); }

/* ---------- availability: month grids (coverage and one FDE's calendar) ---------- */
.month { border-collapse: separate; border-spacing: 4px; width: 100%; table-layout: fixed; }
.month thead th { font-weight: 500; font-size: 12px; line-height: 16px; color: var(--text-weak); text-align: left; padding: 0 8px 4px; }
.month td { padding: 0; height: 72px; vertical-align: top; border-radius: var(--radius-s); border: 1px solid var(--line); }
.month td.cal-blank { border: 0; }
.month .is-today { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-pick select { width: auto; min-width: 200px; }
.cal-date { display: block; font-weight: 500; font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
.cal-state, .cal-count { display: block; font-size: 12px; line-height: 16px; }
.cal-mark { display: none; }
.cal-count b { font-size: 16px; line-height: 20px; }
.cov, .cal-cell { padding: 8px; }
/* The coverage cell is the td itself: .month td sets padding 0, so say it with the same weight. */
.month td.cov { padding: 8px 10px; }
.cal form { height: 100%; }
.cal-toggle { display: block; width: 100%; height: 100%; min-height: 70px; padding: 8px; border: 0; border-radius: inherit; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cal-toggle:hover { box-shadow: inset 0 0 0 2px var(--blue); }
.cal-toggle:focus-visible { outline-offset: -2px; }
/* coverage states */
.cov-short { background: var(--err-bg); color: var(--err-text); }
.cov-short b { font-weight: 700; }
.cov-ok { background: var(--ok-bg); color: var(--ok-text); }
.cov-plain { background: var(--surface); }
.cov-past, .cal-past { background: var(--fill-weak); color: var(--text-hint); }
/* one FDE's days */
.cal-on { background: var(--blue-weak); color: var(--text); }
.cal-off { background: var(--surface); color: var(--text-weak); }
.month td.cal-past { background: var(--surface-weak); color: var(--text-hint); }
/* one FDE's shifts: an Early and a Late toggle per day */
.cal-shifts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cal .cal-shifts form { height: auto; }
.shift-toggle { min-height: 24px; width: auto; padding: 2px 8px; font-size: 12px; line-height: 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--text-weak); }
.shift-toggle[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--on-blue); font-weight: 600; }
/* Focus: a ring outside the button (against the cell) and, on a pressed one, a ring inside it
   (against the fill), both at least 3:1. */
.shift-toggle:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; box-shadow: none; }
.shift-toggle[aria-pressed="true"]:focus-visible { box-shadow: inset 0 0 0 2px var(--on-blue); }
/* coverage: one count per shift; the short one stands out */
.cal-count.is-short b { text-decoration: underline; }
.cal-count-oncall { color: var(--text-weak); }
/* Cover by team (#209): a team per row, a day per column, its early, late and On-Call counts.
   A gap is marked with ⚠ and bold underlined text as well as its colour. */
.team-cover { border-collapse: separate; border-spacing: 4px; width: 100%; min-width: 760px; table-layout: fixed; }
/* One checkbox per line (the On-Call cover dialog). */
.choice-list { display: grid; gap: 6px; justify-items: start; }
.team-cover-week > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.team-cover thead th { font-weight: 500; font-size: 12px; line-height: 16px; color: var(--text-weak); text-align: left; padding: 0 8px; }
.team-cover thead th:first-child, .team-cover tbody th, .team-cover tfoot th { width: 180px; }
.team-cover thead th.is-today { color: var(--primary); }
.team-cover tbody th { text-align: left; font-weight: 500; padding: 4px 8px; vertical-align: top; }
.team-cover tbody th .small { display: block; font-weight: 400; }
.team-cover-group th { font: 600 12px/16px var(--font); color: var(--text-weak); text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 8px 0; }
.team-cover td.tc { padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius-s); vertical-align: top; }
.team-cover td.tc.has-gap { background: var(--err-bg); border-color: var(--err); }
.team-cover td.tc.is-past { background: var(--fill-weak); color: var(--text-hint); }
.tc-count { display: block; font-size: 12px; line-height: 18px; white-space: nowrap; }
.tc-count b { font-size: 14px; }
.tc-count.is-optional { color: var(--text-weak); }
.tc-count.is-gap { color: var(--err-text); font-weight: 700; }
.tc-count.is-gap b { text-decoration: underline; }
.team-cover tfoot th, .team-cover tfoot td { text-align: left; font-size: 12px; padding: 0 8px; color: var(--text-weak); }
.team-cover .gap-total { color: var(--err); }
.shift-note { margin: 0; }

/* ---------- availability: schedule ---------- */
.schedule { border-collapse: collapse; width: 100%; }
.schedule th, .schedule td { border: 1px solid var(--line); padding: 0; }
.schedule thead th { background: var(--surface-weak); font-weight: 700; font-size: 12px; line-height: 16px; padding: 8px 4px; white-space: nowrap; text-align: center; }
.schedule thead .is-today { background: var(--primary); color: var(--on-primary); }
.schedule .who { text-align: left; padding: 8px 12px; white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 1; font-weight: 400; }
.schedule thead .who { background: var(--surface-weak); font-weight: 700; }
.schedule .who b { font-weight: 600; font-size: 14px; }
/* When the person's schedule was last updated, and by whom if not themself, under the name. */
.schedule .who .schedule-updated { font-size: 12px; line-height: 16px; }
.schedule .week-start { border-left: 2px solid var(--line-strong); }
.day { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 64px; min-height: 40px; padding: 4px 2px; font: 400 12px/16px var(--font); color: var(--text); text-align: center; white-space: nowrap; }
a.day:hover { text-decoration: none; box-shadow: inset 0 0 0 2px var(--blue); }
a.day:focus-visible { outline-offset: -2px; }
.day-on { background: var(--blue-weak); font-weight: 600; }
.day-off { background: var(--surface); color: var(--text-hint); }
.schedule tfoot th, .schedule .shift-counts { background: var(--surface-weak); font-size: 12px; line-height: 16px; padding: 4px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.schedule tfoot .who { text-align: left; padding: 4px 12px; }

/* ---------- access tasks: one simple card per open task (one for an application's grants), in the board's dialog ---------- */
.access-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 20px 24px; display: grid; gap: 16px; }
.access-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.access-head :is(h2, h3) { font: 600 18px/24px var(--font); margin: 0; margin-right: 4px; }
.copy-box { display: grid; gap: 4px; min-width: 0; }
.copy-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.copy-label { font-size: 14px; line-height: 20px; color: var(--text-weak); }
.copy-text { margin: 0; padding: 10px 12px; background: var(--surface-weak); border: 1px solid var(--line-weak); border-radius: var(--radius); font: 14px/20px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; min-height: 42px; max-height: 142px; overflow-y: auto; }
/* Capped at about six lines (the box scrolls); "Show all" (app.js) lifts the cap. */
.copy-text.copy-open { max-height: none; }
.copy-more { justify-self: start; }
/* Several grants on one application in one card: whom it covers, right under the heading. */
.access-covers { margin: -12px 0 0; }
.access-missing { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 0; }
.access-card form .btn-primary { justify-self: start; }
.modal-tasks { margin-bottom: 24px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- How it works: one readable column, the board's stage tags for the steps ---------- */
.how { max-width: 960px; display: grid; gap: 16px; }
.how-path { list-style: none; display: grid; gap: 12px; }
.how-path li { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 16px; align-items: start; }
.how-path .tag { justify-self: start; }
.how-path p { padding-top: 2px; }
/* The role picker: anchor links to the role sections, the signed-in person's first. */
.how-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.how-picker .btn { gap: 8px; }
.how .panel-title .tag, .how-picker .tag { height: 20px; padding: 0 8px; font-size: 12px; line-height: 16px; margin-left: 8px; vertical-align: middle; }
.how-picker .tag { margin-left: 0; }
.how section[id^="role-"] { scroll-margin-top: 16px; }
.how-steps { padding-left: 20px; display: grid; gap: 8px; }
.how-points { display: grid; grid-template-columns: minmax(0, max-content) auto; justify-content: start; gap: 4px 32px; }
.how-points dd { text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .top-bar, .tab-bar { padding-left: 16px; padding-right: 16px; }
  .me-email { display: none; }
}
@media (max-width: 720px) {
  .access-card { padding: 16px; }
  .page { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .facts, .facts-narrow { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .how-path li { grid-template-columns: 1fr; gap: 4px; }
  .how-path p { padding-top: 0; }
  /* Registration form: an engineer's GitHub username above the ACM account and the email. */
  .engineer-head { display: none; }
  .engineer-row { grid-template-columns: 1fr; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line-weak); }
  .engineer-row > .btn { justify-self: start; margin-top: 0; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
  h1 { font-size: 22px; line-height: 26px; }
  /* Top bar: only the Maersk star, and no role tags. The buttons go on a line of their own, and wrap when they must. */
  .top-bar { grid-template-columns: 1fr; gap: 4px; padding: 4px 16px 8px; }
  .top-bar-actions { grid-column: 1; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .logo { width: 26px; background-size: 123px 48px; }
  .product { font-size: 16px; padding-left: 12px; }
  .product::before { margin-right: 12px; }
  .top-bar-actions .tag { display: none; }
  /* The role panel anchors to the full-width action row, so it cannot run past the left edge of the screen. */
  .top-bar-actions { position: relative; }
  .role-switch { position: static; }
  .role-switch-panel { right: 0; max-width: 100%; }
  /* Board: one column under the other, the page scrolls instead of each column. */
  .board { grid-template-columns: 1fr; overflow: visible; }
  .col { max-height: none; }
  .col-body { min-height: 0; overflow: visible; }
  /* Schedule: a sticky name column would cover most of the screen. */
  .schedule .who { position: static; }
  /* Month grids: smaller days. */
  .month { border-spacing: 2px; }
  .month td { height: 56px; }
  .cov, .cal-cell, .cal-toggle { padding: 4px; }
  .month td.cov { padding: 4px 6px; }
  .cal-toggle { min-height: 54px; }
  .cal-count { font-size: 11px; }
  /* Too narrow for words: a tick says "on a shift", and the words stay for screen readers. */
  .cal-state { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .cal-mark { display: block; font-size: 12px; line-height: 16px; font-weight: 600; }
  .cal-count { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.typed { border-left: 2px solid var(--line); padding-left: 8px; }

/* ---------- pages of a long list (Applications) ---------- */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.pager .muted { margin-right: auto; }

/* ---------- availability: the two-week planner (My days, /availability/days) ----------
   A plain list of checkboxes, one per day, under two week headings. */
/* My days: two weeks side by side on wide screens, one day per row, Early and Late as pills. */
.plan-weeks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px 32px; }
.plan-week { border: 0; margin: 0; padding: 0; display: grid; gap: 2px; min-width: 0; }
.plan-week legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.plan-day { display: grid; grid-template-columns: 136px auto auto 1fr; align-items: center; gap: 8px; min-height: 40px; padding: 2px 8px; border-radius: var(--radius-s); }
.plan-day.is-weekend { background: var(--surface-weak); }
.plan-day.is-today { box-shadow: inset 3px 0 0 var(--primary); }
.plan-date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-date b { display: inline-block; min-width: 32px; font-weight: 600; }
.tag-today { background: var(--primary); color: var(--on-primary); font-size: 11px; line-height: 16px; padding: 0 6px; margin-left: 4px; }
.plan-saved.is-failed { color: var(--err-text); }
/* Pills: the real checkbox stays (keyboard, screen readers, the form without script), drawn as a pill. */
.shift-pill { position: relative; display: inline-flex; cursor: pointer; }
.shift-pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.shift-pill span { display: inline-flex; align-items: center; justify-content: center; min-width: 84px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; color: var(--text-weak); background: var(--surface); transition: background-color .12s, color .12s, border-color .12s; }
.shift-pill input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--on-blue); font-weight: 600; }
.shift-pill input:checked + span::before { content: "\2713"; margin-right: 6px; font-size: 12px; }
.shift-pill input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.shift-pill:hover input:not(:disabled) + span { border-color: var(--blue); }
.shift-pill input:disabled { cursor: default; }
.shift-pill input:disabled + span { opacity: .6; }
/* Totals over the planner and the month. */
.plan-summary { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 0; font-size: 14px; color: var(--text-weak); }
.plan-count b { color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; }
.plan-count.is-none b { color: var(--err-text); }
/* With script every tick saves at once: the Save button is for pages without script. */
.plan-autosave-note { display: none; }
form.is-autosave .plan-save { display: none; }
form.is-autosave .plan-autosave-note { display: inline; align-self: center; }
/* Month view: the month and its arrows together; weekends shaded; short labels on phones. */
.month-title { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.month-step { font-size: 20px; line-height: 1; padding: 2px 10px; }
.month td.is-weekend:not(.cal-past):not(.cal-on) { background: var(--surface-weak); }
.shift-short { display: none; }
@media (max-width: 720px) {
  .shift-long { display: none; }
  .shift-short { display: inline; }
  .shift-toggle { padding: 2px 6px; min-width: 24px; }
  .plan-day { grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; padding: 2px 4px; }
  .plan-date { white-space: normal; }
  .plan-saved { grid-column: 1 / -1; }
  .shift-pill span { min-width: 78px; }
}

/* ---------- availability: capacity ---------- */
.capacity-pick .field { margin: 0; }
.capacity-pick input { width: auto; }
.capacity-running { margin: 4px 0 0; }
.capacity th[scope="row"], .capacity-day th[scope="row"] { font-weight: 600; }
.capacity-kind th { background: var(--surface-weak); text-align: left; font-weight: 700; }
.capacity-total th, .capacity-total td { border-top: 2px solid var(--line-strong); }
.capacity td, .capacity-day td { font-variant-numeric: tabular-nums; }
.capacity-none { color: var(--err-text); }
.capacity-day .is-now { box-shadow: inset 0 0 0 2px var(--primary); }
.pattern-grid td, .pattern-grid th { padding: 4px 8px; height: auto; }

/* Capacity: times of the day, tiles at a glance, bars in the day timeline. */
.cap-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; color: var(--text); text-decoration: none; background: var(--surface); }
.chip:hover { border-color: var(--blue); text-decoration: none; }
.chip.is-active { background: var(--blue-weak); border-color: var(--blue); font-weight: 600; }
.cap-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.cap-tile { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.cap-tile b { font-size: 28px; line-height: 32px; font-variant-numeric: tabular-nums; }
.cap-tile-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-weak); }
.cap-tile.is-ok { background: var(--ok-bg); border-color: transparent; }
.cap-tile.is-ok b { color: var(--ok-text); }
.cap-tile.is-none { background: var(--err-bg); border-color: transparent; }
.cap-tile.is-none b { color: var(--err-text); }

/* ---------- insights ---------- */
.insights th[scope="row"] { font-weight: 600; }
.insights td { font-variant-numeric: tabular-nums; }
.cap-tile b.insights-range { font-size: 20px; }
.capacity-day td { white-space: nowrap; }
.cap-bar { display: inline-block; height: 8px; margin-right: 8px; border-radius: 4px; background: var(--blue); vertical-align: middle; width: 0; }
.cap-bar.w1 { width: 8px; } .cap-bar.w2 { width: 16px; } .cap-bar.w3 { width: 24px; } .cap-bar.w4 { width: 32px; }
.cap-bar.w5 { width: 40px; } .cap-bar.w6 { width: 48px; } .cap-bar.w7 { width: 56px; } .cap-bar.w8 { width: 64px; }
.cap-bar.w9 { width: 72px; } .cap-bar.w10 { width: 80px; }
.capacity-day td.capacity-none { background: var(--err-bg); color: var(--err-text); }

/* Schedule: weekends and today down the columns; a shift with nobody from today on stands out. */
.schedule td.is-weekend .day-off { background: var(--surface-weak); }
.schedule td.is-today { box-shadow: inset 2px 0 0 var(--primary), inset -2px 0 0 var(--primary); }
.schedule .shift-counts.is-today { box-shadow: inset 2px 0 0 var(--primary), inset -2px 0 0 var(--primary); }
.schedule .count-none { color: var(--err-text); font-weight: 700; }

/* Capacity: the Show and Now buttons on the line of the fields, not of their labels. */
.row.capacity-pick { align-items: flex-end; }

/* ---------- catalogue repositories ---------- */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 32px; height: 28px; padding: 0 7px; margin-left: 4px; vertical-align: middle;
  border: 1px solid var(--outline); border-radius: var(--radius);
  background: none; color: inherit; font: inherit; font-size: 12px; line-height: 16px; cursor: pointer;
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.icon-btn:hover { background: var(--hover-fill); border-color: var(--line); }
.catalogue-repo-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.catalogue-repo-list li[hidden], [data-repo-empty][hidden] { display: none; }

/* Schedule: a heading row per kind (TUGS FDEs, platform support, access team). */
.schedule .schedule-section th { background: var(--surface-weak); text-align: left; font-weight: 700; padding: 8px 12px; position: static; }
.schedule-search .field.grow { flex: 0 1 420px; }
/* The Teams column of the All view and of a search: long lists of teams wrap. */
.schedule td.teams { padding: 8px 12px; min-width: 140px; max-width: 220px; font-size: 13px; line-height: 18px; vertical-align: middle; }
.schedule thead th.teams { text-align: left; padding: 8px 12px; }

/* Clusters, Toolkit tab: the toolkit's own view (app/templates/clusters_toolkit.html). */
.toolkit-source { margin: -8px 0 16px; }
/* The overview above the matrix folds away (toolkit-overview.js remembers it); its summary line keeps the counts. */
.toolkit-overview-box { margin-bottom: 16px; }
.toolkit-overview-box > summary {
  display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; cursor: pointer; list-style: none; padding: 4px 0 12px;
}
.toolkit-overview-box > summary::-webkit-details-marker { display: none; }
.toolkit-overview-box > summary::before {
  content: ""; flex: none; width: 7px; height: 7px; margin: 0 4px 3px 2px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform 0.2s ease-in-out;
}
.toolkit-overview-box[open] > summary::before { transform: rotate(45deg); margin: 0 4px 5px 2px; }
.toolkit-overview-box > summary h2 { margin: 0; }
.toolkit-overview-box > .toolkit-overview { margin-bottom: 0; }
/* A remembered "collapsed" (toolkit-overview.js sets it from <head>) shows before the first paint, while the
   <details> is still open in the HTML; the script drops it once the <details> is closed. */
html[data-toolkit-overview-collapsed] .toolkit-overview-box > .toolkit-overview { display: none; }
html[data-toolkit-overview-collapsed] .toolkit-overview-box > summary::before { transform: rotate(-45deg); margin: 0 4px 3px 2px; }
.toolkit-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
.toolkit-overview > * { min-width: 0; }
.toolkit-overview .panel { margin: 0; }
.toolkit-stack { display: block; width: 100%; height: 16px; border-radius: var(--radius-s); background: var(--fill-weak); margin-bottom: 12px; }
.toolkit-legend, .toolkit-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.toolkit-legend a, .toolkit-bars a { color: inherit; display: flex; align-items: center; gap: 8px; border-radius: var(--radius-s); }
.toolkit-legend a:hover, .toolkit-bars a:hover { text-decoration: none; background: var(--hover-fill); }
.toolkit-legend a[aria-current="true"], .toolkit-bars a[aria-current="true"] { box-shadow: inset 3px 0 0 var(--err); font-weight: 600; }
.toolkit-bars li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.toolkit-bars li > a { flex: 1; }
.toolkit-bar-label { flex: 0 0 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolkit-bar { flex: 1 1 0; width: 0; min-width: 40px; height: 10px; background: var(--fill-weak); border-radius: var(--radius-s); }
.toolkit-bar rect { fill: var(--err); }
.toolkit-bar.warn rect { fill: var(--mds_brand_appearance_warning_default_background-color, var(--warn-text)); }
.toolkit-bar-n { flex: 0 0 32px; text-align: right; font-variant-numeric: tabular-nums; }
.toolkit-key { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.toolkit-matrix thead tr.toolkit-groups th { text-align: center; border-left: 1px solid var(--line); font-size: 12px; }
.toolkit-matrix th.toolkit-step { padding: 6px 4px; text-align: center; font-size: 12px; line-height: 14px; white-space: nowrap; }
.toolkit-matrix th.toolkit-step a { color: inherit; display: flex; flex-direction: column; align-items: center; }
.toolkit-matrix th.toolkit-step a span { color: var(--text-weak); font-weight: 400; font-size: 11px; }
.toolkit-matrix th.toolkit-step.on { box-shadow: inset 0 -2px 0 var(--err); }
.toolkit-matrix tbody td.toolkit-cell-td { padding: 4px; text-align: center; height: auto; }
.toolkit-matrix tbody th { white-space: nowrap; }
/* The cluster's name stays at the left while the steps scroll under it. */
.toolkit-matrix thead tr:last-child th:first-child, .toolkit-matrix tbody th { position: sticky; left: 0; z-index: 1; box-shadow: inset -1px 0 0 var(--line); }
.toolkit-matrix tbody th { background: var(--surface); }
.toolkit-cell { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: var(--radius-s); font-style: normal; font-weight: 700; font-size: 12px; }
.toolkit-cell.PASS { background: var(--ok-bg); color: var(--ok-text); }
.toolkit-cell.WARN { background: var(--warn-bg); color: var(--warn-text); }
.toolkit-cell.FAIL { background: var(--err); color: var(--mds_brand_appearance_error_default_on-background-color, #fff); }
.toolkit-stack .tag-free { fill: var(--mds_brand_appearance_success_default_background-color, var(--ok-text)); }
.toolkit-stack .tag-busy { fill: var(--mds_brand_appearance_warning_default_background-color, var(--warn-text)); }
.toolkit-stack .tag-blocked { fill: var(--err); }
.toolkit-rule { margin-bottom: 16px; }
.toolkit-matrix td.toolkit-secured { white-space: nowrap; }
.toolkit-matrix td.toolkit-open { min-width: 220px; max-width: 320px; }
.toolkit-open .toolkit-item { white-space: nowrap; }
.toolkit-chips { display: grid; gap: 8px; padding-bottom: 12px; }
.toolkit-chips .chips { align-items: center; gap: 6px; }
.toolkit-chips-label { margin-right: 4px; }
.toolkit-matrix td.toolkit-result { white-space: nowrap; }
.toolkit-fails { display: inline-flex; align-items: center; gap: 4px; }
.toolkit-fails .toolkit-cell { width: 18px; height: 18px; font-size: 11px; }
.toolkit-matrix .toolkit-version-start { border-left: 2px solid var(--line-strong); }
.toolkit-matrix thead tr.toolkit-groups th.toolkit-version-group { border-left: 2px solid var(--line-strong); background: var(--fill-weak); }
.toolkit-manual-head { display: flex; flex-direction: column; align-items: center; }
.toolkit-manual-head span { color: var(--text-weak); font-weight: 400; font-size: 11px; }
.toolkit-blocking { color: var(--err-text); font-weight: 600; }
/* TUGS FDE onboarding (#234; fdes.html): the person fields of the candidate picked in Add TUGS
   FDE, and each candidate's progress bar. */
.plain-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 16px; }
.onboarding-progress { width: 96px; height: 8px; vertical-align: middle; accent-color: var(--success, #2e7d32); }
/* Comments on a card (#227; _macros.comments): a thread, oldest first. */
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.comment { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line-weak); }
.comment:last-child { border-bottom: 0; padding-bottom: 0; }
.comment-body { margin: 0; overflow-wrap: anywhere; }
.comment-actions { gap: 4px; }
.comment-edit[open] { flex-basis: 100%; }
.comment-edit > summary { list-style: none; cursor: pointer; }
.comment-edit > summary::-webkit-details-marker { display: none; }
.card-comments { white-space: nowrap; }
