/* /reference-architecture -- the SCIKIQ reference architecture on four targets.
 *
 * One mechanism drives the whole page: a single data-plat attribute on <html>.
 * Every platform-specific phrase is a .rx span holding all four values, and
 * every platform-specific block is a .p-only element. CSS decides which one is
 * visible, so switching target is one attribute write -- no re-render, no
 * fetch, no flash -- and the page is correct with JavaScript disabled because
 * the generator bakes the default target into the markup.
 */

/* ---- the swap mechanism ------------------------------------------------- */
.rx > i { display: none; font-style: normal; }
.p-only { display: none; }
html[data-plat="aws"]       .rx > i[data-p="aws"],
html[data-plat="gcp"]       .rx > i[data-p="gcp"],
html[data-plat="azure"]     .rx > i[data-p="azure"],
html[data-plat="baremetal"] .rx > i[data-p="baremetal"] { display: inline; }
html[data-plat="aws"]       .p-only[data-p="aws"],
html[data-plat="gcp"]       .p-only[data-p="gcp"],
html[data-plat="azure"]     .p-only[data-p="azure"],
html[data-plat="baremetal"] .p-only[data-p="baremetal"] { display: block; }
/* inline variants (the ADR per-platform line, chips) */
span.p-only { display: none; }
html[data-plat="aws"]       span.p-only[data-p="aws"],
html[data-plat="gcp"]       span.p-only[data-p="gcp"],
html[data-plat="azure"]     span.p-only[data-p="azure"],
html[data-plat="baremetal"] span.p-only[data-p="baremetal"] { display: inline; }


/* ---- the page palette ------------------------------------------------- *
 * The page colour-codes platforms, concern groups, node pools, namespaces and
 * builder stations, and uses each hue two ways: as text on a surface, and as a
 * fill behind text. The shared --gv palette cannot do both in both themes --
 * two of its entries are light tints that fail against white (the selected
 * Azure card in the hero reached only 2.3:1), and in dark mode the condition
 * inverts: the hues that work as a fill are then too dark to read as text on
 * #0D0F13.
 *
 * So this page carries its own eight hues, chosen per theme against a single
 * rule: every value clears 4.5:1 against all three surfaces of its theme.
 * That one rule covers both uses, because a hue readable as text on the
 * surface is also readable behind --h-ink -- white in light mode, near-black
 * in dark. Anything filled with a hue takes its text from --h-ink, never a
 * literal #fff.
 */
.ra-pg {
  --ra-h1:#2251FF; --ra-h2:#945700; --ra-h3:#0C6F78; --ra-h4:#C8262D;
  --ra-h5:#1238D6; --ra-h6:#116E53; --ra-h7:#1438B8; --ra-h8:#A32063;
  --h-ink:#FFFFFF;
}
:root[data-theme="dark"] .ra-pg {
  --ra-h1:#93A8FF; --ra-h2:#E9A144; --ra-h3:#4FCBD6; --ra-h4:#F2837B;
  --ra-h5:#A9A4FF; --ra-h6:#45D3A8; --ra-h7:#C0B0FF; --ra-h8:#FF8FC0;
  --h-ink:#0D0F13;
}

/* ---- hero --------------------------------------------------------------- */
.ra-hero h1 { max-width: 26ch; }
.ra-hero .hb-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1000px) { .ra-hero .hb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .ra-hero .hb-stats { grid-template-columns: minmax(0, 1fr); } }
.rx-h1 > i { display: none; }
html[data-plat="aws"]       .rx-h1 > i[data-p="aws"],
html[data-plat="gcp"]       .rx-h1 > i[data-p="gcp"],
html[data-plat="azure"]     .rx-h1 > i[data-p="azure"],
html[data-plat="baremetal"] .rx-h1 > i[data-p="baremetal"] { display: inline; }

.ra-picker { margin: 26px 0 30px; }
.ra-pk-lbl { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); }
.ra-pk-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 860px) { .ra-pk-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ra-pick { display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer;
  padding: 14px 15px 15px; border: 1px solid var(--line); border-left: 3px solid var(--h);
  border-radius: 4px; background: var(--bg); color: var(--fg); font: inherit;
  transition: background .15s, border-color .15s, transform .15s; }
.ra-pick:hover { background: var(--paper); transform: translateY(-1px); }
.ra-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ra-pick[aria-pressed="true"] { background: var(--h); border-color: var(--h); }
.ra-pick[aria-pressed="true"] * { color: var(--h-ink); }
.ra-pk-n { font-family: var(--f-display); font-size: 1.15rem; font-weight: 500; line-height: 1.15; }
.ra-pk-k { font-family: var(--f-mono); font-size: 11px; color: var(--h); letter-spacing: .02em; }
.ra-pk-t { font-size: 12.5px; line-height: 1.4; color: var(--fg-dim); }

/* ---- intro, principles, platform profile -------------------------------- */
.ra-sec .wrap { max-width: 1440px; }
.ra-intro { max-width: 76ch; font-size: 1.0625rem; line-height: 1.7; color: var(--fg);
  margin: 0 0 30px; }
.ra-princs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 30px; }
@media (max-width: 1000px) { .ra-princs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .ra-princs { grid-template-columns: minmax(0, 1fr); } }
.ra-princ { border: 1px solid var(--line); border-top: 3px solid var(--h); border-radius: 4px;
  background: var(--paper); padding: 14px 15px 16px; }
.ra-princ b { display: block; font-family: var(--f-display); font-size: 1.05rem; font-weight: 500;
  margin-bottom: 6px; }
.ra-princ p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--fg-dim); }

.ra-prof { border: 1px solid var(--line); border-left: 3px solid var(--h); border-radius: 4px;
  background: var(--bg); padding: 18px 20px 20px; margin: 0 0 30px; }
.ra-prof-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ra-prof-h b { font-family: var(--f-display); font-size: 1.35rem; font-weight: 500; }
.ra-prof-h code { font-family: var(--f-mono); font-size: 12px; color: var(--h);
  border: 1px solid var(--h); border-radius: 2px; padding: 2px 7px; }
.ra-prof-b { margin: 8px 0 16px; max-width: 80ch; font-size: 14.5px; line-height: 1.6; color: var(--fg-dim); }
.ra-prof-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .ra-prof-g { grid-template-columns: minmax(0, 1fr); } }
.ra-prof-g h4, .ra-fh { margin: 0 0 8px; font-family: var(--f-body); font-size: 11.5px;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.ra-fh { margin-top: 18px; }

/* a labelled bullet box, reused throughout the diagrams */
.ra-box { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.45;
  color: var(--fg); background: var(--paper); border: 1px solid var(--line); border-radius: 2px;
  padding: 7px 9px; margin-bottom: 5px; }
/* Direct child only. A swap span is built from <i> elements, so an unscoped
   '.ra-box i' turns every resolved value into a 6px dot with a background. */
.ra-box > i { flex: none; width: 6px; height: 6px; margin-top: 5px; border-radius: 50%;
  background: var(--h, var(--accent)); }
.ra-box-w > i { background: var(--amber); }
.ra-box .rx { min-width: 0; }
.ra-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 5px; }
.ra-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px;
  border: 1px solid var(--h); border-radius: 2px; color: var(--h); }

/* ---- jump nav ----------------------------------------------------------- */
.ra-jump { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--paper); margin: 0 0 34px; }
.ra-jump > span { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-right: 4px; }
.ra-jump a { font-size: 12.5px; text-decoration: none; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 2px; padding: 4px 9px; }
.ra-jump a:hover { border-color: var(--accent); color: var(--accent); }

/* ---- view groups and views ---------------------------------------------- */
.ra-g-i { margin: 0 0 20px; max-width: 78ch; font-size: 14.5px; line-height: 1.6; color: var(--fg-dim); }
.ra-view { border-top: 1px solid var(--line); padding: 26px 0 30px; scroll-margin-top: 110px; }
.ra-v-h { display: flex; gap: 14px; align-items: flex-start; }
.ra-v-h code { flex: none; font-family: var(--f-mono); font-size: 12px; font-weight: 600;
  color: var(--h-ink); background: var(--ra-h5); border-radius: 2px; padding: 4px 8px; margin-top: 3px; }
.ra-v-e { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fg-dim); }
.ra-v-h h3 { margin: 2px 0 0; font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.3rem, 2vw, 1.65rem); }
.ra-v-l { margin: 12px 0 20px; max-width: 86ch; font-size: 1.0625rem; line-height: 1.7; color: var(--fg); }
.ra-v-p { list-style: none; margin: 20px 0 0; padding: 0; display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
@media (max-width: 860px) { .ra-v-p { grid-template-columns: minmax(0, 1fr); } }
.ra-v-p li { position: relative; padding-left: 16px; font-size: 13.5px; line-height: 1.6; color: var(--fg-dim); }
.ra-v-p li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent); }
.ra-v-p em { color: var(--fg); font-style: italic; }

/* ---- figures ------------------------------------------------------------ */
.ra-fig { margin: 0; padding: 16px 18px 14px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--paper); }
.ra-fig figcaption { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 12px; line-height: 1.5; color: var(--fg-dim); }

/* R1 -- the layer stack over the substrate */
.ra-stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .ra-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .ra-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ra-stage { border: 1px solid var(--line); border-top: 3px solid var(--h); border-radius: 3px;
  background: var(--bg); padding: 9px 10px 10px; }
.ra-stage h4 { margin: 0 0 7px; font-family: var(--f-body); font-size: 10.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--h); }
.ra-sl { display: flex; gap: 7px; align-items: baseline; text-decoration: none; color: var(--fg);
  font-size: 12px; line-height: 1.35; padding: 5px 0; border-top: 1px solid var(--line-soft); }
.ra-stage .ra-sl:first-of-type { border-top: 0; }
.ra-sl:hover span { color: var(--accent); text-decoration: underline; }
.ra-sl b { flex: none; font-family: var(--f-mono); font-size: 10.5px; color: var(--h);
  min-width: 15px; text-align: right; }
.ra-sub { margin-top: 12px; padding: 12px 14px 14px; border: 1px solid var(--accent);
  border-radius: 3px; background: var(--accent-wash); }
.ra-sub h4 { margin: 0 0 9px; font-family: var(--f-body); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.ra-sub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 900px) { .ra-sub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ra-sub-grid { grid-template-columns: minmax(0, 1fr); } }
.ra-sub-cell { background: var(--bg); border: 1px solid var(--line); border-radius: 2px; padding: 8px 10px;
  font-size: 12.5px; line-height: 1.45; }
/* the label only -- the resolved value is a .rx span, also a direct child */
.ra-sub-cell > .ra-sc-l { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--fg-dim); margin-bottom: 3px; }

/* R2 -- the service mapping matrix */
.ra-m-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line);
  border-radius: 3px; background: var(--bg); }
.ra-m, .ra-nfr { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 12.5px; }
.ra-nfr { min-width: 720px; }
.ra-m th, .ra-m td, .ra-nfr th, .ra-nfr td { text-align: left; vertical-align: top;
  padding: 9px 11px; border-bottom: 1px solid var(--line-soft); }
.ra-m thead th, .ra-nfr thead th { position: sticky; top: 0; z-index: 2; background: var(--paper-2);
  border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--fg); }
.ra-m thead th[data-p] { border-top: 3px solid var(--h); }
.ra-m thead th em { display: block; font-style: normal; font-family: var(--f-mono); font-size: 10px;
  font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--fg-dim); }
.ra-m tbody th[scope="row"] { width: 17%; min-width: 150px; background: var(--paper);
  border-right: 1px solid var(--line); font-weight: 400; }
.ra-m tbody th[scope="row"] b { display: block; font-size: 12.5px; font-weight: 700; color: var(--fg); }
.ra-m tbody th[scope="row"] span { display: block; margin-top: 3px; font-size: 11.5px;
  line-height: 1.45; color: var(--fg-dim); }
.ra-m td { width: 20.75%; color: var(--fg-dim); line-height: 1.45; }
.ra-m-grp th { background: var(--bg) !important; border-top: 2px solid var(--h);
  border-bottom: 1px solid var(--line) !important; padding: 12px 11px 10px !important; }
.ra-m-grp th b { display: block; font-family: var(--f-display); font-size: 1.05rem; font-weight: 500;
  letter-spacing: 0; text-transform: none; color: var(--h); }
.ra-m-grp th span { display: block; margin-top: 4px; max-width: 110ch; font-size: 11.5px;
  font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.5; color: var(--fg-dim); }
/* highlight the selected column, dim nothing away entirely */
html[data-plat="aws"]       .ra-m td[data-p="aws"],
html[data-plat="gcp"]       .ra-m td[data-p="gcp"],
html[data-plat="azure"]     .ra-m td[data-p="azure"],
html[data-plat="baremetal"] .ra-m td[data-p="baremetal"] {
  background: var(--accent-wash); color: var(--fg); font-weight: 500;
  box-shadow: inset 2px 0 0 var(--accent); }
html[data-plat="aws"]       .ra-m thead th[data-p="aws"],
html[data-plat="gcp"]       .ra-m thead th[data-p="gcp"],
html[data-plat="azure"]     .ra-m thead th[data-p="azure"],
html[data-plat="baremetal"] .ra-m thead th[data-p="baremetal"] { background: var(--h); color: var(--h-ink); }
html[data-plat="aws"]       .ra-m thead th[data-p="aws"] em,
html[data-plat="gcp"]       .ra-m thead th[data-p="gcp"] em,
html[data-plat="azure"]     .ra-m thead th[data-p="azure"] em,
html[data-plat="baremetal"] .ra-m thead th[data-p="baremetal"] em { color: inherit; opacity: .75; }
.ra-cost-t { min-width: 480px; }
.ra-cost-t td { width: auto; }

/* R3 -- node pools and namespaces */
.ra-pools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1000px) { .ra-pools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px)  { .ra-pools { grid-template-columns: minmax(0, 1fr); } }
.ra-pool { border: 1px solid var(--line); border-top: 3px solid var(--h); border-radius: 3px;
  background: var(--bg); padding: 10px 11px 11px; display: flex; flex-direction: column; gap: 4px; }
.ra-pool b { font-family: var(--f-mono); font-size: 13px; color: var(--h); }
.ra-pool-r { font-size: 12.5px; font-weight: 600; }
.ra-pool span { font-size: 11.5px; line-height: 1.45; color: var(--fg-dim); }
.ra-pool-t { font-family: var(--f-mono); font-size: 10.5px; color: var(--fg-faint) !important; }
.ra-nss { display: grid; gap: 8px; }
.ra-ns { border: 1px solid var(--line); border-left: 3px solid var(--h); border-radius: 3px;
  background: var(--bg); padding: 11px 13px 12px; }
.ra-ns-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 9px; }
.ra-ns-h code { font-family: var(--f-mono); font-size: 13px; font-weight: 600; color: var(--h); }
.ra-ns-h span { font-size: 12.5px; color: var(--fg-dim); }
.ra-ns-h em { margin-left: auto; font-style: normal; font-family: var(--f-mono); font-size: 10.5px;
  color: var(--fg-faint); white-space: nowrap; }
.ra-ns-s { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 5px; }
.ra-svc { border: 1px solid var(--line); border-radius: 2px; background: var(--paper);
  padding: 6px 8px; font-size: 12px; }
.ra-svc b { font-family: var(--f-mono); font-weight: 600; }
.ra-svc i { font-style: normal; font-family: var(--f-mono); font-size: 10.5px; color: var(--h); }
.ra-svc small { display: block; margin-top: 2px; font-size: 11px; line-height: 1.4; color: var(--fg-dim); }

/* R4 -- network zones */
.ra-zones { display: grid; gap: 5px; }
.ra-zone { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 12px;
  align-items: start; border: 1px solid var(--line); border-radius: 3px; background: var(--bg);
  padding: 9px 12px; }
@media (max-width: 680px) { .ra-zone { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.ra-z-l b { display: block; font-size: 12.5px; font-weight: 700; }
.ra-z-l span { display: block; font-size: 11.5px; line-height: 1.4; color: var(--fg-dim); }
.ra-z-r { font-size: 12.5px; line-height: 1.5; color: var(--fg); }
.ra-envs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .ra-envs { grid-template-columns: minmax(0, 1fr); } }
.ra-env { border: 1px solid var(--line); border-radius: 3px; background: var(--bg); padding: 10px 12px; }
.ra-env b { display: block; font-size: 12.5px; margin-bottom: 3px; }
.ra-env span { font-size: 11.5px; line-height: 1.45; color: var(--fg-dim); }

/* R5, R7 -- the numbered chains */
.ra-chain { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 1200px) { .ra-chain { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .ra-chain { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ra-step { position: relative; border: 1px solid var(--line); border-top: 3px solid var(--h);
  border-radius: 3px; background: var(--bg); padding: 9px 10px 10px; }
.ra-st-n { display: inline-block; font-family: var(--f-mono); font-size: 10px; font-weight: 700;
  color: var(--h-ink); background: var(--h); border-radius: 2px; padding: 1px 5px; margin-bottom: 5px; }
.ra-step b { display: block; font-size: 12.5px; }
.ra-st-d { display: block; margin-top: 3px; font-size: 11px; line-height: 1.4; color: var(--fg-dim); }
.ra-step .rx { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line);
  font-family: var(--f-mono); font-size: 10.5px; line-height: 1.4; color: var(--h); }

/* R6 -- protocol classes */
.ra-pcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1000px) { .ra-pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px)  { .ra-pcards { grid-template-columns: minmax(0, 1fr); } }
.ra-pcard { border: 1px solid var(--line); border-radius: 3px; background: var(--bg); padding: 10px 12px; }
.ra-pcard b { display: block; font-size: 12.5px; margin-bottom: 4px; }
.ra-pcard span { display: block; font-size: 11.5px; line-height: 1.45; color: var(--fg-dim); }
.ra-pcard em { display: block; margin-top: 6px; font-style: normal; font-family: var(--f-mono);
  font-size: 10.5px; color: var(--fg-faint); }

/* R8 -- one tag, six enforcement points */
.ra-tag { border: 1px solid var(--accent); border-radius: 3px; background: var(--accent-wash);
  padding: 12px 14px; margin-bottom: 10px; }
.ra-tag-l { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); }
.ra-tag b { display: block; margin: 5px 0 4px; font-family: var(--f-mono); font-size: 13.5px; }
.ra-tag-d { display: block; font-size: 11.5px; line-height: 1.45; color: var(--fg-dim); }
.ra-fans { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 1100px) { .ra-fans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .ra-fans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ra-fan { border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 3px;
  background: var(--bg); padding: 9px 10px 10px; }
.ra-fan b { display: block; font-size: 12px; margin-bottom: 3px; }
.ra-fan span { font-size: 11px; line-height: 1.4; color: var(--fg-dim); }

/* R9, R10 -- planes and lanes */
.ra-planes, .ra-lanes { display: grid; gap: 8px; }
.ra-planes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ra-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1000px) { .ra-planes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .ra-planes, .ra-lanes { grid-template-columns: minmax(0, 1fr); } }
.ra-plane, .ra-lane { border: 1px solid var(--line); border-top: 3px solid var(--h);
  border-radius: 3px; background: var(--bg); padding: 10px 12px 11px; }
.ra-plane h4, .ra-lane h4 { margin: 0 0 8px; font-family: var(--f-body); font-size: 11px;
  font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--h); }
.ra-plane .ra-box, .ra-lane .ra-box { background: var(--paper); }
.ra-plane-s, .ra-lane-s { margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line);
  font-family: var(--f-mono); font-size: 10.5px; line-height: 1.45; color: var(--h); }

/* R11 -- HA, backup, DR + the NFR table */
.ra-drs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 860px) { .ra-drs { grid-template-columns: minmax(0, 1fr); } }
.ra-drc { border: 1px solid var(--line); border-top: 3px solid var(--h); border-radius: 3px;
  background: var(--bg); padding: 10px 12px 11px; }
.ra-drc h4 { margin: 0 0 4px; font-family: var(--f-body); font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--h); }
.ra-drc-d { display: block; font-size: 11.5px; line-height: 1.4; color: var(--fg-dim);
  margin-bottom: 7px; }
.ra-drc .rx { display: block; font-size: 12.5px; line-height: 1.5; }
.ra-nfr tbody th { width: 16%; font-weight: 700; background: var(--paper); }
.ra-nfr td { color: var(--fg-dim); line-height: 1.45; }

/* R12 -- tiers */
.ra-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 860px) { .ra-tiers { grid-template-columns: minmax(0, 1fr); } }
.ra-tier { border: 1px solid var(--line); border-top: 3px solid var(--h); border-radius: 3px;
  background: var(--bg); padding: 12px 14px 13px; }
.ra-tier > b { font-family: var(--f-display); font-size: 1.15rem; font-weight: 500; }
.ra-ti-w { display: block; margin: 4px 0 10px; font-size: 12px; line-height: 1.45; color: var(--fg-dim); }
.ra-tier dl { margin: 0; }
.ra-tier dt { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--h); margin-top: 8px; }
.ra-tier dd { margin: 2px 0 0; font-size: 12px; line-height: 1.45; color: var(--fg); }
.ra-ti-n { font-family: var(--f-mono); font-size: 11.5px !important; }
.ra-ti-note { display: block; margin-top: 11px; padding-top: 8px; border-top: 1px dashed var(--line);
  font-size: 11.5px; line-height: 1.45; color: var(--fg-dim); font-style: italic; }

/* R13 -- cost drivers and shapes */
.ra-cds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1000px) { .ra-cds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px)  { .ra-cds { grid-template-columns: minmax(0, 1fr); } }
.ra-cd { border: 1px solid var(--line); border-radius: 3px; background: var(--bg); padding: 10px 12px; }
.ra-cd b { display: block; font-size: 12.5px; margin-bottom: 3px; }
.ra-cd > span { display: block; font-size: 11.5px; line-height: 1.45; color: var(--fg-dim); }
.ra-cd .rx { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line);
  font-family: var(--f-mono); font-size: 10.5px; line-height: 1.4; color: var(--accent); }
.ra-shape { border: 1px solid var(--h); border-left: 3px solid var(--h); border-radius: 3px;
  background: var(--bg); padding: 11px 13px; margin-bottom: 10px; }
.ra-shape b { display: block; font-size: 13px; color: var(--h); margin-bottom: 3px; }
.ra-shape span { font-size: 12.5px; line-height: 1.55; color: var(--fg); }

/* R14 -- the decision register */
.ra-adrs { display: grid; gap: 8px; }
.ra-adr { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 3px;
  background: var(--bg); padding: 11px 13px 12px; }
.ra-adr-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 11px; margin-bottom: 7px; }
.ra-adr-h code { font-family: var(--f-mono); font-size: 11.5px; font-weight: 600; color: var(--h-ink);
  background: var(--ra-h5); border-radius: 2px; padding: 2px 6px; }
.ra-adr-h b { font-size: 14px; }
.ra-adr-s { margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--signal); white-space: nowrap; }
.ra-adr p { margin: 0 0 5px; font-size: 12.5px; line-height: 1.55; }
.ra-adr-d { color: var(--fg); font-weight: 500; }
.ra-adr-p { color: var(--accent) !important; font-family: var(--f-mono); font-size: 11.5px !important; }
.ra-adr-r, .ra-adr-a, .ra-adr-f { color: var(--fg-dim); }
.ra-adr p b { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--fg-faint); margin-right: 5px; }
.ra-flag { display: inline-block; font-size: 10.5px; border: 1px solid var(--line); border-radius: 2px;
  padding: 1px 6px; margin-right: 4px; color: var(--fg-dim); }

/* ---- the builder -------------------------------------------------------- */
.ra-build { border-top: 1px solid var(--line); }
.ra-build .wrap { max-width: 1440px; }
.ra-noscript { padding: 12px 14px; border: 1px solid var(--amber); border-radius: 3px;
  background: var(--paper); font-size: 13px; color: var(--fg); }
.ra-sts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 24px 0; }
@media (max-width: 900px) { .ra-sts { grid-template-columns: minmax(0, 1fr); } }
.ra-st { border: 1px solid var(--line); border-left: 3px solid var(--h); border-radius: 4px;
  background: var(--bg); padding: 13px 15px 14px; }
.ra-st-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ra-st-h code { font-family: var(--f-mono); font-size: 11px; font-weight: 600; color: var(--h-ink);
  background: var(--h); border-radius: 2px; padding: 2px 6px; }
.ra-st-h b { font-family: var(--f-display); font-size: 1.1rem; font-weight: 500; }
.ra-st-q { font-size: 12.5px; color: var(--fg-dim); }
.ra-st-w { margin: 7px 0 10px; font-size: 12px; line-height: 1.5; color: var(--fg-dim); }
.ra-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px; }
.ra-opt { text-align: left; cursor: pointer; font: inherit; color: var(--fg); background: var(--paper);
  border: 1px solid var(--line); border-radius: 3px; padding: 8px 10px 9px;
  transition: background .12s, border-color .12s; }
.ra-opt:hover { border-color: var(--h); background: var(--bg); }
.ra-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ra-opt[aria-pressed="true"] { background: var(--h); border-color: var(--h); }
.ra-opt[aria-pressed="true"] b, .ra-opt[aria-pressed="true"] span { color: var(--h-ink); }
.ra-opt[hidden] { display: none; }
.ra-opt b { display: block; font-size: 12.5px; }
.ra-opt span { display: block; margin-top: 3px; font-size: 11px; line-height: 1.4; color: var(--fg-dim); }

.ra-out { border: 1px solid var(--line); border-radius: 4px; background: var(--paper);
  padding: 16px 18px 18px; }
.ra-out-h { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end;
  justify-content: space-between; }
.ra-out-h h3 { margin: 2px 0 0; font-family: var(--f-display); font-weight: 500; font-size: 1.4rem; }
.ra-out-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ra-checks { display: grid; gap: 6px; margin: 16px 0 0; }
.ra-chk { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start;
  border: 1px solid var(--line); border-left: 3px solid var(--k); border-radius: 3px;
  background: var(--bg); padding: 9px 12px; }
.ra-chk > .ra-chk-l { font-family: var(--f-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--h-ink); background: var(--k);
  border-radius: 2px; padding: 2px 6px; white-space: nowrap; }
.ra-chk b { display: block; font-size: 12.5px; }
.ra-chk div > span { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.5; color: var(--fg-dim); }
.ra-chk-e { --k: var(--ra-h4); }
.ra-chk-w { --k: var(--ra-h2); }
.ra-chk-n { --k: var(--ra-h5); }
.ra-chk-o { --k: var(--ra-h6); }

.ra-doc { margin-top: 18px; padding: 20px 22px 22px; border: 1px solid var(--line);
  border-radius: 3px; background: var(--bg); }
.ra-doc h3 { margin: 22px 0 10px; font-family: var(--f-display); font-weight: 500; font-size: 1.25rem;
  padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.ra-doc h3:first-child { margin-top: 0; }
.ra-doc h4 { margin: 14px 0 6px; font-family: var(--f-body); font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.ra-doc p { margin: 0 0 9px; font-size: 13.5px; line-height: 1.6; color: var(--fg); max-width: 88ch; }
.ra-doc .ra-meta { font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-dim); }
.ra-doc table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 0 0 10px; }
.ra-doc th, .ra-doc td { text-align: left; vertical-align: top; padding: 7px 10px;
  border-bottom: 1px solid var(--line-soft); }
.ra-doc thead th { background: var(--paper); font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; }
.ra-doc tbody th { width: 24%; font-weight: 700; }
.ra-doc td { color: var(--fg-dim); line-height: 1.45; }
.ra-doc ul { margin: 0 0 10px; padding-left: 18px; }
.ra-doc li { font-size: 12.5px; line-height: 1.55; color: var(--fg-dim); margin-bottom: 3px; }
.ra-doc .ra-sel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
  margin: 0 0 12px; }
@media (max-width: 900px) { .ra-doc .ra-sel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ra-doc .ra-sel div { border: 1px solid var(--line); border-top: 2px solid var(--accent);
  border-radius: 2px; background: var(--paper); padding: 7px 9px; }
.ra-doc .ra-sel dt { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--fg-dim); }
.ra-doc .ra-sel dd { margin: 2px 0 0; font-size: 12.5px; font-weight: 600; }
.ra-doc .ra-note { padding: 9px 11px; border-left: 3px solid var(--amber); background: var(--paper);
  font-size: 12.5px; line-height: 1.55; }

/* Printing the generated document: everything else on the page is chrome. */
@media print {
  body > header, body > footer, .ra-hero, .ra-sec, .ra-sts, .ra-out-btns,
  .ra-build .ac-cta, .ra-noscript, .ra-build > .wrap > .ac-kicker,
  .ra-build > .wrap > .ac-h2, .ra-build > .wrap > .hb-lead { display: none !important; }
  .ra-out, .ra-doc { border: 0; padding: 0; background: #fff; }
  .ra-doc h3 { break-after: avoid; }
  .ra-doc table, .ra-chk { break-inside: avoid; }
}

/* ---- the product axis --------------------------------------------------- *
 * The second selector. Where --h-ink and data-plat decide how the page reads,
 * data-prod decides how much of it there is: anything the selected product does
 * not need is removed outright, because a greyed-out lakehouse tier on a
 * governance deployment still invites the question "do we need that?". Items
 * that are genuinely optional stay, with a badge, since "you could add this"
 * is useful where "this does not exist" is not.
 *
 * One rule per product, matching on the data-need list the generator writes.
 */
[data-need] { }
html[data-prod="platform"] [data-need]:not([data-need~="platform"]),
html[data-prod="hub"]      [data-need]:not([data-need~="hub"]),
html[data-prod="govern"]   [data-need]:not([data-need~="govern"]),
html[data-prod="conv"]     [data-need]:not([data-need~="conv"]),
html[data-prod="convhub"]  [data-need]:not([data-need~="convhub"]) { display: none !important; }

/* the optional badge appears only for the products it is optional for */
.ra-opt-b { display: none; margin-left: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ra-h2); border: 1px solid var(--ra-h2);
  border-radius: 2px; padding: 0 4px; vertical-align: 1px; white-space: nowrap; }
html[data-prod="hub"]     .ra-opt-b[data-need~="hub"],
html[data-prod="govern"]  .ra-opt-b[data-need~="govern"],
html[data-prod="conv"]    .ra-opt-b[data-need~="conv"],
html[data-prod="convhub"] .ra-opt-b[data-need~="convhub"],
html[data-prod="platform"] .ra-opt-b[data-need~="platform"] { display: inline-block; }
/* a row that is only optional reads lighter than one that is required */
html[data-prod="hub"]      tr[data-opt~="hub"] th[scope="row"] b,
html[data-prod="govern"]   tr[data-opt~="govern"] th[scope="row"] b,
html[data-prod="conv"]     tr[data-opt~="conv"] th[scope="row"] b,
html[data-prod="convhub"]  tr[data-opt~="convhub"] th[scope="row"] b { font-weight: 500; }

.prod-only { display: none; }
html[data-prod="platform"] .prod-only[data-prod="platform"],
html[data-prod="hub"]      .prod-only[data-prod="hub"],
html[data-prod="govern"]   .prod-only[data-prod="govern"],
html[data-prod="conv"]     .prod-only[data-prod="conv"],
html[data-prod="convhub"]  .prod-only[data-prod="convhub"] { display: block; }

/* the product picker sits under the platform picker, visually subordinate */
.ra-picker-p { margin-top: -8px; }
.ra-pk-row-p { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ra-pk-row-p { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .ra-pk-row-p { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ra-pick-p { padding: 11px 13px 12px; }
.ra-pick-p .ra-pk-n { font-size: 1rem; }

/* ---- the product profile: blurb, stages, exclusions --------------------- */
.ra-prod { border: 1px solid var(--line); border-left: 3px solid var(--h); border-radius: 4px;
  background: var(--paper); padding: 16px 18px 18px; margin: 0 0 26px; }
.ra-prod-b { margin: 0 0 16px; max-width: 86ch; font-size: 1rem; line-height: 1.65; color: var(--fg); }
.ra-stgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 7px; }
.ra-stg { position: relative; border: 1px solid var(--line); border-top: 3px solid var(--h);
  border-radius: 3px; background: var(--bg); padding: 9px 11px 11px; }
.ra-stg-n { display: inline-block; font-family: var(--f-mono); font-size: 10px; font-weight: 700;
  color: var(--h-ink); background: var(--h); border-radius: 2px; padding: 1px 5px; margin-bottom: 5px; }
.ra-stg b { display: block; font-size: 13px; }
.ra-stg span:last-child { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.45;
  color: var(--fg-dim); }
.ra-ex { margin-top: 16px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 3px;
  background: var(--bg); }
.ra-ex h4 { margin: 0 0 7px; font-family: var(--f-body); font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--amber); }
.ra-ex ul { margin: 0; padding-left: 18px; }
.ra-ex li { font-size: 12.5px; line-height: 1.55; color: var(--fg-dim); margin-bottom: 3px; }
.ra-ex-n { margin: 9px 0 0; padding-top: 9px; border-top: 1px solid var(--line-soft);
  font-size: 12.5px; line-height: 1.55; color: var(--fg); }
.ra-intro p { max-width: 76ch; font-size: 1.0625rem; line-height: 1.7; color: var(--fg); margin: 0 0 12px; }
.ra-intro b { font-weight: 700; }

/* chain steps number themselves, so a chain that drops its middle steps for a
   product does not read 1, 2, 6, 7 */
.ra-chain { counter-reset: rastep; }
.ra-step { counter-increment: rastep; }
.ra-step::before { content: counter(rastep); display: inline-block; font-family: var(--f-mono);
  font-size: 10px; font-weight: 700; color: var(--h-ink); background: var(--h); border-radius: 2px;
  padding: 1px 5px; margin-bottom: 5px; }

/* ---- R5: deployment, peering and endpoints ------------------------------ */
.ra-peer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 210px) minmax(0, 1fr);
  gap: 10px; align-items: stretch; }
@media (max-width: 860px) { .ra-peer { grid-template-columns: minmax(0, 1fr); } }
.ra-peer-side { border: 1px solid var(--line); border-radius: 3px; background: var(--bg);
  padding: 12px 14px 13px; }
.ra-peer-you { border-left: 3px solid var(--ra-h2); }
.ra-peer-us  { border-left: 3px solid var(--ra-h5); }
.ra-peer-side h4 { margin: 0 0 6px; font-family: var(--f-body); font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--fg-dim); }
.ra-peer-side code { display: inline-block; font-family: var(--f-mono); font-size: 13px; font-weight: 600;
  color: var(--ra-h5); margin-bottom: 5px; }
.ra-peer-side > span { display: block; font-size: 12px; line-height: 1.45; color: var(--fg-dim); }
.ra-peer-s { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line);
  font-family: var(--f-mono); font-size: 10.5px; }
.ra-peer-link { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; text-align: center; padding: 10px 8px; border: 1px dashed var(--ra-h5); border-radius: 3px;
  background: var(--accent-wash); }
.ra-peer-lb { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ra-h5); }
.ra-peer-lb::before { content: "\2194"; display: block; font-size: 1.3rem; line-height: 1; }
.ra-peer-ln { font-size: 11px; line-height: 1.4; color: var(--fg-dim); }
.ra-subs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 7px;
  margin-top: 10px; }
.ra-sub2 { border: 1px solid var(--line); border-radius: 3px; background: var(--bg); padding: 9px 11px; }
.ra-sub2 code { font-family: var(--f-mono); font-size: 12.5px; font-weight: 600; color: var(--ra-h5); }
.ra-sub2 b { display: block; margin-top: 2px; font-size: 12.5px; }
.ra-sub2-h { display: inline-block; font-family: var(--f-mono); font-size: 10px; color: var(--fg-faint); }
.ra-sub2-d { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.45; color: var(--fg-dim); }
.ra-net-note { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--fg-dim); }
.ra-rng tbody th { width: 26%; }
.ra-svc-t { min-width: 820px; }
.ra-dns, .ra-fig code { font-family: var(--f-mono); font-size: 11.5px; }
.ra-nfr .tnum { font-family: var(--f-mono); }

/* ---- R6: the service map ------------------------------------------------ */
.ra-sm { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 7px;
  align-items: start; }
@media (max-width: 1100px) { .ra-sm { grid-auto-flow: row; grid-auto-columns: auto;
  grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .ra-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ra-sm-col { border: 1px solid var(--line); border-top: 3px solid var(--h); border-radius: 3px;
  background: var(--bg); padding: 9px 10px 10px; }
.ra-sm-col h4 { margin: 0 0 7px; font-family: var(--f-body); font-size: 10.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--h); }
.ra-sm-s { display: block; border: 1px solid var(--line); border-radius: 2px; background: var(--paper);
  padding: 5px 7px; margin-bottom: 4px; }
.ra-sm-s b { display: block; font-family: var(--f-mono); font-size: 11.5px; font-weight: 600; }
.ra-sm-s small { display: block; margin-top: 1px; font-size: 10.5px; line-height: 1.35; color: var(--fg-dim); }
.ra-sm-cross, .ra-sm-bus { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px;
  align-items: baseline; margin-top: 8px; padding: 9px 12px; border-radius: 3px; background: var(--bg);
  border: 1px solid var(--line); }
.ra-sm-cross { border-left: 3px solid var(--ra-h4); }
.ra-sm-bus { border-left: 3px solid var(--ra-h6); }
.ra-sm-cross b, .ra-sm-bus b { font-family: var(--f-mono); font-size: 12px; font-weight: 600;
  white-space: nowrap; }
.ra-sm-cross b { color: var(--ra-h4); }
.ra-sm-bus b { color: var(--ra-h6); }
.ra-sm-cross span, .ra-sm-bus span { font-size: 12px; line-height: 1.5; color: var(--fg-dim); }

/* ---- depth: overview vs full detail ------------------------------------- *
 * The page holds a technical review's worth of material. That is the right
 * depth for an architecture review and the wrong depth for the first time
 * someone opens it, so detail is folded away rather than deleted: brief is the
 * default, and a first read is four views plus a condensed mapping.
 */
html[data-depth="brief"] [data-deep] { display: none !important; }
html[data-depth="full"]  [data-brief] { display: none !important; }

.ra-depth { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  max-width: 560px; margin: 0 0 30px; }
@media (max-width: 520px) { .ra-depth { grid-template-columns: minmax(0, 1fr); } }
.ra-dp { text-align: left; cursor: pointer; font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 4px; padding: 9px 12px 10px;
  transition: background .12s, border-color .12s; }
.ra-dp:hover { border-color: var(--accent); }
.ra-dp:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ra-dp[aria-pressed="true"] { background: var(--ra-h5); border-color: var(--ra-h5); }
.ra-dp[aria-pressed="true"] b, .ra-dp[aria-pressed="true"] span { color: var(--h-ink); }
.ra-dp b { display: block; font-size: 13px; }
.ra-dp span { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.4; color: var(--fg-dim); }

/* ---- R1: how it works --------------------------------------------------- */
.ra-fig-how { background: var(--bg); }
.ra-hows { counter-reset: ramove; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1000px) { .ra-hows { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .ra-hows { grid-template-columns: minmax(0, 1fr); } }
.ra-how { counter-increment: ramove; border: 1px solid var(--line); border-top: 3px solid var(--ra-h5);
  border-radius: 4px; background: var(--paper); padding: 12px 14px 13px; }
.ra-how-h { display: flex; gap: 9px; align-items: baseline; margin-bottom: 6px; }
.ra-how-h::before { content: counter(ramove); flex: none; font-family: var(--f-mono); font-size: 11px;
  font-weight: 700; color: var(--h-ink); background: var(--ra-h5); border-radius: 2px; padding: 2px 7px; }
.ra-how-h b { font-family: var(--f-display); font-size: 1.05rem; font-weight: 500; line-height: 1.25; }
.ra-how-w { margin: 0 0 9px; font-size: 13px; line-height: 1.55; color: var(--fg); }
.ra-how-o { margin: 0; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12px;
  line-height: 1.5; color: var(--fg-dim); }
.ra-how-o > span { display: block; font-size: 10px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ra-h5); margin-bottom: 2px; }
.ra-how-foot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: baseline;
  margin-top: 10px; padding: 12px 14px; border: 1px solid var(--ra-h5); border-radius: 4px;
  background: var(--accent-wash); }
.ra-how-foot b { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ra-h5); white-space: nowrap; }
.ra-how-foot span { font-size: 13.5px; line-height: 1.6; color: var(--fg); }

/* ---- condensed mapping, for a first read -------------------------------- */
.ra-bms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1000px) { .ra-bms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .ra-bms { grid-template-columns: minmax(0, 1fr); } }
.ra-bm { border: 1px solid var(--line); border-top: 3px solid var(--h); border-radius: 3px;
  background: var(--bg); padding: 10px 12px 11px; }
.ra-bm h4 { margin: 0 0 8px; font-family: var(--f-body); font-size: 10.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--h); }
.ra-bm-r { font-size: 12px; line-height: 1.45; padding: 6px 0; border-top: 1px solid var(--line-soft); }
.ra-bm > .ra-bm-r:first-of-type { border-top: 0; padding-top: 0; }
.ra-bm-r > span { display: block; font-weight: 700; color: var(--fg); }
.ra-bm-r .rx { color: var(--fg-dim); }

/* ---- component architecture --------------------------------------------- *
 * Five bands and a spine. Governance is the spine rather than a sixth band
 * because it is not a step in the stack: every request from Consume down to
 * Data passes through it, and drawing it in the middle would say otherwise.
 */
.ra-comp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 240px); gap: 10px;
  align-items: stretch; }
@media (max-width: 900px) { .ra-comp { grid-template-columns: minmax(0, 1fr); } }
.ra-bands { display: grid; gap: 7px; }
.ra-band { border: 1px solid var(--line); border-left: 3px solid var(--h); border-radius: 4px;
  background: var(--bg); padding: 10px 12px 11px; }
.ra-band h4 { margin: 0 0 7px; font-family: var(--f-body); font-size: 10.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--h); }
.ra-cxs { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 5px; }
.ra-cx { border: 1px solid var(--line); border-radius: 2px; background: var(--paper); padding: 6px 8px; }
.ra-cx b { display: block; font-size: 12px; line-height: 1.3; }
.ra-cx small { display: block; margin-top: 2px; font-size: 10.5px; line-height: 1.35; color: var(--fg-dim); }
.ra-spine { border: 1px solid var(--h); border-radius: 4px; background: var(--bg);
  border-left-width: 3px; padding: 10px 12px 11px; }
.ra-spine h4 { margin: 0 0 4px; font-family: var(--f-body); font-size: 10.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--h); }
.ra-spine-n { margin: 0 0 8px; font-size: 11px; line-height: 1.45; color: var(--fg-dim); }
.ra-spine .ra-cxs { grid-template-columns: minmax(0, 1fr); }

/* ---- deployed in your instance ------------------------------------------ */
.ra-estate { border: 2px dashed var(--ra-h5); border-radius: 6px; padding: 12px; background: var(--bg); }
.ra-est-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding-bottom: 10px;
  margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.ra-est-h b { font-family: var(--f-display); font-size: 1.1rem; font-weight: 500; }
.ra-est-h span { font-family: var(--f-mono); font-size: 11px; color: var(--ra-h5); }
.ra-est-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 160px) minmax(0, 1.35fr);
  gap: 10px; align-items: stretch; }
@media (max-width: 900px) { .ra-est-body { grid-template-columns: minmax(0, 1fr); } }
.ra-est-side, .ra-est-us { border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px 11px;
  background: var(--paper); }
.ra-est-us { border-color: var(--ra-h5); border-left: 3px solid var(--ra-h5); background: var(--accent-wash); }
.ra-est-side h4, .ra-est-us h4 { margin: 0 0 8px; font-family: var(--f-body); font-size: 10.5px;
  font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--fg-dim); }
.ra-est-us h4 { color: var(--ra-h5); }
.ra-est-us .ra-box, .ra-est-side .ra-box { background: var(--bg); }
.ra-est-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
@media (max-width: 560px) { .ra-est-grid { grid-template-columns: minmax(0, 1fr); } }
.ra-est-n { margin: 8px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--fg-dim); }
.ra-est-link { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center; font-size: 10.5px; color: var(--fg-dim); }
.ra-est-link em { font-style: normal; font-size: 1.6rem; line-height: 1; color: var(--ra-h5); }
.ra-est-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-top: 10px;
  padding-top: 10px; border-top: 1px solid var(--line); }
.ra-est-foot b { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ra-h5); }
.ra-est-foot span { font-size: 12.5px; line-height: 1.5; color: var(--fg-dim); }

.ra-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .ra-split { grid-template-columns: minmax(0, 1fr); } }
.ra-split-c { border: 1px solid var(--line); border-radius: 4px; background: var(--bg); padding: 11px 13px 12px; }
.ra-split-you { border-left: 3px solid var(--ra-h6); }
.ra-split-us { border-left: 3px solid var(--ra-h5); }
.ra-split-c h5 { margin: 0 0 7px; font-family: var(--f-body); font-size: 10.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; }
.ra-split-you h5 { color: var(--ra-h6); }
.ra-split-us h5 { color: var(--ra-h5); }
.ra-split-c ul { margin: 0; padding-left: 17px; }
.ra-split-c li { font-size: 12.5px; line-height: 1.55; color: var(--fg-dim); margin-bottom: 4px; }

.ra-needs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 7px; }
.ra-need { border: 1px solid var(--line); border-top: 3px solid var(--ra-h2); border-radius: 3px;
  background: var(--bg); padding: 9px 11px 10px; }
.ra-need b { display: block; font-size: 12.5px; }
.ra-need span { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.45; color: var(--fg-dim); }

.ra-dsteps { counter-reset: radep; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 7px; }
.ra-dstep { counter-increment: radep; border: 1px solid var(--line); border-radius: 3px;
  background: var(--bg); padding: 9px 11px 10px; }
.ra-dstep::before { content: counter(radep); display: inline-block; font-family: var(--f-mono);
  font-size: 10px; font-weight: 700; color: var(--h-ink); background: var(--ra-h5);
  border-radius: 2px; padding: 1px 6px; margin-bottom: 5px; }
.ra-dstep b { display: block; font-size: 12.5px; }
.ra-dstep-w { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.45; color: var(--fg-dim); }
.ra-dstep-o { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line);
  font-family: var(--f-mono); font-size: 10.5px; color: var(--ra-h5); }

/* ---- product cross-links ------------------------------------------------ */
.ra-prod-l { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 14px 0 0;
  padding-top: 12px; border-top: 1px solid var(--line); }
.ra-prod-l > span { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--fg-dim); }
.ra-prod-l a { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  text-decoration: none; color: var(--h); border: 1px solid var(--line); border-radius: 2px;
  padding: 4px 10px; background: var(--bg); }
.ra-prod-l a:hover { border-color: var(--h); }
.ra-prod-l a svg { width: 13px; height: 13px; flex: none; }

/* ---- ERP extraction, in the integration view ---------------------------- */
.ra-erps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
@media (max-width: 1000px) { .ra-erps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .ra-erps { grid-template-columns: minmax(0, 1fr); } }
.ra-erp { border: 1px solid var(--line); border-top: 3px solid var(--ra-h2); border-radius: 3px;
  background: var(--bg); padding: 9px 11px 10px; }
.ra-erp b { display: block; font-size: 12.5px; }
.ra-erp span { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.45; color: var(--fg-dim); }
.ra-erp em { display: block; margin-top: 6px; font-style: normal; font-family: var(--f-mono);
  font-size: 10.5px; color: var(--ra-h2); }
.ra-erp-s { margin: 8px 0 0; font-family: var(--f-mono); font-size: 11.5px; color: var(--ra-h5); }
.ra-erpm { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
@media (max-width: 760px) { .ra-erpm { grid-template-columns: minmax(0, 1fr); } }
.ra-erpmode { border: 1px solid var(--line); border-left: 3px solid var(--ra-h5); border-radius: 3px;
  background: var(--bg); padding: 9px 11px 10px; }
.ra-erpmode b { display: block; font-size: 12.5px; }
.ra-erpmode span { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.45; color: var(--fg-dim); }
.ra-erp-n { margin: 10px 0 0; font-size: 12px; line-height: 1.55; color: var(--fg-dim); }
/* padded to clear the 24px minimum target size (WCAG 2.2 AA 2.5.8); the
   negative margin keeps it sitting on the text baseline it follows. */
.ra-erp-n a { display: inline-flex; align-items: center; gap: 5px; min-height: 24px;
  padding: 2px 6px; margin: 0 -6px; font-weight: 600; color: var(--accent);
  text-decoration: none; white-space: nowrap; }
.ra-erp-n a:hover { text-decoration: underline; }
.ra-erp-n a svg { width: 13px; height: 13px; }

/* ---- the governance module's foundations -------------------------------- */
.ra-govf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
@media (max-width: 1000px) { .ra-govf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .ra-govf { grid-template-columns: minmax(0, 1fr); } }
.ra-govfc { border: 1px solid var(--line); border-left: 3px solid var(--ra-h4); border-radius: 3px;
  background: var(--bg); padding: 9px 11px 10px; }
.ra-govfc b { display: block; font-size: 12.5px; }
.ra-govfc span { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.45; color: var(--fg-dim); }

/* ---- motion ------------------------------------------------------------- *
 * Three kinds, and each one earns its place by showing something a static
 * picture cannot: a pulse travelling the path it describes, a connector that
 * makes a sequence read as a sequence, and a reveal that lets a long page
 * arrive a section at a time instead of all at once.
 *
 * Everything here is inside a prefers-reduced-motion guard. With motion
 * reduced the page is identical, minus the movement: the dots park at the
 * start of their paths, connectors stay drawn, and .rv is shown immediately
 * by reveal.js rather than by CSS.
 */

/* ---- the flow diagram --------------------------------------------------- */
.ra-fig-flow { padding: 14px 16px 12px; }
.ra-flow-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ra-flow { min-width: 900px; }
.ra-flow { display: block; width: 100%; height: auto; overflow: visible; }
.ra-flow text { font-family: var(--f-body); }
.fl-lbl { font-size: 11px; font-weight: 700; letter-spacing: .09em; fill: var(--fg-dim); }
.fl-lbl-p { fill: var(--ra-h5); letter-spacing: .06em; }
.fl-src rect, .fl-out rect { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1; }
.fl-out rect { stroke: var(--ra-h6); }
.fl-s2 { font-size: 11.5px; fill: var(--fg); }
.fl-n { font-size: 11px; fill: var(--fg-dim); }
.fl-panel rect { fill: var(--accent-wash); stroke: var(--ra-h5); stroke-width: 1.5;
  stroke-dasharray: 7 5; }
.fl-step rect { fill: var(--bg); stroke: var(--ra-h5); stroke-width: 1.2; }
.fl-t { font-size: 13.5px; font-weight: 700; fill: var(--fg); }
.fl-s { font-size: 11px; fill: var(--fg-dim); }
.fl-arrow { stroke: var(--ra-h5); stroke-width: 1.6; fill: none; }
.fl-arrow marker path, marker path { fill: var(--ra-h5); }
.fl-gate rect { fill: var(--bg); stroke: var(--ra-h4); stroke-width: 1.6; }
.fl-g1 { font-size: 12px; font-weight: 700; letter-spacing: .08em; fill: var(--ra-h4); }
.fl-g2 { font-size: 11.5px; fill: var(--fg-dim); }
.fl-tie { stroke: var(--ra-h4); stroke-width: 1; stroke-dasharray: 3 3; fill: none; opacity: .7; }
.fl-back { stroke: var(--ra-h2); stroke-width: 1.6; fill: none; stroke-dasharray: 6 4; }
.fl-back-t { fill: var(--ra-h2); }
.fl-dot { fill: var(--ra-h5); opacity: 0; }
.fl-dot-b { fill: var(--ra-h2); }

/* ---- connectors: a sequence should read as one ------------------------- */
.ra-chain, .ra-sm, .ra-hows, .ra-dsteps { position: relative; }
.ra-step, .ra-sm-col, .ra-how, .ra-dstep { position: relative; }
.ra-step:not(:last-child)::after, .ra-sm-col:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: -7px; width: 7px; height: 1.5px;
  background: var(--line-strong); z-index: 1; }
@media (max-width: 1200px) { .ra-step:not(:last-child)::after { display: none; } }
@media (max-width: 1100px) { .ra-sm-col:not(:last-child)::after { display: none; } }

/* ---- reveal: stagger the cards inside a revealed figure ---------------- */
@media (prefers-reduced-motion: no-preference) {
  .rv .ra-how, .rv .ra-cx, .rv .ra-step, .rv .ra-sm-col, .rv .ra-dstep,
  .rv .ra-erp, .rv .ra-govfc, .rv .ra-bm, .rv .ra-sub2, .rv .ra-need {
    opacity: 0; transform: translateY(10px);
    transition: opacity .5s cubic-bezier(.2,.7,.3,1), transform .5s cubic-bezier(.2,.7,.3,1); }
  .rv.in .ra-how, .rv.in .ra-cx, .rv.in .ra-step, .rv.in .ra-sm-col, .rv.in .ra-dstep,
  .rv.in .ra-erp, .rv.in .ra-govfc, .rv.in .ra-bm, .rv.in .ra-sub2, .rv.in .ra-need {
    opacity: 1; transform: none; }
  .rv.in :is(.ra-how, .ra-cx, .ra-step, .ra-sm-col, .ra-dstep, .ra-erp, .ra-govfc,
              .ra-bm, .ra-sub2, .ra-need):nth-child(2) { transition-delay: .05s; }
  .rv.in :is(.ra-how, .ra-cx, .ra-step, .ra-sm-col, .ra-dstep, .ra-erp, .ra-govfc,
              .ra-bm, .ra-sub2, .ra-need):nth-child(3) { transition-delay: .10s; }
  .rv.in :is(.ra-how, .ra-cx, .ra-step, .ra-sm-col, .ra-dstep, .ra-erp, .ra-govfc,
              .ra-bm, .ra-sub2, .ra-need):nth-child(4) { transition-delay: .15s; }
  .rv.in :is(.ra-how, .ra-cx, .ra-step, .ra-sm-col, .ra-dstep, .ra-erp, .ra-govfc,
              .ra-bm, .ra-sub2, .ra-need):nth-child(5) { transition-delay: .20s; }
  .rv.in :is(.ra-how, .ra-cx, .ra-step, .ra-sm-col, .ra-dstep, .ra-erp, .ra-govfc,
              .ra-bm, .ra-sub2, .ra-need):nth-child(n+6) { transition-delay: .25s; }

  /* the pulses: each follows the path it is describing */
  .fl-dot { opacity: 1; offset-rotate: 0deg; }
  .fl-dot-a { offset-path: path("M 164 170 C 182 170 182 123 198 123 H 930 C 976 123 980 154 1024 154");
    animation: ra-run 5.2s cubic-bezier(.45,0,.55,1) infinite; }
  .fl-dot-b { offset-path: path("M 1097 240 V 322 H 83 V 292");
    animation: ra-run 5.2s cubic-bezier(.45,0,.55,1) infinite 2.6s; }
  @keyframes ra-run {
    0%   { offset-distance: 0%;   opacity: 0; }
    6%   { opacity: 1; }
    82%  { opacity: 1; }
    92%  { offset-distance: 100%; opacity: 0; }
    100% { offset-distance: 100%; opacity: 0; }
  }
  /* the peering link breathes, because it is the one thing on that diagram
     that is a live connection rather than a box */
  .ra-peer-lb::before, .ra-est-link em { animation: ra-pulse 2.8s ease-in-out infinite; }
  @keyframes ra-pulse { 0%, 100% { opacity: .55; transform: scale(1); }
                        50% { opacity: 1; transform: scale(1.12); } }

  /* switching target or product should be visible, not instantaneous */
  .ra-pick, .ra-dp, .ra-opt { transition: background .18s, border-color .18s, transform .18s; }
  html.ra-switching .rx > i, html.ra-switching .p-only { animation: ra-fade .32s ease; }
  @keyframes ra-fade { from { opacity: .25; } to { opacity: 1; } }
}
