/* The take-apart explainer. Uses the site's own ivory, ink and accent (set per variant); hairline rules; 44px touch targets.
   The model is drawn clean: only hairline leaders and short labels sit over it. */
.ta { --ta-paper: #f4f0e7; --ta-ivory: #fbf8f1; --ta-ink: #142a3a; --ta-ink2: #254357; --ta-cognac: #a8572a; --ta-brass: #b58a52; --ta-muted: #5b6770; --ta-line: rgba(20, 42, 58, .18); --ta-stage: #e5dfd2;
  width: min(1320px, calc(100% - 32px)); margin: 0 auto; padding: 18px 0 64px; color: var(--ta-ink); font-family: var(--font-primary, Inter, system-ui, sans-serif); }
.ta *, .ta *::before, .ta *::after { box-sizing: border-box; }
.ta-kicker { margin: 0 0 4px; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ta-cognac); font-weight: 600; }
.ta h1 { margin: 0 0 6px; font-family: var(--font-display, Outfit, sans-serif); font-weight: 600; font-size: clamp(2.1rem, 4.2vw, 3.4rem); line-height: 1.05; letter-spacing: -.03em; color: var(--ta-ink); }
.ta-lede { margin: 0 0 16px; max-width: 70ch; font-size: 1.05rem; line-height: 1.55; color: var(--ta-ink2); }
.ta [hidden] { display: none !important; }
.ta-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ta-tool { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: minmax(0, 1fr) auto auto auto; grid-template-areas: "stage card" "bar card" "tabs card" "panel card"; height: min(calc(100dvh - var(--ta-head, 0px) - 24px), 880px); min-height: 600px; border: 1px solid var(--ta-line); background: var(--ta-ivory); overflow: hidden; }
.ta-sheet { display: contents; }
.ta-handle { display: none; }
/* wide screens: the tabs only choose between the layer list and the systems list under the picture */
.ta-tabs { grid-area: tabs; display: flex; gap: 0; padding: 0 10px; border-bottom: 1px solid var(--ta-line); }
.ta-tab[data-tab="controls"], .ta-tab[data-tab="read"] { display: none; }
.ta-tab { min-height: 38px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; background: none; font: 600 .88rem/1 var(--font-primary, Inter, sans-serif); color: var(--ta-muted); cursor: pointer; }
.ta-tab[aria-pressed="true"] { color: var(--ta-ink); border-bottom-color: var(--ta-cognac); }
.ta-tab:focus-visible { outline: 3px solid var(--ta-ink); outline-offset: -3px; }
.ta-sheet[data-tab="systems"] .ta-layers { display: none; }
.ta-sheet:not([data-tab="systems"]) .ta-systems { display: none; }
.ta-sysbadge { position: absolute; left: 10px; top: 10px; z-index: 3; min-height: 44px; padding: 8px 14px; border: 1px solid var(--ta-ink); background: rgba(251, 248, 241, .94); color: var(--ta-ink); font: 600 .84rem/1 var(--font-primary, Inter, sans-serif); cursor: pointer; }
.ta-sysbadge:hover { text-decoration: underline; text-underline-offset: 4px; }
.ta-sysbadge:focus-visible { outline: 3px solid var(--ta-ink); outline-offset: 2px; }
.ta-stage { grid-area: stage; position: relative; background: var(--ta-stage); min-height: 0; overflow: hidden; border-bottom: 1px solid var(--ta-line); }
.ta-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; outline-offset: -4px; }
.ta-stage canvas.dragging { cursor: grabbing; }
.ta-stage canvas:focus-visible { outline: 3px solid var(--ta-cognac); }
.ta-poster { position: absolute; inset: 0; transition: opacity .5s ease; }
.ta-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ta-live .ta-poster, .ta-live .ta-loading { opacity: 0; pointer-events: none; }
.ta-loading { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; text-align: center; color: var(--ta-muted); font-size: .9rem; opacity: 0; transition: opacity .3s; pointer-events: none; }
.ta-loading-model .ta-loading { opacity: 1; }
.ta-leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ta-leader { fill: none; stroke: var(--ta-ink); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0; }
.ta-leader.on { stroke: var(--ta-cognac); stroke-width: 1.4; }
.ta-labels { position: absolute; inset: 0; pointer-events: none; }
.ta-label { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; max-width: 190px; padding: 3px 9px; border: 0; border-left: 2px solid transparent; background: rgba(251, 248, 241, .86); backdrop-filter: blur(3px); color: var(--ta-ink); font: 500 .76rem/1.25 var(--font-primary, Inter, sans-serif); text-align: left; cursor: pointer; white-space: nowrap; transition: opacity .25s, background .2s; }
.ta-label.on { background: var(--ta-ink); color: #fff; border-left-color: var(--ta-brass); }
.ta-dots { position: absolute; inset: 0; pointer-events: none; }
.ta-dot { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: 0; padding: 0; border: 1px solid var(--ta-ink); border-radius: 50%; background: rgba(251, 248, 241, .92); color: var(--ta-ink); font: 600 .66rem/1 var(--font-primary, Inter, sans-serif); display: grid; place-items: center; cursor: pointer; pointer-events: auto; opacity: 0; transition: opacity .25s; }
.ta-dot.on { background: var(--ta-ink); color: #fff; border-color: var(--ta-brass); }
.ta-dot-t { position: absolute; left: 30px; top: 50%; transform: translateY(-50%); display: none; padding: 3px 8px; background: var(--ta-ink); color: #fff; font: 500 .74rem/1.2 var(--font-primary, Inter, sans-serif); white-space: nowrap; z-index: 3; }
.ta-dot:hover .ta-dot-t, .ta-dot:focus-visible .ta-dot-t { display: block; }
.ta-dot:hover { z-index: 4; }
.ta-caption { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); margin: 0; max-width: min(640px, calc(100% - 32px)); padding: 10px 16px; background: rgba(20, 42, 58, .88); color: #fff; font-size: .95rem; line-height: 1.4; text-align: center; }
.ta-caption[hidden] { display: none; }
.ta-bare .ta-labels, .ta-bare .ta-leaders, .ta-bare .ta-caption, .ta-bare .ta-syslabels { display: none; }

.ta-bar { grid-area: bar; display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--ta-line); }
.ta-slide { flex: 1 1 280px; display: flex; align-items: center; gap: 14px; min-width: 0; }
.ta-slide label { font: 600 .9rem/1 var(--font-primary, Inter, sans-serif); white-space: nowrap; }
.ta-slide input[type=range] { flex: 1; min-width: 120px; height: 44px; accent-color: var(--ta-cognac); background: transparent; cursor: pointer; }
.ta-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ta-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; background: var(--ta-cognac); color: #fff; border: 1px solid var(--ta-cognac); font: 600 .9rem/1.1 var(--font-primary, Inter, sans-serif); cursor: pointer; text-decoration: none; }
.ta-btn:hover { text-decoration: underline; text-underline-offset: 4px; }
.ta-btn-quiet { background: #fff; color: var(--ta-ink); border-color: var(--ta-line); }
.ta-btn-quiet[aria-pressed="true"] { background: var(--ta-ink); color: #fff; border-color: var(--ta-ink); }
.ta-btn:focus-visible, .ta-chip:focus-visible, .ta-link:focus-visible, .ta-label:focus-visible, .ta-slide input:focus-visible { outline: 3px solid var(--ta-ink); outline-offset: 2px; }
.ta-stills[hidden] { display: none; } .ta-stills { display: flex; gap: 8px; flex-wrap: wrap; }

.ta-systems { grid-area: panel; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 14px; border-bottom: 1px solid var(--ta-line); }
.ta-systems-h { flex: 0 0 auto; margin: 0; font: 600 .9rem/1 var(--font-primary, Inter, sans-serif); }
.ta-systems-help { display: none; }
.ta-syschips { flex: 0 1 auto; }
.ta-systems-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
.ta-systems .ta-chip, .ta-layers .ta-chip { min-height: 36px; }
.ta-systems-act .ta-btn { min-height: 40px; padding: 6px 14px; }
.ta-flow-note { font-size: .82rem; color: var(--ta-muted); }
.ta-sw { display: block; flex: none; }
.ta-chip-sw { display: inline-flex; align-items: center; gap: 4px; }
.ta-chip-tag, .ta-syslabel-tag { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; background: var(--sw); color: #fff; font: 700 .72rem/1 var(--font-primary, Inter, sans-serif); }
.ta-syschip { padding-left: 8px; }
.ta-chip.ta-syschip[aria-pressed="true"] { background: #fff; color: var(--ta-ink); border: 2px solid var(--ta-ink); padding: 5px 11px 5px 7px; font-weight: 700; }
.ta-syschip[aria-pressed="true"]::before { content: "\2713"; font-weight: 700; margin-right: -2px; }
.ta-syschip:focus-visible { outline: 3px solid var(--ta-ink); outline-offset: 2px; }
.ta-syslabels { position: absolute; inset: 0; pointer-events: none; }
.ta-syslabel { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; max-width: 200px; padding: 3px 9px 3px 3px; border: 2px solid var(--sw); background: rgba(251, 248, 241, .95); color: var(--ta-ink); font: 600 .76rem/1.2 var(--font-primary, Inter, sans-serif); white-space: nowrap; opacity: 0; pointer-events: none; cursor: pointer; transition: opacity .25s; }
.ta-syslabel.on { background: var(--ta-ink); color: #fff; }
.ta-syslabel:focus-visible { outline: 3px solid var(--ta-ink); outline-offset: 2px; }
.ta-legend { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: .88rem; line-height: 1.4; color: var(--ta-ink2); }
.ta-hw { margin: 14px 0; padding: 12px 14px; background: #fff; border-left: 3px solid var(--ta-cognac); }
.ta-hw p { margin: 0 0 6px; }
.ta-hw-taps { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.ta-hw-taps .ta-btn { min-height: 40px; padding: 6px 12px; font-size: .86rem; }
.ta-hw-out { font-size: .98rem; line-height: 1.5; color: var(--ta-ink); }
.ta-hw-sub { font-size: .84rem; color: var(--ta-ink2); }
.ta-hw-l { display: block; margin: 8px 0 0; font-size: .86rem; font-weight: 600; color: var(--ta-ink); }
.ta-hw-row { display: flex; align-items: center; gap: 10px; }
.ta-hw-row input[type=range] { flex: 1; min-width: 100px; height: 44px; accent-color: var(--ta-cognac); background: transparent; cursor: pointer; }
.ta-hw-row output { min-width: 3.5em; font: 600 .9rem/1 var(--font-primary, Inter, sans-serif); color: var(--ta-ink); }
.ta-hw-row input:focus-visible { outline: 3px solid var(--ta-ink); outline-offset: 2px; }
.ta-hw-how summary { cursor: pointer; font-weight: 600; font-size: .88rem; min-height: 40px; display: flex; align-items: center; }
.ta-hw-t { width: 100%; border-collapse: collapse; font-size: .82rem; margin: 4px 0; }
.ta-hw-t th { text-align: left; font-weight: 600; padding: 3px 8px 3px 0; vertical-align: top; width: 38%; }
.ta-hw-t td { padding: 3px 0; }
.ta-hw-f { font-size: .8rem; color: var(--ta-ink2); margin: 6px 0; }
.ta-hw-facts { margin: 6px 0; padding-left: 16px; font-size: .78rem; line-height: 1.45; color: var(--ta-ink2); }
.ta-hw-facts a { color: var(--ta-ink2); }
.ta-stack-sys { margin-top: 28px; }
.ta-layers { grid-area: panel; padding: 10px 14px 12px; }     /* every chip is always fully visible: the row grows to hold them, the picture above gives up the room */
.ta-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ta-chip { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px 6px 8px; background: #fff; border: 1px solid var(--ta-line); color: var(--ta-ink); font: 500 .84rem/1.1 var(--font-primary, Inter, sans-serif); cursor: pointer; }
.ta-chip-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ta-paper); font-size: .72rem; font-weight: 600; color: var(--ta-ink2); }
.ta-chip:hover { border-color: var(--ta-ink); }
.ta-chip[aria-pressed="true"] { background: var(--ta-ink); color: #fff; border-color: var(--ta-ink); }
.ta-chip[aria-pressed="true"] .ta-chip-n { background: #fff; color: var(--ta-ink); }

.ta-card { grid-area: card; min-height: 0; padding: 22px 22px 20px; border-left: 1px solid var(--ta-line); background: var(--ta-ivory); overflow-y: auto; overscroll-behavior: contain; }
.ta-card-kicker { margin: 0 0 4px; font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ta-cognac); font-weight: 600; }
.ta-card-title { margin: 0 0 4px; font-family: var(--font-display, Outfit, sans-serif); font-size: 1.5rem; line-height: 1.15; font-weight: 600; color: var(--ta-ink); }
.ta-card-tag { margin: 0 0 12px; font-size: .95rem; font-style: italic; color: var(--ta-ink2); }
.ta-card-text { margin: 0 0 12px; font-size: .98rem; line-height: 1.6; color: var(--ta-ink2); }
.ta-ask, .ta-trade-box { margin: 14px 0; padding: 12px 14px; background: #fff; border-left: 3px solid var(--ta-brass); }
.ta-trade-box { border-left-color: var(--ta-ink); background: var(--ta-paper); }
.ta-ask p, .ta-trade-box p { margin: 0; font-size: .94rem; line-height: 1.55; color: var(--ta-ink); }
.ta-ask-label { font-size: .72rem !important; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--ta-cognac) !important; margin-bottom: 4px !important; }
.ta-card-more { font-size: .85rem; color: var(--ta-muted); margin: 6px 0 0; }
.ta-src { margin: 8px 0 0; padding: 0 0 0 16px; font-size: .78rem; line-height: 1.4; } .ta-src a { color: var(--ta-ink2); }
.ta-card-nav { display: flex; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.ta-link { min-height: 40px; padding: 4px 0; border: 0; background: none; color: var(--ta-cognac); font: 600 .9rem/1 var(--font-primary, Inter, sans-serif); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.ta-link:disabled { color: var(--ta-muted); cursor: default; text-decoration: none; }

/* No 3D: the stacked pictures and the words carry the page. */
.ta-stack { list-style: none; margin: 40px 0 0; padding: 0; display: none; gap: 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ta-nogl .ta-stack, .no-webgl .ta-stack { display: grid; }
.ta-nogl .ta-tool, .no-webgl .ta-tool { display: none; }
.ta-stack-item { display: grid; gap: 10px; align-content: start; }
.ta-stack-item img { width: 100%; height: auto; display: block; background: var(--ta-stage); border: 1px solid var(--ta-line); }
.ta-stack h3 { margin: 0; font-family: var(--font-display, Outfit, sans-serif); font-size: 1.25rem; }
.ta-stack-n { margin: 0; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ta-cognac); font-weight: 600; }
.ta-stack ul { margin: 6px 0; padding-left: 18px; line-height: 1.55; color: var(--ta-ink2); }
.ta-stack summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; }
noscript .ta-stack, .ta-noscript .ta-stack { display: grid; }

.ta-sources { margin-top: 44px; max-width: 78ch; }
.ta-sources h2 { font-family: var(--font-display, Outfit, sans-serif); font-size: 1.3rem; margin: 0 0 6px; }
.ta-sources p, .ta-sources li { font-size: .9rem; line-height: 1.55; color: var(--ta-ink2); }
.ta-sources a { color: var(--ta-ink2); }
.ta-cta { margin: 28px 0 0; }

@media (max-width: 1100px) and (min-width: 761px) {
  .ta-tool { grid-template-columns: minmax(0, 1fr) 320px; }
}
/* Phone and small tablets: the 3D view is pinned to the top of the screen and everything else lives in a sheet under it. */
@media (max-width: 760px) {
  .ta { width: min(1320px, calc(100% - 16px)); padding-top: 10px; }
  .ta-tool { display: flex; flex-direction: column; grid-template: none; height: calc(100dvh - var(--ta-head, 0px) - 12px); min-height: 520px; max-height: 900px; }
  .ta-stage { flex: 0 0 55%; border-bottom: 0; transition: flex-basis .25s ease; }
  .ta-tool[data-sheet="tall"] .ta-stage { flex-basis: 15%; }
  .ta-sheet { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; background: var(--ta-ivory); border-top: 1px solid var(--ta-line); box-shadow: 0 -6px 18px rgba(20, 42, 58, .08); position: relative; }
  .ta-handle { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 28px; padding: 0; border: 0; background: none; cursor: pointer; touch-action: none; }
  .ta-handle span { width: 44px; height: 5px; border-radius: 3px; background: var(--ta-line); }
  .ta-tab[data-tab="controls"], .ta-tab[data-tab="read"] { display: block; }
  .ta-sheet[data-tab="systems"] .ta-layers { display: none; }
  .ta-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--ta-line); padding: 0 6px; order: -1; } /* above the panels on a phone; after the controls in the reading order */
  .ta-handle { order: -2; }
  .ta-tab { flex: 1; min-height: 44px; padding: 0; border: 0; border-bottom: 3px solid transparent; background: none; font: 600 .9rem/1 var(--font-primary, Inter, sans-serif); color: var(--ta-muted); cursor: pointer; }
  .ta-tab[aria-pressed="true"] { color: var(--ta-ink); border-bottom-color: var(--ta-cognac); }
  .ta-tab:focus-visible, .ta-handle:focus-visible { outline: 3px solid var(--ta-ink); outline-offset: -3px; }
  .ta-panel { display: none; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border: 0; padding-bottom: 76px; }
  .ta-sheet[data-tab="controls"] .ta-bar, .ta-sheet[data-tab="layers"] .ta-layers, .ta-sheet[data-tab="systems"] .ta-systems, .ta-sheet[data-tab="read"] .ta-card { display: flex; flex: 1 1 0; }
  .ta-systems { flex-direction: column; align-items: stretch; padding: 10px 12px; border-bottom: 0; gap: 8px; }
  .ta-systems-h { display: flex; flex-direction: column; gap: 4px; }
  .ta-systems-help { display: block; font-weight: 400; font-size: .84rem; color: var(--ta-muted); line-height: 1.4; }
  .ta-systems-act { margin-left: 0; }
  .ta-syslabel { font-size: .68rem; max-width: 150px; padding-right: 7px; }
  .ta-bar { flex-direction: column; align-items: stretch; padding: 8px 12px; gap: 4px; }
  .ta-slide { flex: 0 0 auto; }
  .ta-layers { max-height: none; padding: 10px 12px; flex-direction: column; }
  .ta-card { padding: 14px 16px; flex-direction: column; border-left: 0; grid-area: auto; }
  .ta-chips { flex-wrap: wrap; overflow: visible; }
  .ta-chip { flex: 0 0 auto; }
  .ta-btn { min-height: 44px; padding: 6px 12px; font-size: .86rem; }
  .ta-label { font-size: .7rem; max-width: 150px; }
  .ta-stack { grid-template-columns: minmax(0, 1fr); }
  .ta-caption { bottom: 10px; font-size: .86rem; padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) { .ta-poster, .ta-label, .ta-loading, .ta-stage, .ta-dot, .ta-syslabel { transition: none; } }
body.ta-page { overflow-x: clip; }
