:root {
  color-scheme: light;
  --mbdd-color-focus: var(--mbdd-color-product-accent);
  --ink: var(--mbdd-color-text-default);
  --muted: var(--mbdd-color-text-muted);
  --line: color-mix(in srgb, var(--mbdd-color-product-accent) 20%, var(--mbdd-color-background-surface));
  --surface: var(--mbdd-color-background-surface);
  --surface-subtle: var(--mbdd-product-geocontrol-canvas);
  --surface-soft: var(--mbdd-color-product-accent-soft);
  --canvas: var(--mbdd-product-geocontrol-canvas);
  --forest: var(--mbdd-color-product-accent);
  --forest-strong: var(--mbdd-color-product-accent-strong);
  --mint: var(--mbdd-color-product-accent-soft);
  --lime: var(--mbdd-color-product-highlight);
  --product-accent: var(--mbdd-color-product-accent);
  --product-accent-soft: var(--mbdd-color-product-accent-soft);
  --amber: var(--mbdd-color-state-warning);
  --red: var(--mbdd-color-state-fail);
  --blue: var(--mbdd-color-state-info);
  --shadow: 0 18px 50px color-mix(in srgb, var(--mbdd-product-geocontrol-night) 8%, transparent);
  --shadow-card: 0 1px 2px rgba(31, 41, 51, 0.035), 0 5px 18px rgba(31, 41, 51, 0.025);
  --app-header-height: 78px;
  font-family: var(--mbdd-font-family-body);
}

@media (forced-colors: none) {
  :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--mbdd-color-focus);
    outline-offset: 3px;
    box-shadow: none;
  }
}

/* Les titres restent des repères de navigation accessibles, sans encadrement à l'arrivée. */
:where(h1, h2, h3, h4, h5, h6)[tabindex="-1"]:focus {
  outline: none;
  box-shadow: none;
}

* { box-sizing: border-box; }
.case-model-preparation { width: 100%; max-width: 900px; min-height: 0; overflow: auto; padding: 16px; margin: 0 auto; }
.case-preparation-context { color: var(--forest-strong); font-weight: 600; }
.case-preparation-card { border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin: 16px 0; background: var(--surface); }
.case-preparation-card h4 { margin: 0 0 10px; font-size: 1.1rem; }
.case-preparation-card p { line-height: 1.55; }
.case-preparation-profile { padding: 12px 0; }
.case-preparation-profile + .case-preparation-profile { border-top: 1px solid var(--line); }
.invitation-preparation-summary { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.invitation-preparation-summary h3 { font-size: 1rem; }
.finding-request-proposal { background: var(--surface-soft); padding: 16px; border-radius: 10px; }
.finding-request-proposal textarea {
  width: 100%; min-height: 12rem; padding: .65rem .75rem; border: 1px solid var(--muted);
  border-radius: .5rem; background: var(--surface); color: var(--ink);
  font: inherit; font-size: .875rem; line-height: 1.55; resize: vertical;
}
#packs-dialog[data-case-preparation="true"] .bundle-toolbar > :is(#new-configuration-pack-button, #rules-admin-button, #toggle-configuration-pack-versions, #configuration-tools) { display: none; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
}

.login-page {
  color: white;
  background:
    radial-gradient(circle at 12% 12%, color-mix(in srgb, var(--lime) 16%, transparent), transparent 40%),
    linear-gradient(145deg, var(--mbdd-product-geocontrol-night), var(--forest-strong) 62%, var(--forest));
}
.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 430px);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
  width: min(1180px, calc(100% - 3rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: 3rem 0;
}
.login-introduction { max-width: 650px; }
.login-brand { margin-bottom: clamp(3rem, 8vh, 6rem); }
.login-introduction .eyebrow { color: var(--lime); }
.login-introduction h1 {
  max-width: 620px;
  margin: 0.6rem 0 1.25rem;
  font-family: var(--mbdd-font-family-display);
  font-size: clamp(2.35rem, 4.2vw, 3.65rem);
  font-weight: 520;
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.login-introduction > p:not(.eyebrow) { max-width: 580px; color: var(--lime); line-height: 1.7; }
.login-capabilities { display: grid; gap: 0.65rem; margin: 1.8rem 0 0; padding: 0; list-style: none; }
.login-capabilities li { color: var(--mbdd-color-text-inverse); font-size: 0.86rem; }
.login-capabilities li::before { margin-right: 0.7rem; color: var(--lime); content: "✓"; font-weight: 900; }
.login-card {
  padding: clamp(1.65rem, 3.5vw, 2.25rem);
  color: var(--ink);
  background: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--mbdd-radius-dialog);
  box-shadow: 0 24px 70px rgba(4, 20, 15, 0.24);
}
.login-mobile-brand { display: none; }
.login-card h2 { margin: 0.35rem 0 0.45rem; font-family: var(--mbdd-font-family-display); font-size: 1.75rem; font-weight: 650; letter-spacing: -0.025em; }
.login-help { margin: 0 0 1.7rem; color: var(--muted); font-size: 0.82rem; line-height: 1.55; }
.login-card label { display: grid; gap: 0.45rem; margin: 1rem 0; color: var(--muted); font-size: 0.74rem; font-weight: 750; }
.login-card input { width: 100%; padding: 0.8rem 0.85rem; color: var(--ink); background: white; border: 1px solid #b8c7bf; border-radius: 9px; outline: 0; }
.login-card .checkbox-label { display: flex; align-items: center; gap: 0.65rem; }
.login-card .checkbox-label input { flex: 0 0 auto; width: auto; padding: 0; }
.login-card input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(23, 79, 60, 0.12); }
.login-card input:focus-visible {
  box-shadow: 0 0 0 3px var(--mbdd-color-focus), 0 0 0 6px var(--mbdd-color-text-strong);
}
.login-card button { margin-top: 0.65rem; }
.saml-login { display: flex; align-items: center; justify-content: center; margin: 1.1rem 0 0; text-decoration: none; }
.saml-login[hidden] { display: none; }
.login-separator { display: flex; align-items: center; gap: 0.7rem; margin: 1.2rem 0 0.2rem; color: var(--muted); font-size: 0.68rem; }
.login-separator::before, .login-separator::after { height: 1px; background: var(--line); content: ""; flex: 1; }
.login-message { padding: 0.7rem 0.8rem; color: #873737; background: #f9e4e4; border-radius: 8px; font-size: 0.76rem; }
.login-message.success { color: var(--mbdd-color-state-pass); background: var(--mbdd-color-state-pass-soft); }
.login-security { margin: 1.4rem 0 0; color: var(--muted); text-align: center; font-size: 0.67rem; }

button, input, select { font: inherit; }
button { cursor: pointer; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: white;
  background: var(--forest-strong);
  border-radius: 0.5rem;
}
.skip-link:focus { top: 1rem; }

.shell {
  display: grid;
  grid-template-areas:
    "header header"
    "sidebar main";
  grid-template-columns: 270px minmax(0, 1fr);
  grid-template-rows: var(--app-header-height) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  grid-area: sidebar;
  top: var(--app-header-height);
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--app-header-height));
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; min-width: 0; margin-bottom: 2rem; }
.login-brand .mbdd-brand-lockup { width: min(100%, 280px); max-height: 58px; }
.mobile-cases-toggle { display: none; }

.primary-button, .secondary-button, .danger-button {
  min-height: 42px;
  padding: 0.7rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 750;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
.primary-button { color: white; background: var(--forest); box-shadow: none; }
.primary-button:hover { background: var(--forest-strong); transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }
.secondary-button { color: var(--forest); background: var(--surface); border-color: var(--forest); }
.secondary-button:hover:not(:disabled) { color: var(--forest-strong); background: var(--mint); border-color: var(--forest-strong); }
.danger-button { color: white; background: #9f3232; border-color: #8d2929; }
.danger-button:hover { background: #872727; transform: translateY(-1px); }
.danger-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }
.full-width { width: 100%; }
.compact-button { min-height: 36px; padding: 0.5rem 0.8rem; font-size: 0.76rem; }

/* Les actions ouvrant un formulaire partagent le même bouton et le même panneau. */
.action-disclosure { max-width: 760px; margin-top: 1rem; }
.action-disclosure > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; min-height: 48px; padding: .85rem 1rem;
  text-align: left; line-height: 1.5; list-style: none; cursor: pointer;
}
.action-disclosure > summary::-webkit-details-marker { display: none; }
.action-disclosure > summary::after {
  content: ""; flex: 0 0 .55rem; width: .55rem; height: .55rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.action-disclosure[open] > summary { background: var(--mint); border-radius: 9px 9px 0 0; }
.action-disclosure[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.action-disclosure > form {
  margin-top: 0; padding: clamp(.75rem, 2vw, 1.25rem);
  background: var(--surface-subtle); border: 1px solid var(--forest); border-top: 0;
  border-radius: 0 0 9px 9px;
}
.action-disclosure > form > .form-message:empty { display: none; }

/* Pictogrammes décoratifs du socle : les libellés restent les noms accessibles. */
#work-queue-button { --mbdd-icon-url: url("./mbdd/icons/inbox.svg"); }
#dossiers-nav { --mbdd-icon-url: url("./mbdd/icons/folder.svg"); }
#configuration-nav { --mbdd-icon-url: url("./mbdd/icons/sliders.svg"); }
#support-nav, #support-contact-button { --mbdd-icon-url: url("./mbdd/icons/message.svg"); }
#administration-nav { --mbdd-icon-url: url("./mbdd/icons/settings.svg"); }
#upload-button { --mbdd-icon-url: url("./mbdd/icons/upload.svg"); }
#login-button, .portal-tabs [data-pane="summary"] { --mbdd-icon-url: url("./mbdd/icons/checks.svg"); }
.portal-tabs [data-pane="deliveries"] { --mbdd-icon-url: url("./mbdd/icons/files.svg"); }
.portal-tabs [data-pane="requests"] { --mbdd-icon-url: url("./mbdd/icons/message.svg"); }
.portal-tabs [data-pane="history"] { --mbdd-icon-url: url("./mbdd/icons/history.svg"); }
.portal-tabs [data-pane="information"] { --mbdd-icon-url: url("./mbdd/icons/info.svg"); }
:is(#work-queue-button, #dossiers-nav, #configuration-nav, #administration-nav, #support-nav, #support-contact-button, #upload-button, #login-button, .portal-tabs [data-pane])::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -3px;
  background-color: currentColor;
  -webkit-mask: var(--mbdd-icon-url) center / contain no-repeat;
  mask: var(--mbdd-icon-url) center / contain no-repeat;
}
@media (forced-colors: active) {
  :is(#work-queue-button, #dossiers-nav, #configuration-nav, #administration-nav, #support-nav, #support-contact-button, #upload-button, #login-button, .portal-tabs [data-pane])::before {
    background-color: ButtonText;
    forced-color-adjust: none;
  }
}

.sidebar-section { display: flex; min-height: 0; flex: 1; flex-direction: column; margin-top: 14px; }
.section-caption { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 0.68rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 1.2rem;
}
.icon-button:hover { color: var(--forest); background: var(--mint); }
.case-filters { display: grid; gap: 0.45rem; margin-top: 0.75rem; }
.case-filters > div { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 0.4rem; }
.case-filters input, .case-filters select {
  min-width: 0; width: 100%; min-height: 34px; padding: 0.45rem 0.55rem; color: var(--ink); background: white;
  border: 1px solid var(--line); border-radius: var(--mbdd-radius-control); font-size: 0.7rem;
}
.case-filters input::placeholder { color: var(--muted); }
.case-filters select option { color: var(--ink); background: white; }
.case-list { overflow-y: auto; margin: 0.65rem -0.4rem 0; padding: 0 0.4rem; }
.case-pagination { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.45rem; margin-top: 0.45rem; }
.case-pagination span { color: var(--muted); text-align: center; font-size: 0.66rem; }
.case-pagination button { width: 30px; height: 28px; color: var(--forest); background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 7px; }
.case-pagination button:disabled { cursor: not-allowed; opacity: 0.35; }
.case-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  margin-bottom: 0.35rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
}
.case-item-row:hover { background: var(--surface-subtle); }
.case-item-row.active { background: var(--product-accent-soft); border-color: color-mix(in srgb, var(--product-accent) 36%, var(--line)); }
.case-item-row:focus-within { border-color: color-mix(in srgb, var(--product-accent) 55%, var(--line)); }
.case-item {
  min-width: 0;
  width: 100%;
  padding: 0.75rem 0.2rem 0.75rem 0.8rem;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px 0 0 8px;
}
.case-item strong, .case-item span { display: block; }
.case-item strong { overflow: hidden; font-size: 0.88rem; text-overflow: ellipsis; white-space: nowrap; }
.case-item span { margin-top: 0.25rem; color: var(--muted); font-size: 0.72rem; }
.case-actions-toggle {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}
.case-actions-toggle:hover, .case-actions-toggle[aria-expanded="true"] { color: var(--forest); background: white; }
.case-actions-menu {
  position: fixed;
  z-index: 70;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 16px));
  padding: 0.35rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(20, 50, 42, 0.18);
}
.case-actions-menu[hidden] { display: none; }
.case-actions-menu button, .case-actions-menu a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0.55rem 0.7rem;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
}
.case-actions-menu button:hover, .case-actions-menu button:focus-visible,
.case-actions-menu a:hover, .case-actions-menu a:focus-visible { background: var(--surface-subtle); }
.case-actions-menu [role="separator"] { height: 1px; margin: 0.3rem 0.4rem; background: var(--line); }
.case-actions-menu .case-action-danger { color: #8d2929; }
.case-actions-menu .case-action-danger:hover, .case-actions-menu .case-action-danger:focus-visible { background: #fff0ef; }
.case-actions-menu button:disabled, .case-actions-menu a[aria-disabled="true"] { cursor: wait; opacity: 0.55; }
.case-list-empty { color: var(--muted); font-size: 0.82rem; line-height: 1.45; }

.status-dot { width: 8px; height: 8px; margin-top: 0.3rem; background: var(--forest); border-radius: 50%; box-shadow: 0 0 0 4px var(--mint); }

.main-content { grid-area: main; min-width: 0; padding: 12px; }
.topbar {
  --topbar-control-height: 34px;
  position: sticky;
  z-index: 40;
  top: 0;
  grid-area: header;
  display: grid;
  grid-template-areas: "brand heading actions meta";
  grid-template-columns: 190px minmax(190px, 1fr) minmax(320px, auto) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: var(--app-header-height);
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 94%, transparent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(160%) blur(22px);
}
.topbar::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--forest) 0 24%, var(--mbdd-color-brand-signature) 24% 27%, var(--lime) 27% 100%);
  content: "";
}
.topbar-brand { grid-area: brand; display: flex; align-items: center; min-width: 0; }
.topbar-brand .mbdd-brand-lockup { width: min(100%, 178px); height: auto; max-height: 40px; }
.topbar-heading { grid-area: heading; min-width: 0; }
.topbar h1 {
  margin: 2px 0 0;
  overflow: hidden;
  font-family: var(--mbdd-font-family-display);
  font-size: clamp(1rem, 1.55vw, 1.35rem);
  font-weight: 680;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-meta { grid-area: meta; display: flex; align-items: center; justify-content: flex-end; min-width: 0; gap: 8px; }
.topbar-session { display: flex; align-items: center; justify-content: flex-end; min-width: 0; gap: 5px; }
.topbar-tools {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent);
  border-radius: var(--mbdd-radius-card);
  background: color-mix(in srgb, var(--mbdd-color-text-muted) 11%, transparent);
  scrollbar-width: none;
}
.topbar-actions:not(:has(button:not([hidden]))) { display: none; }
.topbar-actions::-webkit-scrollbar { display: none; }
.topbar-actions .compact-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  min-height: 32px;
  height: 32px;
  padding: 5px 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  box-shadow: none;
  font-size: 0.68rem;
  font-weight: 680;
  line-height: 1.2;
  white-space: nowrap;
}
.topbar-actions .compact-button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.5); transform: none; }
.tenant-selector { display: grid; gap: 2px; color: var(--muted); font-size: 0.58rem; font-weight: 700; }
.tenant-selector select { width: clamp(145px, 12vw, 190px); min-height: var(--topbar-control-height); padding: 5px 26px 5px 9px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 10px; font-size: 0.68rem; }
.security-badge, .format-badge { padding: 0.42rem 0.62rem; color: var(--forest); background: var(--mint); border-radius: 999px; font-size: 0.72rem; font-weight: 750; }
.account-badge { display: flex; align-items: center; min-height: var(--topbar-control-height); min-width: 0; gap: 5px; padding: 5px 9px; color: var(--forest); background: var(--mint); border-radius: 999px; font-size: 0.66rem; }
.account-badge span { color: #16835a; font-size: 0.55rem; }
.account-badge strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-button { display: inline-flex; align-items: center; justify-content: center; min-height: var(--topbar-control-height); padding: 5px 9px; color: var(--forest); background: transparent; border: 1px solid var(--line); border-radius: var(--mbdd-radius-control); font-size: 0.64rem; font-weight: 700; line-height: 1.15; text-align: center; }
.logout-button:hover { background: white; }
.personal-export-link { white-space: nowrap; text-decoration: none; }
.topbar-session .muted { display: none; }
.muted { color: var(--muted); font-size: 0.76rem; }
.eyebrow { margin: 0; color: var(--product-accent); font-size: 0.62rem; font-weight: 780; letter-spacing: 0.1em; text-transform: uppercase; }

.workspace, .empty-state { width: 100%; max-width: none; margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--mbdd-radius-card); box-shadow: var(--shadow-card); }
.empty-state { display: grid; align-content: center; justify-items: center; min-height: min(62vh, 490px); padding: clamp(2.5rem, 6vw, 5rem) 2rem; text-align: center; }
.empty-state h2 { margin: 1.3rem 0 0.55rem; font-family: var(--mbdd-font-family-display); font-size: 1.65rem; font-weight: 640; letter-spacing: -0.025em; }
.empty-state p { max-width: 580px; margin: 0 0 1.2rem; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.application-status progress { width: min(280px, 70%); height: 7px; accent-color: var(--forest); }
.application-status.failed progress { display: none; }
.application-status.failed { border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.application-status-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.65rem; }
.application-status-actions .secondary-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.application-status noscript { margin-top: 1rem; color: var(--red); font-size: 0.82rem; }
.empty-illustration { display: flex; gap: 0.65rem; }
.empty-illustration span { display: grid; place-items: center; width: 56px; height: 68px; color: var(--forest); background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 5px 14px 5px 5px; font-size: 0.68rem; font-weight: 800; }
.empty-illustration span:nth-child(2) { transform: translateY(-9px); background: var(--mint); }

.overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.metric-card { padding: 0.85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--mbdd-radius-card); }
.metric-card > span, .metric-card small { display: block; color: var(--muted); }
.metric-card > span { font-size: 0.75rem; font-weight: 650; }
.metric-card strong { display: block; margin: 0.25rem 0 0.1rem; font-family: var(--mbdd-font-family-display); font-size: 1.45rem; font-weight: 620; font-variant-numeric: tabular-nums; }
.metric-card small { font-size: 0.68rem; }
.metric-card.accent { color: var(--ink); background: var(--product-accent-soft); border-color: color-mix(in srgb, var(--product-accent) 28%, var(--line)); }
.metric-card.accent > span, .metric-card.accent small { color: var(--muted); }
.metric-card.accent strong { color: var(--product-accent); font-family: inherit; font-size: 1rem; font-weight: 800; }

.journey-guidance { margin-bottom: 12px; padding: 0.9rem 1rem; border-left: 3px solid var(--product-accent); }
.journey-guidance-layout { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem 1.5rem; }
.journey-guidance-copy { min-width: 0; }
.journey-guidance-copy h2 { margin: 0.2rem 0 0.35rem; font-family: var(--mbdd-font-family-display); font-size: 1.2rem; font-weight: 650; }
.journey-guidance-copy > p:last-child { max-width: 820px; margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.55; }
.journey-guidance-action { min-width: 190px; }
.journey-steps { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; margin: 0; padding: 0; list-style: none; counter-reset: journey; }
.journey-steps li { position: relative; min-width: 0; padding: 0.58rem 0.65rem 0.58rem 2.15rem; color: var(--muted); background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 8px; font-size: 0.7rem; font-weight: 750; }
.journey-steps li::before { position: absolute; left: 0.65rem; top: 50%; display: grid; width: 1.1rem; height: 1.1rem; place-items: center; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 50%; content: counter(journey); counter-increment: journey; font-size: 0.62rem; transform: translateY(-50%); }
.journey-steps li.completed { color: var(--forest); background: var(--mint); border-color: #b9d9c9; }
.journey-steps li.completed::before { color: white; background: var(--forest); border-color: var(--forest); content: "✓"; }
.journey-steps li.current { color: var(--ink); background: #fff9ea; border-color: #e1c77b; }
.journey-steps li.current::before { color: var(--ink); background: var(--lime); border-color: #9fbd58; }

.content-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.primary-column { grid-column: span 3; }
.secondary-column { grid-column: span 1; }
.primary-column, .secondary-column { display: grid; align-content: start; min-width: 0; gap: 12px; }
.upload-panel, .deliveries-panel, .case-card, .capability-card { padding: 1rem; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-heading h2, .case-card h2 { margin: 0.2rem 0 0; font-size: 1.1rem; }
.secondary-deposit-options { margin: -0.25rem 0 0.8rem; padding: 0.55rem 0.65rem; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 8px; }
.secondary-deposit-options > summary { color: var(--forest); cursor: pointer; font-size: 0.7rem; font-weight: 750; }
.secondary-deposit-options > label { display: grid; gap: 0.35rem; margin-top: 0.65rem; color: var(--muted); font-size: 0.7rem; font-weight: 700; }
.secondary-deposit-options select { width: 100%; padding: 0.65rem 0.75rem; color: var(--ink); background: white; border: 1px solid #8fa399; border-radius: 8px; }
.drop-zone { display: grid; justify-items: center; padding: 1.4rem 1rem; color: var(--muted); text-align: center; background: var(--surface-subtle); border: 1px dashed color-mix(in srgb, var(--forest) 35%, var(--line)); border-radius: var(--mbdd-radius-card); transition: background 120ms ease, border-color 120ms ease; }
.upload-requirements { margin: -0.2rem 0 0.8rem; padding: 0.65rem 0.75rem; color: var(--ink); background: #f3f8f5; border-left: 3px solid var(--forest); border-radius: 7px; font-size: 0.72rem; line-height: 1.45; }
.upload-requirements:empty { display: none; }
.drop-zone:hover, .drop-zone.dragging { background: #edf7f1; border-color: var(--forest); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { margin: 0.55rem 0 0.25rem; color: var(--ink); font-size: 0.9rem; }
.drop-zone > span:not(.drop-icon):not(.selected-file) { font-size: 0.73rem; }
.drop-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--forest); background: var(--mint); border-radius: 50%; font-size: 1.3rem; font-weight: 900; }
.selected-file { margin-top: 0.75rem; max-width: 100%; overflow-wrap: anywhere; color: var(--forest); font-size: 0.8rem; font-weight: 800; }
.upload-metadata-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; margin-top: 1rem; }
.upload-metadata-grid label, .upload-target-label, .revision-intake label { display: grid; gap: 0.35rem; color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.upload-metadata-grid input, .upload-metadata-grid textarea, #upload-deliverable, .revision-intake select, .revision-intake textarea { width: 100%; min-width: 0; min-height: 44px; padding: 0.72rem 0.8rem; color: var(--ink); background: white; border: 1px solid #8fa399; border-radius: 8px; font: inherit; font-size: 0.85rem; font-weight: 400; }
.upload-metadata-grid textarea, .revision-intake textarea { min-height: 88px; resize: vertical; }
.upload-metadata-grid input:focus-visible, .upload-metadata-grid textarea:focus-visible, #upload-deliverable:focus-visible, .revision-intake select:focus-visible, .revision-intake textarea:focus-visible { border-color: var(--forest); outline: 3px solid var(--mbdd-color-focus); outline-offset: 2px; }
.upload-metadata-grid .full-grid-field { grid-column: 1 / -1; }
.upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.active-upload-list { display: grid; gap: 0.55rem; margin-top: 0.8rem; }
.active-upload-item { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.65rem 0.75rem; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 8px; }
.active-upload-item span { color: var(--muted); font-size: 0.7rem; }
.form-message { min-height: 1.2em; margin: 0; color: var(--red); font-size: 0.78rem; }
.back-button { display:inline-flex; align-items:center; justify-content:center; gap:.65em; }
.back-button::before { content:""; width:.45em; height:.45em; flex:0 0 .45em; border:solid currentColor; border-width:0 0 2px 2px; transform:rotate(45deg); }
#invitation-create-message:not(:empty) { padding:.85rem 1rem; border:1px solid var(--line); border-radius:8px; line-height:1.6; background:var(--state-soft, var(--surface-subtle)); }
#invitation-create-message:empty { display:none; }
.field-label { display: inline-flex; align-items: center; gap: 0.35rem; }
.help-button { display: inline-grid; flex: 0 0 auto; width: 1.5rem; height: 1.5rem; padding: 0; place-items: center; color: var(--forest); background: var(--mint); border: 1px solid #bad7c8; border-radius: 50%; font-size: 0.68rem; font-weight: 900; line-height: 1; }
.help-button:hover { color: white; background: var(--forest); }
.help-button:focus-visible { outline: 3px solid var(--mbdd-color-focus); outline-offset: 2px; }
.help-tooltip { display: block; margin-top: 0.4rem; padding: 0.7rem; color: var(--ink); background: var(--mint); border-left: 3px solid var(--forest); border-radius: 6px; font-size: 0.75rem; font-weight: 400; line-height: 1.5; }
.required-indicator { position: absolute; top: 0; right: 0; color: var(--red); font-weight: 900; }
label:has(> .required-indicator) { position: relative; }
.field-error { display: block; color: #8a2d2d; font-size: 0.7rem; font-weight: 650; line-height: 1.4; }
input.is-invalid, select.is-invalid, textarea.is-invalid, .drop-zone:has(input.is-invalid) { border-color: #b33b3b !important; box-shadow: 0 0 0 3px rgba(179, 59, 59, 0.12) !important; }
.form-error-summary { margin: 0 0 1rem; padding: 0.8rem 0.9rem; color: #702525; background: #fff1f1; border: 1px solid #e5b7b7; border-left: 4px solid #b33b3b; border-radius: 8px; }
.form-error-summary:focus { outline: 3px solid var(--mbdd-color-focus); outline-offset: 2px; }
.form-error-summary strong { display: block; font-size: 0.78rem; }
.form-error-summary ul { display: grid; gap: 0.2rem; margin: 0.45rem 0 0; padding-left: 1.1rem; }
.form-error-summary button { padding: 0; color: #702525; text-align: left; background: none; border: 0; font-size: 0.72rem; text-decoration: underline; }
.form-instructions { margin: -0.45rem 0 1rem; color: var(--muted); font-size: 0.72rem; line-height: 1.45; }
.result-scope { margin: 0.8rem 0 1rem; padding: 0.8rem 0.9rem; color: var(--ink); background: var(--mbdd-color-state-not-evaluable-soft); border-left: 4px solid var(--mbdd-color-state-not-evaluable); border-radius: 8px; font-size: 0.78rem; line-height: 1.5; }

.delivery-list { display: grid; gap: 0.65rem; }
.delivery-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: 0.9rem 1rem; background: var(--surface-subtle); border: 1px solid transparent; border-radius: 10px; }
.delivery-row:hover { border-color: var(--line); }
.delivery-file { display: flex; align-items: center; min-width: 0; gap: 0.8rem; }
.delivery-file > div { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.file-mark { display: grid; flex: 0 0 40px; place-items: center; height: 46px; color: var(--forest); background: var(--mint); border-radius: 7px; font-size: 0.67rem; font-weight: 900; }
.delivery-file strong, .delivery-file span { display: block; }
.delivery-file strong { font-size: 0.84rem; overflow-wrap: anywhere; }
.delivery-file span { margin-top: 0.22rem; color: var(--muted); font-size: 0.7rem; }
.delivery-control-details { width: fit-content; max-width: 100%; margin-top: 0.4rem; color: var(--muted); font-size: 0.65rem; }
.delivery-control-details summary { color: var(--forest); cursor: pointer; font-weight: 750; }
.delivery-control-details span, .delivery-control-details code { display: block; margin-top: 0.3rem; overflow-wrap: anywhere; }
.delivery-control-details code { color: var(--muted); font-size: 0.61rem; }
.delivery-reference-analyses { grid-column: 1 / -1; width: 100%; font-size: 0.875rem; line-height: 1.5; }
.delivery-reference-analyses fieldset { min-width: 0; margin: 0.75rem 0; }
.delivery-reference-analyses label { display: flex; gap: 0.5rem; align-items: start; margin: 0.5rem 0; flex-wrap: wrap; }
.delivery-reference-analyses input[type="checkbox"] { width: auto; flex: none; }
.delivery-actions { display: flex; align-items: center; flex-wrap: wrap; min-width: 0; gap: 0.65rem; }
.delivery-list { container-type: inline-size; }
.delivery-next-step { min-width: 0; overflow-wrap: anywhere; }
@container (max-width: 850px) {
  .delivery-row { grid-template-columns: minmax(0, 1fr); }
  .delivery-actions { justify-content: flex-start; }
}
.result-button { padding: 0.42rem 0.65rem; color: var(--forest); background: white; border: 1px solid var(--line); border-radius: 7px; font-size: 0.72rem; font-weight: 800; }
.progress-track { width: 86px; height: 5px; overflow: hidden; appearance: none; background: #cfdad4; border: 0; border-radius: 99px; }
.progress-track::-webkit-progress-bar { background: #cfdad4; border-radius: 99px; }
.progress-track::-webkit-progress-value { background: var(--blue); border-radius: 99px; transition: width 300ms ease; }
.progress-track::-moz-progress-bar { background: var(--blue); border-radius: 99px; }

.case-card h2 { margin-bottom: 1rem; font-family: var(--mbdd-font-family-display); font-size: 1.45rem; font-weight: 620; }
.case-card dl { margin: 0; }
#case-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.case-card dl div { padding: 0.65rem 0; border-top: 1px solid var(--line); }
.case-card dt { color: var(--muted); font-size: 0.68rem; }
.case-card dd { overflow-wrap: anywhere; margin: 0.2rem 0 0; font-size: 0.78rem; font-weight: 700; }
.case-control-details { margin-top: 0.5rem; padding: 0.65rem 0.75rem; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 8px; }
.case-control-details > summary { color: var(--forest); cursor: pointer; font-size: 0.7rem; font-weight: 750; }
.case-control-details dl { margin-top: 0.55rem; }
.case-control-details code { color: var(--muted); font-size: 0.65rem; font-weight: 500; }
.new-user-form { padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.user-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.case-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.8rem; }
.rules-dialog { width: min(960px, calc(100vw - 2rem)); }
.rule-profile-form { padding: 1rem 0 1.3rem; border-bottom: 1px solid var(--line); }
.code-editor { min-height: 230px; font: 0.76rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; }
.compact-code-editor { min-height: 140px; }
.import-field input { padding: 0.6rem; background: var(--surface-subtle); border: 1px dashed var(--line); border-radius: 8px; }
.rule-profile-list { display: grid; gap: 0.7rem; max-height: 360px; overflow: auto; }
.rule-profile-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: 0.85rem 1rem; background: var(--surface-subtle); border-radius: 10px; }
.rule-profile-card strong, .rule-profile-card span, .rule-profile-card small { display: block; }
.rule-profile-card span { margin-top: 0.2rem; color: var(--muted); font-size: 0.72rem; }
.rule-profile-card small { margin-top: 0.35rem; color: var(--muted); font-size: 0.65rem; line-height: 1.4; }
.rule-profile-card .pack-traceability-warning { color: #805113; }
.rule-profile-actions { display: flex; gap: 0.45rem; }
#ogc-access-profile-details { margin: 1rem 0; }
#ogc-access-profile-list { margin-top: 0.8rem; }
.map-catalog-heading, .map-catalog-bulk { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.map-catalog-heading { justify-content: space-between; margin-bottom: 0.75rem; }
.map-catalog-heading h3 { margin: 0; }
.map-catalog-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr); gap: 1rem; }
.map-catalog-bulk { margin: 0.75rem 0; }
.map-catalog-bulk .field-hint { flex: 1 1 240px; }
#map-layer-list { max-height: min(55vh, 620px); }
#map-layer-catalog-message:empty { display: none; }
#map-layer-catalog-message.error-message { color: var(--red); }
.map-reference-unavailable { padding: 0.75rem; margin-bottom: 0.75rem; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 8px; }
.map-layer-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.65rem; }
.map-layer-card .map-layer-selection { display: flex; align-items: center; gap: 0.5rem; margin: 0; cursor: pointer; font-size: 0.78rem; white-space: nowrap; }
.map-layer-card .map-layer-selection input { flex: 0 0 1.15rem; width: 1.15rem; height: 1.15rem; margin: 0; padding: 0; accent-color: var(--forest); }
.map-layer-selection-message { grid-column: 1 / -1; margin: 0; color: var(--forest); font-size: 0.75rem; }
.map-layer-selection-message:empty { display: none; }
.map-layer-selection-message.error-message { color: var(--red); }
@media (max-width: 600px) {
  .map-catalog-filters { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .map-layer-card { grid-template-columns: minmax(0, 1fr); }
  .map-layer-actions { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
}

.dialog.atelier-dialog {
  width: min(1280px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 1.25rem;
  overflow: hidden;
}
.dialog.atelier-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(900px, calc(100vh - 2rem));
  height: min(900px, calc(100dvh - 2rem));
}
.atelier-dialog .dialog-heading { margin-bottom: 1rem; }
.atelier-introduction { margin: 0.4rem 0 0; max-width: 760px; }
.atelier-shell { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); min-height: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.atelier-main { display: flex; min-width: 0; min-height: 0; overflow: hidden; background: white; flex-direction: column; }
.atelier-catalog { position: absolute; z-index: 4; inset: 0 0 0 auto; width: min(390px, 100%); min-width: 0; min-height: 0; padding: 1rem; background: var(--surface-subtle); border-left: 1px solid var(--line); box-shadow: -18px 0 42px rgba(13, 43, 34, 0.16); overflow: auto; }
.atelier-catalog[hidden] { display: none; }
.atelier-catalog .rule-profile-list { max-height: none; overflow: visible; }
.atelier-catalog .rule-profile-card { grid-template-columns: 1fr; padding: 0.8rem; background: white; border: 1px solid var(--line); }
.atelier-catalog .rule-profile-actions { flex-wrap: wrap; justify-content: flex-start; }
.catalog-heading { position: sticky; z-index: 1; top: -1rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin: -1rem -1rem 0.85rem; padding: 1rem; background: var(--surface-subtle); border-bottom: 1px solid var(--line); }
.catalog-heading p { margin: 0; }
.catalog-heading h3 { margin: 0.2rem 0 0; font-size: 1rem; }
.atelier-toolbar { display: flex; flex: none; align-items: center; flex-wrap: wrap; gap: 0.55rem 0.7rem; min-height: 3.3rem; padding: 0.6rem 1rem; border-bottom: 1px solid var(--line); }
.bundle-toolbar { flex-wrap: wrap; }
.organization-readiness-panel { display: grid; gap: 0.7rem; margin: 0 0 1rem; padding: 0.85rem; background: #f7faf8; border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 10px; }
.organization-readiness-panel.ready { border-left-color: #16835a; background: #f2faf6; }
.organization-readiness-panel.blocked { border-left-color: var(--red); background: #fff7f7; }
.organization-readiness-summary-heading { display: grid; gap: 0.5rem; }
.organization-readiness-panel h3 { margin: 0; font-size: 0.88rem; }
.organization-readiness-panel p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.45; }
.organization-readiness-panel details { border-top: 1px solid var(--line); }
.organization-readiness-panel summary { padding: 0.7rem 0 0; color: var(--forest); cursor: pointer; font-size: 0.7rem; font-weight: 800; line-height: 1.4; }
.organization-readiness-issue-list { display: grid; gap: 0.55rem; margin-top: 0.7rem; }
.organization-readiness-issue { padding: 0.65rem; background: white; border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 8px; }
.organization-readiness-issue.blocking { border-left-color: var(--red); }
.organization-readiness-issue strong, .organization-readiness-issue small { display: block; }
.organization-readiness-issue strong { font-size: 0.7rem; line-height: 1.4; }
.organization-readiness-issue small { margin-top: 0.25rem; color: var(--muted); font-size: 0.62rem; line-height: 1.4; }
.organization-readiness-issue p { margin-top: 0.4rem; font-size: 0.66rem; }
.organization-environment-gates { margin-top: 0.7rem; }
.organization-readiness-panel .organization-environment-gates ul { margin: 0.6rem 0 0; padding-left: 1.05rem; color: var(--muted); font-size: 0.64rem; line-height: 1.5; }
.atelier-safety { margin-left: auto; color: var(--muted); font-size: 0.68rem; }
.versions-toggle { white-space: nowrap; }
.file-action { display: inline-flex !important; align-items: center; width: auto; margin: 0 !important; padding: 0.5rem 0.72rem; color: var(--forest) !important; background: var(--mint); border: 1px solid #c5ded0; border-radius: 8px; cursor: pointer; }
.atelier-dialog .file-action input { position: absolute; width: 1px !important; height: 1px; padding: 0 !important; opacity: 0; pointer-events: none; }
.atelier-stepper { display: grid; grid-template-columns: repeat(6, 1fr); padding: 0 1rem; background: #fbfdfb; border-bottom: 1px solid var(--line); }
.atelier-stepper.pack-stepper { grid-template-columns: repeat(4, 1fr); }
.atelier-stepper button { display: flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 3.3rem; padding: 0.45rem; color: var(--muted); background: transparent; border: 0; border-bottom: 3px solid transparent; cursor: pointer; font-size: 0.72rem; font-weight: 750; }
.atelier-stepper button span { display: grid; width: 1.45rem; height: 1.45rem; place-items: center; background: #e9efeb; border-radius: 50%; font-size: 0.65rem; }
.atelier-stepper button.active { color: var(--forest); border-bottom-color: var(--lime); }
.atelier-stepper button.active span { color: white; background: var(--forest); }
.atelier-stepper button small { display: none; min-width: 1.25rem; padding: 0.12rem 0.35rem; color: white; background: var(--red); border-radius: 999px; font-size: 0.6rem; font-weight: 900; }
.atelier-stepper button.has-blockers small { display: inline-block; }
.atelier-stepper button.has-blockers:not(.active) { color: #8a2c2c; }
.profile-save-status { margin-left: auto; padding: 0.3rem 0.5rem; color: var(--muted); background: var(--surface-subtle); border-radius: 999px; font-size: 0.65rem; font-weight: 750; }
.profile-save-status.dirty { color: #805113; background: #fff1d2; }
.profile-save-status.saved { color: #0d6243; background: #e5f6ec; }
.profile-readiness-overview { display: grid; gap: 0.55rem; padding: 0.75rem 1rem; background: #fffaf0; border-bottom: 1px solid #ead8b5; }
.readiness-overview-summary, .readiness-stale-banner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.readiness-overview-summary strong, .readiness-overview-summary span, .readiness-stale-banner strong, .readiness-stale-banner span { font-size: 0.68rem; }
.readiness-overview-summary span, .readiness-stale-banner span { color: var(--muted); }
.readiness-stale-banner { padding: 0.55rem 0.65rem; color: #805113; background: #fff1d2; border-left: 4px solid var(--amber); border-radius: 7px; }
.readiness-overview-actions { display: grid; gap: 0.35rem; }
.readiness-return { justify-self: start; }
.profile-action-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; padding: 0.6rem 0.7rem; background: #fff9ef; border-left: 4px solid var(--amber); border-radius: 8px; }
.profile-action-card.blocker { background: #fff5f5; border-left-color: var(--red); }
.profile-action-card strong, .profile-action-card span { display: block; font-size: 0.67rem; line-height: 1.4; }
.profile-action-card span { margin-top: 0.12rem; color: var(--muted); }
.readiness-focus { outline: 3px solid var(--amber) !important; outline-offset: 4px; transition: outline-color 220ms ease; }
.atelier-form { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; overflow: hidden; flex: 1; }
.atelier-step { padding: 1.15rem 1.25rem 1.5rem; overflow: auto; }
.atelier-step[hidden] { display: none; }
.step-heading { margin-bottom: 1.1rem; }
.step-heading h3 { margin: 0.2rem 0 0; font-family: var(--mbdd-font-family-display); font-size: 1.35rem; font-weight: 620; }
.step-heading p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.75rem; line-height: 1.5; }
.step-kicker { color: var(--forest); font-size: 0.64rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.atelier-footer { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; padding: 0.75rem 1rem; background: white; border-top: 1px solid var(--line); box-shadow: 0 -8px 22px rgba(13, 43, 34, 0.04); }
.atelier-footer .form-message { flex: 1; }
.atelier-footer-actions, .inline-actions { display: flex; justify-content: flex-end; gap: 0.55rem; }
.atelier-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 1rem 0 0.65rem; }
.atelier-section-heading.compact { margin-top: 0.7rem; }
.atelier-section-heading h4, .delivery-builder-section h4 { margin: 0; font-size: 0.82rem; }
.atelier-section-heading p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.68rem; }
.editable-list { display: grid; gap: 0.55rem; }
.editable-row { display: grid; align-items: end; gap: 0.55rem; padding: 0.65rem; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 10px; }
.mapping-row { grid-template-columns: minmax(150px, 1.15fr) minmax(210px, 1.55fr) minmax(125px, 0.9fr) minmax(120px, 0.8fr) minmax(115px, 0.75fr) auto auto; }
.mapping-decision-details { grid-column: 1 / -1; margin-top: 0.15rem; padding-top: 0.55rem; border-top: 1px solid var(--line); }
.mapping-decision-details summary { color: var(--forest); cursor: pointer; font-size: 0.67rem; font-weight: 800; }
.mapping-decision-grid { display: grid; grid-template-columns: minmax(220px, 0.75fr) minmax(320px, 1.5fr); gap: 0.6rem; margin-top: 0.6rem; }
.mapping-source-editor { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 0.4rem; }
.mapping-source-editor select, .mapping-source-editor input { min-width: 0; }
.mapping-source-editor:has(> input[hidden]) { grid-template-columns: minmax(0, 1fr); }
.mapping-technical-details { min-width: 0; }
.literal-source-picker { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 8px; padding: .6rem; }
.literal-source-picker > input, .literal-source-picker > select { margin-top: .6rem; max-width: 450px; }
.literal-source-options { display: grid; gap: .5rem; max-height: 340px; overflow: auto; }
.dialog .literal-source-option { display: flex; align-items: start; gap: .45rem; font-size: .75rem; padding: .3rem; }
.dialog .literal-source-option input { flex: 0 0 1.1rem; width: 1.1rem; height: 1.1rem; padding: 0; margin-top: .1rem; }
.literal-source-option span { min-width: 0; overflow-wrap: anywhere; }
.observed-value-choice { display: grid; gap: .4rem; }
.observed-symbol-picker { margin-top: .5rem; }
.observed-symbol-picker .inline-checks { max-height: 240px; overflow: auto; margin-top: .5rem; }
.charter-requirements-summary { overflow-x: auto; }
.charter-requirements-table { width: 100%; border-collapse: collapse; font-size: .75rem; }
.charter-requirements-table th, .charter-requirements-table td { text-align: left; vertical-align: top; padding: .6rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.charter-requirements-table td:last-child { min-width: 145px; }
.charter-requirements-table button { margin: 0 .2rem .3rem 0; }
@media (max-width: 760px) {
  .charter-requirements-table, .charter-requirements-table tbody { display: block; }
  .charter-requirements-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .charter-requirements-table tr { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: .75rem; padding: .5rem; border: 1px solid var(--line); border-radius: 8px; }
  .charter-requirements-table td { display: grid; gap: .2rem; border: 0; padding: .35rem; min-width: 0; }
  .charter-requirements-table td::before { content: attr(data-label); font-size: .65rem; font-weight: 750; color: var(--muted); }
  .charter-requirements-table td:last-child { display: flex; flex-wrap: wrap; gap: .25rem; min-width: 0; }
  .charter-requirements-table td:last-child::before { width: 100%; }
}
.profile-trial-filter { display: grid; gap: .4rem; margin: .8rem 0; max-width: 550px; }
.mapping-source-observation { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.35rem 0.6rem; padding: 0.5rem 0.6rem; color: #805113; background: #fff8ec; border-left: 3px solid var(--amber); border-radius: 7px; }
.mapping-source-observation strong, .mapping-source-observation span { font-size: 0.63rem; line-height: 1.4; }
.mapping-source-observation span { color: var(--muted); }
.mapping-source-observation.found { color: #0d6243; background: #edf9f2; border-left-color: #16835a; }
.mapping-source-observation.missing { color: #8a2c2c; background: #fff3f3; border-left-color: var(--red); }
.mapping-source-details { grid-column: 1 / -1; padding: 0.45rem 0.6rem; background: var(--surface-subtle); border-radius: 7px; }
.mapping-source-details summary, .proposal-source-details summary { cursor: pointer; color: var(--forest); font-size: 0.66rem; font-weight: 800; }
.proposal-source-list { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.55rem 0 0; padding: 0; list-style: none; }
.proposal-source-list li { padding: 0.25rem 0.42rem; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.6rem; overflow-wrap: anywhere; }
.proposal-source-list .mapping-source-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.mapping-source-remove { padding: 0; color: #8a2c2c; background: transparent; border: 0; font: inherit; font-weight: 800; cursor: pointer; }
.mapping-source-remove:hover { text-decoration: underline; }
.mapping-split-button { margin-top: 0.55rem; }
.control-origin-badge { display: inline-flex; width: fit-content; margin-top: 0.25rem; padding: 0.18rem 0.4rem; color: var(--forest); background: var(--mint); border-radius: 999px; font-size: 0.6rem; font-weight: 800; }
.control-origin-badge.reference_observation, .control-origin-badge.hypothesis_to_confirm { color: #805113; background: #fff1d2; }
.control-observation-source { display: block; margin-top: 0.22rem; color: var(--muted); font-size: 0.62rem; }
.readable-mapping-decision { display: block; margin-top: 0.3rem; color: var(--muted); line-height: 1.45; }
.pair-row { grid-template-columns: minmax(180px, 1fr) minmax(180px, 1.25fr) auto; }
.atelier-dialog .editable-row label { margin: 0; }
.editable-row .toggle-label { align-self: center; min-width: 82px; padding-bottom: 0.65rem; }
.empty-editor-state { padding: 1rem; color: var(--muted); background: #fbfdfb; border: 1px dashed #b9c9c0; border-radius: 10px; text-align: center; font-size: 0.72rem; }
.atelier-details { margin-top: 1rem; border: 1px solid var(--line); border-radius: 11px; background: white; }
.atelier-details > summary { padding: 0.8rem 0.9rem; color: var(--forest); cursor: pointer; font-size: 0.75rem; font-weight: 800; }
.atelier-details .details-content { padding: 0 0.9rem 0.9rem; border-top: 1px solid var(--line); }
.advanced-details { background: #fbfdfb; }
.advanced-details .code-editor { width: 100%; margin-top: 0.7rem; }
.rule-workbench { display: flex; flex-direction: column; gap: 1rem; }
.rule-catalog-panel { order: -1; position: static; padding: 0; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 11px; }
.rule-catalog-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem; color: var(--forest); cursor: pointer; list-style: none; }
.rule-catalog-panel > summary::-webkit-details-marker { display: none; }
.rule-catalog-panel > summary::after { content: "+"; display: grid; width: 1.8rem; height: 1.8rem; flex: 0 0 auto; place-items: center; background: white; border: 1px solid var(--line); border-radius: 50%; font-size: 1rem; font-weight: 800; }
.rule-catalog-panel[open] > summary::after { content: "−"; }
.rule-catalog-panel > summary span, .rule-catalog-panel > summary small { display: block; }
.rule-catalog-panel > summary small { margin-top: 0.2rem; color: var(--muted); font-size: 0.65rem; font-weight: 500; }
.rule-catalog-content { padding: 0.8rem; border-top: 1px solid var(--line); }
.catalog-search { margin: 0 0 0.65rem !important; }
.selected-rule-list, .rule-definition-list { display: grid; gap: 0.6rem; }
.rule-definition-list { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.selected-rule-card, .rule-definition-card { padding: 0.8rem; background: white; border: 1px solid var(--line); border-radius: 10px; }
.selected-rule-card { border-left: 4px solid var(--lime); }
.rule-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.7rem; }
.rule-card-heading h5 { margin: 0; font-size: 0.8rem; }
.rule-card-heading p, .rule-definition-card p { margin: 0.28rem 0 0; color: var(--muted); font-size: 0.67rem; line-height: 1.45; }
.rule-technical-id { display: block; margin-top: 0.25rem; color: var(--forest); font-family: var(--mbdd-font-family-mono); font-size: 0.61rem; }
.rule-parameter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.75rem; }
.atelier-dialog .rule-parameter-grid label { margin: 0; }
.rule-parameter-grid .parameter-wide { grid-column: 1 / -1; }
.rule-metadata { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; }
.rule-metadata span { padding: 0.2rem 0.4rem; color: var(--forest); background: var(--mint); border-radius: 999px; font-size: 0.58rem; font-weight: 750; }
.rule-definition-card button { margin-top: 0.65rem; }
.rule-governance-wrapper { margin-top: 0.75rem; padding: 0.75rem; background: #f8fbf9; border: 1px solid var(--line); border-radius: 9px; }
.rule-governance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.atelier-dialog .rule-governance-grid label { margin: 0; }
.rule-governance-details { margin-top: 0.55rem; }
.rule-governance-details summary, .readable-technical-details summary { color: var(--forest); cursor: pointer; font-size: 0.67rem; font-weight: 780; }
.rule-governance-details label { margin-bottom: 0 !important; }
.distance-parameter { margin: 0 !important; }
.distance-controls { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 0.4rem; }
.assisted-regex-parameter { display: grid; gap: 0.4rem; }
.parameter-label { color: var(--muted); font-size: 0.75rem; font-weight: 750; }
.assisted-regex-toolbar { display: flex; justify-content: flex-end; }
.assisted-regex-toolbar select { width: min(100%, 240px); padding-block: 0.5rem; }
.assisted-regex-parameter textarea, .assisted-regex-parameter input { margin: 0; font-family: var(--mbdd-font-family-mono); font-size: 0.68rem; }

.reference-import-card { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(170px, 0.6fr) minmax(180px, 0.6fr) auto; align-items: end; gap: 0.8rem; padding: 1rem; background: linear-gradient(135deg, #f4faf6, #fbfdfb); border: 1px solid #cbded3; border-radius: 12px; }
.reference-import-card h4, .reference-import-card p { margin: 0; }
.reference-import-card p { margin-top: 0.3rem; font-size: 0.7rem; line-height: 1.45; }
.atelier-dialog .reference-role-picker { margin: 0; color: var(--muted); font-size: 0.66rem; }
.reference-role-picker select { margin-top: 0.3rem; }
.atelier-dialog .reference-file-picker { margin: 0; padding: 0.65rem 0.75rem; color: var(--forest); background: white; border: 1px dashed #9eb9aa; border-radius: 9px; cursor: pointer; text-align: center; }
.reference-file-picker input { margin-top: 0.45rem; padding: 0 !important; border: 0 !important; font-size: 0.65rem; }
.reference-analysis-status { margin-top: 0.8rem; }
.reference-progress-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.45rem 0.8rem; padding: 0.85rem; background: #f8fbf9; border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 10px; }
.reference-progress-card.succeeded { border-left-color: #16835a; }
.reference-progress-card.failed { border-left-color: var(--red); }
.reference-progress-card progress { grid-column: 1 / -1; width: 100%; accent-color: var(--forest); }
.reference-progress-heading { display: flex; justify-content: space-between; gap: 1rem; }
.reference-progress-heading span, .reference-progress-card small { color: var(--muted); font-size: 0.67rem; }
.reference-inventory { margin-top: 0.9rem; padding: 0.9rem; background: white; border: 1px solid var(--line); border-radius: 11px; }
.reference-classification-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 0.55rem; }
.atelier-dialog .reference-classification-row { display: flex; align-items: flex-start; gap: 0.55rem; margin: 0; padding: 0.7rem; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.atelier-dialog .reference-classification-row input { flex: 0 0 auto; width: auto; margin-top: 0.15rem; padding: 0; }
.reference-classification-content { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.reference-classification-content strong, .reference-classification-content span, .reference-classification-content small { display: block; }
.reference-classification-content span, .reference-classification-content small { margin-top: 0.18rem; color: var(--muted); font-size: 0.64rem; }
.reference-classification-content .reference-proposal-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0; }
.reference-proposal-heading strong { color: var(--ink); }
.reference-classification-content .proposal-confidence { display: inline-flex; flex: 0 0 auto; margin: 0; padding: 0.16rem 0.42rem; border-radius: 999px; font-size: 0.55rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; }
.proposal-confidence.high { color: #075d40; background: #dff6ea; }
.proposal-confidence.medium { color: #795000; background: #fff0c8; }
.proposal-confidence.low { color: #8b2f25; background: #fde8e4; }
.proposal-rationale { color: var(--ink-soft) !important; }
.proposal-signals { font-style: italic; }
.reference-evidence-list { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; padding: 0.75rem; background: #f2faf6; border: 1px solid #c8dfd2; border-radius: 9px; }
.reference-evidence-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.4rem 0.3rem 0.55rem; color: var(--forest); background: white; border: 1px solid #d5e5dc; border-radius: 999px; font-size: 0.63rem; }
.reference-evidence-chip select { width: auto; max-width: 180px; margin: 0; padding: 0.28rem 1.5rem 0.28rem 0.45rem; border-radius: 999px; font-size: 0.61rem; }
.reference-evidence-chip .icon-button { width: 1.5rem; height: 1.5rem; }
.reference-domain-alert { margin-bottom: 0.65rem; padding: 0.75rem; color: #6f3e00; background: #fff4dd; border: 1px solid #e8c27a; border-radius: 9px; }
.reference-domain-alert strong, .reference-domain-alert p { margin: 0; font-size: 0.68rem; line-height: 1.45; }
.reference-domain-alert p { margin-top: 0.2rem; }
.reference-domain-comparison { margin-bottom: 0.65rem; padding: 0.75rem; border-left: 4px solid var(--amber); border-radius: 9px; }
.reference-domain-comparison.consistent { color: #0d6243; background: #edf9f2; border-left-color: #16835a; }
.reference-domain-comparison.attention { color: #6f3e00; background: #fff4dd; }
.reference-domain-comparison strong, .reference-domain-comparison p { margin: 0; font-size: 0.68rem; line-height: 1.45; }
.reference-domain-comparison p { margin-top: 0.2rem; }
.reference-warning-list { display: grid; gap: 0.5rem; }
.reference-warning-card { padding: 0.65rem 0.75rem; color: #6f3e00; background: #fff8ec; border-left: 4px solid var(--amber); border-radius: 8px; }
.reference-warning-card strong, .reference-warning-card p { margin: 0; font-size: 0.67rem; line-height: 1.45; }
.reference-warning-card p { margin-top: 0.18rem; color: var(--muted); }
.reference-warning-card button { margin-top: 0.5rem; }
.reference-role-recommendation { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }

.qualification-callout { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; background: linear-gradient(135deg, #eff8f2, #fbfdfb); border: 1px solid #c7ddd0; border-radius: 12px; }
.qualification-callout strong, .qualification-callout p { margin: 0; }
.qualification-callout p { margin-top: 0.25rem; color: var(--muted); font-size: 0.7rem; line-height: 1.45; }
.qualification-outcome-guide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.55rem; margin-top: 0.7rem; }
.qualification-outcome-guide > div { padding: 0.65rem 0.75rem; background: #edf9f2; border-left: 4px solid #16835a; border-radius: 8px; }
.qualification-outcome-guide > .fail { background: #fff3f3; border-left-color: var(--red); }
.qualification-outcome-guide > .not-evaluable { background: #fff8ec; border-left-color: var(--amber); }
.qualification-outcome-guide > .error { background: #fff3f3; border-left-color: var(--red); }
.qualification-outcome-guide strong, .qualification-outcome-guide span { display: block; font-size: 0.65rem; line-height: 1.4; }
.qualification-outcome-guide span { margin-top: 0.18rem; color: var(--muted); }
.qualification-report { margin-top: 0.9rem; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 13px; }
.qualification-report > .empty-editor-state { margin: 0; border: 0; }
.qualification-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem; background: #f7fbf8; border-bottom: 1px solid var(--line); }
.qualification-heading h4, .qualification-heading p { margin: 0; }
.qualification-heading h4 { margin-top: 0.2rem; font-size: 1rem; }
.qualification-heading p { margin-top: 0.25rem; color: var(--muted); font-size: 0.68rem; }
.qualification-assurance { margin: 0.75rem 1rem 0; padding: 0.75rem 0.85rem; border-left: 4px solid var(--amber); background: #fff9ef; border-radius: 8px; }
.qualification-assurance.business_approved { border-left-color: #16835a; background: #edf8f2; }
.qualification-assurance strong, .qualification-assurance p { margin: 0; font-size: 0.67rem; line-height: 1.45; }
.qualification-assurance p { margin-top: 0.22rem; color: var(--muted); }
.qualification-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.55rem; padding: 0.8rem 1rem 0; }
.qualification-metrics .summary-card { min-width: 0; }
.qualification-matrix { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; }
.qualification-matrix-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(95px, 0.65fr) 105px 105px minmax(120px, 0.8fr) minmax(240px, 1.5fr); min-width: 850px; }
.qualification-matrix-row > * { min-width: 0; padding: 0.6rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.64rem; line-height: 1.4; }
.qualification-matrix-row > *:last-child { border-right: 0; }
.qualification-matrix-row:last-child > * { border-bottom: 0; }
.qualification-matrix-row.header { color: var(--forest); background: var(--surface-subtle); }
.matrix-observation { font-weight: 750; }
.matrix-observation.consistent { color: #0d6243; }
.matrix-observation.variable, .matrix-observation.counterexample_only { color: #8a2c2c; }
.qualification-trial-list, .qualification-issue-list { display: grid; gap: 0.55rem; }
.qualification-trial-card { padding: 0.75rem; background: #fbfdfb; border: 1px solid var(--line); border-radius: 9px; }
.qualification-trial-card small { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.62rem; }
.qualification-trial-card details { margin-top: 0.55rem; }
.qualification-trial-card summary { color: var(--forest); cursor: pointer; font-size: 0.65rem; font-weight: 780; }
.qualification-control-list { display: grid; gap: 0.35rem; margin-top: 0.5rem; }
.qualification-control-row { display: grid; grid-template-columns: auto minmax(140px, 0.8fr) minmax(220px, 1.4fr); align-items: center; gap: 0.55rem; padding: 0.45rem; background: white; border-radius: 7px; }
.qualification-control-row strong, .qualification-control-row span { font-size: 0.62rem; line-height: 1.4; }
.qualification-control-row > span:last-child { color: var(--muted); }
.qualification-coverage-list { display: grid; gap: 0.5rem; }
.qualification-coverage-card { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 0.45rem 0.8rem; align-items: center; padding: 0.7rem; background: #f8fbf9; border: 1px solid var(--line); border-left: 4px solid #16835a; border-radius: 9px; }
.qualification-coverage-card.gap { border-left-color: var(--amber); background: #fff9ef; }
.qualification-coverage-card strong, .qualification-coverage-card small { display: block; }
.qualification-coverage-card small, .qualification-coverage-card p { margin: 0.18rem 0 0; color: var(--muted); font-size: 0.62rem; line-height: 1.4; }
.qualification-coverage-card p { grid-column: 1 / -1; }
.qualification-coverage-outcomes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.25rem; }
.qualification-counter-test-list { display: grid; gap: 0.5rem; }
.qualification-counter-test-card { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 0.6rem 1rem; align-items: start; padding: 0.75rem; background: #fbfcff; border: 1px solid var(--line); border-left: 4px solid #5269a8; border-radius: 9px; }
.qualification-counter-test-card.passed { border-left-color: #16835a; background: #f5fbf7; }
.qualification-counter-test-card.failed, .qualification-counter-test-card.not_executable { border-left-color: var(--red); background: #fff5f5; }
.qualification-counter-test-card strong, .qualification-counter-test-card small { display: block; }
.qualification-counter-test-card small, .qualification-counter-test-card p { margin: 0.18rem 0 0; color: var(--muted); font-size: 0.62rem; line-height: 1.4; }
.counter-test-parameters { overflow-wrap: anywhere; font-family: var(--mono); }
.counter-test-outcome { display: grid; justify-items: end; gap: 0.25rem; }
.counter-test-status { padding: 0.24rem 0.48rem; border-radius: 999px; color: #0d6243; background: #dff4e8; font-size: 0.6rem; font-weight: 800; }
.counter-test-status.failed, .counter-test-status.not_executable { color: #8a2c2c; background: #fae2e2; }
.counter-test-execution-message { font-weight: 700; }
.qualification-issue { padding: 0.7rem; border-left: 4px solid var(--amber); background: #fff9ef; border-radius: 8px; }
.qualification-issue.blocker { border-left-color: var(--red); background: #fff5f5; }
.qualification-issue strong, .qualification-issue p { margin: 0; font-size: 0.67rem; line-height: 1.45; }
.qualification-issue p { margin-top: 0.25rem; color: var(--muted); }
.qualification-issue-group-title { margin: 0.55rem 0 0; color: var(--forest); font-size: 0.72rem; }
.qualification-stale-warning { margin: 0.8rem; padding: 0.8rem; color: #805113; background: #fff1d2; border-left: 4px solid var(--amber); border-radius: 8px; }
.qualification-stale-warning strong, .qualification-stale-warning p { margin: 0; font-size: 0.7rem; line-height: 1.45; }
.qualification-stale-warning p { margin-top: 0.2rem; }
.qualification-technical-details { margin: 0.8rem; padding: 0.75rem; background: #f7faf8; border: 1px solid var(--line); border-radius: 9px; }
.qualification-technical-details > summary { cursor: pointer; color: var(--forest); font-size: 0.72rem; font-weight: 800; }
.profile-publish-ready { color: #0d6243 !important; }
.profile-publish-blocked { color: #8a2c2c !important; }
.profile-status-error { grid-column: 1 / -1; margin: 0; padding: 0.55rem 0.65rem; color: #8a2c2c; background: #fff3f3; border-left: 4px solid var(--red); border-radius: 7px; font-size: 0.68rem; }
.rule-profile-actions button:disabled { cursor: not-allowed; opacity: 0.5; }
.qualification-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.6rem; padding: 0.9rem 1rem; background: #f8fbf9; border-top: 1px solid var(--line); }
.qualification-review-field { display: grid; flex: 1 1 280px; gap: 0.3rem; font-size: 0.62rem; font-weight: 750; }
.qualification-review-field textarea { min-height: 3.5rem; resize: vertical; }
.qualification-approved { color: #0d6243; font-size: 0.7rem; font-weight: 800; }

.readable-profile-preview { margin-top: 1rem; }
.readable-profile-document { overflow: hidden; background: #fff; border: 1px solid #c7d7ce; border-radius: 14px; box-shadow: 0 12px 28px rgba(13, 43, 34, 0.06); }
.readable-profile-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.15rem; background: linear-gradient(135deg, #eff8f2, #fbfdfb); border-bottom: 1px solid var(--line); }
.readable-profile-heading h3 { margin: 0.2rem 0 0; font-family: var(--mbdd-font-family-display); font-size: 1.28rem; }
.readable-profile-heading p { max-width: 680px; margin: 0.3rem 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.45; }
.readiness-badge, .requirement-badge, .impact-badge { flex: 0 0 auto; padding: 0.28rem 0.52rem; border-radius: 999px; font-size: 0.6rem; font-weight: 800; }
.readiness-badge.ready, .requirement-badge.required { color: #0d6243; background: #dff4e8; }
.readiness-badge.warning, .requirement-badge.to_confirm { color: #805113; background: #fff0d5; }
.requirement-badge.optional, .impact-badge.advisory { color: #31556d; background: #e5f0f7; }
.requirement-badge.ignored { color: #5e6260; background: #ecefed; }
.impact-badge.blocking { color: #8a2c2c; background: #fae2e2; }
.impact-badge.review_required { color: #805113; background: #fff0d5; }
.readable-context-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.readable-fact { padding: 0.75rem 0.9rem; border-right: 1px solid var(--line); }
.readable-fact:last-child { border-right: 0; }
.readable-fact span, .readable-fact strong { display: block; }
.readable-fact span { color: var(--muted); font-size: 0.6rem; }
.readable-fact strong { margin-top: 0.22rem; color: var(--forest); font-size: 0.7rem; line-height: 1.35; }
.readable-change-panel { display: grid; gap: 0.2rem; margin: 0.9rem 1rem 0; padding: 0.7rem 0.8rem; color: #31556d; background: #eef6fa; border-left: 4px solid #4d88a8; border-radius: 8px; }
.readable-change-panel span { font-size: 0.65rem; line-height: 1.45; }
.publication-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.publication-check { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 0.55rem; padding: 0.65rem; background: #fff8ec; border: 1px solid #f0dfbd; border-radius: 8px; }
.publication-check.ready { background: #edf9f2; border-color: #cae6d6; }
.publication-check-icon { display: grid; width: 1.35rem; height: 1.35rem; place-items: center; color: #805113; background: #ffe9bd; border-radius: 50%; font-size: 0.7rem; font-weight: 900; }
.publication-check.ready .publication-check-icon { color: white; background: #16835a; }
.publication-check strong, .publication-check small { display: block; font-size: 0.64rem; line-height: 1.4; }
.publication-check small { margin-top: 0.16rem; color: var(--muted); }
.readable-profile-section { padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.readable-profile-section:last-child { border-bottom: 0; }
.readable-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.65rem; }
.readable-section-heading h4, .readable-section-heading p { margin: 0; }
.readable-section-heading h4 { font-size: 0.84rem; }
.readable-section-heading p { color: var(--muted); font-size: 0.65rem; line-height: 1.4; text-align: right; }
.readable-reference-list, .readable-mapping-list, .readable-control-list { display: grid; gap: 0.55rem; }
.readable-reference-list, .readable-mapping-list { grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); }
.readable-reference-card, .readable-mapping-card, .readable-control-card { padding: 0.75rem; background: #fbfdfb; border: 1px solid var(--line); border-radius: 9px; }
.readable-reference-card strong, .readable-reference-card span { display: block; }
.readable-reference-card span { margin-top: 0.2rem; color: var(--muted); font-size: 0.64rem; line-height: 1.45; }
.readable-item-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.65rem; }
.readable-mapping-card p, .readable-control-sentence { margin: 0.45rem 0 0; font-size: 0.72rem; line-height: 1.5; }
.readable-mapping-card small { display: block; margin-top: 0.35rem; color: var(--muted); font-family: var(--mbdd-font-family-mono); font-size: 0.58rem; }
.readable-control-card { border-left: 4px solid var(--lime); }
.readable-control-provenance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem 0.8rem; margin: 0.7rem 0 0; padding-top: 0.65rem; border-top: 1px solid var(--line); }
.readable-control-provenance dt { color: var(--muted); font-size: 0.58rem; }
.readable-control-provenance dd { margin: 0.15rem 0 0; font-size: 0.66rem; font-weight: 680; line-height: 1.4; }
.readable-technical-details { margin-top: 0.65rem; }
.readable-technical-details .technical-list { margin-top: 0.55rem; padding: 0.65rem; background: white; border-radius: 7px; }
.readiness-list { margin: 0.65rem 0 0; padding: 0.7rem 0.8rem 0.7rem 1.8rem; color: #805113; background: #fff8ec; border-radius: 8px; font-size: 0.68rem; line-height: 1.55; }
.readiness-list.ready { color: #0d6243; background: #edf9f2; }
.profile-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 0.7rem; }
.profile-library-picker { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .75rem; }
.profile-library-picker > summary { cursor: pointer; color: var(--forest); font-weight: 650; margin-bottom: .75rem; }
.profile-library-picker .profile-version-history { min-width: 0; }
.profile-library-picker .profile-version-history > .profile-choice { margin-top: .5rem; }
.profile-choice-heading > div { min-width: 0; overflow-wrap: anywhere; }
.profile-choice { display: grid; gap: 0.55rem; padding: 0.85rem; background: white; border: 1px solid var(--line); border-radius: 11px; }
.profile-choice.selected { border-color: var(--forest); box-shadow: 0 0 0 2px rgba(23, 79, 60, 0.08); }
.profile-choice-heading { display: flex; align-items: flex-start; gap: 0.55rem; }
.atelier-dialog .profile-choice-heading input { width: auto; margin-top: 0.15rem; padding: 0; }
.profile-choice-heading strong, .profile-choice-heading small { display: block; }
.profile-choice-heading small { margin-top: 0.25rem; color: var(--muted); }
.preferred-profile { display: flex !important; align-items: center; gap: 0.45rem; margin: 0 !important; padding-top: 0.5rem; border-top: 1px solid var(--line); }
.atelier-dialog .preferred-profile input { width: auto; padding: 0; }
.delivery-builder-section { margin-top: 1rem; padding: 0.9rem; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 11px; }
.choice-grid { display: grid; gap: 0.65rem; margin-top: 0.7rem; }
.choice-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-card { display: flex !important; align-items: flex-start; gap: 0.55rem !important; margin: 0 !important; padding: 0.75rem; background: white; border: 1px solid var(--line); border-radius: 9px; }
.atelier-dialog .choice-card input { width: auto; margin-top: 0.1rem; padding: 0; }
.choice-card strong, .choice-card small { display: block; }
.choice-card small { margin-top: 0.2rem; color: var(--muted); font-weight: 500; }
.format-policy-list { display: grid; gap: 0.55rem; }
.format-policy-card { background: white; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.atelier-dialog .format-policy-heading { display: flex; align-items: center; gap: 0.55rem; padding: 0.65rem 0.75rem; cursor: pointer; }
.atelier-dialog .format-policy-heading input { width: auto; padding: 0; }
.format-policy-heading strong { min-width: 80px; }
.format-policy-heading small { color: var(--muted); }
.format-policy-fields { display: grid; grid-template-columns: 140px minmax(180px, 1fr) 2fr; gap: 0.65rem; padding: 0.2rem 0.75rem 0.75rem; border-top: 1px solid var(--line); }
.atelier-dialog .format-policy-fields label { margin: 0.55rem 0 0; }
.metadata-checks { display: flex; flex-wrap: wrap; gap: 0.35rem 0.7rem; margin-top: 0.45rem; }
.atelier-dialog .metadata-checks label, .atelier-dialog .inline-checks label { display: flex; align-items: center; gap: 0.3rem; margin: 0; font-size: 0.65rem; }
.atelier-dialog .metadata-checks input, .atelier-dialog .inline-checks input { width: auto; padding: 0; }
.split-section { display: grid; grid-template-columns: 1fr 1.35fr; gap: 1rem; }
.switch-line { display: flex !important; align-items: center; gap: 0.5rem !important; margin: 0.65rem 0 !important; }
.atelier-dialog .switch-line input { width: auto; padding: 0; }
.inline-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compact-fieldset { margin-top: 0.75rem; padding: 0.65rem; border: 1px solid var(--line); border-radius: 8px; }
.compact-fieldset legend { color: var(--muted); font-size: 0.67rem; font-weight: 750; }
.inline-checks { display: flex; flex-wrap: wrap; gap: 0.45rem 0.8rem; }
.configuration-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; }
.summary-card { padding: 0.85rem; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 10px; }
.summary-card strong, .summary-card span { display: block; }
.summary-card strong { color: var(--forest); font-size: 1.08rem; }
.summary-card span { margin-top: 0.25rem; color: var(--muted); font-size: 0.67rem; line-height: 1.4; }
.summary-card.wide { grid-column: 1 / -1; }
.summary-card.wide strong { font-size: 0.8rem; }
.validation-panel { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: 0.9rem; background: #f7faf8; border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 10px; }
.validation-panel.valid { border-left-color: #16835a; background: #f2faf6; }
.validation-panel.invalid { border-left-color: var(--red); background: #fff7f7; }
.validation-panel p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.7rem; }
.full-grid-field { grid-column: 1 / -1; }
.user-password-field { grid-column: 1 / -1; }
.role-selector { display: flex; flex-wrap: wrap; gap: 0.55rem 1rem; margin: 0.9rem 0 0; padding: 0.75rem; border: 1px solid var(--line); border-radius: 9px; }
.role-selector legend { padding: 0 0.35rem; color: var(--muted); font-size: 0.7rem; font-weight: 750; }
.role-selector .included-role { flex-basis: 100%; }
.role-selector label, .toggle-label { font-size: 0.76rem; font-weight: 650; }
.users-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 1.2rem 0 0.7rem; }
.users-heading h3 { margin: 0; }
.user-list { display: grid; max-height: 48vh; gap: 0.75rem; overflow: auto; }
.user-card { padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-subtle); }
.user-card-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.7rem; }
.user-card-heading strong, .user-card-heading span { display: block; }
.user-update-form { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(190px, 1fr) auto minmax(260px, 1.4fr) auto; align-items: end; gap: 0.7rem; }
.access-administration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.access-administration-grid section { padding: 1rem; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 10px; }
.access-administration-grid h3 { margin: 0 0 0.75rem; font-size: 0.9rem; }
.invitation-link { margin-top: 0.8rem; padding: 0.75rem; overflow-wrap: anywhere; color: var(--forest); background: white; border: 1px solid var(--line); border-radius: 8px; font-size: 0.72rem; }
.compact-roles { margin: 0; padding: 0.48rem 0.65rem; }
.password-update-form { display: grid; grid-template-columns: 1fr auto; gap: 0.7rem; margin-top: 0.7rem; }

@media (max-width: 760px) {
  .user-form-grid, .case-form-grid, .user-update-form, .password-update-form, .access-administration-grid { grid-template-columns: 1fr; }
  .tenant-reset-metrics { grid-template-columns: 1fr 1fr; }
  .organization-management-heading, .organization-card, .tenant-settings-context { align-items: stretch; flex-direction: column; }
  .organization-management-heading .primary-button, .organization-card-actions .secondary-button, .tenant-settings-context .secondary-button { width: 100%; }
  .full-grid-field { grid-column: auto; }
  .user-password-field { grid-column: auto; }
  .journey-guidance-layout { grid-template-columns: 1fr; }
  .journey-guidance-action { width: 100%; }
  .journey-steps { grid-template-columns: 1fr 1fr; }
}
.capability-card ul { display: grid; gap: 0.7rem; margin: 0.9rem 0 0; padding: 0; list-style: none; }
.capability-card li { display: flex; gap: 0.55rem; color: var(--muted); font-size: 0.76rem; line-height: 1.4; }
.capability-card li span { color: var(--forest); font-weight: 900; }

.dialog { width: min(92vw, 520px); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1.4rem; color: var(--ink); background: white; border: 0; border-radius: 15px; box-shadow: 0 30px 100px rgba(13, 43, 34, 0.24); container: dialog / inline-size; }
.dialog::backdrop { background: rgba(13, 43, 34, 0.54); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.dialog-heading h2 { margin: 0.2rem 0 0; font-family: var(--mbdd-font-family-display); font-size: 1.65rem; font-weight: 620; }
.dialog label { display: grid; gap: 0.4rem; margin: 0.85rem 0; color: var(--muted); font-size: 0.75rem; font-weight: 750; }
.dialog input, .dialog select, .dialog textarea { width: 100%; padding: 0.72rem 0.8rem; color: var(--ink); background: white; border: 1px solid #8fa399; border-radius: 8px; outline: 0; }
.dialog input:focus, .dialog select:focus, .dialog textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(23, 79, 60, 0.12); }
.dialog input:focus-visible,
.dialog select:focus-visible,
.dialog textarea:focus-visible {
  box-shadow: 0 0 0 3px var(--mbdd-color-focus), 0 0 0 6px var(--mbdd-color-text-strong);
}
.field-hint { display: block; margin-top: 0.3rem; color: var(--muted); font-size: 0.66rem; font-weight: 500; line-height: 1.4; }
.dialog-actions { display: flex; flex: none; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.65rem; margin-top: 1.25rem; }
.dialog-actions > .form-message { flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; }
.dialog-actions > button { max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.dialog :is(form, fieldset, label, .dialog-heading > div) { min-width: 0; }
.dialog-heading :is(h2, p), .form-message { overflow-wrap: anywhere; }
.dialog-heading > .icon-button { flex: none; }
.dialog :is(.workflow-checkbox, .checkbox-label, .toggle-label) { display: flex; align-items: flex-start; gap: .6rem; }
.dialog :is(.workflow-checkbox, .checkbox-label, .toggle-label) input[type="checkbox"] { width: auto; flex: none; margin-top: .15rem; }
.form-recovery { flex: none; padding: .8rem; margin: .75rem 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); overflow-wrap: anywhere; }
.form-recovery > p { margin: 0 0 .6rem; }
.form-recovery button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.access-review, .import-review { padding: .8rem; background: var(--surface-subtle); border-radius: 8px; overflow-wrap: anywhere; }
.import-review dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: .5rem 1rem; }
.import-review dd { margin: 0; }
.long-dialog-form > .dialog-actions {
  position: sticky;
  z-index: 4;
  bottom: -1.4rem;
  margin-right: -0.35rem;
  margin-left: -0.35rem;
  padding: 0.75rem 0.35rem 1.4rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92), white 35%);
  border-top: 1px solid var(--line);
}
.dialog.users-dialog { width: min(920px, calc(100vw - 2rem)); }
#users-dialog .dialog-heading { margin-bottom: 1rem; }
#users-organization { margin: 0.4rem 0 0; }
.users-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 0.65rem; }
#users-dialog .users-search { flex: 1 1 240px; margin: 0; }
.users-toolbar > button { flex: 0 0 auto; }
.users-toolbar > button[aria-expanded="true"] { outline: 2px solid var(--forest); outline-offset: 2px; }
.user-administration-panel { margin-top: 1rem; padding: 1rem; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 10px; }
.user-administration-panel h3 { margin: 0; }
.user-administration-panel > p { margin: 0.5rem 0; line-height: 1.5; }
.user-administration-panel .new-user-form { padding: 0; border: 0; }
.user-administration-panel .dialog-actions { align-items: center; flex-wrap: wrap; margin-top: 0.8rem; }
.user-administration-panel .form-message { flex: 1 1 180px; }
#users-dialog .users-heading { flex-wrap: wrap; gap: 0.4rem 1rem; }
#users-dialog .user-list { max-height: none; overflow: visible; }
#users-dialog .user-card { padding: 0.85rem 1rem; background: white; }
#users-dialog .user-card-heading { flex-wrap: wrap; gap: 0.55rem 0.75rem; margin-bottom: 0.65rem; }
.user-identity { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.user-identity .muted { margin-top: 0.2rem; }
#users-dialog .user-edit-identity { padding: 0.45rem 0.65rem; font-size: 0.72rem; }
#users-dialog .user-update-form { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.65rem; }
.user-identity-editor { grid-column: 1 / -1; }
#users-dialog .user-identity-editor label { min-width: 0; margin: 0 0 0.5rem; }
#users-dialog .compact-roles { min-width: 0; gap: 0.4rem 0.75rem; padding: 0.5rem 0.65rem; background: var(--surface-subtle); }
#users-dialog .compact-roles label { min-height: 1.65rem; cursor: pointer; }
.user-save-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 0.65rem; }
#users-dialog .user-save-actions button { padding: 0.6rem 0.8rem; font-size: 0.76rem; }
#users-dialog .user-update-form > .form-message, #users-dialog .form-error-summary { grid-column: 1 / -1; }
#users-dialog .form-message:empty { display: none; }
.user-password-details { margin-top: 0.65rem; }
.user-password-details > summary { width: fit-content; padding: 0.2rem 0; color: var(--forest); font-size: 0.72rem; font-weight: 650; cursor: pointer; }
#users-dialog .password-update-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
#users-dialog .password-update-form label { margin: 0; }
#users-dialog .password-update-form .form-message { grid-column: 1 / -1; }
@media (max-width: 760px) {
  #users-dialog .user-update-form, #users-dialog .password-update-form { grid-template-columns: minmax(0, 1fr); }
  .users-toolbar .users-search { flex-basis: 100%; }
  .users-toolbar > button { flex: 1 1 160px; }
  #users-dialog .user-card { padding: 0.8rem; }
  .user-save-actions { justify-content: space-between; }
}
.dialog.case-dialog { width: min(760px, calc(100vw - 2rem)); }
.dialog.organizations-dialog { width: min(760px, calc(100vw - 2rem)); }
.dialog.tenant-create-dialog { width: min(600px, calc(100vw - 2rem)); }
.dialog.tenant-settings-dialog { width: min(920px, calc(100vw - 2rem)); }
.dialog .role-selector label, .dialog .toggle-label { display: flex; align-items: center; gap: 0.25rem; margin: 0; }
.dialog .role-selector input, .dialog .toggle-label input { width: auto; padding: 0; }
.control-submission-options { margin-top: 0.8rem; padding: 0.7rem 0.8rem; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 9px; }
.control-submission-options > summary { color: var(--forest); cursor: pointer; font-size: 0.72rem; font-weight: 750; }
.organization-management-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.organization-management-heading .muted { max-width: 480px; margin: 0; line-height: 1.55; }
.organization-management-heading .primary-button { flex: 0 0 auto; }
.organization-list { display: grid; max-height: 52vh; gap: 0.65rem; margin-top: 1.2rem; overflow-y: auto; }
.organization-list-empty { margin: 0; padding: 1rem; color: var(--muted); text-align: center; background: var(--surface-subtle); border: 1px dashed var(--line); border-radius: 10px; }
.organization-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1rem; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 11px; }
.organization-card.active { background: var(--mint); border-color: #b9d9c9; }
.organization-card-identity { display: grid; min-width: 0; gap: 0.25rem; }
.organization-card-title { display: flex; align-items: center; min-width: 0; gap: 0.55rem; }
.organization-card-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.organization-card-title .security-badge { padding: 0.25rem 0.5rem; font-size: 0.62rem; }
.organization-key { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.7rem; }
.organization-role { color: var(--muted); font-size: 0.68rem; }
.organization-card-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 0.5rem; }
.dialog .organization-archive-filter { margin-top: 1rem; gap: 0.5rem; }
.organization-management-actions { padding-top: 1rem; border-top: 1px solid var(--line); }
.tenant-create-dialog > .muted { line-height: 1.55; }
.tenant-advanced-options { margin-top: 1rem; padding: 0.85rem; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 10px; }
.tenant-advanced-options summary { cursor: pointer; color: var(--forest); font-size: 0.75rem; font-weight: 750; }
.tenant-settings-context { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: 0.85rem 1rem; background: var(--mint); border: 1px solid #b9d9c9; border-radius: 11px; }
.tenant-settings-context span, .tenant-settings-context strong { display: block; }
.tenant-settings-context span { margin-bottom: 0.2rem; color: var(--muted); font-size: 0.65rem; font-weight: 700; text-transform: uppercase; }
.tenant-settings-context strong { color: var(--forest); font-size: 0.9rem; }
.tenant-reset-section { padding: 1.15rem; background: #fff8f6; border: 1px solid #e8c4bd; border-radius: 12px; }
.tenant-reset-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.tenant-reset-heading h3 { margin: 0.2rem 0 0; font-size: 1.05rem; }
.tenant-reset-section > .muted { max-width: 720px; line-height: 1.55; }
.dialog .tenant-reset-override { margin: 1rem 0 0; padding: 0.85rem; color: #754717; background: #fff1da; border: 1px solid #efd2a9; border-radius: 8px; }
.tenant-reset-override strong { display: block; font-size: 0.78rem; }
.tenant-reset-override p { margin: 0.3rem 0 0.7rem; font-size: 0.7rem; line-height: 1.45; }
.dialog .tenant-reset-override label { color: #754717; }
.tenant-reset-preview { margin-top: 1rem; }
.tenant-reset-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.55rem; }
.tenant-reset-metric { padding: 0.7rem; background: white; border: 1px solid #eadbd7; border-radius: 8px; }
.tenant-reset-metric span, .tenant-reset-metric strong { display: block; }
.tenant-reset-metric span { color: var(--muted); font-size: 0.65rem; }
.tenant-reset-metric strong { margin-top: 0.2rem; font-size: 1rem; }
.tenant-reset-alert { margin: 0.8rem 0 0; padding: 0.75rem 0.85rem; border-radius: 8px; font-size: 0.75rem; line-height: 1.5; }
.tenant-reset-alert.blocker { color: #782929; background: #f7dddd; }
.tenant-reset-alert.warning { color: #754717; background: #f8e9d5; }
.tenant-reset-details { margin-top: 0.8rem; padding: 0.7rem 0.8rem; background: white; border: 1px solid #eadbd7; border-radius: 8px; }
.tenant-reset-details summary { cursor: pointer; color: var(--ink); font-size: 0.72rem; font-weight: 750; }
.tenant-reset-targets { max-height: 190px; margin: 0.65rem 0 0; padding-left: 1.1rem; overflow: auto; color: var(--muted); font-size: 0.72rem; line-height: 1.55; }
.tenant-reset-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e8c4bd; }
.tenant-reset-form > h4 { margin: 0 0 0.8rem; font-size: 0.85rem; }
.tenant-reset-confirmations { display: grid; gap: 0.6rem; margin: 0; padding: 0.85rem; background: white; border: 1px solid #e8c4bd; border-radius: 8px; }
.tenant-reset-confirmations legend { padding: 0 0.35rem; color: var(--ink); font-size: 0.74rem; font-weight: 800; }
.dialog .tenant-reset-confirmations label { margin: 0; color: var(--ink); font-weight: 650; }
.tenant-reset-operation { margin-top: 1rem; padding: 0.9rem; background: white; border: 1px solid #e8c4bd; border-radius: 8px; }
.tenant-reset-operation h4 { margin: 0 0 0.5rem; }
.tenant-reset-operation p { margin: 0.35rem 0; }
.tenant-reset-operation progress { width: 100%; margin: 0.65rem 0; }
.tenant-reset-operation .danger-button { margin-top: 0.65rem; }
.result-section { padding-top: 1rem; border-top: 1px solid var(--line); }
.result-section h3 { margin: 0 0 0.65rem; font-size: 0.86rem; }
.result-section ul { margin: 0; padding-left: 1.15rem; color: var(--muted); font-size: 0.75rem; line-height: 1.55; }
.crs-override-section { border: 1px solid rgba(238, 180, 52, 0.46); border-radius: 6px; margin-bottom: 10px; background: #fffbf2; }
.crs-override-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 10px 12px; cursor: pointer; flex-wrap: wrap; list-style: none; }
.crs-override-summary::-webkit-details-marker { display: none; }
.crs-override-summary-copy { display: grid; gap: 3px; min-width: 0; }
.crs-override-summary-copy strong { color: #78511d; font-size: 0.85rem; }
.crs-override-status { color: var(--muted); font-size: 0.8rem; }
.crs-override-disclosure { color: var(--accent); font-size: 0.8rem; }
.crs-override-disclosure::after { content: " ▾"; }
.crs-override-section[open] .crs-override-disclosure::after { content: " ▴"; }
.crs-override-content { padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.crs-override-content > h3 { margin-top: 0; }
.crs-override-content > button { margin-top: 12px; }
.crs-diagnostic { margin-top: 12px; }
.crs-diagnostic > summary { cursor: pointer; padding: 8px 0; }
.crs-override-form, .crs-override-apply-form { display: grid; gap: 0.8rem; margin-top: 0.9rem; }
.crs-override-form { grid-template-columns: minmax(11rem, 15rem) auto; align-items: end; justify-content: start; }
.crs-qualification-result { margin-top: 1rem; }
.crs-qualification-heading { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }
.crs-qualification-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.65rem; margin: 0.9rem 0; }
.crs-qualification-metrics .result-metric { display: grid; gap: 0.35rem; padding: 0.8rem; border: 1px solid var(--line); border-radius: 0.6rem; background: var(--surface); }
.crs-qualification-metrics .result-metric span { color: var(--muted); font-size: 0.8rem; }
.crs-qualification-metrics .result-metric strong { font-size: 1.15rem; }
.crs-bounds { margin: 0.75rem 0; }
.crs-anomaly-summary, .crs-override-active { margin-top: 0.9rem; padding: 0.9rem; border-radius: 0.8rem; }
.crs-anomaly-summary { border: 1px solid rgba(176, 58, 46, 0.35); background: rgba(176, 58, 46, 0.07); }
.crs-override-active { border: 1px solid rgba(27, 116, 89, 0.35); background: rgba(27, 116, 89, 0.08); }
.crs-override-active p { margin: 0.35rem 0; }
.rule-pass { border-left-color: #16835a; }
.rule-fail, .rule-error { border-left-color: #b73636; }
.rule-not_evaluable { border-left-color: #b47a13; }
.rule-finding { font-size: 0.76rem; padding-left: 0.75rem; border-left: 2px solid var(--line); }
.business-finding-card { margin-top: 0.75rem; padding: 0.9rem; border: 1px solid #ecc9c9; border-radius: 10px; background: #fffafa; }
.business-finding-card.compact { width: 100%; margin: 0; background: white; }
.business-finding-heading { display: flex; align-items: flex-start; gap: 0.7rem; }
.business-finding-heading h4 { margin: 0; color: var(--ink); font-size: 0.86rem; }
.business-finding-heading p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.4; }
.business-finding-icon { display: grid; flex: 0 0 1.65rem; width: 1.65rem; height: 1.65rem; place-items: center; border-radius: 50%; color: white; background: var(--red); font-weight: 800; }
.business-finding-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem 1rem; margin: 0.85rem 0 0; }
.business-finding-values div { min-width: 0; }
.business-finding-values dt { color: var(--muted); font-size: 0.65rem; }
.business-finding-values dd { overflow-wrap: anywhere; margin: 0.15rem 0 0; color: var(--ink); font-size: 0.76rem; font-weight: 750; }
.business-finding-technical { margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px solid var(--line); }
.business-finding-technical summary { cursor: pointer; color: var(--muted); font-size: 0.68rem; font-weight: 700; }
.business-finding-technical .technical-list { margin-top: 0.6rem; }
.technical-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem 1rem; margin: 0; }
.technical-list div { min-width: 0; }
.technical-list dt { color: var(--muted); font-size: 0.66rem; }
.technical-list dd { overflow-wrap: anywhere; margin: 0.15rem 0 0; font-size: 0.75rem; font-weight: 700; }
.report-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.report-download { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 0.76rem; }
.geo-map { display: block; width: 100%; height: 390px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #eef4f0; }
.map-attributes { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.45rem 1rem; margin: 0.7rem 0 0; padding: 0.8rem; background: var(--surface-subtle); border-radius: 10px; }
.map-attributes > div { min-width: 0; }
.map-attributes dt { color: var(--muted); font-size: 0.65rem; }
.map-attributes dd { overflow-wrap: anywhere; margin: 0.15rem 0 0; font-size: 0.74rem; font-weight: 700; }
.map-entity-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.45rem 1rem; width: 100%; margin: 0; }
.map-background { fill: #eef4f0; }
.map-grid { stroke: #d8e4dc; stroke-width: 1; }
.map-entity { fill: rgba(23, 79, 60, 0.08); stroke: #174f3c; stroke-width: 3; vector-effect: non-scaling-stroke; }
.map-finding { fill: rgba(181, 72, 72, 0.14); stroke: #b54848; stroke-width: 4; vector-effect: non-scaling-stroke; }
.map-entity-point { fill: #174f3c; stroke: white; stroke-width: 2; }
.map-finding-point { fill: #b54848; stroke: white; stroke-width: 2; }
.map-legend { display: flex; flex-wrap: wrap; gap: 0.55rem 1rem; margin-top: 0.55rem; color: var(--forest); font-size: 0.7rem; }
.map-legend .finding { color: var(--red); }
.map-unlocated-findings { margin-top: 0.65rem; border-top: 1px solid var(--line); }
.map-unlocated-findings > summary { min-height: 44px; padding: 0.7rem 0; color: var(--forest); cursor: pointer; font-size: 0.8rem; font-weight: 600; }
.map-unlocated-findings > p { margin: 0; font-size: 0.8rem; line-height: 1.5; }
.map-unlocated-proof { min-width: 0; overflow-wrap: anywhere; }
.decision-form, .comment-form { display: grid; gap: 0.7rem; margin-top: 0.75rem; }
.decision-form label { display: grid; gap: 0.35rem; color: var(--muted); font-size: 0.7rem; font-weight: 700; }
.decision-form select, .decision-form textarea, .comment-form textarea {
  width: 100%; padding: 0.65rem 0.75rem; color: var(--ink); background: white;
  border: 1px solid var(--line); border-radius: 8px; resize: vertical;
  font: inherit; font-size: 0.875rem; line-height: 1.5; font-weight: 400;
}
.decision-form button, .comment-form button { justify-self: end; }
.decision-context, .decision-warning {
  margin: 0.75rem 0; padding: 0.75rem; border-radius: 8px; font-size: 0.76rem;
  line-height: 1.6; overflow-wrap: anywhere;
}
/* Le formulaire espace déjà ses encadrés avec son gap de grille. */
.decision-form > :is(.decision-context, .decision-warning) { margin: 0; }
.decision-context { color: var(--forest); background: var(--mint); }
.decision-warning { color: var(--mbdd-color-state-warning); background: var(--mbdd-color-state-warning-soft); border-left: 4px solid var(--amber); }
.decision-form .decision-acknowledgement {
  display: flex; align-items: flex-start; gap: 0.55rem; margin: 0; padding: 0.7rem;
  color: var(--ink); background: var(--surface-subtle); border-radius: 8px; line-height: 1.4;
}
.decision-form .decision-acknowledgement input { width: auto; margin-top: 0.15rem; }
.review-rationale { padding: 0.75rem; background: var(--surface-subtle); border-radius: 8px; white-space: pre-wrap; }
.comment-list { display: grid; gap: 0.55rem; }
.comment-item { padding: 0.7rem 0.8rem; background: var(--surface-subtle); border-radius: 8px; }
.comment-item p { margin: 0 0 0.35rem; white-space: pre-wrap; }
.comment-item span { font-size: 0.67rem; }
.comment-form { grid-template-columns: 1fr auto; align-items: end; }

.toast-region { position: fixed; right: max(1.2rem, env(safe-area-inset-right)); bottom: max(1.2rem, env(safe-area-inset-bottom)); z-index: 110; width: min(420px, calc(100vw - 2.4rem)); pointer-events: none; }
.action-feedback-region { display: grid; gap: 1rem; max-height: min(50dvh, 32rem); overflow: auto; overscroll-behavior: contain; }
.action-feedback-successes, .action-feedback-errors, .action-feedback-errors-visible, .action-feedback-errors-history { display: grid; gap: 1rem; }
.toast, .action-feedback-error { display: flex; align-items: flex-start; gap: .65rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); font-size: .875rem; line-height: 1.5; pointer-events: auto; }
.action-feedback-message { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.action-feedback-dismiss { flex: none; display: grid; place-items: center; min-width: 32px; min-height: 32px; padding: .25rem; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 6px; font: inherit; cursor: pointer; }
.action-feedback-dismiss:hover { border-color: currentColor; }
.action-feedback-error { color: var(--mbdd-color-state-fail); background: var(--mbdd-color-state-fail-soft); border-inline-start: 4px solid currentColor; }
.action-feedback-error-history { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; pointer-events: auto; }
.action-feedback-error-history > summary { padding: .8rem 1rem; font-size: .875rem; cursor: pointer; }
.action-feedback-error-history[open] { display: grid; gap: .65rem; }
dialog > .action-feedback-region { position: sticky; top: 0; z-index: 10; width: 100%; margin-block-end: 1rem; }
.action-feedback-region:has(> .action-feedback-errors[hidden]):has(> .action-feedback-successes:empty) { display: none; }
.error-action { padding: 0.75rem; color: var(--ink); background: var(--surface-subtle); border-left: 4px solid var(--amber); border-radius: 8px; }

@media (max-width: 1720px) {
  :root { --app-header-height: 116px; }
  .topbar {
    grid-template-areas:
      "brand heading meta"
      "brand actions actions";
    grid-template-columns: 190px minmax(220px, 1fr) auto;
    grid-template-rows: 52px 40px;
    gap: 6px 16px;
    padding-block: 8px;
  }
  .topbar-tools { justify-self: stretch; width: 100%; }
  .topbar-actions { flex: 1 1 auto; }
}

@media (max-width: 1200px) {
  .personal-export-link { display: none; }
}

@media (max-width: 1040px) {
  .shell { grid-template-columns: 235px minmax(0, 1fr); }
  .topbar { grid-template-columns: 170px minmax(170px, 1fr) auto; gap-inline: 10px; }
  .topbar-brand .mbdd-brand-lockup { max-width: 160px; }
  .tenant-selector select { width: 145px; }
  .account-badge strong { max-width: 90px; }
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: 1fr; }
  .primary-column, .secondary-column { grid-column: auto; }
  .secondary-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atelier-shell { grid-template-columns: minmax(0, 1fr); }
  .rule-definition-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
  .format-policy-fields { grid-template-columns: 130px 1fr; }
  .format-policy-fields > div { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
  .login-layout { grid-template-columns: 1fr; gap: 2rem; width: min(100% - 1.5rem, 520px); padding: 1.2rem 0; }
  .login-introduction { display: none; }
  .login-mobile-brand { display: block; width: min(13rem, 70vw); height: auto; margin: 0 0 2rem; }
  :root { --app-header-height: auto; }
  .shell { display: block; }
  .topbar {
    position: sticky;
    grid-template-areas:
      "brand meta"
      "heading heading"
      "actions actions";
    grid-template-columns: minmax(150px, 1fr) auto;
    grid-template-rows: auto auto 40px;
    gap: 7px 10px;
    min-height: 0;
    padding: 8px 10px;
  }
  .topbar-brand .mbdd-brand-lockup { width: min(38vw, 145px); max-width: 100%; }
  .topbar-heading .eyebrow { display: none; }
  .topbar h1 { font-size: 1.15rem; }
  .topbar-meta { gap: 5px; }
  .tenant-selector span { display: none; }
  .tenant-selector select { width: min(38vw, 160px); }
  .topbar-tools { width: 100%; }
  .topbar-actions { flex: 1 1 auto; }
  .sidebar { position: static; display: grid; grid-template-columns: auto minmax(0, 1fr); height: auto; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); border-right: 0; }
  .mobile-cases-toggle { display: block; grid-column: 2; grid-row: 1; min-height: 36px; padding: 0.45rem 0.7rem; color: var(--forest); text-align: left; background: var(--mint); border: 1px solid color-mix(in srgb, var(--forest) 18%, var(--line)); border-radius: 8px; font-size: 0.68rem; font-weight: 750; }
  .sidebar .sidebar-section { grid-column: 1 / -1; }
  .sidebar.mobile-collapsed .sidebar-section { display: none; }
  .sidebar-section { max-height: min(48vh, 420px); margin-top: 1rem; }
  .main-content { padding: 10px; }
  .topbar-session { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .topbar-session .account-badge { justify-content: flex-start; }
  .topbar-meta .muted { display: none; }
  .account-badge strong, #logout-button { font-size: 0; }
  .account-badge strong::after { content: "Compte"; font-size: 0.68rem; }
  #logout-button::after { content: "Sortir"; font-size: 0.68rem; }
  .personal-export-link { display: none; }
  .empty-state { min-height: 450px; padding: 2.5rem 1.2rem; }
  .empty-state h2 { font-size: 1.5rem; }
  .empty-state p { font-size: 0.86rem; }
  .overview-grid, .secondary-column { grid-template-columns: 1fr 1fr; }
  .delivery-row { grid-template-columns: 1fr; }
  .delivery-actions { justify-content: flex-end; }
  .upload-actions { align-items: stretch; flex-direction: column; }
  .upload-metadata-grid { grid-template-columns: 1fr; }
  .upload-metadata-grid .full-grid-field { grid-column: auto; }
  .business-finding-values, .technical-list { grid-template-columns: 1fr; }
  .crs-override-form { grid-template-columns: 1fr; }
  .dialog.atelier-dialog {
    width: 100%;
    max-width: none;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    padding: 0.65rem;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 0;
  }
  .dialog.atelier-dialog[open] { display: block; height: 100vh; height: 100dvh; }
  .atelier-shell { display: block; height: auto; min-height: calc(100vh - 7rem); min-height: calc(100dvh - 7rem); overflow: visible; }
  .atelier-main { display: block; min-height: calc(100vh - 7rem); min-height: calc(100dvh - 7rem); overflow: visible; }
  .atelier-catalog { position: absolute; inset: 0; width: 100%; border-top: 0; border-left: 0; }
  .atelier-stepper { padding: 0; }
  .atelier-stepper button { gap: 0.2rem; font-size: 0.6rem; }
  .atelier-stepper button span { width: 1.25rem; height: 1.25rem; }
  .atelier-step { padding: 1rem 0.8rem 1.3rem; }
  .atelier-footer { align-items: stretch; flex-direction: column; }
  .atelier-footer-actions { justify-content: stretch; }
  .atelier-footer-actions button { flex: 1; }
  .mapping-row, .pair-row, .rule-parameter-grid, .split-section, .inline-field-grid,
  .compact-grid, .configuration-summary, .choice-grid.two-columns, .format-policy-fields,
  .rule-definition-list { grid-template-columns: 1fr; }
  .rule-governance-grid, .reference-import-card, .readable-context-grid, .mapping-decision-grid,
  .qualification-outcome-guide, .publication-checklist { grid-template-columns: 1fr; }
  .qualification-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qualification-callout, .qualification-actions { align-items: stretch; flex-direction: column; }
  .qualification-counter-test-card { grid-template-columns: 1fr; }
  .counter-test-outcome { justify-items: start; }
  .readable-fact { border-right: 0; border-bottom: 1px solid var(--line); }
  .readable-fact:last-child { border-bottom: 0; }
  .readable-profile-heading, .readable-section-heading { align-items: flex-start; flex-direction: column; }
  .readable-section-heading p { text-align: left; }
  .readable-control-provenance { grid-template-columns: 1fr; }
  .editable-row .toggle-label { padding-bottom: 0; }
  .format-policy-fields > div { grid-column: auto; }
  .validation-panel { align-items: stretch; flex-direction: column; }
  .organization-management-heading, .organization-card, .tenant-settings-context { align-items: stretch; flex-direction: column; }
  .organization-management-heading .primary-button, .organization-card-actions .secondary-button, .tenant-settings-context .secondary-button { width: 100%; }
}

@media (max-width: 420px) {
  .topbar { grid-template-columns: minmax(130px, 1fr) auto; }
  .tenant-selector select { width: 42vw; }
  .overview-grid, .secondary-column { grid-template-columns: 1fr; }
  .atelier-toolbar { flex-wrap: wrap; }
  .atelier-safety { flex-basis: 100%; margin-left: 0; }
  .atelier-stepper button { min-width: 0; font-size: 0; }
  .atelier-stepper button span { flex: 0 0 1.25rem; font-size: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .primary-button:hover { transform: none; }
}

/* Lecture orientée vers la correction et la décision. */
.role-help { padding: 1rem; }
.role-help-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.role-help-heading .eyebrow { margin: 0; }
.role-help-dismiss {
  display: inline-grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 1.05rem;
}
.role-help-dismiss:hover, .role-help-dismiss:focus-visible { color: var(--forest); background: var(--mint); }
.role-help h2 { margin: 0.35rem 0 0.6rem; font-size: 1rem; }
.role-help p { font-size: 0.83rem; line-height: 1.6; }
.delivery-updates { display: flex; align-items: center; flex-wrap: wrap; gap: 0.7rem; padding: 1rem; margin-bottom: 1rem; border-left: 4px solid var(--forest); }
.delivery-updates[hidden] { display: none; }
.processing-stage { font-size: 0.75rem; color: var(--muted); }

/* Each logical deliverable owns its own version history. */
.deliverable-group + .deliverable-group { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.deliverable-group h3 { margin: 0 0 .25rem; overflow-wrap: anywhere; }
.upload-target-label { margin-bottom: 1rem; }

.deliverable-summary { margin: 0 0 1.1rem; color: var(--muted); line-height: 1.6; }
.revision-intake { display: grid; gap: .75rem; padding: 1rem; margin: .8rem 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft, #f5f8fa); }
.revision-intake[hidden], .revision-conflict[hidden] { display: none; }
.revision-intake label { display: grid; gap: .4rem; }
.revision-intake p { margin: 0; line-height: 1.6; }
.revision-conflict { border: 1px solid #bf780e; background: #fff7e6; color: #533700; border-radius: 12px; padding: 1rem; margin-top: 1rem; }
.revision-conflict button { margin: .4rem .5rem 0 0; }
.deliverable-acceptance { margin: .4rem 0 .8rem; font-size: .84rem; line-height: 1.6; }
.deliverable-acceptance .result-button { margin-left: .5rem; }
.deliverable-history > summary { cursor: pointer; padding: .8rem .25rem; color: var(--muted); font-weight: 600; }
.delivery-changes { margin: .5rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Shared workflow surfaces: portfolio, reservations and contextual corrections. */
.work-queue-nav { margin-bottom: .8rem; }
.work-queue-page { min-width: 0; padding: 1.5rem; }
.work-queue-page .panel-heading { margin-bottom: 1.25rem; }
.work-queue-filters { display: grid; grid-template-columns: minmax(200px, 2fr) minmax(180px, 1fr) auto auto; gap: 1rem; align-items: end; }
.workflow-field { display: grid; gap: .45rem; color: var(--ink); font-size: .875rem; font-weight: 600; min-width: 0; }
.workflow-field input, .workflow-field select, .workflow-field textarea {
  width: 100%; min-width: 0; min-height: 44px; padding: .65rem .75rem; border: 1px solid var(--muted);
  border-radius: .5rem; background: var(--surface); color: var(--ink); font: inherit; font-weight: 400;
}
.workflow-field textarea { resize: vertical; line-height: 1.55; }
.workflow-field :focus-visible, .reservation-card:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; }
.workflow-checkbox { display: flex; flex-direction: row-reverse; align-items: center; justify-content: start; min-height: 44px; }
.workflow-checkbox input { width: 20px; min-height: 20px; flex: 0 0 20px; }
.work-queue-summary { color: var(--muted); font-size: .9rem; line-height: 1.5; margin: 1.25rem 0; }
.work-queue-content { overflow-x: auto; }
.work-queue-table { width: 100%; border-collapse: collapse; font-size: .88rem; line-height: 1.5; }
.work-queue-table th { background: var(--surface-subtle); color: var(--ink); text-align: left; font-weight: 600; }
.work-queue-table th, .work-queue-table td { padding: .95rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.work-queue-table td:first-child { width: 38%; overflow-wrap: anywhere; }
.queue-context { display: block; margin-top: .2rem; }
.workflow-status { display: inline-block; font-size: .82rem; padding: .25rem .55rem; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: .4rem; }
.reservations-section { scroll-margin-top: 100px; }
.reservation-card { border: 1px solid var(--line); border-left: 4px solid var(--amber); padding: 1rem; border-radius: .6rem; margin-top: 1rem; }
.reservation-card[data-status="RESOLVED"] { border-left-color: var(--mbdd-color-state-pass); }
.reservation-card[data-status="INFORMATION"] { border-left-color: var(--blue); }
.reservation-description, .reservation-event p { white-space: pre-wrap; overflow-wrap: anywhere; }
.reservation-history summary { min-height: 44px; padding: .7rem 0; cursor: pointer; font-weight: 600; }
.reservation-event { border-top: 1px solid var(--line); padding: .85rem 0; }
.reservation-action-form, .reservation-create-form { display: grid; gap: .9rem; margin-top: .75rem; max-width: 760px; }
.reservation-action-form button, .reservation-create-form button { justify-self: start; }
.revision-context { border: 1px solid var(--line); padding: 1rem; border-radius: .6rem; background: var(--surface-subtle); }
.revision-context:empty { display: none; }
.revision-context h3 { margin-top: 0; font-size: 1rem; }
.deliverable-acceptance button { margin-left: .75rem; }
@media (max-width: 1200px) {
  .work-queue-filters { grid-template-columns: minmax(160px, 2fr) minmax(140px, 1fr); }
}
@media (max-width: 680px) {
  .work-queue-page { padding: 1rem; }
  .work-queue-filters { grid-template-columns: minmax(0, 1fr); }
  .work-queue-table, .work-queue-table tbody, .work-queue-table tr, .work-queue-table td { display: block; width: 100%; }
  .work-queue-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .work-queue-table td:first-child { width: 100%; }
  .work-queue-table tr { border: 1px solid var(--line); border-radius: .5rem; margin-bottom: 1rem; padding: .5rem; }
  .work-queue-table td { padding: .4rem; border: 0; }
  .reservation-card { padding: .75rem; }
  .deliverable-acceptance button { margin: .5rem 0 0; }
}

/* Preparation and provisional trials share the profile workbench. */
.profile-trial-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 16px 0;
}
.profile-trial-controls label { flex: 1 1 260px; min-width: 0; }
.profile-trial-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px 12px;
  padding: 14px;
  margin: 10px 0;
  border: 1px solid var(--border, #d7e2dd);
  border-radius: 10px;
  background: #fff;
}
.profile-trial-control p, .profile-trial-control small { grid-column: 1 / -1; margin: 0; overflow-wrap: anywhere; }
.profile-save-status { max-width: 380px; overflow-wrap: anywhere; }
.profile-publication-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.reference-evidence-chip .reference-duplicate-hint { flex-basis: 100%; color: #875314; }
.atelier-dialog input[readonly] { background: #f4f7f5; color: #52665e; }
@media (max-width: 720px) {
  .profile-trial-controls > button { flex: 1 1 100%; }
  .atelier-footer-actions { flex-wrap: wrap; }
}

/* Shared dossier forms: consistent controls and inline support within dialogs. */
.case-form-grid > label { align-content: start; }
.case-form-grid input, .case-form-grid select { min-height: 44px; font: inherit; }
.dialog input::placeholder, .dialog textarea::placeholder { color: #64736e; opacity: 1; font-weight: 400; }
.dialog details > summary { cursor: pointer; }
.dialog [hidden] { display: none !important; }
.provider-picker { min-width: 0; }
.provider-picker label { margin-bottom: 0.35rem; }
.provider-picker-control { position: relative; font-size: 0.75rem; }
.provider-picker-control input { width: 100%; padding-right: 3rem; }
.provider-picker-toggle { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border: 0; border-left: 1px solid var(--line); border-radius: 0 6px 6px 0; background: transparent; color: var(--forest); cursor: pointer; font: inherit; font-size: 1.25rem; }
.provider-picker-toggle:hover, .provider-picker-toggle[aria-expanded=true] { background: var(--mint); }
.provider-picker-toggle:focus-visible { outline: 2px solid var(--forest); outline-offset: -3px; }
.provider-menu { margin-top: 0.35rem; padding: 0.25rem; border: 1px solid var(--line); border-radius: 6px; background: white; }
.provider-menu > .field-hint, .provider-menu > button { margin: 0.35rem 0.55rem; }
.text-button { padding: 0.35rem 0; border: 0; background: transparent; color: var(--forest); text-decoration: underline; cursor: pointer; font: inherit; font-size: 0.75rem; }
.provider-results { max-height: 220px; overflow: auto; }
.provider-results [role=option] { display: block; width: 100%; padding: 0.55rem; color: var(--ink); background: white; border: 0; text-align: left; cursor: pointer; }
.provider-results [aria-selected=true], .provider-results [role=option]:hover { background: var(--mint); }
.catalog-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.catalog-row span { min-width: 0; }
#case-catalog-dialog .case-setting-card { margin-top: 1.25rem; padding: 1.15rem; border: 1px solid var(--line); border-radius: 12px; }
.case-setting-card h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.case-setting-heading { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.case-setting-heading > div { min-width: 0; }
.case-setting-heading > button { flex-shrink: 0; }
.case-setting-card .field-hint { font-size: .75rem; line-height: 1.5; }
.case-setting-footnote { margin-bottom: 0; }
.case-setting-card .form-message:empty, #case-catalog-status:empty { display: none; }
.case-domain-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.domain-identity { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: .7rem; }
.domain-identity strong { overflow-wrap: anywhere; font-size: .9rem; font-weight: 650; }
.domain-identity > button { font-size: .75rem; flex-shrink: 0; }
.dialog .domain-availability { display: flex; gap: .5rem; align-items: center; margin: 0; min-width: 6.5rem; cursor: pointer; }
.dialog .domain-availability input { width: 1.1rem; height: 1.1rem; padding: 0; accent-color: var(--forest); }
.case-domain-row > .form-message { grid-column: 1 / -1; margin-bottom: 0; }
.domain-rename-fields { display: flex; flex: 1; align-items: end; gap: .65rem; flex-wrap: wrap; }
.domain-rename-fields[hidden] { display: none; }
.dialog .domain-rename-fields label { flex: 1 1 10rem; margin: 0; }
.domain-add-form { margin-top: 1rem; padding: .85rem 1rem; border-radius: 10px; background: var(--surface-subtle); }
.domain-add-form .dialog-actions { margin-top: .7rem; }
.retention-setting { display: flex; gap: 1rem; align-items: end; flex-wrap: wrap; margin: 1rem 0 .65rem; }
.dialog .retention-setting > label { margin: 0; }
.retention-value { display: flex; align-items: center; gap: .6rem; }
.dialog .retention-value input { width: 6rem; }
.retention-example { background: var(--surface-subtle); padding: .8rem 1rem; border-radius: 8px; margin-bottom: .5rem; font-size: .8rem; line-height: 1.5; }
.provider-directory-toolbar { display: flex; align-items: end; gap: 1rem; margin-bottom: .7rem; }
.dialog .provider-directory-toolbar > label { flex: 1; margin-bottom: 0; }
.provider-directory-toolbar > button { flex-shrink: 0; }
@media (max-width: 600px) {
  .case-setting-heading, .provider-directory-toolbar { flex-direction: column; align-items: stretch; }
  .domain-identity { flex-direction: column; align-items: start; gap: .3rem; }
  .case-domain-row { align-items: start; }
  .domain-rename-fields { flex-direction: column; align-items: stretch; }
  .dialog .domain-rename-fields label { flex-basis: auto; }
  .retention-setting { align-items: stretch; flex-direction: column; }
}

.case-form-grid textarea { font: inherit; }
.catalog-row > .secondary-button { flex-shrink: 0; max-width: 12rem; }
@media (max-width: 600px) { .catalog-row { align-items: flex-start; flex-direction: column; } }

/* Publication and file evidence are separate decisions in the profile workshop. */
.profile-publication-actions > label { flex: 1 0 100%; display: grid; gap: 6px; }
.profile-publication-actions > label textarea { width: 100%; min-height: 5rem; resize: vertical; }
#profile-validation-level { flex: 1 0 100%; margin: 0; }
.qualification-expectation { margin: 10px 0; padding: 12px; border: 1px solid #d5e5dc; border-radius: 8px; }
.qualification-expectation .checkbox-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.qualification-expectation input[type="checkbox"] { width: auto; margin: 0; }
.reference-evidence-chip { flex-wrap: wrap; }

/* Documentary examination shares reception, requests and version history. */

.document-examination .instruction-work { grid-template-columns: minmax(0, 1fr); }
.reception-assessment .report-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }

/* Reception: the same dossier, requirements and versions share one examination flow. */
.expected-deliverable-editor { margin-block: 1rem; padding: 1rem; border: 1px solid var(--border, #d7e4df); border-radius: 12px; }
.expected-deliverable-editor summary, .motivation-guide summary { cursor: pointer; font-weight: 700; color: #00614d; }
.expected-deliverable-form, .motivation-guide { display: grid; gap: 1rem; }
.expected-deliverable-form { margin-top: 1rem; max-width: 760px; }
.expected-deliverable-form label, .motivation-guide label, .reception-filters label { display: grid; gap: .4rem; }
.expected-deliverable { border-inline-start: 4px solid #adbd77; }
.expected-instructions { padding: .8rem 1rem; background: #f3f7f4; border-radius: 8px; white-space: pre-wrap; }
.motivation-guide { grid-column: 1 / -1; padding: 1rem; border: 1px solid #d7e4df; border-radius: 10px; }
.motivation-guide[open] > :not(summary) { margin-top: .8rem; }
.motivation-guide:not([open]) > :not(summary) { display: none; }
.document-preview { margin-block: 1rem; }
.document-preview-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; margin-bottom: .8rem; }
.document-preview-toolbar label { display: grid; gap: .3rem; }
.document-preview-body { overflow: auto; max-height: 72vh; background: #e7ecea; border-radius: 8px; }
.document-preview-body canvas, .document-preview-body img { display: block; width: 100%; height: auto; object-fit: contain; }
.document-preview-body[data-zoom="1.5"] canvas { width: 150%; max-width: none; }
.document-preview-body[data-zoom="2"] canvas { width: 200%; max-width: none; }
.reception-portfolio { width: min(1060px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 1.5rem; overflow: auto; }
.reception-filters { display: flex; align-items: end; flex-wrap: wrap; gap: .8rem; margin-block: 1rem; }
.reception-filters label { flex: 1 1 240px; }
.reception-acceptance-list { display: grid; gap: 1rem; }
.reception-acceptance { padding: 1rem; border: 1px solid #d7e4df; border-radius: 10px; }
.reception-acceptance h3 { margin-top: 0; }
.reception-pagination { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
@media (max-width: 650px) { .reception-portfolio { padding: 1rem; } .reception-portfolio .panel-heading { align-items: start; } }

/* Qualification des écarts dans le parcours commun de réception. */
.control-review-editor { display: grid; gap: .85rem; margin: .5rem 0; padding: 1rem; border: 1px solid var(--border, #cad7d4); border-radius: .7rem; min-width: 0; }
.control-review-editor[hidden] { display: none; }
.control-review-editor legend { font-weight: 650; padding: 0 .3rem; }
.control-review-editor label { display: grid; gap: .4rem; }
.control-review-editor label[hidden] { display: none; }
.control-review-editor select, .control-review-editor textarea { width: 100%; min-width: 0; }
.control-review-groups article, .control-review-summary article { padding: .8rem; border-left: 3px solid #256f63; background: #f1f7f5; margin: .6rem 0; overflow-wrap: anywhere; }
.instruction-control-alert { color: #973d32; font-size: .9rem; }

/* Langage visuel du portail : vecteurs décoratifs, états explicites et accents sobres. */
:root {
  --ui-icon-folder: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%207V5a2%202%200%200%201%202-2h5l3%203h6a2%202%200%200%201%202%202v2M3%207h6l3%203h10l-3%2010H3Z%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-water: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203C9%207%205%2011%205%2015a7%207%200%200%200%2014%200c0-4-4-8-7-12ZM8%2015a4%204%200%200%200%204%204%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-network: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%203v6h14V3M12%209v12M3%2015h4M17%2015h4%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-review: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M14%203H5v18h14V8ZM14%203v5h5M8%2012h8M8%2016h5%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-clock: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%208v5l3%202M21%2012a9%209%200%201%201-18%200%209%209%200%200%201%2018%200%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-attention: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203%202%2021h20ZM12%209v5M12%2017v1%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-return: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m9%204-5%205%205%205M4%209h10a6%206%200%200%201%200%2012%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-check: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m8%2012%203%203%205-6M21%2012a9%209%200%201%201-18%200%209%209%200%200%201%2018%200%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-send: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m3%203%2018%209-18%209%204-9ZM7%2012h14%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-stop: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%209h6v6H9ZM21%2012a9%209%200%201%201-18%200%209%209%200%200%201%2018%200%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-cross: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m9%209%206%206m-6%200%206-6M21%2012a9%209%200%201%201-18%200%209%209%200%200%201%2018%200%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-help: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%209a3%203%200%201%201%204%203c-1%20.4-1%201-1%202m0%203h.01M21%2012a9%209%200%201%201-18%200%209%209%200%200%201%2018%200%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-upload: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2016V3m-5%205%205-5%205%205M4%2015v6h16v-6%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-play: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m9%207%208%205-8%205ZM21%2012a9%209%200%201%201-18%200%209%209%200%200%201%2018%200%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-message: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%204h16v12H9l-5%204ZM8%208h8M8%2012h5%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-archive: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%203h18v5H3Zm2%205v13h14V8M9%2012h6%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-info: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2011v6m0-10h.01M21%2012a9%209%200%201%201-18%200%209%209%200%200%201%2018%200%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-users: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2021v-2a5%205%200%200%201%2010%200v2m3-7a4%204%200%200%201%204%204v3M13%207a4%204%200%201%201-8%200%204%204%200%200%201%208%200m4-4a4%204%200%200%201%200%208%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-map: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m3%205%206-2%206%202%206-2v16l-6%202-6-2-6%202Zm6-2v16m6-14v16%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-settings: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%206h16M4%2012h16M4%2018h16M8%203v6m8%200v6m-6%200v6%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-lock: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%2010h12v11H6Zm2%200V6a4%204%200%200%201%208%200v4m-4%205v2%22%2F%3E%3C%2Fsvg%3E");
  --state-ink: var(--mbdd-color-state-not-evaluable);
  --state-soft: var(--mbdd-color-background-surface-strong);
  --state-icon: var(--ui-icon-info);
}
.ui-icon { display:inline-block; width:19px; height:19px; flex:0 0 19px; background:currentColor; mask:var(--state-icon) center / contain no-repeat; }
.ui-icon-folder { --state-icon:var(--ui-icon-folder); }
.ui-icon-water { --state-icon:var(--ui-icon-water); }
.ui-icon-network { --state-icon:var(--ui-icon-network); }
.ui-icon-review { --state-icon:var(--ui-icon-review); }
.ui-icon-clock { --state-icon:var(--ui-icon-clock); }
.ui-icon-attention { --state-icon:var(--ui-icon-attention); }
.ui-icon-return { --state-icon:var(--ui-icon-return); }
.ui-icon-check { --state-icon:var(--ui-icon-check); }
.ui-icon-send { --state-icon:var(--ui-icon-send); }
.ui-icon-stop { --state-icon:var(--ui-icon-stop); }
.ui-icon-cross { --state-icon:var(--ui-icon-cross); }
.ui-icon-help { --state-icon:var(--ui-icon-help); }
.ui-icon-upload { --state-icon:var(--ui-icon-upload); }
.ui-icon-play { --state-icon:var(--ui-icon-play); }
.ui-icon-message { --state-icon:var(--ui-icon-message); }
.ui-icon-archive { --state-icon:var(--ui-icon-archive); }
.ui-icon-info { --state-icon:var(--ui-icon-info); }
.ui-icon-users { --state-icon:var(--ui-icon-users); }
.ui-icon-map { --state-icon:var(--ui-icon-map); }
.ui-icon-settings { --state-icon:var(--ui-icon-settings); }
.ui-icon-lock { --state-icon:var(--ui-icon-lock); }

/* Les cinq familles portent le sens ; la forme précise l'état dans chaque famille. */
.case-tone-info, .status-uploaded, .status-pending_control, .status-analyzing, .status-analyzed, .status-under_review, .status-queued, .status-running, .status-retry_wait, .status-succeeded,
[data-state="UPLOADED"], [data-state="PENDING_CONTROL"], [data-state="ANALYZING"], [data-state="ANALYZED"], [data-state="UNDER_REVIEW"], [data-state="QUEUED"], [data-state="RUNNING"], [data-state="RETRY_WAIT"], [data-state="SUCCEEDED"], [data-state="REVIEW"], .reservation-status-answered {
  --state-ink:var(--mbdd-color-state-info); --state-soft:var(--mbdd-color-state-info-soft); --state-icon:var(--ui-icon-clock);
}
.case-tone-attention, .status-validated_with_reservations, .status-partial, .status-not_evaluable, .status-expired,
[data-state="VALIDATED_WITH_RESERVATIONS"], [data-state="NOT_EVALUABLE"], [data-state="PARTIAL"], .reservation-status-open {
  --state-ink:var(--mbdd-color-state-warning); --state-soft:var(--mbdd-color-state-warning-soft); --state-icon:var(--ui-icon-attention);
}
.case-tone-danger, .status-rejected, .status-fail, .status-failed, .status-error, .status-dead_lettered,
[data-state="REJECTED"], [data-state="FAIL"], [data-state="ERROR"], [data-state="FAILED"], [data-state="DEAD_LETTERED"] {
  --state-ink:var(--mbdd-color-state-fail); --state-soft:var(--mbdd-color-state-fail-soft); --state-icon:var(--ui-icon-cross);
}
.case-tone-positive, .status-validated, .status-pass, .status-success, .status-accepted,
[data-state="VALIDATED"], [data-state="PASS"], [data-state="SUCCESS"], .reservation-status-resolved {
  --state-ink:var(--mbdd-color-state-pass); --state-soft:var(--mbdd-color-state-pass-soft); --state-icon:var(--ui-icon-check);
}
.case-tone-neutral, .status-active, .status-archived, .status-disabled, .status-stored, .status-draft, .status-published, .status-retired, .status-cancelled, .status-pending, .status-revoked,
[data-state="STORED"], [data-state="ARCHIVED"], [data-state="CANCELLED"], .reservation-status-information {
  --state-ink:var(--mbdd-color-state-not-evaluable); --state-soft:var(--mbdd-color-background-surface-strong); --state-icon:var(--ui-icon-info);
}
.status-error, .status-failed, .status-dead_lettered, [data-state="ERROR"], [data-state="FAILED"], [data-state="DEAD_LETTERED"] { --state-icon:var(--ui-icon-stop); }
.status-not_evaluable, [data-state="NOT_EVALUABLE"] { --state-icon:var(--ui-icon-help); }
.status-under_review, [data-state="UNDER_REVIEW"], [data-state="REVIEW"], .reservation-status-answered { --state-icon:var(--ui-icon-review); }
.status-pending_control, [data-state="PENDING_CONTROL"] { --state-icon:var(--ui-icon-play); }
.status-stored, [data-state="STORED"] { --state-icon:var(--ui-icon-folder); }
.status-uploaded, [data-state="UPLOADED"] { --state-icon:var(--ui-icon-upload); }
.status-archived, .status-retired, [data-state="ARCHIVED"] { --state-icon:var(--ui-icon-archive); }
.status-pending { --state-icon:var(--ui-icon-send); }
.status-disabled, .status-revoked { --state-icon:var(--ui-icon-lock); }
.reservation-status-open { --state-icon:var(--ui-icon-message); }
.status-pill, .state-indicator { display:inline-flex; align-items:flex-start; gap:6px; width:fit-content; max-width:100%; padding:5px 8px; border-radius:6px; color:var(--state-ink); background:var(--state-soft); font-size:12px; line-height:1.5; font-weight:600; vertical-align:middle; overflow-wrap:anywhere; }
.status-pill::before, .state-indicator::before, .control-state::before, .instruction-decision-status::before, .login-message::before, .toast::before {
  content:""; display:inline-block; flex:0 0 17px; width:17px; height:17px; margin-top:1px; background:currentColor; mask:var(--state-icon) center / contain no-repeat;
}
.case-tone-danger { color:var(--state-ink); }

/* Instruction : la conclusion automatique et la décision restent deux indications distinctes. */
.instruction-summary[data-state] { background:var(--state-soft); border-left-color:var(--state-ink); }
.instruction-summary .instruction-decision-status { display:flex; align-items:flex-start; gap:8px; color:var(--state-ink); }
.instruction-control .control-state { display:flex; align-items:center; gap:6px; color:var(--state-ink); }
.comparison-group > summary .state-indicator { margin-left:6px; }
.reservation-card { border-left-width:1px; border-left-color:var(--line); }
.reservation-card[data-status="RESOLVED"], .reservation-card[data-status="INFORMATION"] { border-left-color:var(--line); }
.portal-delivery-state { margin-top:8px; }

/* Configuration métier et administration : pas de verdict coloré sur une obligation, un rôle ou un simple format. */
.requirement-badge.required, .requirement-badge.optional, .requirement-badge.ignored, .security-badge, .format-badge { color:var(--mbdd-color-text-soft); background:var(--mbdd-color-background-surface-strong); }
.readiness-badge.ready { color:var(--mbdd-color-state-pass); background:var(--mbdd-color-state-pass-soft); }
.readiness-badge.warning, .requirement-badge.to_confirm, .impact-badge.review_required { color:var(--mbdd-color-state-warning); background:var(--mbdd-color-state-warning-soft); }
.impact-badge.blocking { color:var(--mbdd-color-state-fail); background:var(--mbdd-color-state-fail-soft); }
.qualification-callout { background:var(--surface-subtle); border-color:var(--line); }
#deposit-receipt > .eyebrow { color:var(--mbdd-color-state-info); }
#upload-policy-badge { color:var(--mbdd-color-state-info); background:var(--mbdd-color-state-info-soft); }
.communication-content .communication-decision { font-size:14px; }
.communication-request { border-left-color:var(--mbdd-color-state-warning); }
.communication-request[data-kind="INFORMATION"] { border-left-color:var(--line); }

/* Connexion : une invitation en préparation ou une reconnexion reste une information. */
.status-viewer::before, .status-contributor::before, .status-reviewer::before, .status-manager::before { display:none; }
.status-active { --state-icon:var(--ui-icon-check); }
.form-message[data-state], #ogc-preview-status[data-state] { color:var(--state-ink); }
.form-message[data-state]:empty { min-height:0; }
.readiness-badge.ready { --state-icon:var(--ui-icon-check); }
.readiness-badge.warning { --state-icon:var(--ui-icon-attention); }
.readiness-badge { display:inline-flex; align-items:center; gap:5px; }
.readiness-badge::before { content:""; width:15px; height:15px; flex:0 0 15px; background:currentColor; mask:var(--state-icon) center / contain no-repeat; }
.control-review-groups article, .control-review-summary article { background:var(--surface-subtle); border-left-color:var(--line); }
[data-treatment="RESULT_CONTESTED"] { --state-ink:var(--mbdd-color-state-info); --state-icon:var(--ui-icon-review); }
[data-treatment="DEVIATION_ACCEPTED"], [data-treatment="UNASSESSED_ACCEPTED"], [data-treatment="CORRECTION_REQUIRED"] { --state-ink:var(--mbdd-color-state-warning); --state-icon:var(--ui-icon-attention); }
.control-review-groups [data-treatment] > strong, .control-review-summary [data-treatment] > strong { display:flex; align-items:flex-start; gap:7px; color:var(--state-ink); }
[data-treatment] > strong::before { content:""; width:17px; height:17px; flex:0 0 17px; background:currentColor; mask:var(--state-icon) center / contain no-repeat; }
.login-message { --state-icon:var(--ui-icon-stop); display:flex; align-items:flex-start; gap:8px; color:var(--mbdd-color-state-fail); background:var(--mbdd-color-state-fail-soft); }
.login-message.success { --state-icon:var(--ui-icon-check); color:var(--mbdd-color-state-pass); background:var(--mbdd-color-state-pass-soft); }
.login-message.information { --state-icon:var(--ui-icon-info); color:var(--mbdd-color-state-info); background:var(--mbdd-color-state-info-soft); }
#invitation-summary[data-state="SUCCESS"] { padding:12px; border-radius:6px; }
.toast-success { --state-icon:var(--ui-icon-check); color:var(--mbdd-color-state-pass); background:var(--mbdd-color-state-pass-soft); border-inline-start:4px solid currentColor; }
@media (forced-colors:active) {
  .ui-icon, .status-pill::before, .state-indicator::before, .control-state::before, .instruction-decision-status::before, .login-message::before, .toast::before, .readiness-badge::before, [data-treatment] > strong::before { background:CanvasText; forced-color-adjust:none; }
  .status-pill, .state-indicator, .case-situation-label { border:1px solid CanvasText; }
}

.ui-icon-plus { --state-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%205v14M5%2012h14%22%2F%3E%3C%2Fsvg%3E"); }

.ui-icon-download { --state-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203v13m-5-5%205%205%205-5M4%2015v6h16v-6%22%2F%3E%3C%2Fsvg%3E"); }

.ui-icon-edit { --state-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m15%204%205%205M4%2020l5-1L21%207l-5-5L4%2014Z%22%2F%3E%3C%2Fsvg%3E"); }

/* Un catalogue et une sélection partagés pour les configurations de contrôle. */
.configuration-choice { display: grid; gap: .8rem; }
.configuration-choice > label { font-weight: 700; }
.configuration-choice > select { width: 100%; min-height: 2.8rem; }
.new-case-model-fields { display: grid; gap: .65rem; padding-block: .75rem; border-block: 1px solid var(--line); }
.new-case-model-fields > label, .new-case-model-fields .configuration-choice > label { margin: 0; font-weight: 700; }
.new-case-model-fields > select { width: 100%; }
.new-case-model-fields .configuration-choice-status { padding: .75rem; font-size: .8rem; }
.new-case-model-fields .configuration-choice-status p { margin: .35rem 0; }
.configuration-choice .other-models-toggle, .configuration-choice .model-remedy { justify-self: start; width: fit-content; }
.configuration-choice-status .model-remedy { display: block; margin-top: .4rem; }
.configuration-choice-status > select { width: 100%; margin-top: .6rem; }
.configuration-choice-summary, .configuration-choice-status, .configuration-remedy {
  padding: 1rem 1.2rem; border: 1px solid var(--border, #cedde0); border-radius: 12px; background: var(--surface-soft, #f3f7f7);
}
.configuration-choice-summary p, .configuration-choice-status p { margin: .6rem 0; }
.configuration-choice-summary details { margin-top: .8rem; }
.configuration-choice-summary label { display: grid; gap: .5rem; margin-top: 1rem; }
.configuration-choice-summary.publication-blocked { border-color: var(--danger, #a43128); background: #fff8f7; }
.configuration-publication-profile + .configuration-publication-profile { margin-top: 1.25rem; }
.configuration-publication-profile h4 { margin: 1rem 0 .4rem; }
.configuration-mode { font-weight: 700; color: var(--primary, #205d69); }
.configuration-remedy { margin-top: 1rem; }
.configuration-remedy button { margin: .4rem .5rem .2rem 0; }
#packs-dialog .atelier-main { height: 100%; }
#configuration-editor { display: flex; flex: 1; min-height: 0; flex-direction: column; overflow: hidden; }
#configuration-tools { width: 100%; }
#configuration-tools .inline-actions { flex-wrap: wrap; justify-content: flex-start; padding-top: .8rem; }
#configuration-diagnostic { margin: 1rem 0; }
#configuration-diagnostic > summary { margin-bottom: .8rem; }
.configuration-catalog { padding: 1rem; overflow: auto; flex: 1; min-height: 0; }
.configuration-catalog .catalog-heading { position: static; }
.configuration-catalog .rule-profile-list { max-height: none; overflow: visible; }
.configuration-catalog .rule-profile-card > div, #configuration-trials .rule-profile-card > div { min-width: 0; overflow-wrap: anywhere; }
.configuration-catalog .rule-profile-card > button, #configuration-trials .rule-profile-card > button { justify-self: start; max-width: 100%; }
#configuration-editor .pack-stepper { margin-top: 1rem; }
#configuration-detail { display: grid; gap: 1rem; padding: 1rem; overflow: auto; }
#configuration-detail > button { justify-self: start; }
#configuration-publication-review { margin-bottom: 1rem; }
#configuration-publication-comment { width: 100%; margin-bottom: 1rem; }
#configuration-trials .rule-profile-card { align-items: center; }
#rules-dialog[data-configuration-context="true"] .profile-publication-actions { display: none; }
@media (max-width: 650px) {
  .configuration-catalog .rule-profile-card, #configuration-trials .rule-profile-card { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

/* Delivery models: prescriptions remain readable at narrow widths. */
.prescription-editor { display: grid; gap: 1rem; margin: 1rem 0; }
.prescription-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border: 1px solid var(--border, #d3e0e4); border-radius: 12px; padding: 1rem; min-width: 0; }
.prescription-row label { display: grid; gap: .5rem; min-width: 0; }
.prescription-row label:last-of-type { grid-column: 1 / -1; }
.prescription-row button { justify-self: start; }
.prescription-summary { padding-left: 1.3rem; display: grid; gap: .75rem; }
.prescription-summary .field-hint { display: block; }
.prescription-summary p { margin: .25rem 0; }
.model-prescriptions { border-top: 1px solid var(--border, #d3e0e4); padding-top: 1rem; }
@media (max-width: 700px) { .prescription-row { grid-template-columns: 1fr; } }
.decision-selection { display: grid; gap: .6rem; max-height: 18rem; overflow: auto; margin: 1rem 0; }
.decision-selection label { justify-content: start; text-align: left; margin:0; }
.decision-preview { max-height: 24rem; overflow: auto; overflow-wrap: anywhere; }
.requirement-settings { margin: .75rem 0; }
.requirement-settings > summary { color: var(--accent, #21616e); cursor: pointer; }
.requirement-narrative { font-size: 1.05rem; line-height: 1.6; }
.requirement-correction { border-left: 3px solid var(--accent, #21616e); padding-left: .8rem; }
.delivery-starters { padding: 0 0 1.25rem; }
.delivery-starters > h3 { margin: 0 0 .5rem; }
.delivery-starters > p { margin: .5rem 0 1rem; }
.delivery-starters + .catalog-heading { margin-top: 0; }
#delivery-model-starters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
#delivery-model-starters .rule-profile-card { grid-template-columns: minmax(0, 1fr); gap: .75rem; border: 1px solid var(--line); background: white; }
.model-protected, .model-status { display: inline-block; padding: .2rem .55rem; border-radius: 6px; font-size: .8rem; font-weight: 700; }
.model-protected { background: #e6f3ef; color: #245f51; margin-left: .5rem; }
.model-catalog-badges .model-status { font-size: .8rem; margin: 0; }
.model-catalog-badges .field-hint { font-size: .85rem; margin: 0; }
.model-catalog-badges .model-status-draft { background: #fff0cb; color: #715009; }
.model-catalog-badges .model-status-published { background: #e0f2e8; color: #215e43; }
.model-catalog-badges .model-status-retired { background: #e7ebee; color: #46545e; }
.model-catalog-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(12rem, 1fr); gap: 1rem; }
.model-catalog-filters label { display: grid; gap: .4rem; }
.model-catalog-filters input, .model-catalog-filters select { width: 100%; }
.model-catalog-badges { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-bottom: .6rem; }
.model-catalog-actions { display: flex; align-items: flex-end; flex-direction: column; gap: .5rem; }
.model-catalog-actions button { max-width: 100%; }
.model-catalog-card { align-items: start; }
.model-catalog-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .8rem; margin: .5rem 0; }
.model-catalog-identity .model-reference { display: inline-block; margin: 0; padding: .2rem .5rem; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--ink); font-size: .8rem; font-weight: 700; overflow-wrap: anywhere; }
.model-catalog-identity .field-hint { margin: 0; font-size: .8rem; }
.model-catalog-content { margin: .65rem 0; font-size: .875rem; line-height: 1.5; }
.model-editor-identity { margin: 0 0 .75rem; overflow-wrap: anywhere; }
.model-catalog-actions .danger-button { color: #9b302c; background: white; border-color: #d8b0ad; }
.model-catalog-actions .danger-button:hover { background: #fff1ef; }
.model-catalog-description > summary { color: var(--accent, #21616e); cursor: pointer; font-size: .875rem; }
.model-catalog-description > p { line-height: 1.5; }
.delivery-starters .model-catalog-description { margin-top: .65rem; }
@media (max-width: 650px) {
  #delivery-model-starters, .model-catalog-filters { grid-template-columns: minmax(0, 1fr); }
  .model-catalog-actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
}
.delivery-starters .rule-profile-card h4 { margin: 0; line-height: 1.4; }
.delivery-starters .rule-profile-card p { margin: .45rem 0 0; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.delivery-progress { background: var(--surface, #f4f8f8); border: 1px solid var(--border, #d3e0e4); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.delivery-progress-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 1rem; }
.delivery-progress-counts strong, .delivery-progress-counts span { display: block; }
.delivery-progress-counts strong { font-size: 1.5rem; color: var(--accent, #21616e); }
.delivery-next-actions { display: grid; gap: .75rem; }
.delivery-next-action { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
@media (max-width: 700px) { .delivery-next-action { flex-wrap: wrap; } }
.rule-illustration svg { width: 100%; max-width: 680px; display: block; background: white; border-radius: 8px; margin-top: .5rem; }
.prescription-row textarea { font: inherit; }
/* Three authoring spaces share the same underlying fields and error targets. */
#rule-profile-stepper.charter-stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#rules-dialog.atelier-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
#profile-workspace-content { min-height: 0; overflow: auto; }
#profile-workspace-content > .atelier-step { overflow: visible; }
#rules-dialog .atelier-step + .atelier-step:not([hidden]) { border-top: 1px solid var(--border, #d3e0e4); }
@media (max-width: 700px) {
  #rule-profile-stepper.charter-stepper button { font-size: .75rem; flex-wrap: wrap; }
  #rule-profile-stepper.charter-stepper button small { flex-basis: 100%; }
}
.reference-batch-status { margin-block: 1rem; }
.reference-batch-item { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .6rem .8rem; border-bottom: 1px solid var(--border, #d2e0e4); }
.reference-batch-item strong { flex: 1 1 16rem; overflow-wrap: anywhere; }
.reference-batch-item .form-message { flex-basis: 100%; }

.request-description { min-width: 0; margin: 0.6rem 0; }
.request-description summary { cursor: pointer; overflow-wrap: anywhere; }
.request-description-excerpt { white-space: normal; }
.request-description-action { margin-left: 0.5rem; color: var(--forest); font-weight: 700; text-decoration: underline; font-size: 0.75rem; }
.request-description[open] .request-description-excerpt { display: none; }
.request-description[open] .request-description-action { margin-left: 0; }
.request-description > .reservation-description { padding: 0.65rem; background: var(--surface-subtle); border-radius: 8px; }
.communication-request-choice { min-width: 0; padding-bottom: 0.4rem; }
.communication-request-choice > .request-description { margin: 0 0 0 1.8rem; }

/* Les dialogues s’adaptent à leur zone utile, y compris avec le zoom du navigateur. */
.dialog :is(.rule-profile-card, .catalog-row, .organization-card) > div { min-width: 0; overflow-wrap: anywhere; }
.dialog :is(.inline-actions, .profile-detail-toolbar) { flex-wrap: wrap; }
.dialog :is(.inline-actions, .profile-detail-toolbar) > button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
#users-dialog .access-review { grid-column: 1 / -1; margin: .4rem 0; }
@container dialog (max-width: 640px) {
  .dialog-actions > button { flex: 1 1 12rem; min-height: 44px; }
  .dialog-actions > .form-message { flex-basis: 100%; }
  .dialog :is(.case-form-grid, .user-form-grid, .access-administration-grid, .rule-profile-card) { grid-template-columns: minmax(0, 1fr); }
  .dialog .full-grid-field { grid-column: 1 / -1; }
  #users-dialog :is(.user-update-form, .password-update-form) { grid-template-columns: minmax(0, 1fr); }
  .catalog-row, .provider-directory-toolbar { flex-direction: column; align-items: stretch; }
  .import-review dl { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  .import-review dd { margin-bottom: .7rem; }
}
@media (max-height: 600px) {
  .long-dialog-form > .dialog-actions { position: static; padding-bottom: .5rem; }
}

/* Existing dossiers share the configuration chooser and retain source history. */
.case-configuration-dialog { max-width: 880px; }
.case-configuration-dialog section > label { display: grid; gap: .4rem; margin-block: 1rem; }
.recovery-piece, .recovery-source { padding: 1rem; border: 1px solid var(--border); border-radius: .6rem; margin-block: .75rem; }
.recovery-piece label { display: grid; gap: .4rem; }
.recovery-source .checkbox-label { display: flex; align-items: center; gap: .6rem; }
.recovery-source .checkbox-label input { order: -1; width: auto; }
.case-configuration-dialog [hidden] { display: none !important; }

/* Shared comfort rules apply to every portal, access and support surface. */
:where(button, input, select, textarea) { font-family: inherit; }
:where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--forest); }
:where(input, select, textarea)[aria-invalid="true"] { border-color: var(--red); }
:where(button, input, select, textarea):disabled { cursor: not-allowed; }
:where(h1, h2, h3, [tabindex], input, select, textarea) { scroll-margin-block: 1rem; }
body:has(dialog[open]) { overflow: hidden; }
dialog { overscroll-behavior: contain; }
form[data-submitting="true"] { cursor: progress; }
form[data-submitting="true"] button[type="submit"] { cursor: progress; }
form[data-submitting="true"] button[type="submit"]::after {
  content: ""; display: inline-block; width: .9em; height: .9em; margin-inline-start: .5rem;
  border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%;
  vertical-align: -.1em; animation: action-wait 800ms linear infinite;
}
@keyframes action-wait { to { transform: rotate(360deg); } }
[aria-busy="true"].list-refresh { cursor: progress; opacity: .65; }
@media (pointer: coarse) {
  :where(button, summary, .secondary-button, .primary-button, input:not([type="checkbox"]):not([type="radio"]), select) { min-height: 44px; }
  :where(.icon-button, .help-button, .action-feedback-dismiss) { min-width: 44px; min-height: 44px; }
  :where(input, select, textarea) { font-size: max(1rem, 16px); }
}
@media (prefers-contrast: more) {
  :root { --muted: var(--ink); --line: var(--ink); }
  :where(button, input, select, textarea, summary):focus-visible { outline-width: 3px; }
  :where(.toast, .action-feedback-error, .panel, .dialog) { border: 2px solid currentColor; }
}
@media (forced-colors: active) {
  :where(button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid Highlight; outline-offset: 3px; }
  :where(.dialog, .toast, .action-feedback-error, .action-feedback-error-history) { border: 1px solid CanvasText; }
  .action-feedback-dismiss { border: 1px solid ButtonText; }
  :where(input, select, textarea)[aria-invalid="true"] { border: 2px solid CanvasText; }
}

/* A reception scope is a short business choice, shared by dossier and model. */
.network-scope { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; border: 1px solid var(--border); border-radius: .6rem; padding: 1rem; }
.network-scope legend { font-weight: 650; padding-inline: .3rem; }
.network-scope label { display: flex; align-items: center; gap: .5rem; }
.network-scope input { width: auto; min-height: auto; }
.network-scope .field-hint { flex-basis: 100%; margin: 0; }
.network-model-preparation { padding: 1rem; border: 1px solid var(--border); border-radius: .6rem; margin-block: .75rem; }
.network-results { overflow-x: auto; }
.network-result-table { width: 100%; border-collapse: collapse; }
.network-result-table caption { text-align: left; margin-bottom: .75rem; }
.network-result-table th, .network-result-table td { padding: .65rem; text-align: left; border-bottom: 1px solid var(--border); }
.new-case-model-fields > [hidden] { display: none !important; }
