/* Doxifi in-depth page.
 *
 * Deliberately thin. Every colour, font, spacing scale, button, band, nav,
 * footer and CTA comes from styles.css — the same tokens the landing page uses —
 * so the two pages cannot drift apart and all three themes work with no extra
 * declarations.
 *
 * This file adds only what the landing page does not have: the infographic
 * blocks. It never redefines a token, a type scale or a component.
 */

/* ---------- first-section heading (the page has no hero) ---------- */
/* The page opens directly on its first section, so that section's heading is
 * the document h1 and needs the top spacing the removed intro used to provide. */
.d-lede-title {
  font-size: clamp(30px, 3vw + 12px, 52px);
  line-height: 1.08;
  letter-spacing: -.03em;
  margin: 10px 0 clamp(12px, 1.4vw, 18px);
  max-width: 22ch;
}

/* section headings on this page sit above diagrams, so give them air */
.cap-head {
  margin-top: clamp(30px, 3vw, 46px);
  margin-bottom: clamp(12px, 1.2vw, 18px);
  font-size: clamp(17px, .7vw + 14px, 21px);
  letter-spacing: -.015em;
}

/* ---------- shared figure shell ---------- */
.fig {
  margin: clamp(28px, 3vw, 44px) 0 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.fig-spaced { margin-top: clamp(22px, 2.4vw, 34px); }
.band-alt .fig { background: var(--page); }

.fig-body {
  display: grid;
  gap: clamp(14px, 1.6vw, 26px);
  align-items: start;
  padding: clamp(18px, 2vw, 30px);
}
.fig-foot {
  margin: 0;
  padding: clamp(13px, 1.4vw, 18px) clamp(18px, 2vw, 30px);
  border-top: 1px solid var(--line-soft);
  background: var(--accent-tint);
  color: var(--muted);
  font-size: clamp(13px, .3vw + 12px, 14.5px);
  line-height: 1.55;
}

.fig-label {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.fig-col { min-width: 0; }
.fig-arrow {
  align-self: center;
  text-align: center;
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}
.fig-note {
  margin: 12px 0 0;
  font-size: clamp(12.5px, .3vw + 11.5px, 13.5px);
  color: var(--muted-2);
  line-height: 1.5;
}

/* ---------- 1: the copy fan-out ---------- */
.fig-fan { grid-template-columns: 1fr auto 1fr auto 1fr; }

.fig-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fig-chips li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--card);
}
.fig-chips .fig-more { color: var(--muted-2); border-style: dashed; }

.fig-copies { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.fig-copies li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 13px;
}
.fig-copies span { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fig-copies i { color: var(--muted-2); font-style: normal; white-space: nowrap; }
.fig-copies-more { opacity: .7; }

.fig-assemble { display: grid; gap: 6px; }
.fig-warn {
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--old-bg);
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-soft);
  position: relative;
  padding-left: 26px;
}
.fig-warn::before {
  content: "!";
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
}

/* ---------- 2: many owners, one document ---------- */
.fig-one { grid-template-columns: 1fr auto 1.1fr; }

.fig-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fig-people li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--ink-soft);
}
.fig-people i { font-style: normal; color: var(--muted-2); font-size: 12.5px; }

.fig-av,
.fig-o {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
  background: var(--accent-tint);
  color: var(--accent-deep);
}

.fig-outline { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: none; }
.fig-outline li {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--line-soft);
}
.fig-n {
  width: 22px; height: 22px;
  display: inline-grid; place-items: center;
  border-radius: 5px;
  background: var(--accent-tint);
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
}
.fig-t { font-size: 14px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* avatar tones, mirroring the landing page's .oc-own ramp */
.fig-av[data-tone="a"], .fig-o[data-tone="a"] { background: #E6F1EE; color: #0A4740; }
.fig-av[data-tone="b"], .fig-o[data-tone="b"] { background: #FBE7D1; color: #7A4A18; }
.fig-av[data-tone="c"], .fig-o[data-tone="c"] { background: #DCE9F7; color: #1F4568; }
.fig-av[data-tone="d"], .fig-o[data-tone="d"] { background: #F7DFDF; color: #7A2D2D; }
:root[data-theme="cobalt"] .fig-av[data-tone="a"], :root[data-theme="cobalt"] .fig-o[data-tone="a"] { background: #DDE7FC; color: #1B3A78; }
:root[data-theme="cobalt"] .fig-av[data-tone="b"], :root[data-theme="cobalt"] .fig-o[data-tone="b"] { background: #FBE7D1; color: #7A4A18; }
:root[data-theme="cobalt"] .fig-av[data-tone="c"], :root[data-theme="cobalt"] .fig-o[data-tone="c"] { background: #DCE9F7; color: #1F4568; }
:root[data-theme="cobalt"] .fig-av[data-tone="d"], :root[data-theme="cobalt"] .fig-o[data-tone="d"] { background: #F7DFDF; color: #7A2D2D; }
:root[data-theme="citrus"] .fig-av[data-tone="a"], :root[data-theme="citrus"] .fig-o[data-tone="a"] { background: #FBE3D4; color: #7A3C15; }
:root[data-theme="citrus"] .fig-av[data-tone="b"], :root[data-theme="citrus"] .fig-o[data-tone="b"] { background: #EAF0D4; color: #43551A; }
:root[data-theme="citrus"] .fig-av[data-tone="c"], :root[data-theme="citrus"] .fig-o[data-tone="c"] { background: #E1EAF6; color: #274566; }
:root[data-theme="citrus"] .fig-av[data-tone="d"], :root[data-theme="citrus"] .fig-o[data-tone="d"] { background: #F4DCDC; color: #7A2C2C; }

/* ---------- 3: push check flow ---------- */
.fig-flow { grid-template-columns: 1fr auto 1fr auto 1.2fr; }

.fig-step {
  padding: clamp(14px, 1.4vw, 18px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
}
.fig-step-k {
  width: 24px; height: 24px;
  margin: 0 0 10px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.fig-step-t { margin: 0 0 6px; font-size: 14px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.fig-step-b { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }

.fig-step-check { border-color: var(--accent-line); box-shadow: var(--shadow); }
.fig-split { display: grid; gap: 8px; margin-top: 12px; }
.fig-ok, .fig-no {
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.fig-ok { background: #EEF7F0; border-color: #CBE3D2; }
.fig-no { background: #FBEDED; border-color: #EFD2D2; }
.fig-ok-k, .fig-no-k { margin: 0 0 3px; font-size: 12.5px; font-weight: 700; }
.fig-ok-k { color: #235C36; }
.fig-no-k { color: #7A2D2D; }
.fig-ok-b, .fig-no-b { margin: 0; font-size: 13px; line-height: 1.45; }
.fig-ok-b { color: #2C5C3C; }
.fig-no-b { color: #7A3333; }

/* ---------- 4: two levels of history ---------- */
.fig-hist { grid-template-columns: 1fr 1fr; }

.fig-timeline { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 2px; }
.fig-timeline li {
  display: grid;
  grid-template-columns: 14px auto minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13.5px;
  position: relative;
}
.fig-timeline li::before {
  content: "";
  position: absolute;
  left: 6px; top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
}
.fig-timeline li:first-child::before { top: 50%; }
.fig-timeline li:last-child::before { bottom: 50%; }
.fig-dot {
  width: 9px; height: 9px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--line);
  position: relative;
  z-index: 1;
}
.fig-timeline b { font-size: 13.5px; color: var(--ink-soft); }
.fig-timeline i { font-style: normal; color: var(--muted-2); font-size: 12.5px; }
.fig-timeline .fig-live .fig-dot { background: var(--accent); border-color: var(--accent); }
.fig-timeline .fig-live b { color: var(--accent); }

/* ---------- 5: export manifest ---------- */
.fig-export { grid-template-columns: 1fr auto 1fr; align-items: center; }
/* A page mock is naturally taller than a four-row list; forcing equal heights
   would stretch the list. The paper column carries its own legend so the two
   masses read as balanced without stretching either. */

.fig-paper {
  padding: clamp(14px, 1.5vw, 20px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow);
}
.fig-paper-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--accent-line);
}
.fig-paper-kicker { font-size: 10.5px; letter-spacing: .10em; text-transform: uppercase; color: var(--muted-2); }
.fig-paper-title { font-size: 14px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); }
.fig-paper-lines { display: grid; gap: 6px; }
.fig-paper-lines span {
  display: block;
  height: 5px;
  border-radius: 2px;
  background: var(--line-soft);
}
.fig-paper-lines .fig-paper-h {
  height: auto;
  background: none;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
}

.fig-manifest { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.fig-manifest li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13.5px;
}
.fig-manifest span { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fig-manifest b {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-deep);
  background: var(--accent-tint);
  border-radius: 100px;
  padding: 2px 8px;
  flex: none;
}

/* ---------- limits block ---------- */
.limits {
  margin-top: clamp(30px, 3vw, 46px);
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--card);
}
.limits-head {
  margin: 0 0 12px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--accent);
}
.limits-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.limits-list li {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.limits-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: .62em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .45;
}
.limits-list b { color: var(--ink-soft); }
.limits-note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted-2);
}

.promise-spaced { margin-top: clamp(24px, 2.6vw, 38px); }

/* ---------- section intro row ----------
 * Every content section opens with a heading and a standfirst. Left as a single
 * column, the landing page's max-width rules (24ch / 46ch) left ~816px of dead
 * space at the right, which read as an unfinished hero.
 *
 * The intro now uses the width beside the heading: heading left, standfirst
 * right, both top-aligned. The paragraph keeps a readable measure inside its own
 * column rather than being stretched across the page. */
.sec-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 64px);
  align-items: start;
  margin-bottom: clamp(24px, 2.6vw, 40px);
}
.sec-intro-lead { min-width: 0; }
.sec-intro-lead .eyebrow { margin-bottom: clamp(10px, 1vw, 16px); }

/* The heading can use its column, not the 24ch landing-page cap. */
.sec-intro-lead h1,
.sec-intro-lead h2 { max-width: 26ch; margin: 0; }

/* Standfirst keeps a readable line length instead of running the full row. */
.sec-intro-body { min-width: 0; padding-top: 2px; }
.sec-intro-body .sub {
  max-width: 58ch;
  margin: 0;
}

@media (max-width: 900px) {
  .sec-intro { grid-template-columns: 1fr; gap: clamp(12px, 2vw, 20px); }
  .sec-intro-lead h1,
  .sec-intro-lead h2 { max-width: 24ch; }
  /* Single column: keep a readable measure rather than letting the paragraph
     run the full 700px+ width. */
  .sec-intro-body .sub { max-width: 62ch; }
}

/* ---------- responsive: diagrams stack, never clip ---------- */
@media (max-width: 1020px) {
  .fig-fan,
  .fig-one,
  .fig-flow,
  .fig-hist,
  .fig-export {
    grid-template-columns: 1fr;
  }
  .fig-arrow {
    justify-self: start;
    transform: rotate(90deg);
    padding-block: 2px;
  }
  .fig-export { align-items: stretch; }
  .fig-paper { max-width: 420px; }
}

@media (max-width: 560px) {
  .fig-body { padding: 15px; }
  .fig-foot { padding: 12px 15px; }
  .fig-copies li { font-size: 11.5px; }
  .fig-outline li { grid-template-columns: 20px minmax(0,1fr) auto; gap: 8px; }
  .fig-timeline li { grid-template-columns: 14px auto minmax(0,1fr); gap: 8px; }
  .limits { padding: 15px; }
}

/* legend under the export page mock, balancing the manifest column */
.fig-paper-legend {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

/* The capability groups carry exactly four cards. auto-fit would give 3 columns
 * at ~1024px and leave a gap on the second row, so pin the counts to 4 / 2 / 1. */
@media (min-width: 1040px) {
  #capabilities .features { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 620px) and (max-width: 1039px) {
  #capabilities .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 619px) {
  #capabilities .features { grid-template-columns: 1fr; }
}

/* ---------- planned / roadmap block ----------
 * Sits between the working capabilities and the "not available" list, so a
 * reader sees what is real, what is coming, and what is missing in that order.
 * Muted and outlined rather than accent-tinted: it is a forward look, not a
 * capability being sold. */
.planned {
  margin-top: clamp(30px, 3vw, 46px);
  padding: clamp(18px, 2vw, 28px);
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius-md);
  background: var(--accent-tint);
}
.planned-head {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  /* accent on the tint measured exactly 4.50 in citrus — on the AA line. */
  color: var(--ink-soft);
}
.planned-title {
  margin: 0 0 12px;
  font-size: clamp(17px, .7vw + 14px, 21px);
  letter-spacing: -.015em;
  color: var(--ink);
}
.planned-lead {
  margin: 0 0 12px;
  max-width: 68ch;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.planned-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.planned-list li {
  position: relative;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 74ch;
}
.planned-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .58em;
  width: 8px; height: 8px;
  border-radius: 2px;
  border: 1.5px solid var(--accent);
  opacity: .7;
}
.planned-list b { color: var(--ink-soft); }
.planned-note {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--accent-line);
  font-size: 13px;
  line-height: 1.55;
  /* --muted-2 measured 4.42:1 on teal, below AA; --ink-soft clears it. */
  color: var(--ink-soft);
  max-width: 70ch;
}

/* The Governance group carries five cards. Five does not tile into four or two
   columns without leaving an empty cell, so this group takes its own counts:
   five across on wide screens, one column below that. */
@media (min-width: 1200px) {
  #capabilities .features:has(.feat:nth-child(5)) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 1199px) {
  #capabilities .features:has(.feat:nth-child(5)) {
    grid-template-columns: 1fr;
  }
}

/* ---------- three-column version figure ----------
 * Shows two sections versioning independently beside one private draft. Three
 * columns makes the independence visible; a single ladder could not. */
.fig-sections { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.fig-pending .fig-dot {
  background: var(--card);
  border-color: var(--accent);
  border-style: dashed;
}
.fig-pending b { color: var(--accent); }

@media (max-width: 900px) {
  .fig-sections { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Visibility and access-control section
   ========================================================================== */

.vis-lead {
  max-width: 74ch;
  margin: clamp(14px, 1.6vw, 22px) 0 clamp(24px, 2.6vw, 38px);
  font-size: clamp(14px, .3vw + 13px, 15.5px);
  line-height: 1.65;
  color: var(--ink-soft);
}
.vis-lead b { color: var(--ink); }

/* ---------- A: the visibility matrix ---------- */
.fig-matrix-wrap { padding: 0; }

.vis-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.vis-matrix caption {
  padding: clamp(16px, 1.8vw, 24px) clamp(16px, 1.8vw, 24px) 0;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.vis-matrix th,
.vis-matrix td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
}
.vis-matrix thead th {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  vertical-align: bottom;
  line-height: 1.3;
}
.vis-matrix thead th span {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 2px;
}
.vis-matrix .vis-th { font-weight: 700; color: var(--muted-2); font-size: 11px;
  letter-spacing: .10em; text-transform: uppercase; }

.vis-matrix tbody th {
  text-align: left;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--ink-soft);
  padding-left: clamp(10px, 1.4vw, 18px);
  white-space: nowrap;
}
.vis-matrix tbody tr:last-child th,
.vis-matrix tbody tr:last-child td { border-bottom: 0; }

.vis-yes,
.vis-no {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.vis-yes { color: var(--accent); }
.vis-yes::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
}
.vis-no { color: var(--muted-2); }
.vis-no::before {
  content: "×";
  display: inline-block;
  margin-right: 5px;
  font-weight: 700;
  opacity: .6;
}

.vis-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0;
  padding: clamp(12px, 1.4vw, 16px) clamp(16px, 1.8vw, 24px);
  font-size: 12px;
  color: var(--muted-2);
}
.vis-key {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: 1px;
}
.vis-key-yes { background: var(--accent); }
.vis-key-no { border: 1.5px solid var(--muted-2); }

/* ---------- B: grants are pairs, people inherit from teams ---------- */
.fig-derive {
  grid-template-columns: minmax(0, 1.05fr) auto minmax(0, 1fr);
  align-items: start;
  gap: clamp(16px, 2vw, 30px);
}
.derive-side { min-width: 0; }
.fig-derive .fig-arrow { align-self: center; }

.grant-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.grant-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
}
.grant-yes { border-left: 3px solid var(--accent); }
.grant-no { border-left: 3px dashed var(--line); opacity: .84; }

.grant-av {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 10.5px;
  font-weight: 700;
  flex: none;
  background: var(--accent-tint);
  color: var(--accent-deep);
}
/* teams render as a rounded square, people as a circle — the shape carries the
   distinction so the reader does not need the caption to know which is which */
.grant-av-team { border-radius: 7px; }
.grant-av[data-tone="b"] { background: #FBE7D1; color: #7A4A18; }
.grant-av[data-tone="c"] { background: #DCE9F7; color: #1F4568; }
.grant-av[data-tone="d"] { background: #F7DFDF; color: #7A2D2D; }
:root[data-theme="cobalt"] .grant-av[data-tone="b"] { background: #FBE7D1; color: #7A4A18; }
:root[data-theme="cobalt"] .grant-av[data-tone="c"] { background: #DCE9F7; color: #1F4568; }
:root[data-theme="cobalt"] .grant-av[data-tone="d"] { background: #F7DFDF; color: #7A2D2D; }
:root[data-theme="citrus"] .grant-av[data-tone="b"] { background: #EAF0D4; color: #43551A; }
:root[data-theme="citrus"] .grant-av[data-tone="c"] { background: #E1EAF6; color: #274566; }
:root[data-theme="citrus"] .grant-av[data-tone="d"] { background: #F4DCDC; color: #7A2C2C; }

.grant-id { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.grant-id b { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.grant-id i { font-style: normal; font-size: 11px; color: var(--muted-2); }

.grant-cap {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--accent-tint);
  color: var(--accent-deep);
}
.grant-cap-ro { background: var(--line-soft); color: var(--ink-soft); }
.grant-cap-no { background: transparent; color: var(--muted-2); padding-inline: 0; }

.grant-note {
  margin: 10px 0 0;
  max-width: 52ch;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted-2);
}

/* derived-access boxes */
.derive-box {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  margin-bottom: 8px;
}
.derive-who { margin: 0 0 6px; font-size: 13px; line-height: 1.4; color: var(--ink-soft); }
.derive-who b { font-weight: 700; color: var(--ink); }
.derive-who i { font-style: normal; color: var(--muted-2); font-size: 11.5px; display: block; }
.derive-eff { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.derive-eff em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted-2);
}

@media (max-width: 900px) {
  .fig-derive { grid-template-columns: 1fr; }
  .fig-derive .fig-arrow { justify-self: start; transform: rotate(90deg); }
}

/* ---------- C: absent, not hidden ---------- */
.fig-absent { grid-template-columns: 1fr auto 1fr; align-items: center; }

.absent-col { min-width: 0; }
.absent-head {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}
.absent-code {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--old-bg);
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  overflow-x: auto;
}
.absent-code span { display: block; white-space: nowrap; }
.absent-hl { color: #922525; font-weight: 600; }
.absent-ok { color: #235C36; }
.absent-foot {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted-2);
}
.absent-bad .absent-head { color: #7A2D2D; }
.absent-good .absent-head { color: #235C36; }

@media (max-width: 900px) {
  .fig-absent { grid-template-columns: 1fr; }
  .fig-absent .fig-arrow { justify-self: start; transform: rotate(90deg); }
}

@media (max-width: 640px) {
  .vis-matrix { font-size: 12px; }
  .vis-matrix th, .vis-matrix td { padding: 8px 4px; }
  .vis-matrix tbody th { white-space: normal; min-width: 84px; }
  .vis-yes::before, .vis-no::before { display: none; }
  .vis-yes, .vis-no { font-size: 11px; }
  .vis-matrix thead th span { display: none; }
}
