/* Vestoris — one stylesheet for the marketing site and the app. Light and dark themes (data-theme on <html>).
   Palette tokens are defined once here. Text/background pairs are chosen for WCAG AA in both themes. */

:root {
  --blue: #205fe2;            /* primary: links, active states */
  --blue-dark: #1849b3;
  --blue-soft: #e8efff;
  --navy: #0b2a66;            /* headings, wordmark, dark surfaces */
  --navy-2: #12357d;
  --orange: #fd6714;          /* primary call to action (navy text on it: 4.6:1) */
  --orange-hi: #ff8a45;
  --orange-text: #cf470b;     /* orange as text on white (4.6:1) */
  --orange-deep: #b13c07;     /* orange text on tinted backgrounds (5:1 or more) */
  --orange-soft: #fff1e8;
  --red: #d41b29;             /* risk, violations, rejections, destructive actions only */
  --red-soft: #fdecee;
  --green: #157a3e;           /* good / approved status only */
  --green-soft: #e6f5ec;
  --amber: #8a5a00;
  --amber-soft: #fff6dc;

  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8faff;
  --ink: #14213d;
  --ink-strong: #0b2a66;
  --muted: #4b5878;
  --line: #d8dfec;
  --line-strong: #b9c4da;
  --link: var(--blue);
  --focus: #205fe2;
  --cta-ink: #0b2a66;
  --shadow: 0 1px 2px rgba(11, 42, 102, .06), 0 6px 20px rgba(11, 42, 102, .06);
  --radius: 10px;
  --stripe: linear-gradient(90deg, #205fe2 0%, #205fe2 55%, #fd6714 80%, #d41b29 100%);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --blue-soft: #16264a;
  --orange-text: #ff9a5c;
  --orange-deep: #ff9a5c;
  --orange-soft: #2a1a10;
  --red: #ff6b75;
  --red-soft: #3a1418;
  --green: #5fd38d;
  --green-soft: #10301f;
  --amber: #ffcf66;
  --amber-soft: #33270a;
  --bg: #0b1630;
  --surface: #111f3f;
  --surface-2: #0f1c3a;
  --ink: #e8edf7;
  --ink-strong: #ffffff;
  --muted: #a9b6d3;
  --line: #24365f;
  --line-strong: #34497a;
  --link: #8cb3ff;
  --focus: #8cb3ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { color: var(--ink-strong); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .86rem; }
.muted { color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: .9em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.stripe { height: 3px; background: var(--stripe); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ---------- logo (light / dark versions) */
.logo { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.logo img { display: block; height: 34px; width: auto; }
.logo .on-dark, :root[data-theme="dark"] .logo .on-light { display: none; }
:root[data-theme="dark"] .logo .on-dark { display: block; }
.logo .mark { display: none; height: 34px; }
.logo.always-white .on-light { display: none; }
.logo.always-white .on-dark { display: block; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px; border-radius: 8px; border: 1px solid transparent;
  font-family: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-cta { background: var(--orange); color: var(--cta-ink); border-color: var(--orange); }
.btn-cta:hover { background: var(--orange-hi); border-color: var(--orange-hi); }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: transparent; color: var(--link); border-color: currentColor; }
.btn-secondary:hover { background: var(--blue-soft); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--surface); color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-lg { min-height: 50px; padding: 12px 24px; font-size: 1.05rem; }
.btn-sm { min-height: 34px; padding: 5px 12px; font-size: .86rem; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
form.inline { display: inline; margin: 0; }
button.linklike { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; text-decoration: underline; }

/* ---------- public header */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.site-head .bar { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.site-nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.site-nav .nav-top, .app-nav .nav-top { display: inline-block; padding: 8px 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; border-radius: 6px; }
.site-nav .nav-top:hover, .site-nav .nav-top.on { color: var(--blue); background: var(--blue-soft); }
:root[data-theme="dark"] .site-nav .nav-top:hover, :root[data-theme="dark"] .site-nav .nav-top.on { color: #fff; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.head-actions .signin { font-weight: 600; text-decoration: none; padding: 8px 6px; }
.theme-toggle { background: transparent; border: 1px solid var(--line-strong); color: var(--ink); width: 38px; height: 38px; border-radius: 8px; cursor: pointer; flex: none; display: inline-grid; place-items: center; padding: 0; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun, :root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }

/* dropdown menus (menu.js; CSS hover and focus-within without it) */
.nav-group { position: relative; display: inline-flex; align-items: center; }
.nav-caret { background: transparent; border: 0; color: inherit; padding: 6px 4px; margin-left: -6px; cursor: pointer; font-size: .8rem; border-radius: 4px; }
.nav-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px; z-index: 50; }
.nav-menu.right { left: auto; right: 0; }
.nav-menu a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: .94rem; }
.nav-menu a small { display: block; color: var(--muted); font-size: .82rem; }
.nav-menu a:hover, .nav-menu a:focus { background: var(--blue-soft); }
.nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu, .nav-menu.is-open { display: block; }
.js-menus .nav-group:focus-within .nav-menu:not(.is-open) { display: none; }
.js-menus .nav-group:hover .nav-menu { display: block; }
.js-menus .nav-group.closed-by-click:hover .nav-menu:not(.is-open) { display: none; }

/* phone menu */
.mnav { display: none; }
.mnav > summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font-weight: 600; }
.mnav > summary::-webkit-details-marker { display: none; }
.mnav-body { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); padding: 10px 16px 18px; box-shadow: var(--shadow); max-height: 80vh; overflow-y: auto; }
.mnav-body a { display: block; padding: 10px 4px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.mnav-body details summary { padding: 10px 4px; font-weight: 700; color: var(--ink-strong); cursor: pointer; border-bottom: 1px solid var(--line); }
.mnav-body details a { padding-left: 16px; }
.mnav-body .btn { margin-top: 12px; width: 100%; }

/* ---------- marketing sections */
.hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(32, 95, 226, .14), transparent 60%), var(--surface); border-bottom: 1px solid var(--line); }
.hero .wrap { padding-top: 64px; padding-bottom: 56px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-deep); margin-bottom: 10px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.hero .btn-row { margin: 22px 0 14px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .9rem; padding: 0; margin: 0; list-style: none; }
.trust li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.section { padding: 64px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 30px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.section.alt .feature { background: var(--surface-2); box-shadow: none; }
.feature h3 { margin-top: 2px; }
.feature .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }
:root[data-theme="dark"] .feature .ico { color: #8cb3ff; }
.feature ul, .checks { padding-left: 0; list-style: none; margin: 0; }
.feature li, .checks li { padding-left: 22px; position: relative; margin: 6px 0; }
.feature li::before, .checks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--blue); }
.principle { border-left: 4px solid var(--orange); background: var(--surface); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 1.15rem; color: var(--ink-strong); box-shadow: var(--shadow); }
.flow { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; counter-reset: s; padding: 0; margin: 0; list-style: none; }
.flow li { counter-increment: s; flex: 1 1 160px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; position: relative; }
.flow li::before { content: counter(s); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: .85rem; margin-bottom: 6px; }
:root[data-theme="dark"] .flow li::before { background: var(--blue); }
.flow li b { display: block; color: var(--ink-strong); }
.shot { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); overflow: hidden; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { font-size: .85rem; color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--line); }
.band { background: var(--navy); color: #e8edf7; }
.band h2, .band h3 { color: #fff; }
.band .lede { color: #c9d4ee; }
.band a:not(.btn) { color: #a9c4ff; }
.band .btn-secondary { color: #fff; }
.band .btn-secondary:hover { background: rgba(255, 255, 255, .08); }
.callout { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; padding: 40px 0; }
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--blue); }
.price-card .btn { margin-top: auto; }
/* the sales line */
a.tel { white-space: nowrap; font-variant-numeric: tabular-nums; user-select: all; }
a.tel-strong { font-weight: 800; }
.sales-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; margin-top: 26px; max-width: 860px; }
.sales-number { font-size: clamp(1.7rem, 6vw, 2.4rem); font-weight: 800; line-height: 1.15; margin: 2px 0; }
.sales-number a.tel { color: var(--ink-strong); text-decoration: none; }
.sales-number a.tel:hover { text-decoration: underline; }
.sales-card { border: 2px solid var(--blue); }
.foot-sales { color: #fff; font-weight: 700; }
.site-foot .foot-sales a.tel { display: inline; padding: 0; color: #fff; }
.demo-sales { margin-left: auto; font-size: .86rem; }
.demo-sales a.tel { font-weight: 700; }
fieldset.sales-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.sales-fields[hidden] { display: none; }
.req { color: var(--red); }
.tag-placeholder { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--amber); background: var(--amber-soft); padding: 2px 8px; border-radius: 99px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; color: var(--ink-strong); }
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.6em; font-size: 1.35rem; }
.prose h3 { margin-top: 1.3em; }
.prose li { margin: .3em 0; }

/* ---------- footer */
.site-foot { background: var(--navy); color: #c9d4ee; margin-top: 0; }
:root[data-theme="dark"] .site-foot { background: #071026; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; padding: 44px 0 26px; }
.site-foot h4 { color: #fff; font-size: .95rem; margin-bottom: 10px; }
.site-foot a { color: #dfe7fa; text-decoration: none; display: block; padding: 3px 0; }
.site-foot a:hover { text-decoration: underline; }
.site-foot a.btn { display: inline-flex; padding: 9px 16px; }
.site-foot a.btn-cta, .mnav-body a.btn-cta { color: var(--cta-ink); text-decoration: none; }
.site-foot .legal { border-top: 1px solid rgba(255, 255, 255, .15); padding: 16px 0 26px; font-size: .85rem; color: #b8c5e4; }
.site-foot .logo img { height: 32px; }

/* ---------- notes, tags, cards, tables, forms (shared) */
.note { border: 1px solid var(--line); border-left-width: 4px; background: var(--surface); padding: 12px 16px; border-radius: 8px; margin: 0 0 16px; }
.note.ok { border-color: var(--green); background: var(--green-soft); }
.note.bad { border-color: var(--red); background: var(--red-soft); }
.note.warn { border-color: var(--amber); background: var(--amber-soft); }
.note.info { border-color: var(--blue); background: var(--blue-soft); }
.note > :last-child { margin-bottom: 0; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.tag.good { color: var(--green); background: var(--green-soft); border-color: transparent; }
.tag.bad { color: var(--red); background: var(--red-soft); border-color: transparent; }
.tag.warn { color: var(--amber); background: var(--amber-soft); border-color: transparent; }
.tag.info { color: var(--blue); background: var(--blue-soft); border-color: transparent; }
:root[data-theme="dark"] .tag.info { color: #8cb3ff; }
.tag.ai { color: var(--orange-deep); background: var(--orange-soft); border-color: transparent; }   /* 5.0:1 on the soft orange */
:root[data-theme="dark"] .tag.ai { color: var(--orange-text); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 20px; min-width: 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card h2 { font-size: 1.2rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -2px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:hover { background: var(--surface-2); }
.neg { color: var(--red); }
.pos { color: var(--green); }
label { display: block; font-weight: 600; margin: 12px 0 5px; font-size: .93rem; }
label .muted { font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; max-width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 11px; min-height: 42px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 2px solid var(--blue-soft); }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 14px 0; min-width: 0; }
legend { font-weight: 700; padding: 0 6px; }

/* ---------- the app shell */
.app-head { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 40; }
:root[data-theme="dark"] .app-head { background: #071026; border-bottom: 1px solid var(--line); }
.app-head .bar { display: flex; align-items: center; gap: 10px; min-height: 58px; max-width: 1400px; margin: 0 auto; padding: 0 16px; }
.app-head .logo img { height: 28px; }
.app-nav { display: flex; align-items: center; gap: 0; flex: 1; min-width: 0; }
.app-nav .nav-top { color: #e4ebfb; font-size: .92rem; padding: 8px 9px; }
.app-nav .nav-top:hover, .app-nav .nav-top.on { background: rgba(255, 255, 255, .12); color: #fff; }
.app-nav .nav-caret { color: #e4ebfb; }
.app-head .theme-toggle { color: #fff; border-color: rgba(255, 255, 255, .35); }
.firm-pill { font-size: .8rem; color: #cfdaf4; border: 1px solid rgba(255, 255, 255, .25); border-radius: 99px; padding: 3px 10px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; color: #fff; padding: 7px 10px; border-radius: 6px; font-size: .9rem; white-space: nowrap; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary:hover { background: rgba(255, 255, 255, .12); }
details.menu .menu-body { position: absolute; right: 0; top: 110%; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; min-width: 230px; z-index: 60; }
details.menu .menu-body a, details.menu .menu-body button { display: block; width: 100%; text-align: left; padding: 9px 12px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; border-radius: 6px; cursor: pointer; }
details.menu .menu-body a:hover, details.menu .menu-body button:hover { background: var(--blue-soft); }
details.menu .menu-body hr { margin: 6px 0; }
.paper-bar { background: var(--amber-soft); color: var(--amber); border-bottom: 1px solid var(--line); font-size: .86rem; font-weight: 600; }
.paper-bar .in { max-width: 1400px; margin: 0 auto; padding: 6px 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.demo-bar { background: var(--blue-soft); border-bottom: 1px solid var(--line); font-size: .9rem; }
.demo-bar .in { max-width: 1400px; margin: 0 auto; padding: 8px 16px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.demo-bar select { width: auto; min-height: 34px; padding: 4px 8px; }
.demo-bar label { display: inline; margin: 0; }
.role-switch { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
main.app { max-width: 1400px; margin: 0 auto; padding: 22px 16px 60px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.page-head h1 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0; }
.page-head p { margin: 4px 0 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.stat .k { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 1.45rem; font-weight: 800; color: var(--ink-strong); font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stat { padding: 12px; } .stat .v { font-size: clamp(1rem, 5vw, 1.3rem); overflow-wrap: normal; white-space: nowrap; } }
.stat.risk .v { color: var(--red); }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }
.cols-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.bar-row { display: grid; grid-template-columns: 160px 1fr 64px; gap: 10px; align-items: center; font-size: .9rem; margin: 6px 0; }
.bar-row .track { height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; position: relative; overflow: hidden; }
.bar-row .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue); border-radius: 99px; }
.bar-row .fill.over { background: var(--red); }
.bar-row .limit { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--red); }
.bar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 14px; }
.stage > header { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.stage > header .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 800; flex: none; }
:root[data-theme="dark"] .stage > header .n { background: var(--blue); }
.stage.done > header .n { background: var(--green); }
.stage.blocked > header .n { background: var(--red); }
.stage.wait { opacity: .75; }
.stage .body { padding: 12px 16px; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 820px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--blue-soft); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: .93rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: .82rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; max-height: 420px; overflow: auto; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .axis { stroke: var(--line-strong); }
.chart .line { fill: none; stroke: var(--blue); stroke-width: 2; }
.chart .lbl { fill: var(--muted); font-size: 11px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.tabs a { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .88rem; }
.tabs a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
:root[data-theme="dark"] .tabs a.on { background: var(--blue); border-color: var(--blue); }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; }

/* guided tour */
.tour { position: fixed; right: 16px; bottom: 16px; width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 2px solid var(--orange); border-radius: 12px; box-shadow: 0 10px 40px rgba(11, 42, 102, .28); z-index: 80; padding: 14px 16px; }
.tour h3 { margin: 2px 0 6px; font-size: 1.02rem; }
.tour p { font-size: .9rem; margin-bottom: 10px; }
.tour .step { font-size: .78rem; font-weight: 700; color: var(--orange-text); text-transform: uppercase; letter-spacing: .05em; }
.tour .btn-row { gap: 6px; }
.tour.min { width: auto; padding: 8px 12px; }
[data-tour].tour-hl { outline: 3px solid var(--orange); outline-offset: 4px; border-radius: 6px; animation: tourpulse 1.6s ease-in-out 3; }
@keyframes tourpulse { 50% { outline-color: rgba(253, 103, 20, .25); } }
@media (prefers-reduced-motion: reduce) { [data-tour].tour-hl { animation: none; } }

/* ---------- responsive */
@media (max-width: 1100px) {
  .site-nav, .head-actions .signin { display: none; }
  .mnav { display: block; }
  .site-head .bar { justify-content: space-between; }
  .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-nav { display: none; }
  .app-head .mnav { display: block; margin-left: auto; }
  .app-head .mnav > summary { color: #fff; border-color: rgba(255, 255, 255, .35); }
  .firm-pill { display: none; }
}
@media (max-width: 860px) {
  .grid-3, .grid-2, .cols-2, .cols-even, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
  .section { padding: 44px 0; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .site-foot .cols { grid-template-columns: 1fr; }
  .logo .on-light, .logo .on-dark, :root[data-theme="dark"] .logo .on-dark { display: none; }
  .logo .mark { display: block; }
  .logo.always-white .on-dark { display: none; }
  .head-actions .btn-cta { padding: 8px 12px; font-size: .88rem; }
  .bar-row { grid-template-columns: 96px 1fr 52px; }
  .btn-lg { width: 100%; }
  main.app { padding: 16px 12px 50px; }
  .card { padding: 14px; }
  .app-head .user-menu > summary { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 6px; }
}
@media print {
  .site-head, .app-head, .site-foot, .demo-bar, .tour, .theme-toggle { display: none !important; }
}

/* screenshots in both themes */
.themed .on-dark { display: none; }
:root[data-theme="dark"] .themed .on-light { display: none; }
:root[data-theme="dark"] .themed .on-dark { display: block; }
.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; }

/* ======================================================================== the trade blotter (dense trading grid) */
:root { --bl-bg: #f3f6fc; --bl-panel: #ffffff; --bl-row: #ffffff; --bl-row2: #f6f8fd; --bl-hover: #e8efff; --bl-sel: #dce7ff; --bl-line: #dde3ef; --bl-ink: #14213d; --bl-muted: #4b5878;
  --bl-hdr: #eef2fa; --bl-pos: #0f6b34; --bl-neg: #b3141f; --bl-up: rgba(21, 122, 62, .22); --bl-dn: rgba(212, 27, 41, .2); --bl-st: rgba(253, 103, 20, .22); --bl-bar: #205fe2; --bl-bar-bg: #dfe6f5; }
:root[data-theme="dark"] { --bl-bg: #070f22; --bl-panel: #0b1630; --bl-row: #0b1630; --bl-row2: #0e1a37; --bl-hover: #16264a; --bl-sel: #1b3266; --bl-line: #1d2c50; --bl-ink: #dfe7f7; --bl-muted: #9fb0d2;
  --bl-hdr: #0f1d3d; --bl-pos: #5fd38d; --bl-neg: #ff7a83; --bl-up: rgba(95, 211, 141, .25); --bl-dn: rgba(255, 107, 117, .25); --bl-st: rgba(253, 103, 20, .3); --bl-bar: #4d8dff; --bl-bar-bg: #1a2a4f; }
body.blotter-page { background: var(--bl-bg); }
main.app.app-wide { max-width: none; padding: 0; }
main.app.app-wide > .note { margin: 8px 12px; }
.bl { color: var(--bl-ink); font-size: 12px; line-height: 1.3; display: flex; flex-direction: column; min-height: calc(100vh - 150px); background: var(--bl-bg); }
.bl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 12px; background: var(--bl-panel); border-bottom: 1px solid var(--bl-line); }
.bl-head h1 { font-size: 1.05rem; margin: 0 6px 0 0; color: var(--ink-strong); letter-spacing: 0; }
.bl-seg { display: inline-flex; border: 1px solid var(--bl-line); border-radius: 6px; overflow: hidden; }
.bl-seg button { font: inherit; border: 0; background: transparent; color: var(--bl-ink); padding: 4px 10px; cursor: pointer; }
.bl-seg button[aria-selected="true"] { background: var(--blue); color: #fff; }
.bl-btn { font: inherit; font-size: 12px; border: 1px solid var(--bl-line); background: var(--bl-row2); color: var(--bl-ink); padding: 4px 9px; border-radius: 5px; cursor: pointer; white-space: nowrap; }
.bl-btn:hover { border-color: var(--blue); }
.bl-btn:focus-visible, .bl-seg button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.bl-btn-p { background: var(--blue); border-color: var(--blue); color: #fff; }
.bl-btn-d { background: #8f1620; border-color: #8f1620; color: #fff; }
.bl-btn.xs { padding: 1px 6px; }
.bl select, .bl input[type=text], .bl input[type=search], .bl input[type=number] { font: inherit; font-size: 12px; background: var(--bl-row); color: var(--bl-ink); border: 1px solid var(--bl-line); border-radius: 5px; padding: 4px 7px; min-height: 0; width: auto; }
.bl-saved { max-width: 170px; }
.bl-search { margin-left: auto; }
.bl-search input { width: 210px; }
.bl-live { display: inline-flex; align-items: center; gap: 5px; color: var(--bl-muted); }
.bl-live i { width: 8px; height: 8px; border-radius: 50%; background: #5fd38d; box-shadow: 0 0 0 3px rgba(95, 211, 141, .2); }
.bl-live.paused i { background: #ffcf66; box-shadow: none; }
.bl-live.off i { background: #ff6b75; box-shadow: none; }
.bl-export { position: relative; }
.bl-pop { position: absolute; z-index: 30; background: var(--bl-panel); border: 1px solid var(--bl-line); border-radius: 8px; padding: 8px; box-shadow: var(--shadow); min-width: 160px; }
.bl-export .bl-pop { right: 0; top: 110%; }
.bl-pop a { display: block; padding: 5px 8px; color: var(--bl-ink); text-decoration: none; border-radius: 5px; }
.bl-pop a:hover { background: var(--bl-hover); }
.bl-cols { right: 12px; top: 120px; width: 280px; max-height: 70vh; overflow: auto; }
.colist { list-style: none; margin: 6px 0; padding: 0; }
.colist li { display: flex; justify-content: space-between; align-items: center; padding: 2px 0; gap: 6px; }
.bl-ai { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 12px; background: var(--bl-panel); border-bottom: 1px solid var(--bl-line); }
.bl-nl { display: flex; align-items: center; gap: 6px; flex: 1 1 420px; }
.bl-nl input { flex: 1; min-width: 0; }
.bl-ai-badge { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #0b2a66; background: #fd6714; border-radius: 4px; padding: 1px 5px; }
.bl-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.fchip { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-soft); color: var(--bl-ink); border: 1px solid var(--bl-line); border-radius: 99px; padding: 1px 4px 1px 9px; }
.fchip button { border: 0; background: transparent; color: var(--bl-muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px; }
.bl-brief { padding: 8px 14px; background: var(--bl-panel); border-bottom: 1px solid var(--bl-line); font-size: 13px; }
.bl-brief p { margin: 6px 0 0; }
.bl-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 12px; background: var(--bl-sel); border-bottom: 1px solid var(--bl-line); }
.bl-grid { position: relative; flex: 1; outline: none; }
.bl-grid:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.bl-scroll { position: relative; overflow: auto; height: calc(100vh - 262px); min-height: 320px; }
.bl-hdr, .bl-flt, .br { display: grid; grid-template-columns: var(--bl-cols); width: var(--bl-width); }
.bl-hdr { position: sticky; top: 0; z-index: 6; background: var(--bl-hdr); border-bottom: 1px solid var(--bl-line); }
.bl-flt { position: sticky; top: 25px; z-index: 6; background: var(--bl-hdr); border-bottom: 1px solid var(--bl-line); }
.bl-hdr .h { position: relative; padding: 5px 6px; height: 25px; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .02em; color: var(--bl-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; user-select: none; background: var(--bl-hdr); }
.bl-hdr .h.n { text-align: right; }
.bl-hdr .h sup { font-size: 9px; }
.rz { position: absolute; right: 0; top: 0; width: 6px; height: 100%; cursor: col-resize; }
.rz:hover { background: var(--blue); }
.bl-flt .fc { padding: 2px 3px; background: var(--bl-hdr); height: 26px; }
.bl-flt input { width: 100%; padding: 2px 5px !important; font-size: 11px !important; }
.fset { width: 100%; font: inherit; font-size: 11px; text-align: left; border: 1px solid var(--bl-line); background: var(--bl-row); color: var(--bl-muted); border-radius: 5px; padding: 2px 5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-body { position: relative; width: var(--bl-width); }
.br { position: absolute; left: 0; height: 24px; background: var(--bl-row); border-bottom: 1px solid var(--bl-line); cursor: default; }
.br.odd { background: var(--bl-row2); }
.br:hover { background: var(--bl-hover); }
.br.sel { background: var(--bl-sel); }
.br.foc, .br.open { box-shadow: inset 3px 0 0 var(--orange); }
.br .c { padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; background: inherit; }
.br .c.n { text-align: right; }
.pin { position: sticky; z-index: 2; }
.bl-hdr .pin, .bl-flt .pin { position: sticky; z-index: 7; }
.pin-last { box-shadow: 2px 0 0 var(--bl-line); }
.br .more { border: 0; background: transparent; color: var(--bl-muted); cursor: pointer; padding: 0 3px; font-size: 13px; line-height: 14px; margin-left: 2px; }
.br:hover .more, .br.foc .more, .br .more:focus { color: var(--bl-ink); }
.br .c[data-k="sel"] { padding: 3px 2px 3px 6px; display: flex; align-items: center; }
.br.grp { background: var(--bl-hdr); font-weight: 600; }
.br.grp .gc { grid-column: 1 / -1; padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-grid { padding: 30px; color: var(--bl-muted); }
.chip { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 11px; font-weight: 700; line-height: 17px; white-space: nowrap; color: #fff; }
.st-new { background: #205fe2; } .st-pend { background: #4b5563; } .st-appr { background: #3b4f7a; } .st-work { background: #0f766e; } .st-part { background: #fd6714; color: #0b2a66; }
.st-fill { background: #15803d; } .st-canc { background: #5c1f24; color: #ffc6cb; } .st-rej { background: #c21625; } .st-hold { background: #f2a516; color: #231600; }
.sd-buy { background: #205fe2; } .sd-sell { background: #c21625; }
.al-twap { background: #6d28d9; } .al-vwap { background: #0e7490; } .al-mkt { background: #475569; } .al-lmt { background: #4338ca; }
.cp-pass { background: #15803d; } .cp-warn { background: #f2a516; color: #231600; } .cp-ovr { background: #9a3412; } .cp-blk { background: #c21625; } .cp-none { background: transparent; color: var(--bl-muted); }
.pos { color: var(--bl-pos); } .neg { color: var(--bl-neg); }
.pbar { display: inline-block; width: 56px; height: 8px; background: var(--bl-bar-bg); border-radius: 2px; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--bl-bar); }
.pc { display: inline-block; min-width: 34px; }
.flag { font: inherit; font-size: 10px; font-weight: 700; border: 0; border-radius: 3px; padding: 0 5px; line-height: 16px; cursor: pointer; background: #f2a516; color: #231600; }
.flag.fl-high { background: #c21625; color: #fff; }
.fl-up { animation: blUp 1.2s ease-out; } .fl-dn { animation: blDn 1.2s ease-out; } .br.fl-st { animation: blSt 1.4s ease-out; }
@keyframes blUp { from { background: var(--bl-up); } } @keyframes blDn { from { background: var(--bl-dn); } } @keyframes blSt { from { background: var(--bl-st); } }
@media (prefers-reduced-motion: reduce) { .fl-up, .fl-dn, .br.fl-st { animation: none; } }
.bl-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 6px 12px; background: var(--bl-panel); border-top: 1px solid var(--bl-line); color: var(--bl-muted); }
.bl-sim { margin-left: auto; }
.bl-menu { position: fixed; z-index: 50; background: var(--bl-panel); color: var(--bl-ink); border: 1px solid var(--bl-line); border-radius: 8px; padding: 4px; box-shadow: var(--shadow); min-width: 220px; max-height: 60vh; overflow: auto; }
.bl-menu .mh { font-weight: 700; padding: 5px 8px; color: var(--bl-muted); }
.bl-menu .mi { display: block; width: 100%; text-align: left; font: inherit; background: none; border: 0; color: var(--bl-ink); padding: 6px 8px; border-radius: 5px; cursor: pointer; }
.bl-menu .mi:hover, .bl-menu .mi:focus { background: var(--bl-hover); outline: none; }
.bl-menu .mf { display: flex; justify-content: flex-end; gap: 6px; padding: 6px; }
.bl-drawer { position: fixed; z-index: 45; right: 0; top: 0; bottom: 0; width: min(460px, 100vw); background: var(--bl-panel); color: var(--bl-ink); border-left: 1px solid var(--bl-line); box-shadow: -10px 0 30px rgba(0, 0, 0, .25); overflow: auto; font-size: 13px; }
.bl-drawer-in { padding: 14px 16px 40px; }
.dh { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.dh h2 { font-size: 1.15rem; margin: 2px 0 6px; }
.dnote { background: var(--bl-row2); border-left: 3px solid #f2a516; padding: 6px 9px; margin: 10px 0; }
.dkv { display: grid; grid-template-columns: 130px 1fr; gap: 3px 10px; margin: 10px 0; }
.dkv dt { color: var(--bl-muted); } .dkv dd { margin: 0; font-variant-numeric: tabular-nums; }
.dacts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.dform { display: grid; gap: 6px; margin: 8px 0; padding: 8px; border: 1px solid var(--bl-line); border-radius: 8px; }
.dform label { display: grid; gap: 3px; font-size: 12px; color: var(--bl-muted); }
.dform textarea { font: inherit; background: var(--bl-row); color: var(--bl-ink); border: 1px solid var(--bl-line); border-radius: 5px; padding: 5px; min-height: 60px; }
.dform .ck { display: flex; gap: 6px; align-items: center; }
.dmsg { margin: 0; color: var(--bl-neg); }
.bl-drawer h3 { font-size: .9rem; margin: 14px 0 6px; color: var(--bl-muted); text-transform: uppercase; letter-spacing: .03em; }
.dt { width: 100%; border-collapse: collapse; font-size: 12px; }
.dt th, .dt td { padding: 3px 5px; border-bottom: 1px solid var(--bl-line); text-align: left; font-variant-numeric: tabular-nums; }
.dt .n { text-align: right; }
.dchk { padding: 5px 0; border-bottom: 1px solid var(--bl-line); }
.dhist { list-style: none; padding: 0; margin: 0; } .dhist li { padding: 4px 0; border-bottom: 1px solid var(--bl-line); }
.dwhy { border: 1px solid var(--bl-line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; background: var(--bl-row2); }
.dwhy h3 { margin-top: 0; }
.bl-toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); background: #0b2a66; color: #fff; padding: 8px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: 13px; }
.bl-toast.bad { background: #8f1620; }
.bl-cards { display: none; }
@media (max-width: 760px) {
  .bl-grid { display: none; }
  .bl-cards { display: grid; gap: 8px; padding: 10px; }
  .ocard { display: grid; gap: 4px; text-align: left; font: inherit; font-size: 13px; color: var(--bl-ink); background: var(--bl-panel); border: 1px solid var(--bl-line); border-radius: 8px; padding: 9px 10px; cursor: pointer; width: 100%; }
  .ocard .l3 { color: var(--bl-muted); font-size: 12px; }
  .flagtxt { color: var(--bl-neg); }
  .card-grp { font-weight: 700; padding: 4px 2px; color: var(--bl-muted); }
  .bl-search { margin-left: 0; width: 100%; } .bl-search input { width: 100%; }
  .bl-drawer { width: 100vw; }
  .bl-sim { margin-left: 0; }
  .bl-nl { flex-basis: 100%; }
}

/* ---------------------------------------------------------------- compliance engine (1.1.0) */
.quote { margin: 0 0 12px; padding: 10px 14px; border-left: 4px solid var(--line-strong); background: var(--surface-2); border-radius: 0 8px 8px 0; font-style: italic; color: var(--ink); }
.quote.small { font-size: .9rem; padding: 6px 10px; }
.restate { margin: 0 0 12px; padding: 10px 14px; border-left: 4px solid var(--blue); background: var(--blue-soft); border-radius: 0 8px 8px 0; color: var(--ink); }
.meaning h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 6px; }
.hl { display: inline; background: var(--amber-soft); color: var(--amber); border-radius: 4px; padding: 1px 5px; }
p.hl { display: block; padding: 8px 12px; border-left: 4px solid var(--amber); border-radius: 0 8px 8px 0; }
.row-split { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline; }
.linkish { background: none; border: 0; padding: 0 2px; color: var(--link); cursor: pointer; font: inherit; text-decoration: underline; }
.linkish:hover { color: var(--blue-dark); }
.tag .linkish { text-decoration: none; color: var(--muted); }
fieldset.qa { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 12px; margin: 0 0 12px; }
fieldset.qa legend { font-weight: 700; padding: 0 6px; color: var(--ink-strong); }
label.radio { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 4px 0; cursor: pointer; }
label.radio input { width: auto; margin: 0; }
pre.code, textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
pre.code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; margin: 0 0 12px; }
.coverage { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 0 0 10px; background: var(--surface); }
.coverage .quote { margin: 6px 0; }
.pkg { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 0 0 12px; background: var(--surface); }
.pkg h3 { margin: 0 0 4px; }
.pkg form.btn-row input { width: auto; flex: 1 1 140px; }
ul.hist { list-style: none; padding: 0; margin: 0; }
ul.hist li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.hist li:last-child { border-bottom: 0; }
fieldset.scope-ids { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
fieldset.scope-ids legend { padding: 0 6px; font-weight: 600; }
fieldset.scope-ids label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
fieldset.scope-ids input { width: auto; margin: 0; }
.signoff { border-left: 4px solid var(--orange); }
form.sendback { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
details.add { margin: 8px 0 0; }
details.add > summary:not(.btn) { cursor: pointer; color: var(--link); font-weight: 600; }
details.add > summary { cursor: pointer; }
details.add[open] > summary { margin-bottom: 8px; }
.card.reg { break-inside: avoid; }
table.privs th { font-size: .75rem; white-space: nowrap; text-align: center; }
table.privs td { text-align: center; }
table.privs td:first-child { text-align: left; min-width: 160px; }
table.privs select.priv { width: auto; min-width: 74px; padding: 3px 6px; font-size: .8rem; }
table.privs select.priv.adj { border-color: var(--orange); background: var(--orange-soft); font-weight: 700; }

/* ---- 1.2.0: data loading center, feeds, start of day, the Data Feed Reference ---- */
.sod-bar { background: var(--red-soft); color: var(--ink-strong); border-bottom: 1px solid var(--line); font-size: .86rem; }
.sod-bar .in { max-width: 1400px; margin: 0 auto; padding: 6px 16px; }
.sod-bar strong { color: var(--red); }
.sod-chain { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.sod-chain li { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); min-width: 0; }
.sod-chain li b { display: block; font-size: .86rem; color: var(--ink-strong); }
.sod-chain li small { display: block; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; margin-top: 4px; }
.sod-chain li.done { border-left: 4px solid var(--green); }
.sod-chain li.blocked { border-left: 4px solid var(--red); background: var(--red-soft); }
.sod-chain li.waiting { border-left: 4px solid var(--amber); }
.sod-chain li.na { opacity: .6; }
.drop { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 16px; background: var(--surface-2); }
.diff-old { color: var(--red); text-decoration: line-through; }
.diff-new { color: var(--green); font-weight: 700; }
.token-once { font-family: var(--mono); font-size: .95rem; padding: 10px 12px; border: 2px solid var(--orange); border-radius: 8px; background: var(--orange-soft); overflow-wrap: anywhere; color: var(--ink-strong); }
.mapgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 14px; align-items: center; max-width: 720px; }
.mapgrid select { width: 100%; }
.fref { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.fref-nav { position: sticky; top: 12px; font-size: .9rem; max-height: calc(100vh - 24px); overflow: auto; }
.fref-nav ul { list-style: none; margin: 0 0 14px; padding: 0; }
.fref-nav li a { display: block; padding: 3px 8px; border-radius: 6px; text-decoration: none; }
.fref-nav li a.on { background: var(--navy); color: #fff; }
.fref-nav h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 10px 0 4px; }
.fref-search { position: relative; margin-bottom: 12px; }
.fref-search input { width: 100%; }
.fref-results { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); max-height: 340px; overflow: auto; }
.fref-results a { display: block; padding: 6px 10px; text-decoration: none; border-bottom: 1px solid var(--line); font-size: .86rem; }
.fref-results a small { display: block; color: var(--muted); }
.fref-results a:focus, .fref-results a:hover { background: var(--surface-2); }
.fref table code { white-space: nowrap; }
.fref tr:target, .fref li:target, .fref dt:target { background: var(--orange-soft); }
.xml-sample { position: relative; }
.xml-sample pre { margin: 0; max-height: 460px; }
.xml-sample .copy { position: absolute; top: 8px; right: 8px; }
.xml-sample .cm { color: var(--muted); }
.anchor { text-decoration: none; color: var(--muted); margin-left: 4px; font-weight: 400; }
@media (max-width: 900px) { .fref { grid-template-columns: 1fr; } .fref-nav { position: static; max-height: none; } }
@media print { .fref-nav, .site-head, .site-foot, .xml-sample .copy, .no-print { display: none !important; } .fref { display: block; } }

/* ---- 1.2.1: folder uploads ---- */
.folder-drop { text-align: center; }
.folder-drop.over { border-color: var(--blue); background: var(--blue-soft); }
.folder-drop .btn-row { justify-content: center; }
.folder-up .zip-note { display: none; margin: 8px 0 0; }
.folder-up.zip-only .folder-only { display: none !important; }
.folder-up.zip-only .zip-note { display: block; }
@media (pointer: coarse) { .folder-up .folder-only { display: none !important; } .folder-up .zip-note { display: block; } }
.folder-progress { margin: 10px 0 0; padding-left: 22px; font-size: .86rem; max-height: 240px; overflow: auto; font-family: var(--mono); }
.folder-progress li.done { color: var(--green); }
.bundle-files tr.muted td { opacity: .6; }
.bundle-files select { min-width: 170px; }

/* ---- 1.3: workflow monitor ---- */
.wf-top { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.wf-top .tabs { margin: 0; }
.wf-avail { display: flex; gap: 8px; align-items: center; margin: 0; }
.wf-count { display: inline-block; min-width: 1.4em; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; text-align: center; line-height: 1.5; }
.tabs a.on .wf-count { background: var(--orange); color: var(--cta-ink); }
.wf-fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.wf-fgrid label { font-size: .85rem; }
.wf-fgrid select, .wf-fgrid input { width: 100%; }
.wf-filters .btn-row { align-items: center; }
.wf-layout { display: inline-flex; gap: 4px; margin-left: auto; }
.wf-vlist { margin: 8px 0 12px; padding-left: 20px; }
.wf-views summary, .wf-views form { font-size: .92rem; }
.wf-live { display: flex; align-items: center; gap: 6px; font-size: .85rem; margin: 0 0 8px; }
.wf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.wf-table td { vertical-align: top; }
.wf-table tr.wf-sla-red td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.wf-table tr.wf-sla-amber td:first-child { box-shadow: inset 4px 0 0 var(--amber); }
.wf-acts { white-space: nowrap; }
.wf-acts .btn { margin: 0 2px 4px 0; }
.wf-sla { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; border: 1px solid var(--line); color: var(--muted); background: var(--surface-2); }
.wf-sla.green { color: var(--green); background: var(--green-soft); border-color: transparent; }
.wf-sla.amber { color: var(--amber); background: var(--amber-soft); border-color: transparent; }
.wf-sla.red { color: var(--red); background: var(--red-soft); border-color: transparent; }
.wf-kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.wf-col { flex: 0 0 260px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; max-height: 70vh; overflow-y: auto; }
.wf-col h3 { font-size: .9rem; margin: 0 0 8px; }
.wf-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: .88rem; }
.wf-card.wf-sla-red { border-left: 4px solid var(--red); }
.wf-card.wf-sla-amber { border-left: 4px solid var(--amber); }
.wf-card .wf-meta { margin: 4px 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.wf-brief-text ul, .wf-sugg { margin: 8px 0; padding-left: 20px; }
.wf-brief h3 { font-size: 1rem; margin-top: 12px; }
.wf-actgrid { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.wf-actgrid form { margin: 0; }
.wf-comments, .wf-notes { list-style: none; margin: 10px 0 0; padding: 0; }
.wf-comments li, .wf-notes li { padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.wf-comments li.sys { color: var(--muted); font-size: .9rem; }
.wf-notes li.unread { font-weight: 600; }
.wf-watch { margin: 8px 0 0; }
.wf-why { margin-top: 14px; }
.wf-bar { display: inline-block; vertical-align: middle; width: 80px; height: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; margin-left: 6px; }
.wf-bar span { display: block; height: 100%; background: var(--blue); }
.wf-bar.over span { background: var(--red); }
.wf-appr { list-style: none; margin: 0; padding: 0; }
.wf-appr li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.wf-types { columns: 2; margin: 0; padding-left: 20px; }
.wf-member { display: inline-block; margin: 0 10px 4px 0; }
.wf-conds select, .wf-conds input { width: 100%; min-width: 110px; }
.wf-form .wf-fs { margin: 0 0 14px; }
.wf-form .wf-fs legend label { font-weight: 700; }
.wf-form .lbl { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.wf-form .check { display: inline-flex; margin-right: 12px; }
.wf-stageform label { font-size: .85rem; }
.wf-stageform input { max-width: 120px; }
@media (max-width: 560px) { .wf-layout { margin-left: 0; } .wf-types { columns: 1; } .wf-col { flex-basis: 82vw; } .wf-bar { display: none; } }
/* 1.3: the app menu has a Workflow group; between the phone menu and wide screens the firm pill gives way */
@media (max-width: 1400px) { .app-head .firm-pill { display: none; } }
@media (max-width: 1250px) { .app-nav .nav-top { padding: 8px 6px; font-size: .88rem; } .app-nav .nav-caret { padding-left: 0; padding-right: 2px; } }
.table-wrap { position: relative; }   /* screen-reader-only labels in a header cell stay inside the scroll box */
.wf-form fieldset { min-width: 0; }
.wf-form select[multiple] { width: 100%; max-width: 480px; display: block; }
.wf-form .wf-fs p { overflow-wrap: anywhere; }
.wf-actgrid select, .wf-actgrid input { max-width: 260px; }
.wf-actgrid .btn-row { flex-wrap: nowrap; }
@media (max-width: 560px) { .wf-actgrid .btn-row { flex-wrap: wrap; } }
.wf-fs { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.wf-fs legend { padding: 0 6px; }
:root[data-theme="dark"] .wf-count { color: #2a0508; }

/* ---- 1.3.1: blotter views (density, alignment, colour rules from a safe list) ---- */
.bl-normal .br { height: 30px; }
.bl-normal .br .c { padding-top: 7px; padding-bottom: 7px; }
.br .c.ctr, .bl-hdr .h.ctr { text-align: center; }
.br .c.cr-red { color: var(--red); font-weight: 700; }
.br .c.cr-amber { color: var(--amber); font-weight: 700; }
.br .c.cr-green { color: var(--green); font-weight: 700; }
.br .c.cr-blue { color: var(--link); font-weight: 700; }
.br .c.cr-grey { color: var(--bl-muted); }

/* ---- 1.3.1: the blotter view editor ---- */
.ve-lists { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr); gap: 16px; align-items: start; }
.ve-lists .card { margin: 0; }
.ve-avail input[type=search] { width: 100%; margin-bottom: 8px; }
.ve-groups { max-height: 460px; overflow-y: auto; }
.ve-group h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 0 4px; }
.ve-group ul, .ve-list { list-style: none; margin: 0; padding: 0; }
.ve-group li, .ve-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 4px; background: var(--surface); cursor: grab; }
.ve-group li:focus, .ve-list li:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
.ve-list li.on { border-color: var(--blue); background: var(--blue-soft); }
.ve-list { max-height: 520px; overflow-y: auto; }
.ve-name { overflow-wrap: anywhere; min-width: 0; }
.ve-btns { display: flex; gap: 2px; flex-shrink: 0; }
.ve-btns .btn { padding: 2px 8px; }
.ve-colform label { display: block; margin-bottom: 8px; }
.ve-colform input[type=text], .ve-colform input[type=number], .ve-colform select { width: 100%; }
.ve-num { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin: 0 0 8px; min-width: 0; }
.ve-viewset { margin-top: 16px; }
.ve-vgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; }
.ve-vgrid select, .ve-vgrid input { width: 100%; }
.ve-filters, .ve-colors { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 10px 0 0; min-width: 0; }
.ve-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0; align-items: center; }
.ve-checks .check { display: inline-flex; }
.ve-checks .lbl { font-weight: 600; font-size: .9rem; }
.ve-color { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.ve-color select, .ve-color input { width: auto; max-width: 200px; }
.ve-preview { margin-top: 16px; }
.ve-grid { font-size: .82rem; font-variant-numeric: tabular-nums; }
.ve-grid td, .ve-grid th { padding: 3px 8px; white-space: nowrap; }
.ve-grid tr.normal td { padding: 8px; }
.ve-grid .n { text-align: right; }
.ve-grid .ctr { text-align: center; }
.ve-grid td.cr-red { color: var(--red); font-weight: 700; } .ve-grid td.cr-amber { color: var(--amber); font-weight: 700; } .ve-grid td.cr-green { color: var(--green); font-weight: 700; }
.ve-grid td.cr-blue { color: var(--link); font-weight: 700; } .ve-grid td.cr-grey { color: var(--muted); }
.ve-grid tr.ve-grp td { background: var(--surface-2); font-weight: 600; }
.ve-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 16px 0; }
.ve-manage .btn-row form { margin: 0; }
@media (max-width: 1100px) { .ve-lists { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ve-colset { grid-column: 1 / -1; } }
@media (max-width: 700px) { .ve-lists { grid-template-columns: minmax(0, 1fr); } }
/* 1.3.1 user-defined fields */
.btn-row .grow { flex: 1 1 260px; min-width: 0; }
.udf-slot summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.udf-slotno { font-family: var(--mono, ui-monospace, monospace); font-size: .8rem; color: var(--muted); min-width: 4.5em; }
.udf-form { margin-top: 12px; }
.udf-flags { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 4px 18px; min-width: 0; }
.udf-flags legend { font-weight: 600; padding: 0 4px; }
.udf-hist { margin: 4px 0 0; padding-left: 18px; font-size: .88rem; color: var(--muted); }
.udf-fields { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 12px 0; min-width: 0; }
.udf-fields legend { font-weight: 600; padding: 0 4px; }
/* 1.3.2 natural-language command bars */
.nl-bar label { font-weight: 700; }
.nl-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.nl-row input[type=text] { flex: 1 1 auto; min-width: 0; }
.nl-mic.on { color: var(--red); border-color: var(--red); }
.nl-help { margin: 8px 0 0; }
.nl-more { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin-top: 6px; }
.nl-more details summary { cursor: pointer; font-size: .9rem; }
.nl-chips { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.nl-chip { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 99px; padding: 4px 12px; font: inherit; font-size: .85rem; cursor: pointer; text-align: left; }
.nl-chip:hover, .nl-chip:focus-visible { border-color: var(--blue); }
.nl-title { font-size: 1.5rem; overflow-wrap: anywhere; }
.nl-items td { vertical-align: top; }
.nl-items td:nth-child(2), .nl-items td:nth-child(4) { min-width: 140px; }
.nl-cons { margin: 6px 0 12px; padding-left: 20px; }
.nl-skipped summary { cursor: pointer; color: var(--muted); }
.cp-handoff { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.cp-handoff form { margin: 0; }
.bl-cmd { display: flex; gap: 6px; align-items: center; padding: 6px 12px; border-top: 1px solid var(--bl-line); flex-wrap: wrap; }
.bl-cmd-l { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--bl-muted); }
.bl-cmd input[type=text] { flex: 1 1 260px; min-width: 0; }
.bl-cmd-help { font-size: .8rem; color: var(--bl-muted); }
@media (max-width: 640px) { .nl-row { flex-wrap: wrap; } .nl-row input[type=text] { flex-basis: 100%; } }
@media (max-width: 640px) {
  .nl-items thead { display: none; }
  .nl-items, .nl-items tbody, .nl-items tr, .nl-items td { display: block; width: 100%; }
  .nl-items tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .nl-items td { border: 0; padding: 2px 0; min-width: 0 !important; }
  .nl-items td[aria-hidden="true"] { display: none; }
  .nl-items td:nth-child(4)::before { content: "→ "; color: var(--muted); }
}

/* ------------------------------------------------------------------ 1.4.0: the API pages, consent, console, developer docs */
.scope-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 14px; margin: 6px 0 4px; }
.scope-grid .check { font-size: .86rem; }
.consent-scopes li { margin: 4px 0; }
.consent-scopes .muted code { opacity: .6; }
.api-console textarea, .api-console input { font-family: var(--mono); }
.console-out { max-height: 460px; overflow: auto; white-space: pre; }
.method { display: inline-block; min-width: 58px; text-align: center; font: 700 .72rem/1.6 var(--mono); border-radius: 5px; padding: 1px 6px; margin-right: 6px; color: #fff; background: #5b6b80; vertical-align: middle; }
.method-get { background: #2f6f9f; } .method-post { background: #2f855a; } .method-patch, .method-put { background: #8a5a12; } .method-delete { background: #c53030; }
.api-ref .ref-op h3, .api-ref .ref-schema h3 { font-size: 1rem; margin: 0 0 6px; }
.api-ref .ref-op, .api-ref .ref-schema { margin: 10px 0; }
.api-ref table { width: 100%; margin: 6px 0; }
.ref-tags { columns: 3; list-style: none; padding: 0; }
@media (max-width: 760px) { .ref-tags { columns: 1; } .scope-grid { grid-template-columns: 1fr; } }
.dev-docs pre.code { white-space: pre; }
.consent-scopes { list-style: none; padding: 0; margin: 0 0 12px; }
