/* ==========================================================================
   guide.css — 教程页（guide.html）专用
   ========================================================================== */

/* hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 24px;
  align-items: center;
  padding: 48px 0 28px;
}

.hero h1 {
  font-family: var(--fd);
  font-weight: 400;
  font-size: clamp(46px,8vw,86px);
  line-height: 1;
  margin: 10px 0 6px;
  letter-spacing: .02em;
}

.hero h1 span {
  display: block;
  font-size: .42em;
  color: var(--accent);
  margin-top: 12px;
  letter-spacing: .12em;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
  margin-top: 26px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  position: relative;
}

.kpi b {
  display: block;
  font-family: var(--fn);
  font-size: 28px;
  line-height: 1.1;
  color: var(--ink);
}

.kpi span {
  font-size: 12px;
  color: var(--ink2);
}

.kpi::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.loop {
  width: 100%;
  max-width: 400px;
  justify-self: center;
}

.loop .ring {
  fill: none;
  stroke: var(--line2);
  stroke-width: 2;
  stroke-dasharray: 4 6;
}

.loop .arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
}

.loop .nd circle {
  fill: var(--surface);
  stroke: var(--teal);
  stroke-width: 2;
}

.loop .nd text {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-anchor: middle;
}

.loop .nd .s {
  font-size: 11px;
  fill: var(--ink2);
  font-weight: 400;
}

.loop .mover {
  fill: var(--accent);
}

.loop .core {
  fill: var(--ink);
  font-family: var(--fd);
  font-size: 22px;
  text-anchor: middle;
}

.loop .core2 {
  fill: var(--ink3);
  font-family: var(--fn);
  font-size: 12px;
  letter-spacing: .2em;
  text-anchor: middle;
}

/* nav */
nav.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb,var(--bg) 86%,transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

nav.top .wrap {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

nav.top .wrap::-webkit-scrollbar {
  display: none;
}

nav.top a {
  flex: none;
  text-decoration: none;
  color: var(--ink2);
  padding: 12px 12px;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

nav.top a i {
  font-style: normal;
  font-family: var(--fn);
  color: var(--ink3);
  margin-right: 6px;
}

nav.top a.home {
  color: var(--teal);
  border-right: 1px solid var(--line);
  margin-right: 4px;
}

nav.top a.home i {
  color: var(--teal);
}

nav.top a.on {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* chapters */
.chap {
  padding: 56px 0 8px;
  scroll-margin-top: 44px;
}

.chap-h {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 8px;
}

.chap-h .no {
  font-family: var(--fn);
  font-weight: 700;
  font-size: 64px;
  line-height: .85;
  color: var(--accent);
}

.chap-h h2 {
  font-family: var(--fd);
  font-weight: 400;
  font-size: 36px;
  margin: 0;
  line-height: 1;
}

.chap-h .en {
  margin: 4px 0 0;
  font-family: var(--fn);
  letter-spacing: .24em;
  font-size: 12px;
  color: var(--ink3);
}

.bh {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  margin: 36px 0 14px;
  font-weight: 700;
  scroll-margin-top: 56px;
}

.bh span {
  font-family: var(--fn);
  font-size: 14px;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 1px 8px;
  border-radius: 3px;
  font-weight: 600;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  min-width: 0;
}

.card h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ink2);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h4::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 2px solid var(--teal);
  transform: rotate(45deg);
}

.g2 {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,340px),1fr));
  gap: 16px;
}

.g3 {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,250px),1fr));
  gap: 16px;
}

.big {
  font-family: var(--fn);
  font-size: 40px;
  line-height: 1;
  font-weight: 700;
}

/* 各场景中的头像 / 图标尺寸 */
.ava {
  display: block;
  object-fit: cover;
  border-radius: 4px;
  background: var(--tc);
  border-bottom: 3px solid var(--tc);
}

.slot .ava {
  width: 44px;
  height: 44px;
}

.bench .b .ava {
  width: 78%;
  height: auto;
  aspect-ratio: 1;
  margin-bottom: 2px;
  border-bottom-width: 2px;
}

.bench .b.hasava i {
  display: none;
}

.fin div .ava {
  width: 46px;
  height: 46px;
  margin: 0 auto 4px;
}

.fc .ava {
  width: 44px;
  height: 44px;
}

.fstack .fc {
  height: auto;
  min-height: 88px;
  padding: 6px 0;
  width: 76px;
}

.dbc .ava {
  width: 46px;
  height: 46px;
  flex: none;
}

.dbc .t {
  align-items: center;
}

.eqi .ico {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 5px;
  background: radial-gradient(circle at 50% 40%,color-mix(in srgb,var(--tc) 55%,#fff 10%),var(--tc));
  display: block;
  object-fit: contain;
}

.eqi .eh {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.eqi .eh b {
  flex: 1;
  min-width: 0;
}

.eqrule .eq .ei {
  width: 40px;
  height: 40px;
}

/* horizontal bars */
.hb {
  display: grid;
  grid-template-columns: 5.5em 1fr 3.4em auto;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
  font-size: 13.5px;
}

.hb-t {
  height: 14px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.hb-f {
  height: 100%;
  background: linear-gradient(90deg,var(--teal),var(--accent));
  transform-origin: left;
  animation: grow 1s ease-out both;
}

.hb-v {
  font-family: var(--fn);
  font-size: 16px;
  text-align: right;
}

/* timeline */
.tl {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 190px;
  padding-top: 24px;
  overflow: hidden;
}

.tl .c {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}

.tl .bar {
  width: 100%;
  background: color-mix(in srgb,var(--teal) 70%,transparent);
  border-radius: 3px 3px 0 0;
  position: relative;
  transform-origin: bottom;
  animation: growY .8s ease-out both;
}

.tl .c.ld .bar {
  background: var(--red);
}

.tl .c.hid .bar {
  background: repeating-linear-gradient(45deg,var(--ink3) 0 4px,transparent 4px 8px);
  border: 1px solid var(--ink3);
}

.tl .sec {
  font-family: var(--fn);
  font-size: 12px;
  color: var(--ink2);
  margin-bottom: 2px;
}

.tl .rn {
  font-family: var(--fn);
  font-size: 13px;
  margin-top: 4px;
  color: var(--ink);
}

.tl .dec::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: 56px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  transform: rotate(45deg);
  z-index: 2;
  box-shadow: 0 0 0 3px var(--surface);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: var(--ink2);
  margin-top: 10px;
}

.legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: -2px;
}

/* phase strip */
.phase {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.phase>div {
  padding: 14px;
  position: relative;
  background: var(--surface);
}

.phase>div+div {
  border-left: 1px solid var(--line);
}

.phase b {
  font-family: var(--fd);
  font-weight: 400;
  font-size: 22px;
  display: block;
}

.phase .pn {
  font-family: var(--fn);
  color: var(--accent);
  font-size: 13px;
  letter-spacing: .1em;
}

.phase ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--ink2);
}

.phase li {
  padding: 2px 0 2px 14px;
  position: relative;
}

.phase li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 2px;
  background: var(--teal);
}

.phase>div::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  animation: phase 6s linear infinite;
}

.phase>div:nth-child(2)::after {
  animation-delay: 2s;
}

.phase>div:nth-child(3)::after {
  animation-delay: 4s;
}

@keyframes phase {
  0% {
    transform: scaleX(0);
    opacity: 1;
  }
  33% {
    transform: scaleX(1);
    opacity: 1;
  }
  34%, 100% {
    transform: scaleX(1);
    opacity: 0;
  }
}

/* funds tiles */
.fund {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,120px),1fr));
  gap: 10px;
}

.fund>div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: var(--surface2);
  text-align: center;
}

.fund b {
  display: block;
  font-family: var(--fn);
  font-size: 30px;
  line-height: 1.1;
}

.fund .m {
  color: var(--red);
}

.fund .p {
  color: var(--green);
}

.fund span {
  font-size: 13px;
}

.fund small {
  display: block;
  font-size: 11.5px;
  color: var(--ink3);
  margin-top: 4px;
}

.coins {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.coin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,#ffe2a1,#d99a25 60%,#a86e0f);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.25);
  animation: drain 4s ease-in infinite;
}

.coin:nth-child(2) {
  animation-delay: .1s;
}

.coin:nth-child(3) {
  animation-delay: .2s;
}

.coin:nth-child(4) {
  animation-delay: .3s;
}

@keyframes drain {
  0%, 55% {
    opacity: 1;
    transform: none;
  }
  75%, 100% {
    opacity: 0;
    transform: translateY(16px) scale(.6);
  }
}

/* shop sim */
.sim {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
}

.lvl {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lv-badge {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.lv-badge .big {
  color: var(--accent);
}

.tiers {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 4px;
}

.tiers div {
  text-align: center;
  font-family: var(--fn);
  font-size: 15px;
  padding: 4px 0;
  border-radius: 3px;
  background: var(--surface2);
  color: var(--ink3);
  border: 1px solid var(--line);
  transition: .25s;
}

.tiers div.on {
  background: var(--tc);
  color: #fff;
  border-color: transparent;
}

.cd {
  height: 10px;
  background: var(--surface2);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.cd div {
  height: 100%;
  background: var(--accent);
  transition: width .4s;
}

.slots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 92px;
}

.slot {
  width: 86px;
  height: 92px;
  border-radius: 6px;
  border: 1px solid var(--line2);
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  font-size: 13px;
  padding: 4px;
  text-align: center;
  transition: transform .15s;
}

.slot:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.slot .ti {
  font-family: var(--fn);
  color: #fff;
  background: var(--tc);
  padding: 0 6px;
  border-radius: 3px;
  font-size: 13px;
}

.slot .pr {
  font-family: var(--fn);
  font-size: 12px;
  color: var(--ink3);
}

.slot.empty {
  border-style: dashed;
  cursor: default;
  background: transparent;
}

.slot.eqs {
  border-style: dotted;
  cursor: default;
}

.slot.flip {
  animation: flip .35s ease;
}

@keyframes flip {
  0% {
    transform: rotateY(90deg);
  }
  100% {
    transform: none;
  }
}

.frozen .slot:not(.empty):not(.eqs) {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 2px var(--teal-soft);
}

.frozen .slot:not(.empty):not(.eqs)::after {
  content: "❄";
  position: absolute;
  top: 2px;
  right: 5px;
  color: var(--teal);
  font-size: 12px;
}

.bench {
  display: grid;
  grid-template-columns: repeat(10,1fr);
  gap: 4px;
  margin-top: 8px;
}

.bench .b {
  aspect-ratio: 1/1.15;
  border: 1px solid var(--line2);
  border-radius: 4px;
  background: var(--surface2);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  padding: 2px;
  overflow: hidden;
  cursor: pointer;
}

.bench .b i {
  font-style: normal;
  font-family: var(--fn);
  font-size: 11px;
  color: #fff;
  background: var(--tc);
  padding: 0 4px;
  border-radius: 2px;
  margin-bottom: 2px;
}

.bench .b.x {
  border-style: dashed;
  cursor: default;
  background: transparent;
}

.bench .b.tmp {
  border-color: color-mix(in srgb,var(--red) 50%,transparent);
}

.bench .b.el {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
}

.bench .b.pop {
  animation: pop .5s ease;
}

@keyframes pop {
  0% {
    transform: scale(1.35);
    box-shadow: 0 0 0 6px var(--accent-soft);
  }
  100% {
    transform: none;
  }
}

.reward {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent-soft);
  display: none;
}

.reward.on {
  display: block;
  animation: pop .4s;
}

.stat3 {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 6px;
}

.stat3 div {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 8px;
}

.stat3 b {
  display: block;
  font-family: var(--fn);
  font-size: 22px;
  line-height: 1.1;
}

.stat3 span {
  font-size: 11.5px;
  color: var(--ink3);
}

/* merge flow */
.flow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.fc {
  width: 72px;
  height: 88px;
  border-radius: 6px;
  border: 1px solid var(--line2);
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  gap: 4px;
  animation: beat 5s infinite both;
}

.fc i {
  font-style: normal;
  font-family: var(--fn);
  color: #fff;
  background: var(--tc);
  padding: 0 6px;
  border-radius: 3px;
}

.fc.el {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
}

.fstack {
  display: flex;
  gap: 4px;
}

.arr {
  font-family: var(--fn);
  color: var(--accent);
  font-size: 22px;
  animation: beat 5s infinite both;
}

@keyframes beat {
  0%, 100% {
    box-shadow: none;
    filter: none;
  }
  6% {
    box-shadow: 0 0 0 4px var(--accent-soft),0 0 18px var(--accent-soft);
    filter: brightness(1.15);
  }
  16% {
    box-shadow: none;
    filter: none;
  }
}

/* deploy grid */
.dgrid {
  display: grid;
  grid-template-columns: repeat(3,56px);
  grid-template-rows: repeat(4,48px);
  grid-auto-flow: column;
  gap: 6px;
}

.dgrid div {
  border: 1px solid var(--line2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fn);
  font-size: 20px;
  background: var(--surface2);
  animation: dep 6s infinite both;
}

.dgrid div.g {
  border-style: dashed;
  color: var(--ink3);
  animation: none;
  font-size: 13px;
}

@keyframes dep {
  0% {
    background: var(--surface2);
    color: var(--ink3);
  }
  8%, 70% {
    background: var(--teal);
    color: #fff;
  }
  80%, 100% {
    background: var(--surface2);
    color: var(--ink3);
  }
}

/* equipment */
.eqrule {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,200px),1fr));
  gap: 10px;
}

.eqrule>div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: var(--surface2);
  text-align: center;
}

.eqrule .eqx {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  font-family: var(--fn);
  font-size: 18px;
}

.eqrule p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--ink2);
}

.combo {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1.2fr;
  gap: 6px;
  align-items: center;
  margin: 6px 0;
  font-size: 13px;
}

.combo .pl {
  font-family: var(--fn);
  color: var(--ink3);
  text-align: center;
}

.combo .eq {
  min-width: 0;
  white-space: normal;
  line-height: 1.3;
}

.combo>* {
  min-width: 0;
}

/* training */
.tr9 {
  display: grid;
  grid-template-columns: repeat(9,1fr);
  gap: 6px;
}

.tr9 div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 2px;
  text-align: center;
  background: var(--surface2);
  transition: .35s;
  font-size: 13px;
  min-width: 0;
}

.tr9 div b {
  display: block;
  font-family: var(--fd);
  font-weight: 400;
  font-size: 20px;
}

.tr9 div.on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  transform: translateY(-3px);
}

.waves {
  display: grid;
  grid-template-columns: repeat(14,1fr);
  gap: 3px;
  margin-top: 12px;
}

.waves div {
  height: 30px;
  border-radius: 3px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background .35s;
  font-family: var(--fn);
}

/* leak svg */
.svgbox {
  width: 100%;
  height: auto;
  display: block;
}

.lane {
  fill: var(--surface2);
  stroke: var(--line);
}

.base {
  fill: var(--red);
}

.defn {
  fill: var(--teal);
}

.en {
  fill: var(--ink2);
}

.en.k {
  fill: var(--ink3);
  opacity: .25;
}

.lbl {
  fill: var(--ink2);
  font-size: 12px;
}

.lblb {
  fill: var(--ink);
  font-size: 22px;
  font-family: var(--fn);
  font-weight: 700;
}

/* leader bars */
.ldr {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 8px 12px;
  align-items: center;
  font-size: 13px;
}

.ldr .tr {
  height: 20px;
  position: relative;
  background: var(--surface2);
  border-radius: 2px;
  border: 1px solid var(--line);
}

.ldr .m {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg,color-mix(in srgb,var(--red) 70%,transparent),var(--red));
  border-radius: 2px;
  transition: width .5s;
}

.ldr .h {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(45deg,color-mix(in srgb,var(--ink) 25%,transparent) 0 4px,transparent 4px 8px);
  border-right: 2px solid var(--ink2);
  transition: width .5s;
}

.ldr .v {
  position: absolute;
  right: 6px;
  top: 0;
  line-height: 20px;
  font-family: var(--fn);
  font-size: 13px;
  color: var(--ink);
}

.ldr .nm {
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* bounty */
.bty {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 8px;
  align-items: end;
}

.bty .col {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
}

.bty .col span {
  font-size: 11.5px;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 4px;
  text-align: center;
  line-height: 1.3;
}

.bty .h {
  text-align: center;
  font-family: var(--fn);
  font-size: 22px;
  color: var(--accent);
  border-top: 2px solid var(--accent);
  padding-top: 2px;
}

/* covenants */
.covg {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(100%,250px),1fr));
  gap: 8px;
}

.covc {
  border: 1px solid var(--line);
  border-left: 4px solid var(--c);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--surface);
  font-size: 12.5px;
  color: var(--ink2);
}

.covc .t {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pips {
  display: inline-flex;
  gap: 3px;
}

.pips i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--c);
  display: inline-block;
}

.pips i.f {
  background: var(--c);
}

.pips .sep {
  width: 6px;
  border: 0;
}

.covc .bg {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  color: var(--ink);
}

/* stacks diagram */
.stk {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 10px;
  align-items: end;
  height: 200px;
  padding-top: 10px;
}

.stk .col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.stk .bar {
  width: 56%;
  display: flex;
  flex-direction: column-reverse;
  border-radius: 3px;
  overflow: hidden;
}

.stk .fx {
  background: var(--teal);
}

.stk .tp {
  background: repeating-linear-gradient(45deg,var(--accent) 0 5px,color-mix(in srgb,var(--accent) 45%,transparent) 5px 10px);
}

.stk .cap {
  font-size: 12px;
  color: var(--ink2);
  margin-top: 6px;
  text-align: center;
}

.stk .tp.an {
  animation: tmp 5s infinite;
}

@keyframes tmp {
  0% {
    height: 0;
  }
  40%, 60% {
    height: var(--h);
  }
  80%, 100% {
    height: 0;
  }
}

/* trigger timeline */
.trig {
  display: grid;
  grid-template-columns: repeat(8,1fr);
  gap: 4px;
  position: relative;
}

.trig .zone {
  grid-row: 1;
  font-size: 12px;
  text-align: center;
  padding: 4px;
  border-radius: 4px 4px 0 0;
  color: var(--ink2);
  font-family: var(--fn);
  letter-spacing: .1em;
}

.trig .z1 {
  grid-column: 1/5;
  background: var(--teal-soft);
}

.trig .z2 {
  grid-column: 5/6;
  background: var(--accent-soft);
}

.trig .z3 {
  grid-column: 6/9;
  background: color-mix(in srgb,var(--red) 12%,transparent);
}

.trig button {
  grid-row: 2;
  border: 1px solid var(--line2);
  background: var(--surface2);
  border-radius: 6px;
  padding: 8px 2px;
  cursor: pointer;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.trig button b {
  font-family: var(--fn);
  font-size: 22px;
  line-height: 1;
  color: var(--accent);
}

.trig button.on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.trig button.on b {
  color: var(--accent-ink);
}

.tlist {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(100%,300px),1fr));
  gap: 6px;
  margin-top: 12px;
  max-height: 340px;
  overflow: auto;
  padding-right: 4px;
}

.tlist div {
  font-size: 12.5px;
  color: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 8px;
  background: var(--surface2);
}

.tlist div .op {
  margin-right: 6px;
}

/* position grid */
.pos {
  display: grid;
  grid-template-columns: repeat(5,48px);
  grid-template-rows: repeat(3,48px);
  gap: 5px;
  justify-content: center;
}

.pos div {
  border: 1px solid var(--line2);
  border-radius: 4px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: .25s;
}

.pos div.me {
  background: var(--ink);
  color: var(--surface);
  font-weight: 700;
}

.pos div.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* calc */
.calc {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 18px;
}

.calc .vals {
  display: grid;
  gap: 8px;
}

.calc .vals div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 6px;
  gap: 8px;
}

.calc .vals b {
  font-family: var(--fn);
  font-size: 28px;
  color: var(--accent);
}

.calc .vals span {
  font-size: 13px;
  color: var(--ink2);
}

.ax {
  stroke: var(--line2);
}

.gl {
  stroke: var(--line);
  stroke-dasharray: 2 4;
}

.ln {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
}

.ar {
  fill: var(--accent-soft);
}

.dot {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 2;
}

.axl {
  fill: var(--ink3);
  font-size: 11px;
  font-family: var(--fn);
}

/* strategies */
.stg {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(100%,250px),1fr));
  gap: 8px;
  margin-top: 12px;
}

.stc {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--surface);
  font-size: 12.5px;
  color: var(--ink2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stc .t {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
  gap: 6px;
}

.stc .t b {
  font-size: 15px;
  flex: 1;
  min-width: 0;
}

.stp {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 6px;
  overflow: hidden;
  background: #0d2b2b;
  border: 1px solid color-mix(in srgb,var(--teal) 45%,transparent);
}

.stp img {
  width: 100%;
  height: 100%;
  display: block;
}

.stc .hp {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stc .hp .tr {
  flex: 1;
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
}

.stc .hp .tr div {
  height: 100%;
  background: var(--green);
}

.stc .hp span {
  font-family: var(--fn);
  font-size: 15px;
  color: var(--ink);
  min-width: 2ch;
  text-align: right;
}

.stc .sk {
  color: var(--ink);
  font-weight: 500;
}

/* builds */
.btabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.btabs button {
  border: 1px solid var(--line2);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btabs button::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}

.btabs button.on {
  background: var(--c);
  color: #fff;
  border-color: var(--c);
}

.btabs button.on::before {
  background: #fff;
}

.bp {
  border: 1px solid var(--line);
  border-top: 4px solid var(--c);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.bp-h {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 20px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.bp-h h3 {
  font-family: var(--fd);
  font-weight: 400;
  font-size: 40px;
  margin: 0;
  line-height: 1;
  color: var(--c);
}

.bp-h .tg {
  font-size: 15px;
  color: var(--ink);
  margin-top: 6px;
  font-weight: 500;
}

.bp-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
}

.lab {
  font-size: 12px;
  color: var(--ink3);
  font-family: var(--fn);
  letter-spacing: .18em;
  margin: 0 0 6px;
}

.tierrows {
  display: grid;
  gap: 6px;
}

.tierrows .tr {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: start;
}

.tierrows .tr>i {
  font-style: normal;
  font-family: var(--fn);
  font-weight: 600;
  color: #fff;
  background: var(--tc);
  border-radius: 3px;
  text-align: center;
  padding: 2px 0;
}

.fin {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 6px;
}

.fin div {
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 8px 4px;
  text-align: center;
  font-size: 12.5px;
  background: var(--surface2);
  position: relative;
}

.fin div i {
  display: block;
  font-style: normal;
  font-family: var(--fn);
  font-size: 12px;
  color: #fff;
  background: var(--tc);
  border-radius: 3px;
  margin: 0 auto 4px;
  width: 24px;
}

.fin div.c::after {
  content: "C";
  position: absolute;
  top: 3px;
  right: 5px;
  font-family: var(--fn);
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}

.steps {
  counter-reset: s;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  font-size: 13.5px;
  align-items: start;
}

.steps li::before {
  content: counter(s);
  font-family: var(--fn);
  font-weight: 700;
  background: var(--c);
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.spark {
  width: 100%;
  height: 60px;
}

.spark path {
  fill: none;
  stroke: var(--c);
  stroke-width: 2;
}

.spark .a {
  fill: color-mix(in srgb,var(--c) 18%,transparent);
  stroke: none;
}

.hyb {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,330px),1fr));
  gap: 12px;
  margin-top: 16px;
}

.hyb .card {
  border-top: 4px solid var(--accent);
}

.hyb h5 {
  font-family: var(--fd);
  font-weight: 400;
  font-size: 24px;
  margin: 0 0 2px;
}

.hyb .sub {
  font-size: 13px;
  color: var(--ink2);
  margin-bottom: 10px;
}

/* db */
.dbf {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.dbg {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(100%,260px),1fr));
  gap: 8px;
}

.dbc {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--surface);
  font-size: 12.5px;
  color: var(--ink2);
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 4px solid var(--tc);
}

.dbc .t {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.dbc .t b {
  font-size: 15px;
}

.dbc .t i {
  font-style: normal;
  font-family: var(--fn);
  background: var(--tc);
  color: #fff;
  border-radius: 3px;
  padding: 0 6px;
  font-size: 13px;
}

.dbc .t .s {
  margin-left: auto;
  font-family: var(--fn);
  color: var(--accent);
  font-size: 13px;
}

.dbc .tx {
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.55;
}

.eqcols {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 8px;
}

.eqcols .col>div:first-child {
  font-family: var(--fn);
  color: #fff;
  background: var(--tc);
  text-align: center;
  border-radius: 4px;
  padding: 2px 0;
  margin-bottom: 6px;
}

.eqi {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 7px;
  margin-bottom: 6px;
  background: var(--surface);
  font-size: 11.5px;
  color: var(--ink2);
  line-height: 1.45;
}

.eqi b {
  display: flex;
  justify-content: space-between;
  color: var(--ink);
  font-size: 12.5px;
  gap: 4px;
}

.eqi b span {
  font-family: var(--fn);
  color: var(--accent);
}

/* storyboard */
.story {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
}

.sb {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.sb>b {
  font-size: 16px;
}

.sbn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--fn);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sarr {
  align-self: center;
  color: var(--accent);
  font-size: 22px;
}

.ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--ink2);
  text-align: left;
  width: 100%;
}

.ul li {
  padding: 4px 0 4px 14px;
  position: relative;
  border-top: 1px dashed var(--line);
}

.ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 13px;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
}

.elc {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: var(--surface2);
}

.elc.el {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.elh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.els {
  font-size: 12px;
  color: var(--ink3);
  margin: 6px 0;
}

.elt {
  font-size: 13px;
  line-height: 1.6;
}

.elt b {
  color: var(--accent);
  font-family: var(--fn);
  font-size: 16px;
}

.elt .tg {
  color: var(--teal);
  font-weight: 500;
  margin-right: 4px;
}

.elarr {
  text-align: center;
  color: var(--accent);
  margin: 6px 0;
  font-size: 13px;
}

.fxr {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  gap: 8px;
  align-items: start;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
  font-size: 13px;
}

.fxr:first-child {
  border-top: 0;
  padding-top: 0;
}

/* pool */
.pv {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.pvpool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border: 2px dashed var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
}

.pvpool img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--t3);
}

.pvpool img.gone {
  opacity: .2;
  animation: fade .6s both;
}

@keyframes fade {
  from {
    opacity: 1;
  }
  to {
    opacity: .2;
  }
}

.pvarr {
  text-align: center;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: .6em;
}

.pvpl {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 6px;
}

.pvp {
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  background: var(--surface2);
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.pvp.me {
  border: 2px solid var(--accent);
}

.pvp .got {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: center;
  min-height: 28px;
}

.pvp .got img {
  width: 26px;
  height: 26px;
  border-radius: 3px;
  background: var(--t3);
  animation: pop .5s both;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.split>div {
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
}

.split .ok {
  border-color: var(--green);
  background: color-mix(in srgb,var(--green) 10%,transparent);
}

.split .no {
  opacity: .6;
  background: repeating-linear-gradient(45deg,transparent 0 8px,color-mix(in srgb,var(--red) 9%,transparent) 8px 16px);
}

.mx {
  display: grid;
  grid-template-columns: auto repeat(6,minmax(0,1fr)) auto;
  gap: 3px;
  font-size: 13px;
  align-items: center;
}

.mx div {
  text-align: center;
  padding: 5px 2px;
  border-radius: 3px;
  font-family: var(--fn);
}

.mx .on {
  background: var(--tc);
  color: #fff;
}

.mx .off {
  background: var(--surface2);
  color: var(--ink3);
}

.mx .h {
  color: var(--ink3);
  font-size: 12px;
}

.rf {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: center;
  font-size: 13px;
}

.ms {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.ms img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--t2);
  border: 1px solid var(--line2);
}

.ms img.lk {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.ms .ar {
  color: var(--accent);
  font-family: var(--fn);
  margin: 0 4px;
  font-size: 13px;
}

/* formation */
.cmp {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
}

.cmpc {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.cmph {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cmph b {
  font-size: 16px;
}

.ck {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  display: grid;
  gap: 5px;
}

.ck li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.ck li::before {
  content: "✔";
  color: var(--green);
  font-weight: 700;
  flex: none;
  width: 1em;
}

.ck li.x::before {
  content: "✕";
  color: var(--red);
}

.ck li.w::before {
  content: "!";
  color: var(--accent);
  font-family: var(--fn);
  text-align: center;
}

.dgrid {
  grid-template-columns: repeat(3,58px)!important;
  grid-template-rows: repeat(4,58px)!important;
}

.dgrid div {
  position: relative;
  overflow: hidden;
}

.dgrid .ava {
  width: 46px;
  height: 46px;
  border-bottom: 0;
  opacity: .35;
  animation: depi 6s infinite both;
  animation-delay: inherit;
}

.dgrid .dn {
  position: absolute;
  top: 1px;
  left: 4px;
  font-size: 14px;
  z-index: 1;
  color: var(--ink);
  text-shadow: 0 0 3px var(--surface),0 0 3px var(--surface);
}

@keyframes depi {
  0% {
    opacity: .35;
  }
  8%, 70% {
    opacity: 1;
  }
  80%, 100% {
    opacity: .35;
  }
}

.dsteps {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 10px;
}

.dsteps div {
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 10px 6px;
  text-align: center;
  background: var(--surface2);
  animation: beat 6s infinite both;
  position: relative;
}

.dsteps div:nth-child(2) {
  animation-delay: 1s;
}

.dsteps div:nth-child(3) {
  animation-delay: 2s;
}

.dsteps div:nth-child(4) {
  animation-delay: 3s;
}

.dsteps div:nth-child(5) {
  animation-delay: 4s;
}

.dsteps div:nth-child(6) {
  animation-delay: 5s;
}

.dsteps div+div::before {
  content: "▸";
  position: absolute;
  left: -9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 12px;
}

.dsteps b {
  display: block;
  font-family: var(--fn);
  font-size: 20px;
  color: var(--accent);
}

.dsteps span {
  font-size: 12px;
  color: var(--ink2);
  line-height: 1.45;
}

/* stages */
.stages {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.stages>div {
  padding: 14px;
  border-top: 4px solid var(--sc);
}

.stages>div+div {
  border-left: 1px solid var(--line);
}

.stages .sh {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.stages .sh b {
  font-family: var(--fd);
  font-weight: 400;
  font-size: 24px;
}

.stages .sh .num {
  color: var(--sc);
  font-size: 18px;
  font-weight: 700;
}

.stages .lvb {
  font-size: 12.5px;
  color: var(--ink);
  background: var(--surface2);
  border-radius: 4px;
  padding: 3px 8px;
  margin: 6px 0 8px;
}

@media (max-width:860px) {
  .story {
    grid-template-columns: 1fr;
  }
  .sarr {
    transform: rotate(90deg);
    justify-self: center;
  }
  .cmp {
    grid-template-columns: 1fr;
  }
  .dsteps {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .dsteps div:nth-child(4)::before {
    display: none;
  }
  .stages {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .stages>div:nth-child(3) {
    border-left: 0;
  }
  .stages>div:nth-child(n+3) {
    border-top-width: 4px;
  }
}

@media (max-width:560px) {
  .split {
    grid-template-columns: 1fr;
  }
  .fxr {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .stages {
    grid-template-columns: 1fr;
  }
  .stages>div+div {
    border-left: 0;
  }
  .dsteps {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .dsteps div:nth-child(odd)::before {
    display: none;
  }
  .dsteps div:nth-child(4)::before {
    display: block;
  }
  .rf {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (prefers-reduced-motion:reduce) {
  .dgrid .ava, .pvpool img.gone {
    opacity: 1;
  }
  .pvpool img.gone {
    opacity: .2;
  }
}

@media (max-width:860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 32px;
  }
  .loop {
    max-width: 300px;
  }
  .sim, .calc, .bp-grid {
    grid-template-columns: 1fr;
  }
  .eqcols {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .tr9 {
    grid-template-columns: repeat(5,1fr);
  }
  .trig {
    grid-template-columns: repeat(4,1fr);
  }
  .trig .zone {
    display: none;
  }
  .trig button {
    grid-row: auto;
  }
}

@media (max-width:560px) {
  .kpis {
    grid-template-columns: repeat(2,1fr);
  }
  .phase {
    grid-template-columns: 1fr;
  }
  .phase>div+div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .bench {
    grid-template-columns: repeat(5,1fr);
  }
  .hb {
    grid-template-columns: 4.6em 1fr 3em;
  }
  .hb .tag {
    grid-column: 2/4;
  }
  .fin {
    grid-template-columns: repeat(2,1fr);
  }
  .eqcols {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .ldr {
    grid-template-columns: 6.5em 1fr;
  }
  .bty {
    grid-template-columns: repeat(3,1fr);
  }
  .waves {
    grid-template-columns: repeat(7,1fr);
  }
  .combo {
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  }
  .combo .pl:nth-of-type(2) {
    grid-column: 2;
  }
  .chap-h .no {
    font-size: 48px;
  }
  .chap-h h2 {
    font-size: 30px;
  }
  .slot {
    width: calc(33.3% - 6px);
  }
}

@media (prefers-reduced-motion:reduce) {
  .loop .mover {
    display: none;
  }
  .phase>div::after {
    transform: scaleX(1);
  }
  .dgrid div:not(.g) {
    background: var(--teal);
    color: #fff;
  }
}

@media (display-mode:standalone) {
  nav.top {
    padding-top: env(safe-area-inset-top);
  }
}
