/* UltrAI workspace design refinement v2 (ULT-1561), loaded after ultrai.v1.css and guide.v1.css.
   Same Ultra palette and tints; no new colours. Roboto Condensed stays the display face
   (headings, navigation, labels, buttons); Roboto at normal width carries running text,
   which is closer to DINPro's proportions and easier to read at length. */

@font-face {
  font-family: "Roboto";
  src: url("fonts/Roboto-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --font-display: var(--font-body);
  --font-label: "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-body: "Roboto", "Segoe UI", Arial, sans-serif;
  --bg: var(--white);
  --line: var(--grey);
  --text: var(--ink);
  --radius: 8px;
  --radius-l: 12px;
  --shadow-1: 0 1px 2px rgba(29, 53, 94, .05), 0 0 0 1px rgba(29, 53, 94, .04);
  --shadow-2: 0 12px 32px -14px rgba(29, 53, 94, .30), 0 2px 6px rgba(29, 53, 94, .06);
  --shadow-3: 0 24px 48px -20px rgba(29, 53, 94, .38);
  --rail-w: 248px;
  --t-fast: 180ms cubic-bezier(.2, .7, .2, 1);
  --content-max: 1240px;
  /* The Weekly Report content surfaces (ULT-1500) keep their exact
     colours, now as tokens: no hex literal exists outside :root. */
  --surface-sunk: #f6f7f9;
  --text-muted: #5a6577;
  --ink-strong: #22314a;
  --suggested-wash: #1c786e1f;
  --suggested-ink: #14655c;
  --suggested-line: #1c786e4d;
  /* The scales every shared rule draws from (type, spacing, radius, shadow). */
  --fs-12: 12px; --fs-14: 14px; --fs-16: 16px; --fs-18: 18px; --fs-22: 22px; --fs-28: 28px;
  --sp-8: 8px; --sp-12: 12px; --sp-16: 16px; --sp-24: 24px; --sp-32: 32px; --sp-48: 48px;
  --r-card: 8px; --r-btn: 6px; --r-pill: 999px;
  --teal-ink: #4a6577;
  --hairline: color-mix(in srgb, var(--teal) 28%, white);
  --ground: #f5f6f8;
  --surface: #ffffff;
  --edge: #e3e6ec;
  --edge-soft: #eef0f4;
  --soft-shadow: 0 1px 2px rgba(29, 53, 94, .05), 0 1px 3px rgba(29, 53, 94, .04);
  --muted-ink: #556070;
  --ink-head: #14233f;
  --ink-body: #1f2937;
  --btn-line: #cfd5df;
  --btn-line-hover: #aab3c2;
  --rail-ink: #d3dbea;
  --rail-ink-dim: #b4c0d6;
  --focus: #1d4ed8;
  --row-hover: #f9fafc;
  --th-ground: #fafbfc;
  --card-hover-line: #d3d8e2;
  --chip-ground: #eef2f8;
  --ui7b-navy-deep: #14264a;
  --ui7b-navy-lift: #2a4a82;
  --ui7b-ground: #f5f6f8;
  --ui7b-line: #e2e5ea;
}

/* ---------- Type ---------- */
body { font-family: var(--font-body); font-size: var(--fs-16); line-height: 1.5; letter-spacing: .005em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1 { font-size: clamp(30px, 3vw, 42px); font-weight: 500; letter-spacing: -.03em; line-height: 1.05; color: var(--ink-strong); }
h2 { font-size: 17px; font-weight: 600; letter-spacing: 0; }
h3 { font-size: 15px; font-weight: 600; }
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; box-shadow: 0 0 0 5px var(--blue-20); border-radius: 6px; }
::selection { background: var(--blue-20); color: var(--blue); }

/* ---------- Rail ---------- */
.app { grid-template-columns: var(--rail-w) minmax(0, 1fr); background: linear-gradient(to right, var(--blue) 0 var(--rail-w), var(--bg) var(--rail-w)); }
.rail { padding: 24px 14px 18px; background: var(--blue); box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06); }
.rail__logo { padding: 4px 12px 22px; }
.rail__logo img { width: 118px; }
.rail__product { font-size: 11px; letter-spacing: .2em; color: var(--teal-40); padding: 0 12px 18px; margin-bottom: 10px; border-bottom-color: rgba(255, 255, 255, .10); }
.rail__group { font-size: 11px; letter-spacing: .18em; color: var(--blue-40); padding: 18px 12px 6px; }
.nav a, .nav__disabled { position: relative; gap: 12px; padding: 9px 12px; min-height: 44px; margin: 1px 0; border-radius: 8px; font-size: 15.5px; font-weight: 500; color: var(--blue-20); }
.nav a .ic, .nav__disabled .ic { width: 19px; height: 19px; stroke-width: 2; opacity: .85; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: var(--white); }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, .12); color: var(--white); font-weight: 700; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--white); }
.nav a[aria-current="page"] .ic { opacity: 1; }
.nav a .count { background: var(--grey-60); color: var(--blue); border-radius: 999px; font-family: var(--font-body); font-size: 12px; padding: 2px 8px; }
.nav a[aria-current="page"] .count { background: var(--white); color: var(--blue); }
.nav__disabled { color: var(--blue-40); cursor: default; }
.nav__disabled strong { font-size: 15.5px; font-weight: 500; }
.nav__disabled small { font-family: var(--font-body); font-size: 11.5px; letter-spacing: .02em; color: var(--blue-40); }
.rail__foot { margin: auto 0 0; padding: 14px 12px 0; gap: 11px; border-top-color: rgba(255, 255, 255, .10); }
.avatar { width: 34px; height: 34px; background: var(--teal); font-family: var(--font-display); font-size: 13.5px; letter-spacing: .04em; box-shadow: 0 0 0 2px rgba(255, 255, 255, .14); }
.rail__foot strong { font-family: var(--font-display); font-size: 15px; font-weight: 700; line-height: 1.2; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-signout { font-family: var(--font-body); font-size: 12.5px; color: var(--blue-40); text-decoration: none; margin-top: 2px; }
.rail-signout:hover { color: var(--white); text-decoration: underline; }

/* ---------- Top bar ---------- */
.topbar { min-height: 40px; padding: 0 40px; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid rgba(29, 53, 94, .08); }
.crumbs { font-size: 14px; gap: 6px; }
.crumb + .crumb::before { content: ""; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid var(--ink-40); border-top: 1.5px solid var(--ink-40); transform: rotate(45deg); margin: 0 10px 1px 4px; }
.crumb:last-child { color: var(--blue); font-weight: 700; }
.topbar .btn--s { min-height: 40px; }
.show-sm { display: none; }
@media (max-width: 600px) { .hide-sm { display: none; } .show-sm { display: inline; } }

/* ---------- Page layout ---------- */
.main { background: var(--bg); }
.content { padding: 12px 40px 72px; max-width: calc(var(--content-max) + 80px); }
.page-head { margin-bottom: 12px; align-items: center; }
.page-head p { font-size: 15.5px; margin-top: 4px; max-width: 100ch; }
.section-title { margin: 28px 0 12px; align-items: center; }
.section-title h2, .card__head h2, .card__head h3, .next h2 { font-size: 17px; letter-spacing: 0; }

/* ---------- Surfaces ---------- */
.card { background: none; border: 0; border-top: 1px solid var(--hairline); border-radius: 0; box-shadow: none; }
.card--rail, aside .card { background: var(--white); border: 1px solid var(--hairline); border-radius: 12px; box-shadow: 0 16px 36px rgba(29, 53, 94, .07); }
.card__head { padding: 14px 0 0; border-bottom: 0; }
.card__body { padding: 12px 0 22px; }
.card--rail .card__head, aside .card .card__head { padding: 16px 22px 0; }
.card--rail .card__body, aside .card .card__body { padding: 12px 22px 20px; }
.card__body > h2 + p, .card__body > h3 + p { margin-top: 6px; color: var(--text-muted); }
a.card, .card.agent { transition: box-shadow var(--t-fast), transform var(--t-fast); }
a.card:hover { background: var(--grey-20); }

/* Empty state */
.empty { display: flex; gap: 18px; align-items: center; padding: 22px 0; }
.empty__ic { width: 44px; height: 44px; border-radius: 12px; background: var(--ice-20); color: var(--blue); display: grid; place-items: center; flex: none; }
.empty h2 { font-size: 17px; }
.empty p { color: var(--text-muted); margin-top: 2px; font-size: 14.5px; }

/* ---------- Job band ---------- */
.jobband::before { opacity: .42; background-position: center 42%; }
.jobband::after { background: linear-gradient(100deg, rgba(29, 53, 94, .98) 0%, rgba(29, 53, 94, .90) 46%, rgba(29, 53, 94, .62) 100%); }
.jobband__in { padding: 6px 40px; max-width: calc(var(--content-max) + 80px); align-items: center; }
.jobband__in > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; }
.jobband__eyebrow { display: inline-flex; color: var(--white); background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); padding: 4px 9px; border-radius: 6px; font-size: 11px; }
.jobband__name { font-size: 28px; letter-spacing: -.015em; }
.jobband .addr { font-size: 15px; color: var(--blue-20); margin: 0; }
.jobband__meta { flex-basis: 100%; margin-top: 6px; gap: 10px; }
.jobband__meta div { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--blue-20); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: 5px 12px 5px 10px; }
.jobband__meta div::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal-60); }
.jobband__meta strong { display: inline; font-size: 13.5px; }
.jobband .chip--state { background: var(--white); color: var(--blue); font-size: 12.5px; padding: 8px 12px; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .45); }

/* ---------- Agent cards (Job overview) ---------- */
.agent { gap: 12px; padding: 18px 0; }
.agent__icon { width: 44px; height: 44px; border-radius: 11px; background: var(--ice-20); color: var(--blue); }
.agent__icon .ic { width: 22px; height: 22px; stroke-width: 2; }
.agent h2 { font-size: 17px; margin-top: 4px; }
.agent p { font-size: 14.5px; line-height: 1.5; }
.agent__status { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--grey-60); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--text-muted); }
.agent__status a { font-weight: 600; }
.agent__go { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--grey-60); display: flex; justify-content: space-between; font-size: 15px; }
.agent__go::after { content: "→"; font-family: var(--font-body); transition: transform var(--t-fast); }
a.agent:hover .agent__go::after { transform: translateX(3px); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px; background: var(--teal-20); color: var(--blue); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid currentColor; }

/* ---------- Welcome (Your Jobs) ---------- */
.welcome { grid-template-columns: minmax(300px, 1fr) 2fr; border-radius: 0; }
.welcome__l { padding: 20px 0; background: none; color: var(--ink); }
.welcome__l h2 { color: var(--ink-strong); font-size: 20px; line-height: 1.2; }
.welcome__l p, .welcome__l .eyebrow { color: var(--text-muted); font-size: 15px; }
.welcome__l .btn { margin-top: 20px; }
.welcome__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.welcome__actions form { margin: 0; }
.welcome__r { padding: 20px 0 20px 30px; gap: 26px; align-items: start; }
.welcome__step { position: relative; }
.welcome__step .n { width: 32px; height: 32px; background: var(--white); border: 1.5px solid var(--blue-40); color: var(--blue); font-family: var(--font-display); font-size: 14px; margin-bottom: 12px; }
.welcome__step strong { font-size: 16.5px; color: var(--blue); }
.welcome__step p { font-size: 14px; line-height: 1.5; }

/* ---------- Buttons ---------- */
.btn { min-height: 40px; padding: 0 18px; border-radius: 8px; white-space: nowrap; transition: background-color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), color var(--t-fast); font-size: 14px; font-weight: 600; letter-spacing: .01em; box-shadow: 0 1px 2px rgba(29, 53, 94, .18), inset 0 1px 0 rgba(255, 255, 255, .08); }
@media (max-width: 600px) { .btn:not(.btn--l) { min-height: 44px; } }
.btn:hover { box-shadow: 0 4px 12px -4px rgba(29, 53, 94, .45); }
.btn--secondary { background: var(--white); color: var(--blue); border: 1px solid var(--hairline); box-shadow: 0 1px 2px rgba(29, 53, 94, .06); }
.btn--secondary:hover { background: var(--grey-20); border-color: var(--blue-40); box-shadow: 0 1px 2px rgba(29, 53, 94, .08); }
.btn--ghost { box-shadow: none; }
.btn--s { min-height: 40px; padding: 0 13px; font-size: var(--fs-14); }
.btn .ic { width: 17px; height: 17px; stroke-width: 2.2; }
@media (prefers-reduced-motion: no-preference) { .btn:active { transform: translateY(1px); } }

/* ---------- Chips, flags, tables ---------- */
.chip { font-size: 12.5px; padding: 5px 10px; letter-spacing: .01em; }
table.t { font-size: 14.5px; }
.t td { padding: 13px 6px; border-bottom: 1px solid var(--hairline); }
.t tbody tr:hover { background: var(--grey-20); }
.t .rowlink, .lrow__item { font-size: 14.5px; font-weight: 540; color: var(--ink-strong); }
.t .sub, .lrow .sub { font-size: 11.5px; font-weight: 430; color: var(--text-muted); }
.t td.num, .t td.money { font-size: 13.5px; font-weight: 510; font-variant-numeric: tabular-nums lining-nums; text-align: right; }

/* ---------- Golive steps on the Job page ---------- */
.golive-steps { gap: 18px; }
.golive-steps li::before { background: var(--white); border: 1.5px solid var(--blue-40); font-family: var(--font-display); font-size: 14px; }
.golive-steps strong { font-family: var(--font-display); font-size: 16.5px; color: var(--blue); }
.golive-steps span { font-size: 14.5px; }

/* ---------- Unconverted pages: base elements still read as designed ---------- */
.content > h2, .content > h3 { margin: 28px 0 10px; }
.content > p { color: var(--ink); max-width: 75ch; }
.content > p + p { margin-top: 8px; }
.content > ul, .content > ol { border-top: 1px solid var(--hairline); padding: 14px 0 14px 22px; margin: 12px 0 0; max-width: 900px; }
.content > ul li + li, .content > ol li + li { margin-top: 6px; }
.content > form { border-top: 1px solid var(--hairline); padding: 20px 0; margin-top: 16px; }
.content > article { border-top: 1px solid var(--hairline); padding: 18px 0; margin-top: 16px; }
.content > table:not(.t) { width: 100%; border-top: 1px solid var(--hairline); border-collapse: collapse; margin-top: 16px; }
.content > table:not(.t) th { text-align: left; color: var(--text-muted); padding: 10px 14px; }
.content > table:not(.t) td { padding: 12px 14px; border-top: 1px solid var(--hairline); }
input, select, textarea { border: 1px solid var(--blue-20); border-radius: 8px; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
input:hover, select:hover, textarea:hover { border-color: var(--blue-40); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-20); }
label { font-size: 14.5px; }

/* ---------- Sign-in button ---------- */
.signin__card .btn-ms { display: flex; width: 100%; min-height: 50px; margin-top: 26px; font-size: 16px; text-decoration: none; }

/* ---------- Help drawer ---------- */
.drawer__body h3 { font-size: 15px; letter-spacing: 0; text-transform: none; }

/* ---------- Small screens ---------- */
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; background: var(--bg); }
  .rail__logo { padding: 4px; }
  .rail__logo img { width: 100px; }
  .content { padding: 22px 16px 56px; }
  .topbar { padding: 0 16px; }
  .crumbs .crumb:last-child::before { content: none; margin: 0; }
  .jobband__in { padding: 22px 16px; }
  .jobband__name { font-size: 28px; }
  .rail { padding: 12px 16px; }
  .nav a[aria-current="page"]::before { left: -6px; }
  .welcome { grid-template-columns: 1fr; }
  .welcome__r { gap: 18px; padding-left: 0; }
}

/* The rail becomes a compact top bar before tablet widths.  The content
   column is then the full available page, with no fixed-width child able to
   set the viewport's minimum width. */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); background: var(--bg); }
  .rail { position: relative; height: auto; min-width: 0; padding: 8px 16px; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .rail__product { display: none; }
  .rail__logo { padding: 2px; }
  .rail__logo img { width: 84px; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .rail .nav { display: none; flex-basis: 100%; }
  .rail.open .nav, .rail:focus-within .nav { display: block; }
  .rail__foot { order: 2; margin: 0 8px 0 auto; padding: 0; border: 0; }
  .content { width: 100%; max-width: none; padding: 22px 16px 56px; }
  .topbar { padding: 0 16px; min-width: 0; }
  .topbar__right { min-width: 0; }
  .jobband__in { max-width: none; padding: 22px 16px; }
  .jobband__name { font-size: clamp(24px, 7vw, 30px); line-height: 1.12; overflow-wrap: anywhere; }
  .jobband__name, .page-head h1 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}

@media (max-width: 640px) {
  table.t[data-stack], table.t[data-stack] tbody, table.t[data-stack] tr { display: block; width: 100%; }
  table.t[data-stack] td { min-width: 0; overflow-wrap: anywhere; }
  .num, td.num, .tabular, table.t td[data-label*="Amount" i], table.t td[data-label*="Value" i], table.t td[data-label*="Forecast" i] { font-variant-numeric: tabular-nums lining-nums; text-align: right; }
}

/* ---------- Phone header: one compact band (setup062) ----------
   A phone's first viewport belongs to the page's own content, so the
   rail collapses to the person line beside the existing menu control
   (the navigation stack stays behind it), the shell never stretches
   the strip to fill unused height, and the top bar slims. Desktop
   keeps the sidebar untouched. */
@media (max-width: 960px) {
  .app { align-content: start; }
  .rail { padding: 8px 16px; }
  .rail__logo { padding: 2px; }
  .rail__logo img { width: 84px; }
  .rail__foot { display: flex; order: 2; margin: 0 0 0 auto; padding: 0; border-top: 0; gap: 8px; min-width: 0; align-items: center; }
  .rail__foot .avatar { width: 26px; height: 26px; font-size: 12px; }
  .rail__foot strong { max-width: 16ch; font-size: 13.5px; }
  .rail__foot > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .rail-signout { display: none; }
  .rail.open .rail-signout { display: inline; }
  .menu-toggle { order: 3; margin-left: 0; }
  .topbar { min-height: 44px; }
}

/* ---------- Job setup: the six-step journey (ULT-1503) ---------- */
.next { grid-template-columns: auto 1fr auto; background: none; border: 0; border-top: 1px solid var(--hairline); border-radius: 0; box-shadow: none; padding-left: 0; padding-right: 0; }
.next__tag { padding: 0; align-self: start; justify-self: start; }
.next ol { margin: 8px 0 0; padding-left: 20px; font-size: 15.5px; }
.next ol li { margin: 2px 0; }
.next__cta { align-self: center; }

.setup-steps { position: sticky; top: 84px; background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
.setup-steps ol { list-style: none; margin: 0; padding: 0; }
.setup-steps a { display: flex; gap: 12px; padding: 12px; border-radius: 10px; text-decoration: none; color: var(--ink); align-items: flex-start; }
.setup-steps a:hover { background: var(--grey-20); }
.setup-steps .is-cur a { background: var(--ice-20); }
.setup-steps .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 13.5px; border: 2px solid var(--blue-40); color: var(--blue-80); }
.setup-steps .is-done .n { background: var(--blue); border-color: var(--blue); color: var(--white); }
.setup-steps .is-warn .n { border-color: var(--sig-amber); color: var(--sig-amber); }
.setup-steps strong { display: block; font-size: 15px; color: var(--blue); }
.setup-steps a span span { font-size: 13px; color: var(--text-muted); }
.setup-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; border: 2px solid var(--blue-40); color: var(--blue-80); }
.setup-n.is-done { background: var(--blue); border-color: var(--blue); color: var(--white); }
.setup-n.is-warn { border-color: var(--sig-amber); color: var(--sig-amber); }
.setup__main { min-width: 0; }
.setup__main .page-head { margin-bottom: 20px; }
.setup__main .page-head p { font-size: 15px; margin-top: 4px; }

.person { display: inline-flex; gap: 10px; align-items: center; }
.person strong { display: block; color: var(--ink); font-size: 15px; }
.person .sub { display: block; }
.person--empty strong { color: var(--ink-60); font-weight: 600; }
.avatar--empty { width: 30px; height: 30px; background: var(--white); border: 2px dashed var(--ink-20); color: var(--ink-40); border-radius: 50%; display: grid; place-items: center; }

.golive { list-style: none; margin: 0; padding: 0; }
.golive__item { display: grid; grid-template-columns: 32px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.golive__item:first-child { border-top: 0; padding-top: 0; }
.golive__item p { color: var(--text-muted); font-size: 14.5px; }
.golive__item strong { color: var(--ink); }
.golive__ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; }
.golive__item.is-ok .golive__ic { background: var(--sig-green-bg); color: var(--sig-green); }
.golive__item.is-warn .golive__ic { background: var(--sig-amber-bg); color: var(--sig-amber); }
.golive__item.is-bad .golive__ic { background: var(--sig-red-bg); color: var(--sig-red); }
.golive__item.is-off .golive__ic { background: var(--grey); color: var(--text-muted); }
.notice-list { margin: 0 0 16px; padding-left: 20px; }
.golive-confirm .choice { margin-bottom: 14px; }

.input--s { min-height: 40px; padding: 6px 10px; font-size: 15px; min-width: 200px; }
.picker { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.picker label { font-size: 13px; color: var(--text-muted); }
.choice-card { border-top: 1px solid var(--hairline); padding: 6px 0 16px; }
.choice-card + .disclosure { margin-top: 10px; }
.choice-card .choice { margin: 10px 0; }
.choice-card > label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.choice-card .btn { margin-top: 10px; }

.reads { margin: 0; padding-left: 20px; }
.reads li { margin: 6px 0; color: var(--ink); }
.disclosure { border-top: 1px solid var(--hairline); padding: 4px 0; margin-top: 22px; }
.disclosure summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; color: var(--blue-80); list-style: none; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::before { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 0 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.disclosure[open] > summary::before { transform: rotate(45deg); }
.disclosure__body { padding-top: 12px; }
.disclosure__body code { background: var(--white); border: 1px solid var(--grey-60); border-radius: 6px; padding: 2px 7px; font-size: 13px; overflow-wrap: anywhere; }
.disclosure .kv dt { color: var(--text-muted); margin-top: 10px; }
.disclosure .kv dd { margin: 2px 0 0; }

/* Reference folds inside action rows: the house disclosure, compact —
   a worded summary with no reserved gap beneath it while closed. */
.disclosure--ref { margin-top: 4px; padding: 2px 0; }
.disclosure--ref > summary { min-height: 0; padding: 8px 0; }
.disclosure--ref > .disclosure__body { padding-top: 4px; }

.timeline time { display: block; font-size: 13px; color: var(--text-muted); }
.t.setup-table td { vertical-align: middle; }

@media (max-width: 960px) {
  .next { grid-template-columns: 1fr; }
  .setup-steps { position: static; }
  .notice { flex-wrap: wrap; }
  .golive__item { grid-template-columns: 32px 1fr; }
  .golive__item .btn { grid-column: 2; justify-self: start; }
  .picker { justify-content: flex-start; }
}

/* ---------- Composition refinements after the first render ---------- */
.welcome__r { align-content: center; }
.agent__status { flex-direction: column; align-items: flex-start; gap: 8px; font-size: 13.5px; }
.agent__status .pill { order: -1; }
.golive-steps + p.muted, .golive-steps + p { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--grey-60); font-size: 14.5px; color: var(--text-muted); }

/* ---------- Sign in: the first impression (ULT-1561 v2.1) ----------
   Condensed brand voice throughout, the big headline back, one strong primary button. */
.signin { grid-template-columns: minmax(0, 1.35fr) minmax(420px, .9fr); font-family: var(--font-display); }
.signin__photo::before { background-position: 58% 30%; }
.signin__photo::after { background: linear-gradient(180deg, rgba(29, 53, 94, .05) 0%, rgba(29, 53, 94, .25) 45%, rgba(29, 53, 94, .94) 100%); }
.signin__words { left: clamp(28px, 5vw, 72px); right: clamp(28px, 5vw, 72px); bottom: clamp(32px, 7vh, 72px); }
.signin__words .eyebrow { color: var(--teal-40); font-size: 12.5px; letter-spacing: .22em; }
.signin__words h1 { font-family: var(--font-display); font-size: clamp(48px, 6.2vw, 92px); line-height: .94; letter-spacing: -.02em; margin-top: 16px; max-width: 9.5ch; }
.signin__words p { font-family: var(--font-display); font-size: clamp(17px, 1.45vw, 21px); line-height: 1.45; color: var(--blue-20); max-width: 34em; margin-top: 20px; }
.signin__agents { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; padding: 0; list-style: none; }
.signin__agents li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .34); background: rgba(29, 53, 94, .35); color: var(--white); font-size: 14.5px; font-weight: 600; letter-spacing: .02em; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.signin__agents .ic { width: 16px; height: 16px; stroke-width: 2; }
.signin__panel { padding: clamp(36px, 5vw, 64px) clamp(32px, 4.5vw, 72px); gap: 0; justify-content: space-between; }
.signin__panel > img { width: 150px; }
.signin__card { margin: 40px 0; max-width: 440px; width: 100%; padding: 44px 42px 34px; border-radius: 16px; box-shadow: 0 40px 80px -36px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .12); }
.signin__card h1 { font-size: 40px; line-height: 1; letter-spacing: -.015em; }
.signin__card p { font-family: var(--font-display); font-size: 17.5px; line-height: 1.45; margin-top: 14px; }
.signin__card p:has(> .btn-ms) { margin-top: 0; }
.signin__card .btn-ms { display: flex; width: 100%; min-height: 56px; margin-top: 30px; gap: 12px; font-size: 17.5px; letter-spacing: .02em; border-radius: 10px; text-decoration: none; }
.signin__card .btn-ms:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -12px rgba(29, 53, 94, .7); }
.signin__card .btn-ms .ic { width: 20px; height: 20px; stroke-width: 2; }
.signin__fine { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--grey-60); display: grid; gap: 8px; }
.signin__fine span { display: flex; gap: 10px; align-items: flex-start; font-family: var(--font-body); font-size: 13.5px; line-height: 1.45; color: var(--text-muted); }
.signin__fine .ic { width: 16px; height: 16px; margin-top: 1px; color: var(--teal); stroke-width: 2; flex: none; }
.signin__foot { font-size: 12px; letter-spacing: .2em; color: var(--blue-40); }
@media (max-width: 700px) {
  .signin { grid-template-columns: 1fr; }
  .signin__hero, .signin__photo { display: block; min-height: 340px; }
  .signin__words { left: 20px; right: 20px; bottom: 22px; }
  .signin__words h1 { font-size: 46px; }
  .signin__words p { font-size: 16.5px; margin-top: 12px; }
  .signin__agents { margin-top: 16px; gap: 8px; }
  .signin__agents li { font-size: 13px; padding: 6px 11px; }
  .signin__panel { min-height: 0; padding: 28px 20px 30px; gap: 26px; justify-content: flex-start; }
  .signin__panel > img { width: 120px; }
  .signin__card { margin: 0; padding: 32px 26px 26px; }
  .signin__card h1 { font-size: 34px; }
}

/* =====================================================
   ULT-1500: Weekly Report content — section status pickers, the
   risk and decision rows, and the Leadership dashboard.
   ============================================================ */

/* --- The PM page: a section's status picker beside its table --- */
.sec-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; align-items: start; }
.sec-status { background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.sec-status .lbl { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-80); }
.sec-status .input--s { min-width: 0; width: 100%; }
.sec-status .sub { font-size: 13px; color: var(--text-muted); }
/* The PM page: the sections sit in the sheet's two-column grid, each using its whole cell. */
.section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; margin-top: 20px; }
.section-grid > .card { margin: 0; }
.section-card__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.section-card__grid .table-wrap { overflow-x: visible; }
.section-card__grid .t td.num { white-space: nowrap; min-width: 6.5rem; }
@media (max-width: 900px) { .section-grid { grid-template-columns: 1fr; } }
.jump { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); padding: 2px 0; }
.jump__lbl { color: var(--text-muted); }
.jump__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.jump__list a { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--blue); text-decoration: none; }
.jump__list a:hover { text-decoration: underline; }
.jump__what { white-space: nowrap; }
.working + .working { margin-top: 20px; }
.working h3 { margin: 0 0 10px; font-size: 16px; }
@media (max-width: 700px) { .jump { display: none; } }
[class*="checklist__item--"] { padding: 8px 0; }
.sec-status { padding: 10px 12px; gap: 6px; }
/* The compact dark status block: the button and the line saying what it does sit together. */
.next__cta { display: grid; gap: 8px; justify-items: start; max-width: 260px; }
.next__cta .why, .next .why { font-size: 13.5px; }
.disclosure summary .flag { margin-left: 4px; }
.disclosure summary .muted { margin-left: auto; font-weight: 400; }

/* --- Risk and decision rows, on the PM and CM pages --- */
.riskrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.riskrow:first-child { border-top: 0; padding-top: 0; }
.riskrow strong { font-size: 16px; }
.riskrow__fields { grid-template-columns: 1fr 1fr 170px; gap: 12px; margin-top: 12px; }
.riskrow__fields .field + .field, .riskrow__main .field + .field { margin-top: 10px; }
.riskrow__act { display: grid; gap: 8px; align-content: start; justify-items: end; }
.riskrow--sug { background: rgba(29, 53, 94, .04); border-radius: 8px; padding: 14px; border-top: 0; margin-top: 8px; }
.suggestions { margin-top: 20px; padding-top: 16px; border-top: 2px solid var(--line); }
.suggestions h3 { font-size: 15px; }
.chip--suggested { background: color-mix(in srgb, var(--suggest-green-80) 12%, transparent); color: var(--suggest-green); border-color: color-mix(in srgb, var(--suggest-green-80) 30%, transparent); }

/* --- The Leadership dashboard --- */
.report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin: 4px 0 18px; flex-wrap: wrap; }
.report-head .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-80); }
.status-big { display: grid; gap: 6px; justify-items: end; text-align: right; }
.status-big > span:first-child { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.status-big .flag { font-size: 15px; padding: 7px 16px; }
.dash { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dash__src { font-size: 12.5px; margin: -4px 0 0; }
.dash .dash__t { font-size: 13.5px; }
@media (max-width: 1280px) { .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash__sec { border-top: 1px solid var(--hairline); padding: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.dash__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--hairline); padding-bottom: 8px; }
.dash__t { width: 100%; border-collapse: collapse; font-size: 15px; }
.dash__t th { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); text-align: right; padding: 0 0 6px 10px; }
.dash__t td { padding: 7px 0 7px 10px; border-top: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.dash__t td:first-child { text-align: left; padding-left: 0; }
.dash__c { color: var(--ink); font-size: 14.5px; margin: 0; }
.dash__sign { justify-content: start; }

/* --- The Weekly Report sheet: one fixed canvas, scaled to fit --- */
.wr-fit { position: relative; overflow: hidden; }
.wr-sheet { width: 1440px; transform-origin: top left; background: var(--white); border-radius: 0; overflow: hidden; display: grid; gap: 14px; padding: 0 0 16px; }
.wr-sheet > :not(.wr-head) { margin: 0 16px; }
.wr-head { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 24px; background: var(--blue); color: var(--white); padding: 18px 22px; }
.wr-logo { height: 40px; }
.wr-title h2 { color: var(--white); font-size: 26px; margin: 0; }
.wr-title p { color: var(--blue-20); margin: 4px 0 0; font-size: 15px; }
.wr-stages { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0 0 12px; padding: 0; }
.wr-stages li { padding: 6px 14px; font-size: 14px; font-weight: 600; color: var(--text-muted); border-radius: 8px; }
.wr-stages li.wr-stage--done { color: var(--ink); }
.wr-stages li.wr-stage--now { background: var(--blue-20); color: var(--blue); }
.wr-head .wr-stages { margin: 0; }
.wr-head .wr-stages li { color: var(--blue-20); }
.wr-head .wr-stages li.wr-stage--done { color: var(--white); }
.wr-head .wr-stages li.wr-stage--now { background: var(--blue-60); color: var(--white); }
.wr-overall { background: var(--white); color: var(--blue); border-radius: 8px; padding: 8px 16px; display: grid; justify-items: center; gap: 4px; }
.wr-overall > span:first-child { font-size: 12.5px; color: var(--text-muted); }
.wr-lead { font-size: 15px; margin: 0; }
.wr-sheet .dash { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wr-sheet .dash__t { font-size: 14.5px; }
.wr-sheet .dash__t th { white-space: nowrap; vertical-align: bottom; }
.wr-sheet .dash__t th small { display: none; }
.wr-sheet .dash__t td:not(:first-child) { white-space: nowrap; }
.wr-sheet .dash__t { table-layout: auto; width: 100%; }
.wr-sheet .dash__t td:first-child { width: 46%; }
.wr-sheet .dash__t td:not(:first-child) small { display: block; }
.wr-foot { display: grid; grid-template-columns: 3fr 1fr; gap: 14px; }
.wr-risks__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wr-risks__list > p { grid-column: 1 / -1; }
.wr-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.minutes-untouched__list { columns: 3 220px; margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.minutes-untouched__list li { break-inside: avoid; }

/* --- The CM page's sticky decision column --- */
.cm-decide { position: sticky; top: 84px; align-self: start; }

@media (max-width: 960px) {
  .dash { grid-template-columns: 1fr; }
  .riskrow__fields { grid-template-columns: 1fr; }
  .sec-grid { grid-template-columns: 1fr; }
  .cm-decide { position: static; }
  .status-big { justify-items: start; text-align: left; }
}

/* ===== ULT-1928: content defaults =====
   Base styles for classless HTML elements inside the main content region only (the rail
   and top bar are untouched). Every selector sits in :where(), so it adds no specificity:
   any component rule that already styles an element (.next ol, .content > ul, .setup-steps ol)
   still wins. Elements that carry a class are never matched. Colours come from tokens only. */

/* Classless buttons take the primary brand button look (.btn). */
.content :where(button:not([class]), input[type=submit]:not([class]), input[type=button]:not([class])) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: auto; min-height: 44px; padding: 0 18px;
  border: 1.5px solid var(--blue); border-radius: 8px; background: var(--blue); color: var(--white);
  font: inherit; font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: .01em;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 1px 2px rgba(29, 53, 94, .18), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.content :where(button:not([class]):hover, input[type=submit]:not([class]):hover, input[type=button]:not([class]):hover) {
  background: var(--blue-80); border-color: var(--blue-80);
}
.content :where(button:not([class]):focus-visible, input[type=submit]:not([class]):focus-visible, input[type=button]:not([class]):focus-visible) {
  outline: 3px solid var(--blue); outline-offset: 2px;
}

/* Classless lists: brand spacing and marker; separated rows when a direct child of a card. */
.content :where(ul:not([class]):not(.setup-steps *), ol:not([class]):not(.setup-steps *)) {
  margin: 8px 0 0; padding-left: 22px;
}
.content :where(ul:not([class]):not(.setup-steps *) > li + li, ol:not([class]):not(.setup-steps *) > li + li) {
  margin-top: 6px;
}
.content :where(ul:not([class]):not(.setup-steps *) > li, ol:not([class]):not(.setup-steps *) > li)::marker {
  color: var(--blue-80); font-size: .85em;
}
.content :where(.card > ul:not([class]), .card > ol:not([class])) {
  margin: 0; padding: 4px 22px; list-style: none;
}
.content :where(.card > ul:not([class]) > li, .card > ol:not([class]) > li) {
  margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.content :where(.card > ul:not([class]) > li:last-child, .card > ol:not([class]) > li:last-child) {
  border-bottom: 0;
}

/* Classless definition lists: label and value in two columns, stacked on narrow screens. */
.content :where(dl:not([class])) {
  display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr); gap: 8px 24px; margin: 12px 0 0; padding: 0;
}
.content :where(dl:not([class]) > dt) {
  margin: 0; font-family: var(--font-display); font-size: 13.5px; font-weight: 700; letter-spacing: .04em; color: var(--text-muted);
}
.content :where(dl:not([class]) > dd) { margin: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .content :where(dl:not([class])) { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .content :where(dl:not([class]) > dd) { margin-bottom: 10px; }
}

/* Classless disclosures: a chevron row in the brand heading face instead of the browser triangle. */
.content :where(details:not([class])) { margin-top: 12px; }
.content :where(details:not([class]) > summary:not([class])) {
  display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 700; color: var(--blue);
}
.content :where(details:not([class]) > summary:not([class]))::-webkit-details-marker { display: none; }
.content :where(details:not([class]) > summary:not([class]))::before {
  content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 0 2px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg);
}
.content :where(details:not([class])[open] > summary:not([class]))::before { transform: rotate(45deg); }
.content :where(details:not([class]) > summary:not([class]):focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Classless form fields match the styled .input field: height, border, radius and focus ring. */
.content :where(select:not([class]), textarea:not([class]), input:not([class]):not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=reset]):not([type=file]):not([type=range]):not([type=color]):not([type=image])) {
  min-height: 46px; padding: 10px 13px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--ink-20); border-radius: var(--radius);
}
.content :where(textarea:not([class])) { min-height: 104px; resize: vertical; line-height: 1.5; }
.content :where(select:not([class]):focus, textarea:not([class]):focus, input:not([class]):focus) {
  outline: 3px solid var(--blue); outline-offset: 2px; border-color: var(--blue); box-shadow: none;
}

@media (prefers-reduced-motion: no-preference) {
  .content :where(button:not([class]), input[type=submit]:not([class]), input[type=button]:not([class])) {
    transition: background var(--t-fast), border-color var(--t-fast);
  }
  .content :where(details:not([class]) > summary:not([class]))::before { transition: transform var(--t-fast); }
}
@media (prefers-reduced-motion: reduce) {
  .content :where(button:not([class]), input[type=submit]:not([class]), details:not([class]) > summary:not([class])), .content :where(details:not([class]) > summary:not([class]))::before { transition: none; }
}
/* ===== end ULT-1928: content defaults ===== */

/* ===== Machine strings never set the page's own width =====
   A source revision's id, its SHA-256 and a transcript block carry no
   spaces, so left alone they set the page's minimum width wider than a
   phone. Classless code and preformatted blocks wrap inside their own
   element instead: the words stay on the page, readable, at 390 px. */
.content :where(pre:not([class])) { white-space: pre-wrap; overflow-wrap: anywhere; }
.content :where(code:not([class])) { overflow-wrap: anywhere; }

/* ---------- Tables stack into cards on a phone ---------- */
.t td.money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .table-wrap:has(> table.t[data-stack]) { overflow: visible; }
  table.t[data-stack], table.t[data-stack] tbody, table.t[data-stack] tr { display: block; }
  table.t[data-stack] thead { display: none; clip-path: inset(50%); }
  table.t[data-stack] tr { background: none; border: 0; border-top: 1px solid var(--hairline); border-radius: 0; padding: 4px 0; }
  table.t[data-stack] td { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; padding: 10px 0; border-bottom: 0; text-align: right; }
  table.t[data-stack] td:last-child { border-bottom: 0; }
  table.t[data-stack] td[data-label]::before { content: attr(data-label); flex: none; max-width: 100%; overflow-wrap: anywhere; font-family: var(--font-display); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); text-align: left; }
  table.t[data-stack] td:not([data-label]) { justify-content: flex-start; text-align: left; }
  /* The stacked cards carry their own labels, so the hidden header row is dropped here. */
  .table-wrap--glance table.t[data-stack] thead { display: none; }
}

/* A status chip can carry a week's whole standing ("Week ending Fri 30 Oct:
   Awaiting the Construction Manager"), wider than a phone. On a phone a
   chip wraps like the words around it instead of widening the page. */
@media (max-width: 700px) { .chip, .flag { white-space: normal; } }

/* A table heading can carry a whole sentence — the Draft table's
   "Last wk · Weekly Report · as at …" note under the Last-wk column is
   wider than a phone. On a phone the heading and its sub note wrap like
   the words around them, instead of the hidden heading row, or the
   stacked label that repeats it, setting the page's own width.
   Desktop keeps its single-line headings. */
@media (max-width: 700px) { .t th, .t th small { white-space: normal; overflow-wrap: anywhere; } }

/* ---------- Agent status lines on a home Job row (ULT-1790) ---------- */
.status-lines { list-style: none; margin: 12px 0 0; padding: 0; width: 100%; border-top: 1px solid var(--grey-60); }
.status-line { border-bottom: 1px solid var(--grey-60); }
/* Two classes, or the shared a[href] control rule (ULT target size) would
   out-rank this and draw the row as one flex line whose labels crush to a
   character or two wide on a phone. */
.status-line .status-line__link { display: grid; grid-template-columns: auto minmax(9rem, auto) minmax(0, 1fr) auto auto; align-items: center; gap: 4px 12px; min-height: 44px; padding: 8px 4px; color: var(--ink); text-decoration: none; }
a.status-line__link:hover { background: var(--grey-20); }
.status-line__link .ic { color: var(--blue); }
.status-line__agent { font-family: var(--font-display); color: var(--blue); font-weight: 700; }
.status-line__text { overflow-wrap: anywhere; }
.status-line__meta { font-size: 13px; color: var(--text-muted); text-align: right; overflow-wrap: anywhere; }
.status-line--missing .status-line__text { font-weight: 700; color: var(--ink-60); }
@media (max-width: 700px) {
  .status-line .status-line__link { grid-template-columns: auto minmax(0, 1fr) auto; }
  .status-line__text, .status-line__meta { grid-column: 2; text-align: left; }
  .status-line__go { grid-row: 1 / span 3; }
  /* A trailing label that only repeats the row's own heading adds nothing here. */
  .status-line__meta--echo { display: none; }
}

/* ---------- Needs you leads home (ULT-1788) ---------- */
.needs-you { margin-bottom: 24px; }
.needs-you__none { margin: 0; padding: 16px 0; font-size: 16px; }

/* ---------- Systems strip on a home Job row (ULT-1794) ---------- */
.systems-strip { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; margin-top: 12px; }
.systems-strip__label { color: var(--text-muted); padding-top: 8px; }
.systems-strip__list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; flex: 1 1 0; min-width: 0; }
.systems-strip__item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 4px 10px; border: 1px solid var(--grey); border-radius: var(--radius); background: var(--white); font-size: 14px; max-width: 100%; overflow-wrap: anywhere; }
.systems-strip__item strong { font-family: var(--font-display); color: var(--blue); }
.systems-strip__state { color: var(--ink); }
.systems-strip__why { font-size: 13px; color: var(--text-muted); }
.systems-strip__item--failed { border-color: var(--sig-red); background: var(--sig-red-bg); }
.systems-strip__item--failed .systems-strip__state { color: var(--sig-red); font-weight: 700; }
.systems-strip__item--missing .systems-strip__state, .systems-strip__item--off .systems-strip__state { font-weight: 700; color: var(--ink-60); }
.systems-strip__none { margin: 0; padding-top: 6px; color: var(--text-muted); }
.systems-strip__setup { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; font-weight: 700; color: var(--blue); }
@media (max-width: 700px) { .systems-strip__list { flex-direction: column; flex-basis: 100%; } .systems-strip__setup { margin-left: 0; } }
/* ---------- Next dates (Job overview) ---------- */
.next-dates { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--grey-60); }
.next-dates__item { border-bottom: 1px solid var(--grey-60); }
.next-dates__item a { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; min-height: 44px; padding: 8px 4px; color: var(--ink); text-decoration: none; }
.next-dates__item a:hover { background: var(--grey-20); }
.next-dates__item strong { font-family: var(--font-display); color: var(--blue); overflow-wrap: anywhere; }
.next-dates__when { white-space: nowrap; }
.next-dates__when .flag { margin-right: 8px; }
.next-dates__none { margin: 12px 0 0; color: var(--text-muted); }
.next-dates__none:first-child { margin-top: 0; }
@media (max-width: 700px) { .next-dates__when { white-space: normal; } }

/* Stat tiles (Payments, Weekly, the Job overview and the forecast pages
    share the one .grid.g-4 row): the two-column phone split v1 gives
    .g-4 leaves a 30 px caption about 129 px wide, under the 8
    characters a phone line must hold, so on a phone the tiles stack
    full width and every caption column clears 160 px. */
@media (max-width: 700px) { .grid.g-4 { grid-template-columns: 1fr; } }

/* Every actionable target, including inline links and compact controls, is
   reachable on desktop and phone. Hidden inputs remain hidden. */
:where(a[href], button, input:not([type="hidden"]), select, textarea, summary,
       [role="button"], [tabindex="0"]) {
  min-width: 44px !important;
  min-height: 44px !important;
  box-sizing: border-box;
}
a[href] { display: inline-flex; align-items: center; }
input[type="checkbox"], input[type="radio"] { flex: 0 0 44px; }

/* ---------- How UltrAI works: the generated pages and their drawn workflows ---------- */
.hiw__summary { font-size: 16.5px; margin: 0 0 6px; }
.hiw-installed { margin: 0 0 8px; }
.hiw-never, .hiw-changes, .hiw-outputs, .hiw-planned { margin: 8px 0 0; }
.hiw-index { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--hairline); }
.hiw-index__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 13px 6px;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-strong);
  text-decoration: none;
}
.hiw-index__row:hover { background: var(--grey-20); }
.hiw-index__row strong { font-size: 14.5px; font-weight: 600; }
.hiw-index__summary { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-60); }
.hiw-link { color: var(--blue); text-decoration: underline; }
.hiw-outputs li, .hiw-planned li { margin: 10px 0; }
.hiw-output__where { margin: 3px 0 0; }
.hiw-output__where a { font-size: 13px; }
.hiw-graph { margin: 6px 0 0; }
.hiw-node { font-family: ui-monospace, monospace; font-size: 12.5px; color: var(--ink-60); }
.hiw-step__guard { margin: 3px 0 0; color: var(--ink-60); }
.hiw-step__options { margin: 6px 0 0; padding-left: 18px; }
.hiw-step__options li { margin: 2px 0; }

/* The wide drawing is shown from 760 px up; the single-column drawing
   below it. Colour reaches the SVG only through brand tokens. */
.hiw-svg--wide { display: block; width: 100%; max-width: none; height: auto; margin: 12px 0 4px; }
.hiw-video { display: block; width: 100%; max-width: 960px; margin: 0 auto 22px; border-radius: var(--radius); background: var(--ultra-navy); }
.technical-details { margin-top: 24px; }
.technical-details summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; color: var(--blue); }
.hiw-svg--phone { display: none; }
.hiw-svg text { font-family: var(--font-body); fill: var(--ink-strong); }
.hiw-svg--phone text { font: 14.5px/1.3 var(--font-body); }
.hiw-svg--wide text { font-size: 22px; }
.hiw-tag { font-weight: 600; fill: var(--blue-80); }
.hiw-title { font-weight: 600; font-size: 26px; }
.hiw-svg--phone .hiw-title { font-size: 16.5px; }
.hiw-guard, .hiw-ends { fill: var(--ink-60); }
.hiw-due { fill: var(--blue-80); }
.hiw-lane { font-weight: 600; letter-spacing: .09em; font-size: 22px; fill: var(--blue-80); }
.hiw-flowhead { font-weight: 600; font-size: 22px; fill: var(--blue-80); }
.hiw-svg--phone .hiw-flowhead { font-size: 14.5px; }
.hiw-card > rect { fill: var(--white); stroke: var(--hairline); stroke-width: 1; }
.hiw-card--agent > rect { stroke: var(--blue); }
.hiw-card--decision > rect { stroke: var(--blue); stroke-width: 2; }
.hiw-card--decision .hiw-guard, .hiw-card--decision .hiw-ends { fill: var(--ink-strong); }
.hiw-card--decision.hiw-card--outside > rect, .hiw-card--outside > rect, .hiw-card--system > rect { stroke-dasharray: 5 4; }
.hiw-syscard > rect { fill: var(--white); stroke: var(--hairline); }
.hiw-sysname { font-weight: 600; fill: var(--ink-strong); }
.hiw-edge { fill: none; stroke: var(--blue); stroke-width: 1.5; }
.hiw-edge--return { stroke-dasharray: 6 4; }
.hiw-edge--data { stroke-dasharray: 2 4; stroke-linecap: round; }
.hiw-head { fill: var(--blue); stroke: none; }
.hiw-edge-label { font-size: 22px; fill: var(--ink-60); }
.hiw-svg--phone .hiw-edge-label { font-size: 14.5px; }
/* The wide drawing is 1240 units across, so its 22 unit text drops under 15 px
   when the card is narrower than about 845 px (a window under 1210 px beside
   the rail). Below 1220 px the stacked drawing, at most 460 px wide so its
   14.5 unit text stays above 17 px, takes its place. */
@media (max-width: 1219px) {
  .hiw-svg--wide { display: none; }
  .hiw-svg--phone { display: block; width: 100%; max-width: 460px; height: auto; margin: 12px auto 4px; }
}
@media (max-width: 640px) {
  .hiw-svg--wide, .hiw-svg--phone { display: none; }
}

@media (min-width: 641px) { .hiw-steps { display: none; } }
.hiw-steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.hiw-step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 9px 12px; background: var(--white); border: 1px solid var(--grey); border-left: 5px solid var(--ultra-navy); border-radius: 8px; }
.hiw-step--decision { border-left-color: var(--ultra-gold); }
.hiw-step__n { width: 24px; height: 24px; border: 2px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--ultra-navy); }
.hiw-step__actor { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--blue-80); }
.hiw-step p { margin: 3px 0 0; }
.hiw-step__due { display: inline-block; margin: 6px 8px 0 0; padding: 1px 8px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 12.5px; color: var(--ink-60); }
@media (max-width: 700px) { .hiw-step { grid-template-columns: minmax(0, 1fr); } }

/* Weekly report sheet on a phone: one column that reads, never a
   1440px sheet shrunk to a quarter. TV and A3 modes keep their fixed
   width through their own page styles. */
@media (max-width: 640px) {
  .wr-sheet { width: auto; }
  .wr-head { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wr-overall { justify-items: start; }
  .wr-sheet .dash, .wr-foot, .wr-risks__list { grid-template-columns: minmax(0, 1fr); }
  .wr-sheet .dash__t th, .wr-sheet .dash__t td:not(:first-child) { white-space: normal; }
  .wr-sheet .dash__t td:first-child { width: auto; }
}

/* Row actions wrap inside their cell rather than run past the card (DESIGN-STANDARD 2). */
@media (max-width: 700px) { .t td .btn { white-space: normal; } }
/* A button whose label is a person's name and seat: it wraps inside its card, never wider than the phone. */
.btn--wrap { white-space: normal; max-width: 100%; height: auto; padding-top: 8px; padding-bottom: 8px; text-align: center; overflow-wrap: anywhere; }

/* A Job that is not Live yet says how many setup checks still fail, under its state chip (SPEC A3). */
.job-row__state, .jobband__state { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.jobband__state { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.job-row__checks, .jobband__checks { margin: 0; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.job-row__checks { color: var(--text-muted); }
.job-row__checks a { color: var(--blue); }
.jobband__checks { color: var(--blue-20); }
.jobband__checks a { color: var(--white); text-decoration: underline; }

/* A workflow step's name and its rule are two lines in one block, in the table and on a phone card. */
.step-name { display: flex; flex-direction: column; gap: 2px; flex: 1 1 12rem; min-width: 0; }
.step-name .sub { display: block; font-weight: 400; }

/* --- Night audit M3: the Leadership sheet is readable where it is read.
   In the app the sheet is not shrunk from a 1440px canvas (that made 14px
   text 9px at 1280); it flows at the page's own width. The TV and A3 pages
   (data-box) keep their fixed canvas. Nothing in the sheet is under 14px. --- */
.wr-fit:not([data-box]) .wr-sheet { width: auto; }
.wr-fit:not([data-box]) .wr-head { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 12px; }
.wr-fit:not([data-box]) .wr-stages { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
.wr-fit:not([data-box]) .wr-sheet .dash { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.wr-fit:not([data-box]) .wr-foot { grid-template-columns: minmax(0, 1fr); }
.wr-fit:not([data-box]) .wr-risks__list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
@media (max-width: 640px) {
  .wr-fit:not([data-box]) .wr-head { grid-template-columns: minmax(0, 1fr); }
  .wr-fit:not([data-box]) .wr-stages { grid-row: auto; }
}
.wr-fit:not([data-box]) .wr-sheet .dash__src,
.wr-fit:not([data-box]) .wr-sheet .dash__t th,
.wr-fit:not([data-box]) .wr-sheet .wr-stages li,
.wr-fit:not([data-box]) .wr-sheet .wr-overall > span:first-child,
.wr-fit:not([data-box]) .wr-sheet .flag,
.wr-fit:not([data-box]) .wr-sheet .risk .meta div > span:first-child,
.wr-fit:not([data-box]) .wr-sheet .risk .meta .muted { font-size: 14px; }

/* The preparation page is the report sheet with its figures in place: two
   blocks across on a desk, the same blocks stacked on a phone. */
.wr-prep { padding-top: 16px; }
.wr-prep__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.wr-prep__head h2 { font-size: 20px; margin: 0 0 4px; }
.wr-prep__head p { margin: 2px 0; }
.wr-prep__act { display: grid; justify-items: start; gap: 6px; }
.wr-fit:not([data-box]) .wr-sheet.wr-prep .dash { display: block; columns: 2; column-gap: 14px; }
.wr-sheet.wr-prep .dash__sec { break-inside: avoid; margin-bottom: 14px; }
.wr-fit:not([data-box]) .wr-sheet.wr-prep .dash__t td:not(:first-child) { white-space: normal; }
.wr-prep .dash__t td { padding-top: 3px; padding-bottom: 3px; }
.wr-prep .dash__t td .flag { padding: 1px 8px; }
.wr-prep .dash__t td small { line-height: 1.15; }
.wr-trend { display: inline-block; width: 12px; height: 12px; margin-left: 6px; vertical-align: -1px; color: var(--text-muted); }
.wr-trend svg { display: block; }
.wr-gapnote { background: color-mix(in srgb, var(--blue) 8%, white); border: 0; border-radius: 10px; margin: 0; padding: 0 16px; }
.wr-gapnote > summary { font-weight: 600; color: var(--blue); }
.wr-gapnote > summary .muted { margin-left: 0; font-weight: 400; }
.wr-gapnote ul { margin: 0; padding: 0 0 12px 20px; }
.wr-prep textarea.input, .wr-prep .dash__t input.input { width: 100%; max-width: 100%; box-sizing: border-box; }
.wr-prep .dash__t input.input { min-width: 80px; }
.wr-fit:not([data-box]) .wr-sheet.wr-prep .wr-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .wr-fit:not([data-box]) .wr-sheet.wr-prep .dash,
  .wr-fit:not([data-box]) .wr-sheet.wr-prep .wr-foot { grid-template-columns: minmax(0, 1fr); }
  .wr-fit:not([data-box]) .wr-sheet.wr-prep .dash { columns: 1; }
  .wr-prep__act, .wr-prep__act .btn { width: 100%; }
}

/* A short phrase that must stay on one line, such as "No cover". */
.nowrap { white-space: nowrap; }

/* Night audit M9: a check flag and its sentence sit side by side, and the flag
   never overlaps the words next to it, on a phone as on a desk. */
.flagrow { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 12px; margin: 0 0 14px; }
.flagrow > .chip, .flagrow > .flag { flex: none; }
.flagrow > span { flex: 1 1 14rem; min-width: 0; }
.flaglist { margin: 0; }
.flaglist .flagrow { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); align-items: center; }
.flaglist .flagrow:first-child { border-top: 0; }
.meter { height: 8px; border-radius: 999px; background: var(--grey); overflow: hidden; margin: 14px 0 6px; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--blue)); }

/* Lines you type: each line the Project Manager fills in is one short block,
   with the control and its helper text at full width (never one word a line). */
.typed__sec { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-80); margin: 8px 0 0; }
.typed__sec:first-child { margin-top: 0; }
.typed__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
@media (max-width: 1100px) { .typed__grid { grid-template-columns: minmax(0, 1fr); } }
.typerow { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(9rem, 1.5fr); gap: 2px 14px; align-items: start; padding: 4px 0; border-top: 1px solid var(--line); }
.typerow__label small, .typerow__input .field__help, .typerow__plan .field__help { display: block; font-size: 14px; color: var(--text-muted); margin-top: 3px; }
.typerow__label { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.typerow__label > strong { flex: 0 0 100%; }
.typerow__label > small { display: inline; margin: 0; }
.typerow__src { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.typerow__src small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.typerow__src--waiting, .typerow__label > small.typerow__last--none { display: none; }
.typerow__input .field__help { display: none; }
.typerow__input:focus-within .field__help { display: block; }
.typerow__last { font-variant-numeric: tabular-nums; }
.typerow__last .muted { display: block; font-size: 14px; }
.typerow__input .input, .typerow__plan .input { width: 100%; min-width: 0; }
.typerow__plan label { display: block; font-size: 14px; color: var(--text-muted); }
.typerow__src small { display: block; margin-top: 4px; font-size: 14px; }
.typerow__comment { margin-top: 4px; }
.typerow__comment .disclosure { background: none; border: 0; padding: 0; }
.typerow__comment .disclosure summary { padding: 0; min-height: 44px; display: flex; align-items: center; font-size: 14px; }
.typerow__comment .disclosure__body { padding: 6px 0 0; }
.needs-inline { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; }
@media (max-width: 760px) {
  .typerow { grid-template-columns: minmax(0, 1fr); }
}

/* The Project Manager's page: one short band per section on a desk (figures,
   status and commentary side by side), so seven sections are not seven tall cards. */
@media (min-width: 901px) {
  .section-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
  .section-grid > .card .card__head { padding: 10px 18px; }
  .section-card__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 18px; align-items: start; }
  .section-card__grid > .stack { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .section-card__grid .t thead { display: none; }
  .section-card__grid .t td { padding: 5px 8px; font-size: 14.5px; }
}
.section-card__title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 6px; }
.section-card__title h2 { margin: 0; }
.section-card .section-card__grid { padding-top: 14px; }
.typed__note { margin: 0 0 6px; color: var(--text-muted); font-size: 14px; }
.typed__note small { margin-left: 6px; font-size: 14px; }
.needs-line { margin: 4px 0 12px; font-size: 16px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 10px 16px; }
.plans__item { display: grid; gap: 4px; font-size: 14px; color: var(--text-muted); }
.typed__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
@media (min-width: 901px) {
  .section-card__grid .t td { padding: 3px 8px; }
  .section-card .section-card__grid { padding-top: 10px; padding-bottom: 10px; }
  .submit-rail .card__body { display: flex; flex-wrap: wrap; gap: 0 28px; align-items: center; }
  .submit-rail .riskrow { flex: 1 1 15rem; padding: 8px 0; border-top: 0; }
  .submit-rail .disclosure, .submit-rail form { flex: 1 1 100%; }
}
/* ---------- Docket queue: one compact line per docket, filter and pager ---------- */
.docket-filter, .filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.docket-filter a, .filter-chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-size: 14px; text-decoration: none; }
.docket-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 12px; }
.docket-toolbar .docket-filter { margin: 0; flex: 1 1 auto; }
.docket-toolbar__search { flex: 0 1 18rem; }
.docket-search { width: 100%; box-sizing: border-box; min-height: 44px; padding: 0 16px; border: 1px solid var(--grey-60); border-radius: 999px; background: var(--white); font: inherit; font-size: 14px; color: var(--ink); }
.docket-toolbar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.docket-row { display: flex; align-items: center; }
.docket-row__check { flex: none; width: 44px; height: 44px; margin: 0; }
input.docket-row__check { accent-color: var(--blue); cursor: pointer; }
.docket-rows a.docket-row__link { flex: 1 1 auto; min-width: 0; }
.docket-row__head { padding-left: 60px; }
@media (max-width: 640px) { .docket-toolbar__search, .docket-toolbar__actions { flex: 1 1 100%; } .docket-toolbar__actions .btn { flex: 1 1 auto; } }
.docket-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); overflow: hidden; }
.docket-row__head, .docket-rows a.docket-row__link { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) 104px minmax(0, 1.3fr) minmax(0, 2.1fr); gap: 4px 16px; align-items: center; padding: 0 16px; }
.docket-row__head { min-height: 40px; border-bottom: 1px solid var(--hairline); color: var(--text-muted); }
.docket-row { border-top: 1px solid var(--grey-60); }
.docket-rows a.docket-row__link { min-height: 48px; padding-top: 6px; padding-bottom: 6px; color: var(--ink); text-decoration: none; font-size: 14.5px; }
.docket-rows a.docket-row__link:hover, .docket-rows a.docket-row__link:focus-visible { background: var(--grey-20); }
.docket-row__detail { display: contents; }
.docket-row__file { grid-column: 1; grid-row: 1; }
.docket-row__supplier { grid-column: 2; grid-row: 1; }
.docket-row__date { grid-column: 3; grid-row: 1; }
.docket-row__status { grid-column: 4; grid-row: 1; }
.docket-row__missing { grid-column: 5; grid-row: 1; }
.docket-row__file, .docket-row__supplier, .docket-row__head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docket-row__file { font-weight: 600; color: var(--blue); }
.docket-row__date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.docket-row__missing { min-width: 0; color: var(--text-muted); white-space: normal; overflow-wrap: anywhere; }
.docket-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.docket-pager p { margin: 0 auto 0 0; }
@media (max-width: 640px) {
  .docket-row__head { display: none; }
  .docket-rows a.docket-row__link { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 8px 12px; }
  .docket-row__supplier { grid-column: 1; grid-row: 1; }
  .docket-row__date { grid-column: 1; grid-row: 2; font-size: 13px; }
  .docket-row__status { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
  .docket-row__detail { display: block; grid-column: 1 / -1; grid-row: 3; min-width: 0; font-size: 13px; }
  .docket-row__supplier, .docket-row__detail .docket-row__file { white-space: normal; overflow-wrap: anywhere; }
  .docket-row__detail .docket-row__file, .docket-row__detail .docket-row__missing { display: block; }
}

/* ---------- What is missing: one list per group, not one card per gap ---------- */
.missing-list { margin: 0 0 8px; padding-left: 22px; }
.missing-list li { margin: 4px 0; }
.missing-rule { border: 0; border-top: 1px solid var(--grey-60); margin: 16px 0; }

.wr-prep-forms,form[hidden]{display:none}
/* ---------- Your Jobs is the front door: Job groups in the rail, greeting, Job cards, agent tiles, Needs you page ---------- */
.rail__job { margin-top: 6px; }
.rail__job > summary { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 44px; padding: 6px 34px 6px 12px; border-radius: 8px; cursor: pointer; list-style: none; font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: .06em; color: var(--white); }
.rail__job > summary::-webkit-details-marker { display: none; }
.rail__job > summary::after { content: "+"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 18px; font-weight: 500; }
.rail__job[open] > summary::after { content: "\2212"; }
.rail__job > summary:hover { background: rgba(255, 255, 255, .06); }
.rail__jobname { overflow-wrap: anywhere; }
.rail__here { font-family: var(--font-body); font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--teal-60); }
.rail__job > a, .rail__job > .nav__disabled { margin-left: 10px; }
.home-hello { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 16px; margin: 0 0 8px; }
.home-hello p { line-height: 1.35; }
.home-hello__who { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--blue); }
.home-hello p + p { margin: 0; color: var(--text-muted); }
.home-hello .home-needs a { font-weight: 600; }
.job-rows { background: none; box-shadow: none; margin-bottom: 24px; }
.job-rows__list { display: grid; gap: 0; }
.job-row, .job-row:first-child { background: none; border: 0; border-top: 1px solid var(--hairline); border-radius: 0; box-shadow: none; padding: 16px 0; }
.agent-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 0; margin-top: 16px; }
.agent-tiles .status-line { border: 0; border-radius: 0; background: none; }
.agent-tiles .status-line + .status-line { border-left: 1px solid var(--hairline); }
.agent-tiles .status-line .status-line__link { grid-template-columns: auto minmax(0, 1fr); align-items: start; align-content: start; min-height: 72px; padding: 8px 16px; }
.agent-tiles .status-line:first-child .status-line__link { padding-left: 0; }
.agent-tiles .status-line__agent { font-family: inherit; font-size: 14.5px; font-weight: 540; color: var(--ink-strong); }
.agent-tiles .status-line__text, .agent-tiles .status-line__meta { grid-column: 2; text-align: left; font-size: 13px; color: var(--text-muted); }
.agent-tiles .status-line__meta--echo { display: none; }
.agent-tiles .status-line--missing .status-line__text { font-weight: 400; color: var(--text-muted); }
.agent-tiles a.status-line__link:hover { background: none; }
.agent-tiles a.status-line__link:hover .status-line__agent { text-decoration: underline; }
.agent-tiles a.status-line__link:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 6px; }
@media (max-width: 700px) {
  .agent-tiles { grid-template-columns: 1fr; }
  .agent-tiles .status-line + .status-line { border-left: 0; border-top: 1px solid var(--hairline); }
  .agent-tiles .status-line .status-line__link, .agent-tiles .status-line:first-child .status-line__link { padding: 12px 0; min-height: 44px; }
}
.needs-you h2 { margin: 0; padding: 16px 0 0; }
.needs-you h3 { margin: 16px 0 8px; color: var(--ink-strong); }
.needs-you__all { margin: 0; padding: 12px 0; border-top: 1px solid var(--hairline); }
.needs-you__count { margin: 6px 0 16px; }

/* ---------- Shared building blocks: one list row, one button scale, one pill (polish pass) ---------- */
.btn--l { min-height: 48px; padding: 0 var(--sp-24); font-size: var(--fs-18); }
@media (hover: hover) and (pointer: fine) {
  a.btn, button.btn { min-height: 40px !important; min-width: 0 !important; }
  a.btn.btn--s, button.btn.btn--s { min-height: 40px !important; }
  a.btn.btn--l, button.btn.btn--l { min-height: 48px !important; }
}
:root :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.flag { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 540; line-height: 1.3; white-space: nowrap; }
.flag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.flag--green { color: var(--blue); background: var(--teal-20); }
.flag--green::before { background: var(--teal); }
.flag--amber { color: var(--sig-amber); background: color-mix(in srgb, var(--sig-amber) 14%, white); }
.flag--lred { color: var(--sig-red); background: var(--white); box-shadow: inset 0 0 0 1px var(--sig-red); }
.flag--bred { color: var(--sig-red-bright); background: color-mix(in srgb, var(--sig-red-bright) 11%, white); }
.flag--grey { color: var(--text-muted); background: var(--grey); }
.flag--grey::before { background: transparent; border: 1.5px solid currentColor; box-sizing: border-box; }
.flag--done { color: var(--white); background: var(--blue); }
.chip--source { border-radius: 999px; font-size: 12px; font-weight: 540; }
.t td, .t th, .lrow, .money, .jobband__meta, .nav .count { font-variant-numeric: tabular-nums; }
.money { white-space: nowrap; }
.page-head > div:first-child { min-width: 0; }
.page-sub { margin: var(--sp-8) 0 0; font-size: var(--fs-16); color: var(--text-muted); max-width: 70ch; }
[id], h1, h2, h3 { scroll-margin-top: 80px; }
.drawer__body h3, .conf, .risk .meta div span { color: var(--teal-ink); }
.lrows { display: grid; }
.lrow { display: grid; grid-template-columns: 180px minmax(0, 1fr) 200px 180px; gap: var(--sp-16); align-items: center; padding: 13px 6px; border-top: 1px solid var(--hairline); transition: background-color var(--t-fast); }
.lrow:first-child { border-top: 0; }
.lrow:hover { background: var(--grey-20); }
.lrows--grouped .lrow { grid-template-columns: minmax(0, 1fr) 200px 180px; }
.lrows--grouped .lrow__context { display: none; }
.lrow > * { min-width: 0; }
.lrow__context { font-weight: 600; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.lrow__item .name, .lrow__item .sub { display: block; }
.lrow__due { white-space: nowrap; }
.lrow__due .flag { display: flex; width: fit-content; margin: 0 0 var(--sp-8); }
.lrow__action { display: flex; justify-content: flex-end; }
.lrow__action .btn { width: auto; }
@media (max-width: 767px) {
  .lrow, .lrows--grouped .lrow { grid-template-columns: minmax(0, 1fr); gap: var(--sp-8); }
  .lrow__context:empty, .lrow__due:empty { display: none; }
  .lrow__due { white-space: normal; }
  .lrow .lrow__action .btn { width: 100%; }
}

/* ---------- Meetings home: one row per meeting, the whole row is the link ---------- */
.mrows { border-top: 1px solid var(--hairline); }
.mrow__head, .mrow { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.8fr) minmax(0, 1.1fr) 140px; gap: 4px 18px; align-items: center; padding: 13px 6px; }
.mrow__head { padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--hairline); color: var(--text-muted); font-family: var(--font-label); font-size: 10.5px; font-weight: 560; letter-spacing: .07em; text-transform: uppercase; }
.mrow { border-top: 1px solid var(--hairline); color: var(--ink); text-decoration: none; font-size: 14.5px; transition: background-color var(--t-fast); }
.mrow__head + .mrow { border-top: 0; }
a.mrow:hover, a.mrow:focus-visible { background: var(--grey-20); }
.mrow > span { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; overflow-wrap: anywhere; }
.mrow__series { font-weight: 540; color: var(--ink-strong); }
.mrow__date, .mrow .sub { font-size: 11.5px; font-weight: 430; color: var(--text-muted); }
.mrow__due { font-size: 13.5px; font-weight: 510; font-variant-numeric: tabular-nums; }
.mlinks { margin: var(--sp-12) 0 0; padding: 0; list-style: none; font-size: 13px; }
@media (max-width: 767px) {
  .mrow__head { display: none; }
  .mrow { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px 4px; }
  .mrow__owner::before, .mrow__due::before { display: block; font-family: var(--font-label); font-size: 10.5px; font-weight: 560; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); }
  .mrow__owner::before { content: "Owner"; }
  .mrow__due::before { content: "Due"; }
}

/* ---------- Kickers and column headers: the only place Roboto Condensed is used ---------- */
.eyebrow, .rail__product, .rail__group, .lines th, .content > table:not(.t) th, .jump__lbl, .systems-strip__label, .docket-row__head, .disclosure .kv dt {
  font-family: var(--font-label); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}

.t th { font-family: var(--font-label); font-size: 10.5px; font-weight: 560; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); background: none; padding: 10px 6px; border-bottom: 1px solid var(--hairline); }

/* ---------- Guide layer primitives, unboxed the same way ---------- */
.how, .stages { background: none; border: 0; border-top: 1px solid var(--hairline); border-radius: 0; box-shadow: none; }
.how summary { padding: 16px 0; }
.how__body { padding: 0 0 22px; }

/* ---------- Navigation and numbers: tabs, count chips and the figures band ---------- */
.tabs { flex-wrap: wrap; margin-bottom: 16px; background: none; border-top: 0; border-bottom: 1px solid var(--hairline); padding: 0; }
.tabs a { color: var(--text-muted); padding: 10px 14px; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--blue); }
.tabs a[aria-current="page"] { color: var(--blue); border-bottom: 2px solid var(--blue); background: color-mix(in srgb, var(--blue) 10%, white); }
.tabs .count { border-radius: 999px; background: var(--grey-60); color: var(--ink-strong); font-size: 12px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.kpi { background: none; border: 0; border-top: 0; border-left: 1px solid var(--hairline); border-radius: 0; box-shadow: none; padding: 4px 20px; }
.kpi:first-child { border-left: 0; padding-left: 0; }
.kpi .label { font-size: 12.5px; color: var(--text-muted); }
.kpi .value { font-size: 30px; font-weight: 500; color: var(--ink-strong); font-variant-numeric: tabular-nums lining-nums; }
.kpi .sub { font-size: 12px; color: var(--text-muted); }
@media (max-width: 700px) { .grid .kpi, .grid .kpi:first-child { border-left: 0; border-top: 1px solid var(--hairline); padding: 12px 0; } }

/* ---------- Page facts: number over label, hairline between ---------- */
.content > .facts { display: flex; flex-wrap: wrap; margin: 0 0 var(--sp-12); padding: 0; border-top: 0; max-width: none; list-style: none; }
.content > .facts .fact { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0 24px; border-left: 1px solid var(--hairline); }
.content > .facts .fact:first-child { padding-left: 0; border-left: 0; }
.fact__n { font-size: 22px; font-weight: 500; line-height: 1.15; color: var(--ink-strong); font-variant-numeric: tabular-nums lining-nums; }
.fact__l { font-size: 12.5px; line-height: 1.3; color: var(--text-muted); }
.content > p.needs-you__count { margin: 0 0 var(--sp-12); font-size: 13px; color: var(--text-muted); }

/* ---------- Shared components: one button scale, one action column, calm main column, phone stacks ---------- */
.btn--ghost { background: var(--white); color: var(--blue); border: 1px solid var(--hairline); box-shadow: none; }
.btn--ghost:hover { background: var(--grey-20); border-color: var(--blue-40); color: var(--blue); }
.btn--danger { background: var(--white); color: var(--sig-red); border: 1px solid var(--sig-red); box-shadow: none; margin-inline-start: 16px; }
.btn--danger:hover { background: color-mix(in srgb, var(--sig-red-bright) 11%, white); border-color: var(--sig-red); color: var(--sig-red); }
@media (max-width: 600px) {
  a.btn, button.btn, a.btn.btn--s, button.btn.btn--s { min-height: 44px !important; }
  .btn--danger { margin-inline-start: 8px; }
  .t td .btn, .person, .page-head__actions, .welcome__actions, .card__foot, .picker { gap: 8px; }
  .chip--filter { min-height: 44px; }
  .chips--filter { display: flex; flex-wrap: wrap; gap: 8px; }
}
.chips--filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.t .sub a { font-size: 14px; }
.chip--filter { font-size: 14px; padding: 8px 14px; }
.chip--filter { background: var(--white); color: var(--blue); border-color: var(--hairline); font-weight: 540; text-decoration: none; }
.chip--filter:hover { background: var(--grey-20); }
.chip--filter[aria-current="true"] { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* One fixed-width action column, flush to the right edge of every row table. */
table.t td:last-child:has(.btn) { width: 168px; text-align: right; white-space: nowrap; }
table.t td:last-child:has(.btn) form { display: inline; }
.section-title { display: flex; align-items: center; gap: 12px; }
.section-title .right { margin-left: auto; }

/* Main column: no boxes, hairline separators; notes are the calm gap note. */
.card__foot { background: none; border-top: 1px solid var(--hairline); border-radius: 0; padding: 14px 0; }
.choice, .choice.is-on { border: 0; border-top: 1px solid var(--hairline); border-radius: 0; background: none; padding: 14px 0; }
.chip--off { background: none; border: 0; padding-left: 0; padding-right: 0; }
.commentary, .sec-status, .wr-prep__head { background: none; border: 0; border-radius: 0; padding-left: 0; padding-right: 0; }
.notice, .notice--info, .notice--warn, .notice--ok { background: color-mix(in srgb, var(--blue) 8%, white); border: 0; border-radius: 10px; color: var(--ink); }

/* The stat facts row also stands inside a card or beside a heading, not only as a direct child of .content. */
.facts { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 var(--sp-12); padding: 0; }
.facts .fact { display: flex; flex-direction: column; padding: 0 24px; border-left: 1px solid var(--hairline); }
.facts .fact:first-child { padding-left: 0; border-left: 0; }

.status-line__go { color: var(--blue-40); display: inline-flex; align-self: center; grid-column: -2; }
.status-line__text .flag { vertical-align: middle; }

/* Shared status pill: 999px, 12px/540, 6px dot, same face as .flag. */
.pill { font-family: var(--font-body); font-size: 12px; font-weight: 540; letter-spacing: 0; padding: 3px 10px; }
.pill::before { background: var(--teal); border: 0; }

/* Phone stack: identity full width on top, values left-aligned under their label, action a full-width unlabelled row. */
@media (max-width: 640px) {
  table.t[data-stack] td[data-label] { display: block; text-align: left; }
  table.t[data-stack] td[data-label]::before { display: block; margin-bottom: 2px; }
  table.t[data-stack] td:first-child { display: block; width: 100%; text-align: left; font-weight: 600; }
  table.t[data-stack] td:first-child::before { display: none; }
  table.t[data-stack] td:last-child:has(.btn) { display: block; width: 100%; }
  table.t[data-stack] td:last-child:has(.btn)::before { display: none; }
  table.t[data-stack] td:last-child:has(.btn) .btn, table.t[data-stack] td:last-child:has(.btn) form { display: flex; width: 100%; justify-content: center; margin-inline-start: 0; }
}

/* ---------- Workflow responsibilities: one table, fixed columns for every agent ---------- */
.resp-table { table-layout: fixed; width: 100%; }
.resp-table col:nth-child(1) { width: 30%; }
.resp-table col:nth-child(2) { width: 24%; }
.resp-table col:nth-child(3) { width: 14%; }
.resp-table col:nth-child(4) { width: 32%; }
.resp-table th[scope="colgroup"] { padding: 22px 6px 8px; text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-size: inherit; }
.resp-group__head { display: flex; align-items: center; gap: var(--sp-12); }
.resp-group__head > div { flex: 1; min-width: 0; }
.resp-group__head h2 { margin: 0; }
.resp-pills { text-align: right; }
@media (min-width: 1100px) { .resp-pills { white-space: nowrap; } }
.resp-pills > * + * { margin-left: 6px; }
.resp-group__head .agent__icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; }

/* Connected systems: each row's action sits in a right-aligned last column; the
   SharePoint links are one aligned table inside one form. */
.t .row-action { text-align: right; white-space: nowrap; width: 1%; }
.row-action .disclosure { border-top: 0; margin: 0; padding: 0; display: inline-block; text-align: left; white-space: normal; }
.row-action .disclosure summary { justify-content: flex-end; }
.row-action .disclosure[open] { min-width: 260px; }
@media (max-width: 640px) {
  .t .row-action { width: auto; }
  .row-action .disclosure[open] { min-width: 0; width: 100%; }
}
.row-action--stack .disclosure { display: block; }
.row-action--stack .disclosure summary { white-space: nowrap; }
.row-action--stack .disclosure + .disclosure { border-top: 1px solid var(--hairline); }
.row-action .picker { display: grid; gap: 8px; }
.cells-table td { vertical-align: top; }
.cells-table td:last-child { width: 38%; }
.cells-table .input { width: 100%; }
form[data-pending] > .btn { margin-top: 14px; }
.grid > .field { align-content: start; }
.content > .btn { margin: 0 0 14px; max-width: 100%; height: auto; white-space: normal; }

/* ---------- Header budget: everything above the working surface stays within 20% of the viewport ---------- */
.content { padding-top: 8px; }
.jobband__in { padding: 4px 40px; }
.jobband__name { font-size: 22px; }
.jobband .chip--state { padding: 5px 10px; }
.page-head { margin-bottom: 4px; }
.page-head h1 { font-size: clamp(26px, 2.4vw, 32px); }
.tabs { margin-bottom: 8px; }
.tabs a { padding: 8px 14px; }
@media (max-width: 960px) {
  .content { padding-top: 6px; }
  .rail { padding: 4px 16px; }
  .topbar { min-height: 36px; }
  .jobband__in { display: flex; padding: 6px 16px; flex-wrap: nowrap; gap: 8px; }
  .jobband__in > div:first-child { flex: 1 1 0; flex-wrap: nowrap; min-width: 0; }
  .jobband__state { flex: none; }
  .jobband__name { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .jobband__eyebrow, .jobband .addr, .jobband__checks { display: none; }
  .jobband .chip--state { font-size: 11.5px; padding: 4px 8px; white-space: nowrap; }
  .page-head h1 { font-size: 24px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .tabs a { padding: 8px 10px; font-size: 14.5px; white-space: nowrap; }
}

/* ---------- v3 desktop product refresh (lane A, 3 Dec 2026) ----------
   Desktop only (min-width 961px): grey ground, white hairline surfaces on an 8 px grid,
   one type scale, stat tiles, quiet table headers, a real button hierarchy.
   Phone and tablet rules above are untouched. WCAG 2.2: 1.4.3 contrast, 2.4.7 focus, 2.5.8 target 24 px. */
@media (min-width: 961px) {
  .app { background: linear-gradient(to right, var(--blue) 0 var(--rail-w), var(--ground) var(--rail-w)); }
  .main { background: var(--ground); }
  .content { padding: 24px 40px 80px; }
  body:has(> .app) { font-size: 15px; color: var(--ink-body); }

  /* Rail: refined spacing and active state */
  .rail { padding: 24px 16px 20px; }
  .rail__product { font-size: 11px; color: var(--teal-40); padding: 0 12px 20px; margin-bottom: 8px; }
  .rail__group { font-size: 11px; letter-spacing: .14em; color: var(--rail-ink-dim); padding: 24px 12px 8px; }
  .nav a, .nav__disabled { min-height: 40px; padding: 8px 12px; margin: 2px 0; border-radius: 8px; font-size: 14.5px; font-weight: 500; color: var(--rail-ink); }
  .nav a:hover { background: rgba(255, 255, 255, .07); }
  .nav a[aria-current="page"] { background: rgba(255, 255, 255, .14); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
  .nav a[aria-current="page"]::before { left: -16px; top: 8px; bottom: 8px; width: 3px; }
  .nav__disabled strong { font-size: 14.5px; }
  .rail__foot strong { font-size: 14px; font-weight: 600; }
  .rail-signout { color: var(--rail-ink-dim); }

  /* Top bar and tabs */
  .topbar { min-height: 48px; padding: 0 40px; background: var(--surface); backdrop-filter: none; border-bottom: 1px solid var(--edge); }
  .crumbs { font-size: 14px; }
  .crumb:last-child { font-weight: 600; }
  .tabs { gap: 4px; margin: 0 0 24px; border-bottom: 1px solid var(--edge); }
  .tabs a { min-height: 40px; padding: 8px 14px; margin-bottom: -1px; font-size: 14px; font-weight: 500; border-radius: 6px 6px 0 0; color: var(--muted-ink); }
  .tabs a:hover { color: var(--blue); background: rgba(29, 53, 94, .04); }
  .tabs a[aria-current="page"] { color: var(--blue); font-weight: 600; background: color-mix(in srgb, var(--blue) 10%, white); border-bottom: 2px solid var(--blue); }
  .tabs .count { background: var(--grey-60); color: var(--ink-strong); font-size: 12px; font-weight: 600; padding: 1px 7px; }

  /* Page head and type scale */
  .page-head { margin: 0 0 24px; align-items: flex-end; }
  .page-head h1, h1 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; color: var(--ink-head); }
  .page-head p { font-size: 15px; color: var(--muted-ink); margin-top: 4px; }
  :where(body:has(> .app)) h2, :where(body:has(> .app)) .section-title h2, :where(body:has(> .app)) .card__head h2, :where(body:has(> .app)) .card__head h3, :where(body:has(> .app)) .next h2 { font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--ink-head); }
  :where(body:has(> .app)) h3 { font-size: 15px; font-weight: 600; }
  .section-title { margin: 32px 0 12px; align-items: baseline; }
  .section-title:first-child { margin-top: 0; }
  .muted, .sub, .why { color: var(--muted-ink); }

  /* Job band */
  .jobband__in { padding: 8px 40px; }
  .jobband__name { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
  .jobband .addr { font-size: 14px; }
  .jobband__eyebrow { font-size: 11px; letter-spacing: .08em; }

  /* White surfaces */
  .card { background: var(--surface); border: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--soft-shadow); margin-bottom: 16px; }
  .card--rail, aside .card { box-shadow: var(--soft-shadow); border: 1px solid var(--edge); }
  .card__head { padding: 16px 24px 0; }
  .card__body { padding: 16px 24px 24px; }
  .card--rail .card__head, aside .card .card__head { padding: 16px 24px 0; }
  .card--rail .card__body, aside .card .card__body { padding: 16px 24px 24px; }
  a.card:hover { background: var(--th-ground); border-color: var(--card-hover-line); }
  .lrows, .status-lines, .next-dates, .systems-strip, .needs-you__none, .next, .welcome {
    background: var(--surface); border: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--soft-shadow); overflow: hidden;
  }
  .status-lines, .next-dates { margin-top: 0; border-top: 1px solid var(--edge); }
  .next { padding: 16px 24px; }
  .systems-strip { padding: 16px 24px; margin-top: 0; align-items: center; }
  .systems-strip__label { padding-top: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  .systems-strip__item { background: var(--surface-sunk); border: 1px solid var(--edge); border-radius: 8px; padding: 6px 12px; }
  .needs-you__none { padding: 16px 24px; }
  .content > p + p { margin-top: 8px; }

  /* Stat tiles */
  .facts { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 200px)); gap: 16px; margin: 0 0 24px; padding: 0; }
  .fact { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--soft-shadow); border-left-width: 1px; }
  .fact__n { font-size: 28px; font-weight: 600; line-height: 1.1; color: var(--ink-head); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
  .fact__l { font-size: 13px; font-weight: 500; color: var(--muted-ink); }
  .kpi { background: var(--surface); border: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--soft-shadow); padding: 16px 20px; }
  .kpi .label { font-size: 13px; color: var(--muted-ink); }
  .kpi .value { font-size: 28px; font-weight: 600; color: var(--ink-head); font-variant-numeric: tabular-nums; }

  /* Rows: one height, aligned columns */
  .lrow { min-height: 64px; padding: 12px 24px; gap: 24px; border-top: 1px solid var(--edge-soft); }
  .lrow:first-child { border-top: 0; }
  .lrow:hover { background: var(--row-hover); }
  .lrow__context { font-size: 14px; font-weight: 600; color: var(--ink-head); }
  .lrow__item, .t .rowlink { font-size: 14.5px; font-weight: 600; color: var(--ink-head); }
  .lrow .sub { font-size: 13px; font-weight: 400; color: var(--muted-ink); }
  .lrow__due { font-size: 14px; color: var(--ink-body); }
  .lrow__due .flag { margin-bottom: 4px; }
  .lrows--grouped { margin-bottom: 8px; }
  .status-line .status-line__link { padding: 12px 24px; min-height: 52px; font-size: 14.5px; gap: 16px; }
  .status-line { border-bottom: 1px solid var(--edge-soft); }
  .status-line:last-child { border-bottom: 0; }
  a.status-line__link:hover { background: var(--row-hover); }
  .status-line__agent { font-weight: 600; color: var(--ink-head); }
  .status-line__meta { font-size: 13px; color: var(--muted-ink); }
  .next-dates__item { border-bottom: 1px solid var(--edge-soft); }
  .next-dates__item:last-child { border-bottom: 0; }
  .next-dates__item a { padding: 12px 24px; }
  .next-dates__item a:hover { background: var(--row-hover); }
  .next-dates__none { margin: 0; padding: 12px 24px; border-top: 1px solid var(--edge-soft); }
  .next-dates__none:first-child { border-top: 0; }
  .next-dates__item strong { font-weight: 600; color: var(--ink-head); }

  /* Buttons: solid primary, quiet secondary */
  :where(body:has(> .app)) .btn { min-height: 40px; padding: 0 16px; border-radius: 8px; font-size: 14px; font-weight: 600; letter-spacing: 0; box-shadow: 0 1px 2px rgba(29, 53, 94, .12); }
  :where(body:has(> .app)) .btn:hover { box-shadow: 0 2px 6px -1px rgba(29, 53, 94, .22); }
  .btn--secondary { background: var(--white); color: var(--ink-head); border: 1px solid var(--hairline); box-shadow: none; font-weight: 500; }
  .btn--secondary:hover { background: var(--ground); border-color: var(--btn-line-hover); box-shadow: none; }
  .lrow__action .btn, .t td .btn { min-height: 36px; }
  .lrow__action .btn:not(.btn--secondary):not(.btn--ghost) { }

  /* Pills and badges */
  .chip, .flag { font-size: 12px; letter-spacing: 0; line-height: 1; border-radius: 999px; padding: 5px 10px; }
  .flag { gap: 6px; padding: 5px 10px 5px 8px; }
  .chip--source { background: var(--chip-ground); color: var(--blue); }

  /* Tables: quiet header, right-aligned money, hover */
  table.t, .dash__t { font-size: 14px; }
  .t th { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted-ink); background: var(--th-ground); padding: 10px 16px; border-bottom: 1px solid var(--edge); }
  .t td { padding: 12px 16px; border-bottom: 1px solid var(--edge-soft); }
  .t tbody tr:last-child td { border-bottom: 0; }
  .t tbody tr:hover { background: var(--row-hover); }
  .t td.num, .t td.money, .t th.num, .t th.money { text-align: right; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums lining-nums; }
  .t .sub, .t small { font-size: 12.5px; color: var(--muted-ink); }
  .table-wrap { background: var(--surface); border: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--soft-shadow); overflow: hidden; }
  .card .table-wrap { border: 0; box-shadow: none; border-radius: 0; }
  .dash__t th { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted-ink); }
  .dash__t td { padding: 8px 0 8px 12px; border-top: 1px solid var(--edge-soft); }

  /* Weekly report preparation */
  .wr-prep__head { padding: 20px 24px; background: var(--surface); border: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--soft-shadow); margin-bottom: 16px; }
  .wr-prep__head h2 { font-size: 18px; font-weight: 600; }
  .wr-stages li { font-size: 13px; font-weight: 500; border-radius: 999px; padding: 6px 14px; }
  .wr-stages li.wr-stage--now { background: var(--blue); color: var(--white); }
  .wr-gapnote { background: var(--surface); border: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--soft-shadow); margin-bottom: 8px; }
  .dash__sec { background: var(--surface); border: 1px solid var(--edge); border-top: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--soft-shadow); padding: 16px 20px 20px; }
  .dash__head { border-bottom: 1px solid var(--edge-soft); padding-bottom: 10px; }
  .wr-sheet.wr-prep .dash__sec { margin-bottom: 16px; }
  .dash__c { font-size: 14px; }
  .wr-foot > *, .wr-risks > * { }
  .risk, .riskrow { border-radius: 8px; }

  /* Forms */
  :where(body:has(> .app)) input, :where(body:has(> .app)) select, :where(body:has(> .app)) textarea { border: 1px solid var(--btn-line); border-radius: 8px; font-size: 14px; min-height: 40px; background: var(--surface); }
  textarea { min-height: 88px; }
  label { font-size: 14px; font-weight: 500; }
  .field label, .field .label { font-size: 13px; font-weight: 600; color: var(--ink-head); }
  :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 4px var(--blue-20); }
  .disclosure { border-top: 1px solid var(--edge-soft); }
  .disclosure summary { font-weight: 600; color: var(--ink-head); }
  .typerow { border-bottom: 1px solid var(--edge-soft); }
}
@media (min-width: 961px) {
  /* later, higher-specificity fixes (a1 review) */
  .content > .facts, .facts { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 16px; padding: 0; }
  .content > .facts .fact, .facts .fact, .facts .fact:first-child { min-width: 160px; padding: 16px 24px; border: 1px solid var(--edge); border-radius: 12px; background: var(--surface); box-shadow: var(--soft-shadow); gap: 4px; }
  .facts .fact__n { font-size: 28px; font-weight: 600; letter-spacing: -.02em; color: var(--ink-head); }
  .facts .fact__l { font-size: 13px; font-weight: 500; color: var(--muted-ink); }
  .needs-you__count { margin: 0 0 16px; font-size: 13px; }
  .card.needs-you { padding: 20px 24px 12px; }
  .card.needs-you h2 { margin: 0 0 4px; }
  .card.needs-you h3 { margin: 16px 0 4px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-ink); }
  .card .lrows, .card .status-lines, .card .next-dates, .card .systems-strip, .card .table-wrap {
    background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .card .lrow { padding-left: 0; padding-right: 0; }
  .card .status-line .status-line__link, .card .next-dates__item a, .card .next-dates__none { padding-left: 0; padding-right: 0; }
  .card .status-lines { border-top: 0; margin-top: 0; }
  .card .next-dates { border-top: 0; }
  .card .systems-strip { padding: 0; margin: 0; }
  .card .card__body > p + .btn, .card .card__body > .btn, .card .card__body > .action { margin-top: 12px; }
  .card .card__body > p { line-height: 1.5; }
  .card .t th:first-child, .card .t td:first-child { padding-left: 0; }
  .card .t th:last-child, .card .t td:last-child { padding-right: 0; }
}
@media (min-width: 961px) {
  /* a2 review fixes */
  .content > .facts .fact:first-child, .content > .facts .fact { padding: 16px 24px; border: 1px solid var(--edge); }
  table.t th:first-child, table.t td:first-child { padding-left: 16px; }
  table.t th:last-child, table.t td:last-child { padding-right: 16px; }
  .card table.t th:first-child, .card table.t td:first-child { padding-left: 0; }
  .card table.t th:last-child, .card table.t td:last-child { padding-right: 0; }
  .t:has(td.money:last-child) th:last-child, .t:has(td.num:last-child) th:last-child { text-align: right; }
  :where(body:has(> .app)) .btn + p, :where(body:has(> .app)) .action + p, :where(body:has(> .app)) .btn + .why { margin-top: 12px; }
  .wr-sheet, .wr-sheet.wr-prep { background: transparent; box-shadow: none; }
  .wr-fit { overflow: visible; }
  .wr-sheet > :not(.wr-head) { margin-left: 0; margin-right: 0; }
}

@media (min-width: 961px) {
  /* round 2: one section pattern (title outside, white surface below) */
  .content .card:has(> .card__head):not(.card--rail):not(aside *) { background: none; border: 0; box-shadow: none; border-radius: 0; margin-bottom: 0; }
  .content .card:has(> .card__head):not(.card--rail):not(aside *) > .card__head { margin: 32px 0 12px; padding: 0; }
  .content .card:has(> .card__head):not(.card--rail):not(aside *):first-child > .card__head { margin-top: 0; }
  .content .card:has(> .card__head):not(.card--rail):not(aside *) > :not(.card__head) { background: var(--surface); border: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--soft-shadow); margin-bottom: 16px; }
  .content .card:has(> .card__head):not(.card--rail):not(aside *) > :not(.card__head):not(.card__body) { padding: 16px 24px; }
  .content .card:has(> .card__head):not(.card--rail):not(aside *) > .card__body { padding: 24px; }
  .section-title { margin: 32px 0 12px; }
  .section-title + p.muted { margin: -4px 0 12px; }
  /* tables: card-edge padding, one row height, headers align with columns */
  .card > .table-wrap table.t, .card > table.t, .card__body > .table-wrap table.t, .card__body > table.t { width: 100%; }
  .card__body > .table-wrap, .card__body > table.t { margin-left: -24px; margin-right: -24px; width: calc(100% + 48px); }
  .card > .table-wrap table.t th:first-child, .card > .table-wrap table.t td:first-child, .card > table.t th:first-child, .card > table.t td:first-child,
  .card__body > .table-wrap table.t th:first-child, .card__body > .table-wrap table.t td:first-child, .card__body > table.t th:first-child, .card__body > table.t td:first-child,
  .card .table-wrap table.t th:first-child, .card .table-wrap table.t td:first-child { padding-left: 24px; }
  .card > .table-wrap table.t th:last-child, .card > .table-wrap table.t td:last-child, .card > table.t th:last-child, .card > table.t td:last-child,
  .card__body > .table-wrap table.t th:last-child, .card__body > .table-wrap table.t td:last-child, .card__body > table.t th:last-child, .card__body > table.t td:last-child,
  .card .table-wrap table.t th:last-child, .card .table-wrap table.t td:last-child { padding-right: 24px; }
  table.t td { height: 52px; vertical-align: middle; }
  table.t th { height: 40px; vertical-align: middle; }
  .t:has(tbody tr:first-child td.money:nth-child(2)) th:nth-child(2), .t:has(tbody tr:first-child td.num:nth-child(2)) th:nth-child(2) { text-align: right; }
  .t:has(tbody tr:first-child td.money:nth-child(3)) th:nth-child(3), .t:has(tbody tr:first-child td.num:nth-child(3)) th:nth-child(3) { text-align: right; }
  .t:has(tbody tr:first-child td.money:nth-child(4)) th:nth-child(4), .t:has(tbody tr:first-child td.num:nth-child(4)) th:nth-child(4) { text-align: right; }
  .t:has(tbody tr:first-child td.money:nth-child(5)) th:nth-child(5), .t:has(tbody tr:first-child td.num:nth-child(5)) th:nth-child(5) { text-align: right; }
  .t:has(tbody tr:first-child td.money:nth-child(6)) th:nth-child(6), .t:has(tbody tr:first-child td.num:nth-child(6)) th:nth-child(6) { text-align: right; }
  .t:has(tbody tr:first-child td.money:nth-child(7)) th:nth-child(7), .t:has(tbody tr:first-child td.num:nth-child(7)) th:nth-child(7) { text-align: right; }
  /* buttons inside text blocks: 12 px above and below, 8 px between neighbours */
  .card__body > :is(.btn, .action, form):not(:first-child) { margin-top: 12px; }
  .card__body > :is(.btn, .action, form) + * { margin-top: 12px; }
  .card__body > :is(.btn, .action, form) + :is(.btn, .action, form) { margin-top: 8px; }
  .card__body > :is(.btn, .action) { display: inline-flex; }
  .page-head__actions, .card__foot, .welcome__actions { gap: 8px; }
  /* Needs you card */
  .content .card.needs-you { padding: 24px; }
  .content .card.needs-you > h2 { margin: 0 0 8px; padding: 0; }
  .content .card.needs-you > h3:first-of-type { margin-top: 16px; }
  .lrow__due { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; white-space: nowrap; }
  .lrow__due .flag { margin: 0; }
  .lrow__action { justify-content: flex-end; }
  .lrow, .lrows--grouped .lrow { grid-template-columns: 180px minmax(0, 1fr) 300px 180px; }
  .lrows--grouped .lrow { grid-template-columns: minmax(0, 1fr) 300px 180px; }
  /* stat tiles: compact */
  .content > .facts, .facts { gap: 16px; margin-bottom: 8px; }
  .content > .facts .fact, .facts .fact, .content > .facts .fact:first-child { min-width: 150px; min-height: 76px; padding: 12px 20px; gap: 2px; justify-content: center; }
  .facts .fact__n { font-size: 26px; line-height: 1.1; }
  .facts .fact__l { font-size: 12.5px; line-height: 1.3; }
}

@media (min-width: 961px) {
  /* round 2b: stacked content inside one card (claim page) and needs-you bottom */
  .card__body > :is(p, .flagrow, .notice) + :is(.table-wrap, table.t) { margin-top: 16px; }
  .card__body > :is(.table-wrap, table.t) + :is(.table-wrap, table.t) { margin-top: 24px; }
  .card__body > :is(.table-wrap, table.t) + :is(p, .flagrow, .notice, .btn, .action, form) { margin-top: 16px; }
  .card__body > :is(p, .flagrow) + :is(p, .flagrow) { margin-top: 12px; }
  .card.needs-you .lrows { margin-bottom: 0; }
  .card.needs-you { padding-bottom: 16px; }
}

@media (min-width: 961px) {
  /* round 3: the claim page's two figure tables share one column grid */
  table.t.claim-figures { table-layout: fixed; width: 100%; }
  .claim-figures th:nth-child(1) { width: 34%; }
  .claim-figures th:nth-child(2) { width: 14%; }
  .claim-figures th:nth-child(3) { width: 16%; }
  .claim-figures th:nth-child(3):last-child { width: auto; }
  .claim-figures th:nth-child(4) { width: auto; }
  .claim-figures th:nth-child(2), .claim-figures td:nth-child(2) { text-align: right; padding-right: 24px; }
  .claim-figures td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
  /* weekly report: the risks label stays on one line */
  .wr-risks .dash__head h3 { white-space: nowrap; flex: none; }
}

/* ui7b: sign-in and how-it-works (3 Dec) -- how-it-works only; sign-in left untouched by owner ruling */

/* ===== How UltrAI works ===== */
body:has(.card.hiw) { background: var(--ui7b-ground); }
body:has(.card.hiw) .main, body:has(.card.hiw) .content { background: var(--ui7b-ground); }
body:has(.card.hiw) .topbar { background: var(--white); }
.content:has(> .card.hiw) { padding-top: 24px; }
.content:has(> .card.hiw) .page-head { margin-bottom: 24px; }
.content:has(> .card.hiw) .page-head h1 { font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; color: var(--blue); }

.card.hiw { background: var(--white); border: 1px solid var(--ui7b-line); border-radius: 12px; box-shadow: 0 1px 2px rgba(29, 53, 94, .05), 0 8px 24px -12px rgba(29, 53, 94, .12); }
.card.hiw > .card__body { padding: 32px 40px 40px; }
.card.hiw .card__body > h2 { margin: 40px 0 12px; font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--blue); }
.card.hiw .card__body > h2:first-child, .card.hiw .hiw-video + h2 { margin-top: 32px; }
.card.hiw .card__body > h3 { margin: 32px 0 12px; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.card.hiw .card__body > p { max-width: 70ch; font-size: 16px; line-height: 1.6; color: var(--ink); }
.card.hiw .card__body > p + p { margin-top: 12px; }
.card.hiw .card__body > .hiw__summary { max-width: 70ch; margin: 0; font-size: 18px; line-height: 1.55; }
.card.hiw .hiw-video { width: 100%; max-width: 100%; height: auto; margin: 0 0 8px; border-radius: 12px; box-shadow: 0 1px 2px rgba(29, 53, 94, .1); }
.card.hiw .hiw-svg--wide { margin: 16px 0 0; padding: 16px; box-sizing: border-box; background: var(--white); border: 1px solid var(--ui7b-line); border-radius: 10px; }
.card.hiw .hiw-never, .card.hiw .hiw-changes, .card.hiw .hiw-outputs, .card.hiw .hiw-planned { max-width: 70ch; margin: 12px 0 0; padding-left: 22px; line-height: 1.6; }
.card.hiw .technical-details { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--ui7b-line); }

/* The index of agent guides: one rounded group of aligned rows. */
.card.hiw .hiw-index { margin: 16px 0 0; border: 1px solid var(--ui7b-line); border-radius: 10px; overflow: hidden; }
.card.hiw .hiw-index li + li { border-top: 1px solid var(--ui7b-line); }
.card.hiw .hiw-index__row { display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-items: center; gap: 16px; min-height: 72px; padding: 16px 24px; border: 0; background: var(--white); transition: background-color .15s; }
.card.hiw .hiw-index__row:hover { background: var(--ui7b-ground); }
.card.hiw .hiw-index__row:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.card.hiw .hiw-index__row strong { font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--blue); }
.card.hiw .hiw-index__summary { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.card.hiw .hiw-index__row .ic { color: var(--blue-80); }
.card.hiw nav + p { margin-top: 24px; }

@media (max-width: 640px) {
  .card.hiw > .card__body { padding: 20px 16px 24px; }
  .content:has(> .card.hiw) .page-head h1 { font-size: 24px; }
  .card.hiw .hiw-index__row { padding: 14px 16px; }
}

