/* Technology page (technology/). Uses the --pg-* tokens from pages.css, so it follows
   variation A light, A dark ([data-theme="dark"]) and variation B. Everything is visible
   without JS; tech.js adds .tx-js to <html> and turns the panels into tabs and filters. */

.tx-hl { color: var(--pg-hl); }
.tx-hero, .tx-arch, .tx-prods, .tx-stack, .tx-guard, .tx-custom { --tx-ease: cubic-bezier(.22, 1, .36, 1); --tx-ink: #15150f; }

/* ------------------------------------------------------------------ hero */
.tx-hero {
  overflow-x: clip;
  background-image:
    linear-gradient(var(--pg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--pg-grid) 1px, transparent 1px),
    var(--pg-hero);
  background-size: 44px 44px, 44px 44px, auto;
  background-position: center top;
}
.tx-hero .container { display: block; }
.tx-hero-copy { max-width: 860px; margin-inline: auto; text-align: center; }
.tx-hero-copy .crumbs, .tx-hero-copy .page-cta { justify-content: center; }
.tx-hero-copy .page-lede { margin-inline: auto; }
.tx-hero h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); }

.tx-engine { position: relative; max-width: 1100px; aspect-ratio: 1100 / 440; margin: clamp(32px, 5vw, 56px) auto 0; }
.tx-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tx-wire { fill: none; stroke: var(--pg-text); stroke-opacity: .25; stroke-width: 1.5; stroke-dasharray: 5 7; animation: tx-dash 1.4s linear infinite; }
.tx-wire-out { stroke: var(--pg-hl); stroke-opacity: .55; }
.tx-packet { fill: var(--pg-hl); }
.tx-packet-out { fill: var(--pg-c3); }
@keyframes tx-dash { to { stroke-dashoffset: -24; } }

.tx-srcs, .tx-outs, .tx-core-layers { list-style: none; margin: 0; padding: 0; }
.tx-src {
  position: absolute; left: var(--x); top: var(--y); width: clamp(34px, 4.2%, 48px); aspect-ratio: 1;
  translate: -50% -50%; border-radius: 13px; background: #fff; border: 1px solid var(--pg-line);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .1); display: grid; place-items: center;
  animation: tx-bob 4s ease-in-out infinite; animation-delay: calc(var(--d) * -1);
}
.tx-src img { width: 70%; height: 70%; object-fit: contain; }
@keyframes tx-bob { 50% { transform: translateY(-5px); } }

.tx-pill {
  position: absolute; left: var(--x); top: var(--y); translate: -50% -50%;
  font-size: .72rem; font-weight: 700; padding: .22rem .6rem; border-radius: 999px;
  background: var(--pg-surface); border: 1px solid var(--pg-line); color: var(--pg-muted); white-space: nowrap;
}
.tx-pill::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--pg-c3); margin-right: 6px; vertical-align: 1px; }

.tx-core {
  position: absolute; left: 40%; top: 8%; width: 20%; height: 84%;
  background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .14); padding: clamp(10px, 1.4vw, 18px);
  display: flex; flex-direction: column; gap: 8px;
}
.tx-core::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, var(--pg-c1), var(--pg-c2), var(--pg-c3)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
  border: 2px solid transparent; opacity: .9;
}
.tx-core-label { margin: 0 0 2px; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--pg-hl); text-align: center; }
.tx-core-layers { display: grid; gap: 6px; flex: 1; grid-auto-rows: 1fr; }
.tx-core-layers li {
  display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 10px;
  font-size: clamp(.68rem, 1.1vw, .86rem); font-weight: 700; color: var(--pg-text);
  background: var(--pg-alt); border: 1px solid var(--pg-line);
  animation: tx-pulse 6s ease-in-out infinite; animation-delay: calc(var(--i) * 1s);
}
.tx-core-layers span { font-family: var(--mono, ui-monospace, monospace); font-size: .66rem; color: var(--pg-muted); }
@keyframes tx-pulse {
  0%, 22%, 100% { border-color: var(--pg-line); box-shadow: none; }
  6%, 14% { border-color: var(--pg-hl); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pg-hl) 18%, transparent); }
}

.tx-out {
  position: absolute; left: 71%; width: 25.5%; translate: 0 -50%;
  background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 16px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .1); padding: 12px 14px; display: grid; gap: 6px; text-align: left;
}
.tx-out-1 { top: 22.7%; } .tx-out-2 { top: 50%; } .tx-out-3 { top: 77.3%; }
.tx-out b { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--pg-muted); }
.tx-out small { font-size: .82rem; color: var(--pg-text); line-height: 1.35; }
.tx-bars { display: flex; align-items: flex-end; gap: 5px; height: 40px; }
.tx-bars i { flex: 1; height: var(--h); border-radius: 4px 4px 1px 1px; background: var(--pg-c1); transform-origin: bottom; animation: tx-grow 3.2s var(--tx-ease) infinite alternate; }
.tx-bars i:nth-child(2n) { background: var(--pg-c2); animation-delay: -.8s; }
.tx-bars i:nth-child(3n) { background: var(--pg-c3); animation-delay: -1.6s; }
@keyframes tx-grow { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
.tx-lines { display: grid; gap: 5px; }
.tx-lines i { display: block; height: 6px; border-radius: 4px; background: var(--pg-line); }
.tx-lines i:nth-child(2) { width: 80%; } .tx-lines i:nth-child(3) { width: 55%; }
.tx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pg-c2); margin-right: 7px; animation: tx-blink 1.6s ease-in-out infinite; }
@keyframes tx-blink { 50% { opacity: .3; } }

/* ------------------------------------------------------------------ facts strip */
.tx-facts { border-bottom: 1px solid var(--pg-line); padding: clamp(24px, 3vw, 36px) 0; }
.tx-facts-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tx-facts-list li { display: grid; gap: 2px; padding-left: 18px; border-left: 2px solid var(--pg-line); }
.tx-facts-list b { font-family: var(--pg-head); font-size: clamp(1.8rem, 3.2vw, 2.6rem); letter-spacing: -.03em; line-height: 1.05; color: var(--pg-hl); font-variant-numeric: tabular-nums; }
.tx-facts-list span { color: var(--pg-muted); font-size: .92rem; }
.tx-facts-list b span { color: inherit; font-size: inherit; }

/* ------------------------------------------------------------------ architecture explorer */
.tx-arch { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: clamp(20px, 3vw, 36px); align-items: start; }
.tx-rail { position: relative; }
.tx-flow { position: absolute; left: 30px; top: 26px; bottom: 26px; width: 2px; background: var(--pg-line); border-radius: 2px; }
.tx-flow i { position: absolute; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--pg-hl); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pg-hl) 20%, transparent); animation: tx-fall 4.5s linear infinite; }
.tx-flow i:nth-child(2) { animation-delay: -1.5s; background: var(--pg-c2); }
.tx-flow i:nth-child(3) { animation-delay: -3s; background: var(--pg-c3); }
@keyframes tx-fall { 0% { top: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.tx-layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; position: relative; }
.tx-layer {
  display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 16px;
  border: 1px solid transparent; color: inherit; text-decoration: none; position: relative;
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s var(--tx-ease);
}
.tx-layer:hover { background: color-mix(in srgb, var(--pg-surface) 70%, transparent); border-color: var(--pg-line); }
.tx-layer:focus-visible, .tx-prod-tab:focus-visible, .tx-filter:focus-visible, .tx-mode:focus-visible, .tx-run:focus-visible, .tx-next:focus-visible { outline: 2px solid var(--pg-hl); outline-offset: 2px; }
.tx-layer-n {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono, ui-monospace, monospace); font-size: .74rem; font-weight: 700;
  background: var(--pg-surface); border: 1px solid var(--pg-line); color: var(--pg-muted);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.tx-layer-t { display: grid; gap: 1px; }
.tx-layer-t b { font-size: 1rem; }
.tx-layer-t small { color: var(--pg-muted); font-size: .84rem; }
.tx-layer[aria-selected="true"] { background: var(--pg-surface); border-color: var(--pg-line); box-shadow: var(--pg-shadow); transform: translateX(6px); }
.tx-layer[aria-selected="true"] .tx-layer-n { background: var(--pg-hl); border-color: var(--pg-hl); color: var(--pg-surface); }

.tx-panels { display: grid; gap: 16px; }
.tx-panel, .tx-card, .tx-prod {
  background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 24px;
  box-shadow: var(--pg-shadow); padding: clamp(22px, 3vw, 34px); min-width: 0;
}
.tx-panel-n { margin: 0 0 6px; font-family: var(--mono, ui-monospace, monospace); font-size: .76rem; font-weight: 700; color: var(--pg-hl); letter-spacing: .04em; }
.tx-panel h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: .35em; }
.tx-panel-does { color: var(--pg-muted); font-size: 1.04rem; margin: 0; max-width: 62ch; }
.tx-panel h4, .tx-prod h4 { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--pg-muted); margin: 22px 0 10px; }
.tx-panel-icons { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tx-panel-icons li { width: 42px; height: 42px; border-radius: 12px; background: #fff; border: 1px solid var(--pg-line); display: grid; place-items: center; }
.tx-panel-icons img { width: 72%; height: 72%; object-fit: contain; }
.tx-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tx-chips li { font-size: .8rem; font-weight: 600; padding: .32rem .75rem; border-radius: 999px; border: 1px solid var(--pg-line); background: var(--pg-alt); color: var(--pg-text); }
.tx-risks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tx-risks li { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 16px; padding: 12px 14px; border: 1px solid var(--pg-line); border-radius: 14px; font-size: .92rem; }
.tx-risks b { position: relative; padding-left: 18px; font-weight: 700; }
.tx-risks b::before { content: ""; position: absolute; left: 0; top: .45em; width: 8px; height: 8px; border-radius: 50%; background: var(--pg-c1); }
.tx-risks span { position: relative; padding-left: 24px; color: var(--pg-muted); }
.tx-risks span::before { content: "✓"; position: absolute; left: 0; top: .1em; width: 16px; height: 16px; border-radius: 50%; background: var(--pg-c3); color: var(--tx-ink); font-size: .62rem; font-weight: 800; display: grid; place-items: center; }
.tx-seen { margin: 18px 0 0; font-size: .88rem; color: var(--pg-muted); }
.tx-seen a, .tx-case-link { color: var(--pg-accent); font-weight: 700; }
.tx-next, .tx-run {
  font: inherit; font-size: .88rem; font-weight: 700; color: var(--pg-text); background: transparent; cursor: pointer;
  border: 1px solid var(--pg-line); border-radius: 999px; padding: .5rem 1.1rem .5rem 1rem; display: inline-flex; align-items: center; gap: .7rem;
  transition: border-color .2s ease, background-color .2s ease;
}
.tx-next { margin-top: 20px; }
.tx-next:hover, .tx-run:hover { border-color: var(--pg-hl); }
.tx-next .btn-arrow { width: 24px; height: 24px; margin-right: -6px; }
.tx-next[hidden], .tx-run[hidden] { display: none; }

/* JS on: one panel at a time */
.tx-js [data-tx-tabs] .tx-panel:not(.is-active),
.tx-js [data-tx-tabs] .tx-prod:not(.is-active),
.tx-js [data-tx-modes] .tx-mode-panel:not(.is-active) { display: none; }
.tx-js .tx-panel.is-active, .tx-js .tx-prod.is-active { animation: tx-in .45s var(--tx-ease); }
@keyframes tx-in { from { opacity: .35; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ products */
.tx-prods { display: grid; grid-template-columns: minmax(230px, 280px) 1fr; gap: clamp(18px, 3vw, 32px); align-items: start; }
.tx-prod-nav { min-width: 0; }
.tx-prod-tabs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tx-prod-tab {
  display: grid; gap: 2px; padding: 12px 16px; border-radius: 14px; border: 1px solid transparent;
  color: inherit; text-decoration: none; transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.tx-prod-tab b { font-size: 1rem; }
.tx-prod-tab small { color: var(--pg-muted); font-size: .82rem; }
.tx-prod-tab:hover { border-color: var(--pg-line); }
.tx-prod-tab[aria-selected="true"] { background: var(--pg-surface); border-color: var(--pg-line); box-shadow: inset 3px 0 0 var(--pg-hl), var(--pg-shadow); }
.tx-prod-panels { display: grid; gap: 16px; min-width: 0; }
.tx-prod { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(18px, 3vw, 32px); }
.tx-logo { display: block; height: 36px; width: auto; max-width: 170px; object-fit: contain; object-position: left center; margin-bottom: 18px; }
.tx-logo-text { height: auto; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.theme-b .tx-logo:not(.tx-logo-text), [data-theme="dark"] .theme-a .tx-logo:not(.tx-logo-text) { filter: brightness(0) invert(1); opacity: .88; }
.tx-kind { margin: 0 0 .4rem; font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pg-accent); }
.tx-prod h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: .35em; }
.tx-prod-main > p { color: var(--pg-muted); margin: 0; }
.tx-built { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.tx-built li { position: relative; padding-left: 26px; font-size: .95rem; line-height: 1.45; }
.tx-built li::before { content: "✓"; position: absolute; left: 0; top: .15em; width: 17px; height: 17px; border-radius: 50%; background: var(--pg-chip); color: var(--pg-on-chip); font-size: .62rem; font-weight: 800; display: grid; place-items: center; }
.tx-case-link { display: inline-flex; align-items: center; gap: .6rem; margin-top: 20px; text-decoration: none; }
.tx-case-link .btn-arrow { width: 26px; height: 26px; margin-right: 0; }
.tx-prod-side { background: var(--pg-panel); border-radius: 18px; padding: 20px; align-self: start; }
.tx-side-label { margin: 0 0 12px; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--pg-muted); }
.tx-pflow { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.tx-pflow li { position: relative; }
.tx-pflow li span { display: block; background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 12px; padding: 10px 12px; font-size: .88rem; font-weight: 600; }
.tx-pflow li:last-child span { border-color: var(--pg-hl); }
.tx-pflow li + li::before {
  content: ""; position: absolute; left: 22px; top: -22px; width: 2px; height: 22px;
  background: repeating-linear-gradient(to bottom, var(--pg-hl) 0 4px, transparent 4px 8px);
  background-size: 2px 16px; animation: tx-drip .8s linear infinite;
}
@keyframes tx-drip { to { background-position: 0 16px; } }
.tx-mets { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.tx-mets li { background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 14px; padding: 10px 12px; display: grid; }
.tx-mets b { font-family: var(--pg-head); font-size: 1.35rem; letter-spacing: -.02em; color: var(--pg-hl); line-height: 1.15; }
.tx-mets span { color: var(--pg-muted); font-size: .8rem; line-height: 1.3; }

/* ------------------------------------------------------------------ custom builds */
.tx-custom { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 28px; }
.tx-custom li { border-top: 1px solid var(--pg-line); padding: 22px 0 26px; }
.tx-cn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono, ui-monospace, monospace); font-size: .8rem; font-weight: 700; color: var(--pg-hl); }
.tx-cn::after { content: "→"; transition: transform .3s var(--tx-ease); }
.tx-custom li:hover .tx-cn::after { transform: translateX(6px); }
.tx-custom h3 { margin: 8px 0 6px; font-size: 1.12rem; }
.tx-custom p { margin: 0; color: var(--pg-muted); font-size: .95rem; }

/* ------------------------------------------------------------------ stack explorer */
.tx-filters { display: none; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tx-js .tx-filters { display: flex; }
.tx-filter {
  font: inherit; font-size: .86rem; font-weight: 600; padding: .5rem 1rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--pg-line); background: var(--pg-surface); color: var(--pg-text);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.tx-filter:hover { border-color: var(--pg-hl); }
.tx-filter[aria-pressed="true"] { background: var(--pg-chip); color: var(--pg-on-chip); border-color: var(--pg-chip); }
.tx-count { margin: 0 0 14px; color: var(--pg-muted); font-size: .88rem; }
.tx-tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tx-tool {
  --g: var(--pg-c1);
  display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; row-gap: 2px; align-items: center;
  background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 16px; padding: 14px;
  transition: border-color .25s ease, transform .25s var(--tx-ease);
}
.tx-tool:hover { border-color: var(--g); transform: translateY(-3px); }
.tx-tool[hidden] { display: none; }
.tx-tool[data-group="storage"], .tx-tool[data-group="ai"] { --g: var(--pg-c2); }
.tx-tool[data-group="model"], .tx-tool[data-group="cloud"] { --g: var(--pg-c3); }
.tx-tool[data-group="bi"] { --g: #f5b23d; }
.tx-mono {
  grid-row: span 3; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--g); color: var(--tx-ink); font-weight: 800; font-size: .8rem; letter-spacing: -.03em;
}
.tx-tool b { font-size: .95rem; line-height: 1.25; }
.tx-tool-use { color: var(--pg-muted); font-size: .82rem; line-height: 1.35; }
.tx-tool-g { font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--pg-muted); opacity: .8; }
.tx-tool.is-shown { animation: tx-pop .4s var(--tx-ease) both; animation-delay: calc(min(var(--k, 0), 10) * 30ms); }
@keyframes tx-pop { from { opacity: .2; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ guardrails */
.tx-guard { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.tx-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.tx-card-head h3 { margin: 0; font-size: 1.25rem; }
.tx-check-list { list-style: none; margin: 0; padding: 0; }
.tx-check { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: start; padding: 13px 0; border-top: 1px solid var(--pg-line); }
.tx-check b { font-size: .98rem; }
.tx-check p { margin: 2px 0 0; color: var(--pg-muted); font-size: .88rem; line-height: 1.45; }
.tx-tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px dashed var(--pg-line); margin-top: 1px; transition: background-color .3s ease, border-color .3s ease; }
.tx-status { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .22rem .6rem; border-radius: 999px; color: var(--pg-muted); border: 1px solid var(--pg-line); white-space: nowrap; margin-top: 2px; }
.tx-check.is-pass .tx-tick { background: var(--pg-c3); border: 2px solid var(--pg-c3); }
.tx-check.is-pass .tx-tick::after { content: "✓"; color: var(--tx-ink); font-size: .72rem; font-weight: 900; }
.tx-check.is-pass .tx-status { background: var(--pg-c3); border-color: var(--pg-c3); color: var(--tx-ink); }
.tx-check.is-running .tx-tick { border: 2px solid var(--pg-line); border-top-color: var(--pg-hl); animation: tx-spin .7s linear infinite; }
.tx-check.is-running .tx-status { border-color: var(--pg-hl); color: var(--pg-text); }
@keyframes tx-spin { to { transform: rotate(360deg); } }

.tx-mode-btns { display: none; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 999px; background: var(--pg-alt); border: 1px solid var(--pg-line); margin: 8px 0 18px; }
.tx-js .tx-mode-btns { display: flex; }
.tx-mode {
  flex: 1 1 auto; font: inherit; font-size: .86rem; font-weight: 700; padding: .55rem .9rem; border-radius: 999px; cursor: pointer;
  border: 0; background: transparent; color: var(--pg-muted); transition: background-color .2s ease, color .2s ease;
}
.tx-mode:hover { color: var(--pg-text); }
.tx-mode[aria-pressed="true"] { background: var(--pg-chip); color: var(--pg-on-chip); }
.tx-mode-panels { display: grid; gap: 22px; }
.tx-mode-panel h4 { margin: 0 0 4px; font-size: 1rem; }
.tx-js .tx-mode-panel h4 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tx-mode-panel > p { margin: 0 0 14px; color: var(--pg-muted); font-size: .95rem; }
.tx-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: tl; }
.tx-timeline li { position: relative; display: grid; gap: 2px; padding: 0 0 16px 40px; counter-increment: tl; }
.tx-timeline li::before {
  content: counter(tl); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: .74rem; font-weight: 800;
  background: var(--pg-surface); border: 2px solid var(--pg-hl); color: var(--pg-text);
}
.tx-timeline li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--pg-line); }
.tx-timeline li:last-child::before { background: var(--pg-hl); color: var(--pg-surface); }
.tx-timeline b { font-size: .95rem; }
.tx-timeline span { color: var(--pg-muted); font-size: .88rem; }
.tx-js .tx-mode-panel.is-active li { animation: tx-slide .45s var(--tx-ease) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes tx-slide { from { transform: translateX(-10px); } to { transform: none; } }
.tx-always { margin: 6px 0 0; padding-top: 14px; border-top: 1px solid var(--pg-line); color: var(--pg-muted); font-size: .88rem; }
.tx-always b { color: var(--pg-text); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .tx-arch, .tx-prods, .tx-guard { grid-template-columns: 1fr; }
  .tx-custom { grid-template-columns: 1fr 1fr; }
  .tx-facts-list { grid-template-columns: 1fr 1fr; }
  .tx-layer[aria-selected="true"] { transform: none; }
  .tx-prod-tabs { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: thin; }
  .tx-prod-tabs li { flex: none; scroll-snap-align: start; }
  .tx-prod-tab { border-color: var(--pg-line); background: var(--pg-surface); }
  .tx-prod-tab[aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--pg-hl); }
}
@media (max-width: 760px) {
  .tx-engine { aspect-ratio: auto; display: grid; gap: 26px; justify-items: center; }
  .tx-wires, .tx-pills { display: none; }
  .tx-srcs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 320px; }
  .tx-src, .tx-core, .tx-out { position: static; translate: none; }
  .tx-src { width: 44px; }
  .tx-core { width: 100%; max-width: 360px; height: auto; }
  .tx-core-layers { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 40px; }
  .tx-core-layers li { justify-content: center; padding: 0 6px; }
  .tx-core-layers li span { display: none; }
  .tx-outs { display: grid; gap: 10px; width: 100%; max-width: 360px; }
  .tx-out { width: auto; }
  .tx-core::after, .tx-outs::before {
    content: ""; position: absolute; left: 50%; top: -24px; width: 2px; height: 22px;
    background: repeating-linear-gradient(to bottom, var(--pg-hl) 0 4px, transparent 4px 8px);
    background-size: 2px 16px; animation: tx-drip .8s linear infinite;
  }
  .tx-core, .tx-outs { position: relative; left: auto; top: auto; }
  .tx-risks li { grid-template-columns: 1fr; gap: 6px; }
  .tx-prod { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tx-custom { grid-template-columns: 1fr; }
  .tx-tools { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tx-tool { grid-template-columns: 30px 1fr; column-gap: 9px; padding: 10px; align-items: start; }
  .tx-mono { grid-row: span 2; width: 30px; height: 30px; border-radius: 9px; font-size: .66rem; }
  .tx-tool b { font-size: .88rem; }
  .tx-tool-use { font-size: .76rem; }
  .tx-tool-g { display: none; }
  .tx-check { grid-template-columns: 26px 1fr; }
  .tx-status { grid-column: 2; justify-self: start; }
  .tx-mode { flex-basis: 100%; }
  .tx-mode-btns { border-radius: 18px; }
  .tx-layer { padding: 9px 10px; }
  .tx-flow { left: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .tx-hero *, .tx-hero *::before, .tx-hero *::after,
  .tx-arch *, .tx-prods *, .tx-prods *::before, .tx-stack *, .tx-guard *, .tx-guard *::before { animation: none !important; transition: none !important; }
  .tx-packet, .tx-flow i { display: none; }
  .tx-layer[aria-selected="true"] { transform: none; }
}

/* Odd metric count: let the last tile span the row */
.tx-mets li:last-child:nth-child(odd) { grid-column: 1 / -1; }
