/* =====================================================================
   KPI demo - orange "PMRU API" markers (v0.6.1)
   Purpose : Marks, in orange, every place built from the API files PMRU
             shared: a pill ("PMRU API" with a plug icon), an orange rail
             on charts, catalogue cards and Data Hub rows, orange data
             pins, an orange dot on the menu groups and the notice at the
             top of those dashboards. Colours come from the --api tokens
             in tokens.css (light and dark).
   Related : js/modules/given.js, css/tokens.css
   Version : 0.6.1
   ===================================================================== */

/* the marker */
.apipill { display: inline-flex; align-items: center; gap: 4px; vertical-align: 1px; font-size: 11.5px; font-weight: 750; letter-spacing: .01em;
  color: var(--on-api); background: var(--api); border-radius: 99px; padding: 1px 8px 1px 6px; white-space: nowrap; line-height: 1.5; }
.apipill svg.ic { width: 12px; height: 12px; stroke-width: 2.2; vertical-align: 0; }
.apipill.sm { font-size: 11px; padding: 0 7px 0 5px; }
.snm .apipill, .strong .apipill, h2 .apipill { margin-left: 6px; }
.panel-head .tools .apipill { margin-right: 4px; }

/* notice at the top of a dashboard or screen */
.note.apinote { display: flex; gap: 12px; align-items: flex-start; border-left: 4px solid var(--api-rail); background: var(--api-tint); color: var(--ink);
  font-size: 13px; line-height: 1.55; padding: 10px 14px; margin: 0 0 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.note.apinote > .ic { color: var(--api-ink); margin-top: 2px; }
.note.apinote b { color: var(--ink); }
.apireq { margin: 6px 0; padding-left: 18px; }
.apireq li { margin: 3px 0; }
.apireq code, .apisec code { font-size: 12.5px; color: var(--api-ink); background: var(--surface); border: 1px solid var(--api-line); border-radius: 4px; padding: 0 5px; overflow-wrap: anywhere; }
.apisub { display: block; color: var(--ink-2); }
.apilegend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 12.5px; color: var(--ink-2); }

/* charts, cards and rows built on the shared API: an orange rail on the left */
.panel.api { box-shadow: inset 4px 0 0 var(--api-rail); }
a.sys.api { box-shadow: inset 4px 0 0 var(--api-rail); }
.tbl tr.api > td:first-child { box-shadow: inset 4px 0 0 var(--api-rail); }
.scr-tabs a .apidot, .dom .apidot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--api-rail); margin-left: 6px; vertical-align: 1px; flex: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--api-rail) 30%, transparent); }

/* data pins of the shared connections */
.pin.api { background: var(--api-tint); border-color: var(--api-line); color: var(--api-ink); }
.pin.api:hover { background: var(--api-tint); border-color: var(--api-rail); color: var(--api-ink); }
.pin.api .dot { background: var(--api); }
.pin.api .dot svg { stroke: var(--on-api); }

/* Data Hub panel and What's new section */
.apibox { border: 1px solid var(--api-line); border-left: 4px solid var(--api-rail); border-radius: var(--r-sm); background: var(--api-tint); padding: 10px 12px; }
.apiwhere { margin: 2px 0 6px; font-size: 13px; line-height: 1.45; }
.apiwhere a { font-weight: 650; color: var(--brand-ink); }
.apisec h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.apisec h2 .apipill { margin: 0; }

@media print { .apipill { border: 1px solid #9a3412; color: #9a3412; background: #fff; } .panel.api, a.sys.api { box-shadow: none; border-left: 3px solid #c2410c; } }
@media (forced-colors: active) { .apipill { border: 1px solid CanvasText; } .panel.api, a.sys.api, .tbl tr.api > td:first-child { box-shadow: none; border-left: 4px solid Highlight; } }
.note.apinote > .ic svg.ic { width: 18px; height: 18px; }
