@font-face {
  font-family: "IBM Plex Sans";
  src: url("/brand/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
}

html:root[data-product] {
  --dp-font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --dp-font-head: var(--dp-font-body);
  --heading: var(--dp-font-head);
  font-variant-numeric: lining-nums tabular-nums;
}

html:root[data-product][data-theme="dark"] {
  color-scheme: only dark;
  --dp-bg: #0d1521;
  --dp-surface: #151f2d;
  --dp-raised: #1c2a3a;
  --dp-well: #1c2a3a;
  --dp-control: #1c2a3a;
  --dp-text: #edf3f9;
  --dp-muted: #bdcbd9;
  --dp-faint: #a2b3c5;
  --dp-rule: #3b4a5d;
  --dp-rule-soft: #2b3a4d;
  --dp-line: #4d6074;
  --dp-control-border: #768ca1;
  --dp-accent: #67d9db;
  --dp-accent-ink: #83e7e7;
  --dp-on-accent: #0d2025;
  --dp-accent-hover: #93e7e8;
  --dp-accent-soft: #173b43;
}

html:root[data-product] .skip-link {
  background: var(--dp-control);
  color: var(--dp-text);
  outline: 2px solid var(--dp-accent);
}

/* The active check uses teal for selection. Its result keeps its own status color. */
html:root[data-product] .nx-flow-map {
  background-color: var(--dp-surface);
  background-image: radial-gradient(#304154 .7px, transparent .9px);
  background-size: 20px 20px;
}

html:root[data-product] .nx-workflow .nx-node-orb {
  background: var(--dp-surface);
}

html:root[data-product] .nx-workflow .nx-node[aria-pressed="true"] .nx-node-orb {
  background: var(--dp-accent-soft);
  border-color: var(--dp-accent);
}

html:root[data-product] .nx-flow-heading [data-flow-status]::before {
  background: var(--dp-faint);
}

html:root[data-product] .nx-workflow[data-phase="busy"] [data-flow-status]::before {
  background: var(--dp-accent);
}

html:root[data-product] .nx-workflow[data-phase="error"] [data-flow-status]::before {
  background: var(--dp-caution);
}

html:root[data-product] .nx-workflow .nx-inspector {
  border: 0;
  border-inline-start: 1px solid var(--dp-rule);
  border-radius: 0;
  background: var(--dp-well);
  box-shadow: none;
}

html:root[data-product] .nx-workflow [data-node-name] {
  color: var(--dp-text);
  font-weight: 600;
}

@media (max-width: 1200px) {
  html:root[data-product] .nx-workflow .nx-inspector {
    border-inline-start: 0;
    border-block-start: 1px solid var(--dp-rule);
  }
}

html:root[data-product] body {
  font-family: var(--dp-font-body);
  font-weight: 400;
}

html:root[data-product] :is(h1, h2, h3, h4) {
  font-family: var(--dp-font-head);
  font-weight: 600;
  letter-spacing: -.018em;
}

html:root[data-product] :is(button, select, textarea) {
  font-family: var(--dp-font-body);
}

html:root[data-product] :is(nav a, nav button, .button, .btn, button[type="submit"]) {
  font-weight: 500;
}

html:root[data-product] [data-shell="sidebar"] [data-shell-section] > [data-ecosystem-label] {
  font-family: var(--dp-font-body);
  font-weight: 600;
  letter-spacing: .055em;
}

html:root[data-product] [data-ecosystem-label]::before,
html:root[data-product] [data-ecosystem-icon] {
  display: inline-block;
  inline-size: 20px;
  block-size: 22px;
  flex: none;

  background-color: currentColor;
  -webkit-mask: url("/brand/dna-ecosystem-mark.png") center / contain no-repeat;
  mask: url("/brand/dna-ecosystem-mark.png") center / contain no-repeat;
}

html:root[data-product] [data-ecosystem-label]::before {
  content: "";
  inline-size: 13px;
  margin-inline-end: 8px;
  vertical-align: -6px;
}

@media (forced-colors: active) {
  html:root[data-product] [data-ecosystem-label]::before,
  html:root[data-product] [data-ecosystem-icon] {
    forced-color-adjust: none;
    background-color: CanvasText;
  }
}

/* A filled row selects a workspace view. The trailing dot identifies its product. */
html:root[data-product][data-theme] :is([data-shell-section="ecosystem"], nav:has(> [data-ecosystem-label]), .sidebar-bottom:has(> [data-ecosystem-label])) a[aria-current]:not([aria-current="false"]) {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  color: var(--dp-text);
  font-weight: 600;

  &:hover {
    background: var(--dp-raised);
  }

  &:focus-visible {
    outline: 2px solid var(--dp-accent);
    outline-offset: -2px;
  }

  /* The trailing slot holds a link arrow or bullet depending on the dashboard. */
  & > :is(span[aria-hidden="true"], b):last-child {
    flex: none;
    width: 7px;
    height: 7px;
    min-width: 0;
    margin-inline: auto 6px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--dp-accent);
    color: transparent;
    font-size: 0;
    line-height: 0;
    transform: none;
    -webkit-mask: none;
    mask: none;

    @media (forced-colors: active) {
      forced-color-adjust: none;
      background: CanvasText;
    }
  }
}

/* Diagram faces use distinct navy and teal values so their edges and labels remain visible. */
html:root[data-product="zktransparency"] .layer-viewer {
  color: var(--dp-text);

  &::before {
    background: var(--dp-surface);
    opacity: 1;
  }

  & .model-stage {
    background: radial-gradient(ellipse at center, #1e3a49, transparent 67%);
  }

  & :is(.model-callout, .model-callout small, .stage-coordinate, .plane-corner) {
    color: var(--dp-muted);
  }

  & .model-callout i {
    border-color: #7ca5ae;
  }

  & .model-plane {
    border-color: #6d939e;
    box-shadow: 4px 8px 14px #00000040;
  }

  & .plane-base {
    background: #273d50;
  }

  & .plane-format {
    background: #274952;
  }

  & .plane-cipher {
    background: #22535c;
    border-color: #79bdbe;
  }

  & .plane-limit {
    background: #293643cc;
    border-color: #a39878;
    box-shadow: none;
  }

  & :is(.plane-label, .limit-word) {
    color: var(--dp-text);
  }

  & .cipher-mark img {
    filter: brightness(0) invert(1);
    opacity: .92;
  }

  & .cipher-grid {
    background-image: radial-gradient(#89cdcd80 .8px, transparent 1px);
  }

  & .layer-explanation {
    background: var(--dp-surface);
  }
}

/* Shared zkPrivacy sidebar. Keep this block identical across the six deploys. */
html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] {
  --sidebar-inset: 24px;
  --sidebar-row-height: 48px;
  background: var(--dp-surface);
  border-inline-end: 1px solid var(--dp-rule);
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] > [data-shell-section] {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] > [data-shell-section="brand"] {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 80px;
  padding: 0 var(--sidebar-inset);
  border-block-end: 1px solid var(--dp-rule-soft);
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] [data-shell-section="brand"] > a {
  display: flex;
  align-items: center;
  flex: 0 1 172px !important;
  width: 172px !important;
  max-width: 172px !important;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] [data-shell-section="brand"] > a > img {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] > [data-shell-section="product"] {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  min-height: 72px;
  margin: 0 !important;
  border-radius: 0 !important;
  border-inline: 0 !important;
  border-block-start: 0 !important;
  padding: 8px var(--sidebar-inset) !important;
  background: transparent !important;
  border-block-end: 1px solid var(--dp-rule-soft);
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] [data-shell-section="product"] > :first-child {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--dp-rule);
  border-radius: 8px;
  background: var(--dp-raised);
  color: var(--dp-accent);
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] [data-shell-section="product"] > :nth-child(2) {
  display: block;
  min-width: 0;
  font: 600 1rem/1.3 var(--dp-font-body);
  color: var(--dp-text);
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] [data-shell-section="product"] small {
  display: block;
  margin-block-start: 3px;
  font: 400 .875rem/1.25 var(--dp-font-body);
  color: var(--dp-muted);
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] > :is([data-shell-section="workspace"], [data-shell-section="ecosystem"]) {
  display: block;
  align-content: start;
  padding: 14px 12px 12px !important;
  border-block-end: 1px solid var(--dp-rule-soft);
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] > [data-shell-section="ecosystem"] {
  background: #111c29;
  box-sizing: border-box;
  min-height: 347px;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] :is([data-shell-section="workspace"], [data-shell-section="ecosystem"]) > :is(.nav-label, .nav-caption, [data-shell-caption], [data-ecosystem-label]) {
  display: flex;
  align-items: center;
  height: 26px !important;
  min-height: 26px !important;
  margin: 0 0 6px !important;
  width: auto;
  padding: 0 12px;
  font: 600 .75rem/1.3 var(--dp-font-body) !important;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--dp-faint);
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] :is([data-shell-section="workspace"], [data-shell-section="ecosystem"]) :is(a, button) {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  min-height: var(--sidebar-row-height);
  margin: 0 !important;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  font: 500 1rem/1.25 var(--dp-font-body);
  color: var(--dp-muted);
  text-align: start;
  text-decoration: none;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] :is([data-shell-section="workspace"], [data-shell-section="ecosystem"]) :is(a, button):focus-visible {
  outline: 2px solid var(--dp-accent);
  outline-offset: -2px;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] [data-shell-section="workspace"] :is(a, button):is([aria-current]:not([aria-current="false"]), .active, .is-active) {
  background: var(--dp-accent-soft);
  box-shadow: inset 2px 0 var(--dp-accent);
  color: var(--dp-text);
  font-weight: 600;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] [data-shell-section="ecosystem"] a:has(> [data-ecosystem-icon]) {
  background: transparent;
  box-shadow: none;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] [data-shell-section="ecosystem"] a:has(> [data-ecosystem-icon]):hover {
  background: var(--dp-raised);
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] [data-shell-section="ecosystem"] a > :last-child:is(b, span[aria-hidden="true"]):not([data-ecosystem-icon]) {
  display: none;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] [data-shell-section="ecosystem"] a:has(> [data-ecosystem-icon])::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  margin-inline: auto 0;
  background: currentColor;
  mask: url("/brand/icons/external.svg") center / contain no-repeat;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] [data-shell-section="ecosystem"] a[aria-current]:not([aria-current="false"]) {
  color: var(--dp-text);
  font-weight: 600;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] [data-shell-section="ecosystem"] a[aria-current]:not([aria-current="false"])::after {
  width: 7px;
  height: 7px;
  margin-inline-end: 3.5px;
  border-radius: 50%;
  background: var(--dp-accent);
  mask: none;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] > :is([data-shell-section="context"], [data-shell-section="foot"]) {
  padding: 16px var(--sidebar-inset);
  color: var(--dp-muted);
}

@media (max-width: 520px) {
  html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] {
    --sidebar-inset: 16px;
  }
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] [data-shell-section="ecosystem"] > nav {
  display: block;
  margin: 0;
  padding: 0;
}
html:root[data-product][data-theme="dark"] body [data-shell="sidebar"][data-shell="sidebar"] [data-shell-section="workspace"] :is(.nav-arrow, button > svg + svg:last-child) {
  display: none !important;
}

/* Use one row rhythm for both wrapped and direct navigation lists. */
html:root[data-product][data-theme="dark"] body [data-shell="sidebar"]:not(.command-nav) > [data-shell-section="ecosystem"] {
  display: block !important;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"] > [data-shell-section="workspace"],
html:root[data-product][data-theme="dark"] body [data-shell="sidebar"] [data-shell-section="workspace"] > nav {
  display: grid !important;
  gap: 4px;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"] [data-shell-section="workspace"] > :is(.nav-label, .nav-caption, [data-shell-caption]) {
  margin-block-end: 2px !important;
}

html:root[data-product][data-theme="dark"] body [data-shell="sidebar"] :is([data-shell-section="workspace"], [data-shell-section="ecosystem"]) > :is(.nav-label, .nav-caption, [data-shell-caption], [data-ecosystem-label]) {
  display: flex !important;
  padding-block: 0 !important;
}
