/* ============================================================
   DocuProof app styling — v9 design (MemberPress design system)
   Component + button classes rebuilt from the design handoff.
   Tokens come from colors_and_type.css (loaded first). No CDNs.
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--mp-font-sans);
  color: var(--mp-ink-3);
  background: var(--mp-surface-soft);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--mp-navy); text-decoration: none; }
a:hover { color: var(--mp-navy); text-decoration: underline; }
img { max-width: 100%; }

/* ---------- App shell ---------- */

.brand-word { font-size: 20px; font-weight: 700; color: var(--mp-navy); letter-spacing: -0.01em; }
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mp-teal); position: relative; top: 1px; }

.content { flex: 1; min-width: 0; padding: 32px 40px 64px; }
.content-narrow { max-width: 860px; margin: 0 auto; }

/* ---------- Headings still used by the lab, the shot editor, the Engine room and the error page ---------- */
.page-h1 { font-size: 26px; font-weight: 700; color: var(--mp-ink-1); margin: 0; font-family: var(--mp-font-sans); letter-spacing: 0; }
.section-label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--mp-ink-muted); text-transform: uppercase; }
.section-label.navy { color: var(--mp-navy); letter-spacing: 0.08em; }
.header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.meta-line { font-size: 12.5px; color: var(--mp-ink-muted); }

/* ---------- Messages ---------- */
.messages { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.msg { padding: 10px 14px; border-radius: 8px; font-size: 13px; border: 1px solid var(--mp-border); background: #fff; }
.msg.success { background: rgba(3,171,163,0.08); border-color: rgba(3,171,163,0.4); color: var(--mp-ink-1); }
.msg.error { background: rgba(216,75,60,0.06); border-color: rgba(216,75,60,0.4); color: var(--mp-ink-1); }

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 100px;
  padding: 3px 10px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; }
.pill.needs { background: rgba(244,123,13,0.12); color: var(--mp-red); }
.pill.needs .dot { background: var(--mp-orange); }
.pill.working { background: rgba(3,171,163,0.1); color: var(--mp-teal-dark); }
.pill.working .dot { background: var(--mp-teal); }
.pill.blocked { background: rgba(216,75,60,0.1); color: #D84B3C; }
.pill.blocked .dot { background: #D84B3C; }
.pill.queued { background: var(--mp-surface-2); color: var(--mp-ink-muted); }
.pill.queued .dot { background: var(--mp-ink-muted); }
.pill.gate { letter-spacing: 0.08em; padding: 5px 12px; }
.pill.gate.g1 { background: rgba(244,123,13,0.12); color: var(--mp-red); }
.pill.gate.g2 { background: rgba(244,123,13,0.12); color: var(--mp-red); }

/* ---------- The card pattern ---------- */
.card {
  background: #fff; border-radius: 10px; border: 1px solid var(--mp-border);
  padding: 18px 20px; display: flex; flex-direction: column;
}
.card.needs-you { border-color: rgba(244,123,13,0.5); }
.card.blocked-card { border-color: rgba(216,75,60,0.5); }
a.card, .card.clickable { cursor: pointer; transition: border-color var(--mp-dur) var(--mp-ease), box-shadow var(--mp-dur) var(--mp-ease); text-decoration: none; color: inherit; }
a.card:hover, .card.clickable:hover { border-color: var(--mp-navy); box-shadow: 0 2px 8px rgba(6,66,158,0.08); text-decoration: none; }

.stepbar { height: 4px; border-radius: 100px; background: var(--mp-surface-2); }
.stepbar > span { display: block; height: 100%; border-radius: 100px; }
.stepbar > span.orange { background: var(--mp-orange); }
.stepbar > span.navy { background: var(--mp-navy); }

.step-line { font-size: 12px; color: var(--mp-ink-muted); }

/* The page is one centred column wide enough for the two-column board; what is
   read rather than sorted stays at document width on the same centre line. */

.field { width: 100%; box-sizing: border-box; border: 1px solid var(--mp-border); border-radius: 4px; padding: 8px 12px; font-family: var(--mp-font-sans); font-size: 13px; color: var(--mp-ink-1); }
.field:focus { outline: none; border-color: var(--mp-navy); box-shadow: var(--mp-ring-focus); }

/* The clarifying context is ONE line: it ends in an ellipsis rather than
   wrapping, and the whole of it stays behind the link on the right. */

.q-why-text { flex: 1; min-width: 0; color: var(--mp-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Gate 1: the board, two columns side by side ----------
   Before launch on the left, After launch on the right, one white list card
   each. Items cross by drag or by their move pill; a whole package crosses by
   the one action on its label. The columns are grid cells so both stretch to
   the taller one — that is what keeps the short column's sticky heading on
   screen all the way down a long plan, so there is always a drop target. */
.board { margin-bottom: 8px; }

/* ---------- Gate 1: the type palette ----------
   One fixed colour per kind of work, used everywhere the app shows a plan item:
   the pill on the row, the dots on a closed group, the bar under a column
   heading, the legend. Writing is the brand navy, fixing is the teal family
   (teal for one article, cyan for a bundle), a sweep is the deep ink, a
   deprecation is a red-brown kept well away from the status red, groundwork is
   a warm gray. Status stays its own family (orange = your call, red = blocked)
   and never shares a colour with a type. The glyph and the label carry the
   type where hue alone would not (colour-vision deficiencies, print). */
:root {
  --type-new: #06429E;         --type-new-tint: rgba(6,66,158,0.10);
  --type-update: #03ABA3;      --type-update-tint: rgba(3,171,163,0.12);
  --type-corrections: #0282C9; --type-corrections-tint: rgba(2,130,201,0.11);
  --type-sweep: #091D2E;       --type-sweep-tint: rgba(9,29,46,0.08);
  --type-deprecation: #8A3B2B; --type-deprecation-tint: rgba(138,59,43,0.10);
  --type-groundwork: #857E76;  --type-groundwork-tint: rgba(133,126,118,0.14);
  --type-other: #9DA5AB;       --type-other-tint: rgba(157,165,171,0.14);
}
.t-new { --type: var(--type-new); --type-tint: var(--type-new-tint); }
.t-update { --type: var(--type-update); --type-tint: var(--type-update-tint); }
.t-corrections { --type: var(--type-corrections); --type-tint: var(--type-corrections-tint); }
.t-sweep { --type: var(--type-sweep); --type-tint: var(--type-sweep-tint); }
.t-deprecation { --type: var(--type-deprecation); --type-tint: var(--type-deprecation-tint); }
.t-groundwork { --type: var(--type-groundwork); --type-tint: var(--type-groundwork-tint); }
.t-other { --type: var(--type-other); --type-tint: var(--type-other-tint); }

/* The pill: glyph, label, and a quieter detail in the same capsule. The same
   size on a closed row, an open row and in the legend. */
.type-pill {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  border-radius: 100px; padding: 3px 9px 3px 8px; line-height: 1.4;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap;
  color: var(--type); background: var(--type-tint);
  font-family: var(--mp-font-sans); font-variant-numeric: tabular-nums;
}
.type-detail { font-weight: 600; opacity: 0.78; margin-left: 2px; }
/* One geometric glyph per type, drawn in CSS: square, circle, diamond, three
   lines, a bar, a triangle. Never an emoji. */
.type-glyph { flex-shrink: 0; width: 8px; height: 8px; background: var(--type); border-radius: 1px; }
.t-update .type-glyph { border-radius: 50%; }
.t-corrections .type-glyph { transform: rotate(45deg) scale(0.86); }
.t-sweep .type-glyph { height: 9px; background: repeating-linear-gradient(to bottom, var(--type) 0 2px, transparent 2px 3.5px); border-radius: 0; }
.t-deprecation .type-glyph { height: 2.5px; border-radius: 2px; }
.t-groundwork .type-glyph { clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; }
.t-other .type-glyph { border-radius: 50%; background: none; box-shadow: inset 0 0 0 1.5px var(--type); }

/* The legend strip above the board: the plan's shape in one line. Each pill
   is a button that filters; pressed, it fills solid. */

.type-pill.legend {
  cursor: pointer; border: 1px solid transparent; padding: 4px 11px 4px 9px; font-size: 11.5px;
  transition: background var(--mp-dur-fast) var(--mp-ease), color var(--mp-dur-fast) var(--mp-ease), opacity var(--mp-dur-fast) var(--mp-ease), border-color var(--mp-dur-fast) var(--mp-ease);
}
.type-pill.legend .type-n { font-size: 12.5px; }
.type-pill.legend:hover { border-color: var(--type); }
.type-pill.legend:focus-visible { outline: 2px solid var(--mp-navy); outline-offset: 2px; }
.type-pill.legend[aria-pressed="true"] { background: var(--type); color: #fff; border-color: var(--type); }
.type-pill.legend[aria-pressed="true"] .type-glyph { background: #fff; }
.type-pill.legend[aria-pressed="true"].t-sweep .type-glyph { background: repeating-linear-gradient(to bottom, #fff 0 2px, transparent 2px 3.5px); }
.type-pill.legend[aria-pressed="true"].t-other .type-glyph { background: none; box-shadow: inset 0 0 0 1.5px #fff; }
.board.is-filtered .type-pill.legend[aria-pressed="false"] { opacity: 0.5; }
.board.is-filtered .type-pill.legend[aria-pressed="false"]:hover { opacity: 1; }

/* Filtered: rows of another type step back, groups holding none step back with
   them, and the type in question keeps its full weight. Quiet, and undone
   with one click. */
.board.is-filtered .plan-row:not(.type-hit) { opacity: 0.28; }
.board.is-filtered .pkg-group:not(.type-hit) > .pkg-head { opacity: 0.4; }
.board.is-filtered .pkg-group.type-hit .type-dot:not(.type-hit) { opacity: 0.25; }
.board.is-filtered .mix-seg:not(.type-hit) { opacity: 0.22; }

/* The second line: the column's shape as a slim bar and a line of counts. */

.board.is-dragging .phase-col:not(.source) .phase-mix { visibility: hidden; }

/* The heading says "drop here" only while something is in the air, and only on
   the column that would take it. */

.board.is-dragging .phase-col:not(.source) .phase-drop { display: inline-block; }
.board.is-dragging .phase-col:not(.source) .phase-note { display: none; }

/* Opening is fast and flat: the items fade in over one beat, closing is instant. */

@keyframes unfold {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: none; }
}
/* A group that just received a dragged item says so once, even closed: the
   header glows navy for a moment while its summary line changes. */

@keyframes received {
  0%, 35% { background: rgba(6,66,158,0.09); }
  100% { background: transparent; }
}
/* While something is in the air, the group under the pointer says it will take
   it, the way the column heading does. */
.board.is-dragging .pkg-group.drop-over > .pkg-head { background: rgba(6,66,158,0.06); box-shadow: inset 0 0 0 1px var(--mp-navy); border-radius: 6px; }
/* One quiet control per column to open or close every group at once. */

.board.is-dragging .phase-col:not(.source) .phase-toggle { display: none; }

/* A move the server refused: the row comes back and says so, once. */

@keyframes snapback {
  0%, 60% { background: rgba(216,75,60,0.09); }
  100% { background: transparent; }
}

/* A rule id or item id left standing in the prose: linked, not louder. */
.brief-tok { color: var(--mp-navy); font-weight: 600; text-decoration: none; border-bottom: 1px dotted rgba(6,66,158,0.4); }
.brief-tok:hover { text-decoration: none; border-bottom-color: var(--mp-navy); }
/* Status lines: one each, quiet, tinted by what they say. */

.decision-bar { position: sticky; bottom: 16px; margin-top: 28px; background: #fff; border: 1px solid var(--mp-border); border-radius: 10px; box-shadow: var(--mp-shadow-lifted); padding: 16px 20px; }

.textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--mp-border); border-radius: 5px; padding: 10px 12px; font-family: var(--mp-font-sans); font-size: 13px; color: var(--mp-ink-1); min-height: 56px; resize: vertical; margin-bottom: 8px; }
.textarea:focus { outline: none; border-color: var(--mp-navy); box-shadow: var(--mp-ring-focus); }

.standing-note { font-size: 12.5px; color: var(--mp-ink-muted); margin-top: 10px; }

/* ---------- Gate 2 ---------- */
.g2-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; gap: 16px; }
.g2-head-left { display: flex; align-items: center; gap: 12px; }
.g2-actions { display: flex; gap: 10px; flex-shrink: 0; }

.g2-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.article-surface { background: #fff; border: 1px solid var(--mp-border); border-radius: 10px; padding: 0; overflow: hidden; }
.article-frame { width: 100%; height: 78vh; border: 0; background: #fff; display: block; }
.article-draft { padding: 32px 36px; }
.article-draft pre { white-space: pre-wrap; word-break: break-word; font-family: var(--mp-font-mono); font-size: 12.5px; color: var(--mp-ink-2); margin: 0; }
.g2-rail { display: flex; flex-direction: column; gap: 20px; }
.rail-card { background: #fff; border: 1px solid var(--mp-border); border-radius: 10px; padding: 20px 22px; }
.rail-label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--mp-ink-muted); margin-bottom: 12px; text-transform: uppercase; }
.rail-label.navy { color: var(--mp-navy); }

.toggle { display: flex; border: 1px solid var(--mp-border); border-radius: 100px; padding: 3px; margin-bottom: 12px; font-size: 12.5px; font-weight: 700; }
.toggle span { flex: 1; text-align: center; padding: 6px 0; border-radius: 100px; color: var(--mp-ink-muted); cursor: pointer; }
.toggle span.active { background: var(--mp-navy); color: #fff; }

.shot-img { border: 1px solid var(--mp-border); border-radius: 8px; margin: 8px 0; }

/* ---------- History ---------- */

.chip { background: rgba(6,66,158,0.06); color: var(--mp-navy); font-size: 11px; font-weight: 700; border-radius: 100px; padding: 4px 11px; white-space: nowrap; }

/* brain doc + request types (kept, restyled lightly) */
.doc-body { background: #fff; border: 1px solid var(--mp-border); border-radius: 10px; padding: 24px 28px; }
.doc-body pre { white-space: pre-wrap; word-break: break-word; font-family: var(--mp-font-mono); font-size: 13px; color: var(--mp-ink-2); margin: 0; line-height: 1.6; }

/* ---------- New Project modal ---------- */

.tile { border-radius: 8px; padding: 12px 14px; cursor: pointer; border: 1px solid var(--mp-border); font-size: 14px; font-weight: 700; color: var(--mp-ink-1); background: #fff; text-align: left; font-family: var(--mp-font-sans); }
.tile.selected { border-color: var(--mp-navy); box-shadow: 0 0 0 3px rgba(6,66,158,0.08); background: rgba(6,66,158,0.03); }

/* ---------- Buttons (rebuilt from DS bundle) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mp-font-sans); font-weight: 700; font-size: 13.5px; line-height: 1;
  border-radius: 100px; padding: 0 18px; height: 36px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform var(--mp-dur-fast) var(--mp-ease), box-shadow var(--mp-dur-fast) var(--mp-ease), background var(--mp-dur-fast) var(--mp-ease), border-color var(--mp-dur-fast) var(--mp-ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: none; }
.btn.large { height: 44px; padding: 0 24px; font-size: 15px; }
.btn:disabled, .btn.disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--mp-cta-gradient); color: #fff; box-shadow: 0 2px 8px rgba(207,50,0,0.18); }
.btn-primary:hover { background: var(--mp-cta-gradient-hover); color: #fff; transform: translateY(-2px); box-shadow: var(--mp-shadow-cta); }
.btn-blue { background: var(--mp-blue-gradient); color: #fff; box-shadow: 0 2px 8px rgba(6,66,158,0.18); }
.btn-blue:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--mp-shadow-blue); }
.btn-secondary { background: #fff; color: var(--mp-navy); border-color: var(--mp-border); }
.btn-secondary:hover { color: var(--mp-navy); border-color: var(--mp-navy); }
.btn-red { background: var(--mp-red); color: #fff; }
.btn-red:hover { color: #fff; background: #B52A00; transform: translateY(-2px); }
.btn-red-outline { background: #fff; color: #D84B3C; border-color: rgba(216,75,60,0.6); }
.btn-red-outline:hover { color: #fff; background: #D84B3C; border-color: #D84B3C; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--mp-surface-soft); padding: 20px; }
.login-card { width: 380px; max-width: 100%; background: #fff; border: 1px solid var(--mp-border); border-radius: 10px; box-shadow: var(--mp-shadow-lifted); padding: 32px 32px 28px; }
.login-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.login-card h1 { font-size: 22px; font-weight: 700; color: var(--mp-ink-1); margin: 0 0 20px; }
.login-card form p { margin: 0 0 14px; }
.login-card label { display: block; font-size: 12.5px; font-weight: 700; color: var(--mp-ink-2); margin-bottom: 4px; }
.login-card input[type=text], .login-card input[type=email], .login-card input[type=password] {
  width: 100%; box-sizing: border-box; border: 1px solid var(--mp-border); border-radius: 5px;
  padding: 9px 12px; font-family: var(--mp-font-sans); font-size: 14px; color: var(--mp-ink-1);
}
.login-card input:focus { outline: none; border-color: var(--mp-navy); box-shadow: var(--mp-ring-focus); }
.login-note { font-size: 12px; color: var(--mp-ink-muted); margin-top: 16px; }
.login-card .errorlist { list-style: none; padding: 0; margin: 0 0 12px; color: #D84B3C; font-size: 12.5px; }

/* ---------- Journey (under the hood) + shared evidence ---------- */

.journey-stop { background: #fff; border: 1px solid var(--mp-border); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; }
.stop-title { font-size: 14.5px; font-weight: 700; color: var(--mp-ink-1); margin: 0 0 4px; }
.stop-summary { font-size: 13px; color: var(--mp-ink-3); margin: 0 0 4px; }
.journey-stop details { margin-top: 8px; }
.journey-stop summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--mp-navy); }
.evidence { margin-top: 8px; padding: 12px 14px; background: var(--mp-surface-soft); border: 1px solid var(--mp-border); border-radius: 8px; overflow-x: auto; }
.evidence pre { white-space: pre-wrap; word-break: break-word; margin: 0; font-family: var(--mp-font-mono); font-size: 12px; color: var(--mp-ink-2); }
.evidence p { margin: 6px 0; font-size: 12.5px; }
.evidence ul { margin: 6px 0; padding-left: 18px; font-size: 12.5px; }
.notep { color: var(--mp-ink-muted); font-size: 12.5px; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 100px; font-size: 11px; font-weight: 700; border: 1px solid var(--mp-border); background: #fff; color: var(--mp-ink-3); }
.badge.ok, .badge.confirmed, .badge.captured, .badge.approved { border-color: rgba(3,171,163,0.4); color: var(--mp-teal-dark); background: rgba(3,171,163,0.08); }
.badge.blocked, .badge.failed, .badge.rejected, .badge.contradicted { border-color: rgba(216,75,60,0.4); color: #D84B3C; background: rgba(216,75,60,0.06); }
.badge.pending, .badge.open, .badge.unknown { border-color: rgba(244,123,13,0.4); color: var(--mp-red); background: rgba(244,123,13,0.1); }
code { font-family: var(--mp-font-mono); font-size: 0.92em; background: var(--mp-surface-2); border-radius: 4px; padding: 1px 6px; color: var(--mp-ink-2); }

/* step-bar fill widths (avoids inline styles under CSP) */
.w0 { width: 0; } .w10 { width: 10%; } .w20 { width: 20%; } .w30 { width: 30%; }
.w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; }
.w80 { width: 80%; } .w90 { width: 90%; } .w100 { width: 100%; }

/* small helpers */
.flag { color: #D84B3C; }
.muted { color: var(--mp-ink-muted); }

/* ---------- Live progress (run detail) ----------
   One quiet row per step: status colour, name, and a short phrase only when it
   adds something. Opening a step shows three things at most — what it does,
   where this run stands, and the honest problems. Everything else is one more
   click away, under the hood. */
.live-panel { background: #fff; border: 1px solid var(--mp-border); border-radius: 10px; padding: 18px 20px; margin: 0 0 24px; }

@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.steps { list-style: none; margin: 0; padding: 0; }
.step-row { list-style: none; }
.step { border-radius: 8px; font-size: 13.5px; }
.step-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  cursor: pointer; list-style: none; border-radius: 8px;
  transition: background var(--mp-dur-fast) var(--mp-ease);
}
.step-head::-webkit-details-marker { display: none; }
.step-head::after {
  content: "›"; color: var(--mp-ink-disabled); font-size: 15px; line-height: 1;
  transition: transform var(--mp-dur-fast) var(--mp-ease);
}
.step[open] > .step-head::after { transform: rotate(90deg); }
.step-head:hover { background: rgba(6,66,158,0.04); }
.step-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mp-border); flex-shrink: 0; }
.step-num { font-size: 12px; color: var(--mp-ink-disabled); width: 15px; font-variant-numeric: tabular-nums; }
.step-name { color: var(--mp-ink-muted); }
.step-state { margin-left: auto; font-size: 12.5px; color: var(--mp-ink-muted); }
.step-done .step-dot { background: var(--mp-teal); }
.step-done .step-name { color: var(--mp-ink-2); }
.step-running .step-dot { background: var(--mp-navy); animation: pulse 1.4s var(--mp-ease) infinite; }
.step-running .step-name { color: var(--mp-navy); font-weight: 700; }
.step-running .step-state { color: var(--mp-navy); font-weight: 700; }
.step-waiting .step-dot { background: var(--mp-orange); }
.step-waiting .step-name { color: var(--mp-red); font-weight: 700; }
.step-waiting .step-state { color: var(--mp-red); font-weight: 700; }
.step-blocked .step-dot, .step-rejected .step-dot, .step-stopped .step-dot { background: #D84B3C; }
.step-blocked .step-name, .step-rejected .step-name, .step-stopped .step-name { color: #D84B3C; font-weight: 700; }
.step-blocked .step-state, .step-rejected .step-state, .step-stopped .step-state { color: #D84B3C; font-weight: 700; }

/* Expanded step — three lines at most, then the hood link. */
.step-detail { padding: 4px 34px 18px 34px; }
.step-what { margin: 0 0 8px; font-size: 13px; line-height: 1.6; color: var(--mp-ink-muted); max-width: 74ch; }
.step-now { margin: 0; font-size: 14px; line-height: 1.6; color: var(--mp-ink-1); max-width: 74ch; }
.step-problems { margin-top: 10px; }
.step-problem {
  margin: 0 0 4px; font-size: 12.5px; line-height: 1.5; color: #D84B3C; max-width: 820px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.step-problem-more { margin: 0; font-size: 12.5px; color: var(--mp-ink-muted); }

/* Under the hood — the full record, on demand only. */
.hood { margin-top: 12px; }
.hood > summary {
  cursor: pointer; font-size: 12.5px; color: var(--mp-ink-muted);
  list-style: none; display: inline-block;
}
.hood > summary::-webkit-details-marker { display: none; }
.hood > summary::before { content: "›  "; }
.hood[open] > summary::before { content: "⌄  "; }
.hood > summary:hover { color: var(--mp-navy); }
.hood-body { margin-top: 10px; padding: 12px 16px; background: var(--mp-surface-soft); border: 1px solid var(--mp-border); border-radius: 8px; max-width: 940px; }
.hood-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mp-ink-muted); margin: 0 0 6px; }
.hood-label + * + .hood-label, .hood-facts + .hood-label { margin-top: 14px; }
.hood-list { margin: 0; padding-left: 16px; }
.hood-list li { font-size: 12.5px; line-height: 1.55; color: var(--mp-ink-3); margin-bottom: 3px; }
.hood-fact { font-size: 12.5px; line-height: 1.5; color: var(--mp-ink-3); margin-bottom: 3px; word-break: break-word; }
.hood-fact.muted { color: var(--mp-ink-muted); }
.hood-flag { font-size: 12.5px; line-height: 1.5; color: #D84B3C; margin-bottom: 3px; word-break: break-word; }
.hood-flags { margin-top: 8px; }
.hood-meta { margin-top: 12px; font-size: 11.5px; color: var(--mp-ink-muted); font-variant-numeric: tabular-nums; }
/* The engine's notes for the whole run: what needs a human (red, open) and
   what the engine corrected itself (gray, collapsed). One plain line each; the
   engine's own words sit behind a per-line disclosure for the operator. */
.live-notes { margin-top: 14px; border-top: 1px solid var(--mp-surface-2); padding-top: 12px; }
.notes-head { margin: 0; font-size: 12.5px; font-weight: 700; color: #D84B3C; }
.notes-head::before { content: "■  "; }
.notes-attention + .notes-corrected { margin-top: 12px; }
.notes-corrected > summary {
  cursor: pointer; font-size: 12.5px; color: var(--mp-ink-muted);
  list-style: none; display: inline-block;
}
.notes-corrected > summary::-webkit-details-marker { display: none; }
.notes-corrected > summary::before { content: "›  "; }
.notes-corrected[open] > summary::before { content: "⌄  "; }
.notes-corrected > summary:hover { color: var(--mp-navy); }
.notes-body { margin-top: 6px; }
.notes-more { margin: 2px 0 0; font-size: 12.5px; color: var(--mp-ink-muted); }
.note { font-size: 12.5px; line-height: 1.5; margin-bottom: 4px; word-break: break-word; max-width: 940px; }
.note-unresolved { color: #D84B3C; }
.note-self_corrected { color: var(--mp-ink-muted); }
.note > summary { cursor: pointer; list-style: none; }
.note > summary::-webkit-details-marker { display: none; }
.note > summary::after { content: "  ›"; color: var(--mp-ink-disabled); }
.note[open] > summary::after { content: "  ⌄"; }
.note > summary:hover { color: var(--mp-navy); }
.note-step {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--mp-ink-disabled); margin-right: 8px;
}
.note-raw {
  margin: 4px 0 8px 12px; padding: 6px 10px; border-left: 2px solid var(--mp-border);
  font-family: var(--mp-font-mono); font-size: 11.5px; line-height: 1.5; color: var(--mp-ink-3);
}
.note-raw-line { margin-bottom: 4px; }
.note-raw-line:last-child { margin-bottom: 0; }
.hood-notes { margin-top: 14px; }
.journey-hood { display: block; margin-bottom: 24px; }
/* The journey's stops are cards already: no box around the box. */
.journey-hood > .hood-body { max-width: none; background: none; border: 0; padding: 0; }
.journey-hood .journey-stop:last-child { margin-bottom: 0; }
.log-tail { background: var(--mp-ink-1); color: #d7e2ef; font-family: var(--mp-font-mono); font-size: 12px; line-height: 1.5; padding: 14px 16px; border-radius: var(--mp-r-sm); overflow-x: auto; white-space: pre-wrap; word-break: break-word; max-height: 320px; }

/* ---------- Doc-limit control (Gate 1) ---------- */
.doc-limit { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mp-ink-muted); margin-top: 10px; }
.doc-limit-n { width: 52px; padding: 4px 6px; border: 1px solid var(--mp-border); border-radius: 4px; font: inherit; font-size: 12.5px; text-align: center; }

/* ---------- Gate 1: where the board stands ----------
   The sticky bar has one job per standing. Open, it asks for the decision.
   In every other standing it is a quiet status pill in the status colour
   (teal: the engine is working; orange: it needs you; red: it stopped) with
   how long it has been at it, and the controls that would act on a plan
   about to be replaced are not on the page at all. The rest of the board
   stays readable, only quieter: nothing greyed out, nothing that looks broken. */
.decision-bar.standing { position: sticky; overflow: hidden; padding: 14px 20px; }
.decision-bar.standing .decision-bar-row { gap: 14px; flex-wrap: wrap; }
.decision-bar.standing.tone-working { border-color: rgba(3,171,163,0.45); }
.decision-bar.standing.tone-needs { border-color: rgba(244,123,13,0.5); }
.decision-bar.standing.tone-blocked { border-color: rgba(216,75,60,0.45); }
.decision-bar.standing.tone-done { border-color: rgba(3,171,163,0.45); }
.standing-pill { font-size: 12.5px; padding: 5px 12px 5px 10px; max-width: 100%; white-space: normal; }
.standing-pill .standing-sep { opacity: 0.5; font-weight: 600; }
.standing-pill .standing-detail { font-weight: 600; }
.pill.done { background: rgba(3,171,163,0.14); color: var(--mp-teal-dark); }
.pill.done .dot { background: var(--mp-teal-dark); }
/* The dot breathes while the engine works, and only then. */
.tone-working .standing-pill .dot { animation: pulse 1.4s var(--mp-ease) infinite; }
.standing-elapsed { font-size: 12px; font-weight: 600; color: var(--mp-ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.standing-text { flex: 1; min-width: 200px; font-size: 13px; color: var(--mp-ink-3); line-height: 1.5; }
.standing-text .notep { display: inline; }
.standing-reason { color: var(--mp-ink-1); font-weight: 600; }
.standing-link { font-weight: 700; white-space: nowrap; margin-left: 6px; }
.standing-note { margin: 8px 0 0; font-size: 12.5px; color: var(--mp-ink-muted); }
.standing-note.blocked { color: #D84B3C; }
/* A slim indeterminate line along the top edge: the engine is at it, and
   the page is waiting with you. Teal, because it is work, not a warning. */
.standing-progress { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(3,171,163,0.12); overflow: hidden; }
.standing-progress > span { position: absolute; top: 0; bottom: 0; width: 28%; border-radius: 2px; background: var(--mp-teal-dark); animation: standing-slide 1.8s var(--mp-ease) infinite; }
@keyframes standing-slide { 0% { left: -30%; } 100% { left: 102%; } }
@media (prefers-reduced-motion: reduce) {
  .standing-progress > span, .tone-working .standing-pill .dot { animation: none; }
}
/* A re-plan that stopped: one red-tinted row above the decision, and the
   decision still yours — the plan below is the one that stood before. */
.standing-row { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--mp-surface-2); }
.standing-row .standing-text strong { color: var(--mp-ink-1); }
.standing-row .btn { height: 32px; padding: 0 14px; font-size: 12.5px; white-space: nowrap; }

/* The board, locked: the same rows, read but not sorted. The grips keep their
   place so nothing shifts; the move pills and the drop labels are not
   rendered; the one line of explanation sits where the how-to line was. */
.board.is-locked .drag-grip { visibility: hidden; cursor: default; }
.board.is-locked .phase-drop { display: none; }
.board.is-locked .plan-row-top { cursor: pointer; }

/* The Stop control on a run's status card: quiet, small, red-outlined; present
   only while the engine is at work. */
.stop-form { display: inline-flex; margin: 0; }
.btn-small { height: 30px; padding: 0 12px; font-size: 12.5px; }

/* ============================================================
   v13 — the shared grammar (03-COMPONENTS.md). Built once, used on
   every screen. Values are the reference's inline styles, verbatim.
   ============================================================ */

@keyframes dpBreathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes dpRise { from { opacity: 0; } to { opacity: 1; } }
.dp-screen { animation: dpRise 200ms var(--mp-ease) both; }
.dp-breathe { animation: dpBreathe 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .dp-breathe, .dp-screen { animation: none; }
}
.dp-hidden { display: none !important; }

/* ---------- Titles (Minion Pro Bold) ---------- */
.dp-h1 { font-family: var(--mp-font-display); font-weight: 700; font-size: 42px; line-height: 1.05; letter-spacing: -0.03em; color: var(--mp-ink-1); margin: 0; }
.dp-h1-row { display: flex; align-items: baseline; gap: 14px; }
.dp-h1-row .dp-sub { font-size: 13.5px; color: var(--mp-ink-muted); }
.dp-h1-row .dp-fill { flex: 1; }
.dp-h-lane { font-family: var(--mp-font-display); font-size: 32px; font-weight: 700; letter-spacing: -0.025em; color: var(--mp-ink-1); line-height: 1; }
.dp-h-section { font-family: var(--mp-font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--mp-ink-1); }
.dp-h-panel { font-family: var(--mp-font-display); font-size: 27px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.22; color: var(--mp-ink-1); text-wrap: pretty; }
.dp-h-modal { font-family: var(--mp-font-display); font-size: 23px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; color: var(--mp-ink-1); }
.dp-title-22 { font-family: var(--mp-font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; color: var(--mp-ink-1); }
.dp-section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.dp-section-head .dp-count { font-size: 13px; color: var(--mp-ink-muted); }
.dp-section-head .dp-fill { flex: 1; }

/* ---------- Card, header strip, rows ---------- */
.dp-card { background: #fff; border: 1px solid var(--mp-border-2); border-radius: var(--dp-r-card); overflow: hidden; }
.dp-card.is-link { display: block; color: inherit; text-decoration: none; transition: border-color 180ms var(--mp-ease), box-shadow 180ms var(--mp-ease); }
.dp-card.is-link:hover { border-color: var(--mp-navy); box-shadow: var(--mp-shadow-card); text-decoration: none; color: inherit; }
.dp-head { display: flex; align-items: center; gap: 10px; min-height: 56px; box-sizing: border-box; padding: 0 18px; }
.dp-head.wide { padding: 0 20px; }
.dp-head.lined { border-bottom: 1px solid var(--mp-surface-2); }
.dp-head .dp-count { font-size: 13px; color: var(--mp-ink-muted); }
.dp-head .dp-fill { flex: 1; }
.dp-fill { flex: 1; }

.dp-row { border-top: 1px solid var(--mp-surface-2); transition: background 140ms ease-out; }
.dp-row:first-child { border-top: 0; }
.dp-row:hover { background: rgba(6,66,158,0.03); }
.dp-row.is-on { background: rgba(6,66,158,0.06); box-shadow: inset 3px 0 0 var(--mp-navy); }
.dp-row.is-on.is-flagged { box-shadow: inset 3px 0 0 var(--mp-orange); }
.dp-row .dp-hov { opacity: 0; transition: opacity 140ms ease-out; }
.dp-row:hover .dp-hov, .dp-row.is-on .dp-hov, .dp-row[data-on="1"] .dp-hov, .dp-row:focus-within .dp-hov { opacity: 1; }
.dp-sublist { background: var(--mp-surface-soft); border-top: 1px solid var(--mp-surface-2); }
.dp-sublist .dp-row:first-child { border-top: 0; }

/* A whole row as one button or link */
.dp-rowbtn { font: inherit; color: inherit; text-align: left; width: 100%; background: none; border: none; padding: 15px 20px; cursor: pointer; display: grid; align-items: center; gap: 18px; text-decoration: none; }
.dp-rowbtn:hover { text-decoration: none; color: inherit; }
.dp-rowbtn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--mp-navy); }

/* ---------- State word ---------- */
.dp-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.dp-status .dp-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--mp-ink-disabled); }
.dp-status.sm { font-size: 12.5px; gap: 6px; }
.dp-status.sm .dp-dot { width: 6px; height: 6px; }
.dp-status.needs { color: var(--mp-red); }
.dp-status.needs .dp-dot { background: var(--mp-orange); }
.dp-status.working, .dp-status.ok { color: var(--mp-teal-dark); }
.dp-status.working .dp-dot, .dp-status.ok .dp-dot { background: var(--mp-teal); }
.dp-status.working .dp-dot { animation: dpBreathe 2.4s ease-in-out infinite; }
.dp-status.quiet { color: var(--mp-ink-4); }
.dp-status.quiet .dp-dot { background: var(--mp-ink-disabled); }
.dp-status.muted { color: var(--mp-ink-muted); }
.dp-status.muted .dp-dot { background: var(--mp-ink-disabled); }
.dp-status.bad { color: var(--dp-danger-text); }
.dp-status.bad .dp-dot { background: var(--dp-danger); }
.dp-status.edited { color: var(--mp-ink-4); }
.dp-status.edited .dp-dot { background: var(--mp-orange); }
@media (prefers-reduced-motion: reduce) { .dp-status.working .dp-dot { animation: none; } }

/* ---------- Pills, tags, labels ---------- */
.dp-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; border-radius: 100px; padding: 4px 11px; white-space: nowrap; color: var(--mp-navy); background: rgba(6,66,158,0.09); line-height: 1.3; }
.dp-pill.on-tint { background: rgba(255,255,255,0.75); }
.dp-pill.lg { font-size: 12.5px; padding: 5px 12px; }
.dp-pill.md { font-size: 12px; padding: 4px 10px; background: rgba(6,66,158,0.07); }
.dp-pill .dp-glyph { font-size: 11px; line-height: 1; }
.dp-pill.t-new { color: var(--mp-navy); background: rgba(6,66,158,0.09); }
.dp-pill.t-update { color: var(--mp-teal-dark); background: rgba(3,171,163,0.1); }
.dp-pill.t-corrections { color: var(--mp-cyan); background: rgba(2,130,201,0.09); }
.dp-pill.t-sweep { color: var(--mp-ink-1); background: rgba(9,29,46,0.07); }
.dp-pill.t-deprecation { color: var(--dp-retire); background: rgba(138,59,43,0.09); }
.dp-pill.t-groundwork { color: var(--dp-ask); background: rgba(133,126,118,0.1); }
.dp-pill.t-other { color: var(--mp-ink-muted); background: rgba(157,165,171,0.14); }
/* The type glyph on its own: a text character in the type colour. */
.dp-glyph { font-size: 11px; line-height: 1; flex-shrink: 0; font-family: var(--mp-font-sans); }
.dp-glyph.t-new { color: var(--mp-navy); }
.dp-glyph.t-update { color: var(--mp-teal-dark); }
.dp-glyph.t-corrections { color: var(--mp-cyan); }
.dp-glyph.t-sweep { color: var(--mp-ink-1); }
.dp-glyph.t-deprecation { color: var(--dp-retire); }
.dp-glyph.t-groundwork { color: var(--dp-ask); }
.dp-glyph.t-other { color: var(--mp-ink-muted); }

.dp-tag { display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 100px; padding: 3px 9px; white-space: nowrap; line-height: 1.5; }
.dp-tag.always { color: var(--mp-teal-dark); background: rgba(3,171,163,0.1); }
.dp-tag.never { color: var(--dp-danger-text); background: rgba(216,75,60,0.08); }
.dp-tag.guideline { color: var(--mp-ink-4); background: var(--mp-surface-2); }
.dp-tag.in-col { padding: 3px 0; width: 100%; margin-top: 2px; }

.dp-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mp-ink-muted); }
.dp-chip { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--mp-navy); background: rgba(6,66,158,0.07); border-radius: 100px; padding: 6px 12px; white-space: nowrap; }
.dp-rulechip { position: relative; display: inline-flex; font-size: 12.5px; font-weight: 700; color: var(--mp-teal-dark); background: rgba(3,171,163,0.1); border-radius: 100px; padding: 5px 11px; cursor: help; text-decoration: none; font-variant-numeric: tabular-nums; }
.dp-rulechip:hover { text-decoration: none; color: var(--mp-teal-dark); }
.dp-mono { font-family: var(--mp-font-mono); }
.dp-tnum { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.dp-ghost { font: inherit; font-size: 13px; font-weight: 700; color: var(--mp-ink-4); background: none; border: none; padding: 8px 10px; border-radius: 100px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; transition: background 140ms ease-out, color 140ms ease-out; }
.dp-ghost:hover { color: var(--mp-navy); background: rgba(6,66,158,0.05); text-decoration: none; }
.dp-ghost.danger:hover { color: var(--mp-red); background: rgba(207,50,0,0.07); }
.dp-ghost.plain:hover { color: var(--mp-ink-1); background: var(--mp-surface-2); }
.dp-ghost.sm { font-size: 12.5px; padding: 4px 8px; color: var(--mp-navy); }
.dp-ghost.sm:hover { background: rgba(6,66,158,0.07); }
.dp-navy { font: inherit; font-size: 13px; font-weight: 700; color: #fff; background: var(--mp-navy); border: none; padding: 8px 16px; border-radius: 100px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; transition: background 140ms ease-out; }
.dp-navy:hover { background: var(--mp-navy-hover); color: #fff; text-decoration: none; }
.dp-navy:disabled { opacity: 0.5; cursor: not-allowed; }
.dp-outline { font: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--mp-navy); background: #fff; border: 1px solid var(--mp-border-2); border-radius: 100px; padding: 7px 14px; cursor: pointer; white-space: nowrap; text-decoration: none; transition: border-color 140ms ease-out, background 140ms ease-out; }
.dp-outline:hover { border-color: var(--mp-navy); background: rgba(6,66,158,0.05); color: var(--mp-navy); text-decoration: none; }
.dp-outline:disabled { opacity: 0.5; cursor: not-allowed; }
.dp-outline svg { flex-shrink: 0; }
.dp-quiet { font: inherit; background: none; border: none; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--mp-ink-muted); text-decoration: none; }
.dp-quiet:hover { color: var(--mp-ink-4); text-decoration: none; }
/* The chevron is drawn, not typed. As a glyph at 9px it came out as a dot in
   the system font (read as "a tiny dot, easy to miss as a control" in the app
   pass of 2026-09-08). Same size, same colour, same rotation, now the same in
   every font. `is-down` points it down where a link says "hide". */
.dp-quiet .dp-chev { font-size: 0; }
.dp-chev { display: inline-flex; align-items: center; justify-content: center; width: 9px; height: 10px; font-size: 0; color: var(--mp-ink-muted); transition: transform 160ms var(--mp-ease); }
.dp-chev::before { content: ""; display: block; width: 0; height: 0; border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.dp-chev.is-down { transform: rotate(90deg); }
details.dp-fold > summary { list-style: none; cursor: pointer; }
details.dp-fold > summary::-webkit-details-marker { display: none; }
details.dp-fold[open] > summary .dp-chev { transform: rotate(90deg); }
.dp-seg { font: inherit; font-size: 13.5px; font-weight: 700; color: var(--mp-ink-4); background: transparent; border: none; border-radius: 100px; padding: 7px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.dp-seg:hover { color: var(--mp-ink-1); text-decoration: none; }
.dp-seg.active { color: var(--mp-ink-1); background: #fff; }
.dp-seg .dp-n { font-size: 12px; font-weight: 400; color: var(--mp-ink-muted); }
.dp-segs { display: flex; align-items: center; gap: 4px; }
.dp-product { font: inherit; font-size: 13px; font-weight: 700; color: var(--mp-ink-4); background: transparent; border: 1px solid var(--mp-border-2); border-radius: 100px; padding: 6px 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; transition: border-color 140ms ease-out; }
.dp-product:hover { border-color: var(--mp-navy); text-decoration: none; color: var(--mp-ink-4); }
.dp-product.active { color: #fff; background: var(--mp-navy); border-color: var(--mp-navy); }
.dp-product.active:hover { color: #fff; }
.dp-product .dp-staledot { width: 6px; height: 6px; border-radius: 50%; background: var(--mp-orange); }
.dp-products { display: flex; align-items: center; gap: 4px; }

/* Icon pair: two 13px icon buttons joined into one pill */
.dp-pair { display: inline-flex; gap: 2px; }
.dp-pair > * { font: inherit; display: inline-flex; align-items: center; color: var(--mp-ink-4); background: none; border: 1px solid var(--mp-border-2); padding: 4px 8px; cursor: pointer; text-decoration: none; transition: background 140ms ease-out, color 140ms ease-out; }
.dp-pair > :first-child { border-right: none; border-radius: 100px 0 0 100px; }
.dp-pair > :last-child { border-radius: 0 100px 100px 0; }
.dp-pair > :hover { color: var(--mp-navy); background: rgba(6,66,158,0.05); text-decoration: none; }
.dp-pair > :disabled, .dp-pair > .is-off { opacity: 0.4; cursor: default; }
.dp-iconbtn { font: inherit; display: inline-flex; color: var(--mp-ink-4); background: none; border: none; padding: 6px; border-radius: 100px; cursor: pointer; }
.dp-iconbtn:hover { color: var(--mp-ink-1); background: var(--mp-surface-2); }

/* ---------- Tooltips (CSS only) ---------- */
.dp-tip { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 8; width: 268px; font-size: 13px; font-weight: 400; line-height: 1.45; color: var(--mp-ink-2); background: #fff; border: 1px solid var(--mp-border-2); border-radius: 10px; box-shadow: 0 14px 34px rgba(10,37,64,0.16); padding: 10px 12px; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity 140ms ease-out, transform 140ms ease-out; text-transform: none; letter-spacing: 0; white-space: normal; text-align: left; }
.dp-rulechip:hover .dp-tip, .dp-rulechip:focus-visible .dp-tip { opacity: 1; transform: none; }
.dp-s { position: relative; }
.dp-tipx { position: absolute; left: 0; top: calc(100% + 7px); z-index: 11; width: 320px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 400; line-height: 1.3; background: #fff; border: 1px solid var(--mp-border-2); border-radius: 10px; box-shadow: 0 14px 34px rgba(10,37,64,0.16); padding: 8px 8px 8px 12px; opacity: 0; visibility: hidden; transform: translateY(-3px); transition: opacity 120ms ease-out, transform 120ms ease-out, visibility 0s linear 160ms; text-decoration: none; }
.dp-tipx.above { top: auto; bottom: calc(100% + 7px); }
.dp-s:hover > .dp-tipx, .dp-s:focus-within > .dp-tipx { opacity: 1; visibility: visible; transform: none; transition-delay: 180ms; z-index: 12; }
.dp-tipx .dp-kind { font-weight: 700; color: var(--mp-teal-dark); white-space: nowrap; }
.dp-tipx .dp-where { color: var(--mp-ink-4); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-tipx .dp-mini { font: inherit; font-size: 12px; font-weight: 700; color: var(--mp-navy); background: rgba(6,66,158,0.07); border: none; border-radius: 100px; padding: 4px 9px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.dp-tipx .dp-mini:hover { background: rgba(6,66,158,0.14); text-decoration: none; }
.dp-tipx .dp-out { flex-shrink: 0; color: var(--mp-ink-muted); display: inline-flex; }

/* ---------- Quote block (rejection / origin) ---------- */
.dp-quote { padding-left: 12px; border-left: 2px solid var(--mp-border-2); font-size: 14px; line-height: 1.5; color: var(--mp-ink-4); font-style: italic; text-wrap: pretty; }
.dp-quote.sm { font-size: 13.5px; }
.dp-quote .dp-src { font-style: normal; color: var(--mp-ink-muted); }

/* ---------- Crumb ---------- */
.dp-crumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mp-ink-muted); margin-bottom: 26px; }
.dp-crumb a { font-weight: 700; color: var(--mp-navy); text-decoration: none; }
.dp-crumb a:hover { text-decoration: underline; }

/* ---------- Sticky decision bar ---------- */
.dp-bar { position: sticky; bottom: 0; margin: 22px -28px 0; padding: 14px 28px; background: rgba(248,249,252,0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--mp-border-2); display: flex; align-items: center; gap: 16px; z-index: 30; }
.dp-bar .dp-counter { font-size: 12.5px; color: var(--mp-ink-4); }
.dp-bar .dp-word { font-size: 13px; font-weight: 700; }
.dp-bar .dp-word.ok { color: var(--mp-teal-dark); }
.dp-bar .dp-word.bad { color: var(--dp-danger-text); }
.dp-bar .dp-fill { flex: 1; }
/* DS buttons at the bar's small size: blue with no shadow, red outline. */
.btn.dp-small { height: 38px; padding: 0 18px; font-size: 13.5px; }
.btn.dp-blue { background: var(--mp-navy); box-shadow: none; color: #fff; }
.btn.dp-blue:hover { background: var(--mp-navy-hover); transform: none; box-shadow: none; color: #fff; }
.btn.dp-red-outline { background: #fff; color: var(--dp-danger); border-color: rgba(216,75,60,0.6); }
.btn.dp-red-outline:hover { color: #fff; background: var(--dp-danger); border-color: var(--dp-danger); transform: none; }
.btn.dp-red { background: var(--mp-red); color: #fff; box-shadow: none; }
.btn.dp-red:hover { background: #B52A00; color: #fff; transform: none; }

/* ---------- Modal (rendered at body level) ---------- */
.dp-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(9,29,46,0.42); display: flex; align-items: center; justify-content: center; padding: 24px; }
.dp-overlay[hidden] { display: none; }
.dp-modal { width: 460px; max-width: 100%; background: #fff; border-radius: 14px; box-shadow: 0 30px 80px rgba(10,37,64,0.28); padding: 24px 24px 20px; }
.dp-modal .dp-msub { font-size: 14px; line-height: 1.55; color: var(--mp-ink-4); margin-top: 9px; }
.dp-modal .dp-label { display: block; margin-top: 20px; }
.dp-modal textarea, .dp-ta { width: 100%; box-sizing: border-box; margin-top: 8px; font: inherit; font-family: var(--mp-font-sans); font-size: 14px; line-height: 1.5; color: var(--mp-ink-2); padding: 11px 13px; min-height: 84px; resize: vertical; border: 1px solid var(--mp-border-2); border-radius: 5px; background: #fff; outline: none; }
.dp-modal textarea:focus, .dp-ta:focus { border-color: var(--mp-navy); }
.dp-modal textarea::placeholder, .dp-ta::placeholder { color: var(--mp-ink-disabled); }
.dp-mactions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.dp-input { font: inherit; font-family: var(--mp-font-sans); font-size: 14px; color: var(--mp-ink-2); padding: 9px 13px; border: 1px solid var(--mp-border-2); border-radius: 5px; background: #fff; outline: none; }
.dp-input:focus { border-color: var(--mp-navy); }

/* ---------- Donut (composition ring) ---------- */
.dp-ring { position: relative; flex-shrink: 0; }
.dp-ring.s64 { width: 64px; height: 64px; }
.dp-ring.s88 { width: 88px; height: 88px; }
.dp-ring.s92 { width: 92px; height: 92px; }
.dp-ring svg { display: block; width: 100%; height: 100%; }
.dp-ring .dp-track { stroke: var(--mp-surface-2); }
.dp-ring.on-tint .dp-track { stroke: rgba(255,255,255,0.7); }
.dp-ring .seg-new { stroke: var(--mp-navy); }
.dp-ring .seg-update { stroke: var(--mp-teal-dark); }
.dp-ring .seg-corrections { stroke: var(--mp-cyan); }
.dp-ring .seg-other, .dp-ring .seg-sweep { stroke: var(--mp-ink-1); }
.dp-ring .seg-ok { stroke: var(--mp-teal-dark); }
.dp-ring .seg-bad { stroke: var(--dp-danger); }
.dp-ring .seg-todo { stroke: var(--mp-surface-2); }
.dp-ring .seg-stone { stroke: var(--mp-ink-disabled); }
.dp-ring-val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--mp-ink-1); letter-spacing: -0.02em; font-size: 18px; font-variant-numeric: tabular-nums; }
.dp-ring.s92 .dp-ring-val { font-size: 17px; }
.dp-ring-label { font-size: 12px; font-weight: 700; color: var(--mp-ink-2); }
.dp-ring-legend { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.dp-ring-legend .dp-leg { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--mp-ink-4); }
.dp-ring-legend .dp-leg i { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; display: inline-block; }
.dp-leg i.seg-new { background: var(--mp-navy); }
.dp-leg i.seg-update { background: var(--mp-teal-dark); }
.dp-leg i.seg-corrections { background: var(--mp-cyan); }
.dp-leg i.seg-other, .dp-leg i.seg-sweep { background: var(--mp-ink-1); }
.dp-leg i.seg-ok { background: var(--mp-teal-dark); }
.dp-leg i.seg-bad { background: var(--dp-danger); }
.dp-leg i.seg-todo { background: var(--mp-surface-2); }
.dp-leg i.seg-stone { background: var(--mp-ink-disabled); }

/* ---------- Focus ---------- */
.dp-ghost:focus-visible, .dp-navy:focus-visible, .dp-outline:focus-visible, .dp-seg:focus-visible, .dp-product:focus-visible, .dp-quiet:focus-visible, .dp-pair > :focus-visible, .dp-iconbtn:focus-visible { outline: none; box-shadow: var(--mp-ring-focus); }

/* ============================================================
   v13 — shell: the top bar and the page containers
   ============================================================ */
.dp-nav { position: sticky; top: 0; z-index: 40; height: var(--dp-nav-h); background: rgba(255,255,255,0.94); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--mp-border); display: flex; align-items: center; gap: 24px; padding: 0 28px; min-width: 1280px; }
.dp-brand { display: flex; align-items: baseline; gap: 5px; text-decoration: none; }
.dp-brand:hover { text-decoration: none; }
.dp-brand-word { font-size: 15px; font-weight: 700; color: var(--mp-navy); letter-spacing: -0.01em; }
.dp-brand-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--mp-teal); position: relative; top: -3px; }
.dp-nav-items { display: flex; align-items: center; gap: 18px; }
.dp-nav-item { font-size: 14px; font-weight: 400; color: var(--mp-ink-muted); text-decoration: none; display: flex; align-items: center; gap: 7px; transition: color 140ms ease-out; }
.dp-nav-item:hover { color: var(--mp-ink-1); text-decoration: none; }
.dp-nav-item.active { font-weight: 700; color: var(--mp-ink-1); }
.dp-badge { font-size: 10.5px; font-weight: 700; color: #fff; background: var(--mp-orange); border-radius: 100px; padding: 1px 6px; line-height: 1.5; }
.dp-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mp-ink-muted); }
.dp-new { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--mp-navy); text-decoration: none; }
.dp-new:hover { color: var(--mp-navy-hover); text-decoration: none; }
.dp-account { position: relative; }
.dp-account > summary { list-style: none; cursor: pointer; }
.dp-account > summary::-webkit-details-marker { display: none; }
.dp-avatar { width: 27px; height: 27px; border-radius: 50%; background: rgba(6,66,158,0.09); color: var(--mp-navy); font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dp-account-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 220px; background: #fff; border: 1px solid var(--mp-border-2); border-radius: 14px; box-shadow: 0 14px 34px rgba(10,37,64,0.16); padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 2px; z-index: 45; }
.dp-account-name { font-size: 13.5px; font-weight: 700; color: var(--mp-ink-1); }
.dp-account-role { font-size: 12px; color: var(--mp-ink-muted); margin-bottom: 8px; }
.dp-account-menu form { margin: 0 -10px; }

.content { flex: none; min-width: 0; padding: 32px 40px 64px; }
.content.dp-page { max-width: 980px; margin: 0 auto; padding: 60px 28px 110px; }
.content.dp-page.wide { max-width: 1160px; padding: 34px 28px 150px; }
body { min-width: 1280px; }
.dp-quiet-line { font-size: 13px; color: var(--mp-ink-muted); margin-top: 52px; }
.dp-empty-line { padding: 20px 22px; font-size: 13.5px; color: var(--mp-ink-muted); margin-top: 20px; }

/* ============================================================
   v13 — Work: product lanes and the project card
   ============================================================ */
.dp-lane { position: relative; margin-top: 52px; }
.dp-lane:first-of-type { margin-top: 0; }
.content.dp-page > .dp-lane:first-child { margin-top: 52px; }
.dp-lane-head { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; padding-right: 80px; border-radius: 6px; }
.dp-lane-head::-webkit-details-marker { display: none; }
.dp-lane-head:focus-visible { outline: none; box-shadow: var(--mp-ring-focus); }
.dp-lane-chev { display: inline-flex; align-items: center; justify-content: center; width: 13px; height: 12px; font-size: 0; color: var(--mp-ink-muted); transform: none; transition: transform 160ms var(--mp-ease); align-self: center; }
.dp-lane-chev::before { content: ""; display: block; width: 0; height: 0; border-left: 6px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.dp-lane[open] .dp-lane-chev { transform: rotate(90deg); }
.dp-lane-sum { display: none; align-items: center; gap: 12px; margin-left: 4px; }
.dp-lane-sum .dp-status { font-weight: 400; font-size: 13px; }
.dp-lane:not([open]) .dp-lane-sum { display: inline-flex; }
.dp-lane-sum .dp-status.working, .dp-lane-sum .dp-status.quiet { color: var(--mp-ink-4); }
.dp-lane-new { position: absolute; top: 3px; right: 0; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--mp-ink-4); text-decoration: none; padding: 4px; }
.dp-lane-new:hover { color: var(--mp-navy); text-decoration: none; }
.dp-lane-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: stretch; }
.dp-older { margin-top: 30px; }

.dp-pcard { display: flex; flex-direction: column; min-height: 392px; background: #fff; border: 1px solid var(--mp-border-2); border-radius: 10px; overflow: hidden; color: inherit; text-decoration: none; transition: box-shadow 180ms var(--mp-ease), transform 180ms var(--mp-ease); }
.dp-pcard:hover { box-shadow: 0 12px 34px rgba(10,37,64,0.1); transform: translateY(-2px); text-decoration: none; color: inherit; }
.dp-pcard.needs { border-color: rgba(244,123,13,0.45); }
.dp-pcard-field { display: flex; flex-direction: column; flex: 1; width: 100%; box-sizing: border-box; padding: 20px 22px 24px; background: rgba(32,209,204,0.09); }
.dp-pcard.needs .dp-pcard-field { background: rgba(244,123,13,0.09); }
.dp-pcard.is-stopped .dp-pcard-field { background: var(--mp-surface-soft); }
.dp-pcard-top { display: flex; align-items: center; gap: 8px; width: 100%; }
.dp-pcard-time { font-size: 11.5px; color: var(--mp-ink-4); white-space: nowrap; }
.dp-pcard-title { display: block; font-size: 23px; font-weight: 700; color: var(--mp-ink-1); letter-spacing: -0.02em; line-height: 1.15; margin-top: 18px; }
.dp-pcard-status { display: flex; align-items: center; gap: 7px; margin-top: 12px; flex-wrap: wrap; }
.dp-pcard-where { font-size: 13px; color: var(--mp-ink-4); }
.dp-pcard-blocked { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; line-height: 1.45; color: var(--dp-danger-text); margin-top: 9px; }
.dp-pcard-blocked i { width: 6px; height: 6px; background: var(--dp-danger); border-radius: 2px; flex-shrink: 0; margin-top: 5px; display: inline-block; }
.dp-pcard-gap { flex: 1; min-height: 18px; }
.dp-pcard-ring { display: flex; align-items: center; gap: 15px; width: 100%; }
.dp-pcard-band { display: block; width: 100%; box-sizing: border-box; padding: 16px 22px 17px; background: #fff; border-top: 1px solid var(--mp-border-2); }
.dp-pcard.needs .dp-pcard-band { border-top-color: rgba(244,123,13,0.45); }
.dp-track { display: flex; gap: 3px; align-items: flex-end; height: 11px; }
.dp-track i { display: block; flex: 1; border-radius: 2px; height: 4px; background: var(--mp-surface-2); }
.dp-track i.done { background: rgba(32,209,204,0.5); }
.dp-track i.cur-needs { flex: 1.9; height: 11px; background: var(--mp-orange); }
.dp-track i.cur-stopped { flex: 1.9; background: var(--mp-ink-muted); }
.dp-track i.cur-working { flex: 1.9; background: var(--mp-teal-dark); animation: dpBreathe 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .dp-track i.cur-working { animation: none; } }
.dp-pcard-action { display: flex; align-items: center; gap: 8px; margin-top: 15px; font-size: 13.5px; font-weight: 700; color: var(--mp-ink-4); }
.dp-pcard-action.needs { color: var(--mp-red); }
.dp-pcard-action svg { display: inline-flex; }

/* ============================================================
   v13 — History
   ============================================================ */
.dp-hlane { margin-top: 52px; }
.dp-hrow { grid-template-columns: 96px minmax(0, 1fr) auto 118px; }
.dp-hdate { font-size: 12.5px; color: var(--mp-ink-muted); }
.dp-hmain { min-width: 0; }
.dp-htitle { display: block; font-size: 15px; font-weight: 700; color: var(--mp-ink-1); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-hwhat { display: block; font-size: 12.5px; color: var(--mp-ink-4); margin-top: 3px; }
.dp-hpill { display: flex; justify-content: flex-end; }

/* The hidden attribute always wins: a box the page hides (a step's problem
   note, its fact chips) must not come back as an empty frame because a
   class sets display:flex. */
[hidden] { display: none !important; }

/* ============================================================
   Shell (VideoProof v8, 01-DECISIONS §1): the left sidebar replaces the
   v13 top bar. The page itself keeps its own container (.content).
   ============================================================ */
:root { --dp-sticky-top: 14px; }
body.dp-shell { display: flex; align-items: stretch; min-height: 100vh; min-width: 1280px; }
.dp-shell-main { flex: 1; min-width: 0; }
.dp-side { width: 232px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--mp-border); display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; z-index: 40; font-family: "Sofia Pro", sans-serif; }
.dp-side-brand { display: flex; align-items: center; gap: 8px; padding: 4px 10px 22px; text-decoration: none; }
.dp-side-brand:hover { text-decoration: none; }
.dp-side-word { font-size: 20px; font-weight: 700; color: var(--mp-navy); letter-spacing: -0.01em; line-height: normal; }
.dp-side-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mp-teal); position: relative; top: 1px; }
.dp-side-group { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--mp-ink-muted); padding: 0 10px 8px; line-height: normal; }
.dp-side-group.second { padding-top: 22px; }
.dp-side-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: 8px; font-size: 14px; line-height: normal; margin-bottom: 2px; color: var(--mp-ink-3); font-weight: 600; text-decoration: none; transition: background 150ms ease-out, color 150ms ease-out; }
.dp-side-item:hover { background: rgba(6,66,158,0.06); color: var(--mp-ink-3); text-decoration: none; }
.dp-side-item.active, .dp-side-item.active:hover { background: rgba(6,66,158,0.08); color: var(--mp-navy); font-weight: 700; }
.dp-side-item:focus-visible { outline: none; box-shadow: var(--mp-ring-focus); }
.dp-side-badge { background: var(--mp-orange); color: #fff; font-size: 11px; font-weight: 700; border-radius: 100px; padding: 2px 8px; line-height: normal; }
.dp-side-fill { flex: 1; }
.dp-side-user { position: relative; border-top: 1px solid var(--mp-surface-2); margin-top: 8px; }
.dp-side-user > summary { list-style: none; cursor: pointer; padding: 14px 10px 4px; display: flex; align-items: center; gap: 10px; border-radius: 8px; }
.dp-side-user > summary::-webkit-details-marker { display: none; }
.dp-side-user > summary:focus-visible { outline: none; box-shadow: var(--mp-ring-focus); }
.dp-side-disc { width: 30px; height: 30px; border-radius: 50%; background: rgba(6,66,158,0.1); color: var(--mp-navy); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dp-side-name { display: block; font-size: 13px; font-weight: 700; color: var(--mp-ink-1); line-height: normal; }
.dp-side-role { display: block; font-size: 11.5px; color: var(--mp-ink-muted); line-height: normal; }
.dp-side-menu { position: absolute; left: 0; bottom: calc(100% + 6px); width: 204px; background: #fff; border: 1px solid var(--mp-border-2); border-radius: 14px; box-shadow: 0 14px 34px rgba(10,37,64,0.16); padding: 8px 6px; z-index: 45; }
.dp-side-menu form { margin: 0; }
