/* Hub pages — reference structure, our design tokens */

:root {
  --accent: var(--primary);
  --accent-soft: color-mix(in srgb, var(--primary) 12%, transparent);
  --accent-line: color-mix(in srgb, var(--primary) 35%, transparent);
  /* Apple-like air: calm rhythm, larger type, softer grids */
  --hub-sec-pad-y: clamp(3.75rem, 9vw, 7rem);
  --hub-sec-head-gap: clamp(1.75rem, 3.5vw, 2.75rem);
  --hub-card-pad: clamp(1.35rem, 2.2vw, 1.85rem);
  --hub-grid-gap: clamp(1rem, 2vw, 1.5rem);
  --hub-type-lead: clamp(1.05rem, 1.9vw, 1.28rem);
}

/* Hub shell: section rhythm + type scale overrides (keep cyan tokens) */
.hub-shell .doc-sec {
  padding: var(--hub-sec-pad-y) 0;
}

.hub-shell .doc-sec-head,
.hub-shell .section-head {
  margin-bottom: var(--hub-sec-head-gap);
  max-width: 42rem;
}

.hub-shell .doc-sec-head h2,
.hub-shell .section-head h2,
.hub-shell .doc-sec > h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 0.85rem;
}

.hub-shell .section-head p.lead,
.hub-shell .section-head .lead {
  margin: 0;
  color: var(--fg-muted);
}

.hub-shell .doc-sec .lead,
.hub-shell p.lead {
  font-size: var(--hub-type-lead);
  line-height: 1.65;
  max-width: 54ch;
}

.hub-shell .doc-sec h3 {
  margin: 1.75rem 0 0.75rem;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
}

.hub-shell .doc-page .crumb {
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
  padding-top: clamp(0.35rem, 1.2vw, 0.75rem);
}

.hub-shell .info-grid {
  margin: 1.5rem 0;
  gap: 1px;
}

.hub-shell .info-card {
  padding: var(--hub-card-pad);
}

/* Calmer section hairlines on Hub */
.hub-shell .doc-sec::after,
.hub-shell .hub-hero::after {
  width: min(48rem, 70vw);
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--primary) 28%, transparent) 22%,
    color-mix(in srgb, var(--primary) 48%, transparent) 50%,
    color-mix(in srgb, var(--primary) 28%, transparent) 78%,
    transparent 100%
  );
}

/* Hub index: responsive tile grid (reference cardList), our tokens */
.hub-index {
  width: min(1080px, calc(100% - clamp(2rem, 6vw, 3rem)));
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 3.5rem) 0 clamp(3rem, 7vw, 4.5rem);
}

.hub-index-hero {
  position: relative;
  isolation: isolate;
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

.hub-index-hero h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-serif);
  font-size: clamp(2.35rem, 5vw, 3.25rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hub-index-hero p {
  margin: 0;
  color: var(--fg-muted);
  font-size: var(--hub-type-lead);
  line-height: 1.55;
}

.hub-index-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hub-section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.hub-section-label:not(:first-child) {
  margin-top: clamp(2.5rem, 5vw, 3rem);
}

.hub-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--border) 100%, transparent),
    transparent
  );
}

/* Hub hero breathes more against following bands */
.hub-hero {
  margin-bottom: 0;
  padding-block: 0;
}

.hub-hero .hub-hero-inner {
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 6vw, 4.75rem);
}

.hub-sticky-nav {
  margin-top: 0;
  border-top: none;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 90%, transparent);
}

/* ===== Hub heroes (reference layout) ===== */
/* Hero lives outside .container (see build-pages wrap_hub_body) so band is true full-bleed */
.hub-hero {
  position: relative;
  overflow: visible;
  margin: 0;
  width: 100%;
}

.hub-hero-glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 78% 0%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 60%),
    radial-gradient(50% 50% at 8% 100%, color-mix(in srgb, var(--primary) 6%, transparent), transparent 60%);
}

.hub-hero-grid {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(color-mix(in srgb, var(--fg) 4%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--fg) 4%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(90% 80% at 75% 10%, #000 20%, transparent 75%);
}

.hub-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - clamp(2.5rem, 7vw, 5rem)));
  margin-inline: auto;
}

.hub-hero--split .hub-hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(3.25rem, 9vw, 7.5rem) 0 clamp(3.25rem, 7vw, 5.5rem);
}

.hub-hero--center .hub-hero-inner {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.hub-hero-mark {
  display: grid;
  place-items: center;
  margin: 0 auto 1.75rem;
  color: var(--primary);
}

.hub-hero-mark svg {
  width: 56px;
  height: 56px;
}

.hub-hero-copy h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.35rem, 5.8vw, 4.15rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

.hub-hero--split .hub-hero-copy h1 {
  font-size: clamp(2.05rem, 4.6vw, 3.65rem);
}

.hub-hero-copy h1 em {
  font-style: italic;
  color: var(--primary);
  font-family: var(--font-serif);
}

.hub-hero-lead {
  margin: 1.5rem 0 0;
  color: var(--fg-muted);
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.65;
  max-width: 42ch;
}

.hub-hero--center .hub-hero-lead {
  margin-inline: auto;
}

.hub-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.65rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hub-hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.hub-hero-cta {
  margin-top: 2rem;
}

.hub-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  padding-bottom: 0.35rem;
}

.hub-hero-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 1.05rem;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.hub-hero-chip strong {
  color: var(--fg);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hub-hero-art {
  justify-self: center;
  width: 100%;
  max-width: 480px;
}

.hub-hero-art .hub-hero-svg,
.hub-hero-art > svg {
  width: 100%;
  height: auto;
  display: block;
}

.hub-hero-ticks {
  display: inline-flex;
  gap: 7px;
  margin-top: 2.25rem;
}

.hub-hero-tick {
  width: 26px;
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--fg) 12%, transparent);
}

.hub-hero-tick.is-on {
  background: var(--primary);
  box-shadow: 0 0 10px color-mix(in srgb, var(--primary) 40%, transparent);
}

.hub-hero-tick.is-now {
  animation: hub-tick-pulse 2.2s ease-out infinite;
}

@keyframes hub-tick-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .hub-hero-tick.is-now { animation: none; }
}

@media (max-width: 960px) {
  .hub-hero--split .hub-hero-inner {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }

  .hub-hero-art {
    max-width: 380px;
    margin-inline: auto;
  }
}

/* Hub index hero */
.hub-index-hero {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6rem) 0 clamp(2.75rem, 5vw, 3.75rem);
}

.hub-index-hero .hub-hero-mark {
  margin-bottom: 1.75rem;
}

.hub-index-hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(2.85rem, 6.5vw, 4rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.hub-index-hero p {
  margin: 0;
  color: var(--fg-muted);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.6;
}

.hub-kicker {
  display: block;
  margin-bottom: 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 600;
}

/* Legacy page-hero (kept for safety) */
.hub-shell .page-hero {
  max-width: 42rem;
  margin-bottom: 2.25rem;
}

.hub-shell .page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5.5vw, 3.75rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
}

/* Hub index tiles: 4 / 3 / 2 / 1 columns */
.hub-tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--hub-grid-gap);
  width: 100%;
  margin: 0 0 0.25rem;
}

@media (min-width: 640px) {
  .hub-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .hub-tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .hub-tile-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hub-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  min-height: 100%;
  padding: var(--hub-card-pad);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.hub-tile:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: var(--bg-soft);
  transform: translateY(-2px);
}

.hub-tile.is-soon {
  opacity: 0.55;
  pointer-events: none;
  cursor: default;
}

.hub-tile-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--primary) 10%, var(--bg));
  display: grid;
  place-items: center;
  color: var(--primary);
}

.hub-tile-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-tile-body {
  flex: 1;
  min-width: 0;
}

.hub-tile-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.hub-tile-body p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hub-tile-arrow {
  margin-top: auto;
  align-self: flex-end;
  color: var(--fg-muted);
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
}

.hub-tile:hover .hub-tile-arrow {
  color: var(--primary);
  transform: translateX(2px);
}

.hub-tile-soon {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  padding: 0.25rem 0.55rem;
}

/* Legacy hub list rows (kept for reference) */
.hub-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0;
}

.hub-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.hub-row:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: var(--bg-soft);
  transform: translateY(-1px);
}

.hub-row.is-soon {
  opacity: 0.55;
  pointer-events: none;
  cursor: default;
}

.hub-row-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--primary) 10%, var(--bg));
  display: grid;
  place-items: center;
  color: var(--primary);
}

.hub-row-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-row-body {
  flex: 1;
  min-width: 0;
}

.hub-row-body h2,
.hub-row-body h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.hub-row-body p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hub-row-arrow {
  flex-shrink: 0;
  color: var(--fg-muted);
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
}

.hub-row:hover .hub-row-arrow {
  color: var(--primary);
  transform: translateX(2px);
}

.hub-row-soon {
  flex-shrink: 0;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  padding: 0.25rem 0.55rem;
}

/* Icon fact / feature cards — balanced rows, full-width stretch */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--hub-grid-gap);
  width: 100%;
}

/* 3 items → 3 cols (market facts); stack override for role lists */
.icon-grid:has(> :nth-child(3):last-child) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.icon-grid.icon-grid--stack,
.icon-grid.icon-grid--stack:has(> :nth-child(3):last-child) {
  grid-template-columns: 1fr;
}

/* 4 items → 2×2 (reference benefit / security grids) */
.icon-grid:has(> :nth-child(4):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 961px) {
  /* 5 items → 3+2 (last row spans full width) */
  .icon-grid:has(> :nth-child(5):last-child) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .icon-grid:has(> :nth-child(5):last-child) > * {
    grid-column: span 2;
  }
  .icon-grid:has(> :nth-child(5):last-child) > :nth-child(4),
  .icon-grid:has(> :nth-child(5):last-child) > :nth-child(5) {
    grid-column: span 3;
  }

  /* 6 items → 3+3 */
  .icon-grid:has(> :nth-child(6):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .icon-grid:has(> :nth-child(6):last-child) > * {
    grid-column: auto;
  }

  .icon-grid:has(> :nth-child(3):last-child):not(.icon-grid--stack) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Token security: cards + contract specs side-by-side on large */
.security-split {
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  align-items: start;
}

@media (min-width: 900px) {
  .security-split {
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 3vw, 2rem);
  }
}

.security-split .icon-grid {
  margin: 0;
}

.security-split .data-table {
  margin: 0;
  width: 100%;
}

.icon-card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: var(--hub-card-pad);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 100%;
  width: 100%;
  min-width: 0;
}

.icon-card .ic {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.icon-card .ic svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-card h3 {
  margin: 0;
  font-size: 1.12rem;
}

.icon-card p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.98rem;
  line-height: 1.55;
  flex: 1;
}

.icon-card .ic-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.55rem;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.icon-card .ic-link:hover {
  text-decoration: underline;
}

.icon-card .ic-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.icon-card .fact-value {
  margin: 0;
  color: var(--fg);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}

/* Section head with soon badge */
.sec-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.85rem 1.15rem;
  margin-bottom: 0.5rem;
}

.sec-head-row h2 {
  margin: 0;
}

.badge-soon {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

/* Advantages two-column */
.adv-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.adv-col h3 {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.adv-stack {
  display: grid;
  gap: 0.85rem;
}

.adv-item {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 1.2rem 1.25rem;
}

.adv-item h4 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.adv-item p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.adv-item.is-soon {
  opacity: 0.75;
}

/* Steps */
.step-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hub-grid-gap);
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.step-cards li {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: var(--hub-card-pad);
  counter-increment: step;
  position: relative;
}

.step-cards li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-serif);
  font-size: 1.55rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.step-cards h3 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
}

.step-cards p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Events browser mock */
.events-band {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  align-items: start;
}

.mk-browser {
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}

.mk-browser-bar {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}

.mk-browser-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  display: block;
}

.mk-browser-bar span {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

.mk-grid {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.mk-chip {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 0.7rem 0.8rem;
}

.mk-chip .tag {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.mk-chip h4 {
  margin: 0.25rem 0 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.mk-chip .bar {
  display: flex;
  height: 6px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.mk-chip .bar i.y { background: var(--primary); }
.mk-chip .bar i.n { background: #64748b; }

.mk-chip .pct {
  display: flex;
  justify-content: space-between;
  margin-top: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--fg-muted);
}

/* Try-it widget */
.try-widget {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: clamp(1.35rem, 2.5vw, 1.85rem);
  max-width: 560px;
}

.try-tabs {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.try-tab {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg-muted);
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.try-tab.is-active {
  border-color: var(--primary);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--bg));
}

.try-q {
  margin: 0 0 1.1rem;
  font-size: 1.15rem;
  font-weight: 650;
}

.try-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.try-side {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 0.95rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: inherit;
}

.try-side.is-active {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.try-side strong {
  display: block;
  font-size: 1.1rem;
  color: var(--primary);
}

.try-side span {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.try-stake label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 0.35rem;
}

.try-stake input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.try-stake-val {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 0.35rem 0 0.85rem;
}

.try-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.try-results div {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 0.95rem;
}

.try-results span {
  display: block;
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.try-results strong {
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.try-results .win strong { color: var(--primary); }

/* Future phases */
.phase-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hub-grid-gap);
  position: relative;
}

.phase-card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: var(--hub-card-pad);
}

.phase-card .when {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.phase-card p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

/* Doc hero with accent em */
.doc-hero h1 em,
.doc-sec-head h2 em,
.sec-head-row h2 em {
  font-style: italic;
  color: var(--primary);
  font-family: var(--font-serif);
}

.doc-hero--split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  align-items: center;
}

.hero-candle {
  border: 1px solid var(--border);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--primary) 12%, transparent), transparent 50%),
    var(--bg-elev);
  height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.55rem;
  padding: 1.25rem 1rem 1.5rem;
}

.hero-candle i {
  width: 10px;
  position: relative;
  background: var(--primary);
  opacity: 0.85;
}

.hero-candle i::before,
.hero-candle i::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: currentColor;
  color: var(--primary);
}

.hero-candle i::before { top: -18%; height: 18%; }
.hero-candle i::after { bottom: -22%; height: 22%; }

.hero-candle i:nth-child(odd) {
  background: #64748b;
  opacity: 0.7;
}

.hero-candle i:nth-child(odd)::before,
.hero-candle i:nth-child(odd)::after {
  color: #64748b;
}

/* Close CTA */
.doc-close {
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, transparent), transparent 55%),
    var(--bg-elev);
  padding: clamp(2.25rem, 4vw, 3.25rem) clamp(1.5rem, 3vw, 2.25rem);
  text-align: center;
}

.doc-close h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
  letter-spacing: -0.02em;
}

.doc-close p {
  margin: 0 auto 1.5rem;
  max-width: 36rem;
  color: var(--fg-muted);
  font-size: var(--hub-type-lead);
  line-height: 1.6;
}

/* Roadmap — alternating L/R timeline (reference qrowL/qrowR) */
.roadmap-path {
  padding-top: 0.25rem;
}

.roadmap-tl {
  position: relative;
  padding: 0.65rem 0 0.25rem;
  max-width: 56rem;
  margin-inline: auto;
}

.roadmap-axis {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 0 calc(100% - 240px), transparent 100%);
  mask-image: linear-gradient(#000 0 calc(100% - 240px), transparent 100%);
}

.roadmap-axis-fill {
  display: block;
  width: 100%;
  height: 58%;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 20%, transparent));
}

.roadmap-year {
  display: flex;
  justify-content: center;
  position: relative;
  padding: 1.65rem 0 1.35rem;
}

.roadmap-year-label {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.38rem 1rem;
}

.q-row {
  position: relative;
  padding: 0.75rem 0;
}

.q-dot {
  position: absolute;
  top: 2.5rem;
  left: 50%;
  z-index: 2;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  border: 2px solid color-mix(in srgb, var(--border) 90%, var(--fg-muted));
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: 0 0 0 5px var(--bg);
  transition: background 0.3s, border-color 0.3s;
}

.q-row:has(.q-card.is-past) .q-dot {
  background: var(--primary);
  border-color: var(--primary);
}

.q-dot.is-now {
  background: var(--primary);
  border-color: var(--primary);
  animation: roadmap-dot-pulse 2.4s ease-out infinite;
}

.q-row.is-future .q-dot {
  border-style: dashed;
}

.q-tick {
  position: absolute;
  top: 2.9rem;
  z-index: 1;
  width: 34px;
  height: 2px;
  opacity: 0.55;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.q-rowL .q-tick {
  right: 50%;
  margin-right: 7px;
  transform: scaleX(-1);
}

.q-rowR .q-tick {
  left: 50%;
  margin-left: 7px;
}

.q-card {
  width: calc(50% - 3.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: clamp(1.15rem, 2.4vw, 1.65rem);
  transition: border-color 0.2s;
}

.q-card:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}

.q-rowR .q-card {
  margin-left: auto;
}

.q-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.q-head h3 {
  margin: 0;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.25;
}

.q-card .q-tag {
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  letter-spacing: 0.02em;
  color: var(--primary);
  font-weight: 700;
}

.q-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.q-point {
  position: relative;
  padding-left: 1.25rem;
  color: var(--fg-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.q-point::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  left: 0.12rem;
  width: 6px;
  height: 6px;
  border-radius: var(--radius);
  background: var(--primary);
}

.q-point.is-done {
  padding-left: 1.5rem;
}

.q-point.is-done::before {
  content: none;
}

.q-done-icon {
  position: absolute;
  top: 0.15rem;
  left: 0;
  color: var(--accent);
}

.q-point.is-future::before {
  background: transparent;
  border: 1.5px solid color-mix(in srgb, var(--fg-muted) 55%, transparent);
  width: 7px;
  height: 7px;
  top: 0.42rem;
  left: 0.05rem;
}

.q-card.is-past {
  opacity: 0.82;
}

.q-card.is-now {
  border-color: var(--primary);
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--primary) 14%, var(--bg-elev)),
    var(--bg-elev) 68%
  );
  box-shadow: 0 12px 36px color-mix(in srgb, var(--primary) 12%, transparent);
}

.q-card.is-now .q-point {
  color: var(--fg);
}

.q-card.is-future {
  background: color-mix(in srgb, var(--bg-soft) 55%, var(--bg-elev));
  border-style: dashed;
  border-color: color-mix(in srgb, var(--border) 80%, transparent);
}

.q-card.is-future .q-tag,
.q-card.is-future .q-point {
  color: var(--fg-muted);
}

.roadmap-beyond {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  position: relative;
  padding: 1.85rem 0 0.35rem;
}

.roadmap-beyond-year {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1.25rem;
}

.roadmap-beyond-note {
  text-align: center;
  max-width: 52ch;
  margin: 0.65rem 0 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

@keyframes roadmap-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 5px var(--bg), 0 0 0 7px color-mix(in srgb, var(--primary) 35%, transparent); }
  50% { box-shadow: 0 0 0 5px var(--bg), 0 0 0 11px transparent; }
}

@media (max-width: 719px) {
  .roadmap-axis {
    left: 1.25rem;
    transform: none;
  }

  .q-dot {
    left: 1.25rem;
  }

  .q-tick {
    left: calc(1.25rem + 7px) !important;
    right: auto !important;
    margin: 0 !important;
    transform: none !important;
    width: 28px;
  }

  .q-rowL .q-card,
  .q-rowR .q-card {
    width: auto;
    margin-left: 2.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .q-dot.is-now {
    animation: none;
  }
}

/* Allocation bars — 2-col on large (reference barList) */
.bar-list {
  display: grid;
  gap: 0.95rem 2rem;
}

@media (min-width: 720px) {
  .bar-list {
    grid-template-columns: 1fr 1fr;
  }
}

.bar-row {
  display: grid;
  gap: 0.25rem;
}

.bar-row .meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.bar-row .track {
  height: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  overflow: hidden;
}

.bar-row .track i {
  display: block;
  height: 100%;
  background: var(--primary);
}

/* Order book mock */
.book-viz {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: var(--hub-card-pad);
  display: grid;
  gap: 0.7rem;
}

.book-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.book-row .depth {
  height: 8px;
  background: color-mix(in srgb, var(--primary) 35%, transparent);
  border-radius: 1px;
}

.book-row.is-ask .depth {
  background: color-mix(in srgb, #64748b 55%, transparent);
}

.book-mid {
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  padding: 0.35rem 0;
  border-block: 1px dashed var(--border);
}

/* Tariff cards */
.tariff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--hub-grid-gap);
  width: 100%;
}

@media (min-width: 961px) {
  .tariff-grid:has(> :nth-child(6):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tariff-grid:has(> :nth-child(4):last-child):not(:has(> :nth-child(5))) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .tariff-grid:has(> :nth-child(5):last-child) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .tariff-grid:has(> :nth-child(5):last-child) > * {
    grid-column: span 2;
  }
}

.tariff-card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: var(--hub-card-pad);
  text-align: center;
}

.tariff-rate {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  color: var(--primary);
  margin: 0.5rem 0;
}

/* Sticky hub nav */
.hub-sticky-nav {
  position: sticky;
  top: 68px;
  z-index: 20;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.85rem 0;
  margin-bottom: clamp(0.75rem, 2vw, 1.25rem);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.hub-shell .doc-sec[id],
.hub-shell .doc-page [id] {
  scroll-margin-top: calc(68px + 3.75rem);
}

.hub-sticky-nav a {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  padding: 0.4rem 0.7rem;
  background: var(--bg-elev);
}

.hub-sticky-nav a:hover {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

/* Liquidity engine diagram */
.liq-engine {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--hub-grid-gap);
  align-items: stretch;
  margin: 1.5rem 0 0.5rem;
  width: 100%;
}

.liq-engine-in,
.liq-engine-out,
.liq-engine-core {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 1.1rem 1.15rem;
  display: grid;
  align-content: center;
}

.liq-engine-core {
  text-align: center;
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, var(--bg-elev));
  gap: 0.35rem;
  min-width: min(220px, 100%);
}

.liq-engine-core strong {
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.liq-engine-core span,
.liq-engine-in span,
.liq-engine-out span {
  color: var(--fg-muted);
  font-size: 0.92rem;
}

@media (max-width: 960px) {
  .liq-engine {
    grid-template-columns: 1fr;
  }
}

/* Token scenario calc */
.token-calc {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: clamp(1.35rem, 2.5vw, 1.85rem);
  display: grid;
  gap: 1.25rem;
}

.token-calc-group label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 0.55rem;
}

.token-calc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.token-calc-chips button {
  border: 1px solid var(--border);
  background: var(--bg);
  color: inherit;
  font: inherit;
  font-size: 0.88rem;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.token-calc-chips button.is-active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, var(--bg));
  color: var(--primary);
}

.token-calc-token {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--fg-muted);
}

.token-calc-out {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.token-calc-row span {
  display: block;
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-bottom: 0.2rem;
}

.token-calc-row strong {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 600;
}

.token-calc-row:last-child strong,
.token-calc-row:nth-last-child(2) strong {
  color: var(--primary);
}

@media (max-width: 640px) {
  .token-calc-out {
    grid-template-columns: 1fr;
  }
}

/* Liquidity calc */
.liq-calc {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: clamp(1.35rem, 2.5vw, 1.85rem);
  display: grid;
  gap: 1.1rem;
  max-width: 480px;
}

.liq-calc label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 0.3rem;
}

.liq-calc input[type="range"],
.liq-calc select {
  width: 100%;
  accent-color: var(--primary);
}

.liq-calc select {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  padding: 0.5rem 0.65rem;
  font: inherit;
}

.liq-calc-out {
  border-top: 1px solid var(--border);
  padding-top: 1.1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.liq-calc-out strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--primary);
}

.liq-calc-out span {
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Docs download cards */
.doc-dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--hub-grid-gap);
}

.doc-dl a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 1.2rem 1.35rem;
  text-decoration: none;
  color: inherit;
}

.doc-dl a:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}

.doc-dl .dl {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Media soon gate */
.soon-gate {
  max-width: 420px;
  margin: clamp(4rem, 10vw, 6rem) auto;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: clamp(2.75rem, 5vw, 3.5rem) clamp(1.5rem, 3vw, 2rem);
}

.soon-gate .badge-soon {
  margin-bottom: 1.25rem;
}

/* Token staking fund strip (reference fund block) */
.fund-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.35rem;
  align-items: center;
  margin: 1.35rem 0 0.85rem;
  padding: var(--hub-card-pad);
  border: 1px solid var(--border);
  background: var(--bg-elev);
}

.fund-strip-value {
  margin: 0;
  grid-row: span 2;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  line-height: 1;
  color: var(--primary);
}

.fund-strip-sub {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.fund-strip-caption {
  margin: 0;
  font-size: 0.98rem;
  color: var(--fg);
  font-weight: 600;
}

/* Token terms tariff row — 3×2 on desktop */
.tariff-grid--token {
  width: 100%;
}

@media (min-width: 720px) {
  .tariff-grid--token {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Ambassador PV ladder (Early Boost) */
.pv-ladder {
  display: grid;
  gap: 0.65rem;
  margin: 0.5rem 0 1rem;
}

.pv-ladder-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  background: var(--bg-elev);
}

.pv-ladder-amt {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--fg);
}

.pv-ladder-lines {
  text-align: right;
  font-size: 0.88rem;
  color: var(--fg-muted);
}

.pv-ladder-lines strong {
  display: block;
  color: var(--primary);
  font-size: 1rem;
}

.ladder-table {
  margin-top: 1.25rem;
}

/* ── Linear depth / VIP line-map widget ── */
.depth-widget {
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 1rem;
}

.depth-tabs,
.depth-tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.depth-tiers {
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.depth-tab,
.depth-tier {
  appearance: none;
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg-muted);
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.depth-tab.is-active,
.depth-tier.is-active {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: color-mix(in srgb, var(--primary) 10%, var(--bg));
  color: var(--primary);
}

.depth-tab.is-soon {
  opacity: 0.55;
  cursor: not-allowed;
}

.depth-tab-tag {
  margin-left: 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.depth-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.depth-rates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.depth-rate-pill {
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, var(--bg));
  color: var(--primary);
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.depth-rate-pill span {
  font-weight: 500;
  color: var(--fg-muted);
  margin-right: 0.25rem;
}

.depth-count {
  flex-shrink: 0;
  font-size: 0.82rem;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

.depth-count strong {
  color: var(--primary);
  font-size: 1rem;
}

.depth-count-sep {
  margin: 0 0.15rem;
  opacity: 0.55;
}

.depth-lines-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.depth-lines {
  display: flex;
  gap: 0.5rem;
  min-width: min-content;
}

.depth-line {
  flex: 0 0 auto;
  min-width: 4.5rem;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 0.55rem 0.65rem;
  text-align: center;
}

.depth-line.is-off {
  opacity: 0.35;
}

.depth-line-label {
  display: block;
  font-size: 0.72rem;
  color: var(--fg-muted);
  margin-bottom: 0.2rem;
}

.depth-line-pct {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* ── Presale rounds table widget ── */
.presale-widget {
  margin-top: 1.25rem;
}

.presale-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.presale-stat {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 0.85rem 1rem;
}

.presale-stat-accent {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, var(--bg-elev));
}

.presale-stat-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 0.35rem;
}

.presale-stat-val {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  line-height: 1.25;
  color: var(--fg);
}

.presale-stat-accent .presale-stat-val {
  color: var(--primary);
}

.presale-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.presale-tab {
  appearance: none;
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg-muted);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.presale-tab.is-active {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: color-mix(in srgb, var(--primary) 10%, var(--bg));
  color: var(--primary);
}

.presale-caption {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--fg-muted);
}

.presale-table tbody tr.is-current {
  background: color-mix(in srgb, var(--primary) 8%, var(--bg-elev));
}

.presale-table tbody tr.is-current td:first-child {
  color: var(--primary);
  font-weight: 700;
}

@media (max-width: 720px) {
  .presale-stats {
    grid-template-columns: 1fr;
  }

  .depth-row-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

.doc-close-kicker {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
  letter-spacing: -0.02em;
  color: var(--fg);
}

.hub-shell .legal-prose {
  max-width: 46rem;
}

.hub-shell .doc-hero {
  max-width: 46rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  padding-top: 0.25rem;
}

.hub-shell .legal-prose h2 {
  margin-top: 2.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
}

.hub-shell .legal-prose h2:first-of-type {
  margin-top: 1rem;
  border-top: none;
  padding-top: 0;
}

@media (max-width: 960px) {
  /* icon-grid: balance by count — do not force all to 2-col with orphan last tiles */
  .icon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .icon-grid:has(> :nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .icon-grid.icon-grid--stack,
  .icon-grid.icon-grid--stack:has(> :nth-child(3):last-child) {
    grid-template-columns: 1fr;
  }

  /* On tablet, 3 market facts stack cleaner than cramped 3-col */
  .icon-grid.icon-grid--stack,
  .icon-grid.icon-grid--stack:has(> :nth-child(3):last-child) {
    grid-template-columns: 1fr;
  }

  .icon-grid:has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .icon-grid:has(> :nth-child(5):last-child) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .icon-grid:has(> :nth-child(5):last-child) > * {
    grid-column: span 2;
  }
  .icon-grid:has(> :nth-child(5):last-child) > :nth-child(4),
  .icon-grid:has(> :nth-child(5):last-child) > :nth-child(5) {
    grid-column: span 3;
  }

  .icon-grid:has(> :nth-child(6):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .icon-grid:has(> :nth-child(6):last-child) > * {
    grid-column: auto;
  }

  .tariff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .adv-cols,
  .step-cards,
  .events-band,
  .phase-row,
  .doc-hero--split,
  .security-split {
    grid-template-columns: 1fr;
  }

  .hero-candle {
    height: 160px;
  }
}

/* Keep .icon-grid at ≥2 cols on phones so 4-item grids stay 2×2 (base/960px already 2-col).
   Only collapse tariff grids / 3-card rows that read better stacked. */
@media (max-width: 560px) {
  .tariff-grid {
    grid-template-columns: 1fr;
  }

  .icon-grid:has(> :nth-child(3):last-child):not(.icon-grid--stack) {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hub-row {
    padding: 1.2rem;
  }

  .hub-row-icon {
    width: 40px;
    height: 40px;
  }

  .try-sides,
  .try-results,
  .liq-calc-out {
    grid-template-columns: 1fr;
  }
}
