/* ==========================================================================
   THE LAYERS (Platform page, Rohit's #architecture diagram; 25 Nov, sketches)
   --------------------------------------------------------------------------
   Markup from scripts/platform-layers.mjs. Three looks share one set of parts:
     .layer          a layer: its head (a DM Mono name over a caption) and body
     .layer__tags    things it covers, as the outer loop's tags
     .layer__cards   things it does: a solid surface a step above, title + line
     .layer--adopted what you adopt with Unlock.ai: a Sage tint and edge, its
                     name in Sage (Rohit's shading)
   Between connected layers (teams down to the context engine) three short
   Sage lines take the place of his double-headed arrows.
   ========================================================================== */

.layers {
  --layer-surface: color-mix(in srgb, var(--heading) 4%, var(--ground));
  --layer-edge: color-mix(in srgb, var(--heading) 10%, var(--ground));
  --adopt-surface: color-mix(in srgb, var(--accent-text) 8%, var(--ground));
  --adopt-edge: color-mix(in srgb, var(--accent-text) 30%, var(--ground));
  --card-surface: color-mix(in srgb, var(--heading) 7%, transparent);
  --card-edge: color-mix(in srgb, var(--heading) 8%, transparent);
  --wire: color-mix(in srgb, var(--accent-text) 60%, transparent);
  --head-w: 208px;
  --rail-w: 248px;
  margin-top: var(--space-8);
}

/* ---------------------------------------------------------------- A LAYER */
.layer {
  position: relative;
  display: grid; grid-template-columns: var(--head-w) minmax(0, 1fr); gap: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border: var(--border-w) solid var(--layer-edge); border-radius: var(--r-box, 6px);
  background: var(--layer-surface);
}
.layer--adopted { border-color: var(--adopt-edge); background: var(--adopt-surface); }
.layer__head { min-width: 0; }
.layer__name {
  margin: 0;
  font: 500 var(--size-label)/1.4 var(--font-label); letter-spacing: var(--label-tracking); text-transform: uppercase;
  color: var(--heading);
}
.layer--adopted .layer__name { color: var(--accent-text); }
.layer__caption { margin: var(--space-1) 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-muted); text-wrap: pretty; }

.layer__body { display: grid; gap: var(--space-4); align-content: center; min-width: 0; }
.layer__body--split { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--space-5); align-items: start; }
.layer__part-label {
  display: block; margin-bottom: var(--space-2);
  font: 500 var(--size-label)/1.4 var(--font-label); letter-spacing: var(--label-tracking); text-transform: uppercase;
  color: var(--ink-muted);
}

.layer__tags { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-1); margin: 0; padding: 0; list-style: none; }
.layer__tags li {
  padding: 0 var(--space-2);
  border: var(--border-w) solid color-mix(in srgb, var(--heading) 14%, transparent); border-radius: var(--r-box, 6px);
  font-size: 12px; line-height: 24px; white-space: nowrap; color: var(--ink);
}

.layer__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(152px, 1fr)); gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.layer__body--split .layer__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layer__cards li {
  display: grid; align-content: start; gap: 2px;
  padding: var(--space-3);
  border: var(--border-w) solid var(--card-edge); border-radius: var(--r-box, 6px);
  background: var(--card-surface);
}
.layer__cards b { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--heading); }
.layer__cards span { font-size: 14px; line-height: 1.4; color: var(--ink-muted); text-wrap: pretty; }
/* Your coding agents: beside Unlock.ai, not part of it — dashed, no fill. */
.layer__cards .layer__beside { background: none; border: var(--border-w) dashed color-mix(in srgb, var(--heading) 26%, transparent); }

/* The wires: three short Sage lines across the gap above each connected
   layer (his double-headed arrows), over the body's width. */
.layers--stack .layer--adopted::before,
:is(.layers--zones, .layers--rows, .layers--chips) .layers__frame::before {
  content: ''; position: absolute; bottom: 100%; height: var(--space-4);
  left: calc(var(--space-5) + var(--head-w) + var(--space-5)); right: var(--space-5);
  margin-bottom: var(--border-w);
  background:
    linear-gradient(var(--wire), var(--wire)) 16.6% 0 / 1px 100% no-repeat,
    linear-gradient(var(--wire), var(--wire)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--wire), var(--wire)) 83.3% 0 / 1px 100% no-repeat;
}

/* ------------------------------------------------------------ GOVERNANCE */
.layers__governance {
  padding: var(--space-4) var(--space-5);
  border: var(--border-w) solid var(--layer-edge); border-radius: var(--r-box, 6px);
  background: var(--layer-surface);
}
.layers__governance ul { display: grid; gap: var(--space-3); margin: var(--space-5) 0 0; padding: 0; list-style: none; }
.layers__governance li, .layer-map__governance li { display: flex; align-items: flex-start; gap: var(--space-2); font-size: 14px; line-height: 1.4; color: var(--ink); }
.layers__governance .icon, .layer-map__governance .icon { --icon-size: 16px; flex: none; margin-top: 1px; color: var(--ink-muted); }

.layers__legend { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: 12px; line-height: 1.5; color: var(--ink-muted); }
.layers__swatch { flex: none; width: 12px; height: 12px; border: var(--border-w) solid var(--adopt-edge); border-radius: 2px; background: var(--adopt-surface); }

/* =========================================================== A. THE STACK */
.layers--stack { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-w); gap: var(--space-4) var(--space-3); }
.layers--stack .layers__stack { display: contents; }
.layers--stack .layer { grid-column: 1; }
.layers--stack .layers__governance { grid-column: 2; grid-row: 2 / 7; }   /* interfaces down to the models */
.layers--stack .layers__legend { grid-column: 1 / -1; }

/* ========================================================== B. THREE ZONES */
:is(.layers--zones, .layers--rows, .layers--chips) { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-w); gap: var(--space-4) var(--space-3); }
:is(.layers--zones, .layers--rows, .layers--chips) > .layer, .layers__frame, .layers__below { grid-column: 1; }
:is(.layers--zones, .layers--rows, .layers--chips) .layers__governance { grid-column: 2; grid-row: 2 / 4; }
:is(.layers--zones, .layers--rows, .layers--chips) .layers__legend { grid-column: 1 / -1; }
.layers__frame { position: relative; border: var(--border-w) solid var(--adopt-edge); border-radius: var(--r-box, 6px); background: var(--adopt-surface); }
.layers__frame .layer { border: 0; border-radius: 0; background: none; }
.layers__frame .layer + .layer { border-top: var(--border-w) solid color-mix(in srgb, var(--accent-text) 16%, var(--ground)); }
.layers__below { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.layers__below .layer { --head-w: 168px; }

/* ===================================================== C. OVERVIEW + DETAIL */
.layers--map { display: grid; gap: var(--space-4); }
.layer-map { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: var(--space-6); align-items: stretch; }
.layer-map__nav { display: grid; grid-template-columns: minmax(0, 1fr) 56px; grid-auto-rows: minmax(52px, auto); gap: var(--space-2); align-content: start; }
.layer-map__slab {
  position: relative; grid-column: 1;
  display: flex; align-items: center; padding: 0 var(--space-4);
  border: var(--border-w) solid var(--layer-edge); border-radius: var(--r-box, 6px);
  background: var(--layer-surface);
  font: inherit; text-align: left; cursor: pointer;
  transition: border-color var(--motion-base) var(--motion-ease), background-color var(--motion-base) var(--motion-ease);
}
.layer-map__slab.layer--adopted { border-color: var(--adopt-edge); background: var(--adopt-surface); }
.layer-map__slab--teams { grid-row: 1; }
.layer-map__slab--interfaces { grid-row: 2; }
.layer-map__slab--workflows { grid-row: 3; }
.layer-map__slab--harness { grid-row: 4; }
.layer-map__slab--context { grid-row: 5; }
.layer-map__slab--models { grid-row: 6; }
.layer-map__slab--systems { grid-row: 7; }
.layer-map__slab--governance { grid-column: 2; grid-row: 2 / 7; justify-content: center; padding: var(--space-4) 0; }
.layer-map__slab--governance .layer__name { writing-mode: vertical-rl; rotate: 180deg; }
.layer-map__slab.layer--adopted:not(.layer-map__slab--interfaces)::before,
.layer-map__slab--interfaces::before {
  content: ''; position: absolute; bottom: 100%; left: 25%; right: 25%; height: var(--space-2); margin-bottom: var(--border-w);
  background:
    linear-gradient(var(--wire), var(--wire)) 0 0 / 1px 100% no-repeat,
    linear-gradient(var(--wire), var(--wire)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--wire), var(--wire)) 100% 0 / 1px 100% no-repeat;
}
@media (hover: hover) { .layer-map__slab:hover { border-color: color-mix(in srgb, var(--heading) 30%, var(--ground)); } }
.layer-map__slab[aria-selected="true"] { border-color: var(--accent-text); background: color-mix(in srgb, var(--accent-text) 14%, var(--ground)); }
.layer-map__slab[aria-selected="true"] .layer__name { color: var(--heading); }
.layer-map__slab:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.layer-map__panels { display: grid; }
.layer-map__panel {
  display: grid; align-content: start; gap: var(--space-6);
  padding: var(--space-6);
  border: var(--border-w) solid var(--layer-edge); border-radius: var(--r-box, 6px);
  background: var(--layer-surface);
}
.layer-map__panel.layer--adopted { border-color: var(--adopt-edge); background: var(--adopt-surface); }
.layer-map__panel .layer__caption { margin-top: var(--space-2); font: 500 var(--size-h3)/1.15 var(--font-display); letter-spacing: -0.02em; color: var(--heading); max-width: 24em; }
.layer-map__panel .layer__body--split { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
.layer-map__panel .layer__cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.layer-map__panel .layer__tags li { font-size: 14px; line-height: 32px; padding: 0 var(--space-3); }
.layer-map__governance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-6); margin: 0; padding: 0; list-style: none; }
.layer-map__governance li { font-size: 16px; }
.layer-map__governance .icon { --icon-size: 20px; }
/* With the script, the panels share one cell, so the block keeps one height. */
.layer-map.is-ready .layer-map__panels > * { grid-area: 1 / 1; transition: opacity var(--motion-base) var(--motion-ease); }
.layer-map.is-ready .layer-map__panel[data-hidden] { visibility: hidden; opacity: 0; }


/* ================================================= D. ROWS · E. NAMES ONLY
   (25 Nov, user: "A and B, design wise are still very big"). B's zones made
   compact: smaller heads and padding, each group's label inline before its
   items, the models and your systems on one row. */
:is(.layers--rows, .layers--chips) { --head-w: 192px; --rail-w: 216px; gap: var(--space-3); }
:is(.layers--rows, .layers--chips) .layer { gap: var(--space-4); padding: var(--space-3) var(--space-4); align-items: center; }
:is(.layers--rows, .layers--chips) .layer__caption { font-size: 12px; line-height: 1.45; }
:is(.layers--rows, .layers--chips) .layer__body--split { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
:is(.layers--rows, .layers--chips) .layer__part { display: flex; align-items: flex-start; gap: var(--space-3); }
:is(.layers--rows, .layers--chips) .layer__part-label { flex: none; width: 80px; margin: 0; font-size: 11px; line-height: 1.45; padding-top: 4px; }
:is(.layers--rows, .layers--chips) .layer__part > ul { flex: 1; min-width: 0; }
:is(.layers--rows, .layers--chips) .layers__frame::before { left: calc(var(--space-4) + var(--head-w) + var(--space-4)); right: var(--space-4); height: var(--space-3); }
:is(.layers--rows, .layers--chips) .layers__below .layer { --head-w: 152px; }
:is(.layers--rows, .layers--chips) .layers__governance { padding: var(--space-3) var(--space-4); }
:is(.layers--rows, .layers--chips) .layers__governance ul { gap: var(--space-2); margin-top: var(--space-4); }
:is(.layers--rows, .layers--chips) .layers__governance li { font-size: 12px; line-height: 1.5; }

/* D: each item a column on a hairline, no box. */
.layers--rows .layer__cards { grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); gap: var(--space-4); }
.layers--rows .layer__body--split .layer__cards { grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); }
.layers--rows .layer__cards li { padding: 0 0 0 var(--space-3); border: 0; border-left: var(--border-w) solid color-mix(in srgb, var(--heading) 16%, transparent); border-radius: 0; background: none; }
.layers--rows .layer--adopted .layer__cards li { border-left-color: color-mix(in srgb, var(--accent-text) 40%, transparent); }
.layers--rows .layer__cards b { font-size: 14px; line-height: 1.35; }
.layers--rows .layer__cards span { font-size: 12px; line-height: 1.4; }
.layers--rows .layer__cards .layer__beside { border-left-style: dashed; }

/* E: each card by name only, a filled box beside the outlined tags (the
   tags say what a layer covers, the boxes what it does); its line shows in a
   small inverted note on hover, focus or tap. */
.layers--chips .layer__cards { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-1); }
.layers--chips .layer__cards li { position: relative; display: block; padding: 0 var(--space-3); border-radius: var(--r-box, 6px); cursor: default; outline: none; transition: border-color var(--motion-base) var(--motion-ease); }
.layers--chips .layer__cards b { display: block; font-size: 14px; line-height: 30px; white-space: nowrap; }
.layers--chips .layer__cards span {
  position: absolute; z-index: 2; bottom: calc(100% + var(--space-2)); left: 0;
  width: max-content; max-width: 240px; padding: var(--space-2) var(--space-3);
  border-radius: var(--r-box, 6px);
  background: color-mix(in srgb, var(--heading) 94%, var(--ground)); color: var(--ground);
  font-size: 12px; line-height: 1.4;
  opacity: 0; translate: 0 4px; pointer-events: none;
  transition: opacity var(--motion-base) var(--motion-ease), translate var(--motion-base) var(--motion-ease);
}
.layers--chips .layer__cards li:last-child span { left: auto; right: 0; }
.layers--chips .layer__cards li:is(:hover, :focus) { border-color: var(--accent-text); }
.layers--chips .layer__cards li:is(:hover, :focus) span { opacity: 1; translate: 0 0; }
@media (max-width: 767px) {
  :is(.layers--rows, .layers--chips) .layer__part { flex-direction: column; gap: var(--space-2); }
  :is(.layers--rows, .layers--chips) .layer__part > ul { width: 100%; }
  .layers--rows .layer__cards, .layers--rows .layer__body--split .layer__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .layers--chips .layer__cards span { max-width: min(240px, 70vw); }
}

/* ------------------------------------------------------------- SMALLER */
@media (max-width: 1279px) {
  .layers { --head-w: 168px; --rail-w: 216px; }
}
@media (max-width: 1023px) {
  /* one column, Governance between the models and your systems (his phone order) */
  .layers--stack, :is(.layers--zones, .layers--rows, .layers--chips) { display: flex; flex-direction: column; gap: var(--space-4); }
  .layers__below { display: contents; }
  .layers--stack .layer--systems, :is(.layers--zones, .layers--rows, .layers--chips) .layer--systems { order: 2; }
  .layers__governance { order: 1; }
  .layers__legend { order: 3; }
  .layer-map { grid-template-columns: minmax(0, 1fr); }
  .layer-map__nav { display: none; }
  .layer-map.is-ready .layer-map__panels > * { grid-area: auto; }
  .layer-map__panels { gap: var(--space-3); }
  .layer-map.is-ready .layer-map__panel[data-hidden] { visibility: visible; opacity: 1; }
  .layer-map__panel { padding: var(--space-5); gap: var(--space-5); }
}
@media (max-width: 767px) {
  .layer { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .layer__body--split { grid-template-columns: minmax(0, 1fr); }
  .layers--stack .layer--adopted::before, :is(.layers--zones, .layers--rows, .layers--chips) .layers__frame::before { left: 25%; right: 25%; }
  .layers__governance ul { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   F. TIERS (on the page; 25 Nov, user: "lets build it in databricks style,
   please dont skip content much"). After Databricks' platform stack: each
   layer one bordered row, its name and caption at the left, its boxes as an
   icon tile, a name and Rohit's line, no box round each. Adopted layers keep
   the Sage tint and edge, their icons Sage; the rest neutral.
   ========================================================================== */
.layers--tiers { --head-w: 232px; display: grid; gap: var(--space-4); }
.layer-tiers { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }

.layer-tier {
  display: grid; grid-template-columns: var(--head-w) minmax(0, 1fr); gap: var(--space-6); align-items: center;
  padding: var(--space-4) var(--space-6);
  border: var(--border-w) solid var(--layer-edge); border-radius: var(--r-box, 6px);
  background: var(--layer-surface);
}
.layer-tier--adopted { border-color: var(--adopt-edge); background: var(--adopt-surface); }
.layer-tier__name { margin: 0; font: 500 20px/1.2 var(--font-display); letter-spacing: -0.02em; color: var(--heading); }
.layer-tier__caption { margin: var(--space-1) 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-muted); text-wrap: pretty; }
.layer-tier__body { display: grid; gap: var(--space-4); min-width: 0; }

/* A box: icon tile, name, line. */
.layer-tier__items { display: grid; grid-template-columns: repeat(var(--items, 4), minmax(0, 1fr)); gap: var(--space-4) var(--space-5); margin: 0; padding: 0; list-style: none; }
.layer-tier--interfaces .layer-tier__items { grid-template-columns: repeat(var(--items), minmax(0, 1fr)) minmax(0, 1fr); }
.layer-item { display: flex; align-items: flex-start; gap: var(--space-3); min-width: 0; }
.layer-item__icon {
  flex: none; box-sizing: border-box; width: 32px; height: 32px; padding: var(--space-2);
  border-radius: var(--r-box, 6px);
  background: color-mix(in srgb, var(--heading) 6%, transparent);
  fill: var(--ink-muted);
}
.layer-tier--adopted .layer-item__icon { background: color-mix(in srgb, var(--accent-text) 12%, transparent); fill: var(--accent-text); }
.layer-item__text { display: grid; gap: 2px; min-width: 0; padding-top: 6px; }
.layer-item__name { font-size: 14px; font-weight: 500; line-height: 1.45; color: var(--heading); }
.layer-item__line { font-size: 12px; line-height: 1.5; color: var(--ink-muted); text-wrap: pretty; }
/* Your coding agents: beside Unlock.ai, not part of it — after a hairline,
   its tile dashed and unfilled. */
.layer-item--beside { position: relative; padding-left: var(--space-5); }
.layer-item--beside::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; border-left: var(--border-w) solid var(--adopt-edge); }
.layer-tier--adopted .layer-item--beside .layer-item__icon { background: none; outline: var(--border-w) dashed color-mix(in srgb, var(--heading) 26%, transparent); outline-offset: -1px; fill: var(--ink-muted); }

/* Workflows: two panels, a step above the row. */
.layer-tier__groups { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-3); }
.layer-tier__group {
  display: grid; align-content: start; gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--r-box, 6px);
  background: color-mix(in srgb, var(--heading) 5%, transparent);
}
.layer-tier__groups .layer-tier__items { grid-template-columns: repeat(var(--items), minmax(0, 1fr)); }
.layer-tier__group-label { font: 500 var(--size-label)/1.4 var(--font-label); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); }

/* Context engine: "Knows about" as a ruled line under its boxes. */
.layer-tier__line { display: flex; align-items: center; gap: var(--space-3); padding-top: var(--space-4); border-top: var(--border-w) solid var(--adopt-edge); }
.layer-tier__line .layer-tier__group-label { flex: none; }

/* Governance: names only, three to a line so each name holds one line. */
.layer-tier__items--governance { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layer-tier__items--governance .layer-item { align-items: center; }
.layer-tier__items--governance .layer-item__text { padding-top: 0; }

/* Under 1280 the name and caption stand over the row, so the boxes keep the
   full width and a row of five stays one row down to tablets. */
@media (max-width: 1279px) {
  .layer-tier { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; padding: var(--space-5); }
  .layer-tier__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); }
  .layer-tier__caption { margin: 0; }
}
@media (max-width: 1023px) {
  .layer-tier__items, .layer-tier--interfaces .layer-tier__items { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .layer-item--beside { padding-left: 0; }
  .layer-item--beside::before { display: none; }
  .layer-tier__groups { grid-template-columns: minmax(0, 1fr); }
  .layer-tier__line { flex-wrap: wrap; }
}
@media (max-width: 767px) {
  .layer-tier { padding: var(--space-4); }
  .layer-tier__head { display: block; }
  .layer-tier__caption { margin-top: var(--space-1); }
  .layer-tier__items, .layer-tier--interfaces .layer-tier__items, .layer-tier__groups .layer-tier__items, .layer-tier__items--governance { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .layer-tier__line { display: grid; gap: var(--space-2); }
}

/* ==========================================================================
   G. SLIM TIERS (on the page; 25 Nov, user: "ours is still very big bro").
   F with every word kept, tighter: icons inline before the names, no tiles;
   smaller heads; Workflows without panels; Governance one strip; the models
   and your systems share the last row.
   ========================================================================== */
.layers--slim { --head-w: 200px; gap: var(--space-3); }
.layers--slim .layer-tier { gap: var(--space-5); padding: var(--space-3) var(--space-5); }
.layers--slim .layer-tier__name { font-size: 16px; line-height: 1.3; }
.layers--slim .layer-tier__caption { margin-top: 2px; font-size: 12px; line-height: 1.45; }
.layers--slim .layer-tier__body { gap: var(--space-3); }
.layers--slim .layer-tier__items { gap: var(--space-2) var(--space-5); }
.layers--slim .layer-item { gap: var(--space-2); }
.layers--slim .layer-item__icon { width: 16px; height: 16px; padding: 0; margin-top: 2px; background: none; }
.layers--slim .layer-tier--adopted .layer-item__icon { background: none; }
.layers--slim .layer-item__text { gap: 0; padding-top: 0; }
.layers--slim .layer-item__name { line-height: 20px; }
.layers--slim .layer-item__line { line-height: 18px; }
.layers--slim .layer-tier--adopted .layer-item--beside .layer-item__icon { outline: none; }
.layers--slim .layer-item--beside .layer-item__name { color: var(--ink); }

/* Workflows: the two parts side by side, split by a hairline, no panels. */
.layers--slim .layer-tier__groups { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-5); }
.layers--slim .layer-tier__group { gap: var(--space-2); padding: 0; background: none; }
.layers--slim .layer-tier__group + .layer-tier__group { padding-left: var(--space-5); border-left: var(--border-w) solid var(--adopt-edge); }
.layers--slim .layer-tier__line { padding-top: var(--space-3); }

/* Governance: one strip of names. */
.layers--slim .layer-tier__items--governance { display: grid; grid-template-columns: repeat(3, max-content); gap: var(--space-2) var(--space-7); }
.layers--slim .layer-tier__items--governance .layer-item__name { font-weight: 400; color: var(--ink); }
.layers--slim .layer-tier__items--governance .layer-item__icon { margin-top: 0; }

/* The models and your systems, one row of two. */
.layer-tiers__pair { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--space-2); }
.layers--slim .layer-tiers__pair .layer-tier { --head-w: 168px; }

/* Slim keeps the name at the left down to 1024, a narrower column. */
@media (max-width: 1279px) and (min-width: 1024px) {
  .layers--slim { --head-w: 152px; }
  .layers--slim .layer-tier { grid-template-columns: var(--head-w) minmax(0, 1fr); gap: var(--space-4); align-items: center; padding: var(--space-3) var(--space-4); }
  .layers--slim .layer-tier__head { display: block; }
  .layers--slim .layer-tier__caption { margin-top: 2px; }
  .layers--slim .layer-tiers__pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .layers--slim .layer-tiers__pair .layer-tier { --head-w: 152px; }
}
@media (max-width: 1023px) {
  .layers--slim .layer-tier { padding: var(--space-4); gap: var(--space-3); }
  .layer-tiers__pair { grid-template-columns: minmax(0, 1fr); }
  .layers--slim .layer-tier__groups { grid-template-columns: minmax(0, 1fr); }
  .layers--slim .layer-tier__group + .layer-tier__group { padding: var(--space-3) 0 0; border-left: 0; border-top: var(--border-w) solid var(--adopt-edge); }
}
@media (max-width: 1023px) {
  .layers--slim .layer-tier__items--governance { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-2) var(--space-4); }
}

/* ==========================================================================
   H. ISOMETRIC STACK (on the page; 25 Nov, six rounds with the user — the
   brief is in scripts/platform-layers.mjs). One composition:

     .layer-iso__stack       the scene: seven plates, their names at the
                             left, the wires, the coding-agents plate and
                             the Governance bracket at the right
     .layer-iso__panels      the chosen layer's panel, centred on the scene
     .layer-iso__governance  Governance's caption and six, a strip under both

   Geometry. Every plate measure is in px times --k, the scene's scale (1;
   1.25 from 1536px). A plate's top face is a 320 × 160 diamond, 12 thick,
   in a 320 × 172 box; its left corner is at (0, 86), its right at
   (320, 86); plates sit 58 apart, all seven the same.

   The stack opens where you point (from 1280px): the chosen plate lifts
   --lift and every plate under it steps down --open, so its caption has
   room. Whatever belongs to a plate is inside its button and moves with
   it; the wires and the bracket's line stretch (scaleY) to keep meeting
   their ends.

   Colour: plates a step above the band (neutral) or in the Sage tint (what
   you adopt); the chosen one lit Sage, as any selected state on the site.
   Wires are diagram wires, lit Sage. No Ember: nobody decides here.

   Motion (after Emil Kowalski's rules): transform and opacity only, as
   transitions, so a sweep down the stack retargets mid-move; the long
   ease-out (--motion-ease-out) on what enters, exits shorter than
   entrances; a press answers; arrow keys switch at once (data-instant,
   layers.js); reduced motion keeps the fades and drops the movement.
   ========================================================================== */
.layers--iso { display: grid; gap: var(--space-6); }
.layer-iso {
  --k: 1;
  --lift: 8;    /* px the chosen plate rises */
  --open: 16;   /* px the plates under it step down */
  --iso-ease: var(--motion-ease-out);
  --iso-move: 280ms;
  --iso-line: color-mix(in srgb, var(--heading) 10%, transparent);
  --names: 216px;   /* the column of layer names at the scene's left */
  /* The section head's own grid (index.html: two equal columns, the same
     gap), so the scene sits under the heading from the band's left edge and
     the panel starts where the lede starts (25 Nov, user: "we are still not
     utilizing the left side … the heading and the lede, a similar approach
     here, so the section layout looks proper"). */
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center;
}

/* ------------------------------------------------------------ THE SCENE */
.layer-iso__stack { position: relative; width: calc(320px * var(--k)); height: calc(520px * var(--k) + 16px); margin: var(--space-2) 0 0 var(--names); }

.layer-iso__plate {
  position: absolute; left: 0; top: calc(var(--i) * 58px * var(--k)); z-index: calc(7 - var(--i));
  width: calc(320px * var(--k)); height: calc(172px * var(--k)); padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  pointer-events: none;   /* only its faces and its name take the pointer, not the box round them */
  transition: transform var(--iso-move) var(--iso-ease), translate 500ms var(--iso-ease), opacity 400ms var(--motion-ease);
}
.layer-iso__plate:focus-visible { outline: none; }
.layer-iso__art { display: block; width: 100%; height: 100%; overflow: visible; }
.layer-iso__art path { pointer-events: auto; stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill var(--motion-base) ease, stroke var(--motion-base) ease; }
.layer-iso__top { fill: color-mix(in srgb, var(--heading) 7%, var(--ground)); stroke: color-mix(in srgb, var(--heading) 22%, var(--ground)); }
.layer-iso__side { fill: color-mix(in srgb, var(--heading) 4%, var(--ground)); stroke: color-mix(in srgb, var(--heading) 16%, var(--ground)); }
.layer-iso__side--right { fill: color-mix(in srgb, var(--heading) 2%, var(--ground)); }
.layer-iso__plate--adopted .layer-iso__top { fill: color-mix(in srgb, var(--accent-text) 13%, var(--ground)); stroke: color-mix(in srgb, var(--accent-text) 45%, var(--ground)); }
.layer-iso__plate--adopted .layer-iso__side { fill: color-mix(in srgb, var(--accent-text) 8%, var(--ground)); stroke: color-mix(in srgb, var(--accent-text) 32%, var(--ground)); }
.layer-iso__plate--adopted .layer-iso__side--right { fill: color-mix(in srgb, var(--accent-text) 5%, var(--ground)); }
.layer-iso__plate:focus-visible .layer-iso__top { stroke: var(--accent-text); stroke-width: 2; }
@media (hover: hover) and (pointer: fine) {
  .layer-iso__plate:not([aria-selected="true"]):hover .layer-iso__top { stroke: color-mix(in srgb, var(--accent-text) 70%, var(--ground)); }
}

/* Names: a column from the band's left edge (under the heading), each on
   a hairline that runs to its plate's left corner; the caption under the
   name, for the chosen layer only. */
.layer-iso__label {
  position: absolute; right: calc(100% + var(--space-2)); top: calc(86px * var(--k) - 12px); width: calc(var(--names) - var(--space-2));
  display: grid; grid-template-columns: max-content minmax(var(--space-4), 1fr); column-gap: var(--space-3); align-items: center;
  pointer-events: auto;
  transition: transform var(--iso-move) var(--iso-ease);
}
.layer-iso__label::after { content: ''; grid-area: 1 / 2; border-top: var(--border-w) solid color-mix(in srgb, var(--heading) 24%, transparent); transition: border-color var(--motion-base) ease; }
.layer-iso__label b { font-size: 16px; font-weight: 500; line-height: 24px; white-space: nowrap; color: var(--ink); transition: color var(--motion-base) ease; }
.layer-iso__label span {
  grid-column: 1 / -1; max-width: 184px;
  font-size: 12px; line-height: 16px; color: var(--ink-muted); text-wrap: pretty;
  opacity: 0; transform: translateY(-4px);
  transition: opacity var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}
@media (hover: hover) and (pointer: fine) { .layer-iso__plate:hover .layer-iso__label b { color: var(--heading); } }

/* Wires: from a plate's right corner down to the next one's (his arrows;
   teams to the context engine). The line is a pseudo-element so it can
   stretch (--d, in px) without squashing the dot at its head; the dot it
   lands on belongs to the plate below. */
.layer-iso__wire, .layer-iso__node { position: absolute; left: calc(320px * var(--k)); pointer-events: none; }
.layer-iso__wire { top: calc(93px * var(--k)); height: calc(45px * var(--k)); width: 0; }
.layer-iso__wire::before {
  content: ''; position: absolute; left: 0; top: 0; height: 100%; border-left: var(--border-w) solid var(--wire);
  transform-origin: 0 0; transform: scaleY(calc((45 * var(--k) + var(--d, 0)) / (45 * var(--k))));
  transition: transform var(--iso-move) var(--iso-ease);
}
.layer-iso__wire::after, .layer-iso__node::after { content: ''; position: absolute; left: -2px; top: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-text); }
.layer-iso__node { top: calc(80px * var(--k)); }

/* Your coding agents: level with Interfaces and tied to its right corner
   by a dashed line — beside Unlock.ai, not part of it, so the name in a
   dashed, unfilled tag (the dashed iso plate it rode on went 25 Nov, user:
   "do we need the shape up top?"). The tag starts where the Governance
   name starts, so everything right of the stack keeps one left edge
   (25 Nov, user: "needs better position"); its line shows only while
   Interfaces is chosen, like every caption in the scene (the Interfaces
   card always carries it). */
.layer-iso__beside { position: absolute; left: calc(320px * var(--k) + 32px); top: calc(80px * var(--k) - 13px); width: 150px; display: grid; justify-items: start; gap: var(--space-2); pointer-events: none; }
.layer-iso__beside::before { content: ''; position: absolute; right: 100%; top: 13px; width: 28px; border-top: var(--border-w) dashed color-mix(in srgb, var(--heading) 36%, transparent); }
.layer-iso__beside b { font-size: 12px; font-weight: 500; line-height: 24px; padding: 0 var(--space-2); border: var(--border-w) dashed color-mix(in srgb, var(--heading) 36%, transparent); border-radius: 6px; white-space: nowrap; color: var(--ink); }
.layer-iso__beside span { font-size: 12px; line-height: 16px; color: var(--ink-muted); }

/* Governance: a bracket from under Interfaces' corner to under Models'
   (230 units), its name along it. Its top and its line ride on Interfaces,
   its foot on Models; the line stretches by --bd as the stack opens. */
.layer-iso__bracket { --bracket: color-mix(in srgb, var(--heading) 30%, transparent); position: absolute; left: calc(320px * var(--k) + 16px); pointer-events: none; transition: border-color var(--motion-base) ease; }
.layer-iso__bracket--top, .layer-iso__bracket--foot { width: 8px; height: 4px; border-right: var(--border-w) solid var(--bracket); }
.layer-iso__bracket--top { top: calc(94px * var(--k)); border-top: var(--border-w) solid var(--bracket); border-top-right-radius: 3px; }
.layer-iso__bracket--foot { top: calc(92px * var(--k) - 4px); border-bottom: var(--border-w) solid var(--bracket); border-bottom-right-radius: 3px; }
.layer-iso__bracket--line {
  top: calc(94px * var(--k) + 4px); height: calc(230px * var(--k) - 8px); width: 8px; border-right: var(--border-w) solid var(--bracket);
  transform-origin: 0 0; transform: scaleY(calc((230 * var(--k) - 8 + var(--bd, 0)) / (230 * var(--k) - 8)));
  transition: transform var(--iso-move) var(--iso-ease), border-color var(--motion-base) ease;
}
.layer-iso__bracket-name {
  position: absolute; left: calc(320px * var(--k) + 32px); top: calc(324px * var(--k) - 16px); translate: 0 -100%;
  writing-mode: vertical-rl; rotate: 180deg; pointer-events: none;
  font: 500 var(--size-label)/1.4 var(--font-label); letter-spacing: var(--label-tracking); text-transform: uppercase; white-space: nowrap;
  color: var(--ink-muted); transition: color var(--motion-base) ease;
}

/* The stack opens where you point. Only where the scene is live (1280px
   and up); below that it is a still picture. */
@media (min-width: 1280px) {
  .layer-iso__plate[aria-selected="true"] { transform: translateY(calc(var(--lift) * -1px)); }
  .layer-iso__plate[aria-selected="true"] ~ .layer-iso__plate { transform: translateY(calc(var(--open) * 1px)); }
  .layer-iso__plate[aria-selected="true"]:active { transform: translateY(calc(var(--lift) * -0.5px)) scale(0.985); transition-duration: var(--motion-fast); }
  .layer-iso__plate[aria-selected="true"] .layer-iso__top { fill: color-mix(in srgb, var(--accent-text) 30%, var(--ground)); stroke: var(--accent-text); }
  .layer-iso__plate[aria-selected="true"] .layer-iso__side { fill: color-mix(in srgb, var(--accent-text) 18%, var(--ground)); stroke: var(--accent-text); }
  /* the name stays where it was; its caption slides out under it */
  .layer-iso__plate[aria-selected="true"] .layer-iso__label { transform: translateY(calc(var(--lift) * 1px)); }
  .layer-iso__plate[aria-selected="true"] .layer-iso__label b { color: var(--heading); }
  .layer-iso__plate[aria-selected="true"] .layer-iso__label::after { border-color: var(--accent-text); }
  .layer-iso__plate[aria-selected="true"] .layer-iso__label span { opacity: 1; transform: none; transition: opacity var(--motion-base) var(--iso-ease) 60ms, transform var(--motion-base) var(--iso-ease) 60ms; }
  .layer-iso__beside span { opacity: 0; transform: translateY(-4px); transition: opacity var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease); }
  .layer-iso__plate[aria-selected="true"] .layer-iso__beside span { opacity: 1; transform: none; transition: opacity var(--motion-base) var(--iso-ease) 60ms, transform var(--motion-base) var(--iso-ease) 60ms; }
  /* wires: under the chosen plate the gap grows by lift + open; over it, it closes by lift */
  .layer-iso__plate[aria-selected="true"] .layer-iso__wire { --d: calc(var(--lift) + var(--open)); }
  .layer-iso__plate:has(+ .layer-iso__plate[aria-selected="true"]) .layer-iso__wire { --d: calc(var(--lift) * -1); }
  /* the bracket: how far Models has moved from Interfaces */
  .layer-iso__stack:has(.layer-iso__plate--interfaces[aria-selected="true"]) { --bd: calc(var(--lift) + var(--open)); }
  .layer-iso__stack:has(:is(.layer-iso__plate--workflows, .layer-iso__plate--harness, .layer-iso__plate--context)[aria-selected="true"]) { --bd: var(--open); }
  .layer-iso__stack:has(.layer-iso__plate--models[aria-selected="true"]) { --bd: calc(var(--lift) * -1); }
}

/* ------------------------------------------------------------ THE PANEL
   The chosen layer's card (25 Nov, seventh round; user: the fixed tall
   card was "so big … awkward", the items "very basic … no hierarchy, no
   consistency"). A callout, not a frame:

     - the Problems card's make on this band: the heading colour 6% into
       the ground, an 8% edge, 6px corners, 32px inside (24 below 1440);
     - as tall as its own content, the column's full width;
     - set level with its plate (layers.js: centred on the plate's corner,
       kept inside the scene's height), with a 2px Sage mark on its left
       edge at the plate's height, so it reads as that layer's.

   Inside, the same four levels for every layer:
     1  a DM Mono line: status dot + the layer's name (Sage for what you
        adopt, muted for the rest), its place at the right
     2  his caption as the title, 24px DM Sans; a second sentence quieter
        (the Problems titles' two parts)
     3  a group's DM Mono label, where he has groups
     4  the boxes, in the two forms the homepage already uses:
          tags   named things — teams, playbooks, what it knows, models,
                 systems (the hero's and the outer loop's teams)
          rows   things he described — the name in a fixed left column, his
                 line beside it, on hairlines (the use cases' Trigger /
                 Playbook / Output rows)
   No icons and no numbers. */
.layer-iso__panels { position: relative; align-self: stretch; min-width: 0; display: grid; align-content: center; }
.layer-iso__panel {
  position: relative; min-width: 0; padding: var(--space-6);
  border: var(--border-w) solid color-mix(in srgb, var(--heading) 8%, var(--ground)); border-radius: var(--r-box, 6px);
  background: color-mix(in srgb, var(--heading) 6%, var(--ground));
}
.layer-iso__panel::before {   /* the mark: this card belongs to the plate at this height */
  content: ''; position: absolute; left: -1px; top: var(--mark, 32px); width: 2px; height: 24px; border-radius: 1px;
  background: var(--accent-text);
}
.layer-iso__panel-head { display: flex; align-items: baseline; gap: var(--space-2); }
.layer-iso__title { margin: 0; font: 500 var(--size-label)/1.65 var(--font-label); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); }
.layer-iso__panel--adopted .layer-iso__title { color: var(--accent-text); }
.layer-iso__count { margin-left: auto; font: 400 var(--size-label)/1.65 var(--font-label); letter-spacing: var(--label-tracking); color: var(--ink-muted); }
.layer-iso__statement { max-width: 18em; margin: var(--space-3) 0 var(--space-5); font: 500 24px/1.15 var(--font-display); letter-spacing: -0.02em; color: var(--heading); text-wrap: pretty; }
.layer-iso__statement span { color: var(--ink-muted); }
.layer-iso__group { margin: 0 0 var(--space-3); font: 500 var(--size-label)/1.4 var(--font-label); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); }
:is(.layer-iso__tags, .layer-iso__rows) + .layer-iso__group { margin-top: var(--space-5); }

/* Tags: named things. The site's tag (a 1px line at heading 14%, 6px
   corners), a size up for a card's content: Inter 14, 32px tall. */
.layer-iso__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.layer-iso__tags li {
  padding: 0 var(--space-3);
  border: var(--border-w) solid color-mix(in srgb, var(--heading) 14%, transparent); border-radius: var(--r-box, 6px);
  background: color-mix(in srgb, var(--heading) 4%, transparent);
  font-size: 14px; line-height: 30px; white-space: nowrap; color: var(--heading);
}

/* Rows: things he described. The use cases' flow rows: a fixed column for
   the name (heading colour, weight 500), his line beside it, 14px, on
   hairlines. */
.layer-iso__rows { margin: 0; border-top: var(--border-w) solid color-mix(in srgb, var(--heading) 12%, transparent); }
.layer-iso__rows div { display: grid; grid-template-columns: 176px minmax(0, 1fr); column-gap: var(--space-4); padding: var(--space-3) 0; font-size: 14px; line-height: 1.5; }
.layer-iso__rows div + div { border-top: var(--border-w) solid color-mix(in srgb, var(--heading) 12%, transparent); }
.layer-iso__rows dt { font-weight: 500; color: var(--heading); }
.layer-iso__rows dd { margin: 0; color: var(--ink); text-wrap: pretty; }
/* Your coding agents, in the card as on the scene: beside Unlock.ai, so its
   rule is dashed and its name a step quieter. */
.layer-iso__rows .layer-iso__row--beside { border-top-style: dashed; border-top-color: color-mix(in srgb, var(--heading) 30%, transparent); }
.layer-iso__row--beside dt { color: var(--ink); }

/* Cards share the column; layers.js sets each one's top. The old one only
   fades (140ms); the new one comes in 10px from the side the choice moved
   (data-dir), with a breath of blur to join the two; its boxes follow. */
.layer-iso.is-ready .layer-iso__panel { position: absolute; left: 0; right: 0; transition: opacity 260ms var(--iso-ease), transform 260ms var(--iso-ease), filter 260ms var(--iso-ease), visibility 0s; }
.layer-iso.is-ready .layer-iso__panel[data-hidden] { visibility: hidden; opacity: 0; transform: translateY(10px); filter: blur(3px); transition: opacity 140ms var(--motion-ease), filter 140ms var(--motion-ease), transform 0s 140ms, visibility 0s 140ms; }
.layer-iso[data-dir="up"].is-ready .layer-iso__panel[data-hidden] { transform: translateY(-10px); }
.layer-iso.is-ready :is(.layer-iso__statement, .layer-iso__tags, .layer-iso__rows div) { transition: opacity 240ms var(--iso-ease), transform 240ms var(--iso-ease); }
.layer-iso.is-ready [data-hidden] :is(.layer-iso__statement, .layer-iso__tags, .layer-iso__rows div) { opacity: 0; transform: translateY(6px); transition: opacity 0s 140ms, transform 0s 140ms; }   /* reset once the card has faded */
.layer-iso.is-ready .layer-iso__tags { transition-delay: 50ms; }
.layer-iso.is-ready .layer-iso__rows div:nth-child(1) { transition-delay: 40ms; }
.layer-iso.is-ready .layer-iso__rows div:nth-child(2) { transition-delay: 65ms; }
.layer-iso.is-ready .layer-iso__rows div:nth-child(3) { transition-delay: 90ms; }
.layer-iso.is-ready .layer-iso__rows div:nth-child(4) { transition-delay: 110ms; }
.layer-iso.is-ready .layer-iso__rows div:nth-child(n + 5) { transition-delay: 130ms; }
.layer-iso[data-instant] :is(.layer-iso__plate, .layer-iso__label, .layer-iso__label *, .layer-iso__beside span, .layer-iso__label::after, .layer-iso__wire::before, .layer-iso__bracket, .layer-iso__art path, .layer-iso__panel, .layer-iso__statement, .layer-iso__tags, .layer-iso__rows div) { transition: none !important; }

/* ------------------------------------------------------------ THE STRIP
   Governance, under the scene and the panel: its name and caption at the
   left, its six in one line. Pointing at the strip lights the bracket. */
.layer-iso__governance {
  display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: var(--space-6); align-items: center;
  padding: var(--space-4) var(--space-6);
  border: var(--border-w) solid color-mix(in srgb, var(--heading) 8%, var(--ground)); border-radius: var(--r-box, 6px);
  background: color-mix(in srgb, var(--heading) 6%, var(--ground));
  transition: border-color var(--motion-base) ease;
}
/* Its head on the card's scale: the DM Mono label over the caption. */
.layer-iso__governance h3 { margin: 0; font: 500 var(--size-label)/1.65 var(--font-label); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); }
.layer-iso__governance p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--heading); }
/* The six as one ruled row: equal cells split by hairlines, each its icon
   over its name — a small column, so a name can take two lines and the row
   stays level. */
.layer-iso__governance ul { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.layer-iso__governance li {
  display: grid; justify-items: start; align-content: start; gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  border-left: var(--border-w) solid color-mix(in srgb, var(--heading) 12%, transparent);
  font-size: 14px; line-height: 20px; color: var(--ink); text-wrap: balance;
}
.layer-iso__governance li:first-child { border-left: 0; padding-left: 0; }
.layer-iso__governance .icon { --icon-size: 16px; flex: none; color: var(--ink-muted); }
@media (hover: hover) and (pointer: fine) {
  .layer-iso__governance:hover { border-color: var(--adopt-edge); }
  .layers--iso:has(.layer-iso__governance:hover) .layer-iso__bracket { --bracket: var(--accent-text); }
  .layers--iso:has(.layer-iso__governance:hover) .layer-iso__bracket-name { color: var(--heading); }
}

/* --------------------------------------------------------- FIRST VIEW
   Once, as the block rises (count.js): the stack assembles from your
   systems up, 55ms apart. */
.layers--iso.is-armed:not(.is-in) .layer-iso__plate { opacity: 0; translate: 0 -24px; }
.layers--iso.is-armed .layer-iso__plate { transition-delay: 0ms, calc((6 - var(--i)) * 55ms + 150ms), calc((6 - var(--i)) * 55ms + 150ms); }

/* ---------------------------------------------------------------- SIZES
   The scene is sized to its column (half the band less the gap); the side
   plate's text may reach a little into the gap. Names are 16px at every
   size. 1664 and up: plates 400 wide, captions a size up. 1536: 368.
   1440: 320. 1280: 288 and names only (the panel's statement carries the
   captions). */
@media (min-width: 1536px) { .layer-iso { --k: 1.15; --open: 18; } }
@media (min-width: 1664px) {
  .layer-iso { --k: 1.25; --open: 24; --names: 216px; }   /* 216, not 232: the coding-agents tag keeps clear of the card */
  .layer-iso__label span { max-width: 216px; font-size: 14px; line-height: 20px; }
}
@media (max-width: 1439px) {
  .layer-iso { --k: 0.85; --names: 184px; }
  .layer-iso__panel { padding: var(--space-5); }
  .layer-iso__rows div { grid-template-columns: 152px minmax(0, 1fr); }
  .layer-iso__label span { display: none; }
}
/* Short screens: the scene is sized to the screen's height as well as its
   width, so the heading and the whole stack fit under the header together
   (25 Nov, user, on a 15.6" laptop at 125%: 1536 × 860, where the width
   alone gave the scene 1.15 — 614px tall — and the section ran off the
   screen with the card 200–300px under the lede). Under 940px tall the
   scene is at most 1.0 (552px); under 800 (1366 × 768) 0.85. The heading
   sits 48px over the scene there, not 72. */
@media (min-width: 1280px) and (max-height: 939px) {
  .layers-section:has(.layers--iso) .section-head, .layers-section .layers--iso { margin-block: 0; }
  .layers-section .layers--iso { margin-top: var(--space-7); }
  .layer-iso__stack { margin-top: 0; }
}
@media (min-width: 1536px) and (max-height: 939px) { .layer-iso { --k: 1; --open: 16; } }
@media (min-width: 1280px) and (max-height: 799px) { .layer-iso { --k: 0.85; } }

/* ------------------------------------------------------------ NARROWER
   Below 1280 the scene is a picture — centred, still — and every panel
   stands open under it. Phones: the picture alone. */
@media (max-width: 1279px) {
  .layer-iso { --k: 1; --names: 176px; grid-template-columns: minmax(0, 1fr); gap: var(--space-7); }
  .layer-iso__stack { margin: 0 auto; height: calc(520px * var(--k)); translate: 12px 0; pointer-events: none; }
  .layer-iso__art path, .layer-iso__label { pointer-events: none; }
  .layer-iso__panels { gap: var(--space-3); min-height: 0 !important; }
  .layer-iso.is-ready .layer-iso__panel { position: relative; top: auto !important; padding: var(--space-5); }
  .layer-iso.is-ready .layer-iso__panel[data-hidden] { visibility: visible; opacity: 1; transform: none; filter: none; }
  .layer-iso.is-ready [data-hidden] :is(.layer-iso__statement, .layer-iso__tags, .layer-iso__rows div) { opacity: 1; transform: none; }
  .layer-iso__panel::before { display: none; }
  .layer-iso__governance { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding: var(--space-5); }
  .layer-iso__governance ul { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-4); }
  .layer-iso__governance li:nth-child(n) { border-left: 0; padding: 0; }
  .layer-iso__governance li:nth-child(even) { border-left: var(--border-w) solid color-mix(in srgb, var(--heading) 12%, transparent); padding-left: var(--space-4); }
}
@media (max-width: 767px) {
  .layer-iso__stack { translate: none; scale: 0.9; margin-block: -28px; }
  .layer-iso__label, .layer-iso__beside, .layer-iso__bracket, .layer-iso__bracket-name { display: none; }
  .layer-iso.is-ready .layer-iso__panel, .layer-iso__panel { padding: var(--space-4); }
  .layer-iso__rows div { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .layer-iso__tags li { white-space: normal; }
  .layer-iso__governance ul { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-3); }
  .layer-iso__governance li, .layer-iso__governance li:nth-child(even) { grid-template-columns: 16px minmax(0, 1fr); grid-auto-flow: column; align-items: start; gap: var(--space-3); border-left: 0; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .layer-iso { --lift: 0; --open: 0; }
  .layer-iso__plate[aria-selected="true"]:active, .layer-iso__label span, .layer-iso__beside span { transform: none; }
  .layers--iso.is-armed:not(.is-in) .layer-iso__plate { translate: none; }
  .layer-iso.is-ready .layer-iso__panel[data-hidden], .layer-iso.is-ready [data-hidden] :is(.layer-iso__statement, .layer-iso__tags, .layer-iso__rows div) { transform: none; filter: none; }
}

/* ===================================================================
   I. THE BOX (25 Nov, after marlowe.ai's compute stack; user: "in a single
   large box container, things cleanly laid out … play around with some
   colours from our set"). platform-layers.mjs layersBox(); a sketch at
   /explorations/platform-layers/box.html beside the iso round.
   The section head above it, the site's own; the box holds the diagram:
     panels          the chosen layer's detail at the left, centred against
                     the stack (the seven share one cell, so the box keeps
                     one height)
     scene           the stack, its names at the right on hairlines from
                     each plate's right corner, a square in the plate's
                     colour before each
     governance      at the foot of the left column
     arrows          his two-way arrows on the line between the names
     bracket         Governance down the side, past the names
   Colour by group, from the palette, as Marlowe's green over grey: the
   four you adopt a Sage ramp, light to deep (200, 300, 500, 700); your
   teams, the models and your systems a neutral ramp (grey 300, 500,
   600), so his legend, "Shaded layers are what you adopt", stays true
   (teal on your teams was the first idea; it made "shaded" ambiguous).
   Faces are the colour mixed into the band (top 40%, left side 26%, right
   16%; the chosen top 56%), a little see-through — tops at 80%, sides
   88% — so the plate under shows faintly (25 Nov, user: "add some
   transparency"; full glass at 30% let every lower edge cross the plate
   above). Edges solid; upper plates sit in front (z-index 7 - i).
   =================================================================== */
/* The band is night-2, the homepage's fold 2 (the partners plinth and
   Problems; 25 Nov, user: "section 2 fold 2 to have [night-2] section
   color"); teal before. The box is the Problems card's lift on it — the
   heading colour 6% into night-2, an 8% edge — with neon.com/object-
   storage's faint vertical hairlines (a night-deep well inside a lifted box
   before; user: "the black bg is not working"). --ground is the box's
   surface, so the plates mix against what they sit on.
   Its two columns keep the section head's gap, so the stack's column
   starts under the lede and the detail sits under the heading. */
.layer-box {
  --ground: color-mix(in srgb, var(--heading) 6%, var(--night-2));
  --kw: 0.9;                   /* the stack's scale by the screen's width … */
  --kh: 9;                     /* … and by its height; the smaller wins */
  --k: min(var(--kw), var(--kh));
  --step: calc(58px * var(--k));   /* plate to plate; phones spread them (26 Nov) */
  --names: 260px;              /* the label column at the stack's right: the longest line, Interfaces and its tag, is 258 */
  --box-line: color-mix(in srgb, var(--heading) 10%, transparent);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "panels scene" "gov scene";
  grid-template-rows: 1fr auto;
  column-gap: clamp(32px, 5vw, 80px);
  padding: var(--space-7);
  border: var(--border-w) solid color-mix(in srgb, var(--heading) 8%, var(--night-2)); border-radius: var(--r-box, 6px);
  background:
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--heading) 2.5%, transparent) 0 1px, transparent 1px 4px),
    var(--ground);
}

/* The detail, where Marlowe has its list: centred against the stack. */
/* Pinned to the top (25 Nov, user: "fix the left side thing on the top"),
   so its head stays put from layer to layer. */
.layer-box__panels { grid-area: panels; align-self: start; }
.layer-box__panel-head { display: flex; align-items: baseline; gap: var(--space-2); }
.layer-box__title { margin: 0; font: 500 var(--size-label)/1.65 var(--font-label); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); }
.layer-box__panel--unlock .layer-box__title { color: var(--accent-text); }
.layer-box__statement { font-size: 20px; margin: var(--space-2) 0 var(--space-5); }
/* Things he described: two columns, name over line, each on a hairline. */
.layer-box__cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-6); margin: 0; }
.layer-box__cells div { padding: var(--space-3) 0; border-top: var(--border-w) solid var(--box-line); font-size: 14px; line-height: 1.45; }
.layer-box__cells dt { font-weight: 500; color: var(--heading); }
.layer-box__cells dd { margin: 2px 0 0; color: var(--ink-muted); text-wrap: pretty; }
.layer-box__cells .layer-box__cell--beside { border-top-style: dashed; border-top-color: color-mix(in srgb, var(--heading) 30%, transparent); }
.layer-box__cell--beside dt { color: var(--ink); }
:is(.layer-iso__tags, .layer-box__cells) + .layer-iso__group { margin-top: var(--space-5); }

/* With the script the seven share one cell; the old fades, the new rises
   6px from the side the choice moved, its boxes a beat behind. */
.layer-box.is-ready .layer-box__panels { display: grid; }
.layer-box.is-ready .layer-box__panel { grid-area: 1 / 1; align-self: start; margin: 0; transition: opacity 240ms var(--motion-ease-out), transform 240ms var(--motion-ease-out), visibility 0s; }
.layer-box.is-ready .layer-box__panel[data-hidden] { visibility: hidden; opacity: 0; transform: translateY(6px); transition: opacity 120ms var(--motion-ease), transform 0s 120ms, visibility 0s 120ms; }
.layer-box[data-dir="up"].is-ready .layer-box__panel[data-hidden] { transform: translateY(-6px); }
.layer-box.is-ready :is(.layer-iso__tags, .layer-box__cells) { transition: opacity 240ms var(--motion-ease-out) 50ms; }
.layer-box.is-ready [data-hidden] :is(.layer-iso__tags, .layer-box__cells) { opacity: 0; transition: opacity 0s 120ms; }
.layer-box[data-instant] :is(.layer-box__look, .layer-box__label, .layer-box__label *, .layer-box__panel, .layer-iso__tags, .layer-box__cells, .layer-box__art path) { transition: none !important; }

/* The scene: the stack and its names, the legend centred under the stack. */
.layer-box__scene { grid-area: scene; align-self: center; display: grid; justify-items: start; gap: var(--space-6); }
.layer-box__scene .layers__legend { width: calc(320px * var(--k)); justify-content: center; white-space: nowrap; }
.layer-box__stack { position: relative; width: calc(320px * var(--k)); height: calc(6 * var(--step) + 172px * var(--k) + 10px); margin-top: 10px; }
.layer-box__plate {
  position: absolute; left: 0; top: calc(var(--i) * var(--step)); z-index: calc(7 - var(--i)); width: calc(320px * var(--k)); height: calc(172px * var(--k));
  padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  pointer-events: none;   /* only its outline and its name take the pointer */
}
.layer-box__plate:focus-visible { outline: none; }
.layer-box__plate--teams      { --c: var(--grey-300); }
.layer-box__plate--interfaces { --c: var(--sage-200); }
.layer-box__plate--workflows  { --c: var(--sage-300); }
.layer-box__plate--harness    { --c: var(--sage-500); }
.layer-box__plate--context    { --c: var(--sage-700); }
.layer-box__plate--models     { --c: var(--grey-500); }
.layer-box__plate--systems    { --c: var(--grey-600); }
.layer-box__art { display: block; width: 100%; height: 100%; overflow: visible; }
.layer-box__art path { pointer-events: none; stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill 200ms ease, stroke 200ms ease; }
/* The pointer meets a still outline (26 Nov: the lift used to carry the hit
   area off a cursor on the seam of two plates, which flickered); the look
   and the name lift on their own. 6 screen px, so 6 / --k in the drawing's units. */
.layer-box__art .layer-box__hit { fill: none; stroke: none; pointer-events: fill; }
.layer-box__look { transform-box: fill-box; transform-origin: center; }
.layer-box__look, .layer-box__label { transition: transform 280ms var(--motion-ease-out); }
/* Glass: each face is its colour over transparency, so the plate under it
   shows through (25 Nov, user: "add some transparency"); the edges stay
   solid so every plate keeps its outline. */
.layer-box__top  { fill: color-mix(in oklab, var(--c) 40%, var(--ground)); fill-opacity: 0.8; stroke: color-mix(in oklab, var(--c) 75%, var(--ground)); }
.layer-box__side { fill: color-mix(in oklab, var(--c) 26%, var(--ground)); fill-opacity: 0.88; stroke: color-mix(in oklab, var(--c) 50%, var(--ground)); }
.layer-box__side--right { fill: color-mix(in oklab, var(--c) 16%, var(--ground)); }
.layer-box__rim  { fill: none; pointer-events: none !important; stroke: color-mix(in oklab, var(--c) 58%, var(--ground)); }
.layer-box__plate[aria-selected="true"] .layer-box__look { transform: translateY(calc(-6px / var(--k))); }
.layer-box__plate[aria-selected="true"] .layer-box__label { transform: translateY(-6px); }
.layer-box__plate[aria-selected="true"] .layer-box__top { fill: color-mix(in oklab, var(--c) 56%, var(--ground)); fill-opacity: 0.86; stroke: var(--c); }
.layer-box__plate[aria-selected="true"] .layer-box__rim { stroke: color-mix(in oklab, var(--c) 80%, var(--ground)); }
.layer-box__plate[aria-selected="true"]:active .layer-box__look { transform: translateY(calc(-6px / var(--k))) scale(0.985); transition-duration: 120ms; }
.layer-box__plate:focus-visible .layer-box__top { stroke: var(--heading); stroke-width: 2; }
/* The chosen layer, easier to see (26 Nov, user: "the active state is not
   well observed, maybe like dim other plates?"): while the stack is in use
   (pointer on it, or focus in it) the others step back to 40%, their names
   muted — glass, so the plates above the chosen one let it through. Below
   1152, where the stack is the map of the open row, the others stay back.
   A glow round the chosen plate and a wider halo on its square were tried
   the same day and taken off (user: "remove the glow … dim effect is enough"). */
.layer-box__look { transition: transform 280ms var(--motion-ease-out), opacity 200ms ease; }
@media (hover: hover) and (pointer: fine) and (min-width: 1152px) {
  .layer-box__stack:hover .layer-box__plate:not([aria-selected="true"]) .layer-box__look { opacity: 0.4; }
  .layer-box__stack:hover .layer-box__plate:not([aria-selected="true"]) .layer-box__label b { color: var(--ink-muted); }
}
.layer-box__stack:has(:focus-visible) .layer-box__plate:not([aria-selected="true"]) .layer-box__look { opacity: 0.4; }
@media (max-width: 1151px) {
  .layer-box.is-ready .layer-box__plate:not([aria-selected="true"]) .layer-box__look { opacity: 0.45; }
  .layer-box.is-ready .layer-box__plate:not([aria-selected="true"]) .layer-box__label b { color: var(--ink-muted); }
}
@media (hover: hover) and (pointer: fine) {
  .layer-box__plate:not([aria-selected="true"]):hover .layer-box__top { fill: color-mix(in oklab, var(--c) 48%, var(--ground)); }
}

/* Names: from each plate's right corner, a hairline, the square, the name. */
.layer-box__label {
  position: absolute; left: 100%; top: calc(80px * var(--k)); translate: 0 -50%;
  display: flex; align-items: center; gap: var(--space-3); width: var(--names);
  pointer-events: auto; white-space: nowrap;
}
.layer-box__label::before { content: ''; flex: none; width: 20px; margin-right: calc(var(--space-3) * -1 + 4px); border-top: var(--border-w) solid color-mix(in srgb, var(--heading) 22%, transparent); transition: border-color 200ms ease; }
.layer-box__square { flex: none; position: relative; z-index: 1; width: 8px; height: 8px; border-radius: 2px; background: color-mix(in oklab, var(--c) 70%, var(--ground)); transition: background-color 200ms ease, box-shadow 200ms var(--motion-ease-out); }
.layer-box__label b { font-size: 16px; font-weight: 500; line-height: 24px; color: var(--ink); transition: color 200ms ease; }
.layer-box__tag {
  margin-left: -4px;
  padding: 0 var(--space-2); border: var(--border-w) dashed color-mix(in srgb, var(--heading) 36%, transparent); border-radius: var(--r-box, 6px);
  font-size: 12px; font-weight: 500; line-height: 22px; color: var(--ink-muted);
}
.layer-box__plate[aria-selected="true"] .layer-box__label b { color: var(--heading); }
.layer-box__plate[aria-selected="true"] .layer-box__square { background: var(--c); box-shadow: 0 0 0 3px color-mix(in oklab, var(--c) 28%, transparent); }
.layer-box__plate[aria-selected="true"] .layer-box__label::before { border-color: color-mix(in oklab, var(--c) 80%, var(--ground)); }
@media (hover: hover) and (pointer: fine) { .layer-box__plate:hover .layer-box__label b { color: var(--heading); } }

/* Governance at the foot of the left column, Marlowe's list under the copy
   (25 Nov, user: "what will you do about the empty space?"; across the box's
   foot before): its name and caption on one line, its six three to a row. */
.layer-box__governance {
  grid-area: gov; align-self: end; display: grid; gap: var(--space-4);
  margin-top: var(--space-7); padding-top: var(--space-5); border-top: var(--border-w) solid var(--box-line);
}
.layer-box__governance-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.layer-box__governance h3 { display: flex; align-items: center; gap: var(--space-2); margin: 0; font: 500 var(--size-label)/1.65 var(--font-label); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); }
.layer-box__governance p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--heading); }
.layer-box__governance ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3) var(--space-5); margin: 0; padding: 0; list-style: none; }
.layer-box__governance li { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: start; gap: var(--space-2); font-size: 14px; line-height: 20px; color: var(--ink); text-wrap: pretty; }
.layer-box__governance .icon { --icon-size: 16px; width: 16px; height: 16px; margin-top: 2px; color: var(--ink-muted); }

/* His arrows: two-way, on the line between the names' squares — each hangs
   from a connected layer's square down to the next one's (25 Nov, user:
   "the arrows aint it, may be show [on the line by the names]"; at the
   stack's left corners for a round), between the five layers he joins.
   Inside each name, so they move with their plate; 8px clear of each
   square, so the 6px lift never makes them touch. The chosen layer's
   arrows, above and below it, light Sage. */
.layer-box__link {
  position: absolute; left: -0.5px; top: calc(100% + 8px); width: 9px; height: calc(var(--step) - 24px);
  color: color-mix(in srgb, var(--heading) 42%, transparent); transition: color 200ms ease;
}
.layer-box__link::before { content: ''; position: absolute; left: 4px; top: 1px; bottom: 1px; border-left: var(--border-w) solid currentColor; }
.layer-box__link svg { position: absolute; left: 0; width: 9px; height: 6px; overflow: visible; }
.layer-box__link svg:first-child { top: 0; } .layer-box__link svg:last-child { bottom: 0; }
.layer-box__link path { fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.layer-box__plate[aria-selected="true"] .layer-box__link,
.layer-box__plate:has(+ .layer-box__plate[aria-selected="true"]) .layer-box__link { color: var(--accent-text); }

/* Governance down the side (Rohit's own place for it): a bracket past the
   names from Interfaces to Models, its name in DM Mono set along it. Pointing
   at its list in the left column lights it. */
.layer-box__gov {
  --bracket: color-mix(in srgb, var(--heading) 30%, transparent);
  position: absolute; left: calc(320px * var(--k) + var(--names) + 6px); top: calc(var(--step) + 80px * var(--k)); height: calc(4 * var(--step)); width: 8px;
  border: var(--border-w) solid var(--bracket); border-left: 0; border-radius: 0 3px 3px 0;
  pointer-events: none; transition: border-color 200ms ease;
}
.layer-box__gov span {
  position: absolute; left: 16px; top: 50%; translate: 0 -50%; writing-mode: vertical-rl; rotate: 180deg; white-space: nowrap;
  font: 500 var(--size-label)/1 var(--font-label); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted);
  transition: color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .layer-box:has(.layer-box__governance:hover) .layer-box__gov { --bracket: var(--accent-text); }
  .layer-box:has(.layer-box__governance:hover) .layer-box__gov span { color: var(--heading); }
}
.layer-box .layers__legend { margin: 0; }

/* Sizes: 1280 to 1439 the stack at 0.85. */
@media (min-width: 1536px) { .layer-box { --kw: 0.95; } }
@media (min-width: 1600px) { .layer-box { --kw: 1.05; } }
@media (max-width: 1439px) {
  .layer-box { --kw: 0.75; }
}
/* Short screens (a 15.6" laptop at 125% is 1536 x 860): the heading and the
   whole stack fit under the header together — the stack at most 0.9 under
   940px tall, 0.75 under 800, 48px from the heading to the box and inside
   it top and bottom. */
@media (min-width: 1152px) and (max-height: 939px) {
  .layer-box { --kh: 0.85; padding-block: var(--space-6); }
  .layers-section--box .section-head { margin-bottom: var(--space-7); }
}
@media (min-width: 1152px) and (max-height: 799px) { .layer-box { --kh: 0.75; } }

/* Below 1152: one column — the copy, the stack with its names, the chosen
   layer's detail right under it, Governance. The stack is the control, as on
   desktop: a tap on a plate or a name chooses that layer, its plate lifts,
   the others step back, and its detail takes the place below (26 Nov, user:
   with the accordion "the 3d plates are not doing anything there, if i open
   context engine … i wont see it highlighted" — the rows ran a screen below
   the picture). Only the chosen detail takes room, so the section stays
   short. Without the script every detail stands open. */
@media (max-width: 1151px) {
  .layer-box { grid-template-columns: minmax(0, 1fr); grid-template-areas: "scene" "panels" "gov"; --kw: 0.85; }
  .layer-box__scene { justify-self: center; }
  .layer-box__panels { margin-top: var(--space-7); }
  .layer-box__panel { padding-top: var(--space-5); border-top: var(--border-w) solid var(--box-line); }
  .layer-box.is-ready .layer-box__panels { display: block; }
  .layer-box.is-ready .layer-box__panel[data-hidden] { display: none; }
  .layer-box.is-ready .layer-box__panel:not([data-hidden]) { animation: layer-panel-in 240ms var(--motion-ease-out); }
  .layer-box__plate[aria-selected="true"] .layer-box__link { color: var(--accent-text); }
  .layer-box__label { -webkit-tap-highlight-color: transparent; }
}
@keyframes layer-panel-in { from { opacity: 0; transform: translateY(6px); } }
/* Phones: the stack at 45%, its plates spread so each layer's row — plate
   and name — is a 44px tap target, the names beside it (a long one takes two
   lines); no Governance bracket (the strip below carries it). */
@media (max-width: 767px) {
  .layer-box { padding: var(--space-6) var(--space-5); --kw: 0.45; --step: 44px; --names: calc(100cqw - 320px * var(--k)); }
  .layer-box { container-type: inline-size; }
  .layer-box__scene { justify-self: stretch; }
  .layer-box__gov { display: none; }
  .layer-box__label { gap: var(--space-2); min-height: var(--step); }
  .layer-box__label::before { width: 12px; margin-right: 0; }
  .layer-box__label b { font-size: 14px; line-height: 18px; white-space: normal; }
  .layer-box__scene .layers__legend { width: auto; margin-left: calc(320px * var(--k) + 20px); justify-content: flex-start; align-items: baseline; white-space: normal; }   /* on the names' column, its square under theirs */
  .layer-box__scene .layers__swatch { flex: none; width: 8px; height: 8px; border: 0; translate: 0 -1px; background: color-mix(in oklab, var(--sage-300) 70%, var(--ground)); }
  .layer-box__scene { gap: 0; }   /* the key about 48px under Your systems' name, as on desktop */
  .layer-box__cells { grid-template-columns: minmax(0, 1fr); }
  .layer-box .layer-iso__tags li { white-space: normal; }
  .layer-box__governance ul { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 374px) { .layer-box { --kw: 0.4; } }   /* small phones: the names keep one line */

/* Sketch (26 Nov, kept): the seven as an accordion under the picture, each a
   56px row — its square, its name, a caret — one open at a time. Dropped the
   same day: the open row sat a screen below the picture, so the plates did
   nothing. /explorations/platform-layers/box-art-accordion.html */
@media (max-width: 1151px) {
  .layers-section--accordion .layer-box__plate { pointer-events: none; }
  .layers-section--accordion .layer-box__art .layer-box__hit, .layers-section--accordion .layer-box__label { pointer-events: none; }
  .layers-section--accordion .layer-box.is-ready .layer-box__panels { border-bottom: var(--border-w) solid var(--box-line); }
  .layers-section--accordion .layer-box.is-ready .layer-box__panel, .layers-section--accordion .layer-box.is-ready .layer-box__panel[data-hidden] { display: block; visibility: visible; opacity: 1; transform: none; animation: none; padding: 0 0 var(--space-5); }
  .layers-section--accordion .layer-box.is-ready .layer-box__panel[data-hidden] { padding-bottom: 0; }
  .layers-section--accordion .layer-box.is-ready .layer-box__panel[data-hidden] > :not(.layer-box__panel-head) { display: none; }
  .layers-section--accordion .layer-box.is-ready .layer-box__panel-head { position: relative; min-height: 56px; align-items: center; padding-right: 40px; }
  .layers-section--accordion .layer-box.is-ready .layer-box__panel:not([data-hidden]) > :not(.layer-box__panel-head) { animation: layer-panel-in 240ms var(--motion-ease-out); }
  .layers-section--accordion .layer-box__toggle {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end;
    padding: 0; border: 0; background: none; color: var(--ink-muted); cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .layers-section--accordion .layer-box__toggle .icon { width: 20px; height: 20px; transition: rotate 200ms var(--motion-ease), color 200ms ease; }
  .layers-section--accordion .layer-box__toggle[aria-expanded="true"] .icon { rotate: 180deg; color: var(--accent-text); }
  .layers-section--accordion .layer-box__toggle:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; border-radius: var(--r-box, 6px); }
  .layers-section--accordion.layers-section--art .layer-box.is-ready .layer-box__title { font-size: 16px; line-height: 24px; }
}
@media (max-width: 767px) {
  .layers-section--accordion .layer-box { --kw: 0.8; --step: calc(58px * var(--k)); --names: 0px; }
  .layers-section--accordion .layer-box__label { display: none; }
}
.layer-box__toggle { display: none; }
@media (prefers-reduced-motion: reduce) {
  .layer-box__plate[aria-selected="true"] .layer-box__look, .layer-box__plate[aria-selected="true"]:active .layer-box__look { transform: translateY(calc(-6px / var(--k))); }
  .layer-box.is-ready .layer-box__panel[data-hidden] { transform: none; }
  .layer-box.is-ready .layer-box__panel:not([data-hidden]), .layer-box.is-ready .layer-box__panel:not([data-hidden]) > * { animation: none; }
  .layer-box__toggle .icon { transition: none; }
}

/* ===================================================================
   J. THE BOX, DRAWN (25 Nov, user: "make the left side part illustrative
   images … randomly left side is very empty"). platform-layers.mjs
   layersBoxArt(). Each layer's detail is a drawing on one fixed stage —
   nodes placed by percentage (--x, --y, centred unless data-a="l"),
   wires in a 100 x 100 SVG behind them (non-scaling, 1px) — in the
   diagram language: raised panels with DM Mono heads, stations with
   16px Phosphor icons, skeleton bars, Sage on what Unlock.ai does
   (is-unlock), Ember only at the approval gate. His words are the
   labels; the plain list (.layer-box__text) is the screen readers' copy
   and the phones' view.
   =================================================================== */
.layers-section--art .layer-box__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.layer-art {
  --art-surface: color-mix(in srgb, var(--heading) 7%, var(--ground));
  --art-edge: color-mix(in srgb, var(--heading) 13%, var(--ground));
  --art-wire: color-mix(in srgb, var(--heading) 26%, transparent);
  --art-sage-edge: color-mix(in srgb, var(--accent-text) 40%, var(--ground));
  position: relative; height: 320px; margin-top: var(--space-2);
  font-size: 13px; line-height: 1.35; color: var(--ink);
}
.layer-art .icon { --icon-size: 16px; width: 16px; height: 16px; flex: none; color: var(--ink-muted); }
.layer-art .is-unlock .icon { color: var(--accent-text); }
.art-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.art-wires path { fill: none; stroke: var(--art-wire); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.art-wires path.is-lit { stroke: color-mix(in srgb, var(--accent-text) 55%, transparent); }
.art-wires path.is-dashed { stroke-dasharray: 3 3; }
.art-n { position: absolute; left: var(--x); top: var(--y); translate: -50% -50%; }
.art-n[data-a="l"] { translate: 0 -50%; }
.art-n--w30 { width: 30%; } .art-n--w38 { width: 38%; } .art-n--w40 { width: 40%; } .art-n--w46 { width: 46%; }
.art-n--w50 { width: 50%; } .art-n--w60 { width: 60%; } .art-n--w94 { width: 94%; }
.art-label { font: 500 11px/1.5 var(--font-label); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; }
.is-unlock .art-label { color: var(--accent-text); }
.art-sub { display: block; font-size: 12px; color: var(--ink-muted); }

/* Parts */
.art-panel { display: grid; gap: var(--space-2); padding: var(--space-3); border: var(--border-w) solid var(--art-edge); border-radius: var(--r-box, 6px); background: var(--art-surface); }
.is-unlock .art-panel { border-color: var(--art-sage-edge); }
.art-panel__head { display: flex; align-items: center; gap: var(--space-2); padding-bottom: var(--space-2); border-bottom: var(--border-w) solid var(--art-edge); font: 500 11px/1.5 var(--font-label); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); }
.art-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-text); }
.art-foot { font-size: 12px; color: var(--ink-muted); }
.art-bar { display: block; width: var(--w); height: 6px; border-radius: 2px; background: color-mix(in srgb, var(--heading) 14%, transparent); }
.art-bar.is-lit { background: color-mix(in srgb, var(--accent-text) 50%, transparent); }
.art-st { display: inline-flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: var(--border-w) solid var(--art-edge); border-radius: var(--r-box, 6px); background: var(--art-surface); }
.art-n--w30 .art-st, .art-n--w94 .art-st { display: flex; }
.art-st .icon { margin-top: 1px; }
.art-st > span { display: grid; gap: 2px; }
.art-st b { font-weight: 500; color: var(--heading); }
.art-st b + span { font-size: 12px; color: var(--ink-muted); }
.is-unlock > .art-st { border-color: var(--art-sage-edge); }
.art-st.is-chip { padding-block: 6px; white-space: nowrap; }
.art-n:not([class*="art-n--w"]) > .art-st { white-space: nowrap; }
.art-st.is-chip b { font-size: 12px; }
.art-st.is-beside { border-style: dashed; border-color: color-mix(in srgb, var(--heading) 34%, transparent); background: var(--ground); }
.art-st.is-beside b { color: var(--ink); }
.art-person { display: grid; justify-items: center; gap: 6px; width: 104px; text-align: center; }
.art-person b { font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--heading); text-wrap: balance; }
.art-person.is-above b { order: -1; }   /* the rings above the hub: the name on the far side, clear of the wire */
.art-n[data-a="t"] { translate: -50% 0; }
.art-n[data-a="r"] { translate: -100% -50%; }   /* set flush right on --x (the context engine's sources) */
.art-ring { display: grid; place-items: center; width: 32px; height: 32px; border: var(--border-w) solid var(--art-edge); border-radius: 50%; background: var(--art-surface); }

/* Your teams (26 Nov, user: "like other illustrations, add subtle smoothness
   and skeletonness … different icons for each … slack icon in interfaces
   last"): each team a card — its own icon in a 24px tile, its name at 12
   weight 500, a skeleton bar under it — four left and three right, their
   wires curving into the Interfaces panel and fanning across its edge, grey
   turning Sage as they arrive (a gradient along each), a faint Sage field
   behind the panel. The panel: its DM Mono head, then the three surfaces as
   tiles, Slack last. */
.art-team { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) 10px var(--space-2) var(--space-2); border: var(--border-w) solid var(--art-edge); border-radius: var(--r-box, 6px); background: var(--art-surface); box-shadow: 0 1px 0 color-mix(in srgb, var(--heading) 4%, transparent) inset; }
.art-team > span:last-child { display: grid; gap: 6px; min-width: 0; flex: 1; }
.art-team b { font-size: 12px; font-weight: 500; line-height: 1.25; color: var(--heading); white-space: nowrap; }
.art-team .art-bar { height: 4px; background: color-mix(in srgb, var(--heading) 10%, transparent); }
.art-tile { display: grid; flex: none; place-items: center; width: 24px; height: 24px; border-radius: 4px; background: color-mix(in srgb, var(--heading) 7%, transparent); }
.art-tile .icon { --icon-size: 14px; width: 14px; height: 14px; }
.art-hubpanel { justify-items: stretch; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-text) 5%, transparent); }
.art-hubpanel .art-panel__head { justify-content: center; color: var(--accent-text); }
.art-surfaces { display: flex; justify-content: center; gap: 6px; }
.art-surfaces .art-tile { width: 28px; height: 28px; background: color-mix(in srgb, var(--accent-text) 10%, transparent); }
.art-surfaces .art-tile .icon { --icon-size: 16px; width: 16px; height: 16px; }
.art-glow { display: block; width: 260px; height: 200px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent-text) 9%, transparent), transparent); }
.art-stop { stop-color: color-mix(in srgb, var(--heading) 22%, transparent); }
.art-stop.is-lit { stop-color: color-mix(in srgb, var(--accent-text) 60%, transparent); }
.art-n--w22 { width: 22%; } .art-n--w31 { width: 31%; }
/* Narrower stages: a smaller tile and tighter card; below 1280 a long name
   may take two lines rather than run past its card. */
@media (max-width: 1439px) {
  .art-team { gap: 6px; padding: 6px var(--space-2) 6px 6px; }
  .art-team .art-tile { width: 20px; height: 20px; }
  .art-surfaces .art-tile { width: 24px; height: 24px; }
}
@media (max-width: 1279px) {
  .art-team b { white-space: normal; text-wrap: balance; }
  .layer-art--teams .art-n--w22 { width: 26%; }   /* the wires' ends tuck under it */
  .art-hubpanel { padding-inline: var(--space-2); }
  .art-hubpanel .art-dot { display: none; }
}

/* Interfaces: three windows */
.art-iface { display: grid; gap: 4px; }   /* a card (art-panel), so its wire leaves from something */
.art-iface b { margin-top: var(--space-2); font-weight: 500; color: var(--heading); }
.art-panel.art-iface { gap: 4px; padding: var(--space-2); }
.art-iface > span:last-child { font-size: 12px; color: var(--ink-muted); }
.art-win { display: grid; height: 96px; border: var(--border-w) solid var(--art-sage-edge); border-radius: var(--r-box, 6px); background: var(--art-surface); overflow: hidden; grid-template-rows: 14px 1fr; }
.art-win__bar { display: flex; align-items: center; gap: 3px; padding: 0 6px; border-bottom: var(--border-w) solid var(--art-edge); }
.art-win__bar i { width: 4px; height: 4px; border-radius: 50%; background: color-mix(in srgb, var(--heading) 24%, transparent); }
.art-win__body { padding: var(--space-2); }
.art-win--dark { background: var(--night-deep); }
.art-desk { display: grid; grid-template-columns: 26% 1fr; gap: var(--space-2); height: 100%; }
.art-desk__side { display: grid; align-content: start; gap: 5px; padding-right: var(--space-2); border-right: var(--border-w) solid var(--art-edge); }
.art-desk__main { display: grid; align-content: start; gap: 5px; }
.art-card { display: block; padding: 6px; border: var(--border-w) solid var(--art-edge); border-radius: 3px; background: color-mix(in srgb, var(--heading) 5%, transparent); }
.art-term { display: grid; gap: 6px; }
.art-term__row { display: flex; align-items: center; gap: 4px; }
.art-caret { width: 5px; height: 9px; border-radius: 1px; background: var(--accent-text); }
.art-term__row .art-bar { flex: none; }
.art-chat { display: grid; grid-template-columns: 18px 1fr; gap: 6px; }
.art-chat > span { display: grid; align-content: start; gap: 5px; }
.art-avatar { width: 18px; height: 18px; border-radius: 3px; background: color-mix(in srgb, var(--accent-text) 45%, var(--ground)); }
.art-button { display: block; width: 44px; height: 14px; margin-top: 3px; border: var(--border-w) solid color-mix(in srgb, var(--accent-text) 55%, transparent); border-radius: 3px; }

/* Workflows */
.art-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.art-list li { display: flex; align-items: center; gap: var(--space-2); padding: 5px 0; color: var(--heading); }
.art-list li + li { border-top: var(--border-w) solid color-mix(in srgb, var(--heading) 7%, transparent); }
.art-list li:last-child { color: var(--ink-muted); }
.art-panel--card { gap: 4px; }
.art-panel--card b { font-weight: 500; color: var(--heading); }
.art-panel--card > span:last-child { font-size: 12px; color: var(--ink-muted); }
.art-chain { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.art-chain i { font-style: normal; font-size: 12px; color: var(--ink-muted); }

/* Server-side harness */
.art-sandbox { display: grid; gap: 2px; padding: var(--space-3); border: var(--border-w) dashed var(--art-sage-edge); border-radius: var(--r-box, 6px); background: var(--ground); }   /* solid, so its wires tuck behind it */
.art-sandbox .art-panel { margin-top: var(--space-3); }
.art-steps { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.art-steps li { display: flex; align-items: center; gap: var(--space-2); }
.art-gate { flex: none; width: 10px; height: 10px; margin: 3px; rotate: 45deg; border: 1.5px solid var(--accent); border-radius: 1px; }
.art-st.art-audit { align-items: center; }
.art-audit .icon { margin-top: 0; }
.art-st > .art-log { display: flex; gap: 4px; margin-left: auto; }
.art-log i { width: 22px; height: 6px; border-radius: 2px; background: color-mix(in srgb, var(--accent-text) 30%, transparent); }

/* Context engine */
.art-graph { width: 100%; height: auto; }
.art-graph path { fill: none; stroke: var(--art-wire); stroke-width: 1; }
.art-graph circle { fill: var(--art-surface); stroke: color-mix(in srgb, var(--heading) 40%, transparent); stroke-width: 1; }
.art-graph circle.is-lit { fill: var(--accent-text); stroke: var(--accent-text); }
/* The three facts: one panel, three cells split by hairlines, no icons
   (26 Nov, user: the layer was too crowded; three boxed cards with icons before). */
.art-panel.art-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 0; }
.art-facts > div { display: grid; align-content: start; gap: 2px; padding: var(--space-2) var(--space-3); }
.art-facts > div + div { border-left: var(--border-w) solid color-mix(in srgb, var(--heading) 7%, transparent); }
.art-facts b { font-weight: 500; color: var(--heading); }
.art-facts span { font-size: 12px; color: var(--ink-muted); }

/* Your systems: one tray of rings, the last an empty dashed one with a plus
   (26 Nov, user: ten crossing wires read as a tangle). */
.art-panel.art-tray { display: flex; justify-content: space-around; gap: var(--space-2); padding: var(--space-4) var(--space-3) var(--space-3); }
.art-tray .art-person { flex: 1 1 0; align-content: start; width: auto; min-width: 0; }
.art-tray .is-more .art-ring { border-style: dashed; border-color: color-mix(in srgb, var(--heading) 30%, transparent); background: none; color: var(--ink-muted); }

/* Models */
.art-tokens { display: grid; gap: 6px; padding: 4px 0; }
.art-meter { display: flex; gap: 3px; }
.art-meter i { flex: 1; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--heading) 10%, transparent); }
.art-meter i:nth-child(-n + 3) { background: color-mix(in srgb, var(--heading) 26%, transparent); }

/* The stage keeps one height; a touch shorter below 1440, gone on phones
   (the list stands in). */
@media (max-width: 1439px) { .layer-art { height: 300px; font-size: 12px; } .art-person { width: 92px; } }

/* The frame around the drawing (26 Nov, user: "make the governance a whole
   long strip … there are other details as well around the diagram"):
   - Governance is one strip across the box's foot, edge to edge, a step
     darker than the box: its name and caption, then the six in equal cells
     split by hairlines, each icon over its name (it sat under the drawing in
     the left half, three to a row).
   - The statement keeps two lines' room and runs wider, balanced, so the
     drawing under it starts on the same line for every layer (one-line
     statements lifted it 23px) and "Runs the / playbooks" no longer breaks.
   - The stage stretches to the stack's height, so both columns end on one
     line; 320px (300 below 1440) is its least.
   - The key moves onto the names rail, its swatch in the squares' column
     under Your systems, so it explains the squares it sits beside (it
     floated 100px under the stack, tied to nothing). */
@media (min-width: 1152px) {
  .layers-section--art .layer-box { grid-template-areas: "panels scene" "gov gov"; grid-template-rows: auto auto; }
  .layers-section--art .layer-box__panels { align-self: stretch; }
  .layers-section--art .layer-box.is-ready .layer-box__panel { align-self: stretch; display: flex; flex-direction: column; }
  .layers-section--art .layer-art { flex: 1 0 auto; height: auto; min-height: 320px; margin-right: var(--space-5); }   /* 24px in from the column's edge (26 Nov, user: "too close to the layers") */
  .layers-section--art .layer-box__statement { max-width: 27em; min-height: 2.3em; line-height: 1.15; text-wrap: balance; }
  .layers-section--art .layer-box__statement span { display: block; }   /* two sentences: one a line, the quiet one under */
  .layers-section--art .layer-box__scene { position: relative; align-self: start; }
  .layers-section--art .layer-box__scene .layers__legend {
    position: absolute; left: calc(320px * var(--k) + 24px); top: calc(10px + 6 * var(--step) + 80px * var(--k) + 48px);
    width: auto; gap: var(--space-3); white-space: nowrap;
  }
  .layers-section--art .layer-box__scene .layers__swatch { width: 8px; height: 8px; border: 0; background: color-mix(in oklab, var(--sage-300) 70%, var(--ground)); }
}
@media (min-width: 1152px) and (max-width: 1439px) { .layers-section--art .layer-art { min-height: 300px; } }

/* The names rail (26 Nov, user: "the arrows and dots are not good together.
   from interfaces to model, it doesnt look like its within governance"):
   - His connections as one wire: the squares are stations on a single
     vertical line from Your teams to the context engine, as wires and
     stations run in the site's other drawings; no arrowheads (they sat 8px
     off each square, a stutter of marks; a line with no heads already reads
     both ways). It breaks before the models, so the gap still says they and
     your systems sit underneath. The chosen layer's wire above and below it
     is Sage; each piece lengthens or shortens by the chosen plate's 6px
     lift, so the line never breaks or overruns.
   - Governance as a region, not a bracket: a faint panel behind the names
     from Interfaces to Models (common region groups far harder than a
     bracket 150px off), its name in a darker side column on the right, the
     foot strip's make, so the two read as one thing. The squares sit 12px
     inside its edge; the plates' hairlines run into it. */
.layers-section--art .layer-box__link { top: 100%; height: calc(var(--step) - 8px); color: color-mix(in srgb, var(--heading) 28%, transparent); transition: color 200ms ease, height 280ms var(--motion-ease-out); }
.layers-section--art .layer-box__link::before { top: 0; bottom: 0; }
.layers-section--art .layer-box__link svg { display: none; }
.layers-section--art .layer-box__plate[aria-selected="true"] .layer-box__link { height: calc(var(--step) - 2px); }
.layers-section--art .layer-box__plate:has(+ .layer-box__plate[aria-selected="true"]) .layer-box__link { height: calc(var(--step) - 14px); }
/* Governance down the stack's left side (26 Nov, user: "nah not still good
   box for governance"): Rohit's side column as a 1px bracket 8px off the
   plates' left corners, its ends level with Interfaces' corner and Models'
   foot, GOVERNANCE in DM Mono along it at the left — tied to the plates
   themselves, not to the names (the bracket past the names sat 150px off
   most of them; the panel behind the names read as a form box; a dashed
   cage round the five plates was tried and hid behind them). The panel
   is kept as the box-art-region sketch. Pointing at the strip lights it. */
.layers-section--art .layer-box__gov {
  left: calc(-8px - 8px); top: calc(var(--step) + 80px * var(--k)); height: calc(4 * var(--step) + 12px * var(--k)); width: 8px;
  border: var(--border-w) solid var(--bracket); border-right: 0; border-radius: 3px 0 0 3px;
}
.layers-section--art .layer-box__gov span { left: auto; right: calc(100% + 8px); }
.layers-section--gov-region .layer-box__gov {
  --bracket: color-mix(in srgb, var(--heading) 10%, transparent);
  left: calc(320px * var(--k) + 12px); top: calc(var(--step) + 80px * var(--k) - 22px); height: calc(4 * var(--step) + 44px); width: calc(var(--names) + 28px);
  border: var(--border-w) solid var(--bracket); border-radius: var(--r-box, 6px);
  background: color-mix(in srgb, var(--heading) 3%, transparent);
  transition: border-color 200ms ease, background-color 200ms ease;
}
.layers-section--gov-region .layer-box__gov span {
  left: auto; right: 0; top: 0; bottom: 0; translate: none; width: 28px;
  display: grid; place-items: center;
  border-right: var(--border-w) solid var(--bracket); border-radius: 5px 0 0 5px;   /* turned 180°: its left edge and right corners */
  background: color-mix(in srgb, var(--night-2) 55%, transparent);
}
@media (hover: hover) and (pointer: fine) {
  .layers-section--gov-region .layer-box:has(.layer-box__governance:hover) .layer-box__gov { --bracket: color-mix(in srgb, var(--accent-text) 40%, transparent); background: color-mix(in srgb, var(--accent-text) 4%, transparent); }
}
@media (max-width: 1151px) {
  .layers-section--art .layer-box__plate[aria-selected="true"] .layer-box__link,
  .layers-section--art .layer-box__plate:has(+ .layer-box__plate[aria-selected="true"]) .layer-box__link { height: calc(var(--step) - 8px); }
}

.layers-section--art .layer-box__governance {
  --strip-line: color-mix(in srgb, var(--heading) 9%, transparent);
  display: grid; grid-template-columns: 216px repeat(6, minmax(0, 1fr)); gap: 0;
  margin: var(--space-7) calc(var(--space-7) * -1) calc(var(--space-7) * -1); padding: 0;
  border-top: var(--border-w) solid var(--strip-line); border-radius: 0 0 5px 5px;
  background: color-mix(in srgb, var(--night-2) 55%, transparent);
}
.layers-section--art .layer-box__governance-head { display: grid; align-content: start; gap: var(--space-1); padding: var(--space-5) var(--space-5) var(--space-5) var(--space-7); }
.layers-section--art .layer-box__governance ul { display: contents; }
.layers-section--art .layer-box__governance li {
  grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--space-3);
  padding: var(--space-5) var(--space-4); border-left: var(--border-w) solid var(--strip-line);
  color: var(--heading); transition: background-color 200ms ease;
}
.layers-section--art .layer-box__governance li:last-child { padding-right: var(--space-7); }
.layers-section--art .layer-box__governance .icon { margin-top: 0; }
@media (hover: hover) and (pointer: fine) {
  .layers-section--art .layer-box__governance li:hover { background: color-mix(in srgb, var(--heading) 3%, transparent); }
  .layers-section--art .layer-box__governance li:hover .icon { color: var(--accent-text); }
}
/* Short screens: the box's padding is 32 there, so the strip's bleed is too. */
@media (min-width: 1152px) and (max-height: 939px) {
  .layers-section--art .layer-box__governance { margin: var(--space-6) calc(var(--space-7) * -1) calc(var(--space-6) * -1); }
}
@media (max-width: 1279px) {
  .layers-section--art .layer-box__governance { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layers-section--art .layer-box__governance-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: var(--space-3); padding: var(--space-5) var(--space-7) 0; }
  .layers-section--art .layer-box__governance li { border-left: 0; border-top: var(--border-w) solid var(--strip-line); padding-left: var(--space-7); grid-template-columns: 16px minmax(0, 1fr); gap: var(--space-2); }
  .layers-section--art .layer-box__governance li:nth-child(3n + 2), .layers-section--art .layer-box__governance li:nth-child(3n + 3) { border-left: var(--border-w) solid var(--strip-line); padding-left: var(--space-4); }
  .layers-section--art .layer-box__governance-head + ul li:nth-child(-n + 3) { margin-top: var(--space-4); }
  .layers-section--art .layer-box__governance li:last-child { padding-right: var(--space-4); }
  .layers-section--art .layer-box__governance .icon { margin-top: 2px; }
}
@media (max-width: 767px) {
  .layers-section--art .layer-box__governance { grid-template-columns: minmax(0, 1fr); margin: var(--space-6) calc(var(--space-5) * -1) calc(var(--space-6) * -1); }
  .layers-section--art .layer-box__governance-head { flex-wrap: wrap; padding: var(--space-5) var(--space-5) 0; }
  .layers-section--art .layer-box__governance li, .layers-section--art .layer-box__governance li:nth-child(3n + 2), .layers-section--art .layer-box__governance li:nth-child(3n + 3) { border-left: 0; padding: var(--space-3) var(--space-5); }
  .layers-section--art .layer-box__governance-head + ul li:nth-child(-n + 3) { margin-top: 0; }
  .layers-section--art .layer-box__governance-head + ul li:first-child { margin-top: var(--space-3); }
}
/* Quieter (26 Nov, user: the drawings are "taking too much attention from
   the layers on the right … both are equally heavy … tone down the things
   on the left … maybe play around with some darker colors, so right side
   pops"). The drawings keep every part and place; they step back a level in
   value, so the stack leads and the detail reads as what sits behind it.
   Done by retuning the colour roles inside the drawing, so every mix built
   on them follows: the heading colour becomes the body colour (stone),
   the body colour 78% of it, Sage 66% into the box, Ember 72%; panels a
   4.5% lift (7 before) with a 9% edge (13), wires 17% (26), Sage edges 24%
   (40); type 12px (13). The full-strength drawings are kept as the sketch
   box-art-full.html. */
.layers-section--art-quiet .layer-art {
  --heading: var(--ember-stone);
  --ink: color-mix(in srgb, var(--ember-stone) 78%, var(--ground));
  --accent-text: color-mix(in srgb, var(--sage-green) 66%, var(--ground));
  --accent: color-mix(in srgb, var(--ember-orange) 72%, var(--ground));
  --art-surface: color-mix(in srgb, var(--heading) 4.5%, var(--ground));
  --art-edge: color-mix(in srgb, var(--heading) 9%, var(--ground));
  --art-wire: color-mix(in srgb, var(--heading) 17%, transparent);
  --art-sage-edge: color-mix(in srgb, var(--accent-text) 36%, var(--ground));
  font-size: 12px;
}
.layers-section--art-quiet .art-glow { opacity: 0.6; }
.layers-section--art-quiet .art-hubpanel { box-shadow: none; }
/* The layer's name over its statement, as the stack names it (26 Nov, user:
   the DM Mono name "clashes with the section eyebrow"): its 8px square in
   its plate's colour, then the name in Inter 14 weight 500 in the heading
   colour — the names rail's make, so the detail points at its plate. */
.layers-section--art .layer-box__panel-head { align-items: center; gap: var(--space-2); }
.layers-section--art .layer-box__title,
.layers-section--art .layer-box__panel--unlock .layer-box__title { font: 500 14px/20px var(--font-body); letter-spacing: 0; text-transform: none; color: var(--heading); }
.layer-box__key { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
#layer-panel-teams { --c: var(--grey-300); }  #layer-panel-interfaces { --c: var(--sage-200); }  #layer-panel-workflows { --c: var(--sage-300); }
#layer-panel-harness { --c: var(--sage-500); } #layer-panel-context { --c: var(--sage-700); }    #layer-panel-models { --c: var(--grey-500); }
#layer-panel-systems { --c: var(--grey-600); }

/* the strip's six follow, a step under the heading colour, so on the left
   only the layer's statement is bright */
.layers-section--art-quiet .layer-box__governance li { color: var(--ink); }

@media (max-width: 767px) {
  .layer-art { display: none; }
  .layers-section--art .layer-box__text { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
}

/* The box, snappier (27 Nov, user: the hover "is not snappy enough. There's
   delay and takes a while, and on lower end computers it's not a good
   experience"). What made it slow: an 80ms wait before any plate answered
   (layers.js, now 0 on entry and 30 between plates); a 280ms lift with a
   200ms dim; every plate's faces fading their fill and stroke (a repaint of
   the whole stack each frame); the names rail's links animating their
   height (layout each frame); and the detail waiting 50ms, then fading
   240ms. Now only transform and opacity move, on their own layers, in 140ms
   or less; colours change at once; the detail is in within 120ms. */
.layer-box__look { transition: transform 140ms var(--motion-ease-out), opacity 100ms linear; will-change: transform, opacity; }
.layer-box__label { transition: transform 140ms var(--motion-ease-out); will-change: transform; }
.layer-box__plate[aria-selected="true"]:active .layer-box__look { transition-duration: 80ms; }
.layer-box__art path { transition: none; }
.layer-box__label b, .layer-box__label::before, .layer-box__square { transition-duration: 80ms; }
.layers-section--art .layer-box__link { transition: color 80ms linear; }
.layer-box.is-ready .layer-box__panel { transition: opacity 120ms var(--motion-ease-out), transform 120ms var(--motion-ease-out), visibility 0s; contain: layout style; }
.layer-box.is-ready .layer-box__panel[data-hidden] { transition: opacity 60ms linear, transform 0s 60ms, visibility 0s 60ms; }
.layer-box.is-ready :is(.layer-iso__tags, .layer-box__cells), .layer-box.is-ready [data-hidden] :is(.layer-iso__tags, .layer-box__cells) { transition: none; }
.layer-box__stack { contain: layout style; }

/* Rohit's diagram text, 27 Nov (his review: the Desktop app's and Terminal's
   lines longer, Your systems six chips where it was five). The three interface
   cards keep one height — each line holds room for the longest, so their tops
   and feet stay level — and the tray's six share its width, the empty "more"
   ring taking only its own. */
.art-iface > span:last-child { min-height: 4lh; }
.art-panel.art-tray { gap: var(--space-1); padding-inline: var(--space-2); }
.art-tray .art-person.is-more { flex: 0 0 32px; }
@media (max-width: 1439px) {
  /* the narrower stage: the tray in two rows of four (six systems and the
     "more" ring), and a fifth line's room in the interface cards */
  .art-panel.art-tray { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3) var(--space-1); padding: var(--space-3) var(--space-2); }
  .art-tray .art-person.is-more { flex: none; }
  .art-iface > span:last-child { min-height: 5lh; }
}

/* ==========================================================================
   K. EACH PLATE ITS OWN FACE (28 Nov, a sketch: /explorations/platform-
   layers/box-faces.html; .layers-section--faces; user, after
   hairline.lucasmarkes.com: "make the top part of architecture 3d shape hover
   friendly with things to hover or feel upon … I also want the layer SVG to
   look different based on its counterpart"). Markup: platform-layers.mjs
   (FACES); the pointer: assets/js/layer-faces.js.
   One grammar for the seven: 1px lines in the plate's own colour lifted
   toward the heading colour; standing things filled with the plate, so they
   hide what is behind them; one lit colour a plate — Ember on Your teams
   (people), the heading colour on the four Sage plates (Sage would not show
   on Sage), Sage on the models and your systems.
   The stack opens where it is pointed at: the plates above the chosen one
   rise 26px and turn to outlines, their faces off, so the chosen face shows
   whole. Only transform and opacity move; fills change at once.
   ========================================================================== */
.layers-section--faces .layer-box__plate {
  --face-ink: color-mix(in oklab, var(--c) 72%, var(--heading));   /* near the plate's own colour, so the lit copy stands clear of it */
  --face-fill: color-mix(in oklab, var(--c) 50%, var(--ground));
  --lit: var(--heading);
  --up: 0;
}
.layers-section--faces .layer-box__plate--teams { --lit: var(--ember-orange); }
.layers-section--faces :is(.layer-box__plate--models, .layer-box__plate--systems) { --lit: var(--sage-green); }
.layers-section--faces .layer-box__rim { display: none; }

.layer-face * { vector-effect: non-scaling-stroke; stroke-width: 1; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.face-l { fill: none; stroke: var(--face-ink); }
.face-l--dash { stroke-dasharray: 3 3; opacity: 0.7; }
.face-l--solid { fill: var(--face-ink); }
.face-f { fill: var(--face-fill); stroke: var(--face-ink); }
.face-f--left { fill: color-mix(in oklab, var(--c) 34%, var(--ground)); }
.face-f--right { fill: color-mix(in oklab, var(--c) 24%, var(--ground)); }
.face-f--wall { fill-opacity: 0.55; }
.face-f--body { stroke: none; }
/* the lit copy of a thing, over it */
.face-lit { opacity: 0; transition: opacity 120ms linear; }
.face-lit .face-l { stroke: var(--lit); }
.face-lit .face-l--solid { fill: var(--lit); }
.face-lit .face-f { stroke: var(--lit); fill: color-mix(in oklab, var(--lit) 18%, var(--face-fill)); }
.face-lit .face-f--left { fill: color-mix(in oklab, var(--lit) 12%, color-mix(in oklab, var(--c) 34%, var(--ground))); }
.face-lit .face-f--right { fill: color-mix(in oklab, var(--lit) 8%, color-mix(in oklab, var(--c) 24%, var(--ground))); }
.face-i.is-on > .face-lit, .face-i.is-on > .face-cap > .face-lit { opacity: 1; }
.face-i { transition: transform 160ms var(--motion-ease-out); }

/* each face's own answer */
.layer-face--teams .face-i { transition: transform 100ms linear; }                       /* the script sets how far each stands */
.layer-face--teams .face-lit { transition: opacity 100ms linear; }
.layer-face--interfaces .face-i.is-on { transform: translateY(-10px); }                  /* the window lifts off its footprint */
/* the checklist: a done step is ticked, the step the run has reached shows a dot in its box */
.layer-face--workflows .face-l--title { stroke-width: 2; }
.layer-face--workflows :is(.face-tick, .face-run) { opacity: 0; }
.layer-face--workflows .face-lit .face-tick { opacity: 1; }
.layer-face--workflows .is-now .face-lit .face-tick { opacity: 0; }
.layer-face--workflows .is-now .face-lit .face-run { opacity: 1; }
.layer-face--harness .face-i--cell > .face-lit { transform: translateY(4px); transition: opacity 120ms linear, transform 160ms var(--motion-ease-out); }
.layer-face--harness .face-i--cell.is-on > .face-lit { transform: none; }                /* the sandbox comes up out of its cell */
.layer-face--context .face-stem { opacity: 0; transition: opacity 120ms linear; }
.layer-face--context .face-node { transition: transform 160ms var(--motion-ease-out); }
.layer-face--context .is-now .face-node { transform: translateY(-6px); }                 /* the node pointed at, up on its stem */
.layer-face--context .is-now .face-stem { opacity: 1; }
.layer-face--models :is(.face-body, .face-cap) { transition: transform 100ms linear; }   /* the script sets each pillar's height */
.layer-face--systems .face-plug { opacity: 0; transition: transform 180ms var(--motion-ease-out), opacity 120ms linear; }   /* out of sight until its block is pointed at */
.layer-face--systems .is-on .face-plug { opacity: 1; transform: translateY(12px); }      /* the plug drops into its port */

/* the stack, open at the chosen plate */
.layers-section--faces .layer-box__stack { --open: 0; --rise-on: 0; }
@media (hover: hover) and (pointer: fine) and (min-width: 1152px) {
  .layers-section--faces .layer-box__stack:hover { --open: 1; --rise-on: 1; }
}
.layers-section--faces .layer-box__stack:has(:focus-visible) { --open: 1; --rise-on: 1; }
@media (max-width: 1151px) {
  .layers-section--faces .layer-box.is-ready .layer-box__stack { --open: 1; --rise-on: 0; }
}
.layers-section--faces .layer-box__plate:has(~ .layer-box__plate[aria-selected="true"]) { --up: var(--open); }
.layers-section--faces .layer-box__plate:has(~ .layer-box__plate[aria-selected="true"]) .layer-box__look { transform: translateY(calc(var(--rise-on) * -26px)); }
.layers-section--faces .layer-box__plate:has(~ .layer-box__plate[aria-selected="true"]) .layer-box__label { transform: translateY(calc(var(--rise-on) * -26px * var(--k))); }
.layers-section--faces .layer-box__top { fill-opacity: calc(0.8 - var(--up) * 0.74); }
.layers-section--faces .layer-box__side { fill-opacity: calc(0.88 - var(--up) * 0.8); }
/* at rest the faces are quiet under the glass (36%; the chosen one 70%);
   in use the chosen face is at full strength and those above it are off */
.layers-section--faces .layer-face { opacity: calc(0.36 * (1 - var(--up))); transition: opacity 120ms linear; }
.layers-section--faces .layer-box__plate[aria-selected="true"] .layer-face { opacity: calc(0.7 + var(--open) * 0.3); }
/* in use: the plates below the chosen one step back to 40%, the outlines above it to 65% */
.layers-section--faces .layer-box__stack .layer-box__plate:not([aria-selected="true"]) .layer-box__look { opacity: calc(1 - var(--open) * (0.6 - var(--up) * 0.25)); }
@media (min-width: 1152px) {
  /* the names rail and the Governance bracket follow the plates that rose */
  .layers-section--faces .layer-box__plate:has(+ .layer-box__plate[aria-selected="true"]) .layer-box__link { height: calc(var(--step) - 14px + var(--rise-on) * 26px * var(--k)); }
  .layers-section--faces .layer-box__stack:has(.layer-box__plate--interfaces ~ .layer-box__plate[aria-selected="true"]) .layer-box__gov { translate: 0 calc(var(--rise-on) * -26px * var(--k)); height: calc(4 * var(--step) + 12px * var(--k) + var(--rise-on) * 26px * var(--k)); }
  .layers-section--faces .layer-box__stack:has(.layer-box__plate--systems[aria-selected="true"]) .layer-box__gov { height: calc(4 * var(--step) + 12px * var(--k)); }
}

/* Every plate's whole outline over the stack while the pointer is in it,
   the chosen plate's on top and the rest by how near they are to it (the
   script sets the order): the pointer stays with the open face, where the
   plates above it would take it, and leaving it lands on the plate next
   to it. */
.layer-faces__hit { position: absolute; left: 0; top: calc(var(--i) * var(--step)); z-index: 10; width: calc(320px * var(--k)); height: calc(172px * var(--k)); overflow: visible; pointer-events: none; }
.layer-faces__hit path { fill: none; stroke: none; pointer-events: none; cursor: pointer; }
.layer-box__stack.is-engaged .layer-faces__hit path { pointer-events: fill; }

@media (prefers-reduced-motion: reduce) {
  .layer-face *, .face-i, .face-lit { transition: none !important; }
}

/* Plain ground (28 Nov, illustration audit): the box's 4px vertical hairline
   texture goes, as the dot grid did */
.layer-box { background: var(--ground); }

/* THE SUPABASE PASS (28 Nov, user: "on architecture, maybe we can quiet down
   on the greens"): the detail drawings go quiet — the playbook list's ticks,
   the interface windows' edges and the teams' glow. The four adopted plates
   keep their Sage ramp at rest (28 Nov, later, user: "interfaces, playbooks,
   server first harness and context engine should look green from start";
   their faces were grey for an hour, green only when chosen). */
.art-list .icon { color: var(--ink-muted); }
.art-win { border-color: var(--art-edge); }
.art-glow { background: radial-gradient(closest-side, color-mix(in srgb, var(--accent-text) 4%, transparent), transparent); }
