/* What it is: an exploded architecture drawing, in the manner of a service drawing.
   The Pipeline is lifted above the Knowledge model, the model above its Storage; dash-dot
   assembly lines show where each part mounts. The Pipeline's face is its stage rail; the model's
   interfaces are ports along its top edge, and Security is a band under all of its modules; each
   module carries its facts on a leader line. From 1080px the drawing is one static SVG, generated
   with exact Inter metrics (tools/layout.js), with the same facts in a plain list for screen
   readers. On tablets (660px to 1079px) the same drawing is rebuilt in HTML so its text reflows
   (the second half of this file); phones have their own version (what-m.css). The drawing stays
   still, light and monochrome.
   Draft C: modules whose work an LLM agent does carry a small ink "agent" tag; the ports row is
   engraved FOR AGENTS; the Security band has a firmer outline than the modules it runs under. The
   key under the lede explains the tag and the jacks. */

/* The key under the lede: the agent tag and a jack, each with what it marks on the drawing. */
.wa-key { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 22px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.wa-key li { display: flex; align-items: flex-start; gap: 10px; }
.wa-key li > span:last-child { text-wrap: pretty; }
.wa-key b { font-weight: 600; color: var(--ink); margin-right: 4px; }
.wa-tag { flex: none; display: inline-block; margin-top: 1.5px; padding: 0 7px; border-radius: 9px; background: var(--ink); color: var(--screen); font-size: 11px; font-weight: 600; line-height: 17px; letter-spacing: 0.1px; }
.wa-jackg { flex: none; display: inline-block; width: 14px; height: 14px; margin-top: 3px; border: 1px solid rgba(28, 28, 26, 0.55); border-radius: 50%; background: radial-gradient(circle, #3a3a37 0 2.6px, var(--screen) 3.1px); }

.wa-fig { margin: 0; }
.wa-draw { display: block; width: 100%; height: auto; overflow: visible; }

.wa-draw * { vector-effect: non-scaling-stroke; }
.wa-draw text { font-family: var(--sans); font-feature-settings: "ss01", "cv11"; font-optical-sizing: auto; fill: var(--ink-2); }
.wa-draw .t-cell, .wa-draw .t-plate, .wa-draw .t-port { fill: var(--ink); }
.wa-draw .t-role, .wa-draw .t-kind { fill: #5f5e59; }

/* The housings: a front face a little darker than the page, a lighter top, a darker side. */
.wa-draw .unit path, .wa-draw .unit rect { stroke: rgba(28, 28, 26, 0.38); stroke-width: 1; stroke-linejoin: round; }
.wa-draw .unit .f-front { fill: #ecebe6; }
.wa-draw .unit .f-top { fill: #f1f0ec; }
.wa-draw .unit .f-side { fill: #e0dfd9; }
.wa-draw .unit.base .f-front { fill: #e6e5e0; }
.wa-draw .unit.base .f-top { fill: #eeede8; }
.wa-draw .unit.base .f-side { fill: #d9d8d2; }
.wa-draw .cell { fill: var(--screen); stroke: rgba(28, 28, 26, 0.2); stroke-width: 1; }
.wa-draw .hair { fill: none; stroke: rgba(28, 28, 26, 0.12); stroke-width: 1; }
.wa-draw .jack { fill: var(--screen); stroke: rgba(28, 28, 26, 0.5); stroke-width: 1; }
.wa-draw .jack-in { fill: #3a3a37; }
.wa-draw .footprint { fill: none; stroke: rgba(28, 28, 26, 0.2); stroke-width: 1; }
.wa-draw .hole { fill: #3a3a37; }
.wa-draw .pin { stroke: #3a3a37; stroke-width: 2; stroke-linecap: round; }
.wa-draw .cline { fill: none; stroke: rgba(28, 28, 26, 0.38); stroke-width: 1; stroke-dasharray: 9 3 1.5 3; }
/* The stage rail, engraved: stations joined by arrows */
.wa-draw .chain path, .wa-draw .chain circle { fill: none; stroke: #6c6b66; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.wa-draw .chain circle { fill: var(--screen); }

/* Callouts: a leader from a dot on the part to a thin bracket beside its facts. */
.wa-draw .leader, .wa-draw .bracket { fill: none; stroke: var(--ink); stroke-opacity: 0.42; stroke-width: 1; }
.wa-draw .anchor { fill: var(--ink); }

/* The agent tag, the engraved label over the ports, and the Security band's firmer outline. */
.wa-draw .tag rect { fill: var(--ink); stroke: none; }
.wa-draw .t-tag { fill: var(--screen); }
.wa-draw .t-lbl { fill: #5f5e59; }
.wa-draw .cell.sec { stroke: rgba(28, 28, 26, 0.55); }

/* Below 1080px the wide drawing would set its labels under 11px: the HTML versions take over. */
@media (max-width: 1079px) {
  .wa-wide { display: none; }
}

/* Type on the drawing (generated by tools/build.js with the metrics used for its layout) */
.wa-draw .t-fact { font-weight: 400; font-size: 13px; letter-spacing: 0px; }
.wa-draw .t-cell { font-weight: 600; font-size: 13px; letter-spacing: -0.08px; }
.wa-draw .t-plate { font-weight: 600; font-size: 15px; letter-spacing: -0.25px; }
.wa-draw .t-role { font-weight: 400; font-size: 13px; letter-spacing: 0px; }
.wa-draw .t-port { font-weight: 600; font-size: 11px; letter-spacing: 0px; }
.wa-draw .t-kind { font-weight: 400; font-size: 11px; letter-spacing: 0px; }
.wa-draw .t-menu { font-weight: 500; font-size: 11px; letter-spacing: 0px; }
.wa-draw .t-tag { font-weight: 600; font-size: 11px; letter-spacing: 0.1px; }
.wa-draw .t-lbl { font-weight: 600; font-size: 11px; letter-spacing: 0.99px; }

/* Tablets (660px to 1079px): the same drawing rebuilt in HTML so its text reflows. Three housings
   stacked as in the drawing, the Pipeline on top: the front face is a CSS box, the top and side
   faces are skewed pseudo-elements, and dash-dot assembly lines with pins join each housing to the
   one below. The Pipeline starts with its stage rail, the Knowledge model with its ports as a
   pinout; each module is a cell with its facts beneath it on a leader, as real text. Every fact of
   the wide drawing is here. This is also the accessible version at these widths, so the plain list
   steps aside. */

.wa-stack { display: none; }
@media (min-width: 660px) and (max-width: 1079px) {
  .wa-fig > .sr { display: none; }
  .wa-stack { display: block; }

  .wa-stack {
    --edge: #a2a19e;                  /* the housing stroke, rgba(28, 28, 26, 0.38) on the page */
    --hair: rgba(28, 28, 26, 0.12);
    --grey: #5f5e59;
    max-width: 880px;
    color: var(--ink-2);
  }
  .wa-stack ul, .wa-stack ol { list-style: none; }

  /* Housings: front face, top face receding up and right, side face. */
  .ws-unit { --dx: 20px; --dy: 13px; --front: #ecebe6; --top: #f1f0ec; --side: #e0dfd9; --in: 0px;
    position: relative; margin: var(--dy) calc(var(--dx) + var(--in)) 0 var(--in); padding: 20px 20px 24px;
    background: var(--front); border: 1px solid var(--edge); }
  .ws-unit::before, .ws-unit::after { content: ""; position: absolute; border: 1px solid var(--edge); }
  .ws-unit::before { left: -1px; right: -1px; bottom: calc(100% + 1px); height: var(--dy); border-bottom: 0;
    background: var(--top); transform-origin: 0 100%; transform: skewX(calc(0deg - atan2(var(--dx), var(--dy)))); }
  .ws-unit::after { left: calc(100% + 1px); top: -1px; bottom: -1px; width: var(--dx); border-left: 0;
    background: var(--side); transform-origin: 0 0; transform: skewY(calc(0deg - atan2(var(--dy), var(--dx)))); }
  .ws-pipe { --in: 40px; }
  .ws-model { --in: 16px; }
  .ws-base { --dx: 26px; --dy: 17px; --front: #e6e5e0; --top: #eeede8; --side: #d9d8d2; }

  /* Assembly lines: from pins under the upper housing to holes in the top face below. */
  .ws-mount { --in: 0px; --dx: 20px; --land: 8px; position: relative; z-index: 1; height: 56px; margin: 0 calc(var(--dx) + var(--in)) 0 var(--in); }
  .ws-mount i { position: absolute; top: 0; bottom: calc(0px - var(--land)); width: 1px;
    background: repeating-linear-gradient(to bottom, rgba(28, 28, 26, 0.42) 0 9px, transparent 9px 12px, rgba(28, 28, 26, 0.42) 12px 13.5px, transparent 13.5px 16.5px); }
  .ws-mount i:first-child { left: 20px; }
  .ws-mount i:last-child { right: 20px; }
  .ws-mount i::before { content: ""; position: absolute; top: -1px; left: -0.5px; width: 2px; height: 7.5px; border-radius: 1px; background: #3a3a37; }
  .ws-mount i::after { content: ""; position: absolute; bottom: -1.6px; left: -2.7px; width: 6.4px; height: 3.2px; border-radius: 50%; background: #3a3a37; }
  .ws-mount-1 { --in: 40px; }
  .ws-mount-2 { --in: 16px; --land: 10px; }

  /* Nameplates */
  .ws-plate { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; margin-bottom: 18px; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; color: var(--ink); }
  .ws-role { font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--grey); white-space: nowrap; }

  /* The stage rail: stations joined by arrows, a stage under each, in six equal columns */
  .ws-rail { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 2px 0 14px; border-bottom: 1px solid var(--hair);
    font-size: 12px; font-weight: 500; line-height: 15px; color: var(--ink-2); text-align: center; }
  .ws-rail::before { content: ""; position: absolute; top: 9px; left: calc(100% / 12); right: calc(100% / 12); border-top: 1px solid #6c6b66; }
  .ws-rail li { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 3px; text-wrap: balance; }
  .ws-st { position: relative; z-index: 1; width: 11px; height: 11px; margin: 2px 0 7px; border: 1px solid #6c6b66; border-radius: 50%; background: var(--screen); }
  .ws-rail li + li .ws-st::before { content: ""; position: absolute; right: calc(100% + 2px); top: 50%; margin-top: -3px; border-left: 4px solid #6c6b66; border-top: 3px solid transparent; border-bottom: 3px solid transparent; }

  /* Modules: a cell, and its facts on a leader beneath it */
  .ws-mods { display: grid; gap: 18px 16px; align-content: start; }
  .ws-rail + .ws-mods, .ws-ports + .ws-cols { margin-top: 20px; }
  .ws-pmods, .ws-bmods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-pmods { grid-template-rows: repeat(2, auto); grid-auto-flow: column; }
  .ws-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .ws-cell { position: relative; padding: 8px 12px 9px; background: var(--screen); border: 1px solid rgba(28, 28, 26, 0.2); border-radius: 3px;
    font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 20px; color: var(--ink); text-wrap: balance; }
  .ws-cell h4 { font: inherit; }
  /* A module an LLM agent works in: its "agent" tag at the right end of the cell */
  .ws-cell:has(.ws-tag) { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .ws-tag { flex: none; padding: 0 7px; border-radius: 9px; background: var(--ink); color: var(--screen); font-size: 11px; font-weight: 600; line-height: 17px; letter-spacing: 0.1px; }
  .ws-cell::after { content: ""; position: absolute; left: 12px; bottom: -3px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
  .ws-facts { position: relative; padding: 7px 0 0 28px; font-size: 14px; line-height: 19px; color: var(--ink-2); }
  .ws-facts::before { content: ""; position: absolute; left: 15px; top: 0; bottom: 5px; border-left: 1px solid rgba(28, 28, 26, 0.42); }
  .ws-facts li { padding-left: 10px; text-indent: -10px; text-wrap: pretty; }
  .ws-facts li + li { margin-top: 4px; }

  /* Ports: the agent-facing side, an engraved label and the interfaces as a pinout along the
     model's top, with the label's facts on a leader beneath it */
  .ws-portrow { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; column-gap: 18px; }
  .ws-lbl { position: relative; padding: 0 0 3px 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.09em; line-height: 16px; text-transform: uppercase; color: var(--grey); }
  .ws-lbl::after { content: ""; position: absolute; left: 12px; bottom: -6px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
  .ws-pfacts { padding-bottom: 16px; border-bottom: 1px solid var(--hair); }
  .ws-pfacts::before { top: -1px; bottom: 21px; }
  .ws-ports { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 12px 8px; padding: 4px 4px 0; text-align: center; }
  .ws-ports li { display: flex; flex-direction: column; align-items: center; line-height: 16px; }
  .ws-jack { width: 14px; height: 14px; margin-bottom: 5px; border: 1px solid rgba(28, 28, 26, 0.55); border-radius: 50%; background: radial-gradient(circle, #3a3a37 0 2.6px, var(--screen) 3.1px); }
  .ws-ports b { font-size: 12px; font-weight: 600; color: var(--ink); }
  .ws-kind { font-size: 11px; color: var(--grey); }

  /* Security: a band under both columns, with the envelope's fields written into its cell */
  .ws-band { margin-top: 18px; }
  .ws-band .ws-cell { padding-bottom: 0; border-color: rgba(28, 28, 26, 0.55); }
  .ws-band .ws-cell::after { z-index: 1; }
  .ws-holds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 9px -12px 0; border-top: 1px solid var(--hair); border-radius: 0 0 2px 2px; overflow: hidden; background: var(--hair);
    font-size: 12px; font-weight: 400; letter-spacing: 0; line-height: 16px; color: var(--grey); }
  .ws-holds li { padding: 6px 6px 7px 12px; background: var(--screen); }
}
/* Narrow tablets: shallower insets, so the modules' columns keep their facts on one line. */
@media (min-width: 660px) and (max-width: 819px) {
  .ws-unit { padding: 18px 16px 22px; }
  .ws-pipe, .ws-mount-1 { --in: 24px; }
  .ws-model, .ws-mount-2 { --in: 8px; }
  .ws-mount i:first-child { left: 16px; }
  .ws-mount i:last-child { right: 16px; }
}
/* From 760px the envelope's fields fit beside the band's name, as in the wide drawing. */
@media (min-width: 760px) and (max-width: 1079px) {
  .ws-band .ws-cell { display: flex; align-items: center; padding-bottom: 9px; }
  .ws-holds { display: flex; margin: 0 0 0 18px; border: 0; border-left: 1px solid var(--hair); }
  .ws-holds li { padding: 0 16px; }
}
