/* Platforms hub (platforms/), platform pages (platforms/<slug>/) and How it works (how-it-works/).
   Uses the --pg-* tokens from pages.css, so it follows variation A light, A dark
   ([data-theme="dark"]) and variation B. Every panel is visible without JS; hub.js adds
   .hb-js to <html> and turns the panels into tabs, filters and switches. */

.hb-hero, .hb-explorer, .hb-map, .hb-coverage, .hb-steps, .hb-tl, .hb-auto, .hb-fstrip, .hb-chain {
  --hb-ease: cubic-bezier(.22, 1, .36, 1);
  --hb-green: #0f7a55;
  --hb-amber: #8a5a00;
  --hb-violet: #5b4bc4;
  --hb-mono: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}
.theme-b .hb-hero, .theme-b .hb-explorer, .theme-b .hb-map, .theme-b .hb-steps, .theme-b .hb-auto, .theme-b .hb-fstrip, .theme-b .hb-chain,
[data-theme="dark"] .theme-a .hb-hero, [data-theme="dark"] .theme-a .hb-explorer, [data-theme="dark"] .theme-a .hb-map,
[data-theme="dark"] .theme-a .hb-steps, [data-theme="dark"] .theme-a .hb-auto, [data-theme="dark"] .theme-a .hb-fstrip, [data-theme="dark"] .theme-a .hb-chain {
  --hb-green: #4fd6a2;
  --hb-amber: #f5c26b;
  --hb-violet: #b3a8ff;
}

/* shared focus ring */
.hb-filter:focus-visible, .hb-tile:focus-visible, .hb-mtab:focus-visible, .hb-stab:focus-visible, .hb-snext:focus-visible,
.hb-mode-btn:focus-visible, .hb-approve:focus-visible, .hb-panel:focus-visible, .hb-mpanel:focus-visible, .hb-spanel:focus-visible,
.hb-panel a:focus-visible, .hb-slink:focus-visible, .hb-others a:focus-visible, .hb-cw-cta a:focus-visible, .hb-stack-more a:focus-visible {
  outline: 2px solid var(--pg-hl); outline-offset: 3px;
}
.hb-panel:focus:not(:focus-visible), .hb-mpanel:focus:not(:focus-visible), .hb-spanel:focus:not(:focus-visible) { outline: none; }

@keyframes hb-spin { to { transform: rotate(360deg); } }
@keyframes hb-dash { to { background-position: 22px 0; } }
@keyframes hb-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes hb-row { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes hb-live { 0% { box-shadow: 0 0 0 0 rgba(51, 200, 147, .55); } 100% { box-shadow: 0 0 0 9px rgba(51, 200, 147, 0); } }

/* ================================================================ hero (both pages) */
.hb-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;
}
.hb-hero .container { grid-template-columns: 1fr 1fr; }
.hb-hero h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
.hb-hero .page-aside { justify-items: center; }

.hb-stats { list-style: none; margin: 0 0 1.6rem; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hb-stats li { display: flex; align-items: baseline; gap: 8px; padding: .55rem .95rem; border-radius: 14px; background: var(--pg-surface); border: 1px solid var(--pg-line); }
.hb-stats b { font-family: var(--pg-head); font-size: 1.35rem; letter-spacing: -.02em; color: var(--pg-hl); line-height: 1; }
.hb-stats span { font-size: .86rem; color: var(--pg-muted); font-weight: 600; }

/* orbit: icons circle one schema */
.hb-orbit { --S: 480px; position: relative; width: var(--S); height: var(--S); margin: 0; flex: none; }
.hb-orbit-rings, .hb-spokes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hb-orbit-rings circle { fill: none; stroke: var(--pg-text); stroke-opacity: .16; stroke-width: .3; stroke-dasharray: 1 1.3; }
.hb-ring { position: absolute; inset: 0; animation: hb-spin 90s linear infinite; }
.hb-ring-in { --r: .29; }
.hb-ring-out { --r: .44; animation-duration: 120s; animation-direction: reverse; }
.hb-ring ul { list-style: none; margin: 0; padding: 0; }
.hb-spokes line { stroke: var(--pg-hl); stroke-opacity: .45; stroke-width: .35; stroke-dasharray: 1.1 1.9; animation: hb-spoke 1.6s linear infinite; animation-delay: var(--d, 0s); }
.hb-ring-out .hb-spokes line { stroke: var(--pg-c2); stroke-opacity: .4; }
@keyframes hb-spoke { to { stroke-dashoffset: -6; } }
.hb-orb { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--a)) translateY(calc(var(--S) * var(--r) * -1)) rotate(calc(var(--a) * -1)); }
.hb-orb span {
  position: absolute; left: -27px; top: -27px; width: 54px; height: 54px; border-radius: 16px;
  background: #fff; border: 1px solid var(--pg-line); box-shadow: 0 10px 26px rgba(0, 0, 0, .13);
  display: grid; place-items: center; animation: hb-spin 90s linear infinite reverse;
}
.hb-ring-out .hb-orb span { animation-duration: 120s; animation-direction: normal; width: 46px; height: 46px; left: -23px; top: -23px; border-radius: 14px; }
.hb-orb img { width: 64%; height: 64%; object-fit: contain; }
.hb-core {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 36%; z-index: 2;
  background: var(--pg-surface); border-radius: 18px; padding: 12px 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .16);
}
.hb-core::before, .hb-chain::before, .hb-target::before {
  content: ""; position: absolute; inset: 0; 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, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
  border: 2px solid transparent;
}
.hb-core-k { margin: 0; font-size: .64rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--pg-hl); }
.hb-core-t { margin: 2px 0 8px; }
.hb-core-t code { font-family: var(--hb-mono); font-size: .72rem; font-weight: 700; }
.hb-core ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hb-core li {
  font-family: var(--hb-mono); font-size: .66rem; padding: .18rem .45rem; border-radius: 6px;
  background: var(--pg-alt); border: 1px solid var(--pg-line); color: var(--pg-muted);
  animation: hb-colpulse 6s ease-in-out infinite; animation-delay: calc(var(--i) * 1.2s);
}
@keyframes hb-colpulse { 0%, 24%, 100% { border-color: var(--pg-line); color: var(--pg-muted); } 6%, 16% { border-color: var(--pg-hl); color: var(--pg-text); } }

/* ================================================================ platform explorer */
.hb-filters { display: none; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.hb-js .hb-filters { display: flex; }
.hb-filter {
  font: inherit; font-size: .88rem; font-weight: 700; padding: .55rem 1rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--pg-line); background: var(--pg-surface); color: var(--pg-text); transition: background-color .25s, border-color .25s;
}
.hb-filter span { opacity: .6; font-size: .78rem; margin-left: 3px; }
.hb-filter:hover { border-color: var(--pg-accent); }
.hb-filter[aria-pressed="true"] { background: var(--pg-chip); color: var(--pg-on-chip); border-color: var(--pg-chip); }

.hb-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hb-js .hb-ex-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 24px; align-items: start; }
.hb-js .hb-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hb-tile {
  position: relative; display: grid; gap: 6px; align-content: start; height: 100%; box-sizing: border-box;
  padding: 18px; border-radius: 20px; background: var(--pg-surface); border: 1px solid var(--pg-line);
  color: inherit; text-decoration: none; box-shadow: var(--pg-shadow);
  transition: translate .3s var(--hb-ease), border-color .3s, box-shadow .3s;
}
.hb-tile:hover { translate: 0 -3px; border-color: var(--pg-accent); }
.hb-tile[aria-selected="true"] { border-color: var(--pg-hl); box-shadow: 0 0 0 1.5px var(--pg-hl), 0 18px 40px rgba(0, 0, 0, .1); }
.hb-tile[aria-selected="true"]::after {
  content: "→"; position: absolute; right: 16px; top: 16px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--pg-hl); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 800;
}
.hb-tile-ic { width: 50px; height: 50px; border-radius: 14px; background: #fff; border: 1px solid var(--pg-line); display: grid; place-items: center; margin-bottom: 6px; }
.hb-tile-ic img { width: 66%; height: 66%; object-fit: contain; }
.hb-tile b { font-size: 1.02rem; line-height: 1.25; }
.hb-tile-tag { font-size: .86rem; color: var(--pg-muted); line-height: 1.4; }
.hb-tile-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.hb-tile-chips i { font-style: normal; font-size: .7rem; font-weight: 700; padding: .16rem .5rem; border-radius: 999px; background: var(--pg-alt); border: 1px solid var(--pg-line); }

.hb-panel {
  background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 26px;
  padding: clamp(20px, 3vw, 32px); box-shadow: var(--pg-shadow); margin-top: 18px;
}
.hb-js .hb-panels { position: sticky; top: 96px; }
.hb-js .hb-panel { margin-top: 0; }
.hb-js .hb-panel:not(.is-active) { display: none; }
.hb-js .hb-panel.is-active { animation: hb-in .45s var(--hb-ease); }
.hb-panel-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.hb-panel-ic { width: 64px; height: 64px; border-radius: 18px; background: #fff; border: 1px solid var(--pg-line); display: grid; place-items: center; flex: none; box-shadow: 0 10px 24px rgba(0, 0, 0, .08); }
.hb-panel-ic img { width: 66%; height: 66%; object-fit: contain; }
.hb-panel-g { margin: 0 0 2px; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--pg-hl); }
.hb-panel h3 { margin: 0; font-size: clamp(1.3rem, 2vw, 1.6rem); }
.hb-panel-lede { color: var(--pg-muted); margin: 0 0 18px; }
.hb-panel-cols { display: grid; gap: 20px; }
.hb-panel h4, .hb-scopy h4 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--pg-muted); margin: 0 0 10px; }
.hb-pull-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hb-pull-list li { font-size: .84rem; font-weight: 600; padding: .38rem .72rem; border-radius: 10px; background: var(--pg-alt); border: 1px solid var(--pg-line); }
.hb-build-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; counter-reset: hbb; }
.hb-build-list li { counter-increment: hbb; display: grid; grid-template-columns: 24px 1fr; column-gap: 10px; align-content: start; }
.hb-build-list li::before {
  content: counter(hbb); grid-row: span 2; width: 22px; height: 22px; border-radius: 50%;
  background: var(--pg-chip); color: var(--pg-on-chip); font-size: .7rem; font-weight: 800; display: grid; place-items: center;
}
.hb-build-list b { font-size: .92rem; line-height: 1.3; }
.hb-build-list span { font-size: .84rem; color: var(--pg-muted); line-height: 1.45; }
.hb-proof { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 20px 0 0; font-size: .86rem; }
.hb-proof span { color: var(--pg-muted); font-weight: 700; margin-right: 2px; }
.hb-proof a { padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--pg-line); color: inherit; text-decoration: none; font-weight: 700; transition: border-color .2s; }
.hb-proof a:hover { border-color: var(--pg-accent); }
.hb-panel-cta { display: inline-flex; gap: .6rem; align-items: center; margin-top: 20px; font-weight: 800; color: var(--pg-accent); text-decoration: none; }

/* ================================================================ one schema: mapping */
.hb-map-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.hb-mtabs { list-style: none; margin: 0; padding: 4px; display: flex; flex-wrap: wrap; gap: 4px; background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 999px; }
.hb-mtab { display: block; padding: .55rem 1.05rem; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--pg-text); text-decoration: none; transition: background-color .25s; }
.hb-mtab:hover { background: var(--pg-alt); }
.hb-mtab[aria-selected="true"] { background: var(--pg-chip); color: var(--pg-on-chip); }
.hb-badge { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: .35rem .75rem; border-radius: 999px; border: 1px dashed var(--pg-muted); color: var(--pg-muted); }
.hb-mpanel { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: center; }
.hb-mpanel + .hb-mpanel { margin-top: 28px; }
.hb-js .hb-mpanel + .hb-mpanel { margin-top: 0; }
.hb-js .hb-mpanel:not(.is-active) { display: none; }
.hb-js .hb-mpanel.is-active tbody tr { animation: hb-row .5s var(--hb-ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.hb-js .hb-mpanel.is-active .hb-target { animation: hb-in .6s var(--hb-ease) both .35s; }

.hb-mtable-wrap { background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 22px; padding: 6px 18px 8px; box-shadow: var(--pg-shadow); min-width: 0; }
.hb-mtable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.hb-mtable caption { text-align: left; font-weight: 700; font-size: .8rem; color: var(--pg-muted); padding: 12px 0 4px; }
.hb-mtable thead th { text-align: left; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--pg-muted); padding: 8px 10px; border-bottom: 1px solid var(--pg-line); font-weight: 800; }
.hb-mtable thead td { border-bottom: 1px solid var(--pg-line); }
.hb-mtable tbody th, .hb-mtable tbody td { padding: 12px 10px; border-bottom: 1px solid var(--pg-line); text-align: left; vertical-align: middle; }
.hb-mtable tbody tr:last-child > * { border-bottom: 0; }
.hb-mtable tbody th { font-weight: 700; white-space: nowrap; }
.hb-mtable tbody th img { display: inline-block; width: 30px; height: 30px; border-radius: 9px; background: #fff; border: 1px solid var(--pg-line); padding: 4px; box-sizing: border-box; vertical-align: middle; margin-right: 10px; }
.hb-raw code, .hb-target-f code {
  font-family: var(--hb-mono); font-size: .8rem; font-weight: 600; padding: .25rem .55rem; border-radius: 8px;
  background: var(--pg-alt); border: 1px dashed var(--pg-line); color: var(--pg-text); white-space: nowrap;
}
.hb-raw span { font-size: .86rem; font-style: italic; color: var(--pg-muted); }
.hb-flow { width: 64px; }
.hb-flow i { position: relative; display: block; height: 2px; background: repeating-linear-gradient(90deg, var(--pg-hl) 0 6px, transparent 6px 11px); background-size: 22px 2px; animation: hb-dash 1s linear infinite; }
.hb-flow i::after { content: ""; position: absolute; right: -3px; top: -4px; border-left: 7px solid var(--pg-hl); border-block: 5px solid transparent; }
.hb-do { color: var(--pg-muted); font-size: .88rem; line-height: 1.45; }

.hb-target { position: relative; border-radius: 22px; padding: 22px; background: var(--pg-surface); box-shadow: 0 24px 60px rgba(0, 0, 0, .12); }
.hb-target-k { margin: 0 0 8px; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--pg-hl); }
.hb-target-f { margin: 0 0 12px; }
.hb-target-f code { font-size: .95rem; white-space: normal; display: inline-block; border-style: solid; border-color: var(--pg-hl); }
.hb-target-n { margin: 0; color: var(--pg-muted); font-size: .92rem; line-height: 1.5; }

/* ================================================================ coverage */
.hb-coverage { display: grid; gap: 18px; }
.hb-regions { display: grid; grid-template-columns: 1fr 1.6fr 1fr 1fr; gap: 14px; }
.hb-region { background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 20px; padding: 18px 18px 20px; box-shadow: var(--pg-shadow); }
.hb-region h3 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--pg-hl); margin: 0 0 14px; }
.hb-region ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.hb-region:nth-child(2) ul { grid-template-columns: 1fr 1fr; }
.hb-region li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .92rem; }
.hb-cc { flex: none; width: 34px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-family: var(--hb-mono); font-size: .66rem; font-weight: 800; background: var(--pg-panel); border: 1px solid var(--pg-line); color: var(--pg-text); }
.hb-also { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 18px; align-items: center; background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 20px; padding: 16px 20px; }
.hb-also-k { margin: 0; font-weight: 800; text-transform: uppercase; font-size: .74rem; letter-spacing: .12em; color: var(--pg-hl); }
.hb-marquee { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.hb-marquee-track { list-style: none; margin: 0; padding: 0 10px 0 0; display: flex; gap: 10px; flex: none; animation: hb-marquee 34s linear infinite; }
.hb-marquee:hover .hb-marquee-track { animation-play-state: paused; }
.hb-marquee-track li { white-space: nowrap; font-weight: 700; font-size: .9rem; padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--pg-line); background: var(--pg-alt); }
@keyframes hb-marquee { to { transform: translateX(-100%); } }
.hb-also-n { grid-column: 1 / -1; margin: 0; color: var(--pg-muted); font-size: .9rem; }

/* ================================================================ platform page: flow strip, pulls, builds */
.hb-flowsec { padding: 26px 0; background: var(--pg-alt); border-bottom: 1px solid var(--pg-line); }
.hb-fstrip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 30px; }
.hb-fstrip li { position: relative; display: grid; align-content: start; gap: 4px; background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 18px; padding: 14px 16px; box-shadow: var(--pg-shadow); }
.hb-fstrip li:first-child { border-color: var(--pg-hl); }
.hb-fstrip li + li::before {
  content: ""; position: absolute; right: 100%; top: 36px; width: 30px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--pg-hl) 0 6px, transparent 6px 11px); background-size: 22px 2px; animation: hb-dash 1s linear infinite;
}
.hb-fstrip li + li::after {
  content: ""; position: absolute; right: calc(100% + 24px); top: 33px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--pg-c3); animation: hb-hop 2.4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .45s);
}
@keyframes hb-hop { 0% { transform: translateX(0); opacity: 0; } 15%, 80% { opacity: 1; } 100% { transform: translateX(24px); opacity: 0; } }
.hb-fnode-ic { width: 44px; height: 44px; border-radius: 12px; background: #fff; border: 1px solid var(--pg-line); display: grid; place-items: center; margin-bottom: 4px; }
.hb-fnode-ic img { width: 70%; height: 70%; object-fit: contain; }
.hb-fnode-ic.hb-glyph { background: var(--pg-panel); font-size: 1.15rem; font-weight: 800; color: var(--pg-hl); }
.hb-fstrip b { font-size: .95rem; line-height: 1.25; }
.hb-fstrip small { color: var(--pg-muted); font-size: .8rem; line-height: 1.4; }

.hb-pullgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hb-pullgrid li { display: flex; gap: 12px; align-items: flex-start; background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 16px; padding: 14px 16px; font-weight: 600; font-size: .94rem; line-height: 1.45; box-shadow: var(--pg-shadow); }
.hb-tick { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--pg-c3); color: #0b2a1e; font-size: .7rem; font-weight: 800; display: grid; place-items: center; margin-top: 1px; }

.hb-pmap { max-width: none; }
.hb-flow + .hb-raw code { border-style: solid; border-color: var(--pg-hl); }

.hb-builds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hb-builds.hb-builds-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hb-build { position: relative; overflow: hidden; background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 22px; padding: 26px; box-shadow: var(--pg-shadow); }
.hb-build::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--pg-c1), var(--pg-c2), var(--pg-c3)); transform: scaleX(.18); transform-origin: left; transition: transform .6s var(--hb-ease, ease); }
.hb-build:hover::after { transform: scaleX(1); }
.hb-build-n { display: block; font-family: var(--mono, ui-monospace, monospace); font-size: 1.6rem; font-weight: 800; color: var(--pg-hl); margin-bottom: 10px; letter-spacing: -.02em; }
.hb-build h3 { margin: 0 0 .4em; }
.hb-build p { margin: 0; color: var(--pg-muted); font-size: .95rem; }

.hb-others { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.hb-others-k { margin: 0; font-weight: 800; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--pg-muted); }
.hb-others ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 400px; }
.hb-others ul a { display: inline-flex; align-items: center; gap: 8px; padding: .35rem .85rem .35rem .4rem; border-radius: 999px; border: 1px solid var(--pg-line); background: var(--pg-surface); color: inherit; text-decoration: none; font-weight: 700; font-size: .86rem; transition: border-color .2s; }
.hb-others ul a:hover { border-color: var(--pg-accent); }
.hb-others img { width: 28px; height: 28px; border-radius: 50%; background: #fff; padding: 3px; box-sizing: border-box; border: 1px solid var(--pg-line); }
.hb-others-all { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; color: var(--pg-accent); text-decoration: none; }

/* ================================================================ how it works: hero chain */
.hb-chain { position: relative; margin: 0; width: 100%; max-width: 430px; box-sizing: border-box; background: var(--pg-surface); border-radius: 26px; padding: 18px 18px 14px; box-shadow: 0 30px 70px rgba(0, 0, 0, .12); }
.hb-chain-head { display: flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--pg-muted); margin: 0 0 12px; }
.hb-live { width: 8px; height: 8px; border-radius: 50%; background: var(--pg-c3); animation: hb-live 1.8s ease-out infinite; }
.hb-chain-body { position: relative; }
.hb-chain-line { position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: var(--pg-line); border-radius: 2px; overflow: hidden; }
.hb-chain-line i { position: absolute; inset: 0; background: linear-gradient(var(--pg-c1), var(--pg-c2), var(--pg-c3)); transform-origin: top; animation: hb-fill 7.2s linear infinite; }
@keyframes hb-fill { 0% { transform: scaleY(0); opacity: 1; } 90% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.hb-chain ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; position: relative; }
.hb-chain li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 6px 10px 6px 0; border-radius: 14px; animation: hb-step 7.2s linear infinite; animation-delay: calc(var(--i) * 1.2s); }
.hb-chain-n { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono, ui-monospace, monospace); font-size: .76rem; font-weight: 800; background: var(--pg-alt); border: 1px solid var(--pg-line); position: relative; z-index: 1; animation: hb-stepn 7.2s linear infinite; animation-delay: calc(var(--i) * 1.2s); }
.hb-chain li b { grid-column: 2; font-size: .98rem; line-height: 1.2; }
.hb-chain li small { grid-column: 2; color: var(--pg-muted); font-size: .8rem; }
.hb-chain-ok { grid-column: 3; grid-row: 1 / span 2; width: 22px; height: 22px; border-radius: 50%; background: var(--pg-c3); color: #0b2a1e; font-size: .7rem; font-weight: 800; display: grid; place-items: center; animation: hb-ok 7.2s linear infinite; animation-delay: calc(var(--i) * 1.2s); }
@keyframes hb-step { 0%, 17%, 100% { background: transparent; } 3%, 14% { background: color-mix(in srgb, var(--pg-hl) 10%, transparent); } }
@keyframes hb-stepn { 0%, 17%, 100% { background: var(--pg-alt); color: var(--pg-text); border-color: var(--pg-line); } 3%, 14% { background: var(--pg-hl); color: #fff; border-color: var(--pg-hl); } }
@keyframes hb-ok { 0%, 10% { opacity: .15; transform: scale(.6); } 15%, 100% { opacity: 1; transform: none; } }

/* ================================================================ how it works: six-step explorer */
.hb-srail { margin-bottom: 18px; }
.hb-stabs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.hb-stab { display: flex; flex-direction: column; gap: 2px; height: 100%; box-sizing: border-box; padding: 14px 16px; border-radius: 16px; background: var(--pg-surface); border: 1px solid var(--pg-line); color: inherit; text-decoration: none; font-weight: 800; transition: background-color .25s, border-color .25s; }
.hb-stab span { font-family: var(--mono, ui-monospace, monospace); font-size: .74rem; color: var(--pg-hl); }
.hb-stab:hover { border-color: var(--pg-accent); }
.hb-stab[aria-selected="true"] { background: var(--pg-chip); color: var(--pg-on-chip); border-color: var(--pg-chip); }
.hb-stab[aria-selected="true"] span { color: inherit; opacity: .7; }
.hb-sprog { display: none; }
.hb-js .hb-sprog { display: block; height: 3px; margin-top: 10px; background: var(--pg-line); border-radius: 3px; overflow: hidden; }
.hb-sprog i { display: block; height: 100%; width: calc((var(--k, 0) + 1) / 6 * 100%); background: linear-gradient(90deg, var(--pg-c1), var(--pg-c2), var(--pg-c3)); border-radius: 3px; transition: width .6s var(--hb-ease); }
.hb-spanel { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(20px, 4vw, 48px); align-items: center; padding: clamp(16px, 3vw, 32px); border-radius: 30px; background: var(--pg-surface); border: 1px solid var(--pg-line); box-shadow: var(--pg-shadow); }
.hb-spanel + .hb-spanel { margin-top: 18px; }
.hb-js .hb-spanel + .hb-spanel { margin-top: 0; }
.hb-js .hb-spanel:not(.is-active) { display: none; }
.hb-js .hb-spanel.is-active .hb-scopy { animation: hb-in .5s var(--hb-ease) both; }
.hb-sart { min-width: 0; }
.hb-sart .hx-art { height: 360px; }
.hb-sstep { font-family: var(--mono, ui-monospace, monospace); font-size: .78rem; font-weight: 700; color: var(--pg-hl); margin: 0 0 8px; letter-spacing: .03em; }
.hb-scopy h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 0 0 .4em; line-height: 1.15; }
.hb-scopy > p { color: var(--pg-muted); }
.hb-scopy h4 { margin-top: 20px; }
.hb-gets { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hb-gets li { position: relative; padding-left: 28px; line-height: 1.45; font-weight: 600; font-size: .95rem; }
.hb-gets li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--pg-c3); color: #0b2a1e; font-size: .66rem; font-weight: 800; display: grid; place-items: center; }
.hb-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.hb-chips li { font-size: .8rem; font-weight: 700; padding: .3rem .68rem; border-radius: 999px; border: 1px solid var(--pg-line); background: var(--pg-alt); }
.hb-sfoot { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; margin-top: 24px; }
.hb-slink { font-weight: 800; color: var(--pg-accent); text-decoration: none; display: inline-flex; gap: .5rem; align-items: center; }
.hb-snext { font: inherit; font-weight: 800; border: 0; border-radius: 999px; padding: .55rem .6rem .55rem 1.1rem; background: var(--pg-c1); color: #15150f; cursor: pointer; display: inline-flex; gap: .5rem; align-items: center; transition: translate .25s; }
.hb-snext:hover { translate: 0 -2px; }

/* ================================================================ how it works: first weeks */
.hb-weeks { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 48px; align-items: start; }
.hb-weeks .pg-head { position: sticky; top: 100px; margin-bottom: 0; }
.hb-tl { position: relative; padding-left: 40px; }
.hb-tl-line { position: absolute; left: 11px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--pg-line); overflow: hidden; }
.hb-tl-line i { position: absolute; inset: 0; background: linear-gradient(var(--pg-c1), var(--pg-c2), var(--pg-c3)); transform-origin: top; transform: scaleY(var(--p, 1)); }
.hb-js .hb-tl-line i { transform: scaleY(var(--p, 0)); }
.hb-tl ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.hb-tl li { position: relative; background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 20px; padding: 20px 22px; box-shadow: var(--pg-shadow); transition: border-color .4s; }
.hb-tl-dot { position: absolute; left: -36px; top: 24px; width: 17px; height: 17px; box-sizing: border-box; border-radius: 50%; background: var(--pg-hl); border: 3px solid var(--pg-surface); box-shadow: 0 0 0 1px var(--pg-hl); transition: background-color .4s, box-shadow .4s; }
.hb-js .hb-tl li:not(.is-on) .hb-tl-dot { background: var(--pg-surface); box-shadow: 0 0 0 1px var(--pg-line); }
.hb-js .hb-tl li.is-on { border-color: color-mix(in srgb, var(--pg-hl) 45%, var(--pg-line)); }
.hb-tl-when { font-family: var(--mono, ui-monospace, monospace); font-size: .78rem; font-weight: 800; color: var(--pg-hl); margin: 0 0 4px; }
.hb-tl h3 { margin: 0 0 .3em; font-size: 1.15rem; }
.hb-tl li > p:last-child { margin: 0; color: var(--pg-muted); }

/* ================================================================ how it works: guardrails switch */
.hb-guard { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.hb-guard .pg-head { margin-bottom: 0; }
.hb-always { margin-top: 22px; }
.hb-auto {
  border-radius: 28px; padding: clamp(14px, 3vw, 26px); border: 1px solid var(--pg-line);
  background-color: var(--pg-panel); background-image: linear-gradient(var(--pg-grid) 1px, transparent 1px), linear-gradient(90deg, var(--pg-grid) 1px, transparent 1px); background-size: 32px 32px;
}
.hb-switch { display: none; }
.hb-js .hb-switch { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 18px; padding: 5px; margin-bottom: 18px; --m: 0; }
.hb-thumb { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3); border-radius: 14px; background: var(--pg-chip); transform: translateX(calc(var(--m) * 100%)); transition: transform .45s var(--hb-ease); }
.hb-mode-btn { position: relative; z-index: 1; font: inherit; font-weight: 800; font-size: .9rem; line-height: 1.2; border: 0; background: transparent; color: var(--pg-text); padding: .8rem .5rem; border-radius: 14px; cursor: pointer; }
.hb-mode-btn[aria-pressed="true"] { color: var(--pg-on-chip); }
.hb-mode { background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 20px; padding: 18px; }
.hb-mode + .hb-mode { margin-top: 14px; }
.hb-js .hb-mode + .hb-mode { margin-top: 0; }
.hb-js .hb-mode:not(.is-active) { display: none; }
.hb-mode h3 { font-size: 1.12rem; margin: 0 0 .3em; }
.hb-mode > p { color: var(--pg-muted); margin: 0 0 14px; font-size: .95rem; }
.hb-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hb-feed li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; background: var(--pg-alt); border: 1px solid var(--pg-line); border-radius: 14px; padding: 12px 14px; transition: border-color .3s; }
.hb-js .hb-mode.is-active .hb-feed li { animation: hb-row .45s var(--hb-ease) both; animation-delay: calc(var(--i, 0) * 110ms); }
.hb-feed b { display: block; font-size: .95rem; }
.hb-feed small { color: var(--pg-muted); font-size: .8rem; }
.hb-state { font-size: .78rem; font-weight: 800; padding: .3rem .7rem; border-radius: 999px; white-space: nowrap; }
.is-idea .hb-state { background: color-mix(in srgb, var(--pg-c2) 18%, transparent); color: var(--hb-violet); }
.is-wait .hb-state { background: color-mix(in srgb, #f5b23d 24%, transparent); color: var(--hb-amber); }
.is-ok .hb-state, .is-done .hb-state { background: color-mix(in srgb, var(--pg-c3) 20%, transparent); color: var(--hb-green); }
.hb-feed li.is-done { border-color: color-mix(in srgb, var(--pg-c3) 55%, var(--pg-line)); }
.hb-approve { grid-column: 1 / -1; justify-self: start; font: inherit; font-size: .82rem; font-weight: 800; border: 0; background: var(--pg-chip); color: var(--pg-on-chip); border-radius: 999px; padding: .42rem .95rem; cursor: pointer; }
.hb-auto-log { text-align: center; font-size: .8rem; font-weight: 600; color: var(--pg-muted); margin: 14px 0 0; }

/* ================================================================ how it works: custom work + stack */
.hb-cwgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hb-cw { position: relative; overflow: hidden; background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 22px; padding: 24px; box-shadow: var(--pg-shadow); transition: translate .3s var(--hb-ease, ease), border-color .3s; }
.hb-cw::before { content: ""; position: absolute; right: -50px; bottom: -70px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--pg-c1) 26%, transparent), transparent 70%); opacity: .35; transition: opacity .4s, scale .6s; pointer-events: none; }
.hb-cw:nth-child(3n+2)::before { background: radial-gradient(circle, color-mix(in srgb, var(--pg-c2) 26%, transparent), transparent 70%); }
.hb-cw:nth-child(3n)::before { background: radial-gradient(circle, color-mix(in srgb, var(--pg-c3) 26%, transparent), transparent 70%); }
.hb-cw:hover { translate: 0 -4px; border-color: var(--pg-accent); }
.hb-cw:hover::before { opacity: 1; scale: 1.2; }
.hb-cw-n { font-family: var(--mono, ui-monospace, monospace); font-weight: 800; font-size: .8rem; color: var(--pg-hl); letter-spacing: .1em; }
.hb-cw h3 { margin: 10px 0 6px; font-size: 1.12rem; position: relative; }
.hb-cw p { margin: 0; color: var(--pg-muted); font-size: .95rem; position: relative; }
.hb-cw-cta, .hb-stack-more { margin: 22px 0 0; }
.hb-cw-cta { text-align: center; }
.hb-cw-cta a, .hb-stack-more a { font-weight: 800; color: inherit; display: inline-flex; gap: .6rem; align-items: center; text-decoration: none; }
.hb-stack-more a { color: var(--pg-accent); }
.hb-stack { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hb-stack > li { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 14px; align-items: start; background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 18px; padding: 16px 18px; box-shadow: var(--pg-shadow); }
.hb-stack-k { font-weight: 800; color: var(--pg-accent); font-size: .9rem; padding-top: 4px; }

/* ================================================================ responsive */
@media (max-width: 1100px) {
  .hb-orbit { --S: 420px; }
  .hb-regions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hb-hero .container { grid-template-columns: 1fr; }
  .hb-hero .page-aside { justify-items: center; margin-top: 8px; }
  .hb-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hb-js .hb-ex-grid { grid-template-columns: 1fr; }
  .hb-js .hb-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hb-js .hb-panels { position: static; }
  .hb-tile-tag, .hb-tile-chips { display: none; }
  .hb-tile { justify-items: center; text-align: center; padding: 14px 10px; }
  .hb-tile b { font-size: .9rem; }
  .hb-tile[aria-selected="true"]::after { display: none; }
  .hb-mpanel { grid-template-columns: 1fr; }
  .hb-fstrip { grid-template-columns: 1fr; gap: 20px; max-width: 520px; }
  .hb-fstrip li { grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; align-items: center; }
  .hb-fstrip .hb-fnode-ic { grid-row: 1 / span 2; margin: 0; }
  .hb-fstrip li + li::before { right: auto; left: 37px; top: -20px; width: 2px; height: 20px; background: repeating-linear-gradient(180deg, var(--pg-hl) 0 5px, transparent 5px 9px); animation: none; }
  .hb-fstrip li + li::after { display: none; }
  .hb-builds, .hb-builds.hb-builds-2, .hb-cwgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hb-stabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hb-spanel { grid-template-columns: 1fr; }
  .hb-sart .hx-art { height: 300px; }
  .hb-weeks, .hb-guard { grid-template-columns: 1fr; gap: 28px; }
  .hb-weeks .pg-head { position: static; }
  .hb-stack { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .hb-mtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hb-mtable, .hb-mtable tbody, .hb-mtable caption { display: block; }
  .hb-mtable tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--pg-line); }
  .hb-mtable tbody tr:last-child { border-bottom: 0; }
  .hb-mtable tbody th, .hb-mtable tbody td { padding: 0; border: 0; }
  .hb-flow { display: none; }
  .hb-raw code { white-space: normal; word-break: break-word; }
  .hb-flow + .hb-raw::before { content: "→ "; font-weight: 800; color: var(--pg-hl); }
}
@media (max-width: 600px) {
  .hb-orbit { --S: 300px; }
  .hb-orb span { width: 42px; height: 42px; left: -21px; top: -21px; border-radius: 12px; }
  .hb-ring-out .hb-orb span { width: 36px; height: 36px; left: -18px; top: -18px; border-radius: 10px; }
  .hb-core { width: 44%; padding: 10px; border-radius: 14px; box-sizing: border-box; }
  .hb-core ul { display: none; }
  .hb-core-t { margin: 2px 0 0; }
  .hb-core-t code { font-size: .56rem; }
  .hb-core-k { font-size: .56rem; }
  .hb-js .hb-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hb-tile { grid-template-columns: 40px minmax(0, 1fr); justify-items: start; text-align: left; align-items: center; gap: 10px; padding: 10px 12px; }
  .hb-tile-ic { width: 40px; height: 40px; margin: 0; border-radius: 11px; }
  .hb-tile b { font-size: .84rem; }
  .hb-build-list { grid-template-columns: 1fr; }
  .hb-regions, .hb-region:nth-child(2) ul { grid-template-columns: 1fr; }
  .hb-region:nth-child(2) ul { grid-template-columns: 1fr 1fr; }
  .hb-also { grid-template-columns: 1fr; }
  .hb-pullgrid, .hb-builds, .hb-builds.hb-builds-2, .hb-cwgrid { grid-template-columns: 1fr; }
  .hb-sart .hx-art { height: 280px; }
  .hb-sart .art-store { height: 330px; }
  .hb-stab { padding: 10px 12px; font-size: .9rem; }
  .hb-chain li small { font-size: .76rem; }
  .hb-mode-btn { font-size: .8rem; padding: .7rem .3rem; }
  .hb-feed li { grid-template-columns: 1fr; }
  .hb-state { justify-self: start; white-space: normal; }
  .hb-stack > li { grid-template-columns: 1fr; gap: 8px; }
  .hb-mtabs { border-radius: 18px; }
  .hb-mtab { padding: .5rem .8rem; font-size: .85rem; }
}

/* ================================================================ dark + variation B touches */
.theme-b .hb-tick, .theme-b .hb-gets li::before, .theme-b .hb-chain-ok { color: #0b2a1e; }
.theme-b .hb-tile[aria-selected="true"]::after { color: var(--pg-on-chip); background: var(--pg-hl); }
.theme-b .hb-stepn, .theme-b .hb-chain-n { color: var(--pg-text); }
[data-theme="dark"] .theme-a .hb-core, [data-theme="dark"] .theme-a .hb-chain, [data-theme="dark"] .theme-a .hb-target { box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
[data-theme="dark"] .theme-a .hb-snext { color: #15150f; }

/* ================================================================ reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hb-ring, .hb-orb span, .hb-spokes line, .hb-core li, .hb-flow i, .hb-fstrip li::before, .hb-chain li, .hb-chain-n, .hb-chain-ok, .hb-chain-line i, .hb-live { animation: none !important; }
  .hb-fstrip li + li::after { display: none; }
  .hb-chain-line i { transform: none; }
  .hb-marquee { -webkit-mask-image: none; mask-image: none; }
  .hb-marquee-track { animation: none; flex-wrap: wrap; flex: 1; padding: 0; }
  .hb-marquee-track[aria-hidden="true"] { display: none; }
  .hb-js .hb-panel.is-active, .hb-js .hb-mpanel.is-active tbody tr, .hb-js .hb-mpanel.is-active .hb-target,
  .hb-js .hb-spanel.is-active .hb-scopy, .hb-js .hb-mode.is-active .hb-feed li { animation: none; }
  .hb-tile, .hb-cw, .hb-thumb, .hb-sprog i, .hb-build::after { transition: none; }
  .hb-js .hb-tl-line i { transform: scaleY(1); }
  .hb-js .hb-tl li:not(.is-on) .hb-tl-dot { background: var(--pg-hl); box-shadow: 0 0 0 1px var(--pg-hl); }
}
.hb-glyph svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 600px) { .hb-stats li { padding: .4rem .7rem; } .hb-stats b { font-size: 1.1rem; } }
