/* "Which credential answers?" for the Azure RBAC article. Built on the v3 tokens
   and the kit aliases in /css/explainers.css. */
.cc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cc__bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); font: 500 12px/1.3 var(--font-mono); color: var(--muted); }
.cc__bar a { color: var(--ink-2); }
.cc__grid { display: grid; gap: 22px; padding: 20px 18px 22px; }
@container (min-width: 720px) { .cc__grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 30px; padding: 24px 26px 26px; } }
.cc__grid > div { min-width: 0; }
.cc__label { font-size: 13px; color: var(--muted); margin: 16px 0 8px; }
.cc__label:first-child { margin-top: 0; }
.cc__controls { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.cc__controls label { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; color: var(--ink-2); line-height: 1.45; cursor: pointer; }
.cc__controls label.is-sub { margin-left: 28px; }
.cc__controls input[type="checkbox"] { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--accent); }
.cc__controls input:disabled + span { opacity: .45; }
.cc__controls code, .cc__msg, .cc__name { font-family: var(--font-mono); }
.cc__controls code { font-size: 12px; color: var(--ink); }
.cc__mode { display: grid; gap: 6px; margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.cc__mode select { font: 500 13px var(--font-mono); padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); max-width: 100%; }
.cc__chain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: c; }
.cc__chain li { counter-increment: c; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 2px 10px; align-items: start; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); transition: border-color .25s var(--ease), opacity .25s var(--ease), background .25s var(--ease); }
.cc__chain li::before { content: counter(c); font: 500 11px/20px var(--font-mono); color: var(--muted); text-align: center; width: 20px; height: 20px; border: 1px solid var(--line-strong); border-radius: 50%; }
.cc__name { font-size: 12.5px; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; line-height: 20px; }
.cc__state { font: 500 10.5px/20px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.cc__msg { grid-column: 2 / -1; font-size: 12px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.cc__msg:empty { display: none; }
.cc__chain li[data-state="unavailable"] .cc__name { color: var(--ink-2); }
.cc__chain li[data-state="unreached"], .cc__chain li[data-state="excluded"] { opacity: .45; }
.cc__chain li[data-state="token"] { border-color: color-mix(in srgb, var(--pass-ink) 55%, var(--line)); background: color-mix(in srgb, var(--pass-ink) 7%, var(--bg)); }
.cc__chain li[data-state="token"] .cc__state { color: var(--pass-ink); }
.cc__chain li[data-state="error"] { border-color: color-mix(in srgb, #b0344f 50%, var(--line)); }
.cc__chain li[data-state="error"] .cc__state, .cc__result[data-ok="no"] { color: #b0344f; }
[data-theme="dark"] .cc__chain li[data-state="error"] .cc__state, [data-theme="dark"] .cc__result[data-ok="no"] { color: var(--rose); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cc__chain li[data-state="error"] .cc__state,
  :root:not([data-theme="light"]) .cc__result[data-ok="no"] { color: var(--rose); }
}
.cc__result { margin: 14px 0 0; font: 600 13px/1.5 var(--font-mono); color: var(--ink); overflow-wrap: anywhere; }
.cc__result[data-ok="yes"] { color: var(--pass-ink); }
.cc > figcaption { padding: 0 18px 16px; margin-top: 0; }
.cc__static { padding: 0 18px 18px; }
.cc.is-live .cc__static { display: none; }
.cc:not(.is-live) .cc__grid { display: none; }
.cc__static table, .cheat { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cc__static th, .cc__static td, .cheat th, .cheat td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.cc__static th, .cheat th { color: var(--ink); font-weight: 600; border-bottom-color: var(--line-strong); }
.cheat td:first-child { color: var(--ink); font-weight: 600; }
.cheat code { font-size: 12px; }
.table-scroll { overflow-x: auto; }
@media (max-width: 560px) { .cheat thead { display: none; } .cheat tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); } .cheat td { display: block; border: 0; padding: 2px 0; } }
.cc__controls label.cc__mode { grid-template-columns: minmax(0, 1fr); cursor: default; }
.cc__name { overflow-wrap: normal; word-break: keep-all; }
@container (max-width: 520px) {
  .cc__chain li { grid-template-columns: 22px minmax(0, 1fr); }
  .cc__state { grid-column: 2; line-height: 1.2; }
}

/* ---------- quality pass, October 2026 ---------- */
/* A code chip inside a link: the underline stays on the words, the chip takes the link color. */
.article-body a > code { display: inline-block; color: var(--color-accent); }
/* Links on the dark code bar keep their contrast on hover. */
.article-body .code .bar a:hover { color: var(--bone); }
/* Screenshots open full size, which matters most on a phone. */
.fig__open { display: block; border-radius: 12px; cursor: zoom-in; }
.fig__open:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Native selects in the labs, drawn to match the chips and inputs. */
.article-body figure select { -webkit-appearance: none; appearance: none; min-height: 40px; padding: 8px 34px 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background-color: var(--bg); color: var(--ink); cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; transition: border-color .2s var(--ease); }
.article-body figure select:hover { border-color: var(--ink-2); }
.article-body figure select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.article-body figure input[type="checkbox"] { accent-color: var(--accent); }
.article-body figure input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Phones: 44px targets, and figure bars stack instead of squeezing the source link into a narrow column. */
@media (max-width: 640px) {
  .article-body .chips button, .article-body .cmp__tabs button, .article-body .pvl__switch button { min-height: 44px; }
  .article-body figure select, .article-body figure input[type="text"] { min-height: 44px; }
  .article-body .code .bar, .article-body .lab__bar { flex-direction: column; align-items: flex-start; gap: 4px; }
}
/* Credentials the chain never reaches read as such without fading their text below contrast. */
.cc__chain li[data-state="unreached"], .cc__chain li[data-state="excluded"] { opacity: 1; border-style: dashed; background: transparent; }
.cc__chain li[data-state="unreached"] .cc__name, .cc__chain li[data-state="excluded"] .cc__name,
.cc__chain li[data-state="unreached"] .cc__msg, .cc__chain li[data-state="excluded"] .cc__msg { color: var(--muted); }
.cc__controls input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; }
.cc__mode select { width: 100%; }
@media (max-width: 640px) { .cc__controls label:not(.cc__mode) { min-height: 44px; padding: 6px 0; align-content: center; } }
/* Role assignments, transcribed from the portal screenshot so they stay readable at any width. */
.roles { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.roles__head { padding: 12px 16px; border-bottom: 1px solid var(--line); font: 600 14px/1.3 var(--font-body, inherit); color: var(--ink); }
.roles table { width: 100%; border-collapse: collapse; font-size: 14px; }
.roles th, .roles td { text-align: left; vertical-align: top; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.roles th { font: 500 12px/1.3 var(--font-mono); color: var(--muted); letter-spacing: .02em; }
.roles tr:last-child td { border-bottom: 0; }
.roles td:first-child { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.roles > figcaption { padding: 10px 16px 14px; margin-top: 0; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .roles thead { display: none; } .roles tr { display: block; padding: 10px 16px; border-bottom: 1px solid var(--line); } .roles tr:last-child { border-bottom: 0; } .roles td { display: block; border: 0; padding: 1px 0; } .roles td:nth-child(3)::before { content: "Role: "; color: var(--muted); } .roles td:nth-child(4)::before { content: "Scope: "; color: var(--muted); } }
/* A portrait screenshot stays at its own width instead of upscaling past it. */
.board--narrow { max-width: 560px; }
/* Pass 2: the manual switches sit behind a disclosure; the scenarios are the main control. */
.cc__more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 6px; }
.cc__more > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 14px; color: var(--ink-2); border-radius: 8px; }
.cc__more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cc__more[open] > summary { margin-bottom: 8px; }
.cc__more > summary { list-style: none; gap: 10px; }
.cc__more > summary::-webkit-details-marker { display: none; }
.cc__more > summary::before { content: ""; flex: none; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s var(--ease); margin-left: 2px; }
.cc__more[open] > summary::before { transform: rotate(45deg); }
