  /* Layout: sticky brand bar + five focused tabs; Overview opens on a deep-purple progress hero,
     every detail lives in a right-hand slide-over so no view gets crowded. */
  :root {
    --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f7f7fa; --line: #e5e4ed; --line-2: #cecbdc;
    --ink: #1c0f33; --muted: #5d5373; --faint: #6e637c;
    --brand: #5b2aa6; --brand-strong: #3d1870; --brand-soft: #f1edf7; --lav: #a98ae8;
    --green: #14783c; --green-soft: #e4f6ea; --on-brand: #ffffff;
    --good: #14783c; --warn: #8f550c; --crit: #b82a49; --idle: #6e637c;
    --c-emp: #a13270; --c-doc: #7142bd; --c-dec: #b82a49; --c-conv: #8f550c; --c-man: #236aa7; --c-oth: #6e637c;
    --hero-1: #230b42; --hero-2: #3a166e; --hero-3: #5c2bab;
    --shadow: 0 1px 2px rgba(28,15,51,.04), 0 12px 32px rgba(28,15,51,.06);
    /* The platform UI font (Segoe UI on Windows, SF on macOS): no third-party font request. */
    --f: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #110a1d; --surface: #1a1229; --surface-2: #150e23; --line: #2b2140; --line-2: #3d3058;
      --ink: #f2edfb; --muted: #b6abcf; --faint: #877ba3;
      --brand: #a17cf0; --brand-strong: #d2bffb; --brand-soft: #2a1d45; --lav: #bba2f4;
      --green: #41cf75; --green-soft: #15301f; --on-brand: #160c28;
      --good: #47cf7c; --warn: #e8a947; --crit: #f07391; --idle: #9a92b3;
      --c-emp: #e070ac; --c-doc: #a888f2; --c-dec: #f07391; --c-conv: #eba84a; --c-man: #5aa6e6; --c-oth: #a29bb8;
      --hero-1: #1a0832; --hero-2: #2c1156; --hero-3: #4a2392;
      --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 36px rgba(0,0,0,.35);
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --bg: #110a1d; --surface: #1a1229; --surface-2: #150e23; --line: #2b2140; --line-2: #3d3058;
    --ink: #f2edfb; --muted: #b6abcf; --faint: #877ba3;
    --brand: #a17cf0; --brand-strong: #d2bffb; --brand-soft: #2a1d45; --lav: #bba2f4;
    --green: #41cf75; --green-soft: #15301f; --on-brand: #160c28;
    --good: #47cf7c; --warn: #e8a947; --crit: #f07391; --idle: #9a92b3;
    --c-emp: #e070ac; --c-doc: #a888f2; --c-dec: #f07391; --c-conv: #eba84a; --c-man: #5aa6e6; --c-oth: #a29bb8;
    --hero-1: #1a0832; --hero-2: #2c1156; --hero-3: #4a2392;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 36px rgba(0,0,0,.35);
    color-scheme: dark;
  }

  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f); font-size: 14.5px; line-height: 1.45;
    font-variant-numeric: tabular-nums; }
  .wrap { max-width: 1680px; margin: 0 auto; padding-inline: 24px; }
  @media (min-width: 1500px) { .wrap { padding-inline: 40px; } }
  @media (max-width: 480px) { .wrap { padding-inline: 16px; } }
  h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
  button, select, textarea, input { font: inherit; color: inherit; }
  :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
  .ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round; }
  .ic.sm { width: 15px; height: 15px; }
  .ic.lg { width: 22px; height: 22px; }
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* ---------- header ---------- */
  header.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); }
  .bar-in { display: flex; align-items: center; gap: 14px; padding-block: 11px; }
  .brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
  .wm { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
  .wm b { font-size: 15px; font-weight: 700; white-space: nowrap; }
  .wm span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sp { flex: 1; }
  .ava { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff;
    font-size: 12px; font-weight: 700; background: linear-gradient(135deg, var(--hero-3), #b3417f); }
  .iconbtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
    display: grid; place-items: center; cursor: pointer; color: var(--ink); flex: none; }
  .iconbtn:hover { border-color: var(--brand); color: var(--brand); }

  /* ---------- tabs ---------- */
  nav.tabs { display: flex; gap: 4px; padding: 5px; margin: 20px 0 16px; background: var(--surface);
    border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; box-shadow: var(--shadow); }
  nav.tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: max-content;
    border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 600;
    padding: 9px 14px; border-radius: 10px; white-space: nowrap; }
  nav.tabs button:hover { color: var(--ink); background: var(--surface-2); }
  nav.tabs button[aria-selected="true"] { background: var(--brand); color: var(--on-brand); }
  nav.tabs .cnt { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
    background: color-mix(in srgb, var(--crit) 16%, transparent); color: var(--crit); }
  nav.tabs button[aria-selected="true"] .cnt { background: rgba(255,255,255,.22); color: inherit; }

  .banner { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 16px;
    padding: 9px 14px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--surface-2); }
  .banner b { color: var(--ink); }

  /* ---------- layout ---------- */
  .stack { display: flex; flex-direction: column; gap: 16px; }
  .grid { display: grid; gap: 16px; }
  .grid > * { min-width: 0; }
  .k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .c21 { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
  .c12 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
  .c11 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  @media (max-width: 980px) { .k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .c21, .c12 { grid-template-columns: minmax(0, 1fr); } }
  @media (max-width: 760px) { .c11, .k3 { grid-template-columns: minmax(0, 1fr); } }
  @media (max-width: 480px) { .k4 { grid-template-columns: minmax(0, 1fr); } }

  .card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
  .ch { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
  .ch .badge-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
    background: var(--brand-soft); color: var(--brand); }
  .ch .t { min-width: 0; flex: 1; }
  .ch h2 { font-size: 16.5px; font-weight: 700; }
  .ch p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
  .ch .act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

  .btn { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; padding: 8px 14px;
    border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
  .btn:hover { border-color: var(--brand); color: var(--brand); }
  .btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
  .btn.primary:hover { filter: brightness(1.08); color: var(--on-brand); }
  .btn.small { font-size: 12.5px; padding: 6px 10px; }
  .link { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0; cursor: pointer;
    color: var(--brand); font-size: 13px; font-weight: 600; }
  .link:hover { text-decoration: underline; }

  /* ---------- hero ---------- */
  .hero { position: relative; overflow: hidden; border-radius: 22px; padding: 26px; color: #fff;
    background: radial-gradient(90% 140% at 100% 0%, color-mix(in srgb, var(--hero-3) 90%, #a98ae8) 0%, transparent 60%),
                linear-gradient(125deg, var(--hero-1) 0%, var(--hero-2) 60%, var(--hero-3) 100%); }
  .hero::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 280px; height: 280px; border-radius: 50%;
    border: 36px solid rgba(43,178,76,.18); pointer-events: none; }
  .hero-top { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
  @media (max-width: 860px) { .hero-top { grid-template-columns: minmax(0, 1fr); } }
  .h-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.72); }
  .h-big { font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -.03em; margin-top: 8px; }
  .h-big small { font-size: 30px; font-weight: 700; margin-left: 2px; color: rgba(255,255,255,.8); }
  .h-sub { margin-top: 8px; font-size: 15px; color: rgba(255,255,255,.82); }
  .h-sub b { color: #fff; }
  .segbar { position: relative; z-index: 1; display: flex; height: 14px; border-radius: 8px; overflow: hidden; margin-top: 22px;
    background: rgba(255,255,255,.12); }
  .segbar i { display: block; height: 100%; }
  .segbar i + i { border-left: 2px solid var(--hero-2); }
  .seglegend { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: 13px; color: rgba(255,255,255,.8); }
  .seglegend span { display: inline-flex; align-items: center; gap: 7px; }
  .seglegend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
  .seglegend b { color: #fff; font-weight: 700; }

  /* ---------- KPI ---------- */
  .kpi { display: flex; flex-direction: column; gap: 6px; }
  .kpi .top { display: flex; align-items: center; gap: 10px; }
  .kpi .top .badge-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
    background: var(--brand-soft); color: var(--brand); }
  .kpi .lab { font-size: 13.5px; font-weight: 600; color: var(--muted); flex: 1; }
  .kpi .big { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin-top: 6px; }
  .kpi .sub { font-size: 13px; color: var(--muted); }
  .kpi .sub b { color: var(--ink); font-weight: 700; }

  /* ---------- branched pipeline ---------- */
  .flowscroll { overflow-x: auto; padding: 4px 2px 6px; }
  .flow { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); min-width: 780px; }
  .node { position: relative; text-align: center; padding: 0 8px; }
  .node::before { content: ""; position: absolute; top: 27px; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 50%, var(--green))); }
  .node.first::before { left: 50%; }
  .node.last::before { right: 50%; background: color-mix(in srgb, var(--brand) 50%, var(--green)); }
  .bubble { position: relative; z-index: 1; width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
    background: var(--surface); color: var(--brand); border: 2.5px solid var(--brand); box-shadow: 0 0 0 6px var(--surface); }
  .node.last .bubble { background: var(--green); border-color: var(--green); color: #fff; }
  .node.slow .bubble { border-color: var(--warn); color: var(--warn); }
  .node .nl { font-size: 13.5px; font-weight: 700; margin-top: 12px; }
  .node .nn { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin-top: 2px; }
  .node .np { font-size: 12px; color: var(--faint); }
  .node .np.warn { color: var(--warn); font-weight: 600; }
  .branch { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 6px; }
  .drop { width: 0; height: 18px; border-left: 2px dashed var(--line-2); }
  .echip { --c: var(--crit); display: flex; align-items: center; gap: 7px; width: 100%; max-width: 200px; text-align: left;
    padding: 7px 10px; border-radius: 11px; cursor: pointer; font-size: 12.5px;
    border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 8%, var(--surface)); }
  .echip:hover { background: color-mix(in srgb, var(--c) 15%, var(--surface)); }
  .echip .ic { color: var(--c); }
  .echip span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
  .echip b { font-weight: 700; color: var(--c); }
  .echip.neutral { --c: var(--brand); cursor: default; }

  /* ---------- throughput ---------- */
  .pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
  .pill { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2);
    border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
  .pill .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
  .pill b { color: var(--ink); font-size: 15px; font-weight: 700; }
  .seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
  .seg button { border: 0; background: transparent; cursor: pointer; font-size: 12.5px; font-weight: 600; padding: 5px 11px;
    border-radius: 7px; color: var(--muted); }
  .seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
  .chartbox { position: relative; height: 270px; width: 100%; }
  .chartbox.md { height: 230px; }

  /* ---------- timeline ---------- */
  .tl { display: flex; flex-direction: column; }
  .tli { --c: var(--brand); position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
  .tli:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--line); }
  .tli .ti { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--c);
    background: color-mix(in srgb, var(--c) 13%, transparent); }
  .tli b { display: block; font-size: 14px; font-weight: 600; }
  .tli span { display: block; font-size: 12.5px; color: var(--muted); }
  .tli time { display: block; font-size: 12px; color: var(--faint); margin-top: 2px; }

  /* ---------- errors ---------- */
  .donut { position: relative; height: 260px; }
  .donut .ctr { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
  .donut .ctr b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
  .donut .ctr span { font-size: 12.5px; color: var(--muted); }
  .elist { display: flex; flex-direction: column; gap: 6px; }
  .erow { --c: var(--crit); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px;
    border: 1px solid var(--line); border-radius: 14px; padding: 4px 8px 4px 4px; background: var(--surface); }
  .erow:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
  .erow-main { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; text-align: left;
    border: 0; background: transparent; cursor: pointer; padding: 8px 6px; border-radius: 10px; }
  .erow-main .ei { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--c);
    background: color-mix(in srgb, var(--c) 13%, transparent); }
  .erow-main .en { min-width: 0; }
  .erow-main .en b { display: block; font-size: 14px; font-weight: 600; }
  .erow-main .en small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .erow-main .ec { font-size: 16px; font-weight: 800; }
  .trend { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--good); }
  .trend.up { color: var(--crit); }
  @media (max-width: 560px) { .erow-main { grid-template-columns: 38px minmax(0, 1fr) auto; } .erow-main .trend { display: none; } }

  /* ---------- data quality ---------- */
  .gap { display: flex; flex-direction: column; gap: 6px; }
  .gap .top { display: flex; align-items: center; gap: 10px; }
  .gap .gi { --c: var(--warn); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
    color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
  .gap .gl { font-size: 13.5px; font-weight: 600; color: var(--muted); }
  .gap .gn { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
  .gap .gh { font-size: 12.5px; color: var(--muted); }
  .gap .gf { margin-top: 6px; }
  .bars { display: flex; flex-direction: column; gap: 13px; }
  .brow { display: grid; grid-template-columns: 112px minmax(0, 1fr) 76px; align-items: center; gap: 12px; font-size: 13.5px; }
  .brow .track { height: 10px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
  .brow .track i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--brand), var(--lav)); }
  .brow .bn { text-align: right; font-weight: 600; color: var(--muted); }
  .lockline { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); padding: 11px 13px;
    border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
  .lockline b { color: var(--ink); }

  /* ---------- operations ---------- */
  .tile { display: flex; flex-direction: column; gap: 4px; }
  .tile .top { display: flex; align-items: center; gap: 10px; }
  .tile .top .badge-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
  .tile .tl-lab { font-size: 13px; font-weight: 600; color: var(--muted); flex: 1; }
  .tile .tv { font-size: 21px; font-weight: 800; margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .tile .tm { font-size: 12.5px; color: var(--muted); }
  .status { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .02em; }
  .status.ok { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
  .status.run { color: var(--brand); background: var(--brand-soft); }
  .status.wait { color: var(--warn); background: color-mix(in srgb, var(--warn) 15%, transparent); }
  .status.mute { color: var(--idle); background: color-mix(in srgb, var(--idle) 16%, transparent); }
  .strip { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; }
  .strip i { height: 38px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
  .strip i.on { border-color: transparent; background: linear-gradient(180deg, var(--green), color-mix(in srgb, var(--green) 55%, var(--surface))); }
  .strip-ticks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 7px; font-size: 12px; color: var(--faint); }
  .striplegend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
  .striplegend span { display: inline-flex; align-items: center; gap: 7px; }
  .striplegend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid var(--line); background: var(--surface-2); }
  .striplegend i.on { border-color: transparent; background: var(--green); }
  .tblwrap { overflow-x: auto; }
  table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
  .tbl th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint);
    padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
  .tbl td { padding: 11px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
  .tbl tr:last-child td { border-bottom: 0; }
  .tbl .r { text-align: right; }
  .users { display: flex; flex-direction: column; }
  .urow { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
  .urow:first-child { border-top: 0; padding-top: 2px; }
  .urow .who { min-width: 0; flex: 1; }
  .urow .who b { display: block; font-size: 14px; font-weight: 600; }
  .urow .who small { display: block; font-size: 12.5px; color: var(--muted); }

  /* ---------- reports ---------- */
  .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
  .stp { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
  .stp .sn { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 800;
    background: var(--brand); color: var(--on-brand); }
  .stp b { font-size: 13.5px; } .stp span { font-size: 12.5px; color: var(--muted); }
  @media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }
  .rtypes { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  @media (max-width: 620px) { .rtypes { grid-template-columns: minmax(0, 1fr); } }
  .rt { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 11px;
    padding: 11px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
  .rt:hover { border-color: var(--line-2); }
  .rt.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
  .rt input { position: absolute; opacity: 0; pointer-events: none; }
  .rt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
  .rt .ri { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
  .rt .rtt { min-width: 0; }
  .rt .rtt b { display: block; font-size: 13.5px; font-weight: 700; }
  .rt .rtt small { display: block; font-size: 12px; color: var(--muted); }
  .rt .rn { font-size: 12.5px; font-weight: 700; color: var(--muted); }
  .fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
  @media (max-width: 560px) { .fgrid { grid-template-columns: minmax(0, 1fr); } }
  .field { display: flex; flex-direction: column; gap: 6px; }
  .field label, .field .flab { font-size: 13px; font-weight: 600; color: var(--muted); }
  .field select, .field textarea, .field .fixed { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px;
    background: var(--surface); font-size: 14px; }
  .field .fixed { display: flex; align-items: center; gap: 8px; background: var(--surface-2); color: var(--muted); }
  .field textarea { resize: vertical; min-height: 74px; }
  .finfo { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 12px;
    background: var(--green-soft); color: var(--ink); font-size: 13px; }
  .finfo .ic { color: var(--green); margin-top: 1px; }
  .factions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
  .factions small { color: var(--faint); font-size: 12.5px; }
  .rcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  @media (min-width: 1100px) { .rcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 620px) { .rcards { grid-template-columns: minmax(0, 1fr); } }
  .rcard { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); }
  .rcard .ri { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
  .rcbody { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
  .rchead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .rchead b { font-size: 14.5px; font-weight: 700; }
  .rcount { font-size: 13px; font-weight: 800; color: var(--brand); white-space: nowrap; }
  .rcbody small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
  .rcme { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink); cursor: pointer; margin-top: 2px; }
  .rcme input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; flex: none; }
  .rcsend { width: 100%; justify-content: center; }
  .btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
  .rcsend:disabled { opacity: .6; cursor: default; }
  .reqs { display: flex; flex-direction: column; gap: 8px; }
  .req { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 11px 12px;
    border: 1px solid var(--line); border-radius: 14px; }
  .req .ri { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
  .req b { display: block; font-size: 13.5px; font-weight: 600; }
  .req small { display: block; font-size: 12px; color: var(--muted); }
  .req.fresh { animation: flash 1.6s ease-out; }
  @keyframes flash { from { background: color-mix(in srgb, var(--brand) 14%, transparent); } to { background: transparent; } }

  /* ---------- slide-over ---------- */
  .scrim { position: fixed; inset: 0; z-index: 60; background: rgba(17,10,29,.48); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .scrim.open { opacity: 1; pointer-events: auto; }
  .sheet { position: fixed; top: 0; right: 0; z-index: 61; height: 100%; width: min(460px, 94vw); display: flex; flex-direction: column;
    background: var(--surface); border-left: 1px solid var(--line); box-shadow: -24px 0 60px rgba(17,10,29,.28);
    transform: translateX(105%); transition: transform .26s cubic-bezier(.4,0,.2,1); padding-top: env(safe-area-inset-top, 0px); }
  .sheet.open { transform: translateX(0); }
  .sh-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }
  .sh-head .si { --c: var(--crit); width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none;
    color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
  .sh-head .st { flex: 1; min-width: 0; }
  .sh-head h3 { font-size: 18px; font-weight: 700; }
  .sh-head p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
  .sh-body { padding: 18px 20px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
  .kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .kv div { padding: 11px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
  .kv span { display: block; font-size: 12px; color: var(--muted); }
  .kv b { display: block; font-size: 18px; font-weight: 800; margin-top: 3px; }
  .note { font-size: 13.5px; line-height: 1.6; color: var(--muted); }
  .note b { color: var(--ink); }
  .note h4 { margin: 0 0 4px; font-size: 13px; color: var(--ink); }

  .toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 80;
    transform: translate(-50%, 140%); display: flex; align-items: center; gap: 10px; max-width: min(520px, calc(100vw - 32px));
    padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: 13.5px; box-shadow: var(--shadow);
    transition: transform .3s cubic-bezier(.4,0,.2,1); }
  .toast.show { transform: translate(-50%, 0); }
  .toast .ic { color: var(--green); }
  .foot { text-align: center; font-size: 12.5px; color: var(--faint); padding-block: 28px 12px; }
  @media (prefers-reduced-motion: reduce) { .req.fresh { animation: none; } .sheet, .scrim, .toast { transition: none; } }
  /* Keep the overview calm; deeper operational detail is opt-in. */
  :root { --shadow: 0 2px 5px rgba(28,15,51,.025); --faint: #6e637c; }
  .skip-link { position: fixed; left: 20px; top: -60px; z-index: 90; padding: 12px 18px; background: var(--surface); color: var(--brand); border-radius: 8px; }
  .skip-link:focus { top: 12px; }
  .brand-logo { display: grid; place-items: center; width: 111px; height: 48px; background: #321059; border-radius: 8px; flex: none; }
  .brand-logo img { width: 89px; height: auto; }
  .brand-divider { width: 1px; height: 28px; background: var(--line-2); margin-inline: 7px; }
  .wm b { font-size: 17px; letter-spacing: -.025em; }
  .preview-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; padding: 4px 9px; background: var(--brand-soft); color: var(--brand-strong); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
  .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 30px; }
  .page-heading h1 { font-size: clamp(25px, 3vw, 32px); font-weight: 700; letter-spacing: -.03em; }
  .page-heading p { color: var(--muted); margin: 5px 0 0; font-size: 15px; }
  nav.tabs { margin-top: 24px; box-shadow: none; border-radius: 12px; }
  nav.tabs button { padding-block: 11px; }
  .banner { padding-block: 9px; border-style: solid; font-size: 12.5px; }
  .card { border-radius: 14px; }
  .hero { padding: 26px 28px; border-radius: 18px; }
  .hero::after { border-width: 1px; width: 340px; height: 340px; bottom: -190px; right: -90px; opacity: .6; }
  .h-big { font-size: 58px; }
  .hero-checkpoint { max-width: 300px; padding-left: 25px; border-left: 1px solid rgba(255,255,255,.22); }
  .hero-checkpoint .checkpoint-label { display: flex; align-items: center; gap: 7px; color: #dbccee; font-size: 12px; }
  .hero-checkpoint strong { display: block; font-size: 20px; margin-top: 6px; }
  .hero-checkpoint p { color: #ddd2ee; font-size: 13px; margin: 5px 0 10px; }
  .hero-checkpoint .link { color: white; }
  .segbar { height: 10px; }
  .seglegend { gap: 8px 18px; font-size: 12px; }
  .kpi { padding: 19px 22px; }
  .kpi .big { font-size: 30px; margin-top: 2px; }
  .priority-card { display: flex; align-items: center; gap: 16px; border-left: 3px solid var(--warn); }
  .priority-icon { width: 40px; height: 40px; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); color: var(--warn); border-radius: 12px; display: grid; place-items: center; flex: none; }
  .priority-copy { flex: 1; }
  .priority-copy h2 { font-size: 16px; }
  .priority-copy p { color: var(--muted); margin: 3px 0 0; font-size: 13px; }
  .priority-copy small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
  .details-card { padding: 0; }
  .details-card summary { display: flex; align-items: center; gap: 12px; padding: 18px 20px; cursor: pointer; list-style: none; }
  .details-card summary::-webkit-details-marker { display: none; }
  .details-card summary > span { flex: 1; }
  .details-card summary b { display: block; font-size: 15px; }
  .details-card summary small { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; }
  .details-card[open] summary > .ic:last-child { transform: rotate(180deg); }
  .details-card > .flowscroll { padding: 18px 16px 22px; border-top: 1px solid var(--line); }
  .overview-trends .pills { gap: 9px; }
  .overview-trends .pill { font-size: 12px; }
  .overview-trends .chartbox { height: 220px; }
  .timeline-more { margin-top: 14px; }
  .sheet { visibility: hidden; width: min(490px, 100vw); transition: transform .26s cubic-bezier(.4,0,.2,1); }
  .sheet.open { visibility: visible; }
  .sh-body { overscroll-behavior: contain; }
  .sh-body .note { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
  .sh-body .note h4 { font-size: 14px; }
  .chart-fallback { padding: 18px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--muted); font-size: 13px; }
  .chartbox canvas, .donut canvas { max-width: 100%; }
  .preview-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
  .toast { visibility: hidden; pointer-events: none; }
  .toast.show { visibility: visible; }
  .iconbtn { width: 40px; height: 40px; }
  @media (max-width: 760px) {
    #v-overview > .hero { order: 0; }
    #v-overview > .priority-card { order: 1; }
    #v-overview > .k3 { order: 2; }
    #v-overview > .details-card { order: 3; }
    #v-overview > .overview-trends { order: 4; }
    .page-heading { align-items: flex-start; padding-top: 22px; }
    .priority-card { flex-wrap: wrap; }
    .priority-card .btn { margin-left: 56px; }
    .brand-divider { margin-inline: 0; }
    .brand-logo { width: 85px; height: 42px; }
    .brand-logo img { width: 71px; }
    .wm span { max-width: 150px; }
    .hero-checkpoint { border-left: 0; border-top: 1px solid rgba(255,255,255,.22); padding: 15px 0 0; max-width: none; }
  }
  @media (max-width: 480px) {
    .ch .act { flex-basis: 100%; }
    .bar-in { gap: 9px; }
    .brand { gap: 9px; }
    .wm span, header .preview-badge { display: none; }
    .wm b { font-size: 15px; }
    .hero { padding: 22px; }
    .h-big { font-size: 48px; }
    .h-sub { font-size: 14px; }
    .erow { grid-template-columns: minmax(0, 1fr); padding: 8px; }
    .erow > .btn { justify-self: end; }
    .erow-main { min-width: 0; gap: 8px; }
    .erow .trend { display: none; }
    .brow { grid-template-columns: 100px minmax(0, 1fr) 48px; gap: 8px; }
    .req { grid-template-columns: 30px minmax(0, 1fr); }
    .req > .status { grid-column: 2; justify-self: start; }
  }
  /* ---------- archive runs ---------- */
  .archs { display: flex; flex-direction: column; }
  .arch { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, 2fr) minmax(140px, auto); gap: 16px; align-items: center; padding: 12px 2px; border-top: 1px solid var(--line); }
  .arch:first-child { border-top: 0; padding-top: 2px; }
  .arch > * { min-width: 0; }
  .arch .aid, .arch .anote { overflow-wrap: anywhere; }
  .arch > .status { white-space: normal; justify-self: end; text-align: center; max-width: 190px; }
  .arch .aid b { display: block; font-size: 14.5px; }
  .arch .aid small { display: block; font-size: 12px; color: var(--muted); }
  .arch .abar { height: 8px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
  .arch .abar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--brand), var(--lav)); }
  .arch .anote { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
  @media (max-width: 900px) { .arch { grid-template-columns: minmax(0, 1fr) auto; } .arch .amid { grid-column: 1 / -1; grid-row: 2; } }
  .planned { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 3px 9px;
    border-radius: 999px; color: var(--idle); background: color-mix(in srgb, var(--idle) 14%, transparent); white-space: nowrap; }
  /* Recent downloads feed: the folder path and the download channel tag. */
  .docpath { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; color: var(--ink); white-space: normal; word-break: break-all; }
  .via { font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 2px 8px; border-radius: 4px;
    background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
  .via.ssh { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
  .dl-sum { font-size: 12.5px; color: var(--muted); } .dl-sum b { color: var(--ink); }

  /* ---------- Release control tab ---------- */
  .rel-now { background: var(--hero-1); color: #f4effc; border-radius: 8px; padding: 16px 20px; }
  .release-status { display: grid; gap: 5px; }
  .release-status strong { font-size: 19px; line-height: 1.4; }
  .release-status p { color: var(--muted); font-size: 13px; }
  .release-actions { display: flex; align-items: baseline; gap: 16px 24px; flex-wrap: wrap; margin: 20px 0 12px; }
  .release-actions .now-row { margin: 0; }
  .batch-picker summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 13px; padding: 8px 0; }
  .batch-picker .chips { margin-top: 8px; }
  .release-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-weight: 650; list-style: none; }
  .release-details > summary::-webkit-details-marker { display: none; }
  .release-details > summary .ic { flex: none; color: var(--muted); transition: transform .15s; }
  .release-details[open] > summary .ic { transform: rotate(180deg); }
  .release-details > summary small { display: inline-block; color: var(--warn); margin-left: 8px; font-size: 12px; }
  .release-detail-body { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
  .release-detail-body > p { margin-bottom: 14px; }
  .release-support { align-items: start; }
  .flowline { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
  .fl-node { display: inline-flex; flex-direction: column; } .fl-node b { font-size: 20px; } .fl-node small { font-size: 11.5px; color: #c3b3e3; }
  .fl-arrow { color: #8f7bbd; font-size: 18px; } .fl-pace { margin-left: auto; font-size: 13px; color: #d9c9f7; } .fl-pace b { color: #fff; }
  .modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  @media (max-width: 640px) { .modes { grid-template-columns: minmax(0, 1fr); } }
  .mode { text-align: left; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--surface); cursor: pointer; display: grid; gap: 4px; position: relative; }
  .mode[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
  .mode:disabled { cursor: not-allowed; opacity: .7; }
  .mode .mh { display: flex; align-items: center; gap: 8px; font-weight: 700; }
  .mode p { font-size: 12.5px; color: var(--muted); }
  .mode .live-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--green); }
  .pace-settings { margin-top: 14px; display: grid; gap: 12px; }
  .pace-settings .field { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px; align-items: center; }
  @media (max-width: 560px) { .pace-settings .field { grid-template-columns: minmax(0, 1fr); } }
  .pace-settings .field > span { font-weight: 600; color: var(--muted); font-size: 13px; }
  .pace-note { font-size: 12.5px; color: var(--muted); }
  .chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .chips button { min-width: 48px; height: 32px; padding: 0 11px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; cursor: pointer; }
  .chips button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
  .pace-apply, .now-row { margin-top: 14px; display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; }
  .pace-apply { padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
  .diff { flex: 1 1 240px; } .diff s { color: var(--faint); }
  .appr { border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 6px; padding: 12px 14px; display: grid; gap: 8px; margin-bottom: 10px; }
  .appr-top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .appr-top b { font-size: 14.5px; }
  .appr .pct { color: var(--warn); font-weight: 700; font-size: 13px; }
  .appr p { font-size: 13px; color: var(--muted); } .appr .row { display: flex; gap: 8px; flex-wrap: wrap; }
  .appr textarea { width: 100%; min-height: 56px; border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px; background: var(--surface); color: var(--ink); resize: vertical; }
  .btn.danger { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 40%, var(--line-2)); }
  .staged-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--line); }
  .staged-row:first-child { border-top: 0; } .staged-row .muted { margin-left: auto; }
  .rlog { display: grid; } .rev { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 0; border-top: 1px solid var(--line); }
  .rev:first-child { border-top: 0; } .rev-what { font-size: 13.5px; } .rev time { font-size: 12.5px; color: var(--muted); } .rev-who { font-size: 12.5px; color: var(--muted); grid-column: 1; }
  .notice { display: flex; gap: 9px; padding: 10px 12px; border-radius: 6px; font-size: 13px; background: var(--brand-soft); margin-top: 10px; }
  #nowNotice { flex-direction: column; align-items: flex-start; overflow-wrap: anywhere; }
  #nowNotice p { margin: 0; }
  .processing-inventory { display: grid; gap: 10px; margin: 16px 0; max-height: 320px; overflow: auto; }
  .batch-overview { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
  .batch-overview h2 { font-size: 16px; }
  .batch-overview p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
  .processing-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
  #reportBatch { margin: 0 0 0 8px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); }

  /* ---------- MID server activity terminal ---------- */
  .term { --tbg: #0f0b17; --tbar: #17121f; --tline: #2a2236; --tink: #d9d3e6; --tdim: #7d7490;
    background: var(--tbg); border: 1px solid #241c30; border-radius: 8px; overflow: hidden; color: var(--tink);
    font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
  .term-bar { display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: var(--tbar); border-bottom: 1px solid var(--tline); flex-wrap: wrap; font-family: var(--f); }
  .term-title { display: flex; align-items: center; gap: 9px; color: #efeaf7; font-weight: 600; font-size: 13px; }
  .term-title code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--tdim); font-weight: 400; }
  .term-led { width: 8px; height: 8px; border-radius: 50%; background: var(--tdim); flex: none; } .term-led.on { background: #4fd18b; }
  .term-tabs { display: inline-flex; margin-left: auto; border: 1px solid var(--tline); border-radius: 6px; padding: 2px; }
  .term-tabs button { background: transparent; border: 0; color: var(--tdim); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 4px; cursor: pointer; font-family: var(--f); }
  .term-tabs button[aria-selected="true"] { background: #2a2238; color: #efeaf7; }
  .term-body { height: 340px; overflow-y: auto; overflow-x: hidden; padding: 8px 0 6px; color-scheme: dark; scrollbar-color: #3a3049 transparent; }
  .tln { display: grid; grid-template-columns: 78px 70px minmax(0, 1fr) auto; gap: 0 12px; padding: 1px 14px; white-space: nowrap; align-items: baseline; }
  .tln:hover { background: rgba(255,255,255,.035); }
  .tln .t-tm { color: #8b82a0; } .tln .t-vb { font-weight: 700; letter-spacing: .02em; }
  .tln .t-tx { overflow: hidden; text-overflow: ellipsis; } .tln .t-rt { color: var(--tdim); text-align: right; }
  .tln.get .t-vb { color: #4fd18b; } .tln.con .t-vb { color: #6cb6ff; } .tln.con .t-tx { color: #bcd9ff; }
  .t-via { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: rgba(201,166,255,.18); color: #c9a6ff; }
  .t-via.ssh { background: rgba(79,209,139,.18); color: #7fe0a6; }
  .term-empty { padding: 14px; color: var(--tdim); }
  .term-foot { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 7px 14px; border-top: 1px solid var(--tline); background: var(--tbar); color: var(--tdim); font-size: 11.5px; }
  .term-foot b { color: #efeaf7; font-weight: 600; }
  @media (max-width: 640px) { .tln { grid-template-columns: 62px 56px minmax(0, 1fr); } .tln .t-rt { display: none; } .term-tabs { margin-left: 0; } }
  /* Let the slide-over and toast animate out before they become hidden. */
  .sheet { transition: transform .26s cubic-bezier(.4,0,.2,1), visibility 0s linear .26s; }
  .sheet.open { transition: transform .26s cubic-bezier(.4,0,.2,1), visibility 0s; }
  .toast { transition: transform .3s cubic-bezier(.4,0,.2,1), visibility 0s linear .3s; }
  .toast.show { transition: transform .3s cubic-bezier(.4,0,.2,1), visibility 0s; }
  @media (prefers-reduced-motion: reduce) { .sheet, .sheet.open, .toast, .toast.show { transition: none; } }

/* Live mode. Body classes are namespaced (sa-mode-*) so they cannot collide with component
   classes. Never show sample numbers while the first live data loads (or failed to load). */
body.sa-mode-loading main .view { display: none; }
body.sa-mode-loading #attnTab { visibility: hidden; }
/* Paint nothing until app.js has decided between the live dashboard and the local preview: a
   visit without a session goes straight to the login without showing the page first. If the
   script never runs, show the loading message rather than illustrative migration totals. */
html.sa-boot body { visibility: hidden; }
.boot-message { visibility: visible; position: fixed; inset: 30% 24px auto; text-align: center; }
html:not(.sa-boot) .boot-message { display: none; }
body.sa-mode-live #yearsCard, body.sa-mode-live #rolesCard { display: none; }
.banner.warn { border-color: var(--warn); }
.status.crit { background: color-mix(in srgb, var(--crit) 14%, transparent); color: var(--crit); }

/* Shared visual language: quiet surfaces, purposeful icon accents and consistent controls. */
body { font-size: 14px; letter-spacing: 0; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .kpi .big, .tv, .gn, .h-big { letter-spacing: -0.01em; }
.kpi .big, .tv, .gn, .h-big, .nn, .ec, .bn, .rn, .tbl td.r, .cnt, #donutTotal { font-variant-numeric: tabular-nums; }
.kpi .big { font-weight: 700; font-size: 28px; }
.page-heading { padding-block: 26px 6px; }
.page-heading p { display: block; margin: 6px 0 0; color: var(--muted); }
.card { border-radius: 16px; box-shadow: 0 3px 16px color-mix(in srgb, var(--ink) 3%, transparent); }
.ch .badge-ic, .kpi .top .badge-ic, .tile .top .badge-ic { display: grid; }
.kpi:nth-child(1) .badge-ic { color: var(--c-man); background: color-mix(in srgb, var(--c-man) 11%, var(--surface)); }
.kpi:nth-child(3) .badge-ic { color: var(--good); background: color-mix(in srgb, var(--good) 11%, var(--surface)); }
.ch { gap: 8px 12px; }
/* The title column needs a real basis: with basis 0 it shared a line with a 100%-wide action and collapsed to 0 px on phones. */
.ch .t { flex: 1 1 220px; }
nav.tabs { border-radius: 16px; box-shadow: none; padding: 5px; }
nav.tabs button { border-radius: 11px; background: transparent; border: 0; font-weight: 600; min-height: 42px; }
nav.tabs button[aria-selected="true"] { background: var(--brand-soft); color: var(--brand-strong); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 15%, transparent); }
nav.tabs button[aria-selected="true"] .cnt { background: var(--brand-soft); color: var(--brand); }
.hero { border-radius: 20px; background: linear-gradient(115deg, var(--hero-1), var(--hero-2)); }
.hero::after { display: none; }
.brow .track i, .arch .abar i { background: var(--brand); }
.strip i.on { background: var(--green); }
.banner { border-radius: 6px; }
.btn { border-radius: 10px; min-height: 40px; }
.preview-badge { border-radius: 4px; letter-spacing: .02em; }
.erow { border-radius: 6px; }
.status { border-radius: 999px; padding: 4px 10px; }

/* Quiet task guidance; detail stays behind the existing disclosures. */
.section-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-intro h2 { font-size: 18px; }
.section-intro p { margin: 5px 0 0; color: var(--muted); }
.workflow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.workflow li { padding: 16px 18px; background: var(--brand-soft); border-radius: 8px; }
.workflow b { display: block; color: var(--brand-strong); margin-bottom: 5px; }
.context-help { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; padding: 14px 16px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-strong); }
.context-help > .ic { flex: none; margin-top: 2px; }
.context-help p { margin: 0; font-size: 13px; line-height: 1.6; }
.context-help .link { margin-top: 8px; }
.flow-help { padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.card > .flow-help { margin-top: 14px; }
.flow-help summary { cursor: pointer; color: var(--brand-strong); font-size: 13px; font-weight: 600; }
.flow-help summary .ic { margin: 0 5px 0 2px; vertical-align: middle; }
.flow-help summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 3px; }
.flow-help p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.workflow span { display: block; color: var(--muted); font-size: 13px; }
#ingestFile { max-width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--line-2); border-radius: 6px; }
#ingestFile::file-selector-button { font: inherit; border: 0; padding: 6px 10px; border-radius: 4px; margin-right: 10px; color: var(--brand-strong); background: var(--brand-soft); cursor: pointer; }
#jobHistory > details { padding: 14px 0; border-bottom: 1px solid var(--line); }
#jobHistory > details:last-child { border: 0; }
#jobHistory summary { cursor: pointer; line-height: 1.6; }
#jobHistory p, #jobHistory li { color: var(--muted); }
#jobHistory .report-files a { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .section-intro { align-items: flex-start; flex-direction: column; }
  .workflow { grid-template-columns: 1fr; gap: 8px; }
  .workflow li { padding: 12px 16px; }
  .ingest-row input { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Live mode: nothing that only exists as a plan or a sample. */
body.sa-mode-live #stripCard, body.sa-mode-live #pullsCard, body.sa-mode-live #midPill { display: none; }

/* Batch entry point and loading state have the same calm card treatment as the overview. */
.batch-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: none; border-radius: 14px; background: var(--brand-soft); color: var(--brand); }
.batch-copy { flex: 1 1 240px; min-width: 0; }
.batch-copy p { overflow-wrap: anywhere; }
.batch-progress { flex: 1 0 100%; display: grid; grid-template-columns: minmax(0, 1fr) 210px; column-gap: 32px; border-top: 1px solid var(--line); padding-top: 18px; }
.batch-progress > :not(.batch-counts) { grid-column: 1; }
.batch-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.batch-steps { display: flex; gap: 8px; list-style: none; margin: 16px 0; padding: 0; }
.batch-steps li { display: flex; align-items: center; gap: 8px; flex: 1; padding: 10px 12px; border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 13px; }
.batch-steps li.current { color: var(--brand); background: var(--brand-soft); font-weight: 650; box-shadow: inset 0 0 0 1px var(--brand); }
.batch-steps li.done { color: var(--green); }
.batch-counts { grid-column: 2; grid-row: 1 / span 4; display: flex; flex-direction: column; text-align: right; border-left: 1px solid var(--line); padding-left: 24px; margin: 0; font-size: 12px; color: var(--muted); }
.batch-counts b { display: block; color: var(--ink); font-size: 22px; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) {
  .batch-progress { grid-template-columns: minmax(0, 1fr); }
  .batch-counts { grid-column: 1; grid-row: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: left; border-left: 0; padding-left: 0; }
}
@media (max-width: 640px) { .batch-steps { flex-direction: column; } }
.loading-panel { min-height: 320px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: 48px 24px; text-align: center; }
.loading-panel h2 { font-size: 20px; margin: 16px 0 8px; }
.loading-panel p { color: var(--muted); }
.loading-orbit { display: inline-block; width: 30px; height: 30px; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: loading-turn 1s linear infinite; }
.loading-lines { display: flex; gap: 12px; max-width: 600px; margin: 30px auto 0; }
.loading-lines i { flex: 1; height: 50px; border-radius: 10px; background: var(--surface-2); }
@keyframes loading-turn { to { transform: rotate(360deg); } }
/* A quiet workbench: selection, queue controls and completed runs stay distinct. */
#processingCard { padding: 0; overflow: hidden; scroll-margin-top: 100px; }
#processingCard > .processing-heading { display: flex; align-items: center; gap: 14px; padding: 22px 26px; cursor: pointer; list-style: none; }
.processing-heading::-webkit-details-marker { display: none; }
.processing-heading b { font-size: 18px; letter-spacing: -.3px; }
.processing-heading small { display: block; margin-top: 3px; font-weight: 400; color: var(--muted); font-size: 13px; }
.processing-chevron { margin-left: auto; transition: transform .2s; }
#processingCard[open] .processing-chevron { transform: rotate(180deg); }
#processingCard > .processing-intro, #processingState, #processingControls { margin-inline: 26px; }
.processing-intro { color: var(--muted); max-width: 70ch; margin-top: 0; line-height: 1.7; }
#processingState > p { color: var(--muted); padding-block: 12px; border-block: 1px solid var(--line); }
#processingState b { font-weight: 500; }
.picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.picker-heading h3 { font-size: 14px; font-weight: 650; }
#processingInventory { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 10px; margin-block: 14px 22px; max-height: 430px; overflow-y: auto; padding: 2px; }
#processingInventory .batch-choice { display: flex; align-items: flex-start; gap: 12px; min-height: 100px; margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
#processingInventory .batch-choice:has(input:not(:disabled)):hover { border-color: var(--brand); background: var(--surface-2); }
#processingInventory .batch-choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
#processingInventory .batch-choice:has(input:disabled) { cursor: default; }
#processingInventory input { accent-color: var(--brand); width: 17px; height: 17px; flex: none; margin: 2px 0 0; }
#processingInventory input:disabled { display: none; }
.batch-choice-copy { min-width: 0; flex: 1; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 20px; }
.batch-choice-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
.batch-choice-top > b { font-size: 14px; white-space: nowrap; }
.batch-choice-state { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.batch-choice-state .ic { width: 13px; height: 13px; flex: none; }
#processingInventory .is-processing { border-color: color-mix(in srgb, var(--brand) 38%, var(--line)); box-shadow: inset 3px 0 0 var(--brand); }
.is-processing .batch-choice-state { color: var(--brand); font-weight: 600; }
.is-finished .batch-choice-state .ic { display: none; }
.is-failed .batch-choice-state { color: var(--crit); }
.batch-mini-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; width: 100%; font-size: 11px; line-height: 1.4; }
.batch-mini-stats > span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; color: var(--muted); }
.batch-mini-stats b { color: var(--ink); font-size: 18px; font-weight: 600; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.batch-mini-note { grid-column: 1 / -1; display: block; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.6; font-weight: 400; }
.batch-mini-note > span { display: inline-block; }
.batch-mini-stats .ic { display: none; }
.batch-mini-issues b { color: var(--warn); }
.batch-recheck { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.batch-pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: batch-breathe 1.8s ease-in-out infinite; flex: none; }
@keyframes batch-breathe { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 20%, transparent); } 50% { opacity: .6; box-shadow: 0 0 0 4px transparent; } }
@media (prefers-reduced-motion: reduce) { .batch-pulse { animation: none; } }
.processing-buttons { border-top: 1px solid var(--line); padding-top: 20px; margin-bottom: 12px; }
.processing-help, .batch-note { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.processing-help { margin: 0 0 24px; }
.processing-help .ic, .batch-note .ic { margin-top: 3px; }
.completed-strip { flex: 1 0 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.completed-strip > .ic { color: var(--green); }
.completed-strip b { font-weight: 500; color: var(--ink); }
.completed-strip .btn { margin-left: auto; font-size: 12px; min-height: 32px; border: 0; background: transparent; }
.batch-progress-head b { font-size: 24px; letter-spacing: -.5px; }
.batch-steps li { background: var(--surface-2); border: 1px solid transparent; }
.batch-steps li.current { box-shadow: none; border-color: color-mix(in srgb, var(--brand) 28%, transparent); }
.batch-counts { padding-block: 4px; gap: 12px 24px; }
.batch-counts b { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.rcard, .workflow li { background: var(--surface); }
.context-help { background: var(--surface-2); color: var(--muted); }
.upload-formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.upload-formats > div { border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.upload-formats p { color: var(--muted); font-size: 13px; line-height: 1.7; margin-bottom: 8px; }
@media (max-width: 600px) {
  #processingCard > .processing-heading { padding: 18px; }
  #processingCard > .processing-intro, #processingState, #processingControls { margin-inline: 18px; }
  .processing-buttons .btn { flex: 1 1 100%; justify-content: center; }
  .completed-strip .btn { margin-left: 22px; }
}
@media (max-width: 560px) {
  .batch-overview > .btn { width: 100%; justify-content: center; }
  .arch { gap: 10px; padding-block: 16px; }
  .arch > .status { max-width: 150px; font-size: 11px; }
}

/* Keep the brand and account controls from colliding on the narrowest screens. */
@media (max-width: 400px) {
  .bar-in .wm, .bar-in .brand-divider { display: none; }
}

/* One home for corrections; disclosure keeps detailed counts out of the job list. */
.control-sections{width:fit-content;gap:4px}
.control-sections button{padding:9px 20px}
.correction-upload{padding:0}
.correction-upload>summary,.service-details>summary{cursor:pointer;font-weight:600;padding:18px 22px}
.correction-upload-body{padding:0 22px 22px}
.correction-upload-body>.ch{margin-top:12px}
.correction-upload-body .flow-help{margin-block:16px}
.correction-list-heading h2{font-size:16px;margin:0}
#controlCorrections{width:100%;max-width:1120px;margin-inline:auto}
#correctionJobs{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:12px}
#correctionJobs>.correction-empty,#correctionJobs>[data-more-corrections]{grid-column:1/-1;justify-self:start}
.correction-job{margin:0;padding:20px;border-radius:12px;background:var(--surface);box-shadow:none;min-width:0}
.correction-job:has([data-tone="active"]){border-color:color-mix(in srgb,var(--brand) 38%,var(--line));box-shadow:inset 3px 0 0 var(--brand)}
.correction-job-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 12px}
.correction-job-heading h3{font-size:14px;margin:0}
.correction-job-heading time{font-size:11px;color:var(--muted)}
.correction-job-overview{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:10px;min-height:48px}
.correction-state{display:flex;align-items:baseline;gap:7px;font-size:12px;line-height:1.6;color:var(--muted);max-width:26ch}
.correction-state-dot{width:6px;height:6px;border-radius:50%;background:currentColor;flex:none}
[data-tone="active"] .correction-state{color:var(--brand)}
[data-tone="active"] .correction-state-dot{animation:batch-breathe 1.8s ease-in-out infinite}
[data-tone="review"] .correction-state{color:var(--warn)}
.correction-impact{display:flex;flex-direction:column;align-items:flex-end;gap:4px;text-align:right;max-width:20ch;flex:none}
.correction-impact b{font-size:24px;line-height:1.2;font-weight:600;letter-spacing:-.4px;font-variant-numeric:tabular-nums;color:var(--ink)}
.correction-impact span{font-size:11px;line-height:1.4;color:var(--muted)}
.correction-headline{margin:18px 0 14px;font-size:12px;line-height:1.7;color:var(--muted);font-weight:400}
.correction-result-time{margin:12px 0 6px;font-size:11px;line-height:1.5;color:var(--muted)}
.correction-next{background:linear-gradient(115deg,var(--surface),var(--brand-soft));padding:24px}
.correction-next-heading{display:flex;justify-content:space-between;gap:16px;align-items:center}
.correction-next-heading h2{margin:0;font-size:18px;letter-spacing:-.3px}
.correction-next-heading p{font-size:11px;color:var(--muted);margin:6px 0 0}
.correction-next-icon{display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--brand);flex:none}
.correction-needs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:22px 0}
.correction-need{display:flex;gap:12px;align-items:center}
.correction-need-icon{color:var(--brand);display:flex}
.correction-need b{display:block;font-size:28px;font-weight:600;line-height:1.2;font-variant-numeric:tabular-nums;letter-spacing:-.6px}
.correction-need div>span{display:block;color:var(--muted);font-size:12px;margin-top:5px}
.correction-next-action{display:flex;gap:20px;align-items:center;flex-wrap:wrap}
.correction-next-action .btn{width:auto}
.correction-next-action .rcme{margin:0;font-size:12px}
.correction-next-note{font-size:11px;color:var(--muted);margin:10px 0 0}
.correction-clear{display:flex;gap:12px;align-items:center;grid-column:1/-1;color:var(--good)}
.correction-clear b{display:block;font-weight:600}
.correction-clear span{display:block;color:var(--muted);font-size:12px;margin-top:4px}
.cj-journey{margin:18px 0}
.correction-job-overview:not(:has(.correction-impact)){min-height:0;margin-top:16px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.cj-progress-heading{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap;font-size:12px}
.cj-progress-heading b{font-weight:600}
.cj-progress-heading>span{color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
.cj-progress{height:7px;border-radius:99px;background:var(--line);overflow:hidden;margin:10px 0 14px}
.cj-progress>i{display:block;height:100%;border-radius:inherit;background:var(--brand);transition:width .4s ease}
.cj-progress.indeterminate>i{width:32%;animation:correction-progress 2.5s ease-in-out infinite}
.cj-stage-strip{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0;padding:0}
.cj-stage-strip li{display:flex;justify-content:center;align-items:center;gap:6px;padding:7px 5px;border-radius:8px;background:var(--surface-2);color:var(--muted);font-size:11px}
.cj-stage-strip li>span:first-child{display:flex;align-items:center}
.cj-stage-strip li i{display:block;width:6px;height:6px;border:1px solid currentColor;border-radius:50%}
.cj-stage-strip .done{color:var(--good)}
.cj-stage-strip .active{background:var(--brand-soft);color:var(--brand);font-weight:600}
.cj-stage-strip .active i{background:currentColor;box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 12%,transparent)}
.cj-parallel{font-size:11px;color:var(--muted);margin:9px 0 0;text-align:center}
@keyframes correction-progress{0%,100%{transform:translateX(0)}50%{transform:translateX(212%)}}
@media(max-width:520px){.correction-next{padding:18px}.correction-needs{gap:12px}.correction-need{gap:8px}.correction-need b{font-size:24px}.correction-next-action{gap:12px}.correction-next-action .btn{width:100%}}
@media(prefers-reduced-motion:reduce){.cj-progress>i{transition:none}.cj-progress.indeterminate>i{animation:none}}
/* Settled result: one thin bar (validated first) and only the parts that still need something. */
.correction-outcome{display:flex;gap:2px;height:6px;margin-top:16px;border-radius:99px;overflow:hidden;background:var(--line)}
.correction-outcome i{display:block;height:100%}
.correction-outcome .good{background:var(--good)}
.correction-outcome .warn{background:var(--warn)}
.correction-outcome .idle{background:var(--idle)}
.correction-outcome .crit{background:var(--crit)}
.correction-outcome-open{display:flex;flex-wrap:wrap;gap:4px 16px;margin:10px 0 0;font-size:12px;line-height:1.5;color:var(--muted)}
.correction-outcome-open span{display:inline-flex;align-items:center;gap:7px}
.correction-outcome-open span::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--idle);flex:none}
.correction-outcome-open .warn::before{background:var(--warn)}
.correction-outcome-open .crit::before{background:var(--crit)}
.correction-detail{border-top:1px solid var(--line);margin-top:14px;padding-top:12px}
.correction-detail>summary{cursor:pointer;color:var(--brand);font-size:12px;width:fit-content}
.correction-detail>div{padding-top:12px;font-size:13px;line-height:1.7}
.correction-detail>div>.correction-headline:first-child{margin-top:0}
.report-request-options{margin:16px 0}
.report-combined{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px;border:1px solid var(--line);border-radius:12px;background:var(--brand-soft)}
.report-combined p{margin:4px 0 0}
.report-combined>.btn{width:auto;flex:none}
.report-combined>div{min-width:0}
.report-choice-heading~.flow-help{margin-bottom:14px}
.report-choice-heading{font-size:13px;margin:22px 0 12px;color:var(--muted);font-weight:500}
.report-help{margin-top:10px;color:var(--muted);font-size:12px}
.report-help summary{cursor:pointer;color:var(--brand)}
.report-help p{margin:8px 0 0;line-height:1.6}
.report-additional{border-top:1px solid var(--line);margin-top:20px;padding-top:16px}
.report-additional>summary{cursor:pointer;font-size:14px;font-weight:600}
.report-additional>summary>span{font-weight:400;font-size:12px;color:var(--muted);margin-left:8px}
.report-additional>.rcards{margin-top:16px}
@media(max-width:600px){.report-combined{align-items:stretch;flex-direction:column}.report-additional>summary>span{display:block;margin:6px 0 0}}
/* Details: supporting counts, grouped row feedback and the separate release boundary. */
.cj-release{display:flex;gap:7px;align-items:center;margin:0 0 12px;font-size:12px;color:var(--muted)}
.cj-release b{font-weight:500}
.cj-tiles{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.cj-tile{display:flex;align-items:baseline;gap:6px;padding:6px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);font-size:12px;color:var(--muted)}
.cj-tile b{font-size:14px;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.cj-tile.warn{border-color:color-mix(in srgb,var(--warn) 35%,var(--line))}
.cj-tile.warn b{color:var(--warn)}
.cj-feedback{margin:0 0 14px;border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.cj-feedback summary{cursor:pointer;font-size:12px;font-weight:600;color:var(--ink);display:flex;align-items:center;gap:8px}
.cj-count{font-size:11px;font-weight:600;padding:1px 8px;border-radius:99px;background:color-mix(in srgb,var(--warn) 14%,transparent);color:var(--warn)}
.cj-feedback ul{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:12px;max-height:340px;overflow:auto}
.cj-feedback li p{margin:0;font-size:12px;line-height:1.6;color:var(--ink);overflow-wrap:anywhere}
.cj-feedback li p b{margin-right:8px;color:var(--warn);font-weight:600;white-space:nowrap}
.cj-rows{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
.cj-rows span{font-size:11px;padding:1px 7px;border-radius:6px;background:var(--surface-2);border:1px solid var(--line);color:var(--muted);font-variant-numeric:tabular-nums}
.cj-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:11px;color:var(--muted)}
.cj-foot p{margin:0;line-height:1.5}
.cj-ref{display:inline-flex;align-items:center;gap:6px;margin-left:auto;color:var(--faint)}
.cj-ref code{font-size:10.5px;padding:1px 6px;border-radius:6px;background:var(--surface-2);border:1px solid var(--line);overflow-wrap:anywhere;user-select:all}
.correction-reason{border-left:2px solid var(--warn);padding-left:14px;margin-bottom:14px;overflow-wrap:anywhere}
.correction-shortcut{display:flex;align-items:center;justify-content:space-between;gap:20px}
.service-details{padding:0}
.service-detail-body{padding:0 22px 22px}
@media(max-width:900px){#correctionJobs{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.correction-job{padding:18px}.correction-shortcut{align-items:flex-start;flex-direction:column}.correction-upload>summary,.service-details>summary{padding:16px}.correction-upload-body,.service-detail-body{padding:0 16px 16px}}
@media(max-width:400px){.correction-job-overview{flex-wrap:wrap;gap:12px}.correction-impact{margin-left:auto}.correction-impact b{font-size:22px}}
@media(prefers-reduced-motion:reduce){[data-tone="active"] .correction-state-dot{animation:none}}

/* Access management stays in one focused panel, outside the operational dashboard. */
.access-dialog { width:min(800px,calc(100vw - 32px)); max-height:85vh; overflow:auto; border:1px solid var(--line); border-radius:18px; padding:24px; color:var(--ink); background:var(--surface, #fff); }
.access-dialog::backdrop { background:rgb(20 12 40 / .45); }
.access-dialog-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.access-dialog h2,.access-dialog h3 { margin:0; }
.access-dialog p { margin:14px 0; }
.access-help { padding:10px 0; }
.access-help dt { font-weight:600; margin-top:10px; }
.access-help dd { margin:3px 0; }
.access-invite-form { display:flex; gap:12px; align-items:end; margin:20px 0 10px; flex-wrap:wrap; }
.access-invite-form label { display:grid; gap:6px; flex:1; }
.access-dialog input,.access-dialog select { padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--surface, #fff); color:inherit; font:inherit; }
.access-people { list-style:none; padding:0; margin:10px 0; }
.access-person { padding:16px 0; border-top:1px solid var(--line); display:grid; gap:12px; }
.access-person b { overflow-wrap:anywhere; }
.access-person span { display:block; margin-top:4px; }
.access-person-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
@media(max-width:600px) { .access-dialog { padding:16px; } .access-invite-form { align-items:stretch; flex-direction:column; } }

@media(max-width:700px) {
  .sa-access-managed .bar-in { flex-wrap:wrap; }
  .sa-access-managed .bar-in .brand,.sa-access-managed .bar-in button { flex-shrink:0; }
  .sa-access-managed #accessRole { order:5; flex-basis:100%; text-align:right; }
}
