/* DemoFit — application sheet. Colours, type, space and shape come from tokens.css (loaded
   first); no raw brand colour here. Order: base, shell, page, surfaces, controls, data, feedback,
   then one block per space or page further down. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--df-bg);
  color: var(--df-navy);
  font-family: var(--df-sans);
  font-size: var(--df-text-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--df-blue); text-decoration: none; }
a:hover { color: var(--df-blue-dark); text-decoration: underline; text-underline-offset: 3px; }
p a, li a:not(.button), dd a, .doc a { text-decoration: underline; text-decoration-color: rgba(0, 94, 249, 0.35); text-underline-offset: 3px; }

:focus-visible { outline: 3px solid rgba(0, 94, 249, 0.45); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { color: var(--df-navy); font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: var(--df-text-2xl); line-height: 1.15; letter-spacing: -0.03em; margin: 0 0 var(--df-space-4); }
h2 { font-size: var(--df-text-xl); line-height: 1.25; margin: var(--df-space-8) 0 var(--df-space-3); }
h3 { font-size: var(--df-text-lg); line-height: 1.3; font-weight: 700; margin: var(--df-space-5) 0 var(--df-space-2); }
h4 { font-size: var(--df-text-md); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 var(--df-space-3); }
p:last-child { margin-bottom: 0; }
code { font-family: var(--df-mono); font-size: 0.88em; }

.muted { color: var(--df-muted); }
.hint { font-size: var(--df-text-sm); }

/* ---------- Shell: the signed-in shell is shell.css; here the signed-out page and footer ---------- */
.signout { margin: 0; }

.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--df-blue);
  font: 600 var(--df-text-sm) var(--df-sans);
  cursor: pointer;
}
.link-button:hover { color: var(--df-blue-dark); text-decoration: underline; text-underline-offset: 3px; }

/* A DemoFit administrator signed in as a member: always visible, « Leave » always at hand */
.impersonation-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: 40px;
  padding: 6px max(16px, calc((100% - var(--df-wrap)) / 2));
  background: #B45309;
  color: #FFFFFF;
  font-size: var(--df-text-sm);
  font-weight: 600;
}
.impersonation-banner span { overflow-wrap: anywhere; }
.impersonation-banner form { margin: 0; }
.impersonation-banner button {
  background: none;
  border: 1px solid #FFFFFF;
  border-radius: var(--df-radius-control);
  padding: 4px 14px;
  color: #FFFFFF;
  font: 700 var(--df-text-sm) var(--df-sans);
  cursor: pointer;
}
.impersonation-banner button:hover { background: rgba(255, 255, 255, 0.15); }

/* Signed-out pages: the logo stands above the form, on the public site's soft hero light */
.auth-brand { display: flex; justify-content: center; padding: 56px 16px 0; }
.auth-brand + .page { padding-top: 8px; }
.auth-brand img { display: block; width: 168px; height: auto; }
body:has(> .auth-brand) {
  background:
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(0, 210, 214, 0.10), transparent 70%),
    radial-gradient(ellipse 50% 50% at 0% 100%, rgba(0, 94, 249, 0.06), transparent 70%),
    var(--df-bg);
}

.page { max-width: calc(var(--df-wrap) + 32px); margin: 0 auto; padding: var(--df-space-8) 16px 72px; }
body > .page { flex: 1 0 auto; width: 100%; }

/* Page header: context line, title, lead, actions on the right */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--df-space-3) var(--df-space-6);
  margin-bottom: var(--df-space-6);
}
.page-head > div { min-width: 0; }
.page-head h1, .page-head h2, .page-title { margin: 0; }
.page-head p { margin: 0 0 6px; }
.page-head p.muted:last-child, .page-head h1 + p { margin: 6px 0 0; max-width: 72ch; }
.page-head .muted a { color: var(--df-muted); font-weight: 600; text-decoration: none; }
.page-head .muted a:hover { color: var(--df-blue); }
.page-title { font-size: var(--df-text-2xl); letter-spacing: -0.03em; line-height: 1.15; }
.page-actions { display: flex; flex-wrap: wrap; gap: var(--df-space-2); }
.demo-actions { align-items: flex-start; }
.actions-menu { position: relative; }
.actions-menu summary { list-style: none; cursor: pointer; }
.actions-menu summary::-webkit-details-marker { display: none; }
.actions-menu ul { position: absolute; z-index: 20; right: 0; top: calc(100% + 4px); min-width: 210px; margin: 0; padding: 6px; list-style: none; background: var(--df-paper); border: 1px solid var(--df-border); border-radius: var(--df-radius-control); box-shadow: var(--df-shadow-raised); }
.actions-menu li a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--df-navy); font-size: var(--df-text-sm); text-decoration: none; }
.actions-menu li a:hover { background: var(--df-subtle); text-decoration: none; }

/* Section title outside a card: same rhythm everywhere */
.page > h2, .page > section:not(.card):not(.panel) > h2:first-child { margin-top: var(--df-space-10); }

/* ---------- Surfaces ---------- */
.card, .panel {
  background: var(--df-paper);
  border: 1px solid var(--df-border);
  border-radius: var(--df-radius);
  padding: var(--df-space-6);
  margin-bottom: var(--df-space-5);
  box-shadow: var(--df-shadow);
}
.card > h2:first-child, .panel > h2:first-child { margin-top: 0; font-size: var(--df-text-lg); }
.card > h2:first-child + p.muted, .panel > h2:first-child + p.muted { margin-top: -4px; }
.card.narrow { max-width: 420px; margin: 24px auto; padding: var(--df-space-8); box-shadow: var(--df-shadow-raised); border-radius: 16px; }
.card.narrow h1 { font-size: 1.5rem; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: var(--df-space-4); }
.panel-head h2 { margin: 0; font-size: var(--df-text-lg); }
.panel-head .muted { font-size: var(--df-text-sm); }
.panel > h3 { font-size: var(--df-text-md); margin-top: var(--df-space-6); padding-top: var(--df-space-5); border-top: 1px solid var(--df-border); }
.panel-alert { border-color: var(--df-bad-line); background: var(--df-bad-soft); color: var(--df-bad-text); box-shadow: none; }

/* ---------- Controls ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--df-space-4); min-width: 0; }
.field label { font-weight: 700; font-size: var(--df-text-sm); }
.field .hint { font-size: 0.82rem; color: var(--df-muted); line-height: 1.45; }

/* Every text control, wherever it sits (fields, tables, inline forms) */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="submit"]),
textarea,
select {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--df-border-strong);
  border-radius: var(--df-radius-control);
  background: var(--df-paper);
  color: var(--df-navy);
  font: inherit;
  font-size: var(--df-text-md);
  line-height: 1.4;
  box-shadow: var(--df-shadow-sm);
  transition: border-color 0.12s, box-shadow 0.12s;
}
input::placeholder, textarea::placeholder { color: var(--df-faint); }
textarea { min-height: 104px; resize: vertical; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235B6675' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
input:not([type="checkbox"]):not([type="radio"]):hover, textarea:hover, select:hover { border-color: #AEB9C8; }
input:focus, textarea:focus, select:focus { border-color: var(--df-blue); outline: none; box-shadow: var(--df-focus); }
input[type="checkbox"], input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--df-blue);
  cursor: pointer;
  flex: 0 0 auto;
}
input[type="file"] { font: inherit; font-size: var(--df-text-sm); color: var(--df-muted); }
input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 1px solid var(--df-border-strong);
  border-radius: var(--df-radius-control);
  background: var(--df-paper);
  color: var(--df-navy);
  font: 700 var(--df-text-sm) var(--df-sans);
  cursor: pointer;
}
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }

/* Compact controls inside tables and row actions */
.table input:not([type="checkbox"]):not([type="radio"]),
.table select,
.row-actions select,
.team-role select,
.team-country { width: 190px; max-width: 100%; }
.table select, .row-actions select { min-width: 170px; }
.table input[type="url"], .table input[type="text"] { min-width: 220px; }

/* Buttons: primary (blue), quiet (outline), danger, small, link */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--df-blue);
  border-radius: var(--df-radius-control);
  background: var(--df-blue);
  color: #FFFFFF;
  font: 700 var(--df-text-md)/1 var(--df-sans);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 16px -8px rgba(0, 94, 249, 0.65);
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.button:hover { background: var(--df-blue-dark); border-color: var(--df-blue-dark); color: #FFFFFF; text-decoration: none; }
a.button { color: #FFFFFF; }
.button-quiet, a.button-quiet { background: var(--df-paper); color: var(--df-navy); border-color: var(--df-border-strong); box-shadow: var(--df-shadow-sm); }
.button-quiet:hover { background: var(--df-subtle); color: var(--df-blue-dark); border-color: var(--df-blue); }
.button-danger, a.button-danger { background: var(--df-paper); color: var(--df-bad); border-color: var(--df-bad-line); box-shadow: none; }
.button-danger:hover { background: var(--df-bad-soft); color: var(--df-bad-text); border-color: var(--df-bad-line); }
.button-small { min-height: 32px; padding: 0 12px; font-size: var(--df-text-sm); box-shadow: none; }
.button:disabled { opacity: 0.55; cursor: default; }
.card.narrow .button { width: 100%; min-height: 44px; }

/* ---------- Data ---------- */
.table-wrap {
  overflow-x: auto;
  background: var(--df-paper);
  border: 1px solid var(--df-border);
  border-radius: var(--df-radius);
  margin-bottom: var(--df-space-5);
}
.table { width: 100%; border-collapse: collapse; font-size: var(--df-text-sm); }
.table th, .table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--df-border);
  white-space: nowrap;
  vertical-align: middle;
}
.table th {
  padding-top: 9px;
  padding-bottom: 9px;
  background: var(--df-subtle);
  color: var(--df-muted);
  font-size: var(--df-text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #FAFCFF; }
.table td a { font-weight: 600; text-decoration: none; }
.table td a:hover { text-decoration: underline; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-sub { display: block; color: var(--df-muted); font-size: 0.82rem; font-weight: 500; }
.mono-cell { font-family: var(--df-mono); font-size: 0.82rem; overflow-wrap: anywhere; }

/* Below 640px a .table-stack table turns into one card per row; each td carries data-label */
@media (max-width: 640px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 12px 16px; border-bottom: 1px solid var(--df-border); }
  .table-stack tbody tr:last-child { border-bottom: none; }
  .table-stack td { padding: 3px 0; border: 0; white-space: normal; display: flex; justify-content: space-between; gap: 12px; }
  .table-stack td[data-label]::before { content: attr(data-label); flex: none; color: var(--df-muted); font: 600 0.82rem var(--df-sans); }
  .table-stack td > * { min-width: 0; overflow-wrap: anywhere; }
  .table-stack td.cell-main { display: block; font-size: var(--df-text-md); padding-bottom: 6px; }
  .table-stack tbody tr:hover td { background: none; }
}

/* Lists and empty states */
.list {
  list-style: none;
  margin: 0 0 var(--df-space-5);
  padding: 0;
  background: var(--df-paper);
  border: 1px solid var(--df-border);
  border-radius: var(--df-radius);
}
.list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--df-border);
}
.list li:last-child { border-bottom: none; }

.empty {
  background: var(--df-subtle);
  border: 1px dashed var(--df-border-strong);
  border-radius: var(--df-radius);
  padding: 20px;
  color: var(--df-muted);
  font-size: var(--df-text-sm);
  text-align: center;
}

/* Key / value lists */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 28px; margin: 0 0 var(--df-space-4); font-size: var(--df-text-sm); }
.kv dt { color: var(--df-muted); font-weight: 600; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* Figures: a number and its label */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--df-space-4); margin: 0; }
.figure {
  padding: 18px 20px;
  background: var(--df-paper);
  border: 1px solid var(--df-border);
  border-radius: var(--df-radius);
  box-shadow: var(--df-shadow-sm);
}
.figure dt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--df-muted);
  font-size: var(--df-text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.figure dt::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--df-gradient); }
.figure dt a { color: inherit; text-decoration: none; }
.figure dt a:hover { color: var(--df-blue); }
.figure dd { margin: 8px 0 0; }
.figure dd a { text-decoration: none; }
.figure strong { font-size: 1.875rem; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; color: var(--df-navy); font-variant-numeric: tabular-nums; }

/* Status: dots and badges. A badge may carry data-status (a DemoStatus) or data-stage (a stage of
   web/workspace.py, as My Deals, the deal page and the run sheet show it) to take its tone. */
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; vertical-align: middle; background: var(--df-border-strong); }
.dot-ok { background: var(--df-ok); }
.dot-warn { background: var(--df-warn); }
.dot-bad { background: var(--df-bad); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--df-radius-pill);
  background: var(--df-neutral-soft);
  color: var(--df-muted);
  font-size: var(--df-text-xs);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.badge-ok, .badge[data-status="READY"] { background: var(--df-ok-soft); color: var(--df-ok-text); }
.badge-info, .badge[data-status="BLUEPRINT_READY"], .badge[data-status="ANALYZED"], .badge[data-status="PREPARING"] { background: var(--df-blue-soft); color: var(--df-blue-dark); }
.badge-warn, .badge[data-status="VALIDATION"] { background: var(--df-warn-soft); color: var(--df-warn-text); }
.badge-bad { background: var(--df-bad-soft); color: var(--df-bad-text); }
.badge[data-stage="ready"] { background: var(--df-ok-soft); color: var(--df-ok-text); }
.badge[data-stage="environment_ready"], .badge[data-stage="blueprint_ready"], .badge[data-stage="preparing"], .badge[data-stage="building"] { background: var(--df-blue-soft); color: var(--df-blue-dark); }
.badge[data-stage="attention"], .badge[data-stage="setup_incomplete"] { background: var(--df-warn-soft); color: var(--df-warn-text); }
.badge[data-status]::before, .badge[data-stage]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.badge-lg { padding: 5px 12px; font-size: var(--df-text-sm); }
/* The vendor product module of a flow (P2P, CLM...): a label, not a state, so neither a pill nor
   a status tone; it sits next to the flow's title. */
.badge-module { background: var(--df-paper); color: var(--df-navy); border: 1px solid var(--df-border-strong); border-radius: 6px; padding: 2px 8px; letter-spacing: 0.01em; }
/* In a title the space before it separates it from the name, so a badge that wraps starts flush. */
h1 .badge-module, h2 .badge-module, h3 .badge-module { vertical-align: 0.15em; }
.bp-flow-title h3 .badge-module { margin-left: 6px; }  /* a flex title: no space between items */

/* ---------- Feedback ---------- */
.form-error {
  background: var(--df-bad-soft);
  color: var(--df-bad-text);
  border-radius: var(--df-radius-control);
  padding: 10px 12px;
  margin-bottom: var(--df-space-4);
  font-size: var(--df-text-sm);
  font-weight: 600;
}
.field .form-error { margin: 0; padding: 0; background: none; color: var(--df-bad); font-size: 0.85rem; }

.messages { list-style: none; margin: 0 0 var(--df-space-5); padding: 0; display: grid; gap: 8px; }
.message {
  background: var(--df-blue-soft);
  border: 1px solid #CFE0FD;
  border-radius: var(--df-radius-control);
  padding: 12px 16px;
  color: var(--df-navy);
  font-size: var(--df-text-sm);
  font-weight: 600;
}
.message-success { background: var(--df-ok-soft); border-color: #B5ECE6; color: var(--df-ok-text); }
.message-warning, .message-error { background: var(--df-warn-soft); border-color: #EBD49A; color: var(--df-warn-text); }
.message-error { background: var(--df-bad-soft); border-color: var(--df-bad-line); color: var(--df-bad-text); }
.message-info { background: var(--df-blue-soft); border-color: #B9D1FB; color: var(--df-blue-dark); }

/* ---------- Navigation inside a page ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: var(--df-space-4) 0 var(--df-space-6); border-bottom: 1px solid var(--df-border); }
.tabs a {
  padding: 10px 14px;
  margin-bottom: -1px;
  color: var(--df-muted);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--df-navy); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--df-navy); font-weight: 700; border-bottom-color: var(--df-blue); }

.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--df-space-3); }
.inline-form .field { margin-bottom: 0; flex: 1 1 180px; }
.table .inline-form { flex-wrap: nowrap; align-items: center; gap: 8px; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row-actions form { margin: 0; }
form.row-actions { margin: 0; }
.table form.row-actions { flex-wrap: nowrap; gap: 8px; }
.table td .row-actions { flex-wrap: nowrap; white-space: nowrap; }
.table td:last-child form.row-actions { display: inline-flex; margin-left: 8px; }

@media (max-width: 640px) {
  .page { padding-top: var(--df-space-6); }
  h1, .page-title { font-size: 1.5rem; }
  .card, .panel { padding: 18px 16px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .page-head .button { width: 100%; }
}

/* Footer on every page (components/_footer.html) */
.site-footer { border-top: 1px solid var(--df-border); background: var(--df-paper); }
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: calc(var(--df-wrap) + 32px);
  margin: 0 auto;
  padding: 18px 16px;
  color: var(--df-muted);
  font-size: 0.84rem;
}
.site-footer-owner { display: flex; gap: 10px; margin: 0; }
.site-footer-name { color: var(--df-navy); font-weight: 700; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer-links a { color: var(--df-muted); text-decoration: none; }
.site-footer-links a:hover { color: var(--df-blue); text-decoration: underline; }

/* Print: the page, not the shell (the run sheet has its own print sheet) */
@media print {
  .shell-sidebar, .shell-topbar, .site-footer, .impersonation-banner { display: none; }
  body { background: #FFFFFF; }
  .card, .panel, .table-wrap { box-shadow: none; }
}

/* Partner space: call log filters, pager, the rendered API documentation */
.log-filters { margin-bottom: 18px; }
.pager { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.doc { line-height: 1.6; overflow-wrap: anywhere; }
.doc h1 { font-size: 1.5rem; margin: 0 0 16px; }
.doc h2 { font-size: 1.2rem; margin: 28px 0 10px; }
.doc h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.doc code { font-family: var(--df-mono); font-size: 0.85em; background: var(--df-bg); padding: 1px 4px; border-radius: 4px; }
.doc pre { background: var(--df-bg); border: 1px solid var(--df-border); border-radius: 6px; padding: 12px 14px; overflow-x: auto; }
.doc pre code { background: none; padding: 0; }
.doc table { border-collapse: collapse; margin: 12px 0; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid var(--df-border); padding: 6px 10px; text-align: left; vertical-align: top; }

/* Demo Library: filters, flow cards, start choices */
.flow-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0 16px;
  align-items: end;
}
.flow-filters .field { margin-bottom: 12px; min-width: 0; }
.flow-filter-actions { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.flow-card { display: flex; flex-direction: column; margin: 0; min-width: 0; }
.flow-card h2 { font-size: 1.1rem; margin: 0 0 6px; }
.flow-card h2 a { text-decoration: none; }
.flow-card p { margin: 0 0 10px; overflow-wrap: anywhere; }
.flow-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 0.9rem; }
.flow-value { color: var(--df-navy); font-weight: 600; }
.flow-cta { margin-top: auto; padding-top: 8px; }
.flow-context { margin-bottom: 20px; }
.flow-steps, .flow-outcomes { margin: 0 0 16px; padding-left: 22px; }
.flow-steps li, .flow-outcomes li { margin-bottom: 6px; }
/* Deal page: its demos; "New demo" opens the choice page */
.deal-demos .list { margin-bottom: 0; }
.deal-demo { align-items: center; }
.deal-demos .deal-demo-title { font-weight: 700; overflow-wrap: anywhere; text-decoration: none; }
.deal-demos .deal-demo-title:hover { text-decoration: underline; }
.deal-demo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 0.9rem; }
.deal-demos-empty { display: flex; flex-direction: column; align-items: center; gap: var(--df-space-3); }

/* Back link above a page head */
.back-link { margin: 0 0 var(--df-space-3); font-size: var(--df-text-sm); }
.back-link a { color: var(--df-muted); font-weight: 600; text-decoration: none; }
.back-link a:hover { color: var(--df-blue); }

/* New demo: three tiles of the same size (equal columns, equal rows), the whole tile is the link;
   two when Quick Setup is not offered. One column on a narrow screen (below). */
.choice-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--df-space-5);
}
.choice-tiles-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--df-space-8);
  background: var(--df-paper);
  border: 1px solid var(--df-border);
  border-radius: var(--df-radius);
  box-shadow: var(--df-shadow);
  color: var(--df-navy);
  text-decoration: none;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}
.choice-tile:hover { color: var(--df-navy); text-decoration: none; border-color: var(--df-blue); box-shadow: var(--df-shadow-raised); transform: translateY(-2px); }
.choice-tile:focus-visible { outline: none; border-color: var(--df-blue); box-shadow: var(--df-focus), var(--df-shadow-raised); border-radius: var(--df-radius); }
.choice-tile-title { margin: 0 0 var(--df-space-2); font-size: var(--df-text-xl); }
.choice-tile-body { margin: 0 0 var(--df-space-5); color: var(--df-muted); }
.choice-tile-label { margin: 0 0 var(--df-space-2); font-size: var(--df-text-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--df-faint); }
.choice-tile-steps { margin: 0 0 var(--df-space-6); padding-left: 20px; font-size: var(--df-text-sm); }
.choice-tile-steps li { margin-bottom: var(--df-space-1); }
.choice-tile-steps li::marker { color: var(--df-blue); font-weight: 700; }
.choice-tile-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: var(--df-radius-control);
  background: var(--df-blue);
  color: #FFFFFF;
  font-weight: 700;
  transition: background-color 0.12s;
}
.choice-tile:hover .choice-tile-cta { background: var(--df-blue-dark); }

/* New demo: a chosen tile (choice page with new-demo.js, and the step pages' compact head).
   The 2px brand border is the 1px border plus a 1px inner ring, so nothing moves. */
.choice-tile { position: relative; }
.choice-tile-check { display: none; }
.choice-tiles.is-enhanced .choice-tile-check, .choice-tile-selected .choice-tile-check {
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: var(--df-space-5); right: var(--df-space-5);
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--df-border-strong); background: var(--df-paper);
}
.choice-tiles.is-enhanced .choice-tile-title { padding-right: 36px; }
.choice-tile.is-selected, .choice-tile-selected {
  border-color: var(--df-blue);
  background: var(--df-blue-soft);
  background: color-mix(in srgb, var(--df-blue-soft) 60%, var(--df-paper));
  box-shadow: 0 0 0 1px var(--df-blue), 0 0 0 5px rgba(0, 94, 249, 0.12), var(--df-shadow-raised);
}
.choice-tile.is-selected:hover { transform: none; }
.choice-tile.is-selected:focus-visible { box-shadow: 0 0 0 1px var(--df-blue), var(--df-focus), var(--df-shadow-raised); }
.choice-tile.is-selected .choice-tile-check, .choice-tile-selected .choice-tile-check {
  border-color: var(--df-blue); background: var(--df-blue);
}
.choice-tile.is-selected .choice-tile-check::after, .choice-tile-selected .choice-tile-check::after {
  content: ""; width: 6px; height: 11px; margin-top: -2px;
  border: solid #FFFFFF; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.has-selection .choice-tile:not(.is-selected) { box-shadow: none; background: var(--df-subtle); }
.has-selection .choice-tile:not(.is-selected) .choice-tile-cta { background: var(--df-paper); color: var(--df-navy); border: 1px solid var(--df-border-strong); }
.has-selection .choice-tile:not(.is-selected):hover .choice-tile-cta { background: var(--df-paper); color: var(--df-blue-dark); border-color: var(--df-blue); }
/* With the script the tile is the choice and Continue the one action: no button inside the tiles */
.choice-tiles.is-enhanced .choice-tile-cta { display: none; }
.choice-tiles.is-enhanced .choice-tile-steps { margin-bottom: 0; }
.choice-actions { display: flex; justify-content: flex-end; margin-top: var(--df-space-6); }
.choice-continue { min-width: 200px; min-height: 44px; }
.choice-continue[hidden] { display: none; }
.choice-continue:disabled {
  opacity: 1; background: var(--df-border); border-color: var(--df-border); color: var(--df-muted); box-shadow: none;
}
@media (max-width: 760px) { .choice-continue { width: 100%; } }
.choice-tile.choice-tile-compact {
  flex-direction: row; align-items: center; gap: var(--df-space-4);
  max-width: 640px; margin-bottom: var(--df-space-5);
  padding: var(--df-space-4) var(--df-space-5) var(--df-space-4) 60px;
}
.choice-tile-compact .choice-tile-check { top: 50%; left: var(--df-space-5); right: auto; margin-top: -13px; }
.choice-tile-compact .choice-tile-text { flex: 1 1 auto; min-width: 0; }
.choice-tile-compact .choice-tile-title { margin: 0 0 2px; font-size: var(--df-text-lg, 1.1rem); }
.choice-tile-compact .choice-tile-body { margin: 0; font-size: var(--df-text-sm); }
.choice-tile-change { flex: 0 0 auto; font-weight: 700; font-size: var(--df-text-sm); }

/* New demo step pages: one form card at reading width */
.new-demo-step { max-width: 640px; }
.new-demo-brief { margin-bottom: 16px; }
.new-demo-brief summary { cursor: pointer; color: var(--df-blue); font-weight: 600; margin-bottom: 10px; }
@media (max-width: 760px) {
  .choice-tiles, .choice-tiles-two { grid-template-columns: 1fr; }
  .choice-tile { padding: var(--df-space-6) var(--df-space-5); }
  .new-demo-step .button { width: 100%; min-height: 44px; }
}
.start-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.start-choice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--df-border);
  border-radius: var(--df-radius);
  background: var(--df-bg);
  text-decoration: none;
  color: var(--df-navy);
}
.start-choice:hover { border-color: var(--df-blue); background: var(--df-blue-soft); }
.start-choice strong { font-size: 1.05rem; color: var(--df-blue); }

/* Demo Blueprint and the RFP path */
.bp-header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 16px;
  align-items: end;
}
.bp-header .field { min-width: 0; margin-bottom: 12px; }
.bp-header .bp-wide { grid-column: 1 / -1; }
.bp-header-actions { margin-bottom: 12px; }
.bp-total { margin: 0; font-weight: 600; }
.bp-flow { min-width: 0; }
.bp-flow p { overflow-wrap: anywhere; }
.bp-flow h4 { font-size: 0.92rem; margin: 14px 0 4px; color: var(--df-muted); }
.bp-flow-off { opacity: 0.72; }
.bp-flow-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; }
.bp-flow-head h3 { margin: 0; font-size: 1.1rem; }
.bp-order {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-right: 6px; border-radius: 50%;
  background: var(--df-blue-soft); color: var(--df-blue-dark); font-size: 0.85rem;
}
.bp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.bp-match { margin: 8px 0 0; color: var(--df-navy); }
.bp-edit { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--df-border); }
.bp-edit-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 20px; }
.bp-edit-row .field { min-width: 180px; }
.bp-check label { display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 42px; }
.bp-details { margin-bottom: 14px; }
.bp-details summary { cursor: pointer; color: var(--df-blue); font-weight: 600; margin-bottom: 10px; }
.bp-flow-actions { margin-top: 12px; }
.bp-footer .row-actions form { margin: 0; }
.rfp-upload, .rfp-analyze { margin-top: 16px; }
.rfp-upload .field { min-width: 0; flex: 1 1 240px; }
.rec-list { display: grid; gap: 12px; margin-bottom: 16px; }
.rec-card { display: flex; gap: 14px; margin: 0; cursor: pointer; min-width: 0; }
.rec-in-demo { cursor: default; }
.rec-pick { flex: 0 0 auto; padding-top: 2px; }
.rec-pick input { width: 20px; height: 20px; }
.rec-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rec-name { font-size: 1.05rem; color: var(--df-navy); }
.rec-why { overflow-wrap: anywhere; }
.rec-quotes { display: flex; flex-direction: column; gap: 4px; color: var(--df-muted); font-size: 0.92rem; }
.rec-quotes q { overflow-wrap: anywhere; }
.bp-check input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; flex: 0 0 auto; box-shadow: none; }
.bp-check label { white-space: nowrap; }

/* Flow Library management */
.flow-group h2 { font-size: 1.1rem; margin: 0 0 10px; }
.flow-slug { font-family: var(--df-mono); font-size: 0.8rem; font-weight: 400; margin-left: 8px; }
.flow-group .table-wrap { margin-bottom: 0; }
.flow-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 20px; }
.flow-form-grid .field { min-width: 0; }
.flow-form-wide { grid-column: 1 / -1; }
.content-helper { margin-top: 6px; font-size: 0.9rem; }
.content-helper summary { cursor: pointer; color: var(--df-blue); font-weight: 600; }
.content-helper ul { margin: 8px 0 0; padding-left: 20px; max-height: 220px; overflow-y: auto; }
.content-helper code { font-family: var(--df-mono); font-size: 0.85rem; }
.flow-derive { margin-top: 20px; max-width: 520px; }

/* Team page and the welcome block on My Deals */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.team-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  background: var(--df-paper);
  border: 1px solid var(--df-border);
  border-radius: var(--df-radius);
}
.team-member {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 20px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--df-border);
}
.team-member:last-child { border-bottom: none; }
.team-member-off .team-who strong { color: var(--df-muted); }
.team-who { min-width: 0; }
.team-who strong { overflow-wrap: anywhere; margin-right: 6px; }
.team-email { font-size: 0.9rem; overflow-wrap: anywhere; }
.team-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.team-role { display: flex; align-items: center; gap: 8px; margin: 0; }
.team-role-label { min-width: 120px; color: var(--df-navy); font-size: 0.95rem; }
.team-facts .badge { min-width: 92px; text-align: center; }
.team-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 16px; }
.team-actions form { margin: 0; }
.team-manager { grid-column: 1 / -1; font-size: 0.92rem; }
.team-manager label { margin: 0; font-weight: 500; }
.link-button.team-danger { color: var(--df-bad); }
.link-button.team-danger:hover { color: var(--df-bad-text); }
.team-confirm p { margin: 0 0 14px; overflow-wrap: anywhere; }
.team-confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.team-invite { max-width: 640px; }
.team-invite > p { margin-top: 0; }
.team-invite-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0 14px; align-items: end; }
.team-invite-form .button { grid-column: 1 / -1; justify-self: start; }

/* Demo recording (workspace) and the sales rep's listening page */
.recorder { border-top: 3px solid var(--df-blue); }
.recorder-message:empty { display: none; }
.recorder-message { margin: 0 0 12px; font-weight: 600; color: var(--df-navy); }
.recorder-idle > p { margin-top: 0; }
.recorder-idle .button { display: inline-flex; align-items: center; gap: 8px; }
.recorder-idle .recorder-dot { background: #FFFFFF; }
.recorder-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--df-bad); }
.recorder-dot-live { animation: recorder-pulse 1.4s ease-in-out infinite; }
@keyframes recorder-pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .recorder-dot-live { animation: none; } }
.recorder-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.recorder-state { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--df-bad-text); }
.recorder-elapsed { font-family: var(--df-mono); font-size: 1.35rem; font-variant-numeric: tabular-nums; color: var(--df-navy); min-width: 5ch; }
.recorder-stop { margin: 0 0 0 auto; }
.recorder-hint { margin: 16px 0 8px; font-size: 0.92rem; }
.recorder-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 38px;
  padding: 6px 14px;
  border: 1px solid var(--df-border);
  border-radius: 999px;
  background: var(--df-paper);
  color: var(--df-navy);
  font: 600 0.9rem var(--df-sans);
  cursor: pointer;
}
.chip:hover { border-color: var(--df-blue); color: var(--df-blue-dark); }
.chip:focus-visible { outline: none; box-shadow: var(--df-focus); }
.chip[aria-pressed="true"] { background: var(--df-blue); border-color: var(--df-blue); color: #FFFFFF; }
.chip:disabled { opacity: 0.55; cursor: default; }
.recording-import > p { margin-top: 0; }
.recording-import-form { display: grid; gap: 6px; max-width: 560px; }
.recording-import-form label { font-weight: 600; margin-top: 6px; }
.recording-import-form .button { justify-self: start; margin-top: 10px; }
.recordings { list-style: none; margin: 0 0 24px; padding: 0; background: var(--df-paper); border: 1px solid var(--df-border); border-radius: var(--df-radius); }
.recording-item { padding: 14px 18px; border-bottom: 1px solid var(--df-border); }
.recording-item:last-child { border-bottom: none; }
.recording-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.recording-head .badge { margin-left: auto; }
.recording-player { display: block; width: 100%; max-width: 560px; margin: 10px 0 4px; }
.recording-note { margin: 4px 0 0; font-size: 0.88rem; }
.recording-markers { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.92rem; }
.marker { display: inline-flex; gap: 6px; padding: 2px 10px; border-radius: 999px; background: var(--df-blue-soft); color: var(--df-navy); }
.marker-at { font-family: var(--df-mono); font-size: 0.85rem; color: var(--df-blue-dark); }
.recording-meeting { margin: 8px 0 0; font-size: 0.9rem; color: var(--df-muted); }
.recording-meeting-bad { color: var(--df-bad-text); }
.recording-send-again { margin: 8px 0 0; }

/* The debrief of a recording, per flow */
.debrief { margin: 14px 0 2px; padding: 14px 16px; border-radius: var(--df-radius-control); background: var(--df-bg); border: 1px solid var(--df-border); }
.debrief-title { margin: 0 0 8px; font-size: 1rem; }
.debrief-summary { margin: 0 0 10px; line-height: 1.55; color: var(--df-navy); }
.debrief-must { margin: 0 0 12px; font-size: 0.92rem; font-weight: 600; color: var(--df-ok); }
.debrief-must-missing { color: var(--df-bad-text); }
.debrief-failed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.debrief-failed p { margin: 0; font-weight: 600; }
.debrief-failed form { margin: 0; }
.debrief-flows { display: grid; gap: 10px; }
.debrief-flow { padding: 12px 14px; border-radius: var(--df-radius-control); background: var(--df-paper); border: 1px solid var(--df-border); border-left: 3px solid var(--df-blue); }
.debrief-flow-skipped { border-left-color: var(--df-bad); }
.debrief-flow-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.debrief-flow-head h4 { margin: 0 auto 0 0; font-size: 0.98rem; }
.debrief-flow h5 { margin: 12px 0 4px; font-size: var(--df-text-sm); font-weight: 700; color: var(--df-muted); }
.debrief-flow > p { margin: 8px 0 0; font-size: 0.9rem; }
.debrief-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 0.92rem; line-height: 1.45; }
.debrief-questions { list-style: none; padding-left: 0; }
.debrief-questions q { quotes: "“" "”"; }
.tone { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.tone-positive { background: var(--df-cyan-soft); color: #0B6E62; }
.tone-neutral { background: var(--df-blue-soft); color: var(--df-navy); }
.tone-reserved { background: var(--df-bad-soft); color: var(--df-bad-text); }
.seek { display: inline-block; min-width: 4.2ch; padding: 1px 8px; margin-right: 4px; border: 1px solid var(--df-border); border-radius: 999px; background: var(--df-blue-soft); color: var(--df-blue-dark); font: 600 0.82rem var(--df-mono); cursor: pointer; }
.seek:hover { border-color: var(--df-blue); }
.seek:focus-visible { outline: none; box-shadow: var(--df-focus); }
.seek-static { background: var(--df-bg); color: var(--df-muted); cursor: default; }
.listen { max-width: 620px; margin: 24px auto; }
.listen h1 { margin: 4px 0 6px; font-size: 1.45rem; }
.listen > p:first-child { margin: 0; }
.listen-note { font-size: 0.88rem; }
.listen-unavailable { font-weight: 600; margin-bottom: 0; }

.welcome { border-top: 3px solid var(--df-blue); }
.welcome h2 { margin: 0 0 10px; }
.welcome > p:last-child { margin: 0; }
.welcome-steps { margin: 0 0 4px; padding-left: 22px; display: grid; gap: 6px; }
.welcome-steps li { padding-left: 4px; }
.welcome-steps li::marker { color: var(--df-blue); font-weight: 700; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

@media (max-width: 640px) {
  .team-member { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .team-actions { justify-content: flex-start; }
  .team-invite-form { grid-template-columns: minmax(0, 1fr); }
  .team-invite-form .button { width: 100%; }
  .welcome-actions .button { width: 100%; }
  .recorder-stop { margin-left: 0; width: 100%; }
  .recorder-stop .button { width: 100%; }
  .recording-head .badge { margin-left: 0; }
}

/* RFP drop zone (dropzone.js). Without JavaScript only the plain file input shows. */
.dropzone { position: relative; }
.dropzone .dropzone-target,
.dropzone .dropzone-list,
.dropzone .dropzone-errors { display: none; }
.dropzone.is-ready .dropzone-target {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 28px 16px; border: 2px dashed var(--df-border); border-radius: var(--df-radius);
  background: var(--df-paper); cursor: pointer; overflow-wrap: anywhere;
}
.dropzone.is-ready .dropzone-target span { font-size: 0.875rem; }
.dropzone.is-ready .dropzone-target:hover { border-color: var(--df-blue); }
.dropzone.is-ready .dropzone-target:focus-visible { outline: none; border-color: var(--df-blue); box-shadow: var(--df-focus); }
.dropzone.is-over .dropzone-target { border-color: var(--df-blue); background: var(--df-blue-soft); }
.dropzone.is-ready input[type="file"] {
  position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden;
}
.dropzone.is-ready .dropzone-list { display: block; list-style: none; margin: 10px 0 0; padding: 0; }
.dropzone.is-ready .dropzone-list:empty { display: none; }
.dropzone-list li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 12px; margin-bottom: 6px;
  border: 1px solid var(--df-border); border-radius: var(--df-radius-control); background: var(--df-paper);
}
.dropzone-file-name { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.dropzone-file-size { font-size: 0.85rem; }
.dropzone.is-ready .dropzone-errors { display: block; }
.dropzone-errors .form-error { margin-top: 6px; }

/* Administration space (client Admin) */
.panel-warn { border-color: #EBD49A; background: var(--df-warn-soft); color: var(--df-warn-text); box-shadow: none; }
.panel-warn p { margin: 0; }
.admin-banner { margin-bottom: 20px; }
.people-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 0 14px; align-items: end; margin-bottom: 22px; }
.people-filters .field { margin-bottom: 0; }
.people-filter-actions { display: flex; gap: 8px; }
.people-group { margin-bottom: 22px; }
.people-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; }
.people-group-head h2 { margin: 0; }
.env-owner { justify-self: end; }
.env-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
.env-form .button { grid-column: 1 / -1; justify-self: start; }
.import-card { max-width: 760px; }
.import-card > p:first-child { margin-top: 0; }
.import-counts { margin: 0 0 14px; }
.import-line { display: block; font-size: 0.82rem; }
.import-facts { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 0.9rem; }
.import-reason { color: var(--df-bad-text); font-size: 0.92rem; margin-top: 2px; }
.import-note { font-size: 0.88rem; }
.import-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.import-actions form { margin: 0; }

@media (max-width: 900px) {
  .people-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .people-filters .field { margin-bottom: 12px; }
  .people-filter-actions { grid-column: 1 / -1; }
  .env-form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .people-filters { gap: 0 10px; }
  .people-filter-actions .button { flex: 1; }
  .env-owner { justify-self: start; }
  .env-form .button, .import-actions .button, .import-actions form { width: 100%; }
}
.team-extras { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.team-extras .team-manager { grid-column: auto; }

/* Shared row helpers: name + e-mail cell, right-aligned actions, a destructive link */
.cell-name { font-weight: 700; }
.table td.cell-actions { text-align: right; white-space: normal; }
.cell-actions form.row-actions + form.row-actions { margin-top: 4px; }
.cell-actions form.row-actions { display: inline-flex; vertical-align: middle; }
.link-button.link-danger { color: var(--df-bad); }
.link-button.link-danger:hover { color: var(--df-bad-text); }
.panel > .kv { max-width: 760px; }
.panel > p.hint { margin: var(--df-space-2) 0 0; font-size: 0.82rem; }
/* A lone checkbox field in an inline form: box and label on one line, at control height */
.inline-form .field:has(> input[type="checkbox"]) {
  flex: 0 0 auto; flex-direction: row-reverse; justify-content: flex-end; align-items: center;
  gap: 8px; min-height: 40px;
}
.team-facts .badge { justify-content: center; }
@media (max-width: 640px) {
  .page-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .page-actions .button { width: 100%; }
  .page-actions > .button:only-child { grid-column: 1 / -1; }
}

/* Demo page: the work on the left (status, recording, content), the plan and its sources on the right */
.demo-status .panel-head { margin-bottom: var(--df-space-3); }
.demo-status[data-status="READY"] { border-top: 3px solid var(--df-ok); }
.demo-status[data-status="BLUEPRINT_READY"], .demo-status[data-status="PREPARING"], .demo-status[data-status="ANALYZED"] { border-top: 3px solid var(--df-blue); }
.demo-status[data-status="VALIDATION"] { border-top: 3px solid var(--df-warn); }
.demo-load .field { flex: 1 1 260px; }
.demo-content h3 { font-size: var(--df-text-sm); color: var(--df-muted); margin: var(--df-space-5) 0 var(--df-space-2); }
.demo-content h2 + h3 { margin-top: 0; }
.content-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px;
  font-size: var(--df-text-sm);
}
.content-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--df-border); min-width: 0; }
.content-list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.content-noun { color: var(--df-muted); font-weight: 600; }
.content-noun::after { content: ":"; }
.content-sample { flex: none; color: var(--df-faint); font-size: 0.75rem; font-weight: 600; }
.file-list, .history-list { list-style: none; margin: 0; padding: 0; font-size: var(--df-text-sm); }
.file-list li, .history-list li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--df-border); }
.file-list li:last-child, .history-list li:last-child { border-bottom: 0; }
.file-name { font-weight: 700; overflow-wrap: anywhere; }
.history-problem { color: var(--df-bad-text); }
/* A side fact, not a call to action: one muted line instead of a box */
.demo-content .empty { padding: 0; border: 0; background: none; text-align: left; }
@media (max-width: 960px) {
  /* Loïc 19/10: status and actions, then the planned content, then the side column */
}

/* Console: an organization's page — jump links to its sections */
.org-head { align-items: center; }
.org-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--df-text-xl); }
.org-slug { font-family: var(--df-mono); font-weight: 500; }
.jump-links { display: flex; flex-wrap: wrap; gap: 4px; }
.jump-links a { padding: 6px 10px; border-radius: var(--df-radius-control); color: var(--df-muted); font-size: var(--df-text-sm); font-weight: 600; }
.jump-links a:hover { background: var(--df-paper); color: var(--df-navy); text-decoration: none; box-shadow: var(--df-shadow-sm); }
.panel[id] { scroll-margin-top: 84px; }
.cell-actions .row-actions .muted { white-space: normal; }
@media (max-width: 640px) {
  .table-stack td.cell-actions { justify-content: flex-start; flex-wrap: wrap; gap: 8px; text-align: left; padding-top: 8px; }
  .table-stack .row-actions { flex-wrap: wrap; }
  .table-stack td .inline-form { flex-wrap: wrap; width: 100%; }
  .table-stack td[data-label]:has(> form) { flex-direction: column; align-items: stretch; gap: 6px; }
  .table-stack td[data-label] .inline-form, .table-stack td[data-label] form.row-actions { flex-wrap: nowrap; }
  .table-stack td .inline-form input, .table-stack td .row-actions select { min-width: 0; width: 100%; flex: 1 1 140px; }
}
@media (max-width: 640px) {
  .table-stack td.cell-actions form.row-actions { margin-left: 0; }
}

/* Demo Blueprint: the plan's header on a grid, each flow as a compact row, its story folded */
.bp-header { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bp-header .bp-wide { grid-column: span 3; }
.bp-header .field:not(.bp-wide) { grid-column: span 2; }
.bp-header-actions { grid-column: 1 / -1; }
.bp-flow { padding: var(--df-space-5) var(--df-space-6); }
.bp-flow-head { align-items: flex-start; justify-content: space-between; flex-wrap: nowrap; }
.bp-flow-title { min-width: 0; }
.bp-flow-title h3 { display: flex; align-items: center; gap: 4px; }
.bp-flow-title .flow-meta { align-items: center; margin: 8px 0 0; gap: 6px 12px; }
.bp-flow-actions { flex: none; margin-top: 0; gap: 8px; }
.bp-flow .message, .bp-match { margin: 12px 0 0; }
.bp-edit { margin-top: 14px; padding-top: 14px; }
.bp-edit-row { align-items: flex-end; gap: 0 16px; }
.bp-edit-row .field { margin-bottom: 0; }
.bp-check label { min-height: 40px; }
.bp-save { margin-bottom: 4px; }
.bp-details { margin: 14px 0 0; }
.bp-details summary { margin-bottom: 0; font-size: var(--df-text-sm); }
.bp-details[open] summary { margin-bottom: 8px; }
.bp-details h4 { font-size: var(--df-text-sm); margin: 14px 0 4px; color: var(--df-muted); }
.bp-override-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.bp-flow-off .bp-flow-title { opacity: 0.6; }
.bp-flow-off { opacity: 1; }
@media (min-width: 641px) {
  .bp-footer { position: sticky; bottom: 12px; z-index: 20; box-shadow: var(--df-shadow-raised); }
}
.bp-footer > p.muted { margin-bottom: var(--df-space-3); }
@media (max-width: 760px) {
  .bp-header .bp-wide, .bp-header .field:not(.bp-wide) { grid-column: 1 / -1; }
  .bp-flow-head { flex-wrap: wrap; }
  .bp-override-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Administration space: People as a table, one Save per person */
.people-table td:not(.cell-main) { padding-top: 10px; padding-bottom: 10px; }
.people-table select, .people-table .team-country { min-width: 0; width: 176px; min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
.people-table select { padding-right: 32px; }
.people-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 14px; }
.people-actions form { margin: 0; }
.people-off .cell-name { color: var(--df-muted); }
.people-refused td { background: var(--df-bad-soft); }
.table tbody tr.people-refused:hover td { background: var(--df-bad-soft); }
.cell-error { margin: 6px 0 0; padding: 0; background: none; color: var(--df-bad); font-size: 0.82rem; white-space: normal; max-width: 220px; }
.people-table [aria-invalid="true"] { border-color: var(--df-bad) !important; }
/* People › Users | Invitations (Admin V2): read-only rows, one edit panel at a time */
.people-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.people-tabs { margin-top: var(--df-space-2); margin-bottom: var(--df-space-5); }
.people-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; }
.people-panel-head h2 { margin: 0 0 8px; font-size: var(--df-text-lg); }
.people-import { margin-bottom: 22px; }
.people-import-form { display: flex; flex-wrap: wrap; align-items: end; gap: 0 14px; }
.people-import-form .field { margin-bottom: 0; flex: 1 1 260px; }
.people-email { overflow-wrap: anywhere; }
.people-noname { color: var(--df-muted); }
.people-noname-small { display: none; }
.people-group .table-wrap { overflow: visible; }
.people-table .cell-actions { width: 1%; white-space: nowrap; text-align: right; }
.row-menu { position: relative; display: inline-block; text-align: left; }
.row-menu > summary { list-style: none; cursor: pointer; gap: 8px; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.row-menu[open] > summary .row-menu-caret { transform: translateY(1px) rotate(-135deg); }
.row-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 232px; padding: 6px; background: var(--df-paper); border: 1px solid var(--df-border); border-radius: var(--df-radius); box-shadow: var(--df-shadow-raised); }
.row-menu-list form { margin: 0; }
.row-menu-item { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 6px; background: none; color: var(--df-navy); font: 600 var(--df-text-sm) var(--df-sans); text-align: left; text-decoration: none; cursor: pointer; white-space: nowrap; }
.row-menu-item:hover, .row-menu-item:focus-visible { background: var(--df-subtle); color: var(--df-blue); text-decoration: none; }
.row-menu-danger { color: var(--df-bad); }
.row-menu-danger:hover, .row-menu-danger:focus-visible { color: var(--df-bad-text); background: var(--df-bad-soft); }
.people-table tbody tr.people-editing td { background: var(--df-subtle); border-bottom-color: transparent; }
.people-edit-row td { background: var(--df-subtle); padding-top: 0; }
.table tbody tr.people-edit-row:hover td { background: var(--df-subtle); }
.people-edit { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)) auto; gap: 0 14px; align-items: end; }
.people-edit .field { margin-bottom: 0; }
.people-edit select, .people-edit .team-country { width: 100%; min-height: 40px; }
.people-edit .form-error { margin-top: 6px; }
.people-fixed { margin: 0; min-height: 40px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.people-edit-actions { display: flex; gap: 8px; }
.people-pending { margin-top: var(--df-space-8); }
.people-note { font-size: var(--df-text-sm); margin-top: 10px; }
.invitations-table .cell-actions form { margin: 0; }
.invitations-table .cell-actions { width: 1%; white-space: nowrap; }
.invitation-actions { display: flex; justify-content: flex-end; gap: 8px; }
.button.invitation-cancel { color: var(--df-bad); }
.button.invitation-cancel:hover { color: var(--df-bad-text); background: var(--df-bad-soft); }
@media (max-width: 900px) {
  .people-edit { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 640px) {
  .people-table .cell-actions { width: 100%; text-align: left; padding-top: 10px; }
  .row-menu { display: block; flex: 1 1 100%; width: 100%; }
  .row-menu > summary { width: 100%; justify-content: center; }
  .row-menu-list { left: 0; right: 0; min-width: 0; }
  .people-noname { display: none; }
  .people-noname-small { display: inline; }
  .people-head-actions { width: 100%; }
  .people-head-actions .button { flex: 1 1 0; width: auto; }
  .people-edit-row td { display: block; padding: 12px 0 4px; }
  .people-edit-actions .button { flex: 1 1 0; }
  .people-import-form .button { width: 100%; margin-top: 12px; }
  .invitations-table .cell-actions { width: 100%; white-space: normal; }
  .invitation-actions { width: 100%; }
  .invitation-actions form { flex: 1 1 0; }
  .invitations-table .cell-actions .button { width: 100%; }
}
@media (max-width: 640px) {
  .people-table td[data-label] { flex-wrap: wrap; align-items: center; }
  .people-table select, .people-table .team-country { width: 100%; flex: 1 1 100%; }
  .people-actions { justify-content: flex-start; width: 100%; }
  .people-actions .button { flex: 1 1 100%; }
  .cell-error { max-width: none; flex: 1 1 100%; }
  .table-stack tr.people-refused { background: var(--df-bad-soft); }
}

/* Administration space: environments, one row each: what it is, who owns it, its address */
.env-list .team-member { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
.env-list .team-role { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; justify-self: stretch; }
.env-list .team-role label { grid-column: 1 / -1; font-size: var(--df-text-sm); font-weight: 700; color: var(--df-navy); }
.env-list .team-role .form-error { grid-column: 1 / -1; }
.env-list .team-who a { font-weight: 600; }
.env-list .team-who .badge { margin-left: 4px; }
.env-list .team-who > div { font-size: var(--df-text-sm); }
#new-environment { max-width: 760px; }
.env-list .team-role select { width: 100%; }
@media (max-width: 900px) {
  .env-list .team-member { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .env-form { grid-template-columns: minmax(0, 1fr); }
}

/* Flow Library management: one row per flow, earlier versions folded */
@media (min-width: 641px) {
  .flow-table tbody.flow-group + tbody.flow-group tr:first-child td { border-top: 1px solid var(--df-border); }
  .flow-table tbody tr:last-child td { border-bottom: 0; }
}
@media (max-width: 640px) {
  .flow-table tbody.flow-group + tbody.flow-group { border-top: 1px solid var(--df-border); }
  .flow-table tr.flow-also { border-top: 1px dashed var(--df-border); }
}
.flow-version-cell { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.flow-table .flow-slug { font-family: var(--df-mono); font-size: 0.78rem; margin: 0; }
.flow-version { margin-right: 6px; font-weight: 600; }
.flow-also td { border-top: 0; padding-top: 0; }
.flow-table tr.flow-also td, .flow-table tr:has(+ .flow-also) td { border-bottom: 0; }
.flow-older > td { padding-top: 0; background: none !important; }
.flow-older summary { cursor: pointer; color: var(--df-muted); font-size: var(--df-text-sm); font-weight: 600; }
.flow-older summary:hover { color: var(--df-blue); }
.flow-older-table { margin-top: 8px; background: var(--df-subtle); border-radius: var(--df-radius-control); }
.flow-older-table td { padding: 8px 12px; }
.flow-actions { justify-content: flex-end; }
@media (max-width: 640px) {
  .flow-older > td { padding: 0 0 4px; }
  .flow-older-table tr { padding: 8px 12px; }
  .flow-actions { justify-content: flex-start; }
}

/* Flow editor: three sections, short fields side by side */
.flow-form { padding: 0; }
.flow-form > .form-error { margin: var(--df-space-6) var(--df-space-6) 0; }
.flow-form-section { margin: 0; padding: var(--df-space-6); border: 0; border-bottom: 1px solid var(--df-border); min-width: 0; }
.flow-form-section legend { float: left; width: 100%; margin: 0 0 var(--df-space-4); padding: 0; font-size: var(--df-text-lg); font-weight: 800; letter-spacing: -0.02em; }
.flow-form-section legend + * { clear: both; }
.flow-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--df-space-5); }
.flow-form-actions { padding: var(--df-space-5) var(--df-space-6); gap: 16px; }
@media (max-width: 640px) {
  .flow-form-grid { grid-template-columns: minmax(0, 1fr); }
  .flow-form-section { padding: 18px 16px; }
  .flow-form-actions { padding: 16px; }
}

/* Demo Library: navy card titles, quiet actions, filters on one line */
.flow-card { padding: var(--df-space-5); }
.flow-card h2 { font-size: var(--df-text-lg); line-height: 1.3; }
.flow-card h2 a { color: var(--df-navy); }
.flow-card h2 a:hover { color: var(--df-blue); }
.flow-card .flow-meta { font-size: var(--df-text-sm); gap: 2px 12px; }
.flow-card .flow-value { font-size: var(--df-text-sm); }
.flow-card p.muted { font-size: var(--df-text-sm); }
.flow-filters .field { margin-bottom: 0; }
.flow-filter-actions { margin-bottom: 0; }
.flow-filters { gap: 12px 16px; }

/* RFP recommendations: compact cards, the chosen ones outlined */
.rec-list { gap: 8px; }
.rec-card { padding: 16px 20px; }
.rec-card:has(.rec-pick input:checked) { border-color: var(--df-blue); box-shadow: 0 0 0 1px var(--df-blue), var(--df-shadow); }
.rec-quotes { font-size: var(--df-text-sm); }

/* Signed-out pages: the link under the form, centred and quiet */
.card.narrow form + p { margin-top: var(--df-space-4); text-align: center; font-size: var(--df-text-sm); }
.card.narrow form + p a { text-decoration: none; font-weight: 600; }
.card.narrow form + p a:hover { text-decoration: underline; }

/* Blueprint: where a new demo lands — the RFP and its analysis, the empty plan */
.bp-rfp-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.bp-rfp-head h2 { margin: 0; }
.bp-rfp-head a { font-weight: 600; font-size: var(--df-text-sm); }
.bp-rfp-files { margin: 6px 0 0; font-size: var(--df-text-sm); overflow-wrap: anywhere; }
.bp-rfp .rfp-analyzing { margin-top: var(--df-space-4); }
.bp-rfp-recs { margin: var(--df-space-5) 0 var(--df-space-2); }
.bp-empty { text-align: center; padding: var(--df-space-8) var(--df-space-6); border-style: dashed; }
.bp-empty h3 { margin: 0 0 6px; }
.bp-empty p { max-width: 520px; margin: 0 auto var(--df-space-5); }
.bp-empty .row-actions { justify-content: center; }

/* Demo Library for a demo: the bar that leads to its Blueprint, at the top of the page and
   sticky under the site header (library-bar.js sets `top` to the header's real height). */
.library-bar { position: sticky; top: 72px; z-index: 40; margin: 0 0 var(--df-space-5); }
.library-bar-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 12px 18px; background: var(--df-paper); border: 1px solid var(--df-blue);
  border-radius: var(--df-radius); box-shadow: var(--df-shadow-raised);
}
.library-bar-count { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.library-bar .button:disabled {
  opacity: 1; background: var(--df-border); border-color: var(--df-border); color: var(--df-muted); box-shadow: none;
}
@media (max-width: 640px) {
  .library-bar { margin-left: -16px; margin-right: -16px; }
  .library-bar-inner { border-radius: 0; border-width: 0 0 1px; padding: 10px 16px; }
  .library-bar .button { width: 100%; min-height: 44px; }
}

/* Customize demo */
.cz-intro { max-width: 640px; }
.cz-flow-section { margin-bottom: var(--df-space-4); }
.cz-flow-section summary { cursor: pointer; }
.cz-flow-section .table-wrap { margin-top: var(--df-space-3); }
[data-state="ready"] { background: var(--df-ok-soft); color: var(--df-ok-text); }
[data-state="review"] { background: var(--df-warn-soft); color: var(--df-warn-text); }
[data-state="edited"], [data-state="added"] { background: var(--df-blue-soft); color: var(--df-blue-dark); }
.cz-locked { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: var(--df-space-5); }
.cz-locked p { margin: 0; flex: 1 1 320px; }
.cz-locked form { margin: 0; }
.setup-flow-updates { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--df-space-4); }
.setup-flow-updates .badge { text-decoration: none; }
.cz-language .inline-form .field { flex: 0 1 300px; }
.cz-language .hint { margin: 6px 0 0; }
.cz-language .kv { margin: 0; }
.cz-world-head { margin: 0 0 4px; }
.cz-empty-tab a { font-weight: 600; }
.cz-stale-data { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 var(--df-space-5); }
.cz-world-head h2 { font-size: var(--df-text-xl); }
.cz-world-hint { margin: 0 0 var(--df-space-5); font-size: var(--df-text-sm); }
.cz-group { margin-bottom: var(--df-space-6); }
.cz-group > h3 { font-size: var(--df-text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--df-muted); margin: 0 0 8px; }
.cz-group-note { margin: -2px 0 10px; }
.cz-items { list-style: none; margin: 0; padding: 0; background: var(--df-paper); border: 1px solid var(--df-border); border-radius: var(--df-radius); box-shadow: var(--df-shadow); }
.cz-item { padding: 14px 18px; border-bottom: 1px solid var(--df-border); scroll-margin-top: 96px; min-width: 0; }
.cz-item:last-child { border-bottom: none; }
.cz-item.is-customized { box-shadow: inset 3px 0 0 var(--df-blue); }
.cz-item.has-review { box-shadow: inset 3px 0 0 var(--df-warn); }
.cz-item.is-editing { background: var(--df-subtle); box-shadow: inset 3px 0 0 var(--df-blue); }
.cz-item-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; }
.cz-item-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.cz-item-title h4 { margin: 0; font-size: var(--df-text-md); overflow-wrap: anywhere; }
.cz-item-actions { gap: 10px; }
.cz-facts { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 8px 0 0; font-size: var(--df-text-sm); }
.cz-fact { min-width: 0; }
.cz-fact dt { color: var(--df-muted); font-size: 0.75rem; font-weight: 600; }
.cz-fact dd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-weight: 600; overflow-wrap: anywhere; }
.cz-fact.is-customized dt::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 5px; border-radius: 50%; background: var(--df-blue); vertical-align: 1px; }
.cz-fact.is-customized .cz-value { color: var(--df-blue-dark); }
.cz-fact-fixed dd { font-weight: 500; color: var(--df-muted); }
.cz-reset { display: inline; margin: 0; }
.cz-reset .link-button, .cz-plain-list .link-button { font-size: 0.78rem; }
.cz-note { flex-basis: 100%; color: var(--df-warn-text); font-size: 0.78rem; font-weight: 500; }
.cz-dot { display: inline-block; width: 6px; height: 6px; margin-left: 4px; border-radius: 50%; background: var(--df-blue); vertical-align: 2px; }
.cz-used { margin: 8px 0 0; font-size: 0.8rem; }
.cz-flag { margin-top: 10px; padding: 10px 12px; border: 1px solid #EBD49A; border-radius: var(--df-radius-control); background: var(--df-warn-soft); color: var(--df-warn-text); font-size: var(--df-text-sm); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.cz-flag > p { margin: 0; flex: 1 1 280px; font-weight: 600; }
.cz-flag .button-quiet { color: var(--df-warn-text); }
.cz-confirm { flex-basis: 100%; margin: 4px 0 0; padding: 10px 12px; background: var(--df-paper); border-radius: var(--df-radius-control); color: var(--df-navy); }
.cz-confirm p { margin: 0 0 10px; }
.cz-intentional { margin: 10px 0 0; font-size: var(--df-text-sm); color: var(--df-muted); }
.cz-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; margin-top: 12px; align-items: start; }
.cz-form .field { margin-bottom: 12px; }
.cz-form .form-error, .cz-form-note, .cz-form-actions { grid-column: 1 / -1; }
.cz-form .form-error p { margin: 0; }
.cz-form-note { margin: 0 0 12px; }
.cz-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cz-form .field.is-customized label { color: var(--df-blue-dark); }
.cz-upper { text-transform: uppercase; }
.cz-add { margin-top: 10px; }
.cz-add summary { cursor: pointer; color: var(--df-blue); font-weight: 700; font-size: var(--df-text-sm); }
.cz-add[open] { padding: 14px 18px 4px; background: var(--df-paper); border: 1px solid var(--df-border); border-radius: var(--df-radius); }
.cz-add[open] summary { margin-bottom: 4px; }
.cz-order-lines { grid-column: 1 / -1; margin: 0 0 12px; padding: 10px 14px 4px; border: 1px solid var(--df-border); border-radius: var(--df-radius); }
.cz-order-lines legend { padding: 0 6px; font-size: var(--df-text-sm); font-weight: 700; color: var(--df-navy); }
.cz-order-line { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr 120px; gap: 0 12px; align-items: end; }
.cz-order-line .field { margin-bottom: 10px; font-size: var(--df-text-sm); }
.cz-order-line .field input, .cz-order-line .field select { width: 100%; }
.cz-order-line input[readonly] { background: var(--df-paper); color: var(--df-faint); }
.cz-line-remove { margin-bottom: 14px; }
.cz-order-lines [data-add-line] { margin-bottom: 10px; }
.cz-check { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-weight: 600; }
.cz-check + .hint { grid-column: 1 / -1; margin: 2px 0 12px; }
@media (max-width: 720px) { .cz-order-line { grid-template-columns: 1fr 1fr; } }
.cz-plain-list { list-style: none; margin: 0; padding: 0; }
.cz-plain-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--df-border); font-size: var(--df-text-sm); }
.cz-plain-list li:last-child { border-bottom: none; }
.cz-plain-list form { margin: 0; }
.cz-stale h3 { margin-top: 0; font-size: var(--df-text-md); }
@media (max-width: 640px) {
  .cz-item { padding: 12px 14px; }
  .cz-form { grid-template-columns: 1fr; }
  .cz-form-actions .button, .cz-locked .button { width: 100%; min-height: 44px; }
  .cz-locked form { width: 100%; }
}

/* Review changes */
.cz-counts { margin: 0; font-weight: 600; }
.cz-review-table td { vertical-align: top; }
.cz-review-table .cz-old { color: var(--df-muted); }
.cz-review-table .cz-new { font-weight: 700; color: var(--df-navy); }
.cz-review-table .cz-wrap { white-space: normal; }
.cz-review-table td { white-space: normal; overflow-wrap: anywhere; }
.cz-review-table td:first-child { min-width: 180px; }
.cz-review-note td { background: var(--df-warn-soft); color: var(--df-warn-text); font-weight: 600; }
.cz-review-note p { margin: 0 0 4px; }
.cz-status[data-status-kind="updated"] { background: var(--df-blue-soft); color: var(--df-blue-dark); }
.cz-status[data-status-kind="added"] { background: var(--df-ok-soft); color: var(--df-ok-text); }
.cz-status[data-status-kind="removed"] { background: var(--df-bad-soft); color: var(--df-bad-text); }
.cz-status[data-status-kind="requires_review"] { background: var(--df-warn-soft); color: var(--df-warn-text); }
.cz-unchanged { margin-top: var(--df-space-4); }
.cz-unchanged summary { cursor: pointer; color: var(--df-blue); font-weight: 600; font-size: var(--df-text-sm); margin-bottom: 8px; }
.cz-prepare .row-actions { justify-content: flex-end; }
.cz-prepare p { margin-top: 0; }
@media (max-width: 640px) {
  .cz-review-table td:first-child { min-width: 0; }
  .cz-prepare .button { width: 100%; min-height: 44px; }
  .cz-prepare .row-actions form, .cz-prepare .row-actions a { width: 100%; }
}
.cz-review-stale p { margin: 0 0 6px; }
.cz-review-stale .cz-plain-list li { border-color: #EBD49A; font-weight: 500; }
.demo-edit-again { margin-bottom: var(--df-space-4); } .demo-edit-again p { margin-top: 0; }
@media (max-width: 640px) {
  .cz-review-table td:empty { display: none; }
  .cz-review-note td { display: block; padding: 10px 0; }
  .cz-review-note td a { display: inline-block; margin-top: 4px; }
}

/* Customize demo, compact world (Loïc 21/10): one row per item, values under Details or Edit,
   a sticky navigation of the sections with their counts. */
.cz-nav { position: sticky; top: 64px; z-index: 30; margin: 0 0 var(--df-space-5); padding: 8px 0; background: var(--df-bg); border-bottom: 1px solid var(--df-border); }
.cz-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.cz-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--df-border); border-radius: var(--df-radius-pill); background: var(--df-paper); color: var(--df-navy); font-size: var(--df-text-sm); font-weight: 600; text-decoration: none; }
.cz-nav a:hover { border-color: var(--df-blue); color: var(--df-blue-dark); }
.cz-nav a.is-customized { border-color: #CFE0FD; background: var(--df-blue-soft); }
.cz-nav a.has-review { border-color: #EBD49A; background: var(--df-warn-soft); }
.cz-nav-count { color: var(--df-muted); font-size: 0.75rem; }
.cz-nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--df-warn); }
.cz-group { scroll-margin-top: 130px; }
.cz-group-summary { text-transform: none; letter-spacing: 0; font-weight: 600; }
.cz-group.is-customized > h3 { color: var(--df-blue-dark); }
.cz-group.has-review > h3 { color: var(--df-warn-text); }
.cz-item { padding: 10px 16px; }
.cz-row { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(0, 1.6fr) auto auto; align-items: center; gap: 4px 16px; }
.cz-row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.cz-row-title h4 { margin: 0; font-size: var(--df-text-md); overflow-wrap: anywhere; }
.cz-credit { flex-basis: 100%; margin: 0; font-size: var(--df-text-xs, 12px); }
.cz-credit a { color: inherit; text-decoration: underline; }
.cz-row-facts { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: var(--df-text-sm); font-weight: 600; min-width: 0; }
.cz-kf { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; min-width: 0; }
.cz-kf-name { color: var(--df-muted); font-weight: 500; font-size: 0.78rem; }
.cz-kf.is-customized { color: var(--df-blue-dark); }
.cz-row-used { font-size: 0.78rem; white-space: nowrap; }
.cz-row-actions { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.cz-row-actions form { margin: 0; }
.cz-item .cz-row-facts:empty { display: none; }
/* One table per category (decision 2026-11-07): the head and every row share the same columns;
   the name stands out, the other values read in grey, a missing one fades. */
.cz-table { --cz-row-cols: minmax(160px, 1.6fr) repeat(var(--cz-cols), minmax(0, 1fr)) 110px; }
.cz-table[data-thumbnail] { --cz-row-cols: 36px minmax(160px, 1.6fr) repeat(var(--cz-cols), minmax(0, 1fr)) 110px; }
.cz-table[data-summary] { --cz-row-cols: minmax(160px, 1.4fr) repeat(var(--cz-cols-before), minmax(0, 0.8fr)) minmax(0, 2.6fr) 110px; }
.cz-thead, .cz-table .cz-row { display: grid; grid-template-columns: var(--cz-row-cols); align-items: center; gap: 4px 16px; }
.cz-thead { padding: 0 16px 6px; font-size: 0.75rem; font-weight: 700; color: var(--df-muted); }
.cz-table .cz-item { padding: 9px 16px; }
.cz-table .cz-row-title h4 { font-size: var(--df-text-sm); font-weight: 700; color: var(--df-navy); }
.cz-cell { font-size: var(--df-text-sm); font-weight: 400; color: var(--df-muted); min-width: 0; overflow-wrap: anywhere; }
.cz-cell.is-empty { color: var(--df-faint); }
.cz-table .cz-row-actions { gap: 14px; }
.cz-edit-link { font-size: var(--df-text-sm); font-weight: 600; color: var(--df-blue); text-decoration: none; }
.cz-edit-link:hover, .cz-edit-link:focus-visible { text-decoration: underline; }
.cz-thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--df-subtle); display: block; }
.cz-thumb-none { border: 1px dashed var(--df-border); }
.cz-table .cz-item > :not(.cz-row) { margin-top: 10px; }
.cz-lines { border-collapse: collapse; margin-top: 10px; font-size: var(--df-text-sm); }
.cz-lines th, .cz-lines td { padding: 4px 18px 4px 0; text-align: left; border-bottom: 1px solid var(--df-border); }
.cz-lines thead th { font-size: 0.75rem; font-weight: 700; color: var(--df-muted); }
.cz-lines tbody th { font-weight: 600; }
.cz-lines td { color: var(--df-muted); }
.cz-lines td.is-customized { color: var(--df-blue-dark); font-weight: 600; }
.cz-lines .cz-reset { display: inline; }
.cz-table .cz-fact dd { font-weight: 400; color: var(--df-muted); }
.cz-table .cz-fact.is-customized dd { font-weight: 600; }
@media (max-width: 960px) {
  .cz-thead { display: none; }
  .cz-table .cz-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cz-table .cz-thumb, .cz-table .cz-cell { grid-column: 1; }
}
.cz-details { margin-top: 4px; }
.cz-details summary { cursor: pointer; display: inline-block; color: var(--df-blue); font-size: 0.78rem; font-weight: 700; }
.cz-details[open] { padding-bottom: 4px; }
.cz-details .cz-facts { margin-top: 6px; }
.cz-library { flex-basis: 100%; color: var(--df-muted); font-size: 0.75rem; font-weight: 500; }
.cz-flag { margin-top: 8px; padding: 8px 12px; }
@media (max-width: 960px) {
  .cz-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cz-row-facts { grid-column: 1 / -1; grid-row: 2; }
  .cz-row-used { grid-column: 1; grid-row: 3; }
  .cz-row-actions { grid-column: 2; grid-row: 1; }
}
@media (max-width: 640px) {
  .cz-nav { position: static; padding: 0; border: 0; background: none; }
  .cz-nav ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
  .cz-nav a { white-space: nowrap; }
}
/* "Details" is a toggle in the row (no script): the values open under it. */
.cz-details { display: none; margin-top: 8px; }
.cz-toggle:checked ~ .cz-details { display: block; }
.cz-more-label { cursor: pointer; color: var(--df-blue); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.cz-more-label:hover { text-decoration: underline; }
.cz-toggle:focus-visible ~ .cz-row .cz-more-label { outline: 2px solid var(--df-blue); outline-offset: 2px; }
.cz-toggle:checked ~ .cz-row .cz-more-label { color: var(--df-navy); }

/* The translation by the AI (phase C3), in Demo Setup › Flows: the proposal, the AI badge. */
.cz-ai-proposal { border-left: 3px solid var(--df-blue); }
.cz-ai-proposal.is-refused { border-left-color: var(--df-warn); }
.cz-ai-request { margin: 0 0 12px; overflow-wrap: anywhere; }
.cz-ai-reasons { margin: 0 0 8px; }
.cz-ai-reasons li { font-weight: 600; }
.cz-ai-actions { margin-top: 12px; }
.cz-ai-proposal .cz-review-table td:nth-child(2) { min-width: 96px; overflow-wrap: normal; word-break: normal; }
.cz-ai-badge { margin-left: 6px; font-size: 0.7rem; }
.cz-translate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.cz-translate .hint { margin: 0; }
.cz-translate .button { white-space: normal; text-align: left; max-width: 100%; }
@media (max-width: 720px) {
  .cz-ai-actions form, .cz-ai-actions .button { width: 100%; }
  .cz-ai-actions .button { min-height: 44px; }
  .cz-translate .button { width: 100%; min-height: 44px; text-align: center; }
}

/* Loading a demo (phase D): removals to confirm, steps reported by the environment, what the
   environment can prepare per flow. A step is drawn done only once it was reported. */
.demo-load-confirm { flex-direction: column; align-items: stretch; }
.demo-load-confirm .field { flex: none; }
.demo-load-confirm .button { align-self: flex-start; }
.load-removals { border: 1px solid #EBD49A; background: var(--df-warn-soft); border-radius: var(--df-radius, 10px); padding: var(--df-space-4); }
.load-removals-title { margin: 0 0 var(--df-space-2); font-weight: 700; color: var(--df-warn-text); }
.load-removals .content-list li { border-bottom-color: #EBD49A; }
.load-removals-confirm { display: flex; align-items: center; gap: 8px; margin-top: var(--df-space-3); font-weight: 600; cursor: pointer; }
.load-removals-confirm input { width: 18px; height: 18px; margin: 0; flex: none; }
.load-progress .panel-head { margin-bottom: var(--df-space-3); }
.load-progress-starting { display: flex; align-items: center; gap: 8px; margin: 0 0 var(--df-space-3); }
.load-steps { list-style: none; margin: 0; padding: 0; }
.load-step { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--df-border); font-size: var(--df-text-sm); }
.load-step:last-child { border-bottom: 0; }
.load-step-label { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.load-step-state { color: var(--df-muted); font-size: var(--df-text-xs); font-weight: 700; text-align: right; }
.load-step-mark { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--df-border-strong, #C9D1DC); box-sizing: border-box; }
.load-step[data-state="done"] .load-step-mark { background: var(--df-ok); border-color: var(--df-ok); }
.load-step[data-state="done"] .load-step-state { color: var(--df-ok-text); }
.load-step[data-state="attention"] .load-step-mark { background: var(--df-warn); border-color: var(--df-warn); }
.load-step[data-state="attention"] .load-step-state { color: var(--df-warn-text); }
.load-step[data-state="not_confirmed"] .load-step-mark { border-style: dashed; }
.load-step[data-state="waiting"] .load-step-label { color: var(--df-muted); font-weight: 500; }
.load-step[data-state="in_progress"] .load-step-mark, .step-spinner { border-color: var(--df-blue-soft); border-top-color: var(--df-blue); animation: step-spin 0.9s linear infinite; }
.step-spinner { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid; box-sizing: border-box; flex: none; }
@keyframes step-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .load-step[data-state="in_progress"] .load-step-mark, .step-spinner { animation: none; border-style: dotted; } }
.flow-support-list { list-style: none; margin: 0; padding: 0; font-size: var(--df-text-sm); }
.flow-support-list > li { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--df-border); }
.flow-support-list > li:last-child { border-bottom: 0; }
.flow-support-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.flow-support-badge[data-level="supported"] { background: var(--df-ok-soft); color: var(--df-ok-text); }
.flow-support-badge[data-level="partial"], .flow-support-badge[data-level="needs_confirmation"] { background: var(--df-warn-soft); color: var(--df-warn-text); }
.flow-support-badge[data-level="not_supported"] { background: var(--df-bad-soft); color: var(--df-bad-text); }
.flow-support-confirm { margin: 2px 0 0; padding-left: 18px; color: var(--df-muted); }
.flow-support-confirm li { padding: 1px 0; overflow-wrap: anywhere; }

/* ---------- Product updates (Flow Library management) ---------- */
.product-updates-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.product-updates-panel h2 { margin: 0 0 4px; font-size: var(--df-text-lg); }
.product-updates-intro { margin: 0 0 6px; font-size: var(--df-text-sm); }
.product-updates-counts { margin: 0; font-weight: 700; }
.product-update-lines { margin: 0; padding-left: 20px; }
.product-update-lines li { margin: 4px 0; }
.product-update-flows, .product-update-demos { list-style: none; margin: 0; padding: 0; }
.product-update-flows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--df-border); }
.product-update-flows li:last-child { border-bottom: 0; }
.product-update-flow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.product-update-flow .hint { font-size: 0.82rem; color: var(--df-muted); }
.product-update-demos li { padding: 6px 0; }
.product-update h3 .badge { margin-left: 6px; vertical-align: middle; }

/* Demo readiness (Lot 3): one row per flow, its checks inside. */
.readiness .panel-head { flex-wrap: wrap; gap: 6px 12px; }
.readiness-must-line { font-size: var(--df-text-sm); font-weight: 600; color: var(--df-navy); }
.readiness-summary { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; font-size: var(--df-text-sm); background: var(--df-blue-soft); color: var(--df-blue-dark); }
.readiness-summary[data-kind="blocked"] { background: var(--df-bad-soft); color: var(--df-bad-text); }
.readiness-summary[data-kind="warning"] { background: var(--df-warn-soft); color: var(--df-warn-text); }
.readiness-summary[data-kind="ok"] { background: var(--df-ok-soft); color: var(--df-ok-text); }
.readiness-flows { list-style: none; margin: 14px 0 0; padding: 0; }
.readiness-flow { border-top: 1px solid var(--df-border); }
.readiness-flow:last-child { border-bottom: 1px solid var(--df-border); }
.readiness-flow-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 12px 0; cursor: pointer; list-style: none; }
.readiness-flow-head::-webkit-details-marker { display: none; }
.readiness-flow-head::before { content: "▸"; color: var(--df-muted); margin-right: -4px; }
.readiness-flow details[open] > .readiness-flow-head::before { content: "▾"; }
.readiness-flow-name { flex: 1 1 200px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.readiness-flow-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.readiness-priority { background: var(--df-paper); color: var(--df-muted); border: 1px solid var(--df-border); }
.readiness-priority[data-priority="must_show"] { background: var(--df-blue-soft); color: var(--df-blue-dark); border-color: transparent; }
.readiness-manual-badge { background: var(--df-warn-soft); color: var(--df-warn-text); }
.readiness-badge, .rs-readiness-badge { background: var(--df-blue-soft); color: var(--df-blue-dark); }
.readiness-badge[data-readiness="ready"], .rs-readiness-badge[data-readiness="ready"] { background: var(--df-ok-soft); color: var(--df-ok-text); }
.readiness-badge[data-readiness="ready_with_warnings"], .rs-readiness-badge[data-readiness="ready_with_warnings"] { background: var(--df-warn-soft); color: var(--df-warn-text); }
.readiness-badge[data-readiness="blocked"], .rs-readiness-badge[data-readiness="blocked"] { background: var(--df-bad-soft); color: var(--df-bad-text); }
.readiness-body { padding: 0 0 14px; font-size: var(--df-text-sm); }
.readiness-warning { margin: 0 0 10px; }
.readiness-technical-line { display: flex; align-items: center; gap: 8px; margin: 0; }
.readiness-checks { list-style: none; margin: 6px 0 0; padding: 0; }
.readiness-checks > li { display: flex; gap: 8px; padding: 6px 0; }
.readiness-manual > li { padding: 10px 0; border-top: 1px dashed var(--df-border); }
.readiness-manual > li:first-child { border-top: 0; }
.readiness-mark { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; border: 2px solid var(--df-blue); background: transparent; }
.readiness-technical-line .readiness-mark { margin-top: 0; }
.readiness-mark[data-status="passed"] { background: var(--df-ok-text); border-color: var(--df-ok-text); }
.readiness-mark[data-status="blocked"] { background: var(--df-bad-text); border-color: var(--df-bad-text); }
.readiness-mark[data-status="not_verified"] { border-style: dashed; border-color: var(--df-muted); }
.readiness-check-text { flex: 1; min-width: 0; }
.readiness-check-text p { margin: 0; }
.readiness-check-label { font-weight: 600; color: var(--df-navy); overflow-wrap: anywhere; }
.readiness-check-status { font-weight: 600; font-size: 0.75rem; color: var(--df-blue-dark); white-space: nowrap; }
.readiness-check-status[data-status="passed"] { color: var(--df-ok-text); }
.readiness-check-status[data-status="blocked"] { color: var(--df-bad-text); }
.readiness-check-status[data-status="not_verified"] { color: var(--df-muted); }
.readiness-check-meta { margin-top: 2px !important; font-size: 0.78rem; }
.readiness-note { margin-top: 4px !important; font-style: italic; color: var(--df-navy); }
.readiness-stale { margin-top: 4px !important; color: var(--df-warn-text); font-weight: 600; font-size: 0.78rem; }
.readiness-manual-heading { margin: 14px 0 2px; font-size: var(--df-text-sm); color: var(--df-muted); }
.readiness-hint { margin: 0 0 4px; }
.readiness-form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.readiness-form input[type="text"] { flex: 1 1 220px; min-width: 0; padding: 6px 10px; font-size: var(--df-text-sm); }
.readiness-form-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.readiness-change { margin-top: 4px; }
.readiness-change summary { cursor: pointer; color: var(--df-blue); font-size: 0.78rem; font-weight: 600; }
.rs-readiness { list-style: none; margin: 8px 0; padding: 0; font-size: var(--df-text-sm); }
.rs-readiness li { padding: 3px 0; }

/* ---------- A newer version of a flow (flows/evolution.py) ---------- */
.bp-update { background: var(--df-blue-soft); border-color: transparent; color: var(--df-navy); }
.bp-update p { margin: 0 0 4px; }
.bp-update .muted { font-size: var(--df-text-sm); }
.bp-update-lines { margin: 4px 0 8px; padding-left: 20px; font-size: var(--df-text-sm); }
.bp-update-lines li { margin: 2px 0; overflow-wrap: anywhere; }
.bp-update .hint { font-size: 0.82rem; margin: 0 0 6px; }
.bp-update-action { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 6px; }
.bp-update-action .hint { margin: 0; }
.flow-source-update { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.flow-source-update a { font-size: 0.82rem; }
.flow-compare-table td { white-space: normal; vertical-align: top; }
.flow-compare-table .flow-compare-text { overflow-wrap: anywhere; font-size: var(--df-text-sm); min-width: 18ch; }
.flow-compare-kept td { background: var(--df-warn-soft); }
.flow-source-update-actions { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.flow-source-update-actions .hint { margin: 0; }
.flow-updates { margin-top: 16px; }
.flow-source-update-actions form { max-width: 100%; }
.flow-source-update-actions .button { white-space: normal; max-width: 100%; height: auto; min-height: 40px; text-align: center; }

/* ---------- My Deals tabs, deal header and Sales contact (End-User V2) ---------- */
.tabs .tab-count { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--df-neutral-soft); color: var(--df-muted); font-size: var(--df-text-xs); font-weight: 700; text-align: center; }
.tabs a[aria-current="page"] .tab-count { background: var(--df-blue-soft); color: var(--df-blue-dark); }
.tabs .tab-dot { display: inline-block; width: 7px; height: 7px; margin-left: 4px; border-radius: 50%; background: var(--df-warn); vertical-align: 0.1em; }
.tabs a:focus-visible { outline: 2px solid var(--df-blue); outline-offset: 2px; border-radius: 4px; }
.badge[data-sales="ACTIVE"] { background: var(--df-blue-soft); color: var(--df-blue-dark); }
.badge[data-sales="CLOSED_WON"] { background: var(--df-ok-soft); color: var(--df-ok-text); }
.badge[data-sales="CLOSED_LOST"] { background: var(--df-neutral-soft); color: var(--df-muted); }
.badge[data-sales="NURTURING"] { background: var(--df-warn-soft); color: var(--df-warn-text); }
.deal-head { align-items: flex-end; }
.deal-status { display: flex; align-items: center; gap: 8px; }
.deal-closed-note { margin: 0 0 var(--df-space-2); color: var(--df-muted); }
.deal-tabs { margin-top: var(--df-space-3); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--df-space-3); margin-bottom: var(--df-space-3); }
.card-head h2 { margin: 0; }
.sales-contact { max-width: 640px; }
.sales-contact-current { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.sales-contact-current a { font-weight: 700; overflow-wrap: anywhere; }
.sales-contact-form { margin-top: var(--df-space-4); }
.deal-edit { margin-bottom: var(--df-space-4); }
.deal-edit summary { cursor: pointer; color: var(--df-blue); font-weight: 600; }
.deal-edit-form { margin-top: var(--df-space-3); max-width: 720px; }
/* The deal's context (V1.2): two columns of short fields, the texts across. */
.deal-context-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--df-space-4); }
.deal-context-fields .field-description, .deal-context-fields .field-ai_summary { grid-column: 1 / -1; }
.deal-context-optional { margin-bottom: var(--df-space-4); }
.deal-context-optional summary { cursor: pointer; color: var(--df-blue); font-weight: 600; margin-bottom: var(--df-space-3); }
.deal-context, .deal-documents { max-width: 720px; }
.deal-documents { margin-top: var(--df-space-5); }
.deal-documents-demo h3 { margin: var(--df-space-4) 0 4px; font-size: var(--df-text-md); }
.deal-context-list { display: grid; gap: var(--df-space-3); margin: var(--df-space-4) 0 0; }
.deal-context-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--df-space-3); }
.deal-context-row dt { font-weight: 700; font-size: var(--df-text-sm); }
.deal-context-row dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .deal-head { align-items: stretch; }
  .deal-status { width: 100%; flex-wrap: wrap; }
  .deal-status:has(.deal-sentiment) { align-items: flex-start; }
  .pill-edit-pop { right: auto; left: 0; max-width: calc(100vw - 32px); }
  .page-head .pill-edit-pop .button { width: auto; }
  .deal-context-fields, .deal-context-row { grid-template-columns: minmax(0, 1fr); }
}

/* Digital Twin connection (V1.2): the declared permissions, a list of checkboxes across the form. */
.inline-form .field-permissions { flex: 1 1 100%; }
.field-permissions > div { display: grid; gap: 4px; }
.field-permissions label { font-weight: 500; }
.twin-permissions { margin: 0; padding-left: 18px; }
/* My Coupa Environment (correction 9): one card per environment of the person. */
/* A Production environment (V1.2): allowed, said before anything is prepared in it. */
.env-production-warning { flex-basis: 100%; margin: 0 0 var(--df-space-3); padding: 10px 12px; border: 1px solid #EBD49A; border-radius: 8px; background: var(--df-warn-soft); color: var(--df-warn-text); font-size: var(--df-text-sm); font-weight: 600; }
.my-env { max-width: 760px; }
.my-env-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--df-space-3); margin-bottom: var(--df-space-4); }
.my-env-head h2 { margin: 0; font-size: var(--df-text-lg); overflow-wrap: anywhere; }
.my-env-facts { display: grid; gap: var(--df-space-3); margin: 0 0 var(--df-space-5); }
.my-env-facts > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--df-space-3); }
.my-env-facts dt { font-weight: 700; font-size: var(--df-text-sm); }
.my-env-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.my-env-register { max-width: 760px; }
.my-env-form { max-width: 560px; }
.my-env-credentials { max-width: 760px; font-size: var(--df-text-sm); }
@media (max-width: 640px) {
  .my-env-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .my-env .row-actions .button, .my-env .row-actions form { width: 100%; }
  .my-env .row-actions form .button { width: 100%; }
}

/* Partner space: the assigned connections (an address can be long; the actions stay visible). */
.partner-connections .mono-cell { white-space: normal; word-break: break-all; }
.partner-connections .row-actions { flex-wrap: nowrap; }
@media (min-width: 761px) { .partner-connections td[data-label="Address in use"] { max-width: 220px; } }
.pending-request .kv, .twin-request .kv { margin: 10px 0; }

/* My Deals: a deal shared with me, or one of mine I shared (01/11/2026) */
.shared-mark { display: inline-flex; align-items: center; margin-left: 8px; padding: 2px 6px; border-radius: 999px; vertical-align: middle; color: var(--df-muted, #5B6675); background: var(--df-bg, #F5F7FA); border: 1px solid var(--df-border, #E3E8EF); cursor: help; }
.shared-mark[data-shared="with-me"] { color: var(--df-blue); background: var(--df-blue-soft); border-color: transparent; }
.shared-mark[data-shared="team"] { color: #4A6382; background: #E8EEF5; border-color: #D3DDE9; }

/* Console › Partners › API keys: issue form and the key shown once */
.key-form { display: flex; flex-direction: column; gap: 16px; }
.key-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 24px; align-items: start; }
.key-form-grid .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.key-form-grid input:not([type="checkbox"]), .key-form-grid select { width: 100%; }
.key-form-grid .field-help { font-size: 13px; color: var(--df-muted); }
.key-scopes { border: 0; padding: 0; grid-column: 1 / -1; }
.key-scopes .check + .check { margin-top: 4px; }
.key-scopes legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.key-scopes .check { display: flex; align-items: center; gap: 8px; font-weight: 400; width: fit-content; }
.key-scopes .check input[type="checkbox"] { width: auto; flex: none; margin: 0; }
.key-form-actions { display: flex; justify-content: flex-start; }
.key-secret { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.key-secret pre { flex: 1 1 320px; min-width: 0; margin: 0; overflow-x: auto; user-select: all; }
.key-dates { font-size: 13px; color: var(--df-muted); line-height: 1.5; }

/* The status of a demo in a list (web/_demo_progress.html) */
.badge[data-progress="ready"] { background: var(--df-blue-soft); color: var(--df-blue-dark); }
.badge[data-progress="done"] { background: var(--df-ok-soft); color: var(--df-ok-text); }
.progress-note { display: block; margin-top: 3px; color: var(--df-muted); font-size: var(--df-text-xs); font-weight: 400; }

/* The demo's date, on its page */
.demo-date { display: flex; flex-wrap: wrap; align-items: center; gap: var(--df-space-2); margin-top: var(--df-space-2); font-size: var(--df-text-sm); }
.demo-date label { display: inline; margin: 0; font-weight: 700; }
.demo-date input { max-width: 190px; }


/* Article base (Administration, lot D3) */
.article-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0 0 16px; }
.article-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 0.875rem; }
.article-decide { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.article-decide select { min-width: 180px; }

/* « Search or create account » under the Account field (lot L1, account-search.js). */
.account-search { margin: -8px 0 var(--df-space-4); }
.account-search .hint { margin: 0 0 6px; }
.account-search-group { margin: 8px 0 4px; font-size: var(--df-text-xs); font-weight: 700; color: var(--df-muted); }
.account-search-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; margin: 0 0 4px; padding: 8px 10px; border: 1px solid var(--df-border); border-radius: var(--df-radius); background: var(--df-paper); font: inherit; text-align: left; cursor: pointer; }
.account-search-item:hover { border-color: var(--df-blue); background: var(--df-blue-soft); }
.account-search-item:focus-visible { outline: none; box-shadow: var(--df-focus); }
.account-search-item .muted { font-size: var(--df-text-sm); }
.account-search-create { margin-top: 4px; }
.account-linked { color: var(--df-ok-text); font-weight: 600; }

/* Requests from WinnerCloser (lot L2): the request and the Solution Advisor's answer. */
.request-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: var(--df-space-5); align-items: start; }
.request-grid > .request-brief { grid-column: 1; }
.request-grid > aside { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 900px) { .request-grid { grid-template-columns: 1fr; } .request-grid > aside, .request-grid > .request-brief { grid-column: auto; grid-row: auto; } }
/* Structured brief (contract v1.7 §5.8), on the request and, folded, on Quick Setup's first screen. */
.request-brief h3.brief-class { margin: var(--df-space-4) 0 var(--df-space-2); font-size: 0.95rem; }
.brief-items { margin: 0; padding-left: 1.1rem; display: grid; gap: 8px; }
.brief-verified_evidence { color: var(--df-success, #1F7A4D); }
.brief-open_unverified { color: var(--df-warning, #9A5B00); }
.qs-brief { margin-bottom: var(--df-space-5); }
.qs-brief > summary { cursor: pointer; font-weight: 600; }
.qs-brief .request-brief { box-shadow: none; border: 0; padding: 0; }
.request-facts { display: grid; grid-template-columns: 9.5rem 1fr; gap: 10px 16px; margin: 0; }
.request-facts dt { font-weight: 700; font-size: var(--df-text-sm); color: var(--df-muted); }
.request-facts dd { margin: 0; }
.request-thread { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.request-thread li { background: var(--df-subtle); border: 1px solid var(--df-border); border-radius: var(--df-radius); padding: 10px 12px; }
.request-thread p { margin: 4px 0 0; }
.request-stack { display: grid; gap: 10px; justify-items: start; }
.request-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: var(--df-space-4); }
.request-choices { border: 0; padding: 0; margin: 0; }
.request-choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--df-border); border-radius: var(--df-radius); margin-bottom: 8px; cursor: pointer; }
.request-choice:has(input:checked) { border-color: var(--df-blue); background: var(--df-blue-soft); }
.request-choice input { margin-top: 4px; }
.request-synced { margin-top: var(--df-space-4); font-size: var(--df-text-sm); }
.request-stack .link-button:disabled { color: var(--df-muted); text-decoration: none; cursor: not-allowed; }
/* Share with Sales (L4) */
.recording-share { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: var(--df-space-3); }
.recording-share p { margin: 0; }
.share-preview h3 { font-size: var(--df-text-sm); margin: var(--df-space-3) 0 4px; }
.debrief-share-entry { border-top: 1px solid var(--df-border); margin-top: var(--df-space-4); padding-top: var(--df-space-3); }
.debrief-share-entry h3 { font-size: var(--df-text-sm); margin: 0; }
/* Sales status and SA sentiment (L5): badges in the deal header, a pencil opens the edit. */
.deal-status:has(.deal-sentiment) { flex-direction: column; align-items: flex-end; gap: 6px; }
.deal-pill { display: flex; align-items: center; gap: 8px; }
.deal-pill-label { font-size: var(--df-text-sm); font-weight: 600; color: var(--df-muted); white-space: nowrap; }
.pill-edit { position: relative; }
.pill-edit > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px; border-radius: 999px; }
.pill-edit > summary::-webkit-details-marker { display: none; }
.pill-edit > summary:focus-visible { outline: 2px solid var(--df-blue); outline-offset: 2px; }
.pill-pencil { color: var(--df-muted); opacity: 0.7; transition: opacity .15s, color .15s; }
.pill-edit > summary:hover .pill-pencil, .pill-edit[open] .pill-pencil { opacity: 1; color: var(--df-blue); }
.pill-edit-pop { position: absolute; z-index: 20; right: 0; top: calc(100% + 6px); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: max-content; max-width: 20rem; padding: 12px; background: var(--df-paper); border: 1px solid var(--df-border); border-radius: var(--df-radius-control); box-shadow: var(--df-shadow-raised); }
.pill-edit-pop label { flex-basis: 100%; margin: 0; font-size: var(--df-text-sm); font-weight: 600; color: var(--df-muted); }
.pill-edit-pop select { width: auto; min-width: 150px; flex: 1 1 auto; }
.deal-sentiment-hint { flex-basis: 100%; margin: 0; font-size: var(--df-text-sm); }
.badge[data-sentiment="STRONG"] { background: var(--df-ok-soft); color: var(--df-ok-text); }
.badge[data-sentiment="GOOD"] { background: var(--df-blue-soft); color: var(--df-blue-dark); }
.badge[data-sentiment="MIXED"] { background: var(--df-warn-soft); color: var(--df-warn-text); }
.badge[data-sentiment="WEAK"] { background: var(--df-bad-soft); color: var(--df-bad-text); }
.badge[data-sentiment="NONE"] { background: var(--df-neutral-soft); color: var(--df-muted); }
/* Sales collaboration (L6a): the SA asks a sales rep to link a deal started alone. */
.sales-collaboration { margin-top: var(--df-space-5); max-width: 640px; }
.sales-collaboration .request-facts { grid-template-columns: 7rem 1fr; margin-bottom: var(--df-space-3); }
.collab-quote { margin: var(--df-space-3) 0; padding: 10px 12px; border-left: 3px solid var(--df-blue); background: var(--df-subtle); border-radius: 0 var(--df-radius) var(--df-radius) 0; }
.collab-picked { margin: 0 0 6px; padding: 10px 12px; border: 1px solid var(--df-border); border-radius: var(--df-radius); background: var(--df-subtle); }
.collab-sales { border: 0; padding: 0; margin: 0 0 var(--df-space-4); }
.collab-sales legend { font-weight: 700; font-size: var(--df-text-sm); margin-bottom: 6px; }
.collab-search { display: flex; gap: 8px; }
.collab-search input { flex: 1 1 auto; min-width: 0; }
.deal-wc-marker { font-weight: 600; }

/* Fit-gap (deal page): Ref | Requirement & evidence | Status — the module, justification and
   source sit under the requirement, so nothing scrolls sideways; .table-stack makes cards < 640px. */
.fitgap-breakdown { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.fitgap-breakdown .badge strong { color: var(--df-navy); }
.fitgap-table td { white-space: normal; vertical-align: top; overflow-wrap: anywhere; }
.fitgap-table td.fitgap-ref { white-space: nowrap; }
.fitgap-table td.fitgap-status { width: 15rem; }
.fitgap-table td p { margin: 4px 0 0; }
.fitgap-evidence { margin-top: 6px; color: var(--df-muted); font-size: 0.82rem; }
.fitgap-evidence blockquote { margin: 4px 0 0; padding-left: 10px; border-left: 2px solid var(--df-border-strong); font-style: italic; }
.fitgap-decide label { display: block; margin-top: 8px; font-size: 0.82rem; font-weight: 600; }
.fitgap-decide select, .fitgap-decide textarea { display: block; width: 100%; max-width: 100%; margin-top: 2px; }
.fitgap-decide .button { margin-top: 8px; }
@media (max-width: 640px) {
  .fitgap-table td.fitgap-status { display: block; width: 100%; }
  .fitgap-table td.fitgap-status::before { display: block; margin-bottom: 4px; }
}

/* Quick Setup, screen 2 (lot 4): the proposal to review, in four blocks */
.qs-review { max-width: 960px; }
.qs-review-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin: var(--df-space-5) 0 var(--df-space-4); }
.qs-review-head h2 { margin: 0; }
.qs-block { margin-top: var(--df-space-5); }
.qs-block h3 { margin-top: 0; }
.qs-look { display: grid; gap: var(--df-space-4); }
.qs-banner-figure { margin: 0; }
.qs-banner-figure figcaption { margin-bottom: 6px; font-size: var(--df-text-sm); }
.qs-banner { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 18px 14px; overflow: hidden; border-radius: 10px; background: var(--qs-primary); color: #FFFFFF; }
.qs-banner-logo { display: inline-flex; padding: 6px 8px; border-radius: 6px; background: #FFFFFF; }
.qs-banner-logo img { display: block; max-width: 120px; max-height: 36px; object-fit: contain; }
.qs-banner-name { font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); overflow-wrap: anywhere; }
.qs-banner-accent { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--qs-secondary); }
.qs-entries { margin: var(--df-space-4) 0 0; padding: 0; border: 0; }
.qs-entries legend { font-weight: 600; margin-bottom: 6px; }
.qs-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.qs-entry, .qs-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qs-entry input, .qs-add input { flex: 1 1 220px; min-width: 0; }
.qs-add { margin-top: 10px; }
.qs-code { font-size: var(--df-text-xs, 12px); color: var(--df-muted); }
.qs-category { margin: var(--df-space-4) 0 8px; font-size: var(--df-text-sm); }
.qs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.qs-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px; border: 1px solid var(--df-border); border-radius: 10px; background: var(--df-paper); }
.qs-card-photo { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 8px; object-fit: cover; background: var(--df-subtle); }
.qs-card-photo-none { display: grid; place-items: center; border: 1px dashed var(--df-border); color: var(--df-muted); font-size: var(--df-text-sm); }
.qs-card-body p { margin: 0; }
.qs-card-name { font-weight: 600; overflow-wrap: anywhere; }
.qs-card-price { font-size: var(--df-text-sm); }
.qs-card-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; margin-top: auto; }
.qs-photo summary { cursor: pointer; color: var(--df-blue); font-size: var(--df-text-sm); font-weight: 600; }
.qs-photo { flex: 1 1 100%; min-width: 0; }
.qs-photo form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-top: 6px; }
.qs-photo input[type="file"] { width: 100%; min-width: 0; font-size: var(--df-text-xs, 12px); }
.qs-photo .button { min-width: 0; max-width: 100%; }
.qs-roles { margin: 0 0 var(--df-space-3); padding: 0; list-style: none; display: grid; gap: 8px; }
.qs-role { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.qs-role-name { min-width: 110px; font-weight: 600; }
.qs-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; margin-top: var(--df-space-5); }
.qs-foot p { margin: 0; }
/* Quick Setup screen 3: the recap, a term and its value side by side (stacked when narrow). */
.qs-recap { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: 10px 20px; margin: 0; }
.qs-recap dt { font-weight: 600; color: var(--df-muted, #5b6472); }
.qs-recap dd { margin: 0; overflow-wrap: anywhere; }
.qs-recap dd .client-brand-swatch { display: inline-block; vertical-align: middle; margin-right: 4px; }
.qs-recap dd code { margin-right: 10px; }
.qs-recap-list { margin: 0; padding-left: 1.1em; }
.qs-recap dd .hint, .qs-recap dd .gen-note { margin: 4px 0; }
.qs-rules { margin: 0 0 var(--df-space-3, 12px); padding-left: 1.1em; }
@media (max-width: 600px) {
  .qs-recap { grid-template-columns: 1fr; gap: 2px; }
  .qs-recap dd { margin-bottom: 10px; }
}
@media (max-width: 760px) {
  .qs-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qs-foot .button { width: 100%; min-height: 44px; }
}

/* Quick Setup: the organization structure typed by the Solution Advisor (QS-ORG). */
.qs-org-scroll { overflow-x: auto; max-width: 100%; }
.qs-org-levels { border-collapse: collapse; width: 100%; }
.qs-org-levels th, .qs-org-levels td { text-align: left; padding: var(--df-space-2, 8px); border-bottom: 1px solid var(--df-border, #e3e3e3); vertical-align: top; }
.qs-org-confirm { display: flex; flex-wrap: wrap; gap: var(--df-space-2, 8px); align-items: center; }
.qs-org-tree, .qs-org-children { list-style: none; margin: 0; padding-left: 0; }
.qs-org-children { padding-left: var(--df-space-4, 16px); border-left: 1px solid var(--df-border, #e3e3e3); }
.qs-org-node { margin: 2px 0; }
.qs-org-node summary { cursor: pointer; }
.qs-org-row { display: inline-flex; flex-wrap: wrap; gap: var(--df-space-2, 8px); align-items: baseline; }
.qs-org-form textarea { width: 100%; font-family: var(--df-mono, ui-monospace, monospace); font-size: var(--df-text-sm, 14px); }
.qs-org-findings ul { padding-left: var(--df-space-4, 16px); }
.qs-org-findings li[data-severity="blocking"] { color: var(--df-bad-text, #9b1c1c); }
.qs-org-form { margin-top: var(--df-space-5, 24px); padding-top: var(--df-space-4, 16px); border-top: 1px solid var(--df-border, #e3e3e3); }
.qs-org-reason { display: block; margin-top: 2px; }
.qs-org-confirm { margin-top: var(--df-space-2, 8px); }
.qs-org-confirm select { flex: 0 1 20rem; max-width: 100%; }

/* Quick Setup, screen 1: where the organization comes from (recette 23/11). The file is read in
   the browser; its field shows only with the script (quick-setup-org.js). */
.qs-org-source { border: 0; padding: 0; margin: 0 0 var(--df-space-4); }
.qs-org-source legend { font-weight: 700; font-size: var(--df-text-sm); margin-bottom: 6px; padding: 0; }
.qs-org-choice { display: flex; align-items: flex-start; gap: 8px; font-weight: 600; margin-top: 6px; cursor: pointer; }
.qs-org-choice input { margin-top: 3px; flex: none; }
.qs-org-choice + .hint { margin-left: 24px; }
.qs-org-table-panel { margin: var(--df-space-3, 12px) 0 0 24px; padding-left: 12px; border-left: 3px solid var(--df-border); }
.qs-org-table-panel textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; }
@media (max-width: 560px) { .qs-org-table-panel { margin-left: 0; padding-left: 10px; } .qs-org-choice + .hint { margin-left: 0; } }
/* The drop zone of the organization table (_qs_org_file.html): read in the browser, never sent. */
.qs-org-file[hidden], .qs-org-table-panel[hidden], [data-org-note][hidden] { display: none; }
/* The sites a level of the table gives (screen 2): shown, not edited, as compact chips. */
.qs-table-sites { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 6px 0 0; }
.qs-table-sites li { padding: 2px 10px; border: 1px solid var(--df-border); border-radius: 999px; font-size: var(--df-text-sm); background: var(--df-paper); }
/* The table itself, folded once a file can be dropped (recette 23/11): the summary says its size. */
.qs-org-table-details > summary { cursor: pointer; font-weight: 600; font-size: var(--df-text-sm); color: var(--df-blue); }
.qs-org-table-details > summary [data-org-table-count] { color: var(--df-muted); font-weight: 400; }
.qs-org-table-details[open] > summary { margin-bottom: 8px; }
.qs-org-file-label { font-weight: 700; font-size: var(--df-text-sm); }
.qs-org-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; border: 2px dashed var(--df-border); border-radius: var(--df-radius); background: var(--df-paper); text-align: center; transition: border-color 0.15s, background 0.15s; }
.qs-org-drop-text { font-weight: 600; }
.qs-org-drop-or { font-size: 0.82rem; color: var(--df-muted); }
.qs-org-drop.is-over { border-color: var(--df-blue); background: var(--df-blue-soft); }
.qs-org-drop.is-refused { border-color: var(--df-bad); }
.qs-org-drop.is-done { border-style: solid; border-color: var(--df-ok); background: rgba(14, 159, 142, 0.08); }
.qs-org-drop-status { margin: 4px 0 0; font-weight: 600; font-size: var(--df-text-sm); }
.qs-org-drop-status:empty { display: none; }
.qs-org-drop.is-done .qs-org-drop-status::before { content: "✓ "; color: var(--df-ok); }
.qs-org-drop:focus-within { border-color: var(--df-blue); box-shadow: var(--df-focus); }
.qs-org-file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; opacity: 0; overflow: hidden; }
.qs-org-choose { cursor: pointer; }
.qs-org-template { margin: 4px 0 0; }
.qs-org-template a { font-weight: 600; }
