/* /app and /ops shells — Main Revenue purple/black design system (owner 2026-10-03), layered on mr.css.
   Tokens mirror revenue/site/assets/site.css (--bg #07060B · --surface #0E0C16 · --elevated #15121F · --violet #7C5CFF ·
   --violet-btn #7452FF · --violet-2 #A78BFA · --text #F4F2FA · --text-2/3). mr.css token names (--ink, --accent, --strong …)
   are remapped here so every existing view inherits the palette. Dark only. AA: --text-3 on --bg 5.4:1, --violet-btn + white 4.9:1.
   Reduced motion: every animation and transition off. */

@font-face { font-family: "Geist"; src: url("/fonts/geist/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("/fonts/familjen-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Fallback"; src: local("Arial"), local("Liberation Sans"), local("Helvetica"); size-adjust: 102%; ascent-override: 98.5%; descent-override: 29%; line-gap-override: 0%; }

/* tokens — beat mr.css's light :root, its prefers-color-scheme block and [data-theme] */
:root, :root:not([data-theme="light"]), :root[data-theme] {
  /* design system v1: every value comes from tokens.css (revenue/site/assets/tokens.css, loaded before this file); the
     names below are the older mr.css / app.css names, kept as aliases so every existing view takes the new palette */
  --surface: var(--surface-1); --elevated: var(--surface-2);
  --line: var(--border); --line-2: var(--border-strong); --line-strong: var(--border-strong); --line-violet: rgba(124, 92, 255, .4);
  --violet: var(--accent); --violet-btn: var(--accent-btn); --violet-btn-hover: var(--accent-btn-hover); --violet-2: var(--accent-hover); --lav: var(--accent-text); --violet-bg: var(--accent-subtle);
  --text: var(--text-1);
  --ink: var(--text-1); --ink-2: var(--text-2); --ink-3: var(--text-3);
  --accent-ink: #FFFFFF; --accent-soft: var(--accent-subtle);
  --strong: var(--evidence-strong); --strong-soft: var(--evidence-strong-bg);
  --probable: var(--evidence-probable); --probable-soft: var(--evidence-probable-bg);
  --ambiguous: var(--evidence-needs-input); --ambiguous-soft: var(--evidence-needs-input-bg);
  --ok: var(--positive); --ok-soft: var(--positive-bg);
  --focus: var(--accent);
  --radius: var(--radius-md); --r-card: var(--radius-lg); --r-sm: var(--radius-sm); --r-pill: var(--radius-badge); --shadow: none;
  --ease: var(--ease-std);
  --font: var(--font-sans);
  --mono: var(--font-mono);
  color-scheme: dark;
}

html { background: var(--bg); }
body { background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--font); font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::selection { background: rgba(124, 92, 255, .45); color: #fff; }
a { color: var(--lav); }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { color: var(--text); font-weight: 600; letter-spacing: -0.02em; }
strong { color: var(--text); font-weight: 600; }
.skip:focus { background: var(--elevated); color: var(--text); border-radius: var(--r-sm); outline: 2px solid var(--violet-2); }

/* header + the Main AI lockup */
.mr-header { position: sticky; top: 0; z-index: 30; background: rgba(7, 6, 11, .78); -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--line); }
.mr-header .wrap { min-height: 64px; padding-top: 10px; padding-bottom: 10px; row-gap: 8px; }
.wrap { max-width: 1240px; }
.mr-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; white-space: nowrap; font-weight: 600; }
.mr-brand > span { color: var(--text-3); font-weight: 500; }
.mr-logo { width: 34px; height: 34px; aspect-ratio: 1; border-radius: 8px; flex: none; background: #0B0A10; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 6px 18px -8px rgba(124, 92, 255, .55); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.mr-brand:hover .mr-logo { transform: translateY(-1px) rotate(-2deg); box-shadow: 0 0 0 1px rgba(167, 139, 250, .35), 0 10px 26px -8px rgba(124, 92, 255, .8); }
.mr-brand .mr-word { font-family: "Familjen Grotesk", var(--font); font-weight: 700; font-size: 21px; letter-spacing: -0.035em; color: var(--text); }
.mr-brand .mr-product { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); font: 500 14px/1 var(--font); letter-spacing: 0; }
.mr-brand .mr-product::before { content: ""; width: 1px; height: 18px; background: var(--line-2); }
@media (max-width: 400px) { .mr-logo { width: 30px; height: 30px; } .mr-brand .mr-word { font-size: 19px; } .mr-brand { gap: 9px; } }

.mr-nav a { color: var(--text-2); border-radius: var(--r-pill); padding: 7px 12px; transition: color .2s var(--ease), background-color .2s var(--ease); }
.mr-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.mr-nav a[aria-current="page"] { color: var(--text); background: var(--violet-bg); box-shadow: inset 0 0 0 1px var(--line-violet); }

/* buttons: pills, one filled violet */
.btn { border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02); color: var(--text); font: 500 15px/1 var(--font); letter-spacing: -0.005em; padding: 10px 20px;
  transition: transform .35s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease), box-shadow .35s var(--ease), color .2s var(--ease); }
.btn:hover { border-color: var(--line-violet); background: rgba(124, 92, 255, .08); color: #fff; box-shadow: none; transform: none; }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary, .btn-primary:hover { color: #fff; }
.btn-primary { background: var(--violet-btn); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 30px -12px rgba(124, 92, 255, .7); }
.btn-primary:hover { background: var(--violet-btn-hover); border-color: transparent; filter: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), inset 0 0 18px rgba(196, 181, 253, .3), 0 14px 40px -12px rgba(124, 92, 255, .85); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn.is-loading { cursor: progress; opacity: .85; }
.btn.is-loading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: mrSpin .7s linear infinite; }
@keyframes mrSpin { to { transform: rotate(360deg); } }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: none; }
.bucket, .finding, .table-wrap { background: var(--surface); border-color: var(--line); border-radius: var(--r-card); }
.bucket.conflict { border-top-color: var(--violet-2); }
th { background: var(--elevated); color: var(--text-3); font-weight: 600; }
td { color: var(--text-2); }
td strong, td a { color: inherit; }
.row-link:hover td { background: rgba(124, 92, 255, .06); }
.chip { font-weight: 500; }
.chip.neutral { color: var(--text-2); background: rgba(255, 255, 255, .04); border-color: var(--line-2); }
.evidence-row { font-family: var(--mono); background: var(--elevated); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text); }
.lineage li { background: var(--elevated); }

/* forms */
label { color: var(--text); font-weight: 500; font-size: 14px; }
input, select, textarea { font: 15px/1.4 var(--font); color: var(--text); background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); border-radius: 10px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, .24); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet-2); background: rgba(124, 92, 255, .06); box-shadow: 0 0 0 3px rgba(124, 92, 255, .28); }
input:disabled, select:disabled, textarea:disabled { opacity: .6; cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--violet); }
input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 1000px #15121F inset; caret-color: var(--text); }
select option { background: var(--elevated); color: var(--text); }
.hint { color: var(--text-3); }
.notice { border: 1px solid var(--line-violet); border-left-width: 1px; background: var(--violet-bg); border-radius: var(--r-sm); color: var(--text); }
.notice.warn { border-color: rgba(245, 181, 71, .35); background: var(--probable-soft); }
.notice.warn strong { color: var(--probable); }
.error-text { color: var(--strong); }

/* App-only additions */
.app-main { padding-top: 28px; padding-bottom: 64px; min-height: 60vh; }
.app-main:focus { outline: none; }   /* focused programmatically on view change (screen readers announce it); no visual frame */
.app-main > p.muted:only-child { padding: 48px 0; text-align: center; }
.app-nav a { font-size: 14px; }
.org-switch { width: auto; min-height: 36px; padding: 4px 10px; font-size: 14px; border-radius: var(--r-pill); }
/* batch 2 (G7): the organization picker is a NATIVE select — the custom chevron (a background image) was drawn over the
   name (its 10px right padding left no room) and tiled when the focus rule's shorthand reset the repeat; and the
   appearance:none control did not take option clicks reliably. The browser's own control draws one arrow and handles
   mouse and keyboard the same way. !important: the custom-select rules further down this file would otherwise win. */
.org-switch, .org-switch:focus, .org-switch:hover { -webkit-appearance: menulist !important; appearance: auto !important; background-image: none !important; padding-right: 10px; background-color: var(--elevated); color-scheme: dark; cursor: pointer; }
.badge { display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 999px; background: var(--violet-btn); color: #fff; font-size: 12px; font-weight: 600; text-align: center; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 12px 0 16px; }
.toolbar label { margin: 0 0 4px; font-size: 13px; }
.toolbar > * { min-width: 0; max-width: 100%; }
.toolbar select, .toolbar input { width: auto; min-width: 150px; max-width: 100%; }   /* a long option (e.g. /ops capacity mode) must not push a phone page sideways */
.toolbar input[type="checkbox"], .toolbar input[type="radio"] { min-width: 0; }   /* the 150 px floor turned the 18 px checkbox into an empty bar (owner batch 4) */
.toolbar label:has(> input[type="checkbox"]) { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; }
.stack > * + * { margin-top: 16px; }
.row-link { cursor: pointer; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.empty { text-align: center; padding: 40px 16px; border: 1px dashed var(--line-2); border-radius: var(--r-card); color: var(--text-3); background: var(--surface); }
.empty h3 { color: var(--text); }
.err { position: relative; border: 1px solid rgba(242, 85, 90, .35); background: var(--strong-soft); padding: 12px 14px 12px 40px; border-radius: var(--r-sm); color: var(--text); font-size: 14px; line-height: 1.45; }
.err::before { content: "!"; position: absolute; left: 12px; top: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--strong); color: #1A0709; font: 700 12px/18px var(--font); text-align: center; }
.err p:last-child { margin-bottom: 0; }
.draft-box { white-space: pre-wrap; font: 14px/1.55 var(--font); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; font: 500 14px var(--font); color: var(--text-2); cursor: pointer; min-height: 44px; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--violet-2); }
.progress { height: 8px; background: var(--elevated); border-radius: 4px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--violet-2)); }
.mapping-grid td select { min-width: 180px; }

/* ── sign-in and invitation screens ─────────────────────────────
   One centred card on the page background: hairline grid fading out from the top + one violet glow. */
body:has(.auth-shell) { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; isolation: isolate; }
body:has(.auth-shell)::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(167, 139, 250, .065) 1px, transparent 1px), linear-gradient(90deg, rgba(167, 139, 250, .065) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center -1px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%); }
body:has(.auth-shell)::after { content: ""; position: fixed; z-index: -1; pointer-events: none; left: 50%; top: 18%; width: min(760px, 120vw); aspect-ratio: 1.6; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(124, 92, 255, .28), rgba(124, 92, 255, .08) 55%, transparent); filter: blur(10px); }
body:has(.auth-shell) .mr-header { background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; position: static; }
body:has(.auth-shell) .app-main { flex: 1; display: flex; align-items: center; justify-content: center; padding-top: 16px; padding-bottom: 56px; }

.auth-shell { width: 100%; max-width: 440px; margin: 0 auto; }
.auth-card, .auth-shell .auth-card { position: relative; max-width: 440px; margin: 0 auto; padding: 36px 32px 28px; border-radius: 16px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(21, 18, 31, .92), rgba(14, 12, 22, .92)); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 30px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(124, 92, 255, .06); animation: authIn .6s var(--ease) both; }
/* violet hairline across the card's top edge */
.auth-shell .auth-card::before { content: ""; position: absolute; top: -1px; left: 24px; right: 24px; height: 1px; background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .7), transparent); }
@keyframes authIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) { .auth-card, .auth-shell .auth-card { padding: 28px 20px 22px; border-radius: 14px; } }

.auth-head { margin-bottom: 22px; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--violet-2); }
.auth-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--violet-2); box-shadow: 0 0 10px rgba(167, 139, 250, .8); }
.auth-card h1 { font-size: 28px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 600; margin: 0 0 8px; }
.auth-sub { font-size: 15px; line-height: 1.5; color: var(--text-2); margin: 0; }
.auth-sub strong { color: var(--text); }
.auth-card form label { margin: 18px 0 8px; }
.auth-card form label:first-child { margin-top: 0; }
.auth-card input { min-height: 48px; padding: 12px 14px; font-size: 16px; }   /* 16px: no iOS zoom on focus */
.auth-card .hint { margin: 8px 0 0; }
.auth-actions { margin: 24px 0 0; max-width: none; }
.auth-actions .btn { min-height: 48px; font-size: 16px; }
.auth-card [role="status"]:not(:empty) { margin-top: 14px; font-size: 14px; color: var(--text-2); }
.auth-card [role="status"] .err { margin: 0; }
.auth-foot { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--text-3); max-width: none; }
.auth-foot.auth-other { margin-top: 10px; padding-top: 0; border-top: 0; color: var(--text-2); }
.auth-card [data-reset-sent] { padding: 12px 14px; margin-top: 14px; font-size: 14px; line-height: 1.5; }
.auth-card > .err { margin-top: 4px; }

.auth-check { display: flex; gap: 8px; align-items: center; margin: 14px 0 2px; font-size: 14px; color: var(--text-2); }

/* ── app header: Main AI lockup only; tabs + actions; phone = one-line scrollable tab strip ── */
.app-nav { gap: 4px; }
.app-tabs, .app-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.app-actions { gap: 8px; margin-left: 8px; }
.app-actions .btn { margin-left: 0; }
@media (max-width: 767px) {
  .mr-header .wrap { padding-top: 8px; padding-bottom: 0; row-gap: 4px; min-height: 0; }
  .app-nav:not([hidden]) { display: contents; }
  .mr-header .mr-brand { order: 0; }
  .app-actions { order: 1; margin-left: auto; flex-wrap: nowrap; gap: 6px; }
  .app-actions .btn { min-height: 36px; padding: 6px 12px; }
  .app-actions .chip { display: none; }
  .app-actions .org-switch { max-width: 120px; }
  .app-tabs { order: 2; flex: 1 0 100%; flex-wrap: nowrap; gap: 2px; margin: 0 -20px; padding: 0 20px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding: 0 20px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .app-tabs::-webkit-scrollbar { display: none; }
  .app-tabs.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
  .app-tabs.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px); mask-image: linear-gradient(90deg, transparent, #000 40px); }
  .app-tabs.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
  .app-tabs a, .app-nav .app-tabs a:not(.btn) { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 44px; padding: 0 12px; border-radius: 0; white-space: nowrap; scroll-snap-align: start;
    background: none; box-shadow: none; border-bottom: 2px solid transparent; }
  .app-tabs a:hover { background: none; color: var(--text); }
  .app-tabs a:active { opacity: .75; }
  .app-tabs a[aria-current="page"] { background: none; box-shadow: none; color: var(--text); border-bottom-color: var(--violet-2); }
  .app-tabs a:focus-visible { outline-offset: -2px; }
}
/* ── shared helpers + v4 spacing tokens (8pt grid) ───────────────────────── */
:root { --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --raised: #1B1727; --r-lg: 16px;
  --green: #3DD68C; --amber: #F5B547; --red: #FF8A8E; --ease-std: cubic-bezier(.2, 0, 0, 1); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ── custom controls: no default browser checkbox, radio, select or file button is visible ── */
input[type="checkbox"], input[type="radio"] { -webkit-appearance: none; appearance: none; flex: none; display: inline-grid; place-content: center; vertical-align: -3px;
  width: 18px !important; height: 18px !important; min-height: 18px !important; margin: 0 8px 0 0; padding: 0; border: 1.5px solid var(--line-2); background: rgba(255, 255, 255, .03); cursor: pointer;
  transition: border-color .16s var(--ease-std), background-color .16s var(--ease-std), box-shadow .16s var(--ease-std), transform .09s var(--ease-std); }
input[type="checkbox"] { border-radius: 5px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before { content: ""; width: 10px; height: 10px; transform: scale(0); transition: transform .16s var(--ease);
  background: #fff; clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); }
input[type="radio"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .16s var(--ease); }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--violet-2); background: rgba(124, 92, 255, .1); }
input[type="checkbox"]:active, input[type="radio"]:active { transform: scale(.92); }
input[type="checkbox"]:checked, input[type="radio"]:checked { background: var(--violet-btn); border-color: var(--violet-btn); }
input[type="checkbox"]:checked::before, input[type="radio"]:checked::before { transform: scale(1); }
input[type="checkbox"]:focus, input[type="radio"]:focus { box-shadow: none; background: rgba(255, 255, 255, .03); }
input[type="checkbox"]:checked:focus, input[type="radio"]:checked:focus { background: var(--violet-btn); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 2px; }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .45; cursor: not-allowed; }
select { -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 36px; background-repeat: no-repeat; background-position: right 12px center; background-size: 14px 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23A8A3B8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
/* the focus rule above uses the `background` shorthand, which resets repeat / position / size: restore them */
select:focus { background-repeat: no-repeat; background-position: right 12px center; background-size: 14px 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23C4B5FD' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
select::-ms-expand { display: none; }
input[type="file"] { padding: 6px; cursor: pointer; color: var(--text-2); font-size: 14px; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 16px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--text); font: 500 14px/1 var(--font); cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease); }
input[type="file"]:hover::file-selector-button { border-color: var(--line-violet); background: rgba(124, 92, 255, .1); }
input[type="file"]:active::file-selector-button { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 3px; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-quiet:hover { color: var(--text); background: rgba(255, 255, 255, .05); border-color: transparent; }
.btn svg { flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; min-height: 40px; }

/* ── sign-in additions: forgot password, back to the site ── */
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 18px 0 8px; }
.auth-label-row label { margin: 0 !important; }
.auth-link, .auth-foot a, .auth-back a { color: var(--lav); text-decoration: none; border-radius: 4px; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: color .16s var(--ease-std), background-size .28s var(--ease); }
.auth-link { font-size: 13px; font-weight: 500; }
.auth-link:hover, .auth-foot a:hover, .auth-back a:hover { color: #fff; background-size: 100% 1px; }
.auth-link:active, .auth-back a:active { opacity: .8; }
.auth-back { margin: 24px 0 0; text-align: center; font-size: 14px; }
.auth-back a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 4px; color: var(--text-2); }
.auth-copy { margin: 0 0 16px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.copy-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; padding: 6px 6px 6px 14px; border: 1px dashed var(--line-violet); border-radius: 12px; background: var(--elevated); }
.copy-value { flex: 1; min-width: 0; font: 500 14px/1.4 var(--mono); color: var(--text); white-space: nowrap; -webkit-user-select: all; user-select: all; cursor: text; }
.copy-btn { flex: none; min-height: 36px; }
.copy-btn.is-done { border-color: rgba(61, 214, 140, .45); color: var(--green); background: rgba(61, 214, 140, .08); }
.copy-status { min-height: 20px; margin: 8px 0 0; font-size: 13px; color: var(--green); }
.copy-status:empty { min-height: 0; margin: 0; }
.auth-actions-2 { display: grid; gap: 8px; }
.auth-actions-2 .btn { min-height: 48px; }

/* ── first-run dashboard (#/home) ────────────────────────────────────────── */
.fr { display: grid; gap: var(--s-4); padding: 0; border-bottom: 0; }
@media (min-width: 768px) { .fr { gap: var(--s-5); } }
.fr-head { padding: var(--s-2) 0 var(--s-2); }
.fr-eyebrow, .fr-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 var(--s-2); font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--violet-2); }
.fr-kicker { color: var(--text-3); margin-bottom: var(--s-1); }
.fr-head h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 var(--s-2); }
.fr-lede { margin: 0; font-size: 17px; color: var(--text-2); }
.fr-grid { display: grid; gap: var(--s-4); }
@media (min-width: 900px) { .fr-grid { grid-template-columns: 1fr 1fr; gap: var(--s-5); } }
.fr-panel { position: relative; display: block; min-width: 0; padding: var(--s-5); border-radius: var(--r-lg); border: 1px solid var(--line); color: inherit; text-decoration: none;
  background: linear-gradient(180deg, rgba(21, 18, 31, .9), rgba(14, 12, 22, .9)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 24px 60px -36px rgba(0, 0, 0, .9); }
@media (max-width: 480px) { .fr-panel { padding: var(--s-4) var(--s-4) var(--s-5); border-radius: 14px; } }
.fr-panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin: 0 0 var(--s-4); }
.fr-panel h2 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -0.01em; }
.fr-panel h3 { margin: var(--s-4) 0 var(--s-2); font-size: 17px; line-height: 1.35; letter-spacing: -0.01em; }
.fr-sub { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.fr-tag { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--text-2); font: 500 12px/1.4 var(--mono); letter-spacing: .02em; text-transform: none; }
.fr-tag svg { width: 12px; height: 12px; }
.fr-tag.is-ok { color: var(--green); border-color: rgba(61, 214, 140, .35); background: rgba(61, 214, 140, .08); }
.fr-tag.is-warn { color: var(--amber); border-color: rgba(245, 181, 71, .35); background: rgba(245, 181, 71, .08); }
.fr-tag.is-live { color: var(--lav); border-color: var(--line-violet); background: var(--violet-bg); }
.fr-tag.is-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--violet-2); box-shadow: 0 0 8px rgba(167, 139, 250, .9); }
.fr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin: var(--s-5) 0 0; }
.fr-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 14px; font-weight: 500; color: var(--lav); text-decoration: none; border-radius: 6px; }
.fr-link svg { transition: transform .2s var(--ease); }
.fr-link:hover { color: #fff; }
.fr-link:hover svg { transform: translateX(3px); }
.fr-link:active { opacity: .8; }

/* status tracker: 7 steps; horizontal from 768 px, vertical below */
.trk-wrap { position: relative; }
.trk { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.trk-step { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 40px; color: var(--text-3); font-size: 14px; }
.trk-node { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--surface); color: #fff; }
.trk-node i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.trk-node svg { width: 14px; height: 14px; }
.trk-step.is-done { color: var(--text-2); }
.trk-step.is-done .trk-node { background: var(--violet-btn); border-color: var(--violet-btn); }
.trk-step.is-current { color: var(--text); font-weight: 600; }
.trk-step.is-current .trk-node { border-color: var(--violet-2); background: #1A1430; box-shadow: 0 0 0 4px rgba(124, 92, 255, .18), 0 0 18px rgba(124, 92, 255, .55); }
.trk-step.is-current .trk-node i { width: 8px; height: 8px; background: var(--violet-2); }
.trk-rail { position: absolute; left: 11px; top: 20px; bottom: 20px; width: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.trk-fill { position: absolute; inset: 0; transform-origin: 50% 0; transform: scaleY(var(--p, 0)); background: linear-gradient(180deg, var(--violet), var(--violet-2)); }
@media (min-width: 768px) {
  .trk { grid-template-columns: repeat(7, 1fr); }
  .trk-step { flex-direction: column; align-items: center; gap: var(--s-2); text-align: center; font-size: 13px; line-height: 1.3; min-height: 0; padding: 0 2px; }
  .trk-rail { left: calc(100% / 14); right: calc(100% / 14); top: 11px; bottom: auto; width: auto; height: 2px; }
  .trk-fill { transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--violet), var(--violet-2)); }
}
.trk-now { margin: var(--s-5) 0 0; padding: var(--s-4) var(--s-4) var(--s-4); border-radius: 12px; border: 1px solid var(--line-violet); background: linear-gradient(180deg, rgba(124, 92, 255, .1), rgba(124, 92, 255, .03)); }
.trk-now h3 { margin: 0 0 var(--s-1); font-size: 17px; }
.trk-now p:not(.fr-kicker) { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.trk-now .fr-actions { margin-top: var(--s-4); }

/* "What we'll need" checklist (custom glyphs, not checkboxes: the list is read-only) */
.need { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: 0; }
.need-item { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; padding: var(--s-2) 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--text); }
.need-item:first-child { border-top: 0; }
.need-box { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); color: transparent; }
.need-box svg { width: 12px; height: 12px; }
.need-item.is-got .need-box { background: rgba(61, 214, 140, .14); border-color: rgba(61, 214, 140, .55); color: var(--green); }
.need-label { flex: 1; min-width: 0; }
.need-tag { flex: none; font: 500 12px/1.4 var(--mono); color: var(--text-3); }
.need-item.is-got .need-tag { color: var(--green); }
.need-opt .need-item { color: var(--text-2); }
.next-list { list-style: none; margin: var(--s-5) 0 0; padding: var(--s-4) 0 0; border-top: 1px solid var(--line); display: grid; gap: var(--s-3); counter-reset: nx; }
.next-list li { counter-increment: nx; position: relative; padding-left: 36px; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.next-list li::before { content: counter(nx); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-violet); background: var(--violet-bg); color: var(--lav); font: 600 12px/22px var(--mono); text-align: center; }
.need-sub { margin: var(--s-4) 0 0; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }

/* secure upload */
.fr-upload h3 { margin-top: var(--s-4); }
.drop { display: grid; justify-items: center; gap: var(--s-2); padding: var(--s-6) var(--s-4); border-radius: 14px; border: 1.5px dashed var(--line-violet); background: rgba(124, 92, 255, .05); color: var(--text); text-align: center; text-decoration: none;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease); }
.drop:hover { border-color: var(--violet-2); background: rgba(124, 92, 255, .1); color: var(--text); transform: translateY(-1px); }
.drop:active { transform: scale(.99); }
.drop-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--violet-bg); color: var(--lav); box-shadow: inset 0 0 0 1px var(--line-violet); }
.drop-t { font-weight: 600; font-size: 16px; }
.drop-s { font-size: 13px; color: var(--text-3); }
.meter { height: 6px; margin: var(--s-4) 0 var(--s-2); border-radius: 3px; background: var(--line); overflow: hidden; }
.meter > span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--violet), var(--violet-2)); }

/* illustrated product-UI placeholders */
.art { position: relative; display: block; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--elevated), var(--surface)); overflow: hidden; }
.art i { display: block; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .08); }
.art .w45 { width: 45%; } .art .w50 { width: 50%; } .art .w60 { width: 60%; } .art .w70 { width: 70%; } .art .w80 { width: 80%; }
.art-upload { height: 132px; }
.art-file { position: absolute; top: 24px; width: 84px; height: 100px; padding: 16px 12px; display: grid; align-content: start; gap: 8px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--raised); box-shadow: 0 12px 30px -16px rgba(0, 0, 0, .9); }
.art-file.f1 { left: calc(50% - 110px); transform: rotate(-8deg); opacity: .6; }
.art-file.f2 { left: calc(50% + 26px); transform: rotate(7deg); opacity: .6; }
.art-file.f3 { left: calc(50% - 42px); top: 16px; border-color: var(--line-violet); }
.art-file b { font: 600 11px/1 var(--mono); color: var(--lav); letter-spacing: .06em; }
.art-file i:nth-child(odd) { width: 70%; }
.art-lock { position: absolute; left: calc(50% + 20px); top: 76px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--violet-btn); color: #fff; box-shadow: 0 0 0 4px var(--surface), 0 8px 20px -6px rgba(124, 92, 255, .8); }
.fr-upload.is-open .art-upload, .fr-upload.is-open .art-lock { display: none; }
.fr-upload.is-done .art-lock { background: #1B3A2C; color: var(--green); }
.fr-upload.is-done .art-lock svg { display: none; }
.fr-upload.is-done .art-lock::before { content: ""; width: 12px; height: 7px; border: 2px solid currentColor; border-top: 0; border-right: 0; transform: translateY(-2px) rotate(-45deg); }
.art-report { padding: 0 0 12px; }
.art-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.art-bar i { width: 8px; height: 8px; border-radius: 50%; }
.art-bar em { margin-left: auto; font: 600 11px/1 var(--mono); font-style: normal; letter-spacing: .08em; color: var(--text-3); }
.art-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 0; }
.art-row i { flex: 1; max-width: 60%; }
.art-row b { flex: none; padding: 3px 8px; border-radius: var(--r-pill); font: 500 11px/1.2 var(--font); }
.st-x { color: var(--red); background: rgba(242, 85, 90, .1); }
.st-p { color: var(--green); background: rgba(61, 214, 140, .08); }
.st-c { color: var(--amber); background: rgba(245, 181, 71, .08); }
.art-ask { display: grid; gap: 10px; padding: 14px; }
.art-q { justify-self: end; width: 55%; padding: 10px 12px; border-radius: 12px 12px 4px 12px; background: var(--violet-bg); box-shadow: inset 0 0 0 1px var(--line-violet); }
.art-q i { width: 100% !important; background: rgba(196, 181, 253, .3); }
.art-a { display: grid; gap: 6px; width: 78%; padding: 12px; border-radius: 12px 12px 12px 4px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line); }
.fr-sample .art, .fr-ask .art { margin: 0 0 var(--s-4); }
.fr-sample { transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.fr-sample:hover { color: inherit; border-color: var(--line-violet); transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 30px 70px -36px rgba(124, 92, 255, .45); }
.fr-sample:active { transform: translateY(0); }
.fr-sample:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 3px; border-radius: var(--r-lg); }
.fr-arrow { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--lav); transition: transform .25s var(--ease), border-color .25s var(--ease); }
.fr-sample:hover .fr-arrow { transform: translateX(3px); border-color: var(--line-violet); }
.ask-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-4) 0 0; }
.ask-chip { min-height: 36px; padding: 6px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02); color: var(--text-2); font: 500 13px/1.3 var(--font); cursor: pointer; text-align: left;
  transition: color .16s var(--ease-std), border-color .16s var(--ease-std), background-color .16s var(--ease-std), transform .09s var(--ease-std); }
.ask-chip:hover { color: var(--text); border-color: var(--line-violet); background: var(--violet-bg); }
.ask-chip:active { transform: scale(.97); }
.ask-chip:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 2px; }
.ask-chip:disabled { opacity: .5; cursor: not-allowed; }
.ask-out:empty { display: none; }
.ask-out { margin: var(--s-3) 0 0; color: var(--text-2); }
.fr-empty, .fr-error { display: grid; gap: var(--s-5); align-items: center; }
@media (min-width: 768px) { .fr-empty, .fr-error { grid-template-columns: minmax(220px, 300px) 1fr; } }
.fr-error { border-color: rgba(245, 181, 71, .25); }
.fr-empty h2, .fr-error h2 { margin: 0 0 var(--s-2); font-size: 20px; }

/* loading: skeleton shimmer (transform only), then a soft stagger in */
.sk { position: relative; display: block; overflow: hidden; border-radius: 6px; background: rgba(255, 255, 255, .055); }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .1), transparent); animation: skShimmer 1.4s var(--ease-std) infinite; }
@keyframes skShimmer { to { transform: translateX(100%); } }
.sk-eyebrow { width: 180px; height: 12px; margin-bottom: 16px; }
.sk-h1 { width: min(360px, 80%); height: 36px; margin-bottom: 12px; border-radius: 8px; }
.sk-title { width: 180px; height: 16px; margin-bottom: 24px; }
.sk-line { width: 100%; height: 10px; margin-top: 16px; }
.sk-line.w60 { width: 60%; }
.sk-block { height: 120px; border-radius: 12px; }
.sk-track { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.sk-node { width: 24px; height: 24px; border-radius: 50%; }
.fr [data-panel] { opacity: 0; transform: translateY(12px); }
.fr.is-in [data-panel] { opacity: 1; transform: none; transition: opacity .45s var(--ease) var(--d, 0ms), transform .45s var(--ease) var(--d, 0ms); }
.fr.is-static [data-panel] { transition: none; }
.fr:not(.is-static) .trk-fill { transform: scaleY(0); }
.fr.is-in:not(.is-static) .trk-fill { transform: scaleY(var(--p, 0)); transition: transform .9s var(--ease-io, cubic-bezier(.65, 0, .35, 1)) .25s; }
.fr:not(.is-static) .meter > span { transform: scaleX(0); }
.fr.is-in .meter > span { transform: scaleX(var(--p, 0)); transition: transform .8s var(--ease) .35s; }
@media (min-width: 768px) {
  .fr:not(.is-static) .trk-fill { transform: scaleX(0); }
  .fr.is-in:not(.is-static) .trk-fill { transform: scaleX(var(--p, 0)); }
}
.fr.is-in:not(.is-static) .trk-step .trk-node { animation: trkNode .32s var(--ease) both; animation-delay: calc(.25s + var(--i, 0) * 110ms); }
.fr.is-in:not(.is-static) .trk-step.is-next .trk-node { animation: none; }
.trk-step.is-current .trk-node::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 1.5px solid var(--violet-2); opacity: 0; pointer-events: none; }
.fr.is-in:not(.is-static) .trk-step.is-current .trk-node::after { animation: trkRing 1.4s var(--ease) 1 both; animation-delay: calc(.6s + var(--i, 0) * 110ms); }
@keyframes trkNode { from { transform: scale(.6); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes trkRing { from { transform: scale(1); opacity: .9; } to { transform: scale(2.2); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fr [data-panel] { opacity: 1 !important; transform: none !important; }
  .fr .trk-fill { transform: scaleY(var(--p, 0)) !important; }
  @media (min-width: 768px) { .fr .trk-fill { transform: scaleX(var(--p, 0)) !important; } }
  .fr .meter > span { transform: scaleX(var(--p, 0)) !important; }
  .sk::after { display: none; }
  .fr-sample:hover, .drop:hover { transform: none; }
  .btn.is-loading::before { border-top-color: rgba(255, 255, 255, .35); }
}


/* re-auth dialog (password) */
.reauth-dialog { border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface, #13101d); color: var(--text); padding: 22px 24px; max-width: 380px; width: calc(100% - 32px); }
.reauth-dialog::backdrop { background: rgba(0, 0, 0, .6); }
/* staff review: in-page edit form (replaces window.prompt) */
.rv-edit { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.rv-edit textarea, .rv-edit input { width: 100%; }
.rv-edit select { width: auto; min-width: 16rem; max-width: 100%; }
.field-err { color: var(--strong); font-size: 13px; margin: 4px 0 0; }
[aria-invalid="true"] { border-color: var(--strong); }
/* batch 2 (B): the one workspace status line (Home, Assessment, Overview, Data read the same server status) */
.status-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 4px 0 16px; }
.status-line .small { color: var(--text-2); }
/* batch 2 (F): label each status chip on a finding (Evidence / Main review / Your decision) */
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip-lab { font-size: 12px; color: var(--text-3); margin-left: 6px; }
.chip-row .chip-lab:first-child { margin-left: 0; }
/* in-page dialogs + inline notices (owner 2026-10-04: no native browser pop-ups) — ask() / note() in app.js and ops.js */
.mr-dialog { border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--text); padding: 22px 24px; width: calc(100% - 32px); max-width: 460px; max-height: calc(100dvh - 32px); overflow: auto; }
.mr-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.mr-dialog h2 { font-size: 18px; margin: 0; }
.mr-dialog-text p { margin: 0 0 8px; font-size: 15px; color: var(--text-2); }
.mr-dialog textarea, .mr-dialog input, .mr-dialog select { width: 100%; }
.mr-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.mr-phrase { font-family: var(--mono); color: var(--text); background: var(--elevated); padding: 1px 6px; border-radius: 4px; user-select: all; }
.btn-danger, .btn-danger:hover { background: #C8323A; border-color: transparent; color: #fff; }
.btn-danger:hover { background: #B02A31; }
.inline-note { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 8px 0; padding: 10px 12px; font-size: 14px; }
.err.inline-note { padding-left: 40px; }
.note-x { flex: none; border: 0; background: transparent; color: var(--text-2); font: 500 18px/1 var(--font); min-width: 28px; min-height: 28px; border-radius: 6px; cursor: pointer; }
.note-x:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
/* Settings thresholds (batch 4): plain label above a short input with its unit */
.th-grid { display: grid; gap: 14px; margin: 8px 0 12px; }
.th-row label { display: block; margin: 0 0 4px; font-size: 14px; }
.th-in { display: flex; align-items: center; gap: 6px; }
.th-in input { max-width: 140px; }
.th-u { color: var(--ink-2); font-size: 14px; }
/* Projects page timeline (batch 4) */
.proj-tl summary { cursor: pointer; font-size: 15px; font-weight: 600; }
.tl { list-style: none; margin: 10px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line-2); }
.tl li { position: relative; display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 4px 0; font-size: 14px; }
.tl li::before { content: ''; position: absolute; left: -20px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.tl .tl-payapp::before { background: var(--accent); } .tl .tl-payment::before { background: var(--ok); }
.tl-d { min-width: 7.5em; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tl-t { flex: 1 1 14em; min-width: 0; overflow-wrap: anywhere; }
/* batch 4: choose projects when the files cover more than were purchased */
.pick-proj { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; margin: 8px 0 12px; min-width: 0; }
.pick-proj legend { padding: 0 4px; font-weight: 600; }
.pick-row { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; }

/* item 11: /app footer — Main Revenue's own terms and privacy notice */
.app-foot{display:flex;flex-wrap:wrap;gap:8px 20px;padding-top:32px;padding-bottom:32px;font-size:14px}
.app-foot a{color:var(--ink-2)}
.app-foot a:hover{color:var(--ink)}

/* item 15: the sign-in form's forgot link sits after the password (tab order email → password → forgot) */
.auth-forgot{margin:6px 0 0;text-align:right;font-size:14px}

/* owner 2026-10-05 (QA item 4): at phone width the organization picker gets its own full-width row under the brand (it
   was capped at 120px and cut off); Ask Main and Sign out stay top-right; the tabs follow. Report and finding tables
   become cards (mr.css .stack-sm); their actions wrap instead of scrolling off-screen. */
@media (max-width: 640px) {
  .app-actions { display: contents; }
  .app-actions [data-assistant-open], .app-actions [data-logout] { order: 1; }
  .app-actions [data-assistant-open]:not([hidden]) { margin-left: auto; }
  .app-actions [data-assistant-open][hidden] + [data-logout] { margin-left: auto; }
  .app-actions .org-switch { order: 2; flex: 1 0 100%; max-width: 100%; width: 100%; }
  .app-tabs { order: 3; }
  .table-wrap.stack-sm { background: none; border: 0; overflow: visible; }
  .stack-sm td.row-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
  .stack-sm td.pick-cell { position: absolute; top: 8px; right: 12px; left: auto; width: auto; padding: 0; z-index: 1; }
  .stack-sm tr.row-link td[data-label="Finding"] { padding-right: 44px; }
  .stack-sm tr { position: relative; }
  .stack-sm tr.row-link { cursor: pointer; }
}

/* owner 2026-10-05 (QA item 13): the draft's "Greet" field takes the row's free width (it was 150px) */
.toolbar .tb-grow { flex: 1 1 260px; }
.toolbar .tb-grow input { width: 100%; }
@media (max-width: 430px) {
  .app-actions .btn { padding: 5px 10px; font-size: 13.5px; min-height: 34px; }
  .mr-header .wrap { column-gap: 8px; }
}

/* ── clarity batch (owner 2026-10-06) — styled from tokens.css (MAIN_REVENUE_DESIGN_SYSTEM.md) ─────────────────── */
/* the date the whole page is measured from */
.as-of { margin: 4px 0 16px; font-size: var(--fs-body); color: var(--text-2); }
.as-of strong { color: var(--text-1); font-variant-numeric: tabular-nums; }
/* Overview: Act on these first */
.act-first { margin: var(--space-5) 0 var(--space-6); padding: var(--space-5); background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.act-first h2 { font-size: var(--fs-h3); margin: 0 0 var(--space-4); }
.af-list { list-style: none; margin: 0; padding: 0; counter-reset: af; }
.af-item { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) 0; border-top: 1px solid var(--border); counter-increment: af; }
.af-item:first-child { border-top: 0; padding-top: 0; }
.af-item::before { content: counter(af); flex: none; width: 28px; height: 28px; border-radius: var(--radius-badge); display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-2); font: 600 13px/1 var(--font-sans); }
.af-what { flex: 1; min-width: 0; }
.af-head { display: block; color: var(--text-1); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; padding: 4px 0; }
.af-head:hover { color: var(--text-1); text-decoration: underline; }
.af-meta { margin: 2px 0 0; font-size: var(--fs-small); color: var(--text-3); }
.af-amount { color: var(--text-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.af-btn { flex: none; white-space: nowrap; }
.rest-h { font-size: var(--fs-h3); margin: var(--space-6) 0 var(--space-3); }
@media (max-width: 640px) {
  .af-item { flex-wrap: wrap; align-items: flex-start; }
  .af-item::before { margin-top: 2px; }
  .af-what { flex-basis: calc(100% - 44px); }
  .af-btn { margin-left: 44px; min-height: var(--control-h-touch); white-space: normal; text-align: left; }
}
/* month-2 badges */
.mb-row { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
[data-month-badge] { font-size: 12px; }
/* finding page: main column + decision card */
.fd { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-6); align-items: start; }
.fd-main { min-width: 0; }
.fd-side { position: sticky; top: 88px; }
.fd-decision h2 { font-size: var(--fs-h3); }
@media (max-width: 960px) { .fd { grid-template-columns: minmax(0, 1fr); } .fd-side { position: static; } }
.fd-head { margin: var(--space-3) 0 var(--space-5); }
.fd-amount { margin: 0; font: 600 var(--fs-kpi)/1.1 var(--font-sans); color: var(--text-1); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.fd-headline { font-size: var(--fs-h2); line-height: 1.25; margin: var(--space-2) 0; overflow-wrap: anywhere; max-width: 40ch; }
@media (max-width: 640px) { .fd-headline { font-size: 22px; } }
.fd-meta { margin: 0 0 var(--space-3); color: var(--text-2); font-size: var(--fs-body); }
.fd-block, .act-first { border: 0; }
.fd-block { margin: var(--space-6) 0 0; padding: 0; max-width: var(--measure); }
.fd-block[data-evidence] { max-width: none; }
.fd-block:focus { outline: none; }
.fd-block h2, .fd-known h2 { font-size: var(--fs-h3); margin: 0 0 var(--space-2); }
.fd-more { margin: var(--space-5) 0; }
.fd-more summary, .cmp-row summary { cursor: pointer; color: var(--accent-text); min-height: 44px; display: flex; align-items: center; }
/* the evidence comparison */
.cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-3); }
.cmp-side { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); min-width: 0; }
.cmp-says { margin: 0 0 4px; font-size: var(--fs-small); font-weight: 600; color: var(--text-2); }
.cmp-text { margin: 0; color: var(--text-1); font-size: var(--fs-body); line-height: 1.5; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.cmp-mark { background: var(--warning-bg); color: var(--warning); border-radius: 4px; padding: 0 3px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--warning-border); }
.cmp-src { margin: var(--space-2) 0 0; font-size: var(--fs-small); color: var(--text-3); overflow-wrap: anywhere; }
.cmp-src .mono { font-family: var(--font-mono); word-break: break-all; }
.cmp-diff { margin: var(--space-3) 0 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-1); overflow-wrap: anywhere; }
.cmp-diff-l { font-size: var(--fs-small); color: var(--text-3); font-weight: 600; margin-right: 6px; }
.kv-row { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 4px 12px; margin: var(--space-2) 0 0; font-size: var(--fs-small); }
.kv-row dt { color: var(--text-3); overflow-wrap: anywhere; }
.kv-row dd { margin: 0; color: var(--text-1); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.kv-row .cell-flag { color: var(--warning); font-weight: 600; }
/* plain words: tap / hover definitions */
.term { all: unset; position: relative; display: inline; cursor: help; border-bottom: 1px dotted var(--text-3); color: inherit; }
.term:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.term-tip { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; width: max-content; max-width: min(280px, 80vw); padding: 10px 12px; background: var(--surface-2); color: var(--text-1); border: 1px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); font: 400 13px/1.45 var(--font-sans); white-space: normal; }
.term:hover .term-tip, .term:focus-visible .term-tip, .term[aria-expanded="true"] .term-tip { display: block; }
[data-conf-meaning] { margin-right: 6px; }

/* Controller R2 (owner 2026-10-12): action queue, CO-to-cash tracker, outcomes, retainage watch — one layout. Totals are
   separate cards (never one combined figure); dollars right-aligned; stalled/stale rows marked; phones stack (.stack-sm). */
.ctl-head { margin-bottom: 8px; }
.ctl-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 12px 0 4px; }
.ctl-total { padding: 14px 16px; }
.ctl-total p { margin: 0; }
.ctl-amt { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; margin: 4px 0 !important; }
.ctl-filters { margin: 12px 0; }
.ctl-filters select { min-width: 160px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.ctl-stalled td { background: var(--ambiguous-soft); }
.co-stages { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.co-st { display: flex; flex-direction: column; min-width: 84px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13px; line-height: 1.25; }
.co-st .small { opacity: .8; }
.co-st.verified { border-color: var(--ok); background: var(--ok-soft); }
.co-st.customer_confirmed { border-color: var(--probable); background: var(--probable-soft); }
.co-st.unverified { color: var(--ink-3); border-style: dashed; }
.co-st.is-now { outline: 2px solid var(--accent); outline-offset: 1px; }
.ctl-check { list-style: none; margin: 0 0 4px; padding: 0; }
.ctl-check li { margin: 2px 0; }
.fd-block[data-confirm-part] { margin-bottom: 0; }
@media (max-width: 640px) {
  .ctl-totals { grid-template-columns: 1fr 1fr; }
  .ctl-amt { font-size: 20px; text-align: left; }
  .ctl-filters select { min-width: 0; width: 100%; }
  .co-st { min-width: 0; flex: 1 1 30%; }
}

/* Run 3: WIP schedule — ten money columns; compact so over/underbilling stay on screen at 1440 */
.table-wrap .wip-table th, .table-wrap .wip-table td { padding-inline: 8px; font-size: 13px; }
.table-wrap .wip-table th { white-space: normal; vertical-align: bottom; line-height: 1.25; }
.wip-table td:first-child { min-width: 180px; max-width: 230px; }
.wip-table .wip-total td { border-top: 2px solid var(--line, currentColor); }
.partner-code { font-family: var(--mono, ui-monospace, monospace); font-size: 20px; letter-spacing: .06em; margin: 0; }
/* Assessment reports (QA 2026-10-20): up to six actions sat on one line in the last cell, so the table scrolled sideways and the
   PDF button was squeezed at the right edge; they wrap inside a bounded cell instead (phones keep the card layout above) */
[data-reports-table] { container-type: inline-size; }
[data-reports-table] table { width: 100%; }
[data-reports-table] td.row-actions { width: 34%; min-width: 220px; }
[data-reports-table] .row-acts { display: flex; flex-wrap: wrap; gap: 6px; }
[data-reports-table] .row-acts .btn { white-space: nowrap; }
@media (max-width: 767px) { [data-reports-table] td.row-actions { width: auto; min-width: 0; } }
/* beside the sidebar (768–1100 px) the eight columns need ~990 px: there each report is a row of labelled fields with its
   actions on their own line underneath, inside the same box */
@container (max-width: 960px) {
  [data-reports-table] thead { position: absolute; left: -9999px; }
  [data-reports-table] table, [data-reports-table] tbody { display: block; width: 100%; }
  [data-reports-table] tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px 12px; padding: 12px; border-top: 1px solid var(--line); }
  [data-reports-table] tr:first-child { border-top: 0; }
  [data-reports-table] td { display: block; border: 0; padding: 2px 0; text-align: left; white-space: normal; }
  [data-reports-table] td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin-bottom: 2px; }
  [data-reports-table] td.row-actions { grid-column: 1 / -1; width: auto; min-width: 0; padding-top: 8px; }
}

/* owner 2026-11-16: the locked card a self-serve trial meets on a locked feature (app.js lockedCard) */
.locked-card { border: 1px solid var(--line-violet); background: var(--violet-bg); border-radius: var(--r-sm); color: var(--text); padding: 14px 16px; margin: 0 0 12px; }
.locked-card p { margin: 0 0 10px; }
.locked-card p:last-child { margin-bottom: 0; }
/* owner 2026-11-16 (plans): the workspace plan banner (assessment delivered, payment overdue, read-only) above every screen */
.plan-banner { padding: 10px 14px; margin-top: 12px; margin-bottom: 0; }
.plan-banner[hidden] { display: none; }
.inline-note.locked-note { position: relative; padding: 0; border: 0; background: none; }
.inline-note.locked-note .locked-card { margin: 8px 0 0; padding-right: 40px; }
