:root {
  --nirabas-tile-shade: linear-gradient(140deg, #eaf0e5, #f6f2e3);
  --nirabas-link-teal: #08665f;
  --nirabas-node-orange: #bf693d;
}

/* The orange node marks links and controls that the visitor can activate. */
body :where(a[href], button, summary, [role="link"], [role="button"]):not(
  :disabled, [aria-disabled="true"], header .brand:not(:has(img))
)::before,
body header a.brand[href]:not(:has(img))::after {
  content: "";
  display: inline-block;
  inline-size: 0.55em;
  block-size: 0.55em;
  flex: none;
  align-self: center;
  margin-inline-end: 0.42em;
  vertical-align: 0.12em;
  border-radius: 50%;
  background: var(--nirabas-node-orange);
  pointer-events: none;
}

/* Full-tile links keep the node next to the title on narrow and wide screens. */
body :is(.el-orchestration-steps a, a.ws-tool) {
  position: relative;
}
body :is(.el-orchestration-steps a, a.ws-tool)::before {
  position: absolute;
  inset-block-start: 18px;
  inset-inline-end: 15px;
  margin: 0;
}
body .el-orchestration-steps a::before {
  inset-block-start: 28px;
  inset-inline: 18px auto;
}
body .el-orchestration-steps a strong { padding-inline-start: 18px; }
body a.ws-tool::before {
  inset-block-start: 23px;
  inset-inline: 8px auto;
}

/* One surface for navigation, public cards and workspace tiles. */
body :is(
  .nk-header nav > details > summary,
  .nk-nav-link,
  .nb-dropdown > summary,
  .nb-public-link,
  .workspace-menu > summary,
  .ws-sidebar nav a,
  .sidebar .nav-item,
  .el-grid article,
  .el-steps li,
  .el-availability,
  .el-operating-panel,
  .nk-block,
  .nk-band,
  .ws-panel,
  .ws-tool,
  .ws-metric,
  .card,
  .cards article,
  .assessment-card,
  .panel,
  .feature-card,
  .hero-card,
  .boundary-card,
  .signal-card,
  .tin-card,
  .tin-tour-card,
  .value-card,
  .objective-card,
  .alternative-card,
  .uncertainty-card,
  .evidence-card,
  .dissent-card,
  .method-card,
  .capability-card,
  .architecture-card,
  .agent-card,
  .sim-card,
  .branded-card,
  .echo-card,
  .decision-option,
  .decision-case-banner,
  .metric-strip > div,
  .editor-row,
  .flow-result,
  .signal-demo > *,
  .delivery-panel,
  .delivery-detail,
  .delivery-flow li,
  .delivery-phone-schedule li,
  .learn-note,
  .screen > .option,
  .screen > .summary,
  .screen > .feedback
) {
  /* The shared surface takes precedence over page-local background shorthands. */
  background-image: var(--nirabas-tile-shade) !important;
}

/* The simulator still uses a dark canvas around these light tiles. */
.screen > :is(.option, .summary, .feedback) {
  color: #173349;
}
.screen > :is(.option, .summary, .feedback) strong {
  color: #245652;
}

body :is(.ws-sidebar nav .ws-active, .sidebar .nav-item.active) {
  box-shadow: inset 3px 0 #087b71;
}

.nirabas-opening-line,
.nirabas-closing-line {
  margin: 0;
  padding: 22px 18px;
  background: #f8f7f1;
  color: #173349;
  font: 600 14px/1.6 Arial, sans-serif;
  text-align: center;
}
.nirabas-opening-line { border-bottom: 1px solid #d7e0d4; }
.nirabas-closing-line {
  padding-bottom: 76px;
  border-top: 1px solid #d7e0d4;
}

body .nk-topic-title { color: var(--nirabas-link-teal); }
body a.architecture-term {
  color: var(--nirabas-link-teal) !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}
body :is(.el-hero, .el-operating, .screen) a.architecture-term {
  color: #bdece3 !important;
}
body .screen :is(.option, .summary, .feedback) a.architecture-term {
  color: var(--nirabas-link-teal) !important;
}
.architecture-term sup {
  margin-inline-start: 0.08em;
  font-size: 0.67em;
  line-height: 0;
}

[data-architecture-reference]::after {
  content: "™";
  margin-inline-start: 0.08em;
  font-size: 0.67em;
  vertical-align: super;
}

.nirabas-app-icon {
  border-radius: 23%;
  flex: none;
}
.nirabas-branded-qr {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
}
.nirabas-branded-qr .nirabas-qr-image {
  display: block;
  min-width: 0;
  height: auto;
  background: white;
  border: 1px solid #dce4df;
  border-radius: 8px;
}
.el-header-qr .nirabas-branded-qr { gap: 6px; }
.nirabas-line-icon {
  display: block;
  margin: 0 auto 10px;
}

/* All featured introductions share the same shaded surface as the cards below them. */
body .nirabas-page-intro {
  background: var(--nirabas-tile-shade);
  border: 1px solid #d4e0d6;
  border-radius: 11px;
  padding: clamp(18px, 4vw, 28px);
  margin-block: 0 20px;
}
body .nk-intro .nk-lead,
body .nirabas-page-intro .lead {
  margin-bottom: 0;
}

.nirabas-wordmark-lockup {
  display: block;
  line-height: 1.15;
}
.nirabas-wordmark-tagline {
  display: block;
  margin-top: 5px;
  color: #386864;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: normal;
}
body :is(.nirabas-wordmark, header .brand:not(:has(img))) {
  color: #08665f !important;
}
body .nirabas-wordmark {
  background: linear-gradient(100deg, #075954, #18766b);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body header .brand:not(:has(img)) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
body header .brand:not(:has(img))::before {
  content: "";
  display: block;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 23%;
  background: url('/brand/app-192.png') center / contain no-repeat;
}
body .masthead .wordmark img { vertical-align: middle; margin-inline-end: 8px; }

/* Reserve a line for the compact brand inside shared content tiles. */
body :is(
  .el-grid article, .el-steps li, .el-availability, .el-operating-panel,
  .nk-block, .nk-band, .nirabas-page-intro, .ws-panel, .ws-tool, .ws-metric,
  .card, .cards article, .assessment-card, .panel, .feature-card, .hero-card,
  .boundary-card, .signal-card, .tin-card, .tin-tour-card, .value-card,
  .objective-card, .alternative-card, .uncertainty-card, .evidence-card,
  .dissent-card, .method-card, .capability-card, .architecture-card, .agent-card,
  .sim-card, .branded-card, .echo-card, .decision-option, .decision-case-banner,
  .metric-strip > div, .editor-row, .flow-result, .signal-demo > *,
  .delivery-panel, .delivery-detail, .delivery-flow li, .delivery-phone-schedule li,
  .learn-note, .screen > :is(.option, .summary, .feedback)
):not(.nk-topic-intro) {
  position: relative;
  padding-block-start: 42px;

  &:not(.feature-card, .delivery-flow li, [data-architecture-reference])::after,
  &:is(.feature-card, .delivery-flow li):not(a[href], button, summary)::before {
    content: "NIRABAS" / "";
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 15px;
    padding-inline-start: 22px;
    background: url('/brand/nirabas-symbol.svg') left center / 17px no-repeat;
    color: var(--nirabas-link-teal);
    font: 700 10px/18px Arial, sans-serif;
    letter-spacing: 0.09em;
    pointer-events: none;
  }
}
body .ws-tool .ws-tool-icon { inset-block-start: 42px; }

body .nk-topic-brand {
  display: flex;
  align-items: center;
  gap: 7px;
}
body .nk-topic-brand img { flex: none; }

@media (forced-colors: active) {
  body .nirabas-wordmark {
    background: none;
    -webkit-text-fill-color: currentColor;
  }
  body :where(a[href], button, summary, [role="link"], [role="button"])::before,
  body header a.brand[href]:not(:has(img))::after {
    forced-color-adjust: none;
  }
}
