/* SKAN.AI design system: FlowPilot layout and components, Skan step-type colours, glyphs and app chips.
   No CDN, no build step. Every colour is a token on :root so the dark theme (prefers-color-scheme) only swaps tokens.

   Shell:      .app > .sidebar (.brand, .navlabel, .nav, .sidefoot) + .main (.topbar, .content, .footer)
   Page head:  .pagehead > div > .eyebrow + h1 + p, and a right-hand slot
   Layout:     .grid .stats | .twocol | .twopane | .threecol, .stack
   Surfaces:   .card (.card.pad-sm), .sectionhead, .stat (.stathead .staticon .statvalue .statfoot), .kvgrid > .kvcard,
               .action, .row (list row card), .testrow, .callout(.tone-*), .notice(.tone-*), .empty, .details
   Controls:   .btn (.secondary .ghost .danger .sm .block), .input / .select / .textarea, .toolbar, .dropzone, .filechip,
               .checkrow, .tabbar (> a | button, .active)
   Data:       .tablewrap > table, .badge(.tone-blue|green|amber|red|purple|grey), .progress, .ticon, .appchip, .applogo,
               .monogram, .chart, .legend, .code, .mono, .dot
   Process:    .flowsteps .node .nodeicon .nodebody .connector, .branch-card .branch-paths .branch-path(.yes|.no) */

[hidden] { display: none !important; }

/* Inter (SIL Open Font License), the face of vikat.ai, served from here: no CDN. */
@font-face { font-family: "Inter"; src: url("fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --navy: #061236; --lime: #b5ec5e; --brand-ink: #ffffff; --brand-eyebrow: #9aa8bf; --brand-tagline: #c9d6ea;
  --bg: #f6f5f1; --surface: #ffffff; --surface-2: #f9f8f5; --surface-3: #f2f1ec; --hover: #fbfaf7;
  /* --muted and --faint carry small text (10-12px): in both themes both stay at or above 4.5:1 (WCAG AA) on --surface,
     --bg, --surface-2, --surface-3 and --grey-bg; --faint stays the lighter of the two. --link is the text colour of links
     and link-like buttons (4.5:1 on those surfaces and on --accent-soft); --accent stays for focus rings, borders, fills */
  --ink: #061236; --ink-strong: #040c24; --ink-2: #2b3a5c; --muted: #4a5878; --faint: #56637e;
  --line: #dee3eb; --line-soft: #eceef2; --line-strong: #a9b4c6;
  --primary: #201579; --primary-hover: #170f5c; --primary-ink: #ffffff;
  --accent: #04679a; --accent-soft: #e1f0f7; --accent-ink: #04557f; --icon: #0579af; --focus: #cde8f4; --link: #04679a;
  --crumb: #56637e; --pill: #eceef2; --track: #e6e9ef; --input-line: #d5dce7; --input-ink: #1e2d4f; --drop-line: #a9b4c6; --drop-bg: #fafaf7;
  --code-bg: #040c24; --code-ink: #dce6f5; --shadow: 0 1px 2px rgba(6, 18, 54, .05), 0 2px 8px rgba(6, 18, 54, .04); --shadow-lg: 0 10px 32px rgba(6, 18, 54, .14);
  --grey-bg: #edf1f6; --grey-fg: #596a81; --green-bg: #e0f3e7; --green-fg: #24734b; --amber-bg: #fff0d4; --amber-fg: #936100;
  --blue-bg: #e2ecfb; --blue-fg: #315c9b; --purple-bg: #efe7fb; --purple-fg: #7048a7; --red-bg: #fde8e7; --red-fg: #a43b36;
  --notice-bg: #e1f4e8; --notice-fg: #185b3b;
  /* destructive buttons: white text on --danger, at least 4.5:1 in both themes */
  --danger: #a43b36; --danger-hover: #8f322e;
  --diamond: #f2b51b; --yes-bg: #edf9f1; --yes-line: #b7e3c5; --yes-top: #61ad7d; --no-bg: #fff1ee; --no-line: #f0c4bb; --no-top: #e3a13d;
  /* charts: categorical series, grid, band, and the two sides of a head-to-head */
  --c-1: #0579af; --c-2: #e08a1e; --c-3: #32835f; --c-4: #7051a5; --c-5: #d9483b; --c-6: #0e7490; --c-7: #8a6d1f; --c-8: #718096;
  --c-grid: #edf0f5; --c-axis: #8794a8; --c-band: rgba(5, 121, 175, .14); --c-ok: #32835f; --c-bad: #c0473f; --c-warn: #d39a35;
  --side-rpa: #e08a1e; --side-agentic: #0579af;
  /* step types (Skan) */
  --t-trigger: #26262c; --t-ui: #d9483b; --t-mainframe: #5b4bd8; --t-desktop: #9a4f9e; --t-api: #e08a1e; --t-excel: #1d7a45;
  --t-file: #5a6b7b; --t-email: #c2410c; --t-document: #be185d; --t-database: #0e7490; --t-queue: #6d4fc2; --t-config: #8a6d1f;
  --t-logic: #2b6cb0; --t-decision: #c58a00; --t-loop: #7a5af8; --t-error: #b54708; --t-subworkflow: #3b3f8f; --t-code: #334155;
  --t-log: #8a8a94; --t-wait: #a1824a; --t-scope: #2f6f8f; --t-group: #64748b; --t-other: #8a8a94;
  --t-agentic: #1f9d6b; --t-stop: #b42318; --t-placeholder: #8a8a94;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  /* Vikat x SKAN.AI: call to action, sidebar */
  --cta: #b5ec5e; --cta-hover: #a5e044; --cta-line: #94cc3c; --cta-ink: #061236; --cyan: #37e7f3; --sb-bg: #061236; --sb-grad: linear-gradient(180deg, #061236 0%, #0a1446 58%, #160f5e 100%); --sb-ink: #eef2f7; --sb-ink-2: #c9d6ea; --sb-faint: #9aa8bf; --sb-label: #8e9cb8; --sb-line: #1c2b55; --sb-hover: #0f1d4a; --sb-active: #15275a; --sb-pill: #1a2b5c;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --navy: #01030a; --brand-eyebrow: #9aa8bf; --brand-tagline: #c9d6ea;
    --bg: #040c24; --surface: #0a1533; --surface-2: #0d1a3d; --surface-3: #102044; --hover: #0f1d42;
    --ink: #eef2f7; --ink-strong: #ffffff; --ink-2: #c9d6ea; --muted: #9aa8bf; --faint: #95a3bb;
    --line: #1b2a50; --line-soft: #142247; --line-strong: #2c4070;
    --primary: #4c40d6; --primary-hover: #5b50e2; --primary-ink: #ffffff;
    --accent: #37e7f3; --accent-soft: #0b2d45; --accent-ink: #a5f3f8; --icon: #6fd9e6; --focus: #0e3550; --link: #5fe3ef;
    --crumb: #9aa8bf; --pill: #16264d; --track: #1b2a50; --input-line: #22335c; --input-ink: #eef2f7; --drop-line: #2c4070; --drop-bg: #0b1738;
    --code-bg: #01030a; --code-ink: #dce6f5; --shadow: 0 2px 7px rgba(0, 0, 0, .3); --shadow-lg: 0 8px 28px rgba(0, 0, 0, .5);
    --grey-bg: #1a2a50; --grey-fg: #b3c0d3; --green-bg: #183626; --green-fg: #8fd8a8; --amber-bg: #3a2c12; --amber-fg: #f0c060;
    --blue-bg: #1c2d4a; --blue-fg: #9cc0f2; --purple-bg: #2c2342; --purple-fg: #c5a8f0; --red-bg: #3a1d1a; --red-fg: #f2988e;
    --notice-bg: #183626; --notice-fg: #a6e3bb;
    --danger: #b4433b; --danger-hover: #9e3a33;
    --yes-bg: #15291e; --yes-line: #2b5a3c; --no-bg: #2e1c17; --no-line: #6b3a2c;
    --c-1: #37e7f3; --c-2: #f0a24a; --c-3: #5fb88a; --c-4: #a88bd8; --c-5: #ec6f63; --c-6: #3fb0c9; --c-7: #c9a443; --c-8: #93a1b7;
    --c-grid: #16264d; --c-axis: #75839a; --c-band: rgba(55, 231, 243, .16); --c-ok: #5fb88a; --c-bad: #ec6f63; --c-warn: #e0ad55;
    --side-rpa: #f0a24a; --side-agentic: #37e7f3;
    --t-trigger: #55556a; --t-code: #52627a; --t-group: #6b778c; --t-log: #737a88; --t-other: #737a88; --t-placeholder: #737a88;
    /* Vikat x SKAN.AI: call to action, sidebar */
  --cta: #b5ec5e; --cta-hover: #c4f27a; --cta-line: #b5ec5e; --sb-bg: #01030a; --sb-grad: linear-gradient(180deg, #01030a 0%, #040c24 55%, #0d0b45 100%); --sb-hover: #0a1638; --sb-active: #102150; --sb-line: #16244a; --sb-pill: #16264d;
}

}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.45 var(--font); background: var(--bg); color: var(--ink); overflow-wrap: break-word; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, select, input, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { color: var(--ink); }
h3 { font-size: 16px; margin: 0 0 15px; }
h4 { margin: 0 0 8px; font-size: 14px; }
code, pre, kbd, .mono { font-family: var(--font-mono); }
code { font-size: .92em; }
pre { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.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; }
.eyebrow { font-size: 10px; letter-spacing: 1.2px; font-weight: 750; color: var(--faint); text-transform: uppercase; }
.mono { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; color: var(--input-ink); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 9px; }
.skip:focus { left: 8px; }

/* ------------------------------------------------------------------ shell */
.app { max-width: 1500px; margin: 0 auto; min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0, 1fr); background: var(--bg); }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); min-width: 0; }
.sidebar-inner { position: sticky; top: 0; max-height: 100vh; min-height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { background: var(--navy); padding: 23px 19px; color: var(--brand-ink); }
.brand a { color: inherit; text-decoration: none; }
.brand .client { display: block; height: 19px; width: auto; filter: brightness(0) invert(1); margin: 0 0 16px; }
.brandrow { display: flex; gap: 12px; align-items: center; }
.brandmark { width: 42px; height: 42px; display: grid; place-items: center; background: var(--lime); color: #111d32; border-radius: 11px; flex: none; }
.brandmark svg { width: 22px; height: 22px; }
.brand .wordmark { font-size: 22px; font-weight: 800; letter-spacing: .6px; line-height: 1.1; color: var(--brand-ink); }
.brand .wordmark span { color: #2dd4bf; }
.brand .product { font-size: 12.5px; margin: 4px 0 0; line-height: 1.3; color: var(--brand-tagline); font-weight: 600; }
.brand .eyebrow { margin-top: 3px; color: var(--brand-eyebrow); }
.tagline { margin: 16px 0 0; color: var(--brand-tagline); font-size: 12px; }
.nav .navlabel { padding: 14px 11px 4px; }
.navlabel { padding: 20px 18px 7px; font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--faint); }
.nav { padding: 0 9px; display: flex; flex-direction: column; }
.nav a { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 11px; border-radius: 9px; color: var(--ink-2); font-weight: 500; margin: 2px 0; text-decoration: none; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.nav .ico { width: 20px; display: inline-grid; place-items: center; flex: none; }
.nav .ico svg { width: 18px; height: 18px; }
.nav .count { margin-left: auto; background: var(--pill); border-radius: 20px; padding: 2px 7px; font-size: 11px; font-weight: 600; color: var(--ink-2); min-width: 22px; text-align: center; }
.nav .count.attn { background: var(--amber-bg); color: var(--amber-fg); }
.nav a.active .count { background: var(--surface); }
.sidefoot { margin-top: auto; padding: 17px; color: var(--faint); font-size: 11px; border-top: 1px solid var(--line); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 72px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--surface); gap: 15px; }
.crumb { font-size: 10px; letter-spacing: .8px; color: var(--crumb); font-weight: 750; text-transform: uppercase; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb a { color: inherit; }
.crumb a:hover { color: var(--link); text-decoration: none; }
.crumb .sep { margin: 0 7px; }
.crumb .here { color: var(--ink-2); }
.envstrip { display: flex; align-items: center; gap: 8px; flex: none; font-size: 12px; color: var(--muted); }
.envitem { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); white-space: nowrap; color: var(--ink-2); }
.envitem b { font-weight: 600; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); display: inline-block; flex: none; }
.dot.ok { background: var(--c-ok); } .dot.bad { background: var(--c-bad); } .dot.warn { background: var(--c-warn); } .dot.info { background: var(--accent); }
.content { padding: 28px; max-width: 1320px; width: 100%; margin: 0 auto; flex: 1; }
.footer { margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 11px; color: var(--faint); display: flex; justify-content: space-between; gap: 12px; }

/* ------------------------------------------------------------------ page head */
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 23px; }
.pagehead > div:first-child { min-width: 0; }
.pagehead h1 { font-size: 27px; letter-spacing: -.7px; margin: 5px 0 0; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.pagehead .titleline { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.pagehead .titleline .btn { flex: none; }
.pagehead p { margin: 6px 0 0; color: var(--muted); max-width: 820px; }
.pagehead .slot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ------------------------------------------------------------------ layout */
.grid { display: grid; gap: 15px; }
.stack > * + * { margin-top: 15px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.twocol { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); }
.twopane { grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); }
.halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.threecol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mb { margin-bottom: 15px; } .mt { margin-top: 15px; }

/* ------------------------------------------------------------------ surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-width: 0; }
.card + .card { margin-top: 15px; }
.grid > .card + .card { margin-top: 0; }
.card.pad-sm { padding: 14px; }
.card > h2, .card > h3 { font-size: 16px; margin: 0 0 15px; }
.sectionhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.sectionhead > * { min-width: 0; }
.sectionhead h2, .sectionhead h3 { margin: 0; font-size: 16px; }
.sectionhead .sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.stat { padding: 18px; }
.stathead { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.staticon { width: 20px; height: 20px; color: var(--icon); flex: none; display: inline-grid; place-items: center; font-size: 18px; }
.staticon svg { width: 20px; height: 20px; }
.statvalue { font-size: 30px; font-weight: 750; letter-spacing: -1px; margin: 12px 0 4px; color: var(--ink-strong); line-height: 1.15; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.statvalue small { font-size: 14px; letter-spacing: 0; font-weight: 600; color: var(--muted); margin-left: 3px; }
.statfoot { font-size: 11px; color: var(--muted); }
.kvgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kvcard { border: 1px solid var(--line); border-radius: 10px; padding: 13px; min-width: 0; }
.kvcard span { font-size: 11px; color: var(--muted); }
.kvcard strong { display: block; font-size: 22px; margin: 6px 0; color: var(--ink-strong); }
.kvlist { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; font-size: 13px; margin: 0; }
.kvlist dt { color: var(--muted); }
.kvlist dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.actions { display: grid; gap: 10px; }
.action { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 13px; border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; }
a.action:hover, .action.click:hover, .row.click:hover, a.row:hover { border-color: var(--line-strong); background: var(--hover); text-decoration: none; cursor: pointer; }
.action .actionico { font-size: 20px; color: var(--icon); width: 22px; display: grid; place-items: center; }
.actiontext { flex: 1; min-width: 0; }
.actiontext strong { display: block; font-size: 13px; }
.actiontext span { font-size: 12px; color: var(--muted); }
.chev { color: var(--muted); }
.list { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; border: 1px solid var(--line); border-radius: 11px; padding: 15px; background: var(--surface); color: var(--ink); text-decoration: none; }
.rowname { display: flex; gap: 11px; align-items: center; min-width: 0; }
.rowicon { width: 40px; height: 40px; border-radius: 9px; background: var(--surface-3); display: grid; place-items: center; font-size: 20px; flex: none; }
.rowname strong { display: block; font-size: 13px; }
.rowname small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.rowmeta { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.rowfoot { grid-column: 1 / -1; }
.rowfoot .small { display: flex; justify-content: space-between; margin-top: 5px; color: var(--muted); gap: 10px; }
.testrow { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; margin-top: 9px; }
.testrow .testcopy { flex: 1; min-width: 0; }
.testrow strong { display: block; font-size: 13px; }
.testrow small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.callout { padding: 13px; border-radius: 10px; background: var(--surface-3); color: var(--grey-fg); font-size: 12px; }
.callout strong { display: block; color: var(--green-fg); margin-bottom: 5px; }
.callout.tone-blue strong { color: var(--blue-fg); }
.callout.tone-grey strong { color: var(--grey-fg); }
.callout.tone-amber { background: var(--amber-bg); color: var(--amber-fg); } .callout.tone-amber strong { color: var(--amber-fg); }
.callout.tone-red { background: var(--red-bg); color: var(--red-fg); } .callout.tone-red strong { color: var(--red-fg); }
.callout.tone-purple { background: var(--purple-bg); color: var(--purple-fg); } .callout.tone-purple strong { color: var(--purple-fg); }
.callout.tone-green { background: var(--green-bg); color: var(--green-fg); }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--notice-bg); color: var(--notice-fg); font-size: 12px; margin-bottom: 15px; }
.notice.tone-red { background: var(--red-bg); color: var(--red-fg); }
.notice.tone-amber { background: var(--amber-bg); color: var(--amber-fg); }
.notice.tone-blue { background: var(--blue-bg); color: var(--blue-fg); }
.notice.tone-grey { background: var(--grey-bg); color: var(--grey-fg); }
.empty { text-align: center; padding: 30px; color: var(--muted); }
.empty .emptyico { font-size: 30px; line-height: 1; margin-bottom: 8px; color: var(--icon); }
.empty p { margin: 0; }
.details { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.details + .details { margin-top: 10px; }
.details summary { padding: 12px 14px; cursor: pointer; background: var(--surface-2); font-weight: 700; font-size: 12px; }
.details > :not(summary) { margin: 0; padding: 14px; }
.details pre { max-height: 380px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; color: var(--input-ink); }
.code { background: var(--code-bg); color: var(--code-ink); border-radius: 12px; padding: 20px; overflow: auto; white-space: pre; font: 12px/1.65 var(--font-mono); max-height: 640px; }

/* ------------------------------------------------------------------ controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; border: 1px solid var(--cta-line); border-radius: 9px; padding: 10px 14px; background: var(--cta); color: var(--cta-ink); font-weight: 650; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--cta-hover); border-color: var(--cta-line); text-decoration: none; }
.btn.secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn.secondary:hover { border-color: var(--line-strong); background: var(--hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--link); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); color: #fff; }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.input, .select, .textarea, .toolbar input, .toolbar select { border: 1px solid var(--input-line); background: var(--surface); color: var(--input-ink); border-radius: 9px; padding: 10px 12px; min-width: 170px; }
.textarea { width: 100%; min-height: 90px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field > label, .label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
.toolbar input { flex: 1; }
.dropzone { display: block; border: 2px dashed var(--drop-line); border-radius: 13px; background: var(--drop-bg); padding: 24px; text-align: center; cursor: pointer; transition: .15s; color: var(--ink); }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dropicon { font-size: 30px; color: var(--icon); margin-bottom: 8px; line-height: 1; }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.filechip { display: flex; align-items: center; gap: 10px; background: var(--surface-3); border: 1px solid var(--input-line); border-radius: 9px; padding: 10px; margin-top: 12px; }
.filechip .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.checkrow { display: flex; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.checkrow input { accent-color: var(--accent); width: 17px; height: 17px; margin-top: 2px; flex: none; }
.checkrow label { font-size: 13px; flex: 1; }
.checkrow small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; padding: 0 3px; overflow-x: auto; scrollbar-width: thin; }
.tabbar > a, .tabbar > button { background: transparent; color: var(--muted); border: 0; border-radius: 8px 8px 0 0; padding: 12px 17px; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; gap: 7px; align-items: center; }
.tabbar > a:hover, .tabbar > button:hover { color: var(--ink); text-decoration: none; }
.tabbar > .active { color: var(--accent-ink); background: var(--accent-soft); border-bottom-color: var(--accent); }
.tabbar .count { background: var(--pill); border-radius: 20px; padding: 1px 7px; font-size: 11px; }

/* ------------------------------------------------------------------ data */
.tablewrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tablewrap table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 550px; }
/* a table of at most three columns (label, UiPath, agentic) fits a phone: no minimum width, headers wrap, so both value
   columns stay on screen side by side instead of scrolling out of a wrapper that shows no scrollbar on touch */
.tablewrap table:not(:has(> thead > tr > :nth-child(4))) { min-width: 0; }
.tablewrap table:not(:has(> thead > tr > :nth-child(4))) th { white-space: normal; }
.tablewrap th, .tablewrap td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tablewrap th { background: var(--surface-2); color: var(--grey-fg); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tablewrap tr:last-child td { border-bottom: 0; }
.tablewrap td.num, .tablewrap th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap tr.click { cursor: pointer; }
.tablewrap tr.click:hover td { background: var(--hover); }
.badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; border-radius: 30px; padding: 4px 8px; font-size: 10px; font-weight: 750; line-height: 1.2; background: var(--grey-bg); color: var(--grey-fg); vertical-align: middle; }
.badge.tone-green { background: var(--green-bg); color: var(--green-fg); }
.badge.tone-amber { background: var(--amber-bg); color: var(--amber-fg); }
.badge.tone-blue { background: var(--blue-bg); color: var(--blue-fg); }
.badge.tone-purple { background: var(--purple-bg); color: var(--purple-fg); }
.badge.tone-red { background: var(--red-bg); color: var(--red-fg); }
.progress { height: 7px; background: var(--track); border-radius: 20px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 20px; background: var(--accent); }
.progress.thin { height: 5px; }
.progress.tone-green > span { background: var(--c-ok); } .progress.tone-amber > span { background: var(--c-warn); }
.progress.tone-red > span { background: var(--c-bad); } .progress.tone-purple > span { background: var(--c-4); }
.pipeline { display: grid; gap: 13px; }
.pipehead { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; gap: 10px; }
.ticon { width: 20px; height: 20px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font: 700 11px/1 var(--font); color: #fff; flex: none; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; }
.ticon.big { width: 34px; height: 34px; border-radius: 8px; font-size: 15px; }
.appchip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 4px; font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--ink); max-width: 100%; }
.appchip .name { overflow: hidden; text-overflow: ellipsis; }
.appchips { display: flex; flex-wrap: wrap; gap: 6px; }
.applogo { display: inline-block; border-radius: 4px; flex: none; object-fit: contain; vertical-align: middle; }
.monogram { border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; flex: none; line-height: 1; vertical-align: middle; }
@media (prefers-color-scheme: dark) { .applogo { background: #fff; padding: 1px; } }

/* charts (inline SVG drawn by UI.lineChart / barChart / donut / spark) */
.chart-host { display: block; width: 100%; min-width: 0; }
.chart { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.chart.fixed { width: auto; max-width: 100%; flex: none; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .grid line, .chart line.grid { stroke: var(--c-grid); stroke-width: 1; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .band { fill: var(--c-band); stroke: none; }
.chart .marker line { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .marker text { fill: var(--ink-2); font-weight: 600; }
.chart .value { fill: var(--ink-2); font-weight: 600; }
.chart .label { fill: var(--ink-2); }
.chart .center { fill: var(--ink-strong); font-size: 20px; font-weight: 750; }
.chart .centersub { fill: var(--muted); font-size: 10px; }
.chart .hit:hover { opacity: .85; }
.spark { display: inline-block; vertical-align: middle; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 11px; color: var(--muted); list-style: none; padding: 0; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.legend .sw.line { height: 3px; border-radius: 2px; width: 14px; }
.legend .sw.bandsw { background: var(--c-band); border: 1px dashed var(--line-strong); }
.legend b { color: var(--ink-2); font-weight: 650; }
.donutwrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donutwrap .legend { flex-direction: column; margin: 0; }

/* process view: nodes, connectors, decision cards */
/* minmax(0, 1fr), not the implicit auto column: an unbreakable label or badge deep inside must not widen the column (the
   page then scrolls sideways, or a box with overflow hidden - such as 'All N top-level steps' - cuts the steps off) */
.flowsteps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 740px; margin: 0 auto; }
.node { display: flex; align-items: center; gap: 12px; border: 1px solid var(--input-line); background: var(--surface); border-radius: 11px; padding: 13px 14px; text-align: left; color: var(--ink); width: 100%; box-shadow: 0 2px 5px #162c4b0b; }
button.node, a.node { cursor: pointer; }
button.node:hover, a.node:hover, .node.selected { background: var(--surface-3); border-color: var(--line-strong); text-decoration: none; }
.node.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.nodeicon { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); font-size: 18px; flex-shrink: 0; }
.nodebody { flex: 1; min-width: 0; }
.nodebody strong { display: block; font-size: 13px; }
.nodebody small { color: var(--muted); font-size: 11px; }
/* the flowline: a drawn arrow down to the next symbol */
.connector { position: relative; height: 24px; font-size: 0; }
.connector::before { content: ""; position: absolute; left: 50%; top: 2px; bottom: 7px; width: 2px; margin-left: -1px; background: var(--line-strong); }
.connector::after { content: ""; position: absolute; left: 50%; bottom: 1px; margin-left: -5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--line-strong); }
.branch-card { margin: 18px 4px 8px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 4px 14px rgba(20, 35, 60, .04); }
.branch-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.branch-title .grow { flex: 1 1 140px; }
.branch-title small { display: block; color: var(--muted); margin-top: 3px; }
.diamond { width: 22px; height: 22px; transform: rotate(45deg); border-radius: 5px; background: var(--diamond); flex: none; margin: 6px; }
.branch-help { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px 12px; line-height: 1.55; margin-bottom: 12px; }
/* Then/Else side by side only while each path keeps 260px; a narrower (nested) decision stacks its paths, so a deep
   chain of decisions never squeezes its step cards into a sliver */
.branch-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 10px; }
.branch-path { padding: 13px; border-radius: 10px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; background: var(--surface-2); }
.branch-path.yes { background: var(--yes-bg); border-color: var(--yes-line); border-top: 3px solid var(--yes-top); }
.branch-path.no { background: var(--no-bg); border-color: var(--no-line); border-top: 3px solid var(--no-top); }
.branch-path small { color: var(--muted); font-size: 12px; }
/* a nested box (a flowbox with its 'opens <workflow>' badge, a step card) stays inside its Then/Else column */
.branch-path > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.branch-path .node, .branch-path .flowbox > summary, .branch-path .badge { overflow-wrap: anywhere; white-space: normal; }
/* each nesting level inside a path costs less padding, so a deep path keeps room for its text at every width */
.branch-path .branch-card { padding: 9px; margin: 10px 0 6px; }
.branch-path .branch-path, .branch-path .trypart { padding: 7px; }
.branch-path .flowbody { padding: 4px 6px 8px; }
/* a deep decision folded into a box is framed once, by the box (its card inside adds no second border and padding) */
.flowbox.kind-decision > .flowbody > .branch-card { margin: 4px 0 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
.branch-tag { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--grey-fg); }
.yes .branch-tag { color: var(--green-fg); } .no .branch-tag { color: var(--red-fg); }

/* toast */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink-strong); color: var(--surface); padding: 10px 16px; border-radius: 9px; box-shadow: var(--shadow-lg); font-size: 13px; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; border-left: 4px solid var(--accent); pointer-events: auto; }
.toast.show { opacity: .97; transform: none; }
.toast.tone-green { border-left-color: var(--c-ok); } .toast.tone-red { border-left-color: var(--c-bad); } .toast.tone-amber { border-left-color: var(--c-warn); }

/* ------------------------------------------------------------------ responsive (FlowPilot breakpoints) */
@media (max-width: 1050px) {
  .app { grid-template-columns: 205px minmax(0, 1fr); }
  .content { padding: 20px; }
  /* the environment pills drop below the breadcrumb instead of cutting it to 'MIGRATION FACTORY / AUT…' */
  .topbar { height: auto; min-height: 55px; flex-wrap: wrap; row-gap: 6px; padding: 8px 20px; }
  .crumb { white-space: normal; line-height: 1.5; max-width: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .twocol, .twopane, .threecol { grid-template-columns: minmax(0, 1fr); }
  .brand .product { font-size: 16px; white-space: normal; }
  .brandmark { width: 38px; height: 38px; }
}
@media (max-width: 900px) {
  .halves { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .app { display: block; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-inner { position: static; min-height: 0; max-height: none; overflow: visible; }
  .brand { padding: 15px 18px; }
  .brand .client { height: 15px; margin-bottom: 10px; }
  .brandmark { width: 34px; height: 34px; border-radius: 9px; }
  .brand .product { font-size: 17px; }
  .tagline { margin-top: 10px; }
  .navlabel, .sidefoot, .nav .ico { display: none; }
  .nav { flex-direction: row; overflow-x: auto; padding: 8px; gap: 5px; scrollbar-width: none; }
  /* the scrollbar is hidden, so the edge that hides entries fades out (ui.js sets more-left / more-right from the
     scroll position) */
  .nav.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }
  .nav.more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent); }
  .nav.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .nav::after { content: ""; flex: 0 0 3px; }
  .nav a { width: auto; white-space: nowrap; margin: 0; padding: 9px; flex: none; gap: 7px; }
  .topbar { height: auto; min-height: 55px; padding: 8px 15px; flex-wrap: wrap; row-gap: 6px; }
  .crumb { white-space: normal; line-height: 1.5; max-width: 100%; }
  .envstrip { gap: 6px; }
  .envitem { padding: 4px 8px; font-size: 11px; }
  .content { padding: 16px; }
  .pagehead { flex-wrap: wrap; align-items: flex-start; }
  .pagehead h1 { font-size: 23px; }
  .pagehead .slot { justify-content: flex-start; }
  .stats, .stats.three { gap: 9px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 13px; }
  .statvalue { font-size: 25px; }
  .card { padding: 15px; }
  .kvgrid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .rowmeta { justify-content: flex-start; }
  .toolbar input, .toolbar select { width: 100%; min-width: 0; }
  .footer { flex-direction: column; }
  .kvlist { grid-template-columns: 1fr; gap: 2px; }
  .kvlist dd { margin-bottom: 8px; }
}
@media (max-width: 560px) {
  .branch-paths { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media print {
  .sidebar, .topbar, .toasts { display: none !important; }
  .app { display: block; }
}

/* ------------------------------------------------------------------ automation detail frame (stage stepper, chips) */
.pagehead-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.appstrip { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
.stagebar { list-style: none; display: flex; gap: 0; margin: 0 0 16px; padding: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow-x: auto; }
.stagebar li { flex: 1 1 0; min-width: max-content; display: flex; align-items: center; gap: 9px; padding: 13px 14px; font-size: 12.5px;
  color: var(--muted); font-weight: 600; position: relative; white-space: nowrap; }
.stagebar li + li::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 22px; margin-top: -11px; background: var(--line); }
.stagebar .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 800;
  background: var(--grey-bg); color: var(--grey-fg); flex: 0 0 auto; }
.stagebar li.done { color: var(--ink-2); }
.stagebar li.done .dot { background: var(--green-bg); color: var(--green-fg); }
.stagebar li.current { color: var(--accent-ink); background: var(--accent-soft); }
.stagebar li.current .dot { background: var(--primary); color: var(--primary-ink); }
.stagebar li.current.blocked { color: var(--red-fg); background: var(--red-bg); }
.stagebar li.current.blocked .dot { background: var(--red-fg); color: var(--surface); }
.stagebar li.skipped .dot { background: var(--amber-bg); color: var(--amber-fg); }
.tabpanel { margin-top: 18px; }
#auto-tabs { margin-top: 4px; }
/* The four groups wrap onto a second row when they do not fit (a phone, or a tablet next to the sidebar) instead of
   scrolling sideways: a strip scrolled to the active group hid the first group ('Understand the bot') with nothing on
   screen to say it was there. Where they fit, they stay one row. */
.groupbar { margin-bottom: 0; flex-wrap: wrap; overflow-x: visible; row-gap: 2px; }
@media (max-width: 700px) {
  .groupbar > a { padding: 10px 13px; }
}
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 0 2px; }
.subtabs a { padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.subtabs a:hover { border-color: var(--line-strong); }
.subtabs a.active { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.subtabs .count { background: var(--pill); border-radius: 20px; padding: 0 6px; font-size: 11px; }

/* ------------------------------------------------------------------ overview */
.twocol.wide-left { grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); }
.funnelrow { margin: 12px 0; }
.funnelhead { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; color: var(--ink-2); }
.actionicon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 15px; }
.actionicon.tone-red { background: var(--red-bg); color: var(--red-fg); }
.actionicon.tone-amber { background: var(--amber-bg); color: var(--amber-fg); }
.actionicon.tone-blue { background: var(--blue-bg); color: var(--blue-fg); }
.actionicon.tone-green { background: var(--green-bg); color: var(--green-fg); }
.actionbody { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }
@media (max-width: 900px) { .twocol.wide-left { grid-template-columns: minmax(0, 1fr); } }
.reviewrow { display: flex; justify-content: space-between; gap: 16px; align-items: center; text-decoration: none; color: inherit; }
.reviewrow .rowmain { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.reviewrow .rowtitle { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.reviewrow .rowside { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.reviewrow .appstrip { margin: 4px 0 0; }
@media (max-width: 700px) { .reviewrow { flex-direction: column; align-items: stretch; } .reviewrow .rowside { align-items: flex-start; } }
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 18px; }
.formgrid .field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.airow { display: grid; grid-template-columns: auto minmax(110px, 1fr) minmax(140px, 1fr) minmax(140px, 1fr) minmax(130px, 1fr) minmax(90px, .7fr) minmax(140px, 1fr) 84px 112px; gap: 10px; align-items: end;
  padding: 10px 0 24px; border-bottom: 1px solid var(--line-soft); }
.airow .aikey { position: relative; } .airow .aikeynote { position: absolute; left: 0; top: 100%; margin-top: 3px; white-space: nowrap; }
.airow .aiacts { justify-self: end; white-space: nowrap; }
.airow .field { margin: 0; } .airow .input, .airow .select { min-width: 0; width: 100%; box-sizing: border-box; }
.airow .unused { visibility: hidden; } .airadio { padding: 0 0 10px; border: 0; } .aistatus { padding-bottom: 10px; }
@media (max-width: 1200px) { .airow { grid-template-columns: 1fr 1fr 1fr; } .airow .unused { display: none; }
  .airow .aikeynote { position: static; white-space: normal; } .airow .aiacts { justify-self: start; } }
@media (max-width: 900px) { .airow { grid-template-columns: 1fr 1fr; } }
.formactions { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }

/* a modal form (native <dialog>: Retire, Rename on the automation page) */
dialog.modal { border: 1px solid var(--line); border-radius: 14px; padding: 0; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lg); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
dialog.modal::backdrop { background: rgba(10, 18, 32, .45); }
dialog.modal form { padding: 20px; }
dialog.modal [hidden] { display: none; }
dialog.modal h2 { margin: 0 0 8px; font-size: 18px; color: var(--ink-strong); overflow-wrap: anywhere; }
dialog.modal p { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
dialog.modal ul { margin: 0 0 12px; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
dialog.modal .input, dialog.modal .textarea { width: 100%; min-width: 0; box-sizing: border-box; }
dialog.modal .callout { margin-bottom: 12px; }
dialog.modal .formerror { color: var(--red-fg); font-size: 12px; min-height: 16px; margin: 4px 0 0; }
dialog.modal .formactions { justify-content: flex-end; }
.invrow.retired { background: var(--surface-2); }
.invrow.retired .invtitle b { color: var(--ink-2); }

/* ------------------------------------------------------------------ automations list and upload */
.invrow { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; background: var(--surface); color: var(--ink);
  text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.invrow:hover, .invrow:focus-visible { border-color: var(--line-strong); box-shadow: var(--shadow); }
.invhead { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.invicon { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; flex: none; color: var(--icon); }
.invtitle { flex: 1; min-width: 0; }
.invtitle b { font-size: 14.5px; }
.invbadges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.invfoot { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.invapps { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.filechip .select { min-width: 0; max-width: 250px; padding: 6px 8px; font-size: 12px; }
.checkline { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.checkline:last-child { border-bottom: 0; }
.checkmark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 800; }
.checkline.ok .checkmark { background: var(--green-bg); color: var(--green-fg); }
.checkline.warn .checkmark { background: var(--amber-bg); color: var(--amber-fg); }
.checkline.bad .checkmark { background: var(--red-bg); color: var(--red-fg); }
.checkline.info .checkmark { background: var(--blue-bg); color: var(--blue-fg); }
/* an auto grid track takes the min-content width of its longest unbreakable word (a package id, a path): minmax(0, 1fr)
   keeps these lists inside their card at any width */
ol.steps { margin: 0; padding-left: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
/* the file name needs a real basis at every width: with flex-basis 0 next to the role select the name shrinks to one
   letter per line (phones, tablets and laptops alike); the select wraps below it when the row is too narrow */
.filechip { flex-wrap: wrap; }
.filechip .grow { flex: 1 1 180px; }
@media (max-width: 700px) {
  .invhead { flex-wrap: wrap; } .invbadges { justify-content: flex-start; }
}
.fileglyph { width: 28px; height: 28px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; font-size: 14px; }

/* ------------------------------------------------------------------ automation: process (hierarchical flow) */
.grow { flex: 1; min-width: 0; }
button.stat.clickable { text-align: left; cursor: pointer; font: inherit; color: inherit; }
button.stat.clickable:hover { border-color: var(--line-strong); }
.iolist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.iolist li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.iolist li > * { min-width: 0; overflow-wrap: anywhere; }
.findingrow { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.findingrow .sev { flex: none; padding-top: 1px; }
.findingrow > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.phasestrip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.phasechip { display: inline-flex; gap: 7px; align-items: center; border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px;
  padding: 5px 11px 5px 5px; font: 600 12.5px var(--font); color: var(--ink); cursor: pointer; }
.phasechip:hover { border-color: var(--accent); }
.phasearrow { color: var(--faint); }
.phasenum { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: inline-grid; place-items: center;
  font-size: 11.5px; font-weight: 800; flex: none; }
.flowlayout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.flowside { position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow: auto; font-size: 13px; }
.flowside h3 { margin: 2px 0 3px; font-size: 16px; }
.flowside h4 { margin: 16px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sidehead { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.whenlist { margin: 0; padding-left: 18px; }
.whenlist ul { margin: 4px 0; padding-left: 16px; }
.whenlist li + li { margin-top: 3px; }
.whenlist .via { color: var(--muted); list-style: "↳ "; }
.aibox { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.flowtools { margin-bottom: 8px; }
.flowcrumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; margin: 2px 0 14px; }
.flowcrumbs .sep { color: var(--faint); }
.flowcrumbs .here { font-weight: 700; color: var(--ink-strong); }
.phasehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.phasehead h2 { margin: 2px 0 4px; font-size: 19px; }
.phasemap { display: grid; gap: 0; max-width: 820px; }
.phasecard { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 1px solid var(--input-line); background: var(--surface);
  border-radius: 4px; padding: 15px 16px; cursor: pointer; font: inherit; color: var(--ink); box-shadow: var(--shadow); border-left: 4px solid var(--accent); }
.phasecard:hover, .phasecard:focus-visible { border-color: var(--line-strong); border-left-color: var(--primary); background: var(--hover); }
.phasecard.kind-subprocess { border-left-color: var(--t-subworkflow); }
.phasecard.kind-segment { border-left-color: var(--t-logic); }
.phasemain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.phasemain b { font-size: 14.5px; }
.phasemain small, .phaseio { color: var(--muted); font-size: 12px; }
.phasestats { font-size: 12.5px; color: var(--ink-2); }
.phasejumps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.jump { font-size: 11.5px; background: var(--purple-bg); color: var(--purple-fg); border-radius: 999px; padding: 2px 9px; }
.phaseapps { display: inline-flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; max-width: 130px; }
.chev { color: var(--faint); font-size: 22px; }
.phaseconnector { position: relative; min-height: 26px; padding: 5px 0 5px 52px; }
.phaseconnector::before { content: ""; position: absolute; left: 27px; top: 2px; bottom: 8px; width: 2px; background: var(--line-strong); }
.phaseconnector::after { content: ""; position: absolute; left: 23px; bottom: 2px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--line-strong); }
.phaseconnector span { font-size: 11.5px; color: var(--muted); }
.phaseconnector.none::before, .phaseconnector.none::after, .phaseconnector.end::before, .phaseconnector.end::after { content: none; }
.phasemap > .fc-termrow { justify-content: flex-start; padding-left: 0; }
/* no edge to the next card: alternatives (flowchart outcomes, branches, handlers) are spaced apart without an arrow */
.phaseconnector.none { padding: 0; height: 12px; }
.phaseconnector.end { padding-left: 0; }
.phasearrow.none { padding: 0 2px; }
.unreadable { margin: 8px 0; }
.feed .gone { font-weight: 600; }
.flowsteps.tight { max-width: none; margin: 0; }

/* ------------------------------------------------------------------ flowchart symbols (ISO 5807)
   oval: start / end; rectangle: process; parallelogram: input / output; diamond: decision; arrow: flowline (.connector);
   circle: on-page connector; pentagon: off-page connector (runs another workflow) */
.fc-termrow { display: flex; justify-content: center; }
.fc-term { display: inline-flex; align-items: center; justify-content: center; min-width: 92px; padding: 6px 18px; border-radius: 999px;
  border: 2px solid var(--green-fg); background: var(--green-bg); color: var(--green-fg); font: 800 11.5px var(--font); letter-spacing: .06em; text-transform: uppercase; }
.fc-term.end { border-color: var(--red-fg); background: var(--red-bg); color: var(--red-fg); }
.fc-term.sm { min-width: 0; padding: 2px 10px; font-size: 10.5px; }
.node.shape-process { border-radius: 3px; }
.node .nodeicon { width: auto; height: auto; background: none; }
.node { padding: 10px 13px; }
.node.shape-io { position: relative; isolation: isolate; border-color: transparent; background: transparent; box-shadow: none; border-radius: 0; padding-left: 26px; padding-right: 26px; }
.node.shape-io::before { content: ""; position: absolute; inset: 0 9px; z-index: -1; border: 1px solid var(--input-line); border-radius: 3px; background: var(--surface);
  transform: skewX(-16deg); box-shadow: 0 2px 5px #162c4b0b; }
button.node.shape-io:hover, .node.shape-io.selected, .node.shape-io.match { background: transparent; box-shadow: none; border-color: transparent; }
button.node.shape-io:hover::before { background: var(--surface-3); border-color: var(--line-strong); }
.node.shape-io.selected::before { background: var(--surface-3); border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.node.shape-io.match::before { border-color: var(--diamond); box-shadow: 0 0 0 3px var(--amber-bg); }
.node.shape-io.disabled::before { border-style: dashed; }
.node.shape-decision, .node.shape-offpage { border-radius: 3px; }
.fc-diamond { width: 16px; height: 16px; flex: none; transform: rotate(45deg); border: 2px solid var(--t-decision); background: var(--amber-bg); border-radius: 2px; margin: 0 5px; display: inline-block; }
.fc-diamond.big { width: 32px; height: 32px; display: inline-grid; place-items: center; margin: 4px 8px; }
.fc-diamond.big > span { transform: rotate(-45deg); font: 800 15px var(--font); color: var(--amber-fg); }
.fc-pentagon { width: 20px; height: 22px; flex: none; display: inline-block; background: var(--t-subworkflow); clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%); }
.fc-circle { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; box-sizing: border-box; border-radius: 999px;
  border: 1.5px solid currentColor; font: 700 10.5px var(--font); vertical-align: middle; }
.fc-circle.in, .fc-circle.out { color: var(--muted); background: var(--surface); text-transform: uppercase; font-size: 9.5px; min-width: 34px; height: 34px; }
.fc-loopback { text-align: center; font: 700 11.5px var(--font); color: var(--t-loop); margin-top: 8px; }
.branch-tag { font-size: 11px; }
.flowbox.phasebox { background: var(--surface); border-radius: 4px; border-left-color: var(--primary); }
.flowbox.phasebox.kind-subprocess { border-left-color: var(--t-subworkflow); }
.flowbox.phasebox > summary .phasenum { width: 22px; height: 22px; font-size: 10.5px; }
.fc-legend .fc-sym { display: inline-block; width: 26px; height: 14px; border: 1.5px solid var(--line-strong); background: var(--surface); vertical-align: middle; }
.fc-legend .fc-sym.para { transform: skewX(-16deg); }
.fc-legend .fc-sym.arrow { border: 0; height: 2px; background: var(--line-strong); position: relative; }
.fc-legend .fc-sym.arrow::after { content: ""; position: absolute; right: -2px; top: -4px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 7px solid var(--line-strong); }
.fc-legend .legenditem { display: inline-flex; gap: 7px; align-items: center; }
/* the step that runs a sub-process phase, drawn above the phase's own steps */
.callsite > .small { max-width: 740px; margin: 0 auto 6px; }
.node .nodemeta, .nodemeta { display: inline-flex; gap: 5px; align-items: center; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 45%; }
.nodemeta .badge { white-space: normal; overflow-wrap: anywhere; }
.node { flex-wrap: wrap; }
.node .nodebody { flex: 1 1 140px; }
.node.disabled { opacity: .55; border-style: dashed; }
.node.match, .linkbtn.match { box-shadow: 0 0 0 3px var(--amber-bg); border-color: var(--diamond); }
.stepn { color: var(--faint); font-weight: 700; margin-right: 2px; }
.annot { color: var(--icon); font-size: 14px; }
.linkbtn { border: 0; background: none; color: var(--link); font: 600 12px var(--font); cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.linkbtn:hover, .linkbtn.selected { background: var(--accent-soft); }
.flowbox { border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); border-left: 4px solid var(--t-group); }
.flowbox.kind-loop { border-left-color: var(--t-loop); } .flowbox.kind-error { border-left-color: var(--t-error); }
.flowbox.kind-scope { border-left-color: var(--t-scope); } .flowbox.kind-decision { border-left-color: var(--t-decision); }
.flowbox > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 11px 13px; cursor: pointer; flex-wrap: wrap; }
.flowbox > summary::-webkit-details-marker { display: none; }
.flowbox > summary::before { content: "▸"; color: var(--faint); font-size: 12px; transition: transform .15s; }
.flowbox[open] > summary::before { transform: rotate(90deg); }
/* box and step titles keep a real width: the step count, badges and Details wrap below them in a narrow nested column */
.boxtitle { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.boxtitle small { color: var(--muted); font-size: 12px; }
.flowbox .count { background: var(--pill); border-radius: 20px; padding: 1px 8px; font-size: 11px; color: var(--ink-2); }
.flowbody { padding: 4px 14px 14px; }
.tryparts { display: grid; gap: 10px; }
.trypart { border-radius: 10px; padding: 10px; background: var(--surface); border: 1px solid var(--line-soft); }
.trypart.catch { background: var(--no-bg); border-color: var(--no-line); }
.trypart.finally { background: var(--surface-3); }
.trylabel { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--grey-fg); margin: 6px 0 8px; }
.flowchart { display: grid; gap: 10px; }
.flowrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 34%); gap: 10px; align-items: start; }
.edges { display: flex; flex-direction: column; gap: 5px; padding-top: 6px; }
.edge { font-size: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; color: var(--ink); text-decoration: none; }
.edge:hover { border-color: var(--accent); }
.edge.back { background: var(--purple-bg); border-color: transparent; color: var(--purple-fg); }
.statebox { border: 1px solid var(--line); border-radius: 13px; padding: 12px; background: var(--surface); }
.statebox.initial { border-color: var(--accent); }
.statebox.final { border-style: double; border-width: 3px; }
.statehead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.transition { display: flex; flex-direction: column; gap: 4px; }
details.mini > summary { cursor: pointer; font-size: 12px; color: var(--link); margin: 4px 0; }
.searchhits { border: 1px solid var(--line); border-radius: 11px; padding: 10px 13px; margin-bottom: 14px; background: var(--surface); max-height: 280px; overflow: auto; }
.searchhits ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.searchhits a { display: inline-flex; gap: 6px; align-items: center; }
.sidehint p { margin: 8px 0; }
.condcard { border: 1px solid var(--line); border-radius: 11px; padding: 13px 14px; }
.condhead { display: flex; gap: 10px; align-items: flex-start; }
.condenglish { font-size: 14px; margin: 9px 0 6px; font-weight: 600; color: var(--ink-strong); }
.outcomes { display: grid; gap: 5px; margin-top: 8px; }
.outcome { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.appgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.appcard .apphead { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.appcard h3 { margin: 0; font-size: 15px; }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
/* minmax(0, 1fr), not 1fr: an auto minimum lets the widest nested badge widen the whole column past the screen */
@media (max-width: 1100px) { .flowlayout { grid-template-columns: minmax(0, 1fr); }
  .node .nodemeta, .nodemeta { max-width: 100%; justify-content: flex-start; } }
@media (max-width: 700px) { .flowrow { grid-template-columns: 1fr; } .phasecard { flex-wrap: wrap; } .phaseapps { max-width: none; }
  /* less padding per nesting level, so deep Then/Else paths keep room for their text */
  .flowbody { padding: 4px 6px 8px; } .trypart, .branch-path { padding: 7px; } .branch-card { padding: 9px; margin: 10px 0 6px; } }
.appgrid { align-items: start; }

/* ------------------------------------------------------------------ automation: review & migrate */
.reviewgrid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.card.sticky { position: sticky; top: 14px; }
.stepbubble { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--primary-ink);
  font-size: 12px; font-weight: 800; margin-right: 6px; vertical-align: 1px; }
.rulelist { display: grid; gap: 10px; }
.rulecard { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; }
.rulemain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rulemain .condenglish { margin: 2px 0; font-size: 13.5px; }
.seg { display: inline-flex; border: 1px solid var(--input-line); border-radius: 9px; overflow: hidden; flex: none; }
.seg button { border: 0; background: var(--surface); padding: 7px 11px; font: 600 12px var(--font); color: var(--ink-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--input-line); }
.seg button.on[data-verdict="confirmed"] { background: var(--green-bg); color: var(--green-fg); }
.seg button.on[data-verdict="unsure"] { background: var(--amber-bg); color: var(--amber-fg); }
.seg button.on[data-verdict="wrong"] { background: var(--red-bg); color: var(--red-fg); }
.releasecard { border-color: var(--accent); }
.readyscore { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.scorenum { font-size: 34px; font-weight: 800; color: var(--ink-strong); line-height: 1; }
.scorenum small { font-size: 13px; color: var(--muted); font-weight: 600; }
.statement { border: 1px solid var(--amber-fg); background: var(--amber-bg); color: var(--amber-fg); border-radius: 11px; padding: 12px 14px; font-size: 13px; }
.statement ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.timeline li { position: relative; font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.timeline .tdot { position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--grey-bg); border: 2px solid var(--surface); }
.timeline li.done .tdot, .timeline li.passed .tdot, .timeline li.ok .tdot, .timeline li.pass .tdot { background: var(--green-fg); }
.timeline li.failed .tdot, .timeline li.fail .tdot { background: var(--red-fg); }
.timeline li.warn .tdot { background: var(--amber-fg); }
.timeline li.running .tdot { background: var(--accent); box-shadow: 0 0 0 4px var(--focus); }
.graphwrap { overflow: auto; max-height: 720px; border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px; background: var(--surface-2); }
.gedge { fill: none; stroke: var(--c-axis); stroke-width: 1.4; }
.gedge.cond { stroke-dasharray: 5 4; stroke: var(--accent); }
.gedge.back { stroke: var(--purple-fg); stroke-dasharray: 3 3; }
.glabel { font: 600 11.5px var(--font); fill: var(--ink); }
.genai { border: 1px solid var(--line); border-left: 4px solid var(--t-agentic); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.genaihead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.genai p { margin: 5px 0; }
.codebrowser { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; }
.filelist { list-style: none; margin: 0; padding: 0; max-height: 640px; overflow: auto; display: grid; gap: 2px; font-size: 12.5px; }
.filelist .linkbtn { text-align: left; }
.cmpgrid { display: grid; grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr); gap: 12px; align-items: start; }
.cmphead { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.cmprow { padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.cmpstep { display: flex; gap: 9px; align-items: flex-start; color: var(--ink); text-decoration: none; }
.cmpstep > span { min-width: 0; }
.cmpstep:hover b { color: var(--link); }
@media (max-width: 1100px) { .reviewgrid { grid-template-columns: minmax(0, 1fr); } .card.sticky { position: static; } }
@media (max-width: 700px) { .rulecard { flex-direction: column; align-items: stretch; } .codebrowser, .cmpgrid { grid-template-columns: minmax(0, 1fr); } .cmphead { display: none; }
  /* stacked on a phone: each half says which side it is */
  .cmprow { gap: 6px; }
  .cmprow > div:first-child::before, .cmprow > div:last-child::before { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .05em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
  .cmprow > div:first-child::before { content: "UiPath step"; }
  .cmprow > div:last-child::before { content: "Agentic workflow"; } }

/* ------------------------------------------------------------------ automation: AI & insights */
.explaingen { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 10px; margin-bottom: 14px; }
.aiversion, .detblock { border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; margin-bottom: 12px; }
.aiversion { border-left: 4px solid var(--purple-fg); }
.aivhead { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.explainsec h3 { margin: 12px 0 4px; font-size: 14px; }
.explainsec p { margin: 0; font-size: 13.5px; line-height: 1.6; }
.refs { margin-top: 4px; }
ol.improvements { margin: 0; padding-left: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.imphead { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 3px; }
.oppcard, .agentfinding { border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; }
.oppcard.adopt { border-left: 4px solid var(--t-agentic); }
.oppcard.consider { border-left: 4px solid var(--diamond); }
.oppcard p, .agentfinding p { margin: 5px 0; }
.opphead { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.agentnav { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.agentpill { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 11px; background: var(--surface);
  cursor: pointer; font: inherit; color: var(--ink); }
.agentpill small { display: block; color: var(--muted); font-size: 11.5px; }
.agentpill.active { border-color: var(--accent); background: var(--accent-soft); }
.agentletter { width: 30px; height: 30px; border-radius: 9px; background: var(--navy); color: var(--lime); display: grid; place-items: center; font-weight: 800; flex: none; }
.agentletter.big { width: 42px; height: 42px; font-size: 18px; border-radius: 11px; }
/* in a wrapping .sectionhead the agent heading takes the free width (its text wraps) so the findings badge stays on its
   right; below about 260px of heading the badge drops to its own line */
.agenthead { display: flex; gap: 12px; align-items: center; }
.sectionhead > .agenthead { flex: 1 1 260px; }
.agenthead h2 { margin: 0; }
blockquote.evidence { margin: 6px 0; padding: 8px 12px; border-left: 3px solid var(--line-strong); background: var(--surface-2); font: 12px/1.5 var(--font-mono);
  white-space: pre-wrap; overflow-wrap: anywhere; color: var(--input-ink); border-radius: 0 8px 8px 0; }
.legendbox { border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; margin-bottom: 12px; background: var(--surface); }
.legendgrid { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 12px; }
.legenditem { display: inline-flex; gap: 6px; align-items: center; }
.legenditem .sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.legenditem .sw.yes { background: var(--yes-bg); border: 2px solid var(--yes-top); }
.legenditem .sw.no { background: var(--no-bg); border: 2px solid var(--no-top); }
.runmark { font: 700 11px var(--font); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.runmark.ok { background: var(--green-bg); color: var(--green-fg); }
.runmark.bad { background: var(--red-bg); color: var(--red-fg); }
.runmark.none { background: var(--grey-bg); color: var(--faint); }
#fl-run-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
#fl-run-note { margin: -2px 0 12px; }
.sideclose { display: none; float: right; border: 0; background: var(--surface-3); color: var(--ink-2); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 13px; }
@media (max-width: 1100px) {
  .flowside { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: 62vh; z-index: 40; border-radius: 16px 16px 0 0;
    box-shadow: var(--shadow-lg); order: 0; margin: 0; }
  .flowside.empty { display: none; }
  .sideclose { display: block; }
  /* room under the flow while the sheet is open, so every step can scroll above it; the step scrolled to keeps a gap */
  .flowlayout.sheet-open .flowmain { padding-bottom: 62vh; }
  .flowmain :is(button, a, summary, input) { scroll-margin-top: 12px; }
  .flowtools .input { flex: 1 1 100%; }
}
.quotes blockquote { margin: 0 0 8px; padding: 6px 10px; border-left: 3px solid var(--line-strong); color: var(--ink-2); }
.phasebadges { display: inline-flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.opphead .grow { flex: 1 1 240px; }
.aiversion.rulebased { border-left-color: var(--line-strong); }
.gedge.err { stroke: var(--faint); stroke-dasharray: 2 3; }
.gedge.triage { stroke: var(--t-agentic); stroke-dasharray: 4 3; }

/* ------------------------------------------------------------------ job page outputs: a cell that differs from the
   other side's output is tinted; red (app.css td.diff) is kept for a side whose own check in the verdict failed */
.sheet td.differs { background: var(--blue-bg); color: var(--ink); }
.sheetlegend { margin: 10px 0 0; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); vertical-align: -2px; margin-right: 5px; }
.swatch.differs { background: var(--blue-bg); }
.swatch.diff { background: var(--red-bg); }

/* the Run group and button: running the bot or the agent is the main thing to do once it is set up */
.groupbar a.grp-run { color: var(--green-fg); border: 1px solid var(--green-fg); background: var(--green-bg); }
.groupbar a.grp-run.active { background: var(--green-fg); color: var(--surface); }
.btn.runbtn { background: var(--cta); border-color: var(--cta-line); color: var(--cta-ink); }
.btn.runbtn:hover { background: var(--cta-hover); border-color: var(--cta-line); }
.askai { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.select.sm { padding: 5px 8px; font-size: 12px; min-width: 0; }
.genmode { display: grid; gap: 4px; margin-bottom: 8px; } .genmode small { display: block; color: var(--muted); font-size: 11.5px; }
.compline { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-2); }
.compline input { margin-top: 3px; accent-color: var(--accent); } .compline .block { display: block; margin-top: 2px; }
.compline.off { opacity: .6; } #lg-comps.dim .compline { opacity: .45; }


/* ------------------------------------------------------------------ Process canvas (automation_canvas.js): the workflow as an
   n8n-style canvas, compact flowchart shapes */
:root { --wfc-bg: #f6f7fb; --wfc-dot: #d7dbe5; --wfc-edge: #8f9bb3; --wfc-err: #c4413b; --wfc-back: #7a5af8; --wfc-node: #ffffff; --wfc-line: #b7c0d3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --wfc-bg: #10182a; --wfc-dot: #233049; --wfc-edge: #7d8aa6; --wfc-node: #18233a; --wfc-line: #3a4a6a; } }
:root[data-theme="dark"] { --wfc-bg: #10182a; --wfc-dot: #233049; --wfc-edge: #7d8aa6; --wfc-node: #18233a; --wfc-line: #3a4a6a; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 7px 14px; font: 600 12.5px var(--font); color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--primary); color: var(--primary-ink); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.pviews { margin-bottom: 10px; }
.wfc { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.wfc-bar { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.wfc-stage { position: relative; height: min(68vh, 620px); background-color: var(--wfc-bg);
  background-image: radial-gradient(var(--wfc-dot) 1px, transparent 1px); background-size: 18px 18px; }
.wfc-svghost, .wfc-svg { width: 100%; height: 100%; display: block; }
.wfc-svg { cursor: grab; touch-action: none; } .wfc-svg.panning { cursor: grabbing; }
.wfc-edge { fill: none; stroke: var(--wfc-edge); stroke-width: 1.6; }
.wfc-edge.err { stroke: var(--wfc-err); stroke-dasharray: 5 4; } .wfc-edge.back { stroke: var(--wfc-back); stroke-dasharray: 4 4; }
.wfc-edge-label { font: 600 10px var(--font); fill: var(--muted); paint-order: stroke; stroke: var(--wfc-bg); stroke-width: 4px; }
.wfc-edge-label.err { fill: var(--wfc-err); } .wfc-edge-label.back { fill: var(--wfc-back); }
.wfc-frame rect { fill: color-mix(in srgb, var(--surface) 55%, transparent); stroke: var(--wfc-line); stroke-dasharray: 5 4; }
.wfc-frame.kind-scope rect { stroke: var(--t-scope, #2f6f8f); } .wfc-frame.kind-loop rect { stroke: var(--t-loop); }
.wfc-frame-label { font: 700 10.5px var(--font); fill: var(--ink-2); }
.wfc-node { cursor: pointer; outline: none; }
.wfc-shape { fill: var(--wfc-node); stroke: var(--wfc-line); stroke-width: 1.5; filter: drop-shadow(0 1px 2px rgba(20, 35, 60, .12)); }
.wfc-node:hover .wfc-shape, .wfc-node:focus-visible .wfc-shape { stroke: var(--accent); stroke-width: 2; }
.wfc-node.sel .wfc-shape { stroke: var(--accent); stroke-width: 2.5; }
.wfc-node.shape-decision .wfc-shape, .wfc-node.shape-loop .wfc-shape { fill: var(--amber-bg); stroke: var(--t-decision); }
.wfc-node.shape-loop .wfc-shape { fill: var(--purple-bg); stroke: var(--t-loop); }
.wfc-node.shape-offpage .wfc-shape { fill: var(--blue-bg); stroke: var(--t-subworkflow); }
.wfc-node.shape-point .wfc-shape, .wfc-node.err .wfc-shape { stroke: var(--wfc-err); }
.wfc-node.start .wfc-shape { fill: var(--green-bg); stroke: var(--green-fg); } .wfc-node.end .wfc-shape { fill: var(--red-bg); stroke: var(--red-fg); }
.wfc-node.disabled { opacity: .5; } .wfc-node.review .wfc-shape { stroke: var(--amber-fg); stroke-width: 2.2; }
.wfc-glyph { font: 700 17px var(--font); fill: var(--icon); pointer-events: none; }
.wfc-term { font: 800 10.5px var(--font); letter-spacing: .06em; text-transform: uppercase; fill: var(--ink-2); }
.wfc-node.start .wfc-term { fill: var(--green-fg); } .wfc-node.end .wfc-term { fill: var(--red-fg); }
.wfc-label { font: 600 10.5px var(--font); fill: var(--ink); pointer-events: none; }
.wfc-num { font: 700 9.5px var(--font); fill: var(--faint); } .wfc-tag { font: 800 8.5px var(--font); letter-spacing: .06em; fill: var(--muted); }
.wfc-ai { fill: var(--purple-fg); } .wfc-ai-t, .wfc-rev-t, .wfc-run-t { font: 700 8.5px var(--font); fill: #fff; pointer-events: none; }
.wfc-rev { fill: var(--amber-fg); } .wfc-run.ok { fill: var(--green-fg); } .wfc-run.bad { fill: var(--red-fg); } .wfc-run.none { fill: var(--faint); }
.wfc-zoom { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 3px; box-shadow: var(--shadow); }
.wfc-zoom button { width: 30px; height: 28px; border: 0; background: transparent; cursor: pointer; font: 700 14px var(--font); color: var(--ink-2); border-radius: 6px; }
.wfc-zoom button:hover { background: var(--surface-2); }
.wfc-tools { position: absolute; transform: translate(-50%, -100%); display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 2px; box-shadow: var(--shadow-lg); z-index: 3; }
.wfc-tools button { border: 0; background: transparent; padding: 4px 7px; font: 700 11px var(--font); color: var(--ink-2); cursor: pointer; border-radius: 6px; }
.wfc-tools button:hover, .wfc-tools button:focus-visible { background: var(--accent-soft); color: var(--accent-ink); }
.wfc-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; padding: 20px; text-align: center; }
dialog.wfc-panel { width: min(1180px, calc(100vw - 32px)); height: min(80vh, 760px); border: 1px solid var(--line); border-radius: 14px; padding: 0;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.wfc-panel::backdrop { background: rgba(10, 18, 32, .45); }
.wfc-ph { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.wfc-pcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); height: calc(100% - 50px); }
.wfc-pcols > section { overflow: auto; padding: 12px 14px; }
.wfc-pin, .wfc-pout { background: var(--surface-2); } .wfc-pin { border-right: 1px solid var(--line-soft); } .wfc-pout { border-left: 1px solid var(--line-soft); }
.wfc-pt { font: 800 11px var(--font); letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.wfc-pmid pre.code { max-height: 52vh; overflow: auto; white-space: pre; }
@media (max-width: 800px) { .wfc-pcols { grid-template-columns: 1fr; height: auto; } .wfc-hint { display: none; } }
.wfc-bar .checkrow.wfc-errs { padding: 0; border: 0; gap: 6px; align-items: center; font-size: 12.5px; }
.wfc-bar .checkrow.wfc-errs input { margin: 0; width: 15px; height: 15px; }
.revsec h3 { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; font-size: 15px; }
.revitem { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.revitem:last-child { border-bottom: 0; } .revitem .grow { flex: 1; min-width: 0; }

/* ------------------------------------------------------------------ sign-in (portal/auth.py, when it is on): the sidebar's
   signed-in line (kept on a phone, where the rest of the sidebar footer is hidden) and the sign-in page */
.sideuser { margin: 0 0 8px; font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); font-weight: 600; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .sidefoot.signed { display: block; padding: 8px 15px; }
  .sidefoot.signed .sidenote { display: none; }
  .sidefoot.signed .sideuser { margin: 0; }
}
.loginpage { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); }
.login .brand { padding: 22px 24px; }
.login form { padding: 22px 24px 24px; }
.login .field > span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.login .input { width: 100%; min-width: 0; }
.login .btn { margin-top: 4px; }
.loginerror { margin: 0 0 12px; color: var(--red-fg); font-size: 13px; }
.card.account { margin-top: 15px; }


/* ------------------------------------------------------------------ Vikat x SKAN.AI shell
   The sidebar on Vikat's navy ground fading to SKAN's indigo; the call to action in Vikat lime with navy text; SKAN's
   indigo for selected states (--primary). Colours are tokens on :root (light and dark above). */
body { font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
.sidebar { background-color: var(--sb-bg); border-right: 0; color: var(--sb-ink-2); }
.sidebar-inner { background-color: var(--sb-bg); background-image: var(--sb-grad); }
.sidebar .brand { background: transparent; border-bottom: 1px solid var(--sb-line); padding: 24px 20px 20px; }
.brand .wordmark { font-weight: 800; letter-spacing: .4px; }
.brand .wordmark span { color: var(--cyan); }
.brand .product { color: var(--brand-tagline); font-weight: 500; }
.sidebar .navlabel { color: var(--sb-label); letter-spacing: 1.2px; }
.sidebar .nav a { color: var(--sb-ink-2); border-radius: 8px; position: relative; }
.sidebar .nav a:hover { background: var(--sb-hover); color: var(--sb-ink); }
.sidebar .nav a.active { background: var(--sb-active); color: var(--sb-ink); font-weight: 650; }
.sidebar .nav a.active::before { content: ""; position: absolute; left: -9px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--lime); }
.sidebar .nav a.active .ico { color: var(--lime); }
.sidebar .nav a:focus-visible { outline-color: var(--lime); }
.sidebar .nav .count { background: var(--sb-pill); color: var(--sb-ink); }
.sidebar .nav .count.attn { background: #f0c060; color: #061236; }
.sidebar .nav a.active .count { background: var(--sb-pill); }
.sidebar .sidefoot { color: var(--sb-faint); border-top-color: var(--sb-line); }
.sidebar .sideuser { color: var(--sb-ink-2); } .sidebar .sideuser b { color: var(--sb-ink); }
.sidebar .linkbtn { color: var(--lime); }
.topbar { background: var(--surface); }
.pagehead h1 { letter-spacing: -.02em; }
.eyebrow { letter-spacing: .12em; }
.card { border-radius: 12px; box-shadow: var(--shadow); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.loginpage { background-color: #040c24; background-image: linear-gradient(180deg, #01030a 0%, #040c24 45%, #030920 75%, #02061a 100%); }
.login { border-color: #1c2b55; }
.login .brand { background-color: #061236; background-image: linear-gradient(120deg, #061236 0%, #0a1446 60%, #201579 100%); color: #fff; }
.loginwrap { width: min(380px, 100%); }
.loginwrap .login { width: 100%; }

/* The Skan logo (brand/logo.png in white, its AI mark in Vikat cyan: brand/skan-logo-white.png) */
.brand .wordmark .skanlogo { display: block; height: 30px; width: auto; }
.login .brand .wordmark .skanlogo { height: 34px; }
.brand .product { margin-top: 8px; letter-spacing: .2px; }
/* A section that is a mock-up */
.wipbadge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--amber-bg); color: var(--amber-fg); border: 1px dashed currentColor; }
.wipbadge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* what the AI wrote on a rule-based result: marked, quiet, never replacing the rule's own text */
.airead { margin-top: 4px; padding-left: 8px; border-left: 2px solid var(--purple-fg); color: var(--ink-2); }
.jaibox { margin: 0 0 10px; }
.jaiwhy { margin-top: 12px; }
.dpsteps { margin: 8px 0 0; padding-left: 20px; }
.dpsteps li { margin: 3px 0; }
