/* Shared color contract and overflow guard for every NexyCell surface. */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b111b;
  --bg2: #101927;
  --panel: #111b2a;
  --panel2: #162235;
  --surface: #111b2a;
  --surface-2: #162235;
  --line: #26364d;
  --line2: #33465f;
  --txt: #edf4ff;
  --text: #edf4ff;
  --txt2: #b7c5d8;
  --txt3: #8191a8;
  --muted: #9badc3;
  --acc: #4ed7be;
  --accent: #4ed7be;
  --acc2: #68a9ff;
  --accent2: #68a9ff;
  --good: #62dfa4;
  --warn: #f2ca6b;
  --bad: #ff8d85;
  --danger: #ff8d85;
  --warning: #f2ca6b;
  --header-surface: rgba(9, 15, 25, .94);
  --field-surface: #0d1725;
  --soft-surface: rgba(255, 255, 255, .035);
  --soft: #162235;
  --shadow-color: rgba(0, 0, 0, .28);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf2f7;
  --bg2: #e4ebf3;
  --panel: #ffffff;
  --panel2: #e9eff6;
  --surface: #ffffff;
  --surface-2: #e9eff6;
  --line: #aebdce;
  --line2: #8095ac;
  --txt: #102238;
  --text: #102238;
  --txt2: #30455e;
  --txt3: #4e627b;
  --muted: #455a72;
  --acc: #087766;
  --accent: #087766;
  --acc2: #1f64bd;
  --accent2: #1f64bd;
  --good: #087f5b;
  --warn: #8a6200;
  --bad: #b93832;
  --danger: #b93832;
  --warning: #8a6200;
  --header-surface: rgba(255, 255, 255, .94);
  --field-surface: #f2f6fa;
  --soft-surface: rgba(17, 42, 68, .075);
  --soft: #e9eff6;
  --shadow-color: rgba(25, 45, 70, .18);
}

:root[data-theme="light"] :is(.card, .home-disclosure) {
  box-shadow: 0 1px 2px rgba(25, 45, 70, .09), 0 8px 24px rgba(25, 45, 70, .055);
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  background-color: var(--bg);
  color: var(--txt);
}

:where(main, section, article, aside, nav, form, fieldset, div) { min-width: 0; }
:where(img, svg, canvas, video, iframe) { max-width: 100%; }
:where(input, select, textarea, button) { min-width: 0; max-width: 100%; }
:where(pre, code) { max-width: 100%; overflow: auto; }
:where(p, li, td, th, label, small, strong, b, a, button) { overflow-wrap: anywhere; }

/* Shared interaction contract: readable labels, predictable state and keyboard focus. */
:where(button, [role="button"], .btn, .quiet) {
  font: inherit;
  line-height: 1.3;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  -webkit-tap-highlight-color: transparent;
}

:where(button, [role="button"], .btn) > :where(span, b, small, strong) { min-width: 0; }

:where(button, [role="button"], input, select, textarea, summary, a):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--acc) 38%, transparent);
  outline-offset: 2px;
}

:where(button, .btn):disabled,
:where(button, .btn)[aria-disabled="true"] {
  cursor: not-allowed;
  filter: saturate(.55);
  opacity: .55;
  transform: none !important;
}

:where(button, .btn)[aria-busy="true"] { cursor: progress; }

/* Long translated labels may wrap as words; compact shell controls stay on one line. */
:where(.btn, .quiet, .admin-tab, [role="tab"]) {
  min-height: 40px;
  max-width: 100%;
  white-space: normal;
}

:where(.topbar, .workspace-topbar, .admin-top, .manual-page > header)
  :where(button, a, select),
:where(.pill, .theme-toggle, .modal-x, .mobile-card-toggle, .mobile-top) {
  white-space: nowrap;
}

:where(button[aria-pressed="true"], button[aria-selected="true"], button[aria-current]) {
  border-color: var(--acc);
}

:where(button[aria-pressed="true"], button[aria-selected="true"]):focus-visible {
  box-shadow: 0 0 0 1px var(--panel), 0 0 0 4px color-mix(in srgb, var(--acc) 34%, transparent);
}

/* Process options are binary choices, so make the state visible as a real switch. */
.ptog {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  text-align: start;
  white-space: normal;
}

.ptog::after {
  content: "";
  flex: 0 0 38px;
  width: 38px;
  height: 22px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background:
    radial-gradient(circle at 8px 50%, var(--txt2) 0 6px, transparent 6.5px),
    var(--field-surface);
  box-shadow: inset 0 1px 3px var(--shadow-color);
  transition: background .16s ease, border-color .16s ease;
}

.ptog.on::after,
.ptog[aria-checked="true"]::after {
  border-color: var(--acc);
  background:
    radial-gradient(circle at calc(100% - 8px) 50%, #fff 0 6px, transparent 6.5px),
    var(--acc);
}

/* Toolbars and action rows must reflow before their labels are clipped. */
:where(
  .gate-actions,
  .admin-license-actions,
  .admin-payment-actions,
  .workspace-account-actions,
  .workspace-compare-controls,
  .rdip-actions,
  .bipc-actions,
  .chem-actions,
  .enterprise-ai__actions,
  .connector-control__actions
) {
  min-width: 0;
  flex-wrap: wrap;
}

:where(
  .admin-heading,
  .admin-section-heading,
  .admin-payment-head,
  .workspace-inspector-head,
  .panel-head,
  .enterprise-ai__section-head,
  .bipc-head,
  .rdip-head
) > * { min-width: 0; }

:where(
  .admin-context-chip,
  .admin-pill,
  .admin-payment-pill,
  .admin-commercial-pill,
  .battery-status,
  .bipc-status,
  .rdip-status,
  .enterprise-ai__badge
) {
  max-width: 100%;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

:where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--acc); }

.theme-toggle {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: var(--panel2);
  color: var(--txt);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.theme-toggle:hover { border-color: var(--acc); color: var(--acc); }
.theme-toggle:focus-visible { outline: 3px solid color-mix(in srgb, var(--acc) 38%, transparent); outline-offset: 2px; }

/* Fixed headers and shells must follow the selected theme. */
.workspace-topbar,
.admin-top,
.topbar,
body > header {
  background: var(--header-surface);
  color: var(--txt);
  border-color: var(--line);
}

.workspace-topbar a,
.admin-top a,
body > header a,
body > header button { color: var(--txt); }

/* Common application surfaces. Loaded last to neutralize page-local fixed colors. */
.workspace-shell,
.workspace-main,
.workspace-rail,
.workspace-context,
.admin-shell,
.admin-rail,
.admin-context,
.admin-overview-stat,
.workspace-truth,
.workspace-advanced,
.workspace-account-dialog-head,
.admin-page .card,
.private-page .auth-card,
.private-page .panel,
.private-page .hero,
.private-page .tabs,
.private-page .quiet,
.private-page .workflow,
.private-page .stack,
.private-page .row,
.private-page .kpi,
.chem-card,
.chem-row,
.private-rdip-tabs,
.private-rdip-card,
.private-rdip-row,
.private-rdip-readiness span,
.enterprise-ai__card,
.enterprise-ai__output,
.enterprise-ai__route-matrix,
.connector-control__shell,
.connector-control__aside,
.bipc-panel,
.bipc-card,
.bipc-metric,
.bipc-row {
  background: var(--panel);
  color: var(--txt);
  border-color: var(--line);
  box-shadow: 0 12px 34px var(--shadow-color);
}

.private-rdip-command {
  background: color-mix(in srgb, var(--acc) 4%, var(--panel));
  color: var(--txt);
  border-color: var(--line2);
  box-shadow: none;
}
.private-rdip-lineage button,
.private-rdip-command-metrics > span,
.private-rdip-next {
  background: var(--panel);
  color: var(--txt);
  border-color: var(--line);
}

.admin-rail,
.admin-context,
.workspace-rail,
.workspace-context,
.private-page .tabs,
.private-page .workflow,
.connector-control__aside { background: var(--panel2); }

.workspace-truth,
.workspace-advanced { background: color-mix(in srgb, var(--panel) 86%, transparent); }
.workspace-account-dialog-head { background: color-mix(in srgb, var(--panel) 96%, transparent); }

.enterprise-intelligence,
.enterprise-intelligence__head,
.enterprise-intelligence__monitor-rail,
.enterprise-intelligence__review-list,
.enterprise-intelligence__toolbar,
.enterprise-intelligence__drawer,
.enterprise-intelligence__drawer pre,
.enterprise-intelligence__source-content,
.enterprise-intelligence__source-json,
.enterprise-intelligence__impact-form,
.enterprise-intelligence__brief,
.enterprise-intelligence__control-center,
.enterprise-intelligence__control-grid,
.enterprise-intelligence__integration,
.source-registry__columns > section,
.source-registry__import,
.source-assurance,
.source-assurance__row {
  background: var(--panel) !important;
  color: var(--txt) !important;
  border-color: var(--line) !important;
}

.enterprise-intelligence__monitor-rail,
.enterprise-intelligence__toolbar,
.enterprise-intelligence__drawer,
.enterprise-intelligence__source-json,
.enterprise-intelligence__control-grid,
.source-registry__import,
.source-assurance__row { background: var(--panel2) !important; }

/* Intelligence review used fixed navy surfaces under both themes. */
.enterprise-intelligence > .enterprise-ai__section-head,
.intel-monitor-rail,
.intel-review-list,
.intel-review-toolbar,
.intel-source-drawer,
.intel-source-content,
.intel-source-json,
.intel-trace li > span,
.intel-impact-form,
.intel-brief-builder,
.intel-control-center,
.intel-control-grid > section,
.intel-integration-grid article,
.enterprise-ai__citation {
  background: var(--panel) !important;
  color: var(--txt) !important;
  border-color: var(--line) !important;
}

.intel-monitor-rail,
.intel-review-toolbar,
.intel-source-json,
.intel-impact-form,
.intel-brief-builder,
.intel-control-center,
.intel-control-grid > section,
.enterprise-ai__citation { background: var(--panel2) !important; }

.intel-review-row { color: var(--txt); border-color: var(--line); }
.intel-review-row:hover { background: color-mix(in srgb, var(--acc2) 7%, var(--panel)); }
.intel-review-row[aria-pressed="true"] { background: color-mix(in srgb, var(--acc) 10%, var(--panel)); }
.intel-monitor-rail > button { color: var(--txt); }
.intel-monitor-rail > button[aria-pressed="true"] { background: color-mix(in srgb, var(--acc) 10%, var(--panel2)); border-color: var(--acc); }

.enterprise-intelligence :is(h1, h2, h3, h4, strong, b),
.bipc-panel :is(h1, h2, h3, h4, strong, b),
.chem-card :is(h1, h2, h3, h4, strong, b),
.private-rdip-card :is(h1, h2, h3, h4, strong, b) { color: var(--txt) !important; }

.enterprise-intelligence :is(p, small, label),
.bipc-panel :is(p, small, label),
.chem-card :is(p, small, label),
.private-rdip-card :is(p, small, label) { color: var(--txt2); }

:where(.enterprise-intelligence, .bipc-panel, .chem-card, .private-rdip-card, .admin-page .card, .private-page .panel, .private-page .auth-card)
  :is(input, select, textarea) {
  background: var(--field-surface) !important;
  color: var(--txt) !important;
  border-color: var(--line2) !important;
}

.connector-control__notice { background: color-mix(in srgb, var(--acc2) 9%, var(--panel)); color: var(--txt2); }
.connector-control__notice--warning { background: color-mix(in srgb, var(--warning) 13%, var(--panel)); }
.connector-control__notice--danger { background: color-mix(in srgb, var(--danger) 11%, var(--panel)); }
.connector-control__error { background: color-mix(in srgb, var(--danger) 11%, var(--panel)); color: var(--danger); }

.enterprise-ai__badge[data-status="approved"],
.enterprise-ai__badge[data-status="passed"],
.enterprise-ai__badge[data-status="success"] { color: var(--good); }
.enterprise-ai__badge[data-status="failed"],
.enterprise-ai__badge[data-status="rejected"] { color: var(--bad); }

.battery-status { background: var(--panel2); color: var(--txt2); }
.battery-status[data-status="approved"],
.battery-status[data-status="released"],
.battery-status[data-status="active"] { background: color-mix(in srgb, var(--good) 13%, var(--panel)); color: var(--good); }
.battery-status[data-status="rejected"],
.battery-status[data-status="quarantined"] { background: color-mix(in srgb, var(--bad) 12%, var(--panel)); color: var(--bad); }
.battery-status[data-status="pending"],
.battery-status[data-status="draft"] { background: color-mix(in srgb, var(--warn) 12%, var(--panel)); color: var(--warn); }

.bipc-lane > div,
.bipc-actions button.quiet { background: var(--panel2); color: var(--txt); }
.bipc-hint,
.bipc-row small,
.bipc-empty { color: var(--txt2); }
.bipc-status { background: var(--panel2); color: var(--txt2); }
.bipc-status[data-status="reviewed"],
.bipc-status[data-status="released"],
.bipc-status[data-status="file"],
.bipc-status[data-status="trade_secret"] { background: color-mix(in srgb, var(--good) 13%, var(--panel)); color: var(--good); }

.private-page .tabs button[aria-selected="true"],
.private-page .workflow button { background: var(--panel2); color: var(--txt); }
.private-page .tabs button[aria-selected="true"] { color: var(--acc); }
.private-page code { background: var(--field-surface); color: var(--acc); }
.private-page #toast { background: var(--panel2); color: var(--txt); box-shadow: 0 10px 40px var(--shadow-color); }

/* The private workflow has nine destinations; keep labels legible instead of squeezing a dense grid. */
.private-page .workflow {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.private-page .workflow > button,
.private-page .workflow > a {
  flex: 0 0 auto;
  width: auto;
  min-width: 132px;
  scroll-snap-align: start;
}

.private-page { background: var(--bg); color: var(--txt); }
.private-page :is(input, select, textarea) { background: var(--field-surface); color: var(--txt); border-color: var(--line2); }

/* The manual used a separate light-only palette; map every reading surface to the shared contract. */
.manual-page { background: var(--bg); color: var(--txt); }
.manual-page :is(.manual-section, .role, .cards article) { background: var(--panel); color: var(--txt); border-color: var(--line); }
.manual-page :is(.search input, header select) { background: var(--field-surface); color: var(--txt); border-color: var(--line2); }
.manual-page :is(#toc a, .version) { color: var(--txt2); }
.manual-page #toc a.active { background: color-mix(in srgb, var(--acc) 10%, var(--panel)); color: var(--acc); border-color: var(--acc); }
.manual-page .role.active { background: var(--acc); color: #fff; }
.manual-page :is(.callout, .callout.warning, .callout.danger) { color: var(--txt); background: var(--panel2); }
.manual-page th { background: var(--panel2); }
.manual-page pre { background: var(--field-surface); color: var(--txt); }
.manual-page .hero { background: linear-gradient(135deg, color-mix(in srgb, var(--acc) 35%, var(--bg)), var(--panel)); color: var(--txt); }
.manual-page .hero p { color: var(--txt2); }

:where(.table-wrap, .table-scroll, .admin-table-wrap, .workspace-table-wrap, .report-table) {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

:where(table) { max-width: 100%; }
:where(td, th) { word-break: break-word; }

/* Landing page: retain depth while moving secondary material behind clear disclosure. */
.home-disclosure {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft-surface);
  overflow: clip;
}

.home-disclosure-summary {
  min-height: 84px;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 32px;
  align-items: center;
  column-gap: 20px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.home-disclosure-summary::-webkit-details-marker { display: none; }
.home-disclosure-label {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  color: var(--acc);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .065em;
  line-height: 1.4;
  text-transform: uppercase;
}
.home-disclosure-copy { display: grid; min-width: 0; gap: 6px; }
.home-disclosure-title {
  color: var(--txt);
  font-family: var(--nc-font-display);
  font-size: clamp(17px, 1.2vw, 19px);
  font-weight: 650;
  letter-spacing: -.015em;
  line-height: 1.35;
}
.home-disclosure-description {
  max-width: 104ch;
  color: var(--txt2);
  font-size: 13.5px;
  line-height: 1.55;
}
.home-disclosure-summary .home-disclosure-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  justify-self: end;
  color: var(--acc);
  font-size: 22px;
  font-style: normal;
  line-height: 1;
  transition: transform .2s ease;
}
.home-disclosure[open] .home-disclosure-mark { transform: rotate(45deg); }
.home-disclosure-content { padding: 0 20px 24px; }
.home-disclosure.position-scope { padding: 0; }

@media (min-width: 901px) {
  #view-overview .flowsteps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-overview .flowstep p { display: block; }
  #view-overview .flowstep { min-height: 154px; }
}

@media (max-width: 760px) {
  .home-disclosure { border-radius: 14px; }
  .home-disclosure-summary {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 32px;
    grid-template-areas: "label mark" "copy mark";
    align-items: start;
    column-gap: 12px;
    row-gap: 8px;
    padding: 16px 14px;
  }
  .home-disclosure-label { grid-area: label; font-size: 12px; }
  .home-disclosure-copy { grid-area: copy; gap: 5px; }
  .home-disclosure-title { font-size: 16.5px; line-height: 1.4; }
  .home-disclosure-description { display: block; font-size: 12.5px; line-height: 1.55; }
  .home-disclosure-summary .home-disclosure-mark { grid-area: mark; align-self: center; }
  .home-disclosure-content { padding: 0 14px 18px; }
  .workspace-topbar,
  .admin-top,
  .topbar,
  body > header { max-width: 100%; }
  .manual-page #printBtn { display: none; }
  .manual-page header { padding-inline: 10px; gap: 8px; }
  .manual-page header nav { gap: 6px; }
  .private-page .topbar { padding-inline: 10px; gap: 8px; }
  .private-page .brand { font-size: 16px; }
  .private-page .brand small { display: none; }
  .private-page .top-actions { gap: 6px; }
  .workspace-next { flex: 0 0 auto; }
  .workspace-next button { width: auto; min-width: 44px; }
}

@media (max-width: 420px) {
  .private-page #logout { width: 44px; min-width: 44px; padding-inline: 0; font-size: 0; }
  .private-page #logout::before { content: "↪"; font-size: 18px; }
}

/* Typography contract: one product voice across the public site, Workspace and
   enterprise consoles. Monospace remains reserved for values, hashes and code. */
:root {
  --nc-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans KR", "Malgun Gothic", "Microsoft YaHei UI", "Yu Gothic UI",
    "Noto Sans Arabic", Arial, sans-serif;
  --nc-font-display: var(--nc-font-sans);
  --sans: var(--nc-font-sans);
  --nc-type-body: 14px;
  --nc-type-small: 12px;
  --nc-type-micro: 11.5px;
}

html,
body,
button,
input,
select,
textarea { font-family: var(--nc-font-sans); }

body {
  font-kerning: normal;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:where(h1, h2, h3, h4, h5, h6, .nc-brand, .nc-brand__word) {
  font-family: var(--nc-font-display);
}

:where(code, pre, kbd, samp, .mono) { font-family: var(--mono, ui-monospace, "SFMono-Regular", Consolas, monospace); }

/* Desktop readability floor for meaningful interface copy. */
.card h4 { font-size: 14px; line-height: 1.35; }
.card .sub,
.note,
.legend,
.grounding,
.view-handoff p { font-size: var(--nc-type-small); line-height: 1.55; }
.ctrl label,
.bar .lab { font-size: 12px; line-height: 1.45; }
.kpi :is(.k, .d) { font-size: 11.5px; line-height: 1.4; }
.chip,
.pill,
.stage-pills .sp,
.conf-badge { font-size: var(--nc-type-micro); }

table.tbl,
.data-table { font-size: 13px; line-height: 1.45; }
table.tbl th,
.data-table th { font-size: 11.5px !important; line-height: 1.4; }

body .workspace-truth small,
body .workspace-workflow small,
body .workspace-onboarding small,
body .workspace-grid small,
body .workspace-account-dialog small,
body .workspace-account-row,
body .workspace-comment,
body .workspace-diff-row { font-size: 11.5px; line-height: 1.45; }
body .workspace-truth b,
body .workspace-workflow strong,
body .workspace-next b,
body .workspace-next small,
body .workspace-section-kicker,
body .workspace-rail-heading > div > span,
body .workspace-inspector-head > div > span,
body .workspace-editor label > span,
body .workspace-inspector-tabs button { font-size: 11.5px; line-height: 1.35; }

body .rdip-workspace :is(p, small),
body .enterprise-intelligence :is(p, small),
body .intel-command-panel :is(p, small) { font-size: 12px; line-height: 1.5; }
body .rdip-workspace :is(.rdip-kicker, .rdip-status, .rdip-risk, .rdip-blocker),
body .enterprise-intelligence :is(.intel-work-state, .enterprise-ai__badge) { font-size: var(--nc-type-micro); line-height: 1.35; }
body .rdip-form label > span,
body .rdip-form fieldset :is(legend, label),
body .rdip-actions button,
body .rdip-element :is(p, input, select) { font-size: 12px; }

.admin-page :is(.admin-eyebrow, .admin-nav-group, .admin-context-label, .admin-context-chip,
  .admin-queue-copy small, .admin-queue-next, .admin-customer-facts small,
  .admin-customer-fit small, .admin-overview-stat small) { font-size: 11.5px; line-height: 1.4; }
.admin-page :is(.admin-rail-note, .admin-section-heading p, .admin-lifecycle li,
  .admin-payment-events) { font-size: 12px; line-height: 1.5; }

.private-page :is(.brand small, .kicker, .status, .kpi small) { font-size: 11.5px; line-height: 1.4; }
.manual-page :is(.version, .eyebrow) { font-size: 12px; }

/* Mobile reading contract. Labels and supporting evidence must be readable without
   zoom; inputs stay at 16px to prevent automatic focus zoom on mobile browsers. */
@media (max-width: 760px) {
  body { line-height: 1.6; }
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
  select,
  textarea { font-size: 16px !important; }

  .section-head h2 { font-size: clamp(21px, 6vw, 26px); line-height: 1.2; }
  .section-head p { font-size: 14px; line-height: 1.55; }
  .card h4 { font-size: 15px; line-height: 1.35; }
  .card .sub,
  .note,
  .legend,
  .grounding,
  .view-handoff p { font-size: 13px; line-height: 1.6; }
  .ctrl label,
  .bar .lab { font-size: 13px; line-height: 1.45; }
  .seg button,
  .btn,
  .cex { font-size: 13px; }
  .kpi :is(.k, .d) { font-size: 12px; }
  .mobile-nav .mobile-sections { font-size: 13px; }
  .mobile-nav .mobile-sections small { font-size: 11.5px; line-height: 1.3; }
  .mobile-sheet-list button { font-size: 13px; line-height: 1.35; }
  .mobile-sheet-list :is(i, em) { font-size: 11.5px; }
  .mobile-summary-kpi small,
  .analysis-module-count,
  .chip,
  .pill,
  .stage-pills .sp,
  .conf-badge { font-size: 11.5px; line-height: 1.35; }

  body .workspace-truth small,
  body .workspace-workflow small,
  body .workspace-onboarding small,
  body .workspace-grid small,
  body .workspace-account-dialog small,
  body .workspace-account-row,
  body .workspace-comment,
  body .workspace-diff-row { font-size: 12px; line-height: 1.5; }
  body .workspace-workflow > button strong,
  body .workspace-next :is(b, small),
  body .workspace-editor label > span,
  body .workspace-inspector-tabs button { font-size: 12px; }
  body .workspace-workflow > button { min-width: 150px; }
  body .workspace-onboarding p { font-size: 12.5px; line-height: 1.55; }
  body #app button { font-size: 13px; line-height: 1.35; }
  body #app label { font-size: 13px; line-height: 1.45; }
  body #app small { font-size: 12px; line-height: 1.5; }
  body :is(.workspace-truth, .workspace-onboarding) b,
  body .workspace-rail-heading > span { font-size: 12px; line-height: 1.35; }

  body .rdip-workspace :is(p, small),
  body .enterprise-intelligence :is(p, small),
  body .intel-command-panel :is(p, small) { font-size: 12.5px; line-height: 1.55; }
  body .rdip-form label > span,
  body .rdip-form fieldset :is(legend, label),
  body .rdip-actions button,
  body .rdip-element :is(p, input, select) { font-size: 12.5px; }
  body .rdip-workspace .rdip-kicker,
  body .rdip-command-head > div:first-child > span,
  body .rdip-lineage-node > :is(span, em),
  body .rdip-next-action > span,
  body :is(.intel-command-kicker, .intel-command-asof, .intel-governance-line,
    .intel-source-card > span, .intel-work-kind, .intel-work-state) { font-size: 11.5px; line-height: 1.35; }
  body .rdip-step span,
  body .rdip-lineage-node > b,
  body .rdip-next-action > b,
  body :is(.rdip-error, .rdip-empty) { font-size: 12px; line-height: 1.45; }

  .admin-page :is(.admin-eyebrow, .admin-nav-group, .admin-context-label, .admin-context-chip,
    .admin-queue-copy small, .admin-queue-next, .admin-customer-facts small,
    .admin-customer-fit small, .admin-overview-stat small),
  .private-page :is(.brand small, .kicker, .status, .kpi small) { font-size: 12px; line-height: 1.45; }
  .admin-page :is(.admin-rail-note, .admin-section-heading p, .admin-lifecycle li,
    .admin-payment-events),
  .manual-page :is(.version, .eyebrow) { font-size: 12.5px; line-height: 1.5; }

  .manual-page .manual-section { padding: 18px; }
  .manual-page :is(p, li, td, th, label, summary) { font-size: 14px; line-height: 1.6; }
  .private-page :is(.row p, .row small, .hint, .message) { font-size: 13px; line-height: 1.55; }
}

@media (max-width: 480px) {
  body .workspace-onboarding ol,
  body .workspace-account-kpis { grid-template-columns: 1fr; }
  body .rdip-form fieldset { grid-template-columns: 1fr; }
  .admin-page .admin-overview-stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .home-disclosure-summary .home-disclosure-mark { transition: none; }
}

/* The application defaults to the dark product surface, while paper/PDF output stays
   deliberately light for legibility, ink use and predictable customer handoff. */
@media print {
  :root {
    color-scheme: light !important;
    --bg: #ffffff;
    --bg2: #ffffff;
    --panel: #ffffff;
    --panel2: #f7f9fc;
    --line: #cfd7e3;
    --line2: #b7c3d2;
    --txt: #101828;
    --txt2: #344054;
    --txt3: #667085;
    --header-surface: #ffffff;
    --field-surface: #ffffff;
  }
  html,
  body { background: #ffffff !important; color: #101828 !important; }
}
