/* =========================================================================
   mechanism-card-v2 — additive variants for the /technology page (§4 §2).
   Date: 2026-05-03 · Project: WebShield technology — IP-architecture spine v2.

   ── LOCKED VARIANT ──────────────────────────────────────────────────
   Step 1 of /technology is LOCKED on  .ws-mc--substrate-coderef
   (Variant C-refined · "Compiled definition, pushed colder").

   Selection rationale (carried into deviation log):
     • This page diverges from the homepage's serif-led card register
       on purpose. The /technology audience #1 (per brief §1.1) is IP
       counsel performing FTO analysis. They read claim charts, not
       editorial cards. C-refined matches that mental model:
         §4.X.Y · MECHANISM · Claim N · §K  spec breadcrumb,
         FUNCTION: / DEPLOYS:                labeled spec rows,
         PRIMITIVES · N                      counted manifest as
                                              the visual centre of gravity.
     • Rhythm-test gating criterion: substrate must read as a
       categorically different object from the Universal Cards (.ws-uc)
       two scrolls below. Variants A and B failed this test at canvas
       zoom; C-refined passes.
     • Reuse footprint is system-wide, not bespoke to §4.2: the
       FUNCTION/DEPLOYS ledger and §X.Y · KIND breadcrumb extend to
       §3d composed-services, §3a layer headers, and any future
       claim-chart pattern on /patents.

   ── ADDITIVE, NOT SUPERSEDING ───────────────────────────────────────
   The locked v1.3 mechanism-card.css remains untouched. The /patents
   page continues to render .ws-mc with its Supports→universal-chip
   footer. /technology renders .ws-mc + .ws-mc--substrate-coderef on
   top, overriding only the slots that differ. Resolves §8.2 J-2.

   ── VARIANT INDEX ───────────────────────────────────────────────────
     .ws-mc--substrate-spec      Variant A · Spec-sheet
                                  EXPLORED, NOT CHOSEN — did not pass
                                  rhythm test (read as "more cards" at
                                  canvas zoom against Universal Cards).
                                  Preserved for handoff iteration history.
     .ws-mc--substrate-ledger    Variant B · Claim ledger
                                  EXPLORED, NOT CHOSEN — did not pass
                                  rhythm test; header strip pattern had
                                  no reuse beyond §4.2.
     .ws-mc--substrate-code      Variant C · Compiled definition
                                  EXPLORED, NOT CHOSEN — superseded by
                                  C-refined; kept as comparison base.
     .ws-mc--substrate-coderef   Variant C-refined · LOCKED for Step 1.

   All variants:
     • Source color, type, spacing, rule weights from webshield-navy.css.
     • Add NO new tokens.
     • Are visibly tighter and more technical than .ws-uc.
     • Override only the slots that differ from the v1.3 patents-page shape.

   Internal slots:
     .ws-mc__role         one-line italic role (A/B/C)
     .ws-mc__primitives   primitive-manifest container
     .ws-mc__primitive    one primitive item
     .ws-mc__xref         deep-technical-block cross-reference
     .ws-mc__spec-header  mono spec breadcrumb (C-refined only)
     .ws-mc__spec-list    labeled FUNCTION/DEPLOYS rows (C-refined only)
     .ws-mc__name--cold   sans-500 + code chip name (C-refined only)
   ========================================================================= */

/* ── Shared substrate baseline ───────────────────────────────────────
   Tighter padding than v1.3, no Supports min-height. */
.ws-mc--substrate-spec,
.ws-mc--substrate-ledger,
.ws-mc--substrate-code {
  padding: 24px 26px 22px;
}

/* The supports row is unused in this variant family; reset its height. */
.ws-mc--substrate-spec  .ws-mc__supports,
.ws-mc--substrate-ledger .ws-mc__supports,
.ws-mc--substrate-code  .ws-mc__supports {
  display: none;
}

/* One-line role — sits between name and definition. Italic muted. */
.ws-mc__role {
  font-family: var(--ws-font-display);
  font-style: italic;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ws-ink-muted);
  margin: -8px 0 16px;
  letter-spacing: -0.005em;
}

/* =========================================================================
   VARIANT A · Spec-sheet  ( .ws-mc--substrate-spec )
   ----------------------------------------------------------------------
   Closest to the v1.3 patents-page shape. Keeps the gold LEFT rule and
   the anchor ID eyebrow. Replaces the Supports chip row with:
     • a "Primitives" manifest (mono inline, separator dots)
     • a "Deep technical block" cross-reference link (gold)
   Reads as: signed datasheet for one primitive in the foundation.
   ========================================================================= */

.ws-mc--substrate-spec .ws-mc__definition {
  margin-bottom: 18px;
}

.ws-mc--substrate-spec .ws-mc__mech-body {
  font-family: var(--ws-font-body);
  font-size: var(--ws-fs-body);
  line-height: var(--ws-lh-body);
  color: var(--ws-ink-muted);
  margin: 0 0 20px;
}

/* Primitives manifest — labeled section, mono inline list with dot seps. */
.ws-mc--substrate-spec .ws-mc__primitives {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--ws-rule-faint);
}

.ws-mc--substrate-spec .ws-mc__primitives-label {
  display: block;
  font-family: var(--ws-font-body);
  font-size: var(--ws-fs-label);
  font-weight: 500;
  color: var(--ws-ink-faint);
  text-transform: uppercase;
  letter-spacing: var(--ws-tracking-label);
  margin-bottom: 8px;
}

.ws-mc--substrate-spec .ws-mc__primitives-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  font-family: var(--ws-font-mono);
  font-size: var(--ws-fs-micro);
  line-height: 1.7;
  color: var(--ws-ink);
  letter-spacing: var(--ws-tracking-mono);
}

.ws-mc--substrate-spec .ws-mc__primitive {
  white-space: nowrap;
}

.ws-mc--substrate-spec .ws-mc__primitive + .ws-mc__primitive::before {
  content: "·";
  color: var(--ws-ink-faint);
  margin: 0 8px;
}

/* Cross-reference rail — small gold link at the very bottom. */
.ws-mc--substrate-spec .ws-mc__xref {
  margin-top: 16px;
  padding-top: 12px;
  border-top: var(--ws-rule-anchor) solid var(--ws-accent);
  font-family: var(--ws-font-body);
  font-size: var(--ws-fs-body-sm);
  color: var(--ws-ink-muted);
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.ws-mc--substrate-spec .ws-mc__xref-label {
  font-size: var(--ws-fs-label);
  font-weight: 500;
  color: var(--ws-ink-faint);
  text-transform: uppercase;
  letter-spacing: var(--ws-tracking-label);
}

.ws-mc--substrate-spec .ws-mc__xref a {
  color: var(--ws-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--ws-accent);
  font-weight: 500;
}
.ws-mc--substrate-spec .ws-mc__xref a:hover {
  color: var(--ws-accent-hover);
  border-bottom-color: var(--ws-accent-hover);
}


/* =========================================================================
   VARIANT B · Claim ledger  ( .ws-mc--substrate-ledger )
   ----------------------------------------------------------------------
   Drops the gold LEFT rule. Opens with a numbered claim header — a
   hairline rule across the top of the card carries the ordinal + role
   + anchor on a single mono row, like a spec datasheet header. Primitive
   list renders as a 2-column "key · gloss" table — claim primitive on
   left, half-sentence gloss on right, mono left / sans right.
   Reads as: a numbered substrate item from a claim chart.
   ========================================================================= */

.ws-mc--substrate-ledger {
  border: 1px solid var(--ws-rule);
  border-left-width: 1px;        /* override v1.3 gold left rule */
  border-left-color: var(--ws-rule);
  background: var(--ws-surface);
  padding: 0;                    /* header gets its own padding */
}

.ws-mc--substrate-ledger .ws-mc__anchor { display: none; }

/* Header strip — mono row at the top, hairline below. */
.ws-mc__ledger-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--ws-rule);
  background: var(--ws-surface-2);
  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;
}

.ws-mc__ledger-ord {
  color: var(--ws-accent);
  font-weight: 500;
}

.ws-mc__ledger-tag {
  color: var(--ws-ink-muted);
  font-weight: 500;
  letter-spacing: var(--ws-tracking-label);
}

.ws-mc__ledger-anchor {
  color: var(--ws-accent);
  font-weight: 500;
  text-decoration: none;
}

.ws-mc__ledger-anchor:hover { color: var(--ws-accent-hover); }

/* Body inside the ledger card */
.ws-mc--substrate-ledger .ws-mc__body-pad {
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ws-mc--substrate-ledger .ws-mc__name {
  margin-bottom: 4px;
}

.ws-mc--substrate-ledger .ws-mc__role {
  margin: 0 0 16px;
}

.ws-mc--substrate-ledger .ws-mc__definition {
  margin: 0 0 18px;
}

.ws-mc--substrate-ledger .ws-mc__mech-body {
  font-family: var(--ws-font-body);
  font-size: var(--ws-fs-body);
  line-height: var(--ws-lh-body);
  color: var(--ws-ink-muted);
  margin: 0 0 20px;
}

/* Primitive table — mono left, sans gloss right. */
.ws-mc--substrate-ledger .ws-mc__primitives {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--ws-rule-faint);
}

.ws-mc--substrate-ledger .ws-mc__primitives-label {
  display: block;
  font-family: var(--ws-font-body);
  font-size: var(--ws-fs-label);
  font-weight: 500;
  color: var(--ws-ink-faint);
  text-transform: uppercase;
  letter-spacing: var(--ws-tracking-label);
  margin-bottom: 10px;
}

.ws-mc--substrate-ledger .ws-mc__primitives-table {
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr;
  column-gap: 18px;
  row-gap: 4px;
  margin: 0;
  padding: 0;
}

.ws-mc--substrate-ledger .ws-mc__prim-key {
  font-family: var(--ws-font-mono);
  font-size: var(--ws-fs-micro);
  color: var(--ws-ink);
  letter-spacing: var(--ws-tracking-mono);
  line-height: 1.7;
  white-space: nowrap;
}

.ws-mc--substrate-ledger .ws-mc__prim-gloss {
  font-family: var(--ws-font-body);
  font-size: var(--ws-fs-body-sm);
  color: var(--ws-ink-muted);
  line-height: 1.55;
  margin: 0;
}

/* Cross-reference rail — gold rule + small caps. */
.ws-mc--substrate-ledger .ws-mc__xref {
  margin-top: 16px;
  padding-top: 12px;
  border-top: var(--ws-rule-anchor) solid var(--ws-accent);
  font-family: var(--ws-font-body);
  font-size: var(--ws-fs-body-sm);
  color: var(--ws-ink-muted);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.ws-mc--substrate-ledger .ws-mc__xref-label {
  font-size: var(--ws-fs-label);
  font-weight: 500;
  color: var(--ws-ink-faint);
  text-transform: uppercase;
  letter-spacing: var(--ws-tracking-label);
}
.ws-mc--substrate-ledger .ws-mc__xref a {
  color: var(--ws-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--ws-accent);
  font-weight: 500;
}
.ws-mc--substrate-ledger .ws-mc__xref a:hover {
  color: var(--ws-accent-hover);
}


/* =========================================================================
   VARIANT C · Compiled definition  ( .ws-mc--substrate-code )
   ----------------------------------------------------------------------
   Most technical register. The mechanism paragraph drops the serif lede
   and renders in body sans (matches the §1 IP-counsel-tolerant register).
   Primitives become a structured mono manifest — one per line with a
   fixed-width ordinal column (P1, P2, P3…). Cross-reference is a
   monospace footer chip rather than a sentence.
   Reads as: machine-readable substrate spec, IP-counsel datasheet.
   ========================================================================= */

.ws-mc--substrate-code {
  border: 1px solid var(--ws-rule);
  border-left: 2px solid var(--ws-accent);    /* keep gold left rule */
  background: var(--ws-surface);
}

.ws-mc--substrate-code .ws-mc__anchor {
  font-family: var(--ws-font-mono);
  font-size: var(--ws-fs-micro);
  color: var(--ws-accent);
  letter-spacing: var(--ws-tracking-mono);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.ws-mc--substrate-code .ws-mc__anchor::after {
  content: attr(data-tag);
  color: var(--ws-ink-faint);
  font-size: var(--ws-fs-micro);
}

.ws-mc--substrate-code .ws-mc__name {
  margin-bottom: 4px;
}

.ws-mc--substrate-code .ws-mc__role {
  margin: 0 0 16px;
  font-style: normal;
  font-family: var(--ws-font-body);
  font-size: var(--ws-fs-label);
  letter-spacing: var(--ws-tracking-label);
  text-transform: uppercase;
  color: var(--ws-accent);
  font-weight: 600;
}

/* Definition: SANS, weight 500, navy, looser leading. Reads as a spec
   sentence rather than an editorial lede. */
.ws-mc--substrate-code .ws-mc__definition {
  font-family: var(--ws-font-body);
  font-size: 15.5px;
  line-height: 1.6;
  font-weight: 500;
  color: var(--ws-ink);
  letter-spacing: 0;
  margin: 0 0 16px;
}

.ws-mc--substrate-code .ws-mc__mech-body {
  font-family: var(--ws-font-body);
  font-size: var(--ws-fs-body);
  line-height: var(--ws-lh-body);
  color: var(--ws-ink-muted);
  margin: 0 0 20px;
}

/* Primitives: structured manifest — fixed-width P1/P2/P3 ordinal column
   on the left; mono name on the right. Looks like a claim chart. */
.ws-mc--substrate-code .ws-mc__primitives {
  margin-top: auto;
  padding: 14px 0 0;
  border-top: 1px solid var(--ws-rule-faint);
}

.ws-mc--substrate-code .ws-mc__primitives-label {
  display: block;
  font-family: var(--ws-font-body);
  font-size: var(--ws-fs-label);
  font-weight: 500;
  color: var(--ws-ink-faint);
  text-transform: uppercase;
  letter-spacing: var(--ws-tracking-label);
  margin-bottom: 8px;
}

.ws-mc--substrate-code .ws-mc__primitives-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--ws-surface-2);
  border: 1px solid var(--ws-rule-faint);
  border-radius: 2px;
  padding: 10px 12px;
}

.ws-mc--substrate-code .ws-mc__primitive {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 4px 0;
  font-family: var(--ws-font-mono);
  font-size: var(--ws-fs-micro);
  letter-spacing: var(--ws-tracking-mono);
  color: var(--ws-ink);
  line-height: 1.5;
}

.ws-mc--substrate-code .ws-mc__primitive + .ws-mc__primitive {
  border-top: 1px dashed var(--ws-rule-faint);
}

.ws-mc--substrate-code .ws-mc__prim-ord {
  color: var(--ws-accent);
  font-weight: 500;
}

.ws-mc--substrate-code .ws-mc__prim-name {
  color: var(--ws-ink);
}

/* Cross-reference: monospace tag, gold rule on top, sits as a footer chip. */
.ws-mc--substrate-code .ws-mc__xref {
  margin-top: 14px;
  padding-top: 12px;
  border-top: var(--ws-rule-anchor) solid var(--ws-accent);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  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;
}

.ws-mc--substrate-code .ws-mc__xref-label {
  color: var(--ws-ink-faint);
}

.ws-mc--substrate-code .ws-mc__xref a {
  color: var(--ws-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--ws-accent);
  font-weight: 500;
}

.ws-mc--substrate-code .ws-mc__xref a:hover {
  color: var(--ws-accent-hover);
  border-bottom-color: var(--ws-accent-hover);
}


/* =========================================================================
   Section frame helpers — used to host a 3-up row of mechanism cards.
   These are local to the canvas preview; the page composition will
   provide its own section frame.
   ========================================================================= */

.ws-mech-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .ws-mech-row { grid-template-columns: 1fr; }
}

.ws-mech-row > .ws-mc { height: 100%; }

/* =========================================================================
   VARIANT C-refined · Compiled definition, pushed colder
   ( .ws-mc--substrate-coderef )
   ----------------------------------------------------------------------
   Refinements over .ws-mc--substrate-code:
     • whole card lives in sans 500 — no serif name (the serif name is the
       Universal-Ledger-Row signature; removing it widens the rhythm gap)
     • prose definition replaced by labeled <dl> spec rows
     • Primitives manifest is the visual centerpiece (inset bone surface,
       counted heading, slightly larger type)
     • mono spec header `§4.2.{N} · MECHANISM · Claim N · §X` — distinct
       from the Universals' `01 / 05` ord scheme
     • cross-reference rendered as `// xref` code-comment register
   ========================================================================= */

.ws-mc--substrate-coderef {
  border: 1px solid var(--ws-rule);
  border-left: 2px solid var(--ws-accent);
  background: var(--ws-paper);
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Spec header — IDE breadcrumb. */
.ws-mc--substrate-coderef .ws-mc__spec-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ws-font-mono);
  font-size: var(--ws-fs-micro);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ws-ink-faint);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ws-rule-faint);
}

.ws-mc--substrate-coderef .ws-mc__spec-num {
  color: var(--ws-accent);
  font-weight: 500;
}

.ws-mc--substrate-coderef .ws-mc__spec-kind {
  color: var(--ws-ink);
  font-weight: 500;
}

.ws-mc--substrate-coderef .ws-mc__spec-tag {
  margin-left: auto;
  color: var(--ws-ink-faint);
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}

/* Name — sans 500, not serif. F.QP code chip in mono before the name. */
.ws-mc--substrate-coderef .ws-mc__name--cold {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  font-family: var(--ws-font-body);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--ws-ink);
  letter-spacing: -0.005em;
}

.ws-mc--substrate-coderef .ws-mc__code {
  font-family: var(--ws-font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ws-accent);
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border: 1px solid var(--ws-rule-faint);
  border-radius: 2px;
  white-space: nowrap;
  flex: none;
}

.ws-mc--substrate-coderef .ws-mc__name-text {
  color: var(--ws-ink);
}

/* Spec rows — labeled key/value, dense, no prose paragraphs. */
.ws-mc--substrate-coderef .ws-mc__spec-list {
  margin: 0;
  display: grid;
  gap: 8px;
}

.ws-mc--substrate-coderef .ws-mc__spec-row {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  align-items: baseline;
}

.ws-mc--substrate-coderef .ws-mc__spec-row dt {
  font-family: var(--ws-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ws-ink-faint);
  padding-top: 2px;
}

.ws-mc--substrate-coderef .ws-mc__spec-row dd {
  margin: 0;
  font-family: var(--ws-font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ws-ink);
}

.ws-mc--substrate-coderef .ws-mc__deploys {
  font-family: var(--ws-font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--ws-ink-soft, var(--ws-ink));
  letter-spacing: 0;
}

/* Primitives centerpiece — inset bone panel, the visual core of the card. */
.ws-mc--substrate-coderef .ws-mc__primitives--centerpiece {
  margin-top: auto;
  background: var(--ws-bone, #f4efe6);
  border: 1px solid var(--ws-rule-faint);
  padding: 12px 14px 10px;
}

.ws-mc--substrate-coderef .ws-mc__primitives-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--ws-rule-faint);
}

.ws-mc--substrate-coderef .ws-mc__primitives-label {
  font-family: var(--ws-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ws-ink-faint);
}

.ws-mc--substrate-coderef .ws-mc__primitives-count {
  font-family: var(--ws-font-mono);
  font-size: 11px;
  color: var(--ws-accent);
  font-weight: 500;
}

.ws-mc--substrate-coderef .ws-mc__primitives-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.ws-mc--substrate-coderef .ws-mc__primitive {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  font-family: var(--ws-font-mono);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ws-ink);
  padding: 3px 0;
}

.ws-mc--substrate-coderef .ws-mc__primitive + .ws-mc__primitive {
  border-top: 1px dashed var(--ws-rule-faint);
}

.ws-mc--substrate-coderef .ws-mc__prim-ord {
  color: var(--ws-accent);
  font-weight: 500;
}

.ws-mc--substrate-coderef .ws-mc__prim-name {
  color: var(--ws-ink);
}

/* Cross-reference — code-comment register. */
.ws-mc--substrate-coderef .ws-mc__xref--comment {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-family: var(--ws-font-mono);
  font-size: 11.5px;
  padding-top: 10px;
  border-top: 1px solid var(--ws-rule-faint);
}

.ws-mc--substrate-coderef .ws-mc__xref-comment {
  color: var(--ws-ink-faint);
  font-style: normal;
}

.ws-mc--substrate-coderef .ws-mc__xref--comment a {
  color: var(--ws-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.ws-mc--substrate-coderef .ws-mc__xref--comment a:hover {
  color: var(--ws-accent-hover);
  border-bottom-color: var(--ws-accent-hover);
}
