/* Relay. unified: Schedule's structure, Rubric's type, the R-dot, light only.
   Reads Schedule's grey ramp (dist/schedule-tokens.css) and Rubric's faces (dist/relay-rubric/type.css). */
:root {
  --cobalt-50: #EEF1FC; --cobalt-100: #DCE3FA; --cobalt-400: #7F97F2; --cobalt-600: #2446C8; --cobalt-700: #1D3AA8; --cobalt-800: #172E86;
  --mint-50: #E8F7F1; --mint-100: #C9EEDF; --mint-300: #7FD3B5; --mint-600: #1A9C78; --mint-700: #177A5E; --mint-800: #0F5E48; --mint-900: #0B4A39;
  /* Semantic, per the review: red for sensitive and delete (Relay's own danger tokens), yellow from Sevrak's amber ramp. */
  --red-50: #FCE6E6; --red-100: #FAD7D4; --red-600: #C0392B; --red-700: #A32824;
  --amber-50: #FFF8E1; --amber-100: #FFE39A; --amber-400: #DCAD37; --amber-700: #81661E;
  --ochre: #8A6508;

  --primary: var(--cobalt-600); --primary-hover: var(--cobalt-700); --primary-pressed: var(--cobalt-800); --on-primary: #FFFFFF;
  --primary-soft: var(--cobalt-50); --primary-light: var(--cobalt-400); --primary-deep: var(--cobalt-800);
  --second: var(--mint-700); --second-soft: var(--mint-50);
  --mark-dot: var(--primary);
  --surface-page: var(--grey-0); --surface-panel: var(--grey-25); --surface-raised: var(--grey-0); --surface-inset: var(--grey-50);
  --focus-ring: var(--primary);

  --x-ui: var(--font-ui); --x-data: var(--font-ledger); --x-read: var(--font-reading);
  --x-accent: var(--primary); --x-accent-2: var(--second); --x-accent-soft: var(--primary-soft);
  --x-rail-bg: var(--grey-950); --x-rail-ink: var(--grey-100); --x-rail-muted: var(--grey-400);
  --x-rail-cur-bg: var(--grey-850); --x-rail-cur-ink: var(--grey-0); --x-rail-cur-mark: var(--primary-light);
  --x-main-bg: var(--grey-0); --x-user-bg: var(--primary); --x-user-ink: #FFFFFF;
  --x-op-create: var(--grey-950); --x-op-read: var(--cobalt-600); --x-op-update: var(--ochre); --x-op-delete: var(--red-600);
  --x-run: var(--primary); --x-done: var(--second); --x-fail: var(--red-600); --x-wait: var(--amber-700); --x-block: var(--grey-600);
  --x-conseq-bg: var(--red-50); --x-conseq-ink: var(--grey-950); --x-conseq-edge: var(--red-600); --x-step-edge: 4px;
  --x-chart-1: var(--cobalt-600); --x-chart-2: var(--grey-600); --x-chart-3: var(--amber-700); --x-chart-4: var(--grey-950);
  --x-radius: 0px; --x-radius-lg: 0px; --x-bubble-radius: 0px; --x-bar-end: 0px; --x-cap: butt; --x-join: miter;
  --x-run-anim: x-blink .9s steps(2, jump-none) infinite;
  --x-plan-head-bg: var(--grey-25);
}

/* Type: Rubric's faces */
.say, .step-sum, .cv-title, .report-title, .empty-h, .bubble, .option-l, .std-text, .doc, .g-msg p { font-family: var(--x-read); }
.cv-title { font-weight: 600; font-size: 19px; }
.say { font-size: 15px; line-height: 1.6; }
.step-sum { font-size: 15px; }

/* No bounce: only content that is new arrives, and it arrives once */
.turn:last-child { animation: none; }
.turn.is-new { animation: x-arrive var(--x-dur) var(--x-ease); }
.collapse:not(.is-open) > .collapse-in { visibility: hidden; transition: visibility 0s linear var(--x-dur); }
.collapse.is-open > .collapse-in { visibility: visible; transition: visibility 0s; }

/* Host: Relativity aiR takes no custom tab icons, so the Relay tab is a stock glyph */
.host-relay .ic { color: var(--aero-ink); }

/* Rail: Schedule's black board, pins, the sensitive marker, the key */
.rl-rail { border-right: 0; }
.rl-lockup { color: var(--grey-0); } .rl-lockup svg { height: 26px; }
.rl-rail .logo-mark { color: var(--grey-0); }
.rl-new { background: var(--grey-0); color: var(--grey-950); }
.rl-new:hover { background: var(--primary-soft); }
.rl-find { background: var(--grey-900); border-color: var(--grey-800); }
.rl-group-h { display: flex; gap: 6px; align-items: center; color: var(--grey-400); border-bottom: 1px solid var(--grey-800); padding-bottom: 6px; margin: 14px 8px 4px; }
.rl-group-h .ic { width: 12px; height: 12px; }
.rl-li { position: relative; }
.rl-item { padding-right: 30px; }
.rl-item.is-current::before { width: 4px; top: 0; bottom: 0; }
.rl-item-when { color: var(--grey-300); }
.rl-item.st-running .rl-item-ic { color: var(--primary-light); }
.rl-item.st-approval .rl-item-ic { color: var(--primary-light); }
.rl-item.st-question .rl-item-ic { color: var(--amber-400); }
.rl-item.st-done .rl-item-ic { color: var(--mint-300); } .rl-item.st-answer .rl-item-ic { color: var(--grey-300); }
.rl-item.st-failed .rl-item-ic { color: #F08C88; } .rl-item.st-blocked .rl-item-ic { color: var(--grey-300); }
.rl-sens { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: #F5A3A0; font-weight: 700; }
.rl-sens .ic { width: 11px; height: 11px; }
.rl-pin { position: absolute; right: 6px; top: 8px; width: 24px; height: 24px; display: grid; place-items: center; border: 0; background: none; color: var(--grey-400); opacity: 0; }
.rl-li:hover .rl-pin, .rl-pin:focus-visible, .rl-pin[aria-pressed="true"] { opacity: 1; }
.rl-pin[aria-pressed="true"] { color: var(--primary-light); }
.rl-pin:hover { color: var(--grey-0); }
.rl-pin .ic { width: 14px; height: 14px; }
.rl-key { border-top: 1px solid var(--grey-800); padding: 6px 12px 8px; }
.rl-key-h { display: flex; width: 100%; justify-content: space-between; align-items: center; border: 0; background: none; color: var(--grey-400); font: 600 11px/1.2 var(--x-ui); letter-spacing: .06em; text-transform: uppercase; padding: 4px 0; }
.rl-key-list { list-style: none; margin: 4px 0 0; padding: 0; display: none; grid-template-columns: 1fr 1fr; gap: 5px 10px; font-size: 12px; color: var(--grey-100); }
.rl-key.is-open .rl-key-list { display: grid; }
.rl-key-list li { display: flex; gap: 7px; align-items: center; }
.rl-key-list .ic { width: 14px; height: 14px; }
.rl-key .op-create .ic { color: var(--grey-0); } .rl-key .op-read .ic { color: var(--cobalt-400); } .rl-key .op-update .ic { color: var(--amber-400); } .rl-key .op-delete .ic { color: #F08C88; }
.rl-key .k-run .ic { color: var(--primary-light); } .rl-key .k-ask .ic { color: var(--amber-400); } .rl-key .k-done .ic { color: var(--mint-300); }
.rl-key .k-fail .ic { color: #F08C88; } .rl-key .k-block .ic { color: var(--grey-300); } .rl-key .k-sens .ic { color: #F08C88; }
.rl-foot { border-top-color: var(--grey-800); }

/* Conversation: Schedule's rules, shadowed bubbles on both sides */
.cv-head { border-bottom: 2px solid var(--grey-950); }
.bubble { box-shadow: 4px 4px 0 var(--primary-deep); }
.avatar { border-radius: 0; background: var(--grey-950); color: var(--grey-0); }
.turn-relay.is-chat .turn-body { align-items: flex-start; }
.bubble-relay { background: var(--grey-50); color: var(--grey-950); border: 1px solid var(--grey-200); box-shadow: -4px 4px 0 var(--grey-200); max-width: min(620px, 92%); padding: 10px 14px; }
.bubble-relay .say { margin: 0; }
.bubble-relay .say + .say { margin-top: 8px; }
/* Relay is working: three small cobalt squares that pulse four times (under five seconds) and then hold, with words */
.working { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 13px; color: var(--ink-muted); }
.working-dots { display: inline-flex; gap: 4px; align-items: center; flex: none; }
.working-dots i { width: 6px; height: 6px; background: var(--x-run); animation: x-work 1.1s ease-in-out 4 both; }
.working-dots i:nth-child(2) { animation-delay: .15s; } .working-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes x-work { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.note { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--ink-muted); }

/* Look-ups that ran: read-only steps run straight away and show as a compact, finished block */
.look { border-top: 2px solid var(--x-op-read); border-bottom: 1px solid var(--hairline-strong); background: var(--surface-page); max-width: 100%; }
.look-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px 6px; }
.look-title { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1.2 var(--x-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-strong); }
.look-title .ic, .look-op .ic { color: var(--x-op-read); width: 16px; height: 16px; }
.look-meta { font-size: 13px; color: var(--ink-muted); }
.look-head .plan-status { margin-left: auto; }
.look-steps { list-style: none; margin: 0; padding: 0 12px 6px; display: grid; gap: 2px; }
.look-step { display: grid; grid-template-columns: 24px 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 3px 0; font-size: 13px; }
.look-no { font-family: var(--x-data); font-size: 12px; color: var(--ink-muted); }
.look-op { display: inline-grid; place-items: center; }
.look-sum { color: var(--ink-body); }
.look-out { font-family: var(--x-data); font-size: 12px; color: var(--ink-strong); text-align: right; }
.look-found { margin: 0 12px; padding: 8px 0; border-top: 1px solid var(--hairline); display: grid; gap: 8px; font-size: 13px; }
.look-list-h { margin: 0; color: var(--ink-muted); }
.look-count { font-family: var(--x-data); font-size: 12px; color: var(--ink-strong); }
.look-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.look-chips li { font-family: var(--x-data); font-size: 12px; line-height: 18px; padding: 1px 7px; background: var(--primary-soft); color: var(--ink-strong); border: 1px solid var(--cobalt-100); white-space: nowrap; }
.look-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 8px 12px 10px; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--ink-muted); }
.look-note .ic { color: var(--x-op-read); flex: none; margin-top: 2px; }
@media (max-width: 560px) {
  .look-step { grid-template-columns: 22px 18px minmax(0, 1fr); }
  .look-out { grid-column: 3; text-align: left; }
  .look-chips li { white-space: normal; }
}

/* Plan: Schedule's rule, the circles, sensitive at every level */
.plan { border: 0; border-top: 4px solid var(--grey-950); border-bottom: 1px solid var(--grey-950); }
.plan-head { flex-wrap: wrap; gap: 8px 12px; padding: 0 12px 0 0; }
.plan-title { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.plan-toggle { flex: 1 1 200px; flex-wrap: wrap; row-gap: 2px; }
.plan-toggle .plan-meta { flex: 0 1 auto; }
.sens-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #fff; background: var(--red-600); white-space: nowrap; font-family: var(--x-data); }
.sens-chip .ic { width: 12px; height: 12px; }
/* Circles: a 14px mark on a 24px target, 24px apart. State is carried by shape as well as color:
   waiting is an outline, running a ring, done a filled check, failed a filled X, not run dotted, blocked dashed. */
.dots { display: inline-flex; align-items: center; gap: 4px; flex: none; margin-right: 8px; }
.dots-view { display: block; overflow: hidden; width: calc(var(--win) * 24px); }
.dots-strip { display: flex; transform: translateX(calc(var(--start) * -24px)); transition: transform .5s var(--x-ease); }
.dots-more { font: 600 11px/1 var(--x-data); color: var(--ink-strong); min-width: 24px; min-height: 24px; text-align: center; border: 0; background: none; padding: 0 4px; cursor: pointer; white-space: nowrap; }
.dots-more:hover { background: var(--surface-inset); }
.dots-more[hidden] { display: none; }
.dot { position: relative; width: 24px; height: 24px; flex: none; border: 0; border-radius: 50%; background: none; padding: 0; display: grid; place-items: center; cursor: pointer; color: #fff; }
.dot::before { content: ""; position: absolute; left: 5px; top: 5px; width: 14px; height: 14px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--grey-600); background: var(--grey-0);
  box-shadow: var(--inset, 0 0 0 0 transparent), var(--ring, 0 0 0 0 transparent); transition: background-color var(--x-dur), border-color var(--x-dur); }
.dot .ic { position: relative; z-index: 1; width: 10px; height: 10px; stroke-width: 2.5; }
.dot:hover::before { border-color: var(--grey-950); }
.dot.is-sens { --ring: 0 0 0 2px var(--grey-0), 0 0 0 3.5px var(--red-600); }
.dot.is-warn { --ring: 0 0 0 2px var(--grey-0), 0 0 0 3.5px var(--amber-700); }
.dot.rs-running::before, .dot.rs-finishing::before { border-color: var(--x-run); --inset: inset 0 0 0 2px var(--x-run); }
.dot.rs-running:not([data-still])::before { animation: x-blink-hi .9s steps(2, jump-none) 5; animation-delay: var(--bd, 0s); }
.dot.rs-done::before { border-color: var(--x-done); background: var(--x-done); }
.dot.rs-failed::before { border-color: var(--red-600); background: var(--red-600); }
.dot.rs-notrun::before, .dot.rs-stopped::before { border-style: dotted; }
.dot.rs-blocked::before { border-style: dashed; }
.dot[aria-pressed="true"]::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px dashed var(--primary); }
.dot:focus-visible { outline-offset: 0; }
@keyframes x-blink-hi { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.steps-peek { border-top: 1px dashed var(--hairline-strong); background: var(--surface-page); }
.plan-foot-min { border-top: 1px solid var(--hairline); padding: 10px 14px; display: grid; gap: 10px; background: var(--x-plan-head-bg); }
.step-no { font-size: 15px; color: var(--grey-950); }
.sens .step-no { outline: 1px solid var(--red-600); color: var(--red-600); outline-offset: 2px; width: max-content; padding: 0 2px; }
.step.sens-blocked .step-no { outline: 1px dashed var(--grey-600); color: var(--grey-700); }
.rs-done .step-no { color: var(--x-done); }
.tag { background: var(--red-600); color: #fff; }
.tag-blocked { background: none; color: var(--grey-700); box-shadow: inset 0 0 0 1px currentColor; }
.step.sens-blocked { outline: 2px dashed var(--grey-600); outline-offset: -5px; }
.step-conseq, .band { font-weight: 500; }
.step-conseq .ic, .band .ic { color: var(--red-600); }
.step.is-landed { background: var(--primary-soft); transition: background-color .3s; }
.seg { height: 6px; border-radius: 0; }
/* Long-running job: a plain bar, the step in words, the percent in figures */
.step-progress { display: grid; gap: 6px; font: 12.5px/1.4 var(--x-ui); color: var(--ink-body); max-width: 560px; }
.sp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sp-step { color: var(--ink-strong); min-width: 0; overflow-wrap: anywhere; }
.sp-pct { font: 600 13px/1 var(--x-data); font-variant-numeric: tabular-nums; color: var(--ink-strong); }
.sp-bar { height: 8px; background: var(--grey-200); position: relative; overflow: hidden; }
.step-progress .sp-bar i { display: block; height: 100%; width: 0; background: var(--x-run); border-radius: 0; transition: width .4s linear; }
.step-progress i::before, .step-progress i::after { display: none; }
.sp-note { margin: 0; font-size: 12px; color: var(--ink-muted); }
.plan-now-job { padding: 2px 14px 10px; background: var(--primary-soft); }
.btn-approve:not(:disabled) { box-shadow: 0 0 0 1px var(--primary), 0 0 16px -3px color-mix(in oklab, var(--primary) 60%, transparent); }
.btn-approve:not(:disabled):hover { box-shadow: 0 0 0 1px var(--primary-hover), 0 0 20px -2px color-mix(in oklab, var(--primary) 70%, transparent); }
.btn-sm { min-height: 28px; padding: 0 10px; font-size: 12px; }
.admin-contact { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 4px 0 0; padding: 10px 12px; background: var(--surface-inset); font-size: 13px; }
.followups { flex-wrap: wrap; }
.option-free { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; border-color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.option-free textarea { border: 0; outline: 0; min-width: 0; resize: none; background: none; font: 14px/1.4 var(--x-ui); color: var(--ink-strong); }
.report { border: 0; border-top: 4px solid var(--grey-950); padding-left: 0; padding-right: 0; background: transparent; }
.report-sec h3 { margin: 0; font: 700 12px/1.3 var(--x-ui); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-strong); padding-bottom: 6px; border-bottom: 2px solid var(--grey-950); }
.kpi-v { font-size: 28px; }
.toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); margin: 0; padding: 10px 16px; background: var(--grey-950); color: var(--grey-0); font-size: 13px; box-shadow: 4px 4px 0 var(--primary-deep); z-index: 20; max-width: calc(100% - 32px); animation: x-fade var(--x-dur) var(--x-ease); }

/* Review bar (mockup only) */
.review-bar { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between; padding: 5px 16px; font-size: 12px; color: var(--aero-muted); background: var(--aero-head); border-top: 1px solid var(--aero-line); }

/* Administration: one page, two layers, folder tree */
.ad-head { flex-wrap: wrap; }
.scope-line { margin: 0 0 0 auto; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; color: var(--ink-strong); }
.scope-l { color: var(--ink-muted); }
.linkish { border: 0; background: none; padding: 2px 0; color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 24px; }
.linkish:hover { color: var(--primary-hover); }
.ad-body-wide { max-width: none; }
.ad-split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.ad-split-3 { grid-template-columns: 240px 260px minmax(0, 1fr); }
.ad-tree, .ad-files { border: 1px solid var(--hairline-strong); padding: 10px; display: grid; gap: 10px; align-content: start; background: var(--surface-panel); }
.ad-filter { margin: 0; background: var(--grey-0); color: var(--ink-muted); }
.ad-filter input { color: var(--ink-strong); } .ad-filter input::placeholder { color: var(--ink-muted); }
.ad-scope { margin: 0; font-size: 12px; color: var(--ink-muted); }
.tree, .files { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.tree-row, .file { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px calc(var(--d, 0) * 16px + 8px); border: 0; background: none; text-align: left; font-size: 13px; color: var(--ink-body); }
.tree-row:hover, .file:hover { background: var(--grey-0); }
.tree-row.is-current, .file.is-current { background: var(--grey-950); color: var(--grey-0); }
.tree-row .ic, .file .ic { width: 14px; height: 14px; }
.tree-kind { margin-left: auto; font: 10px/1 var(--x-data); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); }
.tree-row.is-current .tree-kind, .tree-row.is-current .tree-count { color: var(--grey-300); }
.tree-count { font: 600 11px/1 var(--x-data); color: var(--ink-muted); }
.ad-list { display: grid; gap: 12px; align-content: start; }
.ad-h { margin: 0; font: 600 18px/1.25 var(--x-read); color: var(--ink-strong); }
.ad-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.tpl { list-style: none; margin: 0; padding: 0; border: 1px solid var(--hairline-strong); display: grid; }
.tpl button { width: 100%; display: flex; gap: 10px; align-items: center; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--hairline); background: var(--grey-0); text-align: left; }
.tpl button:hover { background: var(--primary-soft); }
.tpl-n { margin-left: auto; font: 12px/1 var(--x-data); color: var(--ink-muted); }
.std-list { list-style: none; margin: 0; padding: 0; border-top: 4px solid var(--grey-950); }
.std { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 8px; border-bottom: 1px solid var(--hairline); }
.std.is-off .std-text { color: var(--ink-muted); }
.std-n { font: 600 15px/22px var(--x-data); color: var(--grey-950); }
.std-kind { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; line-height: 22px; }
.std-kind.kind-rule { color: var(--primary); } .std-kind.kind-memory { color: var(--second); }
.std-text { font-size: 14.5px; line-height: 22px; color: var(--ink-strong); display: grid; gap: 2px; }
.std-count { font: 11px/1.3 var(--x-data); color: var(--ink-muted); }
.std-tools { display: inline-flex; gap: 2px; align-items: center; }
.std-tools .icon-btn:disabled { opacity: .3; cursor: default; }
.std-tools .switch { margin-left: 6px; }
.btn-block { width: 100%; }
.soon { margin-left: auto; font: 10px/1 var(--x-data); text-transform: uppercase; letter-spacing: .05em; color: var(--amber-700); background: var(--amber-50); padding: 3px 5px; }
.file.is-current .soon { background: var(--grey-800); color: var(--amber-100); }
.ad-editor { border: 1px solid var(--hairline-strong); min-height: 420px; display: flex; flex-direction: column; }
.editor-bar { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--hairline); background: var(--surface-panel); font-size: 12px; }
.editor-hint { color: var(--ink-muted); }
.editor { flex: 1; min-height: 380px; border: 0; resize: vertical; padding: 14px 16px; font: 13px/1.65 var(--x-data); color: var(--ink-strong); background: var(--grey-0); }
.circuit-soon { margin: auto; max-width: 360px; text-align: center; padding: 32px; display: grid; gap: 8px; justify-items: center; color: var(--ink-muted); }
.circuit-soon h3 { margin: 0; font: 600 18px/1.2 var(--x-read); color: var(--ink-strong); }
.circuit-soon .ic { width: 28px; height: 28px; color: var(--amber-700); }
.general { display: grid; gap: 12px; max-width: 520px; }
.guide .g-thread { gap: 12px; }
.g-msg { display: flex; }
.g-msg p { margin: 0; padding: 9px 12px; max-width: 88%; font-size: 14.5px; line-height: 1.5; }
.g-relay p { background: var(--grey-50); border: 1px solid var(--grey-200); box-shadow: -3px 3px 0 var(--grey-200); }
.g-user { justify-content: flex-end; }
.g-user p { background: var(--primary); color: #fff; box-shadow: 3px 3px 0 var(--primary-deep); }
.g-draft { border: 1px solid var(--hairline-strong); border-top: 4px solid var(--grey-950); padding: 12px; display: grid; gap: 6px; background: var(--grey-0); }
.g-draft p { margin: 0; font: 15px/1.5 var(--x-read); color: var(--ink-strong); }
.g-compose { display: flex; gap: 8px; width: 100%; }
.g-compose input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--hairline-strong); font: inherit; }
.doc { max-width: 68ch; }
.doc h2 { font: 600 24px/1.25 var(--x-read); margin: 0 0 12px; color: var(--ink-strong); }
.doc h3 { font: 600 17px/1.3 var(--x-read); margin: 22px 0 8px; color: var(--ink-strong); }
.doc p, .doc li { font-size: 15.5px; line-height: 1.65; }
.doc ul { padding-left: 20px; }
@media (max-width: 1100px) { .ad-split-3 { grid-template-columns: 220px minmax(0, 1fr); } .ad-editor { grid-column: 1 / -1; } }
@media (max-width: 860px) {
  .ad-split, .ad-split-3 { grid-template-columns: minmax(0, 1fr); }
  .sens-chip { order: 3; } .scope-line { margin-left: 0; width: 100%; }
  .std-tools { flex-wrap: wrap; }
  .review-bar { font-size: 11px; }
}

.sheet.no-enter, .scrim.no-enter { animation: none; }
.rl-find:focus-within { outline: 2px solid var(--primary-light); outline-offset: 1px; }
.ad-filter:focus-within { outline: 2px solid var(--primary); outline-offset: 1px; }
.chip.st-question { background: var(--amber-50); } .chip.st-question .ic { color: var(--amber-700); }
.plan-status.st-approval .ic { color: var(--primary); }

/* Rail: per-session menu, archive view, export, the Sevrak endorsement */
.rl-item { padding-right: 8px; }
.rl-pin { right: 30px; }
.rl-more { position: absolute; right: 6px; top: 8px; width: 24px; height: 24px; display: grid; place-items: center; border: 0; background: none; color: var(--grey-400); opacity: 0; }
.rl-more .ic { width: 14px; height: 14px; }
.rl-li:hover .rl-more, .rl-more:focus-visible, .rl-more[aria-expanded="true"] { opacity: 1; }
.rl-more:hover, .rl-more[aria-expanded="true"] { color: var(--grey-0); }
.rl-menu { position: absolute; right: 6px; top: 34px; z-index: 6; min-width: 190px; display: grid; background: var(--grey-0); color: var(--grey-950); border: 1px solid var(--grey-950); box-shadow: 4px 4px 0 var(--grey-800); }
.rl-menu button { display: flex; gap: 8px; align-items: center; padding: 9px 12px; border: 0; background: none; text-align: left; font: 13px/1.2 var(--x-ui); color: inherit; }
.rl-menu button:hover, .rl-menu button:focus-visible { background: var(--primary-soft); }
.rl-menu button.is-danger { color: var(--red-600); }
.rl-menu .ic { width: 14px; height: 14px; }
.rl-view { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px 0; font: 600 11px/1.2 var(--x-data); letter-spacing: .06em; text-transform: uppercase; color: var(--grey-400); }
.rl-view button { border: 0; background: none; padding: 2px 0; font: 500 12px/1.2 var(--x-ui); letter-spacing: 0; text-transform: none; color: var(--primary-light); }
.rl-view button:hover { color: var(--grey-0); text-decoration: underline; }
.rl-empty { margin: 16px 8px; font-size: 13px; color: var(--grey-400); }
.rl-foot { display: grid; grid-template-columns: 1fr auto; gap: 2px 4px; }
.rl-foot .rl-export { grid-column: 1 / -1; }
.rl-foot-btn:disabled { opacity: .45; cursor: default; background: none; }
.rl-endorse { grid-column: 1 / -1; justify-self: start; height: 18px; width: auto; opacity: .6; margin: 18px 10px 10px; }
.rl-item.st-rejected .rl-item-ic, .rl-item.st-cancelled .rl-item-ic { color: var(--grey-300); }
.rl-key .k-warn .ic { color: var(--amber-400); }
@media (max-width: 860px) { .rl-more { opacity: 1; } }

/* Look-up: the one plain line that says where values came from */
.look-line { margin: 0; color: var(--ink-strong); font: 14px/1.5 var(--x-read); }

/* Held back: items the plan leaves alone, and why */
.held { border-top: 2px solid var(--amber-400); border-bottom: 1px solid var(--hairline-strong); }
.held-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px 6px; font: 600 12px/1.2 var(--x-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-strong); }
.held-head .ic { color: var(--amber-700); width: 16px; height: 16px; }
.held-list { list-style: none; margin: 0; padding: 0 12px 6px; display: grid; gap: 2px; }
.held-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 3px 0; font-size: 13px; }
.held-list .ic { width: 14px; height: 14px; color: var(--ink-muted); }
.held-name { color: var(--ink-strong); }
.held-owner { font: 12px/1.3 var(--x-data); color: var(--ink-muted); }
@media (max-width: 560px) { .held-list li { grid-template-columns: 18px minmax(0, 1fr); } .held-owner { grid-column: 2; } }

/* Plan flags: Sensitive (red), instance-level, live dependents (yellow), finishing after a cancel */
.warn-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--grey-950); background: var(--amber-100); white-space: nowrap; font-family: var(--x-data); }
.warn-chip .ic { width: 12px; height: 12px; color: var(--amber-700); }
.tag-inst { background: none; color: var(--ink-strong); box-shadow: inset 0 0 0 1px var(--grey-950); }
.tag-warn { background: var(--amber-100); color: var(--grey-950); }
.tag-warn .ic { color: var(--amber-700); }
.step-warn, .step-note { margin: 0 14px 10px 144px; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; font-size: 13px; max-width: 72ch; }
.step-warn { background: var(--amber-50); color: var(--grey-950); box-shadow: inset var(--x-step-edge) 0 0 var(--amber-400); }
.step-warn .ic { color: var(--amber-700); flex: none; margin-top: 2px; }
.step-note { background: var(--surface-inset); color: var(--ink-body); box-shadow: inset var(--x-step-edge) 0 0 var(--x-op-read); }
.step-note .ic { color: var(--x-op-read); flex: none; margin-top: 2px; }
.rs-finishing .step-state { color: var(--ink-strong); } .rs-finishing .step-state .ic { color: var(--x-run); }
.band-inst { background: var(--surface-inset); box-shadow: inset var(--x-step-edge) 0 0 var(--grey-950); font-weight: 500; }
.band-inst .ic { color: var(--grey-950); }
.band + .band { margin-top: -4px; }
.sens-note, .cancel-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 12.5px; color: var(--ink-muted); }
.sens-note .ic { color: var(--red-600); flex: none; margin-top: 1px; width: 14px; height: 14px; }
.cancel-note .ic { color: var(--x-op-read); flex: none; margin-top: 1px; width: 14px; height: 14px; }
.chip.st-cancelled, .chip.st-rejected { background: var(--surface-inset); }

/* Confirm before approving: near matches the person must settle */
.confirm { border: 1px solid var(--amber-400); background: var(--amber-50); padding: 10px 12px; display: grid; gap: 10px; }
.confirm-h { display: flex; gap: 8px; align-items: center; margin: 0; font-weight: 700; font-size: 13px; color: var(--grey-950); }
.confirm-h .ic { color: var(--amber-700); }
.confirm-row { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid color-mix(in oklab, var(--amber-400) 45%, transparent); }
.confirm-q { margin: 0; font-size: 13px; color: var(--ink-body); overflow-wrap: anywhere; }
.confirm-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; }
.confirm-opts .option { background: var(--grey-0); }
.confirm-opts .option[aria-pressed="true"] { border-color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); background: var(--primary-soft); }
.confirm-opts .option-s { overflow-wrap: anywhere; }

/* Standards: name, copy to scope, promote */
.std-name { font-size: 12px; color: var(--ink-muted); }
.std-tools { flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.std-pop { grid-column: 1 / -1; border: 1px solid var(--grey-950); background: var(--grey-0); padding: 8px; display: grid; gap: 6px; font-size: 13px; }
.std-pop p { margin: 0; color: var(--ink-muted); }
.std-pop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.std-pop button { width: 100%; display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 0; background: none; text-align: left; color: var(--ink-body); }
.std-pop button:hover { background: var(--primary-soft); }
.std-pop .ic { width: 14px; height: 14px; }

/* Skills: version and Enabled */
.skill-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; }
.skill-v { font: 12px/1 var(--x-data); color: var(--ink-muted); }
.switch-l { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink-strong); cursor: pointer; }
.switch-l .switch { margin-top: 0; }

/* General: AI connection */
.ai-own { display: grid; gap: 12px; padding: 12px; border-left: 3px solid var(--primary); background: var(--surface-panel); }
.ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.ai-trace { padding-bottom: 8px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-strong); }
.check input { margin-top: 2px; accent-color: var(--primary); }
.tbl-ad tr.is-off th .mono, .tbl-ad tr.is-off .cell-url, .tbl-ad tr.is-off .cell-sub, .tbl-ad tr.is-off .badge { color: var(--ink-muted); }
.tbl-ad tr.is-off .badge .ic { color: var(--ink-muted); }
@media (max-width: 1100px) { .step-warn, .step-note { margin-left: 76px; } }
@media (max-width: 860px) {
  .step-warn, .step-note { margin-left: 14px; }
  /* The step count lives in the plan meta, so it stays visible on narrow screens too. */
  .plan-toggle .plan-meta { display: inline; font-size: 12px; }
}
.ad-body > * { min-width: 0; }
.tbl-wrap { position: relative; }

/* ================= Review round C: approval record, partial done, strip, rail states, accessibility ================= */
/* Rail: title wraps, time on the sub line, state glyphs with their own shapes */
.rl-item { grid-template-columns: 20px minmax(0, 1fr); }
.rl-item-title { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; padding-right: 48px; }
.rl-item-sub { overflow-wrap: anywhere; }
.rl-item-when { font-size: 11px; padding-top: 0; color: inherit; white-space: nowrap; }
.rl-item.is-current .rl-item-sub { opacity: 1; color: var(--grey-300); }
.rl-item.st-approval .rl-item-ic { color: var(--primary-light); --await-check: var(--grey-950); }
.rl-item.st-approval .rl-state { color: var(--primary-light); font-weight: 600; }
.rl-item.st-partial .rl-item-ic { color: var(--amber-400); }
.rl-item.st-cancelled .rl-item-ic .ic { width: 16px; height: 16px; }
.rl-item.st-running .rl-item-ic .ic { color: var(--primary-light); }
.rl-item.st-running .rl-item-ic .ic, .rl-item .ic { animation: none; }
.rl-item.st-running .rl-item-ic:not([data-still]) .ic { animation: x-blink-rail .9s steps(2, jump-none) 5; animation-delay: var(--bd, 0s); }
@keyframes x-blink-rail { 0%, 100% { opacity: 1; } 50% { opacity: .75; } }
.rl-key .k-await .ic { color: var(--primary-light); --await-check: var(--grey-950); } .rl-key .k-partial .ic { color: var(--amber-400); }
.rl-key .k-answer .ic, .rl-key .k-cancel .ic { color: var(--grey-300); }
.rl-key .ic { animation: none; }
.rl-rail :focus-visible { outline-color: var(--grey-0); }
.rl-find:focus-within { outline-color: var(--grey-0); }
.rl-brand { display: flex; align-items: center; justify-content: space-between; }
.rl-close { display: none; color: var(--grey-100); }
.rl-close:hover { background: var(--grey-850); color: var(--grey-0); }
.rail-scrim { display: none; }
.rl-pin, .rl-more { min-width: 24px; min-height: 24px; }

/* Header chip: state glyph and words; red for a failure; amber for done with a failed step */
.chip .ic-await { color: var(--primary); }
.chip.st-running .ic { color: var(--x-run); }
.chip.st-failed { background: var(--red-50); } .chip.st-failed .ic { color: var(--red-600); }
.chip.st-partial { background: var(--amber-50); } .chip.st-partial .ic { color: var(--amber-700); }
.chip.st-done .ic { color: var(--x-done); }
.chip .ic, .plan-status .ic, .rs-running .step-state .ic, .rs-finishing .step-state .ic { animation: none !important; }
.plan-status .ic-await, .plan-status .ic-run-disc { color: var(--primary); }
.plan-status.st-running { background: var(--primary-soft); }
.rs-running .step-state .ic, .rs-finishing .step-state .ic { color: var(--x-run); }

/* The record of who approved, discarded or cancelled, and when; the one line saying what is running now */
.plan-record { margin: 0; display: flex; gap: 8px; align-items: flex-start; padding: 7px 14px; border-top: 1px solid var(--hairline); background: var(--x-plan-head-bg); font: 12.5px/1.45 var(--x-data); color: var(--ink-strong); }
.plan-record .ic { width: 14px; height: 14px; margin-top: 1px; color: var(--ink-muted); flex: none; }
.plan-now { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--ink-strong); background: var(--primary-soft); }
.plan-now-l { font-weight: 700; }
.plan-meta { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }

/* Dependents of a delete, shown in the step row without expanding it */
.step-deps { margin: 0 14px 10px 144px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; color: var(--ink-body); max-width: 72ch; }
.step-deps-l { font-weight: 700; color: var(--ink-strong); }
.dep { display: inline-flex; gap: 6px; align-items: center; padding: 2px 8px; background: var(--surface-inset); box-shadow: inset 0 0 0 1px var(--hairline-strong); }
.dep .ic { width: 12px; height: 12px; color: var(--ink-muted); }
.dep.dep-open { background: var(--red-600); color: #fff; box-shadow: none; } .dep.dep-open .ic { color: #fff; }
.step-deps-rest { color: var(--ink-muted); }
.step-error { display: flex; }
.step-error > div { display: grid; gap: 8px; }
.step-error p { margin: 0; }
.step-error-links { display: flex; flex-wrap: wrap; gap: 6px; }
.step-error-links .btn { white-space: normal; text-align: left; min-height: 32px; height: auto; padding-top: 4px; padding-bottom: 4px; }
.rs-notrun .step-op { opacity: 1; }
@media (max-width: 1100px) { .step-deps { margin-left: 76px; } }
@media (max-width: 860px) { .step-deps { margin-left: 14px; } }

/* Cancel execution asks first */
.stop-confirm { display: grid; gap: 10px; padding: 10px 12px; background: var(--surface-inset); box-shadow: inset var(--x-step-edge) 0 0 var(--grey-950); }
.stop-confirm p { margin: 0; font-size: 13px; color: var(--ink-body); }

/* Status lines Relay adds, which can take focus */
.say-status:focus-visible, .turn[tabindex]:focus-visible { outline-offset: 4px; }
.say-status .btn { margin-left: 8px; vertical-align: middle; }
.turn:focus { outline: none; } .turn:focus-visible { outline: 2px solid var(--focus-ring); }
.run-note { display: inline-flex; align-items: center; gap: 8px; }
.run-note .working-dots i { width: 5px; height: 5px; }
.run-note[data-still] .working-dots i { animation: none; }
.run-note:not([data-still]) .working-dots i { animation-delay: var(--bd, 0s); }

/* The strip that points at the action waiting off screen */
.needs-strip { position: relative; z-index: 4; max-width: 880px; width: calc(100% - 48px); align-self: center; margin: 0 24px 10px; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; background: var(--grey-950); color: var(--grey-0); box-shadow: 4px 4px 0 var(--primary-deep); font-size: 13px; }
.needs-strip[hidden] { display: none; }
.needs-strip > .ic { color: var(--primary-light); --await-check: var(--grey-950); }
.needs-strip .ic-failed { color: #F08C88; }
.ns-text { flex: 1; min-width: 0; }
.ns-review { background: var(--grey-0); color: var(--grey-950); border-color: var(--grey-0); min-height: 28px; }
.ns-review:hover { background: var(--primary-soft); }
.needs-strip :focus-visible { outline-color: var(--grey-0); }

/* Results: a set of created objects opens to one link per object */
.result-group { display: grid; gap: 6px; }
.result-group > .result { text-align: left; cursor: pointer; }
.result-kids { list-style: none; margin: 0; padding: 0 0 0 12px; display: grid; gap: 2px; border-left: 2px solid var(--hairline); }
.result-kid { display: inline-flex; align-items: center; gap: 8px; padding: 3px 6px; color: var(--ink-strong); text-decoration: none; font-size: 13px; min-height: 24px; }
.result-kid:hover { text-decoration: underline; }
.result-kid .ic { width: 14px; height: 14px; color: var(--x-accent); }

/* Look-up chips: the first eight, then the rest on request */
.look-chips li.look-more-li { padding: 0; background: none; border: 0; }
.look-more { font: 600 12px/18px var(--x-data); padding: 1px 8px; min-height: 24px; border: 1px solid var(--grey-950); background: var(--grey-0); color: var(--ink-strong); cursor: pointer; }
.look-more:hover { background: var(--primary-soft); }

/* Toggles: off is a white track with a dark edge; on is cobalt; both say so in a word */
.tgl { position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; min-height: 24px; }
.tgl input { position: absolute; left: 0; top: 2px; width: 36px; height: 20px; margin: 0; opacity: 0; cursor: pointer; }
.tgl i { position: relative; width: 36px; height: 20px; border-radius: 10px; background: var(--grey-0); box-shadow: inset 0 0 0 1.5px var(--grey-600); flex: none; transition: background var(--x-dur); }
.tgl i::after { content: ""; position: absolute; top: 4px; left: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--grey-600); transition: transform var(--x-dur) var(--x-ease); }
.tgl input:checked + i { background: var(--primary); box-shadow: none; }
.tgl input:checked + i::after { background: var(--grey-0); transform: translateX(16px); }
.tgl input:focus-visible + i { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.tgl-l { font: 600 11px/1 var(--x-data); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); min-width: 2.2em; }
.tgl-l::before { content: "Off"; }
.tgl input:checked ~ .tgl-l { color: var(--ink-strong); } .tgl input:checked ~ .tgl-l::before { content: "On"; }

/* Unsaved changes */
.dirty-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 12px; background: var(--amber-50); border-top: 1px solid var(--amber-400); font-size: 13px; color: var(--grey-950); }
.dirty-bar > span { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; margin-right: auto; }
.dirty-bar .ic { color: var(--amber-700); }
.general .dirty-bar { border: 1px solid var(--amber-400); }

/* Tabs scroll on narrow screens, with a fade at the right edge */
.ad-tabs button { min-height: 44px; }
.tree .tree { margin: 0; padding: 0; list-style: none; }
.tree-static { color: var(--ink-muted); cursor: default; }
.tree-static:hover { background: none; }

/* Templates sheet */
.tpl-body { gap: 12px; }
.tpl-card { border: 1px solid var(--hairline-strong); border-top: 4px solid var(--grey-950); padding: 12px; display: grid; gap: 8px; justify-items: start; background: var(--grey-0); }
.tpl-card h3 { margin: 0; font: 600 16px/1.3 var(--x-read); color: var(--ink-strong); }
.tpl-item { margin: 0; display: grid; gap: 2px; font-size: 14px; color: var(--ink-body); }

/* Focus you can see on every field */
.editor:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.option-free:focus-within, .composer:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Charts: Apache ECharts on a canvas that fills the figure and follows its width */
.chart { padding: 40px 12px 8px; }
.report .chart { padding: 36px 0 0; }
.ec { width: 100%; min-width: 0; position: relative; }
.chart .tbl-wrap { margin-top: 4px; }

/* Cancelled asks: the line says who and when; a plan can be restored */
.say-cancelled { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--ink-strong); }
.say-cancelled > .ic { color: var(--grey-600); flex: none; }
.say-cancelled .btn { margin-left: 4px; }
.clarify-foot { display: flex; justify-content: flex-start; }
.clarify.is-cancelled .option { opacity: 1; background: var(--surface-inset); }
.clarify.is-cancelled .option-l, .clarify.is-cancelled .option-s { color: var(--ink-muted); }

/* About */
.about { max-width: 760px; padding: 0; gap: 0; background: var(--grey-0); border: 0; border-top: 4px solid var(--grey-950); border-bottom: 1px solid var(--grey-950); }
.about-hero { display: grid; gap: 12px; padding: 28px 24px 24px; border-bottom: 2px solid var(--grey-950); background: var(--grey-25); }
.about-lockup svg { height: 44px; }
.about-ver { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font: 12px/1.4 var(--x-data); color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; }
.about-ver b { color: var(--ink-strong); font-weight: 600; }
.about-what { margin: 4px 0 0; max-width: 58ch; font: 17px/1.55 var(--x-read); color: var(--ink-strong); }
.about-rows { margin: 0; display: grid; }
.about-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 24px; padding: 16px 24px; border-bottom: 1px solid var(--hairline); }
.about-row:last-child { border-bottom: 0; }
.about-row dt { display: flex; gap: 8px; align-items: flex-start; font: 700 12px/1.4 var(--x-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-strong); padding-top: 2px; }
.about-row dt .ic { width: 16px; height: 16px; color: var(--x-op-read); flex: none; }
.about-row dd { margin: 0; display: grid; gap: 6px; font-size: 14px; line-height: 1.55; color: var(--ink-body); min-width: 0; }
.about-row dd p { margin: 0; }
.about-sub { color: var(--ink-muted); }
.about-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.about-contact .mono { overflow-wrap: anywhere; }
.about-endorse { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-top: 2px solid var(--grey-950); font-size: 12px; color: var(--ink-muted); }
.about-endorse img { height: 20px; width: auto; opacity: .7; }
@media (max-width: 560px) {
  .about-hero { padding: 20px 16px; } .about-lockup svg { height: 36px; }
  .about-row { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .about-endorse { padding: 12px 16px; }
}

/* Host header reflows at 320 */
.host-search { width: auto; flex: 0 1 240px; min-width: 0; overflow: hidden; }
.host-crumb, .host-sep { white-space: nowrap; }

@media (max-width: 860px) {
  .rl-rail { visibility: hidden; transition: transform var(--x-dur) var(--x-ease), visibility 0s linear var(--x-dur); }
  body.rail-open .rl-rail { visibility: visible; transition: transform var(--x-dur) var(--x-ease), visibility 0s; }
  body.rail-open .rail-scrim { display: block; position: absolute; inset: 0; z-index: 4; background: rgba(0, 0, 0, .4); }
  .rl-close { display: inline-grid; }
  .host-search { width: auto; }
  .chip { display: inline-flex; padding: 4px 6px; }
  .chip-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ad-tabs { -webkit-mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 28px; }
  .tab-more { display: none; }
  .needs-strip { margin: 0 12px 8px; width: calc(100% - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  .working-dots i { animation: none !important; opacity: 1 !important; }
  .step-progress .sp-bar i { transition: none; }
}

/* Skip link: the first tab stop, visible when focused */
.skip-link { position: absolute; left: 8px; top: -48px; z-index: 60; padding: 8px 12px; background: var(--grey-950); color: var(--grey-0); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 8px; outline: 2px solid var(--primary-light); outline-offset: 2px; }

/* Standards: the text takes the row; actions sit on their own line under it */
.std { grid-template-columns: 96px minmax(0, 1fr); }
.std-tools { grid-column: 2; justify-content: flex-start; }
@media (max-width: 860px) { .std { grid-template-columns: minmax(0, 1fr); } .std-tools { grid-column: 1; } }
/* Plan meta: each segment stays on one line */
.plan-meta .pm { white-space: nowrap; }
.rl-key .k-reject .ic { color: var(--grey-300); }
.plan-now-job .step-progress { margin: 0; }
/* Follow-up actions wrap their label on narrow screens instead of running off the side */
.followups .btn { max-width: 100%; white-space: normal; text-align: left; padding-top: 6px; padding-bottom: 6px; }
.followups .btn .ic { flex: none; }
/* Charts shrink with the stream: the canvas never props its figure open */
.chart { min-width: 0; max-width: 100%; }
.ec { contain: inline-size; overflow: hidden; }
.say-cancelled > span { flex: 1 1 14em; min-width: 0; }
/* QC-V3: the chart toggle looks pressed while the table shows; buttons in status lines use the label face */
.chart-view.is-on { background: var(--primary-soft); color: var(--ink-strong); box-shadow: inset 0 0 0 1px var(--primary); }
.chart-view.is-on .ic { color: var(--primary); }
.say-status .btn { font-family: var(--x-ui); }
.say-restored { margin-top: -4px; color: var(--ink-muted); }
.say-restored > .ic { color: var(--x-op-read); }
