/* ==========================================================================
   Banyano Landing & Theme Stylesheet — Palette: Isfahan Tile (کاشی اصفهان)
   All colours derive strictly from assets/brand/css/banyano-tokens.css.
   Zero hardcoded colour values. RTL-first logical properties throughout.
   ========================================================================== */

:root {
  --bny-container: 1220px;
  --bny-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --bny-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --bny-header-h: 70px;

  /* Architectural contrast band (Lapis glaze in light, Night surface in dark) */
  --bny-band-bg: var(--bny-lapis-deep);
  --bny-band-surface: var(--bny-lapis);
  --bny-band-text: var(--bny-cream);
  --bny-band-muted: color-mix(in srgb, var(--bny-cream) 78%, transparent);
  --bny-band-line: color-mix(in srgb, var(--bny-cream) 18%, transparent);
  --bny-band-line-strong: color-mix(in srgb, var(--bny-cream) 34%, transparent);
  --bny-band-accent: var(--bny-highlight);
  --bny-band-teal: color-mix(in srgb, var(--bny-firuzeh) 55%, var(--bny-cream));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bny-band-bg: var(--bny-surface);
    --bny-band-surface: var(--bny-surface-2);
    --bny-band-text: var(--bny-text);
    --bny-band-muted: var(--bny-text-muted);
    --bny-band-line: var(--bny-line);
    --bny-band-line-strong: var(--bny-line-strong);
    --bny-band-teal: var(--bny-accent-text);
  }
}

:root[data-theme="dark"] {
  --bny-band-bg: var(--bny-surface);
  --bny-band-surface: var(--bny-surface-2);
  --bny-band-text: var(--bny-text);
  --bny-band-muted: var(--bny-text-muted);
  --bny-band-line: var(--bny-line);
  --bny-band-line-strong: var(--bny-line-strong);
  --bny-band-teal: var(--bny-accent-text);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bny-bg);
  color: var(--bny-text);
  font-family: var(--bny-font-fa);
  overflow-x: clip;
}

@media (pointer: fine) {
  html {
    overscroll-behavior: none;
  }
}

body {
  margin: 0;
  background: var(--bny-bg);
  color: var(--bny-text);
  font-family: var(--bny-font-fa);
  font-size: 16.5px;
  line-height: 1.8;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: color-mix(in srgb, var(--bny-primary) 16%, transparent);
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--bny-primary);
  text-decoration: none;
  transition: color 160ms var(--bny-ease-out);
}

@media (hover: hover) and (pointer: fine) {
  a:hover {
    color: var(--bny-primary-hover);
  }
}

button,
input,
select {
  font-family: inherit;
  color: inherit;
}

button,
a,
input[type="range"] {
  touch-action: manipulation;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--bny-text);
  font-weight: 700;
  line-height: 1.32;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

[id] {
  scroll-margin-top: calc(var(--bny-header-h) + 20px);
}

.bny-container {
  width: 100%;
  max-width: var(--bny-container);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 32px);
}

.bny-num {
  font-family: var(--bny-font-fa-numeric);
  font-variant-numeric: tabular-nums;
}

.bny-num--signed {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.bny-en {
  font-family: var(--bny-font-en);
  direction: ltr;
  unicode-bidi: isolate;
}

.bny-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Skip Link ---------- */
.bny-skip-link {
  position: fixed;
  top: 12px;
  inset-inline-start: 16px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--bny-radius-sm);
  background: var(--bny-primary);
  color: var(--bny-on-primary);
  font-weight: 700;
  font-size: 14px;
  transform: translateY(-140%);
  transition: transform 160ms var(--bny-ease-out);
}

.bny-skip-link:focus {
  transform: translateY(0);
  color: var(--bny-on-primary);
}

/* ---------- Buttons ---------- */
.bny-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--bny-radius-md);
  border: 1px solid transparent;
  font-family: var(--bny-font-fa);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background-color 160ms var(--bny-ease-out),
    border-color 160ms var(--bny-ease-out),
    color 160ms var(--bny-ease-out),
    transform 150ms var(--bny-ease-out);
}

.bny-btn:active {
  transform: scale(0.97);
}

.bny-btn--primary {
  background: var(--bny-primary);
  color: var(--bny-on-primary);
}

@media (hover: hover) and (pointer: fine) {
  .bny-btn--primary:hover {
    background: var(--bny-primary-hover);
    color: var(--bny-on-primary);
  }
}

.bny-btn--secondary {
  background: var(--bny-surface);
  color: var(--bny-text);
  border-color: var(--bny-line-strong);
}

@media (hover: hover) and (pointer: fine) {
  .bny-btn--secondary:hover {
    background: var(--bny-surface-2);
    border-color: var(--bny-primary);
    color: var(--bny-text);
  }
}

.bny-btn--ghost {
  background: transparent;
  color: var(--bny-text);
  border-color: var(--bny-line-strong);
  padding-inline: 12px;
}

@media (hover: hover) and (pointer: fine) {
  .bny-btn--ghost:hover {
    background: var(--bny-surface);
    border-color: var(--bny-primary);
    color: var(--bny-text);
  }
}

.bny-btn--icon {
  width: 42px;
  min-height: 42px;
  padding: 0;
}

.bny-btn--lg {
  min-height: 48px;
  padding: 12px 24px;
  font-size: 15.5px;
}

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

.bny-header__inner {
  min-height: var(--bny-header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.bny-header .bny-logo {
  padding-block: 6px;
  padding-inline: 4px;
  flex-shrink: 0;
}

.bny-header .bny-logo svg {
  height: 34px;
  width: auto;
  display: block;
}

.bny-nav {
  display: flex;
  align-items: center;
}

.bny-nav__list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bny-nav__list a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--bny-radius-sm);
  color: var(--bny-text-muted);
  font-size: 15px;
  font-weight: 500;
  transition:
    color 150ms var(--bny-ease-out),
    background-color 150ms var(--bny-ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .bny-nav__list a:hover {
    color: var(--bny-text);
    background: var(--bny-surface);
  }
}

.bny-nav__list a[aria-current="page"] {
  color: var(--bny-text);
  font-weight: 700;
}

.bny-header__actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bny-menu-toggle {
  display: none;
}

/* Mobile drawer */
.bny-drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
  visibility: hidden;
}

.bny-drawer[data-open="true"] {
  pointer-events: auto;
  visibility: visible;
}

.bny-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bny-night) 55%, transparent);
  opacity: 0;
  transition: opacity 200ms var(--bny-ease-out);
}

.bny-drawer[data-open="true"] .bny-drawer__backdrop {
  opacity: 1;
}

.bny-drawer__panel {
  position: relative;
  width: min(320px, 86vw);
  height: 100%;
  background: var(--bny-surface);
  border-inline-end: 1px solid var(--bny-line);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overscroll-behavior: contain;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 240ms var(--bny-ease-out);
}

.bny-drawer[data-open="true"] .bny-drawer__panel {
  transform: translateX(0);
}

.bny-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bny-line);
}

.bny-drawer__top .bny-logo svg {
  height: 28px;
  width: auto;
}

.bny-drawer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.bny-drawer__links a {
  display: block;
  padding: 12px 10px;
  border-radius: var(--bny-radius-sm);
  color: var(--bny-text);
  font-weight: 500;
  font-size: 16px;
}

.bny-drawer__links a:active {
  background: var(--bny-surface-2);
}

/* ---------- Hero Section (Architectural Lattice + Interactive Workbench) ---------- */
.bny-hero {
  position: relative;
  padding-block: clamp(32px, 4.8vw, 64px) clamp(40px, 5.5vw, 72px);
  background-color: var(--bny-bg);
  background-image: var(--bny-pattern);
  background-size: 40px 40px;
  border-bottom: 1px solid var(--bny-line);
}

/* Soft edge fade so the lattice breathes quietly around the hero */
.bny-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bny-bg) 70%, transparent) 0%,
    color-mix(in srgb, var(--bny-bg) 35%, transparent) 42%,
    color-mix(in srgb, var(--bny-bg) 88%, transparent) 100%
  );
  pointer-events: none;
}

.bny-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
}

.bny-hero__editorial {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.bny-hero__accent-rule {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bny-hero__saffron-bar {
  width: 36px;
  height: 3px;
  border-radius: var(--bny-radius-pill);
  background: var(--bny-highlight);
  flex-shrink: 0;
}

.bny-hero__scope {
  font-size: 14px;
  font-weight: 500;
  color: var(--bny-accent-text);
}

.bny-hero__title {
  font-size: clamp(26px, 3.6vw, 46px);
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--bny-text);
  max-width: 17ch;
}

.bny-hero__lead {
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.85;
  color: var(--bny-text-muted);
  max-width: 50ch;
}

.bny-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

/* Honest architectural ledger under CTAs */
.bny-hero__ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--bny-line-strong);
}

.bny-ledger-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bny-ledger-item__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--bny-text);
}

.bny-ledger-item__note {
  font-size: 13px;
  line-height: 1.55;
  color: var(--bny-text-muted);
}

/* ---------- Hero Interactive Options Payoff & Binomial Canopy Workbench ---------- */
.bny-workbench {
  background: var(--bny-surface);
  border: 1px solid var(--bny-line-strong);
  border-radius: var(--bny-radius-lg);
  overflow: hidden;
  min-width: 0;
}

.bny-workbench__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bny-surface-2);
  border-bottom: 1px solid var(--bny-line);
}

.bny-workbench__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bny-workbench__title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--bny-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bny-workbench__symbol-meta {
  font-size: 13px;
  color: var(--bny-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.bny-workbench__tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 8px 12px 0;
  gap: 4px;
  background: var(--bny-surface);
  border-bottom: 1px solid var(--bny-line);
}

.bny-tab-btn {
  position: relative;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 10px 8px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--bny-text-muted);
  cursor: pointer;
  text-align: center;
  transition: color 150ms var(--bny-ease-out);
}

.bny-tab-btn::after {
  content: "";
  position: absolute;
  inset-inline: 10px;
  bottom: -1px;
  height: 2.5px;
  border-radius: var(--bny-radius-pill);
  background: var(--bny-highlight);
  transform: scaleX(0);
  transition: transform 200ms var(--bny-ease-out);
}

.bny-tab-btn[aria-selected="true"] {
  color: var(--bny-primary);
  font-weight: 700;
}

.bny-tab-btn[aria-selected="true"]::after {
  transform: scaleX(1);
}

@media (hover: hover) and (pointer: fine) {
  .bny-tab-btn:hover {
    color: var(--bny-text);
  }
}

.bny-workbench__body {
  padding: 16px 18px 14px;
  display: grid;
  gap: 14px;
}

.bny-workbench__contract-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.bny-contract-id {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.bny-contract-id__ticker {
  font-size: 17px;
  font-weight: 700;
  color: var(--bny-text);
}

.bny-contract-id__desc {
  font-size: 13px;
  color: var(--bny-text-muted);
}

.bny-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--bny-radius-pill);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.bny-chip--up {
  background: var(--bny-up-bg);
  color: var(--bny-up);
}

.bny-chip--down {
  background: var(--bny-down-bg);
  color: var(--bny-down);
}

.bny-chip--neutral {
  background: var(--bny-surface-2);
  color: var(--bny-text-muted);
}

/* Split visual: Payoff curve + Binomial Data Canopy tree */
.bny-workbench__charts {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
  gap: 12px;
  align-items: stretch;
}

.bny-payoff-box,
.bny-canopy-box {
  background: var(--bny-bg);
  border: 1px solid var(--bny-line);
  border-radius: var(--bny-radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.bny-chart-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--bny-text-muted);
  margin-bottom: 6px;
}

.bny-payoff-svg {
  width: 100%;
  height: 152px;
  display: block;
  overflow: visible;
}

.bny-svg-zero {
  stroke: var(--bny-line-strong);
  stroke-width: 1.25;
  stroke-dasharray: 4 4;
}

.bny-svg-up-area {
  fill: color-mix(in srgb, var(--bny-up) 18%, transparent);
}

.bny-svg-down-area {
  fill: color-mix(in srgb, var(--bny-down) 16%, transparent);
}

.bny-svg-be {
  stroke: var(--bny-series-2);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}

.bny-svg-be-text {
  fill: var(--bny-accent-text);
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--bny-font-fa);
}

.bny-svg-guide {
  stroke: var(--bny-highlight);
  stroke-width: 1.5;
  stroke-opacity: 0.7;
}

.bny-svg-curve {
  fill: none;
  stroke: var(--bny-series-1);
  stroke-width: 2.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bny-svg-dot {
  fill: var(--bny-highlight);
  stroke: var(--bny-surface);
  stroke-width: 2.25;
}

.bny-wb-symbol {
  width: 22px;
  height: 20px;
  color: var(--bny-logo);
  flex-shrink: 0;
  display: block;
}

.bny-canopy-svg {
  width: 100%;
  height: 148px;
  display: block;
}

.bny-c-arc {
  fill: none;
  stroke: var(--bny-series-1);
  stroke-width: 2.5;
  stroke-opacity: 0.45;
}

.bny-c-edge {
  fill: none;
  stroke: var(--bny-line-strong);
  stroke-width: 2;
  stroke-linecap: round;
}

.bny-c-node {
  fill: var(--bny-series-1);
}

.bny-c-node--root {
  fill: var(--bny-highlight);
  stroke: var(--bny-surface);
  stroke-width: 2;
}

.bny-c-node--leaf[data-profit="true"] {
  fill: var(--bny-series-2);
}

.bny-c-node--leaf[data-profit="false"] {
  fill: var(--bny-line-strong);
}

.bny-c-val {
  fill: var(--bny-text);
  font-size: 10px;
  font-weight: 700;
}

.bny-c-val--mid {
  fill: var(--bny-text-muted);
  font-size: 9.5px;
  font-weight: 500;
}

.bny-canopy-caption {
  font-size: 11.5px;
  color: var(--bny-text-muted);
  text-align: center;
  margin-top: 4px;
}

/* Interactive Spot Slider */
.bny-slider-box {
  padding: 12px 14px;
  background: var(--bny-bg);
  border: 1px solid var(--bny-line);
  border-radius: var(--bny-radius-md);
  display: grid;
  gap: 8px;
}

.bny-slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
}

.bny-slider-label {
  color: var(--bny-text-muted);
  font-weight: 500;
}

.bny-slider-val {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--bny-text);
  white-space: nowrap;
  flex-shrink: 0;
}

.bny-reset-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--bny-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .bny-reset-btn:hover {
    background: var(--bny-surface-2);
  }
}

.bny-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--bny-radius-pill);
  background: var(--bny-line-strong);
  cursor: pointer;
  direction: ltr;
}

.bny-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bny-primary);
  border: 2.5px solid var(--bny-surface);
  box-shadow: 0 0 0 1px var(--bny-primary);
  transition: transform 140ms var(--bny-ease-out);
}

.bny-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bny-primary);
  border: 2.5px solid var(--bny-surface);
  box-shadow: 0 0 0 1px var(--bny-primary);
}

.bny-range:active::-webkit-slider-thumb {
  transform: scale(1.12);
}

/* Greeks strip */
.bny-greeks {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--bny-line);
  border-radius: var(--bny-radius-md);
  overflow: hidden;
  background: var(--bny-surface);
}

.bny-greek-cell {
  padding: 9px 8px;
  text-align: center;
  border-inline-end: 1px solid var(--bny-line);
  min-width: 0;
}

.bny-greek-cell:last-child {
  border-inline-end: 0;
}

.bny-greek-cell__k {
  display: block;
  font-size: 11.5px;
  color: var(--bny-text-muted);
  line-height: 1.4;
}

.bny-greek-cell__v {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--bny-text);
  margin-top: 2px;
}

.bny-workbench__foot {
  padding: 10px 18px;
  border-top: 1px solid var(--bny-line);
  background: var(--bny-surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--bny-text-muted);
}

/* Inline Data Canopy Loader (from banyano-web-kit/motion/) */
.bny-loader {
  width: 22px;
  height: 22px;
  color: var(--bny-logo);
  flex-shrink: 0;
}

.bny-loader path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4.8;
  stroke-linecap: round;
  stroke-dasharray: 1 1;
}

.bny-loader circle {
  fill: currentColor;
  transform-box: fill-box;
  transform-origin: center;
}

.bny-loader .bny-ld-g { animation: bnyFade 3.2s infinite; }
.bny-loader .bny-ld-s { animation: bnyPop 3.2s infinite; }
.bny-loader .bny-ld-e1 { animation: bnyE1 3.2s infinite; }
.bny-loader .bny-ld-e2 { animation: bnyE2 3.2s infinite; }
.bny-loader .bny-ld-ar { animation: bnyAr 3.2s infinite; stroke-linecap: butt; }
.bny-loader .bny-ld-n1 { animation: bnyN1 3.2s infinite; }
.bny-loader .bny-ld-n2 { animation: bnyN2 3.2s infinite; }

@keyframes bnyFade { 0%, 82% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes bnyPop { 0% { transform: scale(0.1); opacity: 0; } 10%, 100% { transform: scale(1); opacity: 1; } }
@keyframes bnyE1 { 0%, 8% { stroke-dashoffset: 1; opacity: 0; } 9% { opacity: 1; } 26%, 100% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes bnyN1 { 0%, 24% { transform: scale(0.1); opacity: 0; } 32%, 100% { transform: scale(1); opacity: 1; } }
@keyframes bnyE2 { 0%, 28% { stroke-dashoffset: 1; opacity: 0; } 29% { opacity: 1; } 46%, 100% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes bnyN2 { 0%, 44% { transform: scale(0.1); opacity: 0; } 52%, 100% { transform: scale(1); opacity: 1; } }
@keyframes bnyAr { 0%, 50% { stroke-dashoffset: 1; opacity: 0; } 51% { opacity: 1; } 66%, 100% { stroke-dashoffset: 0; opacity: 1; } }

/* ---------- Section 2: Market Snapshot Rail (Ruled Ledger) ---------- */
.bny-snapshot {
  background: var(--bny-surface);
  border-bottom: 1px solid var(--bny-line);
}

.bny-snapshot__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bny-snapshot__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-inline-end: 1px solid var(--bny-line);
  min-width: 0;
  color: inherit;
  transition: background-color 150ms var(--bny-ease-out);
}

.bny-snapshot__item:last-child {
  border-inline-end: 0;
}

@media (hover: hover) and (pointer: fine) {
  .bny-snapshot__item:hover {
    background: var(--bny-surface-2);
    color: inherit;
  }
}

.bny-snapshot__cat {
  font-size: 12.5px;
  color: var(--bny-text-muted);
}

.bny-snapshot__main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.bny-snapshot__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--bny-text);
}

.bny-snapshot__metric {
  font-size: 13px;
  color: var(--bny-text-muted);
}

/* ---------- Shared Section Spacing & Headers ---------- */
.bny-section {
  padding-block: clamp(56px, 7vw, 96px);
}

.bny-section--bordered {
  border-bottom: 1px solid var(--bny-line);
}

.bny-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 3.6vw, 44px);
  flex-wrap: wrap;
}

.bny-section-head__text {
  max-width: 60ch;
  display: grid;
  gap: 10px;
}

.bny-section-head__title {
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.32;
}

.bny-section-head__desc {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--bny-text-muted);
}

/* ---------- Section 3: Master-Detail Pillars Showcase ---------- */
.bny-pillars {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.bny-pillars__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--bny-line-strong);
}

.bny-pillar-btn {
  appearance: none;
  width: 100%;
  text-align: start;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--bny-line);
  border-inline-start: 3px solid transparent;
  padding: 18px 16px;
  display: grid;
  gap: 6px;
  cursor: pointer;
  transition:
    background-color 150ms var(--bny-ease-out),
    border-color 150ms var(--bny-ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .bny-pillar-btn:hover {
    background: var(--bny-surface);
  }
}

.bny-pillar-btn[aria-selected="true"] {
  background: var(--bny-surface);
  border-inline-start-color: var(--bny-highlight);
}

.bny-pillar-btn__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bny-pillar-btn__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--bny-text);
}

.bny-pillar-btn[aria-selected="true"] .bny-pillar-btn__name {
  color: var(--bny-primary);
}

.bny-pillar-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--bny-radius-pill);
  background: var(--bny-surface-2);
  color: var(--bny-text-muted);
  white-space: nowrap;
}

.bny-pillar-tag--live {
  color: var(--bny-accent-text);
  background: color-mix(in srgb, var(--bny-accent) 14%, transparent);
}

.bny-pillar-btn__summary {
  font-size: 14px;
  line-height: 1.65;
  color: var(--bny-text-muted);
}

/* Pillar Detail Stage */
.bny-pillar-stage {
  background: var(--bny-surface);
  border: 1px solid var(--bny-line-strong);
  border-radius: var(--bny-radius-lg);
  overflow: hidden;
  min-width: 0;
}

.bny-pillar-panel {
  display: none;
  padding: clamp(20px, 2.8vw, 30px);
  gap: 20px;
  min-width: 0;
}

.bny-pillar-panel[data-active="true"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.bny-pillar-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.bny-pillar-panel__title {
  font-size: 21px;
  margin-bottom: 6px;
}

.bny-pillar-panel__desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--bny-text-muted);
  max-width: 52ch;
}

.bny-route-code {
  font-family: var(--bny-font-en);
  font-size: 13px;
  font-weight: 600;
  direction: ltr;
  padding: 5px 11px;
  border-radius: var(--bny-radius-sm);
  background: var(--bny-bg);
  border: 1px solid var(--bny-line);
  color: var(--bny-primary);
  white-space: nowrap;
}

/* Domain Preview Tables */
.bny-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--bny-line);
  border-radius: var(--bny-radius-md);
  background: var(--bny-bg);
}

.bny-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 460px;
}

.bny-table th,
.bny-table td {
  padding: 11px 12px;
  text-align: start;
  border-bottom: 1px solid var(--bny-line);
}

.bny-table tr:last-child td {
  border-bottom: 0;
}

.bny-table th {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bny-text-muted);
  background: var(--bny-surface-2);
}

.bny-table td strong {
  color: var(--bny-text);
}

.bny-bars-viz {
  background: var(--bny-bg);
  border: 1px solid var(--bny-line);
  border-radius: var(--bny-radius-md);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.bny-bar-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 86px;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
}

.bny-bar-track {
  height: 10px;
  background: var(--bny-surface-2);
  border-radius: var(--bny-radius-pill);
  overflow: hidden;
}

.bny-bar-fill {
  height: 100%;
  border-radius: var(--bny-radius-pill);
  background: var(--bny-series-1);
}

.bny-bar-fill--s2 { background: var(--bny-series-2); }
.bny-bar-fill--s3 { background: var(--bny-series-3); }

.bny-pillar-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--bny-line);
  flex-wrap: wrap;
}

.bny-pillar-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
  color: var(--bny-text-muted);
}

.bny-pillar-bullets li {
  position: relative;
  padding-inline-start: 14px;
}

.bny-pillar-bullets li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bny-accent);
}

/* ---------- Section 4: Architectural Lapis Band (Data Integrity & Pipeline) ---------- */
.bny-band {
  background: var(--bny-band-bg);
  color: var(--bny-band-text);
  border-top: 1px solid var(--bny-band-line);
  border-bottom: 1px solid var(--bny-band-line);
}

.bny-band h2,
.bny-band h3 {
  color: var(--bny-band-text);
}

.bny-band__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 4.5vw, 56px);
  align-items: start;
}

.bny-band__intro {
  display: grid;
  gap: 18px;
}

.bny-band__lead {
  color: var(--bny-band-muted);
  font-size: 16.5px;
  line-height: 1.85;
}

/* Data Pipeline Diagram Card */
.bny-pipeline {
  margin-top: 8px;
  background: var(--bny-band-surface);
  border: 1px solid var(--bny-band-line);
  border-radius: var(--bny-radius-lg);
  padding: 20px;
  display: grid;
  gap: 14px;
}

.bny-pipeline__caption {
  font-size: 13px;
  font-weight: 700;
  color: var(--bny-band-teal);
}

.bny-pipeline__steps {
  display: grid;
  gap: 10px;
}

.bny-pipe-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--bny-radius-md);
  border: 1px solid var(--bny-band-line);
  background: color-mix(in srgb, var(--bny-band-bg) 45%, transparent);
}

.bny-pipe-node__name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--bny-band-text);
}

.bny-pipe-node__meta {
  font-size: 12.5px;
  color: var(--bny-band-muted);
  text-align: end;
}

/* Ruled Integrity Principles (No Boxy Cards) */
.bny-principles {
  border-top: 1px solid var(--bny-band-line-strong);
}

.bny-principle {
  padding-block: 22px;
  border-bottom: 1px solid var(--bny-band-line);
  display: grid;
  gap: 6px;
}

.bny-principle__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bny-principle__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bny-band-accent);
  flex-shrink: 0;
}

.bny-principle__title {
  font-size: 18px;
  font-weight: 700;
}

.bny-principle__body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--bny-band-muted);
  padding-inline-start: 18px;
}

/* ---------- Section 5: Academy Graphic Editorial Index ---------- */
.bny-academy-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: stretch;
}

.bny-featured-article {
  background: var(--bny-surface);
  border: 1px solid var(--bny-line-strong);
  border-radius: var(--bny-radius-lg);
  padding: clamp(22px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.bny-article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--bny-text-muted);
  flex-wrap: wrap;
}

.bny-article-cat {
  font-weight: 700;
  color: var(--bny-accent-text);
}

.bny-featured-article__title {
  font-size: clamp(21px, 2.2vw, 26px);
  line-height: 1.4;
  margin-block: 10px 12px;
}

.bny-featured-article__title a,
.bny-index-row__title a {
  color: var(--bny-text);
}

@media (hover: hover) and (pointer: fine) {
  .bny-featured-article__title a:hover,
  .bny-index-row__title a:hover {
    color: var(--bny-primary);
  }
}

.bny-featured-article__excerpt {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--bny-text-muted);
}

.bny-index-list {
  border-top: 1px solid var(--bny-line-strong);
  display: flex;
  flex-direction: column;
}

.bny-index-row {
  padding-block: 20px;
  border-bottom: 1px solid var(--bny-line);
  display: grid;
  gap: 6px;
}

.bny-index-row__title {
  font-size: 18px;
  line-height: 1.45;
}

.bny-index-row__excerpt {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--bny-text-muted);
}

/* ---------- Section 6: Dual Track CTA (Users + Institutional Sponsors) ---------- */
.bny-cta-band {
  padding-block: clamp(48px, 6vw, 80px);
  background: var(--bny-surface) var(--bny-pattern);
  background-size: 40px 40px;
  border-top: 1px solid var(--bny-line);
  border-bottom: 1px solid var(--bny-line);
}

.bny-cta-panel {
  background: var(--bny-surface);
  border: 1px solid var(--bny-line-strong);
  border-radius: var(--bny-radius-lg);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  overflow: hidden;
}

.bny-cta-panel__main {
  padding: clamp(26px, 4vw, 44px);
  display: grid;
  gap: 16px;
  align-content: center;
}

.bny-cta-panel__sponsor {
  padding: clamp(26px, 4vw, 40px);
  background: var(--bny-surface-2);
  border-inline-start: 1px solid var(--bny-line);
  display: grid;
  gap: 14px;
  align-content: center;
}

.bny-cta-panel__title {
  font-size: clamp(22px, 2.5vw, 30px);
}

.bny-cta-panel__sub {
  font-size: 16px;
  line-height: 1.8;
  color: var(--bny-text-muted);
}

.bny-cta-panel__sponsor h3 {
  font-size: 19px;
}

.bny-cta-panel__sponsor p {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--bny-text-muted);
}

/* ---------- Footer ---------- */
.bny-footer {
  background: var(--bny-bg);
  padding-block: clamp(48px, 6vw, 72px) 28px;
}

.bny-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 0.72fr));
  gap: clamp(24px, 3.5vw, 44px);
  padding-bottom: 36px;
  border-bottom: 1px solid var(--bny-line);
}

.bny-footer__brand {
  display: grid;
  gap: 14px;
  align-content: start;
}

.bny-footer__brand .bny-logo svg {
  height: 92px;
  width: auto;
}

.bny-footer__about {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--bny-text-muted);
  max-width: 38ch;
}

.bny-footer__disclaimer {
  font-size: 13px;
  line-height: 1.7;
  color: var(--bny-text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--bny-line);
  max-width: 42ch;
}

.bny-footer__col h3 {
  font-size: 15px;
  margin-bottom: 14px;
  color: var(--bny-text);
}

.bny-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.bny-footer__links a {
  font-size: 14.5px;
  color: var(--bny-text-muted);
}

@media (hover: hover) and (pointer: fine) {
  .bny-footer__links a:hover {
    color: var(--bny-primary);
  }
}

.bny-footer__bottom {
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--bny-text-muted);
}

/* ---------- WordPress Singular / Archive / 404 Templates ---------- */
.bny-prose-wrap {
  padding-block: clamp(36px, 5vw, 68px);
}

.bny-prose {
  max-width: 74ch;
  margin-inline: auto;
  background: var(--bny-surface);
  border: 1px solid var(--bny-line);
  border-radius: var(--bny-radius-lg);
  padding: clamp(24px, 4vw, 44px);
}

.bny-prose h1 {
  font-size: clamp(26px, 3.2vw, 36px);
  margin-bottom: 16px;
}

.bny-prose__body {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.bny-404 {
  max-width: 560px;
  margin: clamp(48px, 8vw, 96px) auto;
  padding: 36px 28px;
  text-align: center;
  background: var(--bny-surface) var(--bny-pattern);
  background-size: 40px 40px;
  border: 1px solid var(--bny-line-strong);
  border-radius: var(--bny-radius-lg);
  display: grid;
  gap: 16px;
  justify-items: center;
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 1060px) {
  .bny-hero__grid,
  .bny-pillars,
  .bny-band__grid,
  .bny-academy-grid,
  .bny-cta-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .bny-band__intro,
  .bny-principles,
  .bny-featured-article,
  .bny-index-list,
  .bny-cta-panel__main,
  .bny-cta-panel__sponsor,
  .bny-footer__brand,
  .bny-footer__col,
  .bny-pillars__list {
    min-width: 0;
  }

  .bny-hero__title {
    max-width: none;
  }

  .bny-cta-panel__sponsor {
    border-inline-start: 0;
    border-top: 1px solid var(--bny-line);
  }

  .bny-snapshot__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bny-snapshot__item:nth-child(2) {
    border-inline-end: 0;
  }

  .bny-snapshot__item:nth-child(1),
  .bny-snapshot__item:nth-child(2) {
    border-bottom: 1px solid var(--bny-line);
  }

  .bny-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .bny-nav,
  .bny-header__cta {
    display: none;
  }

  .bny-menu-toggle {
    display: inline-flex;
  }

  .bny-header__inner {
    min-height: 60px;
    gap: 12px;
  }

  .bny-header .bny-logo svg {
    height: 28px;
  }
}

@media (max-width: 640px) {
  .bny-workbench__top,
  .bny-workbench__foot {
    flex-wrap: wrap;
    padding-inline: 14px;
  }

  .bny-workbench__title {
    white-space: normal;
  }

  .bny-workbench__body {
    padding-inline: 14px;
  }

  .bny-workbench__charts {
    grid-template-columns: minmax(0, 1fr);
  }

  .bny-hero__ledger {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .bny-btn--lg {
    padding-inline: 16px;
    font-size: 14.5px;
  }

  .bny-greeks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bny-greek-cell:nth-child(3) {
    border-inline-end: 0;
  }

  .bny-greek-cell:nth-child(1),
  .bny-greek-cell:nth-child(2),
  .bny-greek-cell:nth-child(3) {
    border-bottom: 1px solid var(--bny-line);
  }

  .bny-greek-cell:nth-child(5) {
    grid-column: span 2;
  }

  .bny-snapshot__grid,
  .bny-footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bny-snapshot__item {
    border-inline-end: 0;
    border-bottom: 1px solid var(--bny-line);
  }

  .bny-snapshot__item:last-child {
    border-bottom: 0;
  }

  .bny-tab-btn {
    font-size: 12.5px;
    padding-inline: 4px;
  }

  .bny-pipe-node {
    flex-direction: column;
    align-items: flex-start;
  }

  .bny-pipe-node__meta {
    text-align: start;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
