/* Hallmark · Sapphire detail pass · scope: five technical pages · signature: white modules, pale blue working surfaces, sapphire active routes. */
/* Critique: reserve saturated colour for the current operation; separate labels, values and structural lines without changing diagram geometry. */
/* Hallmark · answered F15 · The 48px editorial split separates headline from copy; 40px separates the operator input from its route, while 32px connects equal process steps. These gaps describe different layout levels. */
:root {
  --technical-grid: rgb(32 89 237 / .055);
  --technical-active-line: #82a6ff;
  --technical-hover: #f0f5ff;
  --technical-memory: #dce8ff;
  --technical-track: #e3edff;
  --technical-inset: rgb(32 89 237 / .07);
}

/* Detailed D100 topology: routing stays precise; quiet grid and white PE faces let the active memory group lead. */
.d100-blueprint {
  --d100-paper: var(--sapphire-paper);
  --d100-silver: var(--technical-memory);
  --d100-line: var(--sapphire-line);
  --d100-blue: var(--sapphire);
  --d100-deep: var(--sapphire-deep);
  --d100-text: var(--sapphire-ink);
  --d100-muted: var(--sapphire-muted);
  --d100-soft: var(--sapphire-white);
  --d100-grid: var(--technical-grid);
  border-color: var(--sapphire-line);
}
.d100-map { border-bottom-width: 3px; }
.d100-node { border-bottom-width: 3px; }
.d100-node[data-d100-kind="memory"] { border-color: var(--technical-active-line); }
.d100-node.is-active { border-color: var(--sapphire); }
.d100-heading h2, .d100-caption strong { font-weight: 600; text-wrap: balance; }
.d100-caption p { color: var(--sapphire-text); }
.d100-choices .d100-choice[aria-pressed="false"] { background: var(--sapphire-paper); color: var(--sapphire-muted); }

/* Execution and accounting distinguish a selected unit from its numerical result. */
.execution-unit[aria-selected="true"] { background: var(--sapphire-ice); border-color: var(--technical-active-line); box-shadow: inset 0 3px var(--sapphire); }
.execution-unit small, .storage-hierarchy span, .execution-note p { color: var(--sapphire-text); }
.instruction-stream { border: 1px solid var(--sapphire-line); }
.instruction-stream > span { color: var(--sapphire-ink); font-weight: 600; }
.instruction-stream ol { color: var(--sapphire-muted); }
.astryx-arch-control [role="radiogroup"] { gap: 8px; padding: 4px; background: var(--sapphire-white); border: 1px solid var(--sapphire-line); border-radius: 8px; color: var(--sapphire-text); }
.astryx-arch-control [role="radio"] { background: var(--sapphire-white); color: var(--sapphire-text); border-radius: 4px; box-shadow: none; }
.astryx-arch-control [role="radio"] span { color: inherit; }
.astryx-arch-control [role="radio"][aria-checked="true"] { background: var(--sapphire-ice); color: var(--sapphire-deep); box-shadow: inset 0 -3px var(--sapphire); }
.astryx-arch-control [role="radio"]:hover { background: var(--technical-hover); color: var(--sapphire-deep); }
.astryx-arch-control [role="radio"]:active { background: var(--technical-memory); }
.astryx-arch-control [role="radio"]:focus-visible { outline: 2px solid var(--sapphire); outline-offset: 2px; }
.ledger-value output { color: var(--sapphire); }
.ledger-value > span { color: var(--sapphire-muted); }
.expert-cell { background: var(--sapphire-white); }
.expert-cell.is-active { background: var(--sapphire); color: var(--sapphire-white); }
.ledger-formula { color: var(--sapphire-text); }
.ledger-formula b { font-weight: 600; }

/* Form chrome belongs to the Selector wrapper, not its inner combobox button. */
body[data-page="products"] .config-field { border-color: var(--sapphire-line); }
body[data-page="products"] .config-field > span { color: var(--sapphire-ink); }
body[data-page="products"] .config-field > span b { color: var(--sapphire-muted); }
body[data-page="products"] .config-field :is(select,:has(> [role="combobox"])) {
  background: var(--sapphire-paper);
  border: 1px solid var(--sapphire-line);
  border-radius: 8px;
  color: var(--sapphire-ink);
  box-shadow: inset 0 1px 2px var(--technical-inset);
}
body[data-page="products"] .config-field [role="combobox"] { color: var(--sapphire-ink); background: none; font-family: var(--font-body); }
body[data-page="products"] .config-field :is(select,:has(> [role="combobox"])):hover { border-color: var(--technical-active-line); background: var(--sapphire-white); }
body[data-page="products"] .config-field :has(> [role="combobox"]):focus-within { border-color: var(--sapphire); outline: 2px solid var(--sapphire); outline-offset: 3px; }
body[data-page="products"] .config-field select:focus-visible { outline: 2px solid var(--sapphire); outline-offset: 3px; }
body[data-page="products"] .recommendation { background: var(--sapphire-ice); }
body[data-page="products"] .recommendation-specs { border-color: var(--sapphire-line); }
body[data-page="products"] .recommendation-specs > div { border-color: var(--sapphire-line); }
body[data-page="products"] .recommendation-specs b { color: var(--sapphire-ink); font-variant-numeric: tabular-nums; }
.selection-tabs button[aria-selected="true"] { background: var(--sapphire-ice); }
.constraint-map { background: var(--sapphire-paper); border: 1px solid var(--sapphire-line); }
.constraint-node { background: var(--sapphire-white); border-color: var(--sapphire-line); border-radius: 6px; }
.constraint-node strong { color: var(--sapphire-ink); }
.constraint-node:last-child { background: var(--sapphire-ice); border-color: var(--technical-active-line); box-shadow: none; }
.constraint-node:last-child strong { color: var(--sapphire-deep); }

/* The compiler's active stage uses a quiet fill and a continuous blue lower edge. */
.software-hero .compiler-route { background: var(--sapphire-white); border-color: var(--sapphire-line); }
.software-hero .compiler-step { background: var(--sapphire-white); border-color: var(--sapphire-line); }
.software-hero .compiler-step:hover { background: var(--technical-hover); }
.software-hero .compiler-step[aria-selected="true"] { background: var(--sapphire-ice); color: var(--sapphire-ink); box-shadow: inset 0 -3px var(--sapphire); }
.software-hero .compiler-step[aria-selected="true"] :is(.compiler-number,.compiler-kind,.compiler-step-arrow) { color: var(--sapphire-deep); }
.software-hero .compiler-step:active { background: var(--technical-memory); color: var(--sapphire-ink); }
.software-hero .compiler-io dt { color: var(--sapphire-muted); }
.software-hero .compiler-io dd { color: var(--sapphire-ink); }

/* A single horizontal journey replaces the thin framed list and its empty half-screen. */
.evolution-refined.software-evolution { background: var(--sapphire-paper); padding-block: 72px; }
.evolution-refined .evolution-intro { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.85fr); gap: 48px; align-items: end; }
.evolution-refined .software-section-lead { margin: 0; max-width: 38em; color: var(--sapphire-text); }
.evolution-refined .operator-journey { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,3fr); gap: 40px; align-items: stretch; margin-top: 36px; padding: 28px 32px; border: 0; border-radius: 14px; background: var(--sapphire-white); }
.evolution-refined .operator-origin { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 16px; border: 0; padding: 0 20px 0 0; }
.evolution-refined .operator-origin strong { color: var(--sapphire-ink); font-size: 20px; font-weight: 600; line-height: 1.5; }
.evolution-refined .operator-inputs { display: flex; flex-wrap: wrap; gap: 8px; }
.evolution-refined .operator-inputs span { display: inline-flex; align-items: center; margin: 0; padding: 8px; color: var(--sapphire-deep); background: var(--sapphire-ice); border-radius: 4px; font-size: 13px; line-height: 1.5; }
.evolution-refined .operator-journey ol { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0; padding: 0; }
.evolution-refined .operator-journey li { display: flex; flex-direction: column; gap: 0; min-width: 0; padding: 16px 18px; border: 0; border-radius: 8px; background: var(--sapphire-paper); }
.evolution-refined .operator-journey li::before { content: none; }
.evolution-refined .operator-step-head { position: relative; display: grid; justify-items: center; margin-bottom: 8px; }
.evolution-refined .operator-step-index { position: absolute; inset: 0 auto auto 0; color: var(--sapphire-muted); font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.evolution-refined .operator-step-head svg { display: block; width: min(100%, 96px); height: auto; }
.evolution-refined .operator-journey h3 { margin: 0; font-size: 21px; line-height: 1.5; font-weight: 600; color: var(--sapphire-ink); text-wrap: balance; }
.evolution-refined .operator-journey li p { margin-top: 12px; max-width: 16em; color: var(--sapphire-text); font-size: 14px; line-height: 1.7; }
.evolution-refined .operator-boundary { margin: 20px 0 0; padding: 0; border: 0; color: var(--sapphire-muted); font-size: 12px; line-height: 1.8; }

.tw-choice[aria-selected="true"] { background: var(--sapphire-ice); border-color: var(--technical-active-line); box-shadow: inset 3px 0 var(--sapphire); }
.tw-choice[aria-selected="false"] { background: var(--sapphire-white); }
.tw-choice:active { background: var(--technical-memory); border-color: var(--sapphire); }
.tw-choice small, .tw-panel > p, .tw-panel dd { color: var(--sapphire-text); }
.tw-map { background: var(--sapphire-paper); border-color: var(--sapphire-line); }
.tw-node, .tw-evidence-node { background: var(--sapphire-white); border-color: var(--sapphire-line); border-radius: 6px; }
.tw-node[data-flow-node="3"], .tw-evidence-node[data-current="true"] { background: var(--sapphire-ice); border-color: var(--technical-active-line); }
.tw-map-heading strong, .tw-evidence-node strong { color: var(--sapphire-ink); font-weight: 600; }
.tw-map-heading span, .tw-evidence-node small, .tw-return { color: var(--sapphire-muted); }
.ws-scene { --ws-grid: var(--sapphire-line); --ws-text: var(--sapphire-ink); --ws-silver: var(--sapphire-muted); --ws-quiet: var(--sapphire-muted); --ws-ink: var(--sapphire-ink); }
.ws-three-label { background: var(--sapphire-white); border-color: var(--sapphire-line); }
.ws-three-label[data-active="true"] { background: var(--sapphire-ice); border-color: var(--technical-active-line); color: var(--sapphire-deep); }

/* Evidence tables and engineering nodes share a quiet label/value rhythm. */
.eng-table-head { background: var(--sapphire-paper); border-top-color: var(--sapphire); color: var(--sapphire-muted); }
.eng-evidence-row h3 { color: var(--sapphire-ink); }
.eng-evidence-row p { color: var(--sapphire-text); }
.eng-system { border-color: var(--sapphire-line); }
.eng-system.is-selected { background: var(--sapphire-ice); border-color: var(--technical-active-line); }
.eng-system strong { color: var(--sapphire-ink); }
.eng-system :is(small,span), .eng-system-detail dt { color: var(--sapphire-muted); }
.eng-system-detail dd { color: var(--sapphire-text); }
.ws-layer-key li[data-current="true"] { border-top-color: var(--technical-active-line); }
.ws-layer-key li[data-current="true"] strong { color: var(--sapphire-deep); font-weight: 600; }

/* The selected inference phase stays filled; working nodes use pale substrates. */
.ti-tab { background: var(--sapphire-white); border-color: var(--sapphire-line); color: var(--sapphire-muted); }
.ti-tab[aria-selected="true"] { background: var(--sapphire); color: var(--sapphire-white); border-color: var(--sapphire); }
.ti-tab:active { background: var(--sapphire-deep); color: var(--sapphire-white); border-color: var(--sapphire-deep); }
.ti-parallel-map, .ti-phase-map { background: var(--sapphire-paper); border-color: var(--sapphire-line); }
.ti-parallel-entry, .ti-parallel-exit, .ti-parallel-core, .ti-phase-node { background: var(--sapphire-white); border-color: var(--sapphire-line); }
.ti-parallel-core { border-top: 3px solid var(--technical-active-line); }
.ti-phase-core { background: var(--sapphire-ice); border-color: var(--technical-active-line); }
.ti-parallel-core strong, .ti-phase-node strong { color: var(--sapphire-ink); font-weight: 600; }
.ti-note > p, .ti-note dd, .sim-side > p { color: var(--sapphire-text); }
.ti-phase-map[data-phase="decode"] .ti-phase-cache { background: var(--sapphire-ice); border-color: var(--sapphire); }
.ti-context-tokens i, .ti-cache-cells i { background: var(--technical-track); border-color: var(--technical-active-line); }
.ti-context-tokens i.is-key, .ti-cache-cells i.is-key { background: var(--sapphire); border-color: var(--sapphire); }
.ti-phase-readout { border-color: var(--sapphire-line); }
.ti-phase-readout output { color: var(--sapphire); font-weight: 600; }
.sim-data { border-color: var(--sapphire-line); }
.sim-data span { color: var(--sapphire-muted); font-size: 12px; }
.sim-data b { color: var(--sapphire-ink); font-size: 14px; }
.sim-step-count b { color: var(--sapphire-deep); }
.ti-step-controls button:disabled { background: var(--sapphire-ice); border-color: var(--sapphire-line); color: var(--sapphire-muted); opacity: 1; cursor: not-allowed; }

@media (max-width: 760px) {
  .software-hero .compiler-step[aria-selected="true"] { box-shadow: inset 3px 0 var(--sapphire); }
  .evolution-refined.software-evolution { padding-block: 52px; }
  .evolution-refined .evolution-intro { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .evolution-refined .operator-journey { grid-template-columns: minmax(0,1fr); gap: 24px; margin-top: 28px; padding: 24px; }
  .evolution-refined .operator-origin { gap: 12px; padding: 0 0 24px; border-bottom: 1px solid var(--sapphire-line); }
  .evolution-refined .operator-journey ol { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .evolution-refined .operator-journey li { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 0 12px; padding: 12px; }
  .evolution-refined .operator-step-head { grid-row: 1 / 3; align-content: center; margin: 0; padding-top: 11px; }
  .evolution-refined .operator-journey h3 { font-size: 19px; }
  .evolution-refined .operator-journey li p { margin-top: 4px; max-width: none; }
}
