/* radius-admin project site. One stylesheet, no external resources.
   Colour meanings are the console's (app/radius_admin/static/app.css) and are never used
   for decoration:
     amber = staged, takes effect after Apply
     teal  = live, takes effect immediately
     red   = rejects, failures, roll back
   Buttons and links are ink and blue. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/IBMPlexSans-Regular-Latin1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/IBMPlexMono-Medium-Latin1.woff2") format("woff2"); }

:root {
  --steel-900: #17212b;
  --steel-800: #1f2c38;
  --steel-700: #2c3d4d;
  --steel-500: #5b6f82;
  --steel-300: #a9b7c4;
  --paper: #f3f5f7;
  --tint: #e6ebf0;
  --surface: #ffffff;
  --line: #d9e0e6;
  --line-strong: #b4c0cb;
  --ctl-line: #5b6f82;     /* control outlines: 3:1 against every background */
  --ink: #18222c;
  --ink-soft: #4d5d6c;
  --amber: #b86e00;        /* fills, borders, lines */
  --amber-text: #8a5200;   /* text: the fill colour is too light for small type */
  --amber-bg: #fff3dc;
  --amber-line: #f0c46d;
  --teal: #0a7468;
  --teal-bg: #e1f3f0;
  --red: #b42318;
  --red-bg: #fde8e6;
  --link: #1a5fd0;
  --focus: #1f6feb;
  --btn-bg: #18222c;
  --btn-fg: #ffffff;
  --radius-s: 4px;
  --radius-m: 8px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "Ubuntu", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "Ubuntu Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --top-h: 3.5rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10171e;
    --tint: #0b1116;
    --surface: #17212b;
    --line: #2c3a47;
    --line-strong: #48596a;
    --ctl-line: #8496a8;
    --ink: #e4eaf0;
    --ink-soft: #9fb0bf;
    --amber: #f2b24c;
    --amber-text: #f2b24c;
    --amber-bg: #3a2a10;
    --amber-line: #7a5718;
    --teal: #4fc7b6;
    --teal-bg: #0f302c;
    --red: #ff8b80;
    --red-bg: #3d1714;
    --link: #7fb2ff;
    --focus: #6ea8ff;
    --btn-bg: #e4eaf0;
    --btn-fg: #10171e;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font: 400 1.0625rem/1.6 var(--font);
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.35rem + 3.6vw, 3.6rem); letter-spacing: -.025em; line-height: 1.06; }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.25rem); letter-spacing: -.02em; }
h3 { font-size: 1.125rem; letter-spacing: -.005em; }
p { margin: 0 0 .9rem; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code, pre, .mono { font-family: var(--mono); font-size: .9em; }
code { overflow-wrap: anywhere; }
code.nb { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--surface); color: var(--ink); padding: .5rem 1rem; z-index: 50; border-radius: var(--radius-s); }
.skip:focus { left: .5rem; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 74rem; margin-inline: auto; padding-inline: 1.25rem; }
.wrap.narrow { max-width: 50rem; }
.fine { font-size: .9rem; color: var(--ink-soft); }
.more { margin: 2rem 0 0; }

/* ----------------------------------------------------------------- tags */
.tag { display: inline-block; font-size: .75rem; font-weight: 600; line-height: 1.4; padding: .1rem .45rem; border-radius: var(--radius-s); white-space: nowrap; vertical-align: .08em; letter-spacing: 0; }
.tag-ok { color: var(--teal); background: var(--teal-bg); }
.tag-warn { color: var(--amber-text); background: var(--amber-bg); }
.tag-danger { color: var(--red); background: var(--red-bg); }
.tag-muted { color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line); }
.tag-root { color: var(--btn-fg); background: var(--btn-bg); }
.swatch { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .5rem; background: var(--steel-500); }
.swatch-teal, .ls-live .swatch { background: var(--teal); }
.swatch-amber, .ls-staged .swatch { background: var(--amber); }
.swatch-red { background: var(--red); }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: .5rem 1.1rem;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--ctl-line); border-radius: var(--radius-s);
  text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { color: var(--btn-fg); background: var(--btn-bg); border-color: var(--btn-bg); }
.btn-primary:hover { background: var(--steel-700); border-color: var(--steel-700); color: #fff; }
.btn-small { min-height: 2.25rem; padding: .3rem .8rem; font-size: .9rem; }
.btn-quiet { background: transparent; }

/* --------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 1.5rem; min-height: var(--top-h); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.mark { flex: none; border-radius: 3px; }
.mark-bg { fill: #7fd3c7; }
.mark-dot { fill: #17212b; }
.mark-amber { fill: #f2b24c; }
.top-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.top-nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; padding: .4rem 0; }
.top-nav a:hover { color: var(--ink); text-decoration: underline; }
.top-cta { display: flex; gap: .5rem; }
@media (max-width: 900px) {
  .top-nav { display: none; }
  .top-cta { margin-left: auto; }
}

/* ----------------------------------------------------------------- hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.status-line { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.4rem; }
.chip { font-size: .8rem; font-weight: 600; color: var(--ink-soft); border: 1px solid var(--line-strong); border-radius: 99px; padding: .15rem .7rem; white-space: nowrap; }
.hero h1 { margin-bottom: 1.4rem; }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink-soft); max-width: 36rem; }
.lede + .lede { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.8rem 0 1.1rem; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
}

/* The safe-apply rail: the page's one animated element. Without JavaScript (and before it
   runs) every step shows as done and both endings are listed. */
.apply { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.4rem 1.5rem 1.25rem; box-shadow: 0 1px 2px rgba(16, 23, 30, .05), 0 12px 32px -12px rgba(16, 23, 30, .18); }
.apply figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .75rem; margin-bottom: 1.25rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.apply figcaption strong { font-size: 1.125rem; }
.apply figcaption span { color: var(--ink-soft); font-size: .9rem; }
.rail { list-style: none; }
.step { position: relative; padding: 0 0 1.05rem 2.1rem; }
.step::before { content: ""; position: absolute; left: 0; top: .32rem; width: .95rem; height: .95rem; border-radius: 50%; background: var(--ink); border: 2px solid var(--ink); }
.step::after { content: ""; position: absolute; left: calc(.475rem - 1px); top: 1.45rem; bottom: -.2rem; width: 2px; background: var(--line-strong); }
.step-end::after { display: none; }
.step-t { margin: 0; font-weight: 600; line-height: 1.5; }
.step-d { margin: .1rem 0 0; font-size: .92rem; line-height: 1.5; color: var(--ink-soft); }
.when { font-weight: 400; color: var(--ink-soft); }
.step-staged::before { background: var(--amber); border-color: var(--amber); }
.step-ok::before { background: var(--teal); border-color: var(--teal); }
.step-fail::before { background: var(--red); border-color: var(--red); }
.step-end { padding-bottom: .9rem; }
.step-fail { padding-bottom: 0; }

.apply.js .step-end { display: none; }
.apply.js[data-outcome="ok"] .step-ok, .apply.js[data-outcome="fail"] .step-fail { display: block; }
.apply.js .when { display: none; }
.apply.js .step:not(.is-done)::before { background: var(--surface); border-color: var(--line-strong); }
.apply.js .step:not(.is-done) .step-t { color: var(--ink-soft); font-weight: 400; }
.apply.js .step:not(.is-done) .tag { visibility: hidden; }
.apply.js .step.is-now::before { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 16%, transparent); }
.apply.js .step-staged.is-now::before { box-shadow: 0 0 0 4px color-mix(in srgb, var(--amber) 28%, transparent); }
.apply.js .step-ok.is-now::before { box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 28%, transparent); }
.apply.js .step-fail.is-now::before { box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 28%, transparent); }
.apply.js .step-check.is-failed::before { background: var(--red); border-color: var(--red); }
.apply.js .step.is-done::after { background: var(--ink-soft); }
.apply.js .step-end { padding-bottom: .4rem; min-height: 7.2rem; }
@media (prefers-reduced-motion: no-preference) {
  .apply.js .step::before { transition: background-color .25s, border-color .25s, box-shadow .25s; }
  .apply.js .step-t, .apply.js .step-d { transition: color .25s; }
}
.apply-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-top: .6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.apply-ctl-l { font-size: .9rem; color: var(--ink-soft); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--ctl-line); border-radius: var(--radius-s); overflow: hidden; }
.seg button { font: inherit; font-size: .88rem; font-weight: 600; min-height: 2.5rem; padding: .35rem .8rem; border: 0; background: transparent; color: var(--ink); cursor: pointer; flex: 1 1 auto; }
.seg button + button { border-left: 1px solid var(--ctl-line); }
.seg button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-fg); }
.seg button:focus-visible { outline-offset: -3px; }
@media (max-width: 480px) {
  .seg { display: grid; width: 100%; }
  .seg button + button { border-left: 0; border-top: 1px solid var(--ctl-line); }
}

/* ------------------------------------------------------------- sections */
.sec, .band { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.band, .sec-alt { background: var(--surface); border-block: 1px solid var(--line); }
.sec-tint { background: var(--tint); border-block: 1px solid var(--line); }
.sec-lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 44rem; margin: 1rem 0 0; }
.sec .wrap > h2 + :not(.sec-lede), .sec .wrap > .sec-lede + * { margin-top: 2.25rem; }

/* live / staged */
.ls-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2.25rem; }
.ls { border: 1px solid var(--line); border-top: 4px solid var(--steel-500); border-radius: var(--radius-m); padding: 1.25rem 1.4rem 1rem; background: var(--paper); }
.ls-live { border-top-color: var(--teal); }
.ls-staged { border-top-color: var(--amber); }
.ls-k { margin: 0 0 .5rem; font-size: .85rem; font-weight: 600; }
.ls-live .ls-k { color: var(--teal); }
.ls-staged .ls-k { color: var(--amber-text); }
.ls h3 { margin-bottom: .8rem; font-size: 1.25rem; }
.ls ul { list-style: none; margin-bottom: 1rem; }
.ls li { padding: .45rem 0; border-top: 1px solid var(--line); }
.ls .fine { margin: 0; }
.colour-note { margin: 1.25rem 0 0; font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 720px) { .ls-grid { grid-template-columns: minmax(0, 1fr); } }

/* use cases */
.uc { margin: 2.25rem 0 0; border-bottom: 1px solid var(--line-strong); }
.uc > div { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: .25rem 2.5rem; padding: 1.1rem 0; border-top: 1px solid var(--line-strong); }
.uc dt { font-weight: 600; font-size: 1.125rem; }
.uc dd { margin: 0; color: var(--ink-soft); max-width: 44rem; }
@media (max-width: 720px) { .uc > div { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------- console tour (recreations) */
.tour { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; margin-top: clamp(2.5rem, 5vw, 4rem); }
.tour-flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.tour-flip .tour-copy { order: 2; }
.tour-copy h3 { font-size: 1.5rem; letter-spacing: -.015em; margin-bottom: .8rem; }
.tour-copy p { color: var(--ink-soft); max-width: 32rem; }
@media (max-width: 900px) {
  .tour, .tour-flip { grid-template-columns: minmax(0, 1fr); }
  .tour-flip .tour-copy { order: 0; }
}
.con { margin: 0; min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-m); overflow: hidden; background: var(--paper); font-size: .875rem; line-height: 1.5; box-shadow: 0 1px 2px rgba(16, 23, 30, .06), 0 16px 36px -16px rgba(16, 23, 30, .28); }
.con p { margin: 0; }
.con-top { display: flex; align-items: center; gap: .6rem; padding: .55rem .9rem; background: var(--steel-900); color: #fff; font-weight: 600; }
.con-mark { width: 16px; height: 16px; border-radius: 2px; flex: none;
  background:
    linear-gradient(#17212b, #17212b) 4px 4px / 3px 3px no-repeat,
    linear-gradient(#17212b, #17212b) 9px 4px / 3px 3px no-repeat,
    linear-gradient(#17212b, #17212b) 4px 9px / 3px 3px no-repeat,
    linear-gradient(#f2b24c, #f2b24c) 9px 9px / 3px 3px no-repeat,
    #7fd3c7; }
.con-host { font-family: var(--mono); font-size: .75rem; font-weight: 400; color: var(--steel-300); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.con-body { padding: 1rem; display: grid; gap: .75rem; }
.con-h1 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.con-h2 { font-size: .95rem; font-weight: 600; margin-bottom: .4rem !important; }
.con-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: .8rem 1rem; min-width: 0; }
.con-panel.flush { padding: 0; overflow: hidden; }
.con-ph { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .75rem; padding: .65rem 1rem; margin: 0 !important; border-bottom: 1px solid var(--line); }
.con-muted { color: var(--ink-soft); font-weight: 400; font-size: .8rem; overflow-wrap: anywhere; }
.con-right { margin-left: auto; }
.con-small { font-size: .82rem; }
.con-verdict { font-size: 1.1rem; font-weight: 600; }
.con-verdict.ok { color: var(--teal); }
.vlan { font-family: var(--mono); font-weight: 500; }
.con-scroll { overflow-x: auto; }
.con table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.con th, .con td { text-align: left; padding: .5rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.con th { font-size: .78rem; color: var(--ink-soft); font-weight: 600; }
.con tr:last-child td { border-bottom: 0; }
.con .num { text-align: right; font-variant-numeric: tabular-nums; }
.con .cell-sub { display: block; margin-top: .15rem; font-family: var(--mono); font-size: .78rem; color: var(--ink-soft); }
.con tr.is-off td { color: var(--ink-soft); }
.callout-danger { border-left: 4px solid var(--red); }
.con-reason { overflow-wrap: anywhere; }
.con-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 560px) { .con-two { grid-template-columns: minmax(0, 1fr); } }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem 1rem; margin: 0; }
.kv dt { font-weight: 600; color: var(--ink-soft); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.con-applybar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; background: var(--amber-bg); border: 1px solid var(--amber-line); border-left: 6px solid var(--amber); border-radius: var(--radius-m); padding: .8rem 1rem; }
.con-state { font-size: 1.05rem; font-weight: 600; }
.con-applybar .con-muted { color: var(--ink); opacity: .8; }
.con-btns { display: flex; gap: .4rem; flex-wrap: wrap; }
.con-btn { display: inline-block; font-weight: 600; font-size: .82rem; padding: .4rem .75rem; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line-strong); }
.con-btn-primary { background: var(--steel-700); border-color: var(--steel-700); color: #fff; }
pre.diff { margin: 0; padding: .6rem 0; overflow-x: auto; font-size: .8rem; line-height: 1.55; tab-size: 4; }
pre.diff span { display: block; padding: 0 1rem; white-space: pre; min-width: max-content; }
.d-add { background: var(--teal-bg); color: var(--teal); }
.con-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.con-cell { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--steel-500); border-radius: var(--radius-m); padding: .75rem .9rem; }
.con-cell.is-ok { border-top-color: var(--teal); }
.con-cell.is-warn { border-top-color: var(--amber); }
.con-cell .l, .con-cell .n { color: var(--ink-soft); font-size: .8rem; }
.con-cell .v { font-size: 1.2rem; font-weight: 600; }
.con-counts { display: flex; flex-wrap: wrap; gap: .4rem; }
.con-counts span { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: .35rem .65rem; }
.con-counts strong { font-variant-numeric: tabular-nums; margin-right: .15rem; }
.con-counts .hot strong { color: var(--red); }
@media (max-width: 420px) { .con-board { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------- features */
.feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3.5rem; }
.feat h3 { padding-top: .9rem; border-top: 2px solid var(--ink); margin-bottom: .6rem; }
.feat ul { list-style: none; }
.feat li { padding: .6rem 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 1rem; }
.feat li:first-child { border-top: 0; }
@media (max-width: 720px) { .feat { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------- architecture diagram */
.arch {
  display: grid; margin-top: 2.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 15rem) minmax(0, 1fr);
  grid-template-areas:
    "browser .     idp"
    "https   .     saml"
    "edge    edge  edge"
    "sock    .     ."
    "portal  peer  pg"
    "json    .     sql"
    "helper  apply fr"
    ".       .     in";
}
.n-browser { grid-area: browser; } .n-idp { grid-area: idp; } .n-edge { grid-area: edge; }
.n-portal { grid-area: portal; } .n-pg { grid-area: pg; } .n-helper { grid-area: helper; } .n-fr { grid-area: fr; }
.l-https { grid-area: https; } .l-saml { grid-area: saml; } .l-sock { grid-area: sock; }
.l-peer { grid-area: peer; } .l-json { grid-area: json; } .l-sql { grid-area: sql; } .l-apply { grid-area: apply; }
.edge-in { grid-area: in; }
.node { background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius-m); padding: .9rem 1.1rem; min-width: 0; }
.node-opt { border-style: dashed; }
.node-t { margin: 0; font-weight: 600; font-size: 1.05rem; display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; }
.node-d { margin: .2rem 0 0; font-size: .9rem; color: var(--ink-soft); line-height: 1.45; }
.n-helper { border-color: var(--ink); border-width: 2px; }
.link { margin: 0; position: relative; font-size: .82rem; line-height: 1.3; color: var(--ink-soft); --c: var(--steel-500); }
.link.live { --c: var(--teal); color: var(--teal); font-weight: 600; }
.link.staged { --c: var(--amber); color: var(--amber-text); font-weight: 600; }
.link.v { min-height: 3.4rem; display: flex; align-items: center; padding-left: 3.4rem; }
.link.v::before { content: ""; position: absolute; left: 2rem; top: 0; bottom: 0; width: 2px; background: var(--c); }
.link.v::after { content: ""; position: absolute; left: calc(2rem - 4px); bottom: 0; border: 5px solid transparent; border-bottom-width: 0; border-top: 7px solid var(--c); }
.link.v.up::after { bottom: auto; top: 0; border-top-width: 0; border-bottom: 7px solid var(--c); }
.link.h { align-self: center; text-align: center; padding: 0 .9rem 1.5rem; }
.link.h::before { content: ""; position: absolute; left: 0; right: 0; bottom: .75rem; height: 2px; background: var(--c); }
.link.h::after { content: ""; position: absolute; right: 0; bottom: calc(.75rem - 4px); border: 5px solid transparent; border-right-width: 0; border-left: 7px solid var(--c); }
.edge-in { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding-top: 2rem; position: relative; }
.edge-in::before { content: ""; position: absolute; left: 2rem; top: 0; height: 2rem; width: 2px; background: var(--steel-500); }
.edge-in::after { content: ""; position: absolute; left: calc(2rem - 4px); top: 0; border: 5px solid transparent; border-top-width: 0; border-bottom: 7px solid var(--steel-500); }
.edge-in li { font-size: .85rem; color: var(--ink-soft); border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: .4rem .7rem; background: var(--paper); }
.edge-in strong { color: var(--ink); margin-right: .3rem; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: 1.75rem 0 0; font-size: .9rem; color: var(--ink-soft); }
.via { display: none; margin: .45rem 0 0; padding-top: .45rem; border-top: 1px solid var(--line); font-size: .8rem; line-height: 1.35; color: var(--ink-soft); }
.via-staged { color: var(--amber-text); font-weight: 600; }
@media (max-width: 720px) {
  /* same map, narrower: the two horizontal connectors keep their arrow and move their label
     into the box they point at */
  .arch { grid-template-columns: minmax(0, 1fr) 1.4rem minmax(0, 1fr);
    grid-template-areas:
      "browser .     idp"
      "https   .     saml"
      "edge    edge  edge"
      "sock    .     ."
      "portal  peer  pg"
      "json    .     sql"
      "helper  apply fr"
      "in      in    in"; }
  .node { padding: .7rem .75rem; }
  .node-t { font-size: .98rem; }
  .node-d { font-size: .84rem; }
  .link.v { padding: .5rem 0 .7rem 1.9rem; }
  .link.v.up { padding: .7rem 0 .5rem 1.9rem; }
  .link.v::before { left: 1rem; }
  .link.v::after { left: calc(1rem - 4px); }
  .link.h { padding: 0; height: 1.5rem; }
  .link.h span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .via { display: block; }
  .edge-in { justify-content: flex-end; }
  .edge-in::before { left: auto; right: 25%; }
  .edge-in::after { left: auto; right: calc(25% - 4px); }
}

/* ------------------------------------------------------------- security */
.rules { list-style: none; counter-reset: rule; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 2.5rem; }
.rules li { counter-increment: rule; border-top: 2px solid var(--ink); padding-top: .9rem; }
.rules li::before { content: "0" counter(rule); display: block; font-family: var(--mono); font-size: .85rem; font-weight: 500; color: var(--ink-soft); margin-bottom: .5rem; }
.rules h3 { margin-bottom: .5rem; }
.rules p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 900px) { .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .rules { grid-template-columns: minmax(0, 1fr); } }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.wrap.split { gap: 2.5rem 4rem; }
.wrap.split h2 { margin-bottom: 1rem; font-size: 1.6rem; }
.wrap.split p { max-width: 34rem; }
@media (max-width: 720px) { .split { grid-template-columns: minmax(0, 1fr); } }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.25rem 1.4rem; }
.note h3 { margin-bottom: .6rem; }
.note p, .note li { color: var(--ink-soft); font-size: 1rem; }
.note p:last-child { margin-bottom: 0; }
.note ul { padding-left: 1.1rem; }
.note li + li { margin-top: .5rem; }
.rules + .split { margin-top: 3rem; }

/* -------------------------------------------------------------- install */
.inst-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 900px) { .inst-grid { grid-template-columns: minmax(0, 1fr); } }
.req { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.25rem 1.4rem; }
.req h3 { margin-bottom: .5rem; }
.req ul { list-style: none; }
.req li { padding: .65rem 0; border-top: 1px solid var(--line); font-size: .98rem; color: var(--ink-soft); }
.req li:first-child { border-top: 0; }
.req li strong { color: var(--ink); }
.req .fine { margin: .5rem 0 0; }
.steps { list-style: none; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.75rem 3.25rem; min-width: 0; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -.15rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .95rem; border: 2px solid var(--ink); }
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: calc(1.05rem - 1px); top: 2.2rem; bottom: .25rem; width: 2px; background: var(--line-strong); }
.steps h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.steps p { color: var(--ink-soft); }
pre.cmd { margin: 0 0 .9rem; padding: .8rem 1rem; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow-x: auto; font-size: .9rem; line-height: 1.55; }
pre.cmd code { font-size: 1em; font-weight: 500; white-space: pre; overflow-wrap: normal; }
details { border-top: 1px solid var(--line); padding-top: .6rem; }
summary { cursor: pointer; font-weight: 600; padding: .35rem 0; }
details[open] summary { margin-bottom: .6rem; }

/* --------------------------------------------------------------- status */
#status h3 { margin: 2rem 0 .75rem; }
.limits { list-style: none; margin-bottom: 1.5rem; }
.limits li { padding: .85rem 0; border-top: 1px solid var(--line-strong); color: var(--ink-soft); }
.limits li:last-child { border-bottom: 1px solid var(--line-strong); }
.limits strong { color: var(--ink); }

/* --------------------------------------------------------------- footer */
.foot { background: var(--steel-900); color: #c9d4de; padding: 2rem 0; font-size: .9rem; }
.foot p { margin: 0 0 .35rem; }
.foot a { color: #a9c8ff; }
.foot :focus-visible { outline-color: #a9c8ff; }

@media print {
  .top, .apply-ctl { display: none; }
  .sec, .band { padding: 1.5rem 0; }
}
