/* SPDX-FileCopyrightText: 2026 Vittorio Scala */
/* SPDX-License-Identifier: Apache-2.0 */
/* Brand font: only for the most important texts (ITER, project name) */
@font-face {
  font-family: 'Connext Sans';
  src: url('../fonts/ConnextSans-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
.font-brand { font-family: 'Connext Sans', var(--bs-body-font-family); font-weight: 400; font-synthesis: none; }

:root {
  /* default theme (ITER red): overridden by the colours chosen in Administration → Appearance */
  --iter-primary: #E4002B;
  --iter-primary-rgb: 228, 0, 43;
  --iter-primary-dark: #ab0020;
  --iter-primary-light: #f38ca0;
  --iter-primary-subtle: #fde8ec;
  --iter-primary-faint: #fef7f9;
  --iter-accent: #8C0019;
  --iter-nav-start: #1C1F26;
  --iter-nav-end: #8C0019;
  --iter-deep: #1C1F26;
  --iter-deep-rgb: 28, 31, 38;
  --iter-bg: #f6f6f8;
  --bs-primary: var(--iter-primary);
  --bs-primary-rgb: var(--iter-primary-rgb);
  --bs-link-color: var(--iter-primary);
  --bs-link-color-rgb: var(--iter-primary-rgb);
  --bs-link-hover-color: var(--iter-primary-dark);
  --bs-primary-text-emphasis: var(--iter-primary-dark);
  --bs-primary-bg-subtle: var(--iter-primary-subtle);
  --bs-primary-border-subtle: var(--iter-primary-light);
  --bs-focus-ring-color: rgba(var(--iter-primary-rgb), .25);
  --iter-footer-h: 2.6rem;
  --bs-body-font-family: 'Inter Variable', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
body { background: var(--iter-bg); font-size: .95rem; padding-bottom: var(--iter-footer-h); }

.btn-primary { --bs-btn-bg: var(--iter-primary); --bs-btn-border-color: var(--iter-primary);
  --bs-btn-hover-bg: var(--iter-primary-dark); --bs-btn-hover-border-color: var(--iter-primary-dark);
  --bs-btn-active-bg: var(--iter-primary-dark); --bs-btn-disabled-bg: var(--iter-primary); }
.btn-outline-primary { --bs-btn-color: var(--iter-primary); --bs-btn-border-color: var(--iter-primary);
  --bs-btn-hover-bg: var(--iter-primary); --bs-btn-hover-border-color: var(--iter-primary);
  --bs-btn-active-bg: var(--iter-primary-dark); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--iter-primary-light); box-shadow: 0 0 0 .2rem rgba(var(--iter-primary-rgb), .15); }
.form-check-input:checked { background-color: var(--iter-primary); border-color: var(--iter-primary); }
.text-primary { color: var(--iter-primary) !important; }
.pagination { --bs-pagination-color: var(--iter-primary); --bs-pagination-hover-color: var(--iter-primary-dark);
  --bs-pagination-active-bg: var(--iter-primary); --bs-pagination-active-border-color: var(--iter-primary);
  --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(var(--iter-primary-rgb), .15); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--iter-primary); }
.list-group { --bs-list-group-active-bg: var(--iter-primary); --bs-list-group-active-border-color: var(--iter-primary); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--iter-primary); }
.bg-primary-subtle { background: var(--iter-primary-subtle) !important; }

/* Navbar */
.iter-nav { background: linear-gradient(90deg, var(--iter-nav-start) 35%, var(--iter-nav-end)); box-shadow: 0 2px 10px rgba(var(--iter-deep-rgb), .25); }
.brand-mark { display: inline-flex; width: 32px; height: 32px; border-radius: 9px; align-items: center; justify-content: center;
  background: rgba(255,255,255,.15); font-size: 1.1rem; }
.navbar-brand { font-weight: 700; letter-spacing: .08em; }
.nav-logo { height: 26px; width: auto; margin-right: 1rem; padding-right: 1rem; border-right: 1px solid rgba(255,255,255,.22);
  box-sizing: content-box; }
/* the slogan takes the free space between the menu and the search box, and hides when it does not fit there */
.nav-slogan { flex: 1 1 0; min-width: 0; overflow: hidden; white-space: nowrap; text-align: center; padding: 0 1rem;
  pointer-events: none; color: rgba(255,255,255,.8); font-size: .95rem; letter-spacing: .12em; text-transform: uppercase; }
.nav-slogan.is-cut { visibility: hidden; }
.nav-logo-link { display: inline-flex; align-items: center; transition: opacity .15s ease; }
.nav-logo-link:hover { opacity: .85; }
@media (max-width: 575.98px) { .nav-logo { height: 20px; margin-right: .6rem; padding-right: .6rem; } }
.theme-swatch { display: inline-block; width: 36px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,.1); }
.form-control-color { width: 3.2rem; padding: .25rem; }
.login-logo { height: 34px; width: auto; max-width: 100%; }
.logo-preview { background: var(--iter-bg, #f1f3f6); border: 1px solid rgba(0,0,0,.08); border-radius: .5rem; padding: .6rem .9rem; }
.logo-preview img { height: 30px; width: auto; max-width: 220px; display: block; }
.login-acronym { color: var(--bs-secondary-color); letter-spacing: .02em; }
.login-acronym b { color: var(--iter-primary); font-weight: 700; }
.login-mark { width: 56px; height: 56px; font-size: 1.6rem; border-radius: 16px;
  background: linear-gradient(135deg, var(--iter-primary), var(--iter-accent)); }
.avatar { display: inline-flex; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--avatar-bg, #64748b); color: #fff;
  align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; letter-spacing: .02em; line-height: 1;
  vertical-align: middle; user-select: none; }
.avatar-sm { width: 22px; height: 22px; font-size: .6rem; }
.avatar-xs { width: 18px; height: 18px; font-size: .52rem; letter-spacing: 0; }
.avatar-none { background: #cbd5e1; }
.iter-nav .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
/* Submit button while its form is being sent (busy.js): a spinner in place of the icon */
.is-busy { cursor: progress; }
.is-busy > .bi { display: none; }
.busy-spinner { width: .9em; height: .9em; border-width: .15em; vertical-align: -.1em; margin-right: .4em; }
.is-busy > .busy-spinner:last-child, .is-busy > .busy-spinner:has(+ .bi:last-child) { margin-right: 0; }
.person { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; vertical-align: middle; }

/* Footer */
.iter-footer { height: var(--iter-footer-h); display: flex; align-items: center; font-size: .78rem; color: #64748b;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid #e5e8f0; box-shadow: 0 -4px 16px rgba(15,23,42,.04); }
.iter-footer .bi-code-slash { color: var(--iter-primary-light); }
.iter-footer .team { color: var(--iter-primary); font-weight: 600; }
.iter-footer .sep { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #cbd5e1;
  margin: 0 .6rem; vertical-align: middle; }
.iter-footer .unit { font-weight: 600; letter-spacing: .08em; color: #475569; }
.iter-footer .brand { font-weight: 700; letter-spacing: .08em; color: #94a3b8; font-size: .72rem; }
.iter-footer .version { font-weight: 500; letter-spacing: .02em; opacity: .85; font-variant-numeric: tabular-nums; }
.iter-footer .mark { display: inline-flex; width: 20px; height: 20px; border-radius: 6px; align-items: center;
  justify-content: center; color: #fff; font-size: .7rem; background: linear-gradient(135deg, var(--iter-primary), var(--iter-accent)); }
.login-body .iter-footer { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
  border-top-color: rgba(255,255,255,.08); box-shadow: none; color: rgba(255,255,255,.6); }
.login-body .iter-footer .team, .login-body .iter-footer .unit { color: #fff; }
.login-body .iter-footer .sep { background: rgba(255,255,255,.35); }
.login-body .iter-footer .brand { color: rgba(255,255,255,.6); }
.login-body main { min-height: calc(100vh - var(--iter-footer-h)) !important; }

/* Cards & layout */
.card { border: 0; border-radius: .85rem; box-shadow: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04); }
.card-header { background: transparent; border-bottom: 1px solid #eef0f5; font-weight: 600; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
/* the buttons of a page head go to a new line on narrow screens instead of leaving the page */
.page-head > .d-flex { flex-wrap: wrap; }
.page-head .btn { white-space: nowrap; }
.sign-card > .card-header { flex-wrap: wrap; }
.page-head h1.font-brand { font-size: 1.75rem; font-weight: 400; }
.page-head .sub { color: #64748b; font-size: .9rem; }
.code-badge { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--iter-primary-subtle); color: var(--iter-primary-dark);
  border-radius: .4rem; padding: .15rem .5rem; font-size: .8rem; font-weight: 600; }

.min-w-0 { min-width: 0; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere; }
.project-card { --kind: var(--iter-primary); --kind-2: var(--iter-accent); --kind-soft: var(--iter-primary-subtle);
  position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 1rem; color: inherit; text-decoration: none;
  box-shadow: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.05); transition: transform .15s ease, box-shadow .15s ease; }
.project-card::before { content: ''; display: block; height: 5px; background: linear-gradient(90deg, var(--kind), var(--kind-2)); }
.project-card.kind-simple { --kind: #2563eb; --kind-2: #60a5fa; --kind-soft: #dbeafe; }
.project-card.kind-phased { --kind: #0d9488; --kind-2: #2dd4bf; --kind-soft: #ccfbf1; }
.project-card.kind-survey { --kind: #7c3aed; --kind-2: #a78bfa; --kind-soft: #ede9fe; }
.project-card.kind-costctl { --kind: #16a34a; --kind-2: #4ade80; --kind-soft: #dcfce7; }
.project-card.kind-wiki { --kind: #475569; --kind-2: #94a3b8; --kind-soft: #e2e8f0; }
.project-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(var(--iter-deep-rgb), .16); }
.project-card .icon, .project-card-icon { width: 56px; height: 56px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--kind), var(--kind-2)); color: #fff; font-size: 1.6rem; }
.project-card .card-body { flex: 1 1 auto; padding: 1.1rem 1.25rem .75rem; }
.project-card-name { font-size: 1.1rem; font-weight: 700; line-height: 1.25; }
.project-card-desc { margin-top: .75rem; min-height: 2.6em; font-size: .85rem; line-height: 1.3; color: var(--bs-secondary-color); }
.project-card .code-badge { background: var(--kind-soft); color: var(--kind); }
.project-card-foot { display: flex; align-items: center; min-height: 3rem; padding: .6rem 1.25rem; border-top: 1px solid var(--bs-border-color-translucent);
  background: rgba(var(--iter-deep-rgb), .02); font-size: .8rem; color: var(--bs-secondary-color); }
.project-card-foot .foot-info i { margin-right: .4rem; color: var(--kind); }
.project-card.has-to-sign { box-shadow: 0 0 0 2px #f59e0b, 0 1px 3px rgba(15,23,42,.08); }
.project-card.has-to-sign:hover { box-shadow: 0 0 0 2px #f59e0b, 0 12px 28px rgba(var(--iter-deep-rgb), .16); }
.project-card-sign { position: absolute; right: 1rem; bottom: .55rem; display: flex; gap: .4rem; }
.project-card-sign .quick-chip { padding: .15rem .55rem; font-size: .75rem; }
/* signature counts loaded after the page (static/js/homecounts.js): spinner meanwhile, fade in, «–» on failure */
.project-card-sign { align-items: center; min-height: 1.6rem; }
.sign-loading { display: inline-flex; align-items: center; color: #f59e0b; }
.sign-loading .spinner-border { width: 1rem; height: 1rem; border-width: .15em; }
.sign-failed { color: var(--bs-secondary-color); font-weight: 600; cursor: help; }
.sign-arrived { animation: sign-in .35s ease-out; }
@keyframes sign-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.home-waiting { min-height: 1.5rem; display: flex; align-items: center; }
.home-waiting .no-waiting { font-weight: 400; color: var(--bs-secondary-color); }
.home-waiting.is-loading .loading-text { font-weight: 400; font-style: italic; color: transparent;
  background: linear-gradient(90deg, var(--bs-secondary-color) 0%, var(--bs-secondary-color) 40%, var(--bs-tertiary-bg) 50%,
              var(--bs-secondary-color) 60%, var(--bs-secondary-color) 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; animation: waiting-shimmer 1.4s linear infinite; }
@keyframes waiting-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sign-arrived, .home-waiting.is-loading .loading-text { animation: none; } .sign-loading .spinner-border { animation-duration: 2.5s; } }
.project-card-tools { position: absolute; top: .85rem; right: 1.25rem; display: flex; gap: .1rem; }
.project-card-tools .card-tool { padding: .1rem .35rem; color: #94a3b8; border: 0; }
.project-card-tools .card-tool:hover { color: var(--bs-body-color); }
.project-card-tools .card-tool.is-favourite { color: #f59e0b; }
.project-card-tools .drag-handle { cursor: grab; }
/* favourites: warm tint and an amber stripe, so they stand out from the other projects */
.project-card.is-fav { --fav: #f59e0b; border-left: 4px solid var(--fav);
  background: color-mix(in srgb, var(--fav) 7%, var(--bs-card-bg, var(--bs-body-bg))); }
[data-bs-theme="dark"] .project-card.is-fav { background: color-mix(in srgb, var(--fav) 11%, var(--bs-card-bg, var(--bs-body-bg))); }
.project-card.is-fav .project-card-foot { background: color-mix(in srgb, var(--fav) 6%, transparent); }
@media (hover: hover) {
  .project-card-tools .card-tool:not(.is-favourite) { opacity: 0; transition: opacity .15s ease; }
  [data-id]:hover .project-card-tools .card-tool, .project-card-tools .card-tool:focus-visible { opacity: 1; }
}
.drag-handle { cursor: grab; color: #94a3b8; touch-action: none; }
.sort-ghost { opacity: .4; }
.home-section { font-size: 1rem; font-weight: 600; color: var(--bs-secondary-color); margin: 0 0 .75rem; display: flex; align-items: center; gap: .4rem; }
.home-section::after { content: ''; flex: 1; height: 1px; margin-left: .5rem; background: var(--bs-border-color); }
.home-section .count { font-weight: 400; opacity: .7; }
.home-section .bi-star-fill { color: #f59e0b; }
.home-section.is-fav-section { color: #b45309; }
[data-bs-theme="dark"] .home-section.is-fav-section { color: #fbbf24; }
.home-section.is-fav-section::after { background: #f59e0b; opacity: .5; }
.home-news { --news: #2563eb; --news-bg: #eff6ff; display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.5rem;
  padding: 1rem 1.25rem; border: 1px solid color-mix(in srgb, var(--news) 35%, transparent); border-left: 6px solid var(--news);
  border-radius: .75rem; background: var(--news-bg); box-shadow: 0 2px 10px color-mix(in srgb, var(--news) 15%, transparent); }
.home-news-important { --news: #d97706; --news-bg: #fffbeb; }
.home-news-urgent { --news: #dc2626; --news-bg: #fef2f2; }
.project-news { --news: #2563eb; --news-bg: #eff6ff; display: flex; align-items: center; gap: .6rem; padding: .45rem 1.5rem; font-size: .9rem; font-weight: 500;
  color: color-mix(in srgb, var(--news) 75%, #000); background: color-mix(in srgb, var(--news-bg) 75%, var(--news) 14%);
  border-bottom: 1px solid color-mix(in srgb, var(--news) 35%, transparent); border-left: 5px solid var(--news); }
.project-news i { color: var(--news); }
.project-news-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-news-text > * { display: inline; margin: 0; padding: 0; }
.project-news-text > * + *::before { content: " · "; }
.project-news-text a, .project-news-more { color: inherit; font-weight: 600; text-decoration: underline; }
.project-news-more { flex-shrink: 0; font-size: .8rem; }
.project-news-important { --news: #d97706; --news-bg: #fffbeb; }
.project-news-urgent { --news: #dc2626; --news-bg: #fef2f2; }
[data-bs-theme=dark] .project-news { --news-bg: color-mix(in srgb, var(--news) 20%, #14161b); color: color-mix(in srgb, var(--news) 40%, #fff); }
.home-news-icon { font-size: 1.6rem; line-height: 1; color: var(--news); flex-shrink: 0; }
.home-news-text { flex: 1; min-width: 0; font-size: 1.1rem; font-weight: 500; overflow-wrap: anywhere; }
.home-news-text > :last-child { margin-bottom: 0; }
.home-news-text a { color: color-mix(in srgb, var(--news) 75%, #000); font-weight: 600; }
.home-news-text table { border-collapse: collapse; }
.home-news-text td, .home-news-text th { border: 1px solid var(--bs-border-color); padding: .25rem .5rem; }
[data-bs-theme="dark"] .home-news { --news-bg: color-mix(in srgb, var(--news) 14%, var(--bs-body-bg)); }
[data-bs-theme="dark"] .home-news-text a { color: color-mix(in srgb, var(--news) 60%, #fff); }
.project-card-logo { width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; }
.project-card-logo img, .project-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.project-logo-preview { height: 64px; max-width: 260px; padding: .5rem; border-radius: 8px; display: inline-flex;
  align-items: center; background: #fff; border: 1px solid var(--bs-border-color); }

/* Tables */
.table-iter { margin: 0; }
.table-iter thead th { background: #f8fafc; color: #475569; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  font-weight: 600; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.table-iter thead th a { color: inherit; text-decoration: none; }
.table-iter tbody tr.clickable { cursor: pointer; }
.table-iter tbody tr:hover { background: var(--iter-primary-faint); }
.table-iter td { vertical-align: middle; }
.item-no { font-weight: 600; color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }
.item-table tbody tr.clickable:hover .item-no { color: var(--iter-primary-dark); }
/* item list: a long value takes two lines at most (the whole text in the tooltip), so the rows keep an even height */
.item-table .cell-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; max-width: 24rem; overflow-wrap: anywhere; }
.item-table .cell-clamp.cell-long { min-width: 14rem; }

/* Administration sidebar */
.manage-nav .list-group-item { border: 0; border-radius: .55rem !important; margin-bottom: 2px; color: #334155; }
.manage-nav .list-group-item.active { background: var(--iter-primary-subtle); color: var(--iter-primary-dark); font-weight: 600; }
.manage-nav .list-group-item i { width: 1.4rem; display: inline-block; }

/* Item tabs */
.nav-tabs.iter-tabs { border-bottom: 1px solid #e2e8f0; }
.nav-tabs.iter-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: #64748b; font-weight: 500; }
.nav-tabs.iter-tabs .nav-link.active { color: var(--iter-primary); border-bottom-color: var(--iter-primary); background: transparent; }
.field-row { padding: .75rem 0; border-bottom: 1px dashed #e8ebf2; }
.field-row:last-child { border-bottom: 0; }
.field-label { color: #64748b; font-size: .85rem; font-weight: 500; }
.field-value { min-height: 1.2rem; word-break: break-word; }
/* item page: a narrow column for the labels, the rest to the values; tables (checklists) take the whole width */
@media (min-width: 768px) {
  .field-row > .field-label { flex: 0 0 12rem; max-width: 12rem; }
  .field-row > .field-value { flex: 1 1 0; min-width: 0; }
  .field-row-wide > .field-label { flex: 0 0 100%; max-width: 100%; margin-bottom: .35rem; }
  .field-row-wide > .field-value { flex: 0 0 100%; max-width: 100%; }
}
/* item list: one item type at a time */
.type-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.type-tab { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .8rem; border-radius: 999px;
  border: 1px solid #e2e8f0; background: #fff; color: #334155; text-decoration: none; font-weight: 500; font-size: .9rem; }
.type-tab:hover { border-color: var(--iter-primary-light); color: var(--iter-primary-dark); }
.type-tab.active { background: var(--iter-primary); border-color: var(--iter-primary); color: #fff; }
.type-tab .count { font-size: .75rem; opacity: .75; }
/* child item: the parent's fields, small, at the top */
.parent-head { border-left: 3px solid var(--iter-primary); }
.parent-head .card-header { background: var(--iter-primary-subtle); }
.parent-head .state-badge { font-size: .72rem; }
.parent-head .parent-toggle .bi { transition: transform .15s; }
.parent-head .parent-toggle[aria-expanded="false"] .bi { transform: rotate(180deg); }
.parent-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .35rem 1rem;
  font-size: .78rem; }
.parent-fields > div { min-width: 0; }
.parent-fields dt { color: #64748b; font-weight: 500; font-size: .7rem; text-transform: uppercase; letter-spacing: .02em; }
.parent-fields dd { margin: 0; overflow-wrap: anywhere; }
.parent-fields dd .wf-progress { max-width: 9rem; }
/* parent item: its children by type */
.child-group + .child-group { margin-top: 1.25rem; }
.child-group h3 { font-size: .95rem; margin: 0; }
.kids-menu > button { cursor: pointer; }
.kids-menu-list { min-width: 18rem; max-width: 32rem; max-height: 60vh; overflow-y: auto; }
.kids-menu-item { display: flex; align-items: center; gap: .5rem; }
.kids-menu-item .item-no { color: var(--bs-secondary-color); min-width: 2.5rem; }
.kids-menu-name { flex: 1 1 auto; min-width: 0; }
.field-value img, .rte-content img, .history-html img { max-width: 100%; height: auto; border-radius: .4rem; }
.empty { color: #cbd5e1; }

/* Rich text editor */
.rte { position: relative; border: 1px solid #dee2e6; border-radius: .5rem; background: #fff; overflow: hidden; }
.rte-resize { position: absolute; z-index: 15; outline: 2px solid var(--iter-primary); pointer-events: none; }
.rte-resize .rte-handle { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; border-radius: 2px;
  background: var(--iter-primary); border: 2px solid #fff; cursor: nwse-resize; pointer-events: auto; touch-action: none; }
.rte-resize .rte-sizes { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 1px; padding: 2px;
  background: rgba(15, 23, 42, .85); border-radius: 0 0 .35rem 0; pointer-events: auto; white-space: nowrap; }
.rte-resize .rte-sizes button { border: 0; background: transparent; color: #fff; font-size: .72rem; padding: .05rem .35rem;
  border-radius: .25rem; }
.rte-resize .rte-sizes button:hover { background: rgba(255, 255, 255, .2); }
.rte-resize .rte-size-px { color: #cbd5e1; font-size: .7rem; padding: 0 .35rem; }
.rte:focus-within { border-color: var(--iter-primary-light); box-shadow: 0 0 0 .2rem rgba(var(--iter-primary-rgb), .15); }
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: .35rem; background: #f8fafc; border-bottom: 1px solid #eef0f5; }
.rte-toolbar button { border: 0; background: transparent; border-radius: .35rem; padding: .2rem .5rem; color: #475569; }
.rte-toolbar button:hover { background: #e2e8f0; }
.rte-toolbar .sep { width: 1px; background: #e2e8f0; margin: 0 .25rem; }
.rte-colors { position: relative; display: inline-flex; }
.rte-swatches { display: none; position: absolute; top: 100%; left: 0; z-index: 20; width: 9.5rem; flex-wrap: wrap; gap: .3rem;
  padding: .4rem; background: #fff; border: 1px solid #e2e8f0; border-radius: .4rem; box-shadow: 0 4px 12px rgba(15, 23, 42, .12); }
.rte-swatches.show { display: flex; }
.rte-toolbar .rte-swatches button { width: 1.4rem; height: 1.4rem; padding: 0; border-radius: .3rem; border: 1px solid rgba(0, 0, 0, .1); }
.rte-toolbar .rte-swatches button:hover { outline: 2px solid #cbd5e1; }
.rte-content { min-height: 160px; max-height: 600px; overflow-y: auto; padding: .75rem 1rem; outline: none; }
.rte-toolbar .rte-block { border: 1px solid #e2e8f0; border-radius: .35rem; background: #fff; color: #475569; font-size: .85rem; padding: .15rem .3rem; }
.rte-tablebar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: .25rem .35rem; background: var(--iter-primary-subtle); border-bottom: 1px solid #eef0f5; }
.rte-tablebar.d-none { display: none !important; }
.rte-tablebar button { border: 0; background: transparent; border-radius: .35rem; padding: .1rem .45rem; font-size: .78rem; color: #475569; }
.rte-tablebar button:hover { background: #e2e8f0; }
.rte-content:empty::before { content: attr(data-placeholder); color: #94a3b8; }
.rte.dragover { border-color: var(--iter-primary); background: var(--iter-primary-subtle); }
.rte-status { font-size: .8rem; color: #64748b; padding: .25rem .75rem; border-top: 1px solid #eef0f5; background: #fcfcfe; }

/* Attachments */
.att-list .att { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border: 1px solid #eef0f5; border-radius: .5rem;
  margin-bottom: .35rem; background: #fff; }
.att-list .att i { font-size: 1.2rem; color: var(--iter-primary); }

/* Discussion tab of the item: one folding card per thread */
.forum-thread > summary { cursor: pointer; list-style: none; }
.forum-thread > summary::-webkit-details-marker { display: none; }
.forum-thread[open] > summary { border-bottom: 1px solid var(--bs-border-color); }
.forum-text { white-space: normal; overflow-wrap: anywhere; }

/* History */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before { content: ''; position: absolute; left: .45rem; top: .3rem; bottom: .3rem; width: 2px; background: #e2e8f0; }
.timeline .entry { position: relative; margin-bottom: 1rem; }
.timeline .entry::before { content: ''; position: absolute; left: -1.3rem; top: 1.05rem; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--iter-primary); }
/* Item history as a timeline (core/views/items._history_events): one card per save, a dot by kind of change */
.hist-timeline { position: relative; padding-left: 2.6rem; max-width: 70rem; }
.hist-timeline::before { content: ''; position: absolute; left: .95rem; top: .5rem; bottom: .5rem; width: 2px; background: #e2e8f0; }
.hist-day { position: relative; margin: 1.25rem 0 .6rem -2.6rem; }
.hist-day:first-child { margin-top: 0; }
.hist-day span { position: relative; display: inline-block; padding: .15rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; color: #475569; background: #e2e8f0; }
.hist-event { --hist: var(--iter-primary); position: relative; margin-bottom: .75rem; }
.hist-dot { position: absolute; left: -2.6rem; top: .55rem; width: 2rem; height: 2rem; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: .85rem; color: #fff; background: var(--hist);
  box-shadow: 0 0 0 4px var(--iter-bg); }
.hist-edit { --hist: #2563eb; }
.hist-state { --hist: var(--iter-primary); }
.hist-revision { --hist: #7c3aed; }
.hist-attachments { --hist: #0d9488; }
.hist-naming { --hist: #94a3b8; }
.hist-admin .hist-dot { box-shadow: 0 0 0 4px var(--iter-bg), 0 0 0 6px #f59e0b; }
.hist-card { border-left: 3px solid var(--hist); }
.hist-head { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; min-width: 0; }
.hist-changes { padding: 0 .9rem .6rem; font-size: .88rem; }
.hist-change { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr; gap: .2rem 1rem; padding: .35rem 0;
  border-top: 1px dashed #e8ebf2; }
.hist-field { font-weight: 500; color: #475569; overflow-wrap: anywhere; }
.hist-value { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .hist-change { grid-template-columns: 1fr; } }
[data-bs-theme="dark"] .hist-timeline::before { background: var(--bs-border-color); }
[data-bs-theme="dark"] .hist-day span { background: var(--bs-secondary-bg); color: #adb5bd; }
[data-bs-theme="dark"] .hist-edit { --hist: #3b82f6; }
[data-bs-theme="dark"] .hist-revision { --hist: #8b5cf6; }
[data-bs-theme="dark"] .hist-naming { --hist: #6c757d; }
[data-bs-theme="dark"] .hist-change { border-top-color: var(--bs-border-color); }
[data-bs-theme="dark"] .hist-field { color: #adb5bd; }
.diff-old { background: #fef2f2; border-left: 3px solid #f87171; padding: .4rem .6rem; border-radius: .35rem; }
.diff-new { background: #f0fdf4; border-left: 3px solid #4ade80; padding: .4rem .6rem; border-radius: .35rem; }
.history-html { max-height: 260px; overflow: auto; }

/* Login */
.login-body { min-height: 100vh; background: radial-gradient(circle at 20% 20%, var(--iter-primary) 0, transparent 40%),
  radial-gradient(circle at 80% 80%, var(--iter-accent) 0, transparent 40%), var(--iter-deep); }
.login-card { max-width: 600px; border-radius: 1.2rem; }
.login-card #login-domain { white-space: nowrap; }
.login-card .input-group > .form-floating { min-width: 0; }
/* Login: the presentation of ITER beside the card */
.login-intro-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 4rem; align-items: center;
                    max-width: 1120px; width: 100%; }
.login-intro { color: #fff; }
.login-intro h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; margin-bottom: 1rem; }
.login-intro ul { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 1.1rem; }
.login-intro li { display: grid; grid-template-columns: 2.5rem 1fr; gap: .9rem; align-items: start; }
.login-intro li i { width: 2.5rem; height: 2.5rem; border-radius: .75rem; display: grid; place-items: center; font-size: 1.15rem;
                    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); }
.login-intro li b { display: block; }
.login-intro li span { color: rgba(255,255,255,.7); font-size: .92rem; }
.login-highlights { display: flex; flex-wrap: wrap; gap: .5rem; }
.login-highlights span { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; padding: .3rem .75rem; border-radius: 999px; color: #fff;
                    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); }
.login-intro-wrap .login-card { max-width: none; }
/* the ITER wordmark: its letters light up with the signatures of the workflow below */
.login-brand { display: flex; align-items: center; gap: 1.1rem; margin-bottom: .35rem; }
.login-brand .login-mark { flex: none; }
.login-wordmark { display: flex; gap: .12em; line-height: 1; -webkit-text-stroke: .045em currentColor; paint-order: stroke fill; font-size: clamp(3.4rem, 7vw, 5.6rem); letter-spacing: .04em; color: #fff; }
.login-wordmark span { opacity: .4; transition: opacity .45s, text-shadow .45s; }
.login-wordmark span.on { opacity: 1; }
.login-wordmark.done span { text-shadow: 0 0 .45em rgba(74,222,128,.85); animation: lwf-glow 1.6s ease-out; }
@keyframes lwf-glow { 0% { color: #fff; } 40% { color: #86efac; } 100% { color: #fff; } }
.login-intro .login-acronym { color: rgba(255,255,255,.75); }
.login-intro .login-acronym b { color: #fff; }
.login-acronym-lg { font-size: 1rem; margin-bottom: 1.4rem; }
.login-brand-compact { display: none; }
@media (max-width: 991.98px) {
  .login-intro-wrap { grid-template-columns: 1fr; gap: 2rem; max-width: 600px; }
  .login-intro { order: 3; }
  .login-intro-wrap .login-card { order: 2; }
  .login-brand-compact { display: flex; order: 1; align-items: center; gap: .9rem; color: #fff; }
  .login-brand-compact .login-wordmark { font-size: 2.4rem; }
  .login-brand-compact .login-wordmark span { opacity: 1; }
  .login-brand-compact .login-acronym { color: rgba(255,255,255,.75); }
  .login-brand-compact .login-acronym b { color: #fff; }
  .login-intro .login-brand, .login-intro .login-acronym-lg { display: none; }
  .login-intro ul { gap: .8rem; }
}
@media (max-width: 575.98px) {  /* phones: the heading and the highlights only, the card stays the main thing */
  .login-intro h2 { font-size: 1.5rem; }
  .login-intro ul { display: none; }
}
/* Login: the animated generic workflow of the presentation */
.lwf-demo { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 1rem; padding: 1rem 1.15rem 1.1rem;
           margin: 0 0 1.75rem; max-width: 34rem; backdrop-filter: blur(6px); color: #fff; }
.lwf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; font-size: .9rem; }
.lwf-name { font-weight: 600; display: inline-flex; gap: .5rem; align-items: center; }
.lwf-name i { opacity: .75; }
.lwf-state { font-size: .75rem; font-weight: 700; padding: .25rem .7rem; border-radius: 999px; background: rgba(255,255,255,.12);
            transition: background .4s, color .4s; min-width: 8.5rem; text-align: center; }
.lwf-demo.done .lwf-state { background: #22c55e; color: #fff; }
.lwf-track { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); }
.lwf-line { position: absolute; top: 15px; left: 12.5%; right: 12.5%; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); }
.lwf-line i { position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(90deg, #fff, #22c55e);
             transform-origin: left; transform: scaleX(0); transition: transform .9s ease; }
.lwf-step { position: relative; display: grid; justify-items: center; gap: .45rem; text-align: center; }
.lwf-step small { font-size: .75rem; color: rgba(255,255,255,.6); transition: color .4s; }
.lwf-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; position: relative;
          background: linear-gradient(145deg, rgba(255,255,255,.24), rgba(255,255,255,.06)), var(--iter-accent);
          border: 1px solid rgba(255,255,255,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 12px rgba(0,0,0,.18);
          transition: all .4s; }
.lwf-dot > * { grid-area: 1 / 1; transition: all .35s; }
.lwf-dot .ic { font-size: .85rem; color: rgba(255,255,255,.75); }
.lwf-dot .bi-check-lg { opacity: 0; transform: scale(.3); font-size: .95rem; }
.lwf-step.on .lwf-dot .ic, .lwf-demo.done .lwf-step.final .lwf-dot .ic { opacity: 0; transform: scale(.3); }
.lwf-step.on small { color: #fff; }
.lwf-step.on .lwf-dot { border-color: #fff; background: #fff; color: var(--iter-primary); }
.lwf-step.on .lwf-dot .bi-check-lg { opacity: 1; transform: none; }
.lwf-step.now .lwf-dot { border-color: #fff; background: linear-gradient(145deg, rgba(255,255,255,.4), rgba(255,255,255,.15)), var(--iter-accent); animation: lwf-pulse 1.2s ease-out infinite; }
@keyframes lwf-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.5); } 100% { box-shadow: 0 0 0 12px rgba(255,255,255,0); } }
/* the last step: a green V drawn when the item is approved */
.lwf-step.final .lwf-dot { width: 32px; height: 32px; }
.lwf-step.final svg { width: 18px; height: 18px; }
.lwf-step.final path { fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round;
                      stroke-dasharray: 24; stroke-dashoffset: 24; }
.lwf-demo.done .lwf-step.final .lwf-dot { background: #22c55e; border-color: #22c55e; transform: scale(1.25);
                                       animation: lwf-pop 1.6s ease-out; }
.lwf-demo.done .lwf-step.final path { transition: stroke-dashoffset .5s .15s ease; stroke-dashoffset: 0; }
.lwf-demo.done .lwf-step.final small { color: #4ade80; font-weight: 700; }
@keyframes lwf-pop { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.7); } 100% { box-shadow: 0 0 0 18px rgba(34,197,94,0); } }
/* presentation and card of the same height: the card grows to the text, its content in the middle */
@media (min-width: 992px) {
  .login-intro-wrap { align-items: stretch; }
  .login-intro { display: flex; flex-direction: column; justify-content: center; }
  .login-intro > :last-child { margin-bottom: 0; }
  .login-intro-wrap .login-card .card-body { display: flex; flex-direction: column; justify-content: center; }
  .login-intro-wrap .login-card .card-body > :first-child { margin-top: auto; }
  .login-card-note { margin-top: auto !important; }
}
.login-card-note { display: flex; justify-content: center; gap: .5rem 1.25rem; flex-wrap: wrap; padding-top: 1.25rem; margin-top: 2rem;
                   border-top: 1px solid var(--bs-border-color); font-size: .8rem; color: var(--bs-secondary-color); }
.login-card-note span { display: inline-flex; align-items: center; gap: .4rem; }
.login-card-note i { color: var(--iter-primary); }
.login-intro-wrap .login-logo { height: 56px; }  /* the company logo larger, in the room the card already has */
/* laptop screens: a more compact presentation, so text and card fit above the footer */
@media (min-width: 992px) and (max-height: 900px) {
  .login-intro h2 { font-size: 1.6rem; margin-bottom: .8rem; }
  .login-wordmark { font-size: 4rem; }
  .login-acronym-lg { margin-bottom: .9rem; }
  .lwf-demo { margin-bottom: 1.1rem; padding: .75rem 1rem .85rem; }
  .lwf-head { margin-bottom: .7rem; }
  .login-intro ul { gap: .55rem; margin-bottom: 1.1rem; }
  .login-intro li { grid-template-columns: 2.1rem 1fr; }
  .login-intro li i { width: 2.1rem; height: 2.1rem; font-size: 1rem; }
  .login-intro li span { font-size: .85rem; }
  .login-highlights span { font-size: .75rem; padding: .25rem .65rem; }
  .login-intro-wrap .login-card .card-body { padding-top: 2rem !important; padding-bottom: 1.75rem !important; }
  .login-card-note { margin-top: 1.25rem; padding-top: 1rem; }
  .login-intro-wrap .login-logo { height: 46px; margin-bottom: 1rem !important; }
}
@media (max-width: 575.98px) { .lwf-demo { margin-bottom: 1rem; } }
@media (prefers-reduced-motion: reduce) { .lwf-demo * { transition: none !important; animation: none !important; } }

.col-list .list-group-item { display: flex; align-items: center; gap: .75rem; }
.col-list .tab-name { font-size: .75rem; color: #94a3b8; }
.col-drop { min-height: 3rem; }
.col-drop:has(> [data-id]) > .col-empty, tbody[data-fields]:has(> [data-id]) > .field-empty { display: none; }
.col-num:empty { display: none; }
.table-iter thead .filter-row th { background: #fff; text-transform: none; letter-spacing: 0; font-weight: 400;
  padding-top: .35rem; padding-bottom: .35rem; min-width: 7rem; }

/* Workflow */
.state-badge { display: inline-block; border-radius: 999px; padding: .2rem .65rem; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.state-created { background: #f1f5f9; color: #475569; }
.state-draft { background: #fef3c7; color: #92400e; border: 1px dashed #f59e0b; }
.state-step { background: var(--iter-primary-subtle); color: var(--iter-primary-dark); }
.state-final { background: #dcfce7; color: #166534; }
.state-rejected { background: #fee2e2; color: #991b1b; }
.state-old { background: #e5e7eb; color: #4b5563; text-decoration: line-through; text-decoration-color: #9ca3af; }
/* intermediate states: a colour by name (core/workflows/workflow.state_tone), never green, red, grey or amber, which
   are the final, rejected, created and draft states */
.state-c0 { background: #dbeafe; color: #1e40af; }
.state-c1 { background: #ffedd5; color: #9a3412; }
.state-c2 { background: #ede9fe; color: #5b21b6; }
.state-c3 { background: #ccfbf1; color: #115e59; }
.state-c4 { background: #fce7f3; color: #9d174d; }
.state-c5 { background: #e0e7ff; color: #3730a3; }
.state-c6 { background: #cffafe; color: #155e75; }
.state-c7 { background: #fae8ff; color: #86198f; }
.wf-flow { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.wf-flow .arrow { color: #cbd5e1; }
/* Workflow diagram: admin workflow page and the Workflows page of the item list */
.wf-diagram, .wf-summary { --wf-wait: #94a3b8; --wf-step: #2563eb; --wf-final: #15803d; --wf-reject: #f87171; }
.wf-track { display: flex; align-items: stretch; overflow-x: auto; padding-bottom: .25rem; }
.wf-arrows .wf-track { gap: 2.75rem; position: relative; }
.wf-arrows .wf-node { position: relative; z-index: 1; }
.wf-edges { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; overflow: visible; }
.wf-edge { fill: none; stroke: #94a3b8; stroke-width: 1.75; pointer-events: stroke; }
.wf-edge-branch { stroke: var(--wf-step); stroke-width: 2; }
.wf-edge-end { stroke: var(--wf-final); }
.wf-edge-head { fill: #94a3b8; stroke: none; }
.wf-edge-head.wf-edge-branch { fill: var(--wf-step); }
.wf-edge-head.wf-edge-end { fill: var(--wf-final); }
.wf-edge-back { stroke: #d97706; stroke-dasharray: 5 3; }
.wf-edge-head.wf-edge-back { fill: #d97706; stroke-dasharray: none; }
.wf-edge:hover { stroke-width: 3; }
.wf-node { flex: 1 1 0; min-width: 165px; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem;
  background: #fff; border: 1px solid #e2e8f0; border-radius: .75rem; padding: .75rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: box-shadow .15s, border-color .15s; }
.wf-node:hover { border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(15, 23, 42, .08); }
.wf-node .state-badge { white-space: normal; line-height: 1.25; max-width: 100%; overflow-wrap: anywhere; }
.wf-node-head { display: flex; align-items: center; gap: .45rem; min-width: 0; width: 100%; }
.wf-dot { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem;
  border-radius: 50%; font-size: .78rem; font-weight: 700; color: #fff; background: var(--wf-step); }
.wf-node-created .wf-dot { background: #94a3b8; }
.wf-node-final .wf-dot { background: var(--wf-final); }
.wf-kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; font-weight: 600;
  line-height: 1.2; overflow-wrap: break-word; hyphens: auto; min-width: 0; }
.wf-roles { display: flex; flex-wrap: wrap; gap: .25rem; }
.wf-role { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; background: #f8fafc;
  border: 1px solid #e2e8f0; border-radius: .4rem; padding: .05rem .4rem; color: #334155; overflow-wrap: anywhere; }
.wf-col { flex: 1 1 0; min-width: 165px; display: flex; flex-direction: column; gap: .6rem; }
.wf-col > .wf-node { flex: 1 1 auto; min-width: 0; }
.wf-next { display: flex; flex-direction: column; gap: .2rem; width: 100%; }
.wf-next-head { font-size: .72rem; color: #64748b; font-weight: 600; }
.wf-next-item { display: flex; align-items: center; gap: .25rem; font-size: .75rem; }
.wf-next-item .state-badge { white-space: normal; overflow-wrap: anywhere; }
.wf-link { flex: none; display: flex; align-items: center; justify-content: center; width: 1.6rem; color: #cbd5e1;
  position: relative; }
.wf-link::before { content: ""; position: absolute; left: 0; right: .55rem; top: 50%; border-top: 2px solid #e2e8f0; }
.wf-link i { position: relative; margin-left: .4rem; font-size: .9rem; }
.wf-count-box { margin-top: auto; width: 100%; padding-top: .5rem; border-top: 1px solid #f1f5f9; }
.wf-count { display: inline-flex; align-items: baseline; gap: .25rem; font-size: .78rem; color: #475569; text-decoration: none; }
.wf-count-n { font-size: 1.35rem; font-weight: 700; color: #0f172a; line-height: 1; }
a.wf-count:hover .wf-count-n, a.wf-count:hover { color: var(--iter-primary); }
.wf-count i { font-size: .7rem; opacity: .6; }
.wf-count.is-zero, .wf-count.is-zero .wf-count-n { color: #94a3b8; }
.wf-share { height: 4px; border-radius: 2px; background: #f1f5f9; margin-top: .35rem; overflow: hidden; }
.wf-share span { display: block; height: 100%; border-radius: 2px; background: var(--wf-step); }
.wf-node-final .wf-share span { background: var(--wf-final); }
.wf-node-created .wf-share span { background: var(--wf-wait); }
.wf-reject-lane .wf-share span { background: var(--wf-reject); }
.wf-reject-lane { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: .9rem; padding: .7rem .9rem;
  border: 1px dashed #fecaca; border-radius: .75rem; background: #fffafa; }
.wf-reject-lane .wf-dot { background: #dc2626; }
.wf-reject-lane .wf-count-box { margin-top: 0; width: 9rem; border-top: 0; padding-top: 0; }
.wf-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; margin-bottom: 1rem; }
.wf-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .85rem; color: #475569; }
.wf-legend-item { display: inline-flex; align-items: center; gap: .35rem; }
.wf-legend-item strong { color: #0f172a; font-size: 1rem; }
.wf-swatch { width: .7rem; height: .7rem; border-radius: 3px; }
.wf-stack { flex: 1 1 220px; display: flex; gap: 2px; height: 10px; }
.wf-stack span { border-radius: 4px; min-width: 4px; }
.wf-sw-waiting { background: var(--wf-wait); }
.wf-sw-running { background: var(--wf-step); }
.wf-sw-closed { background: var(--wf-final); }
.wf-sw-rejected { background: var(--wf-reject); }
.wf-sw-empty { background: #f1f5f9; }
/* Phased projects: the transitions leaving each state of the diagram */
.phase-exits { display: flex; flex-direction: column; gap: .2rem; width: 100%; }
.phase-exit { display: flex; gap: .2rem; font-size: .75rem; color: #475569; line-height: 1.3; overflow-wrap: anywhere; }
.phase-exit i { color: #94a3b8; flex: none; }
.phase-matrix th.state-col { min-width: 6.5rem; text-align: center; font-weight: 500; }
.phase-matrix td.cell { text-align: center; }
.sign-card { border-left: 4px solid #f59e0b; }
.sign-card .sign-password { width: 220px; }
.ro-value { background: #f8fafc; border: 1px solid #eef0f5; border-radius: .5rem; padding: .45rem .75rem; min-height: 2.3rem; color: #334155; }
/* Item form: what the user can edit now (editable, required to sign, read-only), with a legend */
.field-edit, .field-req, .field-ro { border-left: 3px solid transparent; padding-left: .75rem; }
.field-edit { border-left-color: #6366f1; }
.field-req { border-left-color: #f59e0b; }
.field-ro { border-left-color: #e2e8f0; }
.form-switch.field-edit, .form-switch.field-req { padding-left: calc(2.5em + .75rem); }
.field-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; color: #475569; }
.field-legend > span { display: inline-flex; align-items: center; }
.fl-mark { display: inline-block; width: 3px; height: 1.1rem; margin-right: .45rem; border-radius: 2px; }
.fl-edit { background: #6366f1; }
.fl-req { background: #f59e0b; }
.fl-ro { background: #e2e8f0; }
.field-legend .badge { margin-right: .35rem; }
.rule-table td, .rule-table th { padding-top: .35rem; padding-bottom: .35rem; }
.item-name { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; color: #1e293b; white-space: nowrap; font-size: .88rem; }

/* Project pages: the name of the project and the tabs of its sections */
.project-bar { border-bottom: 1px solid #e2e8f0; margin-bottom: 1.25rem; }
.project-bar-top { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; min-width: 0; }
.project-bar-logo { display: inline-flex; align-items: center; flex-shrink: 0; transition: opacity .15s ease; }
.project-bar-logo:hover { opacity: .85; }
.project-bar-logo img { height: 40px; max-width: 220px; width: auto; object-fit: contain; }
.project-bar-text { min-width: 0; flex: 1 1 auto; }
.project-bar-logo + .project-bar-text { border-left: 3px solid var(--iter-primary); padding-left: .8rem; }
.project-bar-desc { color: #64748b; font-size: .82rem; line-height: 1.3; margin-top: .15rem; max-width: 110ch;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575.98px) { .project-bar-logo img { height: 30px; max-width: 120px; } .project-bar-desc { display: none; } }
.project-bar .code-badge { flex-shrink: 0; }
.project-bar-name { font-size: 1.35rem; line-height: 1.2; color: #0f172a; text-decoration: none; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-bar-name:hover { color: var(--iter-primary-dark); }
.project-tabs { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; margin-bottom: -1px; }
.project-tabs::-webkit-scrollbar { display: none; }
.project-tab { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .8rem; white-space: nowrap; color: #64748b;
  font-weight: 500; font-size: .92rem; text-decoration: none; border-bottom: 2px solid transparent; }
.project-tab:hover { color: #0f172a; border-bottom-color: #cbd5e1; }
.project-tab.active { color: var(--iter-primary); border-bottom-color: var(--iter-primary); }
.project-tab .count { background: #e2e8f0; color: #475569; border-radius: 999px; padding: 0 .45rem; font-size: .72rem; font-weight: 600; }

/* Item list: bar, quick filters, active filters, dynamic loading, advanced search */
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .75rem; padding: .75rem 1rem;
  border-bottom: 1px solid #eef0f5; }
.list-search { flex: 1 1 16rem; max-width: 28rem; }
.list-search .input-group-text { background: #fff; color: #94a3b8; }
.list-quick, .list-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.list-actions { margin-left: auto; }
.quick-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .7rem; border-radius: 999px; border: 1px solid #fcd34d;
  background: #fffbeb; color: #92400e; font-size: .85rem; font-weight: 500; text-decoration: none; }
.quick-chip:hover { background: #fef3c7; color: #78350f; }
.quick-chip .count { background: #f59e0b; color: #fff; border-radius: 999px; padding: 0 .45rem; font-size: .72rem; font-weight: 700; }
.quick-chip.active { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.quick-chip.active .count { background: #fff; color: #b45309; }
.quick-chip.pending-chip:not(.zero) { border-color: #cbd5e1; background: #f8fafc; color: #475569; }
.quick-chip.pending-chip .count { background: #64748b; }
.quick-chip.pending-chip.active { background: #64748b; border-color: #64748b; color: #fff; }
.quick-chip.pending-chip.active .count { background: #fff; color: #334155; }
.quick-chip.zero { border-color: #e2e8f0; background: #fff; color: #64748b; }
.quick-chip.zero .count { background: #e2e8f0; color: #64748b; }
.list-active { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .5rem 1rem; border-bottom: 1px solid #eef0f5; }
.list-band-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: #94a3b8; margin-right: .25rem; }
.filter-chip { display: inline-flex; align-items: center; gap: .35rem; max-width: 22rem; padding: .2rem .55rem .2rem .65rem; border-radius: .5rem;
  background: var(--iter-primary-subtle); color: var(--iter-primary-dark); font-size: .82rem; text-decoration: none; }
.filter-chip .k { font-weight: 600; white-space: nowrap; }
.filter-chip .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-chip i { font-size: .65rem; opacity: .6; }
.filter-chip:hover { color: var(--iter-primary-dark); filter: brightness(.96); }
.filter-chip:hover i { opacity: 1; }
.list-active .clear-all { font-size: .82rem; margin-left: .25rem; }
.list-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .5rem 1rem;
  border-top: 1px solid #eef0f5; }
.list-footer-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
/* Kanban of the item list (read only): a column per state, scrolling sideways */
.kanban-wrap { overflow-x: auto; padding: 1rem; }
.kanban { display: flex; gap: .85rem; align-items: flex-start; min-height: 12rem; }
.kanban-col { position: relative; flex: 0 0 17rem; display: flex; flex-direction: column; max-height: 75vh; border-radius: .6rem;
  background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color-translucent); overflow: hidden; }
.kanban-col.empty { flex-basis: 11rem; opacity: .75; }
.kanban-stripe { display: block; height: 4px; border: 0 !important; border-radius: 0; }
.kanban-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .7rem .45rem; }
.kanban-head .state-badge { white-space: normal; overflow-wrap: anywhere; }
.kanban-count { font-size: .8rem; font-weight: 600; color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }
.kanban-cards { display: flex; flex-direction: column; gap: .5rem; padding: 0 .55rem .6rem; overflow-y: auto; }
.kanban-card { display: block; padding: .55rem .65rem; border-radius: .5rem; background: var(--bs-body-bg); color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color-translucent); box-shadow: 0 1px 2px rgba(15, 23, 42, .06); text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.kanban-card:hover, .kanban-card:focus-visible { border-color: rgba(var(--iter-primary-rgb), .5); box-shadow: 0 4px 12px rgba(15, 23, 42, .1);
  transform: translateY(-1px); color: var(--bs-body-color); }
.kanban-card-top { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-bottom: .2rem; }
.kanban-card-top .item-no { font-size: .78rem; font-weight: 600; color: var(--bs-secondary-color); margin-right: auto; }
.kanban-card-top .badge { font-size: .68rem; }
.kanban-card-name { font-weight: 600; font-size: .9rem; line-height: 1.3; overflow-wrap: anywhere; }
.kanban-card-progress { margin-top: .4rem; }
.kanban-card-progress .wf-progress .bar { width: 100%; flex: 1; }
.kanban-card-progress .wf-progress { display: flex; }
.kanban-card-foot { display: flex; align-items: center; gap: .35rem; margin-top: .45rem; font-size: .75rem; color: var(--bs-secondary-color); }
.kanban-none { font-size: .8rem; color: var(--bs-secondary-color); text-align: center; padding: .75rem 0; }
.kanban-more { display: block; text-align: center; font-size: .8rem; padding: .35rem; border-radius: .4rem; text-decoration: none; }
.kanban-more:hover { background: var(--bs-secondary-bg); }
@media (prefers-reduced-motion: reduce) { .kanban-card { transition: none; } .kanban-card:hover { transform: none; } }
#toggle-density.active { background: var(--iter-primary-subtle); color: var(--iter-primary-dark); }
.item-table.compact td, .item-table.compact > thead > tr:first-child > th { padding-top: .2rem; padding-bottom: .2rem; font-size: .88rem; }
.item-table.compact .state-badge { padding: .05rem .5rem; }
.date-filter { min-width: 11rem; }
.date-filter .date-op { flex: 0 0 3.6rem; padding-right: 1.5rem; }
.item-table tbody tr.clickable:hover .item-name { color: var(--iter-primary-dark); }
.adv-panel .form-label { font-size: .8rem; color: #64748b; font-weight: 500; margin-bottom: .25rem; }
.adv-section + .adv-section { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed #e8ebf2; }
.adv-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--iter-primary-dark);
  margin-bottom: .6rem; }
.adv-checks { max-height: 9rem; overflow-y: auto; border: 1px solid #dee2e6; border-radius: .375rem; padding: .35rem .6rem;
  background: #fff; font-size: .88rem; }
.adv-checks .form-check { margin-bottom: .1rem; }

/* Footer: team tooltip (positioned relative to the footer, so the truncated text does not clip it) */
.iter-footer .team-wrap .team { cursor: default; border-bottom: 1px dotted currentColor; outline: none; }
.iter-footer .team-wrap .team:focus-visible { border-radius: .2rem; box-shadow: 0 0 0 .15rem rgba(var(--iter-primary-rgb), .35); }
.team-card { position: absolute; bottom: calc(100% + .4rem); left: 1.5rem; z-index: 1080; min-width: 16rem; max-width: calc(100vw - 3rem);
  display: flex; flex-direction: column; gap: .35rem; padding: .7rem .9rem; border-radius: .7rem; background: var(--iter-deep); color: var(--iter-primary-subtle);
  box-shadow: 0 10px 30px rgba(15,23,42,.25); font-size: .8rem; white-space: normal;
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .15s ease .25s, transform .15s ease .25s, visibility 0s linear .4s; }
.team-card::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 1.9rem; } /* bridge towards the name */
.team-wrap:hover .team-card, .team-wrap:focus-within .team-card { opacity: 1; visibility: visible; transform: none;
  transition-delay: 0s; }
.team-card-title { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--iter-primary-light); }
.iter-footer .team-card .team-member { display: flex; flex-direction: row; align-items: center; gap: .4rem;
  font-size: .85rem; font-weight: 600; color: #fff; text-decoration: none; line-height: 1.3; white-space: nowrap; }
.iter-footer .team-card .team-member .bi { flex: none; color: var(--iter-primary-light); font-size: .9rem; line-height: 1; }
.iter-footer .team-card a.team-member:hover, .iter-footer .team-card a.team-member:focus-visible { color: #fff; text-decoration: underline; }
.iter-footer .team-card a.team-member:hover .bi { color: #fff; }

/* Compact audit (item history, workflow log) */
.audit-table { font-size: .85rem; }
.audit-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: #64748b; font-weight: 600; background: #f8fafc; }
.audit-table td { vertical-align: top; padding-top: .4rem; padding-bottom: .4rem; }
.audit-old { color: #b91c1c; text-decoration: line-through; text-decoration-color: rgba(185, 28, 28, .35); }
.audit-new { color: #15803d; }
.audit-old em, .audit-new em { color: #94a3b8; text-decoration: none; }
.audit-chip { display: inline-flex; align-items: center; gap: .15rem; border-radius: 999px; padding: .05rem .5rem; margin: 0 .25rem .2rem 0; font-size: .78rem; }
.audit-chip.new { background: #f0fdf4; color: #15803d; }
.audit-chip.old { background: #fef2f2; color: #b91c1c; text-decoration: line-through; }
.audit-full summary { font-size: .75rem; color: var(--iter-primary); cursor: pointer; margin-top: .15rem; }
.audit-table th[style] { white-space: nowrap; }
.log-pre { font-size: .75rem; padding: .8rem 1rem; max-height: 560px; overflow: auto; background: #0f172a; color: #e2e8f0; border-radius: 0 0 .5rem .5rem; white-space: pre-wrap; word-break: break-word; }

/* Table field */
.iter-table-field { font-size: .88rem; background: #fff; }
.iter-table-field .tf-title th { background: var(--iter-primary-subtle); color: var(--iter-primary-dark); font-weight: 700; font-size: .85rem; }
.iter-table-field .tf-cols th { background: #f8fafc; color: #64748b; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.iter-table-field .tf-label { font-weight: 500; color: #334155; }
.iter-table-field .tf-heading td { background: #f8fafc; font-weight: 600; color: #334155; }
.iter-table-field .tf-add-row td { background: #fcfcfd; border-top: 0; }
.field-value .iter-table-field, .ro-value .iter-table-field { margin: .1rem 0; }
.tf-spec-row { display: grid; grid-template-columns: minmax(10rem, 2fr) minmax(9rem, 1fr) minmax(8rem, 1.5fr) auto auto; gap: .5rem; align-items: center; }
@media (max-width: 768px) { .tf-spec-row { grid-template-columns: 1fr 1fr; } }

/* Group of fields: boxes of sub-fields (edit), a line or the values per box (read) */
.gf-edit { display: grid; gap: .75rem; justify-items: start; }
.gf-box { width: 100%; border: 1px solid #e2e8f0; border-radius: .5rem; background: #fff; padding: .75rem 1rem .9rem; }
.gf-box-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.gf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; }
.gf-sub { min-width: 0; }
.gf-full { grid-column: 1 / -1; }
@media (max-width: 576px) { .gf-grid { grid-template-columns: 1fr; } }
.gf-num { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .4rem; margin-right: .5rem;
  border-radius: 999px; background: var(--iter-primary-subtle); color: var(--iter-primary-dark); font-size: .75rem; font-weight: 700; }
.gf-view { display: grid; gap: .4rem; }
.gf-entry { border: 1px solid #e2e8f0; border-radius: .4rem; padding: .35rem .6rem; background: #fff; }
.gf-entry > summary { cursor: pointer; display: flex; align-items: center; gap: .15rem; }
.gf-entry[open] > summary { margin-bottom: .35rem; }
.gf-values { display: grid; grid-template-columns: minmax(6rem, max-content) 1fr; gap: .15rem 1rem; margin: 0; font-size: .9rem; }
.gf-values dt { font-weight: 500; color: #64748b; }
.gf-values dd { margin: 0; overflow-wrap: anywhere; }
.gf-spec-row { display: grid; grid-template-columns: minmax(9rem, 2fr) minmax(9rem, 1.3fr) minmax(8rem, 1.5fr) minmax(7rem, 1fr) auto auto; gap: .5rem; align-items: center; }
@media (max-width: 768px) { .gf-spec-row { grid-template-columns: 1fr 1fr; } }

/* Administration: eight boxes (projects, work, people, communication, configuration, look & feel, data &
   maintenance, logs & info), four per row on wide screens, with a filter on top. The head of a box only
   names its category (not a link): small caps on a grey band, nothing that looks like a button; the entries below
   are the clickable rows. */
.admin-box-head { display: flex; align-items: center; gap: .65rem; padding: .7rem 1rem; background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0; cursor: default; user-select: none; }
.admin-box-kicker { font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; }
.admin-box-title { font-weight: 700; font-size: .82rem; letter-spacing: .07em; text-transform: uppercase; color: #475569; }
.admin-box-sub { color: #64748b; font-size: .78rem; }
.admin-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: #64748b;
  font-size: 1.25rem; }
.admin-entry { display: grid; grid-template-columns: 1.5rem 1fr auto; column-gap: .75rem; row-gap: .1rem; align-items: center;
  padding: .75rem 1rem; }
.admin-entry-icon { grid-row: 1 / span 2; color: var(--iter-primary); font-size: 1.15rem; text-align: center; }
.admin-title { font-weight: 600; color: #1e293b; }
.admin-desc { grid-column: 2; grid-row: 2; color: #64748b; font-size: .82rem; }
.admin-chevron { grid-column: 3; grid-row: 1 / span 2; color: #cbd5e1; }
.admin-entry:hover .admin-chevron { color: var(--iter-primary); }
.admin-separator { padding: .35rem 1rem; font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #94a3b8; background: #f8fafc; }
.admin-filter { width: 18rem; max-width: 100%; }

/* Field reached from a link (e.g. a field required for the signature): highlighted for a moment */
.field-anchor { display: block; position: relative; top: -5rem; visibility: hidden; }
.field-anchor:target + * { animation: field-flash 2.5s ease-out; border-radius: .5rem; }
@keyframes field-flash { 0%, 40% { box-shadow: 0 0 0 .3rem rgba(var(--iter-primary-rgb), .35); } 100% { box-shadow: 0 0 0 .3rem transparent; } }

/* Signatures tab of the item: one tbody per workflow step */
.sig-table tbody + tbody { border-top: 2px solid #e2e8f0; }
.sig-table .sig-step { background: #fff; }
.sig-table .step-no { display: inline-flex; width: 1.5rem; height: 1.5rem; border-radius: 50%; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 600; background: #f1f5f9; color: #475569; flex: none; }
.sig-table .sig-state { background: #f1f5f9; color: #475569; }
/* steps already signed: green */
.sig-table .sig-done td { background: #f0fdf4; }
.sig-table .sig-done .sig-step { box-shadow: inset 4px 0 0 #16a34a; }
.sig-table .sig-done .step-no { background: #16a34a; color: #fff; }
.sig-table .sig-done .sig-state { background: #dcfce7; color: #166534; }
/* the current step: the project colour, with a label */
.sig-table .sig-current td { background: rgba(var(--iter-primary-rgb), .07); }
.sig-table .sig-current .sig-step { box-shadow: inset 4px 0 0 var(--iter-primary); }
.sig-table .sig-current .step-no { background: var(--iter-primary); color: #fff; box-shadow: 0 0 0 3px rgba(var(--iter-primary-rgb), .2); }
.sig-table .sig-unrouted { color: var(--bs-warning-text-emphasis); background: var(--bs-warning-bg-subtle); border-radius: .25rem; padding: .05rem .4rem; display: inline-block; }
.sig-table .sig-current .sig-state { background: var(--iter-primary); color: #fff; }
.sig-table .sig-now { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--iter-primary-dark);
  background: rgba(var(--iter-primary-rgb), .12); border-radius: 1rem; padding: .1rem .5rem; }
/* later steps and skipped ones: muted */
.sig-table .sig-future td { color: #64748b; }
.sig-table .sig-future .step-no { background: #f1f5f9; color: #64748b; }
.sig-table .sig-skipped td { color: #94a3b8; background: #fafafa; }
.sig-table .sig-skipped .step-no { background: #e2e8f0; color: #64748b; }
.sig-table .sig-skipped .sig-state { background: #f1f5f9; color: #94a3b8; text-decoration: line-through; }
.sig-table .ico { margin-right: .25rem; }
/* outcome of each signature as a pill */
.sig-table .sig-status { display: inline-flex; align-items: center; border-radius: 1rem; padding: .1rem .55rem; font-size: .82rem; font-weight: 500; }
.sig-table .sig-approved .sig-status { background: #dcfce7; color: #166534; }
.sig-table .sig-no_impact .sig-status { background: #e0f2fe; color: #075985; }
.sig-table .sig-returned .sig-status { background: #fee2e2; color: #991b1b; }
.sig-table .sig-current .sig-pending .sig-status { background: #fef3c7; color: #92400e; }
.sig-table .sig-pending .ico { color: #f59e0b; } .sig-table .sig-approved .ico { color: #16a34a; }
.sig-table .sig-no_impact .ico { color: #0ea5e9; } .sig-table .sig-returned .ico { color: #dc2626; }
.sig-table .sig-future .sig-pending .ico { color: #94a3b8; }
.sig-table .sig-bypassed, .sig-table .sig-cancelled, .sig-table .sig-not_taken, .sig-table .sig-not_req { color: #94a3b8; }

/* Workflow progress: list column and Signatures tab */
.wf-progress { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; }
.wf-progress .bar { display: inline-block; width: 4.5rem; height: .45rem; border-radius: 1rem; background: #e2e8f0; overflow: hidden; }
.wf-progress .bar > span { display: block; height: 100%; border-radius: inherit; background: var(--iter-primary); }
.wf-progress.complete .bar > span { background: #16a34a; }
.wf-progress .pct { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 2.4rem; }
/* Progress fields: indigo → green by step, never red (progress is not bad news) */
.field-progress.tier-1 .bar > span { background: #A8A4E6; }
.field-progress.tier-2 .bar > span { background: #5B5BD6; }
.field-progress.tier-3 .bar > span { background: #1E9BB8; }
.field-progress.tier-4 .bar > span { background: #2E8B57; }
.field-progress.tier-1 .pct { color: #6E68C9; }
.field-progress.tier-2 .pct { color: #5B5BD6; }
.field-progress.tier-3 .pct { color: #17809A; }
.field-progress.tier-4 .pct { color: #2E8B57; }
.nav-tabs.iter-tabs .nav-link.sig-tab { display: inline-flex; align-items: center; gap: .5rem; background: var(--iter-primary); color: #fff;
  border-color: var(--iter-primary); font-weight: 600; border-radius: .5rem .5rem 0 0; padding: .45rem .9rem; box-shadow: 0 2px 6px rgba(var(--iter-primary-rgb), .3); }
.nav-tabs.iter-tabs .nav-link.sig-tab:hover { filter: brightness(1.08); color: #fff; }
.nav-tabs.iter-tabs .nav-link.sig-tab.active { background: var(--iter-primary-dark); border-color: var(--iter-primary-dark); color: #fff; }
.nav-tabs.iter-tabs .nav-link.sig-tab.complete { background: #16a34a; border-color: #16a34a; box-shadow: 0 2px 6px rgba(22, 163, 74, .3); }
.nav-tabs.iter-tabs .nav-link.sig-tab.complete.active { background: #166534; border-color: #166534; }
.nav-tabs.iter-tabs .nav-link.sig-tab.rejected { background: #dc2626; border-color: #dc2626; box-shadow: 0 2px 6px rgba(220, 38, 38, .3); }
.nav-tabs.iter-tabs .nav-link.sig-tab.rejected.active { background: #991b1b; border-color: #991b1b; }
.sig-tab .label { text-transform: uppercase; letter-spacing: .04em; font-size: .82rem; }
.sig-tab .bar { display: inline-block; width: 4rem; height: .4rem; border-radius: 1rem; background: rgba(255, 255, 255, .3); overflow: hidden; }
.sig-tab .bar > span { display: block; height: 100%; background: #fff; border-radius: inherit; }
.sig-tab .pct { font-variant-numeric: tabular-nums; font-size: .82rem; }
/* previous revisions in the item list: read-only records */
.table-iter tbody tr.superseded td { color: #64748b; }
.table-iter tbody tr.superseded .item-name { color: #475569; }
/* drafts in the item list: visible only to their owner and the users they are shared with */
.table-iter tbody tr.draft td { background: #fffbeb; }
.table-iter tbody tr.draft td:first-child { box-shadow: inset 4px 0 0 #f59e0b; }

/* Item list: the table scrolls inside the card, so its horizontal scrollbar is always on screen;
   the headers stay on top, # and naming stay on the left, a shade marks the columns hidden aside */
.item-scroll-wrap { position: relative; }
.item-scroll { overflow: auto; max-height: max(16rem, calc(100vh - var(--list-top, 9rem) - var(--list-below, 0px)));
  max-height: max(16rem, calc(100dvh - var(--list-top, 9rem) - var(--list-below, 0px))); }  /* itemlist.js sets top/below */
.item-table thead { position: sticky; top: 0; z-index: 3; }
.item-table thead tr:last-child > th { box-shadow: inset 0 -1px 0 #e2e8f0; }
.item-scroll-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 1.5rem; pointer-events: none;
  opacity: 0; transition: opacity .15s; z-index: 5; background: linear-gradient(to left, rgba(15, 23, 42, .12), transparent); }
.item-scroll-wrap.more-right::after { opacity: 1; }
@media (min-width: 768px) {
  .item-table tr > :nth-child(-n+2):not([colspan]) { position: sticky; z-index: 2; }
  .item-table thead tr > :nth-child(-n+2) { z-index: 4; }
  .item-table tr > :first-child:not([colspan]) { left: 0; }
  .item-table tr > :nth-child(2) { left: var(--item-col2-left, 90px); }
  .item-scroll-wrap.more-left .item-table tr > :nth-child(2) {
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg))), 6px 0 6px -4px rgba(15, 23, 42, .12); }
}

/* Administration → Database: the data choice as two selectable boxes */
.mode-option { cursor: pointer; transition: border-color .15s, background-color .15s; }
.mode-option:hover { border-color: var(--bs-primary) !important; }
.mode-option:has(input:checked) { border-color: var(--bs-primary) !important; background: var(--bs-primary-bg-subtle); }
.mode-option .form-check-input { flex-shrink: 0; margin-top: .2rem; }

/* Project → Permissions (simple projects): the mode of every role on every field */
.perm-matrix select { min-width: 8.5rem; }
.perm-matrix .perm-edit { background-color: var(--bs-success-bg-subtle); }
.perm-matrix .perm-read { background-color: var(--bs-body-bg); }
.perm-matrix .perm-hidden { background-color: var(--bs-danger-bg-subtle); }

/* footer: a sentence of the collections shown (Administration → Collections), date and time */
.iter-footer .footer-quote { flex: 1 1 auto; min-width: 0; text-align: center; font-style: italic; color: #475569; }
.iter-footer .footer-quote .bi-quote { color: var(--iter-primary-light); font-style: normal; }
.iter-footer .footer-quote .quote-author { font-style: normal; color: #94a3b8; }
.iter-footer .footer-clock { white-space: nowrap; color: #475569; font-variant-numeric: tabular-nums; }
.iter-footer .footer-clock .bi { color: var(--iter-primary-light); }
.login-body .iter-footer .footer-quote, .login-body .iter-footer .footer-clock { color: rgba(255,255,255,.7); }

/* Administration → Email templates: the email as it is sent */
.email-html { font-size: .9rem; background: #fff; color: #1f2937; border: 1px solid var(--bs-border-color); border-radius: .5rem;
  padding: 1rem 1.1rem; max-height: 34rem; overflow: auto; }
.rte-toolbar .rte-size { font-size: .8rem; }
.email-preview { white-space: pre-wrap; font-size: .85rem; background: var(--bs-tertiary-bg); border-radius: .5rem;
  padding: .9rem 1rem; max-height: 32rem; overflow: auto; }

/* Item form: multiple fields (one value per row, «+» to add) and resource fields (people chosen by name) */
.multi-field .multi-row { display: flex; gap: .4rem; align-items: flex-start; margin-bottom: .4rem; }
.multi-field .multi-row > :first-child { flex: 1 1 auto; }
.multi-field .multi-remove { flex: none; }
.resource-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.resource-chips:not(:empty) { margin-bottom: .4rem; }
.resource-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .25rem .2rem .55rem; border-radius: 1rem;
  background: var(--iter-primary-subtle); color: var(--iter-primary-dark); font-size: .85rem; font-weight: 500; }
.resource-chip button { border: 0; background: transparent; color: inherit; padding: 0 .2rem; line-height: 1; border-radius: 1rem; }
.resource-chip button:hover { background: rgba(var(--iter-primary-rgb), .15); }
.resource-results { position: absolute; z-index: 1050; left: 0; right: 0; top: 100%; max-height: 18rem; overflow-y: auto; }
.formula-help td { padding: .15rem .5rem .15rem 0; vertical-align: top; }
.formula-fields .badge { cursor: pointer; font-weight: 500; }

/* Administration → Info: the pages of docs/diagrams in a frame */
.info-frame { display: block; width: 100%; height: calc(100vh - 230px); min-height: 560px; border: 1px solid var(--bs-border-color); border-radius: .5rem; background: #fff; }

/* Sortable tables (tablesort.js) */
.table-iter thead th.sortable { cursor: pointer; user-select: none; }
.table-iter thead th.sortable:hover { color: var(--iter-primary); }
.table-iter thead th.sortable::after { content: "\F127"; font-family: "bootstrap-icons"; margin-left: .3rem; opacity: .3; font-size: .7rem; }
.table-iter thead th.sortable[data-dir="asc"]::after { content: "\F235"; opacity: 1; }
.table-iter thead th.sortable[data-dir="desc"]::after { content: "\F229"; opacity: 1; }

/* Wiki of a project */
.wiki-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 991.98px) { .wiki-layout { grid-template-columns: minmax(0, 1fr); } }
.wiki-tree { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
.wiki-tree a { display: block; padding: .25rem .5rem; border-radius: .35rem; color: var(--bs-body-color); text-decoration: none;
  overflow-wrap: anywhere; font-size: .925rem; }
.wiki-tree a:hover { background: var(--bs-tertiary-bg); }
.wiki-tree a.active { background: var(--iter-primary-subtle); color: var(--iter-primary); font-weight: 600; }
.wiki-body { overflow-wrap: anywhere; }
.wiki-body img { max-width: 100%; height: auto; border-radius: .4rem; }
.wiki-body table { border-collapse: collapse; margin-bottom: 1rem; }
.wiki-body td, .wiki-body th { border: 1px solid var(--bs-border-color); padding: .3rem .6rem; }
.wiki-editor .rte-content { min-height: 360px; max-height: 70vh; }
.rte-small .rte-content { min-height: 70px; }
.wiki-diff { white-space: normal; line-height: 1.7; overflow-wrap: anywhere; }
.wiki-diff ins { background: #dcfce7; color: #14532d; text-decoration: none; border-radius: .2rem; padding: 0 .1rem; }
.wiki-diff del { background: #fee2e2; color: #7f1d1d; border-radius: .2rem; padding: 0 .1rem; }

/* Rating (stars) and NPS (0–10) fields: radios on a scale (core/fieldwidgets.ScaleWidget); Likert grids */
.scale-stars { position: relative; display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.scale-stars .scale-star { position: absolute; opacity: 0; width: 1px; height: 1px; }
.scale-stars label { font-size: 1.6rem; line-height: 1; color: #cbd5e1; cursor: pointer; transition: color .1s; }
.scale-stars .scale-star:checked ~ label, .scale-stars label:hover, .scale-stars label:hover ~ label { color: #f59e0b; }
.scale-stars .scale-star:focus-visible + label { outline: 2px solid var(--bs-primary); outline-offset: 2px; border-radius: .25rem; }
.scale-nps .btn-group .btn { min-width: 2.5rem; }
.scale-nps { display: inline-block; max-width: 100%; }
.likert th[scope=row] { min-width: 12rem; }
.likert thead th { white-space: normal; min-width: 5rem; vertical-align: bottom; }

/* Public forms with «choices as buttons» (core/publicforms._buttons) */
div.choice-buttons > div { margin-bottom: .35rem; }
div.choice-buttons label { display: flex; align-items: center; gap: .6rem; padding: .45rem .75rem; border: 1px solid var(--bs-border-color); border-radius: .5rem; cursor: pointer; background: var(--bs-body-bg); }
div.choice-buttons label:hover { border-color: var(--bs-primary); }
div.choice-buttons label:has(input:checked) { border-color: var(--bs-primary); background: var(--bs-primary-bg-subtle); }
div.choice-buttons input { margin: 0; flex-shrink: 0; }

/* Survey results (templates/core/survey_results.html) */
.sv-bar { height: .7rem; border-radius: .35rem; background: var(--bs-secondary-bg); overflow: hidden; }
.sv-bar > span { display: block; height: 100%; background: var(--bs-primary); border-radius: .35rem; }
.sv-stack { display: flex; height: 1.1rem; border-radius: .35rem; overflow: hidden; background: var(--bs-secondary-bg); }
.sv-stack > span { height: 100%; }
.sv-stars { position: relative; display: inline-block; font-size: 1.4rem; line-height: 1; color: #cbd5e1; white-space: nowrap; }
.sv-stars > span { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: #f59e0b; }
.sv-texts { max-height: 18rem; overflow: auto; }
.sv-big { font-size: 2.2rem; font-weight: 600; line-height: 1.1; }

/* User Guide (core/guide.py) */
.guide-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 1rem; align-items: start; }
.guide-toc { position: sticky; top: 4.5rem; max-height: calc(100vh - 5.5rem); overflow-y: auto; }
.guide-toc nav a { display: block; padding: .22rem .5rem; border-radius: .35rem; font-size: .86rem; color: var(--bs-body-color); text-decoration: none; }
.guide-toc nav a:hover { background: var(--iter-primary-subtle); color: var(--iter-primary-dark); }
.guide-toc nav a.part { margin-top: .5rem; font-weight: 600; color: var(--iter-primary-dark); }
.guide-toc nav a.sub { padding-left: 1.1rem; }
.guide-section { scroll-margin-top: 4.5rem; }
.guide-title { font-size: 1.35rem; font-weight: 600; color: var(--iter-primary-dark); margin-bottom: .8rem; }
.guide-part { background: var(--iter-primary-subtle); border-color: var(--iter-primary); }
.guide-part-title { font-size: 1.7rem; font-weight: 700; color: var(--iter-primary-dark); margin-bottom: .4rem; }
.guide-body { line-height: 1.6; }
.guide-body h3 { font-size: 1.1rem; font-weight: 600; margin: 1.3rem 0 .5rem; color: var(--iter-primary-dark); }
.guide-body h4 { font-size: 1rem; font-weight: 600; margin: 1rem 0 .4rem; }
.guide-body img { display: block; max-width: 100%; height: auto; margin: .6rem auto .2rem; border: 1px solid var(--bs-border-color); box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.guide-body p:has(> em:only-child) { text-align: center; color: var(--bs-secondary-color); font-size: .85rem; }
.guide-body table { width: 100%; font-size: .9rem; }
.guide-body thead th { background: var(--iter-primary); color: #fff; }
.guide-body blockquote { background: var(--iter-primary-subtle); border-left: 4px solid var(--iter-primary); border-radius: .35rem; padding: .6rem .9rem; margin: .8rem 0; }
.guide-body blockquote p:last-child { margin-bottom: 0; }
.guide-body code { color: var(--iter-primary-dark); }
@media (max-width: 991.98px) { .guide-layout { grid-template-columns: 1fr; } .guide-toc { position: static; max-height: 40vh; } }
/* User Guide and At a glance in the middle of the top bar */
.rte-content table { border-collapse: collapse; margin-bottom: 1rem; }
.rte-content td, .rte-content th { border: 1px solid var(--bs-border-color); padding: .3rem .6rem; min-width: 3rem; }
.rte-content th { background: var(--iter-primary-subtle); }
.rte-content code { background: #f1f5f9; border-radius: .25rem; padding: 0 .25rem; }
.rte-content pre code { background: none; padding: 0; }
.rte-content pre { background: #f1f5f9; border-radius: .35rem; padding: .5rem .8rem; }
.rte-content h1 { font-size: 1.6rem; } .rte-content h2 { font-size: 1.35rem; } .rte-content h3 { font-size: 1.15rem; }
.rte-content h4 { font-size: 1rem; } .rte-content h5, .rte-content h6 { font-size: .9rem; }
.rte-content blockquote { border-left: 4px solid var(--iter-primary); background: var(--iter-primary-subtle); padding: .5rem .8rem; }
.manage-nav-title { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; padding: .7rem .75rem .2rem; }
.role-types { display: flex; flex-direction: column; gap: .15rem; min-width: 9rem; }

/* Dark theme (navbar switch, User.theme): Bootstrap 5.3 darkens its own components; here the colours iter.css
   writes for the light theme. The brand shades (--iter-primary-subtle…) come from core/site/theme.dark_variables. */
[data-bs-theme="dark"] {
  --iter-bg: #16181d;
  --bs-link-color: var(--iter-primary-dark);
  --bs-link-hover-color: var(--iter-primary-light);
  color-scheme: dark;
}
[data-bs-theme="dark"] .bg-light, [data-bs-theme="dark"] .bg-white { background-color: var(--bs-tertiary-bg) !important; }
[data-bs-theme="dark"] .text-bg-light { background-color: var(--bs-secondary-bg) !important; color: var(--bs-body-color) !important; }
[data-bs-theme="dark"] .btn-light { --bs-btn-bg: var(--bs-secondary-bg); --bs-btn-border-color: var(--bs-secondary-bg); --bs-btn-color: var(--bs-body-color);
  --bs-btn-hover-bg: #3d434a; --bs-btn-hover-border-color: #3d434a; --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #464d55; --bs-btn-active-border-color: #464d55; --bs-btn-active-color: #fff; }
[data-bs-theme="dark"] .table-light { --bs-table-bg: var(--bs-tertiary-bg); --bs-table-color: var(--bs-body-color); --bs-table-border-color: var(--bs-border-color); }
[data-bs-theme="dark"] .card { box-shadow: 0 1px 3px rgba(0,0,0,.4); }
[data-bs-theme="dark"] .card-header { border-bottom-color: var(--bs-border-color); }
[data-bs-theme="dark"] .page-head .sub, [data-bs-theme="dark"] .field-label, [data-bs-theme="dark"] .parent-fields dt,
[data-bs-theme="dark"] .project-bar-desc, [data-bs-theme="dark"] .gf-values dt, [data-bs-theme="dark"] .adv-panel .form-label,
[data-bs-theme="dark"] .wf-kicker, [data-bs-theme="dark"] .wf-next-head, [data-bs-theme="dark"] .admin-box-sub,
[data-bs-theme="dark"] .admin-desc, [data-bs-theme="dark"] .admin-icon, [data-bs-theme="dark"] .rte-status,
[data-bs-theme="dark"] .table-iter tbody tr.superseded td, [data-bs-theme="dark"] .sig-table .sig-future td { color: var(--bs-secondary-color); }
[data-bs-theme="dark"] .empty, [data-bs-theme="dark"] .wf-flow .arrow, [data-bs-theme="dark"] .admin-chevron { color: #5c636a; }

/* navbar logo, footer */
[data-bs-theme="dark"] .logo-preview { border-color: var(--bs-border-color); }
[data-bs-theme="dark"] .iter-footer { color: var(--bs-secondary-color); background: rgba(22,24,29,.85); border-top-color: var(--bs-border-color);
  box-shadow: none; }
[data-bs-theme="dark"] .iter-footer .unit, [data-bs-theme="dark"] .iter-footer .footer-quote,
[data-bs-theme="dark"] .iter-footer .footer-clock { color: #adb5bd; }
[data-bs-theme="dark"] .iter-footer .sep { background: #495057; }
[data-bs-theme="dark"] .iter-footer .brand, [data-bs-theme="dark"] .iter-footer .footer-quote .quote-author { color: #6c757d; }

/* home cards */
[data-bs-theme="dark"] .project-card { box-shadow: 0 1px 3px rgba(0,0,0,.45); }
[data-bs-theme="dark"] .project-card:hover { box-shadow: 0 12px 28px rgba(0,0,0,.5); }
[data-bs-theme="dark"] .project-card.kind-simple { --kind-soft: #1e3a5f; }
[data-bs-theme="dark"] .project-card.kind-phased { --kind-soft: #134e4a; }
[data-bs-theme="dark"] .project-card.kind-survey { --kind-soft: #3b2a63; }
[data-bs-theme="dark"] .project-card.kind-costctl { --kind-soft: #14532d; }
[data-bs-theme="dark"] .project-card.kind-wiki { --kind-soft: #334155; }
/* the code in the light shade of its kind; the kinds in the brand colour (workflow, site) take the light brand shade,
   their second colour (the accent) is too dark on the dark card */
[data-bs-theme="dark"] .project-card { --kind-ink: var(--iter-primary-dark); }
[data-bs-theme="dark"] .project-card:is(.kind-simple, .kind-phased, .kind-survey, .kind-costctl, .kind-wiki) { --kind-ink: var(--kind-2); }
[data-bs-theme="dark"] .project-card .code-badge { color: var(--kind-ink); }
[data-bs-theme="dark"] .project-card-foot { background: rgba(255,255,255,.02); }
[data-bs-theme="dark"] .project-logo-preview { background: #f8f9fa; }

/* tables, tabs, admin sidebar */
[data-bs-theme="dark"] .table-iter thead th, [data-bs-theme="dark"] .audit-table th { background: var(--bs-tertiary-bg); color: #adb5bd; border-bottom-color: var(--bs-border-color); }
[data-bs-theme="dark"] .table-iter thead .filter-row th { background: var(--bs-body-bg); }
[data-bs-theme="dark"] .item-table thead tr:last-child > th { box-shadow: inset 0 -1px 0 var(--bs-border-color); }
[data-bs-theme="dark"] .manage-nav .list-group-item { color: var(--bs-body-color); }
[data-bs-theme="dark"] .manage-nav-title { color: #6c757d; }
[data-bs-theme="dark"] .nav-tabs.iter-tabs { border-bottom-color: var(--bs-border-color); }
[data-bs-theme="dark"] .nav-tabs.iter-tabs .nav-link { color: #adb5bd; }
[data-bs-theme="dark"] .nav-tabs.iter-tabs .nav-link.active { color: var(--iter-primary-dark); border-bottom-color: var(--iter-primary); }
[data-bs-theme="dark"] .nav-tabs.iter-tabs .nav-link.sig-tab, [data-bs-theme="dark"] .nav-tabs.iter-tabs .nav-link.sig-tab.active { color: #fff; }
[data-bs-theme="dark"] .field-row { border-bottom-color: var(--bs-border-color); }
[data-bs-theme="dark"] .type-tab { background: var(--bs-body-bg); border-color: var(--bs-border-color); color: var(--bs-body-color); }
[data-bs-theme="dark"] .type-tab.active { background: var(--iter-primary); border-color: var(--iter-primary); color: #fff; }
[data-bs-theme="dark"] .project-bar { border-bottom-color: var(--bs-border-color); }
[data-bs-theme="dark"] .project-bar-name { color: var(--bs-emphasis-color); }
[data-bs-theme="dark"] .project-tab { color: #adb5bd; }
[data-bs-theme="dark"] .project-tab:hover { color: #fff; border-bottom-color: #495057; }
[data-bs-theme="dark"] .project-tab.active { color: var(--iter-primary-dark); border-bottom-color: var(--iter-primary); }
[data-bs-theme="dark"] .project-tab .count { background: var(--bs-secondary-bg); color: #adb5bd; }
[data-bs-theme="dark"] .item-name, [data-bs-theme="dark"] .admin-title { color: var(--bs-emphasis-color); }
[data-bs-theme="dark"] .table-iter tbody tr.superseded .item-name { color: #adb5bd; }
[data-bs-theme="dark"] .table-iter tbody tr.draft td { background: rgba(245, 158, 11, .08); }
[data-bs-theme="dark"] .item-scroll-wrap::after { background: linear-gradient(to left, rgba(0, 0, 0, .45), transparent); }

/* item list toolbar and chips */
[data-bs-theme="dark"] .list-toolbar, [data-bs-theme="dark"] .list-active { border-bottom-color: var(--bs-border-color); }
[data-bs-theme="dark"] .list-footer { border-top-color: var(--bs-border-color); }
[data-bs-theme="dark"] .list-search .input-group-text { background: var(--bs-body-bg); color: #6c757d; }
[data-bs-theme="dark"] .quick-chip { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .45); color: #fcd34d; }
[data-bs-theme="dark"] .quick-chip:hover { background: rgba(245, 158, 11, .2); color: #fde68a; }
[data-bs-theme="dark"] .quick-chip.active { background: #f59e0b; border-color: #f59e0b; color: #1c1917; }
[data-bs-theme="dark"] .quick-chip.pending-chip:not(.zero) { background: var(--bs-tertiary-bg); border-color: var(--bs-border-color); color: #adb5bd; }
[data-bs-theme="dark"] .quick-chip.zero { background: transparent; border-color: var(--bs-border-color); color: #6c757d; }
[data-bs-theme="dark"] .quick-chip.zero .count { background: var(--bs-secondary-bg); color: #adb5bd; }
[data-bs-theme="dark"] .adv-section + .adv-section { border-top-color: var(--bs-border-color); }
[data-bs-theme="dark"] .adv-checks { background: var(--bs-body-bg); border-color: var(--bs-border-color); }
[data-bs-theme="dark"] .col-list .tab-name { color: #6c757d; }

/* rich text editor, attachments, read-only values, field groups, table field */
[data-bs-theme="dark"] .rte { background: var(--bs-body-bg); border-color: var(--bs-border-color); }
[data-bs-theme="dark"] .rte-toolbar, [data-bs-theme="dark"] .rte-status { background: var(--bs-tertiary-bg); border-color: var(--bs-border-color); }
[data-bs-theme="dark"] .rte-toolbar button, [data-bs-theme="dark"] .rte-tablebar button { color: #adb5bd; }
[data-bs-theme="dark"] .rte-toolbar button:hover, [data-bs-theme="dark"] .rte-tablebar button:hover { background: var(--bs-secondary-bg); }
[data-bs-theme="dark"] .rte-toolbar .sep { background: var(--bs-border-color); }
[data-bs-theme="dark"] .rte-toolbar .rte-block { background: var(--bs-body-bg); border-color: var(--bs-border-color); color: var(--bs-body-color); }
[data-bs-theme="dark"] .rte-swatches { background: var(--bs-body-bg); border-color: var(--bs-border-color); }
[data-bs-theme="dark"] .rte-tablebar { border-bottom-color: var(--bs-border-color); }
[data-bs-theme="dark"] .rte-content code, [data-bs-theme="dark"] .rte-content pre { background: var(--bs-secondary-bg); }
[data-bs-theme="dark"] .att-list .att, [data-bs-theme="dark"] .gf-box, [data-bs-theme="dark"] .gf-entry { background: var(--bs-body-bg); border-color: var(--bs-border-color); }
[data-bs-theme="dark"] .ro-value { background: var(--bs-tertiary-bg); border-color: var(--bs-border-color); color: var(--bs-body-color); }
[data-bs-theme="dark"] .iter-table-field { background: var(--bs-body-bg); }
[data-bs-theme="dark"] .iter-table-field .tf-cols th, [data-bs-theme="dark"] .iter-table-field .tf-heading td,
[data-bs-theme="dark"] .iter-table-field .tf-add-row td { background: var(--bs-tertiary-bg); color: #adb5bd; }
[data-bs-theme="dark"] .iter-table-field .tf-label { color: var(--bs-body-color); }
[data-bs-theme="dark"] .field-ro, [data-bs-theme="dark"] .fl-ro { border-left-color: var(--bs-border-color); }
[data-bs-theme="dark"] .fl-ro { background: var(--bs-border-color); }
[data-bs-theme="dark"] .field-legend { color: #adb5bd; }
[data-bs-theme="dark"] .info-frame { background: #fff; }

/* history, diffs, wiki */
[data-bs-theme="dark"] .timeline::before { background: var(--bs-border-color); }
[data-bs-theme="dark"] .timeline .entry::before { background: var(--bs-body-bg); }
[data-bs-theme="dark"] .diff-old, [data-bs-theme="dark"] .audit-chip.old { background: rgba(248, 113, 113, .12); }
[data-bs-theme="dark"] .diff-new, [data-bs-theme="dark"] .audit-chip.new { background: rgba(74, 222, 128, .1); }
[data-bs-theme="dark"] .audit-old, [data-bs-theme="dark"] .audit-chip.old { color: #f87171; }
[data-bs-theme="dark"] .audit-new, [data-bs-theme="dark"] .audit-chip.new { color: #4ade80; }
[data-bs-theme="dark"] .wiki-diff ins { background: rgba(74, 222, 128, .18); color: #bbf7d0; }
[data-bs-theme="dark"] .wiki-diff del { background: rgba(248, 113, 113, .18); color: #fecaca; }

/* workflow badges, diagrams, signatures, progress */
[data-bs-theme="dark"] .state-created { background: #343a40; color: #ced4da; }
[data-bs-theme="dark"] .state-draft { background: rgba(245, 158, 11, .15); color: #fcd34d; }
[data-bs-theme="dark"] .state-final { background: rgba(34, 197, 94, .18); color: #86efac; }
[data-bs-theme="dark"] .state-rejected { background: rgba(239, 68, 68, .18); color: #fca5a5; }
[data-bs-theme="dark"] .state-old { background: #343a40; color: #868e96; text-decoration-color: #6c757d; }
[data-bs-theme="dark"] .state-c0 { background: rgba(59, 130, 246, .2); color: #93c5fd; }
[data-bs-theme="dark"] .state-c1 { background: rgba(249, 115, 22, .2); color: #fdba74; }
[data-bs-theme="dark"] .state-c2 { background: rgba(139, 92, 246, .22); color: #c4b5fd; }
[data-bs-theme="dark"] .state-c3 { background: rgba(20, 184, 166, .18); color: #5eead4; }
[data-bs-theme="dark"] .state-c4 { background: rgba(236, 72, 153, .2); color: #f9a8d4; }
[data-bs-theme="dark"] .state-c5 { background: rgba(99, 102, 241, .22); color: #a5b4fc; }
[data-bs-theme="dark"] .state-c6 { background: rgba(6, 182, 212, .18); color: #67e8f9; }
[data-bs-theme="dark"] .state-c7 { background: rgba(217, 70, 239, .2); color: #f0abfc; }
[data-bs-theme="dark"] .wf-diagram, [data-bs-theme="dark"] .wf-summary { --wf-step: #60a5fa; --wf-final: #4ade80; }
[data-bs-theme="dark"] .wf-node { background: var(--bs-body-bg); border-color: var(--bs-border-color); }
[data-bs-theme="dark"] .wf-node:hover { border-color: #6c757d; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
[data-bs-theme="dark"] .wf-role { background: var(--bs-tertiary-bg); border-color: var(--bs-border-color); color: var(--bs-body-color); }
[data-bs-theme="dark"] .wf-link { color: #495057; }
[data-bs-theme="dark"] .wf-link::before, [data-bs-theme="dark"] .wf-count-box { border-color: var(--bs-border-color); }
[data-bs-theme="dark"] .wf-count, [data-bs-theme="dark"] .wf-legend, [data-bs-theme="dark"] .phase-exit { color: #adb5bd; }
[data-bs-theme="dark"] .wf-count-n, [data-bs-theme="dark"] .wf-legend-item strong { color: var(--bs-emphasis-color); }
[data-bs-theme="dark"] .wf-share, [data-bs-theme="dark"] .wf-sw-empty, [data-bs-theme="dark"] .wf-progress .bar { background: var(--bs-secondary-bg); }
[data-bs-theme="dark"] .wf-reject-lane { background: rgba(239, 68, 68, .06); border-color: rgba(239, 68, 68, .4); }
[data-bs-theme="dark"] .sig-table tbody + tbody { border-top-color: var(--bs-border-color); }
[data-bs-theme="dark"] .sig-table .sig-step { background: var(--bs-body-bg); }
[data-bs-theme="dark"] .sig-table .step-no, [data-bs-theme="dark"] .sig-table .sig-state,
[data-bs-theme="dark"] .sig-table .sig-future .step-no { background: var(--bs-secondary-bg); color: #adb5bd; }
[data-bs-theme="dark"] .sig-table .sig-done td { background: rgba(34, 197, 94, .07); }
[data-bs-theme="dark"] .sig-table .sig-done .sig-state, [data-bs-theme="dark"] .sig-table .sig-approved .sig-status { background: rgba(34, 197, 94, .18); color: #86efac; }
[data-bs-theme="dark"] .sig-table .sig-no_impact .sig-status { background: rgba(14, 165, 233, .18); color: #7dd3fc; }
[data-bs-theme="dark"] .sig-table .sig-returned .sig-status { background: rgba(239, 68, 68, .18); color: #fca5a5; }
[data-bs-theme="dark"] .sig-table .sig-current .sig-pending .sig-status { background: rgba(245, 158, 11, .18); color: #fcd34d; }
[data-bs-theme="dark"] .sig-table .sig-skipped td { background: transparent; color: #6c757d; }
[data-bs-theme="dark"] .sig-table .sig-skipped .step-no, [data-bs-theme="dark"] .sig-table .sig-skipped .sig-state { background: var(--bs-tertiary-bg); color: #6c757d; }

/* administration boxes */
[data-bs-theme="dark"] .admin-box-head { background: var(--bs-tertiary-bg); border-bottom-color: var(--bs-border-color); }
[data-bs-theme="dark"] .admin-separator { background: var(--bs-tertiary-bg); }
[data-bs-theme="dark"] .admin-box-title { color: #ced4da; }
[data-bs-theme="dark"] .admin-box-kicker { color: #6c757d; }
[data-bs-theme="dark"] .avatar-none { background: #495057; }

/* Login card: the form spread over the whole height of the card */
.login-title { font-size: 1.9rem; font-weight: 700; }
@media (min-width: 992px) {
  .login-intro-wrap .login-card .card-body { justify-content: space-between; }
  .login-intro-wrap .login-card .card-body > .text-center { margin-bottom: 1.5rem !important; }
  .login-intro-wrap .login-card form { margin-block: auto; }
  .login-intro-wrap .login-card .form-control { min-height: 3.6rem; font-size: 1.05rem; }
  .login-intro-wrap .login-card .form-floating > label { font-size: 1.05rem; }
  .login-intro-wrap .login-card .form-floating.mb-4 { margin-bottom: 2rem !important; }
  .login-intro-wrap .login-card .btn-primary { padding-block: .85rem !important; font-size: 1.1rem; }
  .login-intro-wrap .login-logo { height: 72px; }
}

/* Bulk actions bar over the item lists */
.bulk-bar { font-size: .875rem; }
.bulk-bar .form-check-label { max-width: 520px; }
.bulk-off .bulk-col { display: none; }

/* Login: the button under the card note (link laid over the pill, the team popup above the link) */
.login-link { text-align: center; margin-top: .75rem; }
.login-link-pill { position: relative; display: inline-flex; align-items: center; gap: .6rem; max-width: 100%; padding: .4rem 1rem .4rem .4rem;
  border: 1.5px solid rgba(var(--iter-primary-rgb), .6); border-radius: 999px; font-size: .85rem; font-weight: 600; line-height: 1.3;
  color: var(--iter-primary); background: linear-gradient(135deg, rgba(var(--iter-primary-rgb), .1), rgba(var(--iter-primary-rgb), .03));
  box-shadow: 0 2px 8px rgba(var(--iter-primary-rgb), .15);
  transition: background-color .15s, color .15s, border-color .15s, box-shadow .2s, transform .2s; }
.login-link-pill:hover, .login-link-pill:has(.login-link-target:focus-visible) { background: var(--iter-primary); border-color: var(--iter-primary); color: #fff;
  transform: translateY(-2px); box-shadow: 0 6px 16px rgba(var(--iter-primary-rgb), .35); }
.login-link-pill:has(.login-link-target:focus-visible) { box-shadow: 0 0 0 .2rem rgba(var(--iter-primary-rgb), .3); }
.login-link-target { position: absolute; inset: 0; border-radius: inherit; outline: none; }
.login-link-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--iter-primary); color: #fff; font-size: 1rem; animation: login-link-pulse 2.4s ease-out infinite; transition: background-color .15s, color .15s; }
.login-link-pill:hover .login-link-icon { background: #fff; color: var(--iter-primary); animation: none; }
@keyframes login-link-pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--iter-primary-rgb), .45); } 70%, 100% { box-shadow: 0 0 0 .55rem rgba(var(--iter-primary-rgb), 0); } }
.login-link-out { font-size: .75rem; opacity: .8; transition: transform .2s; }
.login-link-pill:hover .login-link-out { transform: translate(2px, -2px); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .login-link-icon { animation: none; } .login-link-pill, .login-link-out { transition: none; } .login-link-pill:hover { transform: none; } }
.login-link .unit { font-weight: 600; letter-spacing: .08em; }
.login-link .sep { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; margin: 0 .5rem; vertical-align: middle; }
.login-link .team-wrap .team { position: relative; z-index: 1; cursor: default; font-weight: 600; border-bottom: 1px dotted currentColor; outline: none; }
.login-link .team-card { left: 50%; translate: -50% 0; width: max-content; text-align: left; font-weight: 400; }
.login-link .team-card .team-member { display: flex; flex-direction: row; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600;
  color: #fff; text-decoration: none; line-height: 1.3; white-space: nowrap; }
.login-link .team-card .team-member .bi { flex: none; color: var(--iter-primary-light); font-size: .9rem; line-height: 1; }
.login-link .team-card a.team-member:hover { text-decoration: underline; }
@media (min-width: 992px) {  /* the button takes the room of a tighter note, the card keeps its height */
  .login-intro-wrap .login-card-note { margin-top: auto !important; padding-top: .8rem; gap: .25rem 1.25rem; }
  .login-intro-wrap .login-card .card-body > .text-center { margin-bottom: 1rem !important; }
}
.kanban-card[draggable="true"] { cursor: grab; }
.kanban-card.dragging { opacity: .45; }
.kanban-col.drop-over { outline: 2px dashed var(--bs-primary); outline-offset: -2px; }
.kanban-card .kanban-error { font-size: .75rem; color: var(--bs-danger); margin-top: .25rem; }

/* Guided tour (static/js/tour.js): the element pointed at stands out of a dimmed page, the bubble beside it */
.tour-lit { position: relative; z-index: 1055; border-radius: .5rem;
  box-shadow: 0 0 0 4px var(--bs-primary), 0 0 0 9999px rgba(15, 23, 42, .45) !important; transition: box-shadow .2s; }
.tour-bubble { position: fixed; z-index: 1080; width: min(340px, calc(100vw - 32px)); padding: 1rem 1rem .75rem;
  background: var(--bs-body-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color);
  border-radius: .75rem; font-size: .9rem; }
.tour-arrow { position: absolute; top: -7px; width: 14px; height: 14px; margin-left: -7px; transform: rotate(45deg);
  background: var(--bs-body-bg); border-left: 1px solid var(--bs-border-color); border-top: 1px solid var(--bs-border-color); }
.tour-bubble.above .tour-arrow { top: auto; bottom: -7px; transform: rotate(225deg); }
.tour-close { position: absolute; top: .75rem; right: .75rem; font-size: .7rem; }
.tour-title { font-weight: 600; margin: 0 1.5rem .35rem 0; }
.tour-text { color: var(--bs-secondary-color); margin-bottom: .75rem; }
.tour-foot { display: flex; align-items: center; gap: .4rem; }
.tour-count { font-size: .8rem; color: var(--bs-secondary-color); margin-right: auto; }
.tour-skip { font-size: .8rem; padding-left: 0; padding-right: .25rem; }

/* ===== Look · messages as notices (static/js/toasts.js) ===== */
.toast-stack { position: fixed; right: 1rem; bottom: calc(var(--iter-footer-h) + .75rem); z-index: 1090;
  width: min(380px, calc(100vw - 2rem)); display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.iter-toast { --toast-color: var(--bs-info); position: relative; display: flex; align-items: flex-start; gap: .65rem;
  padding: .75rem .75rem .8rem .9rem; overflow: hidden; pointer-events: auto; max-height: 40vh; overflow-y: auto;
  background: var(--bs-body-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color-translucent);
  border-left: 4px solid var(--toast-color); border-radius: .75rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .08);
  animation: toast-in .28s cubic-bezier(.2, .8, .2, 1) both; font-size: .9rem; }
.iter-toast-success { --toast-color: #16a34a; }
.iter-toast-info, .iter-toast-debug { --toast-color: #2563eb; }
.iter-toast-warning { --toast-color: #d97706; }
.iter-toast-danger { --toast-color: #dc2626; }
.iter-toast-icon { color: var(--toast-color); font-size: 1.1rem; line-height: 1.2; flex-shrink: 0; }
.iter-toast-text { flex: 1 1 auto; min-width: 0; padding-top: .05rem; overflow-wrap: anywhere; }
.iter-toast .btn-close { flex-shrink: 0; font-size: .65rem; margin-top: .2rem; opacity: .45; }
.iter-toast .btn-close:hover { opacity: .9; }
.iter-toast-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--toast-color);
  opacity: .45; transform-origin: left center; transform: scaleX(1); display: none; }
.iter-toast.is-auto .iter-toast-timer { display: block; }
.iter-toast.is-leaving { animation: toast-out .22s ease-in both; }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
@media (max-width: 575.98px) {
  .toast-stack { right: .5rem; left: .5rem; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .iter-toast, .iter-toast.is-leaving { animation: none; }
  .iter-toast-timer { display: none !important; }
}
[data-bs-theme="dark"] .iter-toast { background: #2b3035; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
[data-bs-theme="dark"] .iter-toast-success { --toast-color: #4ade80; }
[data-bs-theme="dark"] .iter-toast-info, [data-bs-theme="dark"] .iter-toast-debug { --toast-color: #60a5fa; }
[data-bs-theme="dark"] .iter-toast-warning { --toast-color: #fbbf24; }
[data-bs-theme="dark"] .iter-toast-danger { --toast-color: #f87171; }

/* ===== Look · dashboard heat map: one blue ramp, light to dark (dark theme: from the card towards light), cells
   parted by 2 px, numbers in the ink that reads on their step ===== */
.heatmap-table { border-collapse: separate; border-spacing: 2px; }
.heatmap-table > :not(caption) > * > * { border-bottom-width: 0; }
.heatmap-table td.heat { border-radius: 4px; text-align: center; font-variant-numeric: tabular-nums; box-shadow: none !important; }
.heatmap-table td.heat a { color: inherit !important; text-decoration: none; font-weight: 600; }
.heatmap-table td.heat a:hover { text-decoration: underline; }
.heatmap-table tbody td:first-child, .heatmap-table tfoot td:first-child { white-space: nowrap; }
.heatmap-table thead th { white-space: nowrap; }
.heat-1 { background: #cde2fb !important; color: #0b0b0b !important; } .heat-2 { background: #b7d3f6 !important; color: #0b0b0b !important; }
.heat-3 { background: #9ec5f4 !important; color: #0b0b0b !important; } .heat-4 { background: #86b6ef !important; color: #0b0b0b !important; }
.heat-5 { background: #6da7ec !important; color: #0b0b0b !important; } .heat-6 { background: #5598e7 !important; color: #0b0b0b !important; }
.heat-7 { background: #3987e5 !important; color: #0b0b0b !important; } .heat-8 { background: #2a78d6 !important; color: #fff !important; }
.heat-9 { background: #256abf !important; color: #fff !important; } .heat-10 { background: #1c5cab !important; color: #fff !important; }
[data-bs-theme="dark"] .heat-1 { background: #0d366b !important; color: #fff !important; }
[data-bs-theme="dark"] .heat-2 { background: #104281 !important; color: #fff !important; }
[data-bs-theme="dark"] .heat-3 { background: #184f95 !important; color: #fff !important; }
[data-bs-theme="dark"] .heat-4 { background: #1c5cab !important; color: #fff !important; }
[data-bs-theme="dark"] .heat-5 { background: #256abf !important; color: #fff !important; }
[data-bs-theme="dark"] .heat-6 { background: #2a78d6 !important; color: #fff !important; }
[data-bs-theme="dark"] .heat-7 { background: #3987e5 !important; color: #0b0b0b !important; }
[data-bs-theme="dark"] .heat-8 { background: #5598e7 !important; color: #0b0b0b !important; }
[data-bs-theme="dark"] .heat-9 { background: #6da7ec !important; color: #0b0b0b !important; }
[data-bs-theme="dark"] .heat-10 { background: #86b6ef !important; color: #0b0b0b !important; }

/* ===== Look · the way of the item at the top of its page (templates/core/_item_track.html) ===== */
.item-track { position: relative; margin: -.25rem 0 1.25rem; padding: .9rem 1rem .8rem; background: var(--bs-body-bg); border-radius: .85rem;
  box-shadow: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04); overflow-x: auto; }
.item-track.is-link { cursor: pointer; }
.item-track.is-link:hover { box-shadow: 0 4px 14px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04); }
.item-track ol { display: flex; list-style: none; margin: 0; padding: 0; min-width: max-content; }
.track-node { --track-c: var(--bs-border-color); position: relative; flex: 1 1 0; min-width: 7.5rem; max-width: 15rem;
  display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 0 .4rem; text-align: center; }
/* the line from the node before: green as far as the item went */
.track-node + .track-node::before { content: ''; position: absolute; top: 15px; right: calc(50% + 20px); left: calc(-50% + 20px);
  height: 2px; border-radius: 2px; background: var(--bs-border-color); }
.track-node.is-done + .track-node::before, .track-node.is-skipped + .track-node::before { background: #16a34a; }
.track-node.is-done + .track-node.is-todo::before { background: linear-gradient(90deg, #16a34a, var(--bs-border-color)); }
.track-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  border: 2px solid var(--bs-border-color); background: var(--bs-body-bg); color: var(--bs-secondary-color); font-size: .85rem; }
.track-num { font-size: .78rem; font-weight: 600; }
.track-name { font-size: .82rem; font-weight: 600; line-height: 1.2; color: var(--bs-secondary-color); }
.track-note { font-size: .74rem; line-height: 1.25; color: var(--bs-secondary-color); max-width: 14rem; }
.track-node.is-done .track-dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.track-node.is-done .track-name { color: var(--bs-body-color); }
.track-node.is-skipped .track-dot { border-style: dashed; color: var(--bs-secondary-color); }
.track-node.is-skipped .track-name { text-decoration: line-through; text-decoration-color: rgba(100,116,139,.5); }
.track-node.is-current .track-dot { background: var(--iter-primary); border-color: var(--iter-primary); color: #fff;
  box-shadow: 0 0 0 4px rgba(var(--iter-primary-rgb), .15); animation: track-pulse 2.2s ease-out infinite; }
.track-node.is-current .track-name { color: var(--iter-primary-dark); }
.track-node.is-current .track-note { color: var(--bs-body-color); font-weight: 500; }
.track-node.is-rejected .track-dot { background: #dc2626; border-color: #dc2626; color: #fff; }
.track-node.is-rejected .track-name { color: #dc2626; }
@keyframes track-pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--iter-primary-rgb), .35); }
  70% { box-shadow: 0 0 0 9px rgba(var(--iter-primary-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--iter-primary-rgb), 0); } }
@media (prefers-reduced-motion: reduce) { .track-node.is-current .track-dot { animation: none; } }
[data-bs-theme="dark"] .item-track { background: var(--bs-body-bg); box-shadow: 0 1px 3px rgba(0,0,0,.45); }
[data-bs-theme="dark"] .track-node.is-done .track-dot { background: #15803d; border-color: #15803d; }
[data-bs-theme="dark"] .track-node.is-done + .track-node::before, [data-bs-theme="dark"] .track-node.is-skipped + .track-node::before { background: #15803d; }
[data-bs-theme="dark"] .track-node.is-current .track-name { color: var(--iter-primary-dark); }
[data-bs-theme="dark"] .track-node.is-rejected .track-name { color: #f87171; }

/* ===== Look · empty pages and lists with a small drawing (templates/_empty_state.html) ===== */
.empty-state { --ea-ink: #94a3b8; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 2.5rem 1rem 2.75rem; }
.empty-state.is-compact { padding: 1.25rem .5rem 1.5rem; }
.empty-art { width: 160px; height: 120px; margin-bottom: .75rem; }
.empty-state.is-compact .empty-art { width: 128px; height: 96px; }
.empty-title { font-size: 1.05rem; font-weight: 600; color: var(--bs-emphasis-color); }
.empty-text { max-width: 30rem; margin-top: .25rem; font-size: .9rem; color: var(--bs-secondary-color); white-space: normal; }
.ea-blob { fill: var(--iter-primary); opacity: .07; }
.ea-paper { fill: var(--bs-body-bg); stroke: var(--ea-ink); stroke-width: 2.5; stroke-linejoin: round; }
.ea-paper.ea-thin { stroke-width: 2; }
.ea-paper.ea-thick { stroke-width: 3.5; }
.ea-line { fill: none; stroke: var(--ea-ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ea-line.ea-thin { stroke-width: 2; }
.ea-line.ea-faint { opacity: .5; }
.ea-accent-line { fill: none; stroke: var(--iter-primary); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ea-white-line { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ea-handle { fill: none; stroke: var(--ea-ink); stroke-width: 7; stroke-linecap: round; }
.ea-spark { fill: none; stroke: var(--iter-primary); stroke-width: 2; stroke-linecap: round; opacity: .55; }
.ea-accent { fill: var(--iter-primary); }
.ea-good { fill: #16a34a; }
.ea-muted { fill: var(--ea-ink); }
.ea-bar { fill: var(--iter-primary); }
.ea-bar-2 { opacity: .35; }
.ea-bar-3 { opacity: .6; }
[data-bs-theme="dark"] .empty-state { --ea-ink: #6c757d; }
[data-bs-theme="dark"] .ea-blob { opacity: .12; }
@media (prefers-reduced-motion: no-preference) {
  .empty-art { animation: empty-float 4s ease-in-out infinite; }
}
@keyframes empty-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.item-table tbody tr.empty-row:hover { background: transparent; }
.item-table tbody tr.empty-row > td { border-bottom: 0; }

/* the ITER mark of the footer goes back to the home (and leaves the headless view of a project) */
.iter-footer a.brand:hover { color: var(--iter-primary); }
.iter-footer a.brand:hover .mark { transform: rotate(30deg); }
.iter-footer .mark { transition: transform .3s ease; }
/* headless project pages: the small user menu takes the place of the top bar */
.iter-headless .headless-bar { min-height: 2.25rem; }
.iter-headless main { padding-top: .25rem !important; }

/* dashboard widget page: the palettes to choose, each as a row of swatches */
.palette-option { cursor: pointer; }
.palette-option:has(input:checked) { border-color: var(--iter-primary) !important; background: rgba(var(--bs-primary-rgb), .06); }
.palette-swatches { display: inline-flex; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.palette-swatches span { width: 12px; height: 16px; }

/* closed sections of the configuration pages (General → Signatures and revisions, Advanced, More actions) */
details.config-more > summary { cursor: pointer; }
details.config-more > summary.card-header { border-bottom: 0; }
details.config-more[open] > summary.card-header { border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color); }
