/* =============================================
   EstatesBase — Dashboard Stylesheet
   All styles in one file. No frameworks.
   ============================================= */

/* -- Design Tokens ----------------------------- */
:root {
  --navy:       #0B2750;
  --gold:       #FAAB00;
  --gold-dark:  #C58D0D;
  --teal:       #4B979B;
  --teal-hover: #3D8286;
  --bg:         #F5F7FA;
  --navy-mid:   #405268;
  --navy-tint:  #E8ECF2;
  --white:      #ffffff;

  /* Status */
  --emerald-50:  #ECFDF5;
  --emerald-400: #34D399;
  --emerald-500: #10B981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --amber-50:    #FFFBEB;
  --amber-500:   #F59E0B;
  --amber-600:   #D97706;
  --amber-700:   #B45309;
  --red-50:      #FEF2F2;
  --red-400:     #F87171;
  --red-500:     #EF4444;
  --red-600:     #DC2626;
  --red-700:     #B91C1C;
  --blue-50:     #EFF6FF;
  --blue-500:    #3B82F6;
  --cyan-50:     #ECFEFF;
  --cyan-500:    #06B6D4;
}

/* -- Reset ------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* The hidden attribute always hides (browser pass, 1 Oct): a class that sets display — .form-group,
   .bespoke-matches — otherwise beats it and shows what a script hid. A panel opened by style.display
   (data-toggle-panel) must therefore never carry the attribute. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--navy-mid);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Spectral', Georgia, serif;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; }
table { border-collapse: separate; border-spacing: 0; width: 100%; }

/* -- Typography helpers ------------------------ */
.font-medium  { font-weight: 500; }
.font-mono    { font-family: ui-monospace, 'Cascadia Code', 'Fira Code', monospace; }
.text-center  { text-align: center; }
.text-teal    { color: var(--teal); }
.text-emerald { color: var(--emerald-600); }
.text-emerald-400 { color: var(--emerald-400); }
.text-amber   { color: var(--amber-600); }
.text-red     { color: var(--red-600); }
.text-red-400 { color: var(--red-400); }
.text-muted   { color: rgba(64,82,104,0.6); }
.text-white-80 { color: rgba(255,255,255,0.8); }

/* -- Logo ------------------------------------- */
.logo { font-family: 'Spectral', Georgia, serif; font-weight: 600; }
.logo--large   { font-size: 30px; }
.logo--medium  { font-size: 24px; }
.logo--sidebar { font-size: 20px; }
.logo-estates { color: var(--white); }
.logo-base    { color: var(--gold-dark); }
.logo-dot     { color: var(--gold); font-size: 0.5em; vertical-align: super; margin-left: 1px; }
.logo-link    { display: inline-block; }

.logo-tagline {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 4px;
}
.logo-tagline--small { font-size: 10px; }

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-body { background: var(--bg); }

.login-wrapper {
  min-height: 100vh;
  display: flex;
}

.login-left {
  display: none;
  width: 480px;
  background: var(--navy);
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.login-left-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(255,255,255,0.5) 40px, rgba(255,255,255,0.5) 41px);
}

.login-left-top, .login-left-bottom { position: relative; z-index: 1; }
.login-left-top .logo-link { display: block; margin-bottom: 64px; }

.login-heading {
  font-size: 24px;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 16px;
}

.login-subtext {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  max-width: 320px;
}

.login-left-rule {
  width: 48px;
  height: 2px;
  background: var(--teal);
  margin-bottom: 16px;
}

.login-copyright {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
}

.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.login-form-container { width: 100%; max-width: 400px; }

.login-mobile-logo { margin-bottom: 40px; text-align: center; }

.login-lock-icon {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: rgba(75,151,155,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  margin-bottom: 20px;
}

.login-title {
  font-size: 24px;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--navy-mid);
}

.login-form-header { margin-bottom: 32px; }

.login-error {
  background: var(--red-50);
  color: var(--red-600);
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(220,38,38,0.2);
}
.login-success {
  background: var(--emerald-50);
  color: var(--emerald-700);
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 20px;
  border: 1px solid #BBF7D0;
}

.login-form { display: flex; flex-direction: column; gap: 20px; }

.login-request {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--navy-mid);
}

.login-terms {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--navy-tint);
}

.login-terms p {
  font-size: 12px;
  color: rgba(64,82,104,0.6);
  text-align: center;
}

@media (min-width: 1024px) {
  .login-left { display: flex; }
  .login-mobile-logo { display: none; }
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.form-group   { display: flex; flex-direction: column; gap: 6px; }
.form-group[hidden] { display: none; }   /* S7: the evidence-rule pickers (data-ref-for) toggle the hidden attribute */
.form-stack   { display: flex; flex-direction: column; gap: 16px; }
/* The back link above a page (46 pages use it; it had no style of its own until Rocky's ticket 60). */
.page-back-link { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--navy); text-decoration: underline; text-decoration-color: var(--navy-tint); text-underline-offset: 3px; }
.page-back-link:hover { text-decoration-color: currentColor; }
.form-hint {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(64,82,104,0.5);
  margin-top: 4px;
}
.settings-form-message {
  padding: 10px 14px;
  border-radius: 6px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
}
.settings-form-message--success {
  background: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid #BBF7D0;
}
.settings-form-message--error {
  background: var(--red-50);
  color: var(--red-600);
  border: 1px solid rgba(220,38,38,0.2);
}

.form-label {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--navy);
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-input {
  height: 44px;
  border: 1px solid var(--navy-tint);
  border-radius: 4px;
  padding: 0 12px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--navy);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.form-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(75,151,155,0.2);
}

.form-input::placeholder { color: rgba(64,82,104,0.4); }
.form-input:disabled { background: var(--bg); color: var(--navy-mid); cursor: not-allowed; }

.form-textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
}

.input-password-wrapper { position: relative; }
.input-password-wrapper .form-input { padding-right: 40px; }

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(64,82,104,0.5);
  transition: color 0.15s;
  display: flex;
  align-items: center;
}
.password-toggle:hover { color: var(--navy-mid); }

.search-input-wrapper { position: relative; flex: 1; max-width: 384px; }
.search-input-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(64,82,104,0.4);
  pointer-events: none;
}
.search-input { padding-left: 36px; height: 40px; }

/* Switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0;
  background: var(--navy-tint);
  border-radius: 12px;
  transition: background 0.2s;
  cursor: pointer;
}
.switch-slider::before {
  content: '';
  position: absolute;
  height: 20px; width: 20px;
  left: 2px; bottom: 2px;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.switch input:checked + .switch-slider { background: var(--teal); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 500;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
}
.btn-primary:hover { background: var(--teal-hover); }

.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-hover); }

.btn-outline {
  background: var(--white);
  border: 1px solid var(--navy-tint);
  color: var(--navy-mid);
}
.btn-outline:hover { background: var(--bg); }

.btn-outline-teal {
  background: transparent;
  border: 1px solid var(--teal);
  color: var(--teal);
}
.btn-outline-teal:hover { background: var(--teal); color: var(--white); }

.btn-sm   { font-size: 12px; padding: 6px 12px; }
.btn-full { width: 100%; }
.btn-dashed { border-style: dashed; color: var(--teal); }

/* =============================================
   LINKS
   ============================================= */
.link-teal { color: var(--teal); transition: color 0.15s; }
.link-teal:hover { color: var(--teal-hover); text-decoration: underline; }
.link-subtle { color: var(--teal); font-size: 12px; transition: color 0.15s; }
.link-subtle:hover { color: var(--teal-hover); }
.link-small { font-size: 12px; }

/* =============================================
   APP LAYOUT — SIDEBAR + MAIN
   ============================================= */
.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* -- Sidebar ---------------------------------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 260px;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.2s ease-in-out;
}
.sidebar.open { transform: translateX(0); }

.sidebar-header { padding: 24px 24px 16px; }
.sidebar-header-row { display: flex; align-items: flex-start; justify-content: space-between; }

.sidebar-close {
  color: rgba(255,255,255,0.5);
  transition: color 0.15s;
}
.sidebar-close:hover { color: var(--white); }

.sidebar-org {
  padding: 12px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-org-label {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}
.sidebar-org-name {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--white);
  font-weight: 500;
}
.sidebar-org-sites {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: var(--teal);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 4px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.9);
}
.sidebar-link--active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}
.sidebar-link svg { flex-shrink: 0; }

.sidebar-user {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}
.sidebar-logout {
  color: rgba(255,255,255,0.4);
  transition: color 0.15s;
  display: flex;
}
.sidebar-logout:hover { color: var(--white); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 30;
}
.sidebar-overlay.open { display: block; }

/* Avatar */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--teal);
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 500;
  color: var(--white);
  flex-shrink: 0;
}
.avatar--sm  { width: 32px; height: 32px; font-size: 12px; }
.avatar--md  { width: 36px; height: 36px; font-size: 12px; border-radius: 50%; background: var(--navy-tint); color: var(--navy); }
.avatar--lg  { width: 80px; height: 80px; font-size: 28px; border-radius: 50%; }
.avatar-img  { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

/* Avatar crop modal */
.avatar-crop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-crop-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(11,39,80,0.2);
  width: 420px;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.avatar-crop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--navy-tint);
}
.avatar-crop-header h4 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}
.avatar-crop-body {
  padding: 20px;
  max-height: 400px;
  overflow: hidden;
}
.avatar-crop-body img {
  display: block;
  max-width: 100%;
}
.avatar-crop-actions {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--navy-tint);
}

/* Profile page */
.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 20px;
}
.profile-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.profile-detail-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.profile-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--navy-tint);
}
.profile-detail:last-child { border-bottom: none; }
.profile-detail-label {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  color: var(--navy-mid);
}
.profile-detail-value {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
}
.profile-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.profile-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--navy-tint);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  color: var(--teal);
  text-decoration: none;
}
.profile-link-item:last-child { border-bottom: none; }
.profile-link-item:hover { color: var(--navy); }
.profile-link-item svg { color: var(--navy-mid); }

/* -- Main wrapper ----------------------------- */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* -- Top header ------------------------------- */
.top-header {
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--navy-tint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.top-header-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; }
.top-header-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }

.hamburger {
  color: var(--navy);
  display: flex;
}

/* One line, never squeezed by the view switcher beside it (browser pass, 1 Oct: 48 of 86 titles wrapped
   onto two or three lines); a title too long for a narrow screen ends in an ellipsis. */
.page-title {
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 60px;
}
/* What gives way when the header is tight: the search box first, then the title (a long job title ends in an
   ellipsis; the whole of it is the tooltip). The view switcher keeps its own width. */
.top-header-left > * { flex-shrink: 0; }
.top-header-left > .page-title { flex: 0 1 auto; }   /* factors under 1 in total give back only that share of the overflow */
.top-header-left > .view-switcher { flex: 0 0 auto; }
.top-header-left > .header-search { flex: 0 100 220px; }
.top-header-left .view-switcher-select { min-width: 110px; max-width: 220px; text-overflow: ellipsis; }
/* THE PHONE HEADER (3 Oct, after the final check): at 375px the left of the header needed ~420px for the
   title, the view switcher (its phone cap below lost to the rule above on specificity), the admin-mode button
   and search, and the page scrolled sideways for every administrator. On a phone the header takes two rows:
   the title first, then search, the view switcher and a short admin-mode button. Desktop is unchanged. */
@media (max-width: 767px) {
  .top-header { height: auto; min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
  .top-header-left { flex-wrap: wrap; row-gap: 6px; }
  .top-header-left > .hamburger { order: 0; }
  .top-header-left > .page-title { order: 1; flex: 1 1 calc(100% - 82px); min-width: 0; }
  .top-header-left > .header-search { order: 2; flex: 0 0 auto; }
  .top-header-left > .view-switcher { order: 3; margin-left: 0; }
  .top-header-left > form[action^="/dashboard/admin/mode/"] { order: 4; }
  .top-header-left .view-switcher-select { min-width: 0; max-width: 125px; }
  .top-header-left > form[action^="/dashboard/admin/mode/"] .badge { font-size: 0; gap: 0; }
  .top-header-left > form[action^="/dashboard/admin/mode/"] .badge::after { content: 'Admin'; font-size: 11px; }
  .top-header-right { gap: 8px; }
  /* The page's own action buttons wrap beneath its purpose line instead of pushing the page sideways. */
  .page-intro-row { flex-direction: column; gap: 10px; }
  .page-actions { flex-shrink: 1; max-width: 100%; }
  .toolbar-actions { flex-wrap: wrap; }
}

.notification-bell {
  position: relative;
  color: var(--navy-mid);
  transition: color 0.15s;
  display: flex;
}
.notification-bell:hover { color: var(--navy); }

.notification-wrap { position: relative; }
.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--red-500);
  color: var(--white);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Notification dropdown */
.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 55;
  width: 360px;
  background: #fff;
  border: 1px solid var(--navy-tint);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(11,39,80,0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.notification-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--navy-tint);
}
.notif-dropdown-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}
.notif-dropdown-body {
  max-height: 380px;
  overflow-y: auto;
}
.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--navy-tint);
  cursor: pointer;
  transition: background 0.1s;
  text-decoration: none;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item--unread { background: rgba(75,151,155,0.04); }
.notif-item--unread .notif-title { font-weight: 500; }
.notif-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-icon--overdue { background: var(--red-50); color: var(--red-600); }
.notif-icon--deadline { background: var(--amber-50); color: var(--amber-700); }
.notif-icon--system { background: rgba(75,151,155,0.1); color: var(--teal); }
.notif-icon--info { background: var(--navy-tint); color: var(--navy-mid); }
.notif-icon--team { background: rgba(75,151,155,0.1); color: var(--teal); }
.notif-content { flex: 1; min-width: 0; }
.notif-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  color: var(--navy);
  line-height: 1.3;
}
.notif-message {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: var(--navy-mid);
  margin-top: 2px;
  line-height: 1.4;
  white-space: pre;       /* N2: a notice of several things keeps a line for each (up to four here; the history shows them all) */
  max-height: 5.6em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notice-lines { white-space: pre-line; }
.notif-time {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  color: rgba(64,82,104,0.5);
  margin-top: 3px;
}
/* S1: the bell's way to every notice. */
.notif-dropdown-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--navy-tint);
  text-align: center;
}
.notif-empty {
  padding: 32px 16px;
  text-align: center;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  color: var(--navy-mid);
}

/* -- Header profile & dropdown ---------------- */
.header-profile { position: relative; }

.header-profile-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 8px;
  color: var(--navy);
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.header-profile-toggle:hover,
.header-profile-toggle[aria-expanded="true"] { background: var(--navy-tint); }
.header-profile-toggle .avatar { flex-shrink: 0; }

.header-profile-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.header-profile-chevron {
  color: var(--navy-mid);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.header-profile-toggle[aria-expanded="true"] .header-profile-chevron {
  transform: rotate(180deg);
}

/* Dropdown menu */
.profile-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--navy-tint);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(11, 39, 80, 0.12);
  padding: 6px;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.profile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 4px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--navy);
  text-decoration: none;
  transition: background 0.1s;
  white-space: nowrap;
  cursor: pointer;
  text-align: left;
}
.profile-menu-item:hover,
.profile-menu-item:focus-visible {
  background: var(--bg);
  outline: none;
}
.profile-menu-item svg { flex-shrink: 0; color: var(--navy-mid); }

.profile-menu-item--disabled {
  color: var(--navy-mid);
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.profile-menu-item--danger { color: var(--red-600); }
.profile-menu-item--danger svg { color: var(--red-600); }
.profile-menu-item--danger:hover { background: var(--red-50); }

.profile-menu-soon {
  margin-left: auto;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal);
  background: rgba(75, 151, 155, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.profile-menu-divider {
  height: 1px;
  background: var(--navy-tint);
  margin: 6px 0;
}

@media (max-width: 640px) {
  .header-profile-name { display: none; }
  .header-profile-chevron { display: none; }
  .profile-menu { right: -8px; min-width: 200px; }
}

/* -- Main content ----------------------------- */
.main-content {
  flex: 1;
  padding: 16px;
}

.content-stack { display: flex; flex-direction: column; gap: 24px; }

/* -- Page back link --------------------------- */
.page-back { margin-bottom: -8px; }

/* =============================================
   GRID SYSTEM
   ============================================= */
.grid { display: grid; }
/* A grid column may shrink below its content, so a wide table in one column scrolls in its card instead of
   pushing the next column off the page (the task card's Schedule panel, browser pass 1 Oct). */
.grid > * { min-width: 0; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.grid-2       { grid-template-columns: repeat(2, 1fr); }
.grid-3       { grid-template-columns: repeat(3, 1fr); }
.grid-4       { grid-template-columns: repeat(4, 1fr); }
.grid-5       { grid-template-columns: repeat(5, 1fr); }
.grid-6       { grid-template-columns: repeat(6, 1fr); }
.grid-3-2     { grid-template-columns: 1fr; }
.col-span-2   { grid-column: span 2; }

/* grid-2-mobile has two uses (THE PANEL PAIR CASE, final check FX14, 3 Oct; pinned in bin/tests/fc/p_grid.php):
   - beside a grid-3/4/5/6 it is a tile row's phone layout: N across on a wide screen, two across on a phone;
   - on its own it is a pair of panels side by side, the prototype's `grid lg:grid-cols-2`: two across on a
     wide screen, one on a tablet or phone. It had a phone rule only, so ~16 panel pairs stacked in one
     column on a desktop and squeezed two across on a phone. */
@media (max-width: 767px) {
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6, .grid-3-2 { grid-template-columns: 1fr; }
  /* (grid-3 is left out: the KPI rule further down already makes every grid-3 two across on a phone, one at 480px) */
  .grid-4.grid-2-mobile, .grid-5.grid-2-mobile, .grid-6.grid-2-mobile { grid-template-columns: repeat(2, 1fr); }
  .grid-3-mobile { grid-template-columns: repeat(3, 1fr); }
  .col-span-2 { grid-column: span 1; }
}

@media (min-width: 768px) {
  .grid-3-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-2-mobile:not(.grid-3):not(.grid-4):not(.grid-5):not(.grid-6) { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .sidebar {
    position: relative;
    transform: translateX(0);
  }
  .sidebar-close { display: none; }
  .hamburger { display: none; }
  .main-content { padding: 32px; }
  .top-header { padding: 0 32px; }
  .grid-3-2 { grid-template-columns: 2fr 1fr; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-5 { grid-template-columns: repeat(5, 1fr); }
}

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--white);
  border: 1px solid var(--navy-tint);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.card--feature { border-top: 3px solid var(--teal); }

.card--hover {
  transition: border-color 0.15s;
  cursor: pointer;
}
.card--hover:hover { border-color: rgba(75,151,155,0.5); }

.card-header {
  padding: 20px;
  padding-bottom: 12px;
}
.card-header--between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; } /* B6: a header button wraps under its title on a phone */

.card-title {
  font-size: 18px;
}
.card-title--icon { display: flex; align-items: center; gap: 8px; }

.card-body { padding: 20px; }
.card-body--flush { padding: 0; }
/* A table wider than its card scrolls inside the card, never the page (browser pass, 1 Oct: the register,
   assets, condition, evidence, triage and reports tables pushed every page sideways). Not where a row opens
   an action menu — a scroll box would clip it. */
.card-body--flush:not(:has(.team-action-menu)) { overflow-x: auto; }
/* 19 Nov 2026 (phone check): on a phone a table with row menus scrolls in its card too (the budget lines, a project's
   milestones, team and risks pushed the page to 600 to 950px wide); a closed menu takes no room and an open one is
   placed against the screen by dashboard.js (placeActionMenu), as inside .table-scroll. */
@media (max-width: 767px) {
  .card-body--flush:has(.team-action-menu) { overflow-x: auto; }
  .card-body--flush .team-action-menu:not(.is-open) { display: none; }
}
/* 19 Nov 2026 (phone check): a list's long option never makes its box wider than the card (an off-site visit's
   assessment picker reached 392px on a 375px phone). */
select.form-input { max-width: 100%; }
.p-4  { padding: 16px; }
.p-5  { padding: 20px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }

/* =============================================
   WELCOME BANNER
   ============================================= */
.welcome-banner {
  background: var(--navy);
  border-radius: 4px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.welcome-heading {
  font-size: 20px;
  color: var(--white);
}

.welcome-sub {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

@media (min-width: 640px) {
  .welcome-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* =============================================
   STAT CARDS
   ============================================= */
.stat-card {
  background: var(--white);
  border: 1px solid var(--navy-tint);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  padding: 20px;
}

.stat-card--row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.stat-icon--teal { background: rgba(75,151,155,0.1); color: var(--teal); }
.stat-icon--red  { background: var(--red-50); color: var(--red-500); }

.stat-icon-lg {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Color utilities for icon containers */
.text-teal.bg-teal-10     { color: var(--teal); background: rgba(75,151,155,0.1); }
.text-emerald-600.bg-emerald-50 { color: var(--emerald-600); background: var(--emerald-50); }
.text-amber-600.bg-amber-50     { color: var(--amber-600); background: var(--amber-50); }
.text-red-600.bg-red-50         { color: var(--red-600); background: var(--red-50); }
.text-red-500.bg-red-50   { color: var(--red-500); background: var(--red-50); }
.text-blue-500.bg-blue-50 { color: var(--blue-500); background: var(--blue-50); }
.text-amber-500.bg-amber-50 { color: var(--amber-500); background: var(--amber-50); }
.text-cyan-500.bg-cyan-50   { color: var(--cyan-500); background: var(--cyan-50); }

.stat-card--row .stat-icon-lg + div { display: flex; flex-direction: column; }

.stat-value {
  font-family: 'Spectral', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
}
.stat-value--red { color: var(--red-600); }

.stat-label {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--navy);
  margin-top: 2px;
}

.stat-detail {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(64,82,104,0.6);
  margin-top: 4px;
}

/* =============================================
   FILTER CARDS (Tasks page)
   ============================================= */
.filter-card {
  padding: 16px;
  border-radius: 4px;
  border: 1px solid var(--navy-tint);
  background: var(--white);
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.filter-card:hover { border-color: rgba(75,151,155,0.5); }
.filter-card--active {
  border-color: var(--teal);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.filter-card-count {
  font-family: 'Spectral', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
}
.filter-card-label {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--navy-mid);
}

/* Filter panel */
.filter-panel {
  background: #fff;
  border: 1px solid var(--navy-tint);
  border-radius: 8px;
  padding: 20px;
}
.filter-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 16px;
}
.filter-panel-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--navy-tint);
}
.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  background: var(--teal);
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  margin-left: 2px;
}
.filter-chevron { transition: transform 0.2s; }
.filter-toggle-open .filter-chevron { transform: rotate(180deg); }
.filter-panel[hidden] { display: none; }

/* =============================================
   LIST-PAGE KIT — footer, empty state, page intro, sort links
   (app/core/ListPage.php + views/partials/_list_footer.php etc.)
   ============================================= */
.list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-top: 1px solid var(--navy-tint);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: var(--navy-mid);
}
.list-footer-nav { display: flex; align-items: center; gap: 8px; }
.list-footer-size { display: flex; align-items: center; gap: 8px; }
.empty-state { text-align: center; padding: 32px 16px; color: var(--navy-mid); }
.empty-state svg { opacity: .5; margin-bottom: 8px; }
.empty-state-message { margin: 0; font-size: 14px; }
.empty-state-action { margin-top: 12px; }
.page-intro-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.page-intro {
  margin: 0;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  color: var(--navy-mid);
  max-width: 820px;
}
.page-actions { flex-shrink: 0; }
.th .sort-link { color: inherit; text-decoration: none; }
.th .sort-link:hover { text-decoration: underline; }
.th .sort-link[data-dir="asc"]::after { content: " \2191"; }
.th .sort-link[data-dir="desc"]::after { content: " \2193"; }

/* Form row utility */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* =============================================
   TOOLBAR
   ============================================= */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toolbar-actions { display: flex; gap: 8px; }

@media (min-width: 640px) {
  .toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* =============================================
   DATA TABLE
   ============================================= */
.table-scroll { overflow-x: auto; position: relative; } /* B2: a visually hidden label inside (position: absolute) must not escape and widen a phone page */

.data-table { width: 100%; }

.th {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(64,82,104,0.6);
  font-weight: 400;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--navy-tint);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.th:hover { color: var(--navy-mid); }

.td {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--navy-mid);
  padding: 12px 16px;
  border-bottom: 1px solid var(--navy-tint);
  vertical-align: middle;
}

.td--name {
  font-weight: 500;
  color: var(--navy);
}

.td--mono {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 12px;
  color: rgba(64,82,104,0.6);
}

.td-primary { font-size: 14px; color: var(--navy-mid); }
.td-secondary { font-size: 12px; color: rgba(64,82,104,0.5); }
.td-secondary-size { font-size: 12px; }

tr.clickable-row { cursor: pointer; transition: background 0.1s; }
tr.clickable-row:hover { background: rgba(232,236,242,0.5); }
.data-table tbody tr:hover { background: rgba(232,236,242,0.5); }

/* =============================================
   BADGES
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 400;
  border-radius: 4px;
  border: 1px solid;
  padding: 2px 8px;
  white-space: nowrap;
}

.badge--green  { background: var(--emerald-50); color: var(--emerald-700); border-color: #BBF7D0; }
.badge--amber  { background: var(--amber-50);   color: var(--amber-700);   border-color: #FDE68A; }
.badge--red    { background: var(--red-50);      color: var(--red-700);     border-color: #FECACA; }
.badge--muted  { background: var(--navy-tint);   color: var(--navy-mid);    border-color: var(--navy-tint); }

/* Category tag */
.category-tag {
  display: inline-block;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--navy-tint);
  color: var(--navy-mid);
}

/* =============================================
   PROGRESS BAR
   ============================================= */
.progress-bar {
  height: 6px;
  background: var(--navy-tint);
  border-radius: 9999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s;
}
.progress-bar-fill--green { background: var(--emerald-500); }
.progress-bar-fill--amber { background: var(--amber-500); }
.progress-bar-fill--red   { background: var(--red-500); }

.compliance-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.compliance-bar-row .progress-bar { width: 80px; }
.compliance-pct {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
}

/* Overdue badge (circular) */
.overdue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--red-50);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--red-600);
}

/* =============================================
   ACTIVITY FEED
   ============================================= */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}
.activity-item--bordered { border-bottom: 1px solid var(--navy-tint); }

.activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.activity-icon--completed { background: var(--emerald-50); color: var(--emerald-600); }
.activity-icon--overdue   { background: var(--red-50); color: var(--red-600); }
.activity-icon--upcoming  { background: var(--amber-50); color: var(--amber-600); }

.activity-content { flex: 1; min-width: 0; }
.activity-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-site {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(64,82,104,0.6);
}
.activity-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  color: rgba(64,82,104,0.4);
}

/* =============================================
   DETAIL GRID
   ============================================= */
.page-header-row { margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } /* B3 walk: a record's actions wrap at 375px */

/* Evidence list */
.evidence-list { display: flex; flex-direction: column; gap: 0; }
.evidence-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--navy-tint);
}
.evidence-item:last-child { border-bottom: none; }
.evidence-item-icon { flex-shrink: 0; color: var(--navy-mid); }
.evidence-item-info { flex: 1; min-width: 0; }
.evidence-item-name {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.evidence-item-meta {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  color: var(--navy-mid);
  margin-top: 1px;
}
/* 379 (APP-WALK-E6): a task photo chosen from the phone's photos, labelled for the person judging it. */
.evidence-source { color: var(--amber-700); font-weight: 500; }
/* Ticket 160 (TB10, 7 Nov 2026): a contractor's credential that carries its renewal actions (the link note and button)
   puts them on a line under its details, rather than squeezing the details to a word a line at 1366 wide. */
.evidence-item:has(> form[action*="/send-renewal"]) { flex-wrap: wrap; }
.evidence-item:has(> form[action*="/send-renewal"]) > .evidence-item-info { flex: 1 1 calc(100% - 40px); }

/* Comments */
.comment-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--navy-tint);
}
.comment-item:last-child { border-bottom: none; }
.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.comment-author {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
}
.comment-date {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  color: var(--navy-mid);
}
.comment-body {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  color: var(--navy-mid);
  line-height: 1.5;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.detail-label {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(64,82,104,0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.detail-value {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--navy);
}

/* =============================================
   ASSET CATEGORY CARDS
   ============================================= */
.category-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cat-icon {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cat-count {
  font-family: 'Spectral', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}
.cat-name {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: var(--navy-mid);
}

/* =============================================
   COMPLIANCE PAGE
   ============================================= */
.compliance-score-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.compliance-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.compliance-circle-value {
  font-family: 'Spectral', Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--white);
}

.compliance-summary-stats {
  display: flex;
  gap: 24px;
}
.compliance-stat { text-align: center; }
.compliance-stat-value {
  font-family: 'Spectral', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
}
.compliance-stat-label {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

@media (min-width: 640px) {
  .compliance-summary-stats { margin-left: auto; }
}

.section-heading {
  font-size: 20px;
  margin-bottom: 16px;
}
.section-subheading {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--navy-mid);
  margin-top: -12px;
  margin-bottom: 20px;
}

.compliance-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.compliance-cat-score {
  font-family: 'Spectral', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
}
.compliance-cat-name {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 8px;
}
.compliance-cat-footer {
  display: flex;
  justify-content: space-between;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  color: rgba(64,82,104,0.5);
}

/* =============================================
   REPORTS PAGE
   ============================================= */
.report-card-btn {
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.report-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.report-chevron {
  color: rgba(64,82,104,0.3);
  transition: color 0.15s;
}
.group:hover .report-chevron,
.card--hover:hover .report-chevron { color: var(--teal); }

.report-title {
  font-family: 'Spectral', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}
.report-desc {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: var(--navy-mid);
  line-height: 1.5;
  margin-bottom: 12px;
}
.report-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  color: rgba(64,82,104,0.5);
}

.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--navy-tint);
  transition: background 0.1s;
  cursor: pointer;
}
.report-row:last-child { border-bottom: none; }
.report-row:hover { background: rgba(232,236,242,0.3); }

.report-row-left { display: flex; align-items: center; gap: 12px; }
.report-file-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--navy-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-mid);
  flex-shrink: 0;
}
.report-row-name {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
}
.report-row-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(64,82,104,0.5);
}

/* =============================================
   SETTINGS PAGE
   ============================================= */
.tabs { }
.tab-list {
  display: flex;
  gap: 0;
  background: var(--navy-tint);
  border: 1px solid var(--navy-tint);
  border-radius: 4px;
  padding: 4px;
  width: fit-content;
}
.tab-trigger {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 4px;
  color: var(--navy-mid);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.tab-trigger:hover { color: var(--navy); }
.tab-trigger--active {
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.tab-content { display: none; margin-top: 24px; }
.tab-content--active { display: block; }

/* Site list */
.sites-list { display: flex; flex-direction: column; gap: 12px; }
.site-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid var(--navy-tint);
  background: var(--bg);
}
.site-item-left { display: flex; align-items: center; gap: 10px; }
.site-item-name {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--navy);
}

/* Team list */
.team-list { }
.team-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--navy-tint);
}
.team-member:last-child { border-bottom: none; }
.team-member-left { display: flex; align-items: center; gap: 12px; }
.team-member-name {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
}
.team-member-email {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(64,82,104,0.5);
}
.team-member-meta {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  color: rgba(64,82,104,0.6);
  margin-top: 2px;
}
.team-member-right { display: flex; align-items: center; gap: 8px; }

/* Activity panel list */
.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.activity-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--navy-tint);
}
.activity-item:last-child { border-bottom: none; }
.activity-item-label {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
}
.activity-item-meta {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  color: var(--navy-mid);
  margin-top: 3px;
}
.activity-item-detail {
  color: rgba(64,82,104,0.7);
}

/* Team actions */
.team-member-actions {
  position: relative;
  margin-left: 4px;
}
.team-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--navy-mid);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
}
.team-action-btn:hover { background: var(--navy-tint); }
.team-action-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 52;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--navy-tint);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(11,39,80,0.12);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.team-action-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* B4: inside a scrolling table a closed menu takes no room (a hidden one widened the scroll box and gave the table its own
   vertical scrollbar); an open one is placed against the viewport by dashboard.js (placeActionMenu). */
.table-scroll .team-action-menu:not(.is-open) { display: none; }
.team-action-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  color: var(--navy);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}
.team-action-menu-item:hover { background: var(--navy-tint); }
.team-action-menu-item--danger { color: var(--red-600); }
.team-action-menu-item--danger:hover { background: var(--red-50); }

/* Team invite panel */
.team-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 60;
}
.team-overlay.is-open { display: block; }
.team-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 400px;
  background: #fff;
  z-index: 61;
  box-shadow: -4px 0 24px rgba(11,39,80,0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease, visibility 0.25s;
  visibility: hidden;
}
.team-panel.is-open { transform: translateX(0); visibility: visible; }
.team-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--navy-tint);
}
.team-panel-header h3 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}
.team-panel-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}
.team-invite-error {
  background: var(--red-50);
  color: var(--red-600);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid rgba(220,38,38,0.2);
}
.team-invite-success {
  padding: 40px 20px;
  text-align: center;
}
.team-invite-success-icon { margin-bottom: 16px; }
.team-invite-success-text {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 16px;
}
.invite-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-tint);
  border: 1px solid rgba(11,39,80,0.08);
  border-radius: 8px;
  padding: 8px 10px;
}
.invite-link-input {
  flex: 1;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  color: var(--navy);
  background: transparent;
  border: none;
  outline: none;
  min-width: 0;
}
.btn-copy {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Confirm dialog */
.team-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 62;
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-confirm {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(11,39,80,0.18);
  padding: 24px;
  max-width: 380px;
  width: 90%;
  /* walk, 25 Nov 2026 (ST-765): a box taller than the window scrolls inside itself (Add site: Save was below the bottom) */
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}
.team-confirm-text {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 20px;
  line-height: 1.5;
}
.team-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--navy-tint);
}

/* Role edit popover */
.team-role-popover {
  position: absolute;
  z-index: 53;
  background: #fff;
  border: 1px solid var(--navy-tint);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(11,39,80,0.12);
  padding: 12px;
  min-width: 200px;
}
.team-role-popover-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.form-input--sm {
  padding: 6px 10px;
  font-size: 13px;
}

/* Notification preferences */
.notification-pref {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 0;
  gap: 16px;
}
.notification-pref + .notification-pref { margin-top: 12px; }
.notification-pref-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
}
.notification-pref-desc {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(64,82,104,0.6);
  margin-top: 2px;
}

/* 2FA */
.twofa-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.twofa-status {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--navy);
}
.twofa-desc {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(64,82,104,0.6);
  margin-top: 4px;
}

/* =============================================
   ICON UTILITY
   ============================================= */
.icon-teal { color: var(--teal); }

/* =============================================
   RESPONSIVE ADJUSTMENTS
   ============================================= */
@media (max-width: 639px) {
  .welcome-banner { gap: 12px; }
  .compliance-score-row { flex-direction: column; align-items: flex-start; }
  .tab-list { overflow-x: auto; width: 100%; }
  .twofa-row { flex-direction: column; align-items: flex-start; }
  .report-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .detail-grid { grid-template-columns: 1fr; }
  .team-member { flex-direction: column; align-items: flex-start; gap: 12px; }
  .team-panel { width: 100vw; }
  .team-action-menu { right: auto; left: -120px; }
  .filter-panel-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* =============================================
   FEEDBACK WIDGET
   ============================================= */

/* Header trigger button */
.header-icon-btn {
  position: relative;
  color: var(--navy-mid);
  transition: color 0.15s;
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.header-icon-btn:hover { color: var(--teal); }

/* Overlay */
.feedback-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 60;
}
.feedback-overlay.is-open { display: block; }

/* Slide-in panel */
.feedback-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh; /* FB3: a phone's browser bar does not cover Send */
  background: var(--white);
  z-index: 61;
  box-shadow: -4px 0 24px rgba(11, 39, 80, 0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0.25s;
}
.feedback-panel.is-open { transform: translateX(0); visibility: visible; }

.feedback-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--navy-tint);
  flex-shrink: 0;
}
.feedback-panel-header h3 {
  font-family: 'Spectral', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}
.feedback-panel-close {
  color: var(--navy-mid);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.15s;
}
.feedback-panel-close:hover { background: var(--navy-tint); }

.feedback-panel-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Pill selectors */
.pill-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--navy-tint);
  color: var(--navy-mid);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
}
.pill:hover { border-color: var(--teal); color: var(--teal); }
.pill.pill--active {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

/* FB3: the type's question, impact, the capture line, the pictures */
.feedback-tester { border: 0; margin: 0; padding: 0; min-width: 0; }
.feedback-impact { border: 0; margin: 0; padding: 0; min-width: 0; }
.feedback-impact__choice { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; color: var(--navy); cursor: pointer; }
.feedback-capture-line { margin: 6px 0 0; font-size: 13px; color: var(--navy-mid); }
.feedback-pictures { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.feedback-picture { border: 1px solid var(--navy-tint); border-radius: 6px; overflow: hidden; background: var(--bg); }
.feedback-picture img { display: block; width: 100%; height: 96px; object-fit: cover; object-position: top left; }
.feedback-picture__actions { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; background: var(--white); border-top: 1px solid var(--navy-tint); }
.feedback-picture__actions button { background: none; border: 0; padding: 2px 0; cursor: pointer; font-family: inherit; }
#fbAddWrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.feedback-files { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.feedback-files:focus-visible + label { outline: 2px solid var(--teal); outline-offset: 2px; }
.feedback-add-note { font-size: 12px; color: var(--navy-mid); }
.feedback-sentence { margin: 0; font-size: 12px; line-height: 1.5; color: var(--navy-mid); }

/* FB3: the mark-up editor. touch-action: none, or a finger on the picture scrolls instead of drawing. */
.feedback-editor { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: rgba(11, 39, 80, 0.92); }
.feedback-editor__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--white); }
.feedback-editor__tools { display: flex; flex-wrap: wrap; gap: 6px; }
.feedback-editor__tools .btn.is-active { background: var(--teal); border-color: var(--teal); color: var(--white); }
.feedback-editor__stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 10px; overflow: hidden; }
#fbEditorCanvas { display: block; background: var(--white); touch-action: none; cursor: crosshair; }
.feedback-editor__note { margin: 0; padding: 0 12px 12px; text-align: center; font-size: 12px; color: var(--white); }

/* Error message */
.feedback-error {
  padding: 10px 12px;
  border-radius: 4px;
  background: var(--red-50);
  color: var(--red-600);
  font-size: 13px;
}

/* Actions */
.feedback-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 20px;
  margin-top: auto;
  border-top: 1px solid var(--navy-tint);
}

/* Success state */
.feedback-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  flex: 1;
}
.feedback-success-title {
  font-family: 'Spectral', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin: 16px 0 4px;
}
.feedback-success > .btn { margin-top: 16px; }

/* FB3: the floating button. Nothing else is fixed in this corner, and z-index 25 keeps it under the phone sidebar's
   overlay (30) and every panel. main's extra foot means the button never sits on the last row of a page. */
.feedback-float {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--navy-tint);
  border-radius: 20px;
  background: var(--white);
  color: var(--navy);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(11, 39, 80, 0.15);
}
.feedback-float:hover { color: var(--teal); border-color: var(--teal); }
body:has(.feedback-float) main { padding-bottom: 72px; }
/* SW ST-506: a bar stuck to the foot of the page (an inspection's Complete and score) keeps its buttons clear of the
   floating button, which sat over the primary action. */
body:has(.feedback-float) .sticky-foot { padding-right: 140px !important; }
@media (max-width: 640px) { body:has(.feedback-float) .sticky-foot { padding-right: 60px !important; } }

/* FB3: the panel's entry in the portal, contractor and onboarding headers (buttons that read as the links beside them) */
.portal-nav-link--button { background: none; border: 0; cursor: pointer; font-family: inherit; }
.onb-header__links { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 14px; }
.onb-header__button { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }

/* Mobile: full width panel, a round button (none where a sticky bar runs along the foot of the page) */
@media (max-width: 640px) {
  .feedback-panel { width: 100vw; }
  .feedback-float { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .feedback-float__words { display: none; }
  .feedback-float--not-on-phone { display: none; }
}
@media print {
  .feedback-float { display: none; }
}

/* FB3: My reports and a report's page, in the dashboard and the contractor portal alike */
.fb-portal-title { margin: 0 0 8px; font-size: 1.5rem; color: var(--navy); }
.contractor-portal .page-intro { margin: 0 0 16px; }
.fb-back { display: inline-block; margin-bottom: 12px; font-size: 14px; }
.fb-report-cell { overflow-wrap: anywhere; }
.fb-report-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.fb-report-head .detail-note { display: inline; }
.fb-report-label { margin: 12px 0 2px; font-size: 12px; font-weight: 600; color: var(--navy-mid); }
.fb-report-reason { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--teal); background: var(--bg); white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-report-title { margin: 0 0 8px; font-size: 18px; color: var(--navy); overflow-wrap: anywhere; }
.fb-report-words { margin: 0; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-pictures { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fb-pictures img { display: block; width: 160px; max-width: 100%; height: auto; border: 1px solid var(--navy-tint); border-radius: 6px; }
.fb-timeline { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.fb-timeline-step { padding-left: 12px; border-left: 3px solid var(--navy-tint); }
.fb-timeline-step--team { border-left-color: var(--teal); }
.fb-timeline-step--mine { border-left-color: var(--gold); }
.fb-timeline-line { font-weight: 500; color: var(--navy); }
.fb-timeline-text { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-form, .fb-setting { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.fb-setting-row { display: flex; align-items: center; gap: 12px; color: var(--navy); }

/* =============================================
   Phase 1C — Sidebar submenu (Compliance engine nav)
   ============================================= */
.sidebar-link--parent {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  justify-content: flex-start;
}
.sidebar-link-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-chevron {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease;
}
.sidebar-link--parent[aria-expanded="true"] .sidebar-chevron {
  transform: rotate(90deg);
}

.sidebar-submenu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 4px 28px;
  margin: 2px 0 4px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  margin-left: 20px;
}
.sidebar-submenu--open {
  display: flex;
}
.sidebar-sublink {
  display: block;
  padding: 7px 12px;
  border-radius: 4px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  transition: background 0.15s, color 0.15s;
}
.sidebar-sublink:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
}
.sidebar-sublink--active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

/* =============================================
   Phase 1C — Compliance engine components
   ============================================= */

/* Dashboard: responsive grid of the 12 stream cards (3×4 on desktop; S38 taxonomy) */
.compliance-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) {
  .compliance-dashboard { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .compliance-dashboard { grid-template-columns: 1fr; }
}

.compliance-stream-card {
  background: var(--white);
  border: 1px solid var(--navy-tint);
  border-radius: 8px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s, transform 0.15s;
}
.compliance-stream-card:hover {
  border-color: rgba(75, 151, 155, 0.5);
  transform: translateY(-1px);
}
.compliance-stream-card-links {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--navy-tint);
  font-size: 12px;
}
.compliance-stream-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.compliance-stream-card-title {
  font-family: 'Spectral', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}
.compliance-stream-card-meta {
  font-size: 12px;
  color: var(--navy-mid);
  margin: 2px 0 0;
}
.compliance-stream-card-body {
  display: flex;
  align-items: center;
  gap: 16px;
}
.compliance-stream-card-body .rag-donut {
  flex-shrink: 0;
}

/* Stream icons (3 sizes): sm default, lg for hero banners */
.stream-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stream-icon svg,
.stream-icon i {
  width: 20px;
  height: 20px;
}
.stream-icon--lg {
  width: 56px;
  height: 56px;
  border-radius: 10px;
}
.stream-icon--lg svg,
.stream-icon--lg i {
  width: 28px;
  height: 28px;
}

/* Per-stream stat row under the donut */
.compliance-stat-row {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}
.compliance-stat-row > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.compliance-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.compliance-stat-dot--green { background: var(--emerald-500); }
.compliance-stat-dot--amber { background: var(--amber-500); }
.compliance-stat-dot--red   { background: var(--red-500); }
.compliance-stat-label {
  color: var(--navy-mid);
  flex: 1;
}
.compliance-stat-value {
  font-weight: 600;
  color: var(--navy);
}

/* Evidence alert banner (red for expired, amber for expiring soon) */
.evidence-alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--navy);
  border: 1px solid;
}
.evidence-alert-banner--red {
  background: var(--red-50);
  border-color: #FECACA;
  color: var(--red-700);
}
.evidence-alert-banner--amber {
  background: var(--amber-50);
  border-color: #FDE68A;
  color: var(--amber-700);
}
.evidence-alert-banner svg {
  flex-shrink: 0;
}

/* =============================================
   Phase 1C.3 — L2 modules (Risk / COSHH / CDM / Accessibility)
   ============================================= */

/* 5×5 risk matrix — CSS grid, 6 cols (1 label col + 5 severity cols), 6 rows. */
.risk-matrix {
  display: grid;
  grid-template-columns: 44px repeat(5, 1fr);
  grid-auto-rows: 60px;
  gap: 4px;
  max-width: 640px;
}
.risk-matrix-corner {
  background: transparent;
}
.risk-matrix-axis-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-mid);
}
.risk-cell {
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--white);
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  padding: 4px;
}
.risk-cell:hover {
  transform: scale(1.04);
  box-shadow: 0 2px 8px rgba(11, 39, 80, 0.15);
}
.risk-cell--active {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}
.risk-cell-count {
  font-family: 'Spectral', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}
.risk-cell-score {
  font-size: 10px;
  opacity: 0.8;
  margin-top: 2px;
}
.risk-cell--green  { background: #059669; }
.risk-cell--amber  { background: #D97706; }
.risk-cell--orange { background: #EA580C; }
.risk-cell--red    { background: #DC2626; }

/* COSHH hazard symbols — small coloured tags for GHS pictogram codes */
.hazard-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--amber-50);
  color: var(--amber-700);
  border: 1px solid #FDE68A;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.hazard-symbol + .hazard-symbol {
  margin-left: 4px;
}
.hazard-symbol--lg {
  min-width: 56px;
  height: 32px;
  font-size: 12px;
  padding: 0 10px;
}

/* CDM project cards — used in cdm-list grid */
.cdm-project-card {
  background: var(--white);
  border: 1px solid var(--navy-tint);
  border-radius: 8px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, transform 0.15s;
}
.cdm-project-card:hover {
  border-color: rgba(75, 151, 155, 0.5);
  transform: translateY(-1px);
}
.cdm-project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.cdm-project-card-title {
  font-family: 'Spectral', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
  line-height: 1.3;
}
.cdm-project-card-meta {
  font-size: 12px;
  color: var(--navy-mid);
  margin: 0;
}
.cdm-project-card-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--navy-tint);
  margin-top: 4px;
}

/* =============================================
   Phase 1C.4 — Maturity Assessment + Roadmap
   ============================================= */

.maturity-scorecard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}
@media (max-width: 720px) {
  .maturity-scorecard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* B6 (5 Oct): the scorecard and the radar fit a phone (375px) — cells never wider than their column, one column on a phone */
@media (max-width: 480px) {
  .maturity-scorecard { grid-template-columns: minmax(0, 1fr); }
}
#maturityRadarChart { max-width: 100%; height: auto; }
.maturity-score-cell {
  background: var(--bg);
  border: 1px solid var(--navy-tint);
  border-radius: 6px;
  padding: 8px 10px;
}
.maturity-score-cell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}
.maturity-score-cell-label {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-mid);
}
.maturity-score-cell-input {
  width: 56px;
  padding: 2px 6px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  border: 1px solid var(--navy-tint);
  border-radius: 4px;
  text-align: right;
}
.maturity-score-cell-input:focus {
  outline: none;
  border-color: var(--teal);
}

/* Roadmap level cards */
.maturity-level-card {
  background: var(--white);
  border: 1px solid var(--navy-tint);
  border-radius: 8px;
  padding: 20px;
  transition: border-color 0.15s;
}
.maturity-level-card--current {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(75, 151, 155, 0.1);
}
.maturity-level-card--target {
  border-color: var(--gold-dark);
}
.maturity-level-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.maturity-level-number {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Spectral', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  flex-shrink: 0;
}
.maturity-level-card--current .maturity-level-number {
  background: var(--teal);
}
.maturity-level-card--target .maturity-level-number {
  background: var(--gold-dark);
}
.maturity-level-title {
  font-family: 'Spectral', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 4px;
}
.maturity-criteria-list {
  margin: 0;
  padding-left: 20px;
  color: var(--navy-mid);
  font-size: 13px;
  line-height: 1.6;
}
.maturity-criteria-list li {
  margin-bottom: 4px;
}

/* ================================================================
   Phase 1C.5 — Settings → Compliance & Modules tabs
   ================================================================ */

/* Compliance summary table (inside Settings → Compliance tab) */
.compliance-summary-table .td--category {
  display: flex;
  align-items: center;
  gap: 10px;
}
.compliance-summary-table .category-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Module grid for Settings → Modules tab */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.module-card {
  background: #fff;
  border: 1px solid var(--navy-tint);
  border-radius: 4px;
  padding: 20px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.module-card:hover {
  border-color: var(--teal);
}
.module-card--locked {
  opacity: 0.55;
}
.module-card--locked:hover {
  border-color: var(--navy-tint);
}
.module-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.module-card-name {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--navy);
  flex: 1;
}
.module-card-desc {
  font-size: 13px;
  color: var(--navy-mid);
  margin: 0;
  line-height: 1.5;
}

/* CSS-only toggle switch — used on module cards. Input is visually hidden
   but still accessible via keyboard (tab + space). */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--navy-tint);
  border-radius: 24px;
  transition: background 0.2s ease;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(11, 39, 80, 0.2);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--teal);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}
.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* ================================================================
   Phase 1C.5 — Chunk 2: category detail, bulk activate, custom edit
   ================================================================ */

/* Breadcrumb bar used on category detail + custom edit + bulk activate */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  row-gap: 8px;
  font-size: 13px;
  color: var(--navy-mid);
}
.breadcrumb-link {
  color: var(--teal);
  text-decoration: none;
}
.breadcrumb-link:hover {
  text-decoration: underline;
}
.breadcrumb-separator {
  color: var(--navy-mid);
  opacity: .5;
}
.breadcrumb-current {
  color: var(--navy);
  font-weight: 600;
}
/* Design review (16 Nov): on a phone the page title in the header already names where you are, so a breadcrumb keeps
   only the way back (the current crumb and the separator before it go). A breadcrumb with no link keeps its words. */
@media (max-width: 640px) {
  .breadcrumb:has(.breadcrumb-link) .breadcrumb-current,
  .breadcrumb:has(.breadcrumb-link) .breadcrumb-separator:has(+ .breadcrumb-current) { display: none; }
}

/* Expandable template detail panel (inside category detail table) */
.template-detail-row {
  display: none;
}
.template-detail-row.is-expanded {
  display: table-row;
}
.template-detail-panel {
  background: var(--bg);
  border-top: 1px solid var(--navy-tint);
  border-bottom: 1px solid var(--navy-tint);
}
.template-detail-inner {
  padding: 16px 20px;
  font-size: 13px;
  color: var(--navy-mid);
  line-height: 1.6;
}
.template-detail-inner dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
}
.template-detail-inner dt {
  grid-column: 1;                  /* always land in the label column */
  font-weight: 600;
  color: var(--navy);
  text-align: right;
  white-space: nowrap;
}
.template-detail-inner dd {
  grid-column: 2;                  /* always land in the value column */
  margin: 0;
  min-width: 0;                    /* allow long prose to wrap */
}

/* Overridden-frequency badge — amber border + amber text */
.badge--frequency-custom {
  background: #FFF7ED;
  color: #B45309;
  border: 1px solid #F59E0B;
}
.badge--teal {
  background: #E6F4F5;
  color: #0F5C5F;
  border: 1px solid #4B979B;
}

/* Custom template row indicator (subtle teal left border) */
.template-row--custom td.td--name {
  border-left: 3px solid var(--teal);
}

/* Accordion (bulk activate page) */
.accordion-section {
  border-bottom: 1px solid var(--navy-tint);
}
.accordion-section:last-child {
  border-bottom: none;
}
.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--navy);
  text-align: left;
}
.accordion-trigger:hover {
  background: var(--bg);
}
.accordion-trigger--locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.accordion-trigger--locked:hover {
  background: none;
}
.accordion-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: var(--navy-mid);
}
.accordion-section.is-open .accordion-chevron {
  transform: rotate(180deg);
}
.accordion-content {
  padding: 8px 20px 16px 44px;
  background: var(--bg);
}
.accordion-select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--navy-mid);
  cursor: pointer;
}
.bulk-template-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--navy-mid);
  cursor: pointer;
}
.bulk-template-row:hover {
  color: var(--navy);
}

/* Stream icon circle (re-used on category detail header) */
.stream-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Danger button variant (delete custom template) */
.btn-danger {
  background: var(--red-600, #DC2626);
  color: #fff;
  border-color: var(--red-600, #DC2626);
}
.btn-danger:hover {
  background: #B91C1C;
  border-color: #B91C1C;
}
.btn-outline.btn-danger {
  background: transparent;
  color: #DC2626;
  border-color: #DC2626;
}
.btn-outline.btn-danger:hover {
  background: #FEF2F2;
}

/* Maturity level change modal — radio card list */
.maturity-level-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 8px 0;
}
.maturity-level-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--navy-tint);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.maturity-level-option:hover {
  border-color: var(--teal);
  background: var(--bg);
}
.maturity-level-option input[type="radio"] {
  margin-top: 4px;
  flex-shrink: 0;
}
.maturity-level-option-body {
  flex: 1;
}
.maturity-level-option strong {
  color: var(--navy);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
}
.maturity-level-option.is-current {
  border-color: var(--teal);
  background: rgba(75, 151, 155, 0.05);
}
.maturity-level-desc {
  font-size: 12px;
  color: var(--navy-mid);
  margin-top: 4px;
  line-height: 1.4;
}

/* ================================================================
   Toast notifications — replaces native window.alert() across the app.
   Usage: window.showToast(message, type, duration)
     type: 'success' | 'error' | 'warning' | 'info' (default 'info')
     duration: ms before auto-dismiss (default 4000, errors 6000)
   ================================================================ */
.toast-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;           /* let clicks fall through the gap */
  max-width: calc(100vw - 48px);
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 16px;
  background: #fff;
  border-left: 4px solid var(--navy-mid);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(11, 39, 80, 0.15);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--navy);
  line-height: 1.5;
  pointer-events: auto;           /* toast itself is interactive */
  animation: toast-slide-in 0.25s ease-out;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-leaving {
  opacity: 0;
  transform: translateX(20px);
}
.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast-message {
  flex: 1;
  word-wrap: break-word;
}
.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--navy-mid);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}
.toast-close:hover {
  opacity: 1;
}
.toast--success {
  border-left-color: #059669;
}
.toast--success .toast-icon {
  color: #059669;
}
.toast--error {
  border-left-color: #DC2626;
}
.toast--error .toast-icon {
  color: #DC2626;
}
.toast--warning {
  border-left-color: #F59E0B;
}
.toast--warning .toast-icon {
  color: #B45309;
}
.toast--info {
  border-left-color: var(--teal);
}
.toast--info .toast-icon {
  color: var(--teal);
}
@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@media (max-width: 640px) {
  .toast-stack {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: calc(100vw - 24px);
  }
  .toast {
    min-width: 0;
    max-width: none;
  }
}

/* Styled confirmation modal — dynamically injected by window.showConfirm().
   Reuses .team-confirm-overlay / .team-confirm for positioning + card shell. */
.confirm-modal {
  max-width: 440px;
}
.confirm-modal h4 {
  margin: 0 0 10px 0;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}
.confirm-modal-message {
  margin: 0 0 18px 0;
  font-size: 14px;
  color: var(--navy-mid);
  line-height: 1.5;
  word-wrap: break-word;
}

/* ================================================================
   Settings page improvements (onboarding, tiers, activity,
   per-site breakdown)
   ================================================================ */

/* Onboarding checklist card */
.onboarding-card {
  background: linear-gradient(135deg, #F5FBFC 0%, #F9FEFE 100%);
  border: 1px solid #B6E1E3;
  margin-bottom: 24px;
}
.onboarding-progress-text {
  font-size: 13px;
  color: var(--navy-mid);
  font-weight: 500;
}
.onboarding-progress-bar {
  height: 6px;
  background: #E6F4F5;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 20px;
}
.onboarding-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #5EB8BC);
  transition: width 0.35s ease;
}
.onboarding-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.onboarding-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--navy-tint);
  border-radius: 6px;
  transition: border-color 0.15s ease;
}
.onboarding-step:hover {
  border-color: var(--teal);
}
.onboarding-step--done {
  opacity: 0.7;
  background: #F5FDFB;
  border-color: #B6E1E3;
}
.onboarding-step--done strong {
  text-decoration: line-through;
  color: var(--navy-mid);
}
.onboarding-step-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #E6F4F5;
  color: var(--teal);
  flex-shrink: 0;
  font-weight: 600;
}
.onboarding-step--done .onboarding-step-check {
  background: #059669;
  color: #fff;
}
.onboarding-step-number {
  font-size: 13px;
  font-family: 'Outfit', system-ui, sans-serif;
}
.onboarding-step-body {
  flex: 1;
  min-width: 0;
}
.onboarding-step-body strong {
  display: block;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 2px;
}
.onboarding-step-body p {
  margin: 0;
  font-size: 12px;
  color: var(--navy-mid);
  line-height: 1.4;
}

/* Recent activity feed */
.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}
.activity-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--navy-tint);
}
.activity-feed-item:last-child {
  border-bottom: none;
}
.activity-feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
  margin-top: 6px;
}
.activity-feed-body {
  flex: 1;
  min-width: 0;
}
.activity-feed-action {
  font-size: 13px;
  color: var(--navy);
  line-height: 1.5;
}
.activity-feed-action strong {
  color: var(--navy);
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 600;
}
.activity-feed-action span {
  color: var(--navy-mid);
}
.activity-feed-entity {
  display: inline-block;
  padding: 1px 6px;
  background: var(--bg);
  color: var(--navy-mid);
  border-radius: 3px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  margin-left: 4px;
}
.activity-feed-when {
  font-size: 11px;
  color: var(--navy-mid);
  margin-top: 2px;
}

/* Module tier sections */
.module-tier {
  margin-bottom: 28px;
}
.module-tier:last-child {
  margin-bottom: 0;
}
.module-tier-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--navy-tint);
}
.module-tier-title {
  margin: 0 0 4px 0;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
.module-tier-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--teal);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}
.module-tier-desc {
  margin: 0;
  font-size: 12px;
  color: var(--navy-mid);
  line-height: 1.4;
}

/* Per-site coverage mini bar chart (inside compliance summary table) */
.per-site-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
  min-width: 60px;
}
.per-site-bar {
  display: inline-block;
  width: 8px;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--navy-tint);
}
.per-site-bar--empty {
  background: #E5E7EB;
}
.per-site-bar--low {
  background: #F59E0B;
}
.per-site-bar--mid {
  background: #FBBF24;
}
.per-site-bar--full {
  background: #059669;
}

/* ============================================================
   Phase 1D — Governance & People
   ============================================================ */

/* Guidance card grid — wraps the guidance/*.php cards. */
.guidance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.guidance-grid .card { transition: transform 0.15s, box-shadow 0.15s; }
.guidance-grid .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 39, 80, 0.08);
}

/* Guidance document rendered content — style the trusted HTML in
   contextual_guidance_docs.content (headings, lists, paragraphs). */
.guidance-content h3 {
  font-family: 'Spectral', Georgia, serif;
  font-size: 20px;
  color: var(--navy);
  margin: 20px 0 10px;
}
.guidance-content h4 {
  font-family: 'Spectral', Georgia, serif;
  font-size: 16px;
  color: var(--navy);
  margin: 16px 0 8px;
}
.guidance-content p  { margin: 0 0 12px; line-height: 1.6; color: var(--navy-dark); }
.guidance-content ul, .guidance-content ol { margin: 0 0 16px 24px; line-height: 1.7; }
.guidance-content li { margin-bottom: 4px; }
.guidance-content a  { color: var(--teal); }
.guidance-content a:hover { text-decoration: underline; }

/* Ack-donut canvas sizing helper — the policy-detail view sets width/height
   as attributes but we want it centred in its column. */
canvas.governance-ack-donut {
  display: block;
  margin: 8px 0;
}

/* Training detail drawer — two-column dl laid out like "label: value". */
.training-detail-list {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 6px 12px;
  margin: 0;
}
.training-detail-list dt { margin: 0; color: var(--navy-mid); font-size: 12px; font-weight: 500; }
.training-detail-list dd { margin: 0; color: var(--navy-dark); font-size: 14px; }

/* Drawers hosting long forms (training, continuity, incidents) need a bit
   more width than the default .team-panel (440px) — override here. Still
   capped by max-width:100vw for mobile. */
[data-drawer-panel="policyAdd"],
[data-drawer-panel="policyEdit"],
[data-drawer-panel="policyVersionUpload"],
[data-drawer-panel="documentUpload"],
[data-drawer-panel="documentEdit"],
[data-drawer-panel="continuityAdd"],
[data-drawer-panel="continuityEdit"],
[data-drawer-panel="continuityTest"],
[data-drawer-panel="trainingAdd"],
[data-drawer-panel="trainingEdit"],
[data-drawer-panel="trainingDetail"],
[data-drawer-panel="incidentReport"],
[data-drawer-panel="incidentEvidenceUpload"],
[data-drawer-panel="governanceRoleAdd"],
[data-drawer-panel="governanceRoleEdit"],
[data-drawer-panel="governanceRoleAppoint"],
[data-drawer-panel="governanceInstanceReview"],
[data-drawer-panel="climateAdd"],
[data-drawer-panel="climateEdit"],
[data-drawer-panel="climateProgress"] {
  width: 520px;
  max-width: 100vw;
}

/* ==========================================================================
   Phase 2A — Analytics & Reporting
   ========================================================================== */

/* KPI Cards */
.kpi-card {
  background: #fff;
  border: 1px solid var(--navy-tint);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kpi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kpi-unit-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy-mid);
  font-family: 'Outfit', sans-serif;
}
.kpi-card-body {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.kpi-value {
  font-family: 'Spectral', serif;
  font-size: 36px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
}
.kpi-unit {
  font-size: 14px;
  color: var(--navy-mid);
}
.kpi-change {
  font-size: 12px;
  font-weight: 500;
}
.kpi-change--positive { color: #059669; }
.kpi-change--negative { color: #DC2626; }
.kpi-trend { margin-top: auto; }
.kpi-trend canvas { width: 100% !important; height: 40px !important; }

/* Competency Matrix */
.competency-table td.competency-cell {
  font-weight: 600;
  font-size: 13px;
  transition: background-color 0.2s;
}
.competency-cell--l1 { background: var(--navy-tint); color: var(--navy); }
.competency-cell--l2 { background: var(--teal); color: #fff; }
.competency-cell--l3 { background: var(--gold); color: #fff; }
.competency-cell--l4 { background: var(--navy); color: #fff; }
.competency-cell--gap { box-shadow: inset 3px 0 0 #D97706; }
.competency-legend {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.competency-legend--l1 { background: var(--navy-tint); color: var(--navy); }
.competency-legend--l2 { background: var(--teal); color: #fff; }
.competency-legend--l3 { background: var(--gold); color: #fff; }
.competency-legend--l4 { background: var(--navy); color: #fff; }

/* Gap Priority Badges */
.gap-priority {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.gap-priority--critical { background: #FEE2E2; color: #DC2626; }
.gap-priority--high     { background: #FEF3C7; color: #D97706; }
.gap-priority--medium   { background: #DBEAFE; color: #2563EB; }
.gap-priority--low      { background: #F3F4F6; color: #6B7280; }

/* Meter Status */
.meter-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.meter-status--active   { background: #D1FAE5; color: #059669; }
.meter-status--inactive { background: #F3F4F6; color: #6B7280; }

/* Energy Chart Container */
.energy-chart-container {
  position: relative;
  width: 100%;
  height: 360px;
}
/* Let Chart.js manage the canvas dimensions so it honours devicePixelRatio.
   Forcing width/height via CSS causes the browser to upscale the rasterised
   backing store, producing blurry text and stretched bars. The view passes
   maintainAspectRatio:false to Chart.js so it fills the container height. */

/* Report Template Badge */
.report-template-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--teal);
  color: #fff;
  margin-left: 6px;
  vertical-align: middle;
}

/* Board Pack Sections */
.board-pack-section { margin-bottom: 0; }

/* Filter inline */
.filter-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Detail labels */
.detail-label {
  display: block;
  font-size: 12px;
  color: var(--navy-mid);
  margin-bottom: 2px;
}
.detail-value {
  display: block;
  font-weight: 500;
  color: var(--navy);
}

/* Modal dialog (for competency) */
.modal-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  z-index: 1001;
  width: 400px;
  max-width: 90vw;
  max-height: calc(100vh - 24px);   /* as .team-confirm */
  overflow-y: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--navy-tint);
}
.modal-header h3 {
  font-family: 'Spectral', serif;
  font-size: 18px;
  color: var(--navy);
  margin: 0;
}
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--navy-mid);
  line-height: 1;
}
.modal-body { padding: 20px; }

/* RAG text colours */
.text-green { color: #059669; font-weight: 500; }
.text-amber { color: #D97706; font-weight: 500; }
.text-red   { color: #DC2626; font-weight: 500; }

/* Responsive: KPI grid */
@media (max-width: 768px) {
  .kpi-value { font-size: 28px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* =============================================
   Phase 2B — Flash alert banners
   ============================================= */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.4;
}
.alert--success {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}
.alert--error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* =============================================
   Phase 2B — Helpdesk Kanban Board
   ============================================= */
.helpdesk-kanban {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  min-height: 500px;
}
.kanban-column {
  background: var(--bg, #F5F7FA);
  border-radius: 8px;
  border-top: 4px solid #6B7280;
  display: flex;
  flex-direction: column;
  min-height: 400px;
}
.kanban-column__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px 8px;
}
.kanban-column__title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy);
}
.kanban-column__count {
  background: rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
}
.kanban-column__body {
  flex: 1;
  padding: 0 8px 8px;
  overflow-y: auto;
}
.kanban-card {
  background: #fff;
  border-radius: 6px;
  border-left: 3px solid #6B7280;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: grab;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: box-shadow 0.15s, transform 0.15s;
  position: relative;
}
.kanban-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.kanban-card.sortable-ghost {
  opacity: 0.4;
}
.kanban-card.sortable-drag {
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  transform: rotate(1deg);
}
.kanban-card__ref {
  font-size: 0.7rem;
  color: #6B7280;
  font-weight: 600;
}
.kanban-card__title {
  font-size: 0.85rem;
  font-weight: 500;
  margin: 2px 0 6px;
  color: var(--navy);
}
.kanban-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kanban-card__assignee {
  margin-top: 4px;
}
.kanban-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-indent: -9999px;
}

/* Priority badges */
.card-priority {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}
.card-priority--urgent { background: #FEE2E2; color: #DC2626; border-left-color: #DC2626; }
.card-priority--high   { background: #FEF3C7; color: #D97706; border-left-color: #D97706; }
.card-priority--medium { background: #E0F2F1; color: #4B979B; border-left-color: #4B979B; }
.card-priority--low    { background: #F3F4F6; color: #6B7280; border-left-color: #6B7280; }

/* Kanban card priority borders */
.kanban-card:has(.card-priority--urgent) { border-left-color: #DC2626; }
.kanban-card:has(.card-priority--high)   { border-left-color: #D97706; }
.kanban-card:has(.card-priority--medium) { border-left-color: #4B979B; }
.kanban-card:has(.card-priority--low)    { border-left-color: #6B7280; }

/* SLA badges */
.sla-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}
.sla-badge--on-track { background: #D1FAE5; color: #059669; }
.sla-badge--breached { background: #FEE2E2; color: #DC2626; }
/* A record with no target, and a clock still running, read apart from "Met". */
.sla-badge--none { background: transparent; color: var(--navy-mid, #6B7280); font-weight: 500; }
.sla-badge--running { background: #E0ECF8; color: #1E4E8C; }

/* Progress bar */
.progress-bar {
  background: #E5E7EB;
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
  display: inline-block;
  width: 100%;
}
.progress-bar__fill {
  background: var(--teal, #4B979B);
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Responsive Kanban */
@media (max-width: 1100px) {
  .helpdesk-kanban { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .helpdesk-kanban { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .helpdesk-kanban { grid-template-columns: 1fr; }
  .kanban-column { min-height: 200px; }
}

/* =============================================
   Phase 2B — Contractor Portal
   ============================================= */
body.contractor-portal {
  background: #F5F7FA;
  min-height: 100vh;
}
.portal-header {
  background: var(--navy, #0B2750);
  color: #fff;
  padding: 0 24px;
}
.portal-header__content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}
.portal-header__logo a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}
.portal-header__badge {
  background: var(--teal, #4B979B);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 8px;
  font-weight: 600;
  vertical-align: middle;
}
.portal-header__user {
  display: flex;
  align-items: center;
  gap: 16px;
}
.portal-header__name {
  color: rgba(255,255,255,.8);
  font-size: 0.9rem;
}
.portal-header__nav {
  display: flex;
  gap: 4px;
}
.portal-nav-link {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 4px;
  transition: background 0.15s;
}
.portal-nav-link:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.portal-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* RB-D2 (21 Nov 2026): the notifications bell in the Staff Portal header (white on the organisation's colour). */
.portal-header .notification-bell { color: rgba(255,255,255,.85); }
.portal-header .notification-bell:hover { color: #fff; }
.portal-header .notification-dropdown { color: var(--navy); text-align: left; }
@media (max-width: 480px) {
  .portal-header .notification-dropdown { position: fixed; top: 96px; left: 16px; right: 16px; width: auto; }
}

@media (max-width: 768px) {
  .portal-header__content {
    flex-direction: column;
    height: auto;
    padding: 12px 0;
    gap: 8px;
  }
  .portal-header__user {
    flex-wrap: wrap;
    justify-content: center;
  }
  .portal-header__nav { flex-wrap: wrap; justify-content: center; }
}

/* =============================================
   Phase 2B — Signature Pad
   ============================================= */
.signature-canvas {
  border: 1px solid #ddd;
  border-radius: 4px;
  display: block;
  width: 100%;
  height: 200px;
  touch-action: none;
  cursor: crosshair;
  background: #fff;
}
.signature-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

/* =============================================
   Phase 2B — Drop Zone (File Upload)
   ============================================= */
.drop-zone {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.drop-zone:hover,
.drop-zone--active {
  border-color: var(--teal, #4B979B);
  background: rgba(75, 151, 155, 0.04);
}

/* =============================================
   Phase 2B — Blue badge (assigned/submitted)
   ============================================= */
.badge--blue {
  background: #DBEAFE;
  color: #2563EB;
}

/* =============================================
   Phase 2C — Strategic & Portfolio
   ============================================= */

/* Project Lifecycle Progress */
.lifecycle-progress {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
}
.lifecycle-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.lifecycle-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border, #e5e7eb);
}
.lifecycle-step.completed:not(:last-child)::after { background: var(--green-500, #22c55e); }
.lifecycle-step.current:not(:last-child)::after { background: linear-gradient(to right, var(--teal, #4B979B), var(--border, #e5e7eb)); }
.lifecycle-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border, #e5e7eb);
  position: relative;
  z-index: 1;
  border: 2px solid #fff;
}
.lifecycle-step.completed .lifecycle-dot { background: var(--green-500, #22c55e); }
.lifecycle-step.current .lifecycle-dot { background: var(--teal, #4B979B); box-shadow: 0 0 0 3px rgba(75,151,155,.25); }
.lifecycle-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 6px;
  text-transform: capitalize;
}
.lifecycle-step.current .lifecycle-label { color: var(--teal, #4B979B); font-weight: 600; }
.lifecycle-step.completed .lifecycle-label { color: var(--green-500, #22c55e); }

/* Project Timeline / Gantt */
.project-timeline-container { padding: 8px 0; }
.project-timeline-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.project-timeline-row:last-child { border-bottom: none; }
.project-timeline-label { width: 200px; flex-shrink: 0; }
.project-timeline-track {
  flex: 1;
  height: 24px;
  background: var(--bg-muted, #f9fafb);
  border-radius: 4px;
  position: relative;
  overflow: visible;
}
.project-timeline-bar {
  position: absolute;
  top: 4px;
  height: 16px;
}
.project-timeline-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold, #F59E0B);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.project-timeline-bar--achieved .project-timeline-marker { background: var(--green-500, #22c55e); }
.project-timeline-bar--pending .project-timeline-marker { background: var(--gold, #F59E0B); }
.project-timeline-bar--at_risk .project-timeline-marker { background: var(--gold, #F59E0B); }
.project-timeline-bar--missed .project-timeline-marker { background: var(--red-500, #ef4444); }
.project-timeline-marker--actual { background: var(--teal, #4B979B); }
.project-timeline-status { width: 100px; flex-shrink: 0; text-align: right; }

/* Badge status variants for project stages */
.badge-status-inception { background: #F3F4F6; color: #6B7280; }
.badge-status-feasibility { background: #DBEAFE; color: #2563EB; }
.badge-status-design { background: #EDE9FE; color: #7C3AED; }
.badge-status-tender { background: #FEF3C7; color: #D97706; }
.badge-status-construction { background: #FEE2E2; color: #DC2626; }
.badge-status-handover { background: #D1FAE5; color: #059669; }
.badge-status-closed { background: #E5E7EB; color: #4B5563; }
.badge-status-achieved { background: #D1FAE5; color: #059669; }
.badge-status-at_risk { background: #FEF3C7; color: #D97706; }
.badge-status-missed { background: #FEE2E2; color: #DC2626; }
.badge-status-pending { background: #F3F4F6; color: #6B7280; }
.badge-status-open { background: #FEF3C7; color: #D97706; }
.badge-status-mitigated { background: #DBEAFE; color: #2563EB; }

/* RAG dot (inline circle) */
.rag-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.rag-green { background: var(--green-500, #22c55e); }
.rag-amber { background: var(--gold, #F59E0B); }
.rag-red   { background: var(--red-500, #ef4444); }

/* Budget */
.budget-chart-container { position: relative; height: 300px; }
.variance-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}
.variance-badge--favourable { background: #D1FAE5; color: #059669; }
.variance-badge--adverse { background: #FEE2E2; color: #DC2626; }
.variance-badge--neutral { background: #F3F4F6; color: #6B7280; }
.approval-status-badge { text-transform: capitalize; }
.badge-status-draft { background: #F3F4F6; color: #6B7280; }
.badge-status-submitted { background: #DBEAFE; color: #2563EB; }
.badge-status-approved { background: #D1FAE5; color: #059669; }
.badge-status-rejected { background: #FEE2E2; color: #DC2626; }
.badge-status-revised { background: #FEF3C7; color: #D97706; }

/* Portfolio RAG Heatmap */
.portfolio-rag-heatmap {
  display: grid;
  gap: 2px;
  font-size: 0.75rem;
}
.portfolio-rag-heatmap th,
.portfolio-rag-heatmap td {
  padding: 6px 8px;
  text-align: center;
  min-width: 60px;
}
.portfolio-rag-heatmap td.rag-cell-green { background: #D1FAE5; color: #059669; }
.portfolio-rag-heatmap td.rag-cell-amber { background: #FEF3C7; color: #D97706; }
.portfolio-rag-heatmap td.rag-cell-red   { background: #FEE2E2; color: #DC2626; }
.portfolio-rag-heatmap td.rag-cell-grey  { background: #F3F4F6; color: #9CA3AF; }
.condition-grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
}
.condition-grade-badge--A { background: #D1FAE5; color: #059669; }
.condition-grade-badge--B { background: #DBEAFE; color: #2563EB; }
.condition-grade-badge--C { background: #FEF3C7; color: #D97706; }
.condition-grade-badge--D { background: #FEE2E2; color: #DC2626; }
.condition-grade-badge--F { background: #FCA5A5; color: #991B1B; }
/* COND B1: the X supplementary flag — full replacement required (B/C only) */
.condition-grade-badge--X { background: #EDE9FE; color: #6D28D9; }

/* Climate Action */
.climate-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border, #e5e7eb);
  border-radius: 4px;
  overflow: hidden;
}
.climate-progress-bar__fill {
  height: 100%;
  background: var(--teal, #4B979B);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.climate-kpi-card {
  text-align: center;
  padding: 20px;
}
.climate-kpi-card__value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--teal, #4B979B);
}
.badge-status-planned { background: #F3F4F6; color: #6B7280; }
.badge-status-in_progress { background: #DBEAFE; color: #2563EB; }
.badge-status-completed { background: #D1FAE5; color: #059669; }
.badge-status-on_hold { background: #FEF3C7; color: #D97706; }
.badge-status-cancelled { background: #E5E7EB; color: #4B5563; }

/* Onboarding Wizard */
.onboarding-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 32px 0;
}
.onboarding-step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  max-width: 120px;
}
.onboarding-step-indicator:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border, #e5e7eb);
}
.onboarding-step-indicator.completed:not(:last-child)::after { background: var(--green-500, #22c55e); }
.onboarding-step-indicator.current:not(:last-child)::after { background: linear-gradient(to right, var(--teal), var(--border)); }
.onboarding-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
  background: var(--border, #e5e7eb);
  color: var(--text-secondary);
}
.onboarding-step-indicator.completed .onboarding-step-dot { background: var(--green-500, #22c55e); color: #fff; }
.onboarding-step-indicator.current .onboarding-step-dot { background: var(--teal, #4B979B); color: #fff; box-shadow: 0 0 0 4px rgba(75,151,155,.2); }
.onboarding-step-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 8px;
  text-align: center;
  line-height: 1.2;
}
.onboarding-step-indicator.current .onboarding-step-label { color: var(--teal); font-weight: 600; }

/* ============================================================
   Phase 3 — AI Intelligence Layer
   ============================================================ */

/* AI badge — "AI Generated" label */
.ai-badge {
  display: inline-block;
  background: var(--teal, #4B979B);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Token usage bar (settings) */
.ai-usage-bar {
  height: 8px;
  background: var(--navy-tint, #E8ECF0);
  border-radius: 4px;
  overflow: hidden;
}
.ai-usage-bar__fill {
  height: 100%;
  background: var(--teal, #4B979B);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.ai-usage-bar__fill--warning { background: var(--gold, #C58D0D); }

/* AI narrative overlay/panel — follows existing drawer pattern */
.ai-narrative-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 39, 80, 0.45);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.ai-narrative-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.ai-narrative-panel {
  position: fixed;
  top: 0;
  right: -520px;
  width: 520px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  z-index: 901;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease;
}
.ai-narrative-panel.is-open { right: 0; }

.ai-narrative-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--navy-tint, #E8ECF0);
}
.ai-narrative-panel__header h3 { margin: 0; font-size: 1rem; font-weight: 600; }

.ai-narrative-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-narrative-textarea {
  width: 100%;
  min-height: 280px;
  padding: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  line-height: 1.65;
  border: 1px solid var(--navy-tint, #E8ECF0);
  border-radius: 6px;
  resize: vertical;
  color: var(--navy, #0B2750);
}
.ai-narrative-textarea:focus {
  outline: none;
  border-color: var(--teal, #4B979B);
  box-shadow: 0 0 0 3px rgba(75, 151, 155, 0.15);
}
.ai-narrative-textarea[readonly] {
  background: var(--bg, #F5F7FA);
  cursor: default;
}

.ai-narrative-panel__footer {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--navy-tint, #E8ECF0);
}

.ai-narrative-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--navy-mid, #405268);
}

/* Loading spinner for AI generate button */
.btn--ai-loading {
  pointer-events: none;
  opacity: 0.7;
}
.btn--ai-loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: ai-spin 0.6s linear infinite;
  vertical-align: middle;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }

/* AI Chat drawer */
.ai-chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 39, 80, 0.35);
  z-index: 950;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.ai-chat-overlay.is-open { opacity: 1; pointer-events: auto; }

.ai-chat-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  max-width: 92vw;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  z-index: 951;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease;
}
.ai-chat-drawer.is-open { right: 0; }

.ai-chat-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--navy-tint, #E8ECF0);
  flex-shrink: 0;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg, #F5F7FA);
}
.ai-chat-welcome {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Message bubbles */
.ai-chat-msg { display: flex; }
.ai-chat-msg--user { justify-content: flex-end; }
.ai-chat-msg--assistant { justify-content: flex-start; }

.ai-chat-msg__bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
}
.ai-chat-msg--user .ai-chat-msg__bubble {
  background: var(--teal, #4B979B);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-chat-msg--assistant .ai-chat-msg__bubble {
  background: #fff;
  color: var(--navy, #0B2750);
  border: 1px solid var(--navy-tint, #E8ECF0);
  border-bottom-left-radius: 4px;
}
.ai-chat-msg__text { white-space: pre-wrap; word-wrap: break-word; }
.ai-chat-msg__time {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 4px;
}
.ai-chat-msg--user .ai-chat-msg__time { text-align: right; }

/* Chat input area */
.ai-chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--navy-tint, #E8ECF0);
  background: #fff;
}
.ai-chat-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.ai-chat-textarea {
  flex: 1;
  resize: none;
  min-height: 40px;
  max-height: 120px;
  padding: 10px 12px;
  line-height: 1.4;
  border-radius: 8px;
}
.ai-chat-send-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

/* AI thinking indicator */
.ai-chat-thinking {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--navy-tint, #E8ECF0);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  max-width: 75%;
}
.ai-chat-thinking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--navy-mid, #405268);
  animation: ai-chat-bounce 1.4s ease-in-out infinite;
}
.ai-chat-thinking-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-chat-thinking-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai-chat-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Chat history panel */
.ai-chat-history {
  border-bottom: 1px solid var(--navy-tint, #E8ECF0);
  max-height: 240px;
  overflow-y: auto;
  flex-shrink: 0;
}
.ai-chat-history__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--navy, #0B2750);
  border-bottom: 1px solid var(--navy-tint, #E8ECF0);
  transition: background 0.1s;
}
.ai-chat-history__item:hover { background: var(--bg, #F5F7FA); }
.ai-chat-history__item.is-active { background: rgba(75,151,155,0.08); font-weight: 600; }
.ai-chat-history__title { flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ai-chat-history__date { font-size:11px; color:var(--navy-mid); flex-shrink:0; }

/* Suggestion chips */
.ai-chat-suggestion {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 16px;
}

/* ── AI Chat markdown styling ────────────── */
.ai-chat-msg__text h3.ai-md-h3     { font-size: 14px; font-weight: 700; margin: 8px 0 4px; color: var(--navy); }
.ai-chat-msg__text h4.ai-md-h4     { font-size: 13px; font-weight: 600; margin: 6px 0 3px; color: var(--navy); }
.ai-chat-msg__text ul.ai-md-list   { margin: 4px 0; padding-left: 18px; list-style: disc; }
.ai-chat-msg__text ul.ai-md-list li{ font-size: 13px; line-height: 1.5; margin-bottom: 2px; }
.ai-chat-msg__text strong           { font-weight: 600; }
.ai-chat-msg__text em               { font-style: italic; }
.ai-chat-msg__text p                { margin: 0 0 6px; }
.ai-chat-msg__text p:last-child     { margin-bottom: 0; }

.ai-chat-msg__text .ai-code-block  {
  background: var(--navy-lightest, #f5f6f8);
  border: 1px solid var(--navy-tint);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 6px 0;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.4;
  overflow-x: auto;
  white-space: pre-wrap;
}
.ai-chat-msg__text .ai-code-inline {
  background: var(--navy-lightest, #f0f1f3);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

.ai-chat-msg__text table           { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 12px; }
.ai-chat-msg__text th,
.ai-chat-msg__text td              { padding: 4px 8px; border: 1px solid var(--navy-tint); text-align: left; }
.ai-chat-msg__text th              { background: var(--navy-lightest, #f5f6f8); font-weight: 600; }

/* Copy button */
.ai-chat-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.4;
  transition: opacity 0.15s;
  color: var(--navy-mid);
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
}
.ai-chat-copy-btn:hover { opacity: 1; }

/* Token count label */
.ai-chat-tokens {
  display: block;
  font-size: 10px;
  color: var(--navy-mid);
  opacity: 0.5;
  margin-top: 2px;
}

/* Rate limit warning */
.ai-rate-limit-warning {
  background: #FEF3CD;
  color: #856404;
  font-size: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid #F0D77B;
  flex-shrink: 0;
  text-align: center;
}

/* Feature showcase card hover */
.ai-feature-card { transition: box-shadow 0.15s, border-color 0.15s; }
.ai-feature-card:hover {
  border-color: var(--teal, #4B979B);
  box-shadow: 0 2px 8px rgba(75, 151, 155, 0.15);
}

/* =========================================
   Phase 4 — Annual Returns, WLC, Booking, Inventory, Resilience
   ========================================= */

/* Completeness bar (annual returns, reusable) */
.completeness-bar {
  height: 1.25rem; border-radius: 0.25rem; background-color: var(--navy-tint, #E8ECF2);
  overflow: hidden; position: relative;
}
.completeness-fill {
  height: 100%; background-color: #10b981; transition: width 0.3s ease;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 600; font-size: 0.625rem; min-width: 0;
}

/* Gap report row colouring */
.gap-row--provided { background-color: rgba(16, 185, 129, 0.06); }
.gap-row--incomplete { background-color: rgba(245, 158, 11, 0.06); }
.gap-row--missing { background-color: rgba(239, 68, 68, 0.06); }

/* Badge variants (additions for Phase 4) */
.badge--blue { background-color: #c7d2fe; color: #3730a3; }
.badge--grey { background-color: #e5e7eb; color: #374151; }

/* WLC chart container */
.wlc-chart-container {
  position: relative; width: 100%; height: 400px;
}

/* Grid helpers */
.grid-3-mobile { grid-template-columns: repeat(3, 1fr); }
.grid-4-mobile { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
  .grid-3-mobile { grid-template-columns: 1fr; }
  .grid-4-mobile { grid-template-columns: repeat(2, 1fr); }
}

/* Room booking chip */
.booking-chip {
  background-color: #dbeafe; border-left: 3px solid #3b82f6;
  padding: 0.25rem 0.5rem; border-radius: 0.25rem; margin-bottom: 0.25rem;
  font-size: 0.75rem; text-align: left;
}
.booking-add-btn {
  background: none; border: 1px dashed #d1d5db; border-radius: 0.25rem;
  width: 100%; padding: 0.25rem; cursor: pointer; color: #9ca3af;
  font-size: 0.875rem; margin-top: 0.25rem; transition: all 0.15s;
}
.booking-add-btn:hover {
  border-color: var(--teal, #4B979B); color: var(--teal, #4B979B);
  background-color: rgba(75, 151, 155, 0.05);
}

/* Condition grade distribution (portfolio show page) */
.grade-distribution {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.grade-distribution__item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--navy-tint, #e5e7eb);
  border-radius: 6px;
  background: #fff;
}
.grade-distribution__meta { display: flex; flex-direction: column; line-height: 1.2; }
.grade-distribution__meta strong {
  font-family: 'Spectral', Georgia, serif;
  font-size: 1.25rem; color: var(--navy, #0B2750);
}
.grade-distribution__meta small { font-size: .75rem; }
@media (max-width: 640px) {
  .grade-distribution { grid-template-columns: repeat(2, 1fr); }
}

/* View toggle (Week / Month) */
.booking-view-toggle { display: inline-flex; gap: 4px; }

/* All-sites landing grid — tiles, one per site, with next 3 bookings */
.site-overview-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.site-overview-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px;
  border: 1px solid var(--navy-tint, #e5e7eb); border-radius: 10px;
  background: #fff; color: var(--navy, #0B2750);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .08s;
}
.site-overview-card:hover {
  border-color: var(--teal, #4B979B);
  box-shadow: 0 2px 10px rgba(11,39,80,.08);
  transform: translateY(-1px);
}
.site-overview-card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.site-overview-card__head h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.site-overview-card__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.site-overview-card__list li {
  display: flex; align-items: center; gap: 8px;
  font-size: .8125rem; line-height: 1.4;
  flex-wrap: wrap;
}
.site-overview-card__room { color: var(--navy-mid, #405268); font-weight: 500; }
.site-overview-card__purpose {
  color: var(--navy-mid, #405268);
  flex-basis: 100%; padding-left: 68px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.site-overview-card__empty {
  font-size: .8125rem; color: #9ca3af; font-style: italic;
  padding: 8px 0;
}
.site-overview-card__cta {
  margin-top: auto; padding-top: 8px;
  font-size: .8125rem; font-weight: 600; color: var(--teal, #4B979B);
  border-top: 1px solid var(--navy-tint, #e5e7eb);
}

/* Up Next — next booking per room */
.upnext-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.upnext-card {
  border: 1px solid var(--navy-tint, #e5e7eb); border-radius: 8px;
  padding: 10px 12px; background: #fff;
  display: flex; flex-direction: column; gap: 4px;
}
.upnext-card__room { font-size: .875rem; }
.upnext-card__when {
  display: flex; align-items: center; gap: 8px;
  font-size: .8125rem; margin-top: 2px;
}
.upnext-card__purpose {
  font-size: .8125rem; color: var(--navy, #0B2750);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.upnext-card__empty { font-size: .8125rem; color: #9ca3af; font-style: italic; }
.upnext-card--empty { background: #fafafa; }

/* Month calendar grid */
.month-cal { padding: 12px; }
.month-cal__weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; margin-bottom: 6px;
}
.month-cal__weekday {
  font-size: .75rem; font-weight: 600; text-align: center;
  color: var(--navy-mid, #405268); text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 0;
}
.month-cal__grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.month-cal__day {
  display: flex; flex-direction: column; gap: 2px;
  min-height: 96px; padding: 6px;
  border: 1px solid var(--navy-tint, #e5e7eb); border-radius: 6px;
  background: #fff; color: var(--navy, #0B2750);
  text-decoration: none; overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.month-cal__day:hover {
  border-color: var(--teal, #4B979B);
  box-shadow: 0 1px 4px rgba(11,39,80,.08);
}
.month-cal__day--muted { background: #fafafa; color: #9ca3af; }
.month-cal__day--today {
  border-color: var(--teal, #4B979B); border-width: 2px;
  background: rgba(75,151,155,0.04);
}
.month-cal__daynum { font-size: .8125rem; font-weight: 600; }
.month-cal__chip {
  background-color: #dbeafe; border-left: 3px solid #3b82f6;
  padding: 2px 5px; border-radius: 3px; font-size: .6875rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.month-cal__chip-time { font-weight: 600; margin-right: 4px; }
.month-cal__more { font-size: .6875rem; color: var(--navy-mid, #405268); font-style: italic; }

@media (max-width: 768px) {
  .month-cal__day { min-height: 70px; padding: 4px; }
  .month-cal__chip { display: none; }
  .month-cal__more { display: none; }
}

/* Alert variants */
.alert--green { background-color: #d1fae5; color: #065f46; padding: 0.75rem 1rem; border-radius: 0.375rem; margin-bottom: 1rem; }
.alert--amber { background-color: #fef3c7; color: #92400e; padding: 0.75rem 1rem; border-radius: 0.375rem; margin-bottom: 1rem; }

/* Tabs reuse (for resilience page, extends existing .tabs) */
.tab-btn {
  padding: 0.625rem 1.25rem; background: none; border: none; cursor: pointer;
  border-bottom: 3px solid transparent; font-size: 0.875rem;
  color: var(--navy-mid, #405268); transition: all 0.15s;
}
.tab-btn:hover { color: var(--navy, #0B2750); }
.tab-btn--active, .tab-btn.active {
  border-bottom-color: var(--navy, #0B2750); color: var(--navy, #0B2750); font-weight: 600;
}
/* The generic switcher (dashboard.js, .tab-btn + .tab-panel) toggles .active; without these the budget
   record drew all three panels at once and its tabs changed nothing (browser pass, 1 Oct). */
.tab-panel:not(.active) { display: none; }

/* ═══════════════════════════════════════════════════════════════
   AI Intelligence Layer — labels and guidance components
   (per AI Architecture Statement v1.0 §2.3, §7)
   ═══════════════════════════════════════════════════════════════ */

/* "AI-generated draft" label — used on every NLG surface */
.ai-generated-label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.ai-generated-label svg { flex-shrink: 0; }
.ai-generated-label--draft {
  background: #EEF4FA;
  color: #365785;
  border: 1px solid #C8D7E8;
}
.ai-generated-label--suggestion {
  background: #FEF7E6;
  color: #8F660B;
  border: 1px solid #F0D488;
}
.ai-generated-label--approved {
  background: #E6F4EA;
  color: #2A6B3B;
  border: 1px solid #A8D4B5;
  text-transform: none;
  letter-spacing: 0;
}
.ai-generated-label--approved strong { font-weight: 700; }

/* Contextual guidance panel — task detail embedded guidance */
.guidance-panel {
  background: linear-gradient(180deg, #F7FAFD 0%, #FFFFFF 100%);
  border: 1px solid #D5E1EE;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.guidance-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.guidance-panel__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy, #0B2750);
  margin: 0;
}
.guidance-panel__actions { display: flex; gap: 0.5rem; }
.guidance-panel__body {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--navy-mid, #405268);
  white-space: pre-wrap;
}
.guidance-panel__body p { margin: 0 0 0.75rem; }
.guidance-panel__body p:last-child { margin-bottom: 0; }
.guidance-panel--collapsed .guidance-panel__body { display: none; }
.guidance-panel__meta {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #E3EBF3;
  font-size: 0.75rem;
  color: #6B7F95;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.guidance-panel__regenerate {
  background: none;
  border: 1px solid #C8D7E8;
  color: #365785;
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
}
.guidance-panel__regenerate:hover {
  background: #EEF4FA;
  border-color: #A2BBD7;
}
.guidance-panel__regenerate:disabled { opacity: 0.5; cursor: wait; }

/* Benchmarking outlier / comparison badges */
.benchmark-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.benchmark-status--above  { background: #E6F4EA; color: #2A6B3B; }
.benchmark-status--within { background: #EEF4FA; color: #365785; }
.benchmark-status--below  { background: #FCE8E6; color: #B34242; }
.benchmark-status--outlier-high { background: #E6F4EA; color: #2A6B3B; font-weight: 700; }
.benchmark-status--outlier-low  { background: #FCE8E6; color: #B34242; font-weight: 700; }
/* An outlier badge names a site and its figure — sentence case, not the status badge's capitals (browser pass, 1 Oct). */
.benchmark-status--outlier-high, .benchmark-status--outlier-low { text-transform: none; letter-spacing: 0; }

/* =============================================
   Power Search — header pill + modal
   ============================================= */
.header-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 10px;
  margin-left: 16px;
  background: var(--white);
  border: 1px solid var(--navy-tint);
  border-radius: 8px;
  color: var(--navy-mid);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8125rem;
  /* Shrinks first when the header is tight (the title, the view switcher and the profile keep their room):
     at 220px fixed, the header outgrew a 1,340px window and every page scrolled sideways (browser pass, 1 Oct). */
  min-width: 40px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.header-search-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.header-search:hover   { border-color: var(--teal); }
.header-search:focus   { outline: 2px solid var(--teal); outline-offset: 2px; }
.header-search svg     { color: var(--navy-mid); flex-shrink: 0; }
.header-search-label   { flex: 1; text-align: left; opacity: 0.7; }
.header-search-kbd {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: var(--bg);
  border: 1px solid var(--navy-tint);
  border-radius: 4px;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  color: var(--navy-mid);
}
@media (max-width: 720px) {
  .header-search-label { display: none; }
  .header-search-kbd   { display: none; }
  .header-search       { min-width: auto; padding: 6px 8px; margin-left: 8px; }
}

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}
.search-modal[hidden] { display: none; }
.search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 39, 80, 0.55);
  backdrop-filter: blur(2px);
}
.search-modal-panel {
  position: relative;
  width: min(640px, calc(100% - 32px));
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(11, 39, 80, 0.30);
  overflow: hidden;
  animation: searchModalIn 0.15s ease-out;
}
@keyframes searchModalIn {
  from { transform: translateY(-8px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.search-modal-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--navy-tint);
}
.search-modal-icon { color: var(--navy-mid); flex-shrink: 0; }
.search-modal-input {
  flex: 1;
  border: 0;
  outline: 0;
  font-family: inherit;
  font-size: 1rem;
  color: var(--navy);
  background: transparent;
}
.search-modal-input::placeholder { color: var(--navy-mid); opacity: 0.6; }
.search-modal-close-kbd {
  padding: 2px 6px;
  background: var(--bg);
  border: 1px solid var(--navy-tint);
  border-radius: 4px;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  color: var(--navy-mid);
}
.search-modal-results {
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px 0;
}
.search-modal-hint {
  padding: 16px;
  text-align: center;
  color: var(--navy-mid);
  font-size: 0.8125rem;
  opacity: 0.7;
}
.search-group { padding: 4px 0; }
.search-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-mid);
  opacity: 0.7;
}
.search-group-count {
  background: var(--navy-tint);
  color: var(--navy-mid);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.625rem;
}
.search-result {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  color: var(--navy-mid);
  text-decoration: none;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.search-result:hover,
.search-result--active {
  background: var(--navy-tint);
  border-left-color: var(--teal);
}
.search-result-body { flex: 1; min-width: 0; }
.search-result-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-snippet {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--navy-mid);
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-arrow { color: var(--navy-mid); opacity: 0.4; flex-shrink: 0; }
.search-result mark {
  background: #FFF6D6;
  color: var(--navy);
  padding: 0 1px;
  border-radius: 2px;
}
.search-modal-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--navy-mid);
  font-size: 0.875rem;
}
.search-modal-empty-kbd {
  margin-top: 8px;
  font-size: 0.75rem;
  opacity: 0.7;
}
.search-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid var(--navy-tint);
  font-size: 0.6875rem;
  color: var(--navy-mid);
  opacity: 0.7;
}
.search-modal-footer kbd {
  padding: 1px 5px;
  background: var(--bg);
  border: 1px solid var(--navy-tint);
  border-radius: 3px;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  margin: 0 3px;
}

/* ── RA wizard dedup nudge (Stage 2A.6) ── */
.ra-wizard-similar {
  border: 1px solid var(--amber, #d97706);
  background: #fffbeb;
  border-radius: 8px;
  padding: 10px 12px;
}
.ra-wizard-similar-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy, #0b2750);
}
.ra-wizard-similar ul { margin: 0; padding-left: 18px; }
.ra-wizard-similar li { font-size: 13px; margin-bottom: 3px; }
.ra-wizard-similar a { color: var(--teal, #0d9488); text-decoration: none; }
.ra-wizard-similar a:hover { text-decoration: underline; }

/* ── Inspection template builder (Stage 2B-i.1) ── */
.insp-section-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.insp-section-head > input[type="text"] { flex: 1; min-width: 200px; }
.insp-item-list { display: flex; flex-direction: column; gap: 10px; }
.insp-item {
  border: 1px solid var(--navy-tint, #e2e8f0);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-2, #f8fafc);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.insp-item-head { display: flex; gap: 8px; align-items: center; }
.insp-item-head > input[type="text"] { flex: 1; }
.insp-item-controls { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.insp-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--navy-mid, #475569);
  font-weight: 500;
}
.insp-item-number .form-label,
.insp-item-choices .form-label { margin-bottom: 4px; }
.insp-item-guidance { font-size: 12px; }

/* ── Inspection conduct run-through (Stage 2B-i.2) ── */
.insp-run-item {
  border-bottom: 1px solid var(--navy-tint, #e2e8f0);
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.insp-run-item:last-child { border-bottom: 0; padding-bottom: 0; }
.insp-run-prompt { font-weight: 600; color: var(--navy, #0b2750); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.insp-run-input { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.insp-choice {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--navy-mid, #475569);
  cursor: pointer;
}

/* ── Staff Portal (Phase 1) ── */
.staff-portal { background: var(--bg, #F5F7FA); }
.portal-tile { transition: transform .08s ease, box-shadow .12s ease; }
.portal-tile:hover { transform: translateY(-2px); }
.portal-tile__icon {
  width: 40px; height: 40px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy-tint, #E8ECF2); color: var(--teal, #4B979B);
}
.portal-tile__icon svg { width: 22px; height: 22px; }
/* Report wizard */
.wizard-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 4px 0 14px; }
.wizard-step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  background: var(--navy-tint, #E8ECF2); color: var(--navy-mid, #405268);
}
.wizard-step-dot.is-active { background: var(--teal, #4B979B); color: #fff; }
.wizard-step-dot.is-done { background: var(--emerald-500, #10B981); color: #fff; }
.wizard-nav { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.input-error { border-color: var(--red-500, #EF4444) !important; }

/* Staff Portal header logout — transparent over the coloured header (fixes white-on-white) */
.portal-header .portal-logout {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.55);
}
.portal-header .portal-logout:hover { background: rgba(255,255,255,.15); color: #fff; }

/* Staff Portal repeatable groups (witnesses, etc.) */
.repeat-item {
  border: 1px solid var(--navy-tint, #E8ECF2);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-2, #f8fafc);
}
.repeat-item__head { display: flex; justify-content: space-between; align-items: center; }

/* ── Single Sign-On (login buttons + admin wizard) ───────────────── */
.sso-buttons { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.btn-sso {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; border: 1px solid var(--border, #d6dae1);
  color: var(--navy, #0B2750); font-weight: 500;
}
.btn-sso:hover { background: #f6f8fb; }
.sso-btn__icon { display: inline-flex; align-items: center; }
.sso-divider { display: flex; align-items: center; text-align: center; color: var(--navy-mid, #5b6b86); margin: 14px 0; font-size: 13px; }
.sso-divider::before, .sso-divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--border, #e6e8ec); }
.sso-divider span { padding: 0 12px; }

.checkbox-row { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; line-height: 1.5; color: var(--navy-mid, #5b6b86); }
.checkbox-row input { margin-top: 3px; flex: none; }

.sso-stepper { display: flex; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.sso-step {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1px solid var(--border, #e6e8ec); border-radius: 8px; background: #fff;
  color: var(--navy-mid, #5b6b86); text-decoration: none; font-size: 14px;
}
.sso-step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: #eef1f6;
  color: var(--navy-mid, #5b6b86); font-size: 12px; font-weight: 600;
}
.sso-step.is-active { border-color: var(--teal, #1F8A8A); color: var(--navy, #0B2750); font-weight: 600; }
.sso-step.is-active .sso-step__num { background: var(--teal, #1F8A8A); color: #fff; }
.sso-step.is-done .sso-step__num { background: var(--navy, #0B2750); color: #fff; }
.btn--disabled { opacity: .5; pointer-events: none; }
/* SW ST-234: a disabled button looks disabled (the helpdesk Close when time must be recorded first). */
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* ── CPACK coherence pass: core-first template lists ───────────────────────── */
.family-section-row td {
  background: var(--navy-tint, #EEF2F7);
  color: var(--navy, #0B2750);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 8px 16px;
}
.family-section-row--optional td { background: #FAF6EC; }
.template-step-row .td--name { padding-left: 34px; }
.step-indent { color: var(--navy-mid, #5A6B85); margin-right: 6px; }
.steps-toggle {
  background: none;
  border: 1px solid var(--navy-tint, #DDE4EE);
  border-radius: 999px;
  color: var(--teal, #1F8A8A);
  cursor: pointer;
  font-size: 11px;
  margin-left: 8px;
  padding: 1px 8px;
}
.steps-toggle:hover, .steps-toggle.is-open { background: var(--navy-tint, #EEF2F7); }

/* ── ASSET instance record (Aug-23 aa pack, migrations 220–223) ───────────── */
.asset-question-group-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-mid); margin: 18px 0 8px; padding-top: 10px; border-top: 1px solid var(--border, #E4E9F0); display: flex; align-items: baseline; gap: 8px; }
.asset-question-optional { font-size: 10px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--navy-mid); opacity: .75; }
.asset-question-field .form-hint { font-size: 11px; color: var(--navy-mid); margin-top: 3px; }

/* The evidence ranking — a number that shows its working, never a verdict. */
.asset-score { display: inline-block; min-width: 34px; text-align: center; padding: 2px 8px; border-radius: 999px; background: var(--teal-10, #E6F4F1); color: var(--teal, #0E7C66); font-weight: 700; font-size: 13px; cursor: help; }
.asset-score--lg { font-size: 18px; padding: 4px 14px; }

/* A2: the rendered tag QR beside its digits. */
.asset-tag-qr { width: 96px; margin: 6px 0 2px; }
.asset-tag-qr svg { width: 100%; height: auto; display: block; }

/* §3: documents & media thumbnails (the portal-attachment idiom). */
.asset-attachment-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.asset-attachment-thumbs img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border, #E4E9F0); }

/* §9: floor plans, scope 1. */
.floor-plan-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.floor-plan-image { max-width: 100%; height: auto; border: 1px solid var(--border, #E4E9F0); border-radius: 8px; display: block; }

/* ── Compliance pass two: the site × stream matrix and the Risk tab strip ── */
.compliance-matrix th.th { white-space: normal; vertical-align: bottom; }
.compliance-matrix-head { display: inline-block; font-size: 11px; line-height: 1.2; max-width: 92px; }
.compliance-matrix-cell a { display: block; padding: 6px 4px; border-radius: 6px; font-size: 12px; font-weight: 600; text-decoration: none; }
.compliance-matrix-cell--red a   { background: #FEF2F2; color: #B91C1C; }
.compliance-matrix-cell--amber a { background: #FFFBEB; color: #B45309; }
.compliance-matrix-cell--green a { background: #ECFDF5; color: #047857; }
.compliance-matrix-cell--none a  { background: #F3F4F6; color: #6B7280; }
.compliance-matrix-cell--empty   { color: var(--navy-mid); opacity: .5; }
.compliance-matrix-cell a:hover  { filter: brightness(.95); }
.risk-tabs { margin-bottom: 4px; }

/* ── The view switcher (a lens within scope, in the header) ── */
.view-switcher { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; }
.view-switcher-label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-mid); }
.view-switcher-select { font-family: 'Outfit', system-ui, sans-serif; font-size: 13px; color: var(--navy); background: var(--white); border: 1px solid var(--navy-tint); border-radius: 6px; padding: 5px 28px 5px 10px; max-width: 260px; }
@media (max-width: 767px) { .view-switcher-label { display: none; } .view-switcher-select { max-width: 150px; } }

/* ── The compliance planner (month grid) ── */
.planner-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.planner-grid th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-mid); padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--navy-tint); }
.planner-cell { vertical-align: top; height: 96px; padding: 6px; border: 1px solid var(--navy-tint); font-size: 12px; }
.planner-cell--pad { background: #FAFBFC; }
.planner-cell--past { background: #FAFBFC; }
.planner-cell--today { background: #ECFDF5; }
.planner-day { font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.planner-item { display: block; padding: 2px 6px; margin-bottom: 3px; border-radius: 4px; background: var(--navy-tint); color: var(--navy); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.planner-item:hover { background: #DCE6F0; }
.planner-item--overdue { background: #FEF2F2; color: #B91C1C; }
.planner-item--booking { border-left: 3px solid #D97706; }
.planner-more { display: block; font-size: 11px; color: var(--teal); }

/* ── Tile rows that hold as many tiles as the page needs ── */
.filter-card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }

/* ── Onboarding: the questionnaire (three answers + consequence) and the confirm grid (254) ── */
.provision-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--navy-tint); }
.provision-row:last-child { border-bottom: 0; }
.provision-row__text { flex: 1; min-width: 0; }
.provision-row__question { font-size: 14px; color: var(--navy); }
.provision-row__consequence { font-size: 12.5px; color: var(--navy-mid); margin-top: 3px; line-height: 1.45; }
.provision-row--open .provision-row__question { font-weight: 500; }
.provision-building { margin-top: 16px; }
.provision-building__name { font-weight: 600; font-size: 12px; color: var(--navy-mid); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.answer-seg { display: inline-flex; border: 1px solid var(--navy-tint); border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--white); }
.answer-seg__opt { position: relative; cursor: pointer; margin: 0; }
.answer-seg__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.answer-seg__opt span { display: block; padding: 6px 12px; font-size: 13px; color: var(--navy-mid); border-left: 1px solid var(--navy-tint); white-space: nowrap; }
.answer-seg__opt:first-child span { border-left: 0; }
.answer-seg__opt input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: -2px; }
.answer-seg__opt input:checked + span { background: var(--navy); color: var(--white); }
.answer-seg__opt input[value="not_sure"]:checked + span { background: var(--amber-600); }
@media (max-width: 640px) { .provision-row { flex-direction: column; gap: 8px; } }

.confirm-grid td { vertical-align: top; }
.confirm-grid .confirm-grid__task { min-width: 220px; }
.confirm-grid .confirm-grid__meta { font-size: 12px; color: var(--navy-mid); margin-top: 2px; }
.confirm-grid .confirm-grid__controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.confirm-grid .confirm-grid__extra { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.confirm-grid .confirm-grid__extra[hidden] { display: none; }
.confirm-grid .form-input--sm { font-size: 13px; padding: 5px 8px; }
.confirm-grid tr.is-provisional { background: var(--amber-50); }
.confirm-grid .confirm-grid__warn { font-size: 12px; color: var(--navy-mid); margin-top: 4px; }
.confirm-grid .confirm-grid__warn.is-overdue { color: var(--red-700); font-weight: 500; }
.confirm-page__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.confirm-page__filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.confirm-page .form-input--sm { font-size: 13px; padding: 5px 8px; width: auto; }

/* ── Onboarding: the core path (255) — shell, rail, steps ── */
.onb-body { background: var(--bg); min-height: 100vh; margin: 0; }
.onb-header { background: var(--navy); color: var(--white); padding: 14px 24px; }
.onb-header__inner { max-width: 760px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.onb-header__inner--wide { max-width: 1120px; }
.onb-header__brand { font-weight: 700; font-size: 1.05rem; }
.onb-header__brand span { opacity: .6; font-weight: 400; margin-left: 4px; }
.onb-header__skip { color: rgba(255,255,255,.7); font-size: 13px; text-decoration: none; }
.onb-header__skip:hover { color: var(--white); }
.onb-path { max-width: 1120px; margin: 0 auto; padding: 28px 24px 56px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.onb-main { min-width: 0; }
.onb-main--narrow { max-width: 760px; margin: 0 auto; padding: 24px 24px 48px; }
.onb-rail { position: sticky; top: 20px; }
.onb-rail ol { list-style: none; margin: 0; padding: 0; }
.onb-rail__step a, .onb-rail__step > span { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--navy-mid); text-decoration: none; font-size: 14px; }
.onb-rail__step a:hover { background: var(--navy-tint); }
.onb-rail__step.is-current a { background: var(--white); color: var(--navy); font-weight: 600; box-shadow: 0 1px 2px rgba(11,39,80,.08); }
.onb-rail__step.is-locked > span { opacity: .5; cursor: not-allowed; }
.onb-rail__dot { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--navy-tint); color: var(--navy-mid); }
.onb-rail__step.is-current .onb-rail__dot { background: var(--teal); color: var(--white); }
.onb-rail__step.is-done .onb-rail__dot { background: var(--emerald-600); color: var(--white); }
.onb-rail__note { font-size: 12px; color: var(--navy-mid); line-height: 1.5; margin: 16px 10px 0; }
.onb-step { max-width: 720px; }
.onb-step--wide { max-width: none; }
.onb-step__eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--teal); }
.onb-step__title { margin: 0 0 8px; font-size: 26px; color: var(--navy); }
.onb-step__lede { margin: 0 0 24px; color: var(--navy-mid); line-height: 1.6; font-size: 15px; max-width: 680px; }
.onb-form { margin: 0; }
.onb-section { background: var(--white); border: 1px solid var(--navy-tint); border-radius: 12px; padding: 20px 22px; margin-bottom: 16px; }
.onb-section__title { margin: 0 0 12px; font-size: 16px; color: var(--navy); }
.onb-section__hint { margin: -4px 0 12px; font-size: 13px; color: var(--navy-mid); line-height: 1.5; }
.onb-current { margin: 0 0 10px; font-size: 13.5px; color: var(--navy); }
.onb-choices { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.onb-choices legend { margin-bottom: 8px; }
.onb-choice { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1px solid var(--navy-tint); border-radius: 8px; margin-bottom: 6px; cursor: pointer; font-size: 14px; color: var(--navy); background: var(--white); }
.onb-choice:hover { border-color: #C9D3E0; }
.onb-choice input { margin-top: 3px; accent-color: var(--teal); }
.onb-choice:has(input:checked) { border-color: var(--teal); background: #F2F8F8; }
.onb-choice__meta { display: block; font-size: 12px; color: var(--navy-mid); margin-top: 2px; }
.onb-choice__note { font-size: 12.5px; color: var(--navy-mid); margin: 6px 0 0; line-height: 1.5; }
.onb-reveal { margin: 0 0 8px 30px; }
.onb-reveal[hidden], .onb-inline[hidden] { display: none; }
.onb-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.onb-inline .form-input { flex: 1; min-width: 160px; width: auto; }
.onb-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
.onb-actions--split { justify-content: space-between; flex-wrap: wrap; }
.onb-site { background: var(--white); border: 1px solid var(--navy-tint); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.onb-site--unset { border-color: var(--amber-500); }
.onb-site__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--navy); }
.onb-site__meta { font-size: 13px; color: var(--navy-mid); margin-top: 4px; }
.onb-site__complete { margin-top: 12px; }
.onb-site__complete summary, .onb-group__add summary { cursor: pointer; font-size: 13px; color: var(--teal); font-weight: 500; }
.onb-add { margin: 16px 0 8px; }
.onb-add > summary { list-style: none; display: inline-flex; }
.onb-add > summary::-webkit-details-marker { display: none; }
.onb-add[open] > summary { margin-bottom: 12px; }
.onb-add > .onb-form { background: var(--white); border: 1px solid var(--navy-tint); border-radius: 12px; padding: 20px 22px; }
.onb-counter { margin: -8px 0 18px; font-size: 14px; color: var(--amber-700); }
.onb-counter--done { color: var(--emerald-700); }
.onb-callout { background: var(--amber-50); border: 1px solid #FDE68A; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; color: var(--navy); }
.onb-callout--critical { background: var(--red-50); border-color: #FECACA; }
.onb-group { border-top: 1px solid var(--navy-tint); padding: 12px 0; }
.onb-group:first-of-type { border-top: 0; padding-top: 0; }
.onb-group__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--navy); }
.onb-group__level { font-size: 12px; color: var(--navy-mid); background: var(--navy-tint); border-radius: 999px; padding: 1px 8px; }
.onb-group__members { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13.5px; color: var(--navy); }
.onb-group__members li { padding: 2px 0; }
.onb-group__add { margin-top: 6px; }
.onb-group__add .onb-inline { margin-top: 8px; }
.onb-linkbtn { background: none; border: 0; padding: 0 0 0 6px; color: var(--teal); font-size: 12px; cursor: pointer; text-decoration: underline; }
.onb-checks { list-style: none; margin: 0; padding: 0; }
.onb-check { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--navy-tint); font-size: 14px; color: var(--navy); }
.onb-check:last-child { border-bottom: 0; }
.onb-check__mark { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--navy-tint); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.onb-check.is-met .onb-check__mark { background: var(--emerald-600); border-color: var(--emerald-600); color: var(--white); }
.onb-check__label { flex: 1; }
.onb-check__state { font-size: 12px; color: var(--navy-mid); }
.onb-check.is-met .onb-check__state { color: var(--emerald-700); }
.onb-sev { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.onb-sev__tile { border: 1px solid var(--navy-tint); border-left-width: 4px; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--navy-mid); background: var(--white); }
.onb-sev__n { display: block; font-size: 24px; font-weight: 700; line-height: 1.1; }
.onb-sev__tile--critical { border-left-color: var(--red-600); } .onb-sev__tile--critical .onb-sev__n { color: var(--red-600); }
.onb-sev__tile--significant { border-left-color: var(--amber-500); } .onb-sev__tile--significant .onb-sev__n { color: var(--amber-700); }
.onb-sev__tile--advisory { border-left-color: var(--cyan-500); } .onb-sev__tile--advisory .onb-sev__n { color: #0E7490; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.provision-cluster { border-color: var(--teal); }
@media (max-width: 820px) {
  .onb-path { grid-template-columns: 1fr; gap: 12px; padding-top: 16px; }
  .onb-rail { position: static; }
  .onb-rail ol { display: flex; overflow-x: auto; gap: 4px; }
  .onb-rail__label { white-space: nowrap; }
  .onb-rail__note { display: none; }
  .onb-sev { grid-template-columns: 1fr; }
}

/* ── Getting set up (the programme) and Settings → Set-up (255) ── */
.setup-programme { background: var(--white); border: 1px solid var(--navy-tint); border-top: 3px solid var(--teal); border-radius: 12px; padding: 20px 22px; }
.setup-programme__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.setup-programme__title { margin: 0 0 4px; font-size: 18px; color: var(--navy); }
.setup-programme__lede { margin: 0 0 14px; font-size: 13.5px; color: var(--navy-mid); line-height: 1.5; }
.setup-programme__sub { margin: 20px 0 10px; font-size: 14px; color: var(--navy); }
.setup-programme__sev { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.setup-sev { display: flex; align-items: baseline; gap: 8px; border: 1px solid var(--navy-tint); border-left-width: 4px; border-radius: 8px; padding: 8px 12px; text-decoration: none; color: var(--navy-mid); font-size: 13px; }
.setup-sev:hover { background: var(--bg); }
.setup-sev__n { font-size: 22px; font-weight: 700; }
.setup-sev--critical { border-left-color: var(--red-600); } .setup-sev--critical .setup-sev__n { color: var(--red-600); }
.setup-sev--significant { border-left-color: var(--amber-500); } .setup-sev--significant .setup-sev__n { color: var(--amber-700); }
.setup-sev--advisory { border-left-color: var(--cyan-500); } .setup-sev--advisory .setup-sev__n { color: #0E7490; }
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--navy-tint); border-radius: 10px; margin-bottom: 8px; }
.setup-item--critical { background: var(--red-50); border-color: #FECACA; margin-bottom: 10px; }
.setup-item.is-clear { opacity: .65; }
.setup-item__body { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; color: var(--navy-mid); min-width: 0; }
.setup-item__body strong { color: var(--navy); font-size: 14px; }
.setup-item__sites { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.setup-item__actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.setup-streams { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.setup-stream { border: 1px solid var(--navy-tint); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.setup-stream.is-done { background: var(--bg); }
.setup-stream__head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.setup-stream__title { font-weight: 600; color: var(--navy); text-decoration: none; font-size: 14px; }
.setup-stream__title:hover { color: var(--teal); }
.setup-stream__what { margin: 0; font-size: 12.5px; color: var(--navy-mid); line-height: 1.45; flex: 1; }
.setup-stream__form { margin: 0; }
.setup-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--amber-50); border: 1px solid #FDE68A; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; color: var(--navy); }
.setup-banner--quiet { background: var(--white); border-color: var(--navy-tint); }
.setup-facets { margin-top: 24px; }
.setup-facet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.setup-facet { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--white); border: 1px solid var(--navy-tint); border-radius: 10px; text-decoration: none; }
.setup-facet:hover { border-color: var(--teal); }
.setup-facet--attention { border-left: 3px solid var(--amber-500); }
.setup-facet__label { font-weight: 600; color: var(--navy); font-size: 14px; }
.setup-facet__summary { font-size: 12.5px; color: var(--navy-mid); line-height: 1.45; }
@media (max-width: 640px) {
  .setup-programme__sev { grid-template-columns: 1fr; }
  .setup-item { flex-direction: column; align-items: flex-start; }
}

/* ── Documents already held (255) ── */
.docs-held__site { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.docs-held__site .form-label { margin: 0; }
.docs-held__site .form-input { width: auto; }
.docs-held__cat { margin-bottom: 16px; }
.docs-held__cat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.docs-held__nothold { margin: 0; display: flex; align-items: center; gap: 4px; }
.docs-held__row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--navy-tint); }
.docs-held__row:last-child { border-bottom: 0; }
.docs-held__task { font-size: 14px; color: var(--navy); min-width: 0; flex: 1; }
.docs-held__task .badge { margin-left: 4px; }
.docs-held__meta { font-size: 12px; color: var(--navy-mid); margin-top: 3px; }
.docs-held__doc { font-size: 12.5px; color: var(--navy-mid); margin-top: 4px; }
.docs-held__upload { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 0; flex-shrink: 0; }
.docs-held__upload .form-input--sm { font-size: 12.5px; padding: 4px 6px; width: auto; max-width: 220px; }
.docs-held__date { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--navy-mid); }
@media (max-width: 760px) { .docs-held__row { flex-direction: column; } }

/* =============================================
   CONNECT OUTBOX (258) — the mail mode, the status tiles, the message reader
   ============================================= */
.outbox-mode { border-left: 4px solid var(--navy-tint); }
.outbox-mode--hold { border-left-color: var(--amber-500); }
.outbox-mode--sink { border-left-color: var(--blue-500); }
.outbox-mode--live { border-left-color: var(--red-500); }
.outbox-mode-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.outbox-mode-now { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--navy); font-weight: 500; }
.outbox-mode-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.outbox-mode-actions form { margin: 0; }
.outbox-mode-change { margin-top: 14px; }
.outbox-mode-change summary { cursor: pointer; color: var(--teal); font-size: 13px; }
.outbox-mode-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; max-width: 560px; }
.outbox-mode-option { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--navy); cursor: pointer; }
.outbox-mode-option input { margin-top: 3px; }
.outbox-mode-field { margin-left: 24px; }
.outbox-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.outbox-tile { display: flex; flex-direction: column; gap: 4px; text-decoration: none; padding: 14px 16px; }
.outbox-tile:hover { border-color: var(--teal); }
.outbox-tile--on { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.outbox-meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; font-size: 13.5px; }
.outbox-meta dt { color: var(--navy-mid); }
.outbox-meta dd { margin: 0; color: var(--navy); word-break: break-word; }
.outbox-body { width: 100%; min-height: 560px; border: 1px solid var(--navy-tint); border-radius: 4px; background: #fff; }
.outbox-links { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; word-break: break-all; }
.outbox-plain summary { cursor: pointer; list-style: none; }
.outbox-plain pre { white-space: pre-wrap; font-size: 12.5px; margin: 0; }
@media (max-width: 640px) { .outbox-meta { grid-template-columns: 1fr; } .outbox-meta dt { margin-top: 6px; } }

/* =============================================
   CONNECT SCHEDULED JOBS (260) — the heartbeat and the job table
   ============================================= */
.jobs-heartbeat { border-left: 4px solid var(--navy-tint); }
.jobs-heartbeat--alive { border-left-color: var(--emerald-600); }
.jobs-heartbeat--stopped { border-left-color: var(--red-500); }
.jobs-heartbeat .card-body { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--navy); }
.jobs-heartbeat code { font-size: 12px; word-break: break-all; }
.jobs-toggle { margin: 0; }

/* =============================================
   ALERT TIMELINES (261) — Settings → Notifications → Alert timelines
   ============================================= */
.timeline-task { border-top: 1px solid var(--navy-tint); padding: 10px 0; }
.timeline-task summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.timeline-points { margin-top: 8px; }
.timeline-tighten, .timeline-add { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0; }
.timeline-add { margin-top: 10px; }
.timeline-rel { font-size: 12px; color: var(--navy-mid); display: inline-flex; gap: 4px; align-items: center; }

/* =============================================
   SNOOZE (263) — on the bell's notices and on the email deep link's landing
   ============================================= */
.notif-snooze { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; font-size: 11.5px; color: var(--navy-mid); }
.notif-snooze-btn { border: 1px solid var(--navy-tint); background: var(--white); color: var(--navy); border-radius: 3px; padding: 1px 6px; font-size: 11px; cursor: pointer; line-height: 1.6; }
.notif-snooze-btn:hover { border-color: var(--teal); color: var(--teal); }
.notif-snooze--done { color: var(--teal); }
.notif-snooze--error { color: var(--red-600); }
.snooze-landing { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; font-size: 13.5px; }

/* =============================================
   NOTIFICATION AUDIT (263) — the chain per record
   ============================================= */
.audit-event .card-title { display: flex; flex-direction: column; gap: 2px; }
.audit-sub { font-size: 13px; font-weight: 600; color: var(--navy); margin: 14px 0 6px; }
.audit-list { margin: 0; padding-left: 18px; font-size: 13px; color: var(--navy); }

/* =============================================
   NOTIFICATION PREFERENCES (263) — the grid and the level tabs
   ============================================= */
.notif-pref-grid .notif-pref-select { min-width: 150px; }
.notif-pref-group td { background: var(--navy-tint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--navy-mid); }
.notif-level-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.notif-level-tab { padding: 6px 12px; border: 1px solid var(--navy-tint); border-radius: 4px; font-size: 13px; color: var(--navy); text-decoration: none; }
.notif-level-tab--on { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); color: var(--teal); }

/* ── 265: bespoke asset types — the add-asset route and the type page ── */
.bespoke-route { margin: 4px 0 16px; }
.bespoke-block { margin-top: 12px; padding: 14px; border: 1px solid var(--navy-tint); border-radius: 8px; background: var(--surface-muted, #f7f9fb); }
.bespoke-matches { display: flex; flex-direction: column; gap: 6px; margin: -4px 0 12px; }
.bespoke-match { text-align: left; padding: 8px 10px; border: 1px solid var(--navy-tint); border-radius: 6px; background: #fff; font-size: 13px; cursor: pointer; }
.bespoke-match:hover, .bespoke-match:focus { border-color: var(--teal, #4B979B); }
/* EG12 (12.1): the near match in the add-asset panel, and a cancelled slot on the asset record. */
.asset-near-match { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--navy-tint); border-radius: 8px; background: var(--navy-faint, #F6F8FA); }
.asset-near-match__text { margin: 0; font-size: 13px; }
.asset-near-match__list { display: flex; flex-direction: column; gap: 6px; }
.asset-slot-cancelled { color: var(--navy-mid); font-size: 12px; }
.bespoke-questions { border: 0; padding: 0; margin: 0 0 12px; }
.bespoke-question { padding: 8px 0; border-bottom: 1px dashed var(--navy-tint); }
.bespoke-question:last-child { border-bottom: 0; }
.bespoke-question__text { margin: 0 0 6px; font-size: 13px; }
.bespoke-question__answers { display: flex; gap: 14px; flex-wrap: wrap; }
.bespoke-answer { font-size: 13px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }

/* ── S2 pass 2 (30 Sept): Requests and jobs — view tabs with counts, the Board/List
      switch, the one New menu. helpdesk/dashboard.php ── */
.work-tabs { flex-wrap: wrap; margin-bottom: 0; }
.work-tab-count { display: inline-block; min-width: 20px; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--navy-tint, #E5EAF1); color: var(--navy-mid, #4B5E7A); font-size: 11px; font-weight: 600; text-align: center; }
.tab-trigger--active .work-tab-count { background: var(--teal, #4B979B); color: #fff; }
.work-tab-count--alert { background: #FEE2E2; color: #B91C1C; }
.work-view-note { margin: 4px 0 0; font-size: 13px; }
.work-mode { display: inline-flex; gap: 0; }
.work-mode .btn { border-radius: 0; }
.work-mode .btn:first-child { border-radius: 6px 0 0 6px; }
.work-mode .btn:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }
.work-new-menu { position: relative; display: inline-block; }
.work-new-menu > summary { list-style: none; cursor: pointer; }
.work-new-menu > summary::-webkit-details-marker { display: none; }
.work-new-menu__list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 220px; background: var(--white, #fff); border: 1px solid var(--navy-tint, #E5EAF1); border-radius: 8px; box-shadow: 0 8px 24px rgba(11,39,80,.12); padding: 4px; display: flex; flex-direction: column; }
.work-new-menu__list > a, .work-new-menu__list > button { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--navy, #0B2750); text-decoration: none; border-radius: 6px; cursor: pointer; }
.work-new-menu__list > a:hover, .work-new-menu__list > button:hover { background: var(--navy-tint, #F1F4F8); }
@media (max-width: 767px) { .work-new-menu__list { right: auto; left: 0; } }

/* ── S2 pass 3 (30 Sept): the job record — one lifecycle bar above the fold, the rest in
   collapsed sections with a one-line summary (views/helpdesk/_record-actions.php, job-detail.php;
   toggled by the kit's data-collapse-toggle). ───────────────────────────────────────────── */
.record-bar { margin-top: 12px; border-left: 3px solid var(--teal, #4B979B); }
.record-bar__row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.record-bar__state { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--navy, #0B2750); }
.record-bar__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.record-bar__panel { border-top: 1px solid var(--navy-tint, #E5EAF1); }
.record-bar__panel.is-collapsed { display: none; }
.record-bar__form { display: grid; gap: 8px; max-width: 640px; }
.record-bar__buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.record-bar__warn { margin: 0; color: #B45309; font-size: 0.85rem; }
.record-section { margin-top: 12px; }
.record-section__head { display: flex; width: 100%; gap: 12px; align-items: baseline; padding: 14px 16px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--navy, #0B2750); }
.record-section__head:hover { background: var(--navy-tint, #F1F4F8); }
.record-section__title { font-family: var(--font-heading, inherit); font-weight: 600; font-size: 15px; white-space: nowrap; }
.record-section__summary { flex: 1; color: var(--navy-mid, #5B6B82); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-section__chevron { color: var(--navy-mid, #5B6B82); transition: transform .15s ease; }
.record-section__head[aria-expanded="true"] .record-section__chevron { transform: rotate(180deg); }
/* RB-RJ (W-38, 21 Nov 2026): the Conversation's two actions, Add internal note and Reply to <who>, side by side. */
.conversation-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
/* RB-RJ (W-20): who accepted or rejected a contractor's file, beside it on the job's Attachments panel. */
.attachment-review { display: block; font-size: 11px; margin-top: 2px; color: var(--navy-mid, #5B6B82); }
.attachment-review--rejected { color: var(--danger, #c0392b); }
.record-section__body { padding: 0 16px 16px; }
.record-section__body.is-collapsed { display: none; }
.record-section__body > .card { box-shadow: none; border: 0; }
@media (max-width: 767px) { .record-section__summary { white-space: normal; } }

/* S5 (30 Sept): the competency matrix — function headers wrap instead of overlapping; every cell a button */
.competency-table th.competency-th-person { min-width: 180px; }
.competency-table th.competency-th-function {
  white-space: normal;
  min-width: 112px;
  max-width: 140px;
  text-align: center;
  font-size: 11px;
  line-height: 1.3;
  vertical-align: bottom;
  letter-spacing: 0.02em;
}
.competency-cell--none { color: var(--navy-mid); font-weight: 400; font-size: 12px; }
.competency-cell-btn {
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 4px 6px;
  width: 100%;
}
.competency-cell--none .competency-cell-btn { text-decoration: underline; }
.competency-cell-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }

/* S5 pass 3: a sentence or a line of detail on the People pages, in sentence case (the detail-label
   style is for field labels and sets capitals). */
.person-note { font-size: 13px; }
span.person-note { font-size: 12px; }
/* The browser pass (1 Oct): a sentence, a purpose line or a line of detail anywhere — the detail-label's
   size, colour and spacing in sentence case. detail-label is for a field's short name only. */
.detail-note {
  display: block;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.45;
  color: var(--navy-mid);
  margin-bottom: 2px;
}

/* ── S8 D1: Sustainability Overview — a tile that states a fact in words ("No readings since 1 Apr 2025") instead of a silent 0 ── */
.stat-value.stat-value--words { font-size: 16px; line-height: 1.3; }

/* =============================================
   HOME (S9, 1 Oct 2026): the position line's links, Your work's rows, the light outline button
   on the navy banner.
   ============================================= */
.home-position a { color: var(--white); text-decoration: underline; text-decoration-color: rgba(255,255,255,0.4); text-underline-offset: 3px; }
.home-position a:hover { text-decoration-color: var(--white); }
.welcome-sub.home-position { color: rgba(255,255,255,0.85); font-size: 15px; line-height: 1.5; }
.btn-outline-light { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.5); }
.btn-outline-light:hover { border-color: var(--white); }
.home-work { display: flex; flex-direction: column; gap: 14px; }
.home-work-row { display: flex; gap: 12px; align-items: flex-start; }
.home-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; margin-top: 4px; }
.home-work-text { margin: 2px 0 0; font-size: 14px; color: var(--navy); }
.home-heading { font-size: 18px; margin-bottom: 12px; }

/* =============================================
   BOARD (B2, 3 Oct 2026): the per-stream table, condition and the plan by site, and the Board pack's
   sub-headings — a totals row, a note under a flush table, a sub-heading inside a pack section.
   ============================================= */
.data-table tr.board-total-row td { font-weight: 600; border-top: 2px solid var(--navy-tint, #E8ECF2); }
.board-table-note { margin: 0; padding: 10px 16px 12px; }
.board-pack-subhead { font-size: 14px; font-weight: 600; color: var(--navy); margin: 16px 0 6px; }

/* =============================================
   ANNUAL RETURN (B2, 3 Oct 2026): the readiness summary's lists, the pack comparison, the DfE's
   figures beside ours (inputs that stay narrow inside a scrolling table at 375px).
   ============================================= */
.ar-plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--navy); }
.ar-plain-list .badge { margin-right: 6px; }
.ar-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--navy); }
/* 317: the annual return cycle's state rail (five states in order; lapsed the other ending). Wraps at 375px. */
.ar-rail { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ar-rail__step { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--navy-mid); }
.ar-rail__dot { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--navy-tint); color: var(--navy-mid); }
.ar-rail__step.is-current { color: var(--navy); font-weight: 600; }
.ar-rail__step.is-current .ar-rail__dot { background: var(--teal); color: var(--white); }
.ar-rail__step.is-done .ar-rail__dot { background: var(--emerald-600); color: var(--white); }
.ar-rail__step.is-lapsed { color: var(--navy); font-weight: 600; }
.ar-rail__step.is-lapsed .ar-rail__dot { background: var(--amber-600); color: var(--white); }
.ar-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ar-figures .ar-figure-input { width: 110px; max-width: 100%; display: inline-block; }
.data-table tr.ar-row-focus td { background: var(--surface-muted, #f7f8fa); }

/* =============================================
   B7 HL (5 Oct 2026): incidents on the building floor plans (Hotspots). The plan scales to its card;
   each pin sits at a percentage of the image, so it stays on its spot at any width (375px included).
   ============================================= */
.hl-plan { position: relative; display: inline-block; max-width: 100%; line-height: 0; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; overflow: hidden; background: var(--white); }
.hl-plan img { display: block; max-width: 100%; height: auto; }
.hl-plan[data-plan-placer] { cursor: crosshair; }
.hl-pin { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.45); font: 700 10px/14px -apple-system, "Helvetica Neue", Arial, sans-serif; color: #fff; text-align: center; text-decoration: none; }
.hl-pin--red { background: var(--red-600); }
.hl-pin--amber { background: var(--amber-500); }
.hl-pin--green { background: var(--emerald-600); }
.hl-pin--blue { background: var(--blue-500); }
.hl-pin--grey { background: #6B7280; }
.hl-pin--riddor { outline: 2px solid var(--navy); outline-offset: 1px; }
.hl-pin--preview { background: rgba(255,255,255,.6); border: 2px dashed var(--navy); box-shadow: none; }
.hl-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--navy-mid); margin-top: 10px; line-height: 18px; }
.hl-key .hl-pin { position: static; margin: 0 2px 0 0; display: inline-block; vertical-align: middle; }
.hl-placer { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--navy-tint); }
.hl-placer-title { font-size: 14px; font-weight: 600; color: var(--navy); margin: 0 0 4px; }
.hl-placer-list { max-height: 280px; overflow-y: auto; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; }
.hl-placer-list label { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-bottom: 1px solid var(--navy-tint); font-size: 13px; color: var(--navy); cursor: pointer; }
.hl-placer-list label:last-child { border-bottom: 0; }
.hl-placer-list input { margin-top: 3px; flex: 0 0 auto; }

/* B7 HR — the H&S report's form on the Overview (21.5.5) and the risk assessment link panel (21.1.1) */
.hs-report-form__parts { border: none; margin: 0; padding: 0; min-width: 0; display: grid; gap: 4px; }
.hs-report-form__parts legend { padding: 0; margin-bottom: 4px; }
.hs-report-form__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.ra-link-panel__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--navy-tint, #DDE4EE); }
.ra-link-panel__row:first-child { border-top: none; padding-top: 0; }
.ra-link-panel__name { min-width: 0; overflow-wrap: anywhere; }
.ra-link-panel__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ra-link-panel__form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--navy-tint, #DDE4EE); }
.ra-link-panel__form .form-group { flex: 1 1 220px; min-width: 0; margin: 0; }
.ra-link-panel__form select { max-width: 100%; }

/* B8 RD — the record of a risk assessment: files on it (21.3.4) and the evidence packs' fingerprints (21.5.7) */
.pack-hash { font-family: monospace; word-break: break-all; overflow-wrap: anywhere; margin: 4px 0; color: var(--navy); }
.pack-hash--small { font-size: 12px; margin: 0; }
.ra-files-list { list-style: none; margin: 0 0 12px; padding: 0; }
.ra-files-list__item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--navy-tint, #DDE4EE); }
.ra-files-list__item:last-child { border-bottom: none; }
.ra-files-list__name { min-width: 0; overflow-wrap: anywhere; }
.ra-files-form { display: grid; gap: 4px; max-width: 100%; padding-top: 12px; border-top: 1px solid var(--navy-tint, #DDE4EE); }
.ra-files-form input[type="file"] { max-width: 100%; min-width: 0; }
.ra-files-form .btn { justify-self: start; }

/* B8 RV — reviews of a risk assessment after an incident (21.3.13) and off-site visit check-in (21.3.16) */
.rv-list { display: grid; gap: 0; margin-bottom: 4px; }
.rv-item { padding: 10px 0; border-bottom: 1px solid var(--navy-tint, #DDE4EE); min-width: 0; }
.rv-item:last-child { border-bottom: none; }
.rv-item__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 10px; overflow-wrap: anywhere; }
.rv-subhead { font-size: 14px; font-weight: 600; color: var(--navy); margin: 16px 0 6px; }
.rv-form { margin-top: 10px; padding: 12px; border: 1px solid var(--navy-tint, #DDE4EE); border-radius: 8px; max-width: 100%; }
.rv-outcomes { border: none; margin: 0; padding: 0; min-width: 0; display: grid; gap: 4px; }
.rv-outcomes legend { padding: 0; margin-bottom: 4px; }
.rv-open__fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.rv-open__fields .form-group { flex: 1 1 180px; min-width: 0; margin: 0; }
.rv-open__fields .rv-open__go { flex: 0 0 auto; }
.rv-open__fields select, .rv-other select { max-width: 100%; }
.rv-other { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--navy-tint, #DDE4EE); }
.checkin-alert { padding: 10px 12px; border-radius: 8px; background: var(--red-50); border: 1px solid var(--red-400); color: var(--red-700); }
.checkin-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checkin-step { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 8px 10px; border-left: 3px solid var(--navy-tint, #DDE4EE); }
.checkin-step--done { border-left-color: var(--emerald-600); }
.checkin-step__name { font-weight: 600; color: var(--navy); min-width: 80px; }
.checkin-step__when { color: var(--navy); }
.checkin-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding-top: 12px; border-top: 1px solid var(--navy-tint, #DDE4EE); margin: 0; }
.checkin-form .form-group { flex: 1 1 160px; min-width: 0; margin: 0; }
.checkin-form__go { flex: 0 0 auto; }

/* B8 RA — the risk matrix at any size (3×3 to 5×5), its settings editor, locked template controls (21.3.1, 21.3.6). */
.risk-matrix--3 { grid-template-columns: 44px repeat(3, 1fr); max-width: 420px; }
.risk-matrix--4 { grid-template-columns: 44px repeat(4, 1fr); max-width: 530px; }
.risk-matrix--5 { grid-template-columns: 44px repeat(5, 1fr); }
/* CAP-FIX: one assessment's place on its grid (views/compliance/_risk_position.php), read-only */
.risk-matrix--compact { grid-auto-rows: 40px; max-width: 360px; margin-top: 6px; }
.risk-matrix--compact .risk-cell:hover { transform: none; box-shadow: none; }
.risk-matrix--compact .risk-cell-score { font-size: 10px; opacity: 1; text-align: center; line-height: 1.1; }
.risk-dot { display: inline-block; }
.rm-fieldset { border: 1px solid var(--navy-tint, #DDE4EE); border-radius: 8px; padding: 12px 14px; margin: 0; min-width: 0; }
.rm-fieldset legend { padding: 0 6px; font-weight: 600; color: var(--navy); }
.rm-band-row { display: grid; grid-template-columns: 14px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr); gap: 8px 12px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--navy-tint, #DDE4EE); }
.rm-band-row:last-of-type { border-bottom: 0; }
.rm-band-row .risk-dot { align-self: center; }
.rm-band-use { display: flex; gap: 8px; align-items: center; align-self: center; color: var(--navy); }
.rm-band-row--off .form-group { opacity: 0.45; }
.rm-levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.rm-level { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: center; }
.rm-level .form-label { margin: 0; }
.ra-locked-controls { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ra-locked-controls li { color: var(--navy); line-height: 1.5; }
.ra-lock-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--navy-tint, #DDE4EE); color: var(--navy); }
.ra-lock-row:last-child { border-bottom: 0; }
.ra-lock-row input { margin-top: 3px; }
@media (max-width: 640px) {
  .rm-band-row { grid-template-columns: 14px minmax(0, 1fr); }
  .rm-band-row .form-group { grid-column: 1 / -1; }
  .rm-levels { grid-template-columns: minmax(0, 1fr); }
  .risk-matrix { grid-auto-rows: 48px; }
}

/* ── Lane A (327): Pack A leftovers ─────────────────────────────────────────────── */
/* An accessibility audit's findings as rows: the per-row status form and the add form. */
.a11y-finding-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.a11y-finding-status .form-input--sm { width: auto; min-width: 0; }
.a11y-finding-add { padding: 16px 20px; border-top: 1px solid var(--navy-tint); }
/* The bulk import's update preview: the columns each row would change. */
.asset-import-changes { margin: 0; padding-left: 18px; font-size: 13px; }

/* ── Lane L3 (330, Pack C): continuity plan page ── */
.continuity-test { padding: 16px 0; border-top: 1px solid var(--navy-tint); }
.continuity-test:first-child { border-top: none; padding-top: 0; }
.continuity-action-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.continuity-action-add .form-input--sm { width: auto; min-width: 0; flex: 1 1 140px; }
.continuity-action-add .form-input--sm:first-child { flex: 3 1 220px; }

/* ── AI2 (338): Settings › Integrations › AI assistants and Profile › Connected apps ── */
.ai-tabs { margin-bottom: 16px; max-width: 100%; overflow-x: auto; }
.ai-tabs .tab-trigger { white-space: nowrap; }
.ai-input-narrow { width: auto; min-width: 0; max-width: 260px; }
.ai-input-wide { width: 100%; max-width: 420px; }
.ai-mono { font-family: 'SF Mono', 'Menlo', 'Consolas', monospace; font-size: 13px; }
.ai-pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.ai-pick-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--navy-tint); border-radius: 4px; padding: 8px 12px; display: grid; gap: 6px; }
.ai-copy-row { display: grid; gap: 4px; }
.ai-copy-row .form-label { margin: 0; }
.ai-copy-field { display: flex; gap: 8px; align-items: center; min-width: 0; }
.ai-copy-field .form-input { flex: 1 1 auto; min-width: 0; }
.ai-once { border-color: var(--amber-700, #b45309); }
.ai-once-warning { margin: 0; padding: 10px 12px; border-radius: 4px; background: var(--amber-50, #fffbeb); color: var(--amber-700, #b45309); font-size: 14px; }
.ai-secret { background: var(--amber-50, #fffbeb); }
.ai-filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0; }
.ai-filter-row .form-group { flex: 1 1 180px; min-width: 0; margin: 0; }
.ai-filter-row .form-input--sm { width: 100%; }
.ai-filter-actions { display: flex; gap: 8px; align-items: flex-end; }
.ai-filter-note { margin: 0 0 12px; font-size: 13px; color: var(--navy-mid); }
.ai-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ai-nowrap { white-space: nowrap; }
.ai-args { font-size: 13px; color: var(--navy-mid); max-width: 320px; overflow-wrap: anywhere; }
.ai-usage { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ai-usage-item { background: var(--white, #fff); border: 1px solid var(--navy-tint); border-radius: 6px; padding: 12px 16px; display: grid; gap: 2px; }
.ai-usage-count { font-size: 22px; font-weight: 600; color: var(--navy); }
.ai-usage-label { font-size: 13px; color: var(--navy-mid); }
.ai-notice p { line-height: 1.6; color: var(--navy); max-width: 760px; }
.ai-connection + .ai-connection, .ai-ended { border-top: 1px solid var(--navy-tint); }
.ai-connection-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ai-connection-head .badge { margin-left: 8px; }
.ai-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 16px; margin: 12px 0 0; }
.ai-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--navy-mid); }
.ai-facts dd { margin: 2px 0 0; color: var(--navy); overflow-wrap: anywhere; }
.ai-calls { margin-top: 12px; }
.ai-calls summary, .ai-assistant-card summary { cursor: pointer; color: var(--teal, #4B979B); font-size: 14px; }
.ai-ended-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.ai-assistant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ai-assistant-card { border: 1px solid var(--navy-tint); border-radius: 6px; padding: 12px 16px; min-width: 0; }
.ai-assistant-name { margin: 0 0 4px; font-size: 15px; color: var(--navy); }
.ai-steps { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; color: var(--navy); overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .ai-pick-grid { grid-template-columns: minmax(0, 1fr); }
  .ai-usage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-input-narrow, .ai-input-wide { max-width: 100%; width: 100%; }
}

/* AI assistants AI3: the tool reference */
.ai-tools-list dt { font-weight: 600; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.ai-tools-list dd { margin: 4px 0 0; }
.ai-tools-list .ai-tool-name { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--navy-mid, #4a5a70); font-weight: 400; word-break: break-all; }
.ai-tools-group { margin-bottom: 16px; }

/* AI assistants AI6: the help centre (app) and its Connect editor */
.help-search { max-width: 640px; }
.help-search-row { display: flex; gap: 8px; align-items: center; }
.help-search-row .form-input { flex: 1 1 auto; min-width: 0; }
.help-clear { font-size: 13px; }
.help-collections { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.help-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.help-list--compact { gap: 8px; }
.help-list-title { font-weight: 600; }
.help-list-meta { font-size: 12px; color: var(--navy-mid); margin-left: 6px; }
.help-list-summary { margin: 2px 0 0; font-size: 14px; color: var(--navy-mid); overflow-wrap: anywhere; }
.help-crumb { font-size: .85rem; color: var(--navy-mid); }
.help-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.help-article-summary { font-size: 16px; color: var(--navy-mid); margin: 0 0 16px; }
.help-body { max-width: 760px; color: var(--navy); line-height: 1.6; overflow-wrap: anywhere; }
.help-body h2 { font-size: 20px; margin: 24px 0 8px; }
.help-body h3 { font-size: 17px; margin: 20px 0 6px; }
.help-body h4 { font-size: 15px; margin: 16px 0 6px; }
.help-body p, .help-body ul, .help-body ol, .help-body blockquote { margin: 0 0 12px; }
.help-body ul, .help-body ol { padding-left: 22px; }
.help-body li + li { margin-top: 4px; }
.help-body code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--navy-tint, #eef1f5); padding: 1px 4px; border-radius: 3px; }
.help-body pre { background: var(--navy-tint, #eef1f5); padding: 12px; border-radius: 6px; overflow-x: auto; margin: 0 0 12px; }
.help-body pre code { background: none; padding: 0; white-space: pre; }
.help-body table { border-collapse: collapse; width: 100%; margin: 0 0 12px; display: block; overflow-x: auto; }
.help-body th, .help-body td { border: 1px solid var(--navy-tint); padding: 6px 10px; text-align: left; vertical-align: top; }
.help-body blockquote { border-left: 3px solid var(--teal, #4B979B); padding: 4px 12px; color: var(--navy-mid); }
.help-body img { max-width: 100%; height: auto; border: 1px solid var(--navy-tint); border-radius: 6px; }
.help-article-updated { margin: 16px 0 0; }
.ai-guide-link { font-size: 14px; }
.help-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.help-editor-body { font-family: ui-monospace, Menlo, monospace; font-size: 13px; min-height: 420px; }
@media (max-width: 900px) {
  .help-layout, .help-editor-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .help-collections { grid-template-columns: minmax(0, 1fr); }
}

/* AI15 T: the AI assistants course (/dashboard/help/ai-assistants-training) */
.training-step { display: block; font-size: 12px; font-weight: 500; color: var(--navy-mid); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.training-part--again { border-color: #FECACA; box-shadow: 0 0 0 2px #FEE2E2; }
.training-check { max-width: 760px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--navy-tint, #eef1f5); }
.training-check-title { font-size: 16px; margin: 0 0 12px; color: var(--navy); }
.training-question { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.training-question legend { font-weight: 600; color: var(--navy); margin-bottom: 8px; padding: 0; overflow-wrap: anywhere; }
.training-option { padding: 6px 0; overflow-wrap: anywhere; }
.training-wrong { margin: 8px 0; padding-left: 22px; }
.training-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.training-submit .detail-note { margin: 0; flex: 1 1 240px; }

/* AI15 C: "Ask EstatesBase" names the EstatesBase lookups an answer used */
.ai-chat-tool-note {
  font-size: 11px;
  color: var(--navy-mid);
  margin: 2px 0 6px;
  overflow-wrap: anywhere;
}

/* AI15 U: the AI assistants usage report (Board pack tab and part) and Connect's weekly trend */
.ai-usage-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ai-usage-period { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0; }
.ai-usage-period .form-label { width: 100%; margin: 0; }
.ai-usage-period .form-input { flex: 1 1 220px; min-width: 0; max-width: 480px; }
.ai-usage-chart { position: relative; height: 260px; min-width: 0; }

/* D-087 request 2 (361): the asset transfer acceptance step (Assets, Transfers; the record's waiting notice). */
.asset-transfer-waiting { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; }
.asset-transfer-waiting > div { flex: 1 1 260px; min-width: 0; }
.asset-transfer-list { display: flex; flex-direction: column; gap: 16px; }
.asset-transfer-item { border: 1px solid var(--navy-tint); border-radius: 8px; padding: 16px; min-width: 0; }
.asset-transfer-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.asset-transfer-decide { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.asset-transfer-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.asset-transfer-form .form-input { width: 100%; }

/* EG1 (382): Settings, Evidence rules: the kinds each task type needs, one collapsible row per task type (fits 375px: the
   row and each kind's fields wrap; no sideways scroll); and the "This task needs" line on the task card and the requirement page. */
.ev-rules__group { font-family: 'Outfit', system-ui, sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; color: rgba(64,82,104,0.6); margin: 14px 0 6px; }
.ev-rule { border: 1px solid var(--navy-tint); border-radius: 8px; margin: 0 0 8px; min-width: 0; }
.ev-rule[open] { border-color: var(--teal); }
.ev-rule__summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 12px; cursor: pointer; list-style: none; min-width: 0; }
.ev-rule__summary::-webkit-details-marker { display: none; }
.ev-rule__summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--navy-mid); border-bottom: 2px solid var(--navy-mid); transform: rotate(-45deg); flex: 0 0 auto; margin-right: 2px; transition: transform 0.15s; }
.ev-rule[open] > .ev-rule__summary::before { transform: rotate(45deg); }
.ev-rule__name { font-size: 14px; color: var(--navy); flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.ev-rule__line { font-size: 13px; color: var(--navy-mid); flex: 2 1 260px; min-width: 0; overflow-wrap: anywhere; }
.ev-rule__badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ev-rule--closed > .ev-rule__summary { text-decoration: none; color: inherit; }
.ev-rule--closed > .ev-rule__summary::before { transform: rotate(-45deg); }
.ev-rule--closed:hover { border-color: var(--teal); }
.ev-rule__change { font-size: 12px; color: var(--teal); text-decoration: underline; white-space: nowrap; }
.ev-rule__body { border-top: 1px solid var(--navy-tint); padding: 8px 12px 12px; }
.ev-kind { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; padding: 8px 0; border-bottom: 1px dashed var(--navy-tint); min-width: 0; }
.ev-kind:last-of-type { border-bottom: 0; }
.ev-kind--off .ev-kind__kind { color: var(--navy-mid); }
.ev-kind__edit, .ev-kind__add, .ev-kind__mode { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0; min-width: 0; flex: 1 1 auto; }
.ev-kind__kind { font-size: 13px; font-weight: 600; color: var(--navy); flex: 1 1 160px; min-width: 0; align-self: center; overflow-wrap: anywhere; }
.ev-kind__note { display: inline; font-weight: 400; margin: 0 0 0 4px; }
.ev-kind__field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--navy-mid); min-width: 0; }
.ev-kind__field > span { font-family: 'Outfit', system-ui, sans-serif; letter-spacing: 0.04em; }
.ev-kind__field .form-input { width: 112px; min-width: 0; }
.ev-kind__field--wide .form-input { width: 100%; max-width: 420px; }
.ev-kind__field--wide { flex: 1 1 240px; }
.ev-kind__actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ev-rule__foot { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--navy-tint); }
.ev-kind__mode label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--navy); }
.ev-kind__add--set { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--navy-tint); }
.ev-needs-item { grid-column: 1 / -1; }
.ev-needs { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ev-needs__item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 14px; color: var(--navy); }
.ev-needs__mark { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center; font-size: 12px; flex: 0 0 auto; background: var(--navy-tint); color: var(--navy-mid); }
.ev-needs__item--held .ev-needs__mark { background: var(--emerald-50); color: var(--emerald-700); }
.ev-needs__item--outstanding .ev-needs__mark { background: var(--amber-50); color: var(--amber-700); }
.ev-needs__held { font-size: 12px; color: var(--emerald-700); }
@media (max-width: 640px) {
  .ev-rule__summary { padding: 10px; }
  .ev-rule__name, .ev-rule__line { flex-basis: 100%; }
  .ev-kind__field { flex: 1 1 calc(50% - 6px); }
  .ev-kind__field .form-input { width: 100%; }
  .ev-kind__edit .btn, .ev-kind__add .btn { flex: 1 1 100%; }
}

/* ── EG2 (383): the completion method, round exclusions, rotation coverage, log entries ───────────── */
.cm-choice { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.cm-option { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--navy-tint); border-radius: 8px; cursor: pointer; min-width: 0; }
.cm-option input[type="radio"] { margin: 3px 0 0; flex: 0 0 auto; }
.cm-option--current { border-color: var(--teal); background: rgba(75, 151, 155, 0.08); }
.cm-option--off { opacity: 0.6; cursor: not-allowed; }
.cm-option__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cm-option__label { font-size: 14px; font-weight: 600; color: var(--navy); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cm-option__hint { font-size: 12px; color: var(--navy-mid); line-height: 1.5; overflow-wrap: anywhere; }
.cm-choice__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cm-readonly { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--navy-mid); }
.cm-readonly--current { color: var(--navy); font-weight: 600; }
.cm-whole-closed { color: var(--amber-700); }
.excl-table .td { vertical-align: top; }
.excl-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0; }
.excl-form__field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--navy-mid); min-width: 0; flex: 1 1 140px; }
.excl-form__field--wide { flex: 1 1 240px; }
.excl-form__field > span { font-family: 'Outfit', system-ui, sans-serif; letter-spacing: 0.04em; }
.excl-form__field .form-input { width: 100%; min-width: 0; }
.excl-asset__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.excl-asset__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--navy); min-width: 0; }
.excl-asset__row--out { color: var(--navy-mid); }
.excl-asset__row--out .excl-asset__words { background: var(--amber-50); border-radius: 6px; padding: 4px 8px; }
.excl-asset__words { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.excl-asset__details { flex: 1 1 100%; }
.excl-asset__details > summary { list-style: none; display: inline-flex; cursor: pointer; }
.excl-asset__details > summary::-webkit-details-marker { display: none; }
.excl-asset__form { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.excl-asset__form .form-input { flex: 1 1 240px; min-width: 0; }
.rot-cov { padding: 10px 16px 14px; border-bottom: 1px solid var(--navy-tint); }
.rot-cov:last-child { border-bottom: 0; }
.rot-cov__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 8px; font-size: 13px; color: var(--navy); }
.rot-cov .data-table { font-size: 12.5px; }
.evidence-item--log { align-items: flex-start; }
.evidence-item-icon--log { background: var(--amber-50); color: var(--amber-700); }
.evidence-item-note { margin: 2px 0 2px; font-size: 13px; color: var(--navy); line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.log-entry-form textarea.form-input { width: 100%; resize: vertical; min-height: 56px; }
.log-entry-form__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 6px; }
@media (max-width: 640px) {
  .cm-option { padding: 8px 10px; }
  .excl-form .btn, .excl-asset__form .btn, .cm-choice__actions .btn { flex: 1 1 100%; }
  .excl-asset__row .btn { flex: 0 0 auto; }
}

/* EG3 (384, 29 Oct 2026): the completion form on the web (dashboard.js ebCompletionForm). One block; holds at 375px. */
.cf-form { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cf-note { margin: 0; padding: 8px 12px; border-radius: 6px; background: var(--amber-50); color: var(--amber-700); font-size: 13px; line-height: 1.5; }
.cf-section { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cf-section__title { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--navy-mid); }
.cf-section__sub { margin: 4px 0 0; font-size: 12.5px; font-weight: 600; color: var(--navy-mid); }
.cf-item { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--navy-tint); border-radius: 8px; min-width: 0; scroll-margin-top: 90px; }
.cf-item--fail { border-color: #FECACA; background: #FFF7F7; }
.cf-item--refused { border-color: var(--red-500); box-shadow: 0 0 0 2px rgba(239,68,68,0.18); }
.cf-item__prompt { font-size: 14px; color: var(--navy); line-height: 1.45; }
.cf-item__required { font-size: 12px; color: var(--navy-mid); }
.cf-item__guidance { margin: -2px 0 0; font-size: 12.5px; color: var(--navy-mid); line-height: 1.5; }
.cf-item__msg { margin: 0; font-size: 12.5px; color: var(--red-600); }
.cf-item__msg--pending { color: var(--navy-mid); }
.cf-item__msg--need { color: var(--amber-700); }
.cf-item__warn { margin: 0; padding: 6px 10px; border-radius: 6px; background: var(--amber-50); color: var(--amber-700); font-size: 12.5px; line-height: 1.5; }
.cf-item__note { display: flex; flex-direction: column; gap: 4px; }
.cf-item__note-label { font-size: 12.5px; }
/* FL lane C (775; Richard's F11 and F21): put right there and then, beside the note; the standing line with a standard form */
.cf-item__put-right { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--navy); cursor: pointer; margin-top: 2px; }
.cf-item__put-right[hidden] { display: none !important; }
.cf-item__put-right-box { width: 16px; height: 16px; margin: 0; accent-color: var(--emerald-700); }
.cf-standard-line { font-size: 12.5px; line-height: 1.5; color: var(--navy-mid); background: var(--navy-tint); border-left: 3px solid var(--navy-mid); padding: 6px 10px; margin: 0 0 12px; border-radius: 4px; }
.cf-standard-line--row { margin: 6px 0 0; font-size: 12px; padding: 4px 8px; }
.cf-item__note textarea.form-input, .cf-item textarea.form-input { width: 100%; min-height: 48px; height: auto; padding: 8px 10px; resize: vertical; }
.cf-item__note-toggle { align-self: flex-start; background: none; border: 0; padding: 0; font-family: 'Outfit', system-ui, sans-serif; font-size: 12.5px; color: var(--teal); cursor: pointer; text-decoration: underline; }
.cf-item__note-toggle:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 3px; }
.cf-item__fail-photo { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 6px; background: var(--amber-50); }
/* FL lane A (772): a photo ASKED for on a fail, never needed: plain, not the "needed" amber */
.cf-item__fail-photo--asked { background: var(--bg); border: 1px solid var(--navy-tint); }
.cf-item__fail-photo--asked .cf-item__msg { color: var(--navy-mid); }
.cf-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-seg__opt { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--navy-tint); border-radius: 999px; font-size: 13.5px; color: var(--navy); background: var(--white); cursor: pointer; user-select: none; }
.cf-seg__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.cf-seg__opt.is-on { border-color: var(--navy); background: var(--navy); color: var(--white); }
.cf-seg__opt--pass.is-on { border-color: var(--emerald-700); background: var(--emerald-700); }
.cf-seg__opt--fail.is-on { border-color: var(--red-600); background: var(--red-600); }
.cf-seg__input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 8px; border-radius: 999px; }
.cf-number { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cf-number__input { max-width: 200px; }
.cf-number__unit { font-size: 13px; color: var(--navy-mid); white-space: nowrap; }
.cf-photo-item { display: flex; flex-direction: column; gap: 8px; }
.cf-photos { display: flex; flex-direction: column; gap: 6px; }
.cf-photos:empty { display: none; }
.cf-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--navy-tint); border-radius: 6px; background: var(--white); min-width: 0; }
.cf-photo__thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; flex: 0 0 auto; }
.cf-photo__name { flex: 1 1 140px; min-width: 0; font-size: 13px; color: var(--navy); overflow-wrap: anywhere; }
.cf-photo__kind { font-size: 12px; color: var(--navy-mid); }
.cf-upload { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cf-upload__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.cf-upload__file { flex: 1 1 220px; min-width: 0; height: auto; padding: 6px 8px; font-size: 13px; }
.cf-upload__kind { flex: 0 1 200px; min-width: 0; }
.cf-asset { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--navy-tint); border-left: 3px solid var(--teal); border-radius: 8px; min-width: 0; }
.cf-asset__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--navy); }
.cf-asset__head .detail-note { margin: 0; }
.cf-asset__photo { display: flex; flex-direction: column; gap: 4px; }   /* walk fix 22 Nov (ST-721.4): a photo of one item */
.cf-asset__outcome { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.cf-asset__items { display: flex; flex-direction: column; gap: 10px; }
.cf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-actions .btn { flex: 1 1 180px; }
.cf-actions__hint { margin: -6px 0 0; }
.cf-reasons { margin: 0; padding: 10px 14px 10px 30px; border-radius: 6px; background: var(--amber-50); color: var(--amber-700); font-size: 13px; line-height: 1.6; border: 1px solid #FDE68A; }
.cf-reasons__link { cursor: pointer; text-decoration: underline; text-decoration-color: rgba(180,83,9,0.4); }
.cf-reasons__link:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 3px; }
.form-refusal { background: var(--red-50); color: var(--red-600); padding: 10px 14px; border-radius: 6px; font-size: 13px; line-height: 1.5; border: 1px solid rgba(220,38,38,0.2); }
@media (max-width: 640px) {
  .cf-item { padding: 10px; }
  .cf-seg__opt { flex: 1 1 auto; justify-content: center; }
  .cf-number__input { max-width: none; flex: 1 1 auto; }
  .cf-actions .btn { flex: 1 1 100%; }
}

/* 31 Oct (EG test pass, 375px): a structure level's badge may wrap, and a select with long option text never widens its form past the phone. */
.hier-level .badge { white-space: normal; max-width: 100%; }
.form-group { min-width: 0; }
.form-group .form-select, .form-group .form-input { max-width: 100%; }

/* HS15 (lane SL): the toolbox talk's signature pad (views/hs/toolbox-talk.php, dashboard.js [data-tb-sign]). */
.tb-sign-btn { display: flex; width: fit-content; margin-top: 6px; }
.sig-pad-modal { max-width: 640px; }
.sig-pad__canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; background: #fff; border: 1px dashed var(--navy-tint); border-radius: 8px; touch-action: none; cursor: crosshair; }
.sig-pad__hint { margin: 6px 0 0; font-size: 12px; color: var(--navy-mid); }
.sig-pad__refusal { margin-top: 10px; }
.sig-pad-modal .team-confirm-actions { flex-wrap: wrap; }
.sig-pad__clear { margin-right: auto; }
@media (max-width: 640px) {
  .sig-pad-modal { padding: 16px; width: calc(100% - 32px); }
}

/* =============================================
   CONNECT SUPPORT (FB2)
   ============================================= */
/* 1 Dec 2026: a submenu row that carries its parent's badge (Connect, Support > Inbox). */
.sidebar-sublink--counted { display: flex; align-items: center; gap: 8px; }
.sidebar-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--teal); color: var(--white); font-size: 11px; font-weight: 600; line-height: 20px; text-align: center; }
.support-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; color: var(--navy); text-decoration: none; }
.support-tile:hover { border-color: var(--teal); }
.support-tile-label { font-size: 12px; color: var(--navy-mid); }
.support-tile-n { font-size: 24px; font-weight: 600; line-height: 1.2; }
.support-tile--late .support-tile-n { color: #B91C1C; }
.support-views { max-width: 100%; overflow-x: auto; }
.support-views .tab-trigger { display: inline-block; white-space: nowrap; text-decoration: none; }
.support-view-n { color: var(--navy-mid); font-size: 12px; }
.support-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; background: var(--white); border: 1px solid var(--navy-tint); border-radius: 4px; font-size: 13px; }
.support-bulk select, .support-bulk input[type="text"] { width: auto; max-width: 100%; }
.support-bulk input[type="text"] { flex: 1 1 200px; }
.support-table .td { vertical-align: top; }
.support-title { min-width: 200px; max-width: 320px; overflow-wrap: anywhere; }
.support-sub { color: var(--navy-mid); font-size: 12px; }
.support-thumb { display: block; width: 64px; height: 40px; object-fit: cover; object-position: top; border: 1px solid var(--navy-tint); border-radius: 3px; }
.support-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; }
.support-reason { margin: 0; font-size: 14px; color: var(--navy); }
.support-main, .support-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.support-sent-title { margin: 0 0 6px; font-weight: 600; color: var(--navy); overflow-wrap: anywhere; }
.support-sent { font-size: 14px; line-height: 1.55; color: var(--navy); overflow-wrap: anywhere; }
.support-picture { display: block; margin-top: 12px; }
.support-picture img { display: block; max-width: 100%; height: auto; border: 1px solid var(--navy-tint); border-radius: 6px; }
.support-timeline { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.support-event { padding-left: 12px; border-left: 2px solid var(--navy-tint); font-size: 13px; color: var(--navy-mid); overflow-wrap: anywhere; }
.support-event-line { color: var(--navy); }
.support-event-meta { display: block; font-size: 12px; }
.support-event-note { margin-top: 2px; color: var(--navy); }
.support-note { padding: 10px 12px; background: #FEF9EC; border: 1px solid #F5E3B3; border-radius: 4px; }
.support-note-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 4px; font-size: 12px; color: var(--navy-mid); }
.support-note--reply { background: var(--white); border-color: var(--navy-tint); }
.support-note--reporter { background: var(--white); border-color: var(--navy-tint); border-left: 3px solid var(--navy-mid); }
.support-composer { padding: 12px; background: #FEF9EC; border: 1px solid #F5E3B3; border-radius: 4px; }
.support-composer[data-open="reply"] { background: var(--white); border-color: var(--navy-tint); }
.support-composer .form-group { margin-bottom: 8px; }
.support-composer .form-textarea { width: 100%; background: var(--white); }
.support-composer-tabs { display: flex; gap: 4px; margin: -4px 0 10px; border-bottom: 1px solid var(--navy-tint); }
.support-composer-tab { padding: 6px 10px; margin-bottom: -1px; background: none; border: 0; border-bottom: 2px solid transparent; font: inherit; font-size: 13px; color: var(--navy-mid); cursor: pointer; }
.support-composer-tab[aria-selected="true"] { color: var(--navy); font-weight: 600; border-bottom-color: var(--navy); }
.support-composer-why { margin: 8px 0 0; }
.support-composer-check { margin-bottom: 8px; padding: 8px 10px; background: #FEF9EC; border: 1px solid #F5E3B3; border-radius: 4px; font-size: 13px; color: var(--navy); }
.support-composer-check p { margin: 0 0 6px; }
.support-composer-check label { display: flex; align-items: center; gap: 6px; }
.support-facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 13px; }
.support-facts dt { color: var(--navy-mid); }
.support-facts dd { margin: 0; min-width: 0; }
.support-wrap { overflow-wrap: anywhere; }
.support-builders { margin-top: 12px; font-size: 13px; }
.support-joined { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; background: var(--white); border: 1px solid var(--navy-tint); border-left: 3px solid var(--teal); border-radius: 4px; font-size: 14px; color: var(--navy); }
.support-joined form { margin: 0; }
.support-tester-label { margin: 12px 0 2px; font-size: 12px; font-weight: 600; color: var(--navy-mid); }
.support-side-label { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--navy-mid); }
.support-links { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--navy); overflow-wrap: anywhere; }
.support-like { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.support-like form { margin: 0; flex: none; }
.support-note-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; color: var(--navy); }
.support-add-org { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0; }
.support-add-org .form-group { flex: 1 1 240px; margin: 0; }
.support-periods { display: flex; flex-wrap: wrap; gap: 8px; }
.support-chart { position: relative; height: 240px; min-width: 0; }
.support-num { text-align: right; font-variant-numeric: tabular-nums; }
.support-builders summary { cursor: pointer; color: var(--navy-mid); }
.support-crash-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.support-crash-tiles dt { font-size: 12px; color: var(--navy-mid); }
.support-crash-tiles dd { margin: 0; font-size: 16px; font-weight: 600; }
.support-crash-tiles div:first-child dd { font-size: 24px; }
.support-crash-trace { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border, #E5E7EB); }
.support-crash-trace p { margin: 0 0 4px; }
@media (max-width: 640px) { .support-crash-tiles { grid-template-columns: 1fr 1fr; } }
.support-builders pre { max-width: 100%; overflow-x: auto; font-size: 12px; }

/* ── TB3 (418): Support > Test bed ────────────────────────────────────────── */
.test-bed-tabs { margin-bottom: 20px; max-width: 100%; }
.test-bed-tabs .tab-list { flex-wrap: wrap; max-width: 100%; }
.test-bed-tabs .tab-trigger { text-decoration: none; }
/* TB3 lane ST: stories */
.story-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.story-list__title { min-width: 200px; }
.story-unsaved { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--amber-700); }
.story-fact { margin: 0 0 8px; font-size: 14px; color: var(--navy); overflow-wrap: anywhere; }
.story-groups { margin: 0; padding: 0; border: 0; min-width: 0; }
.story-groups__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 6px 16px; }
.story-groups__item { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--navy); cursor: pointer; }
.story-groups__item input { flex: none; margin-top: 2px; }
.story-steps { display: flex; flex-direction: column; gap: 12px; }
.story-step { min-width: 0; padding: 12px; border: 1px solid var(--navy-tint); border-radius: 8px; background: var(--white); }
.story-step__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.story-step__title { margin: 0; font-size: 14px; font-weight: 600; color: var(--navy); }
.story-step__tools { display: flex; flex-wrap: wrap; gap: 6px; }
.story-step__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.story-step__field { display: block; min-width: 0; margin: 0; }
.story-step__field textarea { width: 100%; max-width: 100%; box-sizing: border-box; resize: vertical; }
.story-steps__add { margin-top: 12px; }
.story-save { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.story-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.story-version { padding: 8px 0; border-top: 1px solid var(--navy-tint); font-size: 13px; color: var(--navy); }
.story-version:first-child { padding-top: 0; border-top: 0; }
.story-version summary { cursor: pointer; overflow-wrap: anywhere; }
.story-read-steps { margin: 10px 0 4px; padding-left: 20px; }
.story-read-steps li { margin-bottom: 10px; }
.story-read-steps p { margin: 0 0 4px; overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 640px) {
  .story-step__fields { grid-template-columns: minmax(0, 1fr); }
}
/* TB3 lane RN: runs */
.test-bed-sub { font-size: 12px; color: var(--navy-mid); }
.test-bed-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.test-bed-pick select { width: auto; max-width: 200px; }
.test-bed-form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0; }
.test-bed-form-row .form-group { flex: 1 1 240px; min-width: 0; margin: 0; }
.test-bed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.test-bed-actions form { margin: 0; }
.test-bed-round-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.test-bed-facts { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 14px; min-width: 0; }
.test-bed-facts dt { color: var(--navy-mid); }
.test-bed-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.test-bed-revealed { background: #FEF9EC; border-bottom: 1px solid #F5E3B3; }
.test-bed-revealed-head { margin: 0 0 8px; font-weight: 600; color: var(--navy); overflow-wrap: anywhere; }
.test-bed-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--navy); }
.test-bed-note { margin: 8px 0 0; padding: 8px 10px; background: var(--bg); border-radius: 4px; font-size: 14px; }
.test-bed-step { scroll-margin-top: 80px; }
.test-bed-refusal { margin-bottom: 12px; }
.test-bed-step-text { margin: 0; font-size: 14px; }
.test-bed-step-text dt { margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--navy-mid); }
.test-bed-step-text dt:first-child { margin-top: 0; }
.test-bed-step-text dd { margin: 2px 0 0; }
.test-bed-mark { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--navy-tint); }
.test-bed-mark .test-bed-actions { margin-top: 8px; }
.test-bed-num { text-align: right; font-variant-numeric: tabular-nums; }
.test-bed-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 12px; }
.test-bed-count { padding: 12px; background: var(--white); border: 1px solid var(--navy-tint); border-radius: 4px; }
.test-bed-count-n { font-size: 24px; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.test-bed-count-label { font-size: 12px; color: var(--navy-mid); }
.test-bed-bad + .test-bed-bad { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--navy-tint); }
.test-bed-bad-head { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.test-bed-bad .test-bed-sub { margin: 2px 0 0; }
.test-bed-strip { flex: 1 1 100%; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.test-bed-way { margin: 0 0 8px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.test-bed-way .test-bed-sub { margin-left: 6px; }
.test-bed-way .btn { max-width: 100%; white-space: normal; text-align: left; }
.test-bed-link { overflow-wrap: anywhere; word-break: break-word; }
.test-bed-revealed--inline { margin: 0 0 12px; padding: 12px; border: 1px solid #F5E3B3; border-radius: 4px; }
.test-bed-login { margin: 0 0 12px; padding: 12px; background: #FEF9EC; border: 1px solid #F5E3B3; border-radius: 4px; }
.test-bed-login-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 6px; }
.test-bed-login-row .form-label { margin: 0; }
.test-bed-check { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--navy-tint); font-size: 14px; }
.test-bed-check-head { margin: 0; overflow-wrap: anywhere; }
.test-bed-mark input[type="file"] { max-width: 100%; min-width: 0; }
/* TB9: the Coverage tab. Long register words wrap; nothing sets a width, so the page fits at 375px. */
.test-bed-cov-group + .test-bed-cov-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--navy-tint); }
.test-bed-cov-group summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--navy); overflow-wrap: anywhere; }
.test-bed-cov-group summary .test-bed-sub { font-weight: 400; }
.test-bed-cov-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; }
.test-bed-cov-list li { padding: 6px 0; border-top: 1px solid var(--navy-tint); min-width: 0; overflow-wrap: anywhere; }
.test-bed-cov-list li:first-child { border-top: 0; }
.test-bed-cov-ref { display: inline-block; min-width: 52px; margin-right: 6px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--navy); }
.test-bed-cov-why { display: block; margin-top: 2px; }

/* Ticket 130 (7 Nov 2026): a cell's row of controls. The flex sits on a box inside the td, never on the td itself,
   or the cell leaves the table's layout and the row borders step (Contractors, To review). */
.td-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.td-actions--stack { flex-direction: column; }

/* D094 (455): a demonstration organisation's trial notice (partials/_trial_notice.php, the sign-in page). In the main column,
   never the header, so the phone header still fits at 375px; it wraps on a narrow screen and never scrolls sideways. */
.trial-notice { display: flex; gap: 10px; align-items: flex-start; background: var(--blue-50); color: var(--navy); border: 1px solid #BFDBFE;
  border-left: 4px solid var(--blue-500); border-radius: 6px; padding: 10px 14px; margin-bottom: 16px; font-size: 13.5px; line-height: 1.45;
  overflow-wrap: anywhere; min-width: 0; }
.trial-notice__icon { flex: 0 0 auto; margin-top: 2px; color: var(--blue-500); }
.trial-notice--sign-in { margin-bottom: 20px; font-size: 14px; }

/* D094 (456): the provision checklist (Settings > Compliance > Provision checklist; the set-up path's step 3). */
.checklist-group { border: 1px solid var(--navy-tint); border-radius: 8px; margin-bottom: 10px; background: var(--white, #fff); }
.checklist-group__summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; list-style: none; }
.checklist-group__summary::-webkit-details-marker { display: none; }
.checklist-group__summary::before { content: '▸'; color: var(--teal); margin-right: 6px; }
.checklist-group[open] > .checklist-group__summary::before { content: '▾'; }
.checklist-group__name { font-weight: 600; flex: 1; min-width: 0; }
.checklist-group__count { color: var(--text-muted, #64748b); font-size: 13px; white-space: nowrap; }
.checklist-group__body { padding: 0 14px 8px; border-top: 1px solid var(--navy-tint); }
.checklist-group__none { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0 4px; }
.checklist-proposal { margin-top: 4px; font-size: 13px; color: var(--teal-hover); overflow-wrap: anywhere; }
.checklist-sitewide { margin-top: 4px; font-size: 13px; color: var(--text-muted, #64748b); }

/* D100 (ticket 176): a meter reading's Correct… opens as a small panel under its button, so the readings table in its
   half-width card never scrolls sideways. */
.reading-correct > summary { list-style: none; cursor: pointer; }
.reading-correct > summary::-webkit-details-marker { display: none; }
.reading-correct__panel { position: absolute; right: 8px; top: calc(100% - 6px); z-index: 20; width: 260px; display: grid; gap: 6px;
  padding: 12px; background: var(--white); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12); }
.reading-correct__panel label { font-size: 0.85rem; }


/* SW issue 147 (12 Nov 2026): the type-ahead drawn for every box with a list (dashboard.js), in place of the browser's own. */
.eb-typeahead {
  position: absolute;
  z-index: 70;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 300px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--navy-tint);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: var(--navy);
  text-align: left;
}
.eb-typeahead__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  cursor: pointer;
  line-height: 1.3;
}
.eb-typeahead__item:hover,
.eb-typeahead__item.is-active { background: var(--navy-tint); }
.eb-typeahead__label { font-size: 12px; color: var(--navy-mid); }
.eb-typeahead__note { padding: 8px 12px; font-size: 12px; color: var(--navy-mid); cursor: default; }

/* BL-A (15 Nov 2026, D2): a building's own interval on the requirement page, opened from its row. */
.bl-freq { display: inline-block; text-align: left; }
.bl-freq > summary { list-style: none; cursor: pointer; }
.bl-freq > summary::-webkit-details-marker { display: none; }
.bl-freq__panel { margin-top: 6px; padding: 8px; border: 1px solid var(--navy-tint); border-radius: 8px; background: var(--white); max-width: 320px; white-space: normal; }

/* ── TL: the training library (help/training.php, help/training-job.php) and Home's strip ─────────────────────────
   Sessions as cards (the setup-programme look: a teal top rule), jobs numbered on the onb-rail dot (emerald when done,
   teal for the next one, the title kept readable). Existing tokens only. Fits 375px. The design review of 16 Nov put
   it on the house scale: 4/8/12/16/24 spacing, 4px outer surfaces, 8px inner panels and rows, whole px type. */
.main-content:has(.training) .page-intro { font-size: 14px; text-wrap: pretty; }
.training-overall { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; color: var(--navy-mid); }
.training-overall .training-overall__bar { flex: 0 0 160px; }
/* At most three cards a row: a column is never narrower than a third of the row (less the gaps) nor than 340px, so a
   wide screen gets three, a medium one two, a phone one (min(100%) keeps 375px in one column). Cards in a row share a
   height; their words sit at the top. */
.training-sessions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(340px, (100% - 40px) / 3)), 1fr)); gap: 20px; align-items: stretch; max-width: 1320px; }
.training-session { background: var(--white); border: 1px solid var(--navy-tint); border-top: 3px solid var(--teal); border-radius: 4px; padding: 24px; min-width: 0; }
.training-session.is-complete { border-top-color: var(--emerald-600); }
.training-session__title { margin: 0 0 8px; font-size: 18px; color: var(--navy); line-height: 1.3; }
.training-session__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 12px; font-size: 13px; color: var(--navy-mid); }
.training-session__meta span { display: inline-flex; align-items: center; gap: 4px; }
.training-session__meta svg, .training-session__meta i { width: 14px; height: 14px; flex-shrink: 0; }
.training-session__outcome { margin: 0 0 16px; font-size: 14px; color: var(--navy); line-height: 1.5; }
.training-session__progress { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--navy-tint); }
.training-session__count { flex-shrink: 0; min-width: 84px; font-size: 13px; font-weight: 600; color: var(--navy-mid); font-variant-numeric: tabular-nums; }
.training-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--navy-tint); overflow: hidden; }
.training-bar > span { display: block; height: 100%; background: var(--emerald-600); border-radius: 999px; }
.training-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* The whole row opens the job: the title's ::after covers the row (the link stays the one focusable thing). */
.training-list__item { position: relative; display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 10px 8px; margin: 0 -8px; border-radius: 8px; }
.training-list__item:hover { background: var(--bg); }
.training-list__dot { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--navy-tint); color: var(--navy-mid); }
.training-list__dot svg, .training-list__dot i { width: 14px; height: 14px; }
.training-list__item.is-done .training-list__dot { background: var(--emerald-600); color: var(--white); }
.training-list__item.is-next .training-list__dot { background: var(--teal); color: var(--white); }
.training-list__text { min-width: 0; flex: 1; }
.training-list__title { font-weight: 600; color: var(--navy); text-decoration: none; overflow-wrap: anywhere; }
.training-list__title::after { content: ''; position: absolute; inset: 0; border-radius: 8px; }
.training-list__item:hover .training-list__title { color: var(--teal-hover); text-decoration: underline; }
.training-list__title:focus-visible { outline: none; }
.training-list__title:focus-visible::after { outline: 2px solid var(--teal); outline-offset: 2px; }
.training-list__done { font-size: 12px; font-weight: 600; color: var(--emerald-700); }
.training-list__app { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 12px; color: var(--teal-hover); }
.training-list__app svg, .training-list__app i { width: 13px; height: 13px; }
.training-list__summary { margin: 4px 0 0; font-size: 14px; color: var(--navy-mid); line-height: 1.5; overflow-wrap: anywhere; }
.training-panel { display: grid; gap: 4px; max-width: 1320px; background: var(--white); border: 1px solid var(--navy-tint); border-radius: 4px; padding: 16px 20px; }
.training-crumb { flex-wrap: wrap; }
/* The job page: the state (house badges) at the right of the breadcrumb; one column, the main card then the side
   (Why, Next); two columns from 1240px (the sidebar takes 260px, so about 920px of content), the side sticky under the
   header while the steps scroll when the screen is tall enough to hold it. */
.training-job__state { display: flex; flex-wrap: wrap; gap: 8px; }
.training-job__state .badge { gap: 4px; }
.training-job__state .badge svg, .training-job__state .badge i { width: 12px; height: 12px; }
.training-job-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.training-job { min-width: 0; }
.training-job > .card-body { display: flex; flex-direction: column; gap: 24px; padding: 24px; }
.training-job .help-body > :last-child { margin-bottom: 0; }
.training-job__side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
@media (min-width: 1240px) {
  .training-job-layout { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
}
@media (min-width: 1240px) and (min-height: 800px) {
  .training-job__side { position: sticky; top: 80px; }
}
.training-job__lede { font-size: 16px; }
.training-job__open { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 0; padding: 16px 20px; border-radius: 8px; background: var(--bg); border: 1px solid var(--navy-tint); border-left: 4px solid var(--teal); }
.training-job__open-text { flex: 1 1 280px; min-width: 0; }
.training-job__open-label { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--navy-mid); text-transform: uppercase; letter-spacing: .03em; }
.training-job__open-words { margin: 0; font-size: 15px; font-weight: 600; color: var(--navy); overflow-wrap: anywhere; }
.training-job__open-words.is-quiet { font-weight: 400; font-size: 14px; color: var(--navy-mid); }
.training-job__open-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; }
.training-job__open-btn svg, .training-job__open-btn i { width: 16px; height: 16px; }
.training-job__section, .training-job__confirm { margin: 0; }
.training-job__heading { margin: 0 0 12px; font-size: 16px; color: var(--navy); }
.training-job__section > .training-job__heading { font-size: 20px; }
/* Steps number on across the groups (the articles say "in step 6"), so the count is the section's, not each list's. */
.training-steps { counter-reset: tstep; font-size: 15px; }
.training-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.training-steps ol > li { counter-increment: tstep; position: relative; padding-left: 38px; min-height: 26px; line-height: 1.55; }
.training-steps ol > li + li { margin-top: 0; }
.training-steps ol > li::before { content: counter(tstep); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--teal); color: var(--white); }
/* Step groups: a bold label paragraph (**The in-house check**) before each numbered list, drawn as a small label like
   Next in this session's. A line of space above whatever follows a list. Training steps only. */
.training-steps > ol + p { margin-top: 24px; }
.training-steps > p:has(+ ol) { margin-bottom: 8px; }
.training-steps > p:has(> strong:only-child):has(+ ol) { margin: 24px 0 10px; font-size: 13px; font-weight: 600; color: var(--navy-mid); text-transform: uppercase; letter-spacing: .03em; }
.training-steps > p:first-child:has(> strong:only-child):has(+ ol) { margin-top: 0; }
.training-steps > p:has(> strong:only-child):has(+ ol) strong { font-weight: inherit; }
.training-job__why { padding: 20px 24px; border-radius: 8px; background: var(--navy-tint); color: var(--navy); }
.training-job__why .training-job__heading { margin: 0 0 12px; font-size: 17px; }
.training-job__why .help-body { max-width: 62ch; font-size: 14px; line-height: 1.6; }
.training-job__why .help-body > :last-child { margin-bottom: 0; }
.training-next__label { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--navy-mid); text-transform: uppercase; letter-spacing: .03em; }
.training-next__link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-radius: 8px; background: var(--white); border: 1px solid var(--navy-tint); color: var(--navy); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.training-next__link:hover { border-color: var(--teal); color: var(--teal); }
.training-next__link svg, .training-next__link i { width: 16px; height: 16px; flex-shrink: 0; }
/* Home's strip: a .card.card--feature in one calm row, the title, the jobs as quiet chips, the count at the end. */
.training-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 20px; }
.training-strip__head { display: contents; }
.training-strip__title { margin: 0; font-size: 16px; color: var(--navy); }
.training-strip__all { order: 3; margin-left: auto; font-size: 13px; color: var(--teal-hover); }
.training-strip__list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.training-strip__job { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: var(--white); border: 1px solid var(--navy-tint); color: var(--navy); font-size: 14px; font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.training-strip__job svg, .training-strip__job i { width: 14px; height: 14px; flex-shrink: 0; }
.training-strip__job:hover { border-color: var(--teal); color: var(--teal); }
@media (max-width: 640px) {
  .training-sessions { grid-template-columns: minmax(0, 1fr); }
  .training-session { padding: 16px; }
  .training-job > .card-body { padding: 20px; }
  .training-job__open { padding: 16px; }
  .training-job__open-btn { width: 100%; justify-content: center; }
  .training-job__confirm .btn { width: 100%; }
  .training-job__why { padding: 16px; }
  .training-strip__list { flex-direction: column; }
  .training-strip > .training-strip__list { flex-basis: 100%; }
  .training-strip__job { display: flex; justify-content: space-between; min-height: 44px; padding: 12px 14px; }
}

/* ── TL lane L2: the training plan editor (partials/_training_plan_editor.php: Settings › People › Training plan and
   Connect's tenant Training tab) and the Training tab's progress. The session cards are the Training page's own
   (.training-session), at most two a row; each job a row with its small actions (one 32px height, borders on the
   arrows only), wrapping under the words at phone width where every control is 40px. */
.tplan { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tplan-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.tplan-summary__line { margin: 0; font-size: 14px; color: var(--navy-mid); }
.tplan-summary__line strong { color: var(--navy); }
.tplan-summary .btn svg, .tplan-summary .btn i, .tplan-own .btn svg, .tplan-own .btn i { width: 14px; height: 14px; }
.tplan-sessions { grid-template-columns: repeat(auto-fill, minmax(min(100%, max(460px, (100% - 20px) / 2)), 1fr)); max-width: 1320px; }
.tplan-session__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tplan-session__words { min-width: 0; }
.tplan-move, .tplan-job__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tplan-move form, .tplan-job__actions form { margin: 0; }
.tplan-job__actions { margin-left: auto; }
.tplan-job__actions .btn-sm { height: 32px; }
.tplan-job__actions .tplan-select { height: 32px; flex: 0 1 auto; padding: 0 8px; font-size: 13px; }
.tplan-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border-radius: 4px; border: 1px solid var(--navy-tint); background: var(--white); color: var(--navy-mid); cursor: pointer; }
.tplan-icon-btn:hover:not([disabled]) { border-color: var(--teal); color: var(--teal); }
.tplan-icon-btn[disabled] { opacity: .35; cursor: default; }
.tplan-icon-btn svg, .tplan-icon-btn i { width: 16px; height: 16px; }
.tplan-icon-btn--plain { border-color: transparent; background: transparent; }
.tplan-icon-btn--plain:hover:not([disabled]) { border-color: transparent; background: var(--bg); }
.tplan-text-btn { background: transparent; border: 1px solid transparent; color: var(--teal-hover); }
.tplan-text-btn:hover { background: var(--bg); color: var(--navy); }
.tplan-list { list-style: none; margin: 0; padding: 0; display: grid; }
.tplan-job { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 8px; margin: 0 -8px; border-top: 1px solid var(--navy-tint); }
.tplan-job:first-child { border-top: 0; }
.tplan-job:hover { background: var(--bg); }
.tplan-job.is-off .tplan-job__title, .tplan-own__item.is-off .tplan-job__title { color: var(--navy-mid); text-decoration: line-through; }
.tplan-job.is-quiet .training-list__dot { background: var(--bg); }
.tplan-job__text { flex: 1 1 200px; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.tplan-job__title { font-weight: 600; color: var(--navy); overflow-wrap: anywhere; text-decoration: none; }
a.tplan-job__title:hover { color: var(--teal); text-decoration: underline; }
.tplan-job__roles { flex-basis: 100%; font-size: 13px; color: var(--navy-mid); }
.tplan-job__note { flex-basis: 100%; font-size: 13px; color: var(--amber-700); }
.tplan-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--cyan-50); color: var(--teal-hover); }
.tplan-roles { position: relative; }
.tplan-roles > summary { list-style: none; cursor: pointer; }
.tplan-roles > summary::-webkit-details-marker { display: none; }
.tplan-roles__form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: grid; gap: 8px; padding: 12px; border: 1px solid var(--navy-tint); border-radius: 8px; background: var(--white); min-width: 200px; box-shadow: 0 4px 12px rgba(11,39,80,.12); }
.tplan-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--navy); cursor: pointer; }
.tplan-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.tplan-checks--stack { flex-direction: column; gap: 8px; }
.tplan-fieldset { border: 0; padding: 0; margin-left: 0; margin-right: 0; min-width: 0; }
.tplan-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--navy-tint); }
.tplan-select { width: auto; max-width: 100%; min-width: 0; flex: 1 1 200px; }
.form-group > .tplan-select { flex: none; width: 100%; }
.tplan-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tplan-own__list { list-style: none; margin: 0; padding: 0; display: grid; }
.tplan-own__item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 0; border-top: 1px solid var(--navy-tint); }
.tplan-own__item:first-child { border-top: 0; padding-top: 0; }
.tplan-editor { max-width: 820px; }
.tplan-editor__lead { margin: 0 0 16px; }
.tplan-form textarea { font-family: inherit; line-height: 1.5; }
.tplan-form__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tplan-label { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tplan-label--active { background: var(--emerald-50); color: var(--emerald-700); }
.tplan-label--quiet { background: var(--amber-50); color: var(--amber-700); }
.tplan-progress { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; }
.tplan-progress .training-bar { min-width: 60px; }
.tplan-facts { display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 8px 16px; font-size: 14px; align-items: baseline; }
.tplan-preview { padding: 8px 0; border-top: 1px solid var(--navy-tint); }
.tplan-preview:first-of-type { border-top: 0; }
.tplan-preview > summary { cursor: pointer; color: var(--navy); }
.tplan-preview__session { margin: 12px 0 4px; font-size: 13px; font-weight: 600; color: var(--navy-mid); text-transform: uppercase; letter-spacing: .03em; }
.tplan-preview__jobs { margin: 0; padding-left: 22px; font-size: 14px; line-height: 1.6; }
.tplan-json { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5; }
.tplan-connect__heading { margin: 8px 0 -4px; font-size: 16px; color: var(--navy); }
@media (max-width: 640px) {
  .tplan-sessions { grid-template-columns: minmax(0, 1fr); }
  .tplan-move, .tplan-job__actions { gap: 8px; }
  .tplan-job__actions { flex-basis: 100%; }
  .tplan-job__actions .btn-sm, .tplan-job__actions .tplan-select { height: 40px; }
  .tplan-icon-btn { width: 40px; height: 40px; }
  .tplan-roles[open] { flex-basis: 100%; }
  .tplan-roles__form { position: static; margin-top: 8px; box-shadow: none; }
  .tplan-form__actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ── TL lane L5: the ready-made caretaker's sign-in (views/help/training/_sandbox_operative.php) and the duties summary
   button (views/help/training-extra/duties-summary.php) on a training job page. Existing tokens only; fits 375px. The
   job card's column gap spaces them, so neither carries an outer margin. */
.training-operative { margin: 0; padding: 16px 20px; border-radius: 8px; background: var(--bg); border: 1px solid var(--navy-tint); }
.training-operative__lead, .training-operative__org { margin: 0 0 12px; font-size: 14px; color: var(--navy); overflow-wrap: anywhere; }
.training-operative__rows { display: grid; gap: 12px; }
.training-operative__row .form-label { margin-bottom: 4px; }
.training-extra { margin: 0; }
.training-extra__form { margin: 0; }
.training-extra__form .btn { display: inline-flex; align-items: center; gap: 8px; }
.training-extra__form .btn svg, .training-extra__form .btn i { width: 16px; height: 16px; }
.training-extra__note { margin: 8px 0 0; font-size: 13px; color: var(--navy-mid); }
@media (max-width: 640px) {
  .training-operative { padding: 16px; }
  .training-extra__form .btn { width: 100%; justify-content: center; }
}

/* ── ZN1 (527): a site's zones, a named group of rooms (views/settings/_site_zones.php, the room's page, the building's
   room list). The swatch is the zone's own colour; existing tokens only; fits 375px. */
.zone-name { white-space: nowrap; }   /* 18 Nov 2026: a longer name (Magenta, Charcoal) kept on its swatch's line */
.zone-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--navy-tint); vertical-align: -1px; margin-right: 6px; flex-shrink: 0; }
.zone-edit summary { list-style: none; cursor: pointer; display: inline-flex; }
.zone-edit summary::-webkit-details-marker { display: none; }
.zone-edit[open] { min-width: 240px; }
.zone-edit__form { margin: 10px 0 0; }
.zone-add { margin: 14px 0 0; }
@media (max-width: 640px) {
  .zone-edit[open] { min-width: 0; }
  .zone-add .btn { width: 100%; justify-content: center; }
}

/* 19 Nov 2026: the Planner's side panel for one visit (views/compliance/_planner_visit.php): the one thing to do first. */
.pv-title { margin: 0; font-family: 'Outfit', system-ui, sans-serif; font-size: 16px; font-weight: 600; color: var(--navy); }
.pv-next { margin: 16px 0 0; padding: 12px 14px; border-left: 3px solid var(--teal); background: var(--navy-tint, #F1F5F9); border-radius: 6px; }
.pv-next-head { margin: 0; font-weight: 600; font-size: 15px; }
.pv-next-detail { margin: 4px 0 0; font-size: 0.9rem; color: var(--navy-mid); }
.pv-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.pv-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 16px 0 0; font-size: 0.9rem; }
.pv-facts dt { color: var(--navy-mid); }
.pv-facts dd { margin: 0; color: var(--navy); }
@media (max-width: 480px) { .team-panel[data-drawer-panel="plannerVisit"] { width: 100%; } }

/* 19 Nov 2026: the task page's reference sections fold to one line (task-detail.php: Schedule, Alert timeline, Details, What this
   task covers, Consequence, Notes, Follow-up actions, Completion record). The card inside keeps its body; its own header hides. */
.task-fold { background: #fff; border: 1px solid var(--navy-tint); border-radius: var(--radius-lg, 10px); }
.task-fold__head { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.task-fold__head::-webkit-details-marker { display: none; }
.task-fold__head::before { content: '\203A'; display: inline-block; color: var(--navy-mid); font-size: 18px; line-height: 1; transition: transform 0.15s ease; }
.task-fold[open] > .task-fold__head::before { transform: rotate(90deg); }
.task-fold__title { font-family: 'Outfit', system-ui, sans-serif; font-weight: 600; font-size: 15px; color: var(--navy); }
.task-fold__summary { color: var(--navy-mid); font-size: 0.85rem; }
.task-fold > .card { border: 0; box-shadow: none; margin: 0; border-top: 1px solid var(--navy-tint); border-radius: 0 0 var(--radius-lg, 10px) var(--radius-lg, 10px); }
.task-fold > .card > .card-header { display: none; }
/* 19 Nov 2026 (the other sections' folds): a fold holding several cards lays them out flat inside its body. */
.task-fold__body > .card { box-shadow: none; }
.do-visit { max-width: 760px; }

/* 19 Nov 2026: the task page's contractor section takes no space on an in-house task (nothing inside it). */
#engagement:not(:has(*)) { display: none; }

/* RB-D4 (W-24, 21 Nov 2026): first the Statutory / All switch (its partial went with CW2, 553). Kept: Settings, Compliance,
   Changes to the standard draws its "Every change / Only those reaching us" switch with these classes. */
.standing-switch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.standing-switch__label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-mid); }
.standing-switch__options { display: inline-flex; border: 1px solid var(--navy-tint); border-radius: 6px; overflow: hidden; background: var(--white); }
.standing-switch__option { padding: 6px 12px; font-size: 13px; color: var(--navy); text-decoration: none; white-space: nowrap; }
.standing-switch__option + .standing-switch__option { border-left: 1px solid var(--navy-tint); }
.standing-switch__option:hover { background: rgba(75,151,155,0.08); }
.standing-switch__option--active { background: var(--teal); color: var(--white); }
.standing-switch__option--active:hover { background: var(--teal); }
.standing-switch__note { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--navy-mid); }

/* RB-D4 (W-35): the changes to the task standard (Settings › Compliance; Connect › Content and standards). */
.standard-change { padding: 14px 16px; border-bottom: 1px solid var(--navy-tint); }
.standard-change:last-child { border-bottom: 0; }
.standard-change__head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.standard-change__date { font-size: 12px; color: var(--navy-mid); white-space: nowrap; }
.standard-change__title { font-weight: 600; color: var(--navy); }
.standard-change__body { margin: 4px 0; line-height: 1.5; color: var(--navy-mid); }
.standard-change__touched { margin: 6px 0 0; font-size: 13px; }

/* RB-D4 (W-23): paste remedials from a report, and the AI read of an uploaded report. */
.finding-paste { margin: 8px 0 4px; padding: 10px 12px; border: 1px dashed var(--navy-tint); border-radius: 6px; background: var(--white); }
.finding-paste[hidden] { display: none !important; }
.finding-paste textarea { width: 100%; }
.finding-paste__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.finding-row--proposed { background: rgba(75,151,155,0.06); }

/* RB-D5 (544, W-52): What staff need to know, read first on an assessment's reading page, the full assessment below it */
.ra-staff-summary { margin: 0 0 16px; padding: 12px 14px; border-left: 3px solid var(--teal, #4b979b); border-radius: 6px; background: rgba(75,151,155,0.07); }
.ra-staff-summary__text { margin: 4px 0 8px; color: var(--navy); line-height: 1.6; }

/* RB-D3 (542, 21 Nov 2026): a job's booking (W-44) and its spend authorisation (W-17). */
.record-bar__booking { border-top: 1px solid var(--navy-tint, #E5EAF1); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.875rem; }
.job-booking-line { font-size: 0.75rem; color: var(--emerald-700, #047857); margin-top: 2px; }
.record-anchor { scroll-margin-top: 80px; }
.job-spend__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.job-spend__item { border: 1px solid var(--navy-tint, #E5EAF1); border-radius: 8px; padding: 10px 12px; }
.job-spend__head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* RB-D1 (540, W-13): the task's Check card and the Waiting for your check page */
.task-check__trail { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; }
.task-check__line { padding: 6px 0 6px 10px; border-left: 3px solid var(--navy-tint); margin-bottom: 4px; }
.task-check__line--ok { border-left-color: var(--teal, #0d9488); }
.task-check__line--back { border-left-color: var(--amber-600, #d97706); }
.task-check__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--navy-tint); }
.task-check__back { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.task-check__back .btn { align-self: flex-start; }
.check-queue-table .td:last-child { width: 1%; white-space: nowrap; }

/* CW3 (22 Nov 2026): a trust sets up its schedule. Decisions at Strategic level on the requirement page, the task's
   provisional and ended-by-decision notes. */
.cw3-decisions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cw3-decisions li { padding: 8px 0; border-top: 1px solid var(--navy-tint); font-size: 13px; overflow-wrap: anywhere; }
.cw3-decisions li:first-child { border-top: 0; padding-top: 0; }
.cw3-decide summary { list-style: none; cursor: pointer; display: inline-flex; }
.cw3-decide summary::-webkit-details-marker { display: none; }
.cw3-decide textarea { width: 100%; min-width: 0; }
.cw3-decide .bl-freq__panel { white-space: normal; }
.alert--muted { background-color: var(--navy-tint, #eef2f7); color: var(--navy, #1e293b); padding: 0.75rem 1rem; border-radius: 0.375rem; margin-bottom: 1rem; }

/* CW7 (22 Nov 2026): remedials through to green. The requirement a request bears on, the open work on a requirement,
   the assets left out of a visit, an asset out of use. */
.cw7-req-link .is-collapsed,
.cw7-req-work .is-collapsed,
.cw7-out-of-use .is-collapsed { display: none; }
.cw7-req-link__row { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-bottom: 1px dashed var(--navy-tint); }
.cw7-req-link__row:last-of-type { border-bottom: 0; }
.cw7-req-link__suggest,
.cw7-req-link__pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.cw7-req-link__pick select { flex: 1 1 220px; min-width: 0; }
.cw7-check { display: inline-flex; gap: 6px; align-items: center; font-size: 0.85rem; color: var(--navy-mid); }
.cw7-linked-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cw7-linked-list li { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.cw7-out-of-use--out { border-left: 3px solid var(--amber-600, #D97706); }

/* CW4 (555): a school or a building varies a requirement (the requirement page's "At each school" card, the list of variations) */
.cwv-term { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; font-size: 13px; color: var(--navy-mid); }
.cwv-school { border-top: 1px solid var(--border, #e2e8f0); }
.cwv-school__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 10px 16px; cursor: pointer; font-size: 14px; }
.cwv-school__head .text-muted { font-size: 12px; }
.cwv-table .td { vertical-align: top; }
.cwv-setting { width: 30%; font-size: 13px; color: var(--navy-mid); }
.cwv-own .cwv-setting { font-weight: 600; color: var(--navy, #0f172a); }
.cwv-who { font-size: 12px; margin-top: 2px; white-space: normal; }
.cwv-actions { white-space: nowrap; text-align: right; }
.cwv-change { display: inline-block; text-align: left; }
.cwv-change > summary { list-style: none; }
.cwv-change > summary::-webkit-details-marker { display: none; }
.cwv-change__panel { margin-top: 6px; padding: 10px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; background: var(--surface, #fff); white-space: normal; max-width: 520px; }
.cwv-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cwv-form--inline { margin-top: 8px; }
.cwv-form .form-hint { flex-basis: 100%; margin: 0; }
.cwv-form--inline .form-hint { flex-basis: auto; }
.cwv-reason { flex: 1 1 220px; min-width: 0; }
.cwv-days { width: 90px; }
.cwv-additions { display: flex; flex-direction: column; gap: 6px; flex-basis: 100%; }
.cwv-addition { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cwv-addition input[type="text"] { flex: 1 1 220px; min-width: 0; }
.cwv-check { font-size: 12px; color: var(--navy-mid); display: inline-flex; gap: 4px; align-items: center; }
.cwv-building { margin: 0 16px 10px 28px; border-left: 3px solid var(--border, #e2e8f0); padding-left: 10px; }
.cwv-building__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 0; font-size: 13px; }
.cwv-unsplit { margin: 4px 16px 14px; padding: 10px 12px; border: 1px dashed var(--border, #e2e8f0); border-radius: 8px; font-size: 13px; }
.cwv-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 0; }
.cwv-why { white-space: normal; max-width: 320px; font-size: 13px; }
.cwv-told { margin-top: 4px; font-size: 12px; color: var(--amber-700, #B45309); white-space: normal; }
@media (max-width: 600px) {
  .cwv-setting { width: auto; }
  .cwv-actions { white-space: normal; text-align: left; }
  .cwv-building { margin-left: 16px; }
}

/* CW2 (22 Nov 2026, migration 553): missed, late, early and partial. The task page's occurrence card (not required, the dates
   that passed, the partly done decision), building closures and their offer, and the Board's "Decided, and set aside". */
.cw2-card__body { display: flex; flex-direction: column; gap: 6px; }
.cw2-card--muted { border-left: 3px solid var(--navy-tint, #CBD5E1); }
.cw2-card__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cw2-card__text { margin: 0; font-size: 13px; color: var(--navy-mid); line-height: 1.5; }
.cw2-card__summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.cw2-card__form { margin-top: 10px; }
.cw2-card__form .detail-note { margin: 0 0 8px; }
.cw2-card__button { margin-top: 8px; }
.cw2-card__gap { margin: 14px 0 4px; }
.cw2-beside { padding: 6px 0; border-top: 1px solid var(--navy-tint, #E8ECF2); }
.cw2-beside:first-of-type { border-top: 0; }
.cw2-beside__head { margin: 0 0 4px; }
.cw2-beside__list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--navy-mid); line-height: 1.5; }
.cw2-closure-form { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.cw2-closure-form__row { display: flex; flex-direction: column; gap: 4px; }
.cw2-closure-form__dates { flex-direction: row; gap: 12px; flex-wrap: wrap; }
.cw2-closure-form__dates > span { display: flex; flex-direction: column; gap: 4px; }
.cw2-offer { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.cw2-offer label { display: flex; gap: 8px; align-items: flex-start; }

/* CW5 (22 Nov 2026, migration 556): rounds at a computer and contractors' visits. Record the visit's fields, the round's
   progress line, a contractor's certificate to review, the defects on a failed report, the record of the visit and its
   corrections, the contractor portal's certificate form. */
.cw5-visit { border-top: 1px solid var(--navy-tint); padding-top: 4px; margin-bottom: 8px; }
.cw5-work { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.cw5-work legend { padding: 0; margin-bottom: 6px; }
.cw5-work__opt { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 6px; font-size: 14px; cursor: pointer; }
.cw5-work__opt input { margin-top: 3px; }
.cw5-work__pick { margin: 0 0 8px 24px; max-width: 420px; }
.cw5-creds { list-style: none; margin: 0 0 4px 24px; padding: 0; font-size: 13px; color: var(--navy); }
.cw5-creds li { padding: 2px 0; }
.cw5-creds__lapsed { color: var(--red-600, #DC2626); }
.cw5-round { padding: 10px 14px; border-left: 3px solid var(--teal); background: var(--navy-tint-light, #f6f8fb); border-radius: 6px; }
.cw5-round__line { margin: 0; font-size: 14px; }
.cw5-chase { margin: 0; }
.cw5-sub, .cw5-doc { padding: 10px 0; border-top: 1px solid var(--navy-tint); }
.cw5-sub:first-of-type, .cw5-doc:first-of-type { border-top: 0; }
.cw5-sub__head, .cw5-doc__head { margin: 0 0 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 14px; }
.cw5-sub__actions, .cw5-defect__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.cw5-sub__actions form, .cw5-defect__actions form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.cw5-sub__back { flex: 1 1 260px; min-width: 0; }
.cw5-sub__back input[type="text"] { flex: 1 1 200px; min-width: 0; }
.cw5-defect { padding: 8px 0 8px 12px; border-left: 3px solid var(--navy-tint); margin: 6px 0; }
.cw5-defect__text { margin: 0; font-size: 14px; }
.cw5-defect__actions select { width: auto; }
.cw5-defects-add { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.cw5-defects-add .btn { align-self: flex-start; }
.cw5-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 16px; margin: 0; }
.cw5-facts dt { font-size: 12px; color: var(--text-muted, #6b7280); }
.cw5-facts dd { margin: 0; font-size: 14px; }
.cw5-versions { margin: 0; padding-left: 20px; font-size: 13px; }
.cw5-versions li { margin: 0 0 8px; }
.cw5-change { color: var(--navy); }
.cw5-withdrawn { text-decoration: line-through; }
.cw5-correct { margin-top: 12px; }
.cw5-correct summary { list-style: none; display: inline-flex; cursor: pointer; }
.cw5-correct summary::-webkit-details-marker { display: none; }
.cw5-correct__form { margin-top: 10px; }
.cw5-portal-visit { padding: 8px 0; border-top: 1px solid var(--navy-tint); }
.cw5-portal-visit summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.cw5-portal-visit__open { font-size: 13px; }
.cw5-portal-visit[open] .cw5-portal-visit__open { display: none; }
.cw5-portal-form { margin-top: 10px; }
.cw5-portal-sent { margin: 0; padding-left: 18px; font-size: 0.9rem; }
@media (max-width: 600px) { .cw5-work__pick, .cw5-creds { margin-left: 0; } }

/* CW6 (22 Nov 2026, migration 557): the check before a task counts. The "a check follows" line before a task is started,
   the block of tasks sent back to you at the top of your list, the Check card's sending in again and putting the record
   right, and the checks page's count of why work came back. */
.check-notice { margin: 8px 0 0; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.returned-block { border-left: 4px solid var(--amber-600, #d97706); }
.returned-block__list { list-style: none; margin: 0; padding: 0 16px 8px; }
.returned-block__item { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--navy-tint); }
.returned-block__item > div { flex: 1 1 240px; min-width: 0; }
.task-check__line--again { border-left-color: var(--navy, #1e3a5f); }
.task-check__fix { margin-top: 2px; }
.task-check__again { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--navy-tint); }
.task-check__again .btn { align-self: flex-start; }
.task-check__fixform { flex: 1 1 100%; min-width: 0; }
.task-check__fixform summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.task-check__fixform form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.task-check__fixform .btn { align-self: flex-start; }
.task-check__doc { border: 1px solid var(--navy-tint); border-radius: 6px; padding: 8px 10px; margin: 0; display: grid; gap: 4px; }
.task-check__doc legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
.check-reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-width: 420px; }
.check-reasons li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--navy-tint); }

/* CW W2c (566): the check the standard recommends, offered as one choice (settings/_cw2c_recommended_checks.php) */
.cw2c-recommended__list { margin: 0 0 10px; padding-left: 18px; font-size: 13px; color: var(--navy-mid); }
.cw2c-recommended__list li { margin: 2px 0; }
.cw2c-recommended__take { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }

/* CW W2b (567): the register and remedials. What a requirement's line shows beside its position (a certificate still to
   come, earlier visits missing evidence), the Remedials view inside Compliance, and a job sent back by its check. */
.register-beside { margin: 4px 0 0; font-size: 12px; line-height: 1.4; color: var(--amber-700, #b45309); }
.register-beside--detail { margin: -8px 0 12px; font-size: 14px; }
#who-checks .th { white-space: normal; }   /* N3: its five long headings wrap, so no column is cut off */
.day-to-day input[type="radio"], .day-to-day input[type="checkbox"] { margin-right: 6px; }
.requirement-cols { align-items: start; }
@media (min-width: 900px) { .requirement-cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }   /* N3: one column on a phone, as every other page */
.where-scheduled__acts { text-align: right; min-width: 150px; }   /* N3: its buttons one under the other where they do not fit in a line */
.where-scheduled__acts .btn { margin: 2px 0; }
.job-check-returned { margin: 8px 0 0; padding: 8px 10px; border-left: 4px solid var(--amber-600, #d97706); background: var(--amber-50, #fffbeb); border-radius: 4px; }
.job-check-send-back__form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-width: 520px; }
.job-check-send-back__form .btn { align-self: flex-start; }
/* JPF (600): Accept and Send back beside a firm's certificate waiting on the job page (To review's own two actions). */
.job-cert-review { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin: 6px 0 4px; }
.job-cert-review__accept { margin: 0; }
.job-cert-review__back { flex: 1 1 200px; min-width: 0; }
.job-cert-review__back > summary { font-size: 0.85rem; cursor: pointer; line-height: 30px; }
.job-cert-review__form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; max-width: 520px; }
.job-cert-review__form .form-input { width: 100%; max-width: 100%; }
.job-cert-review__form .btn { align-self: flex-start; }
.assignee-sent { flex-basis: 100%; font-size: 0.8rem; margin: -2px 0 0; }
.job-sent-back-block { border-left: 4px solid var(--amber-600, #d97706); }
.job-sent-back-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.job-sent-back-list li { padding-bottom: 8px; border-bottom: 1px solid var(--navy-tint); }

/* CWF1 walk fixes (22 Nov 2026): a school's confirm list waiting for the reader; who answered beside a position */
.cwf1-waiting__line { margin: 0; font-size: 14px; line-height: 1.5; }
.cwf1-waiting__line + .cwf1-waiting__line { margin-top: 4px; }
.confirm-grid__answered { color: var(--navy-700, #334155); }

/* CWF1 building answers: who answered a question or checklist line, and when */
.provision-row__answered { font-size: 12px; color: var(--navy-mid); margin-top: 2px; }
.register-beside[data-beside="below_legal_minimum"] { color: var(--red-700, #b91c1c); font-weight: 600; }
.register-beside[data-beside="provisional"] { color: var(--amber-700, #b45309); }

/* B3-22 (584): who else has this task open now (Do this visit and the full task page); hidden when nobody else */
.task-presence { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.4; color: var(--navy-mid); }
/* N6: its place is kept: one line, two on a phone, and a longer one is cut there */
.task-presence-place { min-height: 19px; margin: -12px 0; }
.task-presence-place .task-presence { max-height: 19px; overflow: hidden; padding-left: 3px; }
@media (max-width: 760px) { .task-presence-place { min-height: 38px; } .task-presence-place .task-presence { max-height: 38px; } }
.task-presence::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(75, 151, 155, 0.18); }

/* VP lane B (23 Nov 2026): the visit page, one column, one order, one button (BUILD_SPECS/CW/COMPLETION_REDESIGN.md
   section 4). Each part drawn is numbered in the order shown, so a part a task does not need leaves no gap. */
.vp-now__title { color: var(--navy); font-size: 15px; }
.vp-parts { display: flex; flex-direction: column; gap: 16px; counter-reset: vp-part; }
.vp-part { counter-increment: vp-part; scroll-margin-top: 80px; }
.vp-part__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.vp-part__head .vp-part__title { margin: 0; }
.vp-part__title { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 16px; font-weight: 600; color: var(--navy); }
.vp-part__title::before { content: counter(vp-part); flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 12.5px; font-weight: 600; }
.vp-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 12px; font-size: 14px; }
.vp-facts > div { display: contents; }
.vp-facts dt { color: var(--navy-mid); }
.vp-facts dd { margin: 0; color: var(--navy); font-weight: 500; }
.vp-refusal-note { margin: 0 0 8px; padding: 8px 12px; border-radius: 6px; background: var(--red-50); color: var(--red-700); font-size: 13.5px; line-height: 1.5; }
.vp-booking { margin: 0; }
.vp-visit { border-top: 0; padding-top: 0; }
.vp-visit__date { max-width: 260px; }
.vp-outcome .cf-seg { margin-top: 6px; }
/* Part 4: the named slots */
.vp-slots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.vp-slot { border: 1px solid var(--navy-tint); border-radius: 8px; padding: 10px 12px; background: var(--white); }
.vp-slot--needed { border-color: #FDE68A; background: var(--amber-50); }
.vp-slot--held { border-color: rgba(4, 120, 87, 0.25); background: var(--emerald-50); }
.vp-slot--by { background: var(--bg); }
/* VP lane D (E): a certificate or report held failed, its defects not yet dealt with: held, amber, no second copy asked */
.vp-slot--failed { border-color: #FDE68A; background: var(--white); }
.vp-slot--failed .vp-slot__mark { background: var(--amber-50); color: var(--amber-700); font-weight: 700; }
/* VP lane D: a typed defect line under Problems to follow up, and the note on one already dealt with */
.vp-problem__dealt { color: var(--emerald-700); }
.vp-problem__put-right { color: var(--emerald-700); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vp-problems__doc { margin: 0 0 8px; }
.vp-slot__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.vp-slot__mark { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; align-items: center; justify-content: center; font-size: 12px; flex: none; background: var(--navy-tint); color: var(--navy-mid); }
.vp-slot--held .vp-slot__mark, .vp-slot--by .vp-slot__mark { background: var(--emerald-50); color: var(--emerald-700); }
.vp-slot--needed .vp-slot__mark { background: var(--white); color: var(--amber-700); }
.vp-slot__name { color: var(--navy); font-size: 14px; }
.vp-slot__state--by { font-size: 12.5px; color: var(--navy-mid); }
.vp-slot--held .vp-upload { opacity: 0.85; }
.vp-upload { margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.vp-upload .form-row-2 { margin: 0; }
.vp-upload__row { display: flex; gap: 8px; align-items: center; }
.vp-upload__file { flex: 1 1 auto; min-width: 0; padding: 6px 8px; font-size: 13px; }
.vp-upload__msg { margin: 0; font-size: 12.5px; color: var(--emerald-700); }
.vp-upload__msg--bad { color: var(--red-600); }
.vp-more { margin: 12px 0 0; }
.vp-more__head { cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--teal); }
.vp-files__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.vp-file { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0; border-bottom: 1px solid var(--navy-tint); font-size: 13.5px; }
.vp-file:last-child { border-bottom: 0; }
.vp-file__name { font-weight: 500; color: var(--navy); min-width: 0; overflow-wrap: anywhere; }
.vp-file__meta { flex: 1 1 200px; color: var(--navy-mid); font-size: 12.5px; }
.vp-file__acts { display: flex; gap: 6px; }
/* Part 5: the problems, each decided */
.vp-problems__list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.vp-problem { border: 1px solid var(--navy-tint); border-left: 3px solid var(--red-600); border-radius: 8px; padding: 10px 12px; background: var(--white); display: flex; flex-direction: column; gap: 8px; }
.vp-problem--refused { box-shadow: 0 0 0 2px var(--red-400); }
.vp-problem__words { margin: 0; font-size: 14px; color: var(--navy); font-weight: 500; overflow-wrap: anywhere; }
.vp-problem__raise { display: flex; flex-direction: column; gap: 8px; }
.vp-problem__raise .form-row-2 { margin: 0; }
.vp-problem__remove { align-self: flex-start; }
.vp-problem__describe { margin: 0; }
/* Part 6: the one button and the line under it */
.vp-reasons { padding: 10px 14px; }
.vp-reasons ul { margin: 0; padding: 0 0 0 18px; }
.vp-reasons__lead { margin: 0 0 2px; font-weight: 600; }
.vp-actions { margin-top: 10px; }
.vp-finish__line { margin: 10px 0 0; font-size: 13.5px; color: var(--navy-mid); line-height: 1.5; }
@media (max-width: 600px) {
  .vp-facts { grid-template-columns: 1fr; gap: 0; }
  .vp-facts dd { margin-bottom: 6px; }
  .vp-upload__row { flex-direction: column; align-items: stretch; }
  .vp-upload__row .btn { width: 100%; }
  .vp-file__acts { width: 100%; }
}
/* VP follow-up (23 Nov 2026): an item already done on a round carried on, read only; Raise a follow-up after Finish. */
.cf-asset--done { background: var(--bg); }
.cf-asset--done .cf-asset__head { margin: 0; }
.vp-late-fu__list { margin: 0 0 12px; }
.vp-raise > summary { list-style: none; display: inline-flex; cursor: pointer; }
.vp-raise > summary::-webkit-details-marker { display: none; }
.vp-raise[open] > summary { margin-bottom: 10px; }
.vp-raise__form { display: flex; flex-direction: column; gap: 8px; }
.vp-raise__form .form-row-2 { margin: 0; }

/* FLEX FX4 (24 Nov 2026): which schools a person works at (the question, the people nobody has answered for). */
.schools-choice { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; min-width: 0; }
.schools-choice > legend { padding: 0 6px; margin: 0; }
.schools-choice__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 16px; margin: 4px 0 8px 22px; }
.schools-choice__list[hidden] { display: none; }
.schools-choice__opt { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 4px 0; cursor: pointer; }
.schools-choice__opt input { margin-top: 3px; flex: none; }
.schools-not-set { display: grid; gap: 2px; max-height: 320px; overflow-y: auto; margin: 0 0 12px; padding: 0 2px; }
.schools-not-set__row { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: 14px; cursor: pointer; }
.schools-not-set__row input { margin-top: 3px; flex: none; }
.schools-ask { flex-basis: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-weight: 400; }
@media (max-width: 600px) { .schools-choice__list { grid-template-columns: 1fr; margin-left: 0; } }

/* FLEX FX3 (24 Nov 2026): Home's By site, one plain line for each school that is behind. */
.by-site-behind { display: block; margin: 4px 0 0; max-width: 62ch; line-height: 1.5; }

/* FLEX FX2 (24 Nov 2026): Raise all as follow-ups (the visit page's problems, the defects card). */
.vp-raise-all { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.vp-raise-all[hidden] { display: none; }
.vp-raise-all__more { width: 100%; }
.vp-raise-all__lead { margin: 0; font-size: 14px; }
.vp-raise-all__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; width: 100%; min-width: 0; }
.vp-raise-all__fields > * { min-width: 0; width: 100%; }
.finding-paste__tools { margin-top: 8px; }
.finding-paste__ai { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; min-width: 0; }
.finding-paste__ai[hidden] { display: none; }
.vp-visit__doer { max-width: 420px; }

/* FLEX B4 (24 Nov 2026): faults that keep coming back (the task and visit pages, the Board); the pack's months. */
.repeat-faults { border-left: 3px solid var(--amber-600, #d97706); background: var(--bg); border-radius: 0 8px 8px 0; padding: 10px 14px; font-size: 14px; line-height: 1.5; }
.repeat-faults__head { margin: 0 0 4px; font-weight: 600; }
.repeat-faults__list { margin: 0; padding-left: 18px; }
.repeat-faults__list li { margin: 2px 0; overflow-wrap: anywhere; }
.repeat-faults__added { margin: 6px 0 0; }
.repeat-faults > .repeat-faults__added:first-child { margin-top: 0; }
.board-months td, .board-months th { white-space: nowrap; }
.welcome-sub.home-ring { margin-top: 6px; max-width: 78ch; line-height: 1.5; color: rgba(255,255,255,0.85); }
.home-ring a { font-weight: 600; text-decoration: underline; color: inherit; }

/* FLEX S4: the starting set (Settings, Compliance, and the set-up path) */
.starting-set__tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.starting-set__tools input[type="search"] { flex: 1 1 200px; max-width: 320px; }
.starting-set__group { border: 1px solid var(--navy-tint); border-radius: 10px; margin: 0; padding: 8px 12px 10px; min-width: 0; }
.starting-set__group legend { padding: 0 6px; font-weight: 600; color: var(--navy); font-size: 13.5px; }
.starting-set__row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; cursor: pointer; line-height: 1.4; }
.starting-set__row input { margin-top: 3px; flex: 0 0 auto; width: 17px; height: 17px; }
.starting-set__name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.starting-set__meta { flex: 0 0 auto; color: var(--navy-mid); font-size: 12px; text-align: right; }
.starting-set__sites { padding-left: 27px; }
@media (max-width: 600px) {
  .starting-set__row { flex-wrap: wrap; }
  .starting-set__name { flex-basis: calc(100% - 40px); }
  .starting-set__meta { flex-basis: 100%; padding-left: 27px; text-align: left; }
}

/* FLEX B5 (24 Nov 2026, migration 609): rooms to choose, passing a job up, permits asked for, quiet schools, the weekly sheet */
.room-suggest { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid var(--navy-tint, #E8ECF2); border-radius: 8px; background: #fff; }
.room-suggest button { display: block; width: 100%; min-height: 40px; padding: 6px 10px; border: 0; background: none; text-align: left; font: inherit; color: var(--navy); cursor: pointer; border-radius: 6px; }
.room-suggest button:hover, .room-suggest button:focus-visible { background: var(--navy-tint, #F1F4F8); }
.rq-more > summary { cursor: pointer; min-height: 32px; }
.passing-line { margin: 0; }
.pass-up { margin-top: 8px; }
.pass-up > summary { display: inline-block; list-style: none; }
.pass-up > summary::-webkit-details-marker { display: none; }
.pass-up__form { display: grid; gap: 8px; margin-top: 8px; max-width: 420px; }
.permit-requests { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.permit-requests__row { padding: 0 0 12px; border-bottom: 1px solid var(--navy-tint, #E8ECF2); }
.permit-requests__row:last-child { padding-bottom: 0; border-bottom: 0; }
.permit-requests__answer { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin-top: 8px; }
.permit-requests__answer summary { display: inline-block; list-style: none; }
.permit-requests__answer summary::-webkit-details-marker { display: none; }
.permit-requests__refuse { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.permit-requests__refuse input { flex: 1 1 220px; min-width: 0; }
.quiet-schools__list { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.weekly-sheet__form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.weekly-sheet__form .form-group { margin: 0; min-width: 0; }
.day-schools { display: grid; gap: 6px; margin: 8px 0 0 24px; }
.day-to-day { display: grid; gap: 8px; }

/* FLEX B1 (24 Nov 2026, migration 607): How each school works (Settings, Compliance): one row per school, a card each on a phone. */
.hsw-table .hsw-tick { width: 34px; }
.hsw-table { table-layout: fixed; width: 100%; min-width: 0; }
.hsw-table th, .hsw-table td { padding: 9px 8px; white-space: normal; overflow-wrap: break-word; }
.hsw-table th, .hsw-set-up th { letter-spacing: .02em; font-size: 11px; overflow-wrap: normal; }
.hsw-tick .sr-only, .hsw .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hsw-table th.hsw-tick, .hsw-table td.hsw-tick { width: 34px; padding-left: 14px; }
.hsw-table th:nth-child(2) { width: 18%; }
.hsw-table td { vertical-align: middle; font-size: 13px; }
.hsw-every td { background: var(--navy-tint, #f1f5f9); }
.hsw-is-own .hsw-short { font-weight: 700; color: var(--navy); }
.hsw-table .hsw-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* N2 (25 Nov 2026): the first row and a school's own answer are read in full on the page, not only in the pointer's tip. */
.hsw-table .hsw-full .hsw-short { display: none; }
.hsw-table .hsw-full .hsw-long { position: static; width: auto; height: auto; clip-path: none; white-space: normal; font-size: 12px; line-height: 1.35; }
.hsw-is-own .hsw-long { font-weight: 700; color: var(--navy); }
.hsw-key { margin: 10px 16px 14px; }
.hsw-set-up th, .hsw-set-up td { padding: 9px 8px; white-space: normal; font-size: 13px; vertical-align: top; }
.hsw-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.hsw-fields .form-group { margin: 0; min-width: 0; }
.hsw-more { display: grid; gap: 6px; margin-top: 6px; }
.hsw-forecast { border-left: 3px solid var(--teal, #0f766e); background: var(--navy-tint, #f1f5f9); padding: 10px 12px; margin: 0 0 12px; font-size: 13px; }
.hsw-forecast ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.hsw-forecast--no { border-left-color: var(--red-600, #dc2626); }
@media (max-width: 760px) {
  .hsw-table thead, .hsw-list thead { display: none; }
  .hsw-table, .hsw-table tbody, .hsw-list, .hsw-list tbody { display: block; width: 100%; }
  .hsw-table tr, .hsw-list tr { display: block; border: 1px solid var(--navy-tint, #e2e8f0); border-radius: 8px; padding: 10px 12px; margin: 10px 12px; }
  .hsw-table td, .hsw-list td { display: block; border: 0; padding: 4px 0; white-space: normal !important; }
  .hsw-table td[data-label]::before, .hsw-list td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--slate, #64748b); }
  .hsw-table .hsw-tick { float: right; width: auto; }
  .check-queue-table.hsw-list { min-width: 0; }
  .check-queue-table.hsw-list .td:last-child { width: auto; }
  .hsw-table .hsw-short { display: none; }
  .hsw-table .hsw-long { position: static; width: auto; height: auto; clip-path: none; white-space: normal; }
}

/* FLEX B2 (24 Nov 2026, migration 611): the plain form (two questions), why this matters, and covers in plain words. */
.b2-why { border-left: 3px solid var(--teal, #0f766e); }
.b2-why__text { margin: 0; font-size: 15px; line-height: 1.5; color: var(--navy); }
/* FL lane A (772): the reference steps under the reason; folded on a form of the task type's own */
.b2-why__stepbox { margin-top: 10px; }
.b2-why__lead { margin: 0 0 4px; font-size: 14px; line-height: 1.5; color: var(--navy); font-weight: 500; }
.b2-why__steps { margin: 0; padding-left: 22px; font-size: 14px; line-height: 1.5; color: var(--navy); }
.b2-why__steps li + li { margin-top: 3px; }
.b2-why__summary { cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--teal); }
.b2-why__summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 3px; }
.b2-why__fold[open] .b2-why__summary { margin-bottom: 6px; }
.cf-seg--plain .cf-seg__opt { min-height: 46px; padding: 0 22px; font-size: 15px; }
.vp-parts--plain .cf-item__prompt { font-size: 16px; font-weight: 600; }
.vp-parts--plain .cf-item + .cf-item { margin-top: 14px; }
.vp-parts--plain .vp-part__title::before { display: none; }
.vp-fold > .card-body { padding-top: 0; }
.vp-fold__head { cursor: pointer; padding: 14px 18px; font-size: 14px; color: var(--navy-mid); list-style: none; }
.vp-fold__head::-webkit-details-marker { display: none; }
.vp-fold__head::before { content: '+'; display: inline-block; width: 16px; }
.vp-fold[open] > .vp-fold__head::before { content: '\2212'; }
.vp-problem__more { margin-top: 6px; }
.cover-form { display: grid; gap: 14px; max-width: 760px; }
.cover-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cover-form .form-group { margin: 0; min-width: 0; }
.cover-moves { display: grid; gap: 4px; }
.cover-moves label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; min-height: 28px; }
.cover-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cover-list__row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--navy-tint, #e2e8f0); }
.cover-list__row:last-child { border-bottom: 0; }
.cover-list__words { flex: 1 1 300px; min-width: 0; font-size: 14px; }
.named-paste { display: grid; gap: 6px; margin-top: 8px; }

/* FLEX (24 Nov 2026, story 12): who the person is covering for. */
.covering-line { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--teal); background: var(--white, #fff); border-radius: 6px; font-size: 14px; color: var(--navy); }

/* FLEX B3 (24 Nov 2026, migration 612): evidence held elsewhere. Grey: neither red nor green. */
.compliance-matrix-cell--held a { background: #F3F4F6; color: #6B7280; }
.he-list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.he-list li { overflow-wrap: anywhere; }
.he-change { margin-top: 10px; }
.he-change > summary { display: inline-flex; cursor: pointer; list-style: none; }
.he-form { display: grid; gap: 10px; margin-top: 10px; max-width: 560px; }
.he-form [data-held-elsewhere] { display: grid; gap: 8px; }
.he-places { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; font-size: 13px; }
.he-places legend { padding: 0; }
.he-places label { display: flex; gap: 6px; align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
.he-review { display: grid; gap: 4px; }
/* D-114 (25 Nov 2026, Q73): the three choices, told apart where the choice is made. */
.three-choices { margin: 8px 0 0; font-size: 13px; }
.three-choices > summary { cursor: pointer; overflow-wrap: anywhere; }

/* FLEX R5-B (25 Nov 2026, D-114 ruling 5): a provider's report, and the setting of it. */
.prr-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.prr-fold > summary::-webkit-details-marker { display: none; }
.prr-fold > summary::before { content: '+'; width: 12px; color: var(--navy-mid); }
.prr-fold[open] > summary::before { content: '\2212'; }
.prr-item + .prr-item, .card-header + .prr-item { border-top: 1px solid var(--navy-tint, #e2e8f0); }
.prr-item__head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; justify-content: space-between; }
.prr-item__head > div { flex: 1 1 240px; min-width: 0; }
.prr-item__title { margin: 0; font-weight: 600; color: var(--navy); overflow-wrap: anywhere; }
.prr-lines { margin: 8px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.prr-form { display: grid; gap: 14px; max-width: 860px; }
.he-change > .prr-set { margin-top: 12px; }
.prr-form > *, .prr-form .form-group { min-width: 0; margin: 0; }
.prr-form label.form-group { display: grid; gap: 4px; align-content: start; }
.prr-close { display: grid; gap: 12px; margin-top: 10px; max-width: 760px; }
.prr-close label.form-group { display: grid; gap: 4px; margin: 0; }
.prr-dates { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 2px 12px; font-size: 13px; }
.prr-dates--wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.prr-dates legend { padding: 0; }
.prr-dates label, .prr-tick { display: flex; gap: 8px; align-items: center; min-width: 0; min-height: 32px; overflow-wrap: anywhere; font-size: 13px; }
.prr-tick[hidden] { display: none !important; }
.prr-dates input, .prr-tick input { flex: none; }
.prr-checks { border: 0; margin: 0; padding: 0; min-width: 0; }
.prr-checks legend { padding: 0; }
.prr-cat { margin: 8px 0; }
.prr-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 16px; align-items: start; }
.prr-check { border: 1px solid var(--navy-tint, #e2e8f0); border-radius: 8px; padding: 10px 12px; margin: 0 0 10px; display: grid; gap: 8px; }
.prr-check > * { min-width: 0; }
.prr-check__head { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; align-items: baseline; overflow-wrap: anywhere; }
.prr-check label.form-group { max-width: 260px; }
.prr-fails > summary { cursor: pointer; font-size: 13px; color: var(--teal); min-height: 28px; }
.prr-fail { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--navy-tint, #e2e8f0); margin-bottom: 8px; }
.prr-fail label.form-group { max-width: none; }
.prr-fail__words { grid-column: 1 / -1; }
.prr-fail .onb-linkbtn { justify-self: start; padding-left: 0; }
.prr-but { display: grid; gap: 6px; max-width: 320px; }
.prr-chips { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; gap: 2px; }
.prr-also > summary { display: inline-flex; cursor: pointer; list-style: none; }
.prr-error { border-left: 3px solid var(--red-600, #dc2626); background: var(--red-50, #fef2f2); padding: 10px 12px; font-size: 13px; overflow-wrap: anywhere; }
.prr-error[hidden] { display: none !important; }
@media (max-width: 760px) { .prr-form .btn-primary, .prr-close .btn-primary { width: 100%; justify-content: center; } }

/* N6 (25 Nov 2026, W4's walk): a status that is a whole sentence wraps, so the table needs no sideways scroll. */
.badge--wrap { white-space: normal; max-width: 220px; line-height: 1.35; overflow-wrap: break-word; }

/* N8 (25 Nov 2026, W5's walk): Settings, Board reporting. Every threshold's number shows: on a phone each threshold is its own block. */
.br-table__value { width: 120px; }
.br-table__value .form-input { width: 100px; min-width: 100px; }
.br-table__default { width: 170px; }
.br-table__reset { width: 150px; }
@media (max-width: 700px) {
  .br-table tbody, .br-table tr, .br-table .td { display: block; width: auto; }
  .br-table tr { padding: 12px 16px; border-bottom: 1px solid var(--navy-tint); }
  .br-table .td { border: 0; padding: 0 0 8px; }
  .br-table .br-table__reset:empty { display: none; }
}
.confirm-modal-need { margin: 8px 0 0; font-size: 13px; color: var(--red-600, #dc2626); }
.board-pack-subhead[data-pack-followups] { margin-top: 24px; }

/* FV-B (25 Nov 2026): a firm's page of its visit, in the contractor portal. Built at 375px first. */
.fv-title { margin: 0 0 2px; font-size: 1.3rem; line-height: 1.25; color: var(--navy); overflow-wrap: anywhere; }
.fv-place { margin: 0 0 14px; color: var(--navy-mid); }
.fv-title + .fv-card { margin-top: 14px; }
.contractor-portal .fv-card { margin-bottom: 16px; }
.fv-back { border-left: 4px solid var(--red-600, #DC2626); }
.fv-stack { display: grid; gap: 14px; }
.fv-stack > * { min-width: 0; margin: 0; }
.fv-said { scroll-margin-top: 16px; margin: 0 0 14px; }
.fv-said:focus { outline: 2px solid var(--teal); outline-offset: 2px; }
.fv-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 16px; }
.fv-facts dt { font-size: 12px; color: rgba(64,82,104,0.75); }
.fv-facts dd { margin: 0; color: var(--navy); overflow-wrap: anywhere; }
.fv-why, .fv-again { border-left: 3px solid var(--amber-600, #D97706); background: var(--amber-50, #FFFBEB); padding: 10px 12px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.fv-facts + .fv-why, .fv-why + .fv-why { margin: 12px 0 0; }
.fv-facts:empty + .fv-why { margin-top: 0; }
.fv-state { font-size: 15px; line-height: 1.5; color: var(--navy); overflow-wrap: anywhere; }
.fv-state--returned { border-left: 3px solid var(--red-600, #DC2626); background: var(--red-50, #FEF2F2); padding: 10px 12px; }
.fv-form { display: grid; gap: 16px; max-width: 760px; }
.fv-form > * { min-width: 0; }
details > .fv-form { margin-top: 12px; }
.fv-summary { cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; list-style: none; }
.fv-summary::-webkit-details-marker { display: none; }
.fv-choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.fv-choice legend { padding: 0; margin-bottom: 6px; }
.fv-choice > label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--navy-tint); border-radius: 6px; cursor: pointer; font-size: 15px; color: var(--navy); }
.fv-choice > label + label { margin-top: 6px; }
.fv-choice > label:has(:checked) { border-color: var(--teal); background: rgba(75,151,155,0.08); }
.fv-choice > label input { flex: none; width: 18px; height: 18px; margin: 0; }
.fv-doc input[type="file"] { height: auto; padding: 10px 12px; }
.fv-two { display: grid; gap: 16px; }
.fv-list { margin: 4px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.fv-words { margin: 2px 0 0; overflow-wrap: anywhere; }
.fv-history { margin: 0; padding: 4px 18px 16px 34px; display: grid; gap: 10px; }
.fv-creds { list-style: none; margin: 0; padding: 0; }
.fv-creds li { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--navy-tint); font-size: 14px; }
.fv-creds li:last-child { border-bottom: 0; }
.fv-creds__name { min-width: 0; overflow-wrap: anywhere; color: var(--navy); }
.fv-lapsed { color: var(--red-600, #DC2626); }
.fv-aside { margin: 0 0 16px; font-size: 14px; }
.card-body > .fv-aside { margin: 8px 0 0; }
.fv-small { font-size: 12px; font-weight: 400; }
.fv-btn { min-height: 44px; justify-self: start; }
.fv-visits__label { display: none; }
@media (min-width: 700px) { .fv-two { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) {
  .fv-btn { width: 100%; }
  .fv-form .form-input { font-size: 16px; }
  .fv-visits thead { display: none; }
  .fv-visits tbody, .fv-visits tr, .fv-visits .td { display: block; }
  .fv-visits tr { padding: 12px 16px; border-bottom: 1px solid var(--navy-tint); }
  .fv-visits .td { border: 0; padding: 0 0 4px; }
  .fv-visits .td:empty { display: none; }
  .fv-visits .td--name a { display: inline-block; padding: 6px 0; }
  .fv-visits__label { display: inline; }
}

/* FV-C (639, 25 Nov 2026): the record a firm filed of its own visit, on both task pages (views/compliance/_firm_visit.php). */
.fvs-lead { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--navy); }
.fvs-record--next { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--navy-tint); }
.fvs-facts { margin: 0 0 8px; }
.fvs-said { margin: 0 0 8px; font-size: 14px; overflow-wrap: anywhere; }
.fvs-facts dd { min-width: 0; overflow-wrap: anywhere; }
.fvs-note { font-weight: 400; }
.fvs-flag { margin: 0 0 8px; padding-left: 10px; border-left: 3px solid var(--amber-600, #D97706); font-size: 14px; }
.fvs-flag.text-red { border-left-color: var(--red-600, #DC2626); }
.fvs-head { margin: 12px 0 6px; }
.fvs-doc { padding: 6px 0; overflow-wrap: anywhere; }
.fvs-doc__name { margin: 0; font-size: 14px; }
.fvs-alone > summary, .fvs-more > summary { cursor: pointer; font-size: 13px; color: var(--teal); padding: 6px 0; }
.fvs-list { margin: 0; padding-left: 20px; font-size: 14px; }
.fvs-list li { margin: 0 0 4px; overflow-wrap: anywhere; }
.fvs-problem { padding: 6px 0; border-top: 1px solid var(--navy-tint); }
.fvs-problem:first-of-type { border-top: 0; }
.fvs-problem__tick, .fvs-with { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; padding: 4px 0; }
.fvs-problem__tick span { min-width: 0; overflow-wrap: anywhere; }
.fvs-problem__tick input, .fvs-with input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; }
.fvs-problem__why { margin: 4px 0 0 28px; width: calc(100% - 28px); max-width: 520px; }
.fvs-answer { margin-top: 14px; }
.fvs-back { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--navy-tint); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.fvs-back .form-label { margin: 0; }
.fvs-back .form-input { width: 100%; max-width: 640px; }
.fvs-history { list-style: none; margin: 0; padding: 0; }
.fvs-history li { padding: 8px 0; border-top: 1px solid var(--navy-tint); }
.fvs-history li:first-child { border-top: 0; }
.fvs-history__head { margin: 0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.fvs-history__line { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.fvs-lock { border: 0; margin: 0; padding: 0; min-width: 0; }
.fvs-lock .cw5-work__opt input:not(:checked) + span { color: var(--navy-mid); }
@media (max-width: 600px) {
  .fvs-card .btn { width: 100%; justify-content: center; white-space: normal; min-height: 44px; }
  .fvs-card .cw5-sub__actions, .fvs-card .cw5-sub__actions form { width: 100%; }
}

/* ── OPS1 (645): Connect > Platform > Operations ─────────────────────────────── */
.ops-strip { padding: 10px 14px; border-radius: 8px; font-size: .9rem; border: 1px solid var(--navy-tint); background: var(--navy-tint); color: var(--navy-mid); }
.ops-strip--green { background: var(--emerald-50); border-color: #BBF7D0; color: var(--emerald-700); }
.ops-strip--amber { background: var(--amber-50); border-color: #FDE68A; color: var(--amber-700); }
.ops-strip--red   { background: var(--red-50); border-color: #FECACA; color: var(--red-700); }
.ops-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.ops-tile { border-top: 4px solid var(--navy-tint); }
.ops-tile--green { border-top-color: #22C55E; }
.ops-tile--amber { border-top-color: #F59E0B; }
.ops-tile--red   { border-top-color: #EF4444; }
.ops-tile__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ops-tile__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--navy-mid); }
.ops-tile__head { font-size: 1.05rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.ops-tile__link { display: inline-block; margin-top: 8px; font-size: .85rem; }
/* Operations > Overview > Tools (30 Nov 2026): one tile per OpsAreas::TOOLS row, each a link out in a new tab */
.ops-tools__note { margin: 0 0 12px; }
.ops-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ops-tool { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--navy-tint); border-radius: 10px; background: #fff; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.ops-tool:hover, .ops-tool:focus-visible { border-color: var(--teal); box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
.ops-tool__icon { flex: 0 0 36px; height: 36px; border-radius: 8px; background: var(--navy-tint); color: var(--teal); display: flex; align-items: center; justify-content: center; }
.ops-tool__icon svg { width: 18px; height: 18px; }
.ops-tool__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ops-tool__name { font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: 6px; }
.ops-tool__out, .ops-tool__name svg { width: 13px; height: 13px; color: var(--navy-mid); }
.ops-tool__words { font-size: .85rem; color: var(--navy-mid); line-height: 1.4; }
.ops-tool__caution { font-size: .8rem; color: var(--amber-700); background: var(--amber-50); border-radius: 6px; padding: 6px 8px; line-height: 1.4; }
.ops-checks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.ops-facts th { width: 180px; text-align: left; }
.ops-sub { font-size: .9rem; margin: 16px 0 8px; color: var(--navy); }
.ops-chart { position: relative; height: 240px; }
.ops-search { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ops-search .form-input { min-width: 260px; }
.ops-gate { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ops-gate .form-input { min-width: 220px; }
.ops-add { color: var(--emerald-700); font-weight: 600; }
.ops-del { color: var(--red-700); font-weight: 600; }
.ops-file { border: 1px solid var(--navy-tint); border-radius: 8px; margin-bottom: 8px; }
.ops-file summary { padding: 8px 12px; cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ops-file__history { margin-left: auto; font-size: .85rem; }
.ops-diff { margin: 0; padding: 8px 0; max-height: 600px; overflow: auto; font-size: .78rem; line-height: 1.45; background: #FAFAFB; border-top: 1px solid var(--navy-tint); }
.ops-diff span { display: block; min-height: 1.45em; padding: 0 12px; white-space: pre; }
.ops-diff__add  { background: var(--emerald-50); color: var(--emerald-700); }
.ops-diff__del  { background: var(--red-50); color: var(--red-700); }
.ops-diff__hunk { color: var(--navy-mid); background: var(--navy-tint); }
.ops-diff__file { color: var(--navy-mid); font-weight: 600; }
@media (max-width: 640px) { .ops-search .form-input, .ops-gate .form-input { min-width: 0; width: 100%; } .ops-facts th { width: auto; } }
/* OPS5 (30 Nov 2026): Operations laid out again: the servers summary, headline numbers, grouped facts, small charts, the map */
.ops-range { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ops-range .detail-note { margin-right: 4px; }
.ops-range__opt { padding: 4px 10px; border: 1px solid var(--navy-tint); border-radius: 999px; font-size: .8rem; color: var(--navy-mid); text-decoration: none; background: var(--white); }
.ops-range__opt:hover { border-color: var(--teal); color: var(--navy); }
.ops-range__opt--on { background: var(--navy); border-color: var(--navy); color: var(--white); }
.ops-range__opt--on:hover { color: var(--white); }
.ops-summary td { vertical-align: middle; white-space: nowrap; }
.ops-summary td.td--name { white-space: normal; min-width: 200px; }
.ops-meter { display: inline-block; width: 72px; height: 8px; border-radius: 4px; background: var(--navy-tint); vertical-align: middle; overflow: hidden; }
.ops-meter > span { display: block; height: 100%; border-radius: 4px; background: var(--navy-mid); }
.ops-meter--green > span { background: #22C55E; }
.ops-meter--amber > span { background: #F59E0B; }
.ops-meter--red > span { background: #EF4444; }
.ops-meter__num { font-size: .85rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.ops-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ops-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--navy-tint); border-left: 4px solid var(--navy-tint); border-radius: 8px; background: var(--white); }
.ops-stat--green { border-left-color: #22C55E; }
.ops-stat--amber { border-left-color: #F59E0B; }
.ops-stat--red   { border-left-color: #EF4444; }
.ops-stat__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--navy-mid); }
.ops-stat__value { font-size: 1.35rem; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.2; }
.ops-stat__sub { font-size: .78rem; color: var(--navy-mid); min-height: 1em; }
.ops-checks--chips { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ops-checks--chips .ops-check { font-size: .85rem; }
.ops-checks--chips .ops-check--green { color: var(--navy-mid); }
.ops-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 4px 20px; align-items: start; }
.ops-group .ops-sub { margin-top: 10px; }
.ops-group .ops-facts th { width: 150px; }
.ops-group .ops-facts td { word-break: break-word; }
.ops-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ops-chart-box { border: 1px solid var(--navy-tint); border-radius: 8px; padding: 10px 12px; }
.ops-chart-box__title { font-size: .8rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.ops-chart--small { height: 170px; }
.ops-fold > summary { padding: 12px 16px; cursor: pointer; color: var(--navy-mid); font-size: .9rem; }
.ops-fold[open] > summary { border-bottom: 1px solid var(--navy-tint); }
.ops-map-wrap { overflow-x: auto; }
.ops-map { display: block; width: 100%; min-width: 760px; height: auto; font-family: inherit; }
.ops-map__node rect:first-of-type { fill: var(--white); stroke-width: 2; }
.ops-map__node--service rect:first-of-type { fill: #F8FAFC; }
.ops-map__node--apart rect:first-of-type { fill: #FAFAFB; }
.ops-map__link:hover .ops-map__node rect:first-of-type, .ops-map__link:focus .ops-map__node rect:first-of-type { fill: var(--navy-tint); }
.ops-map__title { font-size: 13px; font-weight: 600; fill: var(--navy); }
.ops-map__words { font-size: 11px; fill: var(--navy-mid); }
.ops-map__state { font-size: 11px; font-weight: 600; }
.ops-map__edge line { stroke-width: 2; }
.ops-map__label { font-size: 11px; fill: var(--navy-mid); paint-order: stroke; stroke: var(--white); stroke-width: 4px; stroke-linejoin: round; }
@media (max-width: 640px) { .ops-groups, .ops-charts { grid-template-columns: 1fr; } .ops-group .ops-facts th { width: auto; } .ops-meter { width: 48px; } }

/* WALK_A D (27 Nov 2026): the water round's outlet kinds on a named items list (R5), and an own copy told the standard form changed (Q99) */
.wa-outlet-kind { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.wa-copy-behind { margin-top: 12px; padding: 10px 12px; border: 1px solid #FDE68A; border-radius: 8px; background: var(--amber-50); }
.wa-copy-behind__title { margin: 0 0 6px; font-weight: 600; font-size: 13px; color: var(--amber-700); }
.wa-copy-behind__line { padding: 6px 8px; border-left: 3px solid #FDE68A; background: var(--amber-50); }

/* WALK_B L (CHECK 16): Settings, Compliance, Completion forms says which tasks open each form here */
.wb-opens { display: block; margin: 4px 0 0; font-size: 12px; line-height: 1.45; color: var(--navy-mid); }
.wb-opens__lead { font-weight: 600; color: var(--navy); }
.wb-opens summary.wb-opens__lead { cursor: pointer; }
.wb-opens__list { margin: 2px 0 0; padding-left: 16px; }
.wb-opens__list li { margin: 1px 0; overflow-wrap: anywhere; }

/* WALK_B H (CHECK 9, CHECK 10): the email a firm was sent, under it on a request; what is wrong, first in Details */
.assignee-email { flex-basis: 100%; margin: 2px 0 4px; font-size: 0.85rem; }
.assignee-email summary { cursor: pointer; color: var(--teal, #0D9488); font-weight: 600; }
.assignee-email__state { margin: 6px 0 4px; font-size: 0.8rem; }
.assignee-email__head { margin: 0 0 6px; overflow-wrap: anywhere; }
.assignee-email__text { white-space: pre-wrap; overflow-wrap: anywhere; padding: 8px 10px; border-left: 3px solid var(--navy-tint, #e2e8f0); background: var(--surface-muted, #F8FAFC); border-radius: 6px; }
.record-what__details { margin: 4px 0 0; white-space: normal; overflow-wrap: anywhere; }

/* WALK_C C7 (Q126): Settings > Set-up, an item answered under its module's checks (Permits to work: Not used here) */
.setup-notused-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0 0; font-size: 14px; color: var(--navy); }
.setup-notused-line > span { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }

/* MJ B2 (D1, M27): the request and the job raised from it show each other at the top of the page */
.record-link { border-left: 3px solid var(--teal); }
.record-link__body { display: grid; gap: 4px; }
.record-link__lead { margin: 0; color: var(--navy); overflow-wrap: anywhere; }
.record-link__note { margin: 0; font-size: 0.85rem; color: var(--navy-mid); }

/* MJ B6 (674, D5): a person's working week on their People page; a row per day, wrapping at 375px */
.mj-hours-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mj-hours-row .form-input { width: 120px; }
.mj-hours-day { min-width: 120px; margin: 0; }

/* MJ B5 (673; M18, M19, M20, D7): a firm on a request or job (its papers, Arrived, what was written to it) and who did the work */
.firm-on-record { flex-basis: 100%; display: grid; gap: 6px; margin: 2px 0 6px; font-size: 0.85rem; min-width: 0; }
.firm-on-record__papers, .firm-on-record__arrived, .firm-on-record__more, .firm-on-record__head { margin: 0; }
.firm-on-record__arrived { color: var(--emerald-700, #047857); font-weight: 600; }
.firm-on-record__panel > summary { list-style: none; display: inline-block; }
.firm-on-record__panel > summary::-webkit-details-marker { display: none; }
.firm-on-record__form { display: grid; gap: 6px; margin-top: 6px; max-width: 520px; }
.firm-on-record__when { display: flex; flex-wrap: wrap; gap: 6px; }
.firm-on-record__when .form-input { flex: 1 1 120px; min-width: 0; }
.firm-on-record__thread { display: grid; gap: 6px; border-left: 3px solid var(--navy-tint, #E8ECF2); padding-left: 10px; }
.firm-on-record__message--in { border-left: 3px solid var(--teal, #4B979B); padding-left: 8px; }
.firm-on-record__body { white-space: normal; overflow-wrap: anywhere; }
.done-by { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; min-width: 0; }
.done-by legend { padding: 0; margin-bottom: 2px; }
.done-by__choice { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; }
@supports selector(:has(*)) {
  .done-by:not(:has(input[value="firm"]:checked)) .done-by__name { display: none; }
}
.done-by__said { margin: 4px 0; font-size: 0.88rem; color: var(--navy-mid, #405268); }

/* MJ B7b Email in (Settings > Maintenance > Email in; a reply by email on a record's thread) */
.mi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 14px; margin: 8px 0; }
.mi-address { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mi-address .form-input { max-width: 160px; }
.mi-check { display: flex; align-items: flex-start; gap: 8px; font-size: 0.9rem; margin: 4px 0; }
.mi-check input { margin-top: 3px; }
.mi-inbox { border: 1px solid var(--navy-tint); border-radius: 8px; padding: 8px 10px; margin: 0 0 8px; }
.mi-inbox > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mi-message { border: 1px solid var(--navy-tint); border-radius: 8px; padding: 10px; margin: 0 0 10px; overflow-wrap: anywhere; }
.mi-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.mi-actions form { margin: 0; }
.mi-raise { display: flex; gap: 6px; flex-wrap: wrap; }
.mi-raise select { max-width: 220px; }
.mi-whole { margin-top: 4px; font-size: 12px; }
.mi-whole p { white-space: pre-wrap; margin: 6px 0 0; }

/* MJ B8 (28 Nov 2026; stories M1, M6, M9, M23, M25, M29, M33): a line's place and markers, My work, the close's reasons */
.work-line__place { font-size: 0.8rem; margin-top: 2px; }
.work-line__reopened { margin-top: 4px; }
.work-line__stage { color: var(--navy-mid, #475569); }
.my-work__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.my-work__kind { font-size: 0.75rem; margin-top: 2px; }
.my-work__list .td { vertical-align: top; }
.record-bar__why-close { border-top: 1px dashed var(--border, #E2E8F0); }
.record-bar__why { font-size: 0.82rem; }
.check-queue__total { margin: 0; font-size: 0.95rem; }
@media (max-width: 480px) {
  .my-work__actions .btn { flex: 1 1 100%; text-align: center; }
}

/* MJ B9 (683, 28 Nov 2026; story M16): teams following a record, and a note that asks a colleague */
.team-follow-list { margin: 6px 0 0; }
.team-follow-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0; font-size: 0.85rem; }
.team-follow-stop { display: inline; margin: 0; }
.team-follow-add { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.team-follow-add select { flex: 1; min-width: 180px; }
.team-follow-note { display: block; margin-top: 4px; }
.msg-asked { margin-left: 6px; }
.msg-ask { margin-bottom: 6px; }
.msg-ask small { display: block; margin-top: 2px; }

/* MJ B15 (692, D21): who downloaded a record's files (partials/file-downloads.php), folded, for a Manager at the school */
.file-downloads { margin-top: 10px; font-size: 0.85rem; color: var(--navy-mid); }
.file-downloads > summary { cursor: pointer; color: var(--teal); }
.file-downloads__list { margin: 6px 0; padding-left: 18px; overflow-wrap: anywhere; }
.file-downloads__list li { margin: 2px 0; }

/* MJ B18: what came with an email, under its message in the conversation (views/helpdesk/_mail-files.php) */
.mi-files { margin-top: 8px; }
.mi-files__grid { display: flex; flex-wrap: wrap; gap: 8px; }
.mi-files__item { display: flex; flex-direction: column; width: 112px; text-decoration: none; color: var(--navy-mid); font-size: 11px; }
.mi-files__item img, .mi-files__tile { width: 112px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--navy-tint); background: var(--navy-tint); }
.mi-files__tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 4px; box-sizing: border-box; font-size: 11px; color: var(--navy-mid); }
.mi-files__name { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-files__pending { display: block; color: #92400E; }
.mi-files__link { margin: 6px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.mi-files__link i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.mi-whole__note { font-size: 11px; }
@media (max-width: 480px) { .mi-files__item, .mi-files__item img, .mi-files__tile { width: 96px; } .mi-files__item img, .mi-files__tile { height: 72px; } }

/* R20 W1 (28 Nov 2026): a later provider's report beside a requirement's line reads by its own age: overdue in red, awaited in amber (as before). */
.register-beside[data-beside="provider_report_overdue"] { color: var(--red-700, #b91c1c); }

/* R20 W4 (28 Nov 2026, CHECK 34): a /dashboard page a Staff person may open, drawn inside the Staff Portal's frame. */
.portal-framed-head { margin: 4px 0 16px; }
.portal-framed-title { font-family: 'Spectral', Georgia, serif; font-size: 24px; margin: 6px 0 4px; color: var(--navy); }
.portal-framed-head .page-intro-row { margin: 4px 0 0; }
a.portal-header__name { text-decoration: none; }
a.portal-header__name:hover { color: #fff; text-decoration: underline; }

/* R20 P4 (28 Nov 2026, CHECK 44 point 6): a designed confirmation's long list sits under a fold, so the button stays on the first screen. */
.confirm-modal-fold { margin: 0 0 14px; font-size: 13px; color: var(--text-secondary, #555); }
.confirm-modal-fold > summary { cursor: pointer; font-weight: 500; color: var(--navy, #1b2a4a); }
.confirm-modal-fold ul { margin: 8px 0 0; padding-left: 18px; max-height: 40vh; overflow-y: auto; }
.confirm-modal-fold li { margin: 2px 0; }
.confirm-modal-note { margin: 0 0 14px; font-size: 13px; padding: 8px 10px; border-radius: 6px; background: var(--amber-bg, #fff6e5); }
/* R20 P4 (CHECK 44 point 11): a group member whose level here is below the group's. */
.group-member-below { font-size: 12px; color: var(--text-secondary, #6b7280); }
/* R20 P3 (Q160): a request held until a date, its resolution clock paused (Response times). */
.sla-badge--held { background: #F1EFE8; color: #5A5446; }
/* R20 P3 (Q162): when the work was done, on the Resolve form. */
.done-on { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.done-on .form-input { max-width: 220px; }

/* R21 L1 (28 Nov 2026): a helpdesk target is a number and its unit, working hours or working days */
.sla-target-measure { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.sla-target-measure select.form-input { width: auto; }

/* Ticket 231 (1 Dec 2026): a scrolling list of tick boxes in place of a small multiple select (Settings > Request types > Intake questions). */
.tick-list-group { border: 0; padding: 0; margin-inline: 0; }
.tick-list { max-height: 12rem; overflow-y: auto; border: 1px solid var(--navy-tint); border-radius: 8px; padding: 6px 10px; background: var(--white); }
.tick-list__row { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 14px; cursor: pointer; }
.tick-list__row input { margin-top: 3px; flex: none; }

/* SDS1 (800): the COSHH register from safety data sheets. The batch page (drop zone, progress) and the check page (the
   sheet beside the form, where each field came from, what the hazards mean). No coloured left bars: tints and chips. */
.sds-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px 16px; margin-top: 4px;
  border: 1.5px dashed #C5CFDC; border-radius: 10px; background: #FAFBFC; color: var(--navy-mid); text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.sds-dropzone:hover, .sds-dropzone:focus-within, .sds-dropzone--over { border-color: var(--teal); background: #F1F8F8; }
.sds-dropzone-title { font-size: 15px; font-weight: 500; color: var(--navy); }
.sds-dropzone-hint { font-size: 13px; }
.sds-progress { margin: 10px 0 0; font-size: 14px; color: var(--navy); font-weight: 500; }
.sds-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.sds-sheet { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 6px; }
.sds-sheet-frame { width: 100%; height: calc(100vh - 150px); min-height: 480px; border: 1px solid var(--navy-tint); border-radius: 10px; background: #fff; }
.sds-sheet-image { width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border: 1px solid var(--navy-tint); border-radius: 10px; background: #fff; }
.sds-check-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sds-notes { padding: 10px 14px; border-radius: 8px; background: var(--blue-50); color: var(--navy); font-size: 13px; line-height: 1.5; }
.sds-notes p { margin: 0 0 4px; }
.sds-notes p:last-child { margin-bottom: 0; }
.sds-match { padding: 10px 14px; margin-bottom: 14px; border-radius: 8px; background: var(--amber-50); border: 1px solid #FDE68A; color: var(--navy); font-size: 14px; }
.sds-radio { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 4px 0; cursor: pointer; }
.sds-radio input { margin-top: 3px; flex: none; }
.sds-form-heading { margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--navy-tint); font-size: 14px; font-weight: 600; color: var(--navy); }
.sds-form-heading:first-of-type { margin-top: 4px; padding-top: 0; border-top: 0; }
.sds-source { margin: 4px 0 0; font-size: 12px; line-height: 1.45; color: var(--navy-mid); overflow-wrap: anywhere; }
.sds-source q { font-style: italic; }
.sds-check, .sds-ok { display: inline-block; padding: 0 6px; margin-right: 4px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 18px; }
.sds-check { background: var(--amber-50); color: var(--amber-700); border: 1px solid #FDE68A; }
.sds-ok { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.sds-sense { margin: 12px 0 4px; padding: 12px 14px; border-radius: 8px; background: #F6F8FB; border: 1px solid var(--navy-tint); font-size: 13px; color: var(--navy); }
.sds-sense-group { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 6px; line-height: 1.45; }
.sds-sense-letter { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 600; background: var(--navy-tint); color: var(--navy); }
.sds-sense-letter--c { background: var(--amber-50); color: var(--amber-700); }
.sds-sense-letter--d, .sds-sense-letter--e { background: var(--red-50); color: var(--red-700); }
.sds-sense-letter--s { background: var(--blue-50); color: var(--navy); }
.sds-sense-flags { margin: 6px 0 0; padding-left: 18px; line-height: 1.5; }
.sds-sense-flags li { margin: 0 0 4px; }
.sds-link-button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.sds-sites { margin-top: 10px; font-size: 14px; }
.sds-sites summary { cursor: pointer; color: var(--teal); font-weight: 500; }
.sds-sites-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 12px; margin: 8px 0 4px; }
.sds-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--navy-tint); }
.sds-discard { margin-left: auto; }
.sds-reading-line { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; color: var(--navy); }
.sds-spinner { width: 16px; height: 16px; border: 2px solid var(--navy-tint); border-top-color: var(--teal); border-radius: 50%; animation: sds-spin .8s linear infinite; }
@keyframes sds-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sds-spinner { animation: none; } }
.sds-signal { text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 960px) {
  .sds-layout { grid-template-columns: minmax(0, 1fr); }
  .sds-sheet { position: static; }
  .sds-sheet-frame { height: 60vh; min-height: 360px; }
}

/* SDS1: the "Enhanced with AI" mark, drawn only where AI took part in reading a sheet (COSHHSdsDraftModel::readWithAi) */
.sds-ai { margin-left: 6px; }
.sds-notes .sds-ai, [data-coshh-provenance] .sds-ai { margin: 0 6px 0 0; }

/* TH lane B: the acting band (a real person acting as an example persona); wraps to fit 375px */
.trial-acting { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.trial-acting__words { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.trial-acting__form { margin: 0; flex: 0 0 auto; }
/* end TH lane B */
/* TH lane A: the trial home (/dashboard/trial, views/trial/) and the trial band's link back to it. Cards in the house look,
   no coloured left-border bars; everything wraps to fit 375px with no sideways scroll. */
.trial-notice__home { color: var(--teal); font-weight: 500; text-decoration: underline; white-space: nowrap; }
.th-home { max-width: 1100px; min-width: 0; }
.th-home .card { min-width: 0; overflow-wrap: anywhere; }
.th-jump { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.th-jump a { color: var(--teal); }
.th-part { scroll-margin-top: 80px; }
.th-lede { margin: 0 0 8px; font-size: 16px; line-height: 1.5; color: var(--navy); }
.th-text { margin: 0 0 10px; line-height: 1.5; }
.th-note { margin: 0 0 10px; color: var(--navy-mid); font-size: 14px; line-height: 1.5; }
.th-sub { font-size: 15px; font-weight: 500; margin: 18px 0 6px; color: var(--navy); }
.th-sub--first { margin-top: 0; }
.th-list { margin: 0 0 10px; padding-left: 20px; line-height: 1.5; }
.th-list li + li { margin-top: 4px; }
.th-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 4px 24px; }
.th-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.th-tile { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--navy-tint); border-radius: 4px; padding: 14px 16px; background: var(--white); min-width: 0; }
.th-tile.is-current { background: #F1F8F8; border-color: rgba(75,151,155,0.5); }
.th-tile__name { margin: 0; font-weight: 500; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.th-tile__meta { margin: 0; font-size: 13px; color: var(--navy-mid); }
.th-tile__line { margin: 0; font-size: 14px; line-height: 1.45; }
.th-tile__foot { margin-top: auto; padding-top: 4px; }
.th-tile__foot form { margin: 0; }
.th-tile__state { margin: 0 0 6px; font-size: 13px; color: var(--navy-mid); }
.th-journeys { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.th-journey { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; border: 1px solid var(--navy-tint); border-radius: 4px; padding: 12px 16px; min-width: 0; }
.th-journey__text { flex: 1 1 260px; min-width: 0; }
.th-journey__title { margin: 0 0 4px; font-weight: 500; }
.th-journey__meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--navy-mid); }
.th-journey__actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }
.th-journey__actions form { margin: 0; }
.th-fold { margin-top: 8px; }
.th-fold summary { cursor: pointer; color: var(--navy-mid); font-size: 14px; margin-bottom: 8px; }
@media (max-width: 640px) {
  .th-journey { padding: 12px; }
  .th-journey__actions { flex: 1 1 100%; }
}
/* end TH lane A */
/* TH lane C: the journey strip under the trial band (views/partials/_trial_journey_strip.php), every signed-in layout.
   Compact, a tint not a coloured left bar; wraps to fit 375px. */
.th-strip { border: 1px solid var(--navy-tint); border-radius: 4px; background: #F7F9FB; padding: 10px 14px; margin: 0 0 16px; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.th-strip__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.th-strip__label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--navy-mid); }
.th-strip__title { color: var(--navy); font-weight: 500; }
.th-strip__minutes { font-size: 13px; color: var(--navy-mid); }
.th-strip__steps-wrap { margin-top: 6px; }
.th-strip__steps-wrap summary { cursor: pointer; color: var(--navy-mid); font-size: 13px; }
.th-strip__steps { margin: 6px 0 0; padding-left: 20px; line-height: 1.45; }
.th-strip__steps li + li { margin-top: 4px; }
.th-strip__hint-btn { background: none; border: 0; padding: 0 0 0 6px; color: var(--teal); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.th-strip__hint-btn:disabled { color: var(--navy-mid); cursor: default; }
.th-strip__hint { display: block; margin-top: 4px; padding: 6px 10px; background: var(--white); border: 1px solid var(--navy-tint); border-radius: 4px; color: var(--navy); font-size: 13px; }
.th-strip__done { margin-top: 6px; padding: 8px 10px; background: #F1F8F8; border-radius: 4px; color: var(--navy); }
.th-strip__done a, .th-strip__home { color: var(--teal); text-decoration: underline; }
.th-strip__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }
.th-strip__actions form { margin: 0; }
.th-strip--finished { background: var(--white); }
@media (max-width: 640px) { .th-strip { padding: 10px 12px; } }
/* end TH lane C */
