/* Koter Labs v2 — product styles. Single deliberate light look; every
   surface painted explicitly. Numbers are the product: Plex Mono,
   tabular-nums, Russian formats everywhere. */

:root {
  --paper: #f3f4f6;
  --card: #ffffff;
  --ink: #15171c;
  --muted: #4b5160;
  --line: #dde0e6;
  --accent: #1f5fbf;
  --accent-soft: #e8f1fb;
  --pass: #0f8f60;
  --pass-bg: #e1f4eb;
  --warn: #9a6b00;
  --warn-bg: #fdf3dd;
  --fail: #c03d33;
  --fail-bg: #fbe9e7;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.num, td.num, .stat-value { font-family: "IBM Plex Mono", Consolas, monospace; font-variant-numeric: tabular-nums; }

/* ---- platform shell: design-export/platform.html ---- */
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; background: white; padding: 12px; }
.skip-link:focus { top: 12px; }
.app-shell { max-width: 1480px; margin: 0 auto; padding: 20px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.app-shell-public { display: block; }
.app-shell .page { width: 100%; min-width: 0; max-width: none; margin: 0; padding: 0 0 32px; }
.app-shell .platform-rail { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.platform-rail .nav-group { padding: 12px 10px 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #5a6070; }
.app-shell .platform-rail a { display: flex; align-items: center; min-height: 40px; padding: 8px 10px; font-size: 14px; color: var(--ink); }
.app-shell .platform-rail a:hover { background: var(--paper); }
.app-shell .platform-rail a.active { background: var(--ink); color: white; font-weight: 600; }
.platform-rail form { margin: 8px 0 0; border-top: 1px solid var(--line); padding-top: 8px; }
.platform-rail form button { background: transparent; border: 0; font: inherit; color: var(--muted); padding: 8px 10px; cursor: pointer; }
/* ---- top bar ---- */
.topbar { background: #15171c; color: white; }
.topbar-inner {
  max-width: 1480px; margin: 0 auto; padding: 12px 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; min-height: 60px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; white-space: nowrap; }
.brand svg { color: #7fb0f0; }
.workspace-name { font-size: 14px; }
.header-chip { background: #2b3140; color: #dde3ee; border-radius: 999px; padding: 3px 9px; font: 12px "IBM Plex Mono", monospace; }
.topbar .lang-toggle { color: #dde3ee; background: #2b3140; padding: 3px 9px; border-radius: 999px; text-decoration: none; font-size: 12px; }
.topbar .badge-synthetic { background: #3a2f12; color: #f5d58a; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: .92rem;
  padding: 6px 12px; border-radius: 7px;
}
.nav a.active { color: var(--ink); background: var(--paper); font-weight: 500; }
.nav a[aria-disabled="true"] { opacity: .45; cursor: default; }
.spacer { flex: 1; }

.pill {
  font-size: .8rem; font-weight: 500; padding: 4px 12px; border-radius: 999px;
  white-space: nowrap;
}
.pill.pass { background: var(--pass-bg); color: var(--pass); }
.pill.fail { background: var(--fail-bg); color: var(--fail); }
.badge-synthetic {
  font-size: .74rem; letter-spacing: .05em; text-transform: uppercase;
  color: var(--warn); background: var(--warn-bg);
  padding: 3px 10px; border-radius: 6px; white-space: nowrap;
}

/* ---- page ---- */
.page { max-width: 1160px; margin: 0 auto; padding: 28px 24px 48px; }
.page-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.page-head h1 { font-size: 28px; line-height: 1.2; font-weight: 700; margin: 0; }
.meta-line { color: var(--muted); font-size: .88rem; margin: 0 0 22px; }

/* ---- stat cards ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 20px;
}
.stat-label { color: #5a6070; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.stat-value { font-size: 26px; font-weight: 500; white-space: nowrap; }
.stat-sub { color: var(--muted); font-size: .78rem; margin-top: 2px; }

/* ---- cards & sections ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 20px 22px; margin-bottom: 22px;
}
.card h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 2px; }
.card .sub { color: var(--muted); font-size: .85rem; margin: 0 0 12px; max-width: 72ch; }

/* ---- ROI table ---- */
table.roi { border-collapse: collapse; width: 100%; font-size: .92rem; }
table.roi th {
  text-align: left; color: var(--muted); font-weight: 500; font-size: .78rem;
  padding: 6px 14px 8px 0; border-bottom: 1px solid var(--line);
}
table.roi td { padding: 9px 14px 9px 0; border-bottom: 1px solid var(--line); }
table.roi tr:last-child td { border-bottom: none; }
table.roi th.num, table.roi td.num { text-align: right; }
.chip-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 9px; vertical-align: baseline; }
.tag { font-size: .8rem; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.tag.tested { background: var(--pass-bg); color: var(--pass); font-weight: 500; }
.tag.modelled { background: var(--paper); color: var(--muted); }
.exp-note { color: var(--muted); font-size: .76rem; margin-top: 2px; }

/* ---- charts ---- */
.chart-box { width: 100%; }
.curves-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px 18px; }
.curve-cell .curve-title { font-size: .85rem; font-weight: 500; margin: 4px 0 0 8px; }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--line); background: var(--card); }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 16px 24px; color: var(--muted); font-size: .82rem; display: flex; gap: 24px; flex-wrap: wrap; }
.footer a { color: var(--accent); text-decoration: none; }

@media (max-width: 640px) {
  .topbar-inner { gap: 12px; }
}
a { color: var(--accent); }
a:hover { color: #174a94; }
button, .btn { font-family: inherit; font-size: 14px; font-weight: 600; border-radius: 8px; padding: 10px 16px; min-height: 44px; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: white; }
button:hover, .btn:hover { background: #174a94; color: white; }
button:disabled { background: #c9cdd6; border-color: #c9cdd6; color: #4b5160; cursor: not-allowed; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid #edeff3; vertical-align: top; }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .app-shell .platform-rail { position: static; flex-direction: row; flex-wrap: wrap; max-height: none; overflow-y: visible; }
  .platform-rail .nav-group { width: 100%; }
}
@media (max-width: 760px) {
  .app-shell { padding: 12px; gap: 12px; }
  .stats, .panel-grid, .curves-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar-inner { padding: 12px; }
  .tblwrap { overflow-x: auto; }
}

/* ---- auth pages ---- */
.auth-card {
  max-width: 400px; margin: 8vh auto 0; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 28px 30px;
}
.auth-card h1 { font-size: 1.25rem; margin: 0 0 14px; }
.auth-card label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.auth-card input {
  display: block; width: 100%; margin-top: 4px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 8px; font-size: .95rem;
  font-family: inherit; background: var(--paper); color: var(--ink);
}
.auth-card input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.auth-card button {
  width: 100%; margin-top: 6px; padding: 10px; border: none; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: .95rem; font-weight: 600; cursor: pointer;
}
.auth-card button:hover { filter: brightness(1.06); }
.form-error { background: var(--fail-bg); color: var(--fail); padding: 8px 12px; border-radius: 8px; font-size: .88rem; }
.continue-as { font-weight: 600; }
.auth-alt { font-size: .85rem; margin-top: 14px; }
.auth-alt a { color: var(--accent); text-decoration: none; }

/* ---- KPI switcher + override banner ---- */
.kpi-chip { font-size: .85rem; color: var(--muted); text-decoration: none;
  padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; }
.kpi-chip.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); font-weight: 500; }
.override-banner { background: var(--fail-bg); color: var(--fail); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 14px; font-weight: 500; }
.legacy-notice { background: var(--accent-soft); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 14px; }
.legacy-table td { vertical-align: top; }
.legacy-table form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---- parameter panel ---- */
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 780px) { .panel-grid { grid-template-columns: 1fr; } }
table.panel input.spend-input { width: 150px; text-align: right; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); }
.horizon-label { display: inline-block; margin-top: 12px; color: var(--muted); font-size: .85rem; }
.horizon-label select { margin-left: 8px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; }
.result-kpi { margin-bottom: 14px; }
.result-row { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.delta-pos .num { color: var(--pass); font-weight: 600; }
.delta-neg .num { color: var(--fail); font-weight: 600; }
.warn-line { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 8px 12px; font-size: .85rem; }

/* ---- KPI compare ---- */
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 22px; }

/* ---- jobs ---- */
.log-pre { background: var(--surface-2, #f6f7f9); border-radius: 8px; padding: 14px; font-family: "IBM Plex Mono", monospace; font-size: 12px; max-height: 420px; overflow: auto; white-space: pre-wrap; }
.groups-json { width: 100%; font-family: "IBM Plex Mono", monospace; font-size: 13px; border: 1px solid var(--border, #d7dbe0); border-radius: 8px; padding: 10px; }
.lang-toggle { font-size: 12px; font-weight: 600; color: var(--muted, #67707e); text-decoration: none; margin-right: 14px; letter-spacing: 0.06em; }
.lang-toggle:hover { color: var(--ink, #1d2433); }

/* ---- T313 readiness ladder: the prototype status chip (pill, dot, 12px semibold) ---- */
.ladder { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.ladder-rung > summary { list-style: none; cursor: pointer; }
.ladder-rung > summary::-webkit-details-marker { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.chip-mark { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: currentColor; }
.chip-passed { background: var(--pass-bg); color: var(--pass); }
.chip-failed { background: var(--fail-bg); color: var(--fail); }
.chip-not_evaluated { background: var(--warn-bg); color: var(--warn); }
.chip-not_applicable { background: var(--paper); color: var(--muted); border: 1px solid var(--line); }
.ladder-rung[open] > summary { outline: 2px solid var(--accent-soft); }
.ladder-detail {
  margin-top: 6px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; font-size: .86rem; max-width: 640px;
}
.ladder-detail p { margin: 0 0 4px; font-weight: 500; }
.ladder-detail ul { margin: 0 0 8px; padding-left: 18px; }
.ladder-evidence code { font-family: "IBM Plex Mono", Consolas, monospace; font-size: .78rem; word-break: break-all; }
.ladder-meta, .ladder-note { color: var(--muted); font-size: .8rem; }
.ladder-note { margin: 2px 0 10px; }

/* T323 design comparison (Journey step 4) */
.design-step { color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin: 0; }
.design-banner { background: var(--accent-soft); border-radius: 6px; padding: 6px 10px; margin: 0 0 8px; font-size: .88rem; }
.design-banner-warn { background: var(--warn-bg); color: var(--warn); }
.design-banner-fail { background: var(--fail-bg); color: var(--fail); }
.design-iv { display: block; color: var(--muted); font-size: .78rem; }
.design-bars { margin: 12px 0; }
.design-bar-row { display: grid; grid-template-columns: minmax(120px, 180px) 1fr 56px; gap: 12px; align-items: center; margin: 8px 0; }
.design-bar { position: relative; height: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
.design-bar-fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--muted); }
.design-bar-viable { background: var(--accent); }
.design-bar-target { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.design-bar-value { text-align: right; font-variant-numeric: tabular-nums; }
.design-table td { vertical-align: top; }
.design-comparison-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
.journey-main .design-comparison-scroll .tbl{display:table;overflow:visible;min-width:1120px;width:100%}
.design-comparison-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.design-comparison-scroll .tbl th{white-space:nowrap}
.design-scroll-hint{margin-bottom:8px}
.design-start-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:12px;align-items:end;margin:16px 0 0}
.design-start-form label{display:grid;gap:5px;font-size:13px;color:var(--muted)}
.design-start-form input,.design-start-form select{width:100%;min-width:0}
.design-start-form button{min-height:42px}
.design-selected { background: var(--accent-soft); }
.design-sets, .design-reasons { margin: 0; padding-left: 16px; font-size: .85rem; }
.design-sets li { white-space: nowrap; }
.design-ok { color: var(--pass); }
.design-no-viable { background: var(--fail-bg); border-radius: 6px; padding: 8px 12px; margin: 12px 0; }
@media (max-width: 720px) { .design-bar-row { grid-template-columns: 1fr; } }

.platform-rail .nav-unavailable{padding:8px 10px;font-size:14px;color:#6b7180}
.platform-rail .nav-unavailable small{display:block;font-size:11px}
.page table{width:100%;border-collapse:collapse;font-size:14px}
.page th{text-align:left;font-weight:600;color:#4b5160;font-size:12px;padding:8px 10px;border-bottom:1px solid #dde0e6}
.page td{padding:10px;border-bottom:1px solid #edeff3;vertical-align:top}
.page pre{white-space:pre-wrap;overflow-wrap:anywhere}
.page input,.page select,.page textarea{max-width:100%}
.page .card{min-width:0;overflow-wrap:anywhere}
@media(max-width:700px){.page table{display:block;max-width:100%;overflow-x:auto}.study-protocol dd{margin-left:0;overflow-wrap:anywhere}}
[data-experiments-studies] .tblwrap { overflow-x: auto; }
[data-experiments-studies] table { min-width: 760px; }
.experiments-scroll-hint { display: none; }
@media (max-width: 700px) { .experiments-scroll-hint { display: block; } }

/* platform shell */
.app-shell .platform-rail .pf-nav-body { display: flex; flex-direction: column; gap: 2px; }
.platform-rail .pf-nav-section { display: flex; flex-direction: column; gap: 2px; }
.app-shell .platform-rail a[data-nav-item] { justify-content: space-between; gap: 8px; border-radius: 8px; }
.platform-rail .pf-nav-status { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; white-space: nowrap; background: var(--paper); color: var(--muted); }
.platform-rail a.active .pf-nav-status { background: #2b3140; color: #dde3ee; }
.pf-status-proposed { color: #5b3fb5; }
.pf-status-partial { color: var(--warn); }
.pf-nav-toggle { display: none; }
.pf-nav-more { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.pf-nav-more > summary { cursor: pointer; padding: 8px 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #5a6070; list-style-position: inside; }
.pf-nav-more > summary:focus-visible, .platform-rail a:focus-visible, .pf-nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.app-shell .platform-rail .pf-nav-more a { min-height: 34px; font-size: 13px; color: var(--muted); border-radius: 8px; }
.app-shell .platform-rail .pf-nav-more a.active { color: white; }
.topbar .pf-alert-bell { color: #dde3ee; background: #2b3140; padding: 3px 10px; border-radius: 999px; text-decoration: none; font-size: 12px; white-space: nowrap; }
.topbar .pf-alert-bell:hover { color: white; }
.pf-eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5a6070; }
.pf-lede { max-width: 820px; margin: 8px 0 20px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.pf-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.pf-head .page-head { margin: 0; }
.pf-chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: var(--paper); color: var(--muted); border: 1px solid var(--line); }
.pf-chip-implemented { background: var(--pass-bg); color: var(--pass); border-color: transparent; }
.pf-chip-partial { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pf-chip-proposed { background: #efeafb; color: #5b3fb5; border-color: transparent; }
.pf-chip-planned { background: #eceef2; color: #3d4350; border-color: transparent; }
.pf-chip-deferred, .pf-chip-not_planned { background: var(--paper); color: var(--muted); }
.page .card h2 { font-size: 17px; }
.pf-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pf-card-head h2 { margin: 0; }
.pf-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.pf-grid-2 > .card, .pf-home-grid > * > .card, .pf-home-grid > .card { margin-bottom: 0; }
.pf-home-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.pf-home-grid .dashboard-attention { margin: 0; }
.pf-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 0 0 20px; }
.pf-tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; min-width: 0; }
.pf-tile-dashed { border-style: dashed; }
.pf-tile .stat-value { font-size: 20px; white-space: normal; }
.pf-tile a { font-weight: 600; }
.pf-note { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin-bottom: 20px; }
.pf-list { margin: 8px 0 0; padding-left: 18px; }
.pf-list li { margin: 4px 0; }
.pf-placeholder { color: var(--muted); font-size: 13px; }
.pf-table-empty td { color: var(--muted); font-style: italic; }
.pf-mono { font-family: "IBM Plex Mono", Consolas, monospace; font-size: 13px; }
.pf-intervals { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr) minmax(150px, auto); gap: 6px 16px; align-items: center; }
.pf-interval-track { position: relative; height: 18px; }
.pf-interval-track::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 1px; background: var(--line); }
.pf-interval-90 { position: absolute; top: 5px; height: 8px; border-radius: 4px; background: #c6daf3; }
.pf-interval-50 { position: absolute; top: 3px; height: 12px; border-radius: 4px; background: #6fa2e3; }
.pf-interval-mid { position: absolute; top: 0; width: 2px; height: 18px; background: var(--ink); }
.pf-interval-label { text-align: right; }
.pf-interval-label small { display: block; color: var(--muted); }
.pf-audit-lines { margin: 0; padding: 0; list-style: none; font-family: "IBM Plex Mono", Consolas, monospace; font-size: 12.5px; color: #3d4350; }
.pf-audit-lines li { padding: 3px 0; overflow-wrap: anywhere; }
.pf-gate-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.pf-gate-tiles .stat { min-width: 0; }
.pf-gate-tiles .stat-value { font-size: 18px; white-space: normal; overflow-wrap: anywhere; }
.pf-button-link { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: white; font-weight: 600; font-size: 14px; text-decoration: none; }
.pf-button-link:hover { color: white; background: #174a94; }
.pf-button-secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.pf-button-secondary:hover { background: var(--paper); color: var(--ink); }
.pf-rec-card { background: var(--accent-soft); border-color: #c9dcf3; }
.page .target-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 16px; align-items: end; }
.page .target-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: #3d4350; min-width: 0; }
.page .target-form input:not([type="checkbox"]):not([type="range"]), .page .target-form select { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; font: inherit; font-weight: 400; color: var(--ink); }
.page .target-form input[type="range"] { width: 100%; accent-color: var(--accent); }
.page .target-form .stat-sub { font-weight: 400; }
.page .target-form > button { justify-self: start; }
.pf-gate-tiles .stat-value .pill { font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif; font-size: 13px; white-space: normal; display: inline-block; }
@media (max-width: 760px) {
  .pf-home-grid .tblwrap, .pf-grid-2 .tblwrap { overflow-x: auto; }
  .pf-home-grid .tblwrap > table, #team-members table { min-width: 540px; }
}
.pf-home-grid > div > .card + .card { margin-top: 20px; }
@media (max-width: 1100px) {
  .app-shell .platform-rail { flex-direction: column; flex-wrap: nowrap; }
  .platform-rail.pf-nav-collapsible .pf-nav-toggle { display: inline-flex; align-self: flex-start; background: white; color: var(--ink); border: 1px solid var(--line); }
  .pf-nav-toggle:hover { background: var(--paper); color: var(--ink); }
  .platform-rail.pf-nav-collapsible:not(.pf-nav-open) .pf-nav-body { display: none; }
  .app-shell .platform-rail [data-nav-principal] { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 12px; }
  .pf-gate-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-home-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .pf-grid-2, .pf-gate-tiles { grid-template-columns: minmax(0, 1fr); }
  .pf-intervals { grid-template-columns: minmax(0, 1fr); }
  .pf-interval-label { text-align: left; }
  .page-head h1 { font-size: 24px; }
}

/* platform shell: second pass */
.pf-section-title { font-size: 20px; margin: 28px 0 4px; }
.pf-provenance { padding: 10px 16px; }
.pf-provenance p { margin: 2px 0; }
.pf-gate-kpi + .pf-gate-kpi { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.pf-check-row { margin-bottom: 16px; }
.pf-check-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pf-check-tiles .stat { padding: 14px 16px; min-width: 0; }
.pf-check-tiles .chip { margin: 4px 0 6px; }
.pf-horizon-bars { margin: 8px 0 16px; }
.pf-horizon-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(150px, auto); gap: 6px 14px; align-items: center; margin: 6px 0; }
.pf-horizon-track { display: grid; gap: 3px; }
.pf-horizon-track span { display: block; height: 9px; border-radius: 3px; min-width: 2px; }
.pf-bar-model { background: #2f6fd0; }
.pf-bar-naive { background: #9aa1ad; }
.pf-horizon-value { text-align: right; }
.pf-horizon-value small { display: block; color: var(--muted); }
.pf-legend { font-size: 13px; color: var(--muted); }
.pf-key { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin: 0 6px 0 12px; vertical-align: middle; }
.pf-legend .pf-key:first-child { margin-left: 0; }
.pf-segmented-wrap { display: grid; gap: 6px; grid-column: 1 / -1; }
.pf-segmented-label { font-size: 13px; font-weight: 600; color: #3d4350; }
.pf-segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-segmented button { background: white; color: var(--ink); border: 1px solid var(--line); min-height: 40px; }
.pf-segmented button[aria-pressed="true"] { background: var(--ink); color: white; border-color: var(--ink); }
.pf-segmented button:hover { background: var(--paper); color: var(--ink); }
.pf-segmented button[aria-pressed="true"]:hover { background: var(--ink); color: white; }
.pf-flag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin: 0 4px 4px 0; background: var(--paper); color: var(--muted); }
.pf-flag-beyond_observed, .pf-flag-not_identifiable { background: var(--warn-bg); color: var(--warn); }
.pf-source-detail { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
#sources-table { min-width: 800px; table-layout: fixed; }
#sources-table th:nth-child(1) { width: 40%; }
#sources-table th:nth-child(2) { width: 14%; }
#sources-table th:nth-child(3) { width: 12%; }
#sources-table th:nth-child(4) { width: 15%; }
#sources-table th:nth-child(5) { width: 19%; }
#sources-table td:nth-child(2), #sources-table td:nth-child(3), #sources-table td:nth-child(4) { white-space: nowrap; }
.pf-source-scroll { overflow-x: auto; }
.pf-source-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pf-source-scroll-hint { display: none; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .pf-source-scroll-hint { display: block; }
  .page .pf-source-scroll > #sources-table { display: table; }
}
@media (max-width: 1100px) { .pf-check-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .pf-check-tiles { grid-template-columns: minmax(0, 1fr); }
  .pf-horizon-row { grid-template-columns: minmax(0, 1fr); }
  .pf-horizon-value { text-align: left; }
}
@media (max-width: 760px) {
  .page .tblwrap { overflow-x: auto; }
  .page .tblwrap > #opt-bounds, .page .tblwrap > #opt-recommendation-channels { display: table; min-width: 560px; }
}

/* daily factors */
.daily-directional { max-width: 960px; margin: 0 0 16px; padding: 10px 14px; border-left: 3px solid var(--warn); background: var(--warn-bg); border-radius: 6px; font-size: 14px; }
.daily-periods { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 4px 0 8px; font-size: 14px; }
.daily-periods a { font-weight: 600; text-decoration: none; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); }
.daily-periods a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.daily-periods .daily-export { margin-left: auto; border-style: dashed; }
.daily-scroll { overflow-x: auto; }
.daily-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.daily-scroll-hint { display: none; }
.daily-table { table-layout: auto; }
.daily-table th { overflow-wrap: normal; word-break: normal; hyphens: auto; font-size: 11px; }
.daily-table th:nth-child(1) { width: 22%; }
.daily-table td.daily-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.daily-table td { overflow-wrap: break-word; }
.daily-center { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.daily-interval { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.daily-source { margin-bottom: 2px; }
.daily-table .pf-chip { white-space: normal; text-align: left; }
.daily-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.daily-grid .daily-note p { margin: 0; }
.daily-staff details { border-top: 1px solid var(--line); padding: 10px 0; }
.daily-staff summary { cursor: pointer; font-weight: 600; }
.daily-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin: 12px 0; }
.daily-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.daily-form .daily-wide { grid-column: 1 / -1; }
.daily-form button { justify-self: start; }
.daily-template { overflow-x: auto; background: var(--paper); padding: 8px 10px; border-radius: 6px; font-size: 12px; }
.daily-list { padding-left: 18px; }
.daily-list li { margin: 6px 0; }
.daily-inline, .daily-review, .daily-retire { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
@media (max-width: 760px) {
  .daily-scroll-hint { display: block; }
  .page .daily-scroll > .daily-table { display: table; min-width: 760px; }
  .daily-grid, .daily-form { grid-template-columns: minmax(0, 1fr); }
  .daily-periods .daily-export { margin-left: 0; }
}

/* gather: T406 scientist-action card (marketer view) and the restricted optimizer page */
.gather-sa { border-left: 3px solid var(--accent); }
.gather-sa-heading { font-size: 18px; margin: 0 0 6px; overflow-wrap: anywhere; }
.gather-sa-task { margin: 0 0 12px; color: var(--muted); }
.gather-sa-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0 0 12px; }
.gather-sa-facts dt { color: var(--muted); font-size: 13px; }
.gather-sa-facts dd { margin: 0; overflow-wrap: anywhere; }
.gather-sa-why { font-size: 13px; color: var(--muted); background: var(--paper); border-radius: 6px; padding: 10px 12px; }
.gather-sa-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
@media (max-width: 760px) {
  .gather-sa-facts { grid-template-columns: minmax(0, 1fr); }
  .gather-sa-facts dd { margin-bottom: 6px; }
}
/* T352 follow-up (optimizer): the native quantile select is hidden once the segmented control drives it */
.target-form label[data-strategy-native][hidden] { display: none; }
/* pgf: doc 16 slice 9 — plans, goals and forecast composition (P06, P07) */
.pgf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pgf-focus { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.pgf-focus p { margin: 0; }
.pgf-choices, .pgf-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pgf-choice, .pgf-tab { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.pgf-choice.active, .pgf-tab.active { background: var(--ink); border-color: var(--ink); color: white; }
.pgf-choice:focus-visible, .pgf-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pgf-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pgf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pgf-saved td { vertical-align: top; }
.pgf-saved .pgf-predictive { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.pgf-focus-row td:first-child + td { box-shadow: inset 3px 0 0 var(--accent); }
.pgf-compare .stat-value, .pgf-retro p { overflow-wrap: anywhere; }
.pgf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; margin-bottom: 16px; }
.pgf-grid > .card { margin-bottom: 0; min-width: 0; }
.pgf-inputs th { text-align: left; font-weight: 500; color: var(--muted); width: 40%; }
.pgf-fan { width: 100%; height: auto; }
@media (max-width: 760px) {
  .pgf-tiles, .pgf-grid { grid-template-columns: minmax(0, 1fr); }
  .pgf-saved { min-width: 720px; }
  [data-saved-plans] .tblwrap { overflow-x: auto; }
}
/* W1-P6 T410 entitlements */
.tier-features { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.tier-features li { display: flex; gap: 8px; align-items: baseline; }
.tier-form { display: grid; gap: 10px; max-width: 560px; }
.tier-form label { display: grid; gap: 4px; }

/* W1-P2 platform shell and cross-screen defects */
/* Rail: never clipped inside a viewport-high card. It is sticky only while it fits
   (navigation.js adds .pf-rail-sticky); otherwise it scrolls with the page. */
.app-shell .platform-rail { position: static; max-height: none; overflow-y: visible; }
@media (min-width: 1101px) { .app-shell .platform-rail.pf-rail-sticky { position: sticky; top: 16px; } }
/* Tables: '.page .card { overflow-wrap: anywhere }' let columns shrink to one letter and split
   words ('Эксп/ери/мен/ты'); cells now break only between words, and a table wider than its
   card scrolls inside its .tblwrap with a visible cue (data-scroll-cue, set by navigation.js). */
.page .card .tblwrap table th, .page .card .tblwrap table td { overflow-wrap: break-word; }
.page .card table code, .page [data-run-id] { overflow-wrap: anywhere; word-break: break-all; }
.page .tblwrap { overflow-x: auto; max-width: 100%; }
.page .tblwrap > table { display: table; }
.page .tblwrap .pf-chip { white-space: nowrap; }
.page .tblwrap .pf-button-link { padding: 8px 12px; }
.page .tblwrap[data-scroll-cue] { box-shadow: inset -14px 0 12px -12px rgba(29, 36, 51, .35); }
.page .tblwrap[data-scroll-cue]::before { content: attr(data-scroll-cue); position: sticky; left: 0; display: block; padding: 0 0 6px; font-size: 12px; color: var(--muted); }
.page .tblwrap[data-scroll-cue]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Phone width: tables marked data-stack become one labelled block per row (doc 10 §8 "stacked rows"). */
@media (max-width: 760px) {
  .page table[data-stack], .page table[data-stack] tbody, .page table[data-stack] tr, .page table[data-stack] td { display: block; width: auto; }
  .page table[data-stack] thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .page table[data-stack] tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .page table[data-stack] tr:last-child { border-bottom: none; }
  .page table[data-stack] td { padding: 3px 0; border: 0; text-align: left; }
  .page table[data-stack] td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  .page table[data-stack] td:first-child::before { display: none; }
}
/* W1-P2: run ids and hashes sit behind a quiet "Technical id" disclosure */
.pf-tech-id { margin-top: 4px; font-size: 12px; color: var(--muted, #67707e); }
.pf-tech-id > summary { cursor: pointer; width: max-content; max-width: 100%; }
.pf-tech-id code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; word-break: break-all; }
/* W2-P9: the backtest chart scales down on a phone instead of widening the page (platform-09 at 390 px) */
.pf-health-chart { max-width: 100%; height: auto; }

/* W2-P3 running accuracy record (model health) */
.w2p3-publication { margin-top: 16px; }
.w2p3-publication h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.w2p3-table td { vertical-align: top; }
.w2p3-interval { display: block; color: var(--muted, #67707e); font-size: 12px; white-space: nowrap; }
.w2p3-synthetic { font-size: 12px; }
@media (max-width: 760px) {
  .w2p3-interval { white-space: normal; }
}
.w2p3-unresolved { border-left: 3px solid var(--warn, #b7791f); padding: 8px 12px; margin: 12px 0; }
.w2p3-publication h4 { margin: 16px 0 4px; }
/* the backtest charts carry width="600": scale them to the card on a phone (viewBox keeps the shape) */
#predictive-validation figure svg { max-width: 100%; height: auto; }

/* W3-P2 gathering form path (journey step 1 card, gathering entry, data guide) */
.gtr-card { margin-top: 16px; }
.gtr-state { font-weight: 600; margin: 8px 0; }
.gtr-note { border-left: 3px solid var(--warn); background: var(--warn-bg); padding: 8px 12px; margin: 8px 0; }
.gtr-missing { border-left: 3px solid var(--fail); background: var(--fail-bg); padding: 8px 12px; margin: 8px 0; }
.gtr-missing p { margin: 0 0 4px; font-weight: 600; }
.gtr-missing ul { margin: 0; padding-left: 20px; }
.gtr-group { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 12px; margin: 12px 0; min-width: 0; }
.gtr-group legend { font-weight: 600; padding: 0 4px; }
.gtr-q { padding: 10px 0; border-top: 1px solid var(--line); }
.gtr-q:first-of-type { border-top: 0; }
.gtr-q-issue { border-left: 3px solid var(--fail); padding-left: 10px; }
.gtr-q-label { margin: 0 0 4px; font-weight: 600; }
.gtr-req { font-weight: 400; font-size: 12px; color: var(--muted); }
.gtr-why { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.gtr-why > summary { cursor: pointer; width: max-content; max-width: 100%; color: var(--accent); }
.gtr-why p { margin: 4px 0; }
.gtr-options { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.gtr-options label { display: inline-flex; align-items: center; gap: 6px; }
.gtr-unknown-region { color: var(--fail); }
.gtr-q input:not([type="radio"]):not([type="checkbox"]), .gtr-q textarea { width: 100%; max-width: 480px; box-sizing: border-box; }
.gtr-money { display: inline-flex; align-items: center; gap: 4px; width: 100%; max-width: 480px; }
.gtr-unknown { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; }
.gtr-unknown-reason { margin-top: 4px; }
.gtr-issue { color: var(--fail); margin: 4px 0 0; font-size: 13px; }
.gtr-answer { margin: 0; }
.gtr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gtr-message:empty { display: none; }
.gtr-message { margin: 8px 0 0; color: var(--fail); }
.gtr-links { margin-top: 12px; }
.gtr-tabs { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0; }
.gtr-tabs a[aria-current="page"] { font-weight: 600; text-decoration: none; color: var(--ink); }
.gtr-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 8px 0 0; }
.gtr-dl dt { color: var(--muted); }
.gtr-dl dd { margin: 0; overflow-wrap: anywhere; }
.gtr-checks { margin: 0; padding-left: 18px; }
.gtr-table td { vertical-align: top; }
@media (max-width: 760px) {
  .gtr-dl { grid-template-columns: 1fr; }
  .gtr-dl dd { margin-bottom: 6px; }
  .gtr-table { display: block; overflow-x: auto; }
}

/* W3-P3 tier-aware navigation, explained refusals, Feature map evidence */
.platform-rail a.w3p3-nav-locked > span { color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.platform-rail a.active.w3p3-nav-locked > span { color: inherit; }
.platform-rail .pf-nav-status.w3p3-status-locked { flex-shrink: 0; border: 1px dashed currentColor; padding: 0 6px; }
.w3p3-unavailable { max-width: 760px; }
.w3p3-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0; }
.w3p3-facts dt { font-weight: 600; }
.w3p3-facts dd { margin: 0; }
.w3p3-available-title { font-size: 15px; margin: 16px 0 6px; }
.w3p3-available { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; padding: 0; margin: 0; }
.w3p3-verdict { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 12px; border: 1px solid currentColor; white-space: nowrap; }
.w3p3-verdict-accepted { color: var(--pass); }
.w3p3-verdict-implemented_unverified, .w3p3-verdict-partial { color: var(--warn); }
.w3p3-verdict-open, .w3p3-verdict-unreviewed { color: var(--fail); }
.w3p3-verdict-deferred { color: var(--muted); }
.w3p3-plans { display: block; font-size: 13px; }
.w3p3-in-plan { font-size: 12px; color: var(--pass); }
.w3p3-not-in-plan { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .w3p3-facts { grid-template-columns: 1fr; gap: 2px; }
  .w3p3-facts dd { margin-bottom: 8px; }
}

/* W3-P4 trial lifecycle: the trial and lapsed banners, the own-data export page */
.w3p4-banner { border: 1px solid var(--line); border-left: 4px solid var(--warn); background: var(--card); border-radius: 6px; padding: 10px 14px; margin: 0 0 16px; max-width: 960px; }
.w3p4-banner p { margin: 0; overflow-wrap: anywhere; }
.w3p4-banner p + p { margin-top: 4px; }
.w3p4-banner-lapsed { border-left-color: var(--muted); }
.w3p4-export { max-width: 760px; }
.w3p4-export-list { margin: 8px 0; padding-left: 18px; }
.w3p4-export-sub { font-size: 15px; margin: 16px 0 6px; }
.w3p4-export-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.w3p4-export-message:empty { display: none; }
/* W3-P6: the entitlements tier name is a phrase, not a number: it wraps at phone width (H2 built-01) */
.stat-value[data-tier-name] { white-space: normal; overflow-wrap: anywhere; }
.tier-form select, .tier-form input, .tier-form textarea, .tier-form button { max-width: 100%; box-sizing: border-box; }
.tier-form label { min-width: 0; } .tier-form select { width: 100%; min-width: 0; }
/* W3-P14 prior-driven restrictions (pdl-): the hold is a note, not an alarm */
.pf-flag-prior_driven { background: var(--warn-bg); color: var(--warn); }
.pdl-verdict { font-weight: 600; margin: 8px 0 4px; }
.pdl-verdict[data-plan-shown="false"] { color: var(--warn); }
.pdl-holds { margin: 4px 0 8px; padding-left: 18px; }
.pdl-holds li { margin: 2px 0; }
.pdl-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin: 4px 0 0; background: var(--warn-bg); color: var(--warn); }
.pdl-note { margin-top: 4px; }


/* W4-P2 platform P01 Home, P02 MMM insights, P09 Model health parity */
.w4p2-home-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.w4p2-decomp-chart { height: 300px; }
.w4p2-channels tbody th[scope="row"], .w4p2-changes tbody th[scope="row"] { font-weight: 600; text-align: left; text-transform: none; letter-spacing: 0; font-size: inherit; color: var(--ink); padding: 9px 14px 9px 0; border-bottom: 1px solid var(--line); }
table.roi tr:last-child th[scope="row"] { border-bottom: none; }
.w4p2-channels td, .w4p2-channels th { vertical-align: top; }
.w4p2-cell { white-space: nowrap; }
.w4p2-cell small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.w4p2-evidence { display: inline-block; font-size: 12px; font-weight: 600; background: var(--paper); color: var(--muted); }
.w4p2-evidence-calibrated, .w4p2-evidence-model_allocated_calibrated { background: var(--pass-bg); color: var(--pass); white-space: normal; }
.w4p2-evidence-not_identifiable { background: var(--fail-bg); color: var(--fail); }
.w4p2-alerts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.w4p2-alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; }
.w4p2-alert:hover, .w4p2-alert:focus-visible { border-color: var(--accent); }
.w4p2-alert-kind { flex: none; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--paper); color: var(--muted); }
.w4p2-alert-plan { background: var(--warn-bg); color: var(--warn); }
.w4p2-alert-data, .w4p2-alert-security { background: var(--fail-bg); color: var(--fail); }
.w4p2-alert-model { background: var(--pass-bg); color: var(--pass); }
.w4p2-alert-test { background: #efeafc; color: #5b3fb8; }
.w4p2-alert-text small { color: var(--muted); }
.w4p2-start p { max-width: 760px; }
.w4p2-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; }
.w4p2-lineage { margin-top: 6px; font-size: 13px; }
.w4p2-ins-channel { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.w4p2-ins-channel .tag { font-size: 11px; padding: 1px 8px; }
.w4p2-withheld { text-align: left; color: var(--muted); font-size: 13px; }
.w4p2-reason { display: block; max-width: 260px; font-size: 12px; line-height: 1.35; white-space: normal; }
.w4p2-carry-bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: end; height: 140px; border-bottom: 1px solid var(--line); margin-top: 8px; }
.w4p2-carry-col { position: relative; height: 100%; }
.w4p2-carry-bar { position: absolute; left: 0; right: 0; bottom: 0; background: #2f6fd0; border-radius: 2px 2px 0 0; }
.w4p2-carry-whisker { position: absolute; left: 50%; width: 2px; margin-left: -1px; background: var(--ink); opacity: .45; z-index: 1; }
.w4p2-carry-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.w4p2-carry-summary { margin: 10px 0 4px; }
.w4p2-carry-table, .w4p2-backtest-charts { margin-top: 8px; }
.w4p2-carry-table summary, .w4p2-backtest-charts summary, .w4p2-lineage summary { cursor: pointer; color: var(--accent); }
.w4p2-changes th, .w4p2-changes td { vertical-align: top; }
.w4p2-changes td:last-child { min-width: 220px; }
.w4p2-check-metric { font-size: 12px; color: var(--muted); margin-top: 4px; }
.w4p2-score-notes { display: block; font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif; white-space: normal; color: var(--muted); font-size: 12px; }
.w2p3-table td:first-child { min-width: 190px; }
@media (max-width: 1100px) {
  .w4p2-home-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .w4p2-decomp-chart { height: 260px; }
  .w4p2-carry-bars { height: 110px; }
}

/* W3-P20 publication check (Model health, ADR-446) */
.w3p20-check { margin-top: 1.25rem; }
.w3p20-check-row { border: 1px solid var(--border, #e3e6ea); border-radius: 10px; padding: 0.75rem 1rem; margin-top: 0.5rem; }
.w3p20-check-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.w3p20-items { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.w3p20-items li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; min-width: 0; }
.w3p20-item-name { font-weight: 500; }
.w3p20-detail { overflow-wrap: anywhere; }
.w3p20-scope { margin-top: 0.5rem; overflow-wrap: anywhere; }
.chip-muted { opacity: 0.7; }
@media (max-width: 760px) { .w3p20-check-row { padding: 0.6rem 0.7rem; } }
/* W3-P20 review: the publication check's partial headline */
.w3p20-check .pill.muted { background: var(--muted-bg, #eee); color: var(--muted, #555); }
/* W4-P3 budget optimizer (P05) parity: budget control beside the plan-for choice, outcome tiles with the
   recommended total, numbers that never break mid-digit, the refusal as an alert */
.page .w4p3-opt-form { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px 32px; align-items: start; }
.w4p3-opt-budget { display: grid; gap: 8px; min-width: 0; }
.page .w4p3-opt-form label.w4p3-opt-budget-title { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
.w4p3-opt-budget-title strong { font-family: "IBM Plex Mono", Consolas, monospace; white-space: nowrap; }
.w4p3-opt-range { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.page .w4p3-opt-form .w4p3-opt-amount { max-width: 260px; }
.w4p3-opt-side { display: grid; gap: 14px; min-width: 0; }
.w4p3-opt-side .pf-segmented-wrap { grid-column: auto; }
.w4p3-opt-more { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 12px; }
.w4p3-opt-more summary, .w4p3-opt-details summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent); }
.w4p3-opt-more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 16px; margin: 12px 0 8px; }
.w4p3-opt-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.w4p3-opt-busy { color: var(--muted); font-size: 14px; }
.w4p3-opt-status:empty { display: none; }
.w4p3-opt-status { margin-top: 14px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); max-width: 80ch; }
.w4p3-opt-status.w4p3-opt-status-error { border-color: var(--fail); background: var(--fail-bg); color: var(--ink); }
.w4p3-opt-status.w4p3-opt-status-error strong { color: var(--fail); }
.w4p3-opt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 0 0 16px; }
.w4p3-opt-tiles > .pf-tiles { display: contents; }
.w4p3-opt-rec-tile[data-w4p3-rec-tile="available"] { background: var(--accent-soft); border-color: #c4d8f2; }
.w4p3-opt-rec-tile p.stat-sub { margin: 4px 0 0; }
.page .w4p3-opt-use-rec { margin-top: 10px; min-height: 36px; padding: 6px 12px; background: white; color: var(--accent); }
.page .w4p3-opt-use-rec:hover { background: white; color: #174a94; }
.w4p3-nowrap { white-space: nowrap; }
.w4p3-opt-band { display: block; font-size: 12px; color: var(--muted); }
.page .card .tblwrap table.w4p3-opt-alloc td, .page .card .tblwrap table.w4p3-opt-quantiles td { overflow-wrap: normal; }
table.w4p3-opt-alloc td .pf-flag { white-space: nowrap; }
.w4p3-opt-details { margin-top: 8px; }
.page .w4p3-opt-bounds th { font-family: inherit; }
.page .w4p3-opt-bounds input[type="text"] { width: 100%; max-width: 180px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; font-family: "IBM Plex Mono", Consolas, monospace; font-variant-numeric: tabular-nums; }
.page .w4p3-opt-bounds input[type="checkbox"] { width: 18px; height: 18px; }
[data-optimizer-no-model] a.btn { text-decoration: none; display: inline-flex; align-items: center; }
[data-optimizer-no-model] a.btn.btn-secondary { background: white; color: var(--ink); border-color: #c9cdd6; }
@media (max-width: 720px) {
  .page .w4p3-opt-form { grid-template-columns: 1fr; }
  .page .tblwrap > table.w4p3-opt-alloc { min-width: 640px; }
}
.w4p3-opt-rec-caution { color: var(--warn); font-weight: 600; margin-top: 4px; }
@media (max-width: 720px) {
  .page .tblwrap > table#opt-recommendation-channels { min-width: 680px; }
  #opt-recommendation-channels td:last-child { min-width: 260px; }
}
/* W3-P5 standalone experiment support: the one_test landing, the feasibility check and the plan cards */
.sx-page { max-width: 1100px; }
.sx-allowance { margin: 0 0 16px; color: var(--muted); overflow-wrap: anywhere; }
.sx-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.sx-price { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
.sx-steps { margin: 12px 0; padding-left: 20px; }
.sx-steps li + li { margin-top: 4px; }
.sx-note { border-left: 3px solid var(--line); padding: 4px 10px; color: var(--muted); margin: 8px 0; overflow-wrap: anywhere; }
.sx-family-list { list-style: none; padding: 0; margin: 0; }
.sx-family-list li + li { margin-top: 10px; }
.sx-family-name { font-weight: 600; }
.sx-chip-off { color: var(--muted); }
.sx-chip-ok { color: var(--pass); }
.sx-form fieldset { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.sx-form legend { font-weight: 600; margin-bottom: 6px; }
.sx-radio { display: inline-flex; align-items: center; gap: 6px; }
.sx-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sx-fields label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sx-fields input, .sx-fields select { width: 100%; box-sizing: border-box; }
.sx-fields small { color: var(--muted); }
.sx-fields [aria-invalid="true"] { border-color: var(--fail); }
.sx-message:empty { display: none; }
.sx-result { border-top: 1px solid var(--line); padding: 12px 0; }
.sx-result:first-of-type { border-top: 0; padding-top: 0; }
.sx-result h3 { font-size: 16px; margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sx-verdict-detectable { color: var(--pass); }
.sx-verdict-uncertain { color: var(--warn); }
.sx-verdict-not_detectable, .sx-verdict-too_few_units { color: var(--fail); }
.sx-verdict-outside_table, .sx-verdict-no_power_table { color: var(--muted); }
.sx-finding { margin: 8px 0 4px; }
.sx-reasons, .sx-alternatives { margin: 4px 0; padding-left: 20px; }
.sx-alt-h { margin: 8px 0 0; font-weight: 600; }
.sx-plans { margin-top: 24px; }
.sx-plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sx-plan h3 { font-size: 15px; margin: 0 0 6px; overflow-wrap: anywhere; }
.sx-plan p { font-size: 14px; }
.sx-plan[data-sx-plan-state="planned"] { border-style: dashed; }
@media (max-width: 1100px) { .sx-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .sx-grid, .sx-fields, .sx-plan-grid { grid-template-columns: 1fr; }
}
.w3p4f-ready { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; display: grid; gap: 6px; margin: 0; }
.w3p4f-ready label { display: flex; gap: 8px; align-items: baseline; }

/* W5-P1 platform lift import (pli-) */
.pli-crumb { margin: 0 0 8px; }
.pli-muted { color: var(--muted); }
.pli-ref { font-size: 12px; color: var(--muted); }
.pli-scroll { overflow-x: auto; }
.pli-table td { vertical-align: top; }
.pli-form fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 12px; padding: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pli-form legend { font-weight: 600; padding: 0 4px; }
.pli-form label { display: flex; flex-direction: column; gap: 4px; }
.pli-form label small { color: var(--muted); }
.pli-form .pli-check { flex-direction: row; align-items: flex-start; gap: 8px; }
.pli-form [aria-invalid="true"] { border-color: var(--fail); outline: 2px solid var(--fail-bg); }
.pli-message { color: var(--fail); min-height: 1.4em; }
.pli-dl { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 6px 16px; margin: 0; }
.pli-dl dt { color: var(--muted); }
.pli-dl dd { margin: 0; overflow-wrap: anywhere; }
.pli-hash { font-size: 12px; }
.pli-notes { margin: 8px 0 0; color: var(--warn); }
.pli-state-accepted { background: var(--pass-bg); color: var(--pass); }
.pli-state-refused { background: var(--fail-bg); color: var(--fail); }
.pli-state-awaiting_review { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 760px) {
  .pli-dl { grid-template-columns: 1fr; }
  .pli-form fieldset { grid-template-columns: 1fr; }
}
/* w4p6 daily incrementality (W4-P6): one release-status card in the notes grid, synthetic notice, form status */
.w4p6-notes > .card { margin: 0; }
.w4p6-notes > .w4p6-release { grid-column: 1 / -1; }
.w4p6-synthetic { margin: 0 0 12px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.w4p6-synthetic .pf-chip { white-space: normal; max-width: 100%; }
.w4p6-form-status { margin: 0; color: var(--fail); font-size: 14px; }
.w4p6-form-status:empty { display: none; }
.w4p6-table .pf-chip { white-space: normal; max-width: 100%; }

/* W5-P3 reason codes */
.w5p3-reason { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--warn); background: var(--warn-bg); }
.w5p3-reason p { margin: 0 0 4px; }
.w5p3-invalid, .w5p3-withheld { border-left-color: var(--fail); background: var(--fail-bg); }
.w5p3-valid_informative { border-left-color: var(--pass); background: transparent; }
.w5p3-chip { white-space: normal; }

/* W5-P6 managed services: price list and service levels (doc 17 §7.1; ADR-442) */
.w5p6-service .sub { margin-bottom: 6px; }
.w5p6-service .pf-placeholder { margin: 0; }
.w5p6-section { margin: 8px 0 20px; }
.w5p6-section > h2 { font-size: 20px; margin: 0 0 6px; }
.w5p6-lede { color: var(--muted); margin: 0 0 14px; max-width: 820px; }
.w5p6-package h3 { margin: 0; font-size: 17px; }
.w5p6-package-current { border-color: var(--pass); box-shadow: inset 0 0 0 1px var(--pass); }
.w5p6-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.w5p6-price { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.w5p6-inclusions { margin: 0 0 10px; }
.w5p6-current-line { margin: 8px 0 0; font-weight: 600; color: var(--pass); }
.w5p6-current-line.w5p6-current-ended { color: var(--muted); }
.w5p6-mine { background: var(--pass-bg); color: var(--pass); border-color: transparent; }
.w5p6-fees, .w5p6-levels-card { overflow-x: auto; }
.w5p6-fee-table, .w5p6-level-table { width: 100%; border-collapse: collapse; }
.w5p6-fee-table caption { text-align: left; font-weight: 600; font-size: 17px; margin-bottom: 8px; }
.w5p6-fee-table th, .w5p6-fee-table td, .w5p6-level-table th, .w5p6-level-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-top: 1px solid var(--line); }
.w5p6-fee-table thead th, .w5p6-level-table thead th { border-top: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.w5p6-nowrap { white-space: nowrap; }
.w5p6-fee-table tbody th { min-width: 220px; }
.w5p6-notes p { margin: 0 0 6px; }
.w5p6-notes p:last-child { margin-bottom: 0; }
.w5p6-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 760px) {
  .w5p6-fee-table thead, .w5p6-level-table thead { display: none; }
  .w5p6-fee-table tr, .w5p6-fee-table th, .w5p6-fee-table td,
  .w5p6-level-table tr, .w5p6-level-table th, .w5p6-level-table td { display: block; }
  .w5p6-fee-table td, .w5p6-level-table td { border-top: 0; padding-top: 0; }
  .w5p6-level-table td::before { content: attr(data-w5p6-plan) ": "; font-weight: 600; }
  .w5p6-nowrap { white-space: normal; }
  .w5p6-fee-table tbody th { min-width: 0; }
}
/* W3-P3 follow-up: display names and Planned states (plan cards on the Feature map, the planned page) */
.w3p3dn-chip { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 12px; border: 1px dashed currentColor; color: var(--muted); white-space: nowrap; }
.w3p3dn-badge { border-style: solid; color: var(--pass); }
.w3p3dn-planned { max-width: 760px; }
.w3p3dn-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 8px 0 12px; }
.w3p3dn-plan { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-width: 0; overflow-wrap: anywhere; }
.w3p3dn-plan h3 { font-size: 15px; margin: 0 0 6px; }
.w3p3dn-plan[data-w3p3dn-state="planned"] { border-style: dashed; }
.w3p3dn-discuss { font-size: 13px; color: var(--muted); }
/* W3-P3 follow-up (#57 review): above phone width the top bar stays on one row; the workspace name, the study
   crumb and the KPI/model chips shrink with an ellipsis (full text in their title) so the RU bar never wraps
   the alerts, language toggle or SYNTHETIC DATA badge onto a second line */
@media (min-width: 761px) {
  .topbar-inner { flex-wrap: nowrap; }
  .topbar-inner > * { flex-shrink: 0; }
  .topbar-inner > .workspace-name, .topbar-inner > .header-chip {
    flex-shrink: 1; min-width: 3em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .topbar-inner > .spacer { flex-shrink: 1; min-width: 0; }
}

/* W3-P15 client prior elicitation: the channel expectations page */
.eli-page .eli-q { margin: 16px 0; }
.eli-page .eli-q legend { font-weight: 600; padding: 0 4px; }
.eli-table input[type="number"] { width: 8em; }
.eli-table th[scope="row"] { font-weight: 500; }
.eli-table .eli-stale { opacity: .6; }
@media (max-width: 760px) {
  .eli-table thead { display: none; }
  .eli-table tr, .eli-table th, .eli-table td { display: block; }
  .eli-table td { border-top: 0; padding-top: 0; }
  .eli-table input[type="number"] { width: 100%; max-width: 12em; }
}

/* W5-P3 platform lift beside the model (plb-) */
.plb-label { color: var(--muted); font-size: 13px; }
.plb-reason { font-weight: 600; }
.plb-scroll { overflow-x: auto; }
.plb-table { border-collapse: collapse; width: 100%; }
.plb-table caption { text-align: left; color: var(--muted); padding-bottom: 4px; }
.plb-table th, .plb-table td { padding: 6px 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.plb-agreement-contradiction { color: var(--fail); }
.plb-agreement-tension { color: var(--warn); }
@media (max-width: 480px) {
  .plb-table thead { display: none; }
  .plb-table tr, .plb-table th, .plb-table td { display: block; }
  .plb-table td { border-top: 0; padding-top: 0; }
  .plb-table td::before { content: attr(data-label) ": "; color: var(--muted); }
  .plb-table caption { display: block; }
}

/* P26 measurement programme */
.mp-crumb { margin: 0 0 8px; }
.mp-muted { color: var(--muted); }
.mp-scroll { overflow-x: auto; }
.mp-table td { vertical-align: top; }
.mp-chip-muted { background: var(--paper); color: var(--muted); }
.mp-empty { color: var(--muted); }
.mp-banner { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 10px 12px; }
.mp-calibration { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
.mp-error { border-color: var(--fail); }
.mp-error-text { color: var(--fail); }
.mp-dl { display: grid; grid-template-columns: minmax(160px, 260px) 1fr; gap: 6px 16px; margin: 0; }
.mp-dl dt { color: var(--muted); }
.mp-dl dd { margin: 0; overflow-wrap: anywhere; }
.mp-dl-tight { grid-template-columns: minmax(120px, 180px) 1fr; }
.mp-hash { font-size: 12px; }
.mp-sequence { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.mp-study { margin: 0; }
.mp-study h2 { margin-top: 0; }
.mp-study-meta { margin: 0 0 4px; }
.mp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.mp-cell { border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-width: 0; }
.mp-cell h3 { margin: 0 0 8px; font-size: 15px; }
.mp-big { font-size: 22px; font-weight: 600; margin: 0 0 8px; }
.mp-chip-scored { background: var(--pass-bg); color: var(--pass); }
.mp-chip-predicted { background: var(--accent-soft); color: var(--accent); }
.mp-chip-blocked { background: var(--warn-bg); color: var(--warn); }
.mp-chip-error { background: var(--fail-bg); color: var(--fail); }
.mp-pooled { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.mp-actions { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.mp-form fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 12px; padding: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.mp-form fieldset[hidden] { display: none; }
.mp-form legend { font-weight: 600; padding: 0 4px; }
.mp-form label { display: flex; flex-direction: column; gap: 4px; }
.mp-form label small { color: var(--muted); }
.mp-form .mp-wide { grid-column: 1 / -1; }
.mp-form [aria-invalid="true"] { border-color: var(--fail); outline: 2px solid var(--fail-bg); }
.mp-message { color: var(--fail); min-height: 1.4em; }
.mp-link { margin: 8px 0 0; }
@media (max-width: 760px) {
  .mp-grid { grid-template-columns: 1fr; }
  .mp-dl, .mp-dl-tight { grid-template-columns: 1fr; }
  .mp-dl dt { margin-top: 6px; }
}
.mp-chip-not_comparable { background: var(--warn-bg); color: var(--warn); }
.mp-nc { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }
.mp-nc ul { margin: 4px 0 0; padding-left: 18px; }
.mp-reason { background: var(--paper); border-radius: 8px; padding: 8px 12px; margin: 8px 0; white-space: pre-line; }
/* S-2 engagement: decision brief, assessment note, route record */
.eng-page h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eng-back { margin: 0 0 8px; }
.eng-table { width: 100%; border-collapse: collapse; }
.eng-table th, .eng-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.eng-empty { color: var(--muted); margin: 8px 0; }
.eng-note { background: var(--paper); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.eng-decision { font-size: 18px; font-weight: 600; margin: 0 0 4px; }
.eng-dl { display: grid; grid-template-columns: minmax(160px, 1fr) 3fr; gap: 6px 16px; margin: 12px 0 0; }
.eng-dl dt { color: var(--muted); }
.eng-dl dd { margin: 0; }
.eng-options, .eng-missing, .eng-modules, .eng-reasons { margin: 4px 0 0; padding-left: 18px; }
.eng-rungs { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px; }
.eng-rungs li { display: flex; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.eng-rung-passed { background: var(--pass-bg); color: var(--pass); }
.eng-rung-failed { background: var(--fail-bg); color: var(--fail); }
.eng-rung-not_evaluated, .eng-rung-not_applicable { background: var(--paper); color: var(--muted); }
.eng-recommendation { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 8px; }
.eng-chip-brief { background: var(--paper); color: var(--muted); }
.eng-chip-assessed { background: var(--accent-soft); color: var(--accent); }
.eng-chip-routed { background: var(--pass-bg); color: var(--pass); }
.eng-chip-superseded { background: var(--warn-bg); color: var(--warn); }
.eng-route-experiment, .eng-route-combined { background: var(--pass-bg); color: var(--pass); }
.eng-route-mmm, .eng-route-existing_evidence { background: var(--accent-soft); color: var(--accent); }
.eng-route-repair { background: var(--warn-bg); color: var(--warn); }
.eng-route-no_route { background: var(--fail-bg); color: var(--fail); }
.eng-reason { background: var(--paper); border-radius: 8px; padding: 8px 12px; margin: 0; white-space: pre-line; }
.eng-repair { margin: 4px 0 0; padding-left: 20px; }
.eng-details { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }
.eng-details summary { cursor: pointer; font-weight: 600; }
.eng-form fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 12px 0; padding: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.eng-form legend { font-weight: 600; padding: 0 4px; }
.eng-form label { display: flex; flex-direction: column; gap: 4px; }
.eng-form label small, .eng-form small { color: var(--muted); }
.eng-form .eng-radio, .eng-form .eng-check { flex-direction: row; align-items: baseline; gap: 8px; }
.eng-form .eng-route-option { flex-wrap: wrap; }
.eng-form .eng-route-option small { flex-basis: 100%; }
.eng-form .eng-wide { grid-column: 1 / -1; }
.eng-form [hidden] { display: none; }
.eng-form [aria-invalid="true"] { border-color: var(--fail); outline: 2px solid var(--fail-bg); }
.eng-message { color: var(--fail); min-height: 1.4em; }
.eng-link { margin: 8px 0 0; }
@media (max-width: 760px) {
  .eng-dl { grid-template-columns: 1fr; }
  .eng-dl dt { margin-top: 6px; }
  .eng-table thead { display: none; }
  .eng-table tr { display: grid; grid-template-columns: 1fr; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .eng-table td { border: 0; padding: 2px 0; }
}

/* plan5 T524: measurement plan page */
.mplan-estimand { font-size: 1.05rem; line-height: 1.5; margin: 8px 0 0; }
.mplan-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.mplan-figure { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.mplan-figure-label { color: var(--muted); }
.mplan-figure-value { font-size: 1.4rem; font-weight: 600; }
.mplan-check { font-weight: 600; margin: 8px 0; }
.mplan-check-mde_above_worthwhile { color: var(--warn); }
.mplan-versions { margin: 8px 0 0; padding-left: 20px; }
@media (max-width: 760px) {
  .mplan-compare { grid-template-columns: 1fr; }
}

/* plan5 T553: the confounding review on the engagement page */
.ecf-chip-not_reviewed { background: var(--warn-bg); color: var(--warn); }
.ecf-chip-unresolved { background: var(--warn-bg); color: var(--warn); }
.ecf-chip-resolved { background: var(--pass-bg); color: var(--pass); }
/* Plan5 T557: the memo's evidence table scrolls inside its card instead of squeezing its columns */
.memo-scroll { overflow-x: auto; }
.memo-evidence td:nth-child(-n+3) { white-space: nowrap; }
@media (max-width: 760px) {
  .memo-evidence { min-width: 980px; }
  .memo-evidence td:nth-child(n+4) { min-width: 260px; }
}

/* model_route (plan5 T560): the MMM route of an engagement brief */
.mro-scroll { overflow-x: auto; }
.mro-gate-pass { background: var(--pass-bg); color: var(--pass); }
.mro-gate-fail, .mro-gate-override { background: var(--fail-bg); color: var(--fail); }
.mro-restriction { border-left: 4px solid var(--fail); }
.mro-cited { margin: 4px 0 0; padding-left: 18px; }
.mro-cited li { margin: 0 0 8px; overflow-wrap: anywhere; }
.mro-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 16px; }
.mro-form label { display: flex; flex-direction: column; gap: 4px; }
.mro-form p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 760px) {
  .mro-form { grid-template-columns: 1fr; }
}

/* calibration review (plan5 T563) */
.crv-list, .crv-codes { margin: 4px 0 0; padding-left: 18px; }
.crv-list li { margin: 0 0 8px; overflow-wrap: anywhere; }
.crv-pair { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 12px; }
.crv-pair h3 { overflow-wrap: anywhere; }
.crv-independence-in_model { border-left: 4px solid var(--fail); }
.crv-independence-not_shown, .crv-independence-unknown { border-left: 4px solid var(--warn); }

/* plan5 T554: the engagement journey */
.ejr-stage { margin: 4px 0 8px; }
.ejr-steps { list-style: none; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 8px 0 12px; }
.ejr-step { border: 1px solid var(--line); border-radius: 6px; padding: 6px; font-size: .85rem; overflow-wrap: anywhere; color: var(--muted); }
.ejr-step-done { background: var(--pass-bg); color: var(--pass); border-color: transparent; }
.ejr-step-current { border: 2px solid var(--accent); color: inherit; font-weight: 600; }
.ejr-list { margin: 6px 0 0; padding-left: 20px; }
.ejr-list li { margin: 2px 0; }
.ejr-history { margin-top: 10px; }
.ejr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 1200px) {
  .ejr-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ejr-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* plan5 T576: engagement close outcome */
.eng-chip-closed { background: var(--paper); color: var(--muted); }
.ecl-closed { border-left: 3px solid var(--line); padding: 4px 0 4px 12px; margin: 12px 0; }
.ecl-closed p { margin: 4px 0; }
.ecl-close summary { cursor: pointer; font-weight: 600; }

/* Plan5 T558: the package a plan card belongs to (ADR-460), above the plan name */
.w5p6-package-name { margin: 0 0 2px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }

/* T578 */
.eng578-readiness { margin: 8px 0 12px; }
.eng578-list { margin: 0; padding-left: 18px; }
.eng578-id { font-size: 12px; overflow-wrap: anywhere; }
.eng578-rejected-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; width: 100%; }
@media (max-width: 760px) { .eng578-rejected-row { flex-direction: column; align-items: stretch; } }

/* plan5 T582: the decision owner's confirmation of the tolerated loss (brief page) */
.etc-confirm { background: var(--paper); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.etc-confirm p { margin: 4px 0; }

/* p5shell: Plan5 Clear Blue / editorial shell and public information */
.p5shell { background: #f5f8fd; }
.p5shell .p5shell-topbar { background: var(--card); color: var(--ink); border-bottom: 1px solid var(--line); }
.p5shell-topbar .brand, .p5shell-topbar a { color: var(--accent); }
.p5shell .p5shell-layout { display: block; max-width: 1440px; padding: 24px 32px; }
.p5shell-layout .p5shell-nav, .p5shell-layout .p5shell-nav.pf-rail-sticky { position: static; max-height: none; overflow: visible; padding: 0 0 16px; margin-bottom: 30px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.p5shell-layout .p5shell-nav .pf-nav-body { display: flex; flex-direction: row; align-items: start; flex-wrap: wrap; gap: 12px; }
.p5shell-layout .p5shell-nav .p5shell-primary { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.p5shell-layout .p5shell-nav a.active, .p5shell-tabs a.active { background: var(--accent-soft); color: var(--accent); border-radius: 6px; }
.p5shell-nav .pf-nav-more { margin: 0; border: 0; max-width: 260px; }
.p5shell-nav form { margin: 0; padding: 0; border: 0; }
.p5shell-tabs, .p5shell-public-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.p5shell-tabs { margin: 0 0 24px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.p5shell-tabs a { padding: 10px 14px; }
.p5shell-hero { padding: 38px 0; max-width: 900px; }
.p5shell-hero h1 { font-size: clamp(28px, 4vw, 46px); line-height: 1.15; letter-spacing: -.035em; }
.p5shell-hero p { font-size: 18px; color: var(--muted); }
.p5shell-hero .p5shell-eyebrow { font-size: 13px; color: var(--accent); }
.p5shell-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.p5shell-cards .card { padding: 26px; margin: 0; }
.p5shell-price { font-size: 25px; color: var(--accent); font-weight: 600; }
.p5shell-note { margin: 28px 0; padding: 22px; background: var(--accent-soft); border-radius: 8px; }
.p5shell a:focus-visible, .p5shell summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 760px) {
  .p5shell .p5shell-layout { padding: 16px; }
  .p5shell-cards { grid-template-columns: 1fr; }
  .p5shell-primary { width: 100%; flex-basis: 100%; }
  .p5shell .topbar-inner { flex-wrap: wrap; gap: 12px; }
  .p5shell-hero { padding: 20px 0; }
  .p5shell-nav.pf-nav-collapsible:not(.pf-nav-open) .pf-nav-body { display: none; }
}
/* Plan5 analytics and planning (p5analytics) */
.p5analytics-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; border-bottom: 1px solid var(--line, #dbe4f0); padding-bottom: 12px; }
.p5analytics-tabs a { padding: 10px 16px; border-radius: 8px; text-decoration: none; color: var(--ink, #1d2433); }
.p5analytics-tabs a[aria-current="page"] { background: #eaf1ff; color: #215bd3; font-weight: 600; }
.p5analytics-tabs a:focus-visible { outline: 3px solid #2864e8; outline-offset: 2px; }
.p5analytics-plot { width: 100%; min-height: 260px; }
.p5analytics-table { width: 100%; border-collapse: collapse; }
.p5analytics-table th, .p5analytics-table td { text-align: left; padding: 16px 12px; border-bottom: 1px solid #e8edf5; vertical-align: top; }
.p5analytics-table small { display: block; max-width: 28ch; font-weight: normal; color: var(--muted, #64748b); margin-top: 4px; }
.p5analytics-table details { margin-top: 8px; }
.p5analytics-table summary { cursor: pointer; color: #215bd3; }
@media (max-width: 760px) {
  .p5analytics-tabs { gap: 4px; }
  .p5analytics-tabs a { padding: 8px; }
  .p5analytics-table { min-width: 540px; }
  .p5analytics-contributions .pf-card-head { flex-wrap: wrap; }
}

.p5analytics-tabs [aria-disabled="true"] { padding: 10px 16px; color: var(--muted, #64748b); }

/* T596 requests and study progress */
.req-page { max-width: 960px; margin: auto; }
.req-page form { display: grid; gap: 12px; margin-block: 16px; }
.req-page label { display: grid; gap: 6px; }
.req-page input, .req-page select, .req-page textarea { max-width: 100%; min-width: 0; }
.req-text, .req-event { white-space: pre-wrap; overflow-wrap: anywhere; }
.req-event { border-bottom: 1px solid var(--border); padding-block: 8px; }
@media (max-width: 760px) { .req-page { width: 100%; } }

/* Plan5 standard refresh */
.p5refresh-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-block: 1.5rem; }
#p5refresh-form { display: grid; gap: .75rem; max-width: 40rem; }
#p5refresh-form select { max-width: 100%; min-width: 0; }
#p5refresh-history article { padding-block: .75rem; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .p5refresh-links { flex-direction: column; } }

/* Scientist delivery intake and explicit publication */
.delivery-form { display: grid; gap: 10px; max-width: 640px; margin: 20px 0; }
.delivery-form input, .delivery-form select { box-sizing: border-box; width: 100%; min-width: 0; }
.delivery-form button { justify-self: start; }

/* Scientist historical summary text stays within mobile cards. */
[data-historical-result] { overflow-wrap: anywhere; }
[data-historical-form] textarea { width: 100%; max-width: 100%; }

/* p5overview: approved Plan5 sidebar and weekly observed overview */
.p5shell { --accent: #2864e8; --accent-soft: #eaf1ff; --ink: #182b48; --muted: #64748b; --line: #dce4ef; background: #f5f8fc; }
.p5shell .p5shell-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); max-width: 1600px; padding: 0; gap: 0; }
.p5shell .p5shell-layout.app-shell-public { display: block; }
.p5shell-layout .page { padding: 36px 44px 60px; min-width: 0; width: 100%; }
.p5shell-layout .p5shell-nav, .p5shell-layout .p5shell-nav.pf-rail-sticky { position: sticky; top: 0; align-self: start; height: calc(100dvh - 70px); overflow-y: auto; background: #fff; border-right: 1px solid var(--line); margin: 0; padding: 28px 18px; }
.p5shell-layout .p5shell-nav .pf-nav-body { display: flex; flex-direction: column; flex-wrap: nowrap; min-height: 100%; gap: 12px; align-items: stretch; }
.p5shell-layout .p5shell-nav .p5shell-primary { display: grid; flex: 0; gap: 6px; }
.p5shell-nav a { padding: 11px 14px; color: var(--muted); border-radius: 7px; }
.p5shell-nav a.active { font-weight: 600; }
.p5shell-nav .p5shell-account { margin-top: auto; border-top: 1px solid var(--line); padding-top: 20px; }
.p5shell-topbar .pf-nav-toggle { display: none; }
.p5shell .topbar-inner { max-width: 1600px; }
.p5overview h1 { font-family: Georgia, serif; font-size: clamp(32px, 4vw, 42px); font-weight: 400; letter-spacing: -1px; }
.p5overview h2 { font-family: Georgia, serif; font-size: 25px; font-weight: 400; }
.p5overview-banner { background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 16px 20px; margin-bottom: 30px; }
.p5overview-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.p5overview-controls { display: flex; gap: 18px; flex-wrap: wrap; margin: 24px 0; }
.p5overview-controls label { display: grid; gap: 6px; }
.p5overview-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 24px 0; }
.p5overview-metrics .card { margin: 0; padding: 22px; }
.p5overview-value { font: 30px Georgia, serif; margin: 12px 0; overflow-wrap: anywhere; }
.p5overview-plot { width: 100%; height: 340px; }
.p5overview .card { border-radius: 9px; }
.p5overview-actions { display: flex; flex-wrap: wrap; gap: 16px; }
@media (max-width: 1050px) { .p5shell-layout .page { padding: 28px; } .p5overview-metrics { gap: 12px; } }
@media (max-width: 760px) {
  .p5shell .p5shell-layout { display: block; }
  .p5shell-layout .page { padding: 22px 18px; }
  .p5shell-topbar .pf-nav-toggle { display: block; position: relative; z-index: 62; }
  .p5shell-layout .p5shell-nav, .p5shell-layout .p5shell-nav.pf-rail-sticky { position: fixed; inset: var(--p5drawer-top, 78px) auto 0 0; width: 260px; height: calc(100dvh - var(--p5drawer-top, 78px)); z-index: 61; transform: translateX(-100%); transition: transform .2s; }
  .p5shell-layout .p5shell-nav.pf-nav-open { transform: translateX(0); }
  .p5shell .p5shell-nav.pf-nav-collapsible .pf-nav-body { display: flex; }
  .p5shell-nav.pf-nav-collapsible:not(.pf-nav-open) { visibility: hidden; }
  .p5shell-layout .p5shell-nav:not(.pf-nav-collapsible) { position: static; transform: none; height: auto; width: auto; }
  .p5shell-shade:not([hidden]) { position: fixed; inset: var(--p5drawer-top, 78px) 0 0; background: #172e5470; z-index: 60; }
  .p5shell-drawer-open { overflow: hidden; }
  .p5overview-metrics { grid-template-columns: 1fr; }
  .p5shell .workspace-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
  .p5shell .header-chip, .p5shell .pf-alert-bell { display: none; }
}

.p5shell .skip-link:not(:focus) { clip-path: inset(100%); }

.p5overview-controls select { border: 1px solid #cbd5e1; padding: 9px 12px; border-radius: 5px; color: var(--ink); background: #fff; font: inherit; }

/* SCI package: assigned task download */
.scip-download { padding: 1rem; border: 1px solid var(--line, #dbe3ef); border-radius: 12px; }
.scip-download code { overflow-wrap: anywhere; }
.scip-download input { padding: .6rem; border: 1px solid var(--line, #dbe3ef); border-radius: 6px; }
@media (max-width: 760px) { .scip-download { padding: .75rem; } }
/* PLN-TRACK: constrained mobile chart, revision selector and immutable identifiers. */
.pln-tracking { min-width: 0; max-width: 100%; }
.pln-tracking code { overflow-wrap: anywhere; }
.pln-tracking select { max-width: 100%; }
.pln-tracking #pln-tracking-chart { width: 100%; min-width: 0; overflow: hidden; }
.pln-tracking .tblwrap { max-width: 100%; overflow-x: auto; }
@media (max-width: 760px) {
  .pln-tracking select { width: 100%; }
  .pln-tracking .tblwrap table { min-width: 620px; }
}
/* Reports RPT-02 */
.rpt-detail td { overflow-wrap: anywhere; max-width: 22rem; }
.rpt-detail dl { overflow-wrap: anywhere; }

/* PUB launch: bounded anonymous demo */
.pub-plot {height: 390px; width: 100%; min-width: 0;}
.pub-demo form {display: flex; flex-wrap: wrap; gap: 1rem; align-items: end;}
.pub-demo label {display: grid; gap: .4rem; flex: 1 1 180px;}
.p5shell-public-nav {flex-wrap: wrap;}
@media (max-width: 760px) {.pub-plot {height: 340px;} .p5shell-topbar .topbar-inner {flex-wrap: wrap;}}

/* PUB channel legend needs room below the weekly axis on narrow screens. */
#pub-spend.pub-plot {height: 500px;}
/* EXP collaboration and teaching */
[data-expc-thread] { border-top: 1px solid var(--border, #dce3e8); margin-top: 1rem; padding-top: 1rem; }
[data-expc-thread] dd { overflow-wrap: anywhere; }
[data-expc-teaching] form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
[data-expc-teaching] label, [data-expc-form] label { display: block; margin-bottom: .75rem; }
[data-expc-form] input, [data-expc-form] select, [data-expc-form] textarea { max-width: 100%; }
@media (max-width: 760px) { [data-expc-teaching] form { grid-template-columns: 1fr; } }

/* Plan5 complete analytics */
.anx-selected { background: var(--blue-light, #eaf1ff); outline: 2px solid #2864e8; }
[data-analytics-scope] select, [data-planning-reference] select, [data-planning-reference] input { max-width: 100%; }
[data-planning-reference] form { display: flex; align-items: end; flex-wrap: wrap; gap: 1rem; }
[data-planning-reference] code { overflow-wrap: anywhere; }
#scenario-comparison, #optimizer-comparison { min-width: 0; width: 100%; }
@media (max-width: 760px) { [data-planning-reference] form { align-items: stretch; flex-direction: column; } }

/* Reports pinned values */
.rpt-chart-line { display:flex;gap:1rem;align-items:center;flex-wrap:wrap;margin:.4rem 0; }
.rpt-chart-line span {overflow-wrap:anywhere;flex:1;min-width:180px;}
.rpt-chart-line meter {width:40%;}
[data-dx-root] table { min-width:0; }
[data-dx-root] td, [data-dx-root] th {overflow-wrap:anywhere;}
/* Data input and preview containment */
[data-weekly-upload], [data-dx-root] { min-width:0; max-width:100%; overflow-wrap:anywhere; }
[data-weekly-upload] label, [data-dx-root] label { display:block; margin:.6rem 0; }
[data-weekly-upload] input, [data-weekly-upload] select, [data-weekly-upload] textarea,
[data-dx-root] input, [data-dx-root] select { box-sizing:border-box; max-width:100%; }
[data-dx-cells], [data-dx-events] { max-width:100%;overflow:auto; }

/* Operations Q57/Q62 */
.ops-evidence { white-space: pre-wrap; overflow-wrap: anywhere; }

/* uih: client model health */
.uih-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.uih-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.uih-checks article { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.uih-checks h4 { margin: 0 0 12px; }
.uih-checks [data-uih-status="usable"] { background: var(--accent-soft); border-color: var(--accent); }
.uih-details > summary { cursor: pointer; padding: 20px 0; font-weight: 600; }
.uih-details code { overflow-wrap: anywhere; }
@media (max-width: 760px) { .uih-checks { grid-template-columns: 1fr; } }
/* Guided data upload UI */
.du-page { max-width: 1180px; margin: 0 auto; }
.du-lead { color: var(--muted, #526174); max-width: 760px; font-size: 1.08rem; }
.du-card { padding: 24px; margin: 20px 0; border: 1px solid var(--border, #dbe3eb); border-radius: 16px; background: var(--surface, #fff); min-width: 0; }
.du-card h2 { margin-top: 0; }
.du-card label { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; font-weight: 600; }
.du-card input, .du-card select { max-width: 100%; min-width: 0; }
.du-card label[hidden], .du-card section[hidden], .du-card div[hidden] { display: none; }
.du-card input[type=checkbox] { align-self: flex-start; }
.du-steps { display: flex; gap: 32px; padding: 16px 16px 16px 38px; background: #eff5ff; border-radius: 12px; color: #254b82; }
.du-file { padding: 24px; border: 2px dashed #9db3cd; border-radius: 12px; background: #f8fbff; }
.du-file span { font-size: .9rem; font-weight: 400; color: #526174; }
.du-mapping, .du-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; align-items: end; }
.du-mapping label { padding: 12px; background: #f7f9fc; border-radius: 10px; overflow-wrap: anywhere; }
.du-review { border-top: 1px solid #dbe3eb; margin-top: 24px; padding-top: 16px; }
.du-review .tblwrap { max-height: 440px; overflow: auto; margin-bottom: 20px; }
.du-review caption { text-align: left; font-weight: 600; padding: 12px 0; }
.du-version { border-left: 4px solid #6a8dbb; }
[data-weekly-status]:not(:empty) { padding: 14px; margin-top: 16px; background: #fff6df; border-radius: 8px; }
@media (max-width: 760px) { .du-card { padding: 16px; } .du-steps { flex-direction: column; gap: 8px; } .du-mapping, .du-fields { grid-template-columns: 1fr; gap: 8px; } }
.du-file { text-align: center; align-items: center; padding: 32px 20px; transition: border-color .15s, background .15s; }
.du-file input { font-weight: 400; font-size: .9rem; }
.du-file input::file-selector-button { background: #fff; color: #254b82; border: 1px solid #9db3cd; border-radius: 8px; min-height: 40px; margin-right: 12px; padding: 8px 16px; cursor: pointer; }
.du-file:focus-within, .du-file.du-dragging { border-color: #2764d7; background: #edf4ff; outline: 2px solid #c9dbff; }
.du-selected { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #dbe3eb; border-radius: 10px; padding: 10px 14px; background: #f8fafc; }
.du-selected span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.du-selected button { flex: 0 0 auto; }
.du-card select, .du-card input:not([type=checkbox]) { min-height: 40px; }
.du-steps { font-size: .9rem; }
/* p5controls: consistent client forms and bounded numeric settings */
.p5controls .page :where(input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
  max-width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card); color: var(--ink); font: inherit;
}
.p5controls .page :where(select, textarea) { line-height: 1.4; }
.p5controls .page :where(input, select, textarea, button):focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}
.p5controls .page :where(button:not(.p5shell-nav-toggle)) {
  min-height: 40px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-weight: 600; cursor: pointer;
}
.p5controls .page :where(button:disabled, input:disabled, select:disabled) { cursor: not-allowed; opacity: .6; }
.p5controls .page input[type="range"] { accent-color: var(--accent); min-height: 32px; cursor: pointer; }
.p5controls [data-expc-controls].p5controls-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; margin: 24px 0; }
.p5controls-range { min-width: 0; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.p5controls-range-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.p5controls-range-heading label { margin: 0; font-weight: 500; }
.p5controls-range-heading output { flex-shrink: 0; padding: 2px 9px; border-radius: 6px; background: var(--card); color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 600; }
.p5controls-range input[type="range"] { display: block; width: 100%; margin: 12px 0 0; padding: 0; }
.p5controls-range-bounds { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.p5controls [data-expc-controls] .p5controls-select { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
@media (max-width: 760px) {
  .p5controls [data-expc-controls].p5controls-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .p5controls-range { padding: 12px; }
}
/* plnctl: Planning controls (PLN-CTL01) — assumptions card, scenario table and plain result */
.plnctl-card { margin: 16px 0 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.plnctl-card > summary { cursor: pointer; padding: 12px 16px; color: var(--accent); font-weight: 600; list-style-position: inside; }
.plnctl-card > summary .plnctl-summary { font-weight: 500; }
.plnctl-card > summary .plnctl-summary::before { content: "· "; }
.plnctl-card[open] > summary { border-bottom: 1px solid var(--line); }
.plnctl-body { padding: 4px 16px 16px; }
.plnctl-body > .sub { margin: 10px 0; }
table.plnctl-table td { vertical-align: top; }
table.plnctl-table tr.plnctl-changed td { background: var(--accent-soft); }
table.plnctl-table tr.plnctl-changed td:first-child { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
table.plnctl-table td:first-child { padding-left: 4px; }
.plnctl-label { font-weight: 600; }
.plnctl-field { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plnctl-field input { width: 9em; text-align: right; font-variant-numeric: tabular-nums; }
.plnctl-unit { color: var(--muted); font-size: 13px; white-space: nowrap; }
.plnctl-default { margin-top: 4px; }
.plnctl-error { margin-top: 4px; color: var(--fail); font-size: 13px; font-weight: 600; }
.plnctl-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--paper); color: var(--muted); }
.plnctl-chip-scientist { background: var(--pass-bg); color: var(--pass); }
.plnctl-chip-last { background: var(--paper); color: var(--muted); }
.plnctl-chip-client { background: var(--accent); color: #fff; }
.plnctl-chip-platform { background: transparent; color: var(--muted); border: 1px dashed var(--line); }
tr.plnctl-fixed td { color: var(--muted); }
.plnctl-promo { display: flex; flex-direction: column; gap: 8px; }
.plnctl-dates { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.plnctl-dates:empty { display: none; }
.plnctl-date-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.plnctl-date-chip button { min-height: 24px; padding: 0 8px; border: 0; background: transparent; color: var(--accent); font-size: 15px; line-height: 1; }
.plnctl-date-chip button:hover { background: transparent; color: var(--fail); }
.plnctl-promo-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plnctl-card .btn-secondary, .plnctl-save .btn-secondary { background: var(--card); color: var(--accent); border-color: var(--accent); }
.plnctl-card .btn-secondary:hover, .plnctl-save .btn-secondary:hover { background: var(--accent-soft); color: var(--accent); }
.plnctl-card [data-plnctl-reset] { margin-top: 12px; }
.panel-grid.plnctl-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 1100px) { .panel-grid.plnctl-grid { grid-template-columns: minmax(0, 1fr); } }
table.plnctl-alloc { margin-top: 12px; }
table.plnctl-alloc .num, table.plnctl-table .num, .plnctl-figure-value, .plnctl-field input { font-family: inherit; }
table.plnctl-alloc td.num, table.plnctl-alloc th.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.plnctl-alloc input.spend-input { width: 9em; text-align: right; }
table.plnctl-alloc tfoot th, table.plnctl-alloc tfoot td { padding: 9px 14px 9px 0; border-top: 1px solid var(--line); color: var(--muted); font-weight: 600; text-align: left; }
table.plnctl-alloc tfoot td.num { text-align: right; }
.plnctl-up { color: var(--pass); }
.plnctl-down { color: var(--fail); }
.plnctl-save { margin-top: 18px; }
.plnctl-save h3 { margin: 0 0 10px; }
.plnctl-save-fields { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.plnctl-save-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.plnctl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.plnctl-figure { margin: 0 0 18px; }
.plnctl-figure-label { color: var(--muted); font-size: 13px; }
.plnctl-figure-value { font-size: 30px; font-weight: 700; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; }
.plnctl-figure.plnctl-up .plnctl-figure-value { color: var(--pass); }
.plnctl-figure.plnctl-down .plnctl-figure-value { color: var(--fail); }
.plnctl-figure-range { color: var(--muted); font-size: 13px; }
.plnctl-more > summary { cursor: pointer; color: var(--accent); font-weight: 600; }
@media (max-width: 760px) {
  .plnctl-body { padding: 4px 10px 12px; }
  table.plnctl-table thead { display: none; }
  table.plnctl-table, table.plnctl-table tbody, table.plnctl-table tr, table.plnctl-table td { display: block; width: 100%; }
  table.plnctl-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.plnctl-table td { padding: 3px 0; border: 0; }
  table.plnctl-table tr.plnctl-changed td:first-child { box-shadow: none; padding-left: 0; }
  .plnctl-field input, table.plnctl-alloc input.spend-input { width: 7.5em; }
  .plnctl-figure-value { font-size: 26px; }
}
/* plnctl_cmp: budget comparison on the optimizer tab (PLN-CTL03) */
.page .plnctl-cmp-form .plnctl-cmp-horizon, .plnctl-cmp-band, .page .plnctl-cmp-form .plnctl-cmp-plan { grid-column: 1 / -1; }
.page .plnctl-cmp-form .plnctl-cmp-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--muted); }
.page .plnctl-cmp-form .plnctl-cmp-plan select { width: auto; min-width: 200px; }
.plnctl-cmp-side { display: grid; gap: 14px; min-width: 0; }
.plnctl-cmp-label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.plnctl-cmp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.plnctl-cmp-chip-main { padding-right: 10px; }
.page .plnctl-cmp-form .plnctl-cmp-add { min-height: 30px; padding: 3px 12px; border-style: dashed; font-size: 13px; }
.page .plnctl-cmp-form label.plnctl-cmp-target { display: grid; gap: 4px; font-size: 14px; font-weight: 600; color: var(--ink); }
.plnctl-cmp-target .sub { font-weight: 400; }
.plnctl-cmp-target-field { display: flex; align-items: center; gap: 8px; }
.page .plnctl-cmp-form .plnctl-cmp-target input { width: 6em; text-align: right; }
.plnctl-cmp-band { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.plnctl-cmp-band .plnctl-cmp-label { margin: 0; }
.plnctl-cmp-band-buttons { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.page .plnctl-cmp-band-button { min-height: 36px; padding: 4px 14px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: var(--card); color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.page .plnctl-cmp-band-button:last-child { border-right: 0; }
.page .plnctl-cmp-band-button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.plnctl-cmp-band [data-optband-wide] { flex-basis: 100%; margin: 0; }
.plnctl-cmp-bounds { margin-top: 10px; }
table.plnctl-cmp-table td, table.plnctl-cmp-detail td { vertical-align: top; }
table.plnctl-cmp-table td.num, table.plnctl-cmp-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.plnctl-cmp-pick { cursor: pointer; }
tr.plnctl-cmp-pick:hover td { background: var(--paper); }
tr.plnctl-cmp-pick[aria-selected="true"] td { background: var(--accent-soft); }
tr.plnctl-cmp-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
tr.plnctl-cmp-reference td { color: var(--muted); }
.plnctl-cmp-small { color: var(--muted); font-size: 12px; font-weight: 400; white-space: normal; }
.plnctl-cmp-status { white-space: nowrap; }
.plnctl-cmp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.plnctl-cmp-grid[hidden] { display: none; }
.plnctl-cmp-grid > .card { margin: 0 0 16px; min-width: 0; }
.plnctl-cmp-figures { display: grid; grid-template-columns: 1fr; gap: 8px; }
.plnctl-cmp-chart, .plnctl-cmp-pie { min-width: 0; min-height: 240px; }
table.plnctl-cmp-table, table.plnctl-cmp-detail, table.plnctl-cmp-channels, table.plnctl-cmp-table td.num, table.plnctl-cmp-table th { font-family: inherit; }
@media (max-width: 1100px) {
  .plnctl-cmp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .page .plnctl-cmp-band-button { padding: 4px 10px; }
  table.plnctl-cmp-table thead { display: none; }
  table.plnctl-cmp-table, table.plnctl-cmp-table tbody, table.plnctl-cmp-table tr, table.plnctl-cmp-table td { display: block; width: 100%; }
  table.plnctl-cmp-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.plnctl-cmp-table td { padding: 2px 0; border: 0; }
  table.plnctl-cmp-table td.num { text-align: left; white-space: normal; }
  table.plnctl-cmp-table td:nth-child(1) { font-weight: 700; }
  table.plnctl-cmp-table td:nth-child(2)::before { content: attr(data-label) " "; color: var(--muted); }
  table.plnctl-cmp-table td:nth-child(3)::before, table.plnctl-cmp-table td:nth-child(4)::before { content: attr(data-label) " "; color: var(--muted); }
}
/* plnctl_plans: saved plans table and detail panel on «Планы и выполнение» (PLN-CTL04) */
table.plnctl-plans-table { font-family: inherit; }
table.plnctl-plans-table td.num, table.plnctl-plans-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.plnctl-plans-pick { cursor: pointer; }
tr.plnctl-plans-pick:hover td { background: var(--paper); }
tr.plnctl-plans-pick[aria-selected="true"] td { background: var(--accent-soft); }
tr.plnctl-plans-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.plnctl-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--muted); }
.plnctl-status-adopted { background: var(--pass); color: #fff; }
.plnctl-status-running { background: var(--pass-bg); color: var(--pass); }
.plnctl-status-replaced, .plnctl-status-finished { background: var(--paper); }
.plnctl-plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.plnctl-plan-head h3 { margin: 0; }
.plnctl-plan-panel .plnctl-actions { align-items: center; }
.plnctl-plan-panel .plnctl-actions select { width: auto; min-width: 200px; max-width: 100%; }
.plnctl-plan-panel .btn-secondary { background: var(--card); color: var(--accent); border-color: var(--accent); }
.plnctl-plan-panel .btn-secondary:hover { background: var(--accent-soft); color: var(--accent); }
.plnctl-plan-status:empty { display: none; }
.plnctl-plan-panel .plnctl-more { margin-top: 10px; }
.plnctl-plan-assumptions { margin: 8px 0 0; padding-left: 18px; }
.plnctl-plan-assumptions li { margin: 4px 0; }
.plnctl-plan-compare { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.plnctl-plan-compare h3 { margin: 0 0 4px; }
.plnctl-plan-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 12px; }
.plnctl-plan-side h4 { margin: 0 0 4px; }
.plnctl-adopt-dialog { max-width: 520px; }
@media (max-width: 760px) {
  .plnctl-plan-side { grid-template-columns: 1fr; }
  table.plnctl-plans-table thead { display: none; }
  table.plnctl-plans-table, table.plnctl-plans-table tbody, table.plnctl-plans-table tr, table.plnctl-plans-table td { display: block; width: 100%; }
  table.plnctl-plans-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.plnctl-plans-table td { padding: 2px 0; border: 0; }
  table.plnctl-plans-table td.num { text-align: left; white-space: normal; }
  table.plnctl-plans-table td:not(:first-child)::before { content: attr(data-label) " "; color: var(--muted); }
}
/* plnctl_plans: panel beside tracking, plans plot and budget pie (PLN-CTL04 notes, UX-Q10, Q11a) */
.plnctl-plan-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.plnctl-plan-grid[hidden] { display: none; }
.plnctl-plan-grid.plnctl-plan-grid-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.plnctl-plan-grid > .card { margin: 0; min-width: 0; }
.plnctl-track h3 { margin: 0 0 10px; }
.plnctl-segment { display: inline-flex; border: 1px solid var(--accent); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.plnctl-segment button { border: 0; border-radius: 0; background: var(--card); color: var(--accent); padding: 6px 14px; min-height: 0; }
.plnctl-segment button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.plnctl-track-chart { min-height: 230px; min-width: 0; }
table.plnctl-track-table td.num, table.plnctl-track-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plnctl-plans-plot { margin-top: 18px; }
.plnctl-plans-chart { min-width: 0; min-height: 110px; }
.plnctl-plans-plot h3 { margin: 16px 0 4px; }
@media (max-width: 960px) {
  .plnctl-plan-grid.plnctl-plan-grid-two { grid-template-columns: minmax(0, 1fr); }
}
.plnctl-mmm { border-left: 4px solid var(--accent); }
.plnctl-mmm h2 { margin: 0 0 4px; }
.plnctl-mmm-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.plnctl-mmm-line p { margin: 0; }
.plnctl-mmm .btn-secondary { background: var(--card); color: var(--accent); border-color: var(--accent); }

/* reports first page (RPT-03/EXPORT01) */
.rpt1-figs { display:flex; flex-wrap:wrap; gap:.75rem; margin:1rem 0; }
.rpt1-fig { border:1px solid var(--line, #dfe3e8); border-radius:8px; padding:.6rem .9rem; min-width:10rem; flex:1 1 10rem; }
.rpt1-val { font-size:1.35rem; font-weight:600; overflow-wrap:anywhere; }
.rpt1-chart { margin:1rem 0; max-width:48rem; }
.rpt1-chart svg { display:block; width:100%; height:auto; }
.rpt1-dot { display:inline-block; width:.7rem; height:.7rem; border-radius:50%; margin-right:.4rem; vertical-align:middle; }
.rpt1-up { color:var(--pass); }
.rpt1-down { color:var(--fail); }
.rpt1-filters { display:flex; flex-wrap:wrap; gap:.75rem; align-items:flex-end; margin:.75rem 0; }
.rpt1-filters label { display:flex; flex-direction:column; gap:.25rem; max-width:100%; }
.rpt1-filters select, .rpt1-filters input { max-width:100%; }
.rpt1-chart:has(circle), .rpt1-chart:has(path) { max-width:22rem; }
.rpt1-total td { font-weight:600; }
/* ovux: Overview layout UX-Q12/Q16 (OV-UX02) */
.ovux-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; background: var(--accent-soft); border-radius: 9px; padding: 14px 18px; margin-bottom: 20px; }
.ovux-strip .pf-button-link { margin-left: auto; }
.ovux-strip-next { color: var(--muted); font-size: 14px; flex: 1 1 260px; }
.ovux-pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; vertical-align: middle; font-family: "IBM Plex Sans", sans-serif; }
.ovux-pill-ready { background: var(--pass-bg); color: var(--pass); }
.ovux-pill-updating { background: #e8eefc; color: var(--accent); }
.ovux-pill-preliminary { background: var(--warn-bg); color: var(--warn); }
.ovux-pill-with_analyst { background: var(--fail-bg); color: var(--fail); }
.ovux-switch { margin: 0 0 4px; }
.p5overview [data-overview-change][data-trend="up"] { color: var(--pass); }
.p5overview [data-overview-change][data-trend="down"] { color: var(--fail); }
.ovux-plan h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 760px) { .ovux-strip .pf-button-link { margin-left: 0; } }

/* EXP-UX01/UX03/UX05: client Experiments screens (wireframes 07, 08, 10) */
.exu-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.exu-top { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.exu-grid > .card { margin: 0; }
.exu-stages { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0; margin: 4px 0 14px; }
.exu-stage { padding: 2px 10px; border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 13px; }
.exu-stage + .exu-stage::before { content: "→"; margin: 0 8px 0 -2px; color: var(--muted); }
.exu-stage-done { color: var(--ink); }
.exu-stage-current { background: var(--pass-bg); color: var(--pass); font-weight: 600; }
.exu-note { margin: 0 0 8px; padding: 6px 10px; border-left: 3px solid var(--warn); background: var(--warn-bg); font-size: 14px; }
.exu-eyebrow { margin: 0; color: var(--muted); font-size: 14px; }
.exu-big { margin: 2px 0 0; font-size: 32px; font-weight: 700; line-height: 1.2; }
.exu-big-positive { color: var(--pass); }
.exu-big-negative { color: var(--fail); }
.exu-big-null { color: var(--ink); }
.exu-range { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.exu-zero-plot { position: relative; height: 34px; margin: 18px 6px 0; }
.exu-zero-plot::before { content: ""; position: absolute; left: 0; right: 0; top: 20px; height: 1px; background: var(--line); }
.exu-zero { position: absolute; top: 4px; height: 30px; border-left: 2px dashed var(--muted); }
.exu-band90 { position: absolute; top: 17px; height: 7px; border-radius: 4px; background: #c6daf3; }
.exu-band50 { position: absolute; top: 15px; height: 11px; border-radius: 4px; background: var(--accent); }
.exu-point { position: absolute; top: 14px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); }
.exu-point-label { position: absolute; top: -6px; transform: translateX(-50%); font-size: 12px; font-weight: 600; white-space: nowrap; }
.exu-zero-axis { position: relative; display: flex; justify-content: space-between; margin: 2px 6px 12px; font-size: 12px; color: var(--muted); }
.exu-zero-tick { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.exu-detail summary, details.exu-more > summary { cursor: pointer; color: var(--accent); font-weight: 600; }
details.exu-more { margin: 16px 0; }
details.exu-more[open] > summary { margin-bottom: 12px; }
.exu-chart-card h2, .exu-next h2, .exu-current h2, .exu-history h2, .exu-ask h2, .exu-unsure h2 { margin-top: 0; font-size: 17px; }
.exu-chart { display: block; width: 100%; height: 200px; }
.exu-post { fill: var(--accent-soft); }
.exu-grid-line { stroke: var(--line); stroke-width: 1; }
.exu-band { fill: #c6daf3; opacity: 0.7; }
.exu-line-pilot { fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.exu-line-control { fill: none; stroke: #9aa1ad; stroke-width: 2; vector-effect: non-scaling-stroke; }
.exu-line-cf { fill: none; stroke: #6b7280; stroke-width: 2; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.exu-chart-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.exu-legend { margin: 8px 0 4px; font-size: 13px; color: var(--muted); }
.exu-key { display: inline-block; width: 18px; height: 0; margin: 0 6px 3px 10px; vertical-align: middle; border-top: 2.5px solid var(--accent); }
.exu-key:first-child { margin-left: 0; }
.exu-key-control { border-top-color: #9aa1ad; }
.exu-key-cf { border-top: 2px dashed #6b7280; }
.exu-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 12px; white-space: nowrap; }
.exu-chip-in_model, .exu-chip-running, .exu-chip-done { background: var(--pass-bg); color: var(--pass); }
.exu-next-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.exu-next-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; align-items: flex-start; }
.exu-next-item h3 { margin: 0 0 6px; font-size: 15px; }
.exu-next-item p { margin: 0 0 10px; font-size: 14px; color: var(--muted); flex: 1; }
.exu-ask textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.exu-ask-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-top: 10px; }
.exu-ask-row label { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.exu-ask-row .sub { flex: 1; min-width: 200px; margin: 0; font-size: 13px; }
.exu-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.exu-unsure-rows { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 12px; align-items: center; }
.exu-unsure-name { font-size: 13px; }
.exu-current-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.exu-current-body > div:only-child { grid-column: 1 / -1; }
.exu-mini-chart .exu-chart { height: 150px; }
.exu-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.exu-cycle-line { margin: 4px 0 8px; }
.exu-history-table td { vertical-align: top; }
.exu .btn-secondary, .exu-next .btn-secondary, .exu-current .btn-secondary, .exu-history .btn-secondary, .exu-grid .btn-secondary,
p > a.btn-secondary[data-exu-report] { background: var(--card); color: var(--accent); border: 1px solid var(--accent); }
@media (max-width: 760px) {
  .exu-grid, .exu-top, .exu-current-body, .exu-next-grid { grid-template-columns: minmax(0, 1fr); }
  .exu-big { font-size: 26px; }
}
.exu-zero-row { height: 18px; margin-top: -8px; }
.exu-zero-row .exu-zero-tick { transform: none; margin-left: -1px; padding-left: 4px; border-left: 2px dashed var(--muted); }
.exu-stage-done:last-child { background: var(--pass-bg); color: var(--pass); font-weight: 600; }
/* DAT-UX03 (UX-Q15, wireframe 06): Data page — upload with downloads beside it, the check list, plain versions table */
.dux-drop-col { min-width: 0; }
.dux-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; }
.dux-drop-col > .du-file { margin-top: 0; }
.dux-downloads { display: flex; flex-direction: column; gap: 12px; }
.dux-btn { display: inline-block; padding: 9px 16px; border: 1px solid #2764d7; border-radius: 8px; color: #254b82; background: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.dux-btn:hover, .dux-btn:focus-visible { background: #edf4ff; }
.dux-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.dux-settings label { margin: 8px 0; min-width: 0; }
.dux-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #fde8e8; color: #b42318; font-size: .85rem; font-weight: 600; }
.dux-badge.dux-badge-ok { background: #e3f4e8; color: #1d6b37; }
.dux-checks { list-style: none; padding: 0; margin: 8px 0 16px; }
.dux-checks li { display: flex; gap: 14px; padding: 8px 4px; border-bottom: 1px solid #e6ebf1; overflow-wrap: anywhere; }
.dux-mark { flex: 0 0 18px; text-align: center; font-weight: 700; }
.dux-pass .dux-mark { color: #1d6b37; }
.dux-advice .dux-mark { color: #b26b00; }
.dux-fail .dux-mark { color: #b42318; }
.dux-save { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dux-save button:disabled { opacity: .5; cursor: not-allowed; }
.du-review:focus { outline: none; }
.dux-more { margin-top: 16px; }
.dux-more summary { cursor: pointer; color: #254b82; font-weight: 600; }
.dux-details { margin: 8px 0 24px; padding: 0 4px; }
.dux-details[open] { padding: 16px 24px; border: 1px solid var(--border, #dbe3eb); border-radius: 16px; background: var(--surface, #fff); }
.dux-versions td, .dux-versions th { vertical-align: top; }
.dux-versions .num { text-align: right; }
.dux-chip { display: inline-block; white-space: nowrap; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.dux-ok { background: #e3f4e8; color: #1d6b37; }
.dux-warn { background: #fdf1dc; color: #8a5300; }
.dux-fix { display: block; margin-top: 4px; font-size: .9rem; color: var(--muted, #526174); }
.dux-add > summary { list-style: none; display: inline-block; margin: 8px 0; }
.dux-add > summary::-webkit-details-marker { display: none; }
@media (max-width: 760px) {
  .dux-top { grid-template-columns: minmax(0, 1fr); }
  .dux-drop-col { min-width: 0; }
  .dux-downloads { flex-direction: row; flex-wrap: wrap; }
  .dux-settings { grid-template-columns: minmax(0, 1fr); }
  .dux-details[open] { padding: 12px; }
}
.dux-side { margin-left: 6px; font-size: .85rem; color: var(--muted, #526174); white-space: nowrap; }
/* plnctl_names: identifiers beside a simple name */
.plnctl-id { color: #64748b; font-size: .8em; margin-left: .35em; }

/* SCI-SUB03: «Проверка и публикация» card on the scientist task page */
.scisub-item { border-top: 1px solid var(--border, #e3e7ee); padding-top: 12px; margin-top: 12px; }
.scisub-item:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.scisub-preview { background: var(--surface-2, #f6f8fb); border: 1px solid var(--border, #e3e7ee); border-radius: 8px; padding: 12px 14px; margin: 8px 0 12px; }
.scisub-tag { font-size: 13px; color: var(--muted); margin: 0; }
.scisub-tag strong { color: #b42318; font-weight: 600; text-transform: uppercase; font-size: 12px; }
.scisub-big { font-size: 28px; font-weight: 700; margin: 4px 0 0; }
.scisub-label { display: inline-block; background: #e6f4ea; color: #1e6b35; border-radius: 10px; padding: 1px 8px; font-size: 13px; }
.scisub-self { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; }
.scisub-self input { margin-top: 3px; }

/* EXP-FEAS03: «Можно ли проверить?» on the request card and the scientist task page */
.feas-inputs { border: 1px solid var(--line, #e3e6ea); border-radius: 8px; padding: 10px 12px; margin: 10px 0; display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feas-inputs legend { font-weight: 600; padding: 0 4px; }
.feas-inputs label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.feas-inputs input { width: 100%; box-sizing: border-box; }
.feas-inputs [data-feas-answer] { grid-column: 1 / -1; }
.feas-answer p { margin: 4px 0; }
.feas-verdict strong { font-weight: 600; }
.feas-can .feas-verdict strong { color: var(--ok, #1f7a4d); }
.feas-cannot .feas-verdict strong { color: var(--warn, #9a5b00); }
.feas-details ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.feas-contact { font-weight: 500; }
@media (max-width: 640px) { .feas-inputs { grid-template-columns: 1fr; } }
/* plnctl_rec: PLN-CTL06 recommended budget card (UX-Q17) */
.plnctl-rec-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: center; }
.plnctl-rec-amount { font-size: 2rem; font-weight: 700; margin: 0; line-height: 1.2; }
.plnctl-rec-main > p { margin: 4px 0; }
.plnctl-rec-pie { min-height: 220px; min-width: 0; }
.plnctl-rec .plnctl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
table.plnctl-rec-table, table.plnctl-rec-table td.num, table.plnctl-rec-table th { font-family: inherit; }
table.plnctl-rec-table td.num, table.plnctl-rec-table th.num { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
table.plnctl-rec-table td { vertical-align: top; }
@media (max-width: 720px) {
  .plnctl-rec-grid { grid-template-columns: minmax(0, 1fr); }
  .plnctl-rec-amount { font-size: 1.6rem; }
}
@media (max-width: 760px) {
  table.plnctl-rec-table thead { display: none; }
  table.plnctl-rec-table, table.plnctl-rec-table tbody, table.plnctl-rec-table tfoot, table.plnctl-rec-table tr,
  table.plnctl-rec-table td, table.plnctl-rec-table th { display: block; width: 100%; white-space: normal; text-align: left; }
  table.plnctl-rec-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.plnctl-rec-table td, table.plnctl-rec-table th, table.plnctl-rec-table td.num { padding: 2px 0; border: 0; text-align: left; white-space: normal; }
  table.plnctl-rec-table td:nth-child(1), table.plnctl-rec-table th:nth-child(1) { font-weight: 700; }
  table.plnctl-rec-table td:not(:first-child)::before { content: attr(data-label) ": "; color: var(--muted); }
  table.plnctl-rec-table td:empty { display: none; }
}
/* plnctl_arch: archived and deleted saved plans (PLN-ARCH01) */
table.plnctl-plans-table tr[hidden] { display: none; }
tr.plnctl-plans-archived td { color: var(--muted); }
.plnctl-arch-toggle { margin-top: 8px; }
.plnctl-status-archived { background: var(--surface-2, #eef0ec); color: var(--muted); }
.plnctl-arch-note { margin: 6px 0 10px; }
.plnctl-actions .plnctl-arch-delete { color: var(--danger, #a1261c); border-color: currentColor; }
.plnctl-arch-dialog { max-width: 480px; }
.plnctl-arch-staff ul { list-style: none; padding: 0; margin: 8px 0 0; }
.plnctl-arch-staff li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.plnctl-arch-staff li > span { flex: 1 1 260px; min-width: 0; }
.plnctl-arch-dialog .plnctl-arch-delete { background: var(--danger, #a1261c); border-color: var(--danger, #a1261c); color: #fff; }
/* exr: Experiments remaining tasks (programme, timing, idea menu, delivered/corrected line) */
.exr-delivery { border-left-color: var(--accent); background: var(--accent-soft); }
.exr-ideas-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 8px 0; }
.exr-ideas-group { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.exr-ideas-group h3 { margin: 0 0 6px; font-size: 15px; }
.exr-ideas-group ul { margin: 0; padding-left: 18px; }
.exr-ideas-group li { margin: 4px 0; }
.exr-programme-table td { vertical-align: top; }
.exr-chip-agreed, .exr-chip-done { background: var(--pass-bg); color: var(--pass); }
.exr-chip-dropped { text-decoration: line-through; }
.exr-programme-edit form { display: grid; gap: 8px; margin-top: 8px; }
.exr-form-step { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.exr-form-step input, .exr-form-step select, .exr-programme-edit textarea { width: 100%; box-sizing: border-box; }
@media (max-width: 760px) { .exr-ideas-grid { grid-template-columns: minmax(0, 1fr); } }
.exr-entry { margin: 4px 0 12px; }
/* SCI-Q33 local copies */
.sciq33-copy { border-top: 1px solid var(--line); padding: 10px 0; }
.sciq33-copy h3 { font-size: 1rem; margin: 0 0 4px; }
.sciq33-overdue { color: var(--danger, #a1261c); font-weight: 600; }
.sciq33-copy details summary { cursor: pointer; margin: 6px 0; }
/* SCI-Q36/Q37/Q38/Q19 candidate preview, diagrams and decision information */
.sciq37-banner { border-left: 4px solid #b42318; }
.sciq37-tag { font-size: 12px; font-weight: 600; text-transform: uppercase; color: #b42318; margin: 0 0 4px; }
.sciq38-head { margin: 8px 0 2px; }
.sciq38-list { margin: 0 0 8px; padding-left: 18px; }
.sciq36-view { margin: 10px 0; }
.sciq36-view h3 { font-size: 1rem; margin: 0 0 6px; }
.sciq36-img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border, #e3e7ee); border-radius: 6px; background: #fff; }
.sciq37-compare { width: 100%; border-collapse: collapse; }
.sciq37-compare th, .sciq37-compare td { padding: 6px 8px; border-bottom: 1px solid var(--border, #e3e7ee); text-align: left; vertical-align: top; }
.sciq37-compare td.num, .sciq37-compare th.num { text-align: right; white-space: nowrap; }
.sciq19 dl { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 4px 12px; margin: 6px 0; }
.sciq19 dt { color: var(--muted); }
.sciq19 dd { margin: 0; }
.sciq19 ul { padding-left: 18px; margin: 4px 0; }
.sciq36-client { margin: 12px 0; max-width: 760px; }
.sciq36-client figcaption { margin-top: 6px; }

/* ACC-SIGN01: a long verified address wraps inside the signup card */
.accsign-email { overflow-wrap: anywhere; }

/* rnsp: receipt notes sweep, planning */
/* wireframe 02: one compact control row (horizon · budgets to compare · minimum return), no separate slider */
.page .w4p3-opt-form.rnsp-opt-form { display: grid; grid-template-columns: 1fr; gap: 14px; }
.rnsp-opt-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr) minmax(0, 1.2fr); gap: 16px 24px; align-items: start; }
.page .plnctl-cmp-form .rnsp-opt-row .rnsp-opt-horizon { grid-column: auto; padding: 10px 12px; }
.rnsp-opt-budgets { min-width: 0; }
.rnsp-opt-amount-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.page .w4p3-opt-form label.rnsp-opt-amount { display: grid; gap: 4px; font-size: 13px; font-weight: 500; color: var(--muted); max-width: 220px; }
.page .w4p3-opt-form .rnsp-opt-amount input { width: 100%; }
.rnsp-opt-row .plnctl-cmp-target { min-width: 0; }
.rnsp-opt-target .plnctl-cmp-target-field { flex-wrap: wrap; }
.page .plnctl-cmp-form .rnsp-opt-target .plnctl-cmp-target-field input { flex: 0 0 6em; }
.rnsp-opt-target .plnctl-cmp-target-field > .sub { white-space: nowrap; }
.page .plnctl-cmp-form .rnsp-opt-plan { margin-left: auto; }
.rnsp-opt-reference { margin-top: 10px; }
.rnsp-opt-reference .plnctl-body form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; }
.rnsp-locked { margin: 0 0 12px; }
@media (max-width: 760px) {
  .rnsp-opt-row { grid-template-columns: 1fr; }
  .page .plnctl-cmp-form .rnsp-opt-plan { margin-left: 0; }
}
/* rnse: receipt notes sweep, experiments */
.exr-form-step[data-rnse-gap] { border-color: var(--danger, #a1261c); }
/* SCI-EVT02: event column names wrap on narrow screens */
.scievt code { overflow-wrap: anywhere; }
/* DAT-EVT01 events file card */
.evt-card .evt-upload { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }
.evt-card .evt-upload > button[type=submit] { align-self: flex-start; }
.evt-card .evt-downloads { flex-direction: row; flex-wrap: wrap; margin: 8px 0; }
.evt-list td { vertical-align: top; }
@media (max-width: 760px) { .evt-card .evt-downloads .dux-btn { white-space: normal; } }
/* MMM-EVT01 «События» card */
.mevt-card .mevt-rows { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 12px; }
.mevt-card .mevt-rows > li { border-top: 1px solid var(--line); padding-top: 10px; }
.mevt-card .mevt-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.mevt-card .mevt-window { margin: 2px 0; }
.mevt-card .mevt-factors, .mevt-card .mevt-columns { padding-left: 18px; }
.mevt-card .mevt-columns code { overflow-wrap: anywhere; }
/* DAT-E2E01: the events-waiting line on the Data events card and the MMM «События» empty state */
.date2e-waiting { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); }
/* ADM-SR02 «Задачи» and SCI-SR01 the model task page */
.srb-task-table td { vertical-align: top; }
.srb-task-table form { margin: 0; }
.srb-task-table form p[role="status"]:empty { display: none; }
.srb-state-new { background: var(--warn-bg); color: var(--warn); }
.srb-state-served { background: var(--pass-bg); color: var(--pass); }
.srb-platform-head { margin-top: 24px; }
.srb-packages { margin: 8px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; }
.srb-packages label { display: block; margin: 4px 0; }
.srb-packages code { overflow-wrap: anywhere; }
/* PLN-E2E01: the missing-name message beside the scenario name field; the HTML 404 page */
.plnctl-save-fields [aria-invalid="true"] { border-color: var(--fail); outline: 2px solid var(--fail-bg); }
.plne2e-name-error { display: block; color: var(--fail); font-size: 13px; margin-top: 4px; }
.plne2e-404 { max-width: 640px; }

/* SR-C (DAT-SR01): the Data guide's description beside its example screenshot */
.srdg-pair { display: grid; grid-template-columns: minmax(240px, 1fr) 2.2fr; gap: 16px 24px; align-items: start; }
.srdg-pair > * { min-width: 0; }
.srdg-text h2 { margin-top: 0; }
.srdg-shot { display: block; border: 1px solid #d9dee5; border-radius: 6px; overflow: hidden; background: #fff; }
.srdg-shot img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) { .srdg-pair { grid-template-columns: 1fr; } .srdg-shot { overflow-x: auto; } .srdg-shot img { width: 760px; max-width: none; } }
/* PLN-SR01: budget fields read «325,1 млн ₸» at rest; the full figure shows while the field is edited */
.plnsr-money { position: relative; display: inline-block; max-width: 100%; vertical-align: middle; }
.plnsr-money-block { display: block; }
.plnsr-money > input { max-width: 100%; }
.plnsr-money.plnsr-money-rest > input { color: transparent !important; -webkit-text-fill-color: transparent; }
.plnsr-money-short { position: absolute; inset: 0; display: flex; align-items: center; pointer-events: none; white-space: nowrap; overflow: hidden; font: inherit; color: var(--ink, #1c2430); font-variant-numeric: tabular-nums; }
/* PLN-SR02: plans of earlier model versions under a switch on the plans chart */
.plnsr-earlier { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin: 4px 0 8px; }
.plnsr-earlier[hidden] { display: none; }

/* EXP-UX06: «Что мы уже узнали» one line per channel; «Подробнее» and the archive below */
.exu6-lines th.exu6-channel { font-weight: 600; text-align: left; white-space: nowrap; }
.exu6-lines .exu6-more-row td { padding-top: 0; border-top: 0; }
.exu6-lines .exu6-more-row details > summary { font-size: 14px; }
.exu6-lines .exu6-more-row details[open] { margin-bottom: 8px; }
.exu6-archive { margin-top: 12px; }
.exu6-filter { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin: 4px 0 8px; }
.exu6-archive tr[hidden] { display: none; }
@media (max-width: 640px) {
  .exu6-wrap { overflow-x: visible; }
  .exu6-lines > thead { display: none; }
  .page .tblwrap > table.exu6-lines, .exu6-lines > tbody, .exu6-lines > tbody > tr, .exu6-lines > tbody > tr > th,
  .exu6-lines > tbody > tr > td { display: block; width: auto; }
  .exu6-lines > tbody { border-top: 1px solid var(--line); padding: 8px 0; }
  .exu6-lines > tbody > tr.exu6-line > * { border: 0; padding: 2px 0; text-align: left; }
  .exu6-lines > tbody > tr.exu6-line > td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
  .exu6-lines > tbody > .exu6-more-row > td { padding: 4px 0 0; max-width: 100%; min-width: 0; }
  .exu6-lines > tbody > .exu6-more-row details { max-width: 100%; overflow-x: auto; }
}

/* r4fx (run 4, Zhangir 2026-10-20 18:58): staff and request forms — the label sits above its box, boxes are short
   and wide, and every field has room before and after it; check boxes stay on one line with their text. */
:is(.req-page form, [data-expc-form], [data-ops-form], [data-delivery-upload], [data-scip-download],
    [data-historical-form], [data-scisub-model-update]) label {
  display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin: 0 0 16px; max-width: 720px;
  font-weight: 500;
}
:is(.req-page form, [data-expc-form], [data-ops-form], [data-delivery-upload], [data-scip-download],
    [data-historical-form], [data-scisub-model-update]) label:has(> input[type="checkbox"], > input[type="radio"]) {
  flex-direction: row; align-items: center; gap: 8px; font-weight: 400;
}
:is(.req-page form, [data-expc-form], [data-ops-form], [data-delivery-upload], [data-scip-download],
    [data-historical-form], [data-scisub-model-update])
  :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
  width: 100%; max-width: 720px; box-sizing: border-box; font: inherit; padding: 8px 10px;
}
:is(.req-page form, [data-expc-form], [data-ops-form], [data-delivery-upload], [data-scip-download],
    [data-historical-form], [data-scisub-model-update]) textarea {
  height: 4.4em; min-height: 2.8em; resize: vertical;
}
:is(.req-page form, [data-expc-form], [data-ops-form], [data-delivery-upload], [data-scip-download],
    [data-historical-form], [data-scisub-model-update]) :is(input[type="date"], input[type="number"]) { max-width: 240px; }
:is(.req-page form, [data-expc-form], [data-ops-form], [data-delivery-upload], [data-scip-download],
    [data-historical-form], [data-scisub-model-update]) > button { justify-self: start; width: auto; margin-top: 4px; }
[data-expc-thread] { margin-top: 24px; }
[data-expc-thread] dl { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 8px 16px; margin: 12px 0 16px; }
[data-expc-thread] dt { color: var(--muted); }
[data-expc-thread] dd { margin: 0; }
@media (max-width: 760px) { [data-expc-thread] dl { grid-template-columns: 1fr; gap: 2px; } [data-expc-thread] dd { margin-bottom: 8px; } }
/* r4fx: the proposal and collaboration forms lay their fields two to a row on wide screens */
@media (min-width: 900px) {
  [data-expc-form] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
  [data-expc-form] label { max-width: none; }
  [data-expc-form] :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { max-width: none; }
  [data-expc-form] :is(input[type="date"], input[type="number"]) { max-width: 240px; }
  [data-expc-form] label:has(> input[type="checkbox"]), [data-expc-form] > button, [data-expc-form] > [role="status"] { grid-column: 1 / -1; }
}
/* EXP-E2E03: «Что договорились» spans the proposal form; the effect plot sits above the study numbers */
@media (min-width: 900px) { [data-expc-form] .e2e03-wide { grid-column: 1 / -1; } }
[data-e2e03-status] { margin: 12px 0 8px; }
[data-e2e03-accept] { margin: 8px 0 16px; }
.scisub-preview .exu-zero-plot { margin-top: 36px; }
.scisub-preview .exu-chart { width: 100%; height: 200px; margin-top: 16px; }

/* ADM-STF01: the platform roles page */
.stf01-reason { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.stf01-reason input { flex: 1 1 18rem; min-width: 0; max-width: 32rem; }
.stf01-staff-link { margin: 0 0 12px; }

/* ADM-STF02: the staff shell, the tracker filters and the company card */
.stf-shell .stf-company { color: inherit; text-decoration: none; }
.stf-shell .stf-company:hover { text-decoration: underline; }
.stf-filters { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; margin: 0 0 16px; }
.stf-filters fieldset { display: flex; flex-wrap: wrap; gap: 4px 14px; border: 0; margin: 0; padding: 0; }
.stf-filters legend { padding: 0; margin-bottom: 4px; color: var(--muted); }
.stf-filters fieldset label { display: inline-flex; gap: 6px; align-items: center; }
.stf-filters > label { display: grid; gap: 4px; min-width: 0; }
.stf-filters select { max-width: 100%; }
.stf-filters > button { width: auto; }
.stf-slug { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; }
@media (max-width: 760px) { .stf-filters > label { flex: 1 1 100%; } .stf-filters select { width: 100%; } }

/* ADM-STF10: «Оплата и тариф» on the staff company card */
.stf10-pay .stf10-block { margin: 16px 0 0; }
.stf10-pay h3 { margin: 0 0 8px; font-size: 1rem; }
.stf10-pay .stf10-request { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.stf10-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.stf10-form > label { display: grid; gap: 4px; flex: 1 1 14rem; min-width: 0; }
.stf10-form input, .stf10-form select { max-width: 100%; }
.stf10-form > h3, .stf10-form > p { flex: 1 1 100%; margin: 0; }
.stf10-form > button { width: auto; }
.stf10-row { align-items: center; padding: 6px 0; }
.stf10-row > p { flex: 1 1 14rem; }
.stf10-pay details > summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
@media (max-width: 760px) { .stf10-form > label { flex: 1 1 100%; } .stf10-form > button { width: 100%; } }
/* ADM-STF03: the request's management block on the task page, one field per row */
#stf3-discussion form { display: grid; gap: 10px; max-width: 640px; margin: 12px 0; }
#stf3-discussion form > label { display: grid; gap: 4px; min-width: 0; }
#stf3-discussion form > label:has(> input[type="checkbox"]) { display: flex; align-items: center; gap: 8px; }
#stf3-discussion form input:not([type="checkbox"]), #stf3-discussion form select,
#stf3-discussion form textarea { width: 100%; max-width: 100%; box-sizing: border-box; }
#stf3-discussion form > button { justify-self: start; }
#stf3-discussion details { margin: 12px 0; }
/* ADM-STF03 (Zhangir 2026-10-21 18:32): the client's teaching example is compact: smaller sliders and plot */
.p5controls [data-expc-teaching] [data-expc-controls].p5controls-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin: 14px 0; }
[data-expc-teaching] .p5controls-range { padding: 8px 10px; border-radius: 8px; }
[data-expc-teaching] .p5controls-range-heading { font-size: 13px; }
[data-expc-teaching] .p5controls-range-heading output { padding: 1px 6px; }
[data-expc-teaching] .p5controls-range input[type="range"] { margin-top: 6px; }
[data-expc-teaching] .p5controls-range-bounds { font-size: 11px; }
[data-expc-teaching] .p5controls-select select { max-width: 280px; }
[data-expc-teaching] svg { display: block; width: 100%; max-width: 420px; height: auto; }
@media (max-width: 760px) { .p5controls [data-expc-teaching] [data-expc-controls].p5controls-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
/* ADM-STF07: the platform's alerts on the staff company card */
.stf07-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stf07-list li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.stf07-sev-critical { color: var(--danger, #a1261c); border: 1px solid currentColor; }
.stf07-sev-warning { color: var(--warn); border: 1px solid currentColor; }

/* e2e5s (run 5, ADM-E2E05 findings 14 and 22; MMM-TEST01): held and not-held platform roles look different */
.e2e5s-role.e2e5s-role-on { background: var(--pass-bg); color: var(--pass); border: 1px solid var(--pass); }
.e2e5s-role.e2e5s-role-off { background: var(--card); color: var(--muted); border: 1px dashed var(--line); }
span.e2e5s-role { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 999px; }
.e2e5s-basis-pending { background: var(--warn-bg); color: var(--warn); }
/* OV-E2E05: the Overview heading's data status once a weekly file is saved */
.e2e5o-data-status { color: var(--muted); font-size: 14px; text-decoration: none; border-bottom: 1px dotted currentColor; }
.e2e5o-data-status:hover, .e2e5o-data-status:focus-visible { color: var(--accent); }
/* PLN-E2E05: Planning while the model builds */
.e2e5o-building { margin: 0 0 12px; font-weight: 600; }
/* e2e5c: run 5 client fixes (EXP-E2E05, EXP-E2E06, ACC-E2E05) */
/* ACC-E2E05 (finding 13): a rail label never breaks mid-word beside «Нет в тарифе»; the badge wraps below */
.platform-rail a.w3p3-nav-locked { flex-wrap: wrap; row-gap: 4px; }
.platform-rail a.w3p3-nav-locked > span { overflow-wrap: normal; word-break: normal; hyphens: none; white-space: nowrap; }
/* EXP-E2E05: the request card after sending, short; «Что дальше» as one block */
.e2e5c-request > p { margin: 8px 0; }
.e2e5c-next { background: var(--accent-soft, #eaf1ff); border-left: 3px solid var(--accent, #2864e8); border-radius: 6px; padding: 12px 16px; margin: 14px 0; }
.e2e5c-next h3 { font-size: 15px; margin: 0 0 4px; }
.e2e5c-next p { margin: 0; }
.e2e5c-comment { margin-top: 12px; }
.e2e5c-comment textarea { width: 100%; max-width: 640px; box-sizing: border-box; }
/* ACC-E2E05 (finding 4): the first package request */
.e2e5c-choices { border: 0; padding: 0; margin: 8px 0; display: grid; gap: 10px; }
.e2e5c-choices legend { font-weight: 600; margin-bottom: 6px; }
.e2e5c-choice { display: flex; gap: 10px; align-items: flex-start; }
.e2e5c-choice input { margin-top: 4px; }
.e2e5c-register { margin-top: 10px; }
@media (max-width: 760px) {
  .e2e5c-next { padding: 10px 12px; }
}

/* r5rev: run 5 external review, client results and planning (OV-REV01, MMM-REV01, PLN-REV01, RPT-REV01) */
.r5rev-hint { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.r5rev-phase { color: var(--muted); font-size: 14px; flex: 1 1 100%; }
.r5rev-legend li { flex-wrap: wrap; }
.r5rev-legend .w4p2-evidence { font-size: 12px; }
.r5rev-legend-range { color: var(--muted); font-size: 12px; white-space: nowrap; }
.r5rev-tested-note { margin: 4px 0 8px; }
.r5rev-reasons { margin-top: 6px; }
.r5rev-reasons > summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.r5rev-identity { margin: 0 0 6px; }
.r5rev-plan-period { margin: 4px 0 0; }
@media (max-width: 760px) {
  .r5rev-reliability { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
  .r5rev-reliability > strong { flex: 1 1 auto; }
  .r5rev-reliability .r5rev-reasons { margin-top: 0; flex: 1 1 100%; }
  .r5rev-reliability .r5rev-reasons:not([open]) { flex: 0 0 auto; }
}
/* ADM-REV01/02 (run 5 review): staff task page stage head, folded sections, review mode, tariff pointer */
.r5rev-head { margin: 8px 0 14px; }
.r5rev-head p { margin: 4px 0; }
.r5rev-label { color: var(--muted, #5b6270); }
.r5rev-action { display: inline-flex; align-items: center; margin-left: 8px; text-decoration: none; }
.r5rev-secondary, a.r5rev-secondary { background: var(--card, #fff); color: var(--accent); border: 1px solid var(--accent); }
.r5rev-versions { margin: 6px 0; padding-left: 18px; }
.r5rev-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
details.r5rev-fold > summary { cursor: pointer; list-style: revert; }
details.r5rev-fold > summary h2 { display: inline; margin: 0; }
.r5rev-integrity summary { cursor: pointer; font-size: 13px; color: var(--muted, #5b6270); }
.r5rev-unmet { margin: 6px 0; padding-left: 18px; }
.r5rev-staff-person { font-size: 13px; margin-right: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
@media (max-width: 640px) {
  .r5rev-action { margin: 6px 0 0; }
  .r5rev-staff-person { max-width: 110px; }
}
/* EXP-REV01 (E2E5-Q2): a promotion changes no media budget, so the spend field is hidden */
.feas-inputs [data-r5rev-spend][hidden] { display: none; }

/* MMM-REV02 (ADR-479): «Какой тест учтён» under «Модель с учётом эксперимента» */
.r5rev2-evidence { font-size: 13px; }
.r5rev2-evidence summary { cursor: pointer; color: var(--accent, #1f4f9c); }
.r5rev-legend .r5rev2-evidence[open] { flex-basis: 100%; }
.r5rev2-record { margin: 8px 0 0; padding: 10px 12px; border: 1px solid #d9dee5; border-radius: 8px; background: #f7f9fb; max-width: 640px; }
.r5rev2-record + .r5rev2-record { margin-top: 6px; }
.r5rev2-name { margin: 0 0 4px; }
.r5rev2-joint { margin: 0 0 4px; color: var(--muted, #5b6270); }
.r5rev2-record dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 6px 0; }
.r5rev2-record dt { color: var(--muted, #5b6270); }
.r5rev2-record dd { margin: 0; overflow-wrap: anywhere; }
.r5rev2-record dd small { display: block; color: var(--muted, #5b6270); }
.r5rev2-record .sub { margin: 4px 0 0; }
@media (max-width: 640px) {
  .r5rev2-record dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .r5rev2-record dd { margin-bottom: 6px; }
}
.mmmux-table .r5rev2-record { min-width: 280px; }

/* ADM-FB02 (ADR-482, the §7 field table): one form-field style on every client and staff form. A textarea is full
   width, starts at its `rows` (request context 5, agreement and review reason 7, comments 3) and grows with its
   text (r6fb_field.js); a native date field has its date echoed beside it; a money field shows ₸; an action row
   has room above it; «Убрать файл» is a quiet action. */
.page textarea { width: 100%; max-width: 100%; max-height: 70vh; box-sizing: border-box; resize: vertical; }
.page textarea[rows] { height: auto; }
.r6fb-date-echo { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted, #5b6270); }
.r6fb-date-echo:empty { display: none; }
.plnctl-promo-add .r6fb-date-echo { display: inline; margin: 0 6px; }
.r6fb-money { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.r6fb-money > input { flex: 1 1 auto; min-width: 0; }
.r6fb-money > .r6fb-unit { flex: 0 0 auto; font-weight: 600; color: var(--ink, #1d2230); }
.page form:has(textarea) > :is(button, .r5rev-actions),
.page form.r6fb-form > :is(button, .r5rev-actions),
[data-weekly-upload] .dux-drop-col > button[type="submit"],
[data-evt-upload] > button[type="submit"] { margin-top: 16px; }
.page form.r6fb-form { display: grid; gap: 12px; max-width: 720px; }
.page form.r6fb-form > label { display: grid; gap: 4px; min-width: 0; }
.page form.r6fb-form > label:has(> input[type="checkbox"]) { display: flex; align-items: center; gap: 8px; }
.page form.r6fb-form > label :is(select, input:not([type="checkbox"])) { width: 100%; max-width: 100%; box-sizing: border-box; }
.page form.r6fb-form > button { justify-self: start; }
.page :is([data-weekly-remove], [data-evt-remove]) {
  background: transparent; color: var(--muted, #5b6270); border: 1px solid transparent; font-weight: 400;
  text-decoration: underline; text-underline-offset: 3px; min-height: 0; padding: 4px 6px;
}
.page :is([data-weekly-remove], [data-evt-remove]):hover { color: var(--ink, #1d2230); }
.feas-inputs label:has(> [data-r5rev-kind]) { grid-column: 1 / -1; }
.feas-inputs [data-r5rev-kind] { width: auto; max-width: 100%; }
/* OV-FB01 (run 6, 26f): a failed automatic update reads in neutral colour, never as a red state */
.ovux-pill.ovux-pill-with_analyst { background: var(--paper); color: var(--muted); border: 1px solid var(--line); }
/* r6fb: run 6 feedback batch (ACC-FB01, EXP-FB01) */
/* ACC-FB01 (item 3): the rail is a full-height column whose items stay at the top of the content column on every
   page length; it no longer follows the scroll, so a full-page capture shows it where the reader sees it. The 760 px
   drawer is unchanged. */
@media (min-width: 761px) {
  .p5shell-layout .p5shell-nav, .p5shell-layout .p5shell-nav.pf-rail-sticky { position: static; align-self: stretch; height: auto; overflow: visible; }
  .p5shell-layout .p5shell-nav .pf-nav-body { min-height: calc(100dvh - 126px); }
}
.pf-home-grid.r6fb-team { grid-template-columns: minmax(0, 1fr); }
.pf-home-grid.r6fb-team > div:last-child { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.r6fb-role-help { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.r6fb-role-help li { margin-bottom: 4px; }
.r6fb-choices, .r6fb-summary, [data-expc-thread] dl.r6fb-summary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 8px 0 12px; }
.r6fb-choices > div, .r6fb-summary > div { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 12px; }
.r6fb-choices dt, .r6fb-summary dt { color: var(--muted); }
.r6fb-choices dd, .r6fb-summary dd { margin: 0; }
.r6fb-model-form select { max-width: 480px; }
/* EXP-FB01 (item 4): the power-check inputs in one column, each label above its field */
.feas-inputs.r6fb-feas { grid-template-columns: minmax(0, 1fr); }
.feas-inputs.r6fb-feas label { max-width: 360px; }
.exu-ask select[data-r6fb-question] { width: 100%; max-width: 100%; }
.exu-ask .r6fb-note { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.exu-ask .r6fb-note[hidden] { display: none; }
@media (max-width: 600px) {
  .r6fb-choices > div, .r6fb-summary > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* PLN-FB03 (ADR-482, Q3/Q4/Q6, U07): the optimizer's lead card; the save choice (a new plan by name, or a version
   of a plan by its name, the name field wide); ₸ and «60 млн ₸» under a budget field while it is typed in; a plans
   tile or card with nothing in it yet is an outline, so a saved plan does not look unfinished. */
.r6fb-opt-lead h2 { margin-bottom: 4px; }
.r6fb-save-choice { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; min-width: 0; }
.r6fb-save-option { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.r6fb-save-option:has(input:disabled) { color: var(--muted, #5b6270); font-weight: 400; }
.r6fb-save-detail { padding-left: 26px; min-width: 0; }
.r6fb-save-detail label { display: grid; gap: 4px; }
.r6fb-save-detail :is(input, select) { width: 100%; max-width: 560px; box-sizing: border-box; }
.plnsr-money .r6fb-money-unit { display: none; position: absolute; top: 0; right: 10px; align-items: center; pointer-events: none; font-weight: 600; color: var(--muted, #5b6270); }
.plnsr-money.r6fb-money-active .r6fb-money-unit { display: flex; }
.plnsr-money.r6fb-money-active > input { padding-right: 26px; }
.r6fb-money-echo { display: block; margin-top: 2px; font-size: 12px; color: var(--muted, #5b6270); text-align: right; white-space: nowrap; }
.r6fb-money-echo:empty { display: none; }
.pgf-tiles .stat.r6fb-empty, .card.r6fb-empty { background: transparent; border-style: dashed; box-shadow: none; }
.r6fb-empty .stat-label, .card.r6fb-empty h2 { color: var(--muted, #5b6270); }

/* DAT-FB01 (ADR-482, Q5, 26c): the template is the primary download; the calendar notes and the events file sit
   under «Дополнительно»; the save summary under the check; at phone width each event is one readable row. */
.dux-btn.r6fb-primary { background: var(--accent, #1f5fbf); border-color: var(--accent, #1f5fbf); color: #fff; }
.dux-btn.r6fb-primary:hover, .dux-btn.r6fb-primary:focus-visible { background: #174c99; }
.r6fb-extra { margin: 20px 0; }
.r6fb-extra > summary { font-size: 18px; }
.r6fb-save-summary { margin: 8px 0 0; padding-left: 20px; }
.r6fb-save-summary li { margin: 2px 0; }
.r6fb-replace-note { margin-left: 8px; }
@media (max-width: 600px) {
  .evt-list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .page .tblwrap > table.evt-list, .evt-list tbody { display: block; width: 100%; }
  .evt-list caption { display: block; text-align: left; }
  .evt-list tr { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--border, #dbe3eb); }
  .evt-list td { display: block; border: 0; padding: 1px 0; text-align: left; overflow-wrap: normal; word-break: normal; }
  .evt-list td:empty { display: none; }
  .evt-list td:nth-child(3) { order: -2; font-weight: 600; }
  .evt-list td:nth-child(2) { order: -1; }
  .evt-list td:nth-child(n+4) { color: var(--muted, #5b6270); }
}
/* r6fb: MMM-FB01, ADM-FB01, SCI-FB01 (run 6 feedback batch, ADR-482) */
/* MMM-FB01 (M05): one compact legend row per channel, one line on a wide screen, two at 390 */
.r6fb-legend li { flex-wrap: wrap; row-gap: 2px; }
.r6fb-legend-head, .r6fb-legend-tail { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.r6fb-legend [data-legend-central] { font-weight: 600; }
@media (max-width: 760px) {
  .r6fb-legend li { flex: 1 1 100%; }
  .r6fb-legend-tail { flex: 1 1 100%; padding-left: 16px; }
  .r6fb-legend-sep { display: none; }
}
/* ADM-FB01: the review page at 390 (long identifiers wrap, tables scroll in their own box) */
.r6fb-wrap h1, .r6fb-id, .stf-shell .card code { overflow-wrap: anywhere; }
.r6fb-review-summary .r6fb-adm-summary { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 8px 0 0; }
.r6fb-adm-summary dt { color: var(--muted); }
.r6fb-adm-summary dd { margin: 0; min-width: 0; }
.r6fb-served { padding: 10px 12px; border: 1px solid var(--pass); border-radius: 8px; background: var(--pass-bg); color: var(--ink, inherit); }
.r6fb-fixed { margin: 8px 0; }
/* ADM-FB01 (S05): the two comment buttons are the same size */
.r6fb-comment-actions > button { flex: 1 1 14rem; max-width: 22rem; }
/* ADM-FB01 (A01): a role button reads as a switch that changes at once */
.r6fb-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 2px 6px 2px 0; padding: 4px 12px 4px 6px; border-radius: 999px; cursor: pointer; font: inherit; }
.r6fb-toggle::before { content: ""; width: 26px; height: 14px; border-radius: 999px; background: var(--line); box-shadow: inset 0 0 0 2px var(--card); transition: background .15s; }
.r6fb-toggle[aria-pressed="true"]::before { background: var(--pass); box-shadow: inset 12px 0 0 2px var(--card); }
.r6fb-toggle[aria-pressed="false"]::before { box-shadow: inset -12px 0 0 2px var(--card); }
.r6fb-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.r6fb-role-result { margin: 0 0 8px; padding: 8px 12px; border-radius: 8px; background: var(--pass-bg); color: var(--pass); }
.r6fb-immediate { margin: 0 0 8px; }
/* ADM-FB01 (A03): the invoice form in two groups; the long fields take the row */
.r6fb-invoice { display: grid; gap: 12px; }
.r6fb-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 8px 12px; margin: 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 8px; }
.r6fb-group > legend { padding: 0 4px; font-weight: 600; }
.r6fb-group > label { display: grid; gap: 4px; min-width: 0; }
.r6fb-group > .r6fb-wide, .r6fb-group > p { grid-column: 1 / -1; margin: 0; }
.r6fb-group textarea { width: 100%; box-sizing: border-box; }
.r6fb-optional { color: var(--muted); font-weight: 400; }
.r6fb-invoice > button { justify-self: start; }
@media (max-width: 760px) { .r6fb-invoice > button { justify-self: stretch; } }
/* ACC-PRC01 / PUB-PRC01 / ADM-PRC01 (ADR-485): the four offers on /pricing, the «Старт» step before a first
   package, and its block on the staff company card */
.p5shell-cards.prc26-offers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.prc26-offers .card { display: flex; flex-direction: column; gap: 8px; }
.prc26-offers .card p { margin: 0; }
.prc26-offers .card .btn { align-self: flex-start; margin-top: auto; }
.prc26-tag { display: inline-block; align-self: flex-start; padding: 2px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.prc26-setup { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 12px 0; }
.prc26-setup h3, .prc26-step { margin: 0 0 6px; font-size: 16px; }
.prc26-setup p { margin: 4px 0; }
.prc26-setup form { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 8px; }
.prc26-step { margin-top: 16px; }
@media (max-width: 1100px) { .p5shell-cards.prc26-offers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .p5shell-cards.prc26-offers { grid-template-columns: 1fr; }
  .prc26-setup form { flex-direction: column; align-items: stretch; }
}

/* r7fx: run 7 review client fixes. OV-R701 (C18): the Overview reads in the page font, as every other page */
.p5overview h1 { font-family: inherit; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: normal; }
.p5overview h2 { font-family: inherit; font-size: 20px; font-weight: 600; }
.p5overview-value { font-family: inherit; font-weight: 600; }
@media (max-width: 760px) { .p5overview h1 { font-size: 24px; } }
/* PLN-R701 (C12): the «Другой вариант» card keeps no empty grid when the recommendation is unavailable */
.plnctl-rec-grid[hidden], .plnctl-rec [data-plnctl-rec-more][hidden] { display: none; }
/* PLN-R701 (Q17): at phone width each channel's amount, bounds and fixation stay together in one block */
@media (max-width: 760px) {
  .page .tblwrap > #opt-bounds, .page .w4p3-opt-bounds tbody, .page .w4p3-opt-bounds td { display: block; width: 100%; min-width: 0; }
  .page .w4p3-opt-bounds thead { display: none; }
  .page .w4p3-opt-bounds tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .page .w4p3-opt-bounds td { border: 0; padding: 0; }
  .page .w4p3-opt-bounds td:first-child { grid-column: 1 / -1; font-weight: 600; }
  .page .w4p3-opt-bounds td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .page .w4p3-opt-bounds input[type="text"] { max-width: none; }
}
/* r7fx: ACC-R701, DAT-R701, EXP-R701 (ADR-488, run 7 review, 2026-10-27) */
/* ACC-R701 (C8): «Нет в пакете» always on its own line under the rail item, at every width */
.platform-rail a.w3p3-nav-locked > .w3p3-status-locked { flex-basis: 100%; width: max-content; max-width: max-content; margin-left: 0; }
.r7fx-paid-cell { display: block; font-size: 13px; }
.r7fx-feas-first { margin: 0 0 8px; font-weight: 600; }
.r7fx-upload-closed { margin: 0 0 12px; font-weight: 600; }
#r7fx-feas-spend-example { display: block; font-size: 12px; color: var(--muted); }

/* r7fx_md: MMM-R702 «Детали модели» on the MMM page */
.r7fx-md { font-size: 14px; flex-basis: 100%; }
.r7fx-md-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 20px; margin: 8px 0; }
.r7fx-md-list div { min-width: 0; }
.r7fx-md-list dt { font-size: 12px; color: var(--muted); }
.r7fx-md-list dd { margin: 0; overflow-wrap: anywhere; }
.r7fx-md-rename { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.r7fx-md-rename input { max-width: 280px; }
@media (max-width: 760px) {
  .r7fx-md-list { grid-template-columns: 1fr; }
  .r7fx-md-rename input { max-width: none; width: 100%; }
}
/* ADM-R701 (ADR-488 decision 2): the «План измерения» form on the MMM route page (r7fx_) */
.r7fx-mpf fieldset > .sub, .r7fx-mpf fieldset > .r7fx-mpf-err, .r7fx-mpf .r7fx-mpf-pair { grid-column: 1 / -1; }
.r7fx-mpf .r7fx-mpf-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.r7fx-mpf .r7fx-mpf-pair > .r7fx-mpf-err { grid-column: 1 / -1; }
.r7fx-mpf textarea, .r7fx-mpf input, .r7fx-mpf select { width: 100%; box-sizing: border-box; }
.r7fx-mpf .r7fx-mpf-err { color: var(--danger, #a1261c); margin: 0; font-size: 0.9em; }
.r7fx-mpf [aria-invalid="true"] { border-color: var(--danger, #a1261c); }
.r7fx-mpf fieldset > label:has(textarea[name="estimand"]), .r7fx-mpf fieldset > label:has(textarea[name="analysis"]),
.r7fx-mpf fieldset > label:has(textarea[name="downside_policy"]) { grid-column: 1 / -1; }
.r7fx-mpf [hidden] { display: none !important; }
/* ADM-R701 (C17, Q17): short hashes stay on one line; at 390 the review summary stacks label over value */
code.r7fx-hash { white-space: nowrap; }
@media (max-width: 600px) {
  .r6fb-review-summary .r6fb-adm-summary { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .r6fb-review-summary .r6fb-adm-summary dd { margin-bottom: 8px; }
}
/* ADM-R701 (C11): stepper labels wrap between words, never inside one; narrow screens get fewer columns */
.ejr-steps { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.ejr-step { overflow-wrap: normal; word-break: normal; hyphens: manual; }
@media (max-width: 600px) { .ejr-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* r8fx: run 8 client copy fixes (ACC-R801, EXP-R801, PUB-R801; ADR-489, 2026-10-27) */
/* ACC-R801 (finding 4, C8): the label takes the whole first line, so «Нет в пакете» sits below every rail item, MMM included */
.platform-rail a.w3p3-nav-locked > span { flex-basis: 100%; }
/* r8fx: run 8 models and plans. PLN-R801 (finding 18, as C18): the header model chip reads in the page font */
.header-chip[data-shell-chip="model"] { font-family: inherit; }
/* r9fx: run 9 client page fixes (findings 1, 3, 9, 10, 11, 13; 2026-10-27) */
/* finding 10: numbers in client tables read in the page font with tabular digits; staff pages keep theirs */
body:not(.stf-shell) td.num, body:not(.stf-shell) th.num { font-family: inherit; font-variant-numeric: tabular-nums; }
/* finding 11: the sign-up link sits below the button at every width */
.r9fx-signup { margin: 12px 0 0; }
/* r10fx_st: run 10 staff page fixes (finding 4; 2026-10-28): a readiness check left unset reads «не указано» */
.chip-not_specified { background: var(--paper); color: var(--muted); border: 1px solid var(--line); }

/* sim29 — ADR-492 simpler processes (ACC-SIM01 brief owner, RPT-SIM01 downloads) */
.sim29-more { margin: 4px 0 8px; }
.sim29-more > summary { cursor: pointer; color: var(--muted); }
.sim29-downloads { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
@media (max-width: 760px) {
  .sim29-downloads > button { flex: 1 1 100%; }
}
/* sim29: staff process simplification (SCI-SIM01, ADM-SIM01, ADR-492, 2026-10-29) */
.sim29-show .sim29-more { margin-top: 12px; }
.sim29-show .sim29-more label { display: block; margin: 8px 0; }
.sim29-show .sim29-more textarea { width: 100%; max-width: 40rem; box-sizing: border-box; }
.sim29-pay .stf10-form label { display: block; }
/* grp29: the three experiment groups on the client result page (EXP-GRP01, ADR-493, 2026-10-29) */
.grp29-group { margin: -14px 0 4px; font-weight: 600; }
.grp29-no-model { margin: 0 0 18px; color: var(--muted); }
/* grp29: experiment groups on staff pages (SCI-GRP01, ADR-493, 2026-10-29) */
.grp29-line { margin: 4px 0 8px; }

/* PLN-DATE01 (ADR-493): the plan start date beside the horizon */
.date29-start { display: block; margin: 12px 0; }
.date29-start input { display: block; margin-top: 4px; }

/* r13fx: run 13 client fixes (R1301, 2026-10-29) */
.r13fx-opt-start .date29-start { margin: 0; }
.r13fx-code .target-form { align-items: flex-end; }
/* R14SR: run 14 simplicity review (client) */
.r14sr-receipt { white-space: pre-line; }
@media (min-width: 1101px) {
  .r14sr-plan-grid > .r14sr-plan-inputs { grid-column: 1; grid-row: 1; }
  .r14sr-plan-grid > #plan-result-card { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
  .r14sr-plan-grid > .r14sr-save { grid-column: 1; grid-row: 2; }
}
.r14sr-plan-grid > .r14sr-save { margin-top: 0; }
.auth-card .btn-secondary, .r14sr-code .btn-secondary { background: var(--card); color: var(--accent); border-color: var(--accent); }
.r14sr-downloads-secondary .dux-btn.r6fb-primary { background: var(--card); color: var(--accent); border-color: var(--accent); }
.r14sr-links a { white-space: nowrap; }
#opt-reset.btn-secondary { background: var(--card); color: var(--accent); border-color: var(--accent); }
.r14sr-rec > summary { cursor: pointer; }
.r14sr-rec > summary h2 { display: inline; margin: 0; }
.r14sr-ask > summary, .r14sr-create > summary, .r14sr-filters > summary { cursor: pointer; color: var(--accent); font-weight: 600; margin: 8px 0; }
.sim29-downloads .btn-secondary { background: var(--card); color: var(--accent); border-color: var(--accent); }
.r14sr-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
/* r16fx: run 16 client fixes. Ruling 3: the scenario budget table fits a phone; each channel is one block (name,
   then «Исходно» / «План» and «Доля» / «Изменение» under their own labels). Ruling 2: client pages show no
   «Таблица прокручивается в сторону.» line; a wide table keeps only its edge shadow. */
@media (max-width: 640px) {
  .page table.r16fx-alloc, .page table.r16fx-alloc tbody, .page table.r16fx-alloc tfoot { display: block; width: 100%; }
  .page table.r16fx-alloc thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .page table.r16fx-alloc tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .page table.r16fx-alloc tr > :first-child { grid-column: 1 / -1; font-weight: 600; padding: 0 0 4px; border: 0; }
  .page table.r16fx-alloc td, .page table.r16fx-alloc tfoot th, .page table.r16fx-alloc tfoot td.num { padding: 2px 0; border: 0; text-align: left; white-space: normal; }
  .page table.r16fx-alloc td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  .page table.r16fx-alloc input.spend-input { width: 100%; max-width: 10em; }
  .page table.r16fx-alloc tfoot tr { border-bottom: 0; }
}
body.p5shell:not(.stf-shell) .page .tblwrap[data-scroll-cue]::before { content: none; }
/* r17fx: run 17 client fixes — ruling 1, the preliminary model's reasons inside «Детали модели» */
.r17fx-md-why { margin: 4px 0 8px; color: var(--muted); font-size: 13px; }
.r17fx-md-why p { margin: 0 0 4px; overflow-wrap: anywhere; }
/* r18fx: run 18 staff fixes — ruling 3, one row per local data copy */
.r18fx-copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.r18fx-copy-row form { display: flex; align-items: center; gap: 8px; margin: 0; }
.r18fx-copy-row form p[role="status"]:empty { display: none; }
/* r19fx F4 (run 19): «Как работает эксперимент» sits on the same line as its arrow */
.r14sr-teaching > summary h2 { display: inline; margin: 0; }
/* r22fx (rehearsal review, Zhangir 2026-11-02 16:17): every text field is one short height, and a label that holds
   its field sits above it with room between the text and the box and room after the box. Form-specific layouts
   keep their own label rules (the stacking default below has no specificity). */
:is(.p5controls .page, .auth-card)
  :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="file"]), select) {
  min-height: 36px; padding-top: 6px; padding-bottom: 6px; line-height: 1.4;
}
:where(.p5controls .page, .auth-card) form label:where(:has(> :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea))) {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0 0 14px;
}
.auth-card label > :is(input, select) { margin-top: 6px; }
.auth-card form ~ form { margin-top: 16px; }
