/* =========================================================
   PARTNERS.CSS | OKX and Ledger chapters
   Loaded by index.html (RTL) and en.html (LTR) only.
   Uses the site tokens from theme-light.css.
   ========================================================= */

:root {
  --chapter-gold: #c9a227;
  --chapter-gold-soft: #e3c56f;
  --chapter-gold-deep: #8a6508;
  --chapter-ink: #f6efdd;
  --chapter-ink-dim: rgba(246, 239, 221, 0.68);
  --chapter-night: #04120c;
  --chapter-night-2: #071c13;
  --chapter-parchment: #f4eee1;
  --chapter-parchment-2: #efe7d7;
  --chapter-line-dark: rgba(201, 162, 39, 0.26);
  --chapter-line-light: rgba(8, 51, 31, 0.14);
}

/* ---------------------------------------------------------
   0. Page scrollbar
   --------------------------------------------------------- */

html {
  scrollbar-width: thin;
  scrollbar-color: #b8860b rgba(8, 51, 31, 0.1);
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: rgba(8, 51, 31, 0.06);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c9a227, #8a6508);
  border: 2px solid #faf7f0;
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #d8b45a, #8a6508);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* ---------------------------------------------------------
   1. Hero infrastructure strip
   --------------------------------------------------------- */

.infra-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 26px 0 2px;
  direction: inherit;
}

.infra-lead {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--chapter-gold-deep);
  white-space: nowrap;
}

.infra-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 4px;
  color: var(--emerald-deep);
  border-radius: 6px;
  transition: color 0.22s ease, transform 0.22s ease;
}

.infra-link:hover {
  color: var(--chapter-gold-deep);
  transform: translateY(-1px);
}

.infra-mark {
  width: auto;
  min-width: 24px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.infra-mark img {
  display: block;
  width: auto;
  height: auto;
  max-width: 24px;
  max-height: 22px;
}

.infra-link[href="#okx"] .infra-mark img {
  width: 46px;
  max-width: none;
  max-height: none;
}

.infra-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: start;
}

.infra-name b {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.infra-name em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.infra-arrow {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  opacity: 0.45;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.infra-link:hover .infra-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

[dir="rtl"] .infra-link:hover .infra-arrow {
  transform: translate(-2px, -2px);
}

.infra-diamond {
  width: 5px;
  height: 5px;
  background: var(--chapter-gold);
  transform: rotate(45deg);
  opacity: 0.7;
  flex: 0 0 auto;
}

/* ---------------------------------------------------------
   1b. Support team
   --------------------------------------------------------- */

.section[id] {
  scroll-margin-top: 84px;
}

.section-support .head {
  margin-bottom: 40px;
}

.section .btn {
  min-height: 52px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.supcard {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  padding: 28px 26px 26px;
  background: linear-gradient(180deg, #fffdf8 0%, #f7f1e4 100%);
  border: 1px solid rgba(184, 134, 11, 0.24);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 18px 44px -30px rgba(8, 51, 31, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.supcard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 100% 0%, rgba(201, 162, 39, 0.075), transparent 56%);
}

.supcard > * {
  position: relative;
  z-index: 1;
}

.supcard:hover {
  transform: translateY(-4px);
  border-color: rgba(184, 134, 11, 0.52);
  box-shadow:
    0 26px 54px -30px rgba(8, 51, 31, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.sup-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.sup-ava {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--emerald), var(--emerald-deep));
  color: #fff;
  border: 1px solid rgba(201, 162, 39, 0.55);
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.08),
    0 8px 18px -12px rgba(8, 51, 31, 0.7);
  font-family: "Cormorant Garamond", serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.sup-id {
  min-width: 0;
}

.sup-role {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  color: var(--chapter-gold-deep);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.sup-role .diamond {
  flex: 0 0 auto;
  background: currentColor;
}

.supcard h3 {
  margin: 0;
  color: var(--emerald-deep);
  font-family: "Cormorant Garamond", serif;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.08;
}

.sup-copy {
  flex: 1;
  margin: 0 0 22px;
  color: #5a6159;
  font-size: 13.5px;
  line-height: 1.7;
}

.sup-cta {
  width: 100%;
  height: 52px;
  min-height: 52px;
  margin-top: auto;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13.5px;
  white-space: nowrap;
}

.sup-cta:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
}

@media (max-width: 960px) {
  .support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .supcard:last-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "top copy"
      "cta cta";
    align-items: start;
    column-gap: 28px;
  }

  .supcard:last-child .sup-top {
    grid-area: top;
    margin: 0;
  }

  .supcard:last-child .sup-copy {
    grid-area: copy;
    max-width: 60ch;
    margin: 0;
  }

  .supcard:last-child .sup-cta {
    grid-area: cta;
    margin-top: 22px;
  }
}

@media (max-width: 620px) {
  .support-grid {
    grid-template-columns: 1fr;
  }

  .supcard:last-child {
    grid-column: auto;
    display: flex;
    flex-direction: column;
  }

  .supcard:last-child .sup-top {
    margin-bottom: 18px;
  }

  .supcard:last-child .sup-copy {
    max-width: none;
    margin: 0 0 22px;
  }

  .supcard:last-child .sup-cta {
    margin-top: auto;
  }

  .supcard {
    padding: 24px 22px;
  }

  .bookrow .btn {
    padding-inline: 1rem;
    font-size: 12.5px;
    white-space: nowrap;
  }
}

[dir="rtl"] .sup-ava {
  font-family: "Tajawal", sans-serif;
  font-size: 18px;
}

[dir="rtl"] .sup-role {
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: none;
}

[dir="rtl"] .supcard h3 {
  font-family: "Tajawal", sans-serif;
  font-size: 21px;
  font-weight: 700;
}

/* Centre the trailing pair in the five project cards on wide screens. */
@media (min-width: 901px) {
  .projgrid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .projgrid > .projcard {
    grid-column: span 2;
  }

  .projgrid > .projcard:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .projgrid > .projcard:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

.svc-ladder .card {
  padding: 30px;
}

.svc-ladder .card > .eyebrow {
  gap: 0.45rem;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.svc-ladder .price {
  font-size: clamp(34px, 2.7vw, 40px);
  line-height: 1.05;
  white-space: nowrap;
}

.svc-ladder .price small {
  font-size: 14px;
}

/* Keep the five project cards from leaving a single orphan at tablet width. */
@media (min-width: 541px) and (max-width: 900px) {
  .projgrid > .projcard:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    grid-template-areas:
      "logo title cta"
      "logo dom cta"
      "logo copy cta";
    align-items: center;
    column-gap: 22px;
    row-gap: 2px;
    padding: 24px 28px;
    text-align: start;
  }

  .projgrid > .projcard:last-child:nth-child(odd) .logo {
    grid-area: logo;
    width: 96px;
    height: 96px;
    margin: 0;
  }

  .projgrid > .projcard:last-child:nth-child(odd) .logo img {
    width: 82px;
    height: 82px;
  }

  .projgrid > .projcard:last-child:nth-child(odd) h3 {
    grid-area: title;
  }

  .projgrid > .projcard:last-child:nth-child(odd) .dom {
    grid-area: dom;
    margin-bottom: 4px;
  }

  .projgrid > .projcard:last-child:nth-child(odd) p {
    grid-area: copy;
    max-width: 60ch;
    margin: 0;
    font-size: 13.5px;
  }

  .projgrid > .projcard:last-child:nth-child(odd) .btn {
    grid-area: cta;
    align-self: center;
    margin: 0;
    white-space: nowrap;
  }
}

/* ---------------------------------------------------------
   2. Shared chapter architecture
   --------------------------------------------------------- */

.chapter {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.chapter-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

.chapter-rail {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: clamp(42px, 5vw, 66px);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.rail-index {
  font-family: "Cormorant Garamond", serif;
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--chapter-gold);
}

.rail-diamond {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  transform: rotate(45deg);
  background: currentColor;
  opacity: 0.65;
}

.rail-kicker {
  color: currentColor;
  opacity: 0.72;
}

.chapter-jump {
  display: flex;
  align-items: center;
  gap: 4px 20px;
  margin-inline-start: auto;
}

.chapter-jump a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 2px;
  color: currentColor;
  opacity: 0.72;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: opacity 0.22s ease, color 0.22s ease;
}

.chapter-jump a span {
  font-family: "Cormorant Garamond", serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--chapter-gold);
}

.chapter-jump a:hover,
.chapter-jump a.is-current {
  opacity: 1;
}

.chapter-body {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(40px, 5.2vw, 76px);
  align-items: center;
}

.chapter-copy {
  max-width: 570px;
  min-width: 0;
}

.chapter-body.swap .chapter-copy {
  order: 2;
}

.chapter-body.swap .chapter-visual {
  order: 1;
}

.chapter-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--chapter-gold);
}

.diamond {
  width: 5px;
  height: 5px;
  display: inline-block;
  flex: 0 0 auto;
  transform: rotate(45deg);
  background: var(--chapter-gold);
}

.chapter-title {
  margin: 17px 0 22px;
  line-height: 1;
  color: inherit;
}

.brand-word {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: clamp(3.9rem, 8vw, 6.7rem);
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: -0.055em;
  color: inherit;
  unicode-bidi: isolate;
}

.brand-sub {
  display: block;
  margin-top: 20px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.5rem, 2.6vw, 2.35rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: 0.005em;
}

.chapter-lead {
  max-width: 48ch;
  margin: 0 0 17px;
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.82;
}

.chapter-text {
  max-width: 50ch;
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.86;
}

.spec-list {
  list-style: none;
  margin: 29px 0 0;
  padding: 0;
  display: grid;
  gap: 15px;
}

.spec-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.spec-index {
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--chapter-gold);
}

.spec-list b {
  display: block;
  margin-bottom: 2px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.spec-list div > span {
  display: block;
  font-size: 0.82rem;
  line-height: 1.62;
  opacity: 0.68;
}

.chapter-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px 16px;
  margin-top: 31px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 54px;
  padding: 0 1.55rem;
  border-radius: 6px;
  border: 1px solid transparent;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
}

.cta-btn:active {
  transform: translateY(0) scale(0.99);
}

.cta-arrow {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  transition: transform 0.25s ease;
}

.cta-btn:hover .cta-arrow {
  transform: translateX(4px);
}

[dir="rtl"] .cta-btn:hover .cta-arrow {
  transform: translateX(-4px);
}

.cta-note {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 1;
}

.affiliate-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 46ch;
  margin: 16px 0 0;
  font-size: 11.5px;
  line-height: 1.68;
  opacity: 1;
}

.affiliate-note::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  margin-top: 0.55em;
  transform: rotate(45deg);
  background: var(--chapter-gold);
}

.chapter-sign {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 33px;
}

.sign-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.sign-meta {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.09em;
  opacity: 1;
}

.chapter a:focus-visible,
.infra-link:focus-visible {
  outline: 2px solid var(--chapter-gold);
  outline-offset: 3px;
  border-radius: 5px;
}

.infra-link:focus-visible {
  outline-color: var(--emerald);
}

.chapter-ledger a:focus-visible {
  outline-color: var(--emerald);
}

/* ---------------------------------------------------------
   3. OKX chapter
   --------------------------------------------------------- */

.chapter-okx {
  color: var(--chapter-ink);
  background:
    radial-gradient(1000px 620px at 82% 8%, rgba(20, 92, 62, 0.34), transparent 66%),
    radial-gradient(760px 620px at 6% 96%, rgba(9, 44, 30, 0.7), transparent 68%),
    linear-gradient(160deg, #071c13 0%, #04120c 54%, #020906 100%);
  padding: clamp(88px, 8vw, 108px) 0 clamp(76px, 8vw, 112px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -1px 0 rgba(201, 162, 39, 0.18);
}

.chapter-okx .chapter-rail {
  color: var(--chapter-ink);
}

.chapter-okx .chapter-eyebrow {
  color: var(--chapter-gold-soft);
}

.chapter-okx .brand-sub {
  color: var(--chapter-gold-soft);
}

.chapter-okx .chapter-lead {
  color: rgba(246, 239, 221, 0.9);
}

.chapter-okx .chapter-text {
  color: rgba(246, 239, 221, 0.62);
}

.chapter-okx .spec-list b {
  color: var(--chapter-ink);
}

.chapter-okx .cta-btn {
  background: linear-gradient(135deg, #dfc06a 0%, #c9a227 48%, #a97c0c 100%);
  border-color: rgba(255, 246, 214, 0.45);
  color: #171204;
  box-shadow:
    0 16px 38px -18px rgba(201, 162, 39, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.chapter-okx .cta-btn:hover {
  box-shadow:
    0 22px 48px -18px rgba(201, 162, 39, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.chapter-okx .cta-note {
  color: rgba(246, 239, 221, 0.78);
}

.chapter-okx .affiliate-note {
  color: rgba(246, 239, 221, 0.72);
}

.chapter-okx .sign-meta {
  color: rgba(246, 239, 221, 0.72);
}

.chapter-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(1px 1px at 18% 22%, rgba(227, 197, 111, 0.4), transparent),
    radial-gradient(1px 1px at 72% 16%, rgba(246, 239, 221, 0.28), transparent),
    radial-gradient(1px 1px at 42% 72%, rgba(227, 197, 111, 0.3), transparent),
    radial-gradient(1.4px 1.4px at 88% 62%, rgba(246, 239, 221, 0.22), transparent),
    radial-gradient(1px 1px at 8% 86%, rgba(246, 239, 221, 0.24), transparent),
    radial-gradient(1px 1px at 58% 44%, rgba(227, 197, 111, 0.24), transparent);
}

.chapter::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.chapter-ledger::after {
  opacity: 0.022;
  mix-blend-mode: multiply;
}

/* OKX instrument */

.okx-instrument {
  position: relative;
  width: 100%;
  max-width: 590px;
  margin-inline: auto;
}

.instrument-frame {
  position: relative;
  min-height: 620px;
  border: 1px solid var(--chapter-line-dark);
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(620px 420px at 76% 4%, rgba(25, 96, 64, 0.34), transparent 64%),
    linear-gradient(158deg, #0a271b 0%, #05150e 48%, #020906 100%);
  box-shadow:
    0 48px 100px -44px #000,
    0 12px 34px -22px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.instrument-lattice {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.62;
  background-image:
    linear-gradient(90deg, rgba(201, 162, 39, 0.09) 1px, transparent 1px),
    linear-gradient(0deg, rgba(201, 162, 39, 0.075) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(115% 100% at 58% 34%, #000 20%, transparent 78%);
  mask-image: radial-gradient(115% 100% at 58% 34%, #000 20%, transparent 78%);
}

.instrument-spot {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(280px circle at var(--mx, 74%) var(--my, 18%), rgba(201, 162, 39, 0.16), transparent 64%);
}

.okx-instrument:hover .instrument-spot {
  opacity: 1;
}

.instrument-frame::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 44%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(227, 197, 111, 0.075), transparent);
  transform: translateX(-130%);
}

.chapter.is-live .instrument-frame::after {
  opacity: 1;
  animation: partnerScan 9s cubic-bezier(0.4, 0, 0.2, 1) 1.2s infinite;
}

.instrument-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 620px;
  padding: 28px 30px 24px;
}

.instrument-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.instrument-brand img {
  display: block;
  width: 66px;
  height: auto;
}

.instrument-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: rgba(246, 239, 221, 0.65);
  text-align: end;
}

.tag-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--chapter-gold);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.1);
}

.instrument-chart {
  position: relative;
  flex: 1 1 auto;
  min-height: 275px;
  margin: 25px -2px 14px;
}

.instrument-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid path {
  stroke: rgba(201, 162, 39, 0.105);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart-area {
  opacity: 0.55;
}

.chart-line {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.chart-line-ghost {
  stroke: rgba(86, 160, 121, 0.36);
  stroke-width: 1;
  stroke-dasharray: 2 8;
}

.chart-line-gold {
  stroke: var(--chapter-gold-soft);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px rgba(201, 162, 39, 0.35));
}

.chapter.is-live .chart-line-gold {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawPartnerLine 2.4s cubic-bezier(0.22, 0.8, 0.2, 1) 0.2s both;
}

.chart-nodes circle {
  fill: #06180f;
  stroke: var(--chapter-gold-soft);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
}

.chart-nodes .node-core {
  fill: var(--chapter-gold-soft);
  stroke: none;
}

.chapter.is-live .chart-nodes circle {
  animation: partnerNodeIn 0.7s ease-out 1.65s both;
}

.chart-axis {
  position: absolute;
  inset-inline-end: 2px;
  bottom: -3px;
  display: flex;
  gap: 13px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(246, 239, 221, 0.5);
}

.instrument-ribbon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid rgba(201, 162, 39, 0.17);
  padding-top: 17px;
}

.instrument-ribbon > div {
  padding-inline-end: 12px;
}

.instrument-ribbon > div + div {
  border-inline-start: 1px solid rgba(201, 162, 39, 0.12);
  padding-inline-start: 14px;
}

.instrument-ribbon span {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 13px;
  line-height: 1;
  color: var(--chapter-gold);
  margin-bottom: 5px;
}

.instrument-ribbon b {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(246, 239, 221, 0.8);
}

.instrument-ribbon em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(246, 239, 221, 0.5);
}

.frame-corner {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  pointer-events: none;
  opacity: 0.55;
}

.frame-corner.tl {
  top: 10px;
  left: 10px;
  border-top: 1px solid var(--chapter-gold);
  border-left: 1px solid var(--chapter-gold);
}

.frame-corner.tr {
  top: 10px;
  right: 10px;
  border-top: 1px solid var(--chapter-gold);
  border-right: 1px solid var(--chapter-gold);
}

.frame-corner.bl {
  bottom: 10px;
  left: 10px;
  border-bottom: 1px solid var(--chapter-gold);
  border-left: 1px solid var(--chapter-gold);
}

.frame-corner.br {
  bottom: 10px;
  right: 10px;
  border-bottom: 1px solid var(--chapter-gold);
  border-right: 1px solid var(--chapter-gold);
}

/* ---------------------------------------------------------
   4. Ledger chapter
   --------------------------------------------------------- */

.chapter-ledger {
  color: var(--emerald-deep);
  background:
    radial-gradient(880px 560px at 10% 4%, rgba(201, 162, 39, 0.075), transparent 64%),
    radial-gradient(760px 620px at 96% 90%, rgba(10, 77, 46, 0.075), transparent 68%),
    linear-gradient(180deg, #f6f1e7 0%, var(--chapter-parchment) 46%, #f1eadb 100%);
  padding: clamp(88px, 8vw, 106px) 0 clamp(76px, 8vw, 112px);
  box-shadow: inset 0 -1px 0 rgba(8, 51, 31, 0.08);
}

.chapter-ledger .chapter-rail {
  color: var(--emerald-deep);
}

.chapter-ledger .rail-index,
.chapter-ledger .chapter-eyebrow {
  color: var(--chapter-gold-deep);
}

.chapter-ledger .brand-sub {
  color: var(--emerald);
}

.chapter-ledger .chapter-lead {
  color: #35433a;
}

.chapter-ledger .chapter-text {
  color: #5a6159;
}

.chapter-ledger .spec-list b {
  color: var(--emerald-deep);
}

.chapter-ledger .cta-btn {
  background: linear-gradient(135deg, #0b3a25 0%, #08331f 62%, #062718 100%);
  border-color: rgba(201, 162, 39, 0.58);
  color: var(--chapter-ink);
  box-shadow:
    0 18px 40px -22px rgba(8, 51, 31, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.chapter-ledger .cta-btn:hover {
  background: linear-gradient(135deg, #0d4a2f 0%, #0a4d2e 62%, #08331f 100%);
  box-shadow:
    0 24px 48px -22px rgba(8, 51, 31, 0.66),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.chapter-ledger .cta-note {
  color: #5f594c;
}

.chapter-ledger .affiliate-note {
  color: #5f594c;
}

.chapter-ledger .sign-meta {
  color: #5a5448;
}

.chapter-ledger .spec-index,
.chapter-ledger .chapter-jump a span {
  color: var(--chapter-gold-deep);
}

.vault-visual {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin-inline: auto;
  display: grid;
  place-items: center;
}

.vault-shell {
  position: relative;
  width: min(100%, 540px);
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(420px 420px at 50% 38%, rgba(22, 55, 41, 0.62), transparent 66%),
    radial-gradient(520px 520px at 78% 92%, rgba(201, 162, 39, 0.09), transparent 62%),
    linear-gradient(155deg, #0b1a13 0%, #050d09 55%, #020604 100%);
  border: 1px solid rgba(201, 162, 39, 0.3);
  box-shadow:
    0 44px 90px -42px rgba(8, 51, 31, 0.62),
    0 10px 30px -20px rgba(8, 51, 31, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.vault-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.vault-aura {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.09), transparent 66%);
  filter: blur(10px);
}

.vault-rings {
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.18);
  box-shadow:
    0 0 0 22px rgba(201, 162, 39, 0.035),
    0 0 0 23px rgba(201, 162, 39, 0.1),
    0 0 0 48px rgba(201, 162, 39, 0.022),
    0 0 0 49px rgba(201, 162, 39, 0.07),
    inset 0 0 90px rgba(0, 0, 0, 0.8);
}

.vault-ticks {
  position: absolute;
  width: 88%;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.5;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(201, 162, 39, 0.55) 0deg 0.45deg,
    transparent 0.45deg 6deg
  );
  -webkit-mask-image: radial-gradient(circle, transparent 0 68%, #000 68.6% 70.4%, transparent 71%);
  mask-image: radial-gradient(circle, transparent 0 68%, #000 68.6% 70.4%, transparent 71%);
}

.vault-door {
  position: relative;
  width: 54%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 162, 39, 0.2);
  background:
    radial-gradient(circle at 36% 26%, rgba(64, 83, 73, 0.38), transparent 42%),
    radial-gradient(circle at 50% 50%, #101c16 0%, #07100c 58%, #020604 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.07),
    inset 0 -26px 50px rgba(0, 0, 0, 0.82),
    0 32px 64px -20px #000;
}

.vault-door::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.13);
  pointer-events: none;
}

.vault-door::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  border: 1px dashed rgba(201, 162, 39, 0.11);
  pointer-events: none;
}

.device {
  position: relative;
  width: 34%;
  min-width: 112px;
  aspect-ratio: 0.64;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  transform: rotate(-7deg);
  background:
    linear-gradient(145deg, rgba(72, 82, 77, 0.6) 0%, rgba(22, 29, 26, 0.9) 28%, #0a100d 62%, #050806 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 22px 40px -12px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -8px 18px rgba(0, 0, 0, 0.65);
}

.device::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  right: 9px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.device-screen {
  width: 74%;
  aspect-ratio: 1.42;
  border-radius: 5px;
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, #0c1a13 0%, #040b07 100%);
  border: 1px solid rgba(201, 162, 39, 0.2);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9), 0 0 18px rgba(201, 162, 39, 0.04);
}

.device-screen img {
  display: block;
  width: 37%;
  height: auto;
  opacity: 0.82;
}

.device-button {
  width: 24%;
  height: 3px;
  border-radius: 99px;
  background: rgba(201, 162, 39, 0.38);
}

.vault-scan {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle, #000 0 54%, transparent 55%);
  mask-image: radial-gradient(circle, #000 0 54%, transparent 55%);
}

.vault-scan::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 0;
  height: 64px;
  background: linear-gradient(180deg, transparent, rgba(227, 197, 111, 0.12), transparent);
  filter: blur(2px);
  transform: translateY(-120%);
}

.chapter.is-live .vault-scan::before {
  animation: vaultScan 7.5s cubic-bezier(0.45, 0, 0.55, 1) 1s infinite;
}

.vault-paths {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
}

.vault-paths path {
  fill: none;
  stroke: rgba(201, 162, 39, 0.28);
  stroke-width: 1;
  stroke-dasharray: 2 9;
  vector-effect: non-scaling-stroke;
}

.chapter.is-live .vault-paths path {
  animation: vaultPath 24s linear infinite;
}

.vault-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(246, 239, 221, 0.6);
  text-align: center;
}

/* ---------------------------------------------------------
   5. RTL typography and mirrors
   --------------------------------------------------------- */

[dir="rtl"] .infra-lead {
  letter-spacing: 0.04em;
}

[dir="rtl"] .infra-name b,
[dir="rtl"] .infra-name em,
[dir="rtl"] .chapter-rail,
[dir="rtl"] .chapter-jump a,
[dir="rtl"] .chapter-eyebrow,
[dir="rtl"] .cta-note,
[dir="rtl"] .sign-meta,
[dir="rtl"] .vault-caption,
[dir="rtl"] .instrument-tag,
[dir="rtl"] .instrument-ribbon em {
  letter-spacing: 0.03em;
  text-transform: none;
}

[dir="rtl"] .chapter-rail,
[dir="rtl"] .chapter-jump a,
[dir="rtl"] .cta-note,
[dir="rtl"] .instrument-tag,
[dir="rtl"] .instrument-ribbon em {
  font-size: 11px;
}

[dir="rtl"] .brand-word {
  font-family: "Inter", sans-serif;
  letter-spacing: -0.045em;
  text-align: right;
}

[dir="rtl"] .cta-arrow,
[dir="rtl"] .infra-arrow {
  transform: scaleX(-1);
}

[dir="rtl"] .cta-btn:hover .cta-arrow {
  transform: scaleX(-1) translateX(4px);
}

[dir="rtl"] .infra-link:hover .infra-arrow {
  transform: scaleX(-1) translate(2px, -2px);
}

[dir="rtl"] .brand-sub {
  font-family: "Tajawal", sans-serif;
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 2.05rem);
  line-height: 1.4;
  letter-spacing: 0;
}

[dir="rtl"] .chapter-lead,
[dir="rtl"] .chapter-text {
  letter-spacing: 0;
}

[dir="rtl"] .chapter-lead {
  line-height: 1.95;
}

[dir="rtl"] .chapter-text {
  line-height: 1.98;
}

[dir="rtl"] .sign-name {
  font-family: "Tajawal", sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

[dir="rtl"] .instrument-ribbon b {
  font-size: 11px;
}

[dir="rtl"] .instrument-ribbon em {
  font-size: 8px;
}

/* ---------------------------------------------------------
   6. Responsive
   --------------------------------------------------------- */

@media (max-width: 980px) {
  .chapter-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 46px;
  }

  .chapter-copy {
    max-width: 640px;
    margin-inline: auto;
  }

  .chapter-body.swap .chapter-copy,
  .chapter-body.swap .chapter-visual {
    order: initial;
  }

  .okx-instrument,
  .vault-visual {
    max-width: 600px;
  }

  .instrument-frame,
  .instrument-inner {
    min-height: 500px;
  }
}

@media (max-width: 720px) {
  .chapter-wrap {
    padding: 0 22px;
  }

  .chapter-rail {
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 38px;
  }

  .chapter-jump {
    width: 100%;
    margin-inline-start: 0;
    padding-top: 2px;
    gap: 18px;
  }

  .chapter-jump a {
    min-height: 40px;
  }

  .instrument-frame,
  .instrument-inner {
    min-height: 440px;
  }

  .instrument-inner {
    padding: 22px 22px 20px;
  }

  .instrument-chart {
    min-height: 220px;
    margin-top: 18px;
  }

  .instrument-ribbon {
    padding-top: 14px;
  }

  .instrument-ribbon b {
    font-size: 9.5px;
  }

  .instrument-ribbon em {
    display: none;
  }

  .vault-shell {
    width: 100%;
  }

  .infra-strip {
    gap: 4px 16px;
    padding-top: 22px;
  }

  .infra-lead {
    width: 100%;
    text-align: center;
    margin-bottom: 2px;
  }

  .infra-diamond {
    display: none;
  }
}

@media (max-width: 520px) {
  .chapter-wrap {
    padding: 0 18px;
  }

  .brand-word {
    font-size: clamp(3.2rem, 17vw, 4.3rem);
  }

  .chapter-title {
    margin-top: 14px;
  }

  .chapter-lead {
    font-size: 0.98rem;
  }

  .chapter-text {
    font-size: 0.9rem;
  }

  .spec-list {
    gap: 13px;
  }

  .spec-list li {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
  }

  .spec-index {
    font-size: 18px;
  }

  .chapter-cta {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .cta-btn {
    width: 100%;
    min-height: 52px;
  }

  .affiliate-note {
    font-size: 11px;
  }

  .instrument-frame,
  .instrument-inner {
    min-height: 390px;
  }

  .instrument-inner {
    padding: 18px 17px 17px;
  }

  .instrument-brand img {
    width: 56px;
  }

  .instrument-tag {
    max-width: 128px;
    font-size: 7.5px;
    line-height: 1.4;
  }

  .instrument-chart {
    min-height: 185px;
    margin: 14px -4px 10px;
  }

  .instrument-ribbon {
    gap: 0;
  }

  .instrument-ribbon > div {
    padding-inline-end: 8px;
  }

  .instrument-ribbon > div + div {
    padding-inline-start: 9px;
  }

  .instrument-ribbon b {
    font-size: 8.8px;
  }

  .instrument-ribbon span {
    font-size: 11px;
  }

  .chart-axis {
    display: none;
  }

  .vault-caption {
    font-size: 7.5px;
    letter-spacing: 0.12em;
  }

  .vault-rings {
    width: 76%;
  }

  .vault-ticks {
    width: 92%;
  }
}

@media (max-width: 380px) {
  .infra-strip {
    justify-content: flex-start;
  }

  .infra-link {
    gap: 8px;
  }

  .infra-mark {
    width: 30px;
    height: 30px;
  }

  .infra-mark img {
    max-width: 19px;
    max-height: 19px;
  }

  .infra-name b {
    font-size: 12px;
  }

  .instrument-inner {
    padding-inline: 14px;
  }

  .instrument-ribbon b {
    font-size: 8.2px;
  }
}

/* ---------------------------------------------------------
   7. Motion
   --------------------------------------------------------- */

@keyframes drawPartnerLine {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes partnerNodeIn {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes partnerScan {
  0% {
    transform: translateX(-130%);
  }
  60%,
  100% {
    transform: translateX(330%);
  }
}

@keyframes vaultScan {
  0% {
    transform: translateY(-120%);
  }
  70%,
  100% {
    transform: translateY(420%);
  }
}

@keyframes vaultPath {
  to {
    stroke-dashoffset: -120;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .chapter *,
  .infra-strip * {
    animation: none !important;
    transition-duration: 0.001ms !important;
  }

  .chart-line-gold {
    stroke-dashoffset: 0 !important;
  }

  .chart-nodes circle {
    opacity: 1 !important;
  }

  .instrument-frame::after,
  .instrument-spot,
  .vault-scan::before {
    display: none !important;
  }

  .instrument-spot {
    opacity: 0 !important;
  }
}
