/* Hallmark · theme: locked Silicon studio bright · shape: technical workbenches · signature: workload routing and a visible KV-cache loop */
/* Critique: native labels remain readable while original data routes explain parallel work and the two phases of autoregressive inference. */
/* Hallmark · waive 80 · BP P14 and documented cache mechanics supply the relationships · original diagrams explain those relationships without copied product art. */
/* Hallmark · answered F15 · section workbenches share 32px columns; diagram-node and input-control gaps follow their own internal topology. */
:root {
  --ti-paper: var(--bright-paper, #f3f9fc);
  --ti-white: var(--bright-white, #ffffff);
  --ti-ink: var(--bright-ink, #102c40);
  --ti-muted: var(--bright-muted, #4d687a);
  --ti-line: var(--bright-line, #c4dbe5);
  --ti-blue: var(--bright-blue, #0b59db);
  --ti-teal: var(--bright-teal, #077779);
  --ti-night: var(--lab-studio-ink, #08131f);
  --ti-panel: var(--lab-studio-panel, #101f2d);
  --ti-raised: var(--lab-studio-panel-raised, #182b39);
  --ti-signal: var(--lab-studio-signal, #7ce4d2);
  --ti-silver: var(--lab-studio-silver, #b3c2c8);
  --ti-dark-line: #385566;
  --ti-path: #477685;
  --ti-blue-light: #9ac9ff;
  --ti-blue-wash: #e5efff;
  --ti-mint-wash: #e6f6f1;
  --ti-clear: transparent;
  --ti-font: var(--font-body, sans-serif);
  --ti-gap: 24px;
  --ti-section-space: 80px;
  --ti-radius: 8px;
}
.ti-section { padding-block: var(--ti-section-space); color: var(--ti-ink); background: var(--ti-white); font-family: var(--ti-font); scroll-margin-top: 96px; }
.ti-section + .lab-cta { margin-top: var(--ti-section-space); }
.ti-section .ti-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .72fr); gap: 32px; align-items: end; margin-bottom: 32px; }
.ti-head h2 { margin: 0; font-size: clamp(30px, 3.1vw, 43px); font-weight: 600; letter-spacing: -.035em; line-height: 1.25; text-wrap: balance; min-width: 0; overflow-wrap: break-word; }
.ti-head p { margin: 0; max-width: 45ch; color: var(--ti-muted); font-size: 16px; line-height: 1.75; text-wrap: pretty; }
.ti-section :is(button, a, input, [tabindex]):focus-visible { outline: 3px solid var(--ti-blue); outline-offset: 4px; }
.ti-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.ti-tab { min-height: 48px; padding: 12px 20px; border: 1px solid var(--ti-line); border-radius: 4px; background: var(--ti-white); color: var(--ti-muted); font: 500 14px/1.5 var(--ti-font); cursor: pointer; }
.ti-tab:hover { border-color: var(--ti-blue); color: var(--ti-blue); }
.ti-tab:active { background: var(--ti-blue-wash); }
.ti-tab[aria-selected="true"] { border-color: var(--ti-blue); background: var(--ti-blue); color: var(--ti-white); }
.ti-tab:disabled { opacity: .55; cursor: not-allowed; }
.ti-parallel-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 32px; align-items: stretch; }
.ti-parallel-map { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 32px; padding: 28px; min-height: 400px; border: 1px solid var(--ti-dark-line); border-radius: var(--ti-radius); background: var(--ti-night); color: var(--ti-white); isolation: isolate; }
.ti-parallel-map > :not(svg):not(.live-diagram-overlay) { position: relative; z-index: 1; }
.ti-parallel-entry, .ti-parallel-exit { display: flex; gap: 16px; align-items: center; justify-content: space-between; width: min(100%, 370px); justify-self: center; padding: 16px 20px; border: 1px solid var(--ti-dark-line); border-radius: 4px; background: var(--ti-panel); }
.ti-parallel-entry b, .ti-parallel-exit b { color: var(--ti-white); font-size: 15px; font-weight: 500; }
.ti-parallel-entry small, .ti-parallel-exit small { color: var(--ti-silver); font-size: 12px; }
.ti-route-symbol { width: 34px; height: 28px; flex-shrink: 0; fill: none; stroke: var(--ti-signal); stroke-width: 1.4; }
.ti-parallel-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-content: center; }
.ti-parallel-core { min-width: 0; padding: 16px 12px; border: 1px solid var(--ti-dark-line); border-radius: 4px; background: var(--ti-raised); }
.ti-parallel-core > span { display: block; color: var(--ti-silver); font-size: 12px; line-height: 1.5; }
.ti-parallel-core strong { display: block; margin-top: 8px; color: var(--ti-white); font-size: 14px; font-weight: 500; line-height: 1.55; overflow-wrap: break-word; }
.ti-core-work { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; width: 40px; height: 40px; margin-bottom: 16px; }
.ti-core-work i { border: 1px solid var(--ti-path); background: var(--ti-panel); }
.ti-core-work i.is-key { border-color: var(--ti-signal); background: var(--ti-signal); }
.ti-parallel-map[data-parallel-mode="data"] .ti-core-work i { border-color: var(--ti-blue-light); }
.ti-parallel-map[data-parallel-mode="pipeline"] .ti-core-work { grid-template-columns: minmax(0, 1fr); height: 40px; gap: 4px; }
.ti-parallel-map[data-parallel-mode="task"] .ti-core-work { border-radius: 50%; overflow: clip; }
.ti-parallel-links, .ti-phase-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.ti-parallel-link, .ti-phase-link { fill: none; stroke: var(--ti-path); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ti-parallel-map[data-parallel-mode="task"] .ti-parallel-link { stroke-dasharray: 4 5; }
.ti-parallel-map[data-parallel-mode="pipeline"] .ti-parallel-link { stroke: var(--ti-signal); }
.ti-notes { padding-block: 4px; }
.ti-note[hidden] { display: none; }
.ti-note h3 { margin: 0 0 16px; color: var(--ti-ink); font-size: clamp(22px, 2.1vw, 28px); font-weight: 600; line-height: 1.4; text-wrap: balance; min-width: 0; overflow-wrap: break-word; }
.ti-note > p { margin: 0; color: var(--ti-muted); font-size: 15px; line-height: 1.8; }
.ti-note dl { margin: 24px 0 0; }
.ti-note dl > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; padding-block: 16px; border-top: 1px solid var(--ti-line); }
.ti-note dt { color: var(--ti-teal); font-size: 13px; }
.ti-note dd { margin: 0; color: var(--ti-ink); font-size: 14px; line-height: 1.65; }
.ti-context-note { margin: 24px 0 0; padding-left: 16px; border-left: 2px solid var(--ti-blue); color: var(--ti-muted); font-size: 13px; line-height: 1.8; }
.ti-references { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--ti-line); color: var(--ti-muted); font-size: 12px; line-height: 1.8; }
.ti-references p { margin: 0 0 8px; }
.ti-reference-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.ti-reference-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ti-teal); text-decoration: underline; text-underline-offset: 4px; }
.ti-reference-links a:hover { color: var(--ti-blue); }
.ti-reference-links a:active { color: var(--ti-ink); }
.ti-phase-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; margin-bottom: 24px; }
.ti-phase-toolbar .ti-tabs { margin: 0; }
.ti-context-control { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 8px 16px; align-items: center; }
.ti-context-control label { color: var(--ti-muted); font-size: 14px; }
.ti-context-control output { text-align: right; color: var(--ti-blue); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ti-context-control input { grid-column: 1 / -1; width: 100%; min-height: 44px; margin: 0; accent-color: var(--ti-blue); cursor: pointer; }
.ti-phase-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 32px; }
.ti-phase-map { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, .8fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; min-height: 380px; padding: 28px; border: 1px solid var(--ti-dark-line); border-radius: var(--ti-radius); background: var(--ti-night); color: var(--ti-white); isolation: isolate; }
.ti-phase-map > :not(svg):not(.live-diagram-overlay) { position: relative; z-index: 1; }
.ti-phase-node { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 16px; border: 1px solid var(--ti-dark-line); border-radius: 4px; background: var(--ti-panel); }
.ti-phase-node strong { font-size: 15px; font-weight: 500; line-height: 1.5; }
.ti-phase-node small { color: var(--ti-silver); font-size: 12px; line-height: 1.6; }
.ti-phase-input { grid-column: 1; grid-row: 1; }
.ti-phase-cache { grid-column: 1; grid-row: 2; }
.ti-phase-core { grid-column: 2; grid-row: 1 / 3; border-color: var(--ti-signal); background: var(--ti-raised); }
.ti-phase-output { grid-column: 3; grid-row: 1 / 3; }
.ti-phase-core-symbol { width: 100%; max-width: 78px; height: 78px; margin-bottom: 8px; fill: none; stroke: var(--ti-signal); stroke-width: 1.2; }
.ti-context-tokens, .ti-cache-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; height: 32px; margin-block: 4px; }
.ti-context-tokens i, .ti-cache-cells i { border: 1px solid var(--ti-path); background: var(--ti-raised); }
.ti-context-tokens i.is-key { border-color: var(--ti-blue-light); background: var(--ti-blue-light); }
.ti-cache-cells i.is-key { border-color: var(--ti-signal); background: var(--ti-signal); }
.ti-phase-map[data-phase="decode"] .ti-phase-cache { border-color: var(--ti-signal); }
.ti-phase-map[data-phase="decode"] .ti-phase-link[data-link="reuse"] { stroke: var(--ti-signal); }
.ti-phase-output-symbol { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 12px; border: 1px solid var(--ti-signal); border-radius: 4px; color: var(--ti-signal); font-size: 24px; }
.ti-phase-readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; padding-block: 20px; border-block: 1px solid var(--ti-line); }
.ti-phase-readout > div { display: flex; flex-direction: column; gap: 8px; }
.ti-phase-readout span { color: var(--ti-muted); font-size: 12px; line-height: 1.5; }
.ti-phase-readout output { color: var(--ti-blue); font-size: 24px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.ti-step-controls { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.ti-step-controls button { min-height: 48px; padding: 12px 16px; border: 1px solid var(--ti-blue); border-radius: 4px; background: var(--ti-blue); color: var(--ti-white); font: 500 14px/1.5 var(--ti-font); cursor: pointer; }
.ti-step-controls button:hover { background: var(--ti-ink); border-color: var(--ti-ink); }
.ti-step-controls button:active { transform: translateY(1px); }
.ti-step-controls button:disabled { opacity: .5; cursor: not-allowed; background: var(--ti-muted); border-color: var(--ti-muted); }
.ti-step-controls .ti-step-reset { background: var(--ti-clear); color: var(--ti-blue); border-color: var(--ti-line); }
.ti-step-controls .ti-step-reset:hover { background: var(--ti-blue-wash); color: var(--ti-blue); border-color: var(--ti-blue); }
.ti-step-help { margin: 12px 0 0; color: var(--ti-muted); font-size: 12px; line-height: 1.7; }
.ti-conversation-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; color: var(--ti-teal); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.ti-conversation-link:hover { color: var(--ti-blue); }
.ti-conversation-link:active { color: var(--ti-ink); }
.ti-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: clip; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1000px) {
  .ti-parallel-layout, .ti-phase-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ti-parallel-map { min-height: 360px; }
  .ti-phase-map { min-height: 340px; }
  .ti-note dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .ti-note dl > div { display: block; }
  .ti-note dd { margin-top: 8px; }
}
@media (max-width: 680px) {
  .ti-section { padding-block: 56px; }
  .ti-section .ti-head { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 24px; }
  .ti-head h2 { font-size: 32px; }
  .ti-head p { font-size: 15px; }
  .ti-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ti-tab { padding-inline: 12px; }
  .ti-parallel-map { gap: 32px; min-height: 0; padding: 20px; }
  .ti-parallel-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
  .ti-parallel-core { padding: 16px; }
  .ti-parallel-entry, .ti-parallel-exit { padding: 12px; gap: 12px; }
  .ti-parallel-entry small, .ti-parallel-exit small { max-width: 10ch; text-align: right; }
  .ti-note dl { display: block; }
  .ti-note dl > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); }
  .ti-note dd { margin-top: 0; }
  .ti-phase-toolbar { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ti-context-control { padding: 16px 0 0; border-top: 1px solid var(--ti-line); }
  .ti-phase-map { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto auto; gap: 32px 24px; padding: 20px; min-height: 0; }
  .ti-phase-input { grid-column: 1; grid-row: 1; }
  .ti-phase-cache { grid-column: 2; grid-row: 1; }
  .ti-phase-core { grid-column: 1 / -1; grid-row: 2; min-height: 130px; padding-left: 104px; }
  .ti-phase-core-symbol { position: absolute; left: 20px; top: 26px; width: 64px; height: 64px; }
  .ti-phase-output { grid-column: 1 / -1; grid-row: 3; min-height: 100px; padding-left: 88px; }
  .ti-phase-output-symbol { position: absolute; left: 20px; top: 26px; }
  .ti-phase-node { padding: 16px; }
  .ti-phase-node strong { font-size: 14px; }
  .ti-phase-core { padding-left: 104px; }
  .ti-phase-output { padding-left: 88px; }
  .ti-phase-readout { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ti-section *, .ti-section *::before, .ti-section *::after { transition-duration: 0s; }
  .ti-step-controls button:active { transform: none; }
}
