:root {
  /* UX-E completion S1 · the console's one token set (D1 / F4 / F5 / F6; record in
     planning/ux/ux-e-evidence/completion-s1/tokens.md). Every rule below uses these; nothing else is defined. */
  --hm-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
  --hm-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* color */
  --hm-primary: #0a7894;
  --hm-primary-hover: #08637a;
  --hm-link: var(--hm-primary); /* the one link colour (Harvey 10-24) */
  /* the icon scale (Harvey 10-24): drawn on the 24 grid, ONE stroke weight, three sizes — S in a line of text, a button or a chip; M on a row, a menu item or a tile; L on the rail */
  --hm-icon-stroke: 1.75; --hm-icon-s: 16px; --hm-icon-m: 20px; --hm-icon-l: 24px;
  --hm-primary-muted: #5fa6b9;
  --hm-primary-line: #b3d8e2;
  --hm-nav3-dot: #7cc0d2; /* NAV3: the approved mock's workspace-line dot (column 2) */
  --hm-mint: #e4f5f9;
  --hm-pending: #a35a05;
  --hm-pending-muted: #d9a04a;
  --hm-pending-line: #f0d3a4;
  --hm-sand: #fdf3e3;
  --hm-danger: #c9302c;
  --hm-danger-muted: #de7773;
  --hm-danger-line: #f0bdbb;
  --hm-danger-soft: #fcebea;
  --hm-ink: #151d22;
  --hm-muted: #5a6670; /* palette C: 5.2:1 on the primary tint, 5.5:1 on the page */
  --hm-bg: #f6f8f9;
  --hm-surface: #ffffff;
  --hm-neutral: #f1f4f5;
  --hm-line: #e3e8eb;
  --hm-line-strong: #d0d8dd;
  --hm-on-dark: #ffffff;
  --hm-on-dark-muted: rgba(255, 255, 255, 0.72);
  --hm-on-dark-good: #a9f0c0;
  --hm-on-dark-bad: #ffb7ae;
  --hm-on-dark-warn: #f4c98a;
  --hm-overlay: rgba(21, 29, 34, 0.45);
  --hm-surface-glass: rgba(255, 255, 255, 0.92);
  --hm-focus-ring: rgba(10, 120, 148, 0.18);
  --hm-danger-ring: rgba(201, 48, 44, 0.16);
  --hm-pending-ring: rgba(168, 93, 6, 0.16);
  --hm-shadow-color-faint: rgba(21, 29, 34, 0.03);
  --hm-shadow-color: rgba(21, 29, 34, 0.08);
  --hm-shadow-color-strong: rgba(21, 29, 34, 0.16);
  --hm-brand-cyan: #16b8dd;
  --hm-brand-navy: #1e3a8a;
  --hm-brand-mord-on-dark: #e2e8f0;
  --hm-brand-linkedin: #0a66c2;

  /* UI refresh · palette C (Harvey 10-22; planning/ux/ui-refresh-c-plan-2026-10-22.md, tokens-c.css). P0 changes colour values only (cyan = primary, current and link; green = done, live, recommended, passed);
     the plan's type, weight and height tokens arrive with P1 and P2 (the S1 type-step cell pins the names). */
  --hm-faint: #7a858c; /* placeholders and disabled only (3.8:1) */
  --hm-hover: #f1f4f5;
  --hm-hover-strong: #eaf0f3; /* a tab or chip under the pointer */
  --hm-selected: #eaf0f3;
  --hm-primary-tint: #e4f5f9;
  --hm-aeo: #1d5fd6; --hm-aeo-tint: #edf3fe;
  --hm-fc: #b5336f; --hm-fc-tint: #fcedf4;
  --hm-crm: #6d3fd6; --hm-crm-tint: #f2edfd;
  --hm-attention: #a35a05; --hm-attention-tint: #fdf3e3;
  --hm-danger-tint: #fcebea;
  --hm-success: #1f7438; --hm-success-tint: #e8f5ec; --hm-success-line: #b7dcc3; --hm-success-ring: rgba(31, 116, 56, 0.16);
  --hm-eng-chatgpt: #10a37f; --hm-eng-claude: #d97757; --hm-eng-gemini: #4285f4; --hm-eng-perplexity: #6b4fbb; /* was a teal next to ChatGPT's green: the two dots read as one colour */

  /* elevation */
  --hm-shadow-sm: 0 1px 2px var(--hm-shadow-color);
  --hm-shadow-md: 0 4px 12px var(--hm-shadow-color);
  --hm-shadow-lg: 0 18px 48px -8px var(--hm-shadow-color-strong), 0 0 0 1px var(--hm-shadow-color);
  --hm-shadow-focus: 0 0 0 3px var(--hm-focus-ring);

  /* type · six sizes (UI refresh P1b: 12 / 13 / 14 / 15 / 20 / 28 px), weights 400 and 600 only */
  --hm-fs-label: 12px;
  --hm-fs-meta: 13px;
  --hm-fs-body: 14px;
  --hm-fs-section: 15px;
  --hm-fs-title: 20px;
  /* the sign-in page's own scale (Harvey 10-26): a marketing-sized screen, outside the app's six sizes, so the app's scale can never shrink it again — the sizes it had before the refresh */
  --hm-auth-fs-logo: 2.25rem; --hm-auth-fs-hero: 2.25rem; --hm-auth-fs-eyebrow: 1.25rem; --hm-auth-fs-copy: 1rem; --hm-auth-fs-card: 1.25rem; --hm-auth-fs-suffix: 1rem;
  --hm-fs-kpi: 28px;
  --hm-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", sans-serif;
  --hm-lh-tight: 1.25;
  --hm-lh-title: 1.4;
  --hm-lh-body: 1.5;
  --hm-lh-prose: 1.7;
  --hm-ls-caps: 0.13em;
  --hm-ls-h1: -0.8px;
  --hm-ls-h1-sm: -0.7px;
  --hm-ls-h2: -0.35px;
  --hm-ls-num: -1.4px;

  /* space · shape · size */
  --hm-space-1: 4px;
  --hm-space-2: 8px;
  --hm-space-3: 12px;
  --hm-space-4: 16px;
  --hm-space-5: 24px;
  --hm-space-6: 32px;
  --hm-space-7: 48px;
  --hm-info-gap: 4px; /* a label (or title) to its (i): one gap everywhere */
  --hm-radius-control: 8px;
  --hm-radius-card: 18px;
  --hm-radius-pill: 999px;
  /* WS-2: 40px, and 44px on a phone (≤760px wide) — every control reads this one token, so it is sized here, in the
     one :root block: the calc is ≥44px at ≤760px and ≤40px above it, clamped to those two heights. */
  --hm-control-height: clamp(40px, calc(44px + (760px - 100vw) * 100), 44px);
  --hm-input-height: max(42px, var(--hm-control-height)); /* TextInput (components.js): every typed field, and the buttons in its row */
  --hm-touch-target: 44px;
  --hm-announce-h: 0px; /* ux-layout: the announcement bar's height, set by app.js while it shows */
  --hm-drawer-menu-top: 8px; --hm-drawer-menu-left: 16px; /* NAVIM W1-11: where the top line's ☰ is, set by app.js as the drawer opens */
  /* S2c: the top bar's height, measured by the console (it changes with the width); what sits just under it uses it. */
  --hm-topbar-height: 0px;
  --hm-footer-h: 36px; /* measured at boot (installBottomBarSupport): the fixed footer's height */

  color-scheme: light;
  font-family: var(--hm-font);
}

/* Headings / display UI: Inter (matches logo); body stays Noto via :root.
   Weights stay on existing component rules (800/700/etc). */
h1, h2, h3, h4, h5, h6,
.panel-heading h2,
.section-heading h1,
#page-heading,
.tab-copy strong,
.overview-hero-score,
.overview-hero-score strong,
.overview-kpis strong,
.viz-big,
.auth-brand-panel h1,
.auth-card h2,
.help-section-heading h2,
.inline-detail-header h2,
.inline-subsection h3,
.modal header h2,
.share-modal h3,
.api-section h2,
.competitive-card h2,
.changeset-group h3 {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}



* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* UI refresh P1: two weights, 400 and 600. The browser's own bold (700) and `bolder` (900 inside a 600 parent) are not used. */
b, strong, th, dt, legend, h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
}
/* and a heading no rule sizes reads at the scale, not the browser's em (16.38px on an h3 in a 14px parent): h1 title, h2 / h3 section, h4–h6 body */
h1 { font-size: var(--hm-fs-title); }
h2, h3 { font-size: var(--hm-fs-section); }
h4, h5, h6 { font-size: var(--hm-fs-body); }

/* Screen-reader-only: keep accessible labels/buttons visually hidden. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.boot-splash .boot-spinner {
  width: 26px;
  height: 26px;
  border-radius: var(--hm-radius-pill);
  border: 3px solid var(--hm-surface);
  border-top-color: var(--hm-brand-cyan);
  animation: boot-spin 0.7s linear infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .boot-splash .boot-spinner { animation: none; }
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  font-size: var(--hm-fs-body);
  line-height: 1.5;
  background-color: var(--hm-bg);
  background-image: 
    radial-gradient(at 0% 0%, var(--hm-mint) 0px, transparent 55%),
    radial-gradient(at 100% 100%, var(--hm-mint) 0px, transparent 55%);
  background-attachment: fixed;
  color: var(--hm-ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: auto;
}

body.has-app-shell {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.auth-view {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 520px);
  align-items: stretch;
  position: relative;
}

.auth-brand-panel {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(36px, 7vw, 92px);
  background:
    linear-gradient(135deg, var(--hm-ink), var(--hm-ink)),
    linear-gradient(90deg, var(--hm-surface-glass) 1px, transparent 1px),
    linear-gradient(0deg, var(--hm-surface-glass) 1px, transparent 1px);
  background-size: auto, 36px 36px, 36px 36px;
  color: var(--hm-on-dark);
}

/* The sign-in column: the logo row, then the card, in normal flow with a fixed gap. The card centres in the space
   below the logo (auto block margins), so a taller card — an alert, the sent state, Turnstile — pushes down and the
   page scrolls; it never rises over the logo (prod 10-06). */
.auth-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 42px 0 32px;
  min-width: 0;
}

/* Two columns: the dark band is the viewport's height and stays put (its copy centred in the window); only the
   sign-in column grows and scrolls with a taller card (organize2 10-06 on 6ae6e4d4). Stacked mode is unchanged. */
@media (min-width: 1101px) {
  .auth-view {
    align-items: start;
  }

  .auth-brand-panel {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
  }

  .auth-side {
    min-height: 100vh;
    min-height: 100dvh;
  }
}

.auth-logo-corner {
  align-self: flex-end;
  margin-right: 50px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
/* The brand wordmark, copied from the brand document's own implementation
   (logos/Hashmord_marketing_assets.html — "Primary Logo"): "Has" in cyan with the
   flowing underline, "mord" in navy, and on a dark background "mord" becomes #e2e8f0.
   Where the corner logo sits decides the variant: on desktop (two columns) it sits
   over the light sign-in column, so "mord" keeps the navy of the light-background logo;
   at 1100px and below the columns stack and it sits on the dark brand band, so "mord"
   switches to #e2e8f0 (and the "AI" suffix to cyan). Text scales and stays crisp,
   which the 148px PNG did not. */
.hasmord-logo {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-weight: 600;
  letter-spacing: -1px;
  display: inline-flex;
  /* baseline, not center: ".has" carries the underline's padding-bottom, so centring
     the two boxes drops "mord" by half that padding and the two halves of one word
     stop sitting on the same line. */
  align-items: baseline;
  line-height: 1;
}
.hasmord-logo .mord { color: var(--hm-brand-navy); }
/* Desktop: the corner logo sits over the light sign-in column, so it is the light-background
   logo ("mord" navy, from .hasmord-logo .mord above). The dark variant is in the 1100px block. */
.auth-logo-corner .hasmord-logo { font-size: var(--hm-auth-fs-logo); }
.auth-logo-suffix {
  font-weight: 800;
  font-size: var(--hm-auth-fs-suffix);
  letter-spacing: 0.14em;
  color: var(--hm-primary);
}

.auth-brand-panel .eyebrow {
  color: var(--hm-primary);
  font-size: var(--hm-auth-fs-eyebrow);
  letter-spacing: 0.16em;
  line-height: 1.25;
  margin-bottom: 4px;
}

.auth-brand-panel h1 {
  max-width: 680px;
  color: var(--hm-on-dark);
  font-size: var(--hm-auth-fs-hero);
  line-height: 1.02;
}

.auth-copy {
  max-width: 620px;
  margin: 0;
  color: var(--hm-on-dark);
  font-size: var(--hm-auth-fs-copy);
  line-height: 1.65;
}

.auth-card {
  align-self: center;
  justify-self: center;
  margin-block: auto;
  width: min(420px, calc(100% - 48px));
  display: grid;
  gap: 16px;
  padding: 32px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  background: var(--hm-surface);
  box-shadow: 0 24px 80px var(--hm-focus-ring);
}

.auth-card h2 {
  font-size: var(--hm-auth-fs-card);
}

.auth-actions {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

/* Email login E3 (mock v1.3): the work-email block under the provider buttons, its sent state, the link and verify
   pages. Every target is at least 44px tall. */
.email-login { display: grid; gap: 12px; }
/* NAV3 W6a · Settings › Account & session (mock settings(): rows of a title, a sentence and the control): the account
   menu's photo and Log out, moved in. */
.nav3-account-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hm-line); }
.nav3-account-slot { display: grid; justify-items: end; gap: 4px; }
@media (max-width: 760px) {
  .nav3-account-row { grid-template-columns: minmax(0, 1fr); }
  .nav3-account-slot { justify-items: start; }
}

.legal-copy {
  margin: 8px 0 0;
  color: var(--hm-muted);
  font-size: var(--hm-fs-meta);
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit; /* UX-E B2a: textareas used the browser default */
}

button,
a,
input,
select {
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

/* ONE link (Harvey 10-24): a link that is not a button, a menu item or a title is the app link colour — never the browser blue — with no underline until it is hovered or
   focused; visited reads the same. Zero specificity (:where) so every component's own colour still wins; the measure check lists the exceptions by name. */
:where(a), :where(.link) { color: var(--hm-link); text-decoration: none; }
:where(a):is(:hover, :focus-visible), :where(.link):is(:hover, :focus-visible) { text-decoration: underline; text-underline-offset: 2px; }
/* UX-E B2a · the button (§06): 40px, 14/20 600, radius 8, the brand green; no lift, no blue shadow. */
button {
  min-height: var(--hm-control-height);
  border: 1px solid transparent;
  border-radius: var(--hm-radius-control);
  background: var(--hm-primary);
  color: var(--hm-on-dark);
  padding: 0 16px;
  font-size: var(--hm-fs-label);
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap; /* UX-E completion S1 · UX-04: a label never breaks inside its button */
  max-width: 100%;
}

button:hover {
  background: var(--hm-primary-hover);
  box-shadow: none;
}

button:active {
  transform: translateY(1px);
}

button.is-loading {
  gap: 8px;
  cursor: wait;
  transform: none;
}

.button-spinner {
  width: 14px;
  aspect-ratio: 1;
  display: inline-block;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: var(--hm-radius-pill);
  animation: buttonSpin 700ms linear infinite;
}

/* A ring is the keyboard's (components.js sets data-hm-pointer on <html> after a press or a touch and clears it on Tab, an arrow, Enter, Space or Escape): while it is set a control draws none —
   a mouse click leaves focus on the button, and Chrome would draw its ring the moment any key (the screenshot shortcut, a bare Shift) is pressed. Fields keep theirs: typing is the keyboard's. */
html[data-hm-pointer] :focus-visible:not(input, select, textarea, [contenteditable="true"], [contenteditable=""]) { outline: none !important; }
/* A check box, a radio or a button-type input is pressed, not typed into: a mouse press on one keeps no ring either. */
html[data-hm-pointer] input:is([type="checkbox"], [type="radio"], [type="button"], [type="submit"], [type="reset"], [type="image"]):focus-visible { outline: none !important; }
/* UX-E B2a · one focus ring (§06): 3px, the brand green, offset 2 — inputs included. */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible,
pre:focus-visible,
.score-ring:focus-visible,
.radar-card:focus-visible,
.diff-viewer:focus-visible {
  outline: 3px solid var(--hm-primary);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  overflow: hidden;
  position: relative; /* positioning context for #account-panel (app-shell child) */
}

.view {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 32px;
  min-height: 0;
  display: grid;
  gap: 24px;
  align-content: start;
}

.sidebar {
  background: var(--hm-ink);
  border-right: 1px solid var(--hm-primary);
  padding: 16px 16px 32px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  z-index: 100;
}

.brand {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 0 0 24px 4px;
  border-bottom: 1px solid var(--hm-surface);
}

.brand-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

/* Mobile-only account control in the brand row; desktop keeps #account-menu-button in .topbar. */
#account-menu-button-mobile {
  display: none;
}

/* Show the true two-colour logo (cyan Has + navy mord + underline) on a clean
   white chip so it matches the marketing site exactly — no colour-distorting
   invert filter. */
/* Dark-sidebar wordmark (per brand design file: Hashmord_marketing_assets.html
   "Dark Mode Version"): "Has" in cyan with a flowing underline that fades out,
   "mord" in light gray — sits directly on the dark sidebar, no white box. */
.brand-logo {
  display: inline-flex;
  align-items: baseline;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-weight: 600;
  font-size: var(--hm-fs-title);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* Product designation — the app is "Hasmord AI" (Hasmord is the parent brand). */
.brand-suffix {
  align-self: center;
  font-weight: 600;
  font-size: var(--hm-fs-label);
  letter-spacing: 0.14em;
  color: var(--hm-brand-cyan);
}

/* Brand lockup is a link to the marketing site (opens in a new tab). Override
   the generic .sidebar a nav styling and give it its own click affordance. */
.sidebar .brand-link {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 3px 5px;
  margin: -3px -5px;
  border-radius: var(--hm-radius-control);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 140ms ease, transform 90ms ease;
}
.sidebar .brand-link:hover { background: transparent; opacity: 0.82; }
.sidebar .brand-link:active { transform: translateY(1px); }
.sidebar .brand-link:focus-visible { outline: 2px solid var(--hm-primary); outline-offset: 2px; }

.sidebar nav {
  display: grid;
  gap: 4px;
  margin-top: 24px;
}

.sidebar a {
  color: var(--hm-muted) !important;
  text-decoration: none;
  padding: 9px 12px;
  border-radius: var(--hm-radius-control);
  font-weight: 400;
  font-size: var(--hm-fs-meta);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar a:hover {
  background: var(--hm-surface-glass);
  color: var(--hm-on-dark) !important;
}

.sidebar a.active {
  background: linear-gradient(135deg, var(--hm-primary), var(--hm-primary)) !important;
  color: var(--hm-on-dark) !important;
  font-weight: 600;
  box-shadow: 0 4px 12px var(--hm-focus-ring), inset 0 1px 0 var(--hm-surface-glass);
}

.sidebar a svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: inherit;
  stroke: currentColor;
  opacity: 0.92;
}

.sidebar a span {
  min-width: 0;
}

.sidebar a:hover svg,
.sidebar a.active svg {
  opacity: 1;
}

/* Mobile nav toggle + drawer backdrop — hidden on desktop; shown via CSS alone ≤920px. */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hm-surface);
  border-radius: var(--hm-radius-control);
  background: var(--hm-surface-glass);
  color: var(--hm-on-dark);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.mobile-menu-toggle:hover {
  background: var(--hm-surface-glass);
  border-color: var(--hm-surface);
  color: var(--hm-on-dark);
}
.mobile-menu-toggle:focus-visible {
  outline: 2px solid var(--hm-primary);
  outline-offset: 2px;
}
.nav-drawer-backdrop {
  display: none;
}

main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  min-width: 0;
}

main > * {
  min-width: 0;
  max-width: 100%;
}

.topbar {
  width: 100%;
  min-height: 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--hm-ink);
  border-bottom: 1px solid var(--hm-surface);
  padding: 0 20px;
  box-shadow: 0 1px 2px var(--hm-shadow-color);
  min-width: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 20;
}

.topbar > * {
  min-width: 0;
}

.primary-link {
  min-height: var(--hm-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hm-surface);
  border-radius: var(--hm-radius-control);
  background: var(--hm-primary); /* UX-E B2a · was a navy gradient */
  color: var(--hm-on-dark);
  padding: 0 16px;
  text-decoration: none;
  font-size: var(--hm-fs-meta);
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px var(--hm-focus-ring), inset 0 1px 0 var(--hm-surface-glass);
  transition: all 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.primary-link:hover {
  background: var(--hm-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--hm-focus-ring), inset 0 1px 0 var(--hm-surface-glass);
}

.workspace-tab {
  align-self: end;
  min-height: 46px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 8px 16px;
  border-radius: var(--hm-radius-control) var(--hm-radius-control) 0 0;
  color: var(--hm-ink);
  background: var(--hm-surface);
  box-shadow: 0 -1px 0 var(--hm-surface-glass) inset;
}

.tab-copy strong {
  color: var(--hm-ink);
  font-size: var(--hm-fs-meta);
  font-weight: 600;
  line-height: 1.1;
}

.tab-copy em {
  max-width: 280px;
  overflow: hidden;
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
  font-style: normal;
  font-weight: 600;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--hm-surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.global-search input {
  width: 100%;
  height: var(--hm-control-height);
  padding: 6px 10px 6px 30px;
  border-radius: var(--hm-radius-control);
  border: 1px solid var(--hm-surface);
  background: var(--hm-surface-glass);
  color: var(--hm-on-dark);
  font-size: var(--hm-fs-label);
  outline: none;
  transition: all 0.2s ease;
}

.global-search input::placeholder {
  color: var(--hm-on-dark-muted);
}

.global-search input:focus {
  border-color: var(--hm-primary);
  background: var(--hm-surface-glass);
  box-shadow: 0 0 0 2px var(--hm-focus-ring);
}

.global-search button {
  display: none !important;
}

/* Multi-Tab Workspace Bar */
.workspace-tab-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 24px 0;
  background: var(--hm-surface);
  border-bottom: 1px solid var(--hm-line);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  min-height: 44px;
}

.workspace-tab-bar::-webkit-scrollbar {
  display: none;
}

.workspace-tab-bar:empty {
  display: none;
}

/* Topbar already names the current route; a lone main tab under it reads as
   duplicate chrome. Keep the bar only when product/detail tabs are open. */
.workspace-tab-bar:has(.workspace-tab-item:only-child) {
  display: none;
}

.workspace-tab-item {
  display: inline-flex;
  align-items: center;
  height: 35px;
  padding: 0 8px 0 12px;
  border-radius: var(--hm-radius-control) var(--hm-radius-control) 0 0;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--hm-ink);
  font-size: var(--hm-fs-label);
  font-weight: 400;
  transition: all 150ms cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 260px;
  white-space: nowrap;
  position: relative;
}

.workspace-tab-item:hover {
  background: var(--hm-mint);
  color: var(--hm-ink);
}

.workspace-tab-item.active {
  background: var(--hm-surface);
  color: var(--hm-primary);
  border-color: var(--hm-line);
  border-bottom-color: var(--hm-surface);
  font-weight: 600;
  box-shadow: 0 -2px 6px var(--hm-focus-ring);
}

.workspace-tab-item.active::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--hm-primary);
  border-radius: var(--hm-radius-control) var(--hm-radius-control) 0 0;
}

.tab-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  color: inherit !important;
  font: inherit !important;
  cursor: pointer;
  box-shadow: none !important;
  min-height: unset !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-icon {
  font-size: var(--hm-fs-meta);
  flex-shrink: 0;
}

.tab-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-close-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  margin-left: 6px !important;
  border-radius: var(--hm-radius-control) !important;
  border: none !important;
  background: transparent !important;
  color: var(--hm-muted) !important;
  font-size: var(--hm-fs-meta) !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: all 120ms ease !important;
}

.tab-close-btn:hover {
  background: var(--hm-danger-soft) !important;
  color: var(--hm-danger) !important;
}

.dynamic-tab-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.dynamic-tab-header .back-to-main {
  align-self: flex-start;
}

.dynamic-tab-loading {
  padding: 60px 20px;
  text-align: center;
  color: var(--hm-muted);
  font-weight: 600;
}

.login-panel,
.account-panel,
.submit-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.oauth-button {
  min-height: var(--hm-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-surface);
  color: var(--hm-ink);
  padding: 0 16px;
  text-decoration: none;
  font-size: var(--hm-fs-meta);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 4px var(--hm-shadow-color-faint);
}

.account-panel {
  position: absolute;
  top: 54px;
  right: 18px;
  z-index: 30;
  width: min(360px, calc(100vw - 36px));
  display: grid;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  background: var(--hm-surface);
  padding: 24px;
  box-shadow: 0 28px 70px var(--hm-focus-ring);
  max-height: calc(100dvh - 72px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.avatar {
  width: 40px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: var(--hm-radius-pill);
  background: var(--hm-primary);
  color: var(--hm-on-dark);
  font-weight: 600;
  box-shadow: 0 2px 8px var(--hm-focus-ring);
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.account-menu-button {
  justify-self: end;
  width: 42px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--hm-radius-pill);
  padding: 0;
  background: transparent;
}

.account-menu-close,
.icon-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: var(--hm-control-height);
  min-height: var(--hm-control-height);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--hm-radius-control);
  color: var(--hm-ink);
  background: transparent;
  font-size: var(--hm-fs-section);
}

.icon-button:hover {
  color: var(--hm-ink);
  background: var(--hm-neutral);
}

.account-panel .tenant-switcher {
  width: 100%;
  justify-content: space-between;
}

.account-panel .tenant-switcher select {
  min-width: 0;
  max-width: 190px;
}

.account-panel .ghost-button {
  width: 100%;
}

.ghost-button {
  border: 1px solid var(--hm-line);
  background: var(--hm-surface);
  color: var(--hm-ink);
  box-shadow: 0 2px 4px var(--hm-shadow-color-faint);
}

/* UX-E completion S1 · UX-04: a link dressed as a ghost button is a 40px control like the button it looks like (the
   account menu's Referrals and Help were 26px underlined text boxes). */
/* A disclosure toggle is a control too: 40px tall at least (Permission details, Role model, What this changes were 22–30px). */
summary {
  min-height: var(--hm-control-height);
  padding-block: 10px;
  cursor: pointer;
}

a.ghost-button {
  display: inline-flex;
  align-items: center;
  min-height: var(--hm-control-height);
  padding: 0 16px;
  border-radius: var(--hm-radius-control);
  font-size: var(--hm-fs-meta);
  font-weight: 600;
  text-decoration: none;
}

.account-panel a.ghost-button { display: flex; }

.ghost-button:hover {
  background: var(--hm-neutral);
  color: var(--hm-ink);
  border-color: var(--hm-line-strong);
}

.retry-submit {
  color: var(--hm-primary);
}

.tenant-chip,
.tenant-switcher,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  padding: 0 14px;
  font-size: var(--hm-fs-label);
  color: var(--hm-ink);
  white-space: nowrap;
  background: var(--hm-surface-glass);
}

.tenant-switcher {
  border-radius: var(--hm-radius-control);
  padding: 8px 10px;
}

.tenant-switcher select {
  min-width: 210px;
  max-width: min(32vw, 320px);
  height: var(--hm-control-height);
  border: 0;
  background: transparent;
  color: var(--hm-ink);
  font-size: var(--hm-fs-label);
  font-weight: 600;
  outline: none;
}


.status-pill {
  color: var(--hm-primary);
  border-color: var(--hm-primary-line);
  background: var(--hm-mint);
}

@keyframes pulsePulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 10px var(--hm-primary); }
  100% { transform: scale(0.9); opacity: 0.6; }
}

@keyframes buttonSpin {
  to { transform: rotate(360deg); }
}

@keyframes progressSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(340%); }
}

.workspace {
  background: var(--hm-surface);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  padding: 24px;
  box-shadow: var(--hm-shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
  max-width: 100%;
}

.workspace:hover {
  border-color: var(--hm-line-strong);
}

.workspace.compact {
  padding: 20px;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.quick-stats article {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  background: var(--hm-surface);
  box-shadow: var(--hm-shadow-sm);
  transition: all 180ms ease;
  min-width: 0;
}

.quick-stats article:hover {
  border-color: var(--hm-line-strong);
  box-shadow: var(--hm-shadow-sm);
  transform: translateY(-1px);
}

.quick-stats strong {
  color: var(--hm-ink);
  font-size: var(--hm-fs-kpi);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-neutral);
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 32px;
  border: 1px dashed var(--hm-line-strong);
  border-radius: var(--hm-radius-card);
  background: var(--hm-neutral);
}

.empty-state p {
  max-width: 560px;
  margin: 0;
  line-height: 1.5;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  background: var(--hm-surface);
  box-shadow: var(--hm-shadow-sm);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 4px 0;
  color: var(--hm-ink);
  font-size: var(--hm-fs-label);
}

.pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.products-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.products-table th,
.products-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--hm-line);
  text-align: left;
  vertical-align: middle;
}

/* Row hover — quiet navy wash for scannability, and a subtle left accent
   so the active row reads as a unit rather than loose cells. */
.products-table tbody tr { transition: background 0.12s ease; }
.products-table tbody tr:hover { background: var(--hm-neutral); }

.products-table th {
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  background: var(--hm-neutral);
}

.products-table td {
  color: var(--hm-ink);
  font-size: var(--hm-fs-meta);
}

.products-table th:first-child,
.products-table td:first-child {
  min-width: 240px;
  max-width: 360px;
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--hm-surface);
  box-shadow: 1px 0 0 var(--hm-line);
}

.products-table th:first-child {
  z-index: 2;
  background: var(--hm-neutral);
}

.products-table tbody tr:hover td:first-child {
  background: var(--hm-neutral);
}

.products-table .creator-cell {
  min-width: 190px;
}

.products-table .creator-cell strong {
  max-width: 220px;
  font-size: var(--hm-fs-meta);
}

.products-table td strong {
  display: block;
  max-width: 100%;
  color: var(--hm-ink);
  font-size: var(--hm-fs-meta);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.products-table td span {
  display: block;
  margin-top: 4px;
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* URL / meta under the name: keep ellipsis; don't compete with actions. */
.products-table .product-cell > span:not(.external-id):not(.lock-badge) {
  max-width: 100%;
}

/* Action chips stay on one line; other inline chips keep natural wrap. */
.products-table td .row-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
}
.products-table td .external-id,
.products-table td .job-status,
.products-table td .score-badge,
.products-table td .category-chip,
.products-table td .lock-badge {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.products-table td .external-id {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: var(--hm-radius-pill);
  padding: 0 8px;
  color: var(--hm-primary);
  background: var(--hm-mint);
  font-size: var(--hm-fs-label);
  font-weight: 600;
}

.score-badge,
.state-badge {
  width: fit-content;
  min-width: 54px;
  display: inline-flex !important;
  justify-content: center;
  align-items: center;
  min-height: 30px;
  border-radius: var(--hm-radius-pill);
  padding: 0 10px;
  margin-top: 0 !important;
  font-weight: 600;
}

/* AEO score colour tiers — weak products read red at a glance. */
.score-badge.score-band-strong { color: var(--hm-success) !important; background: var(--hm-success-tint); }
.score-badge.score-band-mid    { color: var(--hm-pending) !important;  background: var(--hm-sand); }
.score-badge.score-band-weak   { color: var(--hm-danger) !important; background: var(--hm-danger-soft); }
.score-badge.score-band-none   { color: var(--hm-muted) !important;  background: var(--hm-neutral); }

.state-badge {
  color: var(--hm-primary) !important;
  background: var(--hm-mint);
}
.spinner {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: var(--hm-radius-pill);
  vertical-align: -0.1em;
  animation: hasmord-spin 0.6s linear infinite;
}
@keyframes hasmord-spin { to { transform: rotate(360deg); } }

.text-button {
  min-height: var(--hm-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-surface);
  color: var(--hm-primary);
  padding: 0 12px;
  box-shadow: none;
  font-size: var(--hm-fs-label);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.text-button:hover {
  background: var(--hm-mint);
  border-color: var(--hm-primary-line);
  box-shadow: none;
}

.text-button.active {
  color: var(--hm-on-dark);
  border-color: transparent;
  background: var(--hm-primary);
  box-shadow: 0 2px 8px var(--hm-focus-ring);
}

/* -------------------------------------------------------------------------
   Product-row actions — 3 primary buttons + a "⋯ More" overflow menu.
   ------------------------------------------------------------------------- */
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.row-btn {
  min-height: var(--hm-control-height);
  padding: 0 10px;
  font-size: var(--hm-fs-label);
  font-weight: 400;
  border-radius: var(--hm-radius-control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--hm-surface);
  color: var(--hm-ink);
  border: 1px solid var(--hm-line);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--hm-shadow-sm);
  transition: all 120ms ease;
}

.row-btn:hover {
  background: var(--hm-neutral);
  border-color: var(--hm-primary-line);
  color: var(--hm-ink);
  transform: translateY(-1px);
}

.row-btn.active {
  color: var(--hm-on-dark);
  border-color: transparent;
  background: var(--hm-primary);
  box-shadow: 0 2px 6px var(--hm-focus-ring);
}

/* Report = the flagship action: solid navy so the eye lands on it and the
   action hierarchy reads clearly (primary filled, others outlined). */
.row-btn--primary {
  color: var(--hm-on-dark);
  border-color: transparent;
  background: var(--hm-primary); /* UX-E B2a · was a navy gradient */
  box-shadow: 0 1px 3px var(--hm-focus-ring), inset 0 1px 0 var(--hm-surface-glass);
}
.row-btn--primary:hover {
  background: var(--hm-primary-hover);
  color: var(--hm-on-dark);
  box-shadow: 0 2px 6px var(--hm-focus-ring), inset 0 1px 0 var(--hm-surface-glass);
}

.row-btn--more {
  color: var(--hm-muted);
  font-weight: 600;
}

.row-more {
  position: relative;
  display: inline-flex;
}

.row-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 190px;
  padding: 5px;
  background: var(--hm-surface);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  box-shadow: var(--hm-shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.row-menu[hidden] { display: none; }

.row-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: transparent;
  border-radius: var(--hm-radius-control);
  font-size: var(--hm-fs-label);
  font-weight: 400;
  color: var(--hm-ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 100ms ease;
}
.row-menu-item:hover {
  background: var(--hm-mint);
  color: var(--hm-ink);
}
.row-menu-item.active {
  background: var(--hm-mint);
  color: var(--hm-primary);
  font-weight: 600;
}
.row-menu-item.danger:hover { background: var(--hm-neutral); color: var(--hm-danger); }

/* Status — compact dot + label rather than a heavy pill. */
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--hm-fs-label);
  font-weight: 400;
  color: var(--hm-ink);
  text-transform: capitalize;
}
.status-dot i {
  width: 7px;
  height: 7px;
  border-radius: var(--hm-radius-pill);
  flex: 0 0 auto;
  background: var(--hm-muted);
}
/* Job status pill — tinted background + glyph, replaces the floating dot. */
.job-status {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  width: max-content;
  max-width: 100%;
  padding: 2px 8px 2px 6px;
  border-radius: var(--hm-radius-control);
  font-size: var(--hm-fs-label);
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
  background: var(--hm-mint);
  color: var(--hm-muted);
  border: 1px solid var(--hm-primary-line);
}
.products-table td[data-label="Status"] { min-width: 116px; }
/* Override `.products-table td span { display:block }` (higher specificity) so
   the status pill stays a single inline-flex row instead of stacking ✓ over the
   label. */
.products-table td .job-status { display: inline-flex; margin-top: 0; }
/* S1g-R: the list's "No product name" keeps its red and its inline pill under `.products-table td span`. */
.products-table td .name-missing-flag { display: inline-flex; width: max-content; max-width: 100%; margin-top: 4px; color: var(--hm-danger); }
.job-status--success { background: var(--hm-success-tint); color: var(--hm-success); border-color: var(--hm-success-line); }
.job-status--pending { background: var(--hm-sand); color: var(--hm-pending); border-color: var(--hm-pending-line); }
.job-status--error { background: var(--hm-neutral); color: var(--hm-danger); border-color: var(--hm-danger-line); }
.status-dot--success { color: var(--hm-success); }
.status-dot--success i { background: var(--hm-success); box-shadow: 0 0 0 3px var(--hm-success-ring); }
.status-dot--pending { color: var(--hm-pending); }
.status-dot--pending i { background: var(--hm-pending); box-shadow: 0 0 0 3px var(--hm-pending-ring); }
.status-dot--error { color: var(--hm-danger); }
.status-dot--error i { background: var(--hm-danger); box-shadow: 0 0 0 3px var(--hm-danger-ring); }


.danger-button {
  color: var(--hm-danger);
}

.danger-button:hover {
  border-color: var(--hm-danger-line);
  background: var(--hm-danger-soft);
}

.products-table .product-detail-row > td,
.products-table .product-detail-row > td:first-child {
  /* Expanded Report uses a single colspan cell that also matches
     :first-child. Undo Product-column sticky/max-width so the full
     report (incl. section headings) isn't left-clipped. Must beat
     `.products-table td:first-child` and the ≤1440px max-width tweak. */
  padding: 0;
  background: var(--hm-mint);
  position: static;
  left: auto;
  z-index: auto;
  min-width: 0;
  max-width: none;
  box-shadow: none;
  overflow: visible;
}

.inline-detail-panel {
  display: grid;
  gap: 20px;
  padding: 22px;
  border-top: 1px solid var(--hm-line);
  background: linear-gradient(180deg, var(--hm-mint), var(--hm-surface));
  overflow: visible;
}

.inline-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}

.inline-detail-header h2 {
  max-width: 720px;
  overflow-wrap: anywhere;
}

.close-detail {
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--hm-radius-control);
}

.inline-loading {
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--hm-line-strong);
  border-radius: var(--hm-radius-card);
  color: var(--hm-muted);
  background: var(--hm-surface-glass);
  font-size: var(--hm-fs-label);
}

.timeline-panel {
  display: grid;
  gap: 18px;
}

.simulator-heading-row,
.simulator-form-actions,
.simulator-providers > div,
.simulator-history > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.simulator-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--hm-line);
  border-bottom: 1px solid var(--hm-line);
  list-style: none;
}

.simulator-workflow li {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
  padding: 2px 16px;
  border-right: 1px solid var(--hm-line);
}

.simulator-workflow li:first-child {
  padding-left: 0;
}

.simulator-workflow li:last-child {
  padding-right: 0;
  border-right: 0;
}

.simulator-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.simulator-question-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  cursor: pointer;
  list-style-position: inside;
}

.simulator-question-list > li {
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) minmax(280px, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hm-line);
}

.simulator-query-outcomes {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
  gap: 7px;
}

.simulator-query-outcome.recommended {
  color: var(--hm-success);
  border-color: var(--hm-success-line);
  background: var(--hm-success-tint);
}

.simulator-query-outcome.failed {
  color: var(--hm-danger);
  border-color: var(--hm-danger-line);
  background: var(--hm-danger-soft);
}

.simulator-providers > div,
.simulator-history > div {
  min-width: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--hm-line);
}

.simulator-query-button {
  display: inline-flex;
  width: auto;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  color: var(--hm-ink);
  background: var(--hm-surface);
  box-shadow: none;
  font-size: var(--hm-fs-label);
  font-weight: 600;
  text-align: left;
}

@media (max-width: 900px) {
  .simulator-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .simulator-heading-row,
  .simulator-form-actions,
  .simulator-providers > div,
  .simulator-history > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .simulator-query-button {
    width: 100%;
  }

  .simulator-question-details summary,
  .simulator-question-list > li {
    grid-template-columns: 1fr;
  }

  .simulator-question-details summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .simulator-query-outcomes {
    justify-content: flex-start;
  }

  .simulator-workflow {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .simulator-workflow li,
  .simulator-workflow li:first-child,
  .simulator-workflow li:last-child {
    padding: 0;
    border-right: 0;
  }
}

.timeline-heading-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.timeline-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-pill);
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
  font-weight: 600;
}

.timeline-notice {
  margin: 0 0 14px;
  padding: 9px 12px;
  border: 1px solid var(--hm-pending-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-sand);
  color: var(--hm-pending);
  font-size: var(--hm-fs-meta);
  line-height: 1.45;
} /* the same callout as "Correlation is not causation": two notes, one look */

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
}
.timeline-legend .event::before { height: 12px; width: 2px; border-left: 2px dashed var(--hm-line-strong); background: transparent; } /* the swatch and the chart's check lines are the same strong grey (the lines were white on white) */

.timeline-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 220px;
}
.timeline-event-line { stroke: var(--hm-line-strong); stroke-width: 1; stroke-dasharray: 4 5; }
.timeline-event-line-focus { stroke: var(--hm-pending-muted); stroke-dasharray: none; stroke-width: 1.5; }
.timeline-version-key { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0; padding: 0; list-style: none; color: var(--hm-muted); font-size: var(--hm-fs-label); }
.timeline-version-key-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--hm-radius-pill); background: var(--hm-ink); color: var(--hm-on-dark); font-size: var(--hm-fs-label); font-weight: 600; }
.timeline-tag { display: inline-block; margin-top: 3px; margin-right: 6px; padding: 1px 8px; border-radius: var(--hm-radius-pill); font-size: var(--hm-fs-label); font-weight: 600; }
.timeline-publish-withdrawn { border-left-color: var(--hm-pending); }
.timeline-publish-fp { margin-left: auto; color: var(--hm-muted); font-size: var(--hm-fs-label); }

.timeline-event {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 100px;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hm-line);
}
.timeline-event time, .timeline-event span { color: var(--hm-muted); font-size: var(--hm-fs-label); }

.analysis-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, min(360px, 100%));
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}

.inline-score-card {
  grid-template-columns: 96px minmax(0, 1fr);
  padding: 18px;
  background: var(--hm-surface);
}

.inline-subsection h3 {
  margin: 0;
  padding-inline-start: 2px;
  color: var(--hm-ink);
  font-size: var(--hm-fs-body);
  line-height: 1.3;
  overflow: visible;
}

.score-guardrails {
  display: grid;
  gap: 8px;
  border: 1px solid var(--hm-line);
  border-left: 4px solid var(--hm-primary);
  border-radius: var(--hm-radius-control);
  padding: 14px 16px;
  background: var(--hm-surface);
}

.score-guardrails strong {
  color: var(--hm-ink);
  font-size: var(--hm-fs-meta);
}

.score-guardrails p {
  margin: 0;
  color: var(--hm-ink);
  font-size: var(--hm-fs-meta);
}

.score-guardrails div {
  display: grid;
  gap: 4px;
}

.score-guardrails span {
  color: var(--hm-muted);
  font-size: var(--hm-fs-meta);
  line-height: 1.4;
}

.inline-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.report-meta {
  margin-top: 6px;
  max-width: 100%;
}

.aio-publish-panel {
  display: grid;
  /* UX-E completion S6 · UX-36 (375 audit): the column never grows past the panel — a row of buttons in the Shopper
     editor had set it 6px wider than the phone. */
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  background: var(--hm-surface);
}

.aio-publish-header,
.aio-publish-actions,
.aio-publish-summary {
  display: flex;
  align-items: start;
  gap: 14px;
}

.aio-publish-header {
  justify-content: space-between;
}

.aio-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-pill);
  font-size: var(--hm-fs-label);
  font-weight: 600;
  white-space: nowrap;
}

/* UX-C S5-1 P2: a withdrawn AIO page reads as a distinct state, not a bare draft. */
.aio-status-withdrawn {
  color: var(--hm-pending);
  border-color: var(--hm-pending-line);
  background: var(--hm-sand);
}

.aio-publish-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.aio-publish-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-surface-glass);
}

.aio-publish-summary span {
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.aio-publish-summary strong {
  color: var(--hm-ink);
  overflow-wrap: anywhere;
}
.aio-version-details { margin-top: 6px; font-size: var(--hm-fs-label); color: var(--hm-muted); }
.aio-version-details code { word-break: break-all; }

.aio-crawler-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.aio-crawler-state,
.aio-crawler-observed {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-pill);
  font-size: var(--hm-fs-label);
  font-weight: 600;
  white-space: nowrap;
}

.aio-crawler-state-partial {
  color: var(--hm-pending);
  border-color: var(--hm-pending-line);
  background: var(--hm-sand);
}

/* UX-C S5-2 · M15: the three-layer honesty note sits right by the observation numbers (not a folded
   sub-line), naming crawled / indexed / in-answer — only fetches are measured here. */
.aio-crawler-note {
  margin: 8px 0 0;
  font-size: var(--hm-fs-meta);
  line-height: 1.45;
  color: var(--hm-ink);
}

.aio-crawler-list li {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(100px, 0.8fr) minmax(110px, 0.8fr) minmax(120px, 0.8fr) minmax(150px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hm-line);
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
}

.aio-publish-actions {
  align-items: center;
  flex-wrap: wrap;
}

.evidence-workspace {
  display: grid;
  gap: 18px;
}

.evidence-product-overview {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-surface);
}

.evidence-overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-line);
}

.evidence-overview-metrics div {
  display: grid;
  gap: 3px;
  min-width: 92px;
  padding: 10px 12px;
  background: var(--hm-neutral);
}

.evidence-workspace .evidence-library,
.evidence-workspace .fact-check {
  padding: 18px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-surface);
}

.evidence-library {
  display: grid;
  gap: 14px;
  padding-top: 6px;
  border-top: 1px solid var(--hm-line);
}

.inline-subsection-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.evidence-count,
.evidence-source,
.evidence-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--hm-primary-line);
  border-radius: var(--hm-radius-pill);
  color: var(--hm-primary);
  background: var(--hm-mint);
  font-size: var(--hm-fs-label);
  font-weight: 600;
  white-space: nowrap;
}

.evidence-status-active {
  color: var(--hm-success);
  border-color: var(--hm-success-line);
  background: var(--hm-success-tint);
}

.evidence-status-expiring {
  color: var(--hm-pending);
  border-color: var(--hm-pending-line);
  background: var(--hm-sand);
}

.evidence-status-expired,
.evidence-status-low_confidence {
  color: var(--hm-danger);
  border-color: var(--hm-danger-line);
  background: var(--hm-danger-soft);
}

.evidence-form-heading,
.verified-claim-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.evidence-form-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(180px, 1fr) repeat(3, minmax(120px, 0.7fr));
  gap: 12px;
}

.field-help {
  display: block;
  margin-top: 5px;
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
  font-weight: 400;
}

.evidence-list {
  display: grid;
  gap: 10px;
}

.evidence-item {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-surface-glass);
}

.evidence-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.evidence-item-heading strong {
  overflow-wrap: anywhere;
}

.evidence-item p {
  margin: 0;
  color: var(--hm-ink);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.evidence-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.evidence-refresh-queued,
.evidence-refresh-processing,
.evidence-refresh-retry_scheduled {
  color: var(--hm-pending);
}

.evidence-refresh-completed {
  color: var(--hm-success);
}

.evidence-refresh-unavailable,
.evidence-refresh-dead_letter {
  color: var(--hm-danger);
}

.evidence-detail-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.fact-check {
  display: grid;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--hm-line);
}

.verified-claim-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.3fr);
  gap: 12px;
}

.claim-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.claim-summary-consistent strong {
  color: var(--hm-primary);
}

.claim-summary-partial strong {
  color: var(--hm-pending);
}

.claim-summary-conflict strong {
  color: var(--hm-danger);
}

/* UX-E completion S5 · UX-34: backed only by the merchant's own page — the same green, drawn as an outline so it never
   reads as the independent check. */
.claim-summary-own strong {
  color: var(--hm-primary);
}

.claim-list {
  display: grid;
  gap: 8px;
}

.claim-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--hm-line);
  border-left: 3px solid var(--hm-line-strong);
  border-radius: var(--hm-radius-control);
  background: var(--hm-surface);
}

.claim-item-consistent {
  border-left-color: var(--hm-primary);
}

.claim-item-partial {
  border-left-color: var(--hm-pending);
}

.claim-item-conflict {
  border-left-color: var(--hm-danger);
}

.claim-item-own {
  border-left-color: var(--hm-primary);
}

.claim-item-main {
  display: grid;
  /* UX-34: wide enough for the longest result ("Backed by your own page"), so every fact's text starts in one column. */
  grid-template-columns: minmax(172px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.claim-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.claim-status-consistent,
.claim-relation-consistent {
  color: var(--hm-success);
  background: var(--hm-success-tint);
}

.claim-status-partial,
.claim-relation-partial {
  color: var(--hm-pending);
  background: var(--hm-sand);
}

.claim-status-conflict,
.claim-relation-conflict {
  color: var(--hm-danger);
  background: var(--hm-danger-soft);
}

/* 2.8.1.4B: a part with no source (the part-by-part dialog); its sentence is the pill, so it wraps */
.claim-relation-insufficient {
  color: var(--hm-ink);
  background: var(--hm-neutral);
}
.claim-relation.claim-part-line {
  white-space: normal;
  height: auto;
  min-height: 24px;
  padding-block: 2px;
}

.claim-status-own {
  color: var(--hm-primary);
  background: var(--hm-surface);
  box-shadow: inset 0 0 0 1px var(--hm-primary);
}
.claim-status-insufficient, .claim-status-unchecked { color: var(--hm-muted); background: var(--hm-neutral); } /* "Evidence needed" is a pill on the dialog's grey header, like the Extracted facts source pill */

.claim-text {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.claim-modal {
  width: min(760px, calc(100vw - 40px));
  max-width: none;
  max-height: min(760px, calc(100dvh - 40px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  color: var(--hm-ink);
  background: var(--hm-surface);
  box-shadow: 0 24px 64px var(--hm-focus-ring);
}

.claim-modal::backdrop {
  background: var(--hm-overlay); /* 2.8.1.3F: a dimmed backdrop (the page stays visible behind a dialog), never a solid fill */
  backdrop-filter: blur(3px);
}

.claim-modal-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(760px, calc(100dvh - 40px));
}

.claim-modal-header,
.claim-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: var(--hm-neutral);
}

.claim-modal-header {
  border-bottom: 1px solid var(--hm-line);
}

.claim-modal-body {
  display: grid;
  gap: 16px;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  overscroll-behavior: contain;
}

.claim-modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--hm-line);
}

/* 2.8.1.3F: the claim-details dialog in the step-card style of the AI answers: one thing per card (the statement and what its result means; what each source says),
   then at most two actions in the footer. A card whose field is missing is not drawn. */
.claim-modal-footer { flex-wrap: wrap; }
.claim-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  background: var(--hm-surface);
}
.claim-step-no {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: var(--hm-radius-pill);
  color: var(--hm-primary);
  background: var(--hm-primary-tint);
  font-size: var(--hm-fs-label);
  font-weight: 600;
}
.claim-step h5 { margin: 0 0 4px; font-size: var(--hm-fs-body); }
.claim-step p { margin: 0; color: var(--hm-muted); font-size: var(--hm-fs-meta); line-height: 1.5; overflow-wrap: anywhere; }
.claim-step .claim-step-claim { margin: 2px 0 8px; color: var(--hm-ink); font-size: var(--hm-fs-body); font-weight: 600; }
.claim-step .claim-step-mean { padding: 9px 12px; border-radius: var(--hm-radius-control); color: var(--hm-ink); background: var(--hm-attention-tint); }
.claim-step .claim-step-mean-conflict { background: var(--hm-danger-tint); }
.claim-step .claim-step-mean-unchecked { background: var(--hm-neutral); } /* 2.8.1.4F: not yet read by the AI judge is neither a warning nor a result */
.claim-step .claim-step-mean-consistent, .claim-step .claim-step-mean-own { background: var(--hm-success-tint); }
.claim-step .claim-alignment-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.claim-step-source-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 4px; }
.claim-step .claim-step-values { margin-top: 6px; color: var(--hm-ink); font-weight: 600; }
.claim-quote {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-left: 3px solid var(--hm-primary);
  border-radius: 0 var(--hm-radius-control) var(--hm-radius-control) 0;
  color: var(--hm-ink);
  background: var(--hm-primary-tint);
  font-size: var(--hm-fs-meta);
  overflow-wrap: anywhere;
}
.claim-quote small { display: block; margin-top: 2px; color: var(--hm-muted); font-size: var(--hm-fs-label); }

.inline-error {
  padding: 12px 14px;
  border: 1px solid var(--hm-danger-line);
  border-radius: var(--hm-radius-control);
  color: var(--hm-danger);
  background: var(--hm-danger-soft);
}

.pil-editor-form {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  padding: 16px;
  background: var(--hm-surface);
}

.pil-editor-form.is-busy::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--hm-mint);
}

.pil-editor-form.is-busy::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 32%;
  height: 3px;
  background: var(--hm-primary);
  animation: progressSweep 1.15s ease-in-out infinite;
}

.pil-editor-section {
  min-width: 0;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.pil-editor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.pil-editor-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pil-editor-grid.text {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pil-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pil-editor-actions .muted {
  margin: 0;
}

.permission-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  background: var(--hm-surface);
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 18px;
  align-items: center;
  margin-bottom: 20px;
}

.section-heading > div:first-child {
  min-width: 0;
  flex: 1 1 14rem;
}

.section-heading > .primary-link,
.section-heading > .actions-group {
  flex: 0 0 auto;
}

.workspace > .section-heading {
  margin-bottom: 12px;
}

.workspace > .section-heading .eyebrow,
.workspace > .section-heading h1 {
  display: none !important;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--hm-primary);
  font-size: var(--hm-fs-label);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--hm-ink);
  font-weight: 600;
}

h1 {
  font-size: var(--hm-fs-title);
  line-height: 1.15;
}

h2 {
  font-size: var(--hm-fs-section);
  letter-spacing: var(--hm-ls-h2);
}

.subcopy,
.muted {
  color: var(--hm-ink);
}

.subcopy {
  max-width: 720px;
  margin: 8px 0 0;
  line-height: 1.5;
}

.muted {
  margin: 8px 0 0;
  color: var(--hm-muted);
  font-size: var(--hm-fs-meta);
  line-height: 1.4;
}

.submit-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 380px);
  gap: 20px;
}

.report-grid {
  display: grid;
}

.submit-panel {
  align-content: end;
  align-items: flex-end;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  padding: 24px;
  background: var(--hm-surface);
  box-shadow: 0 4px 12px var(--hm-shadow-color-faint);
}

.batch-import-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  background: var(--hm-surface);
  box-shadow: 0 4px 12px var(--hm-shadow-color-faint);
}

.batch-import-heading {
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--hm-line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.batch-form {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

.batch-form > button {
  align-self: flex-end;
  min-width: 140px;
}

.batch-history-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-surface);
}

.batch-history-toolbar label {
  max-width: 320px;
}

.batch-history-toolbar span {
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
  font-weight: 600;
}

.batch-history-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.batch-history-list {
  display: grid;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.batch-history-item,
button.batch-history-item {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 10px;
  align-items: start;
  min-height: auto;
  border: 1px solid var(--hm-line);
  border-left: 3px solid transparent;
  border-radius: var(--hm-radius-control);
  padding: 12px;
  background: var(--hm-surface);
  color: var(--hm-ink);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  font-weight: 600;
  letter-spacing: 0;
  transform: none;
}

.batch-history-item:hover,
.batch-history-item:focus-visible,
button.batch-history-item:hover,
button.batch-history-item:focus-visible {
  border-color: var(--hm-primary-line);
  border-left-color: var(--hm-primary);
  background: var(--hm-mint);
  color: var(--hm-ink);
  box-shadow: none;
  transform: none;
}

.batch-history-item.active,
button.batch-history-item.active {
  border-color: var(--hm-primary);
  border-left-color: var(--hm-primary);
  background: var(--hm-mint);
  color: var(--hm-ink);
  box-shadow: inset 0 0 0 1px var(--hm-focus-ring);
  transform: none;
}

button.batch-history-item:active {
  transform: none;
}

.batch-detail {
  min-width: 0;
}

.batch-rows li {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 0.5fr) minmax(180px, 1fr) minmax(180px, 1.3fr);
  gap: 10px;
  align-items: center;
  border-radius: var(--hm-radius-control);
  padding: 10px 14px;
  background: var(--hm-surface);
  border: 1px solid var(--hm-line);
  transition: background 150ms ease, border-color 150ms ease;
}

.batch-retry-button {
  min-height: var(--hm-control-height);
  padding: 0 12px;
}

.submit-panel label:first-child {
  flex: 1 1 420px;
}

label {
  display: grid;
  gap: 8px;
  min-width: min(180px, 100%); /* 180px where there is room, never wider than its container (a label in a 160px card ran out of it) */
  color: var(--hm-ink);
  font-size: var(--hm-fs-label);
  font-weight: 600;
}

input,
select,
textarea {
  min-width: 0;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-surface);
  color: var(--hm-ink);
  font-weight: 400;
  box-shadow: 0 2px 4px var(--hm-shadow-color-faint) inset;
}

input,
select {
  min-height: max(42px, var(--hm-control-height)); /* WS-2: 44px on a phone, as every control */
  padding: 0 16px;
}

textarea {
  width: 100%;
  min-height: 104px;
  padding: 12px 14px;
  line-height: 1.45;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--hm-line-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--hm-primary);
  box-shadow: 0 0 0 3px var(--hm-mint);
}

input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

output {
  width: 100%;
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 4px;
}

.score-card {
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  padding: 24px;
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 20px;
  align-items: center;
  background: var(--hm-surface-glass);
}

.score-ring {
  width: 112px;
  aspect-ratio: 1;
  border-radius: var(--hm-radius-pill);
  display: grid;
  place-items: center;
  background: conic-gradient(var(--hm-primary) 0deg calc(var(--score, 54) * 3.6deg), var(--hm-neutral) calc(var(--score, 54) * 3.6deg) 360deg);
  color: var(--hm-ink);
  font-size: var(--hm-fs-kpi);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 18px -4px var(--hm-focus-ring);
  position: relative;
}

.metric-grid {
  display: grid;
  /* auto-fit wraps to available width (sidebar at ~1280 left ~900–1000px),
     so the rightmost score cards aren't clipped. */
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  min-width: 0;
}

.metric {
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  padding: 14px 14px 16px;
  min-height: 116px;
  min-width: 0;
  display: grid;
  align-content: space-between;
  gap: 8px;
  background: var(--hm-surface);
  box-shadow: 0 2px 8px var(--hm-shadow-color-faint);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.metric:hover {
  transform: translateY(-2px);
  border-color: var(--hm-primary-line);
  box-shadow: 0 8px 24px -12px var(--hm-focus-ring);
}

.metric strong {
  display: block;
  font-size: var(--hm-fs-kpi);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--hm-primary);
}

.metric span {
  color: var(--hm-ink);
  font-size: var(--hm-fs-label);
  font-weight: 600;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: break-word;
  hyphens: manual;
}

/* Expanded Report lives inside a products-table <td>; undo the table's
   single-line ellipsis so AEO dimension labels stay fully readable. */
.products-table td .metric span {
  display: block;
  margin-top: 0;
  color: var(--hm-ink);
  font-size: var(--hm-fs-label);
  font-weight: 600;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: break-word;
}

.meter {
  height: 6px;
  overflow: hidden;
  border-radius: var(--hm-radius-control);
  background: var(--hm-line);
  margin-top: 8px;
}

.meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--hm-primary);
  box-shadow: 0 0 8px var(--hm-focus-ring);
}

.fix {
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  background: var(--hm-surface);
  box-shadow: 0 2px 8px var(--hm-shadow-color-faint);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.fix:hover {
  border-color: var(--hm-line-strong);
  /* Keep hover feedback without shifting content toward a clipped right edge. */
  box-shadow: 0 2px 10px var(--hm-shadow-color-faint);
}

.fix-rank {
  width: 28px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: var(--hm-radius-pill);
  background: var(--hm-primary);
  color: var(--hm-on-dark);
  font-size: var(--hm-fs-label);
  font-weight: 600;
  box-shadow: 0 2px 8px var(--hm-focus-ring);
}

.fix-heading-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

.fix strong {
  min-width: 0;
  color: var(--hm-ink);
  line-height: 1.3;
  font-size: var(--hm-fs-body);
}
.fix-ai-btn {
  border: 1px solid var(--hm-primary);
  background: var(--hm-mint);
  color: var(--hm-primary);
  border-radius: var(--hm-radius-control);
  padding: 7px 13px;
  font-weight: 600;
  font-size: var(--hm-fs-meta);
  cursor: pointer;
}
.fix-ai-hint { font-size: var(--hm-fs-label); color: var(--hm-muted); }
.fix-manual-btn {
  border: 1px solid var(--hm-line);
  background: transparent;
  color: var(--hm-primary);
  border-radius: var(--hm-radius-control);
  padding: 7px 13px;
  font-weight: 600;
  font-size: var(--hm-fs-meta);
  cursor: pointer;
}
/* Per-line "Adopt" button in the suggested-content diff (P3) */
.diff-row.diff-add { display: flex; align-items: center; gap: 10px; }
/* Inline "edit before adding" panel opened by Adopt */
.adopt-edit {
  border: 1px solid var(--hm-line);
  border-left: 3px solid var(--hm-primary);
  border-radius: var(--hm-radius-control);
  padding: 12px 14px;
  margin: 6px 0 10px;
  background: var(--hm-surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.adopt-edit-input {
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  padding: 9px 11px;
  font: inherit;
  color: var(--hm-ink);
  background: var(--hm-surface);
  resize: vertical;
}

.fix small {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 24px;
  padding: 0 8px;
  border-radius: var(--hm-radius-pill);
  color: var(--hm-primary);
  background: var(--hm-mint);
  font-size: var(--hm-fs-label);
  font-weight: 600;
}

.diff-viewer {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-surface-glass);
}

.diff-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 28px;
  border-radius: var(--hm-radius-control);
  padding: 5px 8px;
}

.diff-row span {
  margin: 0;
  font-size: var(--hm-fs-meta);
  line-height: 1.45; /* the marker shares the line's metrics, so its glyph is on the text's centre line */
  font-weight: 600;
}

.diff-remove {
  background: var(--hm-danger-soft);
}

.diff-remove span {
  color: var(--hm-danger);
}

/* Actions Group in section heading */
.actions-group {
  display: flex;
  gap: 10px;
}

#toggle-json,
#copy-json {
  min-height: var(--hm-control-height);
  padding: 0 16px;
  font-size: var(--hm-fs-label);
  border-radius: var(--hm-radius-control);
  font-weight: 600;
}

#toggle-json {
  background: var(--hm-surface);
  color: var(--hm-ink);
  border: 1px solid var(--hm-line);
  box-shadow: 0 2px 4px var(--hm-shadow-color-faint);
}

#toggle-json:hover {
  background: var(--hm-neutral);
  border-color: var(--hm-line-strong);
}

#copy-json {
  background: var(--hm-primary);
  color: var(--hm-on-dark);
  box-shadow: 0 2px 8px var(--hm-focus-ring);
}

#copy-json.copied {
  background: var(--hm-primary);
  box-shadow: 0 0 12px var(--hm-primary);
}

/* Terminal style preview window - remains Dark for high code legibility */
.terminal-window {
  border: 1px solid var(--hm-ink);
  border-radius: var(--hm-radius-card);
  background: var(--hm-ink);
  box-shadow: 0 12px 40px var(--hm-shadow-color-strong);
  overflow: hidden;
  margin-top: 16px;
}

.terminal-header {
  background: var(--hm-ink);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--hm-ink);
}

.terminal-header .dot {
  width: 10px;
  height: 10px;
  border-radius: var(--hm-radius-pill);
  margin-right: 8px;
  display: inline-block;
}

.terminal-header .dot.red { background: var(--hm-danger-line); }
.terminal-header .dot.yellow { background: var(--hm-pending); }
.terminal-header .dot.green { background: var(--hm-success); }

.terminal-title {
  margin-left: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--hm-fs-label);
  color: var(--hm-muted);
}

.json-view {
  margin: 0;
  max-height: 400px;
  overflow: auto;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--hm-on-dark);
  padding: 20px 24px;
  font: var(--hm-fs-meta)/1.6 var(--hm-font-mono);
  scrollbar-width: thin;
  scrollbar-color: var(--hm-line) transparent;
}

.json-view::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.json-view::-webkit-scrollbar-thumb {
  background: var(--hm-neutral);
  border-radius: var(--hm-radius-control);
}

.json-view::-webkit-scrollbar-thumb:hover {
  background: var(--hm-line);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-panel {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* one column that may shrink: a long child (the referral link row) never widens the panel past its card */
  gap: 16px;
  align-content: start;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  background: var(--hm-surface);
  padding: 20px;
}

.settings-panel.wide-panel {
  grid-column: 1 / -1;
}

.help-workspace {
  gap: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
}

.workspace.help-workspace:hover {
  border-color: transparent;
}







.help-layout {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.help-toc {
  position: sticky;
  top: 94px;
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 30px 0;
}

.help-toc > strong {
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.help-toc nav {
  display: grid;
  gap: 2px;
}

.help-toc a {
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  border-left: 2px solid transparent;
  padding: 6px 12px;
  color: var(--hm-ink);
  font-size: var(--hm-fs-label);
  font-weight: 600;
  text-decoration: none;
}

.help-toc a:hover,
.help-toc a:focus-visible {
  border-left-color: var(--hm-primary);
  color: var(--hm-primary);
  background: var(--hm-mint);
}

.help-section {
  min-width: 0;
  display: grid;
  gap: 22px;
  scroll-margin-top: 104px;
  padding: 38px 0 44px;
  border-bottom: 1px solid var(--hm-line);
}

.help-section-heading h2 {
  margin: 7px 0 8px;
  color: var(--hm-ink);
  font-size: var(--hm-fs-section);
  line-height: 1.22;
}

.workflow-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  overflow: hidden;
  list-style: none;
  counter-reset: workflow;
  background: var(--hm-line);
}

.workflow-list li {
  counter-increment: workflow;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 4px;
  align-content: start;
  min-height: 118px;
  padding: 16px;
  background: var(--hm-surface);
}

.workflow-list strong,
.workflow-list span {
  grid-column: 2;
}

.workflow-list strong,
.message-list dt {
  color: var(--hm-ink);
  font-weight: 600;
}

.workflow-list span,
.message-list dd {
  margin: 4px 0 0;
  color: var(--hm-ink);
  font-size: var(--hm-fs-meta);
  line-height: 1.55;
}

.help-path-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.help-path-grid strong {
  color: var(--hm-ink);
  font-size: var(--hm-fs-meta);
}

.help-feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--hm-line);
  border-left: 1px solid var(--hm-line);
}

.help-feature-list.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.help-feature-list > div {
  min-width: 0;
  min-height: 128px;
  border-right: 1px solid var(--hm-line);
  border-bottom: 1px solid var(--hm-line);
  padding: 17px 18px;
}

.help-note,
.help-warning,
.help-footer-note {
  border-left: 3px solid var(--hm-primary);
  background: var(--hm-mint);
  padding: 14px 16px;
  color: var(--hm-ink);
  font-size: var(--hm-fs-meta);
  line-height: 1.55;
}

.help-warning {
  border-left-color: var(--hm-pending);
  background: var(--hm-sand);
}

.help-metric-grid,
.help-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--hm-line);
  background: var(--hm-line);
}

.help-mock-shell {
  min-height: 292px;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  padding: 18px;
  background: var(--hm-ink);
}

.help-mock-sidebar {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 18px 14px;
  color: var(--hm-on-dark-muted);
}

.help-mock-sidebar b {
  margin-bottom: 20px;
  color: var(--hm-on-dark);
  font-size: var(--hm-fs-body);
}

.help-mock-sidebar span {
  border-radius: var(--hm-radius-control);
  padding: 8px 10px;
  font-size: var(--hm-fs-label);
}

.help-mock-sidebar span.active {
  background: var(--hm-primary);
  color: var(--hm-on-dark);
}

.help-mock-main {
  min-width: 0;
  border-radius: var(--hm-radius-control);
  overflow: hidden;
  background: var(--hm-neutral);
  padding: 0 16px 16px;
}

.help-mock-top {
  min-height: 46px;
  display: grid;
  grid-template-columns: 1fr minmax(120px, 240px) 32px;
  align-items: center;
  gap: 12px;
  margin: 0 -16px 16px;
  background: var(--hm-surface);
  padding: 0 16px;
  color: var(--hm-ink);
  font-size: var(--hm-fs-label);
}

.help-mock-top > span {
  border-radius: var(--hm-radius-control);
  background: var(--hm-neutral);
  padding: 7px 10px;
  color: var(--hm-muted);
}

.help-mock-top i {
  width: 30px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: var(--hm-radius-pill);
  background: var(--hm-primary);
  color: var(--hm-on-dark);
  font-size: var(--hm-fs-label);
  font-style: normal;
}

.help-mock-nav {
  display: grid;
  gap: 8px;
  margin: 0 -16px 14px;
  background: var(--hm-surface);
  padding: 10px 16px;
  color: var(--hm-ink);
  font-size: var(--hm-fs-label);
}

.help-mock-nav-row > span,
.help-mock-nav-group > span {
  border-radius: var(--hm-radius-control);
  padding: 6px 10px;
  color: var(--hm-muted);
}

.help-mock-nav-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Fable step 12 §4-2: a section a link lands on (the 2.3.3 line's #commercial-terms, a Help page's own anchor) sits
   below the fixed top bar, not under it — the same offsets as .help-section. */
.pil-editor-section[id],
.help-page-title[id] {
  scroll-margin-top: 104px;
}

/* UX-E completion S10 (UX-68): each page in Help opens with one sentence on what it does for you. */
.help-page-title {
  margin: var(--hm-space-5) 0 var(--hm-space-2);
  color: var(--hm-ink);
  font-size: var(--hm-fs-body);
  text-wrap: balance;
}

.help-purpose strong {
  color: var(--hm-primary);
}

.help-mock-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.help-mock-kpis span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--hm-line);
  background: var(--hm-surface);
  padding: 12px;
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
}

.help-mock-kpis b {
  color: var(--hm-ink);
  font-size: var(--hm-fs-body);
}

.help-mock-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px auto;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  border: 1px solid var(--hm-line);
  background: var(--hm-surface);
  padding: 14px;
  color: var(--hm-ink);
  font-size: var(--hm-fs-label);
}

.help-mock-product > div:first-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.help-mock-product small {
  color: var(--hm-muted);
}

.help-mock-product > em {
  border-radius: var(--hm-radius-pill);
  background: var(--hm-mint);
  padding: 7px;
  color: var(--hm-primary);
  font-style: normal;
  font-weight: 600;
  text-align: center;
}

.help-mock-actions {
  display: flex;
  gap: 5px;
}

.help-mock-window,
.help-mock-evidence,
.help-mock-aio,
.help-mock-simulator,
.help-mock-team {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 20px;
}

.help-mock-titlebar,
.help-simulator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--hm-ink);
  font-size: var(--hm-fs-label);
}

.help-mock-batch-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--hm-ink);
  font-size: var(--hm-fs-label);
}

.help-mock-batch-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) 1fr auto;
  gap: 12px;
  align-items: center;
  border-left: 3px solid var(--hm-primary);
  background: var(--hm-surface);
  padding: 10px 12px;
  color: var(--hm-ink);
  font-size: var(--hm-fs-label);
}

.help-mock-report {
  min-width: 0;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 24px;
}

.help-score-ring {
  width: 76px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  border: 10px solid var(--hm-primary);
  border-left-color: var(--hm-primary-line);
  border-radius: var(--hm-radius-pill);
  text-align: center;
}

.help-report-copy {
  display: grid;
  gap: 4px;
}

.help-report-copy small {
  color: var(--hm-primary);
  font-size: var(--hm-fs-label); /* coverage redo 09-19: it fell back to the browser's 0.8em (12.5px), off the type scale */
  font-weight: 600;
  letter-spacing: 0.08em;
}

.help-report-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* the six parts are 3 + 3, as the report draws them (it was 5 + 1) */
  gap: 7px;
}

@media (max-width: 420px) { .help-report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } } /* "Explainability" is 83px: three to a row left 79px at 320 (ui-test 10-26) */

.help-report-metrics span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--hm-line);
  background: var(--hm-surface);
  padding: 9px;
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
}

.help-report-metrics b {
  color: var(--hm-primary);
  font-size: var(--hm-fs-meta);
}

.help-report-fix {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-left: 3px solid var(--hm-primary);
  background: var(--hm-surface);
  padding: 11px;
}

.help-report-fix > i {
  width: 24px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: var(--hm-radius-pill);
  background: var(--hm-primary);
  color: var(--hm-on-dark);
  font-size: var(--hm-fs-label);
  font-style: normal;
}

.help-evidence-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
}

.help-evidence-form span,
.help-evidence-row {
  border: 1px solid var(--hm-line);
  background: var(--hm-surface);
  padding: 10px;
  color: var(--hm-ink);
  font-size: var(--hm-fs-label);
}

.help-evidence-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

.help-evidence-row i,
.help-simulator-head i,
.help-mock-aio .published {
  border-radius: var(--hm-radius-pill);
  background: var(--hm-mint);
  padding: 5px 8px;
  color: var(--hm-primary);
  font-size: var(--hm-fs-label);
  font-style: normal;
  font-weight: 600;
}

.help-fact-summary,
.help-simulator-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.help-mock-aio .published {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.help-aio-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.help-simulator-head i {
  flex: 0 0 auto;
}

.help-simulator-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.help-split-figure {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.help-split-figure figcaption {
  grid-column: 1 / -1;
}

.help-mock-agent,
.help-mock-citations {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
}

.help-mock-agent {
  border-right: 1px solid var(--hm-line);
}

.help-mock-agent i,
.help-mock-agent em {
  font-style: normal;
}

.help-mock-agent em {
  color: var(--hm-primary);
  font-weight: 600;
}

.help-scenario-list {
  display: grid;
  border-top: 1px solid var(--hm-line);
}

.help-scenario-list summary {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  cursor: pointer;
  padding: 15px 8px;
  color: var(--hm-ink);
  list-style: none;
}

.help-scenario-list details > div {
  padding: 0 56px 18px;
}

.help-status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.help-recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--hm-line);
  border-left: 1px solid var(--hm-line);
}

.help-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-surface);
}

.help-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

.help-table th,
.help-table td {
  padding: 14px;
  border-bottom: 1px solid var(--hm-line);
  text-align: left;
  vertical-align: top;
}

.help-table th {
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  background: var(--hm-surface-glass);
}

.help-table td {
  color: var(--hm-ink);
  font-size: var(--hm-fs-meta);
  line-height: 1.5;
}

.message-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.message-list div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-surface-glass);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.identity-card strong {
  color: var(--hm-ink);
  overflow-wrap: anywhere;
}

.settings-form,
.invite-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 240px) auto;
  gap: 12px;
  align-items: end;
}
.invite-form button:not(.hm-info-btn) { min-height: 44px; white-space: nowrap; }
@media (max-width: 640px) {
  .invite-form { grid-template-columns: 1fr; }
}

.role-item,
.invitation-item,
.member-item,
.audit-item,
.empty-inline {
  min-width: 0;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  padding: 14px;
  background: var(--hm-surface-glass);
}

.role-item {
  display: grid;
  gap: 4px;
}

.role-item strong,
.invitation-item strong,
.member-item strong,
.audit-item strong {
  color: var(--hm-ink);
}

.role-item span,
.invitation-item span,
.invitation-item time,
.member-item span,
.audit-item span,
.audit-item time,
.empty-inline {
  color: var(--hm-muted);
  font-size: var(--hm-fs-label);
}

.role-item p {
  margin: 4px 0 0;
  color: var(--hm-ink);
  line-height: 1.5;
}

.invitation-item,
.member-item,
.audit-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.invitation-item div,
.member-identity,
.audit-item div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.invitation-item strong,
.invitation-item span,
.member-item strong,
.member-item span,
.audit-item strong,
.audit-item span {
  overflow-wrap: anywhere;
}

.item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

/* 2.8.1.4H: one specification's editor (the claim dialog's and the Information row's): the fields stack with a gap, the Value is a textarea that grows with its text, and the buttons sit below the last field. */
.spec-edit { display: grid; gap: var(--hm-space-3); }
.spec-edit-fields { display: grid; gap: var(--hm-space-3); }
.spec-edit-field { display: grid; gap: var(--hm-space-1); min-width: 0; }
.spec-edit-field[hidden] { display: none; }
.spec-edit-field input, .spec-edit-field textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-weight: 400; min-height: var(--hm-control-height); padding: 8px 10px; min-width: 0;
  color: var(--hm-ink); background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control);
}
.spec-edit-field textarea { resize: none; overflow: hidden; overflow-wrap: anywhere; field-sizing: content; }
.spec-edit-field input:focus-visible, .spec-edit-field textarea:focus-visible { outline: none; border-color: var(--hm-primary); box-shadow: 0 0 0 3px var(--hm-focus-ring); }
.spec-edit > .item-actions { justify-content: flex-start; }

/* Member row controls: a right-aligned column of tidy tiers instead of one
   cramped wrapping strip. */
.member-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}
.member-role-group,
.member-danger-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.member-danger-group {
  gap: 6px 14px;
}
.member-owner-badge {
  font-size: var(--hm-fs-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--hm-primary);
  background: var(--hm-mint);
  padding: 3px 10px;
  border-radius: var(--hm-radius-pill);
}
.member-controls select {
  min-height: var(--hm-control-height);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  padding: 0 10px;
  color: var(--hm-ink);
  background: var(--hm-surface);
  font: inherit;
  font-size: var(--hm-fs-label);
  font-weight: 600;
  max-width: 190px;
}
@media (max-width: 720px) {
  .member-item { flex-direction: column; align-items: stretch; }
  .member-controls { align-items: stretch; }
  .member-role-group, .member-danger-group { justify-content: flex-start; }
}

/* Products table column priority at desktop widths:
   ~1280–1440 content (~1000px with sidebar): keep Product + Score + Status + Updated;
   drop Category (and Creator when shown) first. Hide Updated only below ~1200. */
@media (max-width: 1440px) {
  .products-table {
    min-width: 600px;
  }

  .products-table th,
  .products-table td {
    padding: 12px 12px;
  }

  .products-table .col-category,
  .products-table td[data-label="Category"],
  .products-table .col-creator,
  .products-table td.creator-cell {
    display: none;
  }

  .products-table th:first-child,
  .products-table td:first-child {
    max-width: 320px;
  }

  .products-table .product-detail-row > td:first-child {
    max-width: none;
    position: static;
    left: auto;
    box-shadow: none;
    overflow: visible;
    padding: 0;
  }
}

/* Hide Updated below the ~1280 desktop band so 1280–1440 still shows it
   once Category/Creator are already dropped. */
@media (max-width: 1200px) {
  .products-table {
    min-width: 560px;
  }

  .products-table .col-updated,
  .products-table td[data-label="Updated"] {
    display: none;
  }
}

@media (max-width: 1100px) {
  .auth-view {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-items: start;
  }

  .auth-brand-panel {
    min-height: auto;
    padding: 104px 40px 42px;
  }

  /* Stacked: the sign-in column dissolves (the card follows the brand band) and the logo sits in the band's
     corner, on the band's own top padding — the card is below the band, so the two never meet. */
  .auth-side {
    display: contents;
  }

  .auth-logo-corner {
    position: absolute;
    top: 30px;
    right: 32px;
    z-index: 2;
    margin-right: 0;
  }

  /* Stacked: the corner logo now sits on the dark brand band — dark-background variant,
     per the brand document ("mord" #e2e8f0); the suffix turns cyan so it stays legible. */
  .auth-logo-corner .hasmord-logo .mord { color: var(--hm-brand-mord-on-dark); }
  .auth-logo-corner .auth-logo-suffix { color: var(--hm-brand-cyan); }

  .auth-card {
    align-self: start;
    margin: 28px auto 44px;
  }



  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  /* Products table: further tighten below tablet-ish widths. */
  .products-table {
    min-width: 520px;
  }

  .evidence-product-overview {
    align-items: stretch;
    flex-direction: column;
  }

  .evidence-overview-metrics {
    width: 100%;
  }

  .pil-editor-grid,
  .pil-editor-grid.compact,
  .pil-editor-grid.text {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-toc {
    position: static;
    padding: 24px 0 0;
  }

  .help-toc nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .help-toc a {
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .help-toc a:hover,
  .help-toc a:focus-visible {
    border-left-color: transparent;
    border-bottom-color: var(--hm-primary);
  }

  .workflow-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .help-path-grid,
  .help-feature-list,
  .help-metric-grid,
  .help-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  /* Clip content panes only — not the sticky brand row (avatar/hamburger). */
  main,
  .view,
  .workspace {
    overflow-x: clip;
    max-width: 100%;
  }

  .app-shell,
  .sidebar,
  main,
  .view,
  .workspace,
  .overview-root,
  #overview-root,
  .overview-panels,
  .overview-grid,
  .overview-panel,
  .viz-card,
  .viz-card-head,
  .card,
  .panel,
  .workspace > *,
  .table-wrap,
  .help-table,
  .products-table {
    max-width: 100%;
    min-width: 0;
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    height: 100dvh;
    overflow-x: visible; /* brand actions must stay on-screen; clip lives on main/.view */
  }

  .overview-grid,
  .overview-panels,
  .overview-kpis {
    grid-template-columns: minmax(0, 1fr);
  }

  .viz-card {
    padding: 16px 14px;
  }

  .viz-mini-grid {
    flex-wrap: wrap;
  }

  .viz-mini {
    min-width: 0;
    flex: 1 1 90px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
    min-width: 0;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--hm-surface);
    height: auto;
    max-height: none;
  }

  main {
    min-height: 0;
    height: auto;
  }

  .view {
    padding: 24px 20px;
  }

  .brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 52px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--hm-surface);
    overflow: hidden; /* clip logo, NEVER clip actions (actions are flex-shrink: 0) */
  }

  .sidebar .brand-link {
    flex: 1 1 auto;
    min-width: 0; /* allow shrink below content size */
    overflow: hidden;
    padding-right: 4px;
  }

  .brand-logo {
    font-size: var(--hm-fs-section); /* smaller so actions fit at 390px */
  }

  .brand-suffix {
    font-size: var(--hm-fs-label);
  }

  .brand-actions {
    display: flex;
    flex: 0 0 auto; /* never shrink */
    flex-shrink: 0;
    gap: 8px;
    margin-left: 8px;
    align-items: center;
  }

  /* In-flow header controls (not fixed) so avatar + hamburger stay fully on-screen. */
  .mobile-menu-toggle {
    position: relative;
    top: auto;
    right: auto;
    z-index: 5;
    display: inline-flex !important;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin-left: 0;
    background: var(--hm-ink);
    border: 1px solid var(--hm-surface);
    color: var(--hm-on-dark);
    box-shadow: 0 4px 16px var(--hm-shadow-color-strong);
  }
  /* test (cold walk #4): under the shell the legacy button is hidden — [hidden] must win over the line above. */
  .mobile-menu-toggle[hidden] { display: none !important; }

  /* Mobile account lives in .brand-actions; hide the desktop topbar control. */
  .topbar #account-menu-button {
    display: none !important;
  }

  #account-menu-button-mobile:not([hidden]) {
    position: relative; /* never fixed */
    display: grid;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin: 0;
    border: 1px solid var(--hm-surface);
    background: var(--hm-ink);
    box-shadow: 0 4px 16px var(--hm-shadow-color-strong);
  }

  #account-menu-button-mobile:hover,
  #account-menu-button-mobile[aria-expanded="true"] {
    border-color: var(--hm-surface);
    box-shadow: 0 0 0 3px var(--hm-surface-glass), 0 4px 16px var(--hm-shadow-color-strong);
  }

  #account-menu-button-mobile .avatar {
    width: 36px;
  }

  .topbar .workspace-tab {
    flex: 1 1 auto;
    max-width: 100%;
  }

  .viz-card-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  /* Panel is #app-shell child — z-index competes with sidebar (100), not trapped in main. */
  .account-panel {
    position: fixed;
    top: calc(8px + 52px + env(safe-area-inset-top, 0px)); /* below brand row */
    right: 12px;
    left: auto;
    width: min(360px, calc(100vw - 24px));
    z-index: 600; /* above sidebar 100 and drawer backdrop */
    max-height: calc(100dvh - 72px - env(safe-area-inset-top, 0px));
  }

  /* No-JS fallback: usable horizontal scroll nav under the brand bar. */
  .sidebar nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 0;
    width: 100%;
    padding: 8px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar nav a {
    flex: 0 0 auto;
    min-width: 118px;
    min-height: 44px;
    text-align: left;
    justify-content: flex-start;
    flex-direction: row;
    gap: 10px;
    padding: 10px 12px;
    font-size: var(--hm-fs-meta);
  }

  .sidebar a svg {
    width: 18px;
    height: 18px;
  }

  .sidebar a span {
    line-height: 1.2;
  }

  .global-search {
    margin-top: 0;
    padding: 10px 14px 12px;
    border-top: none;
    order: 3;
  }

  .global-search input {
    min-height: 44px;
    height: 44px;
    font-size: var(--hm-fs-meta);
  }

  .primary-link {
    min-height: 44px;
  }

  /* Progressive enhancement: JS adds html.has-nav-drawer → off-canvas drawer. */
  /* Raise sidebar stacking when drawer is open so fixed nav escapes z-index:100 trap vs backdrop. */
  html.has-nav-drawer body.nav-open .sidebar,
  html.has-nav-drawer .sidebar.is-open {
    z-index: 500;
  }

  html.has-nav-drawer .sidebar nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 500;
    width: min(300px, 88vw);
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 20px 12px 28px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--hm-ink);
    border-right: 1px solid var(--hm-primary);
    box-shadow: 8px 0 28px var(--hm-shadow-color-strong);
    transform: translateX(-105%);
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
  }

  html.has-nav-drawer .sidebar nav a {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    touch-action: manipulation;
  }

  html.has-nav-drawer body.nav-open .sidebar nav,
  html.has-nav-drawer .sidebar.is-open nav {
    transform: translateX(0);
    pointer-events: auto;
  }

  html.has-nav-drawer body.nav-open .sidebar nav a,
  html.has-nav-drawer .sidebar.is-open nav a {
    pointer-events: auto;
    touch-action: manipulation;
  }

  html.has-nav-drawer .nav-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 490;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--hm-overlay);
    cursor: pointer;
  }

  html.has-nav-drawer body.nav-open .nav-drawer-backdrop {
    display: block;
  }

  html.has-nav-drawer body.nav-open {
    overflow: hidden;
  }

  .submit-grid,
  .score-card,
  .analysis-hero,
  .permission-form,
  .pil-editor-grid,
  .pil-editor-grid.compact,
  .pil-editor-grid.text,
  .batch-form,
  .batch-history-layout {
    grid-template-columns: 1fr;
  }

  .quick-stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .products-table .col-category,
  .products-table td[data-label="Category"],
  .products-table .col-creator,
  .products-table td.creator-cell {
    display: none;
  }

  .products-table,
  .help-table {
    min-width: 0 !important;
  }



  .help-toc nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .help-mock-shell {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .help-mock-sidebar {
    padding: 16px 8px;
  }

  .help-mock-product {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .help-mock-actions {
    grid-column: 1 / -1;
  }

  .help-simulator-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-heading {
    display: grid;
    gap: 12px;
  }

  .batch-rows li {
    grid-template-columns: minmax(0, 1fr);
  }

  .batch-history-list {
    max-height: 320px;
  }
}

@media (max-width: 360px) {
  .brand-suffix {
    display: none;
  }
}

@media (max-width: 620px) {
  .auth-view {
    min-height: 100dvh;
  }

  .auth-card {
    width: calc(100% - 32px);
    margin: 20px auto 32px;
    padding: 22px;
    border-radius: var(--hm-radius-card);
  }

  .auth-brand-panel {
    padding: 92px 24px 30px;
    gap: 14px;
  }

  .auth-brand-panel .eyebrow {
    font-size: var(--hm-fs-body);
    line-height: 1.35;
  }

  .auth-brand-panel h1 {
    font-size: var(--hm-auth-fs-hero);
  }

  .auth-copy {
    font-size: var(--hm-auth-fs-copy);
    line-height: 1.55;
  }

  .auth-logo-corner {
    top: 24px;
    right: 20px;
  }
  .auth-logo-corner img { width: 108px; }
  .auth-logo-suffix { font-size: var(--hm-fs-body); }

  .view {
    padding: 16px;
    gap: 16px;
  }




  .help-layout {
    gap: 0;
  }

  .help-toc {
    overflow-x: auto;
    padding-top: 18px;
  }

  .help-toc > strong {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .help-toc nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: auto;
  }

  .help-toc a {
    width: auto;
    min-height: 38px;
    flex: 0 0 auto;
    padding: 8px 10px;
  }

  .help-section {
    gap: 18px;
    scroll-margin-top: 152px;
    padding: 30px 0 34px;
  }

  .pil-editor-section[id],
  .help-page-title[id] {
    scroll-margin-top: 152px;
  }

  .help-section-heading h2 {
    font-size: var(--hm-fs-section);
  }

  .workflow-list,
  .help-path-grid,
  .help-feature-list,
  .help-feature-list.two-column,
  .help-metric-grid,
  .help-status-grid,
  .help-recovery-grid,
  .help-split-figure {
    grid-template-columns: 1fr;
  }

  .workflow-list li {
    min-height: 0;
  }

  .help-feature-list > div {
    min-height: 0;
  }

  .help-split-figure figcaption {
    grid-column: auto;
  }

  .help-mock-agent {
    border-right: 0;
    border-bottom: 1px solid var(--hm-line);
  }

  .help-mock-shell {
    min-height: 0;
    display: block;
    padding: 10px;
  }

  .help-mock-sidebar {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    padding: 8px;
  }

  .help-mock-sidebar b {
    flex: 0 0 auto;
    margin: 0 8px 0 0;
  }

  .help-mock-sidebar span {
    flex: 0 0 auto;
    padding: 6px 8px;
  }

  .help-mock-main {
    padding: 0 10px 10px;
  }

  .help-mock-top {
    grid-template-columns: minmax(0, 1fr) 30px;
    margin: 0 -10px 10px;
    padding: 0 10px;
  }

  .help-mock-top > span {
    display: none;
  }

  .help-mock-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .help-mock-product {
    grid-template-columns: minmax(0, 1fr) 52px;
  }

  .help-mock-window,
  .help-mock-evidence,
  .help-mock-aio,
  .help-mock-simulator,
  .help-mock-team,
  .help-mock-agent,
  .help-mock-citations,
  .help-mock-report {
    padding: 14px;
  }

  .help-mock-titlebar,
  .help-mock-batch-summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .help-mock-batch-row,
  .help-evidence-form,
  .help-evidence-row,
  .help-report-fix {
    grid-template-columns: 1fr;
  }

  .help-mock-report {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .help-score-ring {
    width: 64px;
    border-width: 8px;
  }

  .help-fact-summary,
  .help-simulator-kpis,
  .help-aio-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .help-report-fix > i {
    display: none;
  }

  .help-report-fix > em {
    width: fit-content;
  }

  .help-evidence-row > i,
  .help-evidence-row > button {
    width: fit-content;
  }

  .help-scenario-list summary {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
    padding: 13px 2px;
  }

  .help-scenario-list details > div {
    padding: 0 8px 17px 42px;
  }

  .topbar,
  .workspace {
    width: 100%;
    max-width: 100%;
  }

  .topbar {
    min-height: auto;
    gap: 10px;
    padding: 10px 12px;
  }

  .workspace-tab {
    max-width: 100%;
    min-height: 44px;
    align-self: stretch;
    margin-top: 0;
    padding: 8px 12px;
  }

  .tab-copy em {
    max-width: 58vw;
  }

  .workspace {
    padding: 16px;
    border-radius: var(--hm-radius-card);
  }

  .evidence-workspace {
    gap: 14px;
  }

  .evidence-product-overview,
  .evidence-workspace .evidence-library,
  .evidence-workspace .fact-check {
    padding: 14px;
  }

  .evidence-overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evidence-overview-metrics div {
    min-width: 0;
  }

  .global-search {
    width: 100%;
  }

  .account-panel {
    position: fixed;
    top: calc(8px + 52px + env(safe-area-inset-top, 0px));
    right: 12px;
    left: auto;
    width: min(360px, calc(100vw - 24px));
    z-index: 600;
    max-height: calc(100dvh - 78px);
    padding: 20px;
  }

  /* Refine no-JS horizontal fallback on narrow phones. */
  .sidebar nav {
    gap: 6px;
    padding: 6px 10px 8px;
  }

  .sidebar nav a {
    flex: 0 0 auto;
    min-width: 112px;
    min-height: 44px;
  }

  html.has-nav-drawer .sidebar nav {
    width: min(300px, 92vw);
    padding: 16px 10px 24px;
  }

  .primary-link {
    min-height: 44px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .fix {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 14px;
  }

  .fix-heading-row {
    display: grid;
    gap: 8px;
    justify-content: stretch;
  }

  .login-panel,
  .submit-panel,
  .list-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .settings-form,
  .invite-form {
    grid-template-columns: 1fr;
  }

  .submit-grid {
    grid-template-columns: 1fr;
  }

  .evidence-form-grid {
    grid-template-columns: 1fr;
  }

  .evidence-item,
  .inline-subsection-heading {
    display: grid;
  }

  .evidence-item-actions {
    justify-content: start;
  }

  .evidence-item .danger-button,
  .evidence-form-heading .text-button {
    justify-self: start;
  }

  .evidence-detail-groups {
    grid-template-columns: 1fr;
  }

  .evidence-form-heading,
  .verified-claim-heading,
  .verified-claim-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .claim-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .claim-item,
  .claim-item-main {
    grid-template-columns: 1fr;
  }

  .claim-item-actions {
    justify-content: space-between;
  }

  .claim-modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .claim-modal-shell {
    max-height: calc(100dvh - 20px);
  }

  .claim-modal-header,
  .claim-modal-body,
  .claim-modal-footer {
    padding: 14px;
  }

  .list-toolbar,
  .batch-history-toolbar,
  .pagination-bar {
    align-items: stretch;
  }

  .list-toolbar {
    gap: 10px;
  }

  .pagination-bar {
    display: grid;
  }

  .pagination-actions {
    justify-content: space-between;
  }

  .batch-import-panel {
    padding: 16px;
  }

  .batch-history-toolbar label,
  .batch-history-toolbar select,
  .batch-history-toolbar span {
    width: 100%;
    max-width: none;
  }

  .batch-history-list {
    max-height: 260px;
  }

  .batch-rows li {
    padding: 10px;
  }

  .table-wrap,
  .help-table-wrap {
    overflow: visible;
  }

  .products-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 12px;
  }

  .products-table,
  .products-table thead,
  .products-table tbody,
  .products-table tr,
  .products-table td {
    display: block;
    width: 100%;
  }

  .products-table thead {
    display: none;
  }

  .products-table tr {
    border: 1px solid var(--hm-line);
    border-radius: var(--hm-radius-card);
    background: var(--hm-surface);
    padding: 12px;
    margin-bottom: var(--hm-space-3); /* the cards do not touch */
  }

  .products-table td {
    min-width: 0 !important;
    padding: 10px 0;
    border-bottom: 1px solid var(--hm-line);
  }

  .products-table td:last-child {
    border-bottom: 0;
  }

  .products-table td:not(.product-cell)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--hm-muted);
    font-size: var(--hm-fs-label);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
  }

  .products-table th:first-child,
  .products-table td:first-child {
    position: static;
    max-width: none;
    box-shadow: none;
    background: transparent;
  }

  .products-table .product-cell {
    padding-top: 0;
  }

  .products-table .col-category,
  .products-table .col-updated,
  .products-table td[data-label="Category"],
  .products-table td[data-label="Updated"] {
    display: block;
  }

  .products-table .product-cell strong .product-name-link { color: inherit; text-decoration: none; }
  .products-table .product-cell strong .product-name-link:hover,
  .products-table .product-cell strong .product-name-link:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
  .products-table .product-cell strong {
    max-width: none;
  }

  .products-table .creator-cell strong {
    max-width: none;
  }

  .products-table .row-actions {
    display: flex;
    flex-wrap: wrap;
    white-space: normal;
    gap: 8px;
    margin-top: 12px;
  }

  .products-table .row-actions .row-btn {
    min-width: 0;
    justify-content: center;
    text-align: center;
  }

  /* Keep the overflow menu inside the viewport on narrow screens. */
  .products-table .row-menu {
    left: auto;
    right: 0;
  }

  .product-detail-row {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .product-detail-row td {
    padding: 0 !important;
    border: 0 !important;
  }

  .product-detail-row td::before {
    content: none !important;
  }

  .inline-detail-panel {
    padding: 16px;
  }

  .inline-detail-header {
    display: grid;
  }

  .timeline-heading-row {
    display: grid;
  }

  .timeline-count {
    justify-self: start;
  }

  .timeline-event {
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
  }

  .timeline-event time {
    grid-column: 1 / -1;
  }

  .timeline-chart {
    min-height: 160px;
  }

  .aio-publish-header,
  .aio-publish-actions {
    display: grid;
  }

  .aio-publish-summary {
    grid-template-columns: 1fr;
  }

  .aio-crawler-header {
    display: grid;
  }

  .aio-crawler-state {
    justify-self: start;
  }

  .aio-crawler-list li {
    grid-template-columns: minmax(100px, 1fr) auto;
    gap: 6px 10px;
  }

  .aio-crawler-list li > span:nth-of-type(n + 2) {
    grid-column: 1 / -1;
  }

  .help-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 12px;
  }

  .help-table,
  .help-table thead,
  .help-table tbody,
  .help-table tr,
  .help-table td {
    display: block;
    width: 100%;
  }

  .help-table thead {
    display: none;
  }

  .help-table tr {
    border: 1px solid var(--hm-line);
    border-radius: var(--hm-radius-card);
    background: var(--hm-surface);
    padding: 12px;
  }

  .help-table td {
    width: 100% !important;
    padding: 10px 0;
    border-bottom: 1px solid var(--hm-line);
  }

  .help-table td:last-child {
    border-bottom: 0;
  }

  .help-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--hm-muted);
    font-size: var(--hm-fs-label);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .help-table td::before { content: attr(data-label); } /* the cell's own column name (2.7.3.9: the roles table's four names were drawn on the measurement table too) */
  .help-table tr + tr { margin-top: var(--hm-space-3); }

  .json-view {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .member-item,
  .invitation-item,
  .audit-item {
    display: grid;
    justify-content: stretch;
  }

  .item-actions,
  .member-controls {
    justify-content: start;
  }

  .oauth-button,
  .ghost-button,
  .submit-panel button,
  .batch-form > button,
  label {
    width: 100%;
    min-width: 0;
  }

  .global-search label:not(.sr-only),
  .global-search button:not(.sr-only) {
    width: auto;
  }

  /* Keep sr-only clipped even if label/button width rules leak. */
  .global-search label.sr-only,
  .global-search button.sr-only,
  .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .global-search input {
    min-width: 0;
  }

  .tenant-chip,
  .tenant-switcher,
  .status-pill {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
  }

  .tenant-switcher select {
    min-width: 0;
    max-width: 100%;
  }

  .actions-group {
    display: grid;
    width: 100%;
  }

  .actions-group button,
  .primary-link {
    width: 100%;
    min-height: 44px;
  }
}

/* ============================================================================
 * Batch 5.5 — Agent Inbox + Competitive Analysis card
 * ============================================================================ */

.changeset-inbox { display: flex; flex-direction: column; gap: 24px; padding: 8px 0; }
.changeset-group h3 { font-size: var(--hm-fs-meta); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.changeset-card { border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); padding: 12px 14px; background: var(--hm-surface); }
.changeset-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.changeset-card .cs-meta { font-size: var(--hm-fs-label); color: var(--hm-muted); white-space: nowrap; }
.changeset-card .cs-actions { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--hm-line); }
/* 320 (site acceptance recheck): a done draft's card wraps instead of pushing the page sideways — its meta line,
   header and actions break onto more lines, and a long word or link breaks. */
@media (max-width: 760px) {
  .changeset-card { min-width: 0; overflow-wrap: anywhere; }
  .changeset-card header { flex-wrap: wrap; }
  .changeset-card .cs-meta { white-space: normal; }
  .changeset-card .cs-actions { flex-wrap: wrap; }
  .changeset-card details, .changeset-card summary { min-width: 0; max-width: 100%; }
}

.badge { font-size: var(--hm-fs-label); padding: 2px 8px; border-radius: var(--hm-radius-pill); font-weight: 400; }
.badge-pending_review { background: var(--hm-sand); color: var(--hm-pending); }
.badge-rolled_back { background: var(--hm-neutral); color: var(--hm-ink); }
.badge-failed { background: var(--hm-danger-soft); color: var(--hm-danger); }
.competitive-card h2 { font-size: var(--hm-fs-meta); margin: 0; }
.inbox-legend .legend-body { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .inbox-legend .legend-body { grid-template-columns: 1fr 1fr; } }
.modal { background: var(--hm-surface); border-radius: var(--hm-radius-card); width: min(880px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 40px var(--hm-shadow-color-strong); overflow: hidden; }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--hm-line); }
.modal header h2 { margin: 0; font-size: var(--hm-fs-body); }
.modal-close { background: none; border: none; font-size: var(--hm-fs-section); cursor: pointer; color: var(--hm-muted); padding: 0 8px; line-height: 1; }
.modal footer { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--hm-line); background: var(--hm-surface); }
.modal footer .primary-cta { background: var(--hm-primary); color: var(--hm-on-dark); padding: 8px 16px; border-radius: var(--hm-radius-control); border: none; font-weight: 400; }
.modal footer .primary-cta:hover { background: var(--hm-primary-hover); }
/* G4-j3b (ui-check on 090adfcd): at phone width a footer's actions wrap — each a full-width row, a 44 px target, the
   primary last — so none runs past the modal's left edge however long its label (the review modal with Explain,
   Reject and Set aside and prepare again from the card). */
@media (max-width: 760px) {
  .modal footer { flex-wrap: wrap; justify-content: stretch; }
  .modal footer > button, .modal footer > .cs-basis-help { flex: 1 1 100%; min-height: 44px; }
  .modal footer > .cs-basis-help { min-height: 0; }
  /* G4-j5b (test2 at 320): a long label wraps inside its row instead of filling it to the border. */
  .modal footer > button { white-space: normal; line-height: 1.3; text-align: center; }
}

/* QN+DX §2.2 / §2.6 · UI-R02/R03 — the draft editor: what it still needs, the change as fields, before and after,
   where it goes. Fields stack on a phone; the before/after columns become rows. */
.review-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; }
.review-modal-actions .draft-readonly { margin: 0; color: var(--hm-muted); font-size: var(--hm-fs-label); }
.draft-notice { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--hm-radius-control); background: var(--hm-neutral); }
.draft-notice-warn { background: var(--hm-sand); color: var(--hm-ink); }
.readiness-missing { margin: 8px 0 0; padding-left: 18px; }
.readiness-missing li { margin: 0 0 4px; }
.readiness-missing q { color: var(--hm-muted); }
.draft-diff-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.facts-form { display: grid; gap: 10px; margin-top: 8px; }
.facts-form h4 { margin: 0; font-size: var(--hm-fs-meta); }
.fact-value-line { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; }
.facts-section .tag { margin-left: 4px; }
@media (max-width: 640px) { .fact-value-line { grid-template-columns: minmax(0, 1fr); } }
/* QN+DX §2.4 — Write with AI inside the editor. */
.draft-ai { margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); display: grid; gap: 8px; min-width: 0; }
/* QN+DX §2.5 — add it to the product page, then read the page again. */
.draft-reread { margin: 0 0 16px; padding: 10px 12px; border: 1px dashed var(--hm-line-strong); border-radius: var(--hm-radius-control); display: grid; gap: 8px; min-width: 0; }
.draft-reread h3 { font-size: var(--hm-fs-meta); margin: 0; }
.draft-reread > .text-button { justify-self: start; }
@media (max-width: 640px) {
  .draft-diff-cols { grid-template-columns: minmax(0, 1fr); }
  .review-modal-actions { justify-content: stretch; flex: 1 1 100%; min-width: 0; }
  .review-modal-actions .text-button { flex: 1 1 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; text-align: center; }
  .draft-ai { padding-inline: 6px; }
  input[data-draft-ai-instructions]::placeholder { font-size: var(--hm-fs-label); }
}
.skeleton-line { height: 14px; background: linear-gradient(90deg, var(--hm-neutral) 0, var(--hm-neutral) 50%, var(--hm-neutral) 100%); background-size: 200% 100%; animation: skeleton-shimmer 1.5s infinite; border-radius: var(--hm-radius-control); margin-bottom: 8px; }
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Batch 8 — Citation Tracker */
.citation-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-tile { background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat-tile .stat-value { font-size: var(--hm-fs-section); font-weight: 600; color: var(--hm-ink); font-variant-numeric: tabular-nums; }
.citation-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 14px; background: var(--hm-neutral); border-radius: var(--hm-radius-control); }
.citation-actions .primary-cta { background: var(--hm-primary); color: var(--hm-on-dark); padding: 8px 16px; border-radius: var(--hm-radius-control); border: none; font-weight: 400; cursor: pointer; }
.citation-list { display: grid; gap: 12px; }

/* Batch 11 — per-provider chips on the Citation Tracker */
.citation-provider-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.citation-provider-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--hm-radius-pill);
  font-size: var(--hm-fs-label); font-weight: 400; font-variant-numeric: tabular-nums;
  background: var(--hm-neutral);
  border: 1px solid var(--hm-line);
  color: var(--hm-ink);
}
.citation-provider-chip.provider-anthropic  { background: var(--hm-sand); border-color: var(--hm-pending); color: var(--hm-pending); }
.citation-provider-chip.provider-gemini     { background: var(--hm-mint); border-color: var(--hm-primary); color: var(--hm-primary); }
.citation-provider-chip.provider-openai     { background: var(--hm-mint); border-color: var(--hm-primary); color: var(--hm-primary); }
.citation-provider-chip.provider-perplexity { background: var(--hm-mint); border-color: var(--hm-primary-line); color: var(--hm-primary); }
.citation-provider-chip.provider-chatgpt    { background: var(--hm-sand); border-color: var(--hm-pending); color: var(--hm-pending); }
.citation-provider-chip.provider-claude     { background: var(--hm-sand); border-color: var(--hm-pending); color: var(--hm-pending); }
.citation-provider-chip.provider-copilot    { background: var(--hm-mint); border-color: var(--hm-primary-line); color: var(--hm-primary); }
.citation-provider-chip.provider-you        { background: var(--hm-mint); border-color: var(--hm-primary); color: var(--hm-primary); }

/* Batch 14.5 — Real AI referrers card (sits above synthetic probe UI). */
.ai-referrers-card {
  background: linear-gradient(135deg, var(--hm-mint) 0%, var(--hm-neutral) 100%);
  border: 1px solid var(--hm-primary-line);
  border-radius: var(--hm-radius-card);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.ai-referrers-card--unavailable { background: var(--hm-neutral); border-color: var(--hm-line); }
.ai-referrers-card--empty       { background: var(--hm-neutral); border-color: var(--hm-line); }
.ai-referrers-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.ai-referrers-title { font-weight: 600; font-size: var(--hm-fs-meta); color: var(--hm-primary); }
.ai-referrers-totals {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 12px;
}
.ai-referrers-landing { margin-top: 10px; }
.ai-referrers-landing ul { margin: 6px 0 0 0; padding-left: 20px; font-size: var(--hm-fs-label); }
.ai-referrers-landing code { background: var(--hm-surface); padding: 1px 6px; border-radius: var(--hm-radius-control); }

/* ---- P1.5 Plan & usage panel ---- */
.plan-panel { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); }
/* ownres-fix2 (assist P2 on 2ef6a9b4): the panel's track never takes a table's min-content width — the invoices scroll
   inside their card at 375 / 320 instead of widening the page. */
#plan-panel-body { min-width: 0; }
.plan-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-bottom: 18px; } /* 300px: a meter's label and its number fit on one line (2.7.3.9: five squeezed into one row) */
/* §14 U4 (Harvey 10-09): the research note (reset date, the way to more) is its own full row under the meters at every
   width — never the grid's next cell beside the research meter. */
.plan-meters > .plan-research-note { grid-column: 1 / -1; margin: 0; }
.plan-feature { font-size: var(--hm-fs-label); font-weight: 600; }
.plan-feature.on { color: var(--hm-primary); }
.plan-feature.off { color: var(--hm-muted); }
@media (max-width: 760px) { .plan-meters { grid-template-columns: 1fr; } }

/* UX-E B2b-1 (UX-56 / UX-57 / UX-58): facts as label/value lines — the plan's billing period, the GA connection. */
.plan-facts,
.ga-facts { display: grid; gap: 6px; margin: 10px 0 16px; }
.ga-facts { margin: 12px 0 0; }
.plan-facts > div,
.ga-facts > div { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); gap: 12px; align-items: baseline; }
.plan-facts dt,
.ga-facts dt { font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-ink); }
.plan-facts dd,
.ga-facts dd { margin: 0; font-size: var(--hm-fs-meta); color: var(--hm-ink); overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .plan-facts > div,
  .ga-facts > div { grid-template-columns: 1fr; gap: 2px; }
}
.plan-actions {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 24px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hm-line);
}
.plan-actions > [hidden] { display: none; }
.bill-invoices-scroll { position: relative; overflow-x: auto; margin-bottom: 8px; } /* relative: the header's sr-only label stays inside the scroll box */
.bill-invoices { width: 100%; border-collapse: collapse; font-size: var(--hm-fs-meta); }
.bill-invoices .tag { margin: 0; }
.bill-invoices .tag.bill-invoice-due { background: var(--hm-sand); color: var(--hm-pending); }

/* ---- P2 billing: upgrade chooser + CTAs ---- */
.plan-upgrade {
  margin: 14px 0 10px;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 16px;
}
.interval-toggle { display: inline-flex; align-items: center; box-sizing: border-box; min-height: var(--hm-control-height); background: var(--hm-neutral); border-radius: var(--hm-radius-pill); padding: 3px; }
.interval-pill {
  border: none; background: transparent; cursor: pointer; min-height: calc(var(--hm-control-height) - 6px); padding: 0 14px; border-radius: var(--hm-radius-pill);
  font-size: var(--hm-fs-body); font-weight: 400; color: var(--hm-muted); /* the choice not made reads as not chosen (it was bold black beside the active one) */
}
.interval-pill.active { background: var(--hm-surface); color: var(--hm-primary); font-weight: 600; box-shadow: 0 1px 3px var(--hm-focus-ring); }
.plan-upgrade { container-type: inline-size; }
@container (max-width: 430px) { /* the toggle ("Monthly | Annual · save 2 months", about 385px) and the plan buttons follow the width of THEIR row, not the viewport's */
  .interval-toggle { display: flex; flex-wrap: wrap; width: 100%; border-radius: var(--hm-radius-control); }
  .interval-pill { flex: 1 1 auto; }
  .plan-upgrade-head { width: 100%; }
  .plan-upgrade-head .interval-toggle { flex: 1 1 0; min-width: 0; width: auto; }
  .plan-upgrade .upgrade-buttons { width: 100%; }
  .plan-upgrade .upgrade-buttons button, .plan-upgrade .upgrade-cta { white-space: normal; max-width: 100%; }
}
.upgrade-buttons { display: inline-flex; flex-wrap: wrap; gap: 10px; }
.plan-upgrade-head { display: flex; align-items: center; gap: var(--hm-space-2); } /* the toggle and the (i) about changing plan share one row, centred, ahead of the buttons */
/* S1g-R (Harvey): a product with no name or no brand says so in red — the error colours already in use. */
.name-missing-flag {
  display: inline-flex; align-items: center; font-size: var(--hm-fs-label); font-weight: 600; white-space: nowrap;
  color: var(--hm-danger); background: var(--hm-danger-soft); border: 1px solid var(--hm-danger-line);
  padding: 2px 7px; border-radius: var(--hm-radius-pill); vertical-align: middle; text-transform: none; letter-spacing: 0;
}
/* S1g-R4: beside "No product name", the page's domain — where the name would be, nothing is made up. */
.product-domain { margin-left: 6px; color: var(--hm-muted); font-size: var(--hm-fs-label); overflow-wrap: anywhere; }
.field-missing-note { display: block; margin-top: 4px; color: var(--hm-danger); font-size: var(--hm-fs-label); font-weight: 400; overflow-wrap: anywhere; }
/* S2c: a product busy with a long action says so on its pages; its write controls wait (disabled, the reason in their
   title) and come back when the action ends. */
.product-busy-note { margin: 8px 0 0; padding: 8px 12px; border-radius: var(--hm-radius-control); background: var(--hm-sand); color: var(--hm-ink); font-size: var(--hm-fs-label); overflow-wrap: anywhere; min-width: 0; }
.product-busy-note[hidden] { display: none; }
/* In the list it overrides `.products-table td span` (one line, muted, cut with …): the whole sentence, in ink. */
.products-table td .product-busy-note { display: inline-block; max-width: 100%; margin-top: 4px; padding: 2px 8px; font-size: var(--hm-fs-label); color: var(--hm-ink); white-space: normal; overflow: visible; text-overflow: clip; }
/* "Category changed since the last check · Check again" (Overview, AEO report, a Products row): a quiet one-line note, never a banner. */
.hm-category-changed { margin: 0 0 var(--hm-space-3); color: var(--hm-ink); font-size: var(--hm-fs-label); }
.products-table td .product-busy-note[hidden] { display: none; }
.ux-workspace > .product-busy-note { position: sticky; top: var(--hm-topbar-height); z-index: 30; box-shadow: 0 1px 0 var(--hm-line); }
.hm-page-header-note { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; margin-top: 6px; min-width: 0; }
.row-btn--locked { background: var(--hm-sand) !important; color: var(--hm-pending) !important; border-color: transparent !important; }
.row-btn--locked:hover { background: var(--hm-sand) !important; }
.text-button.primary-cta { color: var(--hm-primary); font-weight: 600; }

/* ---- Custom dialogs: toast + confirm/prompt (replace native alert/confirm) ---- */
.toast-host {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999;
  display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 40px));
}
.toast {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  background: var(--hm-surface); border: 1px solid var(--hm-line); border-left-width: 4px;
  border-radius: var(--hm-radius-card); box-shadow: 0 14px 40px var(--hm-focus-ring);
  font-size: var(--hm-fs-meta); line-height: 1.45; color: var(--hm-ink);
  opacity: 0; transform: translateY(-12px); transition: opacity .2s ease, transform .2s ease;
}
.toast.toast-in { opacity: 1; transform: translateY(0); }
.toast.toast-leaving { opacity: 0; transform: translateY(-12px); }
.toast-info { border-left-color: var(--hm-primary); }
.toast-success { border-left-color: var(--hm-success); }
.toast-error { border-left-color: var(--hm-danger); }
.toast-msg { flex: 1 1 auto; white-space: pre-line; }
.toast-close {
  flex: 0 0 auto; background: none; border: none; cursor: pointer; font-size: var(--hm-fs-body); line-height: 1;
  color: var(--hm-muted); padding: 0 2px;
}

.confirm-overlay {
  position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
  background: var(--hm-overlay); padding: 20px; opacity: 0; transition: opacity .15s ease; /* 2.8.1.1: the page stays visible behind a question — a normal dimmed backdrop, not a solid fill */
}
.confirm-overlay.confirm-in { opacity: 1; }
.confirm-overlay.confirm-leaving { opacity: 0; }
.confirm-dialog {
  background: var(--hm-surface); border-radius: var(--hm-radius-card); box-shadow: 0 20px 60px var(--hm-focus-ring);
  padding: 26px; max-width: 440px; width: 100%; transform: scale(0.97); transition: transform .15s ease;
}
.confirm-overlay.confirm-in .confirm-dialog { transform: scale(1); }
.confirm-title { margin: 0 0 8px; font-size: var(--hm-fs-body); color: var(--hm-ink); }
.confirm-body { margin: 0 0 20px; font-size: var(--hm-fs-meta); line-height: 1.5; color: var(--hm-ink); white-space: pre-line; }
.confirm-input {
  width: 100%; padding: 10px 12px; margin: -8px 0 20px; border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control); font-size: var(--hm-fs-meta); box-sizing: border-box;
}
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.confirm-actions button {
  padding: 9px 18px; border-radius: var(--hm-radius-control); font-weight: 600; font-size: var(--hm-fs-meta); cursor: pointer; border: 1px solid transparent;
}
.confirm-cancel { background: transparent; border-color: var(--hm-line); color: var(--hm-ink); }
.confirm-cancel:hover { background: var(--hm-neutral); }
.confirm-ok { background: var(--hm-primary); color: var(--hm-on-dark); }
.confirm-ok:hover { background: var(--hm-primary-hover); } /* UX-E B2a: hover follows the green primary */
.confirm-ok.danger { background: var(--hm-danger); }
.confirm-ok.danger:hover { background: var(--hm-danger); }
@media (max-width: 520px) { .toast-host { left: 20px; right: 20px; transform: none; max-width: none; } }
.referral-copy-line { margin-bottom: 14px; }
.referral-stats { margin: var(--hm-space-3) 0 0; }
.share-modal h3 { margin: 0 0 4px; color: var(--hm-ink); font-size: var(--hm-fs-section); }
.share-modal-revoke {
  width: 100%; border: none; background: transparent; color: var(--hm-muted); cursor: pointer;
  font-size: var(--hm-fs-label); padding: 6px; text-decoration: underline;
}
.share-modal-revoke:hover { color: var(--hm-danger); }
.claim-empty { background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: 20px 22px; margin: 4px 0 18px; color: var(--hm-muted); font-size: var(--hm-fs-meta); line-height: 1.6; max-width: 760px; }
.claim-empty p { margin: 0 0 8px; }
.claim-empty .primary-link { margin-top: 12px; display: inline-flex; }
.claim-empty-title { font-weight: 600; color: var(--hm-ink); font-size: var(--hm-fs-body); }
.claim-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.claim-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--hm-neutral); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); }
.claim-btn { flex: none; white-space: nowrap; }
@media (max-width: 640px) { .claim-row { flex-direction: column; align-items: stretch; } .claim-btn { width: 100%; } }

.overview-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 16px;
  margin: 18px 0 22px;
}
.overview-hero-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}
.overview-hero-score strong {
  font-size: var(--hm-fs-kpi);
  font-weight: 600;
  color: var(--hm-ink);
  letter-spacing: -0.02em;
}

.overview-kpis {
  margin: 0;
  align-content: start;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.overview-kpis strong {
  font-size: var(--hm-fs-section);
  font-weight: 600;
}

.overview-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
  align-items: start; /* content-driven height; don't stretch short panels */
}
.overview-panel {
  background: var(--hm-surface);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  padding: 10px 12px;
  min-height: 0;
  height: auto;
  align-self: start;
}
.overview-panel .panel-heading .text-button {
  min-height: var(--hm-control-height);
  padding: 0 8px;
  font-size: var(--hm-fs-label);
  font-weight: 600;
  border-radius: var(--hm-radius-control);
  flex-shrink: 0;
  white-space: nowrap;
}
.dot { width: 10px; height: 10px; border-radius: var(--hm-radius-control); display: inline-block; flex: 0 0 auto; }
@keyframes ov-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

@media (max-width: 1100px) {
  .overview-panels { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .overview-grid { grid-template-columns: 1fr; }
}

/* ---- Simulator saved (persisted) questions ---------------------------- */
.simulator-saved-questions {
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-card);
  background: var(--hm-neutral);
  padding: 12px 14px;
  margin: 10px 0 4px;
}
.pil-editor-tab:hover { color: var(--hm-ink); }
.pil-editor-tab.active {
  color: var(--hm-primary);
  border-bottom-color: var(--hm-primary);
}
.pil-legend-hint {
  display: block; /* a helper line under its heading, never a dash-led tail that wraps to a line of its own */
  margin-top: 2px;
  font-weight: 400;
  font-size: var(--hm-fs-label);
  color: var(--hm-muted);
}
.pil-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 10px;
}
.pil-row {
  display: grid;
  grid-template-columns: 1.3fr 1.6fr auto auto;
  gap: 8px;
  align-items: center;
}
.pil-row[data-pil-row="faq"] { grid-template-columns: 1.3fr 2fr auto; }
@media (max-width: 1100px) { .info-layout .pil-row[data-pil-labelled] { grid-template-columns: minmax(0, 1fr); } .info-layout .pil-row[data-pil-labelled] .pil-row-remove { justify-self: start; } } /* beside the product tree the form column is under ~350px: four columns collapse to 5px each — one field per line */
.pil-row[data-pil-row="line"] { grid-template-columns: 1fr auto; } /* UX-E B1 · UX-25 */
.pil-row input {
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  color: var(--hm-ink);
  background: var(--hm-surface);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
}
.pil-row input:focus {
  outline: none;
  border-color: var(--hm-primary);
  box-shadow: 0 0 0 3px var(--hm-focus-ring);
}
.pil-row-remove {
  appearance: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  line-height: 1;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  background: var(--hm-surface);
  color: var(--hm-muted);
  font-size: var(--hm-fs-body);
}
.pil-row-remove:hover {
  color: var(--hm-danger);
  border-color: var(--hm-danger-line);
}
.pil-add-row { align-self: flex-start; margin-top: 2px; }
@media (max-width: 640px) {
  .pil-row,
  .pil-row[data-pil-row="faq"] { grid-template-columns: 1fr; }
  .pil-row-remove { justify-self: end; }
}

/* ── What the assistants said: the shareable summary on the Citation checks card ──
   GPT-6 stage review · B: this was a dark navy card. When S1 moved it onto the tokens, its rows and its warning band
   became near-white while the text stayed white — white on white, which is what the merchant photographed on 09-19.
   It is a console card now: white surface, ink text, the pills the rest of the console uses. */
.citation-report-card {
  margin: 14px 0; padding: 16px; border-radius: var(--hm-radius-card);
  background: var(--hm-surface); border: 1px solid var(--hm-line); color: var(--hm-ink);
}
.crc-eyebrow { margin: 0; font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--hm-muted); }
.crc-band strong { font-size: var(--hm-fs-section); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--hm-ink); }
.crc-band-ok { background: var(--hm-success-tint); border-color: var(--hm-success-line); }
.crc-band-bad { background: var(--hm-danger-soft); border-color: var(--hm-danger-line); }
.crc-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 12px; border-radius: var(--hm-radius-control); background: var(--hm-neutral); border: 1px solid var(--hm-line); }
.crc-eng { font-weight: 600; font-size: var(--hm-fs-meta); color: var(--hm-ink); flex: 0 0 auto; min-width: 96px; }
.crc-pill-cited { background: var(--hm-mint); color: var(--hm-ink); }
.crc-pill-brand { background: var(--hm-sand); color: var(--hm-ink); }
.crc-pill-none { background: var(--hm-danger-soft); color: var(--hm-ink); }
.crc-share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (max-width: 560px) {
  .crc-row { flex-wrap: wrap; }
  .crc-eng { width: auto; }
  .crc-band strong { font-size: var(--hm-fs-kpi); }
}
.cpg-addbar { display: flex; gap: 8px; align-items: center; }
.cpg-addurl { flex: 1; padding: 9px 11px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); font: inherit; }
.cpg-addurlbtn { background: transparent; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); padding: 9px 14px; font-weight: 600; color: var(--hm-primary); cursor: pointer; white-space: nowrap; }
.cpg-upload { margin-top: var(--hm-space-3); }
/* S11b #7: Save draft is the secondary action — and says when there is nothing to save (disabled). */
.cpg-save { background: transparent; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); padding: 11px 20px; font-weight: 600; color: var(--hm-primary); cursor: pointer; }
.cpg-save:hover:not(:disabled) { border-color: var(--hm-primary-line); }
.cpg-publish { background: var(--hm-primary); color: var(--hm-on-dark); border: 0; border-radius: var(--hm-radius-control); padding: 11px 20px; font-weight: 600; cursor: pointer; }
.cpg-publish:hover { background: var(--hm-primary-hover); } /* UX-E B2a: hover follows the green primary */
.cpg-status { font-size: var(--hm-fs-meta); color: var(--hm-muted); }
.cpg-live-actions { display: flex; gap: 14px; align-items: center; margin-top: 10px; }
.cpg-open { font-weight: 600; color: var(--hm-primary); text-decoration: none; }
.cpg-unpub { margin-left: auto; background: transparent; border: 0; color: var(--hm-danger); font-weight: 600; cursor: pointer; }
.cpg-unpub:hover { text-decoration: underline; }
.amz-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 18px; background: var(--hm-neutral); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); }
.amz-field-label { font-weight: 600; color: var(--hm-ink); }
.amz-count { font-size: var(--hm-fs-label); color: var(--hm-muted); font-variant-numeric: tabular-nums; }
.amz-value { white-space: pre-wrap; word-break: break-word; font-size: var(--hm-fs-body); line-height: 1.5; color: var(--hm-ink); }
.amz-copy { border: 1px solid var(--hm-line); background: var(--hm-surface); color: var(--hm-ink); font-weight: 600; font-size: var(--hm-fs-label); padding: 5px 12px; border-radius: var(--hm-radius-control); cursor: pointer; }
.amz-badge-sandbox { background: var(--hm-sand); color: var(--hm-pending); }
.amz-badge-live { background: var(--hm-success-tint); color: var(--hm-success); }
.amz-push-btn { flex: none; white-space: nowrap; }
.amz-conn { font-size: var(--hm-fs-meta); color: var(--hm-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.amz-conn-off { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-2); color: var(--hm-muted); }
.amz-connect-btn { border: 1px solid var(--hm-primary); background: var(--hm-primary); color: var(--hm-on-dark); font-weight: 600; font-size: var(--hm-fs-label); padding: 5px 12px; border-radius: var(--hm-radius-control); cursor: pointer; } /* UX-E B2a fix: was an undefined --navy, so navy; it sits in Settings › Connections now */
@media (max-width: 640px) { .amz-intro { flex-direction: column; } }
.viz-big { font-size: var(--hm-fs-kpi); font-weight: 600; line-height: 1; color: var(--hm-ink); font-variant-numeric: tabular-nums; }

/* ---- Portfolio AI visibility card (Overview, ai-visibility-trend P1) ---- */
.viz-card { background: var(--hm-ink); color: var(--hm-on-dark); border-radius: var(--hm-radius-card); padding: 22px 24px; margin: 0 0 20px; box-shadow: 0 18px 44px -30px var(--hm-focus-ring); }
.viz-card--empty .eyebrow { color: var(--hm-ink); }
.viz-card .eyebrow { color: var(--hm-on-dark); }
.viz-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.viz-mini-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.viz-mini { background: var(--hm-surface-glass); border-radius: var(--hm-radius-control); padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 90px; }
.viz-alert--warning { background: var(--hm-sand); border-color: var(--hm-pending-line); color: var(--hm-danger); }
.viz-alert--critical { background: var(--hm-neutral); border-color: var(--hm-danger-line); color: var(--hm-danger); }
@media (prefers-color-scheme: dark) {
  .viz-alert--warning { background: var(--hm-pending); border-color: var(--hm-pending); color: var(--hm-on-dark); }
  .viz-alert--critical { background: var(--hm-danger); border-color: var(--hm-danger); color: var(--hm-on-dark); }
}

/* ---- GSC CSV import control (P2) ---- */
.gsc-import { margin: 18px 0 0; padding: var(--hm-space-4); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-neutral); } /* the card holds the one file chooser (its own dashed area is the drop target) */
.gsc-import-body { padding: 14px 16px; }
.gsc-import-body p { margin: 0 0 12px; font-size: var(--hm-fs-meta); line-height: 1.5; color: var(--hm-muted); }
@media (prefers-color-scheme: dark) {
  .gsc-import { background: var(--hm-surface-glass); border-color: var(--hm-primary); }
}

/* ---- API access panel (Settings, Topic 1C) ---- */
.api-cred { margin: 10px 0 14px; }
.api-cred label { display: block; font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-muted); margin-bottom: 4px; }
.api-key-value { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--hm-fs-label); background: var(--hm-neutral); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); padding: 8px 10px; word-break: break-all; }
.api-key-new { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--hm-radius-control); background: var(--hm-mint); border: 1px solid var(--hm-primary-line); }
.api-key-new strong { display: block; margin-bottom: 6px; font-size: var(--hm-fs-meta); color: var(--hm-primary); }
.api-key-new .api-key-value { background: var(--hm-surface); border-color: var(--hm-primary-line); }
.api-key-new .text-button { margin-top: 8px; }
.api-key-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.api-key-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); font-size: var(--hm-fs-meta); }
.api-key-row code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.text-button.danger { color: var(--hm-danger); }
.api-usage { margin-top: 14px; }
.api-usage pre { background: var(--hm-ink); color: var(--hm-on-dark); border-radius: var(--hm-radius-control); padding: 12px 14px; overflow-x: auto; font-size: var(--hm-fs-label); }
.api-usage summary { cursor: pointer; font-weight: 600; font-size: var(--hm-fs-meta); color: var(--hm-ink); }
@media (prefers-color-scheme: dark) {
  .api-key-new { background: var(--hm-primary); border-color: var(--hm-primary); }
  .api-key-new strong { color: var(--hm-primary); }
}
.api-key-reveal { display: flex; gap: 8px; align-items: stretch; }
.api-key-reveal .api-key-value { flex: 1; margin: 0; }
.api-copy-btn { white-space: nowrap; }

/* ---- F4 W5: Settings › Developers › External Agent connections (mock v1.4). Tokens only; every target is 44px. ---- */
.mcp-card { background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: 23px; }
.mcp-eyebrow { margin: 0; font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hm-muted); }
.mcp-card .text-button { min-height: 44px; }
.mcp-card button:not(.text-button):not(.hm-info-btn), .mcp-dialog button:not(.hm-info-btn) { min-height: 44px; } /* the shared (i) keeps its 22px circle */
.mcp-conns { list-style: none; margin: var(--hm-space-3) 0; padding: 0; display: grid; gap: 0; }
.mcp-conn { display: flex; gap: var(--hm-space-4); justify-content: space-between; align-items: flex-start; flex-wrap: wrap; padding: var(--hm-space-4) 0; border-top: 1px solid var(--hm-line); }
.mcp-conn:first-child { border-top: 0; }
.mcp-conn p { margin: 0 0 4px; line-height: 1.5; }
.mcp-conn-main { flex: 1 1 320px; min-width: 0; }
.mcp-conn-actions { display: flex; gap: var(--hm-space-2); flex-wrap: wrap; align-items: center; }
.mcp-conn[data-mcp-conn-status="revoked"] .mcp-conn-main { opacity: 0.75; }
.mcp-status { min-height: 1.5em; margin: var(--hm-space-3) 0 0; font-size: var(--hm-fs-meta); line-height: 1.5; }
.mcp-status:empty { margin: 0; min-height: 0; }
.mcp-status-error { color: var(--hm-danger); }
.mcp-status:focus { outline: none; }
.mcp-overlay { overflow-y: auto; align-items: flex-start; }
.mcp-dialog { max-width: 690px; margin: auto; max-height: calc(100dvh - 40px); overflow-y: auto; }
.mcp-check input[type="checkbox"], .mcp-check input[type="radio"] { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--hm-primary); }
.mcp-picker input[type="search"], .mcp-form input[type="text"], .mcp-form select { min-height: 44px; width: 100%; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); font-size: var(--hm-fs-meta); background: var(--hm-surface); color: var(--hm-ink); }
.mcp-conn-name { font-weight: 600; }
.mcp-guide { margin: 0; }
.mcp-guide h3 { margin: var(--hm-space-4) 0 var(--hm-space-2); }
.mcp-guide h4 { margin: var(--hm-space-3) 0 var(--hm-space-2); font-size: var(--hm-fs-meta); }
@media (max-width: 640px) {
  .mcp-card { padding: 17px; }
  .mcp-overlay { padding: 12px; }
  .mcp-dialog { padding: 18px; max-height: calc(100dvh - 24px); }
  .mcp-conn-actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .mcp-card .button-spinner { animation: none; } }

/* ---- Developers / API module (Topic 1C, dedicated page) ---- */
.api-page { display: flex; flex-direction: column; gap: 26px; max-width: 860px; }
.api-section h2 { margin: 0 0 10px; font-size: var(--hm-fs-section); color: var(--hm-ink); }
.api-section > p { margin: 0 0 10px; line-height: 1.55; }
.api-pre { background: var(--hm-ink); color: var(--hm-on-dark); border-radius: var(--hm-radius-control); padding: 14px 16px; overflow-x: auto; font-size: var(--hm-fs-label); line-height: 1.5; margin: 0 0 8px; }
.api-pre code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.api-endpoints { width: 100%; border-collapse: collapse; font-size: var(--hm-fs-meta); }
.api-endpoints td { padding: 9px 12px; border-bottom: 1px solid var(--hm-line); vertical-align: top; }
.api-endpoints td:first-child { white-space: nowrap; width: 1%; }
.api-endpoints code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--hm-neutral); padding: 2px 6px; border-radius: var(--hm-radius-control); }

/* Mobile: stack the 2-column endpoint reference so the nowrap method+path
   can't squeeze the description into an overflowing sliver. Each row becomes
   endpoint-on-top, description below, full-width. */
@media (max-width: 620px) {
  .api-endpoints,
  .api-endpoints tbody,
  .api-endpoints tr,
  .api-endpoints td {
    display: block;
    width: auto;
    max-width: 100%;
  }
  .api-endpoints tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--hm-line);
  }
  .api-endpoints td {
    border-bottom: 0;
    padding: 2px 0;
    white-space: normal;
  }
  .api-endpoints td:first-child {
    width: auto;
    white-space: normal;
    margin-bottom: 5px;
  }
  .api-endpoints code {
    display: inline-block;
    white-space: normal;
    overflow-wrap: anywhere;
    max-width: 100%;
  }
}

.ga-actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; }

/* ── Recommendation funnel — the B.5 "why not recommended" view (1c) ───────────────── */
.funnel-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.funnel-control { display: grid; gap: 5px; }
.funnel-view { display: grid; gap: 20px; max-width: 960px; }
.funnel-muted { color: var(--hm-muted); }
.funnel-section { background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: 16px 18px; display: grid; gap: 12px; box-shadow: var(--hm-shadow-sm); }
.funnel-section h3 { margin: 0; font-size: var(--hm-fs-meta); color: var(--hm-ink); }
.funnel-table { width: 100%; border-collapse: collapse; font-size: var(--hm-fs-label); }
.empty-inline { color: var(--hm-muted); font-size: var(--hm-fs-meta); padding: 12px 14px; } /* the box has a border: its words sit inside it, not on it */
.obs-chart { width: 100%; height: auto; max-width: 100%; overflow: visible; }

/* ============================================================================
   UX-A merchant shell — scoped to body.ux-shell (flag ON only). Every value is
   copied verbatim from the proposal mockup (planning/ux/ux-shell-tokens.md); do
   not re-tune. Nothing here applies unless installWorkbenchNav adds body.ux-shell,
   so the existing shell (flag OFF) is byte-identical. New selectors are scoped to
   the shell chrome + .ux-workbench so they never bleed into reused legacy views.
   ============================================================================ */
body.ux-shell {
  background: var(--hm-bg);
  color: var(--hm-ink);

}
/* App is a WHITE rounded frame on the beige canvas; content area is white (NOT beige). */
body.ux-shell .app-shell {
  display: flex; flex-direction: column;
  max-width: 1180px; margin: 24px auto;
  background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card);
  box-shadow: 0 20px 50px var(--hm-focus-ring);
  /* The legacy .app-shell is height:100vh + overflow:hidden (an inner element scrolls). The shell is
     document-flow instead: the FRAME grows with content and the WINDOW scrolls, so tall subpages
     (e.g. Evidence's add-evidence form) aren't clipped. overflow-x:clip keeps the rounded corners. */
  height: auto; min-height: auto; overflow: visible; overflow-x: clip;
}
body.ux-shell .sidebar { display: none; }
/* Hide the legacy in-<main> chrome (dark page-heading bar + workspace tab strip); the shell top-bar
   replaces them. Scoped to body.ux-shell so OFF is untouched. */
body.ux-shell main > .topbar,
body.ux-shell main > .workspace-tab-bar { display: none; }
/* Legacy main is height:100vh + overflow:hidden (it trapped scroll in an inner view). In the shell,
   main grows with its content and the window scrolls. */
body.ux-shell main { background: var(--hm-surface); padding: 24px; width: auto; margin: 0; height: auto; overflow: visible; }
/* The app adds body.has-app-shell → height:100vh + overflow:hidden (the legacy console scrolls an inner
   .view, not the window). The shell is document-flow, so the WINDOW must scroll; without this override
   every tall subpage (Evidence, Information, Publishing, History, the Products list) is clipped with no
   scroll. Scoped to body.ux-shell so OFF is byte-identical. */
body.ux-shell.has-app-shell { height: auto; min-height: 100dvh; overflow: visible; }
/* A legacy view mounted under the shell (e.g. /products) flows with the page instead of self-scrolling. */
body.ux-shell .view { flex: none; overflow: visible; }

/* Top bar (.appbar): logo (pushes right) · workspace label · nav. No Help, no avatar. */
.ux-shell .ux-topbar { display: flex; padding: 18px 24px; align-items: center; gap: 18px; border-bottom: 1px solid var(--hm-line); flex-wrap: wrap; }
.ux-shell .ux-logo { margin-right: 14px; display: inline-flex; align-items: center; text-decoration: none; }
.ux-shell .ux-logo img { height: 72px; width: auto; display: block; }
/* A2-2 (M03): shell top-bar global product search — a compact bordered pill (icon + input) between the
   logo and the account trigger; margin-right:auto pushes the account trigger + nav to the far right.
   Scoped to .ux-shell so the OFF sidebar search box is untouched. */
.ux-shell .ux-search { display: flex; align-items: center; gap: 8px; margin: 0; flex: 1 1 240px; min-width: 150px; padding: 7px 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); }
.ux-shell .ux-search:focus-within { border-color: var(--hm-primary); box-shadow: 0 0 0 3px var(--hm-mint); } /* the cyan border itself is the indicator (3:1); the tint alone was 1.5:1 */
.ux-shell .ux-search-icon .ux-icon { width: var(--hm-icon-s); height: var(--hm-icon-s); }
.ux-shell .ux-search input { flex: 1 1 auto; width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: var(--hm-fs-label); color: var(--hm-ink); padding: 0; }
.ux-shell .ux-search input::placeholder { color: var(--hm-muted); }
/* NOTE: two elements carry class .ux-workspace — the compact "<tenant> · <role>" badge in the
   top bar (which should stay on one line) and the full product-workspace <section>. This rule sets
   the badge's small muted type; the nowrap is re-applied to the top-bar badge ONLY, below. Keeping
   nowrap here leaked it onto the whole workspace section, which wrapped nothing and overflowed on
   narrow screens. */
.ux-shell .ux-workspace { font-size: var(--hm-fs-meta); color: var(--hm-muted); }
.ux-shell .ux-topbar .ux-workspace { white-space: nowrap; }
/* A2-1 (M02): the top-bar workspace label is now a <button> that opens the account menu (no avatar,
   per the mockup). Reset the button chrome so it still reads as the muted "<tenant> · <role>" badge,
   with a small caret + a mint focus/open state to signal it is interactive. Scoped to the top-bar
   badge so the product-workspace section (which also carries .ux-workspace) is untouched. */
.ux-shell .ux-topbar button.ux-workspace {
  appearance: none; background: transparent; border: 0; margin: 0; padding: 6px 8px;
  font: inherit; font-size: var(--hm-fs-label); color: var(--hm-muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; border-radius: var(--hm-radius-control); line-height: var(--hm-lh-body);
}
.ux-shell .ux-topbar button.ux-workspace::after {
  content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: 0.65;
}
.ux-shell .ux-topbar button.ux-workspace:hover { color: var(--hm-ink); background: var(--hm-neutral); }
.ux-shell .ux-topbar button.ux-workspace[aria-expanded="true"] { color: var(--hm-primary); background: var(--hm-mint); }
.ux-shell .ux-topbar button.ux-workspace:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
/* The reused #account-panel floats within .app-shell; drop it below the taller shell top-bar (logo is
   72px), and give the injected Help entry the same left-aligned ghost look as Log out. */
.ux-shell .account-panel { top: 96px; }
.ux-shell .account-help-link { text-align: left; text-decoration: none; }
/* NAVIM W1-1g/W1-1h: Settings, the account menu's first item — the menu's own .ghost-button, like Help and Referrals; on a
   Settings page it carries the ink fill (and aria-current) so it reads "you are here". */
.ux-shell .account-settings-link { text-align: left; text-decoration: none; }
.ux-shell .account-settings-link.is-active, .ux-shell .account-settings-link.is-active:hover { background: var(--hm-ink); border-color: var(--hm-ink); color: var(--hm-surface); }
/* UX-D S6 (Fable ruling A): the top-bar nav scrolls on its own rather than being
   clipped away. Measured at 375px before this: .ux-nav was 384px inside a 375px
   viewport and .app-shell's overflow-x: clip made "Settings" unreachable — no
   scrollbar to use, because the overflow had been thrown away. The top bar stays one
   row and the palette is untouched; only the nav gains a scroll container, the same
   treatment tables, charts and code blocks already get. */
.ux-shell .ux-nav {
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}
.ux-shell .ux-nav::-webkit-scrollbar { display: none; }
.ux-shell .ux-nav a { flex: 0 0 auto; }
/* Hint 1: a right-edge fade while there is more nav to reach. Applied to the nav
   itself (not a child) so it stays put while the entries scroll under it, and
   removed at the end so it never implies content that is not there. */
.ux-shell .ux-nav.is-scrollable {
  mask-image: linear-gradient(to right, var(--hm-ink) calc(100% - 28px), var(--hm-ink) 100%);
  -webkit-mask-image: linear-gradient(to right, var(--hm-ink) calc(100% - 28px), var(--hm-ink) 100%);
}
.ux-shell .ux-nav.is-scrollable.is-scroll-end { mask-image: none; -webkit-mask-image: none; }
.ux-shell .ux-nav a { border: 0; background: transparent; color: var(--hm-muted); border-radius: var(--hm-radius-control);  padding: 8px 10px; text-decoration: none;  }
.ux-shell .ux-nav a:hover { color: var(--hm-ink); }
.ux-shell .ux-nav a.ux-nav-active { background: var(--hm-mint); color: var(--hm-primary);  }

/* Workbench body */
.ux-shell .ux-workbench { display: block; }
.ux-shell .ux-draftrow { border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.ux-shell .ux-draftrow-main h3 { margin: 6px 0 2px; font-size: var(--hm-fs-body); color: var(--hm-ink); }
.ux-shell .ux-draftrow-main p { margin: 0; color: var(--hm-muted); font-size: var(--hm-fs-meta); }
/* UX-D S1b: a needs_content draft's Add content / Retry AI, and the in-row slot for its form or result. */
.ux-shell .ux-draftrow-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.ux-shell .ux-draftrow-slot { grid-column: 1 / -1; }
.ux-shell .ux-actgroup { font-size: var(--hm-fs-label); text-transform: uppercase; letter-spacing: 0.04em; color: var(--hm-muted); margin: 22px 0 8px; font-weight: 600; }
/* Coverage redo (09-19): the row wraps — at 375 the import row's tag and "See why" squeezed its text into a column four
   lines tall. The text keeps at least 16rem; what doesn't fit beside it moves under it. */
.ux-shell .ux-actrow { border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); padding: 12px 14px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.ux-shell .ux-actrow-main { min-width: 0; flex: 1 1 16rem; font-size: var(--hm-fs-meta); color: var(--hm-ink); }
.ux-shell a.ux-actrow-link { color: inherit; text-decoration: none; }
.ux-shell a.ux-actrow-link:hover, .ux-shell a.ux-actrow-link:focus-visible { border-color: var(--hm-ink); }
.ux-shell .ux-actrow-cta { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ux-shell .ux-actrow-see { font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-ink); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
/* B2-3: per-source progress block on a partial/failed run. */
.ux-shell .ux-sources { border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: 14px 16px; margin: 0 0 18px; display: grid; gap: 8px; background: var(--hm-surface); }
.ux-shell .ux-sources .btn.ghost { justify-self: start; padding-left: 0; }

/* Tags */
.ux-shell .tag { display: inline-block; font-size: var(--hm-fs-label); font-weight: 600; line-height: 16px; padding: 3px 10px; border-radius: var(--hm-radius-pill); background: var(--hm-mint); color: var(--hm-primary); }
.ux-shell .tag.pending { background: var(--hm-sand); color: var(--hm-pending); }
.ux-shell .tag.neutral { background: var(--hm-neutral); color: var(--hm-muted); }

/* Buttons */
.ux-shell .btn { background: var(--hm-primary); border: 1px solid var(--hm-primary); border-radius: var(--hm-radius-control); color: var(--hm-on-dark);    padding: 9px 14px; cursor: pointer; text-decoration: none; display: inline-block; }
.ux-shell .btn.secondary { background: var(--hm-surface); color: var(--hm-primary); border-color: var(--hm-line-strong); }
.ux-shell .btn.ghost { background: transparent; color: var(--hm-primary); border: 0; padding-left: 0; }
.ux-shell .btn:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 3px; }

/* Work cards */
.ux-shell .workcards { display: grid; gap: 12px; margin-top: 20px; }
.ux-shell .workcard { border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
/* A grid item refuses to shrink below its min-content, and a <select>'s min-content is its LONGEST OPTION — so one
   long product name widened the question card's whole column past the viewport, clipped by the shell, while the
   page itself never scrolled (user's 375px screenshot, 09-20). Let the card's children shrink. */
.ux-shell .workcard > * { min-width: 0; }
.ux-shell .workcard.featured { border-color: var(--hm-primary-line); background: var(--hm-neutral); }
.ux-shell .workcard .tag { margin-bottom: 9px; }
.ux-shell .workcard h4 { font-size: var(--hm-fs-body); font-weight: 600; margin: 0; color: var(--hm-ink); line-height: 1.35; }
.ux-shell .workcard p { margin: 7px 0 0; color: var(--hm-muted); font-size: var(--hm-fs-body); }

/* Derived notes (Step 3): still-analyzing / partial-failure / read-only. Muted, same 16px body. */
.ux-shell .ux-note { margin: 12px 0 0; color: var(--hm-muted); font-size: var(--hm-fs-body); }
/* UX-E W1-b: the aeo-scoring 2.3.1 notice (dismissible) and the report's scoring-change line. */
.ux-shell .ux-notice { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 12px 0; padding: 12px 14px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); }
.ux-shell .ux-notice p { margin: 0; font-size: var(--hm-fs-meta); line-height: 1.5; color: var(--hm-ink); }
.ux-shell .ux-notice .btn { flex-shrink: 0; }
@media (max-width: 640px) { .ux-shell .ux-notice { flex-direction: column; } }
.not-stated-reason { display: block; margin-top: var(--hm-space-1); font-size: var(--hm-fs-meta); color: var(--hm-muted); overflow-wrap: anywhere; } /* S4 · R1-F4; the walk: "Not stated" and its reason were one run-on line */
.not-stated-reason .not-stated-next { display: block; color: var(--hm-ink); }
.ux-shell .ux-ws-body .ux-note { margin: 0 0 14px; }
.ux-shell .ux-intents { margin: 18px 0; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: 16px 18px; }
.ux-shell .ux-intents h3 { margin: 0; font-size: var(--hm-fs-body); color: var(--hm-ink); }
/* Category diagnosis meta (R4): compact key/value table. */
.ux-shell .ux-ws-diagmeta { width: 100%; border-collapse: collapse; font-size: var(--hm-fs-label); margin: 4px 0 14px; }
/* Read-only PIL (R6): the disabled <fieldset> greys its controls natively; strip its default frame. */
.ux-shell .pil-ro-wrap { border: 0; margin: 0; padding: 0; min-width: 0; }

/* ── Product workspace (Step 3) · /products/:jobId, five subpages. Same tokens, no new colours. ── */
.ux-shell .ux-workspace { display: block; }
/* A2-4: product-workspace ⋯ context menu (native <details>) beside the title. */
.ux-shell .ux-ws-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ux-shell .ux-ws-head h1 { margin: 8px 0; }
.ux-shell .ux-ws-menu { position: relative; flex: none; margin-top: 8px; }
.ux-shell .ux-ws-menu > summary { list-style: none; cursor: pointer; width: var(--hm-control-height); height: var(--hm-control-height); border-radius: var(--hm-radius-control); border: 1px solid var(--hm-line); display: inline-flex; align-items: center; justify-content: center; color: var(--hm-muted); font-size: var(--hm-fs-section); line-height: 1; user-select: none; }
.ux-shell .ux-ws-menu > summary::-webkit-details-marker { display: none; }
.ux-shell .ux-ws-menu > summary:hover { color: var(--hm-ink); background: var(--hm-neutral); }
.ux-shell .ux-ws-menu[open] > summary { color: var(--hm-primary); border-color: var(--hm-line-strong); background: var(--hm-mint); }
.ux-shell .ux-ws-menu > summary:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.ux-shell .ux-ws-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); box-shadow: 0 20px 50px var(--hm-focus-ring); padding: 6px; display: grid; gap: 2px; }
.ux-shell .ux-menu-item { display: block; width: 100%; text-align: left; background: transparent; border: 0; font: inherit; font-size: var(--hm-fs-meta); color: var(--hm-ink); padding: 9px 12px; border-radius: var(--hm-radius-control); cursor: pointer; text-decoration: none; font-weight: 400; }
.ux-shell .ux-menu-item:hover { background: var(--hm-neutral); }
.ux-shell .ux-menu-item.danger { color: var(--hm-danger); }
.ux-shell .ux-menu-item.danger:hover { background: var(--hm-danger-soft); }
.ux-shell .ux-subnav { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--hm-line); padding-bottom: 12px; margin-bottom: 20px; }
.ux-shell .ux-subnav a { color: var(--hm-muted); border-radius: var(--hm-radius-control); font-size: var(--hm-fs-label); padding: 8px 10px; text-decoration: none; line-height: 1.5; }
.ux-shell .ux-subnav a:hover { color: var(--hm-ink); }
.ux-shell .ux-subnav a.ux-sub-active { background: var(--hm-mint); color: var(--hm-primary); font-weight: 600; }
.ux-shell .ux-ws-body h2 { font-size: var(--hm-fs-body); font-weight: 600; margin: 14px 0 0; color: var(--hm-ink); line-height: 1.35; }
.ux-shell .ux-ws-body h3 { font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: var(--hm-ls-caps); text-transform: uppercase; color: var(--hm-muted); margin: 22px 0 8px; } /* S4-fix: the section-label role (assist-sonnect) */
.ux-shell .ux-ws-basis { margin: 8px 0 16px; color: var(--hm-muted); font-size: var(--hm-fs-meta); line-height: var(--hm-lh-prose); }
/* "Technical details" expander (M09): the readiness score/breakdown and internal reason codes are
   collapsed here so a merchant sees the plain-language issue first, not the numbers. */
.ux-shell .ux-tech { margin: 14px 0 0; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: 4px 16px; }
.ux-shell .ux-tech > summary { cursor: pointer; font-size: var(--hm-fs-meta); font-weight: 600; color: var(--hm-muted); padding: 12px 0; list-style: none; }
.ux-shell .ux-tech > summary::-webkit-details-marker { display: none; }
.ux-shell .ux-tech[open] > summary { border-bottom: 1px solid var(--hm-line); margin-bottom: 12px; }
.ux-shell .ux-ws-addon { margin-top: 24px; border-top: 1px solid var(--hm-line); padding-top: 4px; }
.ux-shell [data-ws-changes] [data-action="product-changes-earlier"],
.ux-shell [data-ws-changes] [data-action="product-changes-retry"] { min-height: var(--hm-control-height); margin-top: 8px; }
.ux-shell .ux-dest-needs_content, .ux-shell .ux-dest-failed, .ux-shell .ux-dest-persists, .ux-shell .ux-dest-regressed { border-left-color: var(--hm-pending-line); }
.ux-shell .ux-dest-ready, .ux-shell .ux-dest-improved { border-left-color: var(--hm-success-line); }
.ux-shell .ux-dest-verifying, .ux-shell .ux-dest-await_decision, .ux-shell .ux-dest-unclear { border-left-color: var(--hm-line-strong); }
/* UX-C S3 · M21 field-level fill form: a labelled input per TODO placeholder — never raw JSON. */
.ux-shell .ux-fill { border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: 18px; background: var(--hm-surface); margin-top: 14px; }
.ux-shell .ux-fill h4 { margin: 0 0 4px; font-size: var(--hm-fs-body); color: var(--hm-ink); }
.ux-shell .ux-fill-note { margin: 0 0 14px; color: var(--hm-muted); font-size: var(--hm-fs-meta); }
.ux-shell .ux-fill-row { display: block; margin-bottom: 12px; }
.ux-shell .ux-fill-label { display: block; font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-ink); margin-bottom: 5px; }
.ux-shell .ux-fill-row input { width: 100%; box-sizing: border-box; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); padding: 9px 11px; font: inherit; font-size: var(--hm-fs-meta); color: var(--hm-ink); background: var(--hm-surface); }
.ux-shell .ux-fill-row input:focus { outline: 0; border-color: var(--hm-primary-line); box-shadow: 0 0 0 3px var(--hm-mint); }
.ux-shell .ux-fill-actions { margin-top: 6px; }
.ux-shell .ux-fill-result { margin-top: 12px; }
.ux-shell .ux-agent-policy .ctx-confirm-inline { font-size: var(--hm-fs-label); color: var(--hm-muted); display: inline-flex; gap: 5px; align-items: center; }
/* Workbench "One quick question" card (09-20): its .ctx-form sits OUTSIDE .ux-agent-policy, so the rules above
   never applied — the row was display:block and the select sized itself to its longest option. The select takes
   the full row (a long product name shows an ellipsis, the dropdown itself is the place to read it whole) and the
   two buttons + "Not now" sit beside each other, wrapping when the width runs out. */
.ux-shell .ux-question .ctx-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 4px; }
.ux-shell .ux-question .ctx-form select {
  flex: 1 1 100%;
  min-width: 0;
  max-width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control);
  font-size: var(--hm-fs-label);
  background: var(--hm-surface);
  color: var(--hm-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The product name a merchant clicks in the list is the SAME one-line-ellipsis treatment its <strong> wrapper
   declares — as a plain inline it painted its full 1200px+ width (and focus ring) under the clip. */
.ux-shell .products-table .product-cell strong .product-name-link { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* Mobile: the shell goes FULL-BLEED — no centered card frame, so content uses the whole screen width
   instead of a narrow column with wasted margins. Padding is trimmed and cramped legacy rows wrap. */
@media (max-width: 760px) {
  body.ux-shell .app-shell { margin: 0; max-width: none; border: 0; border-radius: 0; box-shadow: none; min-height: 100dvh; }
  body.ux-shell main { padding: 16px 14px; }
  .ux-shell .ux-topbar { padding: 12px 14px; gap: 10px; }
  .ux-shell .ux-logo img { height: 44px; }               /* smaller logo so the workspace + nav have room */
  /* minmax(0, 1fr), not 1fr: a bare 1fr still bottoms out at the content's min-content, which is exactly the
     overflow the wide-screen rule already guards against. The narrow rule missed it (09-20). */
  .ux-shell .workcard { grid-template-columns: minmax(0, 1fr); }
  .ux-shell .workcard .btn { justify-self: start; }
  /* The five subpage tabs wrap onto a second row. They used to scroll sideways, which left History entirely off a
     375px screen with nothing to say it was there (coverage redo 09-19 — UX-08's complaint, one level down). */
  .ux-shell .ux-subnav { gap: 2px 4px; flex-wrap: wrap; overflow-x: visible; }
  .ux-shell .ux-subnav a { white-space: nowrap; flex: 0 0 auto; }
  /* Legacy mounted panels/views: trim their extra gutter under the full-bleed shell, and let the
     product-row action buttons WRAP instead of overlapping + truncating (real reorg is UX-D). */
  .ux-shell main .view { padding-left: 0; padding-right: 0; }
  /* `.products-table td .row-actions` (0,2,1) forces flex-wrap:nowrap even inside the legacy mobile
     rule (a pre-existing legacy cramming bug, OFF too). Under the shell we outrank it (0,3,1) so the
     buttons wrap instead of truncating — scoped to .ux-shell, so OFF stays byte-identical. */
  .ux-shell .products-table td .row-actions { flex-wrap: wrap; white-space: normal; gap: 6px; }
  .ux-shell .products-table td .row-actions .row-btn { flex: 1 1 auto; min-width: 96px; }
  /* Legacy panels mounted in the workspace were laid out for desktop width: long tokens don't break,
     and several heading rows use two-column grids that don't fit a phone. Break long tokens, and stack
     those heading rows so nothing is clipped. (The old horizontal cramming came from a leaked
     white-space:nowrap on .ux-workspace, fixed at the source above — not re-patched here.) */
  .ux-shell .ux-ws-body { overflow-wrap: anywhere; }
  .ux-shell .ux-ws-body .fix-heading-row,
  .ux-shell .ux-ws-body .inline-subsection-heading,
  .ux-shell .ux-ws-body .section-heading,
  .ux-shell .ux-ws-body .aio-publish-header,
  .ux-shell .ux-ws-body .timeline-heading-row,
  .ux-shell .ux-ws-body .dynamic-tab-header { display: block; }
  /* Any wide table (breakdown, timeline) scrolls inside its own box instead of clipping. */
  .ux-shell .ux-ws-body table { display: block; overflow-x: auto; max-width: 100%; }
}

/* UX-D S1a — source-qualified buyer answers, Add-manually field picker, draft save outcomes */
.diff-row.ba-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; } /* the marker shares the first line's baseline, however the row wraps */
/* Harvey 10-05: a row never sets the box's width — the code's 14rem basis made a row's minimum size wider than the
   viewer, and the viewer's auto grid column grew to it (64px past a 320px screen). The column is the viewer's width. */
.diff-viewer { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 760px) {
  /* Phone: no left gutter or rail — the rank sits above the card's text, the viewer has no frame, the row's marker
     column goes (its source line under the value says the same), and the text wraps at the content width. */
  .ux-shell .fix { grid-template-columns: minmax(0, 1fr); }
  .ux-shell .fix-actions { row-gap: var(--hm-space-3); } /* the hint's info target (11px around it) clears the buttons above */
  .ux-shell .fix-diff .diff-viewer { border: 0; padding: 0; background: none; }
  .ux-shell .fix-diff .diff-row { grid-template-columns: minmax(0, 1fr); }
  .ux-shell .fix-diff .diff-row > span { display: none; }
  .ux-shell .fix-diff .diff-row.ba-row code { flex: 1 1 100%; }
}
.diff-add-manual {
  flex: 0 0 auto;
  border: 1px solid var(--hm-line);
  background: var(--hm-surface);
  color: var(--hm-primary);
  border-radius: var(--hm-radius-control);
  padding: 3px 11px;
  font-weight: 600;
  font-size: var(--hm-fs-label);
  cursor: pointer;
}
.s1-field-chip.is-on { border-color: var(--hm-primary); background: var(--hm-mint); color: var(--hm-primary); font-weight: 600; }

/* UX-E B1 · UX-44 — the shared Metric element (components.js MetricCard). Results and Settings › Integrations printed a metric's name,
   figure and denominator as three inline elements with nothing between them ("Picked by the model52.17%24 of 46"). Each
   part now sits on its own row; figures use tabular numerals so columns line up. Scoped by class, not by the shell, so
   Settings (outside .ux-shell) gets the same layout. */
.results-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; margin: 12px 0; }
.results-metric { display: grid; grid-template-rows: auto auto auto; align-content: start; gap: 2px; min-width: 0; padding: 10px 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); }
.results-metric > .results-metric-label { font-size: var(--hm-fs-label); line-height: 1.35; color: var(--hm-muted); overflow-wrap: anywhere; }
.results-metric > .results-metric-value { font-size: var(--hm-fs-kpi); line-height: 1.15; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; letter-spacing: -1px; }
.results-metric > .results-metric-value.results-nodata { font-size: var(--hm-fs-body); font-weight: 600; color: var(--hm-muted); }
.results-metric > .results-metric-detail { font-size: var(--hm-fs-label); line-height: 1.35; color: var(--hm-muted); font-variant-numeric: tabular-nums; }
/* T5d: the ChatGPT source-reporting note, inside its metric under the number and unit */
.results-metric > .attribution-note { margin: 10px 0 0; font-size: var(--hm-fs-label); line-height: 1.55; color: var(--hm-muted); overflow-wrap: anywhere; }
.results-metric > .attribution-note a { display: inline-block; margin-top: 5px; }
@media (max-width: 40.625rem) { .results-metric > .attribution-note a { display: inline-flex; align-items: center; min-height: 44px; } }
.trace-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hm-space-4); margin-top: var(--hm-space-3); }
@media (max-width: 1100px) { .trace-cols { grid-template-columns: 1fr; } }
@media (max-width: 40.625rem) { .trace-actions .btn, .trace-round .btn { flex: 1 1 140px; min-height: var(--hm-touch-target); } }
.trace-more { display: flex; align-items: center; gap: var(--hm-space-3); flex-wrap: wrap; margin: 0 0 var(--hm-space-3); }
.trace-more .results-note { margin: 0; }
@media (max-width: 40.625rem) { .trace-more { flex-direction: column; align-items: flex-start; gap: var(--hm-space-1); } }

/* UX-E B1 · UX-53 — Settings section index. Ten panels ran ~19,000px with no way to jump; one wrapping row of entries
   above the grid, each a real link (/settings/<panel>, Developers → /api). Panels get scroll-margin so a jump doesn't
   tuck the heading under the sticky top bar. */
.settings-nav { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); }
.settings-nav a { min-height: 32px; display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--hm-radius-pill); color: var(--hm-ink); font-size: var(--hm-fs-label); font-weight: 600; text-decoration: none; }
.settings-nav a[hidden] { display: none; }
.settings-nav a:hover,
.settings-nav a:focus-visible { color: var(--hm-primary); background: var(--hm-mint); }
.results-card[id] { scroll-margin-top: 96px; }
.results-card[id]:focus { outline: none; }
.results-card[id]:focus-visible { outline: 2px solid var(--hm-primary); outline-offset: 2px; }

/* UX-E B1 · UX-25 — where a saved Information line came from. The tag sits under the line; "please confirm" is the
   only warning tone, "not recorded" stays neutral (it is an honest unknown, not a fault). */
.pil-lines { display: grid; gap: 4px; margin: 0 0 12px; }
.pil-lines-label { font-weight: 600; font-size: var(--hm-fs-meta); }
.pil-src-page, .pil-src-approved, .pil-src-merchant { color: var(--hm-primary); border-color: var(--hm-primary-line); background: var(--hm-mint); }

/* ============================================================================
   UX-E B2a · shared components and the shell skeleton (GPT-6 §06, B2 surface map §1/§2/§4).
   The components in components.js are styled here once; no page restyles them.
   ============================================================================ */
.hm-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Type (§06): the shell reads at 15/24 in one font stack. */
body.ux-shell { font: var(--hm-fs-body)/var(--hm-lh-body) var(--hm-font-sans); }

/* PageHeader — one visible H1 per page. */
.hm-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--hm-space-4); margin: 0 0 var(--hm-space-5); }
.hm-page-header .hm-eyebrow { margin: 0 0 var(--hm-space-1); font-size: var(--hm-fs-label); line-height: 18px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--hm-muted); }
.hm-page-header h1 { margin: 0; font-family: var(--hm-font-sans); font-size: var(--hm-fs-title); line-height: 36px; font-weight: 600; color: var(--hm-ink); letter-spacing: -0.01em; }
.hm-page-header .hm-purpose { margin: var(--hm-space-1) 0 0; max-width: 68ch; font-size: var(--hm-fs-body); line-height: 24px; color: var(--hm-muted); }
.hm-page-header-action { flex: none; }

/* SectionNav */
.hm-section-nav { display: flex; flex-wrap: wrap; gap: var(--hm-space-2); }
.hm-section-nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--hm-space-3); border-radius: var(--hm-radius-control); color: var(--hm-muted); font-size: var(--hm-fs-meta); line-height: 20px; font-weight: 600; text-decoration: none; }
.hm-section-nav a:hover { color: var(--hm-ink); background: var(--hm-neutral); }
.hm-section-nav a[aria-current="page"] { color: var(--hm-primary); background: var(--hm-mint); }

/* Settings: header across the top, the section nav beside the section on wide screens (surface map §2-2). */
#settings-view .workspace, #observability-view .workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--hm-space-4); }
#settings-view .settings-section, #observability-view .settings-section { min-width: 0; }
@media (min-width: 1100px) {
  #settings-view .workspace { grid-template-columns: 208px minmax(0, 1fr); column-gap: var(--hm-space-6); }
  #settings-view #settings-header { grid-column: 1 / -1; }
  #settings-view #settings-section-nav { grid-column: 1; align-self: start; position: sticky; top: 112px; }
  #settings-view #settings-section-nav .hm-section-nav { flex-direction: column; flex-wrap: nowrap; }
  #settings-view .settings-section { grid-column: 2; }
}

/* StatusBadge tones: danger exists now. */
.ux-shell .tag.danger { background: var(--hm-danger-soft); color: var(--hm-danger); }

/* FormRow / ActionBar */
.hm-form-row { display: grid; gap: var(--hm-space-2); }
.hm-form-label { font-size: var(--hm-fs-label); line-height: 20px; font-weight: 600; color: var(--hm-ink); }
.hm-form-label :is(input, select, textarea) { width: 100%; min-width: 0; box-sizing: border-box; } /* a field fills its label (the input's own 20-character width never pushes the row past its card) */
.hm-form-labelrow { display: flex; align-items: center; gap: var(--hm-info-gap); min-height: 24px; }
 .hm-form-labelrow > label { display: block; min-width: 0; flex: 0 1 auto; width: auto; }
 .hm-form-labelrow > .hm-info { margin-left: 0; } /* the label and its (i): a hint is never a line under the control, so fields in one row line up */
.hm-form-error { margin: 0; font-size: var(--hm-fs-label); line-height: 20px; color: var(--hm-danger); }
.hm-action-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-2); }
.hm-action-status { width: auto; flex: 1 1 200px; font-family: inherit; font-size: var(--hm-fs-label); color: var(--hm-muted); } /* UX-E B2b-1: <output> defaulted to monospace */

/* DataTable */
.hm-table-wrap { overflow-x: auto; min-width: 0; }
.hm-table { width: 100%; border-collapse: collapse; font-size: var(--hm-fs-meta); line-height: 20px; }
.hm-table caption { text-align: left; font-weight: 600; padding-bottom: var(--hm-space-2); }
.hm-table th { text-align: left; font-weight: 600; color: var(--hm-muted); border-bottom: 1px solid var(--hm-line); padding: var(--hm-space-2) var(--hm-space-3); }
.hm-table td { border-bottom: 1px solid var(--hm-line); padding: var(--hm-space-3); vertical-align: top; }
.hm-table .hm-num { text-align: right; font-variant-numeric: tabular-nums; }
.hm-table .hm-row-actions { text-align: right; white-space: nowrap; }
.hm-table-empty { color: var(--hm-muted); }

/* SourceExcerpt / VersionSummary */
.hm-excerpt { margin: 0; padding: var(--hm-space-3) var(--hm-space-4); border-left: 3px solid var(--hm-line); background: var(--hm-bg); border-radius: 0 var(--hm-radius-control) var(--hm-radius-control) 0; }
.hm-excerpt blockquote { margin: 0; font-size: var(--hm-fs-body); line-height: 24px; color: var(--hm-ink); }
.hm-excerpt figcaption { margin-top: var(--hm-space-1); font-size: var(--hm-fs-label); color: var(--hm-muted); }
.hm-version-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--hm-space-3); margin: 0; }
.hm-version-summary dt { font-size: var(--hm-fs-label); color: var(--hm-muted); }
.hm-version-summary dd { margin: 0; font-weight: 600; color: var(--hm-ink); font-variant-numeric: tabular-nums; }

/* The shell's own button (.btn) follows the same button spec as <button>. */
.ux-shell .btn { min-height: var(--hm-control-height); display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; font-size: var(--hm-fs-label); line-height: var(--hm-lh-body); font-weight: 600; background: var(--hm-primary); border-color: var(--hm-primary); }
.ux-shell .btn:hover { background: var(--hm-primary-hover); border-color: var(--hm-primary-hover); }
/* G4-j5b (ui-check on 30c808c0): a running button says so — cursor wait on its busy state, whatever the shell's button rules. */
.ux-shell button[aria-busy="true"], button.is-loading[aria-busy="true"] { cursor: wait; }
.ux-shell .btn.secondary { background: var(--hm-surface); color: var(--hm-primary); border-color: var(--hm-line-strong); }
.ux-shell .btn.secondary:hover { background: var(--hm-mint); }
.ux-shell .btn.ghost { background: transparent; color: var(--hm-primary); border: 0; padding-left: 0; }
.ux-shell .btn:focus-visible,
.ux-shell button.ux-workspace:focus-visible,
.ux-shell .ux-topbar button.ux-workspace:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }

/* Nesting (UX-05): a legacy page inside the shell is page → section, not frame + view + card. */
body.ux-shell .view { padding: 0; }
/* UX-E completion S1 · UX-05 / F7: no page is a card inside the frame — every view's .workspace loses its card layer,
   so every page title starts on the same left edge (Products and Import sat 25px further in). */
body.ux-shell .view > .workspace { border: 0; box-shadow: none; padding: 0; background: transparent; }
/* A control flush with the pane's edge keeps its whole focus ring (3px + 2px offset): at phone widths the pane clips sideways, and its clip is its padding box, so 6px of padding with an equal negative margin gives the ring room and moves nothing (width auto and no max-width: the pane's 100% would shrink it by the 12px). */
@media (max-width: 920px) { body.ux-shell .view > .workspace { padding-inline: 6px; margin-inline: -6px; width: auto; max-width: none; } }
.section-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-2); }

/* The top bar: sticky, Help beside the account, four entries (D4/D5). */
.ux-shell .ux-topbar { position: sticky; top: 0; z-index: 40; background: var(--hm-surface); border-radius: var(--hm-radius-card) var(--hm-radius-card) 0 0; }
.ux-shell .ux-help { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--hm-radius-pill); border: 1px solid var(--hm-line); color: var(--hm-muted); font-weight: 600; text-decoration: none; flex: none; }
.ux-shell .ux-help:hover, .ux-shell .ux-help[aria-current="page"] { color: var(--hm-primary); border-color: var(--hm-primary-line); background: var(--hm-mint); }
.ux-shell .ux-nav a { min-height: var(--hm-control-height); display: inline-flex; align-items: center; padding: 0 12px; font-size: var(--hm-fs-meta); line-height: 20px; }
.ux-shell .ux-nav a.ux-nav-active { font-weight: 600; }

@media (max-width: 760px) {
  body.ux-shell .app-shell { border-radius: 0; }
  .ux-shell .ux-topbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--hm-space-2); padding: var(--hm-space-2) var(--hm-space-3); border-radius: 0; }
  .ux-shell .ux-logo { margin-right: 0; }
  .ux-shell .ux-logo img { height: 32px; }
  /* Search collapses to its icon and opens across the bar when used. */
  .ux-shell .ux-search { justify-self: end; flex: none; min-width: 0; width: var(--hm-touch-target); height: var(--hm-touch-target); padding: 0 0 0 12px; position: relative; }
  .ux-shell .ux-search input { position: absolute; inset: 0; width: 100%; padding-left: 38px; font-size: var(--hm-fs-body); color: transparent; background: transparent; cursor: pointer; }
  .ux-shell .ux-search input::placeholder { color: transparent; }
  /* UX-E completion S1 · D2: every item of the first row has its cell, so the opened search lies over them instead of
     pushing the logo, Help and account onto a new row (the bar grew from 113px to 165px). */
  .ux-shell .ux-logo { grid-row: 1; grid-column: 1; }
  .ux-shell .ux-search { grid-row: 1; grid-column: 2; }
  .ux-shell .ux-help { grid-row: 1; grid-column: 3; }
  .ux-shell .ux-topbar button.ux-workspace { grid-row: 1; grid-column: 4; }
  .ux-shell .ux-nav-slot { grid-row: 2; }
  .ux-shell .ux-search:focus-within { grid-column: 1 / -1; grid-row: 1; justify-self: stretch; width: auto; z-index: 2; background: var(--hm-surface); }
  .ux-shell .ux-search:focus-within input { color: var(--hm-ink); cursor: text; }
  .ux-shell .ux-search:focus-within input::placeholder { color: var(--hm-muted); }
  .ux-shell .ux-help { width: var(--hm-touch-target); height: var(--hm-touch-target); }
  .ux-shell .ux-topbar button.ux-workspace { min-height: var(--hm-touch-target); max-width: 38vw; overflow: hidden; text-overflow: ellipsis; }
  /* The four entries share one row; nothing scrolls, nothing is cut off (UX-08). */
  .ux-shell .ux-nav-slot { grid-column: 1 / -1; }
  .ux-shell .ux-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--hm-space-1); overflow: visible; }
  .ux-shell .ux-nav.is-scrollable { mask-image: none; -webkit-mask-image: none; }
  .ux-shell .ux-nav a { min-height: var(--hm-touch-target); justify-content: center; padding: 0 var(--hm-space-1); font-size: var(--hm-fs-label); white-space: nowrap; }
  .ux-shell .account-panel { top: 64px; }
  .hm-page-header { flex-direction: column; margin-bottom: var(--hm-space-4); }
  .hm-page-header h1 { font-size: var(--hm-fs-title); line-height: 32px; }
  .hm-section-nav a { min-height: var(--hm-touch-target); }
}

/* UX-E B2a fix · Settings forms in a half-width panel (Workspace › Profile). The profile form was a three-column grid
   made for a full-width panel, and a form note (setFormNote) became its first cell: beside the Account panel that
   column shrank to 0px, the note ran one word per line and Industry overlapped Company size. A note now spans the
   form; the profile's fields take as many ~180px columns as fit, and Save sits on its own row. */
.settings-form > .form-note,
.invite-form > .form-note { grid-column: 1 / -1; margin: 0; }
.settings-form { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.settings-form > button { grid-column: 1 / -1; }

/* UX-E B2a fix · a link styled as a secondary button ("See plans", "Go to Products") had no rule at all and rendered
   as the browser's default blue link. It now looks like the buttons that carry the same class. */
a.secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: var(--hm-control-height); padding: 0 16px; border: 1px solid transparent; border-radius: var(--hm-radius-control); background: var(--hm-primary); color: var(--hm-on-dark); font-size: var(--hm-fs-meta); line-height: 20px; font-weight: 600; text-decoration: none; }
a.secondary-button:hover { background: var(--hm-primary-hover); color: var(--hm-on-dark); }

/* ── UX-E B2b-1 · Team & access (UX-62 / UX-63): the lists beside the invite form; tabs; a member's Manage drawer ── */
#settings-view .team-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.team-side { min-width: 0; display: grid; gap: 16px; align-content: start; }
/* Side by side only where the tables still fit beside the form; below that the form follows the lists. */
@media (min-width: 1280px) {
  #settings-view .team-layout { grid-template-columns: minmax(0, 1fr) minmax(260px, 300px); }
}
.team-row-actions { display: inline-flex; gap: 8px; }
.team-manage-toggle[aria-expanded="true"] { color: var(--hm-primary); }
.hm-table .hm-row-detail > td { padding-top: 0; background: var(--hm-bg); }
/* a linked row (DataTable href): the whole row opens; its first cell is the one real link */
.hm-table .hm-row-linked { cursor: pointer; }
.hm-table .hm-row-linked:hover > td, .hm-table .hm-row-linked:focus-within > td { background: var(--hm-bg); }
.hm-table .hm-row-link { font-weight: 600; color: var(--hm-primary); text-decoration: none; }
.hm-table .hm-row-link:hover { text-decoration: underline; }
/* structured cell content (renderNode) */
.hm-node-empty { color: var(--hm-muted); font-style: italic; }
.hm-node-muted { color: var(--hm-muted); }
.hm-node-line { display: block; }
.hm-node-pick { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; min-width: 0; } /* the global label's 180px floor would spread a row of choices */
.hm-node-pick input { width: auto; margin: 0; }
.hm-node-note { display: block; margin: 4px 0 0; }
.hm-node-lines { display: grid; gap: 2px; }
.hm-node-ln { margin: 0; overflow-wrap: anywhere; }
.hm-node-details > summary { cursor: pointer; font-weight: 600; color: var(--hm-primary); }
.hm-table mark, .hm-node-lines mark { background: var(--hm-sand); color: var(--hm-ink); font-weight: 600; padding: 0 2px; border-radius: var(--hm-radius-control); }
/* a table whose first column stays in view while it scrolls sideways in its own box (DataTable stickyFirst); a tinted row is the one the others are compared with */
/* a sortable heading is a button; the pager, the filter bar */
.hm-sort { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.hm-sort:hover, .hm-sort.is-sorted { color: var(--hm-ink); }
.hm-sort-arrow { font-size: var(--hm-fs-label); }
.hm-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: var(--hm-space-3); }
.hm-pager-range { margin: 0; color: var(--hm-muted); font-size: var(--hm-fs-meta); }
.hm-pager-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.hm-pager-num { min-width: 32px; padding: 6px 8px; border: 0; border-radius: var(--hm-radius-control); text-align: center; background: transparent; color: var(--hm-primary); font-weight: 600; cursor: pointer; }
.hm-pager-num:hover { background: var(--hm-mint); color: var(--hm-primary); }
.hm-pager-num.is-current { background: var(--hm-mint); color: var(--hm-primary); }
.hm-pager-gap { color: var(--hm-muted); }
.hm-filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 0 0 var(--hm-space-3); }
.hm-filter { display: grid; gap: 4px; font-size: var(--hm-fs-label); color: var(--hm-muted); min-width: 0; }
.hm-filter select { min-height: var(--hm-input-height); font-size: var(--hm-fs-body); } /* one type size in a filter row (2.7.3.9: the search and the select were 12px beside a 14px Tag; the grey search fill is the design's search style) */
.hm-filter-search { flex: 1 1 220px; }
/* TextInput · InputRow (Harvey 10-29: 「上下input的框也不一樣的啊，字也不一樣大」): one height and one type size for every typed field; a page sets only its width.
   The buttons in a field's row take its height; on a phone they go under it. */
.hm-input { height: var(--hm-input-height); min-height: var(--hm-input-height); padding: 0 12px; font-size: var(--hm-fs-body); line-height: normal; }
.hm-input-row { display: flex; gap: var(--hm-space-2); align-items: stretch; margin: var(--hm-space-2) 0; }
.hm-input-row > .hm-input { flex: 1; min-width: 0; }
.ux-shell .hm-input-row > .btn, .hm-input-row > .btn { flex: none; height: var(--hm-input-height); min-height: var(--hm-input-height); padding-top: 0; padding-bottom: 0; white-space: nowrap; }
@media (max-width: 600px) { .hm-input-row { flex-direction: column; } }
/* Callout · a short highlighted block (an offer, a note) with its heading, sentence, small print and actions */
.hm-callout { margin: var(--hm-space-3) 0 0; padding: var(--hm-space-3) var(--hm-space-4); border-radius: var(--hm-radius-control); border: 1px solid var(--hm-line); background: var(--hm-surface); }
.hm-callout-offer { border-color: var(--hm-success-line); background: var(--hm-success-tint); }
.hm-callout-title { margin: 0; font-weight: 600; font-size: var(--hm-fs-body); color: var(--hm-ink); }
.hm-callout-text { margin: 4px 0 0; font-size: var(--hm-fs-body); color: var(--hm-ink); }
.hm-callout-small { margin: 4px 0 0; font-size: var(--hm-fs-label); color: var(--hm-muted); }
.hm-callout .svc-actions { margin-top: var(--hm-space-2); }
.hm-filter-bar .hm-combo { min-height: var(--hm-control-height); padding-top: 0; padding-bottom: 0; border-color: var(--hm-line); } /* a combobox in a filter row has the same height and border as the selects beside it */
.hm-filter-search input { width: 100%; }
.hm-table-sticky th:first-child, .hm-table-sticky td:first-child { position: sticky; left: 0; z-index: 1; background: var(--hm-surface); box-shadow: 1px 0 0 var(--hm-line); }
.hm-table .hm-row-new > td, .hm-table-sticky .hm-row-new > td:first-child { background: var(--hm-bg); }
@media (max-width: 760px) {
  .hm-table-stack { min-width: 0 !important; display: block; }
  .hm-table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hm-table-stack tbody, .hm-table-stack tr { display: block; }
  .hm-table-stack tr { padding: var(--hm-space-3); border-top: 1px solid var(--hm-line); }
  .hm-table-stack tr:first-child { border-top: 0; }
  .hm-table-stack td { display: grid; grid-template-columns: minmax(84px, 34%) minmax(0, 1fr); gap: 8px; padding: 4px 0; border: 0; }
  .hm-table-stack td::before { content: attr(data-label); color: var(--hm-muted); font-size: var(--hm-fs-label); font-weight: 600; }
  .hm-table-stack .hm-cell { min-width: 0; overflow-wrap: anywhere; }
  .hm-table-stack td.hm-row-actions { grid-template-columns: minmax(0, 1fr); } .hm-table-stack td.hm-row-actions::before { display: none; }
  .hm-table-stack td.hm-row-actions { justify-items: start; } /* the row's action stands on the row's left edge, not floating in the middle (2.7.3.9) */
  .sc-wb .hm-table-stack tr { padding-inline: 0; } /* inside a card the stacked rows start on the card's content line, like its title */
  .hm-table-stack .hm-row-detail > td { grid-template-columns: minmax(0, 1fr); } .hm-table-stack .hm-row-detail > td::before { display: none; } .hm-table-stack tr.hm-row-detail { border-top: 0; padding-top: 0; }
  .hm-table-stack.hm-table-sticky th:first-child, .hm-table-stack.hm-table-sticky td:first-child { position: static; box-shadow: none; }
}

/* StepList: a long page's steps — one live step, the rest locked, skipped ones at the end */
.hm-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--hm-space-3); }
.hm-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; align-items: start; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: var(--hm-space-4) 20px; background: var(--hm-surface); min-width: 0; }
.hm-step-active, .hm-step-error { border-color: var(--hm-primary); box-shadow: 0 0 0 3px var(--hm-focus-ring); }
.hm-step-error { border-color: var(--hm-danger); box-shadow: 0 0 0 3px var(--hm-danger-ring); }
.hm-step-rank { width: 28px; aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--hm-radius-pill); background: var(--hm-primary); color: var(--hm-on-dark); font-size: var(--hm-fs-label); font-weight: 600; }
.hm-step-locked .hm-step-rank, .hm-step-skipped .hm-step-rank { background: var(--hm-neutral); color: var(--hm-muted); }
.hm-step-skipped .hm-step-rank { background: var(--hm-attention-tint); color: var(--hm-attention); }
.hm-step-done .hm-step-rank { background: var(--hm-success); }
.hm-step-error .hm-step-rank { background: var(--hm-danger); }
.hm-step-main { min-width: 0; display: grid; gap: 10px; }
.hm-step-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.hm-step-title { margin: 0; font-size: var(--hm-fs-body); line-height: 1.3; font-weight: 600; color: var(--hm-ink); }
.hm-step-locked .hm-step-title, .hm-step-skipped .hm-step-title { color: var(--hm-muted); }
.hm-step-summary, .hm-step-note { margin: 0; font-size: var(--hm-fs-meta); color: var(--hm-muted); overflow-wrap: anywhere; }
.hm-step-msg { margin: 0; color: var(--hm-danger); font-size: var(--hm-fs-meta); font-weight: 600; }
.hm-step-body { min-width: 0; display: grid; gap: var(--hm-space-3); }
.hm-step-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; }
@media (max-width: 760px) { .hm-step { padding: 14px; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; } .hm-step-actions > .btn { flex: 1 1 100%; justify-content: center; } }

/* FieldGroupCard: one group of a record's fields, read-only; a masked group is one line */
.hm-group { background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); padding: var(--hm-space-4); min-width: 0; display: grid; gap: var(--hm-space-3); align-content: start; }
.hm-group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.hm-group-title { margin: 0; font-size: var(--hm-fs-section); font-weight: 600; }
.hm-group-rows { margin: 0; display: grid; gap: var(--hm-space-3); }
.hm-group-row { display: grid; gap: 2px; min-width: 0; }
.hm-group-row dt { font-size: var(--hm-fs-label); color: var(--hm-muted); }
.hm-group-row dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.hm-group-row dd .hm-node-empty { font-weight: 400; }
.hm-group-masked { margin: 0; color: var(--hm-muted); font-style: italic; }
.hm-group.is-masked { background: var(--hm-bg); }
.hm-node-select { display: block; min-width: 0; }
.hm-node-select select { width: 100%; min-width: 160px; min-height: var(--hm-control-height); }

.team-manage { display: grid; gap: 16px; padding: 16px 4px 4px; }
.team-danger { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--hm-danger-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); }
.team-danger h3 { margin: 0; font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--hm-danger); }
.team-danger-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; padding-top: 10px; border-top: 1px solid var(--hm-line); }
.team-danger-row:first-of-type { border-top: 0; padding-top: 0; }
.team-danger-row > div { flex: 1 1 260px; min-width: 0; display: grid; gap: 4px; }
.team-danger-row p { margin: 0; font-size: var(--hm-fs-meta); line-height: 20px; }
.team-danger .danger-button { background: var(--hm-surface); border: 1px solid var(--hm-danger-line); color: var(--hm-danger); }
.team-danger .danger-button:hover { background: var(--hm-danger-soft); border-color: var(--hm-danger); }
.team-main [data-list-state] { margin: 0; }
/* Phone width: each row becomes a small card — who first, the facts under it, the row's action to the right — so no
   Team table scrolls sideways and the drawer uses the full width. */
@media (max-width: 640px) {
  .team-main .hm-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .team-main .hm-table,
  .team-main .hm-table tbody,
  .team-main .hm-table tr,
  .team-main .hm-table td { display: block; width: 100%; }
  .team-main .hm-table tr[data-row] { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--hm-line); }
  .team-main .hm-table tr[data-row] > td { border: 0; padding: 0; width: auto; white-space: normal; }
  .team-main .hm-table tr[data-row] > td:first-child { grid-column: 1; font-weight: 600; color: var(--hm-ink); }
  .team-main .hm-table tr[data-row] > td:not(:first-child):not(.hm-row-actions) { grid-column: 1; font-size: var(--hm-fs-label); color: var(--hm-muted); }
  .team-main .hm-table tr[data-row] > td.hm-row-actions { grid-column: 2; grid-row: 1 / span 4; align-self: center; text-align: right; }
  .team-main .hm-table .hm-row-detail > td { padding: 0 0 12px; border-bottom: 1px solid var(--hm-line); }
  #member-list .hm-table tr[data-row] > td:nth-child(3)::before { content: "Sales access: "; }
  #member-list .hm-table tr[data-row] > td:nth-child(4)::before { content: "Joined "; } /* the labels are the column headings: the third column is Sales access, the fourth Joined */
  #invitation-list .hm-table tr[data-row] > td:nth-child(3)::before,
  #invitation-history .hm-table tr[data-row] > td:nth-child(3)::before { content: "Invited "; }
  #invitation-list .hm-table tr[data-row] > td:nth-child(4)::before,
  #invitation-history .hm-table tr[data-row] > td:nth-child(4)::before { content: "Expires "; }
  .team-row-actions { flex-direction: column; align-items: flex-end; gap: 6px; }
  .team-manage { padding: 12px 0 0; }
  .team-danger-row > div { flex-basis: 100%; }
}
/* UX-E completion S8 · Developers at phone width: a key is a small card like a Team row — its name, then what it
   starts with, what it can do, who created it and when it was last used, Revoke to the right — so the key table never
   scrolls sideways (the creator and the last use made it too wide for a phone). */
@media (max-width: 640px) {
  .api-key-list .hm-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .api-key-list .hm-table,
  .api-key-list .hm-table tbody,
  .api-key-list .hm-table tr,
  .api-key-list .hm-table td { display: block; width: 100%; }
  .api-key-list .hm-table tr[data-row] { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--hm-line); }
  .api-key-list .hm-table tr[data-row] > td { border: 0; padding: 0; width: auto; white-space: normal; overflow-wrap: anywhere; }
  .api-key-list .hm-table tr[data-row] > td:first-child { grid-column: 1; font-weight: 600; color: var(--hm-ink); }
  .api-key-list .hm-table tr[data-row] > td:not(:first-child):not(.hm-row-actions) { grid-column: 1; font-size: var(--hm-fs-label); color: var(--hm-muted); }
  .api-key-list .hm-table tr[data-row] > td.hm-row-actions { grid-column: 2; grid-row: 1 / span 5; align-self: center; text-align: right; }
  .api-key-list .hm-table tr[data-row] > td:nth-child(2)::before { content: "Starts with: "; }
  .api-key-list .hm-table tr[data-row] > td:nth-child(4)::before { content: "Created: "; }
  .api-key-list .hm-table tr[data-row] > td:nth-child(5)::before { content: "Last used: "; }
}
/* UX-E W8 · the Evidence workspace root groups one rendered copy for lookups only; it adds no box of its own. */
.evidence-workspace-root { display: contents; }
.evidence-edit-note { font-size: var(--hm-fs-label); }
.evidence-edit-note:empty { display: none; }

/* ── UX-E B2b-2 · Activity & audit (UX-65): filters over the loaded rows, and one row's details under it ── */
.activity-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 12px; }
.activity-filters label { display: grid; gap: 4px; font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-muted); }
.activity-filters select { min-height: var(--hm-control-height); max-width: 260px; }
.activity-fields > div { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: 12px; align-items: baseline; }
#audit-list .hm-table td:nth-child(2) { white-space: nowrap; }
@media (max-width: 480px) { #audit-list .hm-table td:nth-child(2) { white-space: normal; } } /* the time wraps in a phone's card instead of running out of it */
@media (max-width: 640px) {
  .activity-fields > div { grid-template-columns: 1fr; gap: 2px; }
  #audit-list .hm-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #audit-list .hm-table,
  #audit-list .hm-table tbody,
  #audit-list .hm-table tr,
  #audit-list .hm-table td { display: block; width: 100%; }
  #audit-list .hm-table tr[data-row] { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--hm-line); }
  #audit-list .hm-table tr[data-row] > td { border: 0; padding: 0; width: auto; }
  #audit-list .hm-table tr[data-row] > td:nth-child(3) { grid-column: 1; font-weight: 600; color: var(--hm-ink); order: -1; }
  #audit-list .hm-table tr[data-row] > td:not(:nth-child(3)):not(.hm-row-actions) { grid-column: 1; font-size: var(--hm-fs-label); color: var(--hm-muted); }
  #audit-list .hm-table tr[data-row] > td.hm-row-actions { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
}

/* ── UX-E B2b-2 · Workspace (UX-59): the profile form is built from the shared rows; permissions fold ── */
.settings-form > .hm-action-bar,
.settings-form > .form-note { grid-column: 1 / -1; }
.truth-help { margin: 0; max-width: 65ch; color: var(--hm-muted); font-size: var(--hm-fs-meta); }
.truth-choices { display: grid; gap: 4px; min-width: 0; margin: 0; padding: 0; border: 0; }
.truth-choices > legend { margin-bottom: 4px; padding: 0; font-weight: 600; color: var(--hm-ink); }
.truth-choice { display: flex; align-items: center; gap: 8px; min-height: calc(var(--hm-control-height) - 8px); cursor: pointer; }
@media (max-width: 760px) { .truth-choice { min-height: 44px; } }
.truth-choice > input { margin: 0; }
.access-summary { margin: 6px 0 0; font-size: var(--hm-fs-meta); line-height: 1.5; color: var(--hm-ink); }

/* ── check-again-preview: what reading the page again would do, before anything is written ── */
.check-again-dialog {
  max-width: 640px; width: calc(100vw - 32px); max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  box-sizing: border-box; overflow: hidden;
}
.check-again-dialog > p { margin: 0 0 8px; font-size: var(--hm-fs-meta); line-height: 1.5; }
.check-again-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 4px 0 12px; }
.check-again-group { border-top: 1px solid var(--hm-line); padding: 8px 0; }
.check-again-group li { display: grid; gap: 2px; min-width: 0; font-size: var(--hm-fs-label); line-height: 1.45; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .check-again-overlay { padding: 16px; }
  .check-again-dialog { padding: 18px 16px; width: 100%; }
  .check-again-dialog .confirm-actions { flex-direction: column-reverse; }
  .check-again-dialog .confirm-actions button { width: 100%; }
}
.ctx-tasks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ctx-boundary { margin-top: 4px; }
.ctx-boundary > summary { cursor: pointer; font-size: var(--hm-fs-meta); font-weight: 600; }
.results-note.results-running { font-weight: 600; color: var(--hm-ink); }
.results-metric-pending { grid-template-rows: auto auto; }
.results-metric-pending > .results-metric-skeleton {
  height: 22px; border-radius: var(--hm-radius-control);
  background: var(--hm-neutral);
  background-size: 400% 100%; animation: results-skeleton 1.4s ease-in-out infinite;
}
@keyframes results-skeleton { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) {
  .results-metric-pending > .results-metric-skeleton { animation: none; }
}

/* Item 3 · the "not open to shoppers yet" sentence on the funnel and observability pages — the same banner shape the
   eligibility notice uses, in the neutral tone (it reports a state of the product, not a warning about the data). */
.funnel-banner--pending { border-left: 3px solid var(--hm-primary); background: var(--hm-mint); }

/* Item 6 · links inside a Results card were browser-default blue on a green-and-ink page. Brand green, underlined —
   the underline is what marks them as links once the colour is close to the text's. */
/* coverage redo 09-19: these headings had no size of their own and took the browser's h3 default (1.17em → 17.55px). */
.results-card h3 { font-size: var(--hm-fs-section); font-weight: 600; letter-spacing: var(--hm-ls-h2); line-height: var(--hm-lh-title); }
.api-section h3 { font-size: var(--hm-fs-body); }
.results-card a { color: var(--hm-primary); text-decoration: underline; text-underline-offset: 2px; }
.results-card a:hover { text-decoration-thickness: 2px; }
.results-card a:focus-visible { outline: 2px solid var(--hm-primary); outline-offset: 2px; border-radius: var(--hm-radius-control); }

/* Item 8 · "Recently resolved" — folded, quiet, and never mistakable for work. */
.ux-resolved-list { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: var(--hm-fs-label); color: var(--hm-muted); }

/* Item 7 · what a stale draft offers instead of an approve that would be refused. */
.cs-basis-help { font-size: var(--hm-fs-label); color: var(--hm-muted); }

/* UX-E completion · S4 · Import (UX-21 / UX-22): three tabs, one panel at a time; the category search sits on its list;
   every row of an import can be read (the list scrolls instead of stopping at eight); fixes read as sentences. */
.import-panel { display: grid; gap: 16px; }
.category-field { display: grid; gap: 6px; }
.category-field > label { font-weight: 600; }
.category-field input[type="search"] { min-height: var(--hm-control-height); }
.category-field .subcopy { margin: 0; }
#batch-categories-download { color: var(--hm-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.import-panel .submit-panel { display: grid; gap: 16px; align-items: stretch; align-content: start; }
.import-panel .submit-panel > :is(label, .hm-form-row, .category-field) { max-width: 720px; } /* every field of the form is as wide as the first (2.7.3.9: "More pages" ran the full width) */
#product-extra-preview:empty { display: none; } /* an empty live region was a third row of the form's grid: 16px more between the box and its help */
.import-panel .submit-panel > .subcopy { margin-top: -8px; } /* a field's help sits under it (8px), not a grid gap (16px) away */

/* ── UX-E completion S1 · UX-05 / UX-06 · one page header everywhere ─────────────────────────────────────────────── */
.page-header-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--hm-space-3); }
.page-header-row > .section-heading-actions { padding-top: var(--hm-space-1); }
.ux-shell .ux-workbench > .hm-page-header { margin-bottom: var(--hm-space-4); }
/* A product's title keeps its ⋯ menu on the same row at every width, so the menu (anchored right) opens on screen. */
.ux-shell .ux-workspace > .hm-page-header { margin: 0 0 var(--hm-space-3); flex-direction: row; }
.ux-shell .ux-workspace > .hm-page-header h1 { margin: 0; }


/* ── UX-E completion S1 · D5 · the History chart on a phone ─────────────────────────────────────────────────────────
   renderTimeline draws the chart twice (840 and 400 units wide). The History column picks the drawing that fits, so
   the axis numbers, dates and version labels keep their size instead of shrinking with one scaled-down SVG. */
.timeline-panel { container-type: inline-size; container-name: history; }
.timeline-chart-narrow, .timeline-version-key-narrow { display: none; }
@container history (max-width: 600px) {
  .timeline-chart-wide { display: none; }
  .timeline-chart-narrow { display: block; }
  .timeline-version-key-narrow { display: flex; }
}
/* UX-16: a check that found issues opens to its products; one that found nothing reads quieter. */
.ux-shell .ux-actrow-found { display: block; }
.ux-actrow-found > summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-2); list-style: none; cursor: pointer; }
.ux-actrow-found > summary .ux-actrow-see { margin-left: auto; }
/* The open/closed mark rides on "Which products" so a wrap can't leave it alone on a line (it did at 375). */
.ux-actrow-found > summary .ux-actrow-see::after { content: "▸"; display: inline-block; margin-left: 4px; color: var(--hm-muted); text-decoration: none; }
.ux-actrow-found[open] > summary .ux-actrow-see::after { content: "▾"; }
/* A Drafts row stacks on a phone: the draft's name and product get the full width, the actions sit below. */
@media (max-width: 640px) {
  .ux-shell .ux-draftrow { grid-template-columns: minmax(0, 1fr); gap: var(--hm-space-3); }
  .ux-shell .ux-draftrow-actions { justify-content: flex-start; }
}
/* UX-E completion S3 · UX-28 / UX-30: Information leads with the product's name; a use-case row has a label per field. */
.pil-product-name { display: flex; flex-wrap: wrap; gap: var(--hm-space-2); align-items: baseline; margin: 0 0 var(--hm-space-3); }
.pil-editor-grid > .hm-form-row { min-width: 0; align-content: start; } /* a field with its label row and an (i): the controls of one row start on one line */
.pil-row[data-pil-labelled] { align-items: end; }
.pil-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: var(--hm-fs-label); color: var(--hm-muted); }
.pil-field > span { font-weight: 600; color: var(--hm-ink); }
.pil-field-narrow { max-width: 200px; }
@media (max-width: 640px) {
  .pil-row[data-pil-labelled] { grid-template-columns: minmax(0, 1fr); }
  .pil-field-narrow { max-width: none; }
}
.products-table .row-creator { display: block; font-size: var(--hm-fs-label); color: var(--hm-muted); }
.products-sort-note { font-size: var(--hm-fs-meta); }
.products-table thead th[aria-sort]::after { content: " ↓"; color: var(--hm-muted); }
.products-table thead th[aria-sort="ascending"]::after { content: " ↑"; }
@media (max-width: 640px) {
  /* UX-E completion S3 · UX-24: a draft card's name keeps the width on a phone; who prepared it and when go below. */
  .changeset-card header { flex-direction: column; gap: 4px; }
}
/* UX-E completion S3 · UX-29 / A9 / C11 / C14: a term is Not stated / a number / none (the number box shows only for a
   number); software lists its plans in order; a Best for line carries its optional buyer question. */
.pil-editor-grid[data-terms-tier] { align-items: start; } /* a term's number box doesn't stretch its neighbours */
.pil-term { display: grid; gap: var(--hm-space-2); align-content: start; min-width: 0; }
.pil-term label { min-width: 0; }
/* Harvey 10-02 · software: how it's sold heads the plans; the terms for every plan come once, below them. */
.pil-plans-how { max-width: 360px; margin: 4px 0 8px; }
.pil-row[data-pil-row="plan"] { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1fr) auto; }
.pil-plan-move { display: inline-flex; align-items: center; gap: 4px; }
.pil-plan-move button { min-width: 40px; min-height: var(--hm-control-height); }
.pil-row[data-pil-question] .pil-row-question { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: var(--hm-fs-label); font-weight: 400; color: var(--hm-muted); }
@media (max-width: 640px) {
  .pil-row[data-pil-row="plan"] { grid-template-columns: minmax(0, 1fr); }
  .pil-plan-move { justify-self: start; }
}
.pub-dest { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); }
.pub-dest-state-live { color: var(--hm-success); }
.pub-dest-state-unknown { color: var(--hm-pending); }
.pub-dest-action { display: inline-flex; align-items: center; justify-content: center; min-height: var(--hm-control-height); padding: 0 14px; border: 1px solid var(--hm-line-strong); border-radius: var(--hm-radius-control); background: var(--hm-surface); color: var(--hm-primary); font-size: var(--hm-fs-meta); font-weight: 600; text-decoration: none; white-space: nowrap; }
@media (max-width: 640px) {
  .pub-dest { grid-template-columns: 1fr; }
  .pub-dest-next { justify-self: start; }
}
/* UX-52: the dashboard compares categories picked by name. */
.obs-compare > summary { cursor: pointer; min-height: var(--hm-control-height); display: flex; align-items: center; gap: 6px; font-weight: 600; }
 .obs-compare-wrap > .hm-info { margin-top: var(--hm-space-1); }
.obs-compare-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; max-height: 240px; overflow: auto; padding: 6px 0; }
.ux-shell .funnel-control .obs-compare-option { min-width: 0; white-space: normal; overflow-wrap: anywhere; display: flex; align-items: center; gap: 6px; min-height: var(--hm-control-height); font-size: var(--hm-fs-meta); font-weight: 400; text-transform: none; letter-spacing: normal; color: var(--hm-ink); }

/* UX-E completion S7 · UX-52 (375 audit): a funnel / observability section never grows past the page, and the day chart
   scrolls inside its own box. */
.funnel-section { grid-template-columns: minmax(0, 1fr); }
.obs-chart-scroll { overflow-x: auto; max-width: 100%; }

/* UX-E completion S6 · UX-39 + C3: the publish panel — the page buyers will see beside what changes. Two columns on a
   desktop, stacked on a phone; the preview frame keeps a readable height and never widens the dialog. */
.confirm-dialog.pp-dialog { max-width: 1040px; max-height: calc(100vh - 40px); overflow-y: auto; }
.pp-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; margin: 4px 0 18px; }
.pp-frame { display: block; width: 100%; height: min(60vh, 560px); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); }
@media (max-width: 720px) {
  .pp-grid { grid-template-columns: minmax(0, 1fr); }
  .pp-frame { height: 52vh; }
  .confirm-overlay.pp-overlay { padding: 12px; align-items: flex-start; }
  .confirm-dialog.pp-dialog { padding: 18px; max-height: calc(100vh - 24px); }
}
/* UX-E completion S6 walkthrough: a live Shopper page's editor at phone width — the link field takes its own row, and
   the live-link actions wrap instead of folding "Open page ↗" into three lines. */
@media (max-width: 560px) {
  .cpg-addbar { flex-wrap: wrap; }
  .cpg-addurl { flex: 1 1 100%; min-width: 0; }
  .cpg-live-actions { flex-wrap: wrap; row-gap: 8px; }
  .cpg-open { white-space: nowrap; }
}
.decision-item { border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: 10px 12px; background: var(--hm-surface); min-width: 0; overflow-wrap: anywhere; }
.decision-explain:empty { display: none; }
.decision-explain { margin-top: 8px; }
.ux-shell .ux-plan-head .tag { margin-top: 14px; }
.ux-shell .ux-plan-empty-state { padding: 14px 16px; border: 1px solid var(--hm-line); border-left: 3px solid var(--hm-line-strong); border-radius: var(--hm-radius-card); background: var(--hm-surface); }
.ux-shell .ux-plan-empty-state p { margin: 0; color: var(--hm-ink); font-size: var(--hm-fs-body); line-height: 1.5; }
.ux-shell .ux-plan-part { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--hm-line); border-left: 3px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); min-width: 0; }
.ux-shell .ux-plan-ba { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.ux-shell .ux-plan .btn.danger { background: var(--hm-danger); border-color: var(--hm-danger); color: var(--hm-on-dark); }
.ux-shell .ux-plan .btn.danger:hover { background: var(--hm-danger); filter: brightness(0.92); }
.ux-shell .ux-plan-notice-error, .ux-shell .ux-plan-notice-forbidden, .ux-shell .ux-plan-notice-not_found, .ux-shell .ux-plan-notice-read_error { background: var(--hm-danger-soft); }
.ux-shell .ux-plan-notice-locked, .ux-shell .ux-plan-notice-conflict, .ux-shell .ux-plan-notice-busy, .ux-shell .ux-plan-notice-nothing, .ux-shell .ux-plan-notice-still_running, .ux-shell .ux-plan-notice-nothing_to_retry, .ux-shell .ux-plan-notice-no_products { background: var(--hm-sand); }
.ux-shell .ux-plan-batch-item .tag { white-space: normal; max-width: 100%; }
/* Links inside the plan card, the batch block and the drafts marker: the console's green, as .results-advanced a. */
.ux-shell .ux-plan a, .ux-shell .ux-plan-batch a, .ux-shell .ux-draftrow-plan a { color: var(--hm-primary); font-weight: 600; }
/* 2b S5 · Drafts: a draft a suggested plan prepared says so. */
.ux-shell .ux-draftrow-plan { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--hm-fs-meta); }
@media (max-width: 560px) {
  .ux-shell .ux-plan-ba { grid-template-columns: minmax(0, 1fr); }
  .ux-shell .ux-plan-part { padding: 12px; }
  .ux-shell .ux-plan-controls .btn, .ux-shell .ux-plan-batch-actions .btn { flex: 1 1 auto; }
}
/* C.8.2 + 2h S3 · Workbench › Priorities: Buying opportunities. A card has four parts in a fixed order; every part is
   its own block so nothing merges the observation into a conclusion. */
.ux-shell .c82-opps { margin: 12px 0 16px; padding: 14px 16px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); min-width: 0; }
.ux-shell .c82-part { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hm-line); min-width: 0; }
.ux-shell .c82-part p, .ux-shell .c82-part li { font-size: var(--hm-fs-meta); line-height: 1.5; color: var(--hm-ink); overflow-wrap: anywhere; }
.ux-shell .c82-part p { margin: 0 0 6px; }
.ux-shell .c82-lines q, .ux-shell .c82-pending q { font-style: italic; }
.ux-shell .c82-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* W3-5: an AI-answers card shows its leading step and Find improvements; the rest fold under More (a 44px summary). */
.ux-shell .c82-more { margin-top: var(--hm-space-2); }
.ux-shell .c82-more > summary { display: inline-flex; align-items: center; min-height: var(--hm-touch-target); min-width: var(--hm-touch-target); padding: 0 var(--hm-space-2) 0 0; cursor: pointer; color: var(--hm-primary); font-size: var(--hm-fs-label); font-weight: 600; } /* test on a1237959: 44px wide too */
.ux-shell .c82-form { margin-top: 10px; padding: 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-bg); display: grid; gap: 8px; min-width: 0; }
.ux-shell .c82-form textarea, .ux-shell .c82-form select, .ux-shell .c82-form input[type="date"] { width: 100%; max-width: 100%; box-sizing: border-box; font-size: var(--hm-fs-body); }
.ux-shell .c82-check { display: flex; align-items: center; gap: 8px; font-size: var(--hm-fs-meta); color: var(--hm-ink); min-height: var(--hm-touch-target); }
.ux-shell .c82-pending-list { margin-top: 12px; }
.ux-shell .c82-pending-list h5 { margin: 0; font-size: var(--hm-fs-meta); font-weight: 600; color: var(--hm-ink); }
.ux-shell .c82-pending-list ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
/* Harvey's walkthrough (09-30): a waiting question is a whole card, as wide as the opportunity cards below it (a flex
   row here shrank it to the width of its words). */
.ux-shell .c82-pending { display: block; padding: 8px 0; border-top: 1px solid var(--hm-line); font-size: var(--hm-fs-meta); min-width: 0; overflow-wrap: anywhere; }
.ux-shell .c82-pending-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.ux-shell .c82-pending-pick select { max-width: 100%; }
.ux-shell .c82-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ux-shell .c82-applied { margin-top: 8px; font-size: var(--hm-fs-meta); }
.ux-shell .c82-applied > summary { min-height: var(--hm-control-height); display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--hm-primary); }
@media (max-width: 640px) {
  .ux-shell .c82-three { grid-template-columns: minmax(0, 1fr); }
  .ux-shell .c82-opps { padding: 12px; }
  .ux-shell .c82-actions .btn, .ux-shell .c82-head-actions .btn { flex: 1 1 auto; }
}
.ux-shell .obs-intro, .ux-shell .obs-muted, .ux-shell .obs-note { font-size: var(--hm-fs-meta); line-height: 1.5; color: var(--hm-muted); overflow-wrap: anywhere; }
.ux-shell .obs-muted { display: block; }
.ux-shell .obs-q { padding: 6px 0; border-bottom: 1px solid var(--hm-line); font-size: var(--hm-fs-meta); color: var(--hm-ink); min-width: 0; }
.ux-shell .obs-q-text { display: block; overflow-wrap: anywhere; }
.ux-shell .obs-q-meta .text-button, .ux-shell .obs-q-actions .text-button { min-height: var(--hm-touch-target); }
.ux-shell .obs-edit { display: block; }
.ux-shell .obs-edit textarea, .ux-shell .obs-add textarea, .ux-shell .obs-import textarea, .ux-shell .obs-import input[type="url"], .ux-shell .obs-import input[type="number"], .ux-shell .obs-import select, .ux-shell .obs-step select { width: 100%; max-width: 100%; box-sizing: border-box; font-size: var(--hm-fs-body); }
.ux-shell .obs-add .btn { justify-self: start; }
.ux-shell .obs-kv { margin: 0; display: grid; gap: 6px; }
.ux-shell .obs-kv > div { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 4px 12px; padding: 6px 0; border-top: 1px solid var(--hm-line); font-size: var(--hm-fs-meta); }
.ux-shell .obs-actions, .ux-shell .obs-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ux-shell .obs-confirm, .ux-shell .obs-import { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-bg); min-width: 0; }
.ux-shell .results-card[data-card="ai_observation"] .btn.danger { background: var(--hm-danger); border-color: var(--hm-danger); color: var(--hm-on-dark); }
.ux-shell .results-card[data-card="ai_observation"] .btn.danger:hover { filter: brightness(0.92); }
@media (max-width: 640px) {
  .ux-shell .obs-kv > div { grid-template-columns: minmax(0, 1fr); }
  .ux-shell .obs-actions .btn, .ux-shell .obs-modes .btn { flex: 1 1 auto; }
}
/* C.8.2 + 2h S5 — a round's report (every number a button to its answers) and the answer drawer (a dialog). At 375px
   the channel rows become cards, each number under its own label; the answer's text wraps and never pushes the page
   sideways. */
.ux-shell .obs-report { display: grid; gap: 12px; min-width: 0; }
.ux-shell .obs-part h5, .ux-shell .obs-drawer h5 { margin: 0; font-size: var(--hm-fs-body); font-weight: 600; color: var(--hm-ink); }
.ux-shell .obs-sub { display: block; font-size: var(--hm-fs-meta); font-weight: 400; color: var(--hm-muted); overflow-wrap: anywhere; }
.ux-shell .obs-drill { font-variant-numeric: tabular-nums; font-weight: 600; position: relative; padding: 0 2px; text-decoration: underline; text-underline-offset: 3px; }
@media (pointer: coarse) { .ux-shell .obs-drill::after { content: ""; position: absolute; inset: -14px -6px; } } /* a finger gets a full touch target as an overlay (the box stays one line tall: the number stays on its line, inside its fraction); a mouse needs none */
.ux-shell .obs-drill:hover { background: var(--hm-mint); border: 0; }
.ux-shell .obs-report-table { width: 100%; border-collapse: collapse; font-size: var(--hm-fs-meta); color: var(--hm-ink); }
.ux-shell .obs-report-table caption { text-align: left; font-weight: 600; padding-bottom: 6px; }
.ux-shell .obs-report-table th, .ux-shell .obs-report-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-top: 1px solid var(--hm-line); overflow-wrap: anywhere; }
.ux-shell .obs-report-table thead th { border-top: 0; font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--hm-muted); }
.ux-shell .obs-report-table td { font-variant-numeric: tabular-nums; }
.ux-shell .obs-cohorts > summary, .ux-shell .obs-part details > summary, .ux-shell .obs-drawer details > summary { cursor: pointer; min-height: var(--hm-control-height); display: flex; align-items: center; font-weight: 600; color: var(--hm-primary); }
.ux-shell .obs-answer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); min-width: 0; }
.ux-shell .obs-answer > .btn { grid-column: 2; grid-row: 1; }
body.obs-drawer-open { overflow: hidden; }
.obs-drawer-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; justify-content: flex-end; background: var(--hm-overlay); }
.obs-drawer { box-sizing: border-box; width: min(680px, 100%); max-width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden; display: grid; grid-auto-rows: max-content; gap: 10px; align-content: start; padding: 16px 18px 24px; background: var(--hm-surface); box-shadow: var(--hm-shadow-lg); font-family: var(--hm-font-sans); color: var(--hm-ink); }
.obs-drawer:focus { outline: none; }
.obs-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.obs-drawer-head h4 { margin: 0; font-size: var(--hm-fs-section); font-weight: 600; overflow-wrap: anywhere; }
.obs-drawer .obs-kv { margin: 0; display: grid; gap: 4px; }
.obs-drawer .obs-kv > div { display: grid; grid-template-columns: minmax(0, 6rem) minmax(0, 1fr); gap: 4px 10px; padding: 4px 0; border-top: 1px solid var(--hm-line); font-size: var(--hm-fs-label); }
.obs-drawer .obs-kv dt { font-size: var(--hm-fs-label); font-weight: 400; letter-spacing: var(--hm-ls-caps); text-transform: uppercase; }
.obs-drawer .obs-kv dd { margin: 0; overflow-wrap: anywhere; }
.obs-answer-text { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font-size: var(--hm-fs-meta); line-height: 1.55; padding: 10px 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-bg); max-height: 50vh; overflow-y: auto; }
.obs-hit { border-radius: 0; padding: 0 1px; color: inherit; }
.obs-hit-brand { background: var(--hm-mint); box-shadow: inset 0 -2px 0 var(--hm-primary-muted); }
.obs-hit-product { background: var(--hm-sand); box-shadow: inset 0 -2px 0 var(--hm-pending-muted); }
.obs-hit-page { background: var(--hm-neutral); }
.obs-url { font-family: var(--hm-font-mono); font-size: var(--hm-fs-label); overflow-wrap: anywhere; word-break: break-all; }
.obs-drawer select { max-width: 100%; }
.obs-drawer .obs-banner { padding: 8px 12px; border-radius: var(--hm-radius-control); border: 1px solid var(--hm-line); background: var(--hm-neutral); font-size: var(--hm-fs-meta); overflow-wrap: anywhere; }
.obs-drawer .obs-banner-warn { background: var(--hm-sand); border-color: var(--hm-pending-line); }
.obs-drawer .obs-note { background: var(--hm-sand); border: 1px solid var(--hm-pending-line); color: var(--hm-pending); border-radius: var(--hm-radius-control); padding: 8px 12px; font-size: var(--hm-fs-label); }
.obs-drawer .obs-notice { padding: 8px 12px; border-radius: var(--hm-radius-control); background: var(--hm-mint); font-size: var(--hm-fs-meta); }
.obs-drawer .obs-muted, .obs-drawer .obs-sub { font-size: var(--hm-fs-label); color: var(--hm-muted); overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .ux-shell .obs-report-table, .ux-shell .obs-report-table tbody, .ux-shell .obs-report-table tr, .ux-shell .obs-report-table th, .ux-shell .obs-report-table td { display: block; width: 100%; box-sizing: border-box; }
  .ux-shell .obs-report-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ux-shell .obs-report-table caption { display: block; }
  .ux-shell .obs-report-table tr { margin-bottom: 8px; padding: 4px 10px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); }
  .ux-shell .obs-report-table th[scope="row"] { border-top: 0; padding: 6px 0; font-size: var(--hm-fs-body); }
  .ux-shell .obs-report-table td { padding: 6px 0; }
  .ux-shell .obs-report-table td::before { content: attr(data-label); display: block; font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-muted); }
  .ux-shell .obs-answer { grid-template-columns: minmax(0, 1fr); }
  .ux-shell .obs-answer > .btn { grid-column: 1; grid-row: auto; justify-self: start; }
  .obs-drawer { padding: 12px 14px 20px; }
  .obs-drawer .obs-kv > div { grid-template-columns: minmax(0, 1fr); }
}

/* C.8.2 + 2h S5A — the background a round is asked with, asking why, what the assistants weighed (the report, the answer
   drawer, the Workbench card) and "Prepare changes". What an assistant said is always a quote, apart from the listing. */
.ux-shell .obs-bg { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-bg); min-width: 0; }
.ux-shell .obs-bg-fields { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; min-width: 0; }
.ux-shell .obs-bg-fields textarea, .ux-shell .obs-bg-fields input[type="text"] { width: 100%; max-width: 100%; box-sizing: border-box; font-size: var(--hm-fs-body); }
.ux-shell .obs-bg-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ux-shell .obs-bg-parts > li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 6px 0; border-top: 1px solid var(--hm-line); font-size: var(--hm-fs-meta); color: var(--hm-ink); min-width: 0; overflow-wrap: anywhere; }
.ux-shell .obs-bg-parts > li .obs-sub { display: inline; }
.ux-shell .obs-bg-parts > li .text-button { min-height: var(--hm-touch-target); }
.obs-quote { margin: 0; padding: 6px 10px; border-left: 3px solid var(--hm-line-strong); background: var(--hm-bg); font-size: var(--hm-fs-meta); line-height: 1.5; color: var(--hm-ink); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.ux-shell .obs-error, .obs-drawer .obs-error { font-size: var(--hm-fs-meta); color: var(--hm-danger); overflow-wrap: anywhere; }
.ux-shell .obs-weighed-card { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); min-width: 0; }
.ux-shell .obs-weighed-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--hm-fs-meta); color: var(--hm-ink); }
.obs-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; min-width: 0; }
.obs-two-col > div { display: grid; gap: 4px; align-content: start; min-width: 0; overflow-wrap: anywhere; }
.obs-two-col h6 { margin: 0; font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-muted); letter-spacing: var(--hm-ls-caps); text-transform: uppercase; }
.obs-two-col p { margin: 0; font-size: var(--hm-fs-meta); color: var(--hm-ink); }
.obs-two-col ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: var(--hm-fs-meta); color: var(--hm-ink); }
.ux-shell .c82-weighed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; min-width: 0; }
.opp-prepare .opp-criteria label, .opp-prepare .opp-targets label { display: flex; align-items: flex-start; gap: 10px; min-height: var(--hm-touch-target); font-size: var(--hm-fs-meta); color: var(--hm-ink); min-width: 0; overflow-wrap: anywhere; }
.opp-prepare .opp-criterion { display: grid; gap: 4px; min-width: 0; }
.obs-hit-condition { background: var(--hm-neutral); box-shadow: inset 0 -2px 0 var(--hm-line-strong); }
@media (max-width: 640px) {
  .obs-two-col, .ux-shell .c82-weighed-grid { grid-template-columns: minmax(0, 1fr); }
  .ux-shell .obs-bg { padding: 8px 10px; }
}

/* ---- C.8.2 + 2h S6 · a card's strategy (opportunities.js strategyBlock) ---- */
.ux-shell .c82-strategy { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.ux-shell .c82-strategy h6 { margin: 0; font-size: var(--hm-fs-meta); font-weight: 600; color: var(--hm-ink); }
.ux-shell .c82-strategy h6 .muted, .ux-shell .c82-strategy .muted { color: var(--hm-muted); font-weight: 400; }
.ux-shell .c82-strategy p, .ux-shell .c82-strategy li, .ux-shell .c82-strategy div { font-size: var(--hm-fs-meta); line-height: 1.5; color: var(--hm-ink); }
.ux-shell .c82-strategy p { margin: 0; }
.ux-shell .c82-strategy ul, .ux-shell .c82-strategy ol { margin: 2px 0 0; padding-left: 18px; display: grid; gap: 2px; }
.ux-shell .c82-strategy [data-strategy="result"] { padding: 6px 8px; border-radius: var(--hm-radius-control); background: var(--hm-bg); }
.ux-shell .c82-strategy a { color: var(--hm-primary); font-weight: 600; }
.ux-shell .c82-strategy .btn { justify-self: start; }
.ux-shell .c82-strategy-history > summary { min-height: var(--hm-control-height); display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--hm-primary); }
.ux-shell .c82-strategy-form .c82-check { align-items: flex-start; overflow-wrap: anywhere; min-width: 0; }
.ux-shell .c82-strategy-form .c82-check input { margin-top: 3px; flex: 0 0 auto; }
/* A checkbox is its native size: the global input rule (min-height 42px, padding, border, inset shadow) made a tall faint
   box with the tick drawn below the label's first line. */
.ux-shell .c82-check input[type="checkbox"], .opp-prepare input[type="checkbox"] { min-height: 0; height: auto; padding: 0; border: 0; box-shadow: none; background: none; }
@media (max-width: 640px) {
  .ux-shell .c82-strategy .btn { justify-self: stretch; }
}

/* ---- C.8.2 + 2h S6 §9a · a product's cards from AI answers, folded (opportunities.js renderAIFold) ----
   A row is a button that reads as a line of the list, not as the brand's green action: it wraps (the global button rule
   keeps a label on one line), fills the fold, and says open or closed with a chevron as well as aria-expanded. */
.ux-shell .c82-fold { display: grid; gap: 10px; min-width: 0; padding: 14px 16px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); }
.ux-shell .c82-fold-title { margin: 0; font-size: var(--hm-fs-body); color: var(--hm-ink); overflow-wrap: anywhere; }
.ux-shell .c82-fold-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.ux-shell .c82-fold-item { display: grid; gap: 8px; min-width: 0; }
.ux-shell .c82-fold-row { position: relative; width: 100%; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 10px 40px 10px 12px; border: 1px solid var(--hm-line); background: var(--hm-bg); color: var(--hm-ink); text-align: left; white-space: normal; overflow-wrap: anywhere; font-weight: 400; }
.ux-shell .c82-fold-row:hover { background: var(--hm-surface); border-color: var(--hm-primary); }
.ux-shell .c82-fold-row::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--hm-muted); border-bottom: 2px solid var(--hm-muted); transform: translateY(-75%) rotate(45deg); }
.ux-shell .c82-fold-row[aria-expanded="true"]::after { transform: translateY(-25%) rotate(-135deg); }
.ux-shell .c82-fold-group { flex: 1 1 100%; font-weight: 600; }
.ux-shell .c82-fold-count, .ux-shell .c82-fold-gap { font-size: var(--hm-fs-meta); color: var(--hm-muted); }
.ux-shell .c82-fold-result { font-size: var(--hm-fs-meta); font-weight: 600; color: var(--hm-ink); }
.ux-shell .c82-fold-card { min-width: 0; }
.ux-shell .c82-fold-card[hidden] { display: none; }
.ux-shell .c82-fold .c82-card { padding: 14px; }
@media (max-width: 640px) {
  .ux-shell .c82-fold { padding: 10px; }
  .ux-shell .c82-fold .c82-card { padding: 12px; }
}

/* ---- C.8.2 + 2h-el · tracking a change and learning from it (study.js) ---- */
/* L1 — the tracking plan: the "Prepare changes" dialog's right column, and the card's block. */
.obs-drawer.opp-prepare { width: min(980px, 100%); }
.opp-prepare-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
@media (min-width: 900px) {
  .opp-prepare-cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
}
.study-plan-summary > div { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); gap: 2px 10px; padding: 5px 0; border-top: 1px solid var(--hm-line); font-size: var(--hm-fs-meta); line-height: 1.45; min-width: 0; }
@media (max-width: 480px) {
  .study-plan-summary > div { grid-template-columns: minmax(0, 1fr); }
}
.study-cov-table { width: 100%; border-collapse: collapse; font-size: var(--hm-fs-meta); color: var(--hm-ink); }
.study-cov-table th, .study-cov-table td { text-align: left; vertical-align: top; padding: 6px 8px; border-top: 1px solid var(--hm-line); overflow-wrap: anywhere; min-width: 0; }
.study-cov-open .text-button { display: inline-block; margin-right: 10px; min-height: var(--hm-touch-target); }
.obs-hit-point { background: var(--hm-mint); box-shadow: inset 0 -2px 0 var(--hm-primary); }
@media (max-width: 640px) {
  .study-cov-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .study-cov-table, .study-cov-table tbody, .study-cov-table tr, .study-cov-table th, .study-cov-table td { display: block; width: 100%; box-sizing: border-box; }
  .study-cov-table tr { padding: 6px 0; border-top: 1px solid var(--hm-line); }
  .study-cov-table th, .study-cov-table td { border-top: 0; padding: 2px 0; }
  .study-cov-table td[data-label]::before { content: attr(data-label); display: block; font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-muted); }
}
/* L3 — this round vs. before: the card's line, the Changes tab's studies and a study's pairing. */
.ux-shell .study-changes-line { margin: 0; font-size: var(--hm-fs-meta); color: var(--hm-ink); overflow-wrap: anywhere; }
.study-watch .text-button { justify-self: start; min-height: var(--hm-touch-target); }
.study-timeline > .text-button, .study-timeline .study-event .text-button { justify-self: start; min-height: var(--hm-touch-target); }
.study-lane, .study-self { display: inline-block; padding: 0 8px; border-radius: var(--hm-radius-pill); font-size: var(--hm-fs-label); font-weight: 600; line-height: 1.6; }
.study-self { background: var(--hm-surface); border: 1px dashed var(--hm-line-strong); color: var(--hm-muted); }
.study-lanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 10px; min-width: 0; }
.study-event { display: block; padding-top: 6px; border-top: 1px solid var(--hm-line); font-size: var(--hm-fs-meta); color: var(--hm-ink); min-width: 0; }
.study-event-form { display: grid; gap: 10px; min-width: 0; }
.study-event-form select, .study-event-form input[type="date"], .study-event-form textarea { width: 100%; max-width: 100%; box-sizing: border-box; }
/* 2h-el · L5: a card's "Review & next step" */
.study-review { margin-top: 10px; display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); min-width: 0; overflow-wrap: anywhere; }
.study-review > .text-button { justify-self: start; min-height: var(--hm-touch-target); }
.study-review-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 10px; min-width: 0; }
.study-review-part { display: grid; align-content: start; gap: 4px; min-width: 0; padding-top: 6px; border-top: 1px solid var(--hm-line); }

/* QN+DX §1.6 — a buyer question on its card: what Hasmord understood, what is known, what needs confirming, the next step. */
.qh { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); min-width: 0; margin: 0 0 12px; }
/* S2b: a save that chose a pricing model (a currency, a plan) next to a price with no source — said beside the choice. */
.pil-price-notice {
  margin: 6px 0 12px; padding: 8px 12px; border: 1px solid var(--hm-pending-line); border-radius: var(--hm-radius-card);
  background: var(--hm-sand); font-size: var(--hm-fs-label); line-height: 1.5; min-width: 0; overflow-wrap: anywhere;
}
.c82-raw { margin: 4px 0 0; padding-left: 18px; overflow-wrap: anywhere; }
.c82-raw code { white-space: pre-wrap; word-break: break-all; }

/* ── QN+DX step 15 · UI-R12: the info button — one small round button for a section's secondary explanation ── */
.hm-info { position: relative; display: inline-flex; vertical-align: middle; margin-left: var(--hm-info-gap); }
.hm-info-btn {
  display: inline-grid; place-items: center; width: 22px; height: 22px; min-width: 22px; min-height: 0; padding: 0;
  border: 1px solid var(--hm-line-strong); border-radius: var(--hm-radius-pill); background: var(--hm-surface); color: var(--hm-muted);
  font-size: var(--hm-fs-label); font-weight: 600; line-height: 1; font-style: italic; cursor: pointer;
}
/* the global button look (filled, 40px tall, pressed down on click) is not this button's */
.hm-info-btn:hover, .hm-info-btn[aria-expanded="true"] { background: var(--hm-surface); color: var(--hm-primary); border-color: var(--hm-primary-line); }
.hm-info-btn:active { transform: none; }
.hm-info-btn:focus-visible { outline: 2px solid var(--hm-primary); outline-offset: 2px; }
.hm-info-warn { font-style: normal; color: var(--hm-ink); border-color: var(--hm-pending-line); }
.hm-info-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 650; width: max-content; max-width: min(360px, calc(100vw - 32px));
  max-height: min(320px, 60vh); overflow: auto; padding: 10px 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card);
  background: var(--hm-surface); box-shadow: var(--hm-shadow-md); font-size: var(--hm-fs-label); font-style: normal; font-weight: 400;
  line-height: 1.5; color: var(--hm-ink); text-align: left; white-space: normal; overflow-wrap: anywhere;
}
.hm-info-pop[hidden] { display: none; }
/* hotfix-score-penalty-flag: the "!" before a score penalties lowered (ScorePenaltyFlag); its popover is InfoButton's. */
.score-penalty { display: inline-flex; align-items: center; vertical-align: middle; margin-right: 4px; }
.score-penalty .hm-info { margin-left: 0; }
/* Harvey's walkthrough (09-30): a products-table cell clips its spans (.products-table td span — long names), and the
   report panel lives in one, so the popover was cut to its button. The flag and its popover are never clipped. */
.products-table td .score-cell,
.products-table td .score-penalty,
.products-table td .hm-info { overflow: visible; } /* the score cell holds the "!" and its popover: never clipped */
/* Harvey 10-04 (feedback 8): the footer line is fixed to the window's bottom across the content column — from the
   sidebar's right edge (the shell's gutter + sidebar width at each width, and the shell's centring past 1800px) to the
   window's right; on a phone, the full width. The page background under it, a hairline above; the content column
   keeps room for it, so the last card is never under it. One line. */
.ux-footer {
  position: fixed; z-index: 20; bottom: 0; right: 0; left: calc(max(0px, (100% - 1800px) / 2) + 22px + 214px);
  margin: 0; padding: var(--hm-space-2) 22px var(--hm-space-2) 26px; border-top: 1px solid var(--hm-line); background: var(--hm-bg);
  font-size: var(--hm-fs-label); line-height: var(--hm-lh-body); color: var(--hm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 1250px) { .ux-footer { left: calc(18px + 185px); padding-left: 20px; padding-right: 18px; } }
@media (max-width: 1000px) { .ux-footer { left: calc(14px + 168px); padding-left: 16px; padding-right: 14px; } }
@media (max-width: 760px) { .ux-footer { left: 0; padding-left: 16px; padding-right: 16px; } }
/* Harvey 10-04: in the products list the "!" follows the score on its line, centred with it. */
.products-table .score-cell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.products-table .score-cell > .score-penalty { margin: 0; line-height: 0; }
.products-table .score-cell .hm-info { display: inline-flex; align-items: center; margin: 0; line-height: 0; }
.products-table td .hm-info-pop { overflow: auto; }
/* On a score ring the flag sits at the ring's corner, in the ring's own column: the card keeps its two columns. */
.score-ring-holder { position: relative; display: grid; place-items: center; justify-self: start; width: max-content; }
.score-ring-holder > .score-penalty { position: absolute; top: 0; left: 0; margin: 0; z-index: 2; }
/* "View AEO report" brings the panel into view below the sticky top bar (109px at 1440, 113px at 375), header and all. */
.ux-shell .inline-detail-panel { scroll-margin-top: 124px; }
.hm-info-text { display: block; }
.hm-text-tail { white-space: nowrap; }
.hm-info-text + .hm-info-text { margin-top: 6px; }
.hm-info-btn { position: relative; }
.hm-info-btn::after { content: ""; position: absolute; inset: -9px; } /* a 40px target around the 22px circle */

/* UI-Q03: the Needs attention number is a button that shows the products it counts; its definition is in the info button. */
.quick-stat-attention { position: relative; }
.quick-stat-filter {
  display: grid; align-content: center; gap: 6px; width: 100%; min-width: 0; min-height: 0; padding: 0; border: 0; background: none;
  color: inherit; font: inherit; text-align: left; white-space: normal; cursor: pointer;
}
.quick-stat-attention:has(.quick-stat-filter[aria-pressed="true"]) { border-color: var(--hm-primary-line); }
.quick-stat-about { position: absolute; top: var(--hm-space-2); right: var(--hm-space-2); }

/* QN+DX §3: the buyer questions a draft answers, first in its editor. */
.draft-asked { padding: var(--hm-space-3) var(--hm-space-4); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-bg); }

/* ── Agent panel design v1 (Fable 2026-10-02, Harvey approved) ─────────────────────────────────────────────────────
   The merchant console's own system: white card on the warm neutral, low-saturation green, Inter. The entries are
   bordered buttons beside a page's title (first screen); the panel is a 420px drawer (a full page on a phone) whose
   product strip stays on top and composer at the bottom. Its overlay sits on <body>, outside the shell, so every
   control here is styled on its own. Rendered only with the agent_chat capability. */
.ux-agent-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.ux-ws-head-actions { display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) {
  .ux-shell #products-view .section-heading-actions .ux-agent-trigger { flex: 1 1 100%; }
  .ux-shell .ux-workbench > .hm-page-header .hm-page-header-action,
  .ux-shell .ux-workbench > .hm-page-header .ux-agent-trigger { width: 100%; }
  /* ADV-F0P-02: a product's Ask about this takes its own full-width line under the title; ⋯ stays at the title's
     top right, the title leaving it room. */
  .ux-shell .ux-workspace > .hm-page-header { position: relative; flex-direction: column; align-items: stretch; }
  /* Harvey 10-05: the header is a column here, so UXL2A-3's 320px flex-basis (a width beside the actions on a wide
     screen) became a 320px height — a dead block between the title and Ask the assistants. The text takes its own height. */
  .ux-shell .ux-workspace > .hm-page-header .hm-page-header-text { padding-right: 52px; flex: 0 1 auto; }
  .ux-shell .ux-workspace > .hm-page-header .hm-page-header-action,
  .ux-shell .ux-workspace .ux-ws-head-actions { width: 100%; }
  .ux-shell .ux-workspace .ux-ws-head-actions .ux-agent-trigger { flex: 1 1 100%; }
  .ux-shell .ux-workspace .ux-ws-head-actions .ux-ws-menu { position: absolute; top: 0; right: 0; }
}

.agent-chat-overlay { position: fixed; inset: 0; background: var(--hm-overlay); z-index: 1100; display: flex; justify-content: flex-end; }
.agent-chat-panel { background: var(--hm-surface); color: var(--hm-ink); font-family: var(--hm-font-sans); width: min(420px, 100%); max-width: 100%; height: 100%; display: flex; flex-direction: column; box-shadow: -12px 0 40px var(--hm-shadow-color-strong); }
.agent-head { flex: none; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; }
.agent-product { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 20px 14px; padding: 10px 12px; background: var(--hm-neutral); border-radius: var(--hm-radius-card); }
.agent-product-text, .agent-pick-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.agent-product-text small, .agent-pick-text small { font-size: var(--hm-fs-label); color: var(--hm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-chat-panel .tag { display: inline-block; margin-right: 6px; font-size: var(--hm-fs-label); font-weight: 600; line-height: 1.5; padding: 2px 9px; border-radius: var(--hm-radius-pill); background: var(--hm-mint); color: var(--hm-primary); }
.agent-body, .agent-transcript { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 20px; border-top: 1px solid var(--hm-line); display: flex; flex-direction: column; gap: 14px; }

/* Self-contained controls (the overlay is outside .ux-shell). */
.agent-chat-panel .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--hm-control-height); padding: 6px 14px; border: 1px solid var(--hm-primary); border-radius: var(--hm-radius-control); background: var(--hm-primary); color: var(--hm-on-dark); font: inherit; font-size: var(--hm-fs-label); font-weight: 600; line-height: 1.4; text-decoration: none; cursor: pointer; }
.agent-chat-panel .btn.secondary { background: var(--hm-surface); color: var(--hm-primary); border-color: var(--hm-line-strong); }
.agent-chat-panel .btn.ghost { background: transparent; border-color: transparent; color: var(--hm-primary); padding-left: 6px; padding-right: 6px; }
.agent-chat-panel .text-button { background: none; border: 0; padding: 0; font: inherit; color: var(--hm-primary); cursor: pointer; }
.agent-chat-panel .btn:focus-visible, .agent-chat-panel .text-button:focus-visible, .agent-chip:focus-visible, .agent-pick-item:focus-visible,
.agent-send:focus-visible, .agent-pick-select:focus-visible { outline: none; box-shadow: var(--hm-shadow-focus); }
.agent-tag-needs, .agent-tag-draft { background: var(--hm-sand); color: var(--hm-pending); }
.agent-tag-ok { background: var(--hm-success-tint); color: var(--hm-success); }
.agent-fact-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--hm-line-strong); }
.agent-fact-row dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
/* A long value wraps in its own column; the label keeps its words whole (it never shrinks to a letter a line). */
.agent-fact-row dt { flex: 0 0 auto; max-width: 45%; }
.agent-not-stated, .agent-stale { color: var(--hm-pending); font-weight: 600; }
.agent-stale { display: block; font-size: var(--hm-fs-label); font-weight: 400; }
a.agent-chip { text-decoration: none; } /* "Which field?" chips open Information (Harvey 10-02) */

/* A write is only ever a card: Draft it runs an existing draft endpoint, and the card turns into what happened. */
.agent-card { padding: 12px 14px; background: var(--hm-mint); border: 1px solid var(--hm-primary-line); border-radius: var(--hm-radius-card); display: flex; flex-direction: column; gap: 6px; }
.agent-card-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; font-size: var(--hm-fs-meta); font-weight: 600; }
.agent-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 4px; }
.agent-card-hint { margin-left: auto; font-size: var(--hm-fs-label); color: var(--hm-muted); }
/* F2: the limits a card's request set (the server keeps and enforces them; the card only names them). */
.agent-card-limits { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.agent-limit { padding: 2px 9px; border: 1px solid var(--hm-primary-line); border-radius: var(--hm-radius-pill); background: var(--hm-surface); font-size: var(--hm-fs-label); color: var(--hm-ink); overflow-wrap: anywhere; }

/* Errors: one sentence and one button, in one card. */
.agent-error-card { padding: 12px 14px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.agent-error-card p { margin: 0; font-size: var(--hm-fs-meta); line-height: 1.45; }

/* F2A · Investigate with Agent: the Agent drawer's body as three cards (§11) — What changed / What needs attention quiet,
   Next step the one that acts; a compact table; gap rows as a sand excerpt. Tokens only. */
/* ADV-S2a-1: the panel is a modal <dialog> (the top layer, above a Workbench drawer); the dialog is the full-screen
   overlay, its ::backdrop the dimming, and the Agent panel sits at its end as everywhere else. */
dialog.investigation-dialog { margin: 0; padding: 0; border: 0; max-width: none; max-height: none; width: 100%; height: 100%; background: transparent; }
dialog.investigation-dialog:not([open]) { display: none; }
dialog.investigation-dialog::backdrop { background: var(--hm-overlay); }
.investigation-body { display: flex; flex-direction: column; gap: 12px; }
.investigation-card { display: flex; flex-direction: column; gap: 8px; }
.investigation-card p { margin: 0; font-size: var(--hm-fs-label); line-height: 1.45; }
.hm-table--compact { font-size: var(--hm-fs-label); line-height: 18px; }
/* assist-sonnect R2: a row header reads as a label, not a column header — 12/600 ink, no tracking, never broken mid-word. */
.investigation-panel .hm-table--compact tbody th { font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-ink); letter-spacing: 0; text-transform: none; white-space: nowrap; min-width: 7em; }
/* F2A entry-and-focus (mock v0.3): one card per open item, the folded sections, the long question — tokens only. */
.investigation-item { margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); overflow-wrap: anywhere; }
.investigation-item-source { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 4px; color: var(--hm-muted); font-size: var(--hm-fs-label); }
.investigation-more { padding: 6px 0; border-top: 1px solid var(--hm-line); }
.investigation-more > summary { display: flex; align-items: center; gap: 6px; min-height: var(--hm-control-height); font-weight: 600; cursor: pointer; }
.investigation-question { font-size: var(--hm-fs-meta); font-weight: 600; color: var(--hm-ink); overflow-wrap: anywhere; white-space: normal; }
.investigation-question-toggle { align-self: flex-start; }
@media (max-width: 760px) {
  .investigation-item .btn, .investigation-item .text-button, .investigation-question-toggle, .investigation-more > summary, .investigation-panel .modal-close { min-height: var(--hm-touch-target); }
  .investigation-panel .modal-close { min-width: var(--hm-touch-target); }
}
/* F2A UI-C1: the way-by-way table's row headers are way labels ("Seen on ChatGPT (sampled)") — they wrap within about a
   third of the table so the dates keep their columns; nowrap stays for the single-metric table's short labels. */
.investigation-panel [data-investigation-by-way] tbody th { white-space: normal; overflow-wrap: anywhere; width: 35%; min-width: 0; }
.hm-excerpt--sand { border-left-color: var(--hm-pending-line); background: var(--hm-sand); }
.claim-item--focus { outline: 2px solid var(--hm-pending-line); outline-offset: 2px; background: var(--hm-sand); }
.investigation-fact-form { display: flex; flex-direction: column; gap: 8px; }
.investigation-fact-form .pil-field { display: flex; flex-direction: column; gap: 4px; }
/* assist-sonnect: one refusal line (a field's, the radio group's) — 11/600 danger; one hint size — 11. */
.investigation-fact-form .pil-field-error { font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-danger); }
.investigation-card p.agent-card-hint, .investigation-card .agent-card-hint { font-size: var(--hm-fs-label); }
.hm-excerpt--sand blockquote { font-size: var(--hm-fs-meta); line-height: 20px; overflow-wrap: anywhere; }

/* An answer's links to its real records (Drafts, Evidence, History). */
.agent-refs { display: flex; flex-direction: column; gap: 8px; }

/* The composer, fixed at the bottom: a text box with a round send button, and what happens to a message. */
.agent-foot { flex: none; border-top: 1px solid var(--hm-line); padding: 12px 20px 14px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 640px) { .agent-chat-panel { width: 100%; } }
@media (prefers-reduced-motion: no-preference) {
  .agent-chat-panel { animation: agent-slide-in .18s ease-out; }
  @keyframes agent-slide-in { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}

/* Ask the assistants (Harvey 10-03; Fable mock v2). One line from the question to asking again; tokens of the console. */
.ask-page { max-width: 680px; margin: 0 auto; padding: 0 0 48px; }
.ask-screen { background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: 22px 24px; display: grid; gap: 12px; min-width: 0; }
.ask-screen h1 { margin: 0; font-size: var(--hm-fs-title); line-height: var(--hm-lh-tight); color: var(--hm-ink); letter-spacing: var(--hm-ls-h1); font-weight: 600; } /* PE-1: the page's title, as it looked */
@media (max-width: 760px) { .ask-screen h1 { font-size: var(--hm-fs-title); line-height: var(--hm-lh-tight); letter-spacing: var(--hm-ls-h1-sm); } }
.ask-input { width: 100%; box-sizing: border-box; border: 1px solid var(--hm-line-strong); border-radius: var(--hm-radius-control); padding: 14px; font-size: var(--hm-fs-body); font-family: inherit; color: var(--hm-ink); background: var(--hm-surface); resize: vertical; font-weight: 400; }
.ask-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn.ask-primary { background: var(--hm-primary); color: var(--hm-on-dark); border-color: var(--hm-primary); }
.btn.ask-secondary { background: var(--hm-surface); color: var(--hm-primary); border: 1px solid var(--hm-primary-line); }
.ask-link { background: none; border: 0; padding: 0; color: var(--hm-primary); font: inherit; font-size: var(--hm-fs-label); font-weight: 600; cursor: pointer; text-decoration: underline; }
.ask-field { display: grid; gap: 4px; margin: 8px 0; font-size: var(--hm-fs-label); color: var(--hm-muted); font-weight: 600; }
.ask-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.ask-step { font-size: var(--hm-fs-label); border-radius: var(--hm-radius-pill); padding: 4px 10px; background: var(--hm-neutral); color: var(--hm-muted); }
.ask-step.on { background: var(--hm-primary); color: var(--hm-on-dark); }
.ask-step.done { background: var(--hm-success-tint); color: var(--hm-success); }
.ask-step.pulse { animation: ask-pulse 1.4s ease-in-out infinite; }
@keyframes ask-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .ask-step.pulse { animation: none; } }
.ask-q { overflow-wrap: anywhere; }
.ask-kv { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 4px 10px; font-size: var(--hm-fs-label); }
.ask-kv > div { min-width: 0; overflow-wrap: anywhere; }
.ask-kv > div:nth-child(odd) { color: var(--hm-muted); }
.ask-ev { font-size: var(--hm-fs-label); color: var(--hm-muted); border-left: 3px solid var(--hm-primary-line); padding: 6px 10px; margin: 0; background: var(--hm-bg); overflow-wrap: anywhere; }
.ask-it { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px dashed var(--hm-line); font-size: var(--hm-fs-label); min-width: 0; }
.ask-it .btn, .ask-it .ask-chip { margin-left: auto; white-space: nowrap; flex: none; }
.ask-chip { border-radius: var(--hm-radius-pill); padding: 3px 10px; font-size: var(--hm-fs-label); font-weight: 600; display: inline-block; }
.ask-chip.ok { background: var(--hm-success-tint); color: var(--hm-success); }
.ask-chip.no { background: var(--hm-danger-soft); color: var(--hm-danger); }
.ask-chip.na { background: var(--hm-neutral); color: var(--hm-muted); }
.ask-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ask-gist { font-size: var(--hm-fs-label); color: var(--hm-muted); margin: 6px 0 0; overflow-wrap: anywhere; }
.ask-gist a { color: var(--hm-primary); }
.ask-gist a.ask-ours, .ask-src.ask-ours { font-weight: 600; }
.ask-full { margin-top: 8px; color: var(--hm-ink); font-size: var(--hm-fs-meta); line-height: var(--hm-lh-prose); overflow-wrap: anywhere; }
.ask-full p { margin: 0 0 8px; }
.ask-full .ask-h { font-weight: 600; }
.ask-full ul, .ask-full ol { margin: 0 0 8px; padding-left: 20px; }
.ask-table { overflow-x: auto; max-width: 100%; }
.ask-table table { border-collapse: collapse; font-size: var(--hm-fs-label); }
.ask-table th, .ask-table td { border: 1px solid var(--hm-line); padding: 4px 8px; text-align: left; vertical-align: top; }
.ask-cite { color: var(--hm-primary); text-decoration: none; }
.ask-diff { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.ask-list { display: grid; gap: 8px; margin-bottom: 10px; }
.ask-row { display: grid; gap: 2px; min-width: 0; }
@media (max-width: 480px) {
  .ask-screen { padding: 16px; }
  .ask-diff { grid-template-columns: minmax(0, 1fr); }
  .ask-it { flex-wrap: wrap; }
  .ask-it .btn, .ask-it .ask-chip { margin-left: 0; }
}

/* ============================================================================
   ux-layout step 1 · the shared shell (Codex prototype, design §03/§05): a left sidebar on the warm canvas and the
   page beside it. Wide: sidebar 214px (185px under 1250px, 168px under 1000px). Phone (≤760px): the sidebar is a
   drawer the top line's menu button opens. A page not yet re-laid out keeps a white panel; a re-laid-out page drops
   it (.ux-layout-page) and puts its own cards on the canvas.
   ============================================================================ */
body.ux-shell .app-shell {
  display: grid; grid-template-columns: 214px minmax(0, 1fr); column-gap: 26px; align-items: start;
  max-width: 1800px; margin: 0 auto; padding: 22px; min-height: 100dvh;
  background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible;
}
body.ux-shell .app-shell > main { grid-column: 2; grid-row: 1; background: transparent; padding: 0; min-width: 0; }
/* Fixed sidebar v1.2 (Harvey 10-11, planning/ux/fixed-sidebar): every entry visible without scrolling the sidebar; a
   window too short for it turns it into the drawer (body.ux-nav-short, app.js fitShellSidebar). The page beside it is
   unchanged. */
.ux-shell .ux-sidebar {
  grid-column: 1; grid-row: 1; position: sticky; top: 16px; height: calc(100dvh - 32px - var(--hm-announce-h)); min-height: 0; margin: -6px 0; width: 220px; /* 16px from the top and the bottom while the page scrolls (the -6px margins reach past the page's 22px padding, so sticky never pushes it). 220px wide over its 214px column, so the page beside it keeps its place and width (Harvey 10-11: only the sidebar changes) */
  display: flex; flex-direction: column; gap: 0; padding: 20px 12px 12px;
  background: var(--hm-surface); border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-sm); overflow: hidden;
}
.ux-shell .ux-icon { width: var(--hm-icon-m); height: var(--hm-icon-m); flex: none; fill: none; stroke: currentColor; stroke-width: var(--hm-icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
.ux-shell .ux-avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: var(--hm-radius-pill); background: var(--hm-neutral); color: var(--hm-ink);  font-weight: 600; }
.ux-shell .ux-avatar.ux-avatar-photo { background-color: var(--hm-neutral); background-size: cover; background-position: center; background-repeat: no-repeat; } /* the uploaded photo */

/* The top line over the page: menu (phone) · search · Help, on the canvas; it stays at the top while the page scrolls. */
.ux-shell .ux-topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: var(--hm-space-3); flex-wrap: nowrap;
  margin: 0 0 var(--hm-space-4); padding: var(--hm-space-2) 0; background: var(--hm-bg); border: 0; border-radius: 0;
}
.ux-shell .ux-topbar .ux-search { flex: 0 1 360px; margin-left: auto; background: var(--hm-surface); }
.ux-shell .ux-topbar .ux-help { background: var(--hm-surface); }
.ux-shell .ux-menu { display: none; }
/* A page not yet re-laid out reads in a white panel on the canvas, as before. */
body.ux-shell .view, body.ux-shell #ux-shell-view { background: var(--hm-surface); border-radius: var(--hm-radius-card); padding: var(--hm-space-5); box-shadow: var(--hm-shadow-sm); }
body.ux-shell .view[hidden], body.ux-shell #ux-shell-view[hidden] { display: none; }
body.ux-shell #ux-shell-view.ux-layout-page, body.ux-shell .view.ux-layout-page { background: transparent; padding: 0; box-shadow: none; border-radius: 0; }
/* The account menu opens under the workspace card (placed by placeAccountPanel). */
.ux-shell .account-panel { position: fixed; z-index: 600; }

@media (max-width: 1250px) {
  body.ux-shell .app-shell { grid-template-columns: 185px minmax(0, 1fr); column-gap: 20px; padding: 18px; }
  .ux-shell .ux-sidebar { top: 18px; height: calc(100dvh - 36px - var(--hm-announce-h)); margin: 0; width: auto; }
}
@media (max-width: 1000px) {
  body.ux-shell .app-shell { grid-template-columns: 168px minmax(0, 1fr); column-gap: 16px; padding: 14px; }
  .ux-shell .ux-sidebar { top: 14px; height: calc(100dvh - 28px - var(--hm-announce-h)); margin: 0; width: auto; padding-left: var(--hm-space-2); padding-right: var(--hm-space-2); }
}
@media (max-width: 760px) {
  body.ux-shell .app-shell { display: block; padding: 0 16px 24px; margin: 0; max-width: none; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .ux-shell .ux-sidebar {
    position: fixed; z-index: 500; top: 0; left: 0; bottom: 0; width: min(280px, 86vw); height: auto; min-height: 0;
    border-radius: 0 var(--hm-radius-card) var(--hm-radius-card) 0; box-shadow: var(--hm-shadow-lg);
    transform: translateX(-105%); visibility: hidden; transition: transform 0.2s ease, visibility 0s linear 0.2s;
  }
  body.ux-shell.nav-open .ux-sidebar { transform: none; visibility: visible; transition: transform 0.2s ease; }
  .ux-shell .ux-topbar { display: flex; gap: var(--hm-space-2); margin: 0 -16px var(--hm-space-4); padding: var(--hm-space-2) 16px; }
  .ux-shell .ux-menu {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--hm-touch-target); height: var(--hm-touch-target);
    border: 1px solid var(--hm-line); border-radius: var(--hm-radius-pill); background: var(--hm-surface); color: var(--hm-ink); cursor: pointer;
  }
  .ux-shell .ux-menu:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
  .ux-shell .ux-topbar .ux-search { flex: 1 1 auto; margin-left: 0; width: auto; height: var(--hm-touch-target); padding: 0 var(--hm-space-3); position: static; }
  .ux-shell .ux-topbar .ux-search input { position: static; padding-left: 0; color: var(--hm-ink); cursor: text; }
  .ux-shell .ux-topbar .ux-search input::placeholder { color: var(--hm-muted); }
  .ux-shell .ux-topbar .ux-search:focus-within { grid-column: auto; grid-row: auto; }
  body.ux-shell .view, body.ux-shell #ux-shell-view { padding: var(--hm-space-4); }
  @media (prefers-reduced-motion: reduce) { .ux-shell .ux-sidebar, body.ux-shell.nav-open .ux-sidebar { transition: none; } }
}
@container (max-width: 660px) {
  .aio-crawler-header { display: grid; }
  .aio-crawler-state { justify-self: start; }
  .aio-crawler-list li { grid-template-columns: minmax(100px, 1fr) auto; gap: 6px 10px; }
  .aio-crawler-list li > span:nth-of-type(n + 2) { grid-column: 1 / -1; }
}

/* ============================================================================
   ux-layout 1b · Information (layout C): categories · one form · save and sources. Every category's fields stay in
   the form; only the open one shows. Warnings above stay visible whatever is open.
   ============================================================================ */
/* the section nav is as wide as its longest hint (up to 220px), so every hint is one line on a desktop; it wraps only when narrower */
.info-layout .info-grid { display: grid; grid-template-columns: fit-content(220px) minmax(0, 1fr) 240px; gap: 18px; align-items: start; }
.info-cats { display: flex; flex-direction: column; gap: var(--hm-space-1); padding: var(--hm-space-2) 0; position: sticky; top: calc(var(--hm-topbar-height) + 8px); }
.info-cat { appearance: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: left; padding: var(--hm-space-3); border: 0; border-radius: var(--hm-radius-card); background: transparent; color: var(--hm-muted); font: inherit; cursor: pointer; }
.info-cat small { font-size: var(--hm-fs-meta); color: var(--hm-muted); }
.info-cat:hover { background: var(--hm-surface); color: var(--hm-ink); }
.info-cat.active { background: var(--hm-surface); color: var(--hm-primary); box-shadow: var(--hm-shadow-sm); }
.info-main, .info-side { background: var(--hm-surface); border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-sm); min-width: 0; }
.info-main { padding: var(--hm-space-5); }
.info-side { padding: var(--hm-space-4); position: sticky; top: calc(var(--hm-topbar-height) + 8px); display: grid; gap: var(--hm-space-2); }
.info-side-label { margin: var(--hm-space-2) 0 0; font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hm-muted); }
.info-side .inline-detail-actions { display: grid; justify-content: start; justify-items: start; gap: var(--hm-space-1); margin: 0; }
.info-layout .pil-editor-form { margin: 0; }
.info-layout[data-info-category="specs"] .info-side [data-info-save],
.info-layout[data-info-category="specs"] .info-side [data-pil-dirty] { display: none; }
@media (max-width: 1250px) {
  .info-layout .info-grid { grid-template-columns: fit-content(220px) minmax(0, 1fr); }
  .info-side { grid-column: 2; position: static; }
}
@media (max-width: 760px) {
  .info-layout .info-grid { display: flex; flex-direction: column; gap: 14px; }
  .info-cats { flex-direction: row; position: static; overflow-x: auto; padding: 0 0 var(--hm-space-1); scrollbar-width: thin; max-width: 100%; width: 100%; box-sizing: border-box; }
  .info-cat { flex: none; width: auto; min-height: var(--hm-touch-target); align-content: center; padding: 0 var(--hm-space-3); }
  .info-cat small { display: none; }
  .info-side { order: 0; }
  .info-main { order: 1; padding: var(--hm-space-4); }
}
/* The sentence under the title names the page read and links to the other pages: the link is a button, which never breaks its label, so on a phone it is allowed to wrap inside the card instead of pushing the page wider. */
.info-layout .pil-page-read .hm-text-link { white-space: normal; text-align: start; max-width: 100%; overflow-wrap: anywhere; }
/* beats the workspace body's h3 label role (22px above, small caps, muted): this is a heading in the form's own voice, like the legends under it */
.ux-shell .info-layout .info-cat-title { margin: 0 0 var(--hm-space-1); font-size: var(--hm-fs-body); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--hm-ink); }
.info-layout .pil-editor-form { border: 0; padding: 0; background: transparent; box-shadow: none; overflow: visible; border-radius: 0; }
/* The saving bar is clipped by its own box, not by the form (the form must not clip): the bar is a track the form's width and the sweep moves a 32% stretch of its background, so nothing leaves the form. */
.info-layout .pil-editor-form.is-busy::after { width: auto; right: 0; background: linear-gradient(var(--hm-primary), var(--hm-primary)) -47% 0 / 32% 100% no-repeat; animation: busyBarSweep 1.15s ease-in-out infinite; }
@keyframes busyBarSweep {
  0% { background-position: -47% 0; }
  100% { background-position: 147% 0; }
}
.info-layout .pil-editor-grid > *, .info-layout .info-grid > *, .info-layout .pil-editor-section > * { min-width: 0; }
.info-layout, .info-layout .info-main, .info-layout .pil-tabpanel { min-width: 0; }

/* ux-layout 1a/1b fixes (adversarial UXL1-1..3, O2). */
/* UXL1-1: a long workspace name wraps inside its card; the sidebar never scrolls sideways. */
.ux-shell .ux-sidebar .ux-workspace { grid-template-columns: minmax(0, 1fr); white-space: normal; }
.ux-shell .ux-sidebar .ux-workspace-name, .ux-shell .ux-sidebar .ux-workspace-role { min-width: 0; overflow-wrap: anywhere; }
.ux-shell .ux-sidebar { overflow-x: hidden; }
/* UXL1-3: phone targets are 44px. */
@media (max-width: 760px) {
  .ux-shell .ux-sidebar .ux-logo { min-height: var(--hm-touch-target); align-items: center; }
  /* NAVIM W1-11: the drawer's ☰ over the spot of the top line's (app.js measures it); the logo row lines up beside it. */
  .ux-shell .ux-sidebar { padding-top: var(--hm-drawer-menu-top); }
  .ux-shell .ux-sidebar .ux-drawer-menu { position: absolute; top: var(--hm-drawer-menu-top); left: var(--hm-drawer-menu-left); }
  .ux-shell .ux-sidebar .ux-drawer-menu + .ux-logo { margin-left: calc(var(--hm-drawer-menu-left) + var(--hm-touch-target)); }
}
.ux-shell .ux-sidebar .ux-drawer-menu { z-index: 1; }
@media (min-width: 761px) { .ux-shell .ux-sidebar .ux-drawer-menu { display: none; } }
/* O2: the product link form fits its column — the URL and Save / Cancel each take a full row when it is narrow. */

/* ============================================================================
   ux-layout 1c · Evidence (layout D): the sources as a list on the left, the selected one whole on the right. The
   summary counts and the Sources / Fact check views stay above; adding a source opens its form below.
   ============================================================================ */
.ev-split { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: var(--hm-space-3); }
button.ev-row {
  white-space: normal; /* the shared button is nowrap: a source's name and note wrap inside its row */
  appearance: none; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--hm-space-3); width: 100%; min-height: var(--hm-touch-target);
  text-align: left; padding: var(--hm-space-3); border: 0; border-radius: var(--hm-radius-card); background: transparent; color: var(--hm-ink); font: inherit; cursor: pointer; box-shadow: none;
}
button.ev-row:hover { background: var(--hm-bg); color: var(--hm-ink); }
button.ev-row.selected { background: var(--hm-mint); }
button.ev-row:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
button.ev-row .tag { flex: none; white-space: nowrap; }
.ev-detail { background: var(--hm-surface); border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-sm); padding: var(--hm-space-5); min-width: 0; display: grid; gap: var(--hm-space-2); }
.ev-detail .evidence-item { border: 0; padding: 0; margin: 0; background: transparent; box-shadow: none; display: grid; gap: var(--hm-space-3); }
.ev-detail .evidence-item-heading strong { font-size: var(--hm-fs-section); line-height: 1.3; }
/* On the canvas: the counts, the library heading, the form and the fact check each read as their own card. */
.ux-layout-page .evidence-product-overview, .ux-layout-page #evidence-fact-check-panel, .ux-layout-page .evidence-form,
.ux-layout-page .evidence-library > .empty-inline, .ux-layout-page .evidence-library > .evidence-list:not(.ev-detail) {
  background: var(--hm-surface); border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-sm); padding: var(--hm-space-5);
}
.ux-layout-page .evidence-library { display: grid; gap: var(--hm-space-3); min-width: 0; border-top: 0; padding-top: 0; } /* the tab strip above already draws the line: no second one 17px under it */
.ux-layout-page .evidence-library .inline-subsection-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-2); } /* the count is on the heading's own row, not alone above it */
.ux-layout-page .evidence-library .inline-subsection-title > h3 { margin: 0; }
.ux-layout-page .evidence-library .inline-subsection-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--hm-space-2); min-width: 0; }
.ux-layout-page .evidence-library .inline-subsection-heading > div { min-width: 0; flex: 1 1 240px; }
.ux-layout-page .evidence-library .evidence-add-open { justify-self: start; width: auto; }
.ux-layout-page .evidence-workspace-root { display: grid; gap: var(--hm-space-4); min-width: 0; }
@media (max-width: 1000px) { .ev-split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .ev-detail { padding: var(--hm-space-4); } }
button.ev-row { flex-wrap: wrap; }
button.ev-row .tag { white-space: normal; max-width: 100%; }
/* The summary: the product page link, then the five counts in one row that wraps. */
.ux-layout-page .evidence-product-overview { display: grid; gap: var(--hm-space-3); align-items: start; border: 0; }
.ux-layout-page .evidence-overview-metrics { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

/* ============================================================================
   ux-layout 1d · Settings (layout F): the areas as a list on the left, one area at a time on the right, on the
   canvas. Workspace reads as its own cards — the profile, then which source wins, then your access. The other areas
   read as one card each until step 5 lays them out.
   ============================================================================ */
body.ux-shell #settings-view { background: transparent; padding: 0; box-shadow: none; border-radius: 0; }
@media (min-width: 761px) {
  body.ux-shell #settings-view .workspace, body.ux-shell #observability-view .workspace { grid-template-columns: 190px minmax(0, 1fr); column-gap: 22px; }
  body.ux-shell #settings-view #settings-header, body.ux-shell #observability-view #observability-page-header { grid-column: 1 / -1; }
  body.ux-shell #settings-view #settings-section-nav, body.ux-shell #observability-view #observability-section-nav { grid-column: 1; align-self: start; position: sticky; top: calc(var(--hm-topbar-height) + 8px); }
  body.ux-shell #settings-view #settings-section-nav .hm-section-nav, body.ux-shell #observability-view #observability-section-nav .hm-section-nav { flex-direction: column; flex-wrap: nowrap; }
  body.ux-shell #settings-view .settings-section, body.ux-shell #observability-view .settings-section { grid-column: 2; }
}
body.ux-shell #settings-view .hm-section-nav a, body.ux-shell #observability-view .hm-section-nav a { min-height: var(--hm-touch-target); border-radius: var(--hm-radius-card); }
body.ux-shell #settings-view .hm-section-nav a[aria-current="page"], body.ux-shell #observability-view .hm-section-nav a[aria-current="page"] { background: var(--hm-surface); color: var(--hm-primary); box-shadow: var(--hm-shadow-sm); }
body.ux-shell #settings-view .settings-section[data-settings-section="workspace"] { display: flex; flex-direction: column; align-items: stretch; gap: 18px; max-width: none; }
body.ux-shell #settings-view .settings-section[data-settings-section="workspace"][hidden] { display: none; }
body.ux-shell #settings-view .settings-section[data-settings-section="workspace"] > .settings-panel {
  background: var(--hm-surface); border: 0; border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-sm); padding: var(--hm-space-5); min-width: 0;
}
body.ux-shell #settings-view .settings-section:not([data-settings-section="workspace"]):not([hidden]) {
  background: var(--hm-surface); border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-sm); padding: var(--hm-space-5); min-width: 0;
}
@media (max-width: 760px) {
  body.ux-shell #settings-view #settings-section-nav .hm-section-nav, body.ux-shell #observability-view #observability-section-nav .hm-section-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: var(--hm-space-1); }
  body.ux-shell #settings-view #settings-section-nav .hm-section-nav a, body.ux-shell #observability-view #observability-section-nav .hm-section-nav a { flex: none; }
  body.ux-shell #settings-view .settings-section[data-settings-section="workspace"] > .settings-panel,
  body.ux-shell #settings-view .settings-section:not([data-settings-section="workspace"]):not([hidden]) { padding: var(--hm-space-4); }
}
/* A wide table scrolls inside its own box (the audit table in a narrow Settings column at tablet width). */
.hm-table-wrap { overflow-x: auto; max-width: 100%; position: relative; }
.hm-table-wrap { padding: 5px; margin: -5px; } /* the wrap scrolls sideways, so it clips on every side: 5px of room keeps the focus ring (3px + 2px offset) of a control in the first or last row, or in the last column, whole; the equal negative margin moves nothing */
@media (min-width: 761px) and (max-width: 1000px) {
  body.ux-shell #settings-view .workspace { grid-template-columns: 150px minmax(0, 1fr); column-gap: 16px; }
}
/* adversarial UXL1-1b: in a short window the sidebar scrolls; its parts keep their size. */
.ux-shell .ux-sidebar > * { flex-shrink: 0; }
/* UXL1B-1: the unsaved line shows in every category (Specifications too). */
.info-layout[data-info-category="specs"] .info-side [data-pil-dirty] { display: block; }
/* UXL1B-3: on a phone the categories wrap onto two rows — none is off-screen. */
@media (max-width: 760px) {
  .info-cats { flex-wrap: wrap; overflow-x: visible; }
  .info-cat { flex: 1 1 auto; justify-content: center; text-align: center; }
}
/* UXL1C-2: the summary is one full-width column; its five counts share a row that wraps. */
.ux-layout-page .evidence-product-overview { justify-content: normal; grid-template-columns: minmax(0, 1fr); }
.ev-detail .evidence-item:focus { outline: none; }
.ev-detail .evidence-item:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 4px; border-radius: var(--hm-radius-control); }

/* ============================================================================
   ux-layout 2a · the product page header and Overview (design §04 row 7): where it stands and the open work in the main
   column; AI observations, buying opportunities and where the product appears beside.
   ============================================================================ */
.ux-workspace .hm-page-header .hm-eyebrow { overflow-wrap: anywhere; }
.ov-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.ov-main, .ov-side { display: grid; gap: 18px; min-width: 0; }
.ov-side { position: sticky; top: calc(var(--hm-topbar-height) + 8px); }
.ov-card { background: var(--hm-surface); border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-sm); padding: var(--hm-space-5); min-width: 0; }
.ov-eyebrow { margin: 0 0 var(--hm-space-2); font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hm-muted); }
@media (max-width: 1100px) {
  .ov-layout { grid-template-columns: minmax(0, 1fr); }
  .ov-side { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 760px) { .ov-card { padding: var(--hm-space-4); } .ov-side { grid-template-columns: minmax(0, 1fr); } }
/* 2.8.1 · the product Overview in tabs: every panel is in the page, the layout's data-ov-show names the one that shows */
.ov-tabs { display: grid; gap: var(--hm-space-4); min-width: 0; }
.ov-tabs[data-ov-show="summary"] > .ov-panel:not([data-ov-panel="summary"]),
.ov-tabs[data-ov-show="todo"] > .ov-panel:not([data-ov-panel="todo"]),
.ov-tabs[data-ov-show="questions"] > .ov-panel:not([data-ov-panel="questions"]) { display: none; }
.ov-panel { min-width: 0; }
.ov-panel:focus { outline: none; }
.ov-panel:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.ov-next .svc-actions { margin-top: var(--hm-space-3); }

/* Inside an Overview card a section is not a second box. */
.ov-card > .ux-intents { border: 0; padding: 0; margin: 0; background: transparent; box-shadow: none; }
/* UXL1D-2: the API endpoint tables scroll inside their own box. */
.api-table-wrap { overflow-x: auto; max-width: 100%; position: relative; }

/* ux-layout 2b · a buyer question and its answer stay together: the question, then the answer as a paragraph. */
.pil-row[data-pil-row="faq"] { grid-template-columns: minmax(0, 1fr) auto; align-items: start; padding: var(--hm-space-3) 0; border: 0; border-top: 1px solid var(--hm-line); border-radius: 0; } /* a question and its answer are one entry in a list, like the other rows — not a card inside the card */
.pil-row[data-pil-row="faq"]:first-child { border-top: 0; padding-top: 0; }
.pil-row[data-pil-row="faq"] .pil-faq-field { grid-column: 1; display: grid; gap: var(--hm-space-1); font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-muted); }
.ux-shell .info-layout :is(input, textarea, select) { font-weight: 400; font-size: var(--hm-fs-body); } /* what is typed is regular weight in every row; only the labels above it are bold (the FAQ, use-case and plan fields inherited their label's 600) */
.pil-row[data-pil-row="faq"] .pil-row-remove { grid-column: 2; grid-row: 1; }
.pil-row[data-pil-row="faq"] textarea { width: 100%; min-width: 0; box-sizing: border-box; font: inherit; font-weight: 400; font-size: var(--hm-fs-body); color: var(--hm-ink); line-height: 1.55; resize: vertical; padding: 8px 10px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); }
.pil-row[data-pil-row="faq"] input { font-size: var(--hm-fs-body); font-weight: 400; color: var(--hm-ink); }
.pil-row[data-pil-row="faq"] > .pil-src, .pil-row[data-pil-row="faq"] > [class*="pil-src"] { grid-column: 1; }

/* ux-layout 2c · Publishing: the destinations, then the chosen destination's page — each a card on the canvas. */
.pub-card { background: var(--hm-surface); border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-sm); padding: var(--hm-space-5); min-width: 0; margin-bottom: 18px; }
@media (max-width: 760px) { .pub-card { padding: var(--hm-space-4); } }
/* UXL2A-3: a long product name wraps in the header; the actions move under it instead of pushing the page sideways. */
.ux-workspace .hm-page-header { flex-wrap: wrap; }
.ux-workspace .hm-page-header-text { flex: 1 1 320px; min-width: 0; }
.ux-workspace .hm-page-header h1 { overflow-wrap: anywhere; }
.ux-workspace .hm-page-header-action { max-width: 100%; }
.ux-workspace .ux-ws-head-actions { flex-wrap: wrap; }
/* Harvey 10-04: the workspace card up top (building · name · "Merchant workspace"); the person at the foot. */
.ux-shell .ux-sidebar button.ux-workspace { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: var(--hm-space-3); }
.ux-shell .ux-sidebar button.ux-workspace .ux-icon { color: var(--hm-ink); }
.ux-shell .ux-avatar { width: 38px; height: 38px; font-size: var(--hm-fs-label); }

/* ============================================================================
   Harvey 10-04 · closer to the clickable prototype: a compact top line (round search that opens when used, round Help),
   underlined page tabs, plain links in side panels, a larger logo. Cards are rounder (--hm-radius-card 18px).
   ============================================================================ */
body.ux-shell .ux-topbar .ux-search {
  flex: 0 0 auto; margin-left: auto; position: relative; width: var(--hm-control-height); height: var(--hm-control-height); min-width: 0; padding: 0; justify-content: center;
  border-radius: var(--hm-radius-pill); background: var(--hm-surface); transition: width 0.15s ease;
}
body.ux-shell .ux-topbar .ux-search input { position: absolute; inset: 0; width: 100%; padding: 0 12px 0 38px; color: transparent; background: transparent; cursor: pointer; font-size: var(--hm-fs-meta); }
body.ux-shell .ux-topbar .ux-search input::placeholder { color: transparent; }
body.ux-shell .ux-topbar .ux-search:focus-within { width: min(320px, 62vw); }
body.ux-shell .ux-topbar .ux-search:focus-within input { color: var(--hm-ink); cursor: text; }
body.ux-shell .ux-topbar .ux-search:focus-within input::placeholder { color: var(--hm-muted); }
body.ux-shell .ux-topbar .ux-help { width: var(--hm-control-height); height: var(--hm-control-height); }
@media (max-width: 760px) {
  body.ux-shell .ux-topbar .ux-search, body.ux-shell .ux-topbar .ux-help { width: var(--hm-touch-target); height: var(--hm-touch-target); }
  body.ux-shell .ux-topbar .ux-search:focus-within { width: min(320px, calc(100vw - 140px)); }
  @media (prefers-reduced-motion: reduce) { body.ux-shell .ux-topbar .ux-search { transition: none; } }
}
@media (prefers-reduced-motion: reduce) { body.ux-shell .ux-topbar .ux-search { transition: none; } }
.ux-shell .ux-sidebar .ux-logo img { height: 44px; }
/* Page tabs: a line under the open one (the prototype's page-tabs). */
body.ux-shell .ux-subnav { gap: 4px 24px; padding-bottom: 0; flex-wrap: wrap; }
body.ux-shell .ux-subnav a { padding: 0 0 12px; border-radius: 0; background: none; border-bottom: 2px solid transparent; font-size: var(--hm-fs-meta); white-space: nowrap; min-height: var(--hm-touch-target); display: inline-flex; align-items: flex-end; }
body.ux-shell .ux-subnav a.ux-sub-active { background: none; border-bottom-color: var(--hm-primary); color: var(--hm-primary); font-weight: 600; }
body.ux-shell .ux-subnav a:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
/* Side panels: their source and history entries are plain links. */
.info-side .inline-detail-actions .text-button { border: 0; padding: 0; background: none; box-shadow: none; min-height: var(--hm-control-height); color: var(--hm-primary); font-weight: 600; font-size: var(--hm-fs-meta); text-decoration: none; }
.info-side .inline-detail-actions .text-button::after { content: "→"; margin-left: var(--hm-space-1); }
.info-side .inline-detail-actions { padding: 0; }

/* ux-layout 2d · History: a filter over its three parts, each a card. Permissions: one card. */
.hist-filter { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 18px; background: var(--hm-neutral); border-radius: var(--hm-radius-control); }
.hist-filter-btn { appearance: none; border: 0; background: transparent; color: var(--hm-muted); font: inherit; font-size: var(--hm-fs-meta); font-weight: 600; min-height: var(--hm-control-height); padding: 0 var(--hm-space-3); border-radius: var(--hm-radius-control); cursor: pointer; }
.hist-filter-btn.active { background: var(--hm-surface); color: var(--hm-ink); box-shadow: var(--hm-shadow-sm); }
.hist-filter-btn:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.hist-layout[data-hist-show="scores"] .hist-part:not([data-hist-part="scores"]),
.hist-layout[data-hist-show="changes"] .hist-part:not([data-hist-part="changes"]),
.hist-layout[data-hist-show="drafts"] .hist-part:not([data-hist-part="drafts"]) { display: none; }
@media (max-width: 760px) { .hist-filter { display: flex; } .hist-filter-btn { flex: 1 1 auto; min-height: var(--hm-touch-target); } }
/* UXL3-1: Esc folds the round search back to its button, focus kept on it. */
body.ux-shell .ux-topbar .ux-search.ux-search-closed:focus-within { width: 40px; }
body.ux-shell .ux-topbar .ux-search.ux-search-closed:focus-within input { color: transparent; }
body.ux-shell .ux-topbar .ux-search.ux-search-closed:focus-within input::placeholder { color: transparent; }
body.ux-shell .ux-topbar .ux-search.ux-search-closed:focus-within { box-shadow: 0 0 0 3px var(--hm-mint); }
@media (max-width: 760px) { body.ux-shell .ux-topbar .ux-search.ux-search-closed:focus-within { width: var(--hm-touch-target); } }
/* ux-layout 3a: closed buyer questions, folded under Buying opportunities — each with "Open it again". */
.c82-closed-questions { margin-top: var(--hm-space-4); border-top: 1px solid var(--hm-line); padding-top: var(--hm-space-3); }
.c82-closed-questions > summary { cursor: pointer; font-weight: 600; min-height: var(--hm-control-height); display: flex; align-items: center; }
.c82-closed-questions ul { list-style: none; margin: var(--hm-space-2) 0 0; padding: 0; display: grid; gap: var(--hm-space-2); }
.c82-closed-questions li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--hm-space-2); padding: var(--hm-space-2) 0; border-bottom: 1px solid var(--hm-line); }
.c82-closed-questions li:last-child { border-bottom: 0; }
.qh-closed-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 240px; }
.qh-closed-text { overflow-wrap: anywhere; }

/* ============================================================================
   ux-layout 3a · Workbench › Priorities (prototype layout A): three counts that filter the list, the list in a card,
   buying opportunities and suggested plans under it; the last check and where a question starts beside.
   ============================================================================ */
body.ux-shell #ux-shell-view:has(> .wb-layout) { background: transparent; padding: 0; box-shadow: none; border-radius: 0; }
.wb-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 20px; }
.wb-stat { appearance: none; display: flex; align-items: center; justify-content: space-between; gap: var(--hm-space-3); text-align: left; padding: 20px 22px; border: 0; border-radius: var(--hm-radius-card); background: var(--hm-surface); box-shadow: var(--hm-shadow-sm); color: var(--hm-ink); font: inherit; cursor: pointer; min-width: 0; }
.wb-stat-label { font-size: var(--hm-fs-label); color: var(--hm-muted); }
.wb-stat-number { font-size: var(--hm-fs-kpi); line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.wb-stat-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--hm-radius-card); background: var(--hm-mint); color: var(--hm-primary); font-size: var(--hm-fs-body); }
.wb-stat:nth-child(3) .wb-stat-icon { background: var(--hm-pending-ring); color: var(--hm-pending); }
.wb-stat:focus-visible, .wb-filter-btn:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.wb-dashboard { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; align-items: start; }
.wb-main, .wb-side { display: grid; gap: 18px; min-width: 0; }
.wb-card { background: var(--hm-surface); border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-sm); padding: var(--hm-space-5); min-width: 0; }
.wb-cardhead { display: flex; align-items: baseline; justify-content: space-between; gap: var(--hm-space-3); margin-bottom: var(--hm-space-3); }
.wb-filter { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: var(--hm-space-3); margin-bottom: var(--hm-space-3); border-bottom: 1px solid var(--hm-line); }
.wb-filter-btn { appearance: none; border: 0; background: transparent; color: var(--hm-muted); font: inherit; font-size: var(--hm-fs-meta); min-height: var(--hm-control-height); padding: 0 var(--hm-space-3); border-radius: var(--hm-radius-control); cursor: pointer; }
.wb-list .workcards { display: grid; gap: 0; }
.wb-list .wb-row .workcard { border: 0; box-shadow: none; border-radius: 0; padding: 18px 0; margin: 0; background: transparent; }
.wb-start { background: var(--hm-mint); }
.wb-start h2 { margin: 0 0 var(--hm-space-2); font-size: var(--hm-fs-section); }
.wb-start p { margin: 0 0 var(--hm-space-3); color: var(--hm-ink); }
@media (max-width: 1100px) { .wb-dashboard { grid-template-columns: minmax(0, 1fr); } .wb-side { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
@media (max-width: 760px) {
  .wb-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .wb-stat { padding: 14px 12px; }
  .wb-stat-icon { display: none; }
  .wb-stat-number { font-size: var(--hm-fs-kpi); }
  .wb-stat-label { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
  .wb-card { padding: var(--hm-space-4); }
  .wb-side { grid-template-columns: minmax(0, 1fr); }
}
/* Inside a Priorities card a block is not a second box; the checks' actions line up on the left. */
.wb-card > .c82-opps-slot > .c82-opps, .wb-card > .ux-plan-batch-slot > .ux-plan-batch { border: 0; padding: 0; margin: 0; background: transparent; box-shadow: none; }
.wb-checks .status-line .btn.ghost { margin-left: 0; padding-left: 0; }
/* ux-layout 3b: the count on the sidebar's Drafts entry (the in-page tabs are gone). */
.ux-shell .ux-navcount { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: var(--hm-radius-pill); background: var(--hm-mint); color: var(--hm-primary); font-size: var(--hm-fs-label); font-weight: 400; text-align: center; }
/* ============================================================================
   Fixed sidebar v1.2 (Harvey 10-11; planning/ux/fixed-sidebar/fixed-sidebar-mock.html is the reference): the logo 112px
   wide, the workspace on one line, AEO | CRM, one row per entry (40px; 36px in a window under 800px tall; 44px in the
   drawer), Workbench's views in a menu beside it, and at the foot one "Ask your Agent" row and the person. Only the
   sidebar changes; the page beside it doesn't.
   ============================================================================ */
.ux-shell .ux-sidebar .ux-logo { display: block; position: relative; overflow: hidden; flex: none; width: 112px; height: 24px; margin: 0 0 16px 8px; }
.ux-shell .ux-sidebar .ux-logo img { position: absolute; max-width: none; width: 141px; height: auto; left: -15px; top: -19px; }
.ux-shell .ux-sidebar .ux-workspace { display: flex; align-items: center; gap: 10px; flex: none; height: 44px; min-width: 0; margin: 0 0 12px; padding: 6px 10px; border-radius: var(--hm-radius-control); background: var(--hm-bg); color: var(--hm-ink); }
.ux-shell .ux-sidebar .ux-workspace .ux-icon { width: var(--hm-icon-m); height: var(--hm-icon-m); }
.ux-shell .ux-sidebar .ux-workspace-text { display: grid; gap: 1px; min-width: 0; line-height: 14px; }
.ux-shell .ux-sidebar .ux-workspace-name { font-size: var(--hm-fs-meta); font-weight: 600; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.ux-shell .ux-sidebar .ux-workspace-kind { font-size: var(--hm-fs-label); line-height: 14px; color: var(--hm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.ux-shell .ux-sidebar .ux-side-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; height: 36px; margin: 0 0 16px; padding: 3px; border-radius: var(--hm-radius-control); background: var(--hm-bg); }
.ux-shell .ux-sidebar .ux-side-modes button { appearance: none; border: 0; border-radius: var(--hm-radius-control); background: transparent; color: var(--hm-muted); font: inherit; font-size: var(--hm-fs-meta); font-weight: 600; cursor: pointer; }
.ux-shell .ux-sidebar .ux-side-modes button[aria-pressed="true"] { background: var(--hm-surface); color: var(--hm-primary); box-shadow: var(--hm-shadow-sm); }
.ux-shell .ux-sidebar .ux-side-modes button:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.ux-shell .ux-sidebar .ux-nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; flex: none; min-height: 0; margin: 0; overflow: visible; mask-image: none; -webkit-mask-image: none; }
.ux-shell .ux-sidebar .ux-navset { display: flex; flex-direction: column; }
.ux-shell .ux-sidebar .ux-navset[hidden] { display: none; }
.ux-shell .ux-sidebar .ux-navlabel { height: 16px; margin: 4px 8px 2px; font-size: var(--hm-fs-label); line-height: 16px; font-weight: 600; letter-spacing: var(--hm-ls-caps); text-transform: uppercase; color: var(--hm-muted); }
.ux-shell .ux-sidebar .ux-navset > a, .ux-shell .ux-sidebar .ux-navrow > a, .ux-shell .ux-sidebar .ux-nav-future {
  display: flex; align-items: center; gap: 10px; width: 100%; height: var(--hm-control-height); min-height: var(--hm-control-height); padding: 0 8px; border: 0; border-radius: var(--hm-radius-control);
  background: transparent; color: var(--hm-muted); font: inherit; font-size: var(--hm-fs-body); font-weight: 400; line-height: 20px; text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.ux-shell .ux-sidebar .ux-navset > a > span, .ux-shell .ux-sidebar .ux-navrow > a > .ux-navrow-label, .ux-shell .ux-sidebar .ux-nav-future > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ux-shell .ux-sidebar .ux-navset > a:hover, .ux-shell .ux-sidebar .ux-navrow > a:hover, .ux-shell .ux-sidebar .ux-nav-future:hover { color: var(--hm-ink); background: var(--hm-bg); }
.ux-shell .ux-sidebar .ux-navset > a.ux-nav-active, .ux-shell .ux-sidebar .ux-navrow > a.ux-nav-active { background: var(--hm-ink); color: var(--hm-surface); font-weight: 600; }
.ux-shell .ux-sidebar .ux-nav a:focus-visible, .ux-shell .ux-sidebar .ux-nav button:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.ux-shell .ux-sidebar .ux-navrow { position: relative; display: block; min-width: 0; }
.ux-shell .ux-sidebar .ux-navrow > a { padding-right: 40px; }
.ux-shell .ux-sidebar .ux-navrow > a .ux-navcount { margin-left: auto; }
.ux-shell .ux-sidebar .ux-navviews { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 36px; height: 36px; min-height: 36px; padding: 0; border: 0; border-radius: var(--hm-radius-control); background: transparent; color: var(--hm-muted); cursor: pointer; }
.ux-shell .ux-sidebar .ux-navviews .ux-icon { width: var(--hm-icon-s); height: var(--hm-icon-s); }
.ux-shell .ux-sidebar .ux-navviews:hover, .ux-shell .ux-sidebar .ux-navviews[aria-expanded="true"] { background: var(--hm-mint); color: var(--hm-primary); }
.ux-shell .ux-sidebar .ux-navrow.is-active .ux-navviews { color: var(--hm-surface); }
.ux-shell .ux-sidebar .ux-navrow.is-active .ux-navviews:hover, .ux-shell .ux-sidebar .ux-navrow.is-active .ux-navviews[aria-expanded="true"] { background: transparent; color: var(--hm-surface); }
.ux-shell .ux-sidebar .ux-nav-soon, .ux-nav-soon { margin-left: auto; flex: none; font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-pending); background: var(--hm-sand); border-radius: var(--hm-radius-pill); padding: 1px 7px; line-height: 16px; }
.ux-shell .ux-sidebar .ux-crm-soon { height: 20px; margin: 2px 0 0; font-size: var(--hm-fs-label); line-height: 20px; font-weight: 600; text-align: center; color: var(--hm-pending); }
.ux-shell .ux-navpop { position: fixed; z-index: 600; min-width: 200px; max-width: calc(100vw - 32px); padding: 8px; border-radius: var(--hm-radius-card); background: var(--hm-surface); box-shadow: var(--hm-shadow-lg); }
.ux-shell .ux-navpop[hidden] { display: none; }
.ux-shell .ux-navpop-title { margin: 4px 10px 8px; font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-muted); }
.ux-shell .ux-navpop a { display: flex; align-items: center; gap: 4px; width: 100%; min-height: var(--hm-touch-target); padding: 10px; border-radius: var(--hm-radius-control); color: var(--hm-ink); font-size: var(--hm-fs-meta); text-decoration: none; }
.ux-shell .ux-navpop a:hover { background: var(--hm-bg); }
.ux-shell .ux-navpop a.ux-navsub-active { background: var(--hm-mint); color: var(--hm-primary); font-weight: 600; }
.ux-shell .ux-navpop a .ux-navcount { margin-left: 0; }
.ux-shell .ux-navpop a:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.ux-shell .ux-navcount { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: var(--hm-radius-pill); background: var(--hm-mint); color: var(--hm-primary); font-size: var(--hm-fs-label); font-weight: 400; text-align: center; }
.ux-shell .ux-sidebar-foot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; flex: none; margin-top: auto; padding-top: 8px; }
.ux-shell .ux-sidebar-foot > * { min-width: 0; }
.ux-shell .ux-sidebar-foot .ux-side-agent { appearance: none; display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: var(--hm-control-height); padding: 8px 10px; border: 0; border-radius: var(--hm-radius-control); background: var(--hm-mint); color: var(--hm-primary); font: inherit; font-size: var(--hm-fs-meta); font-weight: 600; line-height: 1.3; text-align: left; cursor: pointer; }
.ux-shell .ux-sidebar-foot .ux-side-agent:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.ux-shell .ux-sidebar-foot button.ux-user { appearance: none; display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--hm-control-height); margin: 0; padding: 4px; border: 0; border-radius: var(--hm-radius-control); background: transparent; color: var(--hm-ink); font: inherit; text-align: left; cursor: pointer; }
.ux-shell .ux-sidebar-foot button.ux-user:hover { background: var(--hm-bg); }
.ux-shell .ux-sidebar-foot button.ux-user[aria-expanded="true"] { background: var(--hm-mint); }
.ux-shell .ux-sidebar-foot button.ux-user:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.ux-shell .ux-sidebar-foot .ux-avatar { width: 30px; height: 30px; min-width: 30px; font-size: var(--hm-fs-label); }
.ux-shell .ux-sidebar-foot .ux-user-text { display: grid; min-width: 0; line-height: 15px; }
.ux-shell .ux-sidebar-foot .ux-user-email { font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ux-shell .ux-sidebar-foot .ux-user-role { font-size: var(--hm-fs-label); color: var(--hm-muted); }
/* A desktop window under 800px tall: 36px rows and the tighter top (design §2a/§3: mouse targets 36px; touch keeps its
   own size, so only a fine pointer gets them). */
@media (min-width: 761px) and (max-height: 799px) and (pointer: fine) {
  .ux-shell .ux-sidebar { padding-top: 16px; }
  .ux-shell .ux-sidebar .ux-logo { height: 22px; margin-bottom: 12px; }
  .ux-shell .ux-sidebar .ux-workspace { height: 40px; margin-bottom: 8px; }
  .ux-shell .ux-sidebar .ux-side-modes { margin-bottom: 12px; }
  .ux-shell .ux-sidebar .ux-navlabel { margin-bottom: 0; }
  .ux-shell .ux-sidebar .ux-navset > a, .ux-shell .ux-sidebar .ux-navrow > a, .ux-shell .ux-sidebar .ux-nav-future { height: 36px; min-height: 36px; }
  .ux-shell .ux-sidebar .ux-navviews { top: 0; }
  .ux-shell .ux-sidebar-foot .ux-side-agent, .ux-shell .ux-sidebar-foot button.ux-user { min-height: 36px; }
  .ux-shell .ux-sidebar-foot .ux-side-agent { padding-top: 6px; padding-bottom: 6px; }
  .ux-shell .ux-sidebar-foot .ux-user-text { line-height: 13px; }
}
/* A touch screen wider than a phone (a tablet at 768): 44px targets in the sidebar too (design §3; test2 P3 on 8b534a45). */
@media (min-width: 761px) and (pointer: coarse) {
  .ux-shell .ux-sidebar .ux-side-modes { height: var(--hm-touch-target); }
  .ux-shell .ux-sidebar .ux-navset > a, .ux-shell .ux-sidebar .ux-navrow > a, .ux-shell .ux-sidebar .ux-nav-future { height: var(--hm-touch-target); min-height: var(--hm-touch-target); }
  .ux-shell .ux-sidebar .ux-navrow > a { padding-right: 48px; }
  .ux-shell .ux-sidebar .ux-navviews { top: 0; right: 0; width: var(--hm-touch-target); height: var(--hm-touch-target); min-height: var(--hm-touch-target); }
  .ux-shell .ux-sidebar-foot .ux-side-agent, .ux-shell .ux-sidebar-foot button.ux-user { min-height: var(--hm-touch-target); }
}
/* The drawer (phone width, or a desktop window too short for every entry): 260px wide, 44px targets, scrolls inside. */
@media (max-width: 760px) {
  .ux-shell .ux-sidebar { width: min(260px, 86vw); margin: 0; padding: 20px 12px 12px; overflow-y: auto; }
  /* v1.2 (assist-sonnect P3 on 27fc3cbd): the drawer's close ☰ at its top right, the logo in its own place on the left. */
  .ux-shell .ux-sidebar .ux-drawer-menu { top: 8px; left: auto; right: 10px; border: 0; border-radius: var(--hm-radius-control); background: var(--hm-bg); }
  .ux-shell .ux-sidebar .ux-drawer-menu + .ux-logo { margin-left: 8px; }
  .ux-shell .ux-sidebar .ux-logo { height: var(--hm-touch-target); }
  .ux-shell .ux-sidebar .ux-logo img { top: -9px; }
  .ux-shell .ux-sidebar .ux-side-modes { height: var(--hm-touch-target); }
  .ux-shell .ux-sidebar .ux-navset > a, .ux-shell .ux-sidebar .ux-navrow > a, .ux-shell .ux-sidebar .ux-nav-future { height: var(--hm-touch-target); min-height: var(--hm-touch-target); }
  .ux-shell .ux-sidebar .ux-navrow > a { padding-right: 48px; }
  .ux-shell .ux-sidebar .ux-navviews { top: 0; right: 0; width: var(--hm-touch-target); height: var(--hm-touch-target); min-height: var(--hm-touch-target); }
  .ux-shell .ux-sidebar-foot .ux-side-agent, .ux-shell .ux-sidebar-foot button.ux-user { min-height: var(--hm-touch-target); }
}
body.ux-shell.ux-nav-short .app-shell { grid-template-columns: minmax(0, 1fr); }
body.ux-shell.ux-nav-short .app-shell > main { grid-column: 1; }
body.ux-shell.ux-nav-short .ux-sidebar {
  position: fixed; z-index: 500; top: 0; left: 0; bottom: 0; width: 260px; height: auto; margin: 0; padding: 20px 12px 12px; overflow-y: auto;
  border-radius: 0 var(--hm-radius-card) var(--hm-radius-card) 0; box-shadow: var(--hm-shadow-lg);
  transform: translateX(-105%); visibility: hidden; transition: transform 0.2s ease, visibility 0s linear 0.2s;
}
body.ux-shell.ux-nav-short.nav-open .ux-sidebar { transform: none; visibility: visible; transition: transform 0.2s ease; }
body.ux-shell.ux-nav-short .ux-sidebar .ux-drawer-menu { display: inline-flex; position: absolute; top: 8px; right: 10px; }
body.ux-shell.ux-nav-short .ux-sidebar .ux-drawer-menu + .ux-logo { margin-left: 8px; }
body.ux-shell.ux-nav-short .ux-topbar .ux-menu, body.ux-shell.ux-nav-short .ux-sidebar .ux-drawer-menu {
  align-items: center; justify-content: center; flex: none; width: var(--hm-touch-target); height: var(--hm-touch-target);
  border: 1px solid var(--hm-line); border-radius: var(--hm-radius-pill); background: var(--hm-surface); color: var(--hm-ink); cursor: pointer;
}
body.ux-shell.ux-nav-short .ux-topbar .ux-menu { display: inline-flex; }
body.ux-shell.ux-nav-short .ux-sidebar .ux-drawer-menu { left: auto; border: 0; border-radius: var(--hm-radius-control); background: var(--hm-bg); }
body.ux-shell.ux-nav-short .ux-sidebar .ux-navset > a, body.ux-shell.ux-nav-short .ux-sidebar .ux-navrow > a, body.ux-shell.ux-nav-short .ux-sidebar .ux-nav-future { height: var(--hm-touch-target); min-height: var(--hm-touch-target); }
@media (prefers-reduced-motion: reduce) { body.ux-shell.ux-nav-short .ux-sidebar { transition: none; } }
/* Fixed sidebar v1.2 · Harvey 10-11 (screenshot on the local site): the account menu the person at the foot opens is
   compact, and its items read like the sidebar's entries — plain text rows, no boxes. */
.ux-shell .account-panel { width: 240px; gap: 4px; padding: 12px; border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-lg); }
.ux-shell .account-panel .account-menu-close { top: 4px; right: 4px; font-size: var(--hm-fs-section); }
.ux-shell .account-panel .account-profile { gap: 4px; padding-top: 4px; }
.ux-shell .account-panel .avatar-large { width: 48px; font-size: var(--hm-fs-body); box-shadow: none; }
.ux-shell .account-panel .avatar-help { font-size: var(--hm-fs-label); font-weight: 600; }
.ux-shell .account-panel .account-copy strong { font-size: var(--hm-fs-meta); }
.ux-shell .account-panel .account-copy span { font-size: var(--hm-fs-label); }
.ux-shell .account-panel .tenant-switcher { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; width: 100%; margin: 8px 0 4px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.ux-shell .account-panel .tenant-switcher span { font-size: var(--hm-fs-meta); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--hm-muted); } /* "Workspace", sentence case at 13px (Harvey 10-24) */
.ux-shell .account-panel .account-copy span { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: var(--hm-fs-meta); color: var(--hm-muted); } /* "Owner" likewise */
.ux-shell .account-panel .tenant-switcher select { width: 100%; max-width: none; font-size: var(--hm-fs-meta); }
.ux-shell .account-panel .account-status:empty { display: none; }
.ux-shell .account-panel .ghost-button, .ux-shell .account-panel a.ghost-button {
  display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: var(--hm-control-height); padding: 0 8px;
  border: 0; border-radius: var(--hm-radius-control); background: transparent; box-shadow: none;
  color: var(--hm-muted); font-size: var(--hm-fs-body); font-weight: 400; text-align: left; text-decoration: none;
}
.ux-shell .account-panel .ghost-button:hover, .ux-shell .account-panel a.ghost-button:hover { background: var(--hm-bg); color: var(--hm-ink); }
.ux-shell .account-panel .ghost-button:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.ux-shell .account-panel .account-settings-link.is-active, .ux-shell .account-panel .account-settings-link.is-active:hover { background: var(--hm-selected); color: var(--hm-ink); font-weight: 600; } /* the page you are on reads as column 2's selected row, never a black bar (Harvey 10-24) */
.wb-list:not([data-wb-show="all"]) .ux-cardnote { display: none; }
/* UXL3A-2: on a phone the counts and the tabs are 44px targets. */
@media (max-width: 760px) { .wb-stat, .wb-filter-btn { min-height: var(--hm-touch-target); } }

/* ux-layout 3a · rework (Harvey: "the Workbench is completely different") — the prototype's rows, icons and side cards. */
.wb-stat-icon .ux-icon { width: var(--hm-icon-m); height: var(--hm-icon-m); }
.wb-stat:nth-child(2) .wb-stat-icon { background: var(--hm-pending-ring); color: var(--hm-pending); }
.wb-stat:nth-child(3) .wb-stat-icon { background: var(--hm-mint); color: var(--hm-primary); }
.wb-task { display: flex; align-items: flex-start; gap: var(--hm-space-4); padding: 20px 0; }
.wb-tile { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: var(--hm-radius-card); background: var(--hm-neutral); color: var(--hm-primary); }
.wb-task-body { flex: 1 1 auto; min-width: 0; }
.wb-task-detail { margin: 0; font-size: var(--hm-fs-label); line-height: 1.5; color: var(--hm-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wb-task-btn { flex: none; align-self: center; display: inline-flex; align-items: center; gap: var(--hm-space-2); white-space: nowrap; }
.wb-task-btn .ux-icon { width: var(--hm-icon-s); height: var(--hm-icon-s); }
.wb-dot { flex: none; width: 7px; height: 7px; margin-top: 8px; border-radius: var(--hm-radius-pill); background: var(--hm-primary-muted); }
.wb-recent-all { display: inline-flex; align-items: center; min-height: var(--hm-control-height); margin-top: var(--hm-space-2); font-size: var(--hm-fs-meta); font-weight: 600; color: var(--hm-primary); text-decoration: none; }
.wb-note { margin: 0; padding: 0 var(--hm-space-3); font-size: var(--hm-fs-label); color: var(--hm-muted); }
.wb-note a { color: var(--hm-primary); font-weight: 600; }
@media (max-width: 760px) {
  .wb-task { flex-wrap: wrap; gap: var(--hm-space-3); }
  .wb-task-body { flex-basis: calc(100% - 60px); }
  .wb-task-btn { margin-left: 56px; min-height: var(--hm-touch-target); }
}
.wb-qtools { display: grid; gap: var(--hm-space-3); padding: var(--hm-space-3) 0; } /* no rule of its own: the first row's top border is the divider (2.7.3.9: two lines 2px apart) */
.wb-qstate { margin: var(--hm-space-3) 0 0; }
.wb-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(640px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; border-radius: var(--hm-radius-card) 0 0 var(--hm-radius-card); background: var(--hm-surface); color: var(--hm-ink); box-shadow: var(--hm-shadow-sm); overflow: hidden; }
.wb-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--hm-space-3); padding: var(--hm-space-4) var(--hm-space-5); border-bottom: 1px solid var(--hm-line); }
.wb-drawer-close { min-width: var(--hm-touch-target); min-height: var(--hm-touch-target); font-size: var(--hm-fs-section); }
.wb-drawer-body { overflow-y: auto; overflow-x: hidden; padding: var(--hm-space-4) var(--hm-space-5) var(--hm-space-6); }
@media (max-width: 760px) { .wb-drawer { border-radius: 0; } .wb-drawer-head, .wb-drawer-body { padding-left: var(--hm-space-4); padding-right: var(--hm-space-4); } }

/* ux-layout (Harvey 10-04): the announcement — one green bar across the top of every page, white words. */
/* Harvey 10-04: the words start where the shell's left column (the sidebar) starts — the shell's own gutter (22 / 18 /
   14px, 16px on a phone), and on a screen wider than the shell's 1800px the same centring. Dismiss is a link in the
   sentence, so the bar is one line where it fits. */
body.ux-shell > .ux-announce { display: block; margin: 0; padding: var(--hm-space-2) max(22px, calc((100% - 1800px) / 2 + 22px)); border: 0; border-radius: 0; background: var(--hm-primary); color: var(--hm-on-dark); }
@media (max-width: 1250px) { body.ux-shell > .ux-announce { padding-left: 18px; padding-right: 18px; } }
@media (max-width: 1000px) { body.ux-shell > .ux-announce { padding-left: 14px; padding-right: 14px; } }
body.ux-shell > .ux-announce p { margin: 0; font-size: var(--hm-fs-meta); line-height: var(--hm-lh-body); color: var(--hm-on-dark); }
/* Harvey's feedback 17: one line at every width — the words cut with an ellipsis, then Details (only when they don't fit) and Dismiss. Layout only. */
body.ux-shell > .ux-announce > p { display: flex; align-items: baseline; gap: var(--hm-space-4); white-space: nowrap; } /* 16px: the two links' targets (8px each side) don't overlap */
.ux-announce-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ux-announce-details[hidden] { display: none; }
.ux-announce-pop { position: fixed; z-index: 70; max-width: min(480px, calc(100vw - 32px)); }
body.ux-shell > .ux-announce strong { color: var(--hm-on-dark); }
.ux-announce-dismiss, .ux-announce-details { appearance: none; display: inline; position: relative; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--hm-on-dark); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: var(--hm-fs-label); }
.ux-announce-dismiss::after, .ux-announce-details::after { content: ""; position: absolute; inset: -12px -8px; } /* a 44px target around the link */
.ux-announce-dismiss:focus-visible, .ux-announce-details:focus-visible { outline: 3px solid var(--hm-on-dark); outline-offset: 2px; } /* ADV-FIN-3: a light ring on the bar's green */
/* ADV-H-1: on a phone the bar's padding holds the Dismiss link's whole 44px target (12px around a 21px line). */
@media (max-width: 760px) { body.ux-shell > .ux-announce { padding: var(--hm-space-3) 16px; } }
/* On a phone both links' targets are 44px (13px around the 18px line), inside the bar's padding. */
@media (max-width: 760px) { body.ux-shell > .ux-announce { padding-top: 13px; padding-bottom: 13px; } .ux-announce-dismiss::after, .ux-announce-details::after { inset: -13px -8px; } }
@media (max-width: 760px) { .ux-shell .wb-layout .wb-task-btn, .ux-shell .wb-layout .wb-start .btn, .ux-shell .wb-layout .wb-recent-all, .ux-shell .wb-layout .wb-checks .btn.ghost { min-height: var(--hm-touch-target); display: inline-flex; align-items: center; } }
/* ux-layout 4 (prototype page 11): Results — the product scope bar, four tabs, one panel at a time; Overview's cards. */
.ux-shell .results-page.ux-results { display: block; }
.ux-shell .results-scope { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-3) var(--hm-space-5); margin: var(--hm-space-5) 0; padding: var(--hm-space-4) var(--hm-space-5); background: var(--hm-surface); border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-sm); }
.ux-shell .results-scope .results-picker { display: flex; align-items: center; gap: var(--hm-space-3); margin: 0; font-size: var(--hm-fs-label); font-weight: 600; }
.ux-shell .results-panel > .results-card, .ux-shell .results-panel > .results-advanced { margin: 0; padding: var(--hm-space-5); background: var(--hm-surface); border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-sm); }
.ux-shell .results-ov { display: grid; gap: var(--hm-space-5); }
.ux-shell .results-ov-top { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--hm-space-5); align-items: start; }
.ux-shell .results-ov-bottom { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--hm-space-5); align-items: start; }
.ux-shell .results-ov-card { min-width: 0; padding: var(--hm-space-5); background: var(--hm-surface); border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-sm); }
.ux-shell .results-ov-eyebrow { margin: 0; font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: var(--hm-ls-caps); text-transform: uppercase; color: var(--hm-muted); }
.ux-shell .results-ov-open { display: inline-grid; place-items: center; min-width: var(--hm-control-height); min-height: var(--hm-control-height); color: var(--hm-primary); text-decoration: none; }
.ux-shell .results-link { appearance: none; display: inline-flex; align-items: center; min-height: var(--hm-control-height); padding: 0; border: 0; background: transparent; color: var(--hm-primary); font: inherit; font-size: var(--hm-fs-label); font-weight: 600; text-decoration: none; cursor: pointer; }
@media (max-width: 760px) { .ux-shell .results-metric > .results-metric-value { font-size: var(--hm-fs-kpi); } }
.ux-shell .results-link:hover { text-decoration: underline; }
.ux-shell .results-link:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.ux-shell .results-page.ux-results > .hm-page-header { margin-bottom: 0; }
@media (max-width: 1100px) { .ux-shell .results-ov-top, .ux-shell .results-ov-bottom { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .ux-shell .results-scope { padding: var(--hm-space-4); }
  .ux-shell .results-scope .results-picker { width: 100%; justify-content: space-between; }
  .ux-shell .results-ov-open, .ux-shell .results-link { min-height: var(--hm-touch-target); }
  .ux-shell .results-ov-card, .ux-shell .results-panel > .results-card, .ux-shell .results-panel > .results-advanced { padding: var(--hm-space-4); }
}
.ask-review .ask-col .ask-input { min-height: 132px; font-size: var(--hm-fs-body); padding: var(--hm-space-3); line-height: 1.5; }
/* ux-layout 3b-2: Drafts and Activity, one card each (prototype). */
.ux-shell .wb-views .wb-card { padding: var(--hm-space-5); }
.ux-shell .wb-drafts-product { display: flex; align-items: center; gap: var(--hm-space-2); font-size: var(--hm-fs-meta); font-weight: 600; }
.ux-shell .wb-drafts-product select { min-height: var(--hm-control-height); max-width: 240px; }
.ux-shell .wb-group { margin: var(--hm-space-4) 0 var(--hm-space-1); font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: var(--hm-ls-caps); text-transform: uppercase; color: var(--hm-muted); }
.ux-shell .wb-drafts .ux-draftrow { display: flex; align-items: center; gap: var(--hm-space-4); padding: var(--hm-space-4) 0; border: 0; border-bottom: 1px solid var(--hm-line); border-radius: 0; background: transparent; box-shadow: none; }
.ux-shell .wb-tl-row { display: flex; align-items: center; gap: var(--hm-space-4); padding: var(--hm-space-3) 0; border-bottom: 1px solid var(--hm-line); }
.ux-shell .wb-activity [hidden] { display: none; }
@media (max-width: 760px) {
  .ux-shell .wb-views .wb-card { padding: var(--hm-space-4); }
  .ux-shell .wb-drafts .ux-draftrow, .ux-shell .wb-tl-row { flex-wrap: wrap; align-items: flex-start; }
  .ux-shell .wb-drafts .ux-draftrow > .btn { margin-left: calc(44px + var(--hm-space-4)); min-height: var(--hm-touch-target); }
  .ux-shell .wb-drafts-product { width: 100%; justify-content: space-between; }
}
/* ux-layout 5 (prototype page 02): Products — the header on the canvas, then one card: search and sort, the summary in
   one line, the list (a tile, Work waiting, Information, the score, Open), the pages. */
.ux-shell #products-view .page-header-row { margin-bottom: var(--hm-space-5); }
.ux-shell .ux-products-card { padding: var(--hm-space-5); background: var(--hm-surface); border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-sm); }
.ux-shell .ux-products-toolbar select { min-height: var(--hm-control-height); }
.ux-shell .ux-products-summary { display: flex; flex-wrap: wrap; gap: var(--hm-space-2); margin: 0 0 var(--hm-space-4); }
.ux-shell .ux-products-summary article { transition: none; display: flex; align-items: center; gap: var(--hm-space-1); min-height: 0; line-height: 1.3; padding: var(--hm-space-1) var(--hm-space-3); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-pill); background: var(--hm-bg); box-shadow: none; }
.ux-shell .ux-products-summary article strong { font-size: var(--hm-fs-meta); }
.ux-shell .ux-products-summary article > span { font-size: var(--hm-fs-label); color: var(--hm-muted); }
.ux-shell .ux-products-summary .quick-stat-filter { display: flex; align-items: center; gap: var(--hm-space-1); min-height: 0; padding: 0; border: 0; background: transparent; font: inherit; line-height: 1.3; cursor: pointer; }
/* Harvey 10-04: number, label and ⓘ sit on the pill's centre line (the summary's numbers and words share one line-height). */
.ux-shell .ux-products-summary article strong, .ux-shell .ux-products-summary article > span, .ux-shell .ux-products-summary .quick-stat-filter > span { line-height: 1.3; }
/* The big cards reserve two lines for a label (min-height, line clamp); a pill holds one line — no reserved line pushing
   the words up. */
.ux-shell .ux-products-summary article > span, .ux-shell .ux-products-summary .quick-stat-filter > span { display: block; min-height: 0; -webkit-line-clamp: unset; }
/* The Needs attention filter keeps a 44px target on a phone without making its pill taller than the others (the target
   grows up and down only, so it never reaches the ⓘ beside it). */
.ux-shell .ux-products-summary .quick-stat-filter { position: relative; }
.ux-shell .ux-products-summary .quick-stat-filter > span { font-size: var(--hm-fs-label); font-weight: 400; letter-spacing: 0; color: var(--hm-muted); } /* the same words as the other pills */
@media (max-width: 760px) { .ux-shell .ux-products-summary .quick-stat-filter::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); } }
.ux-shell .ux-products-summary .quick-stat-about { display: inline-flex; align-items: center; }
.ux-shell .ux-products-summary .quick-stat-attention { position: relative; gap: var(--hm-space-3); } /* WS-2: the info button's 44px target clears the filter button */
.ux-shell .ux-products-summary .quick-stat-about { position: static; }
.ux-shell .ux-products-card .table-wrap { border: 0; box-shadow: none; background: transparent; }
.ux-shell .ux-products-card .products-table th { background: transparent; font-size: var(--hm-fs-label); letter-spacing: 0; text-transform: none; color: var(--hm-muted); }
.ux-shell .products-table .col-info .row-updated { display: block; margin-top: var(--hm-space-1); font-size: var(--hm-fs-label); }
.ux-shell .products-table .row-actions-cell { text-align: right; white-space: nowrap; }
.ux-shell .products-table .row-actions-cell .row-actions { justify-content: flex-end; margin: 0; }
.ux-shell .products-table .row-actions .row-btn--primary { background: var(--hm-surface); color: var(--hm-ink); border: 1px solid var(--hm-line-strong); }
.ux-shell .products-table .row-actions .row-btn--primary:hover { border-color: var(--hm-primary); color: var(--hm-primary); }
@media (max-width: 760px) {
  .ux-shell .ux-products-card { padding: var(--hm-space-4); }
  .ux-shell .products-table .row-actions-cell { text-align: left; white-space: normal; }
  .ux-shell .products-table .row-actions-cell .row-actions { justify-content: flex-start; }
}
.ux-shell .ux-prod-id .wb-tile .ux-icon { display: block; width: var(--hm-icon-m); height: var(--hm-icon-m); }
/* Harvey 10-11 (production): every row's Information cell starts at the same place — the cell reads from its top (a
   taller row no longer pushes it down), and the status and category pills sit on one centred row at the same x. */
.ux-shell .products-table td.col-info { vertical-align: top; }
.ux-shell .products-table .col-info .info-pills { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-1); }
.ux-shell .products-table .product-name-link { color: var(--hm-ink); text-decoration: none; }
.ux-shell .products-table .product-name-link:hover { color: var(--hm-primary); text-decoration: underline; }
.ux-shell .products-table .product-name-link:focus-visible { outline: none; outline-offset: -3px; } /* the clamped name clips outside it, so the ring is drawn on the name's own box (one rectangle, not a broken line round each of two lines) */
.ux-shell .products-table .product-cell strong:has(.product-name-link:focus-visible) { outline: 3px solid var(--hm-primary); outline-offset: -3px; border-radius: var(--hm-radius-control); }
/* ux-layout 5: Developers — the keys first; the API documentation in one fold. */
.ux-shell .api-docs { margin-top: var(--hm-space-5); border-top: 1px solid var(--hm-line); padding-top: var(--hm-space-4); }
.ux-shell .api-docs > summary { min-height: var(--hm-touch-target); display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--hm-ink); }
.ux-shell .api-docs[open] > summary { margin-bottom: var(--hm-space-3); }
/* UXL5A-1: the Products toolbar and rows on a phone — every control 44px. */
@media (max-width: 760px) {
  .ux-shell .ux-products-toolbar #products-refresh, .ux-shell .ux-products-toolbar select, .ux-shell #products-page-size, .ux-shell #products-prev, .ux-shell #products-next, .ux-shell .products-table .row-btn--more, .ux-shell .products-table .row-btn--primary { min-height: var(--hm-touch-target); }
  .ux-shell .ux-products-summary .quick-stat-filter { align-items: center; }
}
/* ux-layout 5 (design §04 rows 26–27): Recommendation funnel and Observability — the header on the canvas, each section a
   card. */
.ux-shell #funnel-view .funnel-section, .ux-shell #observability-view .funnel-section { margin: 0 0 var(--hm-space-5); padding: var(--hm-space-5); background: var(--hm-surface); border: 0; border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-sm); }
.ux-shell #funnel-view .funnel-section > h3, .ux-shell #observability-view .funnel-section > h3 { margin-top: 0; font-size: var(--hm-fs-body); }
@media (max-width: 760px) { .ux-shell #funnel-view .funnel-section, .ux-shell #observability-view .funnel-section { padding: var(--hm-space-4); } }
/* OWNRES fix1 (assist-sonnect 50c23cec, 320): in the Settings column a wide funnel table scrolls inside its card instead of being clipped. */
.ux-shell #observability-view .funnel-section { min-width: 0; }
.ux-shell #observability-view .funnel-table { display: block; max-width: 100%; overflow-x: auto; } /* only the table scrolls, never the whole card (assist c85a457a P3) */

/* WS-2 (site acceptance 59e3d9cd, recheck e66525e1): on a phone every control is at least 44px tall — the control
   height token (:root) does that for the 58 rules that read it; the info button keeps its 22px circle and gets a 44px
   target around it. */
@media (max-width: 760px) {
  .hm-info-btn::after { inset: -12px; } /* a 44px target around the 22px circle and its 1px border (F2B B3-9: -11 measured 41–42) */
}

/* Harvey 10-04 (feedback 8): room at the content column's foot for the fixed footer line (34px) and a gap, so the
   last card is never under it. Last in the file: it follows the shell's own `main { padding: 0 }`. */
body.ux-shell .app-shell > main { padding-bottom: 52px; }

/* Harvey 10-04: the plan's benefits (a short list) and "See plans" (every plan, its benefits and Stripe's amount). */
.plan-features[data-plan-benefits] { display: block; }
/* PRICEHIST (Harvey 10-10, §40): Plan & billing — a pack row is a purchase (quantity + Buy); packs you have are said once,
   in Your plan; a renewal's grace (sand), a stopped plan (mint) and a payment that didn't go through (danger). */
.ux-shell .ux-notice.bill-notice-mint { background: var(--hm-mint); border-color: var(--hm-primary-line); }
.ux-shell .ux-notice.cr-notice-sand[data-billing-notice] p { color: var(--hm-ink); } /* the sand family reads in ink (question page R2, draft cards) */
.ux-shell .ux-notice.cr-notice-danger p strong, .ux-shell .ux-notice.cr-notice-sand p strong, .ux-shell .ux-notice.bill-notice-mint p strong { display: block; color: inherit; } /* one text colour per notice */
.addon-pack-later { font-size: var(--hm-fs-meta); }
.addon-packs { display: grid; }
.addon-pack { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--hm-line); }
.addon-pack:first-child { border-top: none; }
.addon-pack-text { display: grid; gap: 2px; font-size: var(--hm-fs-meta); }
.addon-pack-text > * { margin: 0; } /* the name and its line stay one block, so the quantity and Buy centre on the two of them */
.addon-packs[data-addon-email] { margin-top: var(--hm-space-3); border-top: 1px solid var(--hm-line); } /* the email pack is a row like the others, set off from the packs above and their note */
.addon-pack-name { font-weight: 600; color: var(--hm-ink); }
.addon-pack-buy { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.addon-pack-notice { grid-column: 1 / -1; margin: 0; }
.addon-qty { display: inline-flex; align-items: center; height: var(--hm-control-height); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); } /* no clip: the end buttons carry the corners (below), so no control's corner is cut by the rounded box (measure contentClipped) */
.addon-qty button:first-child { border-radius: var(--hm-radius-control) 0 0 var(--hm-radius-control); }
.addon-qty button:last-child { border-radius: 0 var(--hm-radius-control) var(--hm-radius-control) 0; }
.addon-qty button { width: var(--hm-control-height); height: 100%; border: none; background: transparent; color: var(--hm-ink); font-size: var(--hm-fs-section); cursor: pointer; }
.addon-qty output { margin: 0; min-width: 32px; text-align: center; font-weight: 600; font-size: var(--hm-fs-meta); }
@media (max-width: 640px) {
  .addon-pack { grid-template-columns: minmax(0, 1fr); }
  .addon-pack-buy { justify-content: flex-start; }
}
/* DOWNPER (Harvey 10-10, mock approved): the confirm step — what changes, what is paid now (Stripe's preview), a promotion
   code, the card that pays, Confirm. Nothing is charged before Confirm. */
.bill-confirm { margin: var(--hm-space-3) 0; padding: var(--hm-space-4); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); max-width: 560px; }
.addon-pack .bill-confirm { grid-column: 1 / -1; }
.bill-confirm-code { display: flex; gap: 8px; flex-wrap: wrap; margin: var(--hm-space-3) 0 var(--hm-space-1); }
.bill-confirm-code input { flex: 1 1 160px; min-width: 0; min-height: var(--hm-control-height); padding: 0 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); font-size: var(--hm-fs-meta); }
.bill-confirm-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: var(--hm-space-3) 0; padding: 10px 14px; border-radius: var(--hm-radius-control); background: var(--hm-neutral); font-size: var(--hm-fs-meta); }
.bill-confirm-card > div { min-width: 0; overflow-wrap: anywhere; } /* FIXPACK FP-2: a long Link email breaks instead of widening the page */
.bill-confirm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.upgrade-row { display: inline-flex; align-items: center; gap: var(--hm-space-2); } /* a plan's button and its (i) on one line; its "Starts …" caption sits under the button, left-aligned with it */
/* The step always takes its own line under the pressed choice, whatever the row's width (assist-sonnect P2 at 1ea37000). */
.plan-upgrade .upgrade-buttons { display: flex; align-items: flex-start; }
.upgrade-step-row { flex: 1 0 100%; width: 100%; }
.upgrade-step-row .bill-confirm { margin: 0 0 var(--hm-space-2); }
/* The Payment method line's actions read as links (the mock), with a full-height target. */
.bill-link { display: inline-flex; align-items: center; min-height: var(--hm-control-height); padding: 0 2px; border: none; background: none; color: var(--hm-primary); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.bill-confirm .primary-cta, .bill-confirm .btn, [data-billing-notice] .btn { min-height: var(--hm-control-height); }
/* OWNRES S3: the Citations page — one row per assistant asked one way; a phone reads each row as a card. */
.ux-shell .citation-form-msg { margin: 0 0 var(--hm-space-2); font-size: var(--hm-fs-meta); }
.ux-shell .citation-form-msg.bad { color: var(--hm-danger); } /* not a <p>: the card's muted paragraph rule can't reach it */
.ux-shell .citation-form-q textarea { width: 100%; font-size: var(--hm-fs-body); }
.citation-sub { display: block; font-size: var(--hm-fs-label); color: var(--hm-muted); }
.citation-table-wrap { overflow-x: auto; }
.citation-table { width: 100%; border-collapse: collapse; font-size: var(--hm-fs-meta); }
.citation-table th, .citation-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--hm-line); vertical-align: middle; } /* Harvey 10-11: one centre line per row */
.ux-shell .citation-table thead th { font-size: var(--hm-fs-label); color: var(--hm-muted); font-weight: 600; letter-spacing: 0; text-transform: none; } /* the declared 12/600 wins over the shell's table headers */
.citation-metric { font-size: var(--hm-fs-section); font-weight: 600; color: var(--hm-ink); white-space: nowrap; }
/* fix1 (7), Harvey 10-11: a count and a note in the same row sit on one line — the same line box for both. */
.citation-table td > .citation-metric, .citation-table td > .citation-sub { display: inline-block; line-height: 24px; vertical-align: middle; }
/* …and a check's status pill and Open check share one centre, on the question's row (under it, together, on a phone). */
.ux-shell .workcard.citation-record { grid-template-columns: minmax(0, 1fr); }
.citation-record-top.citation-record-head { align-items: center; }
.ux-shell .citation-record-act { flex: none; flex-wrap: nowrap; align-items: center; } /* beats .ux-shell .navim-row-actions' wrap (assist 8548dbb3) */
.ux-shell .navim-row .citation-record-act .tag { margin: 0; } /* the pill's own margin put it 2 px above the button's centre (assist 47f8076f) */
@media (max-width: 760px) { .ux-shell .citation-record-act { flex: 1 1 100%; flex-wrap: wrap; } } /* under the question on a phone, the card's width: a long pill puts the button on its own row (assist 47f8076f, 320) */
.citation-record-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.citation-record-top > div { min-width: 0; flex: 1 1 auto; } /* the badge stays at the right of the question row (the mock) */
.citation-record-top .tag { flex: none; }
@media (max-width: 760px) { /* …at a phone's width the badge / Updated pill takes its own line under the title (Fable ruling) */
  .citation-record-top { flex-wrap: wrap; }
  .citation-record-top > div { flex-basis: 100%; }
}
.ux-shell .citation-check-page h3, .ux-shell .citation-summary h3 { font-size: var(--hm-fs-body); font-weight: 600; margin: var(--hm-space-3) 0 var(--hm-space-1); }
.citation-legacy { margin-top: var(--hm-space-3); }
.citation-legacy > summary { cursor: pointer; font-weight: 600; min-height: var(--hm-control-height); display: flex; align-items: center; }
.citation-urls { margin: var(--hm-space-2) 0; padding-left: 1.1em; font-size: var(--hm-fs-meta); }
.citation-url { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .citation-table thead { display: none; }
  .citation-table, .citation-table tbody, .citation-table tr, .citation-table th, .citation-table td { display: block; width: 100%; }
  .citation-table tr { padding: 8px 0; border-bottom: 1px solid var(--hm-line); }
  .citation-table th, .citation-table td { border-bottom: none; padding: 4px 0; }
  .citation-table td[data-label]::before { content: attr(data-label) ": "; color: var(--hm-muted); font-size: var(--hm-fs-label); }
}
/* OWNRES S4: the feature pages' tabs wrap at a phone's width — every tab stays in view (Fable ruling on the mock). */
.plan-see { margin-top: var(--hm-space-4); }
.plan-see > summary { cursor: pointer; font-weight: 600; min-height: var(--hm-control-height); display: flex; align-items: center; }

/* Footer at 320–360px: the line wraps (complete, never cut) and the content column keeps room for two lines. */
@media (max-width: 360px) {
  .ux-footer { white-space: normal; overflow: visible; text-overflow: clip; }
  body.ux-shell .app-shell > main { padding-bottom: 70px; }
}

/* Harvey 10-04: the path on the top line's left — small, muted, chevrons; links up, the page itself last. One line
   always: the middle segments give way first (an ellipsis), never a second line, never wider than the bar. */
.ux-shell .ux-crumb { flex: 1 1 auto; min-width: 0; overflow: hidden; padding: 5px; margin: -5px; } /* the ellipsis clip: 5px of room so a link's focus ring (3px + 2px offset) is whole; the equal negative margin leaves the layout where it was */
.ux-shell .ux-crumb ol { display: flex; align-items: center; gap: 0; min-width: 0; margin: 0; padding: 0; list-style: none; font-size: var(--hm-fs-label); color: var(--hm-muted); white-space: nowrap; }
.ux-shell .ux-crumb li { display: flex; align-items: center; min-width: 0; flex: 0 5 auto; } /* "Workspace" gives way after the middle */
.ux-shell .ux-crumb li + li::before { content: "\203A"; margin: 0 var(--hm-space-2); color: var(--hm-muted); flex: none; }
.ux-shell .ux-crumb li.ux-crumb-mid { flex: 0 20 auto; min-width: 2.2em; } /* the middle gives way first */
.ux-shell .ux-crumb li.ux-crumb-here { flex: 0 1 auto; min-width: 3em; color: var(--hm-ink); font-weight: 600; } /* the page itself last */
.ux-shell .ux-crumb a, .ux-shell .ux-crumb li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ux-shell .ux-crumb a { color: var(--hm-muted); text-decoration: none; }
.ux-shell .ux-crumb a:hover { color: var(--hm-primary); text-decoration: underline; }
.ux-shell .ux-crumb a:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; border-radius: var(--hm-radius-control); }
.ux-shell .ux-topbar .ux-search { margin-left: auto; }

/* Harvey 10-04 (feedback 11): Settings › Workspace's cards take the content column's width, as the other Settings
   pages' cards do; the Profile form lays its fields out like the other forms — two columns on a desktop, one on a phone,
   each label above its field — with Save under them. */
body.ux-shell #settings-view .settings-section[data-settings-section="workspace"] > .settings-panel { width: auto; align-self: stretch; }
body.ux-shell #settings-view #business-profile-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hm-space-4) var(--hm-space-5); align-items: start; }
body.ux-shell #settings-view #business-profile-form > :is(button, .btn, [type="submit"], .form-actions) { grid-column: 1 / -1; justify-self: start; }
body.ux-shell #settings-view #business-profile-form :is(input, select, textarea) { width: 100%; max-width: none; }
@media (max-width: 760px) { body.ux-shell #settings-view #business-profile-form { grid-template-columns: minmax(0, 1fr); } }
/* On a phone the bar has ~150px for the path: a two-segment path shows whole; a longer one is "… › <this page>" —
   the "…" is the link up to the parent (its name stays for screen readers), the page itself gets the room. */
@media (max-width: 760px) {
  .ux-shell .ux-crumb ol { font-size: var(--hm-fs-label); }
  .ux-shell .ux-crumb li + li::before { margin: 0 6px; }
  .ux-shell .ux-crumb ol:has(> li:nth-child(3)) > li:first-child { display: none; }
  .ux-shell .ux-crumb ol:has(> li:nth-child(3)) > li:first-child + li::before { content: none; }
  .ux-shell .ux-crumb li.ux-crumb-mid:not(:nth-last-child(2)) { display: none; }
  .ux-shell .ux-crumb li.ux-crumb-mid:nth-last-child(2) { flex: none; min-width: 0; }
  .ux-shell .ux-crumb ol:has(> li:nth-child(3)) > li.ux-crumb-mid:nth-last-child(2)::before { content: none; }
  .ux-shell .ux-crumb ol:has(> li:nth-child(3)) li.ux-crumb-mid:nth-last-child(2) a { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: var(--hm-touch-target); }
  .ux-shell .ux-crumb ol:has(> li:nth-child(3)) li.ux-crumb-mid:nth-last-child(2) .ux-crumb-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ux-shell .ux-crumb ol:has(> li:nth-child(3)) li.ux-crumb-mid:nth-last-child(2) .ux-crumb-dots { display: inline; font-size: var(--hm-fs-meta); }
  .ux-shell .ux-crumb li.ux-crumb-here { flex: 0 1 auto; min-width: 0; }
  /* The page's own name still needs ~120px for "From competitors": it takes up to two lines of the bar (56px) before it is cut, so it reads whole. */
  .ux-shell .ux-crumb li.ux-crumb-here > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal; overflow-wrap: normal; line-height: 1.2; }
}
/* At 320 the bar leaves ~48px: one line with an ellipsis, never a word split in two ("Opport / unities"). */
@media (max-width: 340px) {
  .ux-shell .ux-crumb li.ux-crumb-here > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.ux-shell .chg-page { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--hm-space-5); align-items: start; min-width: 0; }
.ux-shell .chg-rail { background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: var(--hm-space-4) var(--hm-space-3); display: grid; gap: var(--hm-space-3); min-width: 0; }
.ux-shell .chg-rail-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 var(--hm-space-1); }
.ux-shell .chg-rail-head h2, .ux-shell .chg-eyebrow, .ux-shell .chg-version-label { margin: 0; font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: var(--hm-ls-caps); text-transform: uppercase; color: var(--hm-muted); }
.ux-shell .chg-picker { display: none; }
.ux-shell .chg-maincols { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: var(--hm-space-4); align-items: start; }
.ux-shell .chg-main, .ux-shell .chg-aside { display: grid; gap: var(--hm-space-4); min-width: 0; }
.ux-shell .chg-card { background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: var(--hm-space-5); min-width: 0; display: grid; gap: var(--hm-space-3); }
.ux-shell .chg-diff { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--hm-space-3); }
.ux-shell .chg-version { display: grid; align-content: start; gap: var(--hm-space-2); padding: var(--hm-space-4); border-radius: var(--hm-radius-control); background: var(--hm-bg); min-width: 0; }
.ux-shell .chg-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--hm-space-2); }
.ux-shell .chg-row { width: 100%; min-height: var(--hm-control-height); display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-3); padding: var(--hm-space-2) var(--hm-space-3); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); color: var(--hm-ink); font: inherit; font-size: var(--hm-fs-label); text-align: left; white-space: normal; cursor: pointer; }
.ux-shell .chg-row.active { border-color: var(--hm-primary); box-shadow: var(--hm-shadow-sm); }
@media (max-width: 1100px) {
  .ux-shell .chg-maincols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .ux-shell .chg-page { grid-template-columns: 190px minmax(0, 1fr); gap: var(--hm-space-4); }
}
@media (max-width: 760px) {
  .ux-shell .chg-page { grid-template-columns: minmax(0, 1fr); }
  .ux-shell .chg-rail { display: none; }
  .ux-shell .chg-picker { display: flex; align-items: center; gap: var(--hm-space-3); font-size: var(--hm-fs-label); }
  .ux-shell .chg-picker select { flex: 1; min-width: 0; min-height: var(--hm-control-height); }
  .ux-shell .chg-diff { grid-template-columns: minmax(0, 1fr); }
  .ux-shell .chg-card { padding: var(--hm-space-4); } /* the three tabs fit at 375, as the mock */
}
/* Harvey 10-04 (feedback 13): an avatar or tile centres its glyph wherever it sits — in the products table too, where
   `.products-table td span` (display: block, a top margin) used to put the box icon at the tile's top left. */
.products-table td .wb-tile, .products-table td .ux-avatar, .products-table td .chg-initial { display: grid; place-items: center; margin-top: 0; overflow: visible; } /* 320: the three tabs still fit; each panel says its count */
/* D3 (mock v0.3): Improvements has four tabs — on a phone they wrap onto a second line, all four in view. */

/* ux-layout J (Harvey 10-04): the bell on the top line's right — the announcements, an unread dot, its panel under it. */
/* ownres-fix2 (1): "Subscribe to a plan" beside the bell — the bell's size and line, in the primary's mint. */
.ux-shell .ux-subscribe { text-decoration: none; flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--hm-control-height); height: var(--hm-control-height); border-radius: var(--hm-radius-pill); border: 1px solid var(--hm-primary-line); background: var(--hm-mint); color: var(--hm-primary); }
.ux-shell .ux-topbar .ux-subscribe[hidden] { display: none; }
.ux-shell .ux-subscribe[hidden] { display: none; }
.ux-shell .ux-subscribe:hover { background: var(--hm-surface); }
.ux-shell .ux-subscribe:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.ux-shell .hm-page-header .ux-subscribe, .ux-shell .section-heading-actions .ux-subscribe { display: none; } /* the top bar's copy shows; from 901px with the new shell the header's does instead (below) */
.ux-shell .ux-subscribe .ux-icon { width: var(--hm-icon-m); height: var(--hm-icon-m); fill: none; stroke: currentColor; stroke-width: var(--hm-icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
.ux-shell .ux-bell-wrap { position: relative; flex: none; }
.ux-shell .ux-topbar .ux-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--hm-control-height); height: var(--hm-control-height); min-height: var(--hm-control-height); padding: 0; border-radius: var(--hm-radius-pill); border: 1px solid var(--hm-line); background: var(--hm-surface); color: var(--hm-muted); cursor: pointer; }
.ux-shell .ux-topbar .ux-bell:hover, .ux-shell .ux-topbar .ux-bell[aria-expanded="true"] { color: var(--hm-primary); border-color: var(--hm-primary-line); background: var(--hm-mint); }
.ux-shell .ux-topbar .ux-bell:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.ux-shell .ux-bell .ux-icon { width: var(--hm-icon-m); height: var(--hm-icon-m); fill: none; stroke: currentColor; stroke-width: var(--hm-icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
.ux-shell .ux-bell-dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: var(--hm-radius-pill); background: var(--hm-danger); box-shadow: 0 0 0 2px var(--hm-surface); }
.ux-shell .ux-bell-panel { position: fixed; z-index: 60; top: 64px; right: 16px; width: min(380px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto; box-sizing: border-box; padding: var(--hm-space-4); background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-lg); text-align: left; }
@media (max-width: 760px) {
  .ux-shell .ux-topbar .ux-bell { width: var(--hm-touch-target); height: var(--hm-touch-target); }
}
/* 2.8.1.1B: on a phone the notifications panel is a sheet inside the window, 8px from each side (bellPlace sets the same from the bell's bottom) */
@media (max-width: 480px) {
  .ux-shell .ux-bell-panel { left: 8px; right: 8px; width: auto; max-width: none; }
}

/* ADV-T3-1: the sign-in screen is outside the typography pass (it shares .eyebrow / .muted / h1 / h2 / .oauth-button with the shell). */
#auth-view h1, #auth-view h2, #auth-view .eyebrow { font-weight: 800; }
#auth-view h2 { letter-spacing: 0.5px; }
/* Harvey 10-26: the sign-in hero keeps its own scale whatever the shell's rules say (a body that still wears the shell's class after a sign-out must not shrink it): id-scoped, so nothing under .ux-shell can outweigh it */
#auth-view .auth-brand-panel .eyebrow { font-size: var(--hm-auth-fs-eyebrow); }
#auth-view .auth-brand-panel h1 { font-size: var(--hm-auth-fs-hero); }
#auth-view .auth-copy { font-size: var(--hm-auth-fs-copy); }
#auth-view .auth-card h2 { font-size: var(--hm-auth-fs-card); }
@media (max-width: 620px) { #auth-view .auth-brand-panel .eyebrow { font-size: var(--hm-fs-body); } }

/* Typography: roles that need their own selector to win over a more specific rule above (everything else lives in the rule that defines it). */
body.ux-shell :is(h1, h2, h3, h4, h5, h6, .panel-heading h2, .section-heading h1, #page-heading, .tab-copy strong, .overview-hero-score, .overview-hero-score strong, .overview-kpis strong, .viz-big, .help-section-heading h2, .inline-detail-header h2, .inline-subsection h3, .modal header h2, .share-modal h3, .api-section h2, .competitive-card h2, .changeset-group h3) { font-family: var(--hm-font-sans); }
.ux-shell .ux-topbar .ux-nav a { font-size: var(--hm-fs-body); font-weight: 400; line-height: var(--hm-lh-body); }
.ux-shell .ux-topbar .ux-nav a.ux-nav-active { font-weight: 600; }
@media (min-width: 761px) {
  body.ux-shell .ux-topbar .ux-search input { font-size: var(--hm-fs-label); }
}
body.ux-shell .hm-page-header h1 { font-size: var(--hm-fs-title); font-weight: 600; letter-spacing: var(--hm-ls-h1); line-height: var(--hm-lh-tight); }
body.ux-shell .hm-page-header .hm-purpose { font-size: var(--hm-fs-meta); line-height: var(--hm-lh-body); }
.ux-shell .hm-info-btn { font-family: Georgia, serif; font-size: var(--hm-fs-label); font-style: italic; font-weight: 400; }
.ux-shell .wb-start h2 { font-size: var(--hm-fs-section); font-weight: 600; letter-spacing: var(--hm-ls-h2); line-height: 1.35; }
.ux-shell .wb-stat-number { font-size: var(--hm-fs-kpi); font-weight: 600; letter-spacing: var(--hm-ls-num); line-height: 1.15; }
@media (max-width: 1000px) {
  body.ux-shell .hm-page-header h1 { font-size: var(--hm-fs-title); }
}
@media (max-width: 760px) {
  body.ux-shell .hm-page-header h1 { font-size: var(--hm-fs-title); letter-spacing: var(--hm-ls-h1-sm); line-height: var(--hm-lh-tight); }
}
@media (max-width: 760px) {
  .ux-shell .wb-stat-number { font-size: var(--hm-fs-kpi); }
}
@media (max-width: 760px) {
  .ux-shell .wb-start h2 { font-size: var(--hm-fs-section); }
}
.ux-shell :is(.text-button, .primary-link, .ghost-button, .primary-button, .secondary-button, .amz-connect-btn, .amz-copy, .cpg-addurlbtn, .cpg-publish, .cpg-save, .diff-add-manual, .fix-ai-btn, .fix-manual-btn, .pub-dest-action, .product-name-fix, .cpg-upload, .row-btn) { font-size: var(--hm-fs-label); font-weight: 600; line-height: var(--hm-lh-body); }
.ux-shell :is(.hist-filter-btn, .ux-subnav a, .ux-subtabs a) { font-size: var(--hm-fs-label); font-weight: 400; line-height: var(--hm-lh-body); }
.ux-shell :is(.ev-label, .info-side-label, p.eyebrow, .ux-ws-fixhdr), .ux-shell :is(.aio-publish-header, .inline-subsection-heading, .timeline-heading-row, .ux-plan-head, .ux-ws-addon, .ux-intents, .inline-subsection) h3 { font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: var(--hm-ls-caps); line-height: var(--hm-lh-body); }
.ux-shell th { font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: 0; line-height: var(--hm-lh-body); text-transform: none; } /* column headings are sentence case, like the reference's ("Day 0 / Jun 30"): capitals with spaced letters stay for the labels above a value, not a table's columns */
.ux-shell :is(.category-chip, .status-pill, .score-badge, .aio-status, .evidence-count, .aio-crawler-state, .aio-crawler-observed, .name-missing-flag, .timeline-tag, .pill) { font-size: var(--hm-fs-label); font-weight: 600; line-height: 1.3; }
.ux-shell :is(.row-updated, .row-creator, .amz-count, .field-missing-note, .fix-ai-hint, .job-status, .timeline-count, .pub-dest-state) { font-size: var(--hm-fs-label); }
.ux-shell :is(.job-status, .timeline-count, .pub-dest-state) { font-weight: 600; }
.ux-shell :is(label, .amz-field-label, .aio-url-field) { font-size: var(--hm-fs-label); font-weight: 600; }
.ux-shell dt { font-size: var(--hm-fs-label); font-weight: 600; }
.ux-shell legend { font-size: var(--hm-fs-body); font-weight: 600; }
.ux-shell .ux-workspace .ux-subnav a, .ux-shell a.text-button, .ux-shell button.text-button { font-size: var(--hm-fs-label); font-weight: 400; }
.ux-shell a.text-button, .ux-shell button.text-button { font-weight: 600; }
.ux-shell :is(.subcopy, .ux-intent-next, .ux-intent-why, .amz-value, .amz-source, .ux-intents-summary, .ux-plan-empty-state p, .amz-intro p) { font-size: var(--hm-fs-meta); }
.ux-shell .ux-workspace a.text-button, .ux-shell .ux-workspace button.text-button { font-size: var(--hm-fs-label); font-weight: 600; }
.ux-shell .hm-section-nav a { font-size: var(--hm-fs-label); font-weight: 600; }
.ux-shell :is(.help-purpose, .help-section-heading > p:not(.eyebrow), .help-section-heading p:not(.eyebrow), .ux-note, .ux-subhead) { font-size: var(--hm-fs-meta); line-height: var(--hm-lh-body); }
.ux-shell :is(.help-news p, .access-summary, .amz-conn-off, .role-item p, .ctx-boundary p, .api-key-scope-facts p, .funnel-muted, .api-docs summary, .plan-see summary, .plan-change summary, .team-roles summary, .permission-details summary, .ctx-boundary summary) { font-size: var(--hm-fs-meta); }
.ux-shell :is(.api-docs summary, .plan-see summary, .plan-change summary, .team-roles summary, .permission-details summary, .ctx-boundary summary, .obs-compare summary) { font-weight: 600; }
.ux-shell :is(.help-news strong, .help-purpose strong, .help-path-grid strong, .role-item strong, .identity-card strong, .workflow-list strong, .ux-note strong, .ux-subhead strong, .api-key-scope-facts strong, .api-section strong) { font-size: var(--hm-fs-meta); font-weight: 600; }
.ux-shell :is(.help-fact-summary, .help-feature-list, .help-metric-grid, .help-mock-aio, .help-mock-citations, .help-mock-team, .help-report-metrics, .help-scenario-list, .help-status-grid) b { font-size: var(--hm-fs-label); font-weight: 600; }
.ux-shell :is(.api-section p:not(.hm-form-help):not(.muted), .api-section li, .api-section a) { font-size: var(--hm-fs-meta); line-height: var(--hm-lh-prose); }
.ux-shell :is(.api-section code, .api-key-scope-facts code, .api-endpoints code, code.api-key-value) { font-size: var(--hm-fs-label); }
.ux-shell :is(.api-key-scope-facts h3, .funnel-section h3) { font-size: var(--hm-fs-body); font-weight: 600; }
.ux-shell :is(.hm-table td, .api-endpoints td, .hm-table-empty) { font-size: var(--hm-fs-label); }
.ux-shell .obs-compare > summary { font-size: var(--hm-fs-label); }

/* Source pages S4 (mock v1.2): Information › Source pages and Add product's other pages. */
.info-layout:not([data-info-category="sources"]) .info-main [data-info-cat="sources"] { display: none; }
.sp-add { display: flex; gap: var(--hm-space-2); align-items: stretch; margin: 0 0 var(--hm-space-2); }
.sp-add input { flex: 1; min-width: 0; min-height: var(--hm-control-height); }
.sp-result, .sp-door { font-size: var(--hm-fs-label); margin: var(--hm-space-1) 0; }
.sp-table td { vertical-align: top; }
.sp-table td small { font-size: var(--hm-fs-label); }
.sp-page-details .text-button { min-height: var(--hm-control-height); }
.sp-card { min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: var(--hm-space-3); margin: var(--hm-space-3) 0; background: var(--hm-surface); }
.sp-card p { margin: var(--hm-space-1) 0; font-size: var(--hm-fs-label); }
.sp-hint { font-weight: 400; }
.sp-actions .btn, .sp-actions button { min-height: var(--hm-control-height); }
#product-extra-urls { width: 100%; min-height: 72px; font-size: var(--hm-fs-body); }
.sp-decide { display: grid; gap: var(--hm-space-1); margin: var(--hm-space-2) 0; }
.sp-decide input { min-height: var(--hm-control-height); }
.sp-consistency-inline { display: none; }
.sp-flag { display: grid; gap: var(--hm-space-2); margin: var(--hm-space-2) 0; max-width: 520px; }
.sp-flag select, .sp-flag input { min-height: var(--hm-control-height); }
.sp-section .sp-cr-link::after { content: ""; position: absolute; inset: calc((var(--hm-control-height) - 100%) / -2) 0; }
/* ADV-S4b-1: a card's button never pushes the page wider than the phone — its words are short, and wrap if they must. */
.sp-card .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; height: auto; text-align: left; }
/* Phone (mock v1.2 §7), and the narrow column beside the categories up to 900px: "Consistency" (F2b) folds into the
   page's second line; the table keeps Page, Last check, Cited. */
@media (max-width: 900px) {
  .sp-table th:nth-child(3), .sp-table td[data-sp-consistency] { display: none; }
  .sp-consistency-inline, .sp-table td small.sp-consistency-inline { display: block; font-size: var(--hm-fs-label); } /* ②: over td small's 11 */
  .sp-add { flex-wrap: wrap; }
}
/* ADV-S4a-3: every link and button in the pages' table, the cards and the door messages is a full-height target. */
/* A page's address reads as text in ink (the mock's), on the cell's first line with the others; its target reaches the
   control height around it (as the announcement bar's links), so the row keeps the table's height. */
.sp-table td > a, .sp-card p > a, .sp-door a { position: relative; display: inline-block; max-width: 100%; vertical-align: top; color: var(--hm-ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.sp-door a { text-decoration: underline; text-underline-offset: 2px; }
.sp-table td > a::after, .sp-card p > a::after, .sp-door a::after { content: ""; position: absolute; inset: calc((var(--hm-control-height) - 100%) / -2) 0; }
.sp-section .text-button, .sp-card .btn { display: inline-flex; align-items: center; min-height: var(--hm-control-height); }
.cr-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--hm-space-3); }
.cr-head h2 { margin: 0; font-size: var(--hm-fs-section); display: inline-flex; align-items: center; gap: var(--hm-space-2); }
/* ADV-PKG-4: the heading's InfoButton keeps its whole hit area — the scope line below never takes its lower half. */
.cr-head h2 .hm-info { position: relative; z-index: 1; }
.cr-head-text [data-cr-scope] { margin-top: var(--hm-space-3); }
/* fix1 (6), Harvey 10-11: a cooldown names its day and, under the button, why ("2 of 2 checks used this week"). */
.cr-cooldown { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 100%; }
.cr-cooldown [data-cr-cooldown-why] { font-size: var(--hm-fs-label); text-align: right; }
@media (max-width: 760px) { .cr-cooldown { align-items: flex-start; } .cr-cooldown [data-cr-cooldown-why] { text-align: left; } }
.cr-head-actions .btn { min-height: var(--hm-control-height); }
.cr-download { position: relative; }
/* ① / ADV-F1-1: Download is a labelled button, not the workspace menu's 40×40 icon trigger. */
.ux-shell .ux-ws-menu.cr-download > summary.cr-download-btn { width: auto; height: auto; min-height: var(--hm-control-height); padding: 0 var(--hm-space-4); font-size: var(--hm-fs-label); font-weight: 600; line-height: normal; color: var(--hm-primary); background: var(--hm-surface); border-color: var(--hm-line-strong); white-space: nowrap; } /* .btn.secondary's colours (assist-sonnect re-pass) */
.ux-shell .ux-ws-menu.cr-download > summary.cr-download-btn:hover { background: var(--hm-mint); color: var(--hm-primary); border-color: var(--hm-primary-line); }
/* F2 · the issue's side panel (dialog.wb-drawer). */
.crd { display: grid; gap: var(--hm-space-3); }
.crd .hm-version-summary { grid-template-columns: minmax(0, 1fr); }
.crd .hm-version-summary dd { overflow-wrap: anywhere; }
.crd-page { border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: var(--hm-space-3); min-width: 0; }
.crd-page .hm-excerpt { margin: 0; }
/* F2a pass ②: a page's address is ink 600 with the control-height hit area, as Source pages' (S4-fix). */
.crd-page .hm-excerpt figcaption a { position: relative; display: inline-block; max-width: 100%; vertical-align: top; color: var(--hm-ink); font-weight: 600; text-decoration: none; word-break: break-all; }
.crd-page .hm-excerpt figcaption a::after, .crd [data-crd-notice] a::after { content: ""; position: absolute; inset: calc((var(--hm-control-height) - 100%) / -2) 0; }
.crd-form input, .crd-form textarea, .sp-flag input, .sp-flag select { font-size: var(--hm-fs-body); }
.crd-form input, .sp-flag input, .sp-flag select { min-height: var(--hm-control-height); }
/* ⑥ ⑦: only the approved value is bold; the heading is a section heading; the closing words' strong is 600. */
.crd .hm-version-summary dd { font-weight: 400; font-size: var(--hm-fs-meta); }
.crd-actions .btn { min-height: var(--hm-control-height); }
@media (max-width: 760px) {
  .crd-actions .btn, .crd-form input, .sp-flag input, .sp-flag select { min-height: var(--hm-touch-target); }
  .sp-section .sp-cr-link::after { inset: calc((var(--hm-touch-target) - 100%) / -2) 0; }
  .crd-page .hm-excerpt figcaption a::after, .crd [data-crd-notice] a::after { inset: calc((var(--hm-touch-target) - 100%) / -2) 0; }
}
.ux-shell .results-page[data-results-open="consistency"] .results-scope { display: none; } /* ③: the tab has its own scope, cost line and pickers */
/* ③ The weekly page check: one line under Check again; its form is Settings › Agent checks' Scheduled checks, here. */
.cr-schedule { display: grid; gap: var(--hm-space-1); }
.ux-shell .cr-schedule .cr-schedule-change::after { content: ""; position: absolute; inset: calc((var(--hm-control-height) - 100%) / -2) -4px; }
.ux-shell .cr-schedule .ctx-confirm-inline { flex-basis: 100%; display: inline-flex; gap: var(--hm-space-2); align-items: center; font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-ink); }
.ux-shell .cr-schedule .ctx-confirm-inline input[type="checkbox"] { width: auto; min-height: 0; height: auto; padding: 0; margin: 0; border: 0; box-shadow: none; background: none; }
.ux-shell .cr-schedule .ctx-form select { padding: 0 11px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); font-size: var(--hm-fs-body); background: var(--hm-surface); color: var(--hm-ink); max-width: 100%; }
@media (max-width: 760px) {
  .ux-shell .cr-schedule .ctx-field { flex-basis: 100%; }
  .ux-shell .cr-schedule .ctx-confirm-inline { min-height: var(--hm-touch-target); } /* ADV-PKG-3 */
  .ux-shell .cr-schedule .ctx-form select { min-height: var(--hm-touch-target); width: 100%; }
  .ux-shell .cr-schedule .cr-schedule-change::after { inset: calc((var(--hm-touch-target) - 100%) / -2) -4px; }
}
.ux-shell .cr-showing .cr-more::after { content: ""; position: absolute; inset: calc((var(--hm-control-height) - 100%) / -2) -4px; }
@media (max-width: 760px) { .ux-shell .cr-showing .cr-more::after { inset: calc((var(--hm-touch-target) - 100%) / -2) -4px; } }
.cr-unchecked summary { cursor: pointer; font-weight: 600; color: var(--hm-pending); min-height: var(--hm-control-height); display: inline-flex; align-items: center; }
@media (max-width: 760px) { .cr-unchecked summary { min-height: var(--hm-touch-target); } }
.ux-shell .cr-filters .results-picker { display: flex; align-items: center; gap: var(--hm-space-3); margin: 0; font-size: var(--hm-fs-label); font-weight: 600; }
/* ⑥: the card at the Workbench task's scale (14/600 + 12), over .workcard p's 15. */
.ux-shell .workcard.cr-card .wb-task-title { margin: 0 0 4px; font-size: var(--hm-fs-body); font-weight: 600; color: var(--hm-ink); }
.ux-shell .workcard.cr-card .wb-task-detail { margin: 0; font-size: var(--hm-fs-label); color: var(--hm-muted); -webkit-line-clamp: unset; display: block; }
.ux-shell .ux-notice.cr-notice-sand { background: var(--hm-sand); border-color: var(--hm-pending-line); }
.ux-shell .ux-notice.cr-notice-sand p { color: var(--hm-pending); }
.cr-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 760px) { .cr-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } } /* ⑦: 3 + 2, as .wb-stats */
.cr-table-wrap { overflow-x: auto; }
.cr-cards { display: none; }
@media (max-width: 760px) {
  .ux-shell .cr-download .ux-menu-item { min-height: var(--hm-touch-target); display: flex; align-items: center; } /* ② */
}
@media (max-width: 640px) {
  .cr-table-wrap { display: none; }
  .cr-cards { display: grid; gap: var(--hm-space-3); }
  .cr-card .btn { min-height: var(--hm-touch-target); }
  .ux-shell .ux-ws-menu.cr-download > summary.cr-download-btn { min-height: var(--hm-touch-target); }
  .ux-shell .cr-download .ux-ws-menu-list { left: 0; right: auto; } /* ②: opens rightward from the trigger, inside the page */
  .ux-shell .cr-filters .results-picker { width: 100%; justify-content: space-between; }
}

/* F2B (Fable 10-08): every item of both product menus — the product page's ⋯ menu and the product list's row menu —
   reaches the touch target on a phone, the existing items and the new ones alike. */
@media (max-width: 760px) {
  .ux-shell .ux-menu-item, .row-menu-item { min-height: var(--hm-touch-target); display: flex; align-items: center; }
}
.ux-shell .rs-mode { align-items: flex-start; padding: 8px 0; }
.ux-shell .rs-mode > input { flex: none; min-height: 0; padding: 0; margin-top: 3px; } /* not the 42–44px text-control height: a radio its own size, on the first line */
.ux-shell .rs-mode { font-weight: 400; } /* the label rule's 600 would make the description bold too (ui-check) */
.ux-shell .rs-mode strong { font-weight: 600; }
.ux-shell .rs-mode small { color: var(--hm-muted); font-size: var(--hm-fs-label); }
.ux-shell .rs-actions { justify-content: flex-start; margin-top: var(--hm-space-3); }
.agent-research-row { margin: 0 20px 14px; }
.ux-shell .rs-stage { display: flex; align-items: flex-start; gap: 10px; min-height: var(--hm-touch-target); padding: 10px 0; border-bottom: 1px solid var(--hm-line); }
.ux-shell .rs-stage[data-status="done"] .rs-stage-mark { border-color: transparent; background: var(--hm-success-tint); color: var(--hm-success); }
.ux-shell .rs-stage[data-status="input"] .rs-stage-mark { border-color: var(--hm-pending-line); background: var(--hm-sand); color: var(--hm-pending); }
.ux-shell .rs-stage[data-status="running"] .rs-stage-mark { border: 2px solid var(--hm-primary); border-top-color: transparent; animation: buttonSpin 700ms linear infinite; }
@media (prefers-reduced-motion: reduce) { .ux-shell .rs-stage[data-status="running"] .rs-stage-mark { animation: none; border-top-color: var(--hm-primary); } }
/* ADV-B33a-1: a stage that failed is a warning; one stopped or never run is grey — none of them a ✓. */
.ux-shell .rs-stage[data-status="failed"] .rs-stage-mark { border-color: var(--hm-pending-line); background: var(--hm-sand); color: var(--hm-pending); }
.ux-shell .rs-stage[data-status="stopped"] .rs-stage-mark, .ux-shell .rs-stage[data-status="not_run"] .rs-stage-mark { background: var(--hm-neutral); border-color: var(--hm-line); color: var(--hm-muted); }

/* F2B B3-3b · "Needs your input" (mock v0.3 ② warnbox): sand box above the stages; Add information is the one primary
   button, Skip these a quiet link beside it. */
.ux-shell .rs-needs { max-width: 720px; margin: var(--hm-space-3) 0 0; padding: 10px 12px; border: 1px solid var(--hm-pending-line); border-radius: var(--hm-radius-control); background: var(--hm-sand); }
.ux-shell .rs-needs ul { margin: 4px 0 0; padding-left: 18px; font-size: var(--hm-fs-label); } /* under its 13px heading, as the mock */
.ux-shell .rs-tabs { margin-bottom: var(--hm-space-4); }
.ux-shell .rs-tab-short { display: none; }
.ux-shell .rs-results-cols { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--hm-space-5); align-items: start; }
.ux-shell .rs-context { display: grid; gap: var(--hm-space-3); margin: 0; padding: var(--hm-space-3); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); }
.ux-shell .rs-result-list { margin: 0; padding-left: 18px; }
@media (max-width: 760px) {
  .ux-shell .rs-results-cols { grid-template-columns: minmax(0, 1fr); }
  .ux-shell .rs-context { display: none; }
  .ux-shell .rs-tab-long { display: none; }
  .ux-shell .rs-tab-short { display: inline; }
  /* ui-check 309466ab: a short word ("Data", "Details") still gets a 44px-wide target. */
  .ux-shell .rs-page .results-link { min-width: var(--hm-touch-target); justify-content: center; }
}

/* F2B B4-1d · "Research weekly" row (mock f2b-b4-schedule-row-mock-v0.1): a card under the run's bar, above the tabs;
   the switch, the On/Off chip at its end, day and time side by side (stacked on a phone, 44px). */
.ux-shell .rs-schedule { display: grid; gap: 8px; max-width: 900px; margin: 0 0 var(--hm-space-4); padding: 12px 14px; }
.ux-shell .rs-schedule-when { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.ux-shell .rs-switch { position: relative; flex: none; width: 40px; height: 24px; min-height: 0; padding: 0; border: 1px solid var(--hm-line-strong); border-radius: var(--hm-radius-pill); background: var(--hm-neutral); cursor: pointer; }
.ux-shell .rs-switch::before { content: ""; position: absolute; inset: -10px -2px; } /* a 44px target around the 24px track */
.ux-shell .rs-switch-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border: 1px solid var(--hm-line-strong); border-radius: var(--hm-radius-pill); background: var(--hm-surface); transition: left .15s; }
.ux-shell .rs-switch.is-on { border-color: var(--hm-primary); background: var(--hm-primary); }
.ux-shell .rs-switch.is-on .rs-switch-knob { left: 18px; border-color: var(--hm-surface); }
.ux-shell .rs-switch:focus-visible { outline: 2px solid var(--hm-primary); outline-offset: 2px; }
@media (max-width: 760px) {
  .ux-shell .rs-schedule-when { display: grid; grid-template-columns: minmax(0, 1fr); }
  .ux-shell .rs-schedule-when select { width: 100%; min-height: var(--hm-touch-target); }
  .ux-shell .rs-switch { width: 48px; height: 28px; }
  .ux-shell .rs-switch::before { inset: -9px -2px; } /* ADV-B41d-2: measured from inside the 1px border — 28 + 2×8 = 44 */
  .ux-shell .rs-switch-knob { width: 22px; height: 22px; }
  .ux-shell .rs-switch.is-on .rs-switch-knob { left: 22px; }
  .ux-shell .rs-schedule .btn { min-height: var(--hm-touch-target); }
}
.ux-shell .rs-recheck-phone { display: none; }
.ux-shell .rs-recheck-box, .ux-shell .rs-recheck-tick { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.ux-shell .rs-mode-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.ux-shell .rs-mode-btn.is-on { border-color: var(--hm-primary); background: var(--hm-mint); color: var(--hm-ink); }
/* ui-check b358eb4f: an error box takes the keyboard after a refusal; it rings like the console's other focus. */
.ux-shell [data-research-recheck-error]:focus, .ux-shell [data-research-schedule-error]:focus { outline: 2px solid var(--hm-primary); outline-offset: 2px; }
@media (max-width: 760px) {
  .ux-shell .rs-recheck-wide { display: none; }
  .ux-shell .rs-recheck-phone { display: block; }
  .ux-shell .rs-recheck-tick { min-height: var(--hm-touch-target); width: 100%; }
  .ux-shell .rs-mode-btn { min-height: var(--hm-touch-target); }
}

/* F2B B3-5 · result cards + detail (mock v0.3 ③ / 375): cards on the console's card surface, one primary action and
   Not an issue; the selected card's detail beside the list at desktop width; on a phone the detail opens as its own
   view (the list hides) and Back returns to the list. */
.ux-shell .rs-opps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: var(--hm-space-4); align-items: start; }
.ux-shell .rs-card { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); }
.ux-shell .rs-card.is-selected { border-color: var(--hm-primary); box-shadow: inset 0 0 0 1px var(--hm-primary); }
.ux-shell .rs-card-title { appearance: none; display: block; width: 100%; padding: 0; border: 0; background: none; color: var(--hm-ink); font: inherit; text-align: left; cursor: pointer; min-height: var(--hm-control-height); white-space: normal; overflow-wrap: anywhere; } /* B3-9: a long need wraps (the console's buttons don't); a short one is still a full-width target */
.ux-shell .rs-card-title:hover { color: var(--hm-primary); text-decoration: underline; }
.ux-shell .rs-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ux-shell .rs-detail-back { display: none; margin: 0; }
.ux-shell .rs-quote, .ux-shell .rs-source, .ux-shell .rs-gap { margin: 0; padding: 10px 12px; border-radius: var(--hm-radius-control); background: var(--hm-neutral); font-size: var(--hm-fs-meta); }
.ux-shell .rs-quote { border-left: 3px solid var(--hm-line-strong); }
.ux-shell .rs-gap { background: var(--hm-sand); }
@media (max-width: 1100px) { .ux-shell .rs-opps { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .ux-shell .rs-opps .rs-detail { display: none; }
  .ux-shell .rs-opps.is-detail-open .rs-cards { display: none; }
  .ux-shell .rs-opps.is-detail-open .rs-detail { display: grid; }
  .ux-shell .rs-detail-back { display: block; }
  .ux-shell .rs-card.is-selected { border-color: var(--hm-line); box-shadow: none; }
}

/* F2B B3-6 · external pages (mock f2b-b3-external-contacts v0.2 a): the correction on sand, "Public contact" as a
   native details (40px summary, 44px on a phone), the material in Information's field styles, the warn note. */
.ux-shell .rs-note { margin: 0; padding: 10px 12px; border: 1px solid var(--hm-pending-line); border-radius: var(--hm-radius-control); background: var(--hm-sand); font-size: var(--hm-fs-label); color: var(--hm-ink); }
.ux-shell .rs-contact { padding: 0 12px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); }

/* F2B B3-7 · the contact list (mock f2b-b3-external-contacts v0.2 b): a table that scrolls inside its own box at
   desktop width, one card per page on a phone; the follow-up form below. */
.ux-shell .rs-contacts { display: grid; gap: var(--hm-space-3); min-width: 0; }
.ux-shell .rs-table-scroll { overflow-x: auto; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); }
.ux-shell .rs-table { width: 100%; border-collapse: collapse; font-size: var(--hm-fs-label); }
.ux-shell .rs-contact-cards { display: none; gap: var(--hm-space-3); }
@media (max-width: 760px) {
  .ux-shell .rs-contacts .rs-table-scroll { display: none; }
  .ux-shell .rs-contact-cards { display: grid; }
  .ux-shell .rs-contacts.is-follow-open .rs-contact-cards { display: none; } /* the follow-up is its own view on a phone */
}

/* F2B B3-8 · data tabs (mock c): the tables scroll inside their own box at every width; the page never scrolls sideways. */
.ux-shell .rs-data-scroll { overflow-x: auto; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); }
.ux-shell .rs-data-table { min-width: 760px; }
.svc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--hm-space-4); }
.svc-top h2 { font-size: var(--hm-fs-section); margin: 0 0 6px; }
.svc-label { font-size: var(--hm-fs-label); text-transform: uppercase; color: var(--hm-muted); font-weight: 600; margin: 0 0 var(--hm-space-2); }
.svc-badge { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--hm-primary); background: var(--hm-mint); padding: 5px 10px; border-radius: var(--hm-radius-pill); font-size: var(--hm-fs-label); }
.svc-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--hm-space-4); margin: var(--hm-space-5) 0; }
.svc-counts > div { border-right: 1px solid var(--hm-line); padding-right: var(--hm-space-3); }
.svc-note { font-size: var(--hm-fs-meta); color: var(--hm-muted); margin: 0 0 var(--hm-space-3); }
.svc-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: var(--hm-space-4); }
.svc-actions + .svc-note, .svc-actions + [data-md-hint] { margin-top: var(--hm-space-3); } /* a note under a row of buttons has a gap above it (2.7.3.9: it sat 6px under Save) */
.svc-actions .btn, .svc-warning .btn { min-height: var(--hm-control-height); white-space: nowrap; }
@media (max-width: 480px) { .svc-actions > .btn { flex: 1 1 calc(50% - var(--hm-space-3)); justify-content: center; } } /* on a phone the buttons of a row share it in even halves (no ragged 2 / 1 / 2 / 1 rows) */
.svc-warning { background: var(--hm-sand); border: 1px solid var(--hm-pending-line); border-radius: var(--hm-radius-control); padding: var(--hm-space-4); color: var(--hm-ink); margin: var(--hm-space-4) 0; }
.svc-warning p { margin: 0 0 var(--hm-space-2); }
.svc-form { margin-top: 0; background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); padding: var(--hm-space-4); } /* the standard card: white, the same inset all round, directly under the title bar */
.svc-form .svc-note { margin-bottom: var(--hm-space-3); }
.svc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hm-space-4); }
.svc-form-grid { row-gap: 0; }
/* SVC-2: the invitation Hasmord sent (and its reschedule message) — multi-line; long links wrap, never widen the page */
.svc-invite { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); padding: var(--hm-space-3); margin: var(--hm-space-2) 0 var(--hm-space-3); font-size: var(--hm-fs-meta); line-height: 1.5; }
.svc-invite a { color: inherit; text-decoration: underline; }
.svc-status { color: var(--hm-primary); font-size: var(--hm-fs-meta); margin-top: var(--hm-space-3); }
.svc-status-error { color: var(--hm-danger); }
/* CRM-C1 · C1-M M1b · Settings → AI & data use › Automatic CRM matching (mock v0.3 frames A–C) */
.aidu-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--hm-space-5); align-items: start; }
.aidu-facts { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 6px 12px; margin: var(--hm-space-3) 0; }
.aidu-facts dd { margin: 0; overflow-wrap: anywhere; }
.aidu-consent input[type="checkbox"], .ux-shell .aidu-consent input[type="checkbox"] { flex: none; width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; border: 0; box-shadow: none; background: none; accent-color: var(--hm-primary); }
.svc-badge.aidu-warn { color: var(--hm-pending); background: var(--hm-sand); border: 1px solid var(--hm-pending-line); }
.svc-badge.aidu-off { color: var(--hm-muted); background: var(--hm-bg); border: 1px solid var(--hm-line); }
@media (max-width: 1060px) { .aidu-grid { grid-template-columns: 1fr; } } /* two columns need about 700px of content: the viewport less the rail, column 2 and the gutters */
@media (max-width: 760px) {
  .aidu-facts { grid-template-columns: 1fr; gap: 2px; }
  .aidu-facts dd { margin-bottom: var(--hm-space-2); }
}
/* CRM-C1 · W5 · the CRM console (sales-console.js; mock W5 v1.5) */
.sc-page { min-width: 0; }
.sc-crumb { color: var(--hm-muted); font-size: var(--hm-fs-meta); margin: 0 0 var(--hm-space-1); }
/* 2.6.1 #9: a CRM breadcrumb's steps are links to their pages, in the shell crumb's look (.ux-crumb a) */
.sc-crumb a { color: var(--hm-muted); text-decoration: none; }
.sc-crumb a:hover { color: var(--hm-primary); text-decoration: underline; }
.sc-crumb a:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; border-radius: var(--hm-radius-control); }
.sc-titlebar { display: flex; justify-content: space-between; gap: var(--hm-space-3); align-items: flex-start; margin-bottom: var(--hm-space-4); }
.sc-titlebar h1 { margin: 0 0 var(--hm-space-1); }
.sc-head-actions { margin: 0; flex: none; }
.sc-head-actions .ux-ws-menu { margin-top: 0; } /* the Add lead menu's own 8px top margin made the header 8px taller than every other CRM page's (2.7.3.9) */
.sc-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 0 var(--hm-space-3); }
.sc-chip { display: inline-flex; align-items: center; min-height: var(--hm-control-height); padding: 6px 14px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-pill); background: var(--hm-surface); color: var(--hm-ink); font: inherit; font-weight: 600; cursor: pointer; }
.sc-chip.is-on { background: var(--hm-ink); color: var(--hm-on-dark); border-color: var(--hm-ink); }
.sc-chip-select select { min-height: var(--hm-control-height); border-radius: var(--hm-radius-pill); }
.sc-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--hm-space-4); margin-bottom: var(--hm-space-4); }
.sc-card-plain { background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); padding: var(--hm-space-4); min-width: 0; }
.sc-card-plain h2 { margin: 0 0 var(--hm-space-3); font-size: var(--hm-fs-section); }
.sc-table-card .hm-table-wrap { padding: 0; margin: 0; }
.sc-form-field .svc-note, .sc-form-field .smt-err { margin: 0; }
.snt-labelrow, .sc-labelrow { display: flex; align-items: center; gap: var(--hm-info-gap); }
.spo-line { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: var(--hm-space-2); align-items: end; min-width: 0; margin: 0 0 var(--hm-space-2); padding: var(--hm-space-3); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); }
.spo-find a { color: var(--hm-primary); font-weight: 600; }
/* W5-3b · Assign… (sales-assign.js) */
.sca-panel { display: grid; gap: var(--hm-space-2); margin-top: var(--hm-space-3); padding-top: var(--hm-space-3); border-top: 1px solid var(--hm-line); min-width: 0; }
.sc-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--hm-space-4); align-items: start; }
.sc-col { display: grid; gap: var(--hm-space-4); min-width: 0; }
.sc-fact a, .sc-row a:not(.btn) { color: var(--hm-primary); font-weight: 600; }
.sc-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sc-refs a { color: var(--hm-primary); font-weight: 600; }
.sc-error { background: var(--hm-danger-soft); border: 1px solid var(--hm-danger-line); color: var(--hm-danger); border-radius: var(--hm-radius-control); padding: var(--hm-space-3) var(--hm-space-4); margin: 0 0 var(--hm-space-3); }
.sc-list { list-style: none; margin: 0; padding: 0; background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); }
.sc-row { display: flex; justify-content: space-between; gap: var(--hm-space-3); align-items: center; padding: var(--hm-space-3) var(--hm-space-4); border-top: 1px solid var(--hm-line); }
.sc-wb { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--hm-space-4); } /* each list is a table (Harvey 2.7.3.7): one list under another, each the full width */
.sc-bucket .hm-table-wrap { padding: 0; margin: 0; }
.sc-bucket > :is(.svc-note, .hm-pager, nav) { margin: 0; padding: var(--hm-space-3); }
@media (max-width: 760px) { .sc-bucket h2, .sc-bucket > :is(.svc-note, .hm-pager, nav) { padding-inline: var(--hm-space-4); } .sc-bucket .hm-table-stack tr { padding-inline: var(--hm-space-4); } } /* stacked rows keep the card's inset on the phone */
.sc-bucket h2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0; padding: var(--hm-space-4) var(--hm-space-3) var(--hm-space-3); font-size: var(--hm-fs-section); }
.sc-card { padding: var(--hm-space-3) 0; border-top: 1px solid var(--hm-line); overflow-wrap: anywhere; }
.sc-card p { margin: 0 0 var(--hm-space-1); }
.svc-badge.sc-bad { color: var(--hm-danger); background: var(--hm-danger-soft); border: 1px solid var(--hm-danger-line); }
.svc-badge.sc-warn { color: var(--hm-pending); background: var(--hm-sand); border: 1px solid var(--hm-pending-line); }
.svc-badge.sc-grey { color: var(--hm-muted); background: var(--hm-bg); border: 1px solid var(--hm-line); }
.sc-field { display: grid; gap: 4px; font-weight: 600; }
.sc-field select { max-width: 420px; }
.sc-check { display: flex; gap: 10px; align-items: center; min-height: var(--hm-control-height); cursor: pointer; }
.sc-diff { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--hm-space-3); }
@media (max-width: 1000px) { .sc-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .sc-col-next { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .sc-titlebar { flex-direction: column; }
  .sc-wb, .sc-diff, .sc-two, .sc-cols { grid-template-columns: 1fr; }
  .sc-col-next { order: -1; }
  .spo-line { grid-template-columns: 1fr; }
  .sc-fact a, .sc-refs a, .spo-find a { display: inline-flex; align-items: center; min-height: var(--hm-control-height); } /* a tap target on a phone (assist P3 on 1f2bf2ce) */
  .sc-row { flex-direction: column; align-items: flex-start; }
}
/* CRM-C2 · W1-d d-4 · CRM › AI intake › Review (sales-intake-review.js; mock intake-l7-B): layout the live classes have
   no rule for. The line blocks are .smt-card inside a .sc-card-plain, drawn as rows; the rest is .sc-*, .smt-*, .spo-*. */
/* divider rows, not cards (ui-consistency, as mock B): .smt-card comes later in this file, so the row needs both classes */
.smt-card.sir-line { margin: 0; padding: var(--hm-space-3) 0; border: 0; border-top: 1px solid var(--hm-line); border-radius: 0; background: none; }
/* the lead's card (W3-b, Harvey's order): "Known" after the draft's buttons or its status line gets the same gap as after a list (ui-consistency P3-1 on 81f27749) */
[data-sak-card] .svc-actions + .sir-eyebrow, [data-sak-card] [data-sak-status] + .sir-eyebrow { margin-top: var(--hm-space-4); }
.sir-opt input[type="checkbox"] { flex: none; width: 20px; height: 20px; min-height: 0; margin: 1px 0 0; padding: 0; accent-color: var(--hm-primary); }
.sir-opt .svc-note { margin: 0; }
.sir-qtyrow .svc-note { margin: 0; }
/* mock intake-l7-C: each reading to review — a divider row with its value, quote, notes and decision */
.sir-reads { display: grid; gap: 0; }
.sir-read { padding: var(--hm-space-3) 0; border-top: 1px solid var(--hm-line); min-width: 0; }
/* CRM-C2 W2-a (mock G, Harvey approved): where a reading came from in an attachment, and what wasn't read */
.sir-from { margin: 4px 0 0; overflow-wrap: anywhere; }
.sir-urow .svc-note { margin: 0; }
.sir-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--hm-space-2); }
.sir-rejected { color: var(--hm-muted); font-weight: 400; text-decoration-thickness: 1px; }
.sir-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--hm-space-2) var(--hm-space-4); margin-top: var(--hm-space-4); }
.sir-foot > .svc-note { margin: 0; }
@media (max-width: 760px) { .sir-acts .text-button { min-height: var(--hm-touch-target); } } /* a tap target on a phone */
.sir-change { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--hm-space-2) var(--hm-space-3); }
.sir-arrow { color: var(--hm-muted); padding-top: 14px; }
.sir-a { display: inline-block; margin-top: 2px; color: var(--hm-primary); font-weight: 600; }
.sir-ropt .svc-note { margin: 0; }
[data-sir-bulk] + .svc-note { margin-top: var(--hm-space-2); } /* W5-b accept-all (ui-consistency P3 1 on the mock): a gap under the press */
.siw-act { flex: none; }
/* CRM-C2 W3-a r3 (mock A, E): the Other inquiry sources tiles, and a job's badge line */
.w3a-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--hm-space-3); }
@media (max-width: 760px) {
  .sir-a { display: inline-flex; align-items: center; min-height: var(--hm-touch-target); }
  .sir-again .text-button { min-height: var(--hm-touch-target); }
  .sir-arrow { padding-top: 0; transform: rotate(90deg); }
  .sir-change { flex-direction: column; }
  .siw-act, .siw-act .btn { width: 100%; }
}
.smt-titlebar { display: flex; justify-content: space-between; gap: var(--hm-space-3); align-items: flex-start; margin-bottom: var(--hm-space-4); }
.smt-card { background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); padding: var(--hm-space-4); margin-bottom: var(--hm-space-4); min-width: 0; }
.smt-mhead { display: flex; justify-content: space-between; gap: var(--hm-space-4); align-items: flex-start; margin-bottom: var(--hm-space-3); }
.smt-seg { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.smt-sig-high { color: var(--hm-primary); background: var(--hm-mint); border-color: var(--hm-primary-line); }
.smt-sig-medium { color: var(--hm-pending); background: var(--hm-sand); border-color: var(--hm-pending-line); }
.smt-sig-low { color: var(--hm-danger); background: var(--hm-danger-soft); border-color: var(--hm-danger-line); }
.smt-fh, .smt-fr { display: grid; grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 230px; gap: 10px; padding: 10px 12px; align-items: center; }
.smt-fh.smt-compact, .smt-fr.smt-compact { grid-template-columns: 190px minmax(0, 1fr) minmax(0, 1fr) 130px; }
.smt-fh { background: var(--hm-bg); font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-muted); }
.smt-fr { border-top: 1px solid var(--hm-line); overflow-wrap: anywhere; }
.smt-span { grid-column: 2 / -1; }
.smt-kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 6px 10px; margin: 0 0 var(--hm-space-4); }
/* CRM-C2 W4-b-2 (mock H2): Merge customers' field table (Field, one column per customer); a merged customer's line */
.smt-fh.smt-cols3, .smt-fr.smt-cols3 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.smu-ulist li { overflow-wrap: anywhere; }
/* Source updates: the file's rows — a long value is cut short (its full text is on hover); the result wraps */
@media (min-width: 761px) {
  .smu-rows .hm-table td { max-width: 18rem; }
  .smu-rows .hm-table td .hm-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* the cell's box inside the td is what is cut: the ellipsis shows */
  .smu-rows .hm-table td:last-child { max-width: none; min-width: 14rem; }
  .smu-rows .hm-table td:last-child .hm-cell { overflow: visible; text-overflow: clip; white-space: normal; }
}
.smu-tick input[type="checkbox"] { flex: none; width: 20px; height: 20px; min-height: 0; margin: 1px 0 0; padding: 0; accent-color: var(--hm-primary); }
/* a product source's review (smt-compact): the Use column holds Keep / Use the source's (ui-consistency P3-2 on 38e775ce) */
@media (min-width: 761px) { .smu-target .smt-fh.smt-compact, .smu-target .smt-fr.smt-compact { grid-template-columns: 190px minmax(0, 1fr) minmax(0, 1fr) 180px; } }
@media (max-width: 760px) {
  .smt-titlebar, .smt-mhead { flex-direction: column; }
  .smt-seg { justify-content: flex-start; }
  .smt-fh { display: none; }
  .smt-fr, .smt-fr.smt-compact, .smt-fr.smt-cols3 { grid-template-columns: 1fr; gap: 4px; }
  .smt-fr [data-k]::before { content: attr(data-k); display: block; font-size: var(--hm-fs-label); color: var(--hm-muted); }
  .smt-span { grid-column: auto; }
  .smt-kv { grid-template-columns: 110px minmax(0, 1fr); }
}
.svc-review { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: var(--hm-space-3); font-size: var(--hm-fs-meta); margin: 22px 0; }
@media (max-width: 1000px) { .svc-top { flex-wrap: wrap; } .svc-form-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .svc-counts { grid-template-columns: 1fr 1fr; gap: var(--hm-space-5); }
  .svc-counts > div { border: 0; }
  .svc-form { padding: var(--hm-space-4); }
  .svc-review { grid-template-columns: 90px minmax(0, 1fr); }
  .svc-top h2 { font-size: var(--hm-fs-section); }
}
.agent-chat-panel .btn.is-loading[aria-busy="true"] { opacity: 1; cursor: wait; } /* a button that is running, not a disabled one */

/* F2B B4-5a · one question over 7 days (mock v0.3 ④) — tokens only. */
.ux-shell .rs-monitors { margin: var(--hm-space-3) 0; }
.ux-shell .rs-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--hm-space-2); margin: var(--hm-space-3) 0; }
.ux-shell .rs-day { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 70px; padding: 8px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); color: var(--hm-ink); font: inherit; font-size: var(--hm-fs-label); text-align: left; cursor: pointer; }
.ux-shell .rs-day strong { font-weight: 600; }
.ux-shell .rs-day[data-state="overview"] { border-color: var(--hm-primary); background: var(--hm-mint); }
.ux-shell .rs-day[data-state="not_collected"] { border-color: var(--hm-pending-line); background: var(--hm-sand); }
.ux-shell .rs-day[data-state="not_yet"], .ux-shell .rs-day[data-state="overview_unreadable"] { background: var(--hm-neutral); color: var(--hm-muted); }
.ux-shell .rs-day[aria-pressed="true"], .ux-shell .rs-day.is-shown { box-shadow: inset 0 0 0 2px var(--hm-primary); }
.ux-shell .rs-days-legend { display: none; margin: 0 0 var(--hm-space-2); }
.ux-shell .rs-day:focus-visible { outline: none; box-shadow: var(--hm-shadow-focus); }
.ux-shell .rs-day-short { display: none; }
.ux-shell .rs-day-back { display: none; margin: 0 0 var(--hm-space-2); }
.ux-shell .rs-monitor-cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--hm-space-4); align-items: start; margin-top: var(--hm-space-3); }
.ux-shell .rs-monitor-card h4, .ux-shell .rs-day-panel h4 { margin: 0 0 4px; font-size: var(--hm-fs-body); font-weight: 600; }
.ux-shell .rs-day-panel { border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: 14px; background: var(--hm-surface); overflow-wrap: anywhere; }
.ux-shell .rs-day-panel ul { margin: 4px 0 8px; padding-left: 18px; }
.ux-shell .rs-day-panel li { min-height: var(--hm-touch-target); display: list-item; }
.ux-shell .rs-day-panel .rs-quote { margin: 0 0 8px; }
@media (max-width: 760px) {
  /* ADV-B45a-1: each day at least 44 wide (7 × 44 + 6 × 2 = 320 fits the 343 column); narrower, the strip scrolls in its box. */
  /* W1-11 (test): the seven days wrap onto a second row rather than scroll out of sight inside the strip (320 of 311). */
  .ux-shell .rs-days { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 2px; overflow-x: visible; }
  .ux-shell .rs-days-legend { display: block; }
  .ux-shell .rs-monitor[data-day-open="false"] .rs-day.is-shown:not([aria-pressed="true"]) { box-shadow: none; } /* its panel isn't shown here */
  .ux-shell .rs-day { min-width: var(--hm-touch-target); min-height: var(--hm-touch-target); padding: 6px 2px; align-items: center; text-align: center; font-size: var(--hm-fs-label); }
  .ux-shell .rs-day-long { display: none; }
  .ux-shell .rs-day-short { display: block; }
  .ux-shell .rs-monitor-cols { grid-template-columns: minmax(0, 1fr); }
  /* Mock ④ at 375: the day is its own view, Back returns to the same place; no day panel under the cards. */
  .ux-shell .rs-monitor[data-day-open="false"] .rs-day-panel { display: none; }
  .ux-shell .rs-monitor[data-day-open="true"] > :not(.rs-monitor-cols), .ux-shell .rs-monitor[data-day-open="true"] .rs-monitor-main { display: none; }
  .ux-shell .rs-day-back { display: block; }
  .ux-shell .rs-day-back .results-link { min-height: var(--hm-touch-target); }
}

/* F2B B4-3c · page drafts (mock f2b-b4-page-draft v0.1) — tokens only. */
.ux-shell .rs-page-start, .ux-shell .rs-page-draft { margin-top: var(--hm-space-3); padding-top: var(--hm-space-3); border-top: 1px solid var(--hm-line); }
.ux-shell .rs-page-steps.is-short { display: none; }
.ux-shell .rs-fact { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--hm-primary-line); border-radius: 0 var(--hm-radius-control) var(--hm-radius-control) 0; background: var(--hm-mint); font-size: var(--hm-fs-label); overflow-wrap: anywhere; }
.ux-shell .rs-fact p { margin: 0; }
.ux-shell .rs-fact .rs-fact-head { color: var(--hm-primary); font-size: var(--hm-fs-label); font-weight: 600; }
.ux-shell .rs-kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 12px; margin: 0 0 var(--hm-space-2); }
.ux-shell .rs-page-form .ask-input, .ux-shell .rs-page-start select, .ux-shell .rs-page-handoff .ask-input, .ux-shell .rs-page-discard .ask-input { width: 100%; }
@media (max-width: 760px) {
  .ux-shell .rs-kv { grid-template-columns: minmax(0, 1fr); }
  .ux-shell .rs-page-steps.is-long { display: none; }
  .ux-shell .rs-page-steps.is-short { display: flex; flex-wrap: nowrap; }
  .ux-shell .rs-page-draft .btn, .ux-shell .rs-page-start .btn, .ux-shell .rs-page-form .ask-input, .ux-shell .rs-page-start select, .ux-shell .rs-page-handoff .ask-input { min-height: var(--hm-touch-target); }
  .ux-shell .rs-page-draft .results-link, .ux-shell .rs-page-start .results-link { min-height: var(--hm-touch-target); }
}

/* F2A entry-and-focus 3/3 (mock v0.3 §1/§1b/§3b/§4): "View answers" (text-button) and "Find improvements" (.btn.secondary)
   side by side on each entry; on a phone the button comes first and both are 44px. Waiting: a line that says when it opens. */
.f2a-pair { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-2) var(--hm-space-3); margin-top: var(--hm-space-2); }
.f2a-pair .text-button { min-height: var(--hm-control-height); display: inline-flex; align-items: center; }
.f2a-find { white-space: nowrap; }
.f2a-find-wait { font-size: var(--hm-fs-meta); color: var(--hm-muted); }
/* W3-8b: what a check button uses, beside it (the detail page's allowance line, same type). */
.f2a-find-allowance { font-size: var(--hm-fs-meta); color: var(--hm-muted); align-self: center; }
.f2a-allow-short { display: none; }
/* ui-check on 0cae1741: on list rows at ≤760 the short form, so it sits beside the button; the sentence stays on the
   Results cards (where the merchant decides). The short span is aria-hidden; screen readers keep the sentence. */
@media (max-width: 760px) {
  .f2a-find-allowance:not(.weighed-card .f2a-find-allowance) .f2a-allow-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .f2a-find-allowance:not(.weighed-card .f2a-find-allowance) .f2a-allow-short { display: inline; }
  .f2a-find-allowance[data-f2a-pair] { display: none; } /* a two-control row: the panel's start view says it */
}
.wb-task-actions { flex: none; align-self: center; display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-2); }
.wb-task-actions .btn { min-height: var(--hm-control-height); }
@media (max-width: 760px) {
  .f2a-pair .f2a-find, .f2a-pair .f2a-find-wait { order: -1; }
  .f2a-pair .text-button, .ux-shell .f2a-find, .wb-task-actions .btn { min-height: var(--hm-touch-target); }
  /* ui-check on c45b381f: the pair (301px) never runs past a 375 row — its own line under the text, wrapping inside. */
  .wb-task-actions { margin-left: 56px; flex: 1 1 calc(100% - 56px); min-width: 0; }
  .wb-task-actions .wb-task-btn { margin-left: 0; }
  .ask-list .ask-row > a { display: flex; align-items: center; min-height: var(--hm-touch-target); } /* the question's link, 44px like the pair */
}
/* §11 (ui-check on 6e6bfdd0): the ⓘ after a long source line stays at the line's end — it never shrinks; the text wraps. */
.investigation-item-source { flex-wrap: nowrap; align-items: flex-start; }
.investigation-item-source > .hm-info { flex: none; }
/* ADV-F2A2-1 (test, P3): the result card's ⓘ keeps its whole 44px target above the coverage table's header. */
.investigation-card .agent-card-title .hm-info-btn { z-index: 1; }
/* §11: an element given focus after an action (tabindex -1: an error line, a draft's heading) shows the console's ring
   when focus is visible, and none otherwise — never the browser's blue. */
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
[tabindex="-1"]:focus-visible { outline: 2px solid var(--hm-primary); outline-offset: 2px; }
/* Results › AI answers & citations: each asked question is its own card (mock v0.3 §1) — the question, its line, the pair. */
.ask-list .ask-row { padding: 12px 14px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); }

/* ui-check on 4d692e03 (Fable): on a phone the series page's "open it in the research results" link (a 44px results-link)
   sits on its own line below the sentence, so the sentence keeps its normal line height. */
@media (max-width: 760px) {
  .ux-shell .rs-page [data-research-monitor-another] .results-link { display: flex; width: fit-content; }
}

/* §14 U2 (Harvey 10-09): Pages & sources. On a phone the table is the console's stacked table (as the round report's,
   ≤ 640px): one card per page, each cell under its column's name — so whether a page was read shows without scrolling
   sideways. On a wider screen the short cells (Whose, Read on, Result) don't wrap. */
.ux-shell .rs-sources-table td.rs-nowrap { white-space: nowrap; }
@media (max-width: 640px) {
  .ux-shell .rs-sources-table { min-width: 0; }
  .ux-shell .rs-sources-table, .ux-shell .rs-sources-table tbody, .ux-shell .rs-sources-table tr, .ux-shell .rs-sources-table td { display: block; width: 100%; box-sizing: border-box; }
  .ux-shell .rs-sources-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ux-shell .rs-sources-table tr { padding: 4px 10px; border-bottom: 1px solid var(--hm-line); }
  .ux-shell .rs-sources-table td { padding: 6px 0; border-bottom: 0; min-width: 0; }
  .ux-shell .rs-sources-table td.rs-nowrap { white-space: normal; }
  .ux-shell .rs-sources-table td::before { content: attr(data-label); display: block; font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-muted); }
}

/* NAVIM W1-1 — the PRODUCT group's new pages (rulings §6): the console's page header, then cards on the canvas.
   W1-1b (ui-check): the card's words are the console's empty-state size (12px, prose line height), padding 16 on a phone;
   the product choice inside a card is a bare picker — label above, select full width, no second box. */
.ux-shell .navim-page { display: grid; gap: var(--hm-space-4); min-width: 0; }
.ux-shell .navim-page .hm-page-header { margin: 0; }
.ux-shell .navim-card { display: grid; gap: var(--hm-space-3); min-width: 0; padding: var(--hm-space-5); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); overflow-wrap: anywhere; }
.ux-shell .navim-card > p { margin: 0; max-width: 68ch; font-size: var(--hm-fs-meta); line-height: var(--hm-lh-prose); color: var(--hm-muted); }
.ux-shell .navim-card .results-scope { display: block; margin: 0; padding: 0; background: none; box-shadow: none; border-radius: 0; }
.ux-shell .navim-card .results-scope .results-picker { display: flex; flex-direction: column; align-items: stretch; gap: var(--hm-space-1); width: 100%; min-width: 0; }
.ux-shell .navim-card .results-scope .results-picker select { width: 100%; max-width: 100%; min-width: 0; }
@media (max-width: 760px) {
  .ux-shell .navim-card { padding: var(--hm-space-4); }
}

/* NAVIM W1-2c (ui-check): an eyebrow inside a workcard keeps the console's eyebrow size — `.ux-shell .workcard p`
   (0,2,1) made it 15px/700 caps, three lines at 375, larger than the row's title. (0,3,0) wins for every list row. */
.ux-shell .workcard .ov-eyebrow { margin: 0; font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: var(--hm-ls-caps); line-height: var(--hm-lh-body); }

/* NAVIM W1-3b (test, W1-2c P3): on a phone a list row's eyebrow is two lines — the product, then the rest — never four. */
@media (max-width: 760px) {
  .ux-shell .workcard .navim-eb-product, .ux-shell .workcard .navim-eb-rest { display: block; }
  .ux-shell .workcard .navim-eb-sep { display: none; }
  .ux-shell .workcard .navim-eb-wide { display: none; } /* W1-1h: the AI answers rows' platforms — named in the ways lines below */
}

/* NAVIM W1-2b — the AI answers list: console workcards; each row's actions together; its rounds folded; Show more centred. */
.ux-shell .navim-page .navim-filters { margin: 0; min-width: 0; }
/* A select's min-content is its longest option: let each filter's select shrink so a long product name never widens
   the page (375: one filter a row, label beside its select, as Results). */
.ux-shell .navim-filters .results-picker { min-width: 0; }
.ux-shell .navim-filters .results-picker select { flex: 1 1 auto; min-width: 0; }
.ux-shell .navim-rows { margin-top: 0; }
.ux-shell .navim-ways { margin: var(--hm-space-2) 0 0; padding-left: var(--hm-space-4); font-size: var(--hm-fs-meta); line-height: var(--hm-lh-prose); color: var(--hm-muted); }
.ux-shell .navim-rounds { margin-top: var(--hm-space-2); font-size: var(--hm-fs-label); line-height: var(--hm-lh-prose); color: var(--hm-muted); }
.ux-shell .navim-rounds summary { cursor: pointer; min-height: var(--hm-touch-target); display: flex; align-items: center; font-weight: 600; color: var(--hm-ink); }
.ux-shell .navim-rounds ol, .ux-shell .navim-rounds ul { margin: 0; padding-left: var(--hm-space-4); }
.ux-shell .navim-rounds ol > li { margin-top: var(--hm-space-2); }
.ux-shell .navim-round-when { font-weight: 600; color: var(--hm-ink); }

/* NAVIM W1-8b (ui-check): a research need's Workbench row shows its whole description (problem, basis, next step), as
   the consistency cards do — never two lines of three sentences. */
.ux-shell .wb-task.wb-task-full .wb-task-detail { -webkit-line-clamp: unset; display: block; overflow: visible; }
.ux-shell .cr-howrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--hm-space-2) var(--hm-space-3); }
.ux-shell .cr-howrow .cr-download { margin-left: auto; }

/* NAVIM W1-6: the plan-locked card's "Not in your plan" tag keeps its own width (the card is a grid). */
.ux-shell .navim-locked > .tag { justify-self: start; }

/* NAVIM W1-5b (ui-check): the Consistency report's "Pages checked" card is a figure, not a filter — no pointer and no
   hover colour (the tiles' hover turned its label light on the white card). */
.ux-shell .cr-summary .wb-stat-static { cursor: default; }
.ux-shell .cr-summary .wb-stat-static:hover .wb-stat-label, .ux-shell .cr-summary .wb-stat-static:hover .wb-stat-sub { color: var(--hm-muted); }
.ux-shell .cr-summary .wb-stat-static:hover .wb-stat-number { color: var(--hm-ink); }

/* NAVIM W2-4 · Improvements for one question (rulings §20: console components; tokens win over the mock). */
.ux-shell .imp-head-action { display: grid; gap: 6px; justify-items: end; }
.ux-shell .imp-allowance { margin: 0; font-size: var(--hm-fs-meta); text-align: right; }
.ux-shell .imp-detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--hm-space-4); align-items: start; }
/* The side panel stays in view while the left column (the answer, Product accuracy, After this change) scrolls; one taller than the window scrolls inside itself. */
.ux-shell .imp-detail > .imp-used { position: sticky; top: calc(var(--hm-topbar-height) + 8px); max-height: calc(100vh - var(--hm-topbar-height) - 16px); overflow-y: auto; }
.ux-shell .workcard.imp-card { grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; justify-items: start; }
.ux-shell .imp-actions { display: flex; flex-wrap: wrap; gap: var(--hm-space-2); align-items: center; }
/* D3-4c: the Workbench row's Not an issue confirmation, in the row's body — its own line and buttons (no row indent). */
.ux-shell .wb-imp-aside { margin-top: var(--hm-space-3); padding: var(--hm-space-3); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); }
.ux-shell .wb-imp-aside-actions .btn { min-height: var(--hm-control-height); } /* the row's size (assist-sonnect P3); 44 at ≤760 */
@media (max-width: 760px) { .ux-shell .wb-imp-aside-actions .btn { min-height: var(--hm-touch-target); } }
.ux-shell .imp-notice-error, .ux-shell .workcard p.imp-notice-error, .ux-shell .wb-task p.imp-notice-error { color: var(--hm-danger); } /* a refusal reads as one, not as helper text (assist-sonnect P3) */
.ux-shell .imp-used { position: sticky; top: calc(var(--hm-topbar-height) + 12px); }
.ux-shell .imp-prevnext { display: flex; justify-content: center; gap: var(--hm-space-3); margin-top: var(--hm-space-5); }
/* W2-4d (ui-check on 803e7b4b): `.ux-shell .workcard p` (0,2,1) out-ranked the basis and the form's note — 0,3,0+ here. */
.ux-shell .workcard.imp-card .imp-basis { font-size: var(--hm-fs-meta); line-height: var(--hm-lh-prose); margin: 0; }
/* W3-1e (ui-check): every paragraph in an improvement card starts at the card's 13px prose (0,3,1 over `.workcard p`'s
   0,2,1), so a new line in the card can't pick up the 15px muted default again; the smaller lines are named below. */
.ux-shell .workcard.imp-card p { margin: 0; font-size: var(--hm-fs-meta); line-height: var(--hm-lh-prose); }
/* W3-4 (live): the card catch-all must not undo W1-2c — an eyebrow in an improvement card keeps the console's 10px caps. */
.ux-shell .workcard.imp-card p.ov-eyebrow { font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: var(--hm-ls-caps); line-height: var(--hm-lh-body); }
.ux-shell .workcard.imp-card .imp-card-error { color: var(--hm-danger); font-size: var(--hm-fs-label); line-height: var(--hm-lh-prose); margin: 0; }
.ux-shell .workcard.imp-card .pil-field-error { color: var(--hm-danger); font-size: var(--hm-fs-label); line-height: var(--hm-lh-prose); }
/* W3-3: Ask the buyer — the prepared question, quoted, under a caps label. */
/* ui-check on e0f085f4: a text action in a card's row (Cancel, Reopen, Close, Not an issue) is a 44px target on desktop too. */
.ux-shell .imp-actions .results-link { min-width: var(--hm-touch-target); justify-content: center; }
.ux-shell .workcard.imp-card .obs-quote { width: 100%; box-sizing: border-box; }
.ux-shell .workcard.imp-card .obs-quote p { color: var(--hm-ink); }
/* W3-2: the two statements of a contradiction — the Changes page's side-by-side block, neither side marked. */
/* ui-check on b5c07096: the Find improvements panel is 420px wide whatever the viewport — the statements stack there. */
/* A right column taller than the screen isn't stuck (its lower part would be out of reach); app.js marks it. */
.ux-shell .imp-used.is-tall { position: static; }
/* W2-4c: the same detail in the Find improvements panel — one column, nothing stuck. */
.ux-shell .imp-in-panel .imp-detail { grid-template-columns: minmax(0, 1fr); }
.ux-shell .imp-in-panel .imp-detail > .imp-used { position: static; max-height: none; overflow-y: visible; }
/* W2-5: the Improvements list's rows — the question under the need, muted; the batch confirmation. */
/* W2-5c (ui-check): the row's why line at the detail cards' 13px (`.workcard p` gave it 15px over a 12px question). */
.ux-shell .workcard.imp-row p:not(.imp-row-q):not(.ov-eyebrow) { font-size: var(--hm-fs-meta); line-height: var(--hm-lh-prose); margin: 0; }
/* The one new notice tone (§20): a check that didn't finish. */
.ux-shell .ux-notice.cr-notice-danger { background: var(--hm-danger-soft); border-color: var(--hm-danger-line); }
.ux-shell .ux-notice.cr-notice-danger p { color: var(--hm-ink); }
@media (max-width: 850px) {
  .ux-shell .imp-detail { grid-template-columns: minmax(0, 1fr); }
  .ux-shell .imp-used, .ux-shell .imp-detail > .imp-used { position: static; max-height: none; overflow-y: visible; }
}
@media (max-width: 760px) {
  .ux-shell .imp-head-action { justify-items: start; }
  .ux-shell .imp-allowance { text-align: left; }
  .ux-shell .imp-page .ux-notice { flex-direction: column; }
  .ux-shell .imp-prevnext { flex-direction: column; align-items: stretch; }
  /* W2-4d: a text link in a card's actions is a 44px target on a phone (Cancel was 40 wide). */
  .ux-shell .imp-actions .results-link { min-width: var(--hm-touch-target); min-height: var(--hm-touch-target); justify-content: center; }
  .ux-shell .imp-batch-confirm .results-link { min-width: var(--hm-touch-target); min-height: var(--hm-touch-target); } /* W2-5c: Cancel was 40 wide */
  /* §20: the question block's eyebrow on two lines — the product, then platforms · date. */
  .ux-shell .imp-question .navim-eb-product, .ux-shell .imp-question .navim-eb-rest { display: block; }
  .ux-shell .imp-question .navim-eb-sep { display: none; }
}
/* One component in two places (assist-sonnect P3 on 596a9af9): its heading 14/600 on the question page and on a draft card,
   over `.ux-shell .workcard h4`. */
.ux-shell .imp-answer-facts h4.ask-h4, .ux-shell .workcard .imp-answer-facts h4.ask-h4 { font-size: var(--hm-fs-body); font-weight: 600; line-height: var(--hm-lh-title); }
.ux-shell .imp-fact input[type="checkbox"] { flex: none; width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--hm-primary); }
.ux-shell .imp-fact b { color: var(--hm-ink); font-size: var(--hm-fs-meta); font-weight: 600; }
.ux-shell .imp-fact[data-state="different"] label { background: var(--hm-sand); border-color: var(--hm-pending-line); } /* the sand notice's tokens (mock) */
.ux-shell .imp-answer-foot { margin-top: var(--hm-space-2); }
.ux-shell .workcard.dc-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--hm-space-2); border-left: 4px solid var(--hm-primary); }
.ux-shell .workcard.dc-card.dc-pending { border-left-color: var(--hm-pending-muted); }
.ux-shell .workcard.dc-card p { margin: 0; font-size: var(--hm-fs-meta); line-height: var(--hm-lh-prose); }
.ux-shell .workcard.dc-card p.dc-eyebrow { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--hm-space-1) var(--hm-space-3); font-size: var(--hm-fs-label); color: var(--hm-muted); }
.ux-shell .workcard.dc-card h4.dc-title { font-weight: 600; } /* over `.ux-shell h4` (700) — assist-sonnect P3 */
.ux-shell .workcard.dc-card .cs-readiness p, .ux-shell .workcard.dc-card .cs-readiness li { font-size: var(--hm-fs-meta); line-height: var(--hm-lh-prose); }
.ux-shell .workcard.dc-card .dc-next p.dc-next-h, .ux-shell .workcard.dc-card .dc-next p.dc-facts-h { font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: var(--hm-ls-caps); text-transform: uppercase; color: var(--hm-pending); }
.ux-shell .workcard.dc-card .dc-next p.pil-field-error { color: var(--hm-danger); font-size: var(--hm-fs-label); font-weight: 600; margin: 0; } /* a refusal reads as one (assist-sonnect P2) */
.ux-shell .workcard.dc-card p.dc-problem { color: var(--hm-ink); }
.ux-shell .workcard.dc-card .dc-basis p.dc-basis-h { font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: var(--hm-ls-caps); text-transform: uppercase; color: var(--hm-muted); margin-bottom: var(--hm-space-1); }
.ux-shell .workcard.dc-card .dc-preview p.dc-q { font-weight: 600; color: var(--hm-ink); }
.ux-shell .workcard.dc-card p.dc-readonly { padding: var(--hm-space-3); border-radius: var(--hm-radius-card); background: var(--hm-mint); color: var(--hm-ink); }
.ux-shell .dc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-2); }
.ux-shell .dc-actions .btn { min-height: var(--hm-control-height); }
.ux-shell .dc-actions .btn.dc-reject { color: var(--hm-danger); border-color: var(--hm-danger-line); }
.ux-shell .dc-note { margin-left: auto; font-size: var(--hm-fs-label); color: var(--hm-muted); }
@media (max-width: 760px) {
  .ux-shell .dc-actions { flex-direction: column; align-items: stretch; }
  .ux-shell .dc-actions .btn { min-height: var(--hm-touch-target); width: 100%; }
  .ux-shell .dc-note { margin-left: 0; }
}

/* assist-sonnect P3 (acbd6cb9): the batch button's short label at ≤360 so a three-digit count fits at 320. */
.ux-shell .imp-batch-btn .imp-batch-short { display: none; }
@media (max-width: 360px) {
  .ux-shell .imp-batch-btn .imp-batch-long { display: none; }
  .ux-shell .imp-batch-btn .imp-batch-short { display: inline; }
}

/* G2-f / G2-d2 (assist-sonnect P3 on eb498554): a bounded read's note is one muted line wherever it is said — the AI
   answers and Improvements lists, a check's page and the Workbench — over each host's paragraph rules. */
.ux-shell p.navim-cap-note, .ux-shell .workcard p.navim-cap-note, .ux-shell .imp-used p.navim-cap-note, .ux-shell p.wb-qstate.navim-cap-note { margin: var(--hm-space-2) 0 0; font-size: var(--hm-fs-label); line-height: 18px; color: var(--hm-muted); font-weight: 400; }

/* assist-sonnect P3 (520ec693): one text colour for the sand notices on the question page and a draft card — the facts
   warning's ink (the R2 notice was amber on sand beside it). */
.ux-shell .imp-page .ux-notice.cr-notice-sand p, .ux-shell .workcard.dc-card .ux-notice.cr-notice-sand p { color: var(--hm-ink); }
/* G2-g: a plan-locked product's items, folded at the bottom of the Workbench and its buying opportunities. */
/* SIGLEAD W5 · Find customers (find-customers.js; mock-w5 cd06f30d) */
.fc-card { margin: 0 0 var(--hm-space-4); }
/* the box's matches (Find leads picker, mock v2): under the box, its count line, then the rows */
.fc-pick { margin: var(--hm-space-2) 0 var(--hm-space-3); }
.fc-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: var(--hm-space-4); align-items: start; }
.fc-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hm-space-3); margin-bottom: var(--hm-space-4); }
.fc-row { display: flex; gap: var(--hm-space-3); align-items: center; justify-content: space-between; }
.fc-grow { flex: 1; min-width: 0; }
.fc-only-s { display: none; }
.svc-badge.fc-off { color: var(--hm-muted); background: var(--hm-neutral); }
.fc-two-cards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--hm-space-4); align-items: start; }
.fc-steps { display: flex; gap: var(--hm-space-2); flex-wrap: wrap; margin: 0 0 var(--hm-space-3); font-size: var(--hm-fs-label); color: var(--hm-muted); }
.fc-steps span { padding: 6px 10px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); }
.fc-steps b { display: block; font-size: var(--hm-fs-label); }
@media (max-width: 480px) { .fc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } } /* three steps, three equal cells: the third never wraps alone on a row of its own (ui-test 10-26) */
.fc-page a:not(.btn):not(.row-btn) { color: var(--hm-primary); font-weight: 600; text-decoration: none; }
.fc-why .fc-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; margin: 0 0 var(--hm-space-2); }
.fc-steps .now { border-color: var(--hm-primary); color: var(--hm-ink); }
.fc-steps .done { background: var(--hm-mint); color: var(--hm-ink); }
.fc-own.hm-input-row > .hm-input { max-width: 330px; } /* the own-term row: a width only; its height is the row's (TextInput · InputRow) */
/* Find leads home (Harvey 10-28, mock v3): the big box on top, the competitor box smaller under it; a box and its button
   share a row, and stack on a phone */
.fc-receipt-link { margin-left: var(--hm-space-2); white-space: nowrap; } /* ui-test #12: the receipt's words and its link never run together */ /* Harvey 10-26: 50% wider than a field's 220px */
.svc-badge.fc-warn { color: var(--hm-pending); background: var(--hm-sand); }
.svc-badge.fc-bad { color: var(--hm-danger); background: var(--hm-danger-soft); }
.fc-referral { background: linear-gradient(135deg, var(--hm-mint), var(--hm-sand)); }
.fc-chips { margin-top: 0; margin-bottom: var(--hm-space-3); flex-wrap: wrap; }
.fc-lead { display: flex; gap: var(--hm-space-3); align-items: flex-start; padding: var(--hm-space-3) 0; border-bottom: 1px solid var(--hm-line); }
.fc-lead-actions { display: flex; flex-direction: column; gap: var(--hm-space-2); align-items: stretch; flex: 0 0 auto; max-width: 220px; }
.fc-chips .btn { white-space: normal; }
.fc-lead-group { margin: var(--hm-space-3) 0 var(--hm-space-2); font-size: var(--hm-fs-meta); color: var(--hm-muted); }
.fc-live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: var(--hm-radius-pill); background: var(--hm-primary); vertical-align: middle; animation: fc-live-pulse 1.2s ease-in-out infinite; }
@keyframes fc-live-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .fc-live-dot { animation: none; } }
@media (max-width: 1060px) { .fc-side, .fc-two-cards { grid-template-columns: minmax(0, 1fr); } }
/* Where the columns stack (Harvey 10-29: on a phone the cards come first): the right column's cards join the stack — Balance and Today above the form and its lists, Invite a friend after them */
@media (max-width: 1060px) { .fc-side-col { display: contents; } .fc-side-col > * { margin-bottom: 0; } .fc-side-col > .fc-today { order: -1; } .fc-side-col > .fc-referral { order: 1; } } /* the content column is the viewport less the rail, column 2 and the gutters (312 + 44): 340 + 340 does not fit under ~700 */
@media (max-width: 600px) { .fc-saved .fc-grow { flex: 1 1 100%; } .fc-lead { flex-direction: column; } .fc-lead-actions { flex-direction: row; flex-wrap: wrap; } .fc-why .fc-row { grid-template-columns: minmax(0, 1fr); gap: 4px; } .fc-hide-s { display: none; } .fc-only-s { display: block; } .fc-two { grid-template-columns: minmax(0, 1fr); } }
.fc-row .fc-grow > .svc-note:has(+ [data-fc-started-by]) { margin-bottom: var(--hm-space-1); } /* "Started by" is the next line of the same block, not a new paragraph */
@media (max-width: 600px) { /* a search row's status and Open go under its text on a phone, the way a table stacks, instead of squeezing the text to a third of the width */
  .fc-row:has(> .fc-grow):has(> :is(a.btn, button.btn)) { flex-wrap: wrap; justify-content: flex-start; row-gap: var(--hm-space-2); }
  .fc-row:has(> .fc-grow):has(> :is(a.btn, button.btn)) > .fc-grow { flex: 1 1 100%; min-width: 0; }
}
@media (max-width: 600px) { .ux-shell [data-fc-page="searches"] .fc-row { align-items: flex-start; flex-wrap: wrap; } .ux-shell [data-fc-page="searches"] .fc-row .fc-grow { flex: 1 1 100%; } }
/* 2.7.1 (Harvey 10-22): the console's own "This page isn't here", and the screen for a workspace that could not be read. */
.console-not-found-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.workspace-unavailable { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--hm-bg); }
.workspace-unavailable-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }
.workspace-unavailable-actions button { flex: 1 1 140px; max-width: 200px; } /* the two buttons are the same width, side by side where they fit and stacked on a phone */


/* UI refresh P2: the page title and its (i) sit on one row; a page's own fact sits under it in meta size */
.hm-page-title-row { display: flex; align-items: center; gap: var(--hm-space-2); min-width: 0; }
.hm-page-header .hm-page-meta { margin: var(--hm-space-1) 0 0; font-size: var(--hm-fs-meta); line-height: var(--hm-lh-body); color: var(--hm-muted); }

/* UI refresh P2: column 2 carries menu names only: the find box keeps its label and hint for screen readers, not for the eye. */
.nav3-find .nav3-find-label, .nav3-find .nav3-find-hint { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* UI refresh P2: .secondary-button (Copy, Connect Google Analytics, Add a source …) reads as a secondary: white, grey line, cyan words. */
.ux-shell button.secondary-button, .ux-shell a.secondary-button { background: var(--hm-surface); color: var(--hm-primary); border: 1px solid var(--hm-line-strong); }
.ux-shell button.secondary-button:hover:not(:disabled), .ux-shell a.secondary-button:hover { background: var(--hm-mint); color: var(--hm-primary); }

/* UI refresh P2: the Products table fits its card at 1280 and 1440 (it was 1044px wide in a 1002px / 842px card, which hid the
   right half of "⋯ More"): tighter side padding, a narrower Product column, and the issue and "Updated …" lines may wrap. */
@media (min-width: 761px) {
  .ux-shell .ux-products-card .products-table th, .ux-shell .ux-products-card .products-table td { padding-left: 10px; padding-right: 10px; }
  .ux-shell .products-table th:first-child, .ux-shell .products-table td.product-cell { min-width: 180px; }
  .ux-shell .products-table .row-top-issue, .ux-shell .products-table .col-info .row-updated { white-space: normal; overflow-wrap: anywhere; }
  .ux-shell .products-table .row-creator { white-space: normal; overflow-wrap: break-word; }
}
/* and at 1024 (card about 620px): tighter still, so the row's Open product and ⋯ More are inside the card without a sideways scroll */
@media (min-width: 761px) and (max-width: 1100px) {
  .ux-shell .ux-products-card .products-table th, .ux-shell .ux-products-card .products-table td { padding-left: 6px; padding-right: 6px; }
  .ux-shell .products-table th:first-child, .ux-shell .products-table td.product-cell { min-width: 138px; }
  .ux-shell .products-table .row-actions-cell .row-actions { gap: 4px; }
  .ux-shell .products-table .row-actions-cell .row-btn { padding-left: 6px; padding-right: 6px; }
  /* the name is what the row is about: it wraps; the address keeps one line with an ellipsis rather than breaking inside it */
  .ux-shell .products-table .product-cell strong .product-name-link { white-space: normal; overflow-wrap: anywhere; }
  .ux-shell .products-table .row-creator { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* UI refresh P2: Add products, Help and Referrals draw no card around their header, so their title shares the page's left edge. */
body.ux-shell #import-view, body.ux-shell #account-view, body.ux-shell #help-view { background: transparent; padding: 0; box-shadow: none; border-radius: 0; }

/* UI refresh P3: AI answers' engine tags — the engine's dot and name, and a mark: ✓ recommended you (green), ~ mentioned you (grey), ✕ did not
   mention you (red), – no verdict. The way's full sentence is the tag's tooltip and accessible name. */
/* The ONE engine tag (EngineTag in components.js; the AiAnswers mock): 22px × 40px pill, the 8px engine dot and the verdict mark on the centre line, 4px apart; tinted by verdict. */
.eng-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--hm-space-2) 0 0; padding: 0; list-style: none; }
.ux-shell .eng-tags > .eng-item { display: block; margin: 0; padding: 0; border: 0; }
.eng-tags .eng-tag { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 40px; height: 22px; margin: 0; padding: 0; border-radius: var(--hm-radius-pill); background: var(--hm-neutral); color: var(--hm-ink); font-size: var(--hm-fs-label); line-height: 1; font-weight: 600; white-space: nowrap; }
.eng-tags .eng-tag-ok { background: var(--hm-success-tint); color: var(--hm-success); }
.eng-tags .eng-tag-bad { background: var(--hm-danger-tint); color: var(--hm-danger); }
.eng-tags .eng-tag-mid, .eng-tags .eng-tag-none { background: var(--hm-neutral); color: var(--hm-muted); }
.eng-dot { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: var(--hm-radius-pill); background: var(--hm-faint); } /* the legend's dot too */
.eng-tags .eng-dot { flex: none; display: block; width: 8px; height: 8px; margin: 0; border-radius: var(--hm-radius-pill); background: var(--hm-faint); }
.eng-dot-chatgpt { background: var(--hm-eng-chatgpt); }
 .eng-dot-claude { background: var(--hm-eng-claude); }
 .eng-dot-gemini { background: var(--hm-eng-gemini); }
 .eng-dot-perplexity { background: var(--hm-eng-perplexity); }
.eng-tags .eng-dot-chatgpt { background: var(--hm-eng-chatgpt); }
 .eng-tags .eng-dot-claude { background: var(--hm-eng-claude); }
 .eng-tags .eng-dot-gemini { background: var(--hm-eng-gemini); }
 .eng-tags .eng-dot-perplexity { background: var(--hm-eng-perplexity); }
.eng-tags .eng-tag .eng-mark { display: block; flex: none; margin: 0; font-weight: 600; line-height: 1; }
/* The ONE issue tag (IssueTag in components.js): 22px amber pill, a 16px icon and a 1–2 word label on the centre line, 5px apart; its sentence shows on hover AND on keyboard focus (the tag takes Tab). */
.ux-shell .issue-tag { position: relative; box-sizing: border-box; display: inline-flex; align-items: center; gap: 5px; height: 22px; max-width: 100%; margin: 0; padding: 0 8px; border-radius: var(--hm-radius-pill); background: var(--hm-attention-tint); color: var(--hm-attention); font-size: var(--hm-fs-label); line-height: 1; font-weight: 600; white-space: nowrap; overflow: visible; cursor: default; }
.ux-shell .issue-tag:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.ux-shell .issue-tag .ux-icon { flex: none; display: block; width: var(--hm-icon-s); height: var(--hm-icon-s); margin: 0; }
.ux-shell .issue-tag .issue-label { display: block; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; color: inherit; font-size: var(--hm-fs-label); }
.ux-shell .issue-tag .issue-more { display: block; flex: none; margin: 0; padding-left: 5px; border-left: 1px solid var(--hm-pending-line); color: inherit; font-size: var(--hm-fs-label); }
.ux-shell .issue-tag .issue-tip { position: absolute; z-index: 30; left: 0; bottom: calc(100% + 6px); display: none; box-sizing: border-box; width: max-content; max-width: 280px; margin: 0; padding: 8px 10px; border-radius: var(--hm-radius-control); background: var(--hm-ink); color: var(--hm-on-dark); font-size: var(--hm-fs-meta); line-height: 1.4; font-weight: 400; white-space: normal; text-align: left; box-shadow: var(--hm-shadow-md); }
.ux-shell .issue-tag:is(:hover, :focus-visible) .issue-tip { display: block; }

/* UI refresh P3: a list row's product · platforms · date line is plain 13px grey, not a caps eyebrow. */
.ux-shell .navim-row .ov-eyebrow { text-transform: none; letter-spacing: 0; font-size: var(--hm-fs-meta); font-weight: 400; color: var(--hm-muted); }

/* UI refresh P3: the Workbench's number cards (plan section 6): a 36px icon square on the left in the module's light colour, then the
   number (28px) with its caption (13px) under it. */
.wb-stat { flex-direction: row-reverse; justify-content: flex-end; gap: var(--hm-space-3); padding: 16px 20px; }
.wb-stat-number { order: 1; }
.wb-stat-label { order: 2; font-size: var(--hm-fs-meta); }
.wb-stat-icon { width: 36px; height: 36px; border-radius: var(--hm-radius-control); }
.wb-stat:nth-child(1) .wb-stat-icon { background: var(--hm-aeo-tint); color: var(--hm-aeo); }
.wb-stat:nth-child(2) .wb-stat-icon { background: var(--hm-attention-tint); color: var(--hm-attention); }
.wb-stat:nth-child(3) .wb-stat-icon { background: var(--hm-primary-tint); color: var(--hm-primary); }

/* UI refresh P3: the Ask page's column starts at the page's left edge like every other page (it was centred). */
.ask-page { margin: 0; }

/* UI refresh P3: a Products row's one action is a cyan text link ("Open product →"); ⋯ More stays the overflow menu. */
.ux-shell .products-table .row-actions a.row-btn { border-color: transparent; background: transparent; box-shadow: none; color: var(--hm-primary); font-size: var(--hm-fs-body); font-weight: 600; }
.ux-shell .products-table .row-actions a.row-btn:hover { background: var(--hm-mint); color: var(--hm-primary); }

/* UI refresh P3: the question is the row's link to its answers (the View answers button is gone); Find improvements is the row's one button. */
.ux-shell .navim-row h4 .navim-row-link { color: var(--hm-ink); text-decoration: none; }

/* UI refresh P4: the cyan focus ring on a dark fill (the pressed or hovered Workbench card) stands 3px off it; Help's scrollable table has the same ring. */
.wb-stat:focus-visible { outline-offset: 3px; }

/* Harvey 10-23: a picked photo is previewed; Save photo / Cancel keep or drop it. */
.avatar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* ui-test P5a: the contact list's unsaved bar rides the bottom of the screen while the list runs on. */
.ux-shell .rs-unsaved-bar { position: sticky; bottom: var(--hm-footer-h); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-3); padding: var(--hm-space-3); margin-top: var(--hm-space-3); background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); box-shadow: 0 -1px 0 var(--hm-line); }
/* The screen-reader-only header text of a scroll box is positioned against the box, not the page (it widened the page by 508px at 1024). */
.ux-shell .rs-table-scroll, .citation-table-wrap { position: relative; }

/* coder-crm 10-24: a long unbroken word in a page title (a lead's name at 320px) wraps inside the page instead of widening it — the
   shared header's title on every page, CRM's included. */
.ux-shell .hm-page-header h1, .ux-shell .hm-page-title-row { min-width: 0; overflow-wrap: anywhere; }

/* 2.7.4 menu board: the top bar's own search and bell go (column 2's Search and the rail's bell replace them): the form still serves the
   search, opened as a box under Search, and the bell's panel opens beside the rail's bell. From 901px only. */
@media (min-width: 901px) {
  .ux-shell.nav3 .ux-topbar .ux-search { display: none; }
  .ux-shell.nav3 .ux-topbar .ux-search.nav3-search-open { display: flex; position: fixed; z-index: 600; left: 84px; top: calc(var(--hm-announce-h) + 60px); width: 216px; min-height: 36px; padding: 0 12px; align-items: center; gap: 8px; border: 1px solid var(--hm-line-strong); border-radius: var(--hm-radius-control); background: var(--hm-surface); }
  .ux-shell.nav3 .ux-topbar .ux-search.nav3-search-open input { position: static; flex: 1 1 auto; min-width: 0; width: auto; padding: 0; border: 0; background: transparent; outline: 0; box-shadow: none; color: var(--hm-ink); cursor: text; font: inherit; font-size: var(--hm-fs-body); }
  .ux-shell.nav3 .ux-topbar .ux-search.nav3-search-open input::placeholder { color: var(--hm-muted); }
  .ux-shell.nav3 .ux-topbar .ux-search.nav3-search-open .ux-search-icon { position: static; transform: none; }
  .ux-shell.nav3 .ux-topbar .ux-bell { display: none; }
}
/* the board's top line: "Module / Page" in 13px, the whole line muted */
@media (min-width: 901px) {
  .ux-shell.nav3 .ux-crumb ol { font-size: var(--hm-fs-meta); }
  .ux-shell.nav3 .ux-crumb li + li::before { content: "/"; margin: 0 6px; }
  .ux-shell.nav3 .ux-crumb li.ux-crumb-here { color: var(--hm-muted); font-weight: 400; }
}
.account-signout-link { display: none; }
@media (min-width: 901px) { body.nav3 .account-signout-link { display: block; } }

/* Menu board 10-24: the page header's one status pill beside the title, and the third level — the page's tabs under the header. */
.hm-header-status { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 10px; border-radius: var(--hm-radius-pill); background: var(--hm-hover); color: var(--hm-muted); font-size: var(--hm-fs-label); line-height: var(--hm-lh-tight); font-weight: 600; white-space: nowrap; }
.hm-header-status-dot { width: 6px; height: 6px; border-radius: var(--hm-radius-pill); background: currentColor; }
.hm-header-status-attention { background: var(--hm-attention-tint); color: var(--hm-attention); }
.hm-header-status-danger { background: var(--hm-danger-tint); color: var(--hm-danger); }
.hm-header-status-ok { background: var(--hm-success-tint); color: var(--hm-success); }
.hm-header-status-aeo { background: var(--hm-aeo-tint); color: var(--hm-aeo); }
.hm-header-status-fc { background: var(--hm-fc-tint); color: var(--hm-fc); }
.hm-header-status-crm { background: var(--hm-crm-tint); color: var(--hm-crm); }
.hm-page-tabs { display: flex; gap: var(--hm-space-5); margin: 0 0 var(--hm-space-4); border-bottom: 1px solid var(--hm-line); overflow-x: auto; }
.hm-page-tab { display: flex; align-items: center; gap: var(--hm-space-2); padding: 10px 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--hm-muted); font: inherit; font-size: var(--hm-fs-body); white-space: nowrap; text-decoration: none; cursor: pointer; }
.hm-page-tab:hover { color: var(--hm-ink); }
.hm-page-tab.is-current { color: var(--hm-primary); font-weight: 600; border-bottom-color: var(--hm-primary); }
.hm-page-tab:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.hm-page-tab-count { padding: 1px 7px; border-radius: var(--hm-radius-pill); background: var(--hm-hover); color: var(--hm-muted); font-size: var(--hm-fs-label); line-height: var(--hm-lh-tight); font-weight: 600; }
@media (max-width: 760px) { .hm-page-tab { min-height: var(--hm-touch-target); padding-top: 0; padding-bottom: 0; } }

/* ============================================================================
   Workbench as the board draws it (website manager 10-24, "1 Workbench"): the title with one status pill, the tabs, the number cards,
   then ONE card whose rows are a state ring, "<product> <status pill>", the title, one muted line and one text action — and the
   latest answers beside it. Cards: white, 1px line, 12px radius, no shadow.
   ============================================================================ */
.ux-shell .wb-layout .wb-card { border: 1px solid var(--hm-line); box-shadow: none; }
.ux-shell .wb-layout .hm-page-tabs { margin: var(--hm-space-3) 0 var(--hm-space-4) 0; }
.ux-shell .wb-layout .wb-attention { padding: 0 0 var(--hm-space-4); }
.ux-shell .wb-layout .wb-attention .wb-cardhead { align-items: center; margin: 0; padding: 18px 24px var(--hm-space-3); }
.ux-shell .wb-layout .wb-attention > :not(.wb-cardhead):not(.wb-list) { margin-left: 24px; margin-right: 24px; }
.ux-shell .wb-layout .wb-list { margin: 0; }
.ux-shell .wb-task.wb-compact { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 16px 24px; margin: 0; }
.wb-ring { box-sizing: border-box; display: block; width: 12px; height: 12px; margin-top: 5px; border: 2px solid var(--hm-attention); border-radius: var(--hm-radius-pill); }
.wb-ring-danger { border-color: var(--hm-danger); }
.wb-ring-ok { border-color: var(--hm-success); border-radius: 0; }
.wb-ring-neutral { border-color: var(--hm-line-strong); }
.ux-shell .wb-compact .wb-task-btn, .ux-shell .wb-compact .btn.secondary { align-self: start; min-height: 0; margin-top: 2px; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--hm-primary); font-weight: 600; }
.ux-shell .wb-compact .wb-task-btn:hover, .ux-shell .wb-compact .btn.secondary:hover { background: transparent; color: var(--hm-primary-hover); text-decoration: underline; }
.ux-shell .wb-compact .wb-task-actions { align-self: start; gap: var(--hm-space-4); }
.ux-shell .wb-compact .wb-task-actions .btn { min-height: 0; }
@media (max-width: 760px) {
  .ux-shell .wb-task.wb-compact { grid-template-columns: 16px minmax(0, 1fr); padding: 14px 16px; }
  .ux-shell .wb-task.wb-compact > .wb-task-btn, .ux-shell .wb-task.wb-compact > .btn, .ux-shell .wb-task.wb-compact > .wb-task-actions { grid-column: 2; justify-self: start; margin-left: 0; min-height: var(--hm-touch-target); display: inline-flex; align-items: center; }
  .ux-shell .wb-layout .wb-attention .wb-cardhead { padding: 16px 16px var(--hm-space-3); }
  .ux-shell .wb-layout .wb-attention > :not(.wb-cardhead):not(.wb-list) { margin-left: 16px; margin-right: 16px; }
}

/* Workbench, continued: the product chips, the fourth number card (people to review — Find customers' colour), the latest answers' tags. */
.ux-shell .wb-layout .wb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--hm-space-4); }
/* The product chips: one line of 28px pills (13px text) from the card title's left edge (the card's own 24px margin; no padding of their own), 12px under
   the title row and 12px above the first row; "+N more" ends the line and opens a small menu with the rest (never a second line). */
.wb-chips { position: relative; display: flex; flex-wrap: nowrap; align-items: center; gap: var(--hm-space-2); padding: 0 0 var(--hm-space-3); }
.ux-shell .wb-chips + .wb-list > .workcards:first-child { margin-top: 0; }
.wb-chips:not([data-fit]) { overflow: hidden; }
.wb-chip { appearance: none; flex: none; box-sizing: border-box; height: 28px; min-height: 0; max-width: 220px; padding: 0 12px; border: 0; border-radius: var(--hm-radius-pill); background: transparent; color: var(--hm-muted); font: inherit; font-size: var(--hm-fs-meta); line-height: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.wb-chip:hover { background: var(--hm-hover); color: var(--hm-ink); }
.wb-chip.is-current, .wb-chips:has(.wb-chips-item.is-current:not([hidden])) .wb-chip-more { background: var(--hm-primary-tint); color: var(--hm-primary); font-weight: 600; }
.wb-chip:focus-visible, .wb-chips-item:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.wb-chip[hidden], .wb-chips-item[hidden] { display: none; }
.wb-chips-more { position: relative; flex: none; }
.wb-chips-menu { position: absolute; z-index: 5; top: calc(100% + 4px); right: 0; display: none; flex-direction: column; min-width: 200px; max-width: min(280px, 80vw); max-height: 280px; overflow-y: auto; padding: 4px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); box-shadow: var(--hm-shadow-md); }
.wb-chips.is-open .wb-chips-menu { display: flex; }
.wb-chips-item { appearance: none; min-height: 32px; padding: 0 12px; border: 0; border-radius: var(--hm-radius-control); background: transparent; color: var(--hm-ink); font: inherit; font-size: var(--hm-fs-meta); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.wb-chips-item:hover { background: var(--hm-hover); }
.wb-chips-item.is-current { background: var(--hm-primary-tint); color: var(--hm-primary); font-weight: 600; }
/* The board's engine tag: the engine's dot and one mark (✓ recommends you · ~ mentions you · ✕ doesn't name you · – no verdict); the engine's name is the
   legend's and the tag's tooltip and hidden text (the way's whole sentence), the ratio is in them too. */
@media (max-width: 760px) { .wb-chip { box-sizing: content-box; border-block: 8px solid transparent; margin-block: -8px; background-clip: padding-box; } .wb-chips-item { min-height: var(--hm-touch-target); } } /* a touch is 44px tall; the pill still draws 28px */

/* ============================================================================
   AI answers as the board draws it (website manager 10-24, "4 AEO/GEO · AI answers"): the title with its status pill, the tabs with Product and
   Since at their right, two number cards, then one card — the legend, and a table: Question (with product and date), the engines' tags, a status
   pill, View →.
   ============================================================================ */
.ux-shell .ai-page .hm-page-header { margin-bottom: var(--hm-space-3); }
.ai-tabbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--hm-space-3); margin: 0 0 var(--hm-space-4); border-bottom: 1px solid var(--hm-line); }
.ai-tabbar .hm-page-tabs { margin: 0; border-bottom: 0; min-width: 0; max-width: 100%; }
.ai-page, .ai-tabbar { min-width: 0; }
.ai-filters { display: flex; flex-wrap: wrap; gap: var(--hm-space-2); padding-bottom: var(--hm-space-2); }
.ai-sel { min-height: var(--hm-control-height); padding: 0 var(--hm-space-3); border: 1px solid var(--hm-line-strong); border-radius: var(--hm-radius-control); background: var(--hm-surface); color: var(--hm-ink); font: inherit; font-size: var(--hm-fs-body); }
.ai-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--hm-space-4); margin: 0 0 var(--hm-space-4); }
.ai-kpi { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); }
.ai-kpi > span:last-child { display: grid; min-width: 0; overflow-wrap: anywhere; } /* the number's words wrap inside the card at 320 */
.ai-kpi-icon { display: grid; place-items: center; flex: none; width: var(--hm-control-height); height: var(--hm-control-height); border-radius: var(--hm-radius-control); }
.ai-kpi-icon .ux-icon { width: var(--hm-icon-m); height: var(--hm-icon-m); }
.ai-kpi-aeo { background: var(--hm-aeo-tint); color: var(--hm-aeo); }
.ai-kpi-attention { background: var(--hm-attention-tint); color: var(--hm-attention); }
.ai-kpi-cyan { background: var(--hm-primary-tint); color: var(--hm-primary); }
.ai-kpi-n small, .hm-of { font-size: var(--hm-fs-meta); font-weight: 400; color: var(--hm-muted); }
.hm-of { white-space: nowrap; display: inline-block; } /* a fraction is one thing: it wraps as a whole or not at all */
.hm-frac { white-space: nowrap; }
.hm-frac .hm-of { display: inline; } /* one line box for the whole fraction: its pieces share a top */
.ux-shell .hm-frac .hm-text-link { font-size: var(--hm-fs-meta); line-height: normal; } /* a number you can press is the same size as the text around it: one line box, one top */
.ux-shell .ux-workspace .ov-kpis { margin: var(--hm-space-4) 0; }
.ux-shell .ux-workspace .ov-kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } /* up to five cards in one row (two of them come from the engines read) */
.ux-shell .ux-ws-head-actions .ai-header-meta { align-self: center; }
.ai-kpi-n { font-size: var(--hm-fs-kpi); line-height: var(--hm-lh-title); font-weight: 600; font-variant-numeric: tabular-nums; }
.ai-kpi-l { font-size: var(--hm-fs-meta); color: var(--hm-muted); }
.ai-card { border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); overflow-x: auto; }
.ai-legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-4); padding: 14px 24px; border-bottom: 1px solid var(--hm-line); font-size: var(--hm-fs-meta); color: var(--hm-muted); }
.ai-lg { display: inline-flex; align-items: center; gap: 6px; }
.ai-marks { margin-left: auto; }
.ai-mk { white-space: nowrap; }
.ai-table { min-width: 760px; }
.ai-th, .ai-row { display: grid; grid-template-columns: minmax(0, 1fr) 214px 160px 232px; gap: var(--hm-space-4); align-items: center; padding: 0 24px; } /* the last column holds View + Find improvements + its (i) on one line (2.7.3.9: a stacked (i) made every row 30px taller) */
.ai-th { min-height: 38px; background: var(--hm-bg); border-bottom: 1px solid var(--hm-line); font-size: var(--hm-fs-label); line-height: var(--hm-lh-tight); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--hm-muted); }
.ux-shell .ai-row { min-height: 68px; padding-top: 12px; padding-bottom: 12px; border: 0; border-bottom: 1px solid var(--hm-line); border-radius: 0; background: transparent; box-shadow: none; margin: 0; }
.ai-act .btn, .ai-act .f2a-find { min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--hm-primary); font-size: var(--hm-fs-meta); font-weight: 600; }
.ai-act .btn:hover, .ai-act .f2a-find:hover { background: transparent; color: var(--hm-primary-hover); text-decoration: underline; }
.ai-act { display: grid; gap: 4px; justify-items: start; }
.ai-table[data-ai-show="attention"] .ai-row:not([data-ai-kind="bad"]):not([data-ai-kind="mid"]) { display: none; }
.ux-shell .ai-header-meta { font-size: var(--hm-fs-meta); color: var(--hm-muted); }
@media (max-width: 760px) {
  .ai-filters { width: 100%; }
  .ai-filters .ai-sel { flex: 1 1 140px; min-height: var(--hm-touch-target); }
  .ai-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; } /* an odd card spans the row instead of sitting alone beside a gap (2.7.3.9) */
  .ai-kpi { padding: 14px; }
  .ai-legend { padding: 12px 16px; gap: var(--hm-space-3); }
  .ai-marks { margin-left: 0; flex-basis: 100%; }
  .ai-table { min-width: 0; }
  .ai-th { display: none; }
  .ai-row { grid-template-columns: minmax(0, 1fr); gap: var(--hm-space-2); padding: 14px 16px; }
  .ai-act { justify-items: start; }
  .ai-card { overflow-x: visible; }
}

/* ============================================================================
   Products as the board draws it (website manager 10-24, "2 Products"): the title with its one pill, "Add products" the page's one primary, the
   tabs by state with counts, then one card — a table of Product (initials thumb, name, category and date) · Work waiting · Status · AEO score · Open.
   ============================================================================ */
.ux-shell #products-view .page-header-row { align-items: center; }
.ux-shell #products-view .section-heading-actions { align-items: center; gap: var(--hm-space-3); }
.ux-shell #products-view .section-heading-actions .primary-link { display: inline-flex; align-items: center; min-height: var(--hm-control-height); padding: 0 14px; border-radius: var(--hm-radius-control); background: var(--hm-primary); color: var(--hm-surface); font-weight: 600; text-decoration: none; }
.ux-shell #products-view .section-heading-actions .primary-link:hover { background: var(--hm-primary-hover); }
@media (max-width: 760px) { .ux-shell #products-view .section-heading-actions > :is(.text-button, .primary-link) { flex: 1 1 100%; justify-content: center; } } /* on a phone the two header actions stack at one width (Claim scored products was narrow beside the full-width Add products) */
.ux-shell.nav3 #products-view #products-tabs:empty { display: none; }
#products-view[data-products-show="attention"] #products-body tr:not([data-state="attention"]),
#products-view[data-products-show="progress"] #products-body tr:not([data-state="progress"]),
#products-view[data-products-show="checked"] #products-body tr:not([data-state="checked"]) { display: none; }
.pb-thumb { display: grid; place-items: center; flex: none; width: var(--hm-control-height); height: var(--hm-control-height); border-radius: var(--hm-radius-control); background: var(--hm-hover); color: var(--hm-muted); font-size: var(--hm-fs-meta); font-weight: 600; }
.ux-shell.nav3 .products-table th { height: 38px; background: var(--hm-bg); font-size: var(--hm-fs-label); letter-spacing: 0; text-transform: none; color: var(--hm-muted); font-weight: 600; }
.ux-shell.nav3 .products-table td { padding-top: 12px; padding-bottom: 12px; }
.ux-shell.nav3 .products-table td.col-info { white-space: nowrap; }
.ux-shell.nav3 .products-table .hm-header-status { display: inline-flex; align-items: center; gap: 6px; }
.ux-shell.nav3 .products-table .hm-header-status-dot { display: inline-block; flex: none; }
.ux-shell.nav3 .products-table .row-creator { display: none; }

/* Find customers · Leads to review as the board draws it (website manager 10-24, "5"): one card of people — an avatar of initials in the colour of what
   they said, who they are, their own words, where and when, what they said as a pill, and what to do. */
.ai-kpi-fc { background: var(--hm-fc-tint); color: var(--hm-fc); }
.ai-kpi-neutral { background: var(--hm-hover); color: var(--hm-muted); }
@media (max-width: 480px) { .ai-kpi.ai-kpi-stack { flex-direction: column; align-items: flex-start; gap: var(--hm-space-2); } } /* money cards: the number gets the card's whole width (no sideways scroll at 375) */
.ux-shell .fc-lead-card { padding: 0; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); box-shadow: none; }
.ux-shell .fc-lead-card .fc-lead { display: grid; grid-template-columns: var(--hm-control-height) minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 24px; border-bottom: 1px solid var(--hm-line); }
.fc-avatar-fix { background: var(--hm-fc-tint); color: var(--hm-fc); }
.fc-avatar-bothered { background: var(--hm-attention-tint); color: var(--hm-attention); }
.ux-shell .fc-lead-card .fc-lead-actions { flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: var(--hm-space-3); max-width: 280px; }
.ux-shell .fc-lead-card .fc-lead-actions .btn { min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--hm-primary); font-weight: 600; }
.ux-shell .fc-lead-card .fc-lead-actions .btn.secondary { color: var(--hm-muted); font-weight: 400; }
.ux-shell .fc-lead-card .fc-lead-actions .btn:hover { background: transparent; text-decoration: underline; }
@media (max-width: 760px) { .ux-shell .fc-lead-card .fc-lead { grid-template-columns: var(--hm-control-height) minmax(0, 1fr); padding: 14px 16px; } .ux-shell .fc-lead-card .fc-lead-actions { grid-column: 2; justify-content: flex-start; max-width: none; } }

/* CRM Leads (board "6 CRM · Leads"): Lead · Source · Status · Owner · Open →, in the AI answers card */
.ai-kpi-crm { background: var(--hm-crm-tint); color: var(--hm-crm); }
.ai-kpi-ok { background: var(--hm-success-tint); color: var(--hm-success); }
.ux-shell .sc-page .ai-filters { flex: 1 1 auto; flex-wrap: nowrap; justify-content: flex-end; align-items: center; } /* the controls row: the search and the Status filter side by side, at the right of the tabs */
.ux-shell .sc-page .ai-filters .sc-search { margin: 0; flex: 0 1 360px; min-width: 160px; }
@media (max-width: 760px) { .ux-shell .sc-page .ai-filters { flex-wrap: wrap; justify-content: flex-start; } .ux-shell .sc-page .ai-filters .sc-search { flex: 1 1 100%; } }
/* These tables need ~760px of content, which is the viewport less the rail, column 2 and the gutters (312 + 44) — so up to ~1130px they are the stacked rows the phone has, never a card that scrolls sideways
   to reach the row's own action ("Open →" was out of view at 1024). */
@media (min-width: 761px) and (max-width: 1130px) {
  .ai-table, .sc-leads-table { min-width: 0; }
  .ai-th { display: none; }
  .ux-shell .ai-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-2) var(--hm-space-4); padding: 14px 16px; } /* two lines: the name, then the rest side by side */
  .ux-shell .ai-row > :first-child { flex: 1 0 100%; min-width: 0; }
  .ux-shell .ai-row > .ai-act { margin-left: auto; }
  .ux-shell .ai-card { overflow-x: visible; }
}

.ux-shell .sc-page[data-sc-page="leads"] .ux-ws-menu.cr-download > summary.cr-download-btn { background: var(--hm-primary); color: var(--hm-on-dark); border-color: var(--hm-primary); } /* Add lead is the page's one primary */
.ux-shell .sc-page[data-sc-page="leads"] .ux-ws-menu.cr-download > summary.cr-download-btn:hover { background: var(--hm-primary-hover); color: var(--hm-on-dark); border-color: var(--hm-primary-hover); }
.ux-shell .sc-page .ai-filters .ai-sel { width: auto; min-width: 150px; max-width: 100%; }
/* Products (board "2 Products"): the What AI says column — four dot-and-mark tags a row, the legend above the table, the plan line by Add products */
.ux-shell.nav3 .products-table th.col-ai, .ux-shell.nav3 .products-table td.col-ai { min-width: 176px; white-space: nowrap; vertical-align: middle; }
.ux-shell.nav3 .products-table td.col-ai .eng-tags { margin: 0; flex-wrap: nowrap; }
.ux-shell.nav3 .products-table td.product-cell .ux-prod-text > strong { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; } /* a product's name is read whole, as the board draws it */
/* Products rows, one spec (coordinate 10-24, Harvey): about 76px — the product is two lines (the name, then the category and date, cut with …), every other cell is
   one line (the top issue: two at most, cut with …) and ALL cells sit on the row's centre line; "Work waiting" gets the width the product's meta gave up; More is a borderless text menu
   button like the row's other text actions. */
.ux-shell.nav3 .products-table td { padding-top: 16px; padding-bottom: 16px; vertical-align: middle; }
.ux-shell.nav3 .products-table th:not(:first-child), .ux-shell.nav3 .products-table td:not(:first-child) { padding-left: 8px; padding-right: 8px; }
.ux-shell.nav3 .products-table .row-actions { gap: 2px; }
.ux-shell.nav3 .products-table .row-actions .row-btn { padding-left: 6px; padding-right: 6px; }
.ux-shell.nav3 .products-table td.col-info, .ux-shell.nav3 .products-table td.col-work, .ux-shell.nav3 .products-table td.col-ai, .ux-shell.nav3 .products-table td.row-actions-cell { vertical-align: middle; }
.ux-shell.nav3 .products-table td span:not(.pb-sub), .ux-shell.nav3 .products-table td .row-actions { margin-top: 0; } /* the old stacked-cell top margins no longer lift a cell off the centre line */
.ux-shell.nav3 .products-table td.product-cell .product-name-link { display: inline; white-space: normal; overflow: visible; overflow-wrap: break-word; } /* a long name wraps to a second line; it no longer sets the column's minimum width */
.ux-shell.nav3 .products-table td.product-cell .pb-sub { width: 0; min-width: 100%; white-space: normal; overflow-wrap: break-word; } /* the line wraps at its spaces (never a word cut with …) and adds nothing to the column's minimum width */
/* 2.7.5.2 (Harvey 10-29 「這個排版不對」): the name block takes the rest of the Product column — sized by its title it left a short name's meta line a one-word strip; the tile keeps its box on a hovered row. */
.ux-shell.nav3 .products-table td.product-cell .ux-prod-text { flex: 1 1 0; min-width: 0; }
.ux-shell.nav3 .products-table th:first-child { width: 34%; } /* the spare width goes to the Product column, not between the score and the actions */
/* a hovered row's wash is the colour of its neutral tiles and pills, which lost their box: they take the surface colour and a line */
.ux-shell.nav3 .products-table tbody tr:hover :is(.pb-thumb, .eng-tag-mid, .eng-tag-none, .score-badge.score-band-none, .tag.neutral, .svc-badge.fc-off),
.ux-shell .hm-table .hm-row-linked:is(:hover, :focus-within) :is(.tag.neutral, .eng-tag-mid, .eng-tag-none, .ask-chip.na, .svc-badge.fc-off, .badge-rolled_back) { background: var(--hm-surface); box-shadow: inset 0 0 0 1px var(--hm-line); }
.ux-shell.nav3 .products-table td.col-work .row-top-issue { display: -webkit-box; margin: 0; overflow: hidden; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.ux-shell.nav3 .products-table .row-actions .row-btn--more { border-color: transparent; background: transparent; box-shadow: none; color: var(--hm-muted); }
.ux-shell.nav3 .products-table .row-actions .row-btn--more:hover { background: var(--hm-hover); color: var(--hm-ink); }
@media (min-width: 761px) { .ux-shell.nav3 .products-table th.col-work, .ux-shell.nav3 .products-table td.col-work { width: 150px; min-width: 120px; max-width: 220px; } }
.section-heading-actions .ai-header-meta { align-self: center; margin-right: var(--hm-space-3); font-size: var(--hm-fs-meta); color: var(--hm-muted); white-space: nowrap; }
.section-heading-actions .ai-header-meta:empty { display: none; }
.section-heading-actions .ai-header-meta.is-over { color: var(--hm-attention); font-weight: 600; }
@media (max-width: 760px) { .ux-shell.nav3 .products-table td.col-ai { min-width: 0; white-space: normal; } .section-heading-actions .ai-header-meta { flex-basis: 100%; margin: 0 0 var(--hm-space-2); } }

/* Product page (board "3 產品頁"): the Evidence card under the number cards — sources by kind, "All N →", the claims line */
.ux-shell .ov-evidence { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--hm-space-2) var(--hm-space-4); margin: 0 0 var(--hm-space-4); padding: var(--hm-space-4) 24px; }
.ov-ev-all { color: var(--hm-primary); font-weight: 600; text-decoration: none; white-space: nowrap; }

/* every search box reads as the column's Search (⌘K): the grey fill, a 1px line, no inner shadow; the one standard focus ring stays on focus (Harvey 10-24) */
.ux-shell input[type="search"]:not(.nav3-find-field) { background: var(--hm-bg); box-shadow: none; border-color: var(--hm-line); }
.ux-shell input[type="search"]:not(.nav3-find-field):hover { border-color: var(--hm-line-strong); }
.ux-shell input[type="search"]:not(.nav3-find-field):focus { box-shadow: none; border-color: var(--hm-primary); }
.ux-shell input[type="search"]::placeholder { color: var(--hm-muted); opacity: 1; } /* the browser's grey is 4.3:1 on the grey fill; --hm-muted is 5.5:1 */

/* Workbench › Drafts rows (Harvey 10-24: "spaced far too wide"): [32px icon] product · state pill on ONE line, the task muted beneath, a text link on the right;
   about 64px a row, thin dividers. One primary per page — a list of filled buttons is wrong. */
.wb-tile.wb-tile-sm { width: 32px; height: 32px; border-radius: var(--hm-radius-control); }
.wb-tile.wb-tile-sm svg { width: var(--hm-icon-m); height: var(--hm-icon-m); }
.ux-shell .wb-drafts .ux-draftrow { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: var(--hm-space-3); min-height: 64px; padding: 12px 0; }
.ux-shell .wb-drafts .ux-draftrow-act { color: var(--hm-primary); font-weight: 600; white-space: nowrap; text-decoration: none; }
.ux-shell .wb-drafts .ux-draftrow-act:hover { color: var(--hm-primary-hover); text-decoration: underline; }
@media (max-width: 760px) {
  .ux-shell .wb-drafts .ux-draftrow { grid-template-columns: 32px minmax(0, 1fr); }
  .ux-shell .wb-drafts .ux-draftrow-act { grid-column: 2; }
}

/* List rows as one spec (Harvey 10-24: rows spaced far too wide; a filled button per row is wrong) — Improvements, Question monitors, Competitor research, Changes and
   every list that draws .workcard.navim-row: one bordered card of rows, thin dividers, 12px above and below (about 64px a row), the line the person acts on first and the
   rest muted beneath it, and the row's actions as text links on the right (the page's one primary lives in its header). */
.ux-shell .workcards.navim-rows { gap: 0; margin-top: 0; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); overflow: hidden; }
.ux-shell .navim-rows > .workcard.navim-row { margin: 0; padding: 10px 24px; min-height: 64px; align-items: center; border: 0; border-bottom: 1px solid var(--hm-line); border-radius: 0; background: transparent; box-shadow: none; }
.ux-shell .navim-rows > .workcard.navim-row:last-child { border-bottom: 0; }
.ux-shell .navim-rows > .workcard.navim-row > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--hm-space-2); min-width: 0; }
.ux-shell .navim-rows > .workcard.navim-row > div:first-child > h4 { order: 1; margin: 0; font-size: var(--hm-fs-body); line-height: var(--hm-lh-title); font-weight: 600; }
.ux-shell .navim-rows > .workcard.navim-row > div:first-child > .imp-row-pills, .ux-shell .navim-rows > .workcard.navim-row > div:first-child > .cr-card-chips, .ux-shell .navim-rows > .workcard.navim-row > div:first-child > .tag { order: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-1) var(--hm-space-2); margin: 0; }
.ux-shell .navim-rows .navim-row .tag { margin: 0; padding-top: 3px; padding-bottom: 3px; } /* a pill is 22px and carries no margin of its own, so a row is its lines and nothing more */
.ux-shell .navim-rows > .workcard.navim-row > div:first-child > .ov-eyebrow, .ux-shell .navim-rows > .workcard.navim-row > div:first-child > p { line-height: 18px; }
.ux-shell .workcard.citation-record > div:first-child > .citation-record-top { flex: 1 1 100%; } /* the question and its action span the row, so the action sits at the right edge */ /* the question and its action fill the row, so the action sits at the right edge */
.ux-shell .navim-rows > .workcard.navim-row > div:first-child > .ov-eyebrow { order: 3; flex-basis: 100%; margin: 0; }
.ux-shell .navim-rows > .workcard.navim-row > div:first-child > p:not(.ov-eyebrow):not(.imp-row-pills) { order: 4; flex-basis: 100%; margin: 0; font-size: var(--hm-fs-meta); color: var(--hm-muted); }
.ux-shell .navim-rows .navim-row-actions { flex-wrap: nowrap; gap: var(--hm-space-4); margin: 0; }
.ux-shell .navim-rows .navim-row-actions .btn, .ux-shell .navim-rows .navim-row-actions .btn.secondary, .ux-shell .navim-rows .navim-row-actions .f2a-find { min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--hm-primary); font-size: var(--hm-fs-body); font-weight: 600; white-space: nowrap; text-decoration: none; }
.ux-shell .navim-rows .navim-row-actions .btn:hover, .ux-shell .navim-rows .navim-row-actions .f2a-find:hover { background: transparent; color: var(--hm-primary-hover); text-decoration: underline; }
/* the list pages' filter row (Product, Status…) is a plain row of controls, not a card of its own */
.ux-shell .navim-page .results-scope.navim-filters { margin: var(--hm-space-3) 0 var(--hm-space-3); padding: 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
@media (max-width: 760px) {
  .ux-shell .navim-rows > .workcard.navim-row { padding: 12px 16px; }
  .ux-shell .navim-rows .navim-row-actions { flex-wrap: wrap; }
}

/* CRM lists (Opportunities, Follow-ups, Accounts, Contacts): the row's action is a text link on the right, like every other list (one primary per page) */
.ux-shell .sc-list .sc-row { padding: 12px 24px; min-height: 64px; }
.ux-shell .sc-list .sc-row > a.btn, .ux-shell .sc-list .sc-row > .btn { min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--hm-primary); font-size: var(--hm-fs-body); font-weight: 600; white-space: nowrap; text-decoration: none; }
.ux-shell .sc-list .sc-row > a.btn:hover, .ux-shell .sc-list .sc-row > .btn:hover { background: transparent; color: var(--hm-primary-hover); text-decoration: underline; }
.ux-shell .sc-list .sc-row .sc-row-main .svc-note { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--hm-space-2); margin: 0; }
@media (max-width: 760px) { .ux-shell .sc-list .sc-row { padding: 12px 16px; } }

/* LIST SWEEP, round 2 (ui-test 10-24): Find customers' rows follow the same spec — a 22px pill, a text link for each action (never an outlined or filled button per row), links in the one link colour. */
.ux-shell .svc-badge { padding: 3px 10px; line-height: 16px; }
.ux-shell .fc-row > button.btn, .ux-shell .fc-row > a.btn, .ux-shell .fc-lead-actions > button.btn { min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--hm-primary); font-size: var(--hm-fs-body); font-weight: 600; }
.fc-page a:not(.btn):not(.row-btn):hover { text-decoration: underline; text-underline-offset: 2px; }

/* Website traffic › AI referrals: each source is a ROW of one bordered list (the name, its sessions at the right, the source note under it), not a card of its own. */
.ux-shell [data-card="ai-referrals"] .results-metrics { display: block; margin: var(--hm-space-3) 0; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); overflow: hidden; }
.ux-shell [data-card="ai-referrals"] .results-metric { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: none; align-content: center; align-items: center; column-gap: var(--hm-space-2); row-gap: 2px; min-height: 64px; padding: 10px 24px; border: 0; border-bottom: 1px solid var(--hm-line); border-radius: 0; background: transparent; box-shadow: none; }
.ux-shell [data-card="ai-referrals"] .results-metric:last-child { border-bottom: 0; }
.ux-shell [data-card="ai-referrals"] .results-metric > .results-metric-label { color: var(--hm-ink); font-size: var(--hm-fs-body); font-weight: 600; }
.ux-shell [data-card="ai-referrals"] .results-metric > .results-metric-value { font-size: var(--hm-fs-body); font-weight: 600; line-height: var(--hm-lh-body); text-align: right; }
.ux-shell [data-card="ai-referrals"] .results-metric > .results-metric-detail { color: var(--hm-muted); font-size: var(--hm-fs-meta); }
.ux-shell [data-card="ai-referrals"] .results-metric > .attribution-note { grid-column: 1 / -1; margin: 0; color: var(--hm-muted); font-size: var(--hm-fs-meta); line-height: 18px; }
.ux-shell [data-card="ai-referrals"] .results-metric > .attribution-note a { margin: 0 0 0 var(--hm-space-1); }
.ux-shell [data-card="ai-referrals"] .results-metric > .attribution-note:empty { display: none; }
.ux-shell [data-card="ai-referrals"] .results-metric > .attribution-note br { display: none; }

/* Workbench › Changes: the changes are ONE bordered list of rows with thin dividers (the open one tinted), not a stack of boxed cards. */
.ux-shell .chg-rows { gap: 0; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); overflow: hidden; }
.ux-shell .chg-rows .chg-row { border: 0; border-bottom: 1px solid var(--hm-line); border-radius: 0; background: transparent; box-shadow: none; padding: var(--hm-space-2) 24px; }

/* Workbench › Needs your attention: the row's muted line is ONE line (its whole text is the tooltip), so a row is the product and pill, the title and that line. */
.ux-shell .wb-compact:not(.wb-task-full) .wb-task-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ux-shell .wb-task.wb-compact { padding-top: 12px; padding-bottom: 12px; }

/* Eyebrows above a card or a panel are sentence case (Harvey 10-24: no shouting labels); capitals stay for table headings, the column-2 groups and the labels above a value. */
.ux-shell .eyebrow, .ux-shell .chg-eyebrow, .ux-shell .chg-version-label, .ux-shell .chg-rail-head h2, .ux-shell .svc-label, .ux-shell .crc-eyebrow, .ux-shell .mcp-eyebrow, .ux-shell .results-ov-eyebrow { text-transform: none; letter-spacing: 0; font-size: var(--hm-fs-meta); font-weight: 600; color: var(--hm-muted); }

/* Find customers › Billing: a long name or note in the invite list is cut with … (one line each), so every row is the same height. */
.ux-shell .fc-referral .fc-row .fc-grow > b, .ux-shell .fc-referral .fc-row .fc-grow > .svc-note { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The referral offer's terms: one line (its whole text is the tooltip). */
.ux-shell .referral-copy-line { overflow-wrap: anywhere; } /* coordinate 10-25: terms are never cut with an ellipsis (the one-line rule was for nav hints); they live in .referral-terms and wrap */

/* Library: TextButton (a button or link that reads as text) and the danger Button. */
.ux-shell .hm-text-link { appearance: none; display: inline; min-height: 0; padding: 0; border: 0; border-radius: var(--hm-radius-control); background: transparent; box-shadow: none; color: var(--hm-link); font: inherit; font-size: var(--hm-fs-body); font-weight: 600; cursor: pointer; text-decoration: none; }
.ux-shell .hm-text-link:hover, .ux-shell .hm-text-link:focus-visible { background: transparent; color: var(--hm-primary-hover); text-decoration: underline; text-underline-offset: 2px; }
.ux-shell .hm-text-link:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
.ux-shell .hm-text-link[hidden] { display: none; }
.ux-shell .btn.danger { background: var(--hm-danger); border-color: var(--hm-danger); color: var(--hm-on-dark); }
.ux-shell .btn.danger:hover { background: var(--hm-danger); filter: brightness(0.92); }

/* Library: CountBadge's default look (a tab's or a row's count). */
.ux-shell .hm-count { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--hm-radius-pill); background: var(--hm-neutral); color: var(--hm-ink); font-size: var(--hm-fs-label); line-height: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Find customers › Leads to review: the quote is two lines ("Show more" opens it in place) and the post line and the found-by line share one row, so a lead is about 100px. */
.ux-shell .fc-lead-card .fc-lead .fc-grow { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--hm-space-3); align-items: baseline; }
.ux-shell .fc-lead-card .fc-lead { padding-top: 12px; padding-bottom: 12px; }
.ux-shell .fc-lead-card .fc-lead .fc-grow > p.svc-note { margin: 0; } /* wraps: it ends with the "Open the comment" link, which an ellipsis would cut off and whose ring a clip would cut */
.ux-shell .fc-lead-card .fc-lead .fc-grow > p.svc-note { grid-column: 2; }
@media (max-width: 760px) { .ux-shell .fc-lead-card .fc-lead .fc-grow { grid-template-columns: minmax(0, 1fr); } .ux-shell .fc-lead-card .fc-lead .fc-grow > p.svc-note { grid-column: 1; } }

/* Links in the link colour underline on keyboard focus as well as hover (the classed text links of the rows and cards). */
.ux-shell :is(.link, .wb-recent-all, .ux-draftrow-act, .ov-ev-all, .ai-view):is(:hover, :focus-visible) { text-decoration: underline; text-underline-offset: 2px; }

/* The "+N more" menu keeps inside the window: it opens above the chips when there is no room below. */
.wb-chips.is-up .wb-chips-menu { top: auto; bottom: calc(100% + 4px); }

/* A product's name is two lines at most in the Products list (its whole name is the tooltip). */
.ux-shell.nav3 .products-table td.product-cell .ux-prod-text > strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.ux-shell table.fc-ledger td { vertical-align: middle; }
.ux-shell .btn.secondary.is-selected { background: var(--hm-primary-tint); border-color: var(--hm-primary); color: var(--hm-primary); } /* a chosen amount: tinted, so the page keeps ONE filled button */
/* Focus (WCAG 2.4.7): every button-like link and button shows a 3px ring; a busy or aria-disabled button reads as unavailable but is still focusable. */
.ux-shell :is(.btn, .primary-link, .row-btn, .text-button, .ghost-button, .primary-button, .secondary-button, .hm-icon-btn):focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }

/* Plain links underline on keyboard focus as well as hover (breadcrumb, the question links, row links …) — never the buttons, the navigation or the tabs. */
.ux-shell :is(main, .ux-crumb) a:not(.btn, .primary-link, .row-btn, .text-button, .ghost-button, .hm-page-tab, .ux-subscribe, [class*="nav3-"]):focus-visible { text-decoration: underline; text-underline-offset: 2px; }

/* A search running (Harvey 10-25: it must be findable from any page): the rail icon's live dot, column 2's "N running" badge and the shared "N searches running · Open" line — the Find customers colour, not the red of a count that waits, and still when the person prefers less motion. */
.nav3-live, .nav3-live-dot, .hm-live-dot { border-radius: var(--hm-radius-pill); background: var(--hm-fc); animation: hm-live-pulse 1.8s ease-in-out infinite; }
.nav3-live { position: absolute; right: 7px; bottom: 7px; width: 8px; height: 8px; box-sizing: content-box; border: 2px solid var(--hm-surface); }
.nav3-live-dot, .hm-live-dot { flex: none; display: inline-block; width: 8px; height: 8px; }
.nav3-item-count.is-live { display: inline-flex; align-items: center; gap: 6px; background: var(--hm-fc-tint); color: var(--hm-fc); font-weight: 600; white-space: nowrap; }
.hm-running { display: flex; align-items: center; gap: var(--hm-space-2); margin: 0 0 var(--hm-space-3); padding: 8px 12px; border-radius: var(--hm-radius-control); background: var(--hm-fc-tint); color: var(--hm-ink); font-size: var(--hm-fs-meta); }
.hm-running .hm-text-link { margin-left: var(--hm-space-2); font-size: var(--hm-fs-meta); }
.hm-running-slot:empty { display: none; }
@keyframes hm-live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .nav3-live, .nav3-live-dot, .hm-live-dot { animation: none; } }

/* Products as stacked rows whenever the table's natural width does not fit its card (fitProductsTable measures it and sets .is-stacked on the card — Harvey 10-25: the table never scrolls
   sideways inside its card): the name and the state on line 1, the actions at the right; what the assistants say, the top issue and the score on line 2. */
.ux-shell.nav3 .ux-products-card.is-stacked .products-table thead { display: none; }
.ux-shell.nav3 .ux-products-card.is-stacked .products-table, .ux-shell.nav3 .ux-products-card.is-stacked .products-table tbody { display: block; width: 100%; min-width: 0; }
.ux-shell.nav3 .ux-products-card.is-stacked .products-table tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--hm-line); }
.ux-shell.nav3 .ux-products-card.is-stacked .products-table tbody tr > td, .ux-shell.nav3 .ux-products-card.is-stacked .products-table tbody tr > td:not(:first-child) { display: block; order: 4; flex: none; width: auto; min-width: 0; max-width: none; padding: 0; border: 0; box-shadow: none; }
.ux-shell.nav3 .ux-products-card.is-stacked .products-table tbody tr > td.product-cell { order: 1; flex: 1 1 calc(100% - 340px); min-width: 0; }
.ux-shell.nav3 .ux-products-card.is-stacked .products-table tbody tr > td.col-info { order: 2; flex: 0 0 auto; white-space: nowrap; }
.ux-shell.nav3 .ux-products-card.is-stacked .products-table tbody tr > td.row-actions-cell { order: 3; flex: 0 0 auto; text-align: right; } /* as wide as its actions (Open product + More ≈ 205px), never a fixed width they run out of */
.ux-shell.nav3 .ux-products-card.is-stacked .products-table tbody tr > td.col-ai { margin-left: 52px; min-width: 0; }
.ux-shell.nav3 .ux-products-card.is-stacked .products-table tbody tr > td.col-work { width: auto; max-width: 240px; }
.ux-shell.nav3 .ux-products-card.is-stacked .products-table tbody td[data-label="AEO score"]::before { content: "AEO "; color: var(--hm-muted); font-size: var(--hm-fs-label); }
.ux-shell.nav3 .ux-products-card.is-stacked .products-table tbody td.col-creator, .ux-shell.nav3 .ux-products-card.is-stacked .products-table tbody td.creator-cell { display: none; }

/* PageTabs, every state (Harvey 10-25: a hovered tab was a filled dark block with unreadable text, and the count touched the edges): the label and the count sit 12px in from the
   tab's edges with 8px between them; the count is a 20px pill with 6px at its sides; under the pointer a tab is a light grey tint with dark text (never a filled block — the global
   button hover is overridden); pressed is the same tint (focus adds the ring); the selected tab is cyan text with the cyan underline, also under the pointer. */
.ux-shell .hm-page-tabs { gap: 4px; margin-left: 0; border-bottom: 0; background: linear-gradient(var(--hm-line), var(--hm-line)) 0 100% / 100% 1px no-repeat; scrollbar-width: none; }
.ux-shell .hm-page-tabs::-webkit-scrollbar { display: none; }
/* The strip, its line and its first label start on the page's content line (2.7.3.9): the first tab has no padding to its left, so nothing draws 12px outside it. */
.ux-shell .hm-page-tab:first-child { padding-left: 0; border-top-left-radius: 0; }
.ux-shell .hm-page-tab:focus:not(:focus-visible) { outline: none; }
.ux-shell .ai-tabbar .hm-page-tabs { background: none; }
.ux-shell .hm-page-tab { min-height: var(--hm-control-height); padding: 10px 12px 12px; gap: var(--hm-space-2); border-radius: var(--hm-radius-control) var(--hm-radius-control) 0 0; }
.ux-shell .hm-page-tab:hover, .ux-shell .hm-page-tab:active, .ux-shell .hm-page-tab:focus-visible { background: var(--hm-hover-strong); color: var(--hm-ink); box-shadow: none; transform: none; text-decoration: none; }
.ux-shell .hm-page-tab.is-current { color: var(--hm-primary); }
.ux-shell .hm-page-tab.is-current:hover, .ux-shell .hm-page-tab.is-current:active, .ux-shell .hm-page-tab.is-current:focus-visible { color: var(--hm-primary-hover); } /* cyan on the grey hover tint is 4.42:1; the darker cyan is 5.9:1 */
.ux-shell .hm-page-tab:hover .hm-page-tab-count, .ux-shell .hm-page-tab:active .hm-page-tab-count, .ux-shell .hm-page-tab:focus-visible .hm-page-tab-count { background: var(--hm-surface); color: var(--hm-ink); }
/* A control in a strip that scrolls or clips (page tabs, Changes tabs, the settings section nav, the help contents, the engine compare list) draws its focus ring INSIDE itself: the strip's box is only as tall as the control, so a ring outside is cut top and bottom. */
.hm-page-tabs :is(a, button):focus-visible, .hm-section-nav a:focus-visible, .help-toc a:focus-visible, .obs-compare-list :is(a, button, label, input):focus-visible { outline-offset: -3px; }
.ux-shell .hm-page-tab-count { display: inline-flex; align-items: center; box-sizing: border-box; height: 20px; padding: 0 6px; line-height: 16px; }

/* A header status pill that carries a count is a link to what it counts: the pill's look, a pointer, underline on hover and focus, and the ring. */
.ux-shell .hm-header-status.is-link { cursor: pointer; text-decoration: none; }
.ux-shell .hm-header-status.is-link:is(:hover, :focus-visible) { text-decoration: underline; text-underline-offset: 2px; }
.ux-shell .hm-header-status.is-link:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }

/* The shared table (DataTable): every cell on the row's centre line, a long cell cut with … (its whole text is the tooltip), and a row's actions are text links. */
.ux-shell .hm-table td { vertical-align: middle; }
.ux-shell .hm-table .hm-row-actions .btn, .ux-shell .hm-table .hm-row-actions .btn.secondary, .ux-shell .hm-table .hm-row-actions button.text-button { min-height: 0; padding: 0 0 0 var(--hm-space-3); border: 0; background: transparent; box-shadow: none; color: var(--hm-primary); font-size: var(--hm-fs-meta); font-weight: 600; }
.ux-shell main table :is(td, th) { vertical-align: middle; }
@media (max-width: 480px) { .ux-shell main .hm-table td { white-space: normal; overflow-wrap: anywhere; } } /* a date or a role that the column keeps on one line wraps in a phone's card */ /* every table's cells sit on the row's centre line, not only the shared one's */
.ux-shell .hm-table .hm-row-actions .btn:hover, .ux-shell .hm-table .hm-row-actions button.text-button:hover { background: transparent; color: var(--hm-primary-hover); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 760px) { .ux-shell .hm-table.hm-table-stack .hm-row-actions :is(.btn, .btn.secondary, button.text-button) { padding-left: 0; } } /* a stacked row's action stands on the label column, not 12px in */

/* UI refresh P1c: a card or section title is a section-size title (15 / 600, sentence case), never smaller than the text it heads.
   Uppercase 12px stays for real labels above a value (th, .ev-label, .info-side-label, p.eyebrow, the page header's eyebrow). */
.ux-shell :is(.aio-publish-header, .inline-subsection-heading, .timeline-heading-row, .ux-plan-head, .ux-ws-addon, .ux-intents, .inline-subsection) h3,
.ux-shell h3.ux-ws-fixhdr, .ux-shell .ux-ws-body h3, .ux-shell .ov-card .ov-eyebrow, .ux-shell .wb-group {
  font-size: var(--hm-fs-section); font-weight: 600; letter-spacing: 0; text-transform: none; line-height: var(--hm-lh-title); color: var(--hm-ink);
}
/* Help: the card and accordion titles that are <b> read at body size / 600; a control's own words (the source-of-truth choices) are body size. */
.ux-shell :is(.help-feature-list, .help-metric-grid, .help-status-grid) div > b, .ux-shell .help-scenario-list summary b { font-size: var(--hm-fs-body); font-weight: 600; }
.ux-shell label.truth-choice { font-size: var(--hm-fs-body); font-weight: 400; }

/* Combobox — the one searchable picker (combobox.js). A box that holds the chips (multiple) and the text input; the list opens fixed under it, above any dialog. */
.hm-combo { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: var(--hm-control-height); padding: 3px 8px; border: 1px solid var(--hm-line-strong); border-radius: var(--hm-radius-control); background: var(--hm-surface); box-sizing: border-box; min-width: 0; }
.hm-combo:focus-within { border-color: var(--hm-primary); box-shadow: var(--hm-shadow-focus); }
.hm-combo.is-disabled, .hm-combo[data-busy] { background: var(--hm-neutral); color: var(--hm-muted); }
.hm-combo .hm-combo-input { flex: 1 1 120px; width: auto; min-width: 80px; min-height: 0; margin: 0; padding: 6px 4px; border: 0; box-shadow: none; background: transparent; outline: 0; font-size: var(--hm-fs-body); }
.hm-combo-chips { display: contents; list-style: none; margin: 0; padding: 0; }
.hm-combo-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 4px 2px 10px; border-radius: var(--hm-radius-pill); background: var(--hm-primary-tint); color: var(--hm-ink); font-size: var(--hm-fs-meta); font-weight: 600; }
.hm-combo-chip span { overflow-wrap: anywhere; }
.hm-combo-chip-x, .hm-combo-clear { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: var(--hm-radius-pill); background: transparent; color: var(--hm-muted); font-size: var(--hm-fs-body); line-height: 1; cursor: pointer; }
.hm-combo-chip-x .ux-icon, .hm-combo-clear .ux-icon, .hm-fdlg-x .ux-icon { width: var(--hm-icon-s); height: var(--hm-icon-s); }
.hm-combo-chip-x:hover, .hm-combo-clear:hover { background: var(--hm-hover-strong); color: var(--hm-ink); }
.hm-combo-clear[hidden] { display: none; }
.hm-combo-list { z-index: 10100; max-height: 280px; overflow: auto; margin: 0; padding: 4px; list-style: none; border: 1px solid var(--hm-line-strong); border-radius: var(--hm-radius-control); background: var(--hm-surface); box-shadow: var(--hm-shadow-lg); box-sizing: border-box; max-width: calc(100vw - 32px); }
.hm-combo-list[hidden] { display: none; }
.hm-combo-opt { display: grid; gap: 1px; padding: 8px 10px; border-radius: var(--hm-radius-control); cursor: pointer; font-size: var(--hm-fs-body); font-weight: 400; color: var(--hm-ink); }
.hm-combo-opt small { color: var(--hm-muted); font-size: var(--hm-fs-label); }
.hm-combo-opt.is-active, .hm-combo-opt:hover { background: var(--hm-hover-strong); }
.hm-combo-group { padding: 8px 10px 2px; color: var(--hm-muted); font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.hm-combo-note { padding: 8px 10px; color: var(--hm-muted); font-size: var(--hm-fs-meta); }
.hm-combo-error { color: var(--hm-danger); }

/* FormDialog — a form in a dialog (form-dialog.js): a header with Close, a body that scrolls, a pinned footer with the page's one Save. */
.hm-fdlg-overlay { background: var(--hm-overlay); align-items: center; }
.hm-fdlg { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(600px, 100%); max-height: calc(100dvh - 40px); background: var(--hm-surface); border-radius: var(--hm-radius-card); box-shadow: var(--hm-shadow-lg); overflow: hidden; }
.hm-fdlg.is-wide { width: min(820px, 100%); }
.hm-fdlg-head { display: flex; align-items: center; justify-content: space-between; gap: var(--hm-space-3); padding: var(--hm-space-4) var(--hm-space-5); border-bottom: 1px solid var(--hm-line); }
.hm-fdlg-head h2 { margin: 0; font-size: var(--hm-fs-title); }
.hm-fdlg-x { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--hm-radius-pill); background: transparent; color: var(--hm-muted); font-size: var(--hm-fs-title); line-height: 1; cursor: pointer; }
.hm-fdlg-x:hover { background: var(--hm-hover-strong); color: var(--hm-ink); }
.hm-fdlg-body { overflow: auto; padding: var(--hm-space-4) var(--hm-space-5); min-width: 0; }
.hm-fdlg-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--hm-space-2) var(--hm-space-3); padding: var(--hm-space-3) var(--hm-space-5); border-top: 1px solid var(--hm-line); background: var(--hm-surface); }
@media (max-width: 620px) { .hm-fdlg-overlay { padding: 0; align-items: flex-end; } .hm-fdlg, .hm-fdlg.is-wide { width: 100%; max-height: 92dvh; border-radius: var(--hm-radius-card) var(--hm-radius-card) 0 0; } .hm-fdlg-head, .hm-fdlg-body, .hm-fdlg-foot { padding-left: var(--hm-space-4); padding-right: var(--hm-space-4); } .hm-fdlg-foot > .btn { flex: 1 1 100%; justify-content: center; } }
.md-channel { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto auto; gap: var(--hm-space-2); align-items: center; }
.mg-head { background: var(--hm-bg); font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-muted); }
.mg-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr); gap: var(--hm-space-2) var(--hm-space-3); padding: var(--hm-space-3); border-top: 1px solid var(--hm-line); overflow-wrap: anywhere; }
.mg-set { grid-column: 2 / -1; display: grid; gap: var(--hm-space-2); }
.mg-same-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr) auto; gap: var(--hm-space-3); align-items: start; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .md-channel { grid-template-columns: 1fr; }
  .mg-head { display: none; }
  .mg-row { grid-template-columns: 1fr; }
  .mg-set { grid-column: 1; }
  .mg-cell[data-k]::before, .mg-cell > span[data-k]::before { content: attr(data-k); display: block; font-size: var(--hm-fs-label); color: var(--hm-muted); }
  .mg-same-row { grid-template-columns: 1fr; }
}
/* ── DisclosureRow (components.js): one folded section. The chevron is the console's global details rule; chevron and label on the card's content line (the card's own padding); inside a card's list it takes that margin like every other block, and its rows are full-bleed again ── */
.hm-disclosure { margin-top: var(--hm-space-4); border-top: 1px solid var(--hm-line); }
.hm-disclosure > summary { display: flex; align-items: center; min-height: var(--hm-control-height); cursor: pointer; font-size: var(--hm-fs-meta); font-weight: 600; color: var(--hm-muted); }
.hm-disclosure > summary:focus-visible { outline: 2px solid var(--hm-primary); outline-offset: 2px; border-radius: var(--hm-radius-control); }
.hm-disclosure-body { display: grid; gap: var(--hm-space-2); padding-top: var(--hm-space-2); }
.hm-disclosure-body > p { margin: 0; }
.ux-shell .wb-layout .wb-attention .wb-list :is(.wb-qtools, .hm-disclosure, .c82-form, .wb-qstate) { margin-left: var(--hm-space-5); margin-right: var(--hm-space-5); }
.ux-shell .wb-layout .wb-attention .hm-disclosure .workcards { margin-left: calc(-1 * var(--hm-space-5)); margin-right: calc(-1 * var(--hm-space-5)); }
@media (max-width: 760px) {
  .hm-disclosure > summary { min-height: var(--hm-touch-target); }
  .ux-shell .wb-layout .wb-attention .wb-list :is(.wb-qtools, .hm-disclosure, .c82-form, .wb-qstate) { margin-left: var(--hm-space-4); margin-right: var(--hm-space-4); }
  .ux-shell .wb-layout .wb-attention .hm-disclosure .workcards { margin-left: calc(-1 * var(--hm-space-4)); margin-right: calc(-1 * var(--hm-space-4)); }
}
/* a credit note on a list row is an (i) of fixed size beside Find improvements: the row's actions never change width with it */
.f2a-find-info { display: inline-flex; align-items: center; flex: none; width: 22px; }
.ux-shell .wb-compact .wb-task-actions .wb-task-btn { min-width: 9.5em; justify-content: flex-start; }

/* ── Form rows in a row, and Sections (components.js: FormRowGroup / FormRowAction / FormCheck / Section): label row on top, the controls on ONE baseline, normal spacing between sections ── */
.hm-form-row[hidden] { display: none; }
.hm-form-rowgroup { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--hm-space-3) var(--hm-space-4); }
.hm-form-rowgroup > .hm-form-row { min-width: 0; align-content: start; }
.invite-form .hm-form-rowgroup > .hm-form-row:first-child { flex: 1 1 260px; }
.hm-form-rowgroup :is(select, input:not([type="checkbox"]):not([type="radio"])) { min-height: var(--hm-control-height); box-sizing: border-box; }
.hm-form-rowgroup .hm-form-actions .btn, .hm-form-rowgroup .hm-form-actions button { min-height: var(--hm-control-height); box-sizing: border-box; } /* the button is as tall as the fields beside it, so their centres meet (2.7.3.9: 7px off) */
.hm-form-check { display: inline-flex; align-items: center; gap: var(--hm-space-2); min-height: var(--hm-control-height); font-size: var(--hm-fs-body); color: var(--hm-ink); cursor: pointer; }
.hm-form-check input[type="checkbox"] { width: auto; min-height: 0; margin: 0; }
.hm-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--hm-space-3); min-height: var(--hm-control-height); }
.hm-form-actions > :is(output, p):empty { display: none; } /* an empty status line took a second row and lifted the button 8px above the fields (2.7.3.9) */
.hm-form-row-action .hm-form-labelrow { visibility: hidden; }
.hm-section { display: grid; gap: var(--hm-space-3); min-width: 0; }
.hm-section + .hm-section { margin-top: var(--hm-space-6); padding-top: var(--hm-space-5); border-top: 1px solid var(--hm-line); }
.hm-section > * { margin-block: 0; } /* a Section's children are spaced by its gap alone (2.7.3.9: a card's margin and the gap made a 45px band) */
.hm-section:has(> .hm-disclosure:last-child) + .hm-section { margin-top: 0; } /* a folded row that ends a Section sits between its two dividers, centred */
.hm-section-head { display: flex; align-items: center; gap: var(--hm-space-2); }
.hm-section-title { margin: 0; font-size: var(--hm-fs-section); font-weight: 600; line-height: var(--hm-lh-title); color: var(--hm-ink); }
.hm-section-lead { margin: 0; font-size: var(--hm-fs-body); color: var(--hm-muted); }
@media (max-width: 760px) { .hm-form-rowgroup > .hm-form-row { flex: 1 1 100%; } .hm-form-rowgroup :is(select, input:not([type="checkbox"]):not([type="radio"])) { width: 100%; min-height: var(--hm-touch-target); } .hm-form-check { min-height: var(--hm-touch-target); } .hm-form-actions .btn { min-height: var(--hm-touch-target); } }
@media (max-width: 760px) { .hm-form-rowgroup > .hm-form-row-action > .hm-form-labelrow { display: none; } } /* stacked, the empty label row only pushed the button down */

/* ── EmptyState (components.js): an empty list is a centred block inside its card — soft icon, short title, one line, the primary actions ── */
.hm-empty { display: flex; flex-direction: column; align-items: center; gap: var(--hm-space-2); padding: var(--hm-space-7) var(--hm-space-5); text-align: center; min-width: 0; }
.hm-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: var(--hm-space-2); border-radius: var(--hm-radius-pill); background: var(--hm-primary-tint); color: var(--hm-primary); }
.hm-empty-icon .ux-icon { width: var(--hm-icon-l); height: var(--hm-icon-l); }
.hm-empty-title { margin: 0; font-size: var(--hm-fs-section); font-weight: 600; line-height: var(--hm-lh-title); color: var(--hm-ink); }
.hm-empty-text { margin: 0; max-width: 46ch; font-size: var(--hm-fs-body); line-height: var(--hm-lh-body); color: var(--hm-muted); }
.hm-empty-slim { padding-block: var(--hm-space-5); }
.hm-empty-head { display: flex; align-items: center; justify-content: center; gap: var(--hm-info-gap); min-width: 0; }
.hm-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--hm-space-2) var(--hm-space-3); margin-top: var(--hm-space-3); }
@media (max-width: 760px) { .hm-empty { padding: var(--hm-space-6) var(--hm-space-4); } .hm-empty-actions { flex-direction: column; align-self: stretch; } .hm-empty-actions .btn { width: 100%; justify-content: center; min-height: var(--hm-touch-target); } }

/* Side columns (2.7.3.9, ui-test's sweep: "the side column neither sticks nor spans"): the column beside a longer one rides along under the top of the page instead of leaving a blank below
   it — ONE rule for every page's side column (Overview, Workbench, Changes, Team, a lead or deal's next step); one taller than the screen scrolls inside itself. Below 1100px the columns stack. */
.ov-side, .wb-side, .team-side, .sc-col-next, .ux-shell .chg-maincols > :last-child { position: sticky; top: calc(var(--hm-topbar-height) + var(--hm-space-2)); align-self: start; max-height: calc(100dvh - var(--hm-topbar-height) - var(--hm-space-4)); overflow-y: auto; }
@media (max-width: 1100px) { .ov-side, .wb-side, .team-side, .sc-col-next, .ux-shell .chg-maincols > :last-child { position: static; max-height: none; overflow: visible; } }

/* A filter tab (Not recommended / Recommended) with no row on the page shows its empty state in place of the bare header (2.7.3.9). */
.ai-tab-empty { display: none; }
.ai-table[data-ai-show="attention"][data-ai-n-attention="0"] > .ai-tab-empty[data-ai-empty="attention"], .ai-table[data-ai-show="ok"][data-ai-n-ok="0"] > .ai-tab-empty[data-ai-empty="ok"] { display: block; }

/* Rows of buttons and the blocks around them (2.7.3.9: "Add a competitor" touched the label under it, Find improvements touched its credit text). */
.svc-actions + :is(.fc-field, .hm-form-row, label) { margin-top: var(--hm-space-4); }

/* A header row's title and its status pill share the first line (2.7.3.9: a 22px top margin on the title dropped it a line below the pill on Publishing and History). */
.ux-shell :is(.aio-publish-header, .timeline-heading-row) h3 { margin-top: 0; }
.ux-shell .timeline-panel > * { margin-block: 0; } /* the grid's own gap spaces the blocks: the notice's and the line's margins added up to a 44px hole */

/* DataTable columns with a width are fixed (the same kind of list has the same columns on every card), and a nowrap column keeps short values on one line (2.7.3.9). */
.hm-table-fixed { table-layout: fixed; width: 100%; }
.hm-table-fixed .hm-col-actions { width: 6rem; }
.hm-table .hm-nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-wb .hm-table .hm-row-link { font-size: var(--hm-fs-body); } /* the Follow-up link is the same size as the Lead link beside it (it was 12px against 14px) */

/* Connections: one card under the other, each as wide as the page (2.7.3.9: the mappings table wrapped to four lines in a half-width card, and the short Amazon card left a hole beside the tall one). */
.settings-grid[data-settings-section="connections"] { grid-template-columns: minmax(0, 1fr); }

/* F4A reviewer sign-in: the bar a platform reviewer's session shows at the top of the page (reviewer-banner.js). Sticky in <main>, the one scroll container; only a reviewer's session ever paints it. */
.hm-reviewer-banner { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-2) var(--hm-space-4); margin: 0; padding: var(--hm-space-2) var(--hm-space-5); background: var(--hm-sand); border-bottom: 1px solid var(--hm-pending-line); color: var(--hm-ink); font-size: var(--hm-fs-meta); line-height: var(--hm-lh-body); }
@media (max-width: 760px) { .hm-reviewer-banner { padding-left: 16px; padding-right: 16px; } }
/* Buyer page actions must remain visible when localized labels grow on narrow screens. */
@media (max-width: 600px) {
  .ux-shell .cpg-actions { flex-wrap: wrap; }
  .ux-shell .cpg-actions > button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
}
.simulator-query-button { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

/* ── FileUpload (shared/components.js; behaviour in shared/file-upload.js): the one way to choose a file ───────────────────────────────────────────────────────────────── */
.hm-fileupload { display: grid; gap: var(--hm-space-2); min-width: 0; }
.hm-fileupload .hm-fu-area { box-sizing: border-box; min-height: 124px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--hm-space-2); padding: var(--hm-space-4); text-align: center; border: 2px dashed var(--hm-line-strong); border-radius: var(--hm-radius-control); background: var(--hm-surface); transition: border-color 150ms ease, background-color 150ms ease; }
.hm-fileupload .hm-fu-icon { width: var(--hm-icon-l); height: var(--hm-icon-l); color: var(--hm-muted); }
.hm-fileupload .hm-fu-line { margin: 0; font-size: var(--hm-fs-body); font-weight: 400; color: var(--hm-ink); }
.hm-fileupload .hm-fu-line-touch, .hm-fileupload .hm-fu-line-drop { display: none; }
.hm-fileupload .hm-fu-choose { position: relative; cursor: pointer; }
.hm-fileupload .hm-fu-choose:focus-within { box-shadow: var(--hm-shadow-focus); }
.hm-fileupload .hm-fu-choose.is-disabled { opacity: .55; cursor: not-allowed; }
.hm-fileupload .hm-fu-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.hm-fileupload .hm-fu-choose.is-disabled .hm-fu-input { cursor: not-allowed; }
.hm-fileupload .hm-fu-file, .hm-fileupload .hm-fu-bar { display: none; }
.hm-fileupload .hm-fu-file { box-sizing: border-box; align-items: center; gap: var(--hm-space-3); min-height: 72px; padding: var(--hm-space-3) var(--hm-space-4); border: 1px solid var(--hm-line-strong); border-radius: var(--hm-radius-control); background: var(--hm-surface); min-width: 0; }
.hm-fileupload .hm-fu-tile { flex: none; width: var(--hm-control-height); height: var(--hm-control-height); border-radius: var(--hm-radius-control); background: var(--hm-primary-tint); color: var(--hm-primary); display: flex; align-items: center; justify-content: center; }
.hm-fileupload .hm-fu-tile .ux-icon { width: var(--hm-icon-m); height: var(--hm-icon-m); }
.hm-fileupload .hm-fu-grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.hm-fileupload .hm-fu-name { font-size: var(--hm-fs-body); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-fileupload .hm-fu-meta { font-size: var(--hm-fs-meta); color: var(--hm-muted); }
.hm-fileupload .hm-fu-link { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--hm-space-3); border: 0; border-radius: var(--hm-radius-control); background: transparent; color: var(--hm-muted); font: inherit; font-size: var(--hm-fs-meta); font-weight: 600; cursor: pointer; }
.hm-fileupload .hm-fu-link:hover:not(:disabled) { color: var(--hm-ink); background: var(--hm-neutral); }
.hm-fileupload .hm-fu-link:focus-visible { outline: 2px solid var(--hm-primary); outline-offset: 2px; }
.hm-fileupload .hm-fu-x { width: var(--hm-icon-s); height: var(--hm-icon-s); }
.hm-fileupload .hm-fu-bar { height: 6px; border-radius: var(--hm-radius-pill); background: var(--hm-line); overflow: hidden; }
.hm-fileupload .hm-fu-bar i { display: block; height: 100%; width: 40%; border-radius: var(--hm-radius-pill); background: var(--hm-primary); }
.hm-fileupload .hm-fu-bar-wait i { animation: hm-fu-wait 1.1s ease-in-out infinite; }
@keyframes hm-fu-wait { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .hm-fileupload .hm-fu-bar-wait i { animation: none; margin-left: 30%; } }
.hm-fileupload .hm-fu-error { display: flex; align-items: flex-start; gap: var(--hm-space-2); margin: 0; font-size: var(--hm-fs-meta); line-height: 1.45; color: var(--hm-danger); }
.hm-fileupload .hm-fu-error[hidden] { display: none; }
.hm-fileupload .hm-fu-alert { flex: none; width: var(--hm-icon-s); height: var(--hm-icon-s); margin-top: 1px; }
.hm-fileupload [data-fu-cancel], .hm-fileupload:not([data-cancellable]) [data-fu-cancel] { display: none; }
/* the states */
.hm-fileupload[data-state="chosen"] .hm-fu-area, .hm-fileupload[data-state="uploading"] .hm-fu-area { display: none; }
.hm-fileupload[data-state="chosen"] .hm-fu-file, .hm-fileupload[data-state="uploading"] .hm-fu-file { display: flex; }
.hm-fileupload[data-state="chosen"] [data-fu-cancel], .hm-fileupload[data-state="uploading"] [data-fu-remove] { display: none; }
.hm-fileupload[data-state="uploading"][data-cancellable] [data-fu-cancel] { display: inline-flex; }
.hm-fileupload[data-state="uploading"] .hm-fu-bar { display: block; }
.hm-fileupload[data-state="error"] .hm-fu-area { border-color: var(--hm-danger); }
.hm-fileupload[data-drag] .hm-fu-area { border-style: solid; border-color: var(--hm-primary); background: var(--hm-primary-tint); box-shadow: var(--hm-shadow-focus); }
.hm-fileupload[data-drag] .hm-fu-line-drag, .hm-fileupload[data-drag] .hm-fu-line-touch { display: none; }
.hm-fileupload[data-drag] .hm-fu-line-drop { display: block; color: var(--hm-primary); font-weight: 600; }
.hm-fileupload[data-drag] .hm-fu-icon { color: var(--hm-primary); }
/* a phone has nothing to drag onto: the area is a full-width Choose file button (every target >= 44px) */
@media (max-width: 600px), (pointer: coarse) {
  .hm-fileupload .hm-fu-line-drag { display: none; }
  .hm-fileupload .hm-fu-line-touch { display: block; color: var(--hm-muted); }
  .hm-fileupload .hm-fu-choose { align-self: stretch; justify-content: center; min-height: 48px; }
  .hm-fileupload .hm-fu-link { min-height: 44px; min-width: 44px; justify-content: center; }
}

.hm-fileupload.hm-fu-trigger { display: block; }
.hm-fu-trigger .hm-fu-error { justify-content: center; text-align: center; margin-top: var(--hm-space-2); }

/* ============================================================================
   NAV3 W2a-1 · three-column navigation, desktop (Codex design v1.0 §4, approved mock v0.6). Only body.nav3 (set by
   app.js when capabilities.nav3 is on and the window is wider than 900px) and .nav3-* are styled here; the third
   column — every page — keeps its own rules. Column 1 is 112px (modules), column 2 224px (the module's items); the
   page beside them keeps the ux shell's canvas and window scroll. Colours, sizes and radii are the shell's tokens.
   ============================================================================ */
@media (min-width: 901px) {
  /* the content column never grows past today's (coder2 ruling, Harvey: only the sidebar changes): the base shell caps
     at 1800px − 22 − 214 − 26 − 22 = 1516px of content; the rails sit flush left, the content keeps that cap */
  body.ux-shell.nav3 .app-shell { grid-template-columns: 336px minmax(0, 1516px); column-gap: 32px; max-width: none; padding: 0 22px 22px 0; }
  body.ux-shell.nav3 .app-shell > main { padding-top: 16px; }
  .ux-shell.nav3 .ux-sidebar {
    position: sticky; top: 0; height: calc(100dvh - var(--hm-announce-h)); margin: 0; width: 336px;
    display: grid; grid-template-columns: 112px 224px; grid-template-rows: auto auto minmax(0, 1fr) auto; align-items: start;
    padding: 0; gap: 0; border-radius: 0; box-shadow: none; overflow: hidden;
    background: linear-gradient(to right, var(--hm-surface) 0 111px, var(--hm-line) 111px 112px, var(--hm-bg) 112px 335px, var(--hm-line) 335px);
  }
  .ux-shell.nav3 .ux-sidebar > .ux-drawer-menu { display: none; }
  /* The logo as the approved mock shows it at 1440 (scale 1.55 of the asset's box): its visible wordmark about 80 × 16px
     inside the asset's transparent margins (a 101px-wide image); an 18px-tall window crops only margin — wordmark about
     20px from the top, 16px above the workspace box. */
  .ux-shell.nav3 .ux-sidebar > .ux-logo { grid-column: 1; grid-row: 1; display: flex; align-items: center; justify-content: center; width: 112px; height: 18px; overflow: hidden; margin: 19px 0 15px; min-height: 0; }
  .ux-shell.nav3 .ux-sidebar > .ux-logo img { position: static; flex: none; width: 101px; height: auto; max-width: none; transform: none; }
  /* W2a-2: column 1's own workspace control (nav3-shell.js nav3Workspace) stands where the shell's card was. */
  .ux-shell.nav3 .ux-sidebar > .ux-workspace { display: none; }
  .nav3-workspace {
    grid-column: 1; grid-row: 2; display: flex; align-items: center; justify-content: center; gap: 4px; box-sizing: border-box;
    width: 92px; height: 44px; margin: 0 10px 19px; padding: 0 6px; background: var(--hm-neutral); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control);
    color: var(--hm-ink); font: inherit; font-size: var(--hm-fs-label); font-weight: 600; cursor: pointer;
  }
  .nav3-workspace .nav3-icon { width: var(--hm-icon-s); height: var(--hm-icon-s); }
  .nav3-workspace .nav3-chevron { width: var(--hm-icon-s); height: var(--hm-icon-s); color: var(--hm-muted); }
  .nav3-workspace-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav3-workspace:hover { background: var(--hm-mint); }
  .nav3-workspace[aria-expanded="true"] { background: var(--hm-mint); border-color: var(--hm-primary); }
  .nav3-workspace:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
  .ux-shell.nav3 .ux-sidebar .ux-nav-slot, .ux-shell.nav3 #primary-nav.nav3-nav { display: contents; }
  /* the page's footer line starts at column 2's right edge */
  body.nav3 .ux-footer { left: 336px; padding-left: 32px; padding-right: 22px; }
  .ux-shell.nav3 .ux-sidebar > .ux-sidebar-foot { grid-column: 2; grid-row: 4; padding: 12px 16px 14px; margin: 0; border-top: 1px solid var(--hm-line); }

  .nav3-rail { grid-column: 1; grid-row: 3; align-self: stretch; display: flex; flex-direction: column; gap: 4px; min-height: 0; padding: 0 10px 12px; overflow-y: auto; scrollbar-width: none; }
  .nav3-rail > * { flex-shrink: 0; }
  .nav3-rail-foot { margin-top: auto; }
  /* The rail's Account item stands level with the account row at the foot of column 2 (Harvey 10-22, 2.6.3 screenshot): the rail
     runs down beside the foot row too, and its bottom padding is the foot's bottom padding plus half the difference between
     the account row's height and the module's, so the two centres meet whatever sits above the row (the Ask your Agent button
     changes the foot's height, never the row's distance from the bottom). The heights are the rows' own: the account row's
     --hm-control-height and the module's 62px; the short-window rules below restate the sum for 52px modules and 38px rows. */
  .ux-shell.nav3 .ux-sidebar:has(> .ux-sidebar-foot) .nav3-rail { grid-row: 3 / 5; padding-bottom: calc(14px + (var(--hm-control-height) - 62px) / 2); }
  .nav3-module {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 100%;
    min-height: 62px; padding: 7px 2px; border: 0; border-radius: var(--hm-radius-control); background: transparent; color: var(--hm-muted);
    font: inherit; font-size: var(--hm-fs-meta); line-height: 1.35; text-align: center; white-space: normal; cursor: pointer;
  }
  .nav3-module .nav3-icon { width: var(--hm-icon-l); height: var(--hm-icon-l); }
  .nav3-module-label { max-width: 82px; }
  .nav3-module:hover { background: var(--hm-neutral); color: var(--hm-ink); }
  .nav3-module.is-pressed { background: var(--hm-mint); color: var(--hm-primary); font-weight: 600; }
  .nav3-module.is-pressed::before { content: ""; position: absolute; left: -10px; top: 15px; bottom: 15px; width: 3px; border-radius: 0 var(--hm-radius-control) var(--hm-radius-control) 0; background: var(--hm-primary); }
  .nav3-module:focus-visible, .nav3-item:focus-visible, .nav3-panel-title:focus-visible, .nav3-all-products:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }

  .nav3-panel { grid-column: 2; grid-row: 1 / 4; align-self: stretch; display: flex; flex-direction: column; min-height: 0; padding: 22px 16px 0; }
  .nav3-panel-head { margin: 0 0 20px; }
  /* the mock's column-2 workspace line (.workspace-name): a 6px dot and the workspace's full name, 12px muted, 20px above
     the title; cut with an ellipsis when it doesn't fit (coder2 ruling on test4's note at bb9833aa) */
  .nav3-ws-line { display: flex; align-items: center; gap: 7px; min-width: 0; margin: 0 0 20px; font-size: var(--hm-fs-label); color: var(--hm-muted); }
  .nav3-ws-dot { flex: none; width: 6px; height: 6px; border-radius: var(--hm-radius-pill); background: var(--hm-nav3-dot); }
  .nav3-ws-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav3-panel-title { display: block; margin: 0 0 4px; font-size: var(--hm-fs-section); font-weight: 600; letter-spacing: -0.4px; line-height: 1.4; color: var(--hm-ink); text-decoration: none; }
  a.nav3-panel-title:hover { color: var(--hm-primary); }
  .nav3-panel-sub { margin: 0; font-size: var(--hm-fs-label); color: var(--hm-muted); }
  .nav3-panel-list { min-height: 0; overflow: auto; }
  .nav3-all-products { display: flex; align-items: center; min-height: var(--hm-touch-target); margin: 0 0 8px; font-size: var(--hm-fs-label); color: var(--hm-primary); text-decoration: none; }
  .nav3-all-products[aria-current="page"] { font-weight: 600; }
  .nav3-item {
    display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: 100%; min-height: var(--hm-touch-target); margin: 2px 0; padding: 10px 11px;
    border: 0; border-radius: var(--hm-radius-control); background: transparent; color: var(--hm-muted); font: inherit; font-size: var(--hm-fs-body); line-height: 1.4;
    text-align: left; text-decoration: none; white-space: normal; cursor: pointer;
  }
  .nav3-item .nav3-icon { width: var(--hm-icon-m); height: var(--hm-icon-m); }
  .nav3-item-label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
  .nav3-item:hover { background: var(--hm-neutral); color: var(--hm-ink); }
  .nav3-item.is-current { background: var(--hm-mint); color: var(--hm-primary); font-weight: 600; }
  .nav3-item-off { cursor: default; opacity: 0.55; }
  .nav3-item-off:hover { background: transparent; color: var(--hm-muted); }
  .nav3-item-count { flex: none; min-width: 20px; padding: 0 6px; border-radius: var(--hm-radius-pill); background: var(--hm-mint); color: var(--hm-primary); font-size: var(--hm-fs-label); font-weight: 600; text-align: center; }
  .nav3-icon { flex: none; fill: none; stroke: currentColor; stroke-width: var(--hm-icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
}
/* NAV3 W3b-1: column 2's "Find a product" box, its bounded results and the Selected card (mock: product-search-1440,
   products-1440), the same at every width (column 2 is the page's, the overlay's or the drawer's). */
/* W4a-1: the tab row that sat between the product page's heading and its body is not drawn under NAV3; the body keeps
   the gap the mock has under the heading (24px; it collapses with the header's 12px margin — assist-sonnect P3-1 at abfd30cd) */
.nav3-product-page .ux-ws-body { margin-top: var(--hm-space-5); }
.nav3-agent-host .agent-chat-panel { width: 100%; height: clamp(420px, calc(100vh - 260px), 900px); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); box-shadow: none; overflow: hidden; }
/* W4b-1: Overview's Danger zone (the mock's closed details; the settings Danger zone's box, title and button) */
.nav3-danger { display: block; margin-top: var(--hm-space-5); padding: 0; border-color: var(--hm-line); }
.nav3-danger > summary { display: flex; align-items: center; min-height: 44px; margin: 0; padding: 4px 24px; border-radius: var(--hm-radius-card); cursor: pointer; font-size: var(--hm-fs-body); font-weight: 600; color: var(--hm-danger); } /* a quiet row like the Technical details cards above it: sentence case, a chevron, the danger word's colour */
.nav3-find { margin: 0 0 12px; }
.nav3-find .nav3-find-label, .nav3-selected-eyebrow { display: block; min-width: 0; margin: 0 0 8px; font-size: var(--hm-fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hm-muted); }
.nav3-find .nav3-find-field {
  box-sizing: border-box; width: 100%; min-height: var(--hm-touch-target); margin: 0; padding: 0 44px 0 36px; border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-control); background: var(--hm-bg); box-shadow: none; color: var(--hm-ink); font: inherit; font-size: var(--hm-fs-body);
}
/* the same box as the column's Search (⌘K): grey fill, 1px line, no inner shadow. Its list scrolls and clips an outer ring to a bar at the bottom, so the focus ring is drawn inside (Harvey 10-24) */
.nav3-find .nav3-find-field:hover { border-color: var(--hm-line-strong); }
.nav3-find .nav3-find-field:focus, .nav3-find .nav3-find-field:focus-visible { border-color: var(--hm-primary); box-shadow: none; outline: 2px solid var(--hm-primary); outline-offset: -2px; }
/* empty (the placeholder shows, the clear × is hidden): the clear's 44px isn't reserved, so "Search products…" fits at 375 (assist-sonnect P3-2 at 5affbfef) */
.nav3-find .nav3-find-field:placeholder-shown { padding-right: 12px; }
.nav3-find-clear .nav3-icon { width: var(--hm-icon-s); height: var(--hm-icon-s); }
.nav3-agent-note { margin: 4px 0 0; padding: 12px 0 0; border-top: 1px solid var(--hm-line); font-size: var(--hm-fs-label); line-height: 1.5; color: var(--hm-muted); }
.nav3-selected { margin: 0 0 10px; padding: 10px 13px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-neutral); }
.nav3-selected-eyebrow { margin-bottom: 4px; line-height: 1.3; }
.nav3-selected-name { margin: 0; font-size: var(--hm-fs-body); font-weight: 600; line-height: 1.35; color: var(--hm-ink); overflow-wrap: anywhere; }
.nav3-selected-domain { margin: 1px 0 0; font-size: var(--hm-fs-label); line-height: 1.35; color: var(--hm-muted); overflow-wrap: anywhere; }
/* UI refresh P3 (Harvey 10-23, the Product tree): the product list in column 2 — group labels in sentence case, one 36px row per product
   with its state shape (amber circle needs attention, red circle error, green square checked) and an open-items badge, and the
   open product's pages hanging under it on a thin line. */
.nav3-tree { display: block; }
.nav3-group { margin: 14px 11px 6px; font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-muted); }
.nav3-prod { display: flex; align-items: center; gap: 10px; min-height: 36px; margin: 0 0 2px; padding: 0 8px; border-radius: var(--hm-radius-control); font-size: var(--hm-fs-body); color: var(--hm-ink); text-decoration: none; }
.nav3-shape { flex: none; box-sizing: border-box; width: 12px; height: 12px; border: 2px solid; border-radius: var(--hm-radius-pill); }
.nav3-shape-attention { border-color: var(--hm-danger); }
.nav3-shape-progress { border-color: var(--hm-attention); }
.nav3-shape-checked { border-color: var(--hm-success); border-radius: 0; }
.nav3-prod-badge.is-hot { background: var(--hm-danger); color: var(--hm-on-dark); }
.nav3-prod-pages .nav3-item .nav3-icon { display: none; }
.nav3-tree .nav3-all-products { margin: 10px 0 0 8px; }

/* A short window (the mock's short-height rules): modules 52px tall, tighter logo and workspace spacing; column 1
   scrolls by itself below that instead of becoming a drawer (assist-sonnect P2 at ce09a213). */
@media (min-width: 901px) and (max-height: 760px) {
  .ux-shell.nav3 .ux-sidebar > .ux-logo { margin: 14px 0 11px; }
  .nav3-workspace { margin-bottom: 12px; }
  .nav3-module { min-height: 52px; padding: 6px 2px; font-size: var(--hm-fs-label); }
  .ux-shell.nav3 .ux-sidebar:has(> .ux-sidebar-foot) .nav3-rail { padding-bottom: calc(14px + (var(--hm-control-height) - 52px) / 2); } /* the 52px module */
  .nav3-panel { padding-top: 18px; }
  .nav3-panel-head { margin-bottom: 12px; }
}
/* A desktop window under 800px tall with a mouse: the account row is 38px (the shell's 36px minimum, held up by its 30px avatar);
   with 52px modules (under 761px tall) the sum is 14 + (38 - 52) / 2. */
@media (min-width: 901px) and (max-height: 799px) and (pointer: fine) {
  .ux-shell.nav3 .ux-sidebar:has(> .ux-sidebar-foot) .nav3-rail { padding-bottom: calc(14px + (38px - 62px) / 2); }
}
@media (min-width: 901px) and (max-height: 760px) and (pointer: fine) {
  .ux-shell.nav3 .ux-sidebar:has(> .ux-sidebar-foot) .nav3-rail { padding-bottom: calc(14px + (38px - 52px) / 2); }
}
/* NAV3 W2b-1: column 2's close button and the scrim exist only in the narrow layouts below. */
.nav3-close, .nav3-scrim { display: none; }
/* 651–900px (and 200% zoom of a desktop window): column 1 stands at 92px; column 2 opens over the page when a module is
   pressed (body.nav3-peek, the mock's .secondary.peek), a scrim behind it; the page keeps the rest of the width. */
@media (min-width: 651px) and (max-width: 900px) {
  body.ux-shell.nav3 .app-shell { display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 16px; max-width: none; margin: 0; padding: 0 14px 14px 0; }
  body.ux-shell.nav3 .app-shell > main { grid-column: 2; padding-top: 12px; }
  .ux-shell.nav3 .ux-sidebar {
    /* z-index over the page's sticky top line (40): the sticky sidebar is its own stacking context, so column 2's
       overlay and scrim inside it can only cover the top line if the sidebar does */
    position: sticky; top: 0; left: auto; bottom: auto; z-index: 60; height: calc(100dvh - var(--hm-announce-h)); width: 92px; margin: 0;
    display: grid; grid-template-columns: 92px; grid-template-rows: auto auto minmax(0, 1fr); align-items: start; padding: 0; gap: 0;
    border-radius: 0; box-shadow: none; transform: none; visibility: visible; transition: none; overflow: hidden;
    background: var(--hm-surface); border-right: 1px solid var(--hm-line);
  }
  .ux-shell.nav3 .ux-sidebar > .ux-drawer-menu, .ux-shell.nav3 .ux-sidebar > .ux-workspace, .ux-shell.nav3 .ux-sidebar > .ux-sidebar-foot { display: none; }
  .ux-shell.nav3 .ux-sidebar .ux-nav-slot, .ux-shell.nav3 #primary-nav.nav3-nav { display: contents; }
  /* test4 N3-R6: the home link is a 44px touch target; the image crops itself to the same 16px band (object-fit), so the
     drawn logo is unchanged and the white of the PNG never shows. Margins give back the 28px the link grew. */
  .ux-shell.nav3 .ux-sidebar > .ux-logo { grid-column: 1; grid-row: 1; display: flex; align-items: center; justify-content: center; width: 92px; height: var(--hm-touch-target); overflow: hidden; margin: 4px 0 0; min-height: 0; }
  .ux-shell.nav3 .ux-sidebar > .ux-logo img { position: static; flex: none; width: 88px; height: 16px; object-fit: cover; object-position: center; max-width: none; transform: none; }
  .nav3-workspace {
    grid-column: 1; grid-row: 2; display: flex; align-items: center; justify-content: center; gap: 3px; box-sizing: border-box;
    width: 76px; height: 44px; margin: 0 8px 16px; padding: 0 4px; background: var(--hm-neutral); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control);
    color: var(--hm-ink); font: inherit; font-size: var(--hm-fs-label); font-weight: 600; cursor: pointer;
  }
  .nav3-workspace .nav3-icon { width: var(--hm-icon-s); height: var(--hm-icon-s); }
  .nav3-workspace .nav3-chevron { width: var(--hm-icon-s); height: var(--hm-icon-s); color: var(--hm-muted); }
  .nav3-workspace-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav3-workspace[aria-expanded="true"], .nav3-workspace:hover { background: var(--hm-mint); }
  .nav3-workspace:focus-visible, .nav3-module:focus-visible, .nav3-item:focus-visible, .nav3-close:focus-visible, .nav3-panel-title:focus-visible, .nav3-all-products:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
  .nav3-rail { grid-column: 1; grid-row: 3; align-self: stretch; display: flex; flex-direction: column; gap: 4px; min-height: 0; padding: 0 8px 12px; overflow-y: auto; scrollbar-width: none; }
  .nav3-rail > * { flex-shrink: 0; }
  .nav3-rail-foot { margin-top: auto; }
  .nav3-module {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 100%;
    min-height: 56px; padding: 6px 2px; border: 0; border-radius: var(--hm-radius-control); background: transparent; color: var(--hm-muted);
    font: inherit; font-size: var(--hm-fs-label); line-height: 1.3; text-align: center; white-space: normal; cursor: pointer;
  }
  .nav3-module .nav3-icon { width: var(--hm-icon-l); height: var(--hm-icon-l); }
  .nav3-module:hover { background: var(--hm-neutral); color: var(--hm-ink); }
  .nav3-module.is-pressed { background: var(--hm-mint); color: var(--hm-primary); font-weight: 600; }
  .nav3-panel { display: none; }
  body.nav3-peek .nav3-panel {
    display: flex; flex-direction: column; position: fixed; z-index: 520; left: 92px; top: 0; bottom: 0; width: 224px; box-sizing: border-box;
    padding: 18px 16px 0; overflow-y: auto; background: var(--hm-bg); border-right: 1px solid var(--hm-line); box-shadow: var(--hm-shadow-lg);
  }
  .nav3-ws-line { display: flex; align-items: center; gap: 7px; min-width: 0; margin: 0 0 12px; padding-right: 40px; font-size: var(--hm-fs-label); color: var(--hm-muted); }
  .nav3-ws-dot { flex: none; width: 6px; height: 6px; border-radius: var(--hm-radius-pill); background: var(--hm-nav3-dot); }
  .nav3-ws-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.nav3-peek .nav3-scrim { display: block; position: fixed; z-index: 510; inset: 0 0 0 92px; background: var(--hm-overlay); cursor: pointer; }
  .nav3-panel-head { position: relative; margin: 0 0 12px; padding-right: 40px; }
  .nav3-close {
    display: inline-flex; align-items: center; justify-content: center; position: absolute; top: -10px; right: -12px; width: var(--hm-touch-target); height: var(--hm-touch-target);
    padding: 0; border: 0; border-radius: var(--hm-radius-control); background: transparent; color: var(--hm-muted); cursor: pointer;
  }
  .nav3-close .nav3-icon { width: var(--hm-icon-s); height: var(--hm-icon-s); }
  .nav3-panel-title { display: flex; align-items: center; min-height: var(--hm-touch-target); margin: 0; font-size: var(--hm-fs-section); font-weight: 600; line-height: 1.4; color: var(--hm-ink); text-decoration: none; }
  .nav3-panel-sub { margin: 0; font-size: var(--hm-fs-label); color: var(--hm-muted); }
  .nav3-panel-list { min-height: 0; }
  .nav3-all-products { display: flex; align-items: center; min-height: var(--hm-touch-target); margin: 0 0 8px; font-size: var(--hm-fs-label); color: var(--hm-primary); text-decoration: none; }
  .nav3-item {
    display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: 100%; min-height: var(--hm-touch-target); margin: 2px 0; padding: 10px 11px;
    border: 0; border-radius: var(--hm-radius-control); background: transparent; color: var(--hm-muted); font: inherit; font-size: var(--hm-fs-body); line-height: 1.4;
    text-align: left; text-decoration: none; white-space: normal; cursor: pointer;
  }
  .nav3-item .nav3-icon { width: var(--hm-icon-m); height: var(--hm-icon-m); }
  .nav3-item-label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
  .nav3-item:hover { background: var(--hm-neutral); color: var(--hm-ink); }
  .nav3-item.is-current { background: var(--hm-mint); color: var(--hm-primary); font-weight: 600; }
  .nav3-item-off { cursor: default; opacity: 0.55; }
  .nav3-item-count { flex: none; min-width: 20px; padding: 0 6px; border-radius: var(--hm-radius-pill); background: var(--hm-mint); color: var(--hm-primary); font-size: var(--hm-fs-label); font-weight: 600; text-align: center; }
  .nav3-icon { flex: none; fill: none; stroke: currentColor; stroke-width: var(--hm-icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
  .ux-shell.nav3 .ux-topbar .ux-menu { display: none; }
  body.nav3 .ux-footer { left: 92px; padding-left: 16px; padding-right: 14px; }
}
/* 650px and below: the shell's phone drawer (the top line's ☰, its focus trap, Escape and backdrop) holds both levels —
   column 1 (100px) and column 2 beside it (the mock's .primary.open + .secondary.peek). */
@media (max-width: 650px) {
  .ux-shell.nav3 .ux-sidebar {
    width: min(324px, 100vw); display: grid; grid-template-columns: 100px minmax(0, 224px); grid-template-rows: auto auto minmax(0, 1fr); align-items: start;
    padding: 0; gap: 0; border-radius: 0; overflow: hidden;
    background: linear-gradient(to right, var(--hm-surface) 0 99px, var(--hm-line) 99px 100px, var(--hm-bg) 100px);
  }
  .ux-shell.nav3 .ux-sidebar > .ux-drawer-menu, .ux-shell.nav3 .ux-sidebar > .ux-workspace, .ux-shell.nav3 .ux-sidebar > .ux-sidebar-foot { display: none; }
  .ux-shell.nav3 .ux-sidebar .ux-nav-slot, .ux-shell.nav3 #primary-nav.nav3-nav { display: contents; }
  /* test4 N3-R6: a 44px touch target with the same drawn 18px band (see the 651–900 rule) */
  .ux-shell.nav3 .ux-sidebar > .ux-logo { grid-column: 1; grid-row: 1; display: flex; align-items: center; justify-content: center; width: 100px; height: var(--hm-touch-target); overflow: hidden; margin: 5px 0 1px; min-height: 0; }
  .ux-shell.nav3 .ux-sidebar > .ux-logo img { position: static; flex: none; width: 96px; height: 18px; object-fit: cover; object-position: center; max-width: none; transform: none; }
  .nav3-workspace {
    grid-column: 1; grid-row: 2; display: flex; align-items: center; justify-content: center; gap: 3px; box-sizing: border-box;
    width: 84px; height: 44px; margin: 0 8px 12px; padding: 0 4px; background: var(--hm-neutral); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control);
    color: var(--hm-ink); font: inherit; font-size: var(--hm-fs-label); font-weight: 600; cursor: pointer;
  }
  .nav3-workspace .nav3-icon { width: var(--hm-icon-s); height: var(--hm-icon-s); }
  .nav3-workspace .nav3-chevron { width: var(--hm-icon-s); height: var(--hm-icon-s); color: var(--hm-muted); }
  .nav3-workspace-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav3-workspace:focus-visible, .nav3-module:focus-visible, .nav3-item:focus-visible, .nav3-close:focus-visible, .nav3-panel-title:focus-visible, .nav3-all-products:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
  .nav3-rail { grid-column: 1; grid-row: 3; align-self: stretch; display: flex; flex-direction: column; gap: 4px; min-height: 0; padding: 0 8px 12px; overflow-y: auto; scrollbar-width: none; }
  .nav3-rail > * { flex-shrink: 0; }
  .nav3-rail-foot { margin-top: auto; }
  .nav3-module {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 100%;
    min-height: 56px; padding: 6px 2px; border: 0; border-radius: var(--hm-radius-control); background: transparent; color: var(--hm-muted);
    font: inherit; font-size: var(--hm-fs-label); line-height: 1.3; text-align: center; white-space: normal; cursor: pointer;
  }
  .nav3-module .nav3-icon { width: var(--hm-icon-l); height: var(--hm-icon-l); }
  /* assist-sonnect b0c97abb P2: the base button:hover (dark green) would win here with grey text; the drawer keeps the
     wider layouts' light hovers (pressed / current rules follow, so they still win) */
  .nav3-workspace:hover { background: var(--hm-mint); color: var(--hm-ink); }
  .nav3-module:hover, .nav3-close:hover { background: var(--hm-neutral); color: var(--hm-ink); }
  .nav3-module.is-pressed { background: var(--hm-mint); color: var(--hm-primary); font-weight: 600; }
  .nav3-ws-line { display: flex; align-items: center; gap: 7px; min-width: 0; margin: 0 0 12px; padding-right: 40px; font-size: var(--hm-fs-label); color: var(--hm-muted); }
  .nav3-ws-dot { flex: none; width: 6px; height: 6px; border-radius: var(--hm-radius-pill); background: var(--hm-nav3-dot); }
  .nav3-ws-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav3-panel { grid-column: 2; grid-row: 1 / 4; align-self: stretch; display: flex; flex-direction: column; min-height: 0; box-sizing: border-box; padding: 18px 12px 0; overflow-y: auto; }
  .nav3-panel-head { position: relative; margin: 0 0 12px; padding-right: 40px; }
  .nav3-close {
    display: inline-flex; align-items: center; justify-content: center; position: absolute; top: -10px; right: -8px; width: var(--hm-touch-target); height: var(--hm-touch-target);
    padding: 0; border: 0; border-radius: var(--hm-radius-control); background: transparent; color: var(--hm-muted); cursor: pointer;
  }
  .nav3-close .nav3-icon { width: var(--hm-icon-s); height: var(--hm-icon-s); }
  .nav3-panel-title { display: flex; align-items: center; min-height: var(--hm-touch-target); margin: 0; font-size: var(--hm-fs-section); font-weight: 600; line-height: 1.4; color: var(--hm-ink); text-decoration: none; }
  .nav3-panel-sub { margin: 0; font-size: var(--hm-fs-label); color: var(--hm-muted); }
  .nav3-all-products { display: flex; align-items: center; min-height: var(--hm-touch-target); margin: 0 0 8px; font-size: var(--hm-fs-label); color: var(--hm-primary); text-decoration: none; }
  .nav3-item {
    display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: 100%; min-height: var(--hm-touch-target); margin: 2px 0; padding: 10px 8px;
    border: 0; border-radius: var(--hm-radius-control); background: transparent; color: var(--hm-muted); font: inherit; font-size: var(--hm-fs-body); line-height: 1.4;
    text-align: left; text-decoration: none; white-space: normal; cursor: pointer;
  }
  .nav3-item .nav3-icon { width: var(--hm-icon-m); height: var(--hm-icon-m); }
  .nav3-item-label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
  .nav3-item:hover { background: var(--hm-neutral); color: var(--hm-ink); }
  .nav3-item.is-current { background: var(--hm-mint); color: var(--hm-primary); font-weight: 600; }
  .nav3-item-off { cursor: default; opacity: 0.55; }
  .nav3-item-off:hover { background: transparent; color: var(--hm-muted); }
  .nav3-item-count { flex: none; min-width: 20px; padding: 0 6px; border-radius: var(--hm-radius-pill); background: var(--hm-mint); color: var(--hm-primary); font-size: var(--hm-fs-label); font-weight: 600; text-align: center; }
  .nav3-icon { flex: none; fill: none; stroke: currentColor; stroke-width: var(--hm-icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
}
/* Harvey 10-15 (iPhone): NAV3's Account carries the person's line where column 1's foot isn't shown (≤900); from 901px
   the foot shows it, so this one is hidden. The foot's look (30px avatar, email over role), read only. */
.nav3-person { display: none; }
@media (max-width: 900px) {
  .nav3-workspace-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ux-shell.nav3 .nav3-person { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0 0 12px; padding: 4px 0 12px; border-bottom: 1px solid var(--hm-line); color: var(--hm-ink); }
  .ux-shell.nav3 .nav3-person .ux-avatar { width: 30px; height: 30px; min-width: 30px; font-size: var(--hm-fs-label); }
  .ux-shell.nav3 .nav3-person .ux-user-text { display: grid; min-width: 0; line-height: 15px; }
  .ux-shell.nav3 .nav3-person .ux-user-email { font-size: var(--hm-fs-label); font-weight: 600; color: var(--hm-ink); overflow-wrap: anywhere; } /* the whole address: column 2 is ~190px, the foot's ellipsis cut it */
  .ux-shell.nav3 .nav3-person .ux-user-role { font-size: var(--hm-fs-label); color: var(--hm-muted); }
}

/* §4: at 1250px and below (to 901px) the columns narrow to 104 / 212px, the gutter to 20px. */
@media (min-width: 901px) and (max-width: 1250px) {
  body.ux-shell.nav3 .app-shell { grid-template-columns: 316px minmax(0, 1fr); column-gap: 20px; padding: 0 18px 18px 0; }
  .ux-shell.nav3 .ux-sidebar {
    width: 316px; grid-template-columns: 104px 212px;
    background: linear-gradient(to right, var(--hm-surface) 0 103px, var(--hm-line) 103px 104px, var(--hm-bg) 104px 315px, var(--hm-line) 315px);
  }
  .ux-shell.nav3 .ux-sidebar > .ux-logo { width: 104px; }
  .nav3-workspace { width: 84px; }
  .nav3-panel { padding: 20px 12px 0; }
  .ux-shell.nav3 .ux-sidebar > .ux-sidebar-foot { padding: 12px 12px 14px; }
  body.nav3 .ux-footer { left: 316px; padding-left: 20px; padding-right: 18px; }
}

/* ============================================================================
   2.7.4 menu board (website manager 10-24, board "0 選單總表"): from 901px the rail is 72px and icons only — logo tile, the modules,
   then (below) the bell and the person's round avatar; the name is the button's title. Column 2 is 240px: the workspace switcher, the
   Search box (⌘K), the module's title and its 36px items, and Ask your Agent fixed at its foot, the one entry. Narrower windows keep
   their own layouts (labels, drawer).
   ============================================================================ */
.nav3-search { display: none; }
.nav3-tip { display: none; } /* from 901px only (the drawer and the narrow rail keep their visible labels) */
@media (min-width: 901px) {
  body.ux-shell.nav3 .app-shell { grid-template-columns: 312px minmax(0, 1516px); }
  .ux-shell.nav3 .ux-sidebar {
    width: 312px; grid-template-columns: 72px 240px;
    background: linear-gradient(to right, var(--hm-surface) 0 71px, var(--hm-line) 71px 72px, var(--hm-surface) 72px 311px, var(--hm-line) 311px);
  }
  body.nav3 .ux-footer { left: 312px; }
  .ux-shell.nav3 .ux-sidebar > .ux-logo { width: 72px; height: var(--hm-control-height); margin: 12px 0 18px; }
  /* the rail carries the Hasmord mark (the new small mark, Harvey 10-24), not the wordmark — 32px, centred on the switcher's line */
  .ux-shell.nav3 .ux-sidebar > .ux-logo img { width: 32px; height: 32px; }
  /* the workspace switcher heads column 2 */
  .nav3-workspace { grid-column: 2; grid-row: 1; align-self: start; z-index: 2; width: auto; height: 36px; margin: 16px 12px 0; padding: 0 10px; justify-content: flex-start; gap: 8px; background: transparent; border: 0; font-size: var(--hm-fs-body); font-weight: 600; }
  .nav3-workspace:hover { background: var(--hm-hover); }
  .nav3-workspace[aria-expanded="true"] { background: var(--hm-selected); border: 0; }
  .nav3-workspace > .nav3-icon:first-child { box-sizing: border-box; width: 24px; height: 24px; padding: 4px; border-radius: var(--hm-radius-control); background: var(--hm-hover); color: var(--hm-muted); } /* grey, not black (Harvey 10-24): --hm-muted on --hm-hover is 5.3:1, above the 3:1 an icon needs */
  .nav3-workspace .nav3-chevron { margin-left: auto; }
  .nav3-workspace-name { flex: 1 1 auto; text-align: left; }
  .nav3-panel { padding: 60px 12px 0; }
  .nav3-ws-line { display: none; }
  .nav3-find .nav3-find-field { height: 36px; min-height: 0; } /* the ⌘K box's height (phones keep the touch target) */
  .nav3-search { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; margin: 0 0 12px; padding: 0 10px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-bg); color: var(--hm-muted); font: inherit; font-size: var(--hm-fs-body); text-align: left; cursor: pointer; }
  .nav3-search .nav3-icon { width: var(--hm-icon-s); height: var(--hm-icon-s); }
  .nav3-search kbd { margin-left: auto; padding: 1px 6px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-control); background: var(--hm-surface); color: var(--hm-muted); font: inherit; font-size: var(--hm-fs-label); line-height: 16px; }
  .nav3-search:hover, .nav3-search:active { background: var(--hm-bg); color: var(--hm-muted); border-color: var(--hm-line-strong); }
  .nav3-search:focus-visible { outline: 3px solid var(--hm-primary); outline-offset: 2px; }
  .nav3-panel[data-nav3-module="products"] .nav3-search { display: none; } /* Products has its own product search under its title */
  .nav3-panel-head { margin: 0; }
  .nav3-panel-title { margin: 0; padding: 4px 10px 8px; font-size: var(--hm-fs-section); font-weight: 600; line-height: var(--hm-lh-title); letter-spacing: 0; }
  .nav3-item { min-height: 36px; margin: 0; padding: 0 10px; gap: 10px; color: var(--hm-ink); border-radius: var(--hm-radius-control); font-size: var(--hm-fs-body); }
  .nav3-item:hover { background: var(--hm-hover); }
  .nav3-item.is-current { background: var(--hm-selected); color: var(--hm-ink); font-weight: 600; }
  .nav3-item-count { min-width: 22px; height: 20px; line-height: 20px; padding: 0 6px; background: var(--hm-hover); color: var(--hm-muted); text-align: center; }
  .nav3-item-count.is-hot { background: var(--hm-danger); color: var(--hm-surface); }
  .nav3-group { margin: 0; padding: 14px 10px 6px; font-size: var(--hm-fs-label); line-height: var(--hm-lh-tight); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--hm-muted); }
  .nav3-tree .nav3-all-products { justify-content: space-between; min-height: 36px; margin: 0 0 2px; padding: 0 10px; border-radius: var(--hm-radius-control); font-size: var(--hm-fs-body); color: var(--hm-ink); }
  .nav3-tree .nav3-all-products:hover { background: var(--hm-hover); }
  .nav3-tree .nav3-show-all { margin-top: 6px; color: var(--hm-primary); font-size: var(--hm-fs-meta); }
  .nav3-tree .nav3-all-products[aria-current="page"] { background: var(--hm-selected); font-weight: 600; }
  /* the rail */
  .nav3-rail { align-items: center; gap: 6px; padding: 0 14px 16px; overflow: visible; }
  .ux-shell.nav3 .ux-sidebar:has(> .ux-sidebar-foot) .nav3-rail { grid-row: 3 / 5; padding-bottom: 16px; }
  .nav3-module { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: var(--hm-radius-card); }
  .nav3-module .nav3-icon { width: var(--hm-icon-l); height: var(--hm-icon-l); }
  .nav3-module-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav3-module.is-pressed { background: var(--hm-primary-tint); color: var(--hm-primary); font-weight: 400; }
  .nav3-module.is-pressed::before { display: none; }
  .nav3-module[data-module="agent"] { display: none; }
  /* a dark label on hover and keyboard focus replaces the browser's title tip */
  .nav3-tip { display: block; position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); z-index: 700; padding: 6px 10px; border-radius: var(--hm-radius-control); background: var(--hm-ink); color: var(--hm-surface); font-size: var(--hm-fs-meta); line-height: var(--hm-lh-title); font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.12s; }
  .nav3-module:hover .nav3-tip, .nav3-module:focus-visible .nav3-tip { opacity: 1; }
  .nav3-rbadge { position: absolute; top: -4px; right: -6px; box-sizing: border-box; min-width: 20px; height: 20px; padding: 0 5px; border: 2px solid var(--hm-surface); border-radius: var(--hm-radius-pill); background: var(--hm-danger); color: var(--hm-surface); font-size: var(--hm-fs-label); line-height: 16px; font-weight: 600; text-align: center; }
  .nav3-rbadge[hidden] { display: none; }
  .nav3-rail-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: auto; }
  .nav3-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--hm-radius-pill); background: var(--hm-selected) center / cover; color: var(--hm-ink); font-size: var(--hm-fs-meta); font-weight: 600; }
  .nav3-module.is-pressed .nav3-avatar { box-shadow: 0 0 0 2px var(--hm-primary); }
  .nav3-module[data-module="account"] { background: transparent; }
  /* the foot of column 2: Ask your Agent, the one entry; the person lives in the rail */
  .ux-shell.nav3 .ux-sidebar > .ux-sidebar-foot { padding: 12px; border-top: 0; }
  .ux-shell.nav3 .ux-sidebar-foot button.ux-user { display: none; }
  .ux-shell.nav3 .ux-sidebar-foot .ux-side-agent { min-height: var(--hm-control-height); padding: 0 12px; border: 0; border-radius: var(--hm-radius-control); background: var(--hm-primary-tint); color: var(--hm-primary); font-weight: 600; }
  .ux-shell.nav3 .ux-sidebar-foot .ux-side-agent:hover { background: var(--hm-mint); }
}

/* Harvey's feedback 19 (colour only): a light control that the shared button hover turns dark green keeps its words
   and icons readable on it — the light tokens the primary buttons use. A text link keeps no box on hover. */
/* A light control keeps its own light look on hover — the shared dark fill is for the filled buttons (hover-contrast.mjs found ink on that fill at 2.5:1 on the CRM filter chips and cyan on it at 1.3:1 on Billing's link-style buttons). */
.sc-chip:not(.is-on):is(:hover, :active) { background: var(--hm-hover-strong); color: var(--hm-ink); }
.bill-link:is(:hover, :active) { background: none; color: var(--hm-primary-hover); }
.wb-stat:not(.wb-stat-static):is(:hover, :active) { background: var(--hm-primary-hover); text-decoration: none; } /* the fill the light words below are drawn for — given here, so a card that is a link (no button fill from the shared rule) is not light words on white */
.wb-stat:hover .wb-stat-label { color: var(--hm-primary-tint); }
.wb-stat:hover .wb-stat-number { color: var(--hm-on-dark); }
.wb-stat:hover .wb-stat-icon { background: var(--hm-surface); }
.wb-filter-btn:not(.active):hover, .hist-filter-btn:not(.active):hover, .interval-pill:not(.active):hover { color: var(--hm-on-dark); } /* an active one keeps its light pill */
.ask-link:hover { background: none; }
/* ADV-FIN-1: the count on an inactive Changes tab reads in ink on its pill (4.01:1 in muted). */
/* ADV-FIN-2: the ask's light secondary button hovers mint, as .btn.secondary does — never the shared dark hover. */
.ux-shell .btn.ask-secondary:hover { background: var(--hm-mint); border-color: var(--hm-primary-line); color: var(--hm-primary); }

/* The footer is the end of the content on a phone too (coordinate 10-27, ui-test: it was fixed and covered the last ~34px of every page): after the last block, full width, never over anything. */
@media (max-width: 900px) {
  /* on the content line (main already insets 16px), room above the hairline whatever the last block's own margin, and the line breaks balanced so the version never stands alone */
  body.nav3.ux-shell .ux-footer { position: static; left: auto; right: auto; margin: auto 0 0; padding: calc(var(--hm-space-4) + var(--hm-space-2)) 0 var(--hm-space-2); border-top: 0; background: linear-gradient(var(--hm-line), var(--hm-line)) 0 var(--hm-space-4) / 100% 1px no-repeat, var(--hm-bg); max-width: none; white-space: normal; overflow: visible; text-overflow: clip; text-wrap: balance; }
  body.ux-shell.nav3 .app-shell > main, body.ux-shell.nav3 .app-shell { padding-bottom: 0; }
  .ux-shell.nav3 .rs-unsaved-bar { bottom: 0; }
}

/* From 901px the shell is the window's height and ONLY the content column scrolls (Harvey 10-24: "when scrolling, the whole page scrolls, rail and column 2
   included"). The announcement bar, the rail and column 2 stay put; <main> is the one scroll container, with the footer at the end of it. Phones and the
   older shell keep the window scrolling. */
@media (min-width: 901px) {
  body.ux-shell.nav3 { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
  body.ux-shell.nav3 > .ux-announce { flex: none; }
  body.ux-shell.nav3 .app-shell { flex: 1 1 0; width: 100%; max-width: none; margin: 0; min-height: 0; height: auto; padding: 0; column-gap: 0; align-items: stretch; grid-template-columns: 312px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); overflow: hidden; }
  body.ux-shell.nav3 .ux-sidebar { position: static; top: auto; height: auto; align-self: stretch; }
  body.ux-shell.nav3 .app-shell > main { min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 22px 0 32px; overscroll-behavior: contain; }
  body.ux-shell.nav3 .ux-topbar { padding-top: calc(16px + var(--hm-space-2)); } /* the 16px that was main's padding is the sticky bar's own, so scrolled content never shows above it */
  body.ux-shell.nav3 .app-shell > main > * { flex-shrink: 0; } /* main is a flex column elsewhere: its children never squeeze to fit the scroller */
  body.ux-shell.nav3 .app-shell > main > :not(.ux-footer) { max-width: 1516px; }
  body.ux-shell.nav3 .app-shell > main > section { margin-bottom: var(--hm-space-6); } /* the gap above the footer, however short or long the page */
  body.nav3.ux-shell .ux-footer { position: static; left: auto; right: auto; margin: auto -22px 0 -32px; /* auto on top: at the column's bottom when the page is short, after the content when it is long */ padding: var(--hm-space-2) 22px var(--hm-space-2) 32px; max-width: none; }
  .ux-shell.nav3 .rs-unsaved-bar { bottom: 0; } /* the footer is the end of the content now, not a bar over it */
  /* The page header, tight (Harvey 10-24: "the header looks empty while the content below is dense"): 18px above the breadcrumb, the title row 6px under it, the plan
     icon in the title row at the right (beside the primary, not a row of its own), 16px to the tabs and content — breadcrumb + title row about 66px. The breadcrumb
     scrolls with the page: it is no longer a sticky bar over the content. */
  body.ux-shell.nav3 .ux-topbar { position: relative; top: auto; margin: 0 0 6px; padding: 18px 0 0; background: transparent; min-height: 0; }
  /* The plan icon is the last item of the title row's actions (PagePlanIcon, after the primary, 12px apart) — in the row's flow, never positioned. The top bar's copy
     only stands in on a page with no header: at the right end of the breadcrumb line. */
  body.ux-shell.nav3 .ux-topbar .ux-subscribe { margin-left: auto; }
  body.ux-shell.nav3:has(main :is(.hm-page-header, .section-heading-actions):not([hidden] *) .ux-subscribe:not([hidden])) .ux-topbar .ux-subscribe { display: none; }
  body.ux-shell.nav3 .hm-page-header-action { display: flex; align-items: center; gap: var(--hm-space-3); }
  body.ux-shell.nav3 .hm-page-header { flex-wrap: wrap; } /* actions too wide for the title row drop under it, still at the right */
  body.ux-shell.nav3 .hm-page-header-text { flex: 1 1 auto; min-width: 0; }
  body.ux-shell.nav3 .hm-page-header-action { margin-left: auto; max-width: 100%; }
  body.ux-shell.nav3 #products-view .section-heading-actions { flex-wrap: nowrap; margin-left: auto; } /* the plan line, Claim, Add products and the icon stay one row */
  body.ux-shell.nav3 #products-view .page-header-row { margin-bottom: var(--hm-space-4); align-items: center; }
  body.ux-shell.nav3 #products-view .page-header-row .hm-page-header { margin-bottom: 0; }
  body.ux-shell.nav3 #products-view .page-header-row > .section-heading-actions { padding-top: 0; }
  body.ux-shell.nav3 .hm-page-header .ux-subscribe:not([hidden]), body.ux-shell.nav3 .section-heading-actions .ux-subscribe:not([hidden]) { display: inline-flex; }
  body.ux-shell.nav3 .hm-page-header { min-height: var(--hm-control-height); margin-bottom: var(--hm-space-4); align-items: center; }
}
@media print { body.ux-shell.nav3, body.ux-shell.nav3 .app-shell, body.ux-shell.nav3 .app-shell > main { height: auto; overflow: visible; display: block; } body.ux-shell.nav3 .ux-sidebar { display: none; } }

/* ── NAVIM W3-6 · phone items (rulings §22; cold walks #1/#4/final at 375) ─────────────────────────────────────────── */
@media (max-width: 760px) {
  /* The product page's five tabs on one row: the 24px column gap made History wrap alone (272px of tabs in a 311px
     column) — the least gap is 8px and the rest of the row is shared between them. */
  body.ux-shell .ux-subnav { column-gap: var(--hm-space-2); justify-content: space-between; }
  body.ux-shell .ux-subnav a { min-width: var(--hm-touch-target); justify-content: center; }
  /* Results' five tabs: every tab seen (two rows), never a strip clipped at "Intern…" behind a sideways scroll. */
  /* The breadcrumb keeps one line (Harvey 10-04): on a phone it is the page itself — the parents squeezed to "Wo… ›"
     said nothing and cut the page's own name; the back links and ☰ go up. */
  .ux-shell .ux-crumb li:not(.ux-crumb-here) { display: none; }
  body.ux-shell .ux-crumb li.ux-crumb-here::before { content: none; } /* the page is alone: no "›" before it (it was left dangling after the hidden parents; ui-test 10-26) */
  .ux-shell .ux-crumb li.ux-crumb-here { flex: 1 1 auto; }
  /* A card's text action (Not an issue, Cancel, Close…) wrapping under two buttons looked orphaned: on a phone the
     buttons share the row and the text action has a full-width, centred row of its own — on purpose. */
  .ux-shell .workcard.imp-card > .imp-actions { justify-self: stretch; } /* the card's grid starts items at their own width */
  .ux-shell .rs-card-actions > .btn, .ux-shell .workcard .imp-actions > .btn { flex: 1 1 auto; justify-content: center; }
  .ux-shell .rs-card-actions > .results-link:last-child, .ux-shell .workcard .imp-actions > .results-link:last-child { flex: 1 0 100%; justify-content: center; }
  /* The Find improvements panel: its title, product and question stayed fixed over the body (~⅓ of a 375 screen) and the
     context line was cut ("… vs Oct 9 · …"). On a phone the panel scrolls as one; only the title row with Close stays. */
  .investigation-panel { overflow-y: auto; }
  .investigation-panel > .agent-head { position: sticky; top: 0; z-index: 2; background: var(--hm-surface); padding: 12px 16px 10px; }
  .investigation-panel > .agent-product { margin: 0 16px 12px; }
  .investigation-panel > .investigation-body { flex: none; overflow: visible; min-height: auto; padding: 14px 16px; }
  .investigation-panel .agent-product-text small { white-space: normal; overflow: visible; }
}

/* F3A: Source pages › Machine readability — tokens only; buttons, badges and the dark theme come from the shared components. */
.rd-section .rd-check { margin: var(--hm-space-3) 0; }
.rd-card .rd-actions .btn, .rd-card .rd-actions .text-button { min-height: var(--hm-control-height); }
.rd-section .rd-check { padding: var(--hm-space-3); border: 1px solid var(--hm-primary-line); border-radius: var(--hm-radius-card); background: var(--hm-mint); color: var(--hm-ink); display: grid; gap: var(--hm-space-2); }
.rd-section a { color: var(--hm-primary); overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .rd-card .rd-actions .btn, .rd-card .rd-actions .text-button, .rd-section .rd-check .btn { min-height: var(--hm-touch-target); }
  .rd-section a { display: inline-flex; align-items: center; min-height: var(--hm-touch-target); }
}
.ev-item { display: grid; grid-template-columns: minmax(7em, 10em) minmax(0, 1fr); gap: var(--hm-space-3); padding: var(--hm-space-3); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); color: var(--hm-ink); }
.ev-actions .btn, .ev-actions .text-button { min-height: var(--hm-control-height); }
.ev-field input, .ev-field select, .ev-field textarea { width: 100%; min-height: var(--hm-control-height); box-sizing: border-box; }
.ev-block a { color: var(--hm-primary); }
@media (max-width: 760px) {
  .ev-item { grid-template-columns: minmax(0, 1fr); }
  .ev-actions .btn, .ev-actions .text-button, .ev-field input, .ev-field select, .ev-field textarea { min-height: var(--hm-touch-target); }
  .ev-block a { display: inline-flex; align-items: center; min-height: var(--hm-touch-target); }
}
.ux-shell .btn.secondary.danger-button, .btn.secondary.danger-button { color: var(--hm-danger); border-color: var(--hm-danger-line); } /* beats .ux-shell .btn.secondary at rest */
.ux-shell .btn.secondary.danger-button:hover:not(:disabled), .btn.secondary.danger-button:hover:not(:disabled) { background: var(--hm-danger-soft); color: var(--hm-danger); border-color: var(--hm-danger-line); }

/* ============================================================================
   2.7.4 · ui-test's visual walk — the controls every page shares, drawn once (select, radio / checkbox, disclosure). No wording, no sizes: the look only.
   ============================================================================ */
/* A select is the library's: the field's own border and radius, one chevron (the stroke the icons use), room for it. Written with a long selector so a page's own `background:` shorthand
   (a pill, a filter) cannot take the chevron away; those pages keep their own colour and shape. */
html body select:not([multiple]):not([size]) {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6670' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
  padding-right: 34px;
}
/* A radio or a checkbox is the brand colour, not the browser's blue. */
input[type="radio"], input[type="checkbox"] { accent-color: var(--hm-primary); }
/* A disclosure (details / summary) has a chevron, never the browser's triangle: closed → right, open → down. The menu-style summaries (a button that opens a menu), the Help scenario list and the
   report fold keep what they have. */
details:not(.ux-ws-menu, .report-meta, .ux-actrow-found, .help-scenario-list details) > summary:not(.cr-download-btn, .ux-ws-menu-btn) { list-style: none; cursor: pointer; }
details:not(.ux-ws-menu, .report-meta, .ux-actrow-found, .help-scenario-list details) > summary:not(.cr-download-btn, .ux-ws-menu-btn)::-webkit-details-marker { display: none; }
details:not(.ux-ws-menu, .report-meta, .ux-actrow-found, .help-scenario-list details) > summary:not(.cr-download-btn, .ux-ws-menu-btn)::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 9px 2px 3px;
  border-right: 1.75px solid currentColor;
  border-bottom: 1.75px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 150ms ease;
  vertical-align: middle;
  flex: none;
}
details[open]:not(.ux-ws-menu, .report-meta, .ux-actrow-found, .help-scenario-list details) > summary:not(.cr-download-btn, .ux-ws-menu-btn)::before { transform: rotate(45deg); }
/* the fix cards' two buttons: the icon and its words on one line, the icon on the words' centre */
.fix-ai-btn, .fix-manual-btn { display: inline-flex; align-items: center; gap: var(--hm-space-2); }
/* A round's page (AI answers › a round): the page's sections are cards on the canvas like every other page's, its table's headers keep whole words, and there is one way back (the link above), not
   a second button for it. */
.ux-shell .navim-page .obs-report > .obs-part { padding: var(--hm-space-5); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); background: var(--hm-surface); box-shadow: var(--hm-shadow-sm); }
.ux-shell .obs-report-table thead th { overflow-wrap: normal; word-break: normal; hyphens: manual; }
/* Help's navigation picture: the three columns the app has — the rail, column 2 and the page with its product tabs */
.help-mock-3col { display: grid; grid-template-columns: 112px 128px minmax(0, 1fr); gap: 0; border-radius: var(--hm-radius-control); overflow: hidden; background: var(--hm-neutral); min-width: 0; }
.help-mock-rail { background: var(--hm-surface); border-right: 1px solid var(--hm-line); padding: var(--hm-space-3) var(--hm-space-2); }
.help-mock-rail .help-mock-nav-group { display: grid; gap: var(--hm-space-1); }
.help-mock-rail .help-mock-nav-group > span { padding: 6px 8px; white-space: normal; }
.help-mock-col2 { display: grid; align-content: start; gap: 2px; background: var(--hm-surface); border-right: 1px solid var(--hm-line); padding: var(--hm-space-3) var(--hm-space-2); }
@media (max-width: 640px) { .help-mock-3col { grid-template-columns: 100px minmax(0, 1fr); } .help-mock-col2 { display: none; } .help-mock-rail { padding: var(--hm-space-3) var(--hm-space-1); } .help-mock-rail .help-mock-nav-group > span { padding: 6px 4px; } }
.help-mock-rail .help-mock-nav-group > span { white-space: normal; padding: 6px 6px; } /* the picture's menu names wrap at their spaces inside its narrow rail, never past it */


/* Walk fixes (ui-test): Information › Source pages and the Edit status card. A header never breaks mid-word, and an address
   breaks only where it must; on a phone a page is one block (address, then its check and its citations), not three crushed
   columns. "Edit status" has no heading of its own where it shows nothing under it (Source pages, JSON). */
.sp-table th { white-space: nowrap; }
.info-layout[data-info-category="sources"] .info-side [data-info-status-label] { display: none; }
@media (max-width: 620px) {
  .sp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sp-table, .sp-table tbody, .sp-table tr, .sp-table td { display: block; width: 100%; }
  .ux-shell .ux-ws-body .sp-table { overflow: visible; } /* a block table would clip the ring of the address at its edge */
  .sp-table tr[data-sp-main], .sp-table tr[data-sp-page] { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--hm-space-3); padding: var(--hm-space-3) 0 0; }
  .sp-table tr[data-sp-main] > td, .sp-table tr[data-sp-page] > td { border: 0; padding: 0; width: auto; }
  .sp-table tr[data-sp-main] > td:first-child, .sp-table tr[data-sp-page] > td:first-child { grid-column: 1 / -1; }
  .sp-table tr[data-sp-main] > td:nth-child(2)::before, .sp-table tr[data-sp-page] > td:nth-child(2)::before { content: "Last check: "; color: var(--hm-muted); }
  .sp-table tr[data-sp-main] > td:nth-child(4)::before, .sp-table tr[data-sp-page] > td:nth-child(4)::before { content: "Cited by AI: "; color: var(--hm-muted); }
  .sp-table .hm-row-detail > td { padding: 0 0 var(--hm-space-2); border-bottom: 1px solid var(--hm-line); }
  .sp-add input { flex: 1 1 100%; }
}

/* Walk fixes: Buyer answers. The 0–100 field keeps its own column (its label no longer sets the row's widths), and a row's remove
   button sits at the row's top right instead of alone on a line of its own. */
@media (min-width: 1101px) {
  .info-layout .pil-row[data-pil-row="usecase"][data-pil-labelled] { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.6fr) minmax(112px, 150px) auto; }
}
@media (max-width: 1100px) {
  .info-layout .pil-row[data-pil-row="usecase"][data-pil-labelled] { grid-template-columns: minmax(0, 1fr) auto; }
  .info-layout .pil-row[data-pil-row="usecase"][data-pil-labelled] > .pil-field { grid-column: 1; max-width: none; }
  .info-layout .pil-row[data-pil-row="usecase"][data-pil-labelled] > .pil-row-remove { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; }
}

/* Walk fixes: every card on the product's Overview starts its words the same distance from its top edge (24px) — the two cards
   that open with a heading no longer add the heading's own 22px above it. */
.ux-shell .ov-card > .ux-intents:first-child > h3:first-child,
.ux-shell .ov-card > h3.ux-ws-fixhdr:first-child { margin-top: 0; }
.ux-shell .ux-plan-empty-state { border-left-color: var(--hm-line); }

/* Walk fixes: a product's header on a phone — the status pill follows the title (below it when the title takes the line), and the
   buttons share one row under the "Checked" line instead of two uneven ones. */
@media (max-width: 760px) {
  /* The title, its (i) and a status pill run on as one line of text that wraps: the (i) follows the title's LAST word instead of sitting at the edge of the box a wrapped title fills (ui-test 10-26, /find-customers at 375). */
  .ux-shell .hm-page-title-row { display: block; text-wrap: pretty; } /* pretty: the last line keeps company — the (i) is never alone on a line of its own */
  .ux-shell .hm-page-title-row > h1 { display: inline; }
  .ux-shell .hm-page-title-row > :not(h1) { display: inline-flex; vertical-align: middle; }
  .ux-shell .hm-page-title-row > * { margin-right: var(--hm-space-2); } /* after, not before: an item that wraps starts flush with the title */
  .ux-shell .ux-workspace .hm-page-title-row { flex-wrap: wrap; }
  .ux-shell .ux-workspace .ux-ws-head-actions { flex-wrap: wrap; }
  .ux-shell .ux-workspace .ux-ws-head-actions > .ai-header-meta { flex: 1 0 100%; }
  .ux-shell .ux-workspace .ux-ws-head-actions > .btn { flex: 1 1 auto; text-align: center; justify-content: center; }
}

/* Walk fixes: Publishing. The summary shares its width between the cells it has (a missing "Last updated" leaves no hole), and a
   crawler's status is a pill that hugs its words, not a box as wide as its column. */
.aio-publish-summary { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* Permissions: the share form is the shared FormRowGroup (email, permission, Share product on one baseline); its status is the line under it. */
.permission-form > .permission-status { margin: 0; }
.permission-form > .permission-status:empty { display: none; }

/* Walk fixes: a search's page. "Why searches stop" is reference: a closed card under the rounds (its rows get the card's full width). */
.fc-why > details > summary { color: var(--hm-ink); }

/* Walk fixes: a card or section a link lands on is where focus is, not a heavy box round everything in it (its heading and its edges touched the ring). */
:is(div, section, article, aside, form, ul, ol, h1, h2, h3, h4)[tabindex="-1"]:focus-visible { outline: none; }

/* Walk fixes: a check box or a radio is the browser's own control — the 42px field box (its inset shadow and white fill) is not drawn round it. */
body input:is([type="checkbox"], [type="radio"]) { box-shadow: none; background-color: transparent; }

/* Walk fixes: on a phone the Workbench's number cards are two by two, each with its icon, not four tall cards without one. */
@media (max-width: 760px) {
  .ux-shell .wb-layout .wb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hm-space-2); }
  .ux-shell .wb-layout .wb-stat { padding: 12px; gap: var(--hm-space-2); }
  .ux-shell .wb-layout .wb-stat-icon { display: grid; width: 32px; height: 32px; }
}

/* Walk fixes: on a phone a missing field's "Add manually" sits on its own row's line, as a link — four boxed buttons under four short lines (and a fifth for the card) read as a wall of the same button. */
@media (max-width: 760px) {
  .ux-shell .fix-diff .diff-row.ba-row[data-origin="missing"] code { flex: 1 1 8rem; }
  .ux-shell .fix-diff .diff-add-manual { border: 0; background: none; padding: 0; }
}

/* Walk fixes: Referrals is as wide as the other account pages (880px is a reading width for text, and it is a card of stats and a link). */
#account-view .workspace:has(> #referral-panel:not([hidden])) { max-width: none; }

/* Walk fixes: Referrals — two programs, each under its own heading; the terms are read in full. */
.referral-terms { margin: 0 0 var(--hm-space-3); overflow-wrap: anywhere; }

/* Walk fixes: a fraction in a round's table ("1 of 1") never breaks inside itself; the small line under it wraps to the width the fraction gives it. */
.ux-shell .obs-report-table td { white-space: nowrap; }
.ux-shell .obs-report-table td .obs-sub { white-space: normal; width: 0; min-width: 100%; }
@media (max-width: 760px) { .ux-shell .obs-report-table td { white-space: normal; } .ux-shell .obs-report-table td .obs-sub { width: auto; } }

/* Walk fixes (P53 P3): a use case's three labels share a line however many lines "Why it fits" takes; a phone's Source page says what its second line is. */
@media (min-width: 1101px) {
  .info-layout .pil-row[data-pil-row="usecase"][data-pil-labelled] { grid-template-rows: auto auto; align-items: start; }
  .info-layout .pil-row[data-pil-row="usecase"] > .pil-field { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 4px; align-content: start; }
  .info-layout .pil-row[data-pil-row="usecase"] > .pil-row-remove { grid-row: 2; }
}

/* Walk fixes (P53 P3): Specifications and Source pages start their words where the other cards do (24px), not 22px lower under the heading's own margin. */
.ux-shell .info-main :is(.facts-section, .sp-section) > h3:first-child { margin-top: 0; }
@media (max-width: 760px) {
  .ux-shell .wb-stat .wb-stat-icon { width: 32px; height: 32px; }
  .ux-shell .wb-stat .wb-stat-label { overflow-wrap: normal; }
  .ai-kpi { gap: var(--hm-space-2); padding: 12px; }
  .ai-kpi-icon { width: 32px; height: 32px; }
}

/* Walk fixes (P56 round): five number cards in a row are closer — their icons and padding give the figure and its "of 100" the width to stay on one line. */
.ai-kpis:has(> .ai-kpi:nth-child(5)) .ai-kpi { gap: 10px; padding: 16px; }
.ai-kpis:has(> .ai-kpi:nth-child(5)) .ai-kpi-icon { width: 36px; height: 36px; }

/* Walk fixes (P56 round): on a phone the Edit status card is as wide as the page whichever category is open; a use case's three inputs keep their own heights and its first one room for its value; the new score box clears the cards above it. */
@media (max-width: 760px) { .info-layout .info-side { align-self: stretch; } }
@media (min-width: 1101px) {
  .info-layout .pil-row[data-pil-row="usecase"][data-pil-labelled] { grid-template-columns: minmax(130px, 1fr) minmax(0, 2fr) minmax(112px, 150px) auto; }
  .info-layout .pil-row[data-pil-row="usecase"] > .pil-field > :is(input, textarea) { align-self: start; }
  .info-layout .pil-row[data-pil-row="usecase"] > .pil-field:nth-of-type(1) { grid-column: 1; }
  .info-layout .pil-row[data-pil-row="usecase"] > .pil-field:nth-of-type(2) { grid-column: 2; }
  .info-layout .pil-row[data-pil-row="usecase"] > .pil-field:nth-of-type(3) { grid-column: 3; }
  .info-layout .pil-row[data-pil-row="usecase"] > .pil-row-remove { grid-column: 4; }
}
.score-guardrails { margin-top: var(--hm-space-3); }
/* Evidence: "See which" is the line's own control, not a word in its sentence. */
.evidence-waiting { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hm-space-1) var(--hm-space-3); }
.timeline-heading-row { gap: var(--hm-space-3); }

/* Walk fixes (P56 round): the report's six breakdown tiles are 3 + 3 (or 2 + 2 + 2 on a phone), never 4 + 2; the "!" sits clear of the ring's edge. */
.ux-tech .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .ux-tech .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.score-ring-holder > .score-penalty { top: -9px; left: -9px; } /* the "!" sits 4px clear of the ring's band (92px ring, 22px flag: it was -2px, touching it) */
.timeline-count { margin-top: var(--hm-space-1); }

/* Walk fixes (P56 round): Evidence's two tabs look like every page's tabs (underline, not a filled pill in a grey bar), and its five counts are five cards, not a grey table with a seam. */
.ux-layout-page .evidence-overview-metrics { gap: var(--hm-space-3); overflow: visible; border: 0; background: transparent; }
.ux-layout-page .evidence-overview-metrics > div { background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); padding: var(--hm-space-3) var(--hm-space-4); }
.ux-layout-page .evidence-library .inline-subsection-heading { flex-wrap: nowrap; }
.ux-layout-page .evidence-library .inline-subsection-heading > div { flex: 1 1 0; }
.ux-layout-page .evidence-library .inline-subsection-heading > .evidence-count { flex: none; order: 2; }
@media (max-width: 480px) { .ux-layout-page .evidence-library .inline-subsection-heading { flex-wrap: wrap; } .ux-layout-page .evidence-library .inline-subsection-heading > div { flex: 1 1 100%; } }

/* Walk fixes (P56 round): on a phone Engine diagnostics' fields are one column, one width. */
@media (max-width: 760px) {
  .funnel-controls { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .funnel-control { min-width: 0; }
  .funnel-control :is(select, input) { width: 100%; max-width: 100%; box-sizing: border-box; }
}

/* coordinate 10-25: on a phone the top line is the page itself (Harvey 10-04), so a product's tab pages say whose they are under their title; from 761px the breadcrumb carries the name. */
.ux-page-product { display: none; color: var(--hm-muted); }
@media (max-width: 760px) { .ux-page-product { display: inline; } }

/* Walk fixes: every draft card puts its "Changes:" line under the "Draft · requested by…" line, not sometimes beside it and sometimes under it; "Open work" starts its first part right under its heading. */
.ux-shell .workcard.dc-card p.dc-eyebrow > span:last-child { flex: 1 0 100%; text-align: left; }
.sc-wb { align-items: start; } /* a bucket is as tall as its cards, not as tall as the one beside it */
.fc-bonus { margin-top: var(--hm-space-3); }

/* Walk fixes: on a phone a card's state pill ("Draft", "1 snapshot") stays beside its title instead of dropping under the description. */
@media (max-width: 760px) {
  .ux-shell .ux-ws-body .aio-publish-header, .ux-shell .ux-ws-body .timeline-heading-row { display: flex; align-items: flex-start; gap: var(--hm-space-3); }
  .ux-shell .ux-ws-body .aio-publish-header > div, .ux-shell .ux-ws-body .timeline-heading-row > div { flex: 1 1 0; min-width: 0; }
  .ux-shell .ux-ws-body .aio-publish-header > .aio-status, .ux-shell .ux-ws-body .timeline-heading-row > .timeline-count { flex: none; margin-top: 0; }
}
.settings-form > .hm-action-bar { margin-top: var(--hm-space-2); }
/* a strip of tabs with more off its right edge fades there */
.hm-page-tabs[data-hm-more] { -webkit-mask-image: linear-gradient(90deg, var(--hm-ink) calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, var(--hm-ink) calc(100% - 36px), transparent); }
.hm-page-tabs[data-hm-less] { -webkit-mask-image: linear-gradient(90deg, transparent, var(--hm-ink) 36px); mask-image: linear-gradient(90deg, transparent, var(--hm-ink) 36px); }
.hm-page-tabs[data-hm-less][data-hm-more] { -webkit-mask-image: linear-gradient(90deg, transparent, var(--hm-ink) 36px, var(--hm-ink) calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, var(--hm-ink) 36px, var(--hm-ink) calc(100% - 36px), transparent); }
.hm-table-wrap[data-hm-more] { -webkit-mask-image: linear-gradient(90deg, var(--hm-ink) calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, var(--hm-ink) calc(100% - 36px), transparent); }
.hm-table-wrap[data-hm-less] { -webkit-mask-image: linear-gradient(90deg, transparent, var(--hm-ink) 36px); mask-image: linear-gradient(90deg, transparent, var(--hm-ink) 36px); }
.hm-table-wrap[data-hm-less][data-hm-more] { -webkit-mask-image: linear-gradient(90deg, transparent, var(--hm-ink) 36px, var(--hm-ink) calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, var(--hm-ink) 36px, var(--hm-ink) calc(100% - 36px), transparent); }

/* component: disabled — begin
   Library: the ONE disabled state (coordinate 10-26). A control that cannot be used right now — a button, a link-button, one marked aria-disabled, a field,
   a fieldset, the upload label of a busy product — reads the same everywhere: dimmed, not-allowed, on its own fill (never a different fill per page).
   A control that is RUNNING is not disabled: .is-loading / aria-busy keeps the Button component's busy look (cursor wait). scripts/ui-lint.mjs fails
   on any other rule that styles :disabled, [disabled], [aria-disabled] or [data-busy-disabled]; hover rules may say :hover:not(:disabled). */
:is(button, a, [role="button"]):is(:disabled, [aria-disabled="true"], [data-busy-disabled="1"]):not(.is-loading, [aria-busy="true"]) { opacity: .55; cursor: not-allowed; }
:is(a, .btn)[aria-disabled="true"] { pointer-events: none; }
:is(input, select, textarea, fieldset):is(:disabled, [data-busy-disabled="1"]) { opacity: .55; cursor: not-allowed; }
.cpg-upload:is(.disabled, :has(input[data-busy-disabled="1"])) { opacity: .55; cursor: not-allowed; }
.cpg-upload.disabled { pointer-events: none; }
/* component: disabled — end */

/* Walk fixes (P64 round): number cards put their figure at one height whether or not a label wraps (the icon and the words start at the top), and a phone's product number cards are two to a row, an odd last one the whole row — not five stacked cards 530px tall. */
.ai-kpis > .ai-kpi { align-items: flex-start; }
.ai-kpis > .ai-kpi > .ai-kpi-icon { margin-top: 2px; }
/* Narrow translated lead cards need room for complete status words. */
@media (max-width: 400px) {
  html:not([lang="en"]) .sc-page[data-sc-page="leads"] .ai-kpis { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .ux-shell .ux-workspace .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-kpis > .ai-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; } /* three cards are two and one that fills the row, never two and an empty half (CRM leads) */
}

/* Walk fixes (P64 round): stacked Find customers cards sit one gap apart — the column's gap already spaces them, so a card's own bottom margin was a second one (33px on a phone, 16px elsewhere). */
.fc-side > .fc-card, .fc-side > * > .fc-card:last-child { margin-bottom: 0; }

/* Plan & billing: Stripe's prices couldn't be read — one notice with its Retry on the right, where the buy buttons would have been; the Refresh subscription status button sits with the plan summary it refreshes. */
.ux-shell .ux-notice.retry-notice { display: flex; align-items: center; justify-content: space-between; gap: var(--hm-space-3); flex-wrap: wrap; }
.ux-notice.retry-notice > p { margin: 0; }
.addon-pack-unavailable, .upgrade-unavailable { display: inline-block; }
.svc-form-grid { grid-auto-rows: auto; row-gap: 0; }
.svc-form-grid > .hm-form-row { grid-row: span 3; grid-template-rows: subgrid; margin: var(--hm-space-3) 0; }


/* The Workbench's notes (a failed check, products still being checked …) sit in a card of their own, not as loose text under the list. */
.ux-shell .ux-workbench > .ux-note { margin: var(--hm-space-4) 0 0; padding: var(--hm-space-3) var(--hm-space-5); background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius-card); }
@media (max-width: 760px) { .ux-shell .ux-workbench > .ux-note { padding-inline: var(--hm-space-4); } } /* the phone's card inset, as the cards above */

/* Improvements' header: the credit note sits to the LEFT of the button on one row, as on AI answers (it was stacked under it, which made the header 68px tall and pushed the title down). */
@media (min-width: 761px) {
  .ux-shell .hm-page-header-action .imp-head-action { display: flex; flex-direction: row-reverse; align-items: center; justify-content: flex-end; gap: var(--hm-space-3); }
}

/* 2.7.3 (Harvey 10-26: AI answers' "Uses 1 credit · 9 of 10 left this month" sat off the centre of the button and icon beside it): the ONE rule for an action row — a page header's actions, a
   workspace header's actions, a section heading's actions, a form's action bar — its children centre on one line and carry no vertical margin of their own (a note's paragraph margin moved
   its centre 4px off). measure.js · actionRowCentred holds every such row to 1px. */
.ux-shell :is(.hm-page-header-action, .ux-ws-head-actions, .section-heading-actions, .hm-action-bar) { align-items: center; }
.ux-shell :is(.hm-page-header-action, .ux-ws-head-actions, .section-heading-actions, .hm-action-bar) > * { margin-block: 0; }

/* 2.7.3 (ui-test 10-26, 375): the Settings sections are the same wrapped, left-aligned tabs as a product's pages — not a 3-column grid of centred labels (it left "Engine diagnostics" alone on a
   fourth row and two labels on two lines, ~190px before any content). Every section stays visible: no sideways scroll (GPT-6 §04). */
@media (max-width: 560px) {
  body.ux-shell #settings-view #settings-section-nav .hm-section-nav, body.ux-shell #observability-view #observability-section-nav .hm-section-nav {
    display: flex; flex-direction: row; flex-wrap: wrap; overflow: visible; gap: 0 var(--hm-space-2); padding-bottom: 0;
  }
  body.ux-shell #settings-view #settings-section-nav .hm-section-nav a, body.ux-shell #observability-view #observability-section-nav .hm-section-nav a { flex: none; padding: 0 var(--hm-space-3); text-align: left; }
}

/* 2.7.3 (ui-test 10-26): the Latest answers card's key — the marks' words under the card title, in the card's own width (the shared legend is a bar on its own page) */
.wb-recent .wb-recent-key { padding: 0 0 var(--hm-space-3); border-bottom: 0; gap: var(--hm-space-2); }

/* Settings › Workspace has ONE Save for the page (Harvey 10-26): its bar sits under both panels, in the content column */
.settings-page-save { margin-top: var(--hm-space-3); }

/* The priority fixes as steps (Harvey 10-26; app-optimize.js syncFixSteps): the active fix is marked, the locked ones are visible but quiet (their controls are disabled — the component's own look — and the card is inert), a done one has its ✓ */
.fix[data-fix-step="active"] { border-color: var(--hm-primary); box-shadow: 0 0 0 3px var(--hm-focus-ring); }
.fix[data-fix-step="locked"] strong { color: var(--hm-muted); }

/* Team & access: the members table (member, role, Sales access, joined, actions) needs ~700px. With the three-column menu and Settings' own nav the content column is ~880px at 1440, so the invite form beside it left ~560px: the joined date was cut and the actions (Change Sales access…) sat out of sight (measure contentClipped). Beside each other only from 1700px; below that the form follows the lists. */
@media (min-width: 1280px) and (max-width: 1699px) {
  body.ux-shell.nav3 #settings-view .team-layout { grid-template-columns: minmax(0, 1fr); }
}

/* A row's actions never clip: where the cell is narrow (Team's "Manage" + "Change Sales access") the buttons wrap onto their own lines, right-aligned, each whole (measure contentClipped / focusRingClipped) */
.hm-table .hm-row-actions { white-space: normal; }
.hm-table .hm-row-actions > :is(button, a) { white-space: nowrap; }

/* The shell's logo is the small mark at every width — the phone drawer too (Harvey 10-26: it still showed the old wordmark). BrandLogo (components.js) draws it; this beats every wordmark-sized rule above. */
.ux-shell .ux-sidebar .ux-logo img.ux-brand-mark { position: static; flex: none; display: block; width: 32px; height: 32px; max-width: none; object-fit: contain; transform: none; left: auto; top: auto; }
/* The Add product form's phone rule gives every label and button the full width: the label row and its (i) keep their own size. */
.submit-panel .hm-form-labelrow > label { width: auto; flex: 0 1 auto; } /* the (i) right after the label, not at the field's far edge: the panel's 420px first-label basis does not apply here */
.submit-panel .hm-form-labelrow .hm-info-btn { width: 22px; }

/* Bottom room for every page (Codex N2: a page's last buttons were hit-tested under the footer). Where the footer is fixed (phone) the page's own scroll keeps
   the last control above it; scrolling a control into view (focus, a keyboard move, a click) stops short of the footer too. Where the footer ends the content
   (desktop) the block before it keeps a gap, whatever element it is. */
html { scroll-padding-bottom: 72px; }
body.ux-shell .app-shell > main { scroll-padding-bottom: 72px; }
body.ux-shell.nav3 .app-shell > main > :not(.ux-footer):has(+ .ux-footer) { margin-bottom: var(--hm-space-6); }
/* Where the top bar is sticky (phone), a control scrolled into view (focus, a keyboard move, a click) stops below it, not under it (/settings/plan "Engine diagnostics" at 375: the bar covered it). */
@media (max-width: 900px) { html { scroll-padding-top: 76px; } }
/* The plain shell (UX shell off): the footer is fixed over the window and the legacy views scroll inside .view, so its end-of-content space and scroll padding are the .view's — the same room the UX shell gives (Codex N2, legacy). */
body.has-app-shell:not(.ux-shell) .view { padding-bottom: 72px; scroll-padding-bottom: 72px; }
body.has-app-shell:not(.ux-shell) main { scroll-padding-bottom: 72px; }
/* The plain shell mounts the UX layout page straight under main, which is overflow:hidden at the window's height: nothing scrolls and the last 40px sit under the fixed footer. main scrolls, and the page keeps the room (verified by the legacy-footer probe at 1440 and 375). */
body.has-app-shell:not(.ux-shell) main { overflow-y: auto; }
body.has-app-shell:not(.ux-shell) main > .ux-layout-page { padding-bottom: 72px; }
