/* =========================================================================
   architecture-stack-diagram.css — /technology §3a · v2.0 (2026-05-07).
   v0.3 REPLACEMENT — supersedes v1.0 (3-layer · 2026-05-03).

   What changed.
   -------------
   Structural: 3 layers → 4 layers.
     v1.0: Outcome / Architecture / Foundation
     v2.0: Outcome / Exchange / Network / Foundation

   "Architecture" was a single composite layer in v1.0 whose contents
   spanned what v0.3 separates into Network (Privacy Networks · EasyAccess
   Authorization) and Exchange (PNX→QPX). v0.3's spine is four acts; the
   diagram now mirrors the spine.

   Layer treatments (per brief §6.1).
   ----------------------------------
   · Outcome     (top, --out):    plain surface; 5 Universal cells; light
                                  register, smallest type — the diagram
                                  POINTS at §5 Outcome rather than
                                  re-rendering it.
   · Exchange    (--exch):        plain surface; 2 phase cells (PNX today /
                                  QPX mature); diagram only NAMES the
                                  layer and its phases — phase content
                                  proper lives in §4 prose.
   · Network     (--net):         plain surface with GOLD INNER LEFT-RULE,
                                  marking this as the spine layer; 2 cells
                                  (Privacy Networks · EasyAccess
                                  Authorization Network) AND both v0.2
                                  property strips (OPEN PROTOCOL · ZERO
                                  MARGINAL COST) attached, verbatim.
   · Foundation  (bottom, --found): inset surface (--ws-surface-2) — reads
                                  as the base course, set apart from layers
                                  above. Three substrate cells (QP · PoT ·
                                  UTM) at COMPRESSED weight: smaller cell-
                                  title, smaller cell-gloss, layer-name
                                  muted. Foundation announces less than
                                  the layers above — substrate-not-peer
                                  legibility passes by typographic weight,
                                  not by visual gimmick. Carries the
                                  v0.1/v0.2 design constraint forward.

   Frame.
   ------
   Diagram is framed as the *Quantum Privacy Network architecture*. The
   .ws-asd__frame-cap renders QUANTUM PRIVACY NETWORK · ARCHITECTURE in
   mono small-caps with a 2px gold under-rule, sitting flush against the
   top of the layer stack (the stack's own border-top is suppressed in
   favor of the cap's gold rule, so the umbrella reads as the FRAME of
   the diagram, not as a layer inside it).

   Coexistence with Bracket A.
   ---------------------------
   The Network layer's INNER gold rule and Bracket A's region rule sit
   at different x-positions — bracket rule at the page-content gutter
   inner edge; network rule at the layer's left padding edge inside the
   diagram frame. Concentric "spine within spine" reading by design.
   See bracket-a.css for the bracket positioning notes; see Round 2
   composition-coexistence test for the visual proof.

   Tokens — webshield-navy v1.3 only. No new tokens. No raw values.
   ========================================================================= */

.ws-asd {
  background: var(--ws-page);
  padding: 56px 0 40px;
}

.ws-asd__wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Section header ─────────────────────────────────────────────── */

.ws-asd__eyebrow {
  font-family: var(--ws-font-mono);
  font-size: var(--ws-fs-micro);
  font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  color: var(--ws-accent);
  text-transform: uppercase;
  margin: 0 0 14px;
}

.ws-asd__title {
  font-family: var(--ws-font-display);
  font-size: 32px;
  font-weight: 500;
  line-height: var(--ws-lh-tight);
  letter-spacing: -0.012em;
  color: var(--ws-ink);
  margin: 0 0 16px;
  max-width: 900px;
  text-wrap: balance;
}

.ws-asd__dek {
  font-family: var(--ws-font-display);
  font-style: italic;
  font-size: var(--ws-fs-lede);
  line-height: 1.55;
  color: var(--ws-ink-muted);
  margin: 0 0 32px;
  max-width: 760px;
}

/* ── Frame · outer caption ──────────────────────────────────────── */

.ws-asd__frame {
  margin: 0;
}

.ws-asd__frame-cap {
  background: var(--ws-page);
  border: 1px solid var(--ws-rule);
  border-bottom: 2px solid var(--ws-accent);
  padding: 11px 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ws-asd__frame-label {
  font-family: var(--ws-font-mono);
  font-size: var(--ws-fs-micro);
  font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  color: var(--ws-accent);
  text-transform: uppercase;
}

.ws-asd__frame-meta {
  font-family: var(--ws-font-mono);
  font-size: var(--ws-fs-micro);
  letter-spacing: var(--ws-tracking-mono);
  color: var(--ws-ink-faint);
  text-transform: uppercase;
}

/* ── Stack ───────────────────────────────────────────────────────── */

.ws-asd__stack {
  background: var(--ws-surface);
  border: 1px solid var(--ws-rule);
  border-top: none;  /* frame-cap supplies the top edge with the gold under-rule */
  display: flex;
  flex-direction: column;
}

.ws-asd__layer {
  padding: 24px 32px 26px;
  border-top: 1px solid var(--ws-rule);
  position: relative;
}

.ws-asd__layer:first-child {
  border-top: none;
}

.ws-asd__layer-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 10px;
}

.ws-asd__layer-xref {
  margin-left: auto;
  font-family: var(--ws-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  color: var(--ws-accent);
  text-transform: uppercase;
  text-decoration: none;
  flex-shrink: 0;
  transition: text-decoration-color 120ms ease;
}
.ws-asd__layer-xref:hover,
.ws-asd__layer-xref:focus-visible {
  text-decoration: underline;
}

.ws-asd__layer-ord {
  font-family: var(--ws-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  color: var(--ws-accent);
  text-transform: uppercase;
  flex-shrink: 0;
  min-width: 78px;
}

.ws-asd__layer-name {
  font-family: var(--ws-font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ws-ink);
  letter-spacing: -0.01em;
  margin: 0;
}

.ws-asd__layer-gloss {
  font-family: var(--ws-font-display);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ws-ink-muted);
  margin: 0 0 16px;
  padding-left: 94px;  /* aligns under the ordinal */
  max-width: 820px;
}

/* ── Per-layer modifiers ────────────────────────────────────────── */

.ws-asd__layer--out  { background: var(--ws-surface); }
.ws-asd__layer--exch { background: var(--ws-surface); }

/* NETWORK — the spine layer. Gold INNER left-rule. Padding-left
   compensated for the 2px so cell content stays aligned with siblings
   above and below. */
.ws-asd__layer--net {
  background: var(--ws-surface);
  border-left: 2px solid var(--ws-accent);
  padding-left: 30px;
}

/* FOUNDATION — substrate.
   Three constraints made visible (per brief §6.1):
     (1) inset surface so foundation is set apart from layers above;
     (2) compressed cell weight (smaller titles, smaller gloss);
     (3) muted layer-name + gloss size — the foundation ANNOUNCES less
         than the layers above. */
.ws-asd__layer--found { background: var(--ws-surface-2); }

.ws-asd__layer--found .ws-asd__layer-name {
  font-size: 20px;
  color: var(--ws-ink-muted);
}

.ws-asd__layer--found .ws-asd__layer-gloss {
  font-size: 13.5px;
  margin-bottom: 14px;
}

/* ── Cell rows inside each layer ─────────────────────────────────── */

.ws-asd__cells {
  display: grid;
  gap: 12px;
  padding-left: 94px;  /* under the ordinal */
}

.ws-asd__layer--out   .ws-asd__cells { grid-template-columns: repeat(5, 1fr); }
.ws-asd__layer--exch  .ws-asd__cells { grid-template-columns: 1fr 1fr; }
.ws-asd__layer--net   .ws-asd__cells { grid-template-columns: 1fr 1fr; }
.ws-asd__layer--found .ws-asd__cells { grid-template-columns: repeat(3, 1fr); }

.ws-asd__cell {
  background: var(--ws-page);
  border: 1px solid var(--ws-rule-faint);
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ws-asd__cell-tag {
  font-family: var(--ws-font-mono);
  font-size: var(--ws-fs-micro);
  font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  color: var(--ws-ink-faint);
  text-transform: uppercase;
}

.ws-asd__cell-title {
  font-family: var(--ws-font-display);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ws-ink);
  letter-spacing: -0.003em;
  margin: 0;
}

.ws-asd__cell-gloss {
  font-family: var(--ws-font-body);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ws-ink-muted);
  margin: 0;
}

/* Outcome cells — tighter, 5-up */
.ws-asd__layer--out .ws-asd__cell { padding: 12px 14px 14px; }
.ws-asd__layer--out .ws-asd__cell-title { font-size: 14.5px; }
.ws-asd__layer--out .ws-asd__cell-gloss { font-size: 12.5px; line-height: 1.45; }

/* Network cells — spine layer carries weight typographically, not just via the
   gold inner border on .ws-asd__layer--net. */
.ws-asd__layer--net .ws-asd__cell-title { font-size: 18px; }

/* Foundation cells — substrate weight */
.ws-asd__layer--found .ws-asd__cell {
  background: var(--ws-surface);  /* subtle inversion vs --found surface-2 ground */
  padding: 12px 14px 13px;
}
.ws-asd__layer--found .ws-asd__cell-title { font-size: 14px; }
.ws-asd__layer--found .ws-asd__cell-gloss { font-size: 12.5px; line-height: 1.45; }

/* Outcome cells rendered as anchors — preserve cell visuals, add hover affordance */
a.ws-asd__cell {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

a.ws-asd__cell:hover,
a.ws-asd__cell:focus-visible {
  border-color: var(--ws-accent);
  background-color: var(--ws-surface-2);
}

a.ws-asd__cell:focus-visible {
  outline: 2px solid var(--ws-accent);
  outline-offset: 2px;
}

a.ws-asd__cell .ws-asd__cell-tag,
a.ws-asd__cell .ws-asd__cell-title {
  text-decoration: none;
  color: inherit;
}

/* ── Property strips · Network layer only (verbatim from brief §6.1) ───
   Footnote-style: no card background, no card border. The `━` glyph in
   the label stands in for the prior gold left-rule. */

.ws-asd__properties {
  display: grid;
  gap: 6px;
  margin: 12px 0 0 94px;
}

.ws-asd__property {
  padding: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.ws-asd__property-label {
  font-family: var(--ws-font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: var(--ws-tracking-mono);
  color: var(--ws-accent);
  text-transform: uppercase;
  flex-shrink: 0;
}

.ws-asd__property-text {
  font-family: var(--ws-font-body);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ws-ink-muted);
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .ws-asd__layer { padding: 20px 22px 22px; }
  .ws-asd__layer--net { padding-left: 20px; }
  .ws-asd__layer-gloss,
  .ws-asd__cells,
  .ws-asd__properties { padding-left: 0; margin-left: 0; }
  .ws-asd__layer--out   .ws-asd__cells,
  .ws-asd__layer--found .ws-asd__cells { grid-template-columns: 1fr; }
  .ws-asd__layer--exch  .ws-asd__cells,
  .ws-asd__layer--net   .ws-asd__cells { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .ws-asd { padding: 40px 0 32px; }
  .ws-asd__wrap { padding: 0 24px; }
  .ws-asd__title { font-size: 26px; }
  .ws-asd__layer-name { font-size: 19px; }
  .ws-asd__layer-head { gap: 10px; flex-wrap: wrap; }
  .ws-asd__layer-ord { min-width: 0; }
  .ws-asd__property { flex-direction: column; gap: 6px; }
}
