/* livefabric-carbon/base.css: the shared Carbon v11 components for node and module UIs (docs/STYLE-GUIDE.md).
   Load order in every page: tokens.css, base.css, then the module's own stylesheet, then theme.js (synchronous, <head>).
   Taken from livefabric-hub/public/styles.css (the reference implementation) without the hub's own aliases: the same
   classes as the hub (.btn-*, .cds-tag*, .cds-notification*, .cds-form-requirement, .cds-table, .cds-modal*, .toast,
   .page-tile, .empty-state, .cds-text-input / .cds-select / .cds-textarea, .cds-type-*). A module stylesheet adds page
   layouts only; it never restyles these. Fonts are bundled (fonts/, SIL OFL): show LANs are often offline. */

/* IBM Plex, bundled (no network font) */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/IBMPlexSans-Regular.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/IBMPlexSans-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/IBMPlexMono-Regular.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/IBMPlexMono-SemiBold.woff2') format('woff2'); }

:root[data-carbon-theme="g10"] { color-scheme: light; }
:root[data-carbon-theme="g90"] { color-scheme: dark; }

/* Layering: content inside a tile uses the next layer (Carbon <Layer level=1>) */
.card, .page-tile {
  --cds-layer: var(--cds-layer-02);
  --cds-layer-hover: var(--cds-layer-hover-02);
  --cds-layer-selected: var(--cds-layer-selected-02);
  --cds-layer-accent: var(--cds-layer-accent-02);
  --cds-field: var(--cds-field-02);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after{ box-sizing: border-box; margin: 0; padding: 0; }
/* `hidden` always wins over a component's display rule (Carbon review 2026-11-02 C6: the hub's M7 menu showed a hidden
   Fence because .cds-overflow-menu__item set display:block). Show an element by removing `hidden`, never by style. */
[hidden]{ display: none !important; }

html, body{
  height: 100%;
  font-family: var(--cds-font-sans);
  /* body-compact-01 */
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.125rem;
  letter-spacing: 0.16px;
  color: var(--cds-text-primary);
  background: var(--cds-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, select, textarea{ font-family: inherit; letter-spacing: inherit; }

.mono{ font-family: var(--cds-font-mono); }

/* Links (Carbon link) */
a{ color: var(--cds-link-primary); text-decoration: none; outline: none; }
a:hover{ color: var(--cds-link-primary-hover); text-decoration: underline; }
a:focus-visible{ outline: 1px solid var(--cds-focus); }

/* Default visible focus for anything interactive that has no component focus style */
:focus-visible{ outline: 2px solid var(--cds-focus); outline-offset: -2px; }

/* ─── Carbon icons as CSS masks (status shapes; @carbon/icons 32 px paths) ── */
:root{
  --cds-ico-checkmark-filled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill-rule='evenodd' d='M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2Zm-2 19.59-5-5L10.59 15 14 18.41 21.41 11l1.6 1.59Z'/%3E%3C/svg%3E");
  --cds-ico-error-filled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill-rule='evenodd' d='M16 2C8.3 2 2 8.3 2 16s6.3 14 14 14 14-6.3 14-14S23.7 2 16 2Zm5.4 21L16 17.6 10.6 23 9 21.4l5.4-5.4L9 10.6 10.6 9l5.4 5.4L21.4 9l1.6 1.6-5.4 5.4 5.4 5.4Z'/%3E%3C/svg%3E");
  --cds-ico-warning-filled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill-rule='evenodd' d='M29.89 28.54l-13-25a1 1 0 0 0-1.78 0l-13 25A1 1 0 0 0 3 30h26a1 1 0 0 0 .89-1.46ZM14.88 8h2.25v12h-2.25ZM16 26a1.5 1.5 0 1 1 1.5-1.5A1.5 1.5 0 0 1 16 26Z'/%3E%3C/svg%3E");
  --cds-ico-info-filled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill-rule='evenodd' d='M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2Zm0 6a1.5 1.5 0 1 1-1.5 1.5A1.5 1.5 0 0 1 16 8Zm4 16.13h-8v-2.26h2.88v-5.75H13v-2.25h4.13v8H20Z'/%3E%3C/svg%3E");
  --cds-ico-circle-dash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M7.7 4.7a14.7 14.7 0 0 0-3 3.1L6.3 9a13.26 13.26 0 0 1 2.6-2.7ZM4.6 12.3l-1.9-.6A12.51 12.51 0 0 0 2 16h2a11.48 11.48 0 0 1 .6-3.7Zm-1.9 8.1a14.4 14.4 0 0 0 2 3.9l1.6-1.2a12.89 12.89 0 0 1-1.7-3.3Zm5.1 6.9a14.4 14.4 0 0 0 3.9 2l.6-1.9A12.89 12.89 0 0 1 9 25.7Zm3.9-24.6.6 1.9A11.48 11.48 0 0 1 16 4V2a12.51 12.51 0 0 0-4.3.7Zm12.5 24.6a15.18 15.18 0 0 0 3.1-3.1L25.7 23a11.53 11.53 0 0 1-2.7 2.7Zm2.3-15 1.9-.6a15.47 15.47 0 0 0-2-3.9l-1.6 1.2a12.89 12.89 0 0 1 1.7 3.3Zm1.8 3.8h-2a11.48 11.48 0 0 1-.6 3.7l1.9.6A15.75 15.75 0 0 0 30 16Zm-5.8-11.2a15.18 15.18 0 0 0-3.9-2l-.6 1.9a12.89 12.89 0 0 1 3.3 1.7Zm-4 24.3-.6-1.9A11.48 11.48 0 0 1 16 28v2a20.88 20.88 0 0 0 4.3-.7Z'/%3E%3C/svg%3E");
  --cds-ico-circle-filled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='8'/%3E%3C/svg%3E");
  --cds-ico-launch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M26 28H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h10v2H6v20h20V16h2v10a2 2 0 0 1-2 2Z'/%3E%3Cpath d='M20 2v2h6.59L18 12.59 19.41 14 28 5.41V12h2V2H20z'/%3E%3C/svg%3E");
}
/* Status shape: 16 px Carbon icon, colour from the support token, never colour alone */
.cds-status-icon {
  display: inline-block;
  flex: none;
  width: 16px;
  height: 16px;
  background: var(--cds-icon-secondary);
  -webkit-mask: var(--cds-ico-circle-dash) center / contain no-repeat;
          mask: var(--cds-ico-circle-dash) center / contain no-repeat;
}

/* Coloured status text → text-primary + leading status icon (support colours fail AA as text) */

.empty-state{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--cds-text-secondary);
  gap: 16px;
}
.empty-state .empty-icon svg{ fill: var(--cds-icon-secondary); }
.empty-state p{
  font-size: 1rem;            /* heading-02 */
  font-weight: 600;
  line-height: 1.5rem;
  color: var(--cds-text-primary);
}
.empty-state .empty-hint{
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  color: var(--cds-text-secondary);
}

/* ─── Buttons (Carbon v11) ──────────────────────────────────────────────── *
 * Kinds: .btn-primary .btn-secondary .btn-tertiary .btn-ghost .btn-danger
 *        .btn-danger-tertiary .btn-danger-ghost   Sizes: .btn-sm 32 · (md) 40 · .btn-lg 48 · .btn-xl 64
 * Label left, optional 16 px trailing icon, no radius, 2 px focus + 1 px inset. */
.btn, .cds-btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  min-height: 40px;
  max-width: 20rem;
  margin: 0;
  padding: 0 63px 0 15px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.125rem;
  letter-spacing: 0.16px;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: top;
  cursor: pointer;
  outline: none;
  background: var(--cds-button-primary);
  color: var(--cds-text-on-color);
  transition: background var(--cds-duration-fast-01) var(--cds-easing-entrance),
              box-shadow var(--cds-duration-fast-01) var(--cds-easing-entrance),
              border-color var(--cds-duration-fast-01) var(--cds-easing-entrance),
              color var(--cds-duration-fast-01) var(--cds-easing-entrance);
}
.btn:hover, .cds-btn:hover{ text-decoration: none; }
.btn svg, .cds-btn svg{
  position: absolute;
  right: 16px;
  width: 16px;
  height: 16px;
  flex: none;
  fill: currentColor;
}
/* links that open a new tab carry the Launch icon */
a.btn[target="_blank"]::after{
  content: '';
  position: absolute;
  right: 16px;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--cds-ico-launch) center / contain no-repeat;
          mask: var(--cds-ico-launch) center / contain no-repeat;
}
.btn:focus-visible, .cds-btn:focus-visible{
  border-color: var(--cds-focus);
  box-shadow: inset 0 0 0 1px var(--cds-focus), inset 0 0 0 2px var(--cds-focus-inset);
}

.btn-sm{ min-height: 32px; }
.btn-lg{ min-height: 48px; }
.btn-xl{ min-height: 64px; align-items: flex-start; padding-top: 14px; }

/* primary */
.btn-primary, .cds-btn--primary{ background: var(--cds-button-primary); color: var(--cds-text-on-color); }
.btn-primary:hover, .cds-btn--primary:hover{ background: var(--cds-button-primary-hover); color: var(--cds-text-on-color); }
.btn-primary:active, .cds-btn--primary:active{ background: var(--cds-button-primary-active); }
/* secondary */
.btn-secondary, .cds-btn--secondary{ background: var(--cds-button-secondary); color: var(--cds-text-on-color); }
.btn-secondary:hover, .cds-btn--secondary:hover{ background: var(--cds-button-secondary-hover); color: var(--cds-text-on-color); }
.btn-secondary:active, .cds-btn--secondary:active{ background: var(--cds-button-secondary-active); }
/* tertiary (outlined) */
.btn-tertiary{
  background: transparent;
  border-color: var(--cds-button-tertiary);
  color: var(--cds-button-tertiary);
}
.btn-tertiary:hover{ background: var(--cds-button-tertiary-hover); color: var(--cds-text-inverse); }
.btn-tertiary:active{ background: var(--cds-button-tertiary-active); color: var(--cds-text-inverse); }
.btn-tertiary:focus-visible{ background: var(--cds-button-tertiary); color: var(--cds-text-inverse); }
/* ghost (no border) */
.btn-ghost{
  background: transparent;
  border-color: transparent;
  color: var(--cds-link-primary);
  padding: 0 16px 0 15px;
}
.btn-ghost:hover{ background: var(--cds-background-hover); color: var(--cds-link-primary-hover); }
.btn-ghost:active{ background: var(--cds-background-active); }
.btn-ghost svg, a.btn-ghost[target="_blank"]::after{ position: static; margin-left: 8px; }
.btn-ghost:has(svg), a.btn-ghost[target="_blank"]{ padding-right: 15px; }
/* danger */
.btn-danger{ background: var(--cds-button-danger-primary); color: var(--cds-text-on-color); }
.btn-danger:hover{ background: var(--cds-button-danger-hover); color: var(--cds-text-on-color); }
.btn-danger:active{ background: var(--cds-button-danger-active); }
.btn-danger-tertiary{
  background: transparent;
  border-color: var(--cds-button-danger-secondary);
  color: var(--cds-button-danger-secondary);
}
.btn-danger-tertiary:hover{ background: var(--cds-button-danger-hover); border-color: var(--cds-button-danger-hover); color: var(--cds-text-on-color); }
.btn-danger-tertiary:active{ background: var(--cds-button-danger-active); color: var(--cds-text-on-color); }
.btn-danger-ghost{ background: transparent; color: var(--cds-button-danger-secondary); padding: 0 16px 0 15px; }
.btn-danger-ghost:hover{ background: var(--cds-button-danger-hover); color: var(--cds-text-on-color); }
.btn-danger-ghost:active{ background: var(--cds-button-danger-active); color: var(--cds-text-on-color); }
/* icon only (square; needs aria-label) */
.btn-icon-only{ padding: 0; justify-content: center; width: 40px; }
.btn-icon-only.btn-sm{ width: 32px; }
.btn-icon-only.btn-lg{ width: 48px; }
.btn-icon-only svg{ position: static; }
.btn-icon-only.btn-ghost{ color: var(--cds-icon-primary); }
/* disabled */
.btn:disabled, .btn.disabled, .cds-btn:disabled{
  background: var(--cds-button-disabled);
  border-color: transparent;
  color: var(--cds-text-on-color-disabled);
  box-shadow: none;
  cursor: not-allowed;
}
.btn-tertiary:disabled, .btn-danger-tertiary:disabled{
  background: transparent;
  border-color: var(--cds-border-disabled);
  color: var(--cds-text-disabled);
}
.btn-ghost:disabled, .btn-danger-ghost:disabled{ background: transparent; color: var(--cds-text-disabled); }

/* Full-width large button (login form) */
.cds-btn{ display: flex; width: 100%; max-width: none; min-height: 48px; }

/* ─── Tile (Carbon tile: layer-01, no border, no shadow, no radius) ────── */
.card{
  background: var(--cds-layer-01);
  padding: 16px;
}

.card-title{
  font-size: 0.875rem;        /* heading-compact-01 */
  font-weight: 600;
  line-height: 1.125rem;
  letter-spacing: 0.16px;
  color: var(--cds-text-primary);
  margin-bottom: 16px;
}

/* ─── Structured list (label / value rows) ─────────────────────────────── */

/* ─── Data table (Carbon DataTable, size sm 32 px / xs 24 px, zebra off) ── */

 .cds-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;        /* body-compact-01 */
  line-height: 1.125rem;
  letter-spacing: 0.16px;
}
 .cds-table th{
  height: 32px;
  padding: 0 16px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  background: var(--cds-layer-accent);
  color: var(--cds-text-primary);
  font-size: 0.875rem;        /* heading-compact-01 */
  font-weight: 600;
  line-height: 1.125rem;
  letter-spacing: 0.16px;
}
 .cds-table td{
  height: 32px;
  padding: 7px 16px 6px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  color: var(--cds-text-secondary);
  border-top: 1px solid var(--cds-layer);
  border-bottom: 1px solid var(--cds-border-subtle-01);
}
 .cds-table tbody tr{
  transition: background-color var(--cds-duration-fast-01) var(--cds-easing-entrance);
}
 .cds-table tbody tr:hover td{
  background: var(--cds-layer-hover);
  color: var(--cds-text-primary);
}
/* compact in-tile tables: many columns in a third-width tile (documented deviation: 8 px cell inset) */

/* ─── Tag (Carbon tag: 24 px md / 18 px sm, pill, label-01) ─────────────── */
.cds-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  max-width: 100%;
  padding: 0 8px;
  border: 0;
  border-radius: 1rem;
  font-family: inherit;
  font-size: 0.75rem;         /* label-01 */
  font-weight: 400;
  line-height: 1rem;
  letter-spacing: 0.32px;
  white-space: nowrap;
  vertical-align: middle;
  background: var(--cds-tag-background-gray);
  color: var(--cds-tag-color-gray);
}
.cds-tag--sm{ min-height: 18px; }
.cds-tag--green { background: var(--cds-tag-background-green); color: var(--cds-tag-color-green); }
.cds-tag--red { background: var(--cds-tag-background-red); color: var(--cds-tag-color-red); }
.cds-tag--blue { background: var(--cds-tag-background-blue); color: var(--cds-tag-color-blue); }
.cds-tag--warm-gray{ background: var(--cds-tag-background-warm-gray); color: var(--cds-tag-color-warm-gray); }
/* warning (Carbon v11 has no yellow tag): the warning notification's colours; `--warm` is the name the module pages use */
.cds-tag--warm, .cds-tag--yellow{ background: var(--cds-notification-background-warning); color: var(--cds-text-primary); box-shadow: inset 3px 0 0 var(--cds-support-warning); }
.cds-tag--purple{ background: var(--cds-tag-background-purple); color: var(--cds-tag-color-purple); }
.cds-tag--cyan{ background: var(--cds-tag-background-cyan); color: var(--cds-tag-color-cyan); }
.cds-tag--teal{ background: var(--cds-tag-background-teal); color: var(--cds-tag-color-teal); }
.cds-tag--magenta{ background: var(--cds-tag-background-magenta); color: var(--cds-tag-color-magenta); }
.cds-tag--outline{ background: transparent; box-shadow: inset 0 0 0 1px var(--cds-border-strong-01); color: var(--cds-text-primary); }
button.cds-tag, .cds-tag--interactive{ cursor: pointer; outline: none; }
button.cds-tag:hover, .cds-tag--interactive:hover{ filter: brightness(0.95); }
button.cds-tag:focus-visible, .cds-tag--interactive:focus-visible{ box-shadow: inset 0 0 0 2px var(--cds-focus), inset 0 0 0 3px var(--cds-focus-inset); }
/* status shape inside a tag (16 px Carbon icon) */
.cds-tag[data-status]::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  background: var(--cds-support-warning);
  -webkit-mask: var(--cds-ico-warning-filled) center / contain no-repeat;
          mask: var(--cds-ico-warning-filled) center / contain no-repeat;
}

/* ─── Inline notification (low contrast): 3 px accent, 20 px status icon ── */
.cds-notification, .cds-inline-notification {
  position: relative;
  display: block;
  min-height: 32px;
  padding: 8px 16px 8px 44px;
  font-size: 0.875rem;        /* body-compact-01 */
  line-height: 1.125rem;
  letter-spacing: 0.16px;
  color: var(--cds-text-primary);
  background: var(--cds-notification-background-info);
  border-left: 3px solid var(--cds-support-info);
}
.cds-notification::before, .cds-inline-notification::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 7px;
  width: 20px;
  height: 20px;
  background: var(--cds-support-info);
  -webkit-mask: var(--cds-ico-info-filled) center / contain no-repeat;
          mask: var(--cds-ico-info-filled) center / contain no-repeat;
}
.cds-notification--error, .cds-inline-notification--error { background: var(--cds-notification-background-error); border-left-color: var(--cds-support-error); }
.cds-notification--error::before, .cds-inline-notification--error::before {
  background: var(--cds-support-error);
  -webkit-mask-image: var(--cds-ico-error-filled); mask-image: var(--cds-ico-error-filled);
}
.cds-notification--warning, .cds-inline-notification--warning { background: var(--cds-notification-background-warning); border-left-color: var(--cds-support-warning); }
.cds-notification--warning::before, .cds-inline-notification--warning::before {
  background: var(--cds-support-warning);
  -webkit-mask-image: var(--cds-ico-warning-filled); mask-image: var(--cds-ico-warning-filled);
}
.cds-notification--success, .cds-inline-notification--success{ background: var(--cds-notification-background-success); border-left-color: var(--cds-support-success); }
.cds-notification--success::before, .cds-inline-notification--success::before{
  background: var(--cds-support-success);
  -webkit-mask-image: var(--cds-ico-checkmark-filled); mask-image: var(--cds-ico-checkmark-filled);
}
/* g90: low-contrast notifications sit on layer-01 with a 1 px border (Carbon) */
[data-carbon-theme="g90"] .cds-notification, [data-carbon-theme="g90"] .cds-inline-notification {
  background: var(--cds-layer-02);
}
/* info (the default look, named: a page may switch kinds); cds-inline-notification* = the same component (older markup) */
.cds-notification--info, .cds-inline-notification--info{ background: var(--cds-notification-background-info); border-left-color: var(--cds-support-info); }
.cds-notification--info::before, .cds-inline-notification--info::before{
  background: var(--cds-support-info);
  -webkit-mask-image: var(--cds-ico-info-filled); mask-image: var(--cds-ico-info-filled);
}
[data-carbon-theme="g90"] .cds-notification--info, [data-carbon-theme="g90"] .cds-inline-notification--info{ background: var(--cds-layer-02); }
.cds-notification > p + p, .cds-inline-notification > p + p{ margin-top: var(--cds-spacing-02); }

/* ─── Field-level invalid state (Carbon form requirement) ───────────────── */
/* the field: 2 px support-error outline; the message under it: .cds-form-requirement, linked by aria-describedby */
.cds-text-input[aria-invalid="true"], .cds-select[aria-invalid="true"], .cds-textarea[aria-invalid="true"],
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"]{
  outline: 2px solid var(--cds-support-error);
  outline-offset: -2px;
}
.cds-form-requirement{
  display: flex;
  align-items: flex-start;
  gap: var(--cds-spacing-02);
  margin-top: var(--cds-spacing-02);
  font-size: var(--cds-helper-text-01-font-size);
  line-height: var(--cds-helper-text-01-line-height);
  letter-spacing: var(--cds-helper-text-01-letter-spacing);
  color: var(--cds-text-error);
}
.cds-form-requirement::before{
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  background: var(--cds-support-error);
  -webkit-mask: var(--cds-ico-error-filled) center / contain no-repeat;
          mask: var(--cds-ico-error-filled) center / contain no-repeat;
}

/* ─── Type helpers (@carbon/type productive styles) ─────────────────────── */
.cds-type-label-01{ font-size: var(--cds-label-01-font-size); line-height: var(--cds-label-01-line-height); font-weight: var(--cds-label-01-font-weight); letter-spacing: var(--cds-label-01-letter-spacing); }
.cds-type-helper-text-01{ font-size: var(--cds-helper-text-01-font-size); line-height: var(--cds-helper-text-01-line-height); font-weight: var(--cds-helper-text-01-font-weight); letter-spacing: var(--cds-helper-text-01-letter-spacing); }
.cds-type-body-compact-01{ font-size: var(--cds-body-compact-01-font-size); line-height: var(--cds-body-compact-01-line-height); font-weight: var(--cds-body-compact-01-font-weight); letter-spacing: var(--cds-body-compact-01-letter-spacing); }
.cds-type-body-01{ font-size: var(--cds-body-01-font-size); line-height: var(--cds-body-01-line-height); font-weight: var(--cds-body-01-font-weight); letter-spacing: var(--cds-body-01-letter-spacing); }
.cds-type-heading-compact-01{ font-size: var(--cds-heading-compact-01-font-size); line-height: var(--cds-heading-compact-01-line-height); font-weight: var(--cds-heading-compact-01-font-weight); letter-spacing: var(--cds-heading-compact-01-letter-spacing); }
.cds-type-heading-compact-02{ font-size: var(--cds-heading-compact-02-font-size); line-height: var(--cds-heading-compact-02-line-height); font-weight: var(--cds-heading-compact-02-font-weight); letter-spacing: var(--cds-heading-compact-02-letter-spacing); }
.cds-type-heading-02{ font-size: var(--cds-heading-02-font-size); line-height: var(--cds-heading-02-line-height); font-weight: var(--cds-heading-02-font-weight); letter-spacing: var(--cds-heading-02-letter-spacing); }
.cds-type-heading-03{ font-size: var(--cds-heading-03-font-size); line-height: var(--cds-heading-03-line-height); font-weight: var(--cds-heading-03-font-weight); letter-spacing: var(--cds-heading-03-letter-spacing); }
.cds-type-heading-04{ font-size: var(--cds-heading-04-font-size); line-height: var(--cds-heading-04-line-height); font-weight: var(--cds-heading-04-font-weight); letter-spacing: var(--cds-heading-04-letter-spacing); }
.cds-type-code-01{ font-size: var(--cds-code-01-font-size); line-height: var(--cds-code-01-line-height); font-weight: var(--cds-code-01-font-weight); letter-spacing: var(--cds-code-01-letter-spacing); font-family: var(--cds-font-mono); }
.cds-type-code-02{ font-size: var(--cds-code-02-font-size); line-height: var(--cds-code-02-line-height); font-weight: var(--cds-code-02-font-weight); letter-spacing: var(--cds-code-02-letter-spacing); font-family: var(--cds-font-mono); }

/* ─── Toast notification (high contrast; floating) ─────────────────────── */
.toast-container{
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast{
  position: relative;
  display: flex;
  align-items: flex-start;
  width: 288px;
  min-height: 48px;
  padding: 14px 0 14px 44px;
  font-size: 0.875rem;        /* body-compact-01 */
  line-height: 1.125rem;
  letter-spacing: 0.16px;
  color: var(--cds-text-inverse);
  background: var(--cds-background-inverse);
  border-left: 3px solid var(--cds-support-info-inverse);
  box-shadow: var(--cds-shadow-floating);
  animation: toast-in var(--cds-duration-moderate-02) var(--cds-easing-entrance);
}
.toast::before{
  content: '';
  position: absolute;
  left: 13px;
  top: 14px;
  width: 20px;
  height: 20px;
  background: var(--cds-support-info-inverse);
  -webkit-mask: var(--cds-ico-info-filled) center / contain no-repeat;
          mask: var(--cds-ico-info-filled) center / contain no-repeat;
}
.toast-text{ flex: 1; padding-right: 8px; }
.toast-close{
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: -14px 0;
  padding: 0;
  border: 2px solid transparent;
  background: transparent;
  color: var(--cds-icon-inverse);
  cursor: pointer;
  outline: none;
}
.toast-close svg{ width: 20px; height: 20px; fill: currentColor; }
.toast-close:focus-visible{ border-color: var(--cds-focus-inverse); }
.toast.success{ border-left-color: var(--cds-support-success-inverse); }
.toast.success::before{
  background: var(--cds-support-success-inverse);
  -webkit-mask-image: var(--cds-ico-checkmark-filled); mask-image: var(--cds-ico-checkmark-filled);
}
.toast.error{ border-left-color: var(--cds-support-error-inverse); }
.toast.error::before{
  background: var(--cds-support-error-inverse);
  -webkit-mask-image: var(--cds-ico-error-filled); mask-image: var(--cds-ico-error-filled);
}

@keyframes toast-in {
  from{ opacity: 0; transform: translateY(8px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* ─── Form fields (Carbon text input / select / textarea) ──────────────── */
.cds-form-item{ display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cds-label{
  font-size: 0.75rem;         /* label-01 */
  line-height: 1rem;
  letter-spacing: 0.32px;
  color: var(--cds-text-secondary);
}
.cds-text-input, .cds-select, .cds-textarea{
  width: 100%;
  min-width: 160px;
  height: 40px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.125rem;
  letter-spacing: 0.16px;
  color: var(--cds-text-primary);
  background-color: var(--cds-field);
  border: 0;
  border-bottom: 1px solid var(--cds-border-strong-01);
  border-radius: 0;
  outline: 2px solid transparent;
  outline-offset: -2px;
  transition: background-color var(--cds-duration-fast-01) var(--cds-easing-standard),
              outline-color var(--cds-duration-fast-01) var(--cds-easing-standard);
}
.cds-text-input::placeholder, .cds-textarea::placeholder{ color: var(--cds-text-placeholder); opacity: 1; }
.cds-text-input:hover, .cds-select:hover, .cds-textarea:hover{ background-color: var(--cds-field-hover-01); }
.page-tile .cds-text-input:hover, .page-tile .cds-select:hover, .page-tile .cds-textarea:hover{ background-color: var(--cds-field-hover-02); }
.cds-text-input:focus, .cds-select:focus, .cds-textarea:focus{ outline-color: var(--cds-focus); }
.cds-text-input--sm, .cds-select--sm{ height: 32px; }
.cds-select{
  -webkit-appearance: none;
          appearance: none;
  padding-right: 48px;
  cursor: pointer;
  /* Carbon ChevronDown 16 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%238d8d8d' d='M8 11 3 6l.7-.7L8 9.6l4.3-4.3.7.7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px 16px;
}
.cds-select option{ background: var(--cds-layer-01); color: var(--cds-text-primary); }
.cds-textarea{
  height: auto;
  padding: 11px 16px;
  font-family: 'IBM Plex Mono', Menlo, monospace;
  font-size: 0.75rem;
  line-height: 1rem;
  letter-spacing: 0.32px;
  resize: vertical;
}

.cds-modal-overlay{ position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center; background: var(--cds-overlay); }
.cds-modal{ position: relative; display: flex; flex-direction: column; width: 576px; max-width: calc(100vw - 32px); max-height: calc(100vh - 64px); max-height: calc(100dvh - 32px); background: var(--cds-layer-01); }
.cds-modal > form{ display: flex; flex-direction: column; min-height: 0; max-height: inherit; flex: 1 1 auto; }
.cds-modal-header, .cds-modal-footer{ flex: 0 0 auto; }
.cds-modal-header{ padding: 16px 64px 8px 16px; }
.cds-modal-label{ font-size: 0.75rem; line-height: 1rem; letter-spacing: 0.32px; color: var(--cds-text-secondary); }
.cds-modal-title{ font-size: 1.25rem; font-weight: 400; line-height: 1.75rem; margin: 0; }   /* heading-03 */
.cds-modal-close{ position: absolute; top: 0; right: 0; width: 48px; height: 48px; }
.cds-modal-body{ display: flex; flex-direction: column; gap: 24px; padding: 16px 16px 48px; overflow-y: auto; flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; }
@media (max-height: 760px) { .cds-modal-body{ gap: 16px; padding-bottom: 24px; } }
.cds-modal-body .cds-select, .cds-modal-body .cds-text-input{ background-color: var(--cds-field-02); }
.cds-modal-footer{ display: flex; height: 64px; }
.cds-modal-footer .btn{ flex: 1 1 50%; height: 64px; max-width: none; align-items: flex-start; padding-top: 14px; }

/* Tile (Carbon tile: layer, no border, no shadow, no radius) and its header row */
.page-tile {
  background: var(--cds-layer-01);
  padding: 16px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.page-tile > .cds-table { margin: 0 -16px; width: calc(100% + 32px); }
.page-tile > .cds-table:first-child { margin-top: -16px; }
.page-tile > .cds-table:last-child { margin-bottom: -16px; }
.page-tile > .cds-table tbody tr:last-child td { border-bottom: 0; }
.page-tile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.page-tile-head h2 { font-size: 1rem; font-weight: 600; line-height: 1.5rem; margin: 0; }   /* heading-02 */

/* Forms: helper text; consecutive form items stack 16 px apart */
.cds-helper { font-size: 0.75rem; line-height: 1rem; letter-spacing: 0.32px; color: var(--cds-text-helper); }
.cds-form-item + .cds-form-item { margin-top: var(--cds-spacing-05); }

/* Large modal, md tables, tables that stack on phones (data-label per cell), scrolling table wrapper */
.cds-table--md td { height: 40px; padding-top: 11px; padding-bottom: 10px; }
.cds-table--md th { height: 40px; }
.lf-confirm-list{ margin: 0 0 0 20px; }   /* LFUI.confirm: what goes off air */
.cds-modal--lg { width: 768px; }
.cds-modal--lg .cds-modal-body { padding-bottom: 24px; }
.table-wrap, .table-scroll { overflow-x: auto; max-width: 100%; position: relative; -webkit-overflow-scrolling: touch; }
@media (max-width: 672px) {
  .cds-table--stack thead { display: none; }
  .cds-table--stack, .cds-table--stack tbody { display: block; width: 100% !important; margin: 0 !important; }
  .cds-table--stack tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--cds-border-subtle-01); }
  .cds-table--stack td { display: block; height: auto !important; border: 0 !important; padding: 2px 0 !important; white-space: normal; overflow-wrap: anywhere; text-align: left !important; }
  .cds-table--stack td:empty { display: none; }
  .cds-table--stack td[data-label]::before { content: attr(data-label); display: block; font-size: 0.75rem; line-height: 1rem; color: var(--cds-text-secondary); }
  .cds-table--stack td:first-child::before { display: none; }
  .cds-table--stack td:first-child { font-weight: 600; }
  .cds-table--stack td .btn { margin: 4px 8px 0 0; }
}

/* Visually hidden, read by screen readers */
.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; }

/* lf-ui.js freshness banner ("Not updating since …"): below the page's header line */
.lf-stale{ margin: var(--cds-spacing-03, 8px) 0; }

/* lf-ui.js framed pages: inside the host's or the hub's frame the parent draws the chrome */
.lf-embed [data-lf-chrome]{ display: none !important; }
/* a module's own page bar, drawn instead of its side nav when framed */
.lf-pagebar{ display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--cds-border-subtle-01); margin: 0 0 var(--cds-spacing-05, 16px); }
.lf-pagebar a{ padding: var(--cds-spacing-03, 8px) var(--cds-spacing-05, 16px); color: var(--cds-text-secondary); text-decoration: none; border-bottom: 2px solid transparent; font-size: 0.875rem; }
.lf-pagebar a:hover{ color: var(--cds-text-primary); background: var(--cds-layer-hover-01); }
.lf-pagebar a[aria-current="page"]{ color: var(--cds-text-primary); border-bottom-color: var(--cds-border-interactive); font-weight: 600; }
.lf-pagebar a:focus-visible{ outline: 2px solid var(--cds-focus); outline-offset: -2px; }
