/* Guardian · console pieces shared by every app: risk pills, app / web app tags, status chip in the corner.
   The host page defines its own palette (--muted, --sys, --sys-t, --dia, --dia-t); the risk tokens below are Guardian's.
   Dark is the default; html[data-theme="light"] switches to the light tokens. */
:root {
  --crit-1: rgba(205,28,46,.66); --crit-2: rgba(120,12,40,.46); --crit-b: rgba(255,112,112,.70); --crit-t: #FFE3DD; --crit-g: rgba(225,40,58,.50);
  --high-1: rgba(232,126,72,.26); --high-2: rgba(170,82,50,.12); --high-b: rgba(242,152,104,.40); --high-t: #FFD2B4; --high-g: rgba(232,126,72,.12);
  --mod-1: rgba(214,182,96,.18); --mod-2: rgba(150,122,52,.07); --mod-b: rgba(230,202,124,.30); --mod-t: #EEDCAE; --mod-g: rgba(214,182,96,.05);
  --low-1: rgba(154,170,202,.14); --low-2: rgba(154,170,202,.06); --low-b: rgba(154,170,202,.26);
}
html[data-theme="light"] {
  --crit-1: rgba(196,26,44,.26); --crit-2: rgba(120,12,40,.12); --crit-b: rgba(176,24,40,.55); --crit-t: #86121F; --crit-g: rgba(196,26,44,.22);
  --high-1: rgba(232,126,72,.14); --high-2: rgba(170,82,50,.05); --high-b: rgba(204,110,60,.32); --high-t: #93451A; --high-g: rgba(232,126,72,.06);
  --mod-1: rgba(214,182,96,.18); --mod-2: rgba(150,122,52,.05); --mod-b: rgba(176,140,50,.30); --mod-t: #6E5A14; --mod-g: transparent;
  --low-1: rgba(91,107,136,.10); --low-2: rgba(91,107,136,.04); --low-b: rgba(91,107,136,.22);
}
.riskc { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; }
@media (max-width: 700px) { .riskc { align-items: flex-end; text-align: right; } }
.riskc .muted { max-width: 30ch; line-height: 1.35; }
.risk { display: inline-flex; align-items: center; justify-content: center; height: 19px; padding: 0 8px; line-height: 1;
  font-size: 9.5px; font-weight: 700; letter-spacing: .08em; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--rk-b); color: var(--rk-t); background: linear-gradient(135deg, var(--rk-1), var(--rk-2));
  box-shadow: 0 0 10px var(--rk-g), inset 0 1px 0 rgba(255,255,255,.08); backdrop-filter: blur(6px); }
.risk.r-crit { font-weight: 800; --rk-1: var(--crit-1); --rk-2: var(--crit-2); --rk-b: var(--crit-b); --rk-t: var(--crit-t); --rk-g: var(--crit-g); }
.risk.r-high { --rk-1: var(--high-1); --rk-2: var(--high-2); --rk-b: var(--high-b); --rk-t: var(--high-t); --rk-g: var(--high-g); }
.risk.r-mod { --rk-1: var(--mod-1); --rk-2: var(--mod-2); --rk-b: var(--mod-b); --rk-t: var(--mod-t); --rk-g: var(--mod-g); }
.risk.r-low { --rk-1: var(--low-1); --rk-2: var(--low-2); --rk-b: var(--low-b); --rk-t: color-mix(in srgb, var(--ink, #EAF0FA) 82%, transparent); --rk-g: transparent; }
.side { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.side.s-app { color: var(--sys-t); background: color-mix(in srgb, var(--sys) 18%, transparent); border: 1px solid color-mix(in srgb, var(--sys) 40%, transparent); }
.side.s-web { color: var(--dia-t); background: color-mix(in srgb, var(--dia) 16%, transparent); border: 1px solid color-mix(in srgb, var(--dia) 40%, transparent); }
/* a status always sits in the top-right corner of its item, never as a row or a column */
.g-st-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.g-st-row > :last-child { flex: none; }

/* the app tag reads at AA on both themes */
html[data-theme="light"] .side.s-app { color: #4A3AA8; }
html[data-theme="light"] .side.s-web { color: #08665D; }
/* a status in the corner of its item: neutral (a date), waiting (to fix by a date), warn (incomplete), none (dashed) */
.st { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap; border: 1px solid var(--line, rgba(234,240,250,.10)); color: var(--ink, #EAF0FA);
  background: color-mix(in srgb, var(--muted, #9AAACA) 12%, transparent); }
.st.wait { color: var(--sys-t, #B3A7FF); background: color-mix(in srgb, var(--sys, #8C7BF2) 14%, transparent); border-color: color-mix(in srgb, var(--sys, #8C7BF2) 38%, transparent); }
.st.warn { color: var(--mod-t); background: linear-gradient(135deg, var(--mod-1), var(--mod-2)); border-color: var(--mod-b); }
.st.none { color: var(--muted, #9AAACA); background: transparent; border-style: dashed; }
